@frontify/fondue 12.0.0-beta.11 → 12.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/components/AssetInput/AssetInput.d.ts +2 -0
  2. package/dist/components/AssetInput/AssetInput.es.js +33 -29
  3. package/dist/components/AssetInput/AssetInput.es.js.map +1 -1
  4. package/dist/components/AssetInput/SingleAsset/AssetSubline.d.ts +1 -1
  5. package/dist/components/AssetInput/SingleAsset/AssetSubline.es.js +25 -16
  6. package/dist/components/AssetInput/SingleAsset/AssetSubline.es.js.map +1 -1
  7. package/dist/components/AssetInput/SingleAsset/SelectedAsset.d.ts +2 -2
  8. package/dist/components/AssetInput/SingleAsset/SelectedAsset.es.js +46 -44
  9. package/dist/components/AssetInput/SingleAsset/SelectedAsset.es.js.map +1 -1
  10. package/dist/components/RichTextEditor/Plugins/GeneratePlugins.d.ts +3 -3
  11. package/dist/components/RichTextEditor/Plugins/GeneratePlugins.es.js +17 -17
  12. package/dist/components/RichTextEditor/Plugins/GeneratePlugins.es.js.map +1 -1
  13. package/dist/components/RichTextEditor/RichTextEditor.d.ts +0 -1
  14. package/dist/components/RichTextEditor/RichTextEditor.es.js +56 -78
  15. package/dist/components/RichTextEditor/RichTextEditor.es.js.map +1 -1
  16. package/dist/components/RichTextEditor/context/EditorResizeContext.es.js +13 -25
  17. package/dist/components/RichTextEditor/context/EditorResizeContext.es.js.map +1 -1
  18. package/dist/components/RichTextEditor/hooks/useEditorState.d.ts +4 -1
  19. package/dist/components/RichTextEditor/hooks/useEditorState.es.js +12 -11
  20. package/dist/components/RichTextEditor/hooks/useEditorState.es.js.map +1 -1
  21. package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js +1 -1
  22. package/dist/components/RichTextEditor/serializer/serializeToHtml.es.js.map +1 -1
  23. package/dist/components/RichTextEditor/utils/parseRawValue.d.ts +6 -1
  24. package/dist/components/RichTextEditor/utils/parseRawValue.es.js +8 -8
  25. package/dist/components/RichTextEditor/utils/parseRawValue.es.js.map +1 -1
  26. package/dist/components/ScrollWrapper/ScrollWrapper.es.js +1 -1
  27. package/dist/components/Table/TableCell.es.js +1 -1
  28. package/dist/components/Table/TableColumnHeader.es.js +1 -1
  29. package/dist/components/Tree/utils/mocks.es.js +1 -1
  30. package/dist/index.cjs.js +4 -4
  31. package/dist/index.cjs.js.map +1 -1
  32. package/dist/index.umd.js +4 -4
  33. package/dist/index.umd.js.map +1 -1
  34. package/package.json +1 -1
@@ -1,92 +1,70 @@
1
- import n, { useEffect as L, useCallback as T } from "react";
2
- import { Plate as _ } from "@udecode/plate";
3
- import { useMemoizedId as v } from "../../hooks/useMemoizedId.es.js";
4
- import { debounce as C } from "../../utilities/debounce.es.js";
5
- import { Toolbar as D } from "./components/Toolbar/Toolbar.es.js";
6
- import { RichTextEditorProvider as I } from "./context/RichTextEditorContext.es.js";
7
- import { useEditorState as V } from "./hooks/useEditorState.es.js";
8
- import { PaddingSizes as w } from "./types.es.js";
9
- import { defaultActions as x } from "./utils/actions.es.js";
10
- import "slate";
11
- import { ON_SAVE_DELAY_IN_MS as G } from "./utils/constants.es.js";
12
- import { defaultDesignTokens as s } from "./utils/defaultDesignTokens.es.js";
13
- import { parseRawValue as M } from "./utils/parseRawValue.es.js";
14
- import { TextStyles as d } from "./Plugins/TextStylePlugin/TextStyles/textStyles.es.js";
15
- import "./Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.es.js";
16
- import "./Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.es.js";
17
- import "./Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.es.js";
18
- import "./Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.es.js";
19
- import "./Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.es.js";
20
- import "./Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.es.js";
21
- import "./Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.es.js";
22
- import "./Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1
+ import r from "react";
2
+ import { Plate as v } from "@udecode/plate";
3
+ import { useMemoizedId as y } from "../../hooks/useMemoizedId.es.js";
4
+ import { Toolbar as A } from "./components/Toolbar/Toolbar.es.js";
5
+ import { RichTextEditorProvider as C } from "./context/RichTextEditorContext.es.js";
6
+ import { useEditorState as N } from "./hooks/useEditorState.es.js";
7
+ import { PaddingSizes as R } from "./types.es.js";
8
+ import { defaultActions as S } from "./utils/actions.es.js";
9
+ import { defaultDesignTokens as w } from "./utils/defaultDesignTokens.es.js";
10
+ import { parseRawValue as I } from "./utils/parseRawValue.es.js";
23
11
  import "./EditorPositioningWrapper/index.es.js";
24
- import { getEditorConfig as z } from "./utils/editorConfig.es.js";
25
- import { defaultPlugins as H } from "./Plugins/index.es.js";
26
- import { forceTabOutOfActiveElement as J } from "./helpers/forceTabOutOfActiveElement.es.js";
27
- import { GeneratePlugins as Y } from "./Plugins/GeneratePlugins.es.js";
28
- import { Position as j } from "./EditorPositioningWrapper/types.es.js";
29
- const F = {
12
+ import { getEditorConfig as L } from "./utils/editorConfig.es.js";
13
+ import { defaultPlugins as x } from "./Plugins/index.es.js";
14
+ import { forceTabOutOfActiveElement as D } from "./helpers/forceTabOutOfActiveElement.es.js";
15
+ import { Position as V } from "./EditorPositioningWrapper/types.es.js";
16
+ import { GeneratePlugins as z } from "./Plugins/GeneratePlugins.es.js";
17
+ const G = {
30
18
  position: "relative",
31
19
  height: "0"
32
- }, At = ({
33
- id: u,
34
- value: E,
35
- placeholder: g = "",
36
- readonly: P = !1,
37
- clear: A = !1,
38
- designTokens: e = s,
39
- actions: f = x,
40
- onTextChange: a,
41
- onBlur: c,
42
- padding: O = w.None,
43
- position: b = j.FLOATING,
44
- plugins: N = H
20
+ }, $ = ({
21
+ id: l,
22
+ value: s,
23
+ placeholder: f = "",
24
+ readonly: c = !1,
25
+ designTokens: d = w,
26
+ actions: n = S,
27
+ onTextChange: p,
28
+ onBlur: m,
29
+ padding: u = R.None,
30
+ position: g = V.FLOATING,
31
+ plugins: E = x
45
32
  }) => {
46
- const o = v(u), { localValue: l } = V(o, A), S = {
47
- placeholder: g,
48
- renderPlaceholder: ({ children: t, attributes: m }) => {
49
- const R = {
50
- ...m,
33
+ const e = y(l), { localValue: P, onChange: T } = N(p), h = {
34
+ placeholder: f,
35
+ renderPlaceholder: ({ children: i, attributes: a }) => {
36
+ const b = {
37
+ ...a,
51
38
  style: {
52
- ...m.style,
53
- ...F
39
+ ...a.style,
40
+ ...G
54
41
  }
55
42
  };
56
- return /* @__PURE__ */ n.createElement("span", {
57
- ...R
58
- }, t);
43
+ return /* @__PURE__ */ r.createElement("span", {
44
+ ...b
45
+ }, i);
59
46
  },
60
- readOnly: P,
61
- onBlur: () => c && c(JSON.stringify(l.current)),
62
- className: O,
63
- onKeyDown: (t) => {
64
- t.code === "Tab" && J();
47
+ readOnly: c,
48
+ onBlur: () => m && m(JSON.stringify(P.current)),
49
+ className: u,
50
+ onKeyDown: (i) => {
51
+ i.code === "Tab" && D();
65
52
  }
66
- };
67
- L(() => {
68
- for (const t of Object.values(d).filter((m) => m !== d.ELEMENT_PARAGRAPH))
69
- e[t] || (e[t] = s[t]);
70
- }, [e]);
71
- const p = C((t) => {
72
- a && a(JSON.stringify(t));
73
- }, G), h = T((t) => {
74
- p(t), l.current = t;
75
- }, [p, l]), r = Y(o, N), i = !!r && f.length === 0, y = i ? r.create() : z();
76
- return /* @__PURE__ */ n.createElement(I, {
77
- value: { designTokens: e, position: b }
78
- }, /* @__PURE__ */ n.createElement(_, {
79
- id: o,
80
- initialValue: M(o, E),
81
- onChange: h,
82
- editableProps: S,
83
- plugins: y
84
- }, i && r.toolbar(), i && r.inline(), !i && /* @__PURE__ */ n.createElement(D, {
85
- editorId: o,
86
- actions: f
53
+ }, o = z(e, E), t = !!o && n.length === 0, O = t ? o.Create() : L();
54
+ return /* @__PURE__ */ r.createElement(C, {
55
+ value: { designTokens: d, position: g }
56
+ }, /* @__PURE__ */ r.createElement(v, {
57
+ id: e,
58
+ initialValue: I({ editorId: e, raw: s }),
59
+ onChange: T,
60
+ editableProps: h,
61
+ plugins: O
62
+ }, t && o.Toolbar(), t && o.Inline(), !t && /* @__PURE__ */ r.createElement(A, {
63
+ editorId: e,
64
+ actions: n
87
65
  })));
88
66
  };
89
67
  export {
90
- At as RichTextEditor
68
+ $ as RichTextEditor
91
69
  };
92
70
  //# sourceMappingURL=RichTextEditor.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RichTextEditor.es.js","sources":["../../../src/components/RichTextEditor/RichTextEditor.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { FC, useCallback, useEffect } from 'react';\nimport { Plate, TNode } from '@udecode/plate';\nimport { useMemoizedId } from '@hooks/useMemoizedId';\nimport { debounce } from '@utilities/debounce';\nimport { EditableProps, RenderPlaceholderProps } from 'slate-react/dist/components/editable';\nimport { Toolbar } from './components/Toolbar/Toolbar';\nimport { RichTextEditorProvider } from './context/RichTextEditorContext';\nimport { useEditorState } from './hooks';\nimport { DesignTokens, PaddingSizes } from './types';\nimport { EditorActions, defaultActions } from './utils/actions';\nimport { ON_SAVE_DELAY_IN_MS } from './utils';\nimport { defaultDesignTokens } from './utils/defaultDesignTokens';\nimport { parseRawValue } from './utils/parseRawValue';\nimport { TextStyles } from './Plugins/TextStylePlugin/TextStyles';\nimport { Position } from './EditorPositioningWrapper';\nimport { getEditorConfig } from './utils/editorConfig';\nimport { GeneratePlugins, PluginComposer, defaultPlugins } from './Plugins';\nimport { forceTabOutOfActiveElement } from './helpers';\n\nconst PLACEHOLDER_STYLES: RenderPlaceholderProps['attributes']['style'] = {\n position: 'relative',\n height: '0',\n};\n\nexport type RichTextEditorProps = {\n id?: string;\n placeholder?: string;\n value?: string;\n onTextChange?: (value: string) => void;\n onBlur?: (value: string) => void;\n readonly?: boolean;\n clear?: boolean;\n designTokens?: DesignTokens;\n actions?: EditorActions[][];\n padding?: PaddingSizes;\n position?: Position;\n plugins?: PluginComposer;\n};\n\nexport const RichTextEditor: FC<RichTextEditorProps> = ({\n id,\n value: initialValue,\n placeholder = '',\n readonly = false,\n clear = false,\n designTokens = defaultDesignTokens,\n actions = defaultActions,\n onTextChange,\n onBlur,\n padding = PaddingSizes.None,\n position = Position.FLOATING,\n plugins = defaultPlugins,\n}) => {\n const editorId = useMemoizedId(id);\n const { localValue } = useEditorState(editorId, clear);\n\n const editableProps: EditableProps = {\n placeholder,\n renderPlaceholder: ({ children, attributes }) => {\n const mergedAttributes = {\n ...attributes,\n style: {\n ...attributes.style,\n ...PLACEHOLDER_STYLES,\n },\n };\n return <span {...mergedAttributes}>{children}</span>;\n },\n readOnly: readonly,\n onBlur: () => onBlur && onBlur(JSON.stringify(localValue.current)),\n className: padding,\n onKeyDown: (event) => {\n if (event.code === 'Tab') {\n // Forcing a blur event because of accessibility\n forceTabOutOfActiveElement();\n }\n },\n };\n\n useEffect(() => {\n for (const element of Object.values(TextStyles).filter(\n (textStyle) => textStyle !== TextStyles.ELEMENT_PARAGRAPH,\n )) {\n if (!designTokens[element]) {\n designTokens[element] = defaultDesignTokens[element];\n }\n }\n }, [designTokens]);\n\n const debouncedOnChange = debounce((value: TNode[]) => {\n onTextChange && onTextChange(JSON.stringify(value));\n }, ON_SAVE_DELAY_IN_MS);\n\n const onChange = useCallback(\n (value) => {\n debouncedOnChange(value);\n localValue.current = value;\n },\n [debouncedOnChange, localValue],\n );\n\n const config = GeneratePlugins(editorId, plugins);\n const isNew = !!config && actions.length === 0;\n const editorConfig = isNew ? config.create() : getEditorConfig();\n\n return (\n <RichTextEditorProvider value={{ designTokens, position }}>\n <Plate\n id={editorId}\n initialValue={parseRawValue(editorId, initialValue)}\n onChange={onChange}\n editableProps={editableProps}\n plugins={editorConfig}\n >\n {isNew && config.toolbar()}\n {isNew && config.inline()}\n {!isNew && <Toolbar editorId={editorId} actions={actions} />}\n </Plate>\n </RichTextEditorProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,IAAoE;AAAA,EACtE,UAAU;AAAA,EACV,QAAQ;AACZ,GAiBa,KAA0C,CAAC;AAAA,EACpD;AAAA,EACA,OAAO;AAAA,EACP,iBAAc;AAAA,EACd,cAAW;AAAA,EACX,WAAQ;AAAA,EACR,kBAAe;AAAA,EACf,aAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,aAAU,EAAa;AAAA,EACvB,cAAW,EAAS;AAAA,EACpB,aAAU;AAAA,MACR;AACI,QAAA,IAAW,EAAc,CAAE,GAC3B,EAAE,kBAAe,EAAe,GAAU,CAAK,GAE/C,IAA+B;AAAA,IACjC;AAAA,IACA,mBAAmB,CAAC,EAAE,aAAU,oBAAiB;AAC7C,YAAM,IAAmB;AAAA,QACrB,GAAG;AAAA,QACH,OAAO;AAAA,UACH,GAAG,EAAW;AAAA,UACd,GAAG;AAAA,QACP;AAAA,MAAA;AAEJ,aAAQ,kBAAA,cAAA,QAAA;AAAA,QAAM,GAAG;AAAA,MAAA,GAAmB,CAAS;AAAA,IACjD;AAAA,IACA,UAAU;AAAA,IACV,QAAQ,MAAM,KAAU,EAAO,KAAK,UAAU,EAAW,OAAO,CAAC;AAAA,IACjE,WAAW;AAAA,IACX,WAAW,CAAC,MAAU;AACd,MAAA,EAAM,SAAS,SAEY;IAEnC;AAAA,EAAA;AAGJ,IAAU,MAAM;AACD,eAAA,KAAW,OAAO,OAAO,CAAU,EAAE,OAC5C,CAAC,MAAc,MAAc,EAAW,iBAC5C;AACQ,MAAC,EAAa,MACd,GAAa,KAAW,EAAoB;AAAA,EAEpD,GACD,CAAC,CAAY,CAAC;AAEX,QAAA,IAAoB,EAAS,CAAC,MAAmB;AACnD,SAAgB,EAAa,KAAK,UAAU,CAAK,CAAC;AAAA,KACnD,CAAmB,GAEhB,IAAW,EACb,CAAC,MAAU;AACP,MAAkB,CAAK,GACvB,EAAW,UAAU;AAAA,EAAA,GAEzB,CAAC,GAAmB,CAAU,CAClC,GAEM,IAAS,EAAgB,GAAU,CAAO,GAC1C,IAAQ,CAAC,CAAC,KAAU,EAAQ,WAAW,GACvC,IAAe,IAAQ,EAAO,WAAW,EAAgB;AAE/D,SACK,kBAAA,cAAA,GAAA;AAAA,IAAuB,OAAO,EAAE,iBAAc,YAAS;AAAA,EAAA,GACnD,kBAAA,cAAA,GAAA;AAAA,IACG,IAAI;AAAA,IACJ,cAAc,EAAc,GAAU,CAAY;AAAA,IAClD;AAAA,IACA;AAAA,IACA,SAAS;AAAA,EAER,GAAA,KAAS,EAAO,QAAA,GAChB,KAAS,EAAO,OAAO,GACvB,CAAC,KAAU,kBAAA,cAAA,GAAA;AAAA,IAAQ;AAAA,IAAoB;AAAA,EAAkB,CAAA,CAC9D,CACJ;AAER;"}
1
+ {"version":3,"file":"RichTextEditor.es.js","sources":["../../../src/components/RichTextEditor/RichTextEditor.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { FC } from 'react';\nimport { Plate } from '@udecode/plate';\nimport { useMemoizedId } from '@hooks/useMemoizedId';\nimport { EditableProps, RenderPlaceholderProps } from 'slate-react/dist/components/editable';\nimport { Toolbar } from './components/Toolbar/Toolbar';\nimport { RichTextEditorProvider } from './context/RichTextEditorContext';\nimport { useEditorState } from './hooks';\nimport { DesignTokens, PaddingSizes } from './types';\nimport { EditorActions, defaultActions } from './utils/actions';\nimport { defaultDesignTokens } from './utils/defaultDesignTokens';\nimport { parseRawValue } from './utils/parseRawValue';\nimport { Position } from './EditorPositioningWrapper';\nimport { getEditorConfig } from './utils/editorConfig';\nimport { GeneratePlugins, PluginComposer, defaultPlugins } from './Plugins';\nimport { forceTabOutOfActiveElement } from './helpers';\n\nconst PLACEHOLDER_STYLES: RenderPlaceholderProps['attributes']['style'] = {\n position: 'relative',\n height: '0',\n};\n\nexport type RichTextEditorProps = {\n id?: string;\n placeholder?: string;\n value?: string;\n onTextChange?: (value: string) => void;\n onBlur?: (value: string) => void;\n readonly?: boolean;\n designTokens?: DesignTokens;\n actions?: EditorActions[][];\n padding?: PaddingSizes;\n position?: Position;\n plugins?: PluginComposer;\n};\n\nexport const RichTextEditor: FC<RichTextEditorProps> = ({\n id,\n value: initialValue,\n placeholder = '',\n readonly = false,\n designTokens = defaultDesignTokens,\n actions = defaultActions,\n onTextChange,\n onBlur,\n padding = PaddingSizes.None,\n position = Position.FLOATING,\n plugins = defaultPlugins,\n}) => {\n const editorId = useMemoizedId(id);\n const { localValue, onChange } = useEditorState(onTextChange);\n\n const editableProps: EditableProps = {\n placeholder,\n renderPlaceholder: ({ children, attributes }) => {\n const mergedAttributes = {\n ...attributes,\n style: {\n ...attributes.style,\n ...PLACEHOLDER_STYLES,\n },\n };\n return <span {...mergedAttributes}>{children}</span>;\n },\n readOnly: readonly,\n onBlur: () => onBlur && onBlur(JSON.stringify(localValue.current)),\n className: padding,\n onKeyDown: (event) => {\n if (event.code === 'Tab') {\n // Forcing a blur event because of accessibility\n forceTabOutOfActiveElement();\n }\n },\n };\n\n const config = GeneratePlugins(editorId, plugins);\n const isNew = !!config && actions.length === 0;\n const editorConfig = isNew ? config.Create() : getEditorConfig();\n\n return (\n <RichTextEditorProvider value={{ designTokens, position }}>\n <Plate\n id={editorId}\n initialValue={parseRawValue({ editorId, raw: initialValue })}\n onChange={onChange}\n editableProps={editableProps}\n plugins={editorConfig}\n >\n {isNew && config.Toolbar()}\n {isNew && config.Inline()}\n {!isNew && <Toolbar editorId={editorId} actions={actions} />}\n </Plate>\n </RichTextEditorProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,IAAoE;AAAA,EACtE,UAAU;AAAA,EACV,QAAQ;AACZ,GAgBa,IAA0C,CAAC;AAAA,EACpD;AAAA,EACA,OAAO;AAAA,EACP,iBAAc;AAAA,EACd,cAAW;AAAA,EACX,kBAAe;AAAA,EACf,aAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA,aAAU,EAAa;AAAA,EACvB,cAAW,EAAS;AAAA,EACpB,aAAU;AAAA,MACR;AACI,QAAA,IAAW,EAAc,CAAE,GAC3B,EAAE,eAAY,gBAAa,EAAe,CAAY,GAEtD,IAA+B;AAAA,IACjC;AAAA,IACA,mBAAmB,CAAC,EAAE,aAAU,oBAAiB;AAC7C,YAAM,IAAmB;AAAA,QACrB,GAAG;AAAA,QACH,OAAO;AAAA,UACH,GAAG,EAAW;AAAA,UACd,GAAG;AAAA,QACP;AAAA,MAAA;AAEJ,aAAQ,kBAAA,cAAA,QAAA;AAAA,QAAM,GAAG;AAAA,MAAA,GAAmB,CAAS;AAAA,IACjD;AAAA,IACA,UAAU;AAAA,IACV,QAAQ,MAAM,KAAU,EAAO,KAAK,UAAU,EAAW,OAAO,CAAC;AAAA,IACjE,WAAW;AAAA,IACX,WAAW,CAAC,MAAU;AACd,MAAA,EAAM,SAAS,SAEY;IAEnC;AAAA,EAAA,GAGE,IAAS,EAAgB,GAAU,CAAO,GAC1C,IAAQ,CAAC,CAAC,KAAU,EAAQ,WAAW,GACvC,IAAe,IAAQ,EAAO,WAAW,EAAgB;AAE/D,SACK,kBAAA,cAAA,GAAA;AAAA,IAAuB,OAAO,EAAE,iBAAc,YAAS;AAAA,EAAA,GACnD,kBAAA,cAAA,GAAA;AAAA,IACG,IAAI;AAAA,IACJ,cAAc,EAAc,EAAE,aAAU,KAAK,GAAc;AAAA,IAC3D;AAAA,IACA;AAAA,IACA,SAAS;AAAA,EAER,GAAA,KAAS,EAAO,QAAA,GAChB,KAAS,EAAO,OAAO,GACvB,CAAC,KAAU,kBAAA,cAAA,GAAA;AAAA,IAAQ;AAAA,IAAoB;AAAA,EAAkB,CAAA,CAC9D,CACJ;AAER;"}
@@ -1,33 +1,21 @@
1
- import e, { createContext as m, useContext as p } from "react";
1
+ import t, { createContext as n, useContext as d } from "react";
2
2
  import "@udecode/plate";
3
- import "./RichTextEditorContext.es.js";
4
- import "../Plugins/CheckboxListPlugin/index.es.js";
5
- import "slate-react";
6
- import "../Plugins/LinkPlugin/index.es.js";
7
- import "../Plugins/TextStylePlugin/TextStyles/textStyles.es.js";
8
- import "../Plugins/TextStylePlugin/TextStyles/Custom1Plugin/createCustom1Plugin.es.js";
9
- import "../Plugins/TextStylePlugin/TextStyles/Custom2Plugin/createCustom2Plugin.es.js";
10
- import "../Plugins/TextStylePlugin/TextStyles/Custom3Plugin/createCustom3Plugin.es.js";
11
- import "../Plugins/TextStylePlugin/TextStyles/Heading1Plugin/createHeading1Plugin.es.js";
12
- import "../Plugins/TextStylePlugin/TextStyles/Heading2Plugin/createHeading2Plugin.es.js";
13
- import "../Plugins/TextStylePlugin/TextStyles/Heading3Plugin/createHeading3Plugin.es.js";
14
- import "../Plugins/TextStylePlugin/TextStyles/Heading4Plugin/createHeading4Plugin.es.js";
15
- import "../Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
16
- import { useEditorResize as n } from "../hooks/useEditorResize.es.js";
17
- import { PlateWrapper as d } from "../EditorPositioningWrapper/PlateWrapper.es.js";
18
- const r = m({
3
+ import "slate";
4
+ import { useEditorResize as s } from "../hooks/useEditorResize.es.js";
5
+ import { PlateWrapper as m } from "../EditorPositioningWrapper/PlateWrapper.es.js";
6
+ const r = n({
19
7
  editorWidth: 0,
20
8
  editorRef: null
21
- }), j = () => p(r), k = ({ children: o }) => {
22
- const { editorWidth: i, editorRef: t } = n();
23
- return /* @__PURE__ */ e.createElement(r.Provider, {
24
- value: { editorWidth: i, editorRef: t }
25
- }, /* @__PURE__ */ e.createElement(d, {
26
- ref: t
9
+ }), l = () => d(r), u = ({ children: o }) => {
10
+ const { editorWidth: i, editorRef: e } = s();
11
+ return /* @__PURE__ */ t.createElement(r.Provider, {
12
+ value: { editorWidth: i, editorRef: e }
13
+ }, /* @__PURE__ */ t.createElement(m, {
14
+ ref: e
27
15
  }, o));
28
16
  };
29
17
  export {
30
- k as EditorResizeContextProvider,
31
- j as useEditorResizeContext
18
+ u as EditorResizeContextProvider,
19
+ l as useEditorResizeContext
32
20
  };
33
21
  //# sourceMappingURL=EditorResizeContext.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EditorResizeContext.es.js","sources":["../../../../src/components/RichTextEditor/context/EditorResizeContext.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { createContext, useContext } from 'react';\nimport { useEditorResize } from '../hooks';\nimport { PlateWrapper } from '../EditorPositioningWrapper/PlateWrapper';\n\ntype EditorResizeContextProps = {\n editorWidth: number | undefined;\n editorRef: ((node: HTMLDivElement) => ResizeObserver | undefined) | null;\n};\nconst EditorResizeContext = createContext<EditorResizeContextProps>({\n editorWidth: 0,\n editorRef: null,\n});\nexport const useEditorResizeContext = () => useContext(EditorResizeContext);\n\ntype EditorResizeContextProviderProps = {\n children: React.ReactNode;\n};\n\nexport const EditorResizeContextProvider = ({ children }: EditorResizeContextProviderProps) => {\n const { editorWidth, editorRef } = useEditorResize();\n\n return (\n <EditorResizeContext.Provider value={{ editorWidth, editorRef }}>\n <PlateWrapper ref={editorRef}>{children}</PlateWrapper>\n </EditorResizeContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAUA,MAAM,IAAsB,EAAwC;AAAA,EAChE,aAAa;AAAA,EACb,WAAW;AACf,CAAC,GACY,IAAyB,MAAM,EAAW,CAAmB,GAM7D,IAA8B,CAAC,EAAE,kBAAiD;AACrF,QAAA,EAAE,gBAAa,iBAAc,EAAgB;AAG/C,SAAA,kBAAA,cAAC,EAAoB,UAApB;AAAA,IAA6B,OAAO,EAAE,gBAAa,aAAU;AAAA,EAAA,GACzD,kBAAA,cAAA,GAAA;AAAA,IAAa,KAAK;AAAA,EAAA,GAAY,CAAS,CAC5C;AAER;"}
1
+ {"version":3,"file":"EditorResizeContext.es.js","sources":["../../../../src/components/RichTextEditor/context/EditorResizeContext.tsx"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport React, { createContext, useContext } from 'react';\nimport { useEditorResize } from '../hooks';\nimport { PlateWrapper } from '../EditorPositioningWrapper/PlateWrapper';\n\ntype EditorResizeContextProps = {\n editorWidth: number | undefined;\n editorRef: ((node: HTMLDivElement) => ResizeObserver | undefined) | null;\n};\nconst EditorResizeContext = createContext<EditorResizeContextProps>({\n editorWidth: 0,\n editorRef: null,\n});\nexport const useEditorResizeContext = () => useContext(EditorResizeContext);\n\ntype EditorResizeContextProviderProps = {\n children: React.ReactNode;\n};\n\nexport const EditorResizeContextProvider = ({ children }: EditorResizeContextProviderProps) => {\n const { editorWidth, editorRef } = useEditorResize();\n\n return (\n <EditorResizeContext.Provider value={{ editorWidth, editorRef }}>\n <PlateWrapper ref={editorRef}>{children}</PlateWrapper>\n </EditorResizeContext.Provider>\n );\n};\n"],"names":[],"mappings":";;;;;AAUA,MAAM,IAAsB,EAAwC;AAAA,EAChE,aAAa;AAAA,EACb,WAAW;AACf,CAAC,GACY,IAAyB,MAAM,EAAW,CAAmB,GAM7D,IAA8B,CAAC,EAAE,kBAAiD;AACrF,QAAA,EAAE,gBAAa,iBAAc,EAAgB;AAG/C,SAAA,kBAAA,cAAC,EAAoB,UAApB;AAAA,IAA6B,OAAO,EAAE,gBAAa,aAAU;AAAA,EAAA,GACzD,kBAAA,cAAA,GAAA;AAAA,IAAa,KAAK;AAAA,EAAA,GAAY,CAAS,CAC5C;AAER;"}
@@ -1,5 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { TNode } from '@udecode/plate';
3
- export declare const useEditorState: (editorId: string, clear?: boolean) => {
3
+ declare type useEditorStateProps = ((value: string) => void) | undefined;
4
+ export declare const useEditorState: (onTextChange: useEditorStateProps) => {
4
5
  localValue: import("react").MutableRefObject<TNode[] | null>;
6
+ onChange: (value: any) => void;
5
7
  };
8
+ export {};
@@ -1,14 +1,15 @@
1
- import { useRef as f, useEffect as i } from "react";
2
- import { usePlateEditorState as c } from "@udecode/plate";
3
- import { EMPTY_RICH_TEXT_VALUE as s } from "../utils/parseRawValue.es.js";
4
- const d = (n, o = !1) => {
5
- const e = f(null), t = c(n);
6
- return i(() => {
7
- if (o && t) {
8
- const r = { path: [0, 0], offset: 0 };
9
- t.selection = { anchor: r, focus: r }, t.history = { redos: [], undos: [] }, t.children = s, e.current = s;
10
- }
11
- }, [o, t]), { localValue: e };
1
+ import { useRef as c, useCallback as i } from "react";
2
+ import { debounce as m } from "../../../utilities/debounce.es.js";
3
+ import "@udecode/plate";
4
+ import "slate";
5
+ import { ON_SAVE_DELAY_IN_MS as s } from "../utils/constants.es.js";
6
+ const d = (t) => {
7
+ const r = c(null), e = m((o) => {
8
+ t && t(JSON.stringify(o));
9
+ }, s), n = i((o) => {
10
+ e(o), r.current = o;
11
+ }, [e, r]);
12
+ return { localValue: r, onChange: n };
12
13
  };
13
14
  export {
14
15
  d as useEditorState
@@ -1 +1 @@
1
- {"version":3,"file":"useEditorState.es.js","sources":["../../../../src/components/RichTextEditor/hooks/useEditorState.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { useEffect, useRef } from 'react';\nimport { TNode, usePlateEditorState } from '@udecode/plate';\nimport { EMPTY_RICH_TEXT_VALUE } from '../utils/parseRawValue';\n\nexport const useEditorState = (editorId: string, clear = false) => {\n const localValue = useRef<TNode[] | null>(null);\n const editor = usePlateEditorState(editorId);\n\n useEffect(() => {\n if (clear && editor) {\n const point = { path: [0, 0], offset: 0 };\n editor.selection = { anchor: point, focus: point };\n editor.history = { redos: [], undos: [] };\n editor.children = EMPTY_RICH_TEXT_VALUE;\n localValue.current = EMPTY_RICH_TEXT_VALUE;\n }\n }, [clear, editor]);\n\n return { localValue };\n};\n"],"names":[],"mappings":";;;AAMO,MAAM,IAAiB,CAAC,GAAkB,IAAQ,OAAU;AACzD,QAAA,IAAa,EAAuB,IAAI,GACxC,IAAS,EAAoB,CAAQ;AAE3C,WAAU,MAAM;AACZ,QAAI,KAAS,GAAQ;AACX,YAAA,IAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,GAAG,QAAQ;AACtC,QAAO,YAAY,EAAE,QAAQ,GAAO,OAAO,KAC3C,EAAO,UAAU,EAAE,OAAO,CAAA,GAAI,OAAO,CAAA,KACrC,EAAO,WAAW,GAClB,EAAW,UAAU;AAAA,IACzB;AAAA,EAAA,GACD,CAAC,GAAO,CAAM,CAAC,GAEX,EAAE,cAAW;AACxB;"}
1
+ {"version":3,"file":"useEditorState.es.js","sources":["../../../../src/components/RichTextEditor/hooks/useEditorState.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { useCallback, useRef } from 'react';\nimport { TNode } from '@udecode/plate';\nimport { debounce } from '@utilities/debounce';\nimport { ON_SAVE_DELAY_IN_MS } from '../utils';\n\ntype useEditorStateProps = ((value: string) => void) | undefined;\n\nexport const useEditorState = (onTextChange: useEditorStateProps) => {\n const localValue = useRef<TNode[] | null>(null);\n\n const debouncedOnChange = debounce((value: TNode[]) => {\n onTextChange && onTextChange(JSON.stringify(value));\n }, ON_SAVE_DELAY_IN_MS);\n\n const onChange = useCallback(\n (value) => {\n debouncedOnChange(value);\n localValue.current = value;\n },\n [debouncedOnChange, localValue],\n );\n\n return { localValue, onChange };\n};\n"],"names":[],"mappings":";;;;;AASa,MAAA,IAAiB,CAAC,MAAsC;AAC3D,QAAA,IAAa,EAAuB,IAAI,GAExC,IAAoB,EAAS,CAAC,MAAmB;AACnD,SAAgB,EAAa,KAAK,UAAU,CAAK,CAAC;AAAA,KACnD,CAAmB,GAEhB,IAAW,EACb,CAAC,MAAU;AACP,MAAkB,CAAK,GACvB,EAAW,UAAU;AAAA,EAAA,GAEzB,CAAC,GAAmB,CAAU,CAClC;AAEO,SAAA,EAAE,eAAY;AACzB;"}
@@ -3,7 +3,7 @@ import { parseRawValue as i } from "../utils/parseRawValue.es.js";
3
3
  import { serializeNodeToHtmlRecursive as n } from "./utils/serializeNodeToHtmlRecursive.es.js";
4
4
  import { setDefaultDesignTokensIfNull as m } from "./utils/setDefaultDesignTokensIfNull.es.js";
5
5
  const T = (e, o = s) => {
6
- const r = i(e);
6
+ const r = i({ raw: e });
7
7
  return l(r, o);
8
8
  }, l = (e, o = s) => {
9
9
  const r = m(s, o);
@@ -1 +1 @@
1
- {"version":3,"file":"serializeToHtml.es.js","sources":["../../../../src/components/RichTextEditor/serializer/serializeToHtml.ts"],"sourcesContent":["import { TDescendant } from '@udecode/plate';\nimport { DesignTokens } from '../types';\nimport { defaultDesignTokens } from '../utils/defaultDesignTokens';\nimport { parseRawValue } from '../utils/parseRawValue';\nimport { serializeNodeToHtmlRecursive } from './utils/serializeNodeToHtmlRecursive';\nimport { setDefaultDesignTokensIfNull } from './utils/setDefaultDesignTokensIfNull';\n\nexport const serializeRawToHtml = (raw: string, designTokens: DesignTokens = defaultDesignTokens): string => {\n const nodes = parseRawValue(raw);\n return serializeNodesToHtml(nodes, designTokens);\n};\n\nexport const serializeNodesToHtml = (\n nodes: TDescendant[],\n designTokens: DesignTokens = defaultDesignTokens,\n): string => {\n const mergedDesignTokens = setDefaultDesignTokensIfNull(defaultDesignTokens, designTokens);\n return nodes.map((node) => serializeNodeToHtmlRecursive(node, mergedDesignTokens)).join('');\n};\n"],"names":[],"mappings":";;;;AAOO,MAAM,IAAqB,CAAC,GAAa,IAA6B,MAAgC;AACnG,QAAA,IAAQ,EAAc,CAAG;AACxB,SAAA,EAAqB,GAAO,CAAY;AACnD,GAEa,IAAuB,CAChC,GACA,IAA6B,MACpB;AACH,QAAA,IAAqB,EAA6B,GAAqB,CAAY;AAClF,SAAA,EAAM,IAAI,CAAC,MAAS,EAA6B,GAAM,CAAkB,CAAC,EAAE,KAAK,EAAE;AAC9F;"}
1
+ {"version":3,"file":"serializeToHtml.es.js","sources":["../../../../src/components/RichTextEditor/serializer/serializeToHtml.ts"],"sourcesContent":["import { TDescendant } from '@udecode/plate';\nimport { DesignTokens } from '../types';\nimport { defaultDesignTokens } from '../utils/defaultDesignTokens';\nimport { parseRawValue } from '../utils/parseRawValue';\nimport { serializeNodeToHtmlRecursive } from './utils/serializeNodeToHtmlRecursive';\nimport { setDefaultDesignTokensIfNull } from './utils/setDefaultDesignTokensIfNull';\n\nexport const serializeRawToHtml = (raw: string, designTokens: DesignTokens = defaultDesignTokens): string => {\n const nodes = parseRawValue({ raw });\n return serializeNodesToHtml(nodes, designTokens);\n};\n\nexport const serializeNodesToHtml = (\n nodes: TDescendant[],\n designTokens: DesignTokens = defaultDesignTokens,\n): string => {\n const mergedDesignTokens = setDefaultDesignTokensIfNull(defaultDesignTokens, designTokens);\n return nodes.map((node) => serializeNodeToHtmlRecursive(node, mergedDesignTokens)).join('');\n};\n"],"names":[],"mappings":";;;;AAOO,MAAM,IAAqB,CAAC,GAAa,IAA6B,MAAgC;AACzG,QAAM,IAAQ,EAAc,EAAE,OAAK,CAAA;AAC5B,SAAA,EAAqB,GAAO,CAAY;AACnD,GAEa,IAAuB,CAChC,GACA,IAA6B,MACpB;AACH,QAAA,IAAqB,EAA6B,GAAqB,CAAY;AAClF,SAAA,EAAM,IAAI,CAAC,MAAS,EAA6B,GAAM,CAAkB,CAAC,EAAE,KAAK,EAAE;AAC9F;"}
@@ -1,3 +1,8 @@
1
1
  import { Value } from '@udecode/plate';
2
2
  export declare const EMPTY_RICH_TEXT_VALUE: Value;
3
- export declare const parseRawValue: (editorId: string, raw?: string | undefined) => Value;
3
+ declare type ParseRawValueOptions = {
4
+ editorId?: string;
5
+ raw?: string;
6
+ };
7
+ export declare const parseRawValue: ({ editorId, raw }: ParseRawValueOptions) => Value;
8
+ export {};
@@ -1,14 +1,14 @@
1
- import { ELEMENT_PARAGRAPH as m, createPlateEditor as l, parseHtmlDocument as p, deserializeHtml as a } from "@udecode/plate";
2
- import { getEditorConfig as d } from "./editorConfig.es.js";
3
- const u = (t) => /^<\w+>.*<\/\w+>$/.test(t) ? t : `<p>${t}</p>`, E = [{ type: m, children: [{ text: "" }] }], H = (t, e) => {
1
+ import { ELEMENT_PARAGRAPH as i, createPlateEditor as l, parseHtmlDocument as m, deserializeHtml as p } from "@udecode/plate";
2
+ import { getEditorConfig as u } from "./editorConfig.es.js";
3
+ const d = (e) => /^<\w+>.*<\/\w+>$/.test(e) ? e : `<p>${e}</p>`, E = [{ type: i, children: [{ text: "" }] }], h = ({ editorId: e = "parseRawValue", raw: t }) => {
4
4
  let r = E;
5
- if (!e)
5
+ if (!t)
6
6
  return r;
7
7
  try {
8
- r = JSON.parse(e);
8
+ r = JSON.parse(t);
9
9
  } catch {
10
- const n = l({ id: t, plugins: d() }), c = e.trim().replace(/>\s+</g, "><"), s = u(c), i = p(s), o = a(n, {
11
- element: i.body,
10
+ const s = l({ id: `${e}_parseRawValue`, plugins: u() }), n = t.trim().replace(/>\s+</g, "><"), c = d(n), a = m(c), o = p(s, {
11
+ element: a.body,
12
12
  stripWhitespace: !0
13
13
  });
14
14
  o && (r = o);
@@ -17,6 +17,6 @@ const u = (t) => /^<\w+>.*<\/\w+>$/.test(t) ? t : `<p>${t}</p>`, E = [{ type: m,
17
17
  };
18
18
  export {
19
19
  E as EMPTY_RICH_TEXT_VALUE,
20
- H as parseRawValue
20
+ h as parseRawValue
21
21
  };
22
22
  //# sourceMappingURL=parseRawValue.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parseRawValue.es.js","sources":["../../../../src/components/RichTextEditor/utils/parseRawValue.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ELEMENT_PARAGRAPH, Value, createPlateEditor, deserializeHtml, parseHtmlDocument } from '@udecode/plate';\nimport { getEditorConfig } from './editorConfig';\n\nconst wrapTextInHtml = (text: string) => {\n const htmlDocRegex = /^<\\w+>.*<\\/\\w+>$/;\n\n return htmlDocRegex.test(text) ? text : `<p>${text}</p>`;\n};\n\nexport const EMPTY_RICH_TEXT_VALUE: Value = [{ type: ELEMENT_PARAGRAPH, children: [{ text: '' }] }];\n\nexport const parseRawValue = (editorId: string, raw?: string): Value => {\n let parsedValue = EMPTY_RICH_TEXT_VALUE;\n\n if (!raw) {\n return parsedValue;\n }\n\n try {\n parsedValue = JSON.parse(raw);\n } catch {\n const editor = createPlateEditor({ id: editorId, plugins: getEditorConfig() });\n const trimmed = raw.trim().replace(/>\\s+</g, '><');\n const htmlDocumentString = wrapTextInHtml(trimmed);\n const document = parseHtmlDocument(htmlDocumentString);\n const parsedHtml = deserializeHtml(editor, {\n element: document.body,\n stripWhitespace: true,\n }) as Value;\n if (parsedHtml) {\n parsedValue = parsedHtml;\n }\n }\n\n return parsedValue;\n};\n"],"names":[],"mappings":";;AAKA,MAAM,IAAiB,CAAC,MAGb,AAFc,mBAED,KAAK,CAAI,IAAI,IAAO,MAAM,SAGrC,IAA+B,CAAC,EAAE,MAAM,GAAmB,UAAU,CAAC,EAAE,MAAM,GAAI,CAAA,GAAG,GAErF,IAAgB,CAAC,GAAkB,MAAwB;AACpE,MAAI,IAAc;AAElB,MAAI,CAAC;AACM,WAAA;AAGP,MAAA;AACc,QAAA,KAAK,MAAM,CAAG;AAAA,EAAA,QAC9B;AACQ,UAAA,IAAS,EAAkB,EAAE,IAAI,GAAU,SAAS,KAAmB,GACvE,IAAU,EAAI,KAAA,EAAO,QAAQ,UAAU,IAAI,GAC3C,IAAqB,EAAe,CAAO,GAC3C,IAAW,EAAkB,CAAkB,GAC/C,IAAa,EAAgB,GAAQ;AAAA,MACvC,SAAS,EAAS;AAAA,MAClB,iBAAiB;AAAA,IAAA,CACpB;AACD,IAAI,KACc,KAAA;AAAA,EAEtB;AAEO,SAAA;AACX;"}
1
+ {"version":3,"file":"parseRawValue.es.js","sources":["../../../../src/components/RichTextEditor/utils/parseRawValue.ts"],"sourcesContent":["/* (c) Copyright Frontify Ltd., all rights reserved. */\n\nimport { ELEMENT_PARAGRAPH, Value, createPlateEditor, deserializeHtml, parseHtmlDocument } from '@udecode/plate';\nimport { getEditorConfig } from './editorConfig';\n\nconst wrapTextInHtml = (text: string) => {\n const htmlDocRegex = /^<\\w+>.*<\\/\\w+>$/;\n\n return htmlDocRegex.test(text) ? text : `<p>${text}</p>`;\n};\n\nexport const EMPTY_RICH_TEXT_VALUE: Value = [{ type: ELEMENT_PARAGRAPH, children: [{ text: '' }] }];\n\ntype ParseRawValueOptions = {\n editorId?: string;\n raw?: string;\n};\n\nexport const parseRawValue = ({ editorId = 'parseRawValue', raw }: ParseRawValueOptions): Value => {\n let parsedValue = EMPTY_RICH_TEXT_VALUE;\n\n if (!raw) {\n return parsedValue;\n }\n\n try {\n parsedValue = JSON.parse(raw);\n } catch {\n const editor = createPlateEditor({ id: `${editorId}_parseRawValue`, plugins: getEditorConfig() });\n const trimmed = raw.trim().replace(/>\\s+</g, '><');\n const htmlDocumentString = wrapTextInHtml(trimmed);\n const document = parseHtmlDocument(htmlDocumentString);\n const parsedHtml = deserializeHtml(editor, {\n element: document.body,\n stripWhitespace: true,\n }) as Value;\n if (parsedHtml) {\n parsedValue = parsedHtml;\n }\n }\n\n return parsedValue;\n};\n"],"names":[],"mappings":";;AAKA,MAAM,IAAiB,CAAC,MAGb,AAFc,mBAED,KAAK,CAAI,IAAI,IAAO,MAAM,SAGrC,IAA+B,CAAC,EAAE,MAAM,GAAmB,UAAU,CAAC,EAAE,MAAM,GAAI,CAAA,GAAG,GAOrF,IAAgB,CAAC,EAAE,cAAW,iBAAiB,aAAuC;AAC/F,MAAI,IAAc;AAElB,MAAI,CAAC;AACM,WAAA;AAGP,MAAA;AACc,QAAA,KAAK,MAAM,CAAG;AAAA,EAAA,QAC9B;AACQ,UAAA,IAAS,EAAkB,EAAE,IAAI,GAAG,mBAA0B,SAAS,EAAgB,EAAG,CAAA,GAC1F,IAAU,EAAI,KAAA,EAAO,QAAQ,UAAU,IAAI,GAC3C,IAAqB,EAAe,CAAO,GAC3C,IAAW,EAAkB,CAAkB,GAC/C,IAAa,EAAgB,GAAQ;AAAA,MACvC,SAAS,EAAS;AAAA,MAClB,iBAAiB;AAAA,IAAA,CACpB;AACD,IAAI,KACc,KAAA;AAAA,EAEtB;AAEO,SAAA;AACX;"}
@@ -1727,10 +1727,10 @@ import "../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/crea
1727
1727
  import "../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1728
1728
  import "../RichTextEditor/context/EditorResizeContext.es.js";
1729
1729
  import "../RichTextEditor/EditorPositioningWrapper/index.es.js";
1730
+ import "slate";
1730
1731
  import "../RichTextEditor/Plugins/CheckboxListPlugin/index.es.js";
1731
1732
  import "slate-react";
1732
1733
  import "../RichTextEditor/Plugins/LinkPlugin/index.es.js";
1733
- import "slate";
1734
1734
  import "../RichTextEditor/Plugins/index.es.js";
1735
1735
  import { useScrollWrapper as g } from "./hooks/useScrollWrapper.es.js";
1736
1736
  import { ScrollWrapperDirection as i, scrollWrapperDirections as h } from "./types.es.js";
@@ -1726,10 +1726,10 @@ import "../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/crea
1726
1726
  import "../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1727
1727
  import "../RichTextEditor/context/EditorResizeContext.es.js";
1728
1728
  import "../RichTextEditor/EditorPositioningWrapper/index.es.js";
1729
+ import "slate";
1729
1730
  import "../RichTextEditor/Plugins/CheckboxListPlugin/index.es.js";
1730
1731
  import "slate-react";
1731
1732
  import "../RichTextEditor/Plugins/LinkPlugin/index.es.js";
1732
- import "slate";
1733
1733
  import "../RichTextEditor/Plugins/index.es.js";
1734
1734
  import "../../styles.es.js";
1735
1735
  import { SelectionMode as k } from "./Table.es.js";
@@ -1727,10 +1727,10 @@ import "../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/crea
1727
1727
  import "../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1728
1728
  import "../RichTextEditor/context/EditorResizeContext.es.js";
1729
1729
  import "../RichTextEditor/EditorPositioningWrapper/index.es.js";
1730
+ import "slate";
1730
1731
  import "../RichTextEditor/Plugins/CheckboxListPlugin/index.es.js";
1731
1732
  import "slate-react";
1732
1733
  import "../RichTextEditor/Plugins/LinkPlugin/index.es.js";
1733
- import "slate";
1734
1734
  import "../RichTextEditor/Plugins/index.es.js";
1735
1735
  import "../../styles.es.js";
1736
1736
  import { SortDirection as O, SelectionMode as _ } from "./Table.es.js";
@@ -1728,10 +1728,10 @@ import "../../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Heading4Plugin/c
1728
1728
  import "../../RichTextEditor/Plugins/TextStylePlugin/TextStyles/Quote/createQuotePlugin.es.js";
1729
1729
  import "../../RichTextEditor/context/EditorResizeContext.es.js";
1730
1730
  import "../../RichTextEditor/EditorPositioningWrapper/index.es.js";
1731
+ import "slate";
1731
1732
  import "../../RichTextEditor/Plugins/CheckboxListPlugin/index.es.js";
1732
1733
  import "slate-react";
1733
1734
  import "../../RichTextEditor/Plugins/LinkPlugin/index.es.js";
1734
- import "slate";
1735
1735
  import "../../RichTextEditor/Plugins/index.es.js";
1736
1736
  import "@react-stately/table";
1737
1737
  import "react-textarea-autosize";