removed @blocknote/core from dependencies (#6580)

Fixes #6564  & #6561 

@FelixMalfait 

Removed @blocknote/core from dependencies



https://github.com/user-attachments/assets/ef6acfff-2945-4062-a35c-21dd108a4345

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
nitin
2024-08-08 19:14:09 +05:30
committed by GitHub
parent c3bf94e4cc
commit 774cb554f4
21 changed files with 8366 additions and 10067 deletions

View File

@ -1,12 +1,13 @@
import styled from '@emotion/styled';
import { useEffect, useRef, useState } from 'react';
import ReactPhoneNumberInput from 'react-phone-number-input';
import styled from '@emotion/styled';
import { TEXT_INPUT_STYLE } from 'twenty-ui';
import { LightCopyIconButton } from '@/object-record/record-field/components/LightCopyIconButton';
import { useRegisterInputEvents } from '@/object-record/record-field/meta-types/input/hooks/useRegisterInputEvents';
import { PhoneCountryPickerDropdownButton } from '@/ui/input/components/internal/phone/components/PhoneCountryPickerDropdownButton';
import { E164Number } from 'libphonenumber-js';
import 'react-phone-number-input/style.css';
const StyledContainer = styled.div`
@ -89,9 +90,9 @@ export const PhoneInput = ({
const wrapperRef = useRef<HTMLDivElement>(null);
const copyRef = useRef<HTMLDivElement>(null);
const handleChange = (newValue: string) => {
const handleChange = (newValue: E164Number) => {
setInternalValue(newValue);
onChange?.(newValue);
onChange?.(newValue as string);
};
useEffect(() => {

View File

@ -19,7 +19,12 @@ export type FloatingButtonProps = {
to?: string;
};
const StyledButton = styled.button<
const shouldForwardProp = (prop: string) =>
!['applyBlur', 'applyShadow', 'focus', 'position', 'size', 'to'].includes(
prop,
);
const StyledButton = styled('button', { shouldForwardProp })<
Pick<
FloatingButtonProps,
| 'size'

View File

@ -1,6 +1,6 @@
import React from 'react';
import { css, useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import React from 'react';
import { IconComponent } from 'twenty-ui';
export type FloatingIconButtonSize = 'small' | 'medium';
@ -22,8 +22,17 @@ export type FloatingIconButtonProps = {
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
isActive?: boolean;
};
const shouldForwardProp = (prop: string) =>
![
'applyBlur',
'applyShadow',
'isActive',
'focus',
'position',
'size',
].includes(prop);
const StyledButton = styled.button<
const StyledButton = styled('button', { shouldForwardProp })<
Pick<
FloatingIconButtonProps,
'size' | 'position' | 'applyShadow' | 'applyBlur' | 'focus' | 'isActive'

View File

@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import styled from '@emotion/styled';
import { motion } from 'framer-motion';
import { useEffect, useState } from 'react';
import { isDefined } from '~/utils/isDefined';
@ -16,7 +16,7 @@ type ContainerProps = {
const StyledContainer = styled.div<ContainerProps>`
align-items: center;
background-color: ${({ theme, isOn, color }) =>
isOn ? color ?? theme.color.blue : theme.background.quaternary};
isOn ? (color ?? theme.color.blue) : theme.background.quaternary};
border-radius: 10px;
cursor: pointer;
display: flex;

View File

@ -1,5 +1,4 @@
import { Profiler } from 'react';
import { Interaction } from 'scheduler/tracing';
import { Profiler, ProfilerOnRenderCallback } from 'react';
import { logDebug } from '~/utils/logDebug';
@ -9,14 +8,13 @@ type TimingProfilerProps = {
};
export const TimingProfiler = ({ id, children }: TimingProfilerProps) => {
const handleRender = (
const handleRender: ProfilerOnRenderCallback = (
id: string,
phase: 'mount' | 'update' | 'nested-update',
actualDuration: number,
baseDuration: number,
startTime: number,
commitTime: number,
interactions: Set<Interaction>,
) => {
logDebug(
'TimingProfiler',
@ -28,7 +26,6 @@ export const TimingProfiler = ({ id, children }: TimingProfilerProps) => {
baseDuration,
startTime,
commitTime,
interactions,
},
null,
2,