2
0

⬆️ Upgrade dependencies

This commit is contained in:
Baptiste Arnaud
2023-03-14 15:08:53 +01:00
parent 9ca17e4e0b
commit ff09814ead
18 changed files with 1585 additions and 1158 deletions

View File

@@ -5,13 +5,7 @@ import {
useEventListener,
} from '@chakra-ui/react'
import React, { useEffect, useRef, useState } from 'react'
import {
Plate,
PlateProvider,
selectEditor,
TElement,
usePlateEditorRef,
} from '@udecode/plate-core'
import { Plate, PlateProvider, usePlateEditorRef } from '@udecode/plate-core'
import { editorStyle, platePlugins } from '@/lib/plate'
import { BaseEditor, BaseSelection, Transforms } from 'slate'
import { ToolBar } from './ToolBar'
@@ -22,6 +16,7 @@ import { parseHtmlStringToPlainText } from '../../utils'
import { VariableSearchInput } from '@/components/inputs/VariableSearchInput'
import { colors } from '@/lib/theme'
import { useOutsideClick } from '@/hooks/useOutsideClick'
import { selectEditor, TElement } from '@udecode/plate-common'
type TextBubbleEditorContentProps = {
id: string

View File

@@ -1,6 +1,6 @@
import { isDefined } from '@udecode/plate-core'
import { dequal } from 'dequal'
import { useCallback, useRef, useState } from 'react'
import { isDefined } from 'utils'
export interface Actions<T extends { updatedAt: Date }> {
set: (newPresent: T | ((current: T) => T) | undefined) => void
@@ -80,7 +80,6 @@ export const useUndo = <T extends { updatedAt: Date }>(
) {
return
}
if (newPresent === undefined) {
presentRef.current = null
setHistory(initialState)