@lofcz/platejs-core 53.1.1 → 53.1.8

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.
@@ -565,9 +565,13 @@ interface NodeStaticWrapperComponentProps<C extends AnyPluginConfig = PluginConf
565
565
  }
566
566
  /** @deprecated Use {@link RenderStaticNodeWrapperFunction} instead. */
567
567
  type NodeStaticWrapperComponentReturnType<C extends AnyPluginConfig = PluginConfig> = React.FC<SlateRenderElementProps<TElement, C>> | undefined;
568
+ type TransformInitialValue<C extends AnyPluginConfig = PluginConfig> = (ctx: SlatePluginContext<C> & {
569
+ value: Value;
570
+ }) => Value;
571
+ /** @deprecated Use {@link TransformInitialValue} instead. */
568
572
  type NormalizeInitialValue<C extends AnyPluginConfig = PluginConfig> = (ctx: SlatePluginContext<C> & {
569
573
  value: Value;
570
- }) => void;
574
+ }) => Value | void;
571
575
  type OverrideEditor<C extends AnyPluginConfig = PluginConfig> = (ctx: SlatePluginContext<C>) => {
572
576
  api?: Deep2Partial<EditorApi & CorePluginApi> & { [K in keyof InferApi<C>]?: InferApi<C>[K] extends ((...args: any[]) => any) ? (...args: Parameters<InferApi<C>[K]>) => ReturnType<InferApi<C>[K]> : InferApi<C>[K] extends Record<string, (...args: any[]) => any> ? { [N in keyof InferApi<C>[K]]?: (...args: Parameters<InferApi<C>[K][N]>) => ReturnType<InferApi<C>[K][N]> } : never };
573
577
  transforms?: Deep2Partial<EditorTransforms & CorePluginTransforms> & { [K in keyof InferTransforms<C>]?: InferTransforms<C>[K] extends ((...args: any[]) => any) ? (...args: Parameters<InferTransforms<C>[K]>) => ReturnType<InferTransforms<C>[K]> : InferTransforms<C>[K] extends Record<string, (...args: any[]) => any> ? { [N in keyof InferTransforms<C>[K]]?: (...args: Parameters<InferTransforms<C>[K][N]>) => ReturnType<InferTransforms<C>[K][N]> } : never };
@@ -605,6 +609,8 @@ type Serializer<C extends AnyPluginConfig = PluginConfig> = BaseSerializer & {
605
609
  type SlatePlugin<C extends AnyPluginConfig = PluginConfig> = BasePlugin<C> & Nullable<{
606
610
  decorate?: Decorate<WithAnyKey<C>>;
607
611
  extendEditor?: ExtendEditor<WithAnyKey<C>>;
612
+ transformInitialValue?: TransformInitialValue<WithAnyKey<C>>;
613
+ /** @deprecated Use `transformInitialValue` instead. */
608
614
  normalizeInitialValue?: NormalizeInitialValue<WithAnyKey<C>>;
609
615
  }> & SlatePluginMethods<C> & {
610
616
  handlers: Nullable<{
@@ -877,6 +883,50 @@ declare const HistoryPlugin: SlatePlugin<PluginConfig<"history", {}, {}, {}, {}>
877
883
  //#region src/lib/plugins/ParserPlugin.d.ts
878
884
  declare const ParserPlugin: SlatePlugin<PluginConfig<"parser", {}, {}, {}, {}>>;
879
885
  //#endregion
886
+ //#region src/lib/plugins/dom/withScrolling.d.ts
887
+ type WithAutoScrollOptions = {
888
+ mode?: ScrollMode;
889
+ operations?: AutoScrollOperationsMap;
890
+ scrollOptions?: ScrollIntoViewOptions;
891
+ };
892
+ declare const withScrolling: (editor: SlateEditor, fn: () => void, options?: WithAutoScrollOptions) => void;
893
+ //#endregion
894
+ //#region src/lib/plugins/dom/DOMPlugin.d.ts
895
+ declare const AUTO_SCROLL: WeakMap<SlateEditor, boolean>;
896
+ type AutoScrollOperationsMap = Partial<Record<Operation['type'], boolean>>;
897
+ type DomConfig = PluginConfig<'dom', {
898
+ /** Choose the first or last matching operation as the scroll target */
899
+ scrollMode?: ScrollMode;
900
+ /**
901
+ * Operations map; false to disable an operation, true or undefined to
902
+ * enable
903
+ */
904
+ scrollOperations?: AutoScrollOperationsMap;
905
+ /** Options passed to scrollIntoView */
906
+ scrollOptions?: ScrollIntoViewOptions;
907
+ }>;
908
+ /** Mode for picking target op when multiple enabled */
909
+ type ScrollMode = 'first' | 'last';
910
+ /**
911
+ * Placeholder plugin for DOM interaction, that could be replaced with
912
+ * ReactPlugin.
913
+ */
914
+ declare const DOMPlugin: SlatePlugin<PluginConfig<"dom", {
915
+ /** Choose the first or last matching operation as the scroll target */
916
+ scrollMode?: ScrollMode;
917
+ /**
918
+ * Operations map; false to disable an operation, true or undefined to
919
+ * enable
920
+ */
921
+ scrollOperations?: AutoScrollOperationsMap;
922
+ /** Options passed to scrollIntoView */
923
+ scrollOptions?: ScrollIntoViewOptions;
924
+ }, {
925
+ isScrolling: () => boolean;
926
+ }, {
927
+ withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
928
+ }, {}>>;
929
+ //#endregion
880
930
  //#region src/lib/plugins/slate-extension/transforms/init.d.ts
881
931
  type InitOptions = {
882
932
  autoSelect?: boolean | 'end' | 'start';
@@ -1006,50 +1056,6 @@ declare const SlateExtensionPlugin: SlatePlugin<PluginConfig<"slateExtension", {
1006
1056
  apply: <N$1 extends _platejs_slate1.TElement | TText>(operation: _platejs_slate1.Operation<N$1>) => void;
1007
1057
  }, {}>>;
1008
1058
  //#endregion
1009
- //#region src/lib/plugins/dom/withScrolling.d.ts
1010
- type WithAutoScrollOptions = {
1011
- mode?: ScrollMode;
1012
- operations?: AutoScrollOperationsMap;
1013
- scrollOptions?: ScrollIntoViewOptions;
1014
- };
1015
- declare const withScrolling: (editor: SlateEditor, fn: () => void, options?: WithAutoScrollOptions) => void;
1016
- //#endregion
1017
- //#region src/lib/plugins/dom/DOMPlugin.d.ts
1018
- declare const AUTO_SCROLL: WeakMap<SlateEditor, boolean>;
1019
- type AutoScrollOperationsMap = Partial<Record<Operation['type'], boolean>>;
1020
- type DomConfig = PluginConfig<'dom', {
1021
- /** Choose the first or last matching operation as the scroll target */
1022
- scrollMode?: ScrollMode;
1023
- /**
1024
- * Operations map; false to disable an operation, true or undefined to
1025
- * enable
1026
- */
1027
- scrollOperations?: AutoScrollOperationsMap;
1028
- /** Options passed to scrollIntoView */
1029
- scrollOptions?: ScrollIntoViewOptions;
1030
- }>;
1031
- /** Mode for picking target op when multiple enabled */
1032
- type ScrollMode = 'first' | 'last';
1033
- /**
1034
- * Placeholder plugin for DOM interaction, that could be replaced with
1035
- * ReactPlugin.
1036
- */
1037
- declare const DOMPlugin: SlatePlugin<PluginConfig<"dom", {
1038
- /** Choose the first or last matching operation as the scroll target */
1039
- scrollMode?: ScrollMode;
1040
- /**
1041
- * Operations map; false to disable an operation, true or undefined to
1042
- * enable
1043
- */
1044
- scrollOperations?: AutoScrollOperationsMap;
1045
- /** Options passed to scrollIntoView */
1046
- scrollOptions?: ScrollIntoViewOptions;
1047
- }, {
1048
- isScrolling: () => boolean;
1049
- }, {
1050
- withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
1051
- }, {}>>;
1052
- //#endregion
1053
1059
  //#region src/lib/plugins/navigation-feedback/types.d.ts
1054
1060
  declare const NAVIGATION_FEEDBACK_KEY = "navigationFeedback";
1055
1061
  declare const NavigationFeedbackPluginKey: {
@@ -1217,13 +1223,35 @@ type NodeIdOptions = {
1217
1223
  */
1218
1224
  idKey?: string;
1219
1225
  /**
1220
- * Normalize initial value. If false, normalize only the first and last node
1221
- * are missing id. To disable this behavior, use `NodeIdPlugin.configure({
1222
- * normalizeInitialValue: null })`.
1226
+ * Controls how missing ids are assigned in the initial value.
1223
1227
  *
1224
- * @default false
1228
+ * - `'if-needed'`: normalize only when the first or last top-level node is
1229
+ * missing an id
1230
+ * - `'always'`: walk the whole initial value and fill any missing ids
1231
+ * - `false`: skip initial-value id assignment
1232
+ *
1233
+ * @default 'if-needed'
1225
1234
  */
1226
- normalizeInitialValue?: boolean;
1235
+ initialValueIds?: false | 'always' | 'if-needed';
1236
+ /**
1237
+ * Legacy alias for `initialValueIds`.
1238
+ *
1239
+ * - `false`: only check the first and last top-level nodes
1240
+ * - `true`: walk the whole initial value and fill missing ids
1241
+ * - `null`: skip initial-value id assignment
1242
+ *
1243
+ * @deprecated Use `initialValueIds` instead.
1244
+ */
1245
+ normalizeInitialValue?: boolean | null;
1246
+ /**
1247
+ * Reports duplicate-id scan cost during inserted-node normalization.
1248
+ */
1249
+ onDuplicateIdScan?: (stats: {
1250
+ candidateCount: number;
1251
+ duration: number;
1252
+ existingCount: number;
1253
+ visitedCount: number;
1254
+ }) => void;
1227
1255
  /**
1228
1256
  * Reuse ids on undo/redo and copy/pasting if not existing in the document.
1229
1257
  * This is disabled by default to avoid duplicate ids across documents.
@@ -1239,11 +1267,12 @@ type NodeIdOptions = {
1239
1267
  idCreator?: () => any;
1240
1268
  } & QueryNodeOptions;
1241
1269
  type NormalizeNodeIdOptions = Pick<NodeIdOptions, 'allow' | 'exclude' | 'filter' | 'filterInline' | 'filterText' | 'idCreator' | 'idKey'>;
1242
- /**
1243
- * Normalize node IDs in a value without using editor operations. This is a pure
1244
- * function that returns a new normalized value.
1245
- */
1246
1270
  declare const normalizeNodeId: <V extends Value>(value: V, options?: NormalizeNodeIdOptions) => V;
1271
+ declare const normalizeNodeIdWithEditor: <V extends Value>(editor: {
1272
+ api: {
1273
+ isBlock: (node: Descendant) => boolean;
1274
+ };
1275
+ }, value: V, options?: NormalizeNodeIdOptions) => V;
1247
1276
  type NodeIdConfig = PluginConfig<'nodeId', NodeIdOptions, {}, {
1248
1277
  nodeId: {
1249
1278
  normalize: () => void;
@@ -1276,13 +1305,35 @@ declare const NodeIdPlugin: SlatePlugin<PluginConfig<"nodeId", {
1276
1305
  */
1277
1306
  idKey?: string;
1278
1307
  /**
1279
- * Normalize initial value. If false, normalize only the first and last node
1280
- * are missing id. To disable this behavior, use `NodeIdPlugin.configure({
1281
- * normalizeInitialValue: null })`.
1308
+ * Controls how missing ids are assigned in the initial value.
1282
1309
  *
1283
- * @default false
1310
+ * - `'if-needed'`: normalize only when the first or last top-level node is
1311
+ * missing an id
1312
+ * - `'always'`: walk the whole initial value and fill any missing ids
1313
+ * - `false`: skip initial-value id assignment
1314
+ *
1315
+ * @default 'if-needed'
1284
1316
  */
1285
- normalizeInitialValue?: boolean;
1317
+ initialValueIds?: false | "always" | "if-needed";
1318
+ /**
1319
+ * Legacy alias for `initialValueIds`.
1320
+ *
1321
+ * - `false`: only check the first and last top-level nodes
1322
+ * - `true`: walk the whole initial value and fill missing ids
1323
+ * - `null`: skip initial-value id assignment
1324
+ *
1325
+ * @deprecated Use `initialValueIds` instead.
1326
+ */
1327
+ normalizeInitialValue?: boolean | null;
1328
+ /**
1329
+ * Reports duplicate-id scan cost during inserted-node normalization.
1330
+ */
1331
+ onDuplicateIdScan?: (stats: {
1332
+ candidateCount: number;
1333
+ duration: number;
1334
+ existingCount: number;
1335
+ visitedCount: number;
1336
+ }) => void;
1286
1337
  /**
1287
1338
  * Reuse ids on undo/redo and copy/pasting if not existing in the document.
1288
1339
  * This is disabled by default to avoid duplicate ids across documents.
@@ -1353,7 +1404,15 @@ declare const getCorePlugins: ({
1353
1404
  navigationFeedback,
1354
1405
  nodeId,
1355
1406
  plugins
1356
- }: GetCorePluginsOptions) => (SlatePlugin<DebugConfig> | SlatePlugin<PluginConfig<"slateExtension", {
1407
+ }: GetCorePluginsOptions) => (SlatePlugin<PluginConfig<"dom", {
1408
+ scrollMode?: ScrollMode;
1409
+ scrollOperations?: AutoScrollOperationsMap;
1410
+ scrollOptions?: _platejs_slate1.ScrollIntoViewOptions;
1411
+ }, {
1412
+ isScrolling: () => boolean;
1413
+ }, {
1414
+ withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
1415
+ }, {}>> | SlatePlugin<DebugConfig> | SlatePlugin<PluginConfig<"slateExtension", {
1357
1416
  onNodeChange: (options: {
1358
1417
  editor: SlateEditor;
1359
1418
  node: _platejs_slate1.Descendant;
@@ -1380,14 +1439,6 @@ declare const getCorePlugins: ({
1380
1439
  } | undefined) => true | undefined);
1381
1440
  setValue: ((value?: string | _platejs_slate1.Value | undefined) => void) & ((value?: string | _platejs_slate1.Value | undefined) => void);
1382
1441
  apply: <N$1 extends _platejs_slate1.TElement | _platejs_slate1.TText>(operation: _platejs_slate1.Operation<N$1>) => void;
1383
- }, {}>> | SlatePlugin<PluginConfig<"dom", {
1384
- scrollMode?: ScrollMode;
1385
- scrollOperations?: AutoScrollOperationsMap;
1386
- scrollOptions?: _platejs_slate1.ScrollIntoViewOptions;
1387
- }, {
1388
- isScrolling: () => boolean;
1389
- }, {
1390
- withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
1391
1442
  }, {}>> | SlatePlugin<PluginConfig<"navigationFeedback", {
1392
1443
  activeTarget: NavigationFeedbackStoredTarget | null;
1393
1444
  duration: number;
@@ -1414,7 +1465,14 @@ declare const getCorePlugins: ({
1414
1465
  filterInline?: boolean;
1415
1466
  filterText?: boolean;
1416
1467
  idKey?: string;
1417
- normalizeInitialValue?: boolean;
1468
+ initialValueIds?: false | "always" | "if-needed";
1469
+ normalizeInitialValue?: boolean | null;
1470
+ onDuplicateIdScan?: (stats: {
1471
+ candidateCount: number;
1472
+ duration: number;
1473
+ existingCount: number;
1474
+ visitedCount: number;
1475
+ }) => void;
1418
1476
  reuseId?: boolean;
1419
1477
  idCreator?: () => any;
1420
1478
  } & _platejs_slate1.QueryNodeOptions, {}, {
@@ -2156,7 +2214,7 @@ type BasePlugin<C extends AnyPluginConfig = PluginConfig> = {
2156
2214
  * always be active.
2157
2215
  * - `inject` (for `inject.nodeProps`): Edit-only by default (true if not
2158
2216
  * specified). Set to `false` to always be active.
2159
- * - `normalizeInitialValue`: NOT edit-only by default (false if not specified).
2217
+ * - `transformInitialValue`: NOT edit-only by default (false if not specified).
2160
2218
  * Set to `true` to make it edit-only.
2161
2219
  */
2162
2220
  editOnly?: EditOnlyConfig | boolean;
@@ -2372,11 +2430,15 @@ type EditOnlyConfig = {
2372
2430
  */
2373
2431
  inject?: boolean;
2374
2432
  /**
2375
- * If true, `normalizeInitialValue` is only called when the editor is not
2433
+ * If true, `transformInitialValue` is only called when the editor is not
2376
2434
  * read-only.
2377
2435
  *
2378
2436
  * @default false (This is an exception. It's not edit-only by default, even if `editOnly` is true or an object, unless explicitly set to true here).
2379
2437
  */
2438
+ transformInitialValue?: boolean;
2439
+ /**
2440
+ * @deprecated Use `transformInitialValue` instead.
2441
+ */
2380
2442
  normalizeInitialValue?: boolean;
2381
2443
  /**
2382
2444
  * If true, `render` functions are only active when the editor is not
@@ -2490,7 +2552,7 @@ type BaseEditor = EditorBase & {
2490
2552
  /** Node types to plugin keys. */
2491
2553
  types: Record<string, string>;
2492
2554
  };
2493
- normalizeInitialValue: string[];
2555
+ transformInitialValue: string[];
2494
2556
  render: {
2495
2557
  aboveEditable: string[];
2496
2558
  aboveNodes: string[];
@@ -2695,7 +2757,7 @@ type BaseWithSlateOptions<P extends AnyPluginConfig = CorePlugin> = {
2695
2757
  */
2696
2758
  skipInitialization?: boolean;
2697
2759
  };
2698
- type WithSlateOptions<V extends Value = Value, P extends AnyPluginConfig = CorePlugin> = BaseWithSlateOptions<P> & Pick<Partial<AnySlatePlugin>, 'api' | 'decorate' | 'extendEditor' | 'inject' | 'normalizeInitialValue' | 'options' | 'override' | 'transforms'> & {
2760
+ type WithSlateOptions<V extends Value = Value, P extends AnyPluginConfig = CorePlugin> = BaseWithSlateOptions<P> & Pick<Partial<AnySlatePlugin>, 'api' | 'decorate' | 'extendEditor' | 'inject' | 'transformInitialValue' | 'normalizeInitialValue' | 'options' | 'override' | 'transforms'> & {
2699
2761
  /**
2700
2762
  * Initial content for the editor.
2701
2763
  *
@@ -3029,7 +3091,7 @@ declare const normalizeDescendantsToDocumentFragment: (editor: SlateEditor, {
3029
3091
  }) => Descendant[];
3030
3092
  //#endregion
3031
3093
  //#region src/lib/utils/omitPluginContext.d.ts
3032
- declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "plugin" | "getOptions" | "getOption" | "tf" | "type" | "setOptions" | "setOption">;
3094
+ declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "type" | "getOption" | "tf" | "setOptions" | "getOptions" | "setOption" | "plugin">;
3033
3095
  //#endregion
3034
3096
  //#region src/lib/utils/overridePluginsByKey.d.ts
3035
3097
  /**
@@ -3048,4 +3110,4 @@ declare const pipeOnNodeChange: (editor: SlateEditor, node: Descendant, prevNode
3048
3110
  //#region src/lib/utils/pipeOnTextChange.d.ts
3049
3111
  declare const pipeOnTextChange: (editor: SlateEditor, node: Descendant, text: string, prevText: string, operation: TextOperation) => boolean;
3050
3112
  //#endregion
3051
- export { TSlateEditor as $, SlateHTMLProps as $a, Serializer as $i, cleanHtmlFontElements as $n, AUTO_SCROLL as $r, upsertInlineFormattingContext as $t, applyDeepToNodes as A, ResolvedInputRule as Aa, AnySlatePlugin as Ai, isHtmlInlineElement as An, AstPlugin as Ao, PlateError as Ar, BaseParagraphPlugin as At, ZustandStoreApi as B, getSelectedDomNode as Ba, InjectNodeProps as Bi, htmlBrToNewLine as Bn, navigate as Br, STATIC_VALUE_CREATED_AT as Bt, isSlateNode as C, InsertDataInputRuleContext as Ca, getPluginType as Ci, pipeDeserializeHtmlLeaf as Cn, SlateRenderLeaf as Co, NodeIdOptions as Cr, NodeComponents as Ct, isSlateText as D, MatchBlockFenceOptions as Da, createSlatePlugin as Di, isOlSymbol as Dn, SlateRenderElement as Do, DebugErrorType as Dr, SelectionRules as Dt, isSlateString as E, MarkInputRuleConfig as Ea, getEditorPlugin as Ei, parseHtmlDocument as En, pipeRenderElementStatic as Eo, normalizeNodeId as Er, PluginConfig as Et, RenderLeafProps as F, TextSubstitutionPattern as Fa, ExtendEditorApi as Fi, inlineTagNames as Fn, getEdgeNodes as Fr, withBreakRules as Ft, WithSlateOptions as G, getPluginDataAttributes as Ga, NodeStaticWrapperComponentReturnType as Gi, someHtmlElement as Gn, NAVIGATION_FEEDBACK_KEY as Gr, createBlockFenceInputRule as Gt, nanoid$1 as H, getSelectedDomBlocks as Ha, NodeStaticProps as Hi, getHtmlComments as Hn, flashTarget as Hr, LengthPlugin as Ht, RenderElementFn as I, stripSlateDataAttributes as Ia, ExtendEditorTransforms as Ii, htmlTextNodeToString as In, EdgeNodes as Ir, OverridePlugin as It, BaseEditor as J, ViewPlugin as Ja, Parser as Ji, deserializeHtmlElement as Jn, NavigationFeedbackPluginKey as Jr, createTextSubstitutionInputRule as Jt, createSlateEditor as K, createStaticString as Ka, NormalizeInitialValue as Ki, deserializeHtmlNodeChildren as Kn, NavigationFeedbackActiveTarget as Kr, createBlockStartInputRule as Kt, RenderElementProps as L, stripHtmlClassNames as La, HtmlDeserializer as Li, htmlStringToDOMNode as Ln, AffinityConfig as Lr, withOverrides as Lt, RenderTextFn as M, SelectionInputRuleContext as Ma, Deserializer as Mi, isHtmlElement as Mn, isNodeAffinity as Mr, withNormalizeRules as Mt, RenderTextProps as N, TextSubstitutionInputRuleConfig as Na, EditorPlugin as Ni, isHtmlComment as Nn, isNodesAffinity as Nr, withMergeRules as Nt, isSlateVoid as O, MatchBlockStartOptions as Oa, createTSlatePlugin as Oi, isHtmlText as On, pluginRenderElementStatic as Oo, DebugPlugin as Or, WithAnyKey as Ot, RenderLeafFn as P, TextSubstitutionMatch as Pa, ExtendEditor as Pi, isHtmlBlockElement as Pn, getMarkBoundaryAffinity as Pr, withDeleteRules as Pt, SlateEditor as Q, SlateElementProps as Qa, RenderStaticNodeWrapperProps as Qi, cleanHtmlLinkElements as Qn, NavigationNavigateOptions as Qr, endInlineFormattingContext as Qt, RenderChunkFn as R, pipeDecorate as Ra, HtmlSerializer as Ri, htmlElementToLeaf as Rn, AffinityPlugin as Rr, withNodeId as Rt, isSlateLeaf as S, InsertDataInputRule as Sa, getPluginKeys as Si, pluginDeserializeHtml as Sn, pluginRenderTextStatic as So, NodeIdConfig as Sr, NodeComponent as St, isSlatePluginNode as T, InsertTextInputRuleContext as Ta, getSlatePlugin as Ti, parseHtmlElement as Tn, pluginRenderLeafStatic as To, NormalizeNodeIdOptions as Tr, ParserOptions as Tt, BaseWithSlateOptions as U, getRenderNodeStaticProps as Ua, NodeStaticWrapperComponent as Ui, getDataNodeProps as Un, resolveNavigationFeedbackTarget as Ur, defineInputRule as Ut, createZustandStore$1 as V, getSelectedDomFragment as Va, LeafStaticProps as Vi, htmlBodyToFragment as Vn, clearNavigationFeedbackTarget as Vr, normalizeStaticValue as Vt, CreateSlateEditorOptions as W, getNodeDataAttributes as Wa, NodeStaticWrapperComponentProps as Wi, findHtmlElement as Wn, NavigationFeedbackPlugin as Wr, createRuleFactory as Wt, KeyofNodePlugins as X, getEditorDOMFromHtmlString as Xa, RenderStaticNodeWrapper as Xi, copyBlockMarksToSpanChild as Xn, NavigationFeedbackTarget as Xr, matchBlockStart as Xt, InferPlugins as Y, createStaticEditor as Ya, PartialEditorPlugin as Yi, deserializeHtml as Yn, NavigationFeedbackStoredTarget as Yr, matchBlockFence as Yt, KeyofPlugins as Z, SlateElement as Za, RenderStaticNodeWrapperFunction as Zi, cleanHtmlTextNodes as Zn, NavigationFlashTargetOptions as Zr, matchDelimitedInline as Zt, getInjectMatch as _, InputRulesConfig as _a, HistoryPlugin as _i, replaceTagName as _n, LeafStatic as _o, GetCorePluginsOptions as _r, InferOptions as _t, omitPluginContext as a, SlateShortcut as aa, withScrolling as ai, collapseWhiteSpaceChildren as an, StyledSlateElementProps as ao, CARRIAGE_RETURN as ar, BasePluginContext as at, isSlateEditor as b, InsertBreakInputRule as ba, getPluginByType as bi, preCleanHtml as bn, SlateRenderText as bo, ChunkingConfig as br, MatchRules as bt, isType as c, AnyInputRule as ca, setValue as ci, CollapseWhiteSpaceState as cn, useNodeAttributes as co, SPACE as cr, BaseTransformOptions as ct, isHotkey as d, BlockFenceInputRuleMatch as da, liftBlock as di, WhiteSpaceRule as dn, SlateRenderLeafProps as do, HtmlPlugin as dr, EditOnlyConfig as dt, SlatePlugin as ea, AutoScrollOperationsMap as ei, isLastNonEmptyTextOfInlineFormattingContext as en, SlateLeaf as eo, cleanHtmlEmptyElements as er, AnyPluginConfig as et, getSlateClass as f, BlockStartInputRuleConfig as fa, InsertExitBreakOptions as fi, unwrapHtmlElement as fn, SlateRenderNodeProps as fo, withChunking as fr, ExtendConfig as ft, getInjectedPlugins as g, InputRuleTarget as ga, ParserPlugin as gi, traverseHtmlComments as gn, ElementStatic as go, DebugConfig as gr, InferKey as gt, keyToDataAttribute as h, InputRuleBuilder as ha, init as hi, traverseHtmlElements as hn, serializeHtml as ho, CorePluginTransforms as hr, InferApi as ht, overridePluginsByKey as i, SlatePlugins as ia, WithAutoScrollOptions as ii, collapseWhiteSpaceElement as in, SlateTextProps as io, DeserializeHtmlNodeReturnType as ir, BasePlugin as it, EditableProps as j, ResolvedInputRulesMeta as ja, Decorate as ji, isHtmlFragmentHref as jn, setAffinitySelection as jr, ParagraphConfig as jt, ApplyDeepToNodesOptions as k, MatchDelimitedInlineOptions as ka, AnyEditorPlugin as ki, isHtmlTable as kn, HandlerReturnType as ko, LogLevel as kr, WithRequiredKey as kt, Hotkeys as l, BaseInputRule as la, resetBlock as li, TrimEndRule as ln, BoxStaticProps as lo, TAB as lr, BreakRules as lt, getNodeDataAttributeKeys as m, DelimitedInlineInputRuleMatch as ma, InitOptions as mi, traverseHtmlNode as mn, SerializeHtmlOptions as mo, CorePluginApi as mr, GetInjectNodePropsReturnType as mt, pipeOnNodeChange as n, SlatePluginContext as na, DomConfig as ni, collapseWhiteSpaceText as nn, SlateNodeProps as no, cleanHtmlBrElements as nr, BaseHtmlDeserializer as nt, normalizeDescendantsToDocumentFragment as o, TextStaticProps as oa, SlateExtensionConfig as oi, collapseWhiteSpace as on, StyledSlateLeafProps as oo, LINE_FEED as or, BasePluginNode as ot, getPluginNodeProps as p, BlockStartInputRuleMatch as pa, insertExitBreak as pi, traverseHtmlTexts as pn, SlateRenderTextProps as po, CorePlugin as pr, GetInjectNodePropsOptions as pt, withSlate as q, getStaticPlugins as qa, OverrideEditor as qi, deserializeHtmlNode as qn, NavigationFeedbackConfig as qr, createMarkInputRule as qt, pipeInsertDataQuery as r, SlatePluginMethods as ra, ScrollMode as ri, collapseWhiteSpaceNode as rn, SlateText as ro, DeserializeHtmlChildren as rr, BaseInjectProps as rt, mergeDeepToNodes as s, TransformOptions as sa, SlateExtensionPlugin as si, collapseString as sn, StyledSlateTextProps as so, NO_BREAK_SPACE as sr, BaseSerializer as st, pipeOnTextChange as t, SlatePluginConfig$1 as ta, DOMPlugin as ti, inferWhiteSpaceRule as tn, SlateLeafProps as to, cleanHtmlCrLf as tr, BaseDeserializer as tt, createHotkey as u, BlockFenceInputRuleConfig as ua, LiftBlockOptions as ui, TrimStartRule as un, SlateRenderElementProps as uo, ZERO_WIDTH_SPACE as ur, DeleteRules as ut, defaultsDeepToNodes as v, InputRulesDefinition as va, withPlateHistory as vi, removeHtmlSurroundings as vn, PlateStatic as vo, LengthConfig as vr, InferSelectors as vt, isSlatePluginElement as w, InsertTextInputRule as wa, getPluginTypes as wi, pipeDeserializeHtmlElement as wn, pipeRenderLeafStatic as wo, NodeIdPlugin as wr, NormalizeRules as wt, isSlateElement as x, InsertBreakInputRuleContext as xa, getPluginKey as xi, postCleanHtml as xn, pipeRenderTextStatic as xo, ChunkingPlugin as xr, MergeRules as xt, getSlateElements as y, InputRulesFactoryContext as ya, getContainerTypes as yi, removeHtmlNodesBetweenComments as yn, PlateStaticProps as yo, getCorePlugins as yr, InferTransforms as yt, RenderChunkProps as z, isSelectOutside as za, InferConfig as zi, htmlElementToElement as zn, ElementAffinity as zr, NormalizeStaticValueOptions as zt };
3113
+ export { TSlateEditor as $, SlateElement as $a, RenderStaticNodeWrapperProps as $i, cleanHtmlFontElements as $n, NavigationNavigateOptions as $r, upsertInlineFormattingContext as $t, applyDeepToNodes as A, MatchBlockStartOptions as Aa, AnyEditorPlugin as Ai, isHtmlInlineElement as An, pluginRenderElementStatic as Ao, LogLevel as Ar, BaseParagraphPlugin as At, ZustandStoreApi as B, pipeDecorate as Ba, InferConfig as Bi, htmlBrToNewLine as Bn, ElementAffinity as Br, STATIC_VALUE_CREATED_AT as Bt, isSlateNode as C, InsertBreakInputRuleContext as Ca, getPluginKeys as Ci, pipeDeserializeHtmlLeaf as Cn, pipeRenderTextStatic as Co, NodeIdOptions as Cr, NodeComponents as Ct, isSlateText as D, InsertTextInputRuleContext as Da, getEditorPlugin as Di, isOlSymbol as Dn, pluginRenderLeafStatic as Do, normalizeNodeIdWithEditor as Dr, SelectionRules as Dt, isSlateString as E, InsertTextInputRule as Ea, getSlatePlugin as Ei, parseHtmlDocument as En, pipeRenderLeafStatic as Eo, normalizeNodeId as Er, PluginConfig as Et, RenderLeafProps as F, TextSubstitutionInputRuleConfig as Fa, ExtendEditor as Fi, inlineTagNames as Fn, getMarkBoundaryAffinity as Fr, withBreakRules as Ft, WithSlateOptions as G, getRenderNodeStaticProps as Ga, NodeStaticWrapperComponentProps as Gi, someHtmlElement as Gn, NavigationFeedbackPlugin as Gr, createBlockFenceInputRule as Gt, nanoid$1 as H, getSelectedDomNode as Ha, LeafStaticProps as Hi, getHtmlComments as Hn, clearNavigationFeedbackTarget as Hr, LengthPlugin as Ht, RenderElementFn as I, TextSubstitutionMatch as Ia, ExtendEditorApi as Ii, htmlTextNodeToString as In, getEdgeNodes as Ir, OverridePlugin as It, BaseEditor as J, createStaticString as Ja, OverrideEditor as Ji, deserializeHtmlElement as Jn, NavigationFeedbackConfig as Jr, createTextSubstitutionInputRule as Jt, createSlateEditor as K, getNodeDataAttributes as Ka, NodeStaticWrapperComponentReturnType as Ki, deserializeHtmlNodeChildren as Kn, NAVIGATION_FEEDBACK_KEY as Kr, createBlockStartInputRule as Kt, RenderElementProps as L, TextSubstitutionPattern as La, ExtendEditorTransforms as Li, htmlStringToDOMNode as Ln, EdgeNodes as Lr, withOverrides as Lt, RenderTextFn as M, ResolvedInputRule as Ma, Decorate as Mi, isHtmlElement as Mn, AstPlugin as Mo, setAffinitySelection as Mr, withNormalizeRules as Mt, RenderTextProps as N, ResolvedInputRulesMeta as Na, Deserializer as Ni, isHtmlComment as Nn, isNodeAffinity as Nr, withMergeRules as Nt, isSlateVoid as O, MarkInputRuleConfig as Oa, createSlatePlugin as Oi, isHtmlText as On, pipeRenderElementStatic as Oo, DebugErrorType as Or, WithAnyKey as Ot, RenderLeafFn as P, SelectionInputRuleContext as Pa, EditorPlugin as Pi, isHtmlBlockElement as Pn, isNodesAffinity as Pr, withDeleteRules as Pt, SlateEditor as Q, getEditorDOMFromHtmlString as Qa, RenderStaticNodeWrapperFunction as Qi, cleanHtmlLinkElements as Qn, NavigationFlashTargetOptions as Qr, endInlineFormattingContext as Qt, RenderChunkFn as R, stripSlateDataAttributes as Ra, HtmlDeserializer as Ri, htmlElementToLeaf as Rn, AffinityConfig as Rr, withNodeId as Rt, isSlateLeaf as S, InsertBreakInputRule as Sa, getPluginKey as Si, pluginDeserializeHtml as Sn, SlateRenderText as So, NodeIdConfig as Sr, NodeComponent as St, isSlatePluginNode as T, InsertDataInputRuleContext as Ta, getPluginTypes as Ti, parseHtmlElement as Tn, SlateRenderLeaf as To, NormalizeNodeIdOptions as Tr, ParserOptions as Tt, BaseWithSlateOptions as U, getSelectedDomFragment as Ua, NodeStaticProps as Ui, getDataNodeProps as Un, flashTarget as Ur, defineInputRule as Ut, createZustandStore$1 as V, isSelectOutside as Va, InjectNodeProps as Vi, htmlBodyToFragment as Vn, navigate as Vr, normalizeStaticValue as Vt, CreateSlateEditorOptions as W, getSelectedDomBlocks as Wa, NodeStaticWrapperComponent as Wi, findHtmlElement as Wn, resolveNavigationFeedbackTarget as Wr, createRuleFactory as Wt, KeyofNodePlugins as X, ViewPlugin as Xa, PartialEditorPlugin as Xi, copyBlockMarksToSpanChild as Xn, NavigationFeedbackStoredTarget as Xr, matchBlockStart as Xt, InferPlugins as Y, getStaticPlugins as Ya, Parser as Yi, deserializeHtml as Yn, NavigationFeedbackPluginKey as Yr, matchBlockFence as Yt, KeyofPlugins as Z, createStaticEditor as Za, RenderStaticNodeWrapper as Zi, cleanHtmlTextNodes as Zn, NavigationFeedbackTarget as Zr, matchDelimitedInline as Zt, getInjectMatch as _, InputRuleBuilder as _a, ParserPlugin as _i, replaceTagName as _n, serializeHtml as _o, GetCorePluginsOptions as _r, InferOptions as _t, omitPluginContext as a, SlatePlugins as aa, liftBlock as ai, collapseWhiteSpaceChildren as an, SlateText as ao, CARRIAGE_RETURN as ar, BasePluginContext as at, isSlateEditor as b, InputRulesDefinition as ba, getContainerTypes as bi, preCleanHtml as bn, PlateStatic as bo, ChunkingConfig as br, MatchRules as bt, isType as c, TransformInitialValue as ca, InitOptions as ci, CollapseWhiteSpaceState as cn, StyledSlateLeafProps as co, SPACE as cr, BaseTransformOptions as ct, isHotkey as d, BaseInputRule as da, AutoScrollOperationsMap as di, WhiteSpaceRule as dn, BoxStaticProps as do, HtmlPlugin as dr, EditOnlyConfig as dt, Serializer as ea, SlateExtensionConfig as ei, isLastNonEmptyTextOfInlineFormattingContext as en, SlateElementProps as eo, cleanHtmlEmptyElements as er, AnyPluginConfig as et, getSlateClass as f, BlockFenceInputRuleConfig as fa, DOMPlugin as fi, unwrapHtmlElement as fn, SlateRenderElementProps as fo, withChunking as fr, ExtendConfig as ft, getInjectedPlugins as g, DelimitedInlineInputRuleMatch as ga, withScrolling as gi, traverseHtmlComments as gn, SerializeHtmlOptions as go, DebugConfig as gr, InferKey as gt, keyToDataAttribute as h, BlockStartInputRuleMatch as ha, WithAutoScrollOptions as hi, traverseHtmlElements as hn, SlateRenderTextProps as ho, CorePluginTransforms as hr, InferApi as ht, overridePluginsByKey as i, SlatePluginMethods as ia, LiftBlockOptions as ii, collapseWhiteSpaceElement as in, SlateNodeProps as io, DeserializeHtmlNodeReturnType as ir, BasePlugin as it, EditableProps as j, MatchDelimitedInlineOptions as ja, AnySlatePlugin as ji, isHtmlFragmentHref as jn, HandlerReturnType as jo, PlateError as jr, ParagraphConfig as jt, ApplyDeepToNodesOptions as k, MatchBlockFenceOptions as ka, createTSlatePlugin as ki, isHtmlTable as kn, SlateRenderElement as ko, DebugPlugin as kr, WithRequiredKey as kt, Hotkeys as l, TransformOptions as la, init as li, TrimEndRule as ln, StyledSlateTextProps as lo, TAB as lr, BreakRules as lt, getNodeDataAttributeKeys as m, BlockStartInputRuleConfig as ma, ScrollMode as mi, traverseHtmlNode as mn, SlateRenderNodeProps as mo, CorePluginApi as mr, GetInjectNodePropsReturnType as mt, pipeOnNodeChange as n, SlatePluginConfig$1 as na, setValue as ni, collapseWhiteSpaceText as nn, SlateLeaf as no, cleanHtmlBrElements as nr, BaseHtmlDeserializer as nt, normalizeDescendantsToDocumentFragment as o, SlateShortcut as oa, InsertExitBreakOptions as oi, collapseWhiteSpace as on, SlateTextProps as oo, LINE_FEED as or, BasePluginNode as ot, getPluginNodeProps as p, BlockFenceInputRuleMatch as pa, DomConfig as pi, traverseHtmlTexts as pn, SlateRenderLeafProps as po, CorePlugin as pr, GetInjectNodePropsOptions as pt, withSlate as q, getPluginDataAttributes as qa, NormalizeInitialValue as qi, deserializeHtmlNode as qn, NavigationFeedbackActiveTarget as qr, createMarkInputRule as qt, pipeInsertDataQuery as r, SlatePluginContext as ra, resetBlock as ri, collapseWhiteSpaceNode as rn, SlateLeafProps as ro, DeserializeHtmlChildren as rr, BaseInjectProps as rt, mergeDeepToNodes as s, TextStaticProps as sa, insertExitBreak as si, collapseString as sn, StyledSlateElementProps as so, NO_BREAK_SPACE as sr, BaseSerializer as st, pipeOnTextChange as t, SlatePlugin as ta, SlateExtensionPlugin as ti, inferWhiteSpaceRule as tn, SlateHTMLProps as to, cleanHtmlCrLf as tr, BaseDeserializer as tt, createHotkey as u, AnyInputRule as ua, AUTO_SCROLL as ui, TrimStartRule as un, useNodeAttributes as uo, ZERO_WIDTH_SPACE as ur, DeleteRules as ut, defaultsDeepToNodes as v, InputRuleTarget as va, HistoryPlugin as vi, removeHtmlSurroundings as vn, ElementStatic as vo, LengthConfig as vr, InferSelectors as vt, isSlatePluginElement as w, InsertDataInputRule as wa, getPluginType as wi, pipeDeserializeHtmlElement as wn, pluginRenderTextStatic as wo, NodeIdPlugin as wr, NormalizeRules as wt, isSlateElement as x, InputRulesFactoryContext as xa, getPluginByType as xi, postCleanHtml as xn, PlateStaticProps as xo, ChunkingPlugin as xr, MergeRules as xt, getSlateElements as y, InputRulesConfig as ya, withPlateHistory as yi, removeHtmlNodesBetweenComments as yn, LeafStatic as yo, getCorePlugins as yr, InferTransforms as yt, RenderChunkProps as z, stripHtmlClassNames as za, HtmlSerializer as zi, htmlElementToElement as zn, AffinityPlugin as zr, NormalizeStaticValueOptions as zt };
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as TSlateEditor, $i as Serializer, $n as cleanHtmlFontElements, $r as AUTO_SCROLL, $t as upsertInlineFormattingContext, A as applyDeepToNodes, Aa as ResolvedInputRule, Ai as AnySlatePlugin, An as isHtmlInlineElement, Ao as AstPlugin, Ar as PlateError, At as BaseParagraphPlugin, B as ZustandStoreApi, Bi as InjectNodeProps, Bn as htmlBrToNewLine, Br as navigate, Bt as STATIC_VALUE_CREATED_AT, C as isSlateNode, Ca as InsertDataInputRuleContext, Ci as getPluginType, Cn as pipeDeserializeHtmlLeaf, Cr as NodeIdOptions, Ct as NodeComponents, D as isSlateText, Da as MatchBlockFenceOptions, Di as createSlatePlugin, Dn as isOlSymbol, Dr as DebugErrorType, Dt as SelectionRules, E as isSlateString, Ea as MarkInputRuleConfig, Ei as getEditorPlugin, En as parseHtmlDocument, Er as normalizeNodeId, Et as PluginConfig, F as RenderLeafProps, Fa as TextSubstitutionPattern, Fi as ExtendEditorApi, Fn as inlineTagNames, Fr as getEdgeNodes, Ft as withBreakRules, G as WithSlateOptions, Gi as NodeStaticWrapperComponentReturnType, Gn as someHtmlElement, Gr as NAVIGATION_FEEDBACK_KEY, Gt as createBlockFenceInputRule, H as nanoid, Hi as NodeStaticProps, Hn as getHtmlComments, Hr as flashTarget, Ht as LengthPlugin, I as RenderElementFn, Ii as ExtendEditorTransforms, In as htmlTextNodeToString, Ir as EdgeNodes, It as OverridePlugin, J as BaseEditor, Ji as Parser, Jn as deserializeHtmlElement, Jr as NavigationFeedbackPluginKey, Jt as createTextSubstitutionInputRule, K as createSlateEditor, Ki as NormalizeInitialValue, Kn as deserializeHtmlNodeChildren, Kr as NavigationFeedbackActiveTarget, Kt as createBlockStartInputRule, L as RenderElementProps, Li as HtmlDeserializer, Ln as htmlStringToDOMNode, Lr as AffinityConfig, Lt as withOverrides, M as RenderTextFn, Ma as SelectionInputRuleContext, Mi as Deserializer, Mn as isHtmlElement, Mr as isNodeAffinity, Mt as withNormalizeRules, N as RenderTextProps, Na as TextSubstitutionInputRuleConfig, Ni as EditorPlugin, Nn as isHtmlComment, Nr as isNodesAffinity, Nt as withMergeRules, O as isSlateVoid, Oa as MatchBlockStartOptions, Oi as createTSlatePlugin, On as isHtmlText, Or as DebugPlugin, Ot as WithAnyKey, P as RenderLeafFn, Pa as TextSubstitutionMatch, Pi as ExtendEditor, Pn as isHtmlBlockElement, Pr as getMarkBoundaryAffinity, Pt as withDeleteRules, Q as SlateEditor, Qi as RenderStaticNodeWrapperProps, Qn as cleanHtmlLinkElements, Qr as NavigationNavigateOptions, Qt as endInlineFormattingContext, R as RenderChunkFn, Ri as HtmlSerializer, Rn as htmlElementToLeaf, Rr as AffinityPlugin, Rt as withNodeId, S as isSlateLeaf, Sa as InsertDataInputRule, Si as getPluginKeys, Sn as pluginDeserializeHtml, Sr as NodeIdConfig, St as NodeComponent, T as isSlatePluginNode, Ta as InsertTextInputRuleContext, Ti as getSlatePlugin, Tn as parseHtmlElement, Tr as NormalizeNodeIdOptions, Tt as ParserOptions, U as BaseWithSlateOptions, Ui as NodeStaticWrapperComponent, Un as getDataNodeProps, Ur as resolveNavigationFeedbackTarget, Ut as defineInputRule, V as createZustandStore, Vi as LeafStaticProps, Vn as htmlBodyToFragment, Vr as clearNavigationFeedbackTarget, Vt as normalizeStaticValue, W as CreateSlateEditorOptions, Wi as NodeStaticWrapperComponentProps, Wn as findHtmlElement, Wr as NavigationFeedbackPlugin, Wt as createRuleFactory, X as KeyofNodePlugins, Xi as RenderStaticNodeWrapper, Xn as copyBlockMarksToSpanChild, Xr as NavigationFeedbackTarget, Xt as matchBlockStart, Y as InferPlugins, Yi as PartialEditorPlugin, Yn as deserializeHtml, Yr as NavigationFeedbackStoredTarget, Yt as matchBlockFence, Z as KeyofPlugins, Zi as RenderStaticNodeWrapperFunction, Zn as cleanHtmlTextNodes, Zr as NavigationFlashTargetOptions, Zt as matchDelimitedInline, _ as getInjectMatch, _a as InputRulesConfig, _i as HistoryPlugin, _n as replaceTagName, _r as GetCorePluginsOptions, _t as InferOptions, a as omitPluginContext, aa as SlateShortcut, ai as withScrolling, an as collapseWhiteSpaceChildren, ar as CARRIAGE_RETURN, at as BasePluginContext, b as isSlateEditor, ba as InsertBreakInputRule, bi as getPluginByType, bn as preCleanHtml, br as ChunkingConfig, bt as MatchRules, c as isType, ca as AnyInputRule, ci as setValue, cn as CollapseWhiteSpaceState, cr as SPACE, ct as BaseTransformOptions, d as isHotkey, da as BlockFenceInputRuleMatch, di as liftBlock, dn as WhiteSpaceRule, dr as HtmlPlugin, dt as EditOnlyConfig, ea as SlatePlugin, ei as AutoScrollOperationsMap, en as isLastNonEmptyTextOfInlineFormattingContext, er as cleanHtmlEmptyElements, et as AnyPluginConfig, f as getSlateClass, fa as BlockStartInputRuleConfig, fi as InsertExitBreakOptions, fn as unwrapHtmlElement, fr as withChunking, ft as ExtendConfig, g as getInjectedPlugins, ga as InputRuleTarget, gi as ParserPlugin, gn as traverseHtmlComments, gr as DebugConfig, gt as InferKey, h as keyToDataAttribute, ha as InputRuleBuilder, hi as init, hn as traverseHtmlElements, hr as CorePluginTransforms, ht as InferApi, i as overridePluginsByKey, ia as SlatePlugins, ii as WithAutoScrollOptions, in as collapseWhiteSpaceElement, ir as DeserializeHtmlNodeReturnType, it as BasePlugin, j as EditableProps, ja as ResolvedInputRulesMeta, ji as Decorate, jn as isHtmlFragmentHref, jr as setAffinitySelection, jt as ParagraphConfig, k as ApplyDeepToNodesOptions, ka as MatchDelimitedInlineOptions, ki as AnyEditorPlugin, kn as isHtmlTable, ko as HandlerReturnType, kr as LogLevel, kt as WithRequiredKey, l as Hotkeys, la as BaseInputRule, li as resetBlock, ln as TrimEndRule, lr as TAB, lt as BreakRules, m as getNodeDataAttributeKeys, ma as DelimitedInlineInputRuleMatch, mi as InitOptions, mn as traverseHtmlNode, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, n as pipeOnNodeChange, na as SlatePluginContext, ni as DomConfig, nn as collapseWhiteSpaceText, nr as cleanHtmlBrElements, nt as BaseHtmlDeserializer, o as normalizeDescendantsToDocumentFragment, oa as TextStaticProps, oi as SlateExtensionConfig, on as collapseWhiteSpace, or as LINE_FEED, ot as BasePluginNode, p as getPluginNodeProps, pa as BlockStartInputRuleMatch, pi as insertExitBreak, pn as traverseHtmlTexts, pr as CorePlugin, pt as GetInjectNodePropsOptions, q as withSlate, qi as OverrideEditor, qn as deserializeHtmlNode, qr as NavigationFeedbackConfig, qt as createMarkInputRule, r as pipeInsertDataQuery, ra as SlatePluginMethods, ri as ScrollMode, rn as collapseWhiteSpaceNode, rr as DeserializeHtmlChildren, rt as BaseInjectProps, s as mergeDeepToNodes, sa as TransformOptions, si as SlateExtensionPlugin, sn as collapseString, sr as NO_BREAK_SPACE, st as BaseSerializer, t as pipeOnTextChange, ta as SlatePluginConfig, ti as DOMPlugin, tn as inferWhiteSpaceRule, tr as cleanHtmlCrLf, tt as BaseDeserializer, u as createHotkey, ua as BlockFenceInputRuleConfig, ui as LiftBlockOptions, un as TrimStartRule, ur as ZERO_WIDTH_SPACE, ut as DeleteRules, v as defaultsDeepToNodes, va as InputRulesDefinition, vi as withPlateHistory, vn as removeHtmlSurroundings, vr as LengthConfig, vt as InferSelectors, w as isSlatePluginElement, wa as InsertTextInputRule, wi as getPluginTypes, wn as pipeDeserializeHtmlElement, wr as NodeIdPlugin, wt as NormalizeRules, x as isSlateElement, xa as InsertBreakInputRuleContext, xi as getPluginKey, xn as postCleanHtml, xr as ChunkingPlugin, xt as MergeRules, y as getSlateElements, ya as InputRulesFactoryContext, yi as getContainerTypes, yn as removeHtmlNodesBetweenComments, yr as getCorePlugins, yt as InferTransforms, z as RenderChunkProps, zi as InferConfig, zn as htmlElementToElement, zr as ElementAffinity, zt as NormalizeStaticValueOptions } from "./index-DRweaH9Q";
2
- export { AUTO_SCROLL, AffinityConfig, AffinityPlugin, AnyEditorPlugin, AnyInputRule, AnyPluginConfig, AnySlatePlugin, ApplyDeepToNodesOptions, AstPlugin, AutoScrollOperationsMap, BaseDeserializer, BaseEditor, BaseHtmlDeserializer, BaseInjectProps, BaseInputRule, BaseParagraphPlugin, BasePlugin, BasePluginContext, BasePluginNode, BaseSerializer, BaseTransformOptions, BaseWithSlateOptions, BlockFenceInputRuleConfig, BlockFenceInputRuleMatch, BlockStartInputRuleConfig, BlockStartInputRuleMatch, BreakRules, CARRIAGE_RETURN, ChunkingConfig, ChunkingPlugin, CollapseWhiteSpaceState, CorePlugin, CorePluginApi, CorePluginTransforms, CreateSlateEditorOptions, DOMPlugin, DebugConfig, DebugErrorType, DebugPlugin, Decorate, DeleteRules, DelimitedInlineInputRuleMatch, DeserializeHtmlChildren, DeserializeHtmlNodeReturnType, Deserializer, DomConfig, EdgeNodes, EditOnlyConfig, EditableProps, EditorPlugin, ElementAffinity, ExtendConfig, ExtendEditor, ExtendEditorApi, ExtendEditorTransforms, GetCorePluginsOptions, GetInjectNodePropsOptions, GetInjectNodePropsReturnType, HandlerReturnType, HistoryPlugin, Hotkeys, HtmlDeserializer, HtmlPlugin, HtmlSerializer, InferApi, InferConfig, InferKey, InferOptions, InferPlugins, InferSelectors, InferTransforms, InitOptions, InjectNodeProps, InputRuleBuilder, InputRuleTarget, InputRulesConfig, InputRulesDefinition, InputRulesFactoryContext, InsertBreakInputRule, InsertBreakInputRuleContext, InsertDataInputRule, InsertDataInputRuleContext, InsertExitBreakOptions, InsertTextInputRule, InsertTextInputRuleContext, KeyofNodePlugins, KeyofPlugins, LINE_FEED, LeafStaticProps, LengthConfig, LengthPlugin, LiftBlockOptions, LogLevel, MarkInputRuleConfig, MatchBlockFenceOptions, MatchBlockStartOptions, MatchDelimitedInlineOptions, MatchRules, MergeRules, NAVIGATION_FEEDBACK_KEY, NO_BREAK_SPACE, NavigationFeedbackActiveTarget, NavigationFeedbackConfig, NavigationFeedbackPlugin, NavigationFeedbackPluginKey, NavigationFeedbackStoredTarget, NavigationFeedbackTarget, NavigationFlashTargetOptions, NavigationNavigateOptions, NodeComponent, NodeComponents, NodeIdConfig, NodeIdOptions, NodeIdPlugin, NodeStaticProps, NodeStaticWrapperComponent, NodeStaticWrapperComponentProps, NodeStaticWrapperComponentReturnType, NormalizeInitialValue, NormalizeNodeIdOptions, NormalizeRules, NormalizeStaticValueOptions, OverrideEditor, OverridePlugin, ParagraphConfig, Parser, ParserOptions, ParserPlugin, PartialEditorPlugin, PlateError, PluginConfig, RenderChunkFn, RenderChunkProps, RenderElementFn, RenderElementProps, RenderLeafFn, RenderLeafProps, RenderStaticNodeWrapper, RenderStaticNodeWrapperFunction, RenderStaticNodeWrapperProps, RenderTextFn, RenderTextProps, ResolvedInputRule, ResolvedInputRulesMeta, SPACE, STATIC_VALUE_CREATED_AT, ScrollMode, SelectionInputRuleContext, SelectionRules, Serializer, SlateEditor, SlateExtensionConfig, SlateExtensionPlugin, SlatePlugin, SlatePluginConfig, SlatePluginContext, SlatePluginMethods, SlatePlugins, SlateShortcut, TAB, TSlateEditor, TextStaticProps, TextSubstitutionInputRuleConfig, TextSubstitutionMatch, TextSubstitutionPattern, TransformOptions, TrimEndRule, TrimStartRule, WhiteSpaceRule, WithAnyKey, WithAutoScrollOptions, WithRequiredKey, WithSlateOptions, ZERO_WIDTH_SPACE, ZustandStoreApi, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, clearNavigationFeedbackTarget, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createBlockFenceInputRule, createBlockStartInputRule, createHotkey, createMarkInputRule, createRuleFactory, createSlateEditor, createSlatePlugin, createTSlatePlugin, createTextSubstitutionInputRule, createZustandStore, defaultsDeepToNodes, defineInputRule, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, flashTarget, getContainerTypes, getCorePlugins, getDataNodeProps, getEdgeNodes, getEditorPlugin, getHtmlComments, getInjectMatch, getInjectedPlugins, getMarkBoundaryAffinity, getNodeDataAttributeKeys, getPluginByType, getPluginKey, getPluginKeys, getPluginNodeProps, getPluginType, getPluginTypes, getSlateClass, getSlateElements, getSlatePlugin, htmlBodyToFragment, htmlBrToNewLine, htmlElementToElement, htmlElementToLeaf, htmlStringToDOMNode, htmlTextNodeToString, inferWhiteSpaceRule, init, inlineTagNames, insertExitBreak, isHotkey, isHtmlBlockElement, isHtmlComment, isHtmlElement, isHtmlFragmentHref, isHtmlInlineElement, isHtmlTable, isHtmlText, isLastNonEmptyTextOfInlineFormattingContext, isNodeAffinity, isNodesAffinity, isOlSymbol, isSlateEditor, isSlateElement, isSlateLeaf, isSlateNode, isSlatePluginElement, isSlatePluginNode, isSlateString, isSlateText, isSlateVoid, isType, keyToDataAttribute, liftBlock, matchBlockFence, matchBlockStart, matchDelimitedInline, mergeDeepToNodes, nanoid, navigate, normalizeDescendantsToDocumentFragment, normalizeNodeId, normalizeStaticValue, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, resolveNavigationFeedbackTarget, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };
1
+ import { $ as TSlateEditor, $i as RenderStaticNodeWrapperProps, $n as cleanHtmlFontElements, $r as NavigationNavigateOptions, $t as upsertInlineFormattingContext, A as applyDeepToNodes, Aa as MatchBlockStartOptions, Ai as AnyEditorPlugin, An as isHtmlInlineElement, Ar as LogLevel, At as BaseParagraphPlugin, B as ZustandStoreApi, Bi as InferConfig, Bn as htmlBrToNewLine, Br as ElementAffinity, Bt as STATIC_VALUE_CREATED_AT, C as isSlateNode, Ca as InsertBreakInputRuleContext, Ci as getPluginKeys, Cn as pipeDeserializeHtmlLeaf, Cr as NodeIdOptions, Ct as NodeComponents, D as isSlateText, Da as InsertTextInputRuleContext, Di as getEditorPlugin, Dn as isOlSymbol, Dr as normalizeNodeIdWithEditor, Dt as SelectionRules, E as isSlateString, Ea as InsertTextInputRule, Ei as getSlatePlugin, En as parseHtmlDocument, Er as normalizeNodeId, Et as PluginConfig, F as RenderLeafProps, Fa as TextSubstitutionInputRuleConfig, Fi as ExtendEditor, Fn as inlineTagNames, Fr as getMarkBoundaryAffinity, Ft as withBreakRules, G as WithSlateOptions, Gi as NodeStaticWrapperComponentProps, Gn as someHtmlElement, Gr as NavigationFeedbackPlugin, Gt as createBlockFenceInputRule, H as nanoid, Hi as LeafStaticProps, Hn as getHtmlComments, Hr as clearNavigationFeedbackTarget, Ht as LengthPlugin, I as RenderElementFn, Ia as TextSubstitutionMatch, Ii as ExtendEditorApi, In as htmlTextNodeToString, Ir as getEdgeNodes, It as OverridePlugin, J as BaseEditor, Ji as OverrideEditor, Jn as deserializeHtmlElement, Jr as NavigationFeedbackConfig, Jt as createTextSubstitutionInputRule, K as createSlateEditor, Ki as NodeStaticWrapperComponentReturnType, Kn as deserializeHtmlNodeChildren, Kr as NAVIGATION_FEEDBACK_KEY, Kt as createBlockStartInputRule, L as RenderElementProps, La as TextSubstitutionPattern, Li as ExtendEditorTransforms, Ln as htmlStringToDOMNode, Lr as EdgeNodes, Lt as withOverrides, M as RenderTextFn, Ma as ResolvedInputRule, Mi as Decorate, Mn as isHtmlElement, Mo as AstPlugin, Mr as setAffinitySelection, Mt as withNormalizeRules, N as RenderTextProps, Na as ResolvedInputRulesMeta, Ni as Deserializer, Nn as isHtmlComment, Nr as isNodeAffinity, Nt as withMergeRules, O as isSlateVoid, Oa as MarkInputRuleConfig, Oi as createSlatePlugin, On as isHtmlText, Or as DebugErrorType, Ot as WithAnyKey, P as RenderLeafFn, Pa as SelectionInputRuleContext, Pi as EditorPlugin, Pn as isHtmlBlockElement, Pr as isNodesAffinity, Pt as withDeleteRules, Q as SlateEditor, Qi as RenderStaticNodeWrapperFunction, Qn as cleanHtmlLinkElements, Qr as NavigationFlashTargetOptions, Qt as endInlineFormattingContext, R as RenderChunkFn, Ri as HtmlDeserializer, Rn as htmlElementToLeaf, Rr as AffinityConfig, Rt as withNodeId, S as isSlateLeaf, Sa as InsertBreakInputRule, Si as getPluginKey, Sn as pluginDeserializeHtml, Sr as NodeIdConfig, St as NodeComponent, T as isSlatePluginNode, Ta as InsertDataInputRuleContext, Ti as getPluginTypes, Tn as parseHtmlElement, Tr as NormalizeNodeIdOptions, Tt as ParserOptions, U as BaseWithSlateOptions, Ui as NodeStaticProps, Un as getDataNodeProps, Ur as flashTarget, Ut as defineInputRule, V as createZustandStore, Vi as InjectNodeProps, Vn as htmlBodyToFragment, Vr as navigate, Vt as normalizeStaticValue, W as CreateSlateEditorOptions, Wi as NodeStaticWrapperComponent, Wn as findHtmlElement, Wr as resolveNavigationFeedbackTarget, Wt as createRuleFactory, X as KeyofNodePlugins, Xi as PartialEditorPlugin, Xn as copyBlockMarksToSpanChild, Xr as NavigationFeedbackStoredTarget, Xt as matchBlockStart, Y as InferPlugins, Yi as Parser, Yn as deserializeHtml, Yr as NavigationFeedbackPluginKey, Yt as matchBlockFence, Z as KeyofPlugins, Zi as RenderStaticNodeWrapper, Zn as cleanHtmlTextNodes, Zr as NavigationFeedbackTarget, Zt as matchDelimitedInline, _ as getInjectMatch, _a as InputRuleBuilder, _i as ParserPlugin, _n as replaceTagName, _r as GetCorePluginsOptions, _t as InferOptions, a as omitPluginContext, aa as SlatePlugins, ai as liftBlock, an as collapseWhiteSpaceChildren, ar as CARRIAGE_RETURN, at as BasePluginContext, b as isSlateEditor, ba as InputRulesDefinition, bi as getContainerTypes, bn as preCleanHtml, br as ChunkingConfig, bt as MatchRules, c as isType, ca as TransformInitialValue, ci as InitOptions, cn as CollapseWhiteSpaceState, cr as SPACE, ct as BaseTransformOptions, d as isHotkey, da as BaseInputRule, di as AutoScrollOperationsMap, dn as WhiteSpaceRule, dr as HtmlPlugin, dt as EditOnlyConfig, ea as Serializer, ei as SlateExtensionConfig, en as isLastNonEmptyTextOfInlineFormattingContext, er as cleanHtmlEmptyElements, et as AnyPluginConfig, f as getSlateClass, fa as BlockFenceInputRuleConfig, fi as DOMPlugin, fn as unwrapHtmlElement, fr as withChunking, ft as ExtendConfig, g as getInjectedPlugins, ga as DelimitedInlineInputRuleMatch, gi as withScrolling, gn as traverseHtmlComments, gr as DebugConfig, gt as InferKey, h as keyToDataAttribute, ha as BlockStartInputRuleMatch, hi as WithAutoScrollOptions, hn as traverseHtmlElements, hr as CorePluginTransforms, ht as InferApi, i as overridePluginsByKey, ia as SlatePluginMethods, ii as LiftBlockOptions, in as collapseWhiteSpaceElement, ir as DeserializeHtmlNodeReturnType, it as BasePlugin, j as EditableProps, ja as MatchDelimitedInlineOptions, ji as AnySlatePlugin, jn as isHtmlFragmentHref, jo as HandlerReturnType, jr as PlateError, jt as ParagraphConfig, k as ApplyDeepToNodesOptions, ka as MatchBlockFenceOptions, ki as createTSlatePlugin, kn as isHtmlTable, kr as DebugPlugin, kt as WithRequiredKey, l as Hotkeys, la as TransformOptions, li as init, ln as TrimEndRule, lr as TAB, lt as BreakRules, m as getNodeDataAttributeKeys, ma as BlockStartInputRuleConfig, mi as ScrollMode, mn as traverseHtmlNode, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, n as pipeOnNodeChange, na as SlatePluginConfig, ni as setValue, nn as collapseWhiteSpaceText, nr as cleanHtmlBrElements, nt as BaseHtmlDeserializer, o as normalizeDescendantsToDocumentFragment, oa as SlateShortcut, oi as InsertExitBreakOptions, on as collapseWhiteSpace, or as LINE_FEED, ot as BasePluginNode, p as getPluginNodeProps, pa as BlockFenceInputRuleMatch, pi as DomConfig, pn as traverseHtmlTexts, pr as CorePlugin, pt as GetInjectNodePropsOptions, q as withSlate, qi as NormalizeInitialValue, qn as deserializeHtmlNode, qr as NavigationFeedbackActiveTarget, qt as createMarkInputRule, r as pipeInsertDataQuery, ra as SlatePluginContext, ri as resetBlock, rn as collapseWhiteSpaceNode, rr as DeserializeHtmlChildren, rt as BaseInjectProps, s as mergeDeepToNodes, sa as TextStaticProps, si as insertExitBreak, sn as collapseString, sr as NO_BREAK_SPACE, st as BaseSerializer, t as pipeOnTextChange, ta as SlatePlugin, ti as SlateExtensionPlugin, tn as inferWhiteSpaceRule, tr as cleanHtmlCrLf, tt as BaseDeserializer, u as createHotkey, ua as AnyInputRule, ui as AUTO_SCROLL, un as TrimStartRule, ur as ZERO_WIDTH_SPACE, ut as DeleteRules, v as defaultsDeepToNodes, va as InputRuleTarget, vi as HistoryPlugin, vn as removeHtmlSurroundings, vr as LengthConfig, vt as InferSelectors, w as isSlatePluginElement, wa as InsertDataInputRule, wi as getPluginType, wn as pipeDeserializeHtmlElement, wr as NodeIdPlugin, wt as NormalizeRules, x as isSlateElement, xa as InputRulesFactoryContext, xi as getPluginByType, xn as postCleanHtml, xr as ChunkingPlugin, xt as MergeRules, y as getSlateElements, ya as InputRulesConfig, yi as withPlateHistory, yn as removeHtmlNodesBetweenComments, yr as getCorePlugins, yt as InferTransforms, z as RenderChunkProps, zi as HtmlSerializer, zn as htmlElementToElement, zr as AffinityPlugin, zt as NormalizeStaticValueOptions } from "./index-BDSzA1zP";
2
+ export { AUTO_SCROLL, AffinityConfig, AffinityPlugin, AnyEditorPlugin, AnyInputRule, AnyPluginConfig, AnySlatePlugin, ApplyDeepToNodesOptions, AstPlugin, AutoScrollOperationsMap, BaseDeserializer, BaseEditor, BaseHtmlDeserializer, BaseInjectProps, BaseInputRule, BaseParagraphPlugin, BasePlugin, BasePluginContext, BasePluginNode, BaseSerializer, BaseTransformOptions, BaseWithSlateOptions, BlockFenceInputRuleConfig, BlockFenceInputRuleMatch, BlockStartInputRuleConfig, BlockStartInputRuleMatch, BreakRules, CARRIAGE_RETURN, ChunkingConfig, ChunkingPlugin, CollapseWhiteSpaceState, CorePlugin, CorePluginApi, CorePluginTransforms, CreateSlateEditorOptions, DOMPlugin, DebugConfig, DebugErrorType, DebugPlugin, Decorate, DeleteRules, DelimitedInlineInputRuleMatch, DeserializeHtmlChildren, DeserializeHtmlNodeReturnType, Deserializer, DomConfig, EdgeNodes, EditOnlyConfig, EditableProps, EditorPlugin, ElementAffinity, ExtendConfig, ExtendEditor, ExtendEditorApi, ExtendEditorTransforms, GetCorePluginsOptions, GetInjectNodePropsOptions, GetInjectNodePropsReturnType, HandlerReturnType, HistoryPlugin, Hotkeys, HtmlDeserializer, HtmlPlugin, HtmlSerializer, InferApi, InferConfig, InferKey, InferOptions, InferPlugins, InferSelectors, InferTransforms, InitOptions, InjectNodeProps, InputRuleBuilder, InputRuleTarget, InputRulesConfig, InputRulesDefinition, InputRulesFactoryContext, InsertBreakInputRule, InsertBreakInputRuleContext, InsertDataInputRule, InsertDataInputRuleContext, InsertExitBreakOptions, InsertTextInputRule, InsertTextInputRuleContext, KeyofNodePlugins, KeyofPlugins, LINE_FEED, LeafStaticProps, LengthConfig, LengthPlugin, LiftBlockOptions, LogLevel, MarkInputRuleConfig, MatchBlockFenceOptions, MatchBlockStartOptions, MatchDelimitedInlineOptions, MatchRules, MergeRules, NAVIGATION_FEEDBACK_KEY, NO_BREAK_SPACE, NavigationFeedbackActiveTarget, NavigationFeedbackConfig, NavigationFeedbackPlugin, NavigationFeedbackPluginKey, NavigationFeedbackStoredTarget, NavigationFeedbackTarget, NavigationFlashTargetOptions, NavigationNavigateOptions, NodeComponent, NodeComponents, NodeIdConfig, NodeIdOptions, NodeIdPlugin, NodeStaticProps, NodeStaticWrapperComponent, NodeStaticWrapperComponentProps, NodeStaticWrapperComponentReturnType, NormalizeInitialValue, NormalizeNodeIdOptions, NormalizeRules, NormalizeStaticValueOptions, OverrideEditor, OverridePlugin, ParagraphConfig, Parser, ParserOptions, ParserPlugin, PartialEditorPlugin, PlateError, PluginConfig, RenderChunkFn, RenderChunkProps, RenderElementFn, RenderElementProps, RenderLeafFn, RenderLeafProps, RenderStaticNodeWrapper, RenderStaticNodeWrapperFunction, RenderStaticNodeWrapperProps, RenderTextFn, RenderTextProps, ResolvedInputRule, ResolvedInputRulesMeta, SPACE, STATIC_VALUE_CREATED_AT, ScrollMode, SelectionInputRuleContext, SelectionRules, Serializer, SlateEditor, SlateExtensionConfig, SlateExtensionPlugin, SlatePlugin, SlatePluginConfig, SlatePluginContext, SlatePluginMethods, SlatePlugins, SlateShortcut, TAB, TSlateEditor, TextStaticProps, TextSubstitutionInputRuleConfig, TextSubstitutionMatch, TextSubstitutionPattern, TransformInitialValue, TransformOptions, TrimEndRule, TrimStartRule, WhiteSpaceRule, WithAnyKey, WithAutoScrollOptions, WithRequiredKey, WithSlateOptions, ZERO_WIDTH_SPACE, ZustandStoreApi, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, clearNavigationFeedbackTarget, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createBlockFenceInputRule, createBlockStartInputRule, createHotkey, createMarkInputRule, createRuleFactory, createSlateEditor, createSlatePlugin, createTSlatePlugin, createTextSubstitutionInputRule, createZustandStore, defaultsDeepToNodes, defineInputRule, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, flashTarget, getContainerTypes, getCorePlugins, getDataNodeProps, getEdgeNodes, getEditorPlugin, getHtmlComments, getInjectMatch, getInjectedPlugins, getMarkBoundaryAffinity, getNodeDataAttributeKeys, getPluginByType, getPluginKey, getPluginKeys, getPluginNodeProps, getPluginType, getPluginTypes, getSlateClass, getSlateElements, getSlatePlugin, htmlBodyToFragment, htmlBrToNewLine, htmlElementToElement, htmlElementToLeaf, htmlStringToDOMNode, htmlTextNodeToString, inferWhiteSpaceRule, init, inlineTagNames, insertExitBreak, isHotkey, isHtmlBlockElement, isHtmlComment, isHtmlElement, isHtmlFragmentHref, isHtmlInlineElement, isHtmlTable, isHtmlText, isLastNonEmptyTextOfInlineFormattingContext, isNodeAffinity, isNodesAffinity, isOlSymbol, isSlateEditor, isSlateElement, isSlateLeaf, isSlateNode, isSlatePluginElement, isSlatePluginNode, isSlateString, isSlateText, isSlateVoid, isType, keyToDataAttribute, liftBlock, matchBlockFence, matchBlockStart, matchDelimitedInline, mergeDeepToNodes, nanoid, navigate, normalizeDescendantsToDocumentFragment, normalizeNodeId, normalizeNodeIdWithEditor, normalizeStaticValue, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, resolveNavigationFeedbackTarget, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };
package/dist/index.js CHANGED
@@ -1,11 +1,21 @@
1
- import { $ as isHtmlBlockElement, $t as defineInputRule, A as htmlStringToDOMNode, At as isSlatePluginElement, B as htmlBrToNewLine, Bt as withDeleteRules, C as resolveNavigationFeedbackTarget, Ct as getInjectMatch, D as HtmlPlugin, Dt as isSlateElement, E as LengthPlugin, Et as isSlateEditor, F as pipeDeserializeHtmlLeaf, Ft as applyDeepToNodes, G as inferWhiteSpaceRule, Gt as AstPlugin, H as deserializeHtmlNodeChildren, Ht as BaseParagraphPlugin, I as htmlElementToElement, It as OverridePlugin, J as collapseWhiteSpaceText, Jt as createMarkInputRule, K as collapseWhiteSpaceChildren, Kt as createBlockFenceInputRule, L as pipeDeserializeHtmlElement, Lt as withOverrides, M as deserializeHtmlNode, Mt as isSlateString, N as htmlTextNodeToString, Nt as isSlateText, O as parseHtmlDocument, Ot as isSlateLeaf, P as htmlElementToLeaf, Pt as isSlateVoid, Q as collapseString, Qt as matchDelimitedInline, R as pluginDeserializeHtml, Rt as withNormalizeRules, S as flashTarget, St as getInjectedPlugins, T as NavigationFeedbackPluginKey, Tt as getSlateElements, U as collapseWhiteSpace, Ut as HistoryPlugin, V as htmlBodyToFragment, Vt as withBreakRules, W as collapseWhiteSpaceElement, Wt as withPlateHistory, X as upsertInlineFormattingContext, Xt as matchBlockFence, Y as endInlineFormattingContext, Yt as createTextSubstitutionInputRule, Z as isLastNonEmptyTextOfInlineFormattingContext, Zt as matchBlockStart, _ as normalizeNodeId, _t as mergeDeepToNodes, a as pipeInsertDataQuery, an as getPluginTypes, at as DOMPlugin, b as navigate, bt as getNodeDataAttributeKeys, c as setValue, cn as createSlatePlugin, ct as PlateError, d as insertExitBreak, dt as AffinityPlugin, en as getContainerTypes, et as isHtmlInlineElement, f as init, ft as setAffinitySelection, g as NodeIdPlugin, gt as getEdgeNodes, h as pipeOnNodeChange, ht as getMarkBoundaryAffinity, i as ParserPlugin, in as getPluginType, it as AUTO_SCROLL, j as deserializeHtmlElement, jt as isSlatePluginNode, k as deserializeHtml, kt as isSlateNode, l as resetBlock, ln as createTSlatePlugin, lt as ChunkingPlugin, m as pipeOnTextChange, mt as isNodesAffinity, n as withSlate, nn as getPluginKey, nt as isHtmlText, o as normalizeDescendantsToDocumentFragment, on as getSlatePlugin, ot as withScrolling, pt as isNodeAffinity, q as collapseWhiteSpaceNode, qt as createBlockStartInputRule, r as getCorePlugins, rn as getPluginKeys, rt as isHtmlElement, s as SlateExtensionPlugin, sn as getEditorPlugin, st as DebugPlugin, t as createSlateEditor, tn as getPluginByType, tt as inlineTagNames, u as liftBlock, ut as withChunking, v as withNodeId, vt as getSlateClass, w as NAVIGATION_FEEDBACK_KEY, wt as defaultsDeepToNodes, x as clearNavigationFeedbackTarget, xt as keyToDataAttribute, y as NavigationFeedbackPlugin, yt as getPluginNodeProps, z as getDataNodeProps, zt as withMergeRules } from "./withSlate-DsAgt7dN.js";
1
+ import { $ as collapseString, $t as defineInputRule, A as deserializeHtml, At as isSlatePluginElement, B as getDataNodeProps, Bt as withDeleteRules, C as flashTarget, Ct as getInjectedPlugins, D as LengthPlugin, Dt as isSlateElement, E as NavigationFeedbackPluginKey, Et as isSlateEditor, F as htmlElementToLeaf, Ft as applyDeepToNodes, G as collapseWhiteSpaceElement, Gt as AstPlugin, H as htmlBodyToFragment, Ht as BaseParagraphPlugin, I as pipeDeserializeHtmlLeaf, It as OverridePlugin, J as collapseWhiteSpaceNode, Jt as createMarkInputRule, K as inferWhiteSpaceRule, Kt as createBlockFenceInputRule, L as htmlElementToElement, Lt as withOverrides, M as deserializeHtmlElement, Mt as isSlateString, N as deserializeHtmlNode, Nt as isSlateText, O as HtmlPlugin, Ot as isSlateLeaf, P as htmlTextNodeToString, Pt as isSlateVoid, Q as isLastNonEmptyTextOfInlineFormattingContext, Qt as matchDelimitedInline, R as pipeDeserializeHtmlElement, Rt as withNormalizeRules, S as clearNavigationFeedbackTarget, St as keyToDataAttribute, T as NAVIGATION_FEEDBACK_KEY, Tt as getSlateElements, U as deserializeHtmlNodeChildren, Ut as HistoryPlugin, V as htmlBrToNewLine, Vt as withBreakRules, W as collapseWhiteSpace, Wt as withPlateHistory, X as endInlineFormattingContext, Xt as matchBlockFence, Y as collapseWhiteSpaceText, Yt as createTextSubstitutionInputRule, Z as upsertInlineFormattingContext, Zt as matchBlockStart, _ as normalizeNodeId, _t as getEdgeNodes, a as pipeInsertDataQuery, an as getPluginTypes, at as AUTO_SCROLL, b as NavigationFeedbackPlugin, bt as getPluginNodeProps, c as setValue, cn as createSlatePlugin, ct as DebugPlugin, d as insertExitBreak, dt as withChunking, en as getContainerTypes, et as isHtmlBlockElement, f as init, ft as AffinityPlugin, g as NodeIdPlugin, gt as getMarkBoundaryAffinity, h as pipeOnNodeChange, ht as isNodesAffinity, i as ParserPlugin, in as getPluginType, it as isHtmlElement, j as htmlStringToDOMNode, jt as isSlatePluginNode, k as parseHtmlDocument, kt as isSlateNode, l as resetBlock, ln as createTSlatePlugin, lt as PlateError, m as pipeOnTextChange, mt as isNodeAffinity, n as withSlate, nn as getPluginKey, nt as inlineTagNames, o as normalizeDescendantsToDocumentFragment, on as getSlatePlugin, ot as DOMPlugin, pt as setAffinitySelection, q as collapseWhiteSpaceChildren, qt as createBlockStartInputRule, r as getCorePlugins, rn as getPluginKeys, rt as isHtmlText, s as SlateExtensionPlugin, sn as getEditorPlugin, st as withScrolling, t as createSlateEditor, tn as getPluginByType, tt as isHtmlInlineElement, u as liftBlock, ut as ChunkingPlugin, v as normalizeNodeIdWithEditor, vt as mergeDeepToNodes, w as resolveNavigationFeedbackTarget, wt as getInjectMatch, x as navigate, xt as getNodeDataAttributeKeys, y as withNodeId, yt as getSlateClass, z as pluginDeserializeHtml, zt as withMergeRules } from "./withSlate-NVP0S9vL.js";
2
2
  import { n as createHotkey, r as isHotkey, t as Hotkeys } from "./hotkeys-DI1HPO2Q.js";
3
3
  import { nanoid } from "nanoid";
4
4
  import { createVanillaStore as createZustandStore } from "zustand-x/vanilla";
5
+ import defaults from "lodash/defaults.js";
5
6
  import castArray from "lodash/castArray.js";
6
- import cloneDeep from "lodash/cloneDeep.js";
7
7
  import defaultsDeep from "lodash/defaultsDeep.js";
8
8
 
9
+ //#region src/lib/utils/defaultsDeepToNodes.ts
10
+ /** Recursively merge a source object to children nodes with a query. */
11
+ const defaultsDeepToNodes = (options) => {
12
+ applyDeepToNodes({
13
+ ...options,
14
+ apply: defaults
15
+ });
16
+ };
17
+
18
+ //#endregion
9
19
  //#region src/lib/utils/isType.ts
10
20
  /** Does the node match the type provided. */
11
21
  const isType = (editor, node, key) => {
@@ -481,7 +491,7 @@ const replaceStaticMetadata = (value, createdAt) => {
481
491
  };
482
492
  const normalizeStaticValue = (value, options = {}) => {
483
493
  const { createdAt = STATIC_VALUE_CREATED_AT, idCreator = createStaticIdFactory(), ...normalizeNodeIdOptions } = options;
484
- return replaceStaticMetadata(normalizeNodeId(cloneDeep(value), {
494
+ return replaceStaticMetadata(normalizeNodeId(value, {
485
495
  ...normalizeNodeIdOptions,
486
496
  idCreator
487
497
  }), createdAt);
@@ -515,4 +525,4 @@ const overridePluginsByKey = (plugin, overrideByKey = {}, nested = false) => {
515
525
  };
516
526
 
517
527
  //#endregion
518
- export { AUTO_SCROLL, AffinityPlugin, AstPlugin, BaseParagraphPlugin, CARRIAGE_RETURN, ChunkingPlugin, DOMPlugin, DebugPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, LINE_FEED, LengthPlugin, NAVIGATION_FEEDBACK_KEY, NO_BREAK_SPACE, NavigationFeedbackPlugin, NavigationFeedbackPluginKey, NodeIdPlugin, OverridePlugin, ParserPlugin, PlateError, SPACE, STATIC_VALUE_CREATED_AT, SlateExtensionPlugin, TAB, ZERO_WIDTH_SPACE, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, clearNavigationFeedbackTarget, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createBlockFenceInputRule, createBlockStartInputRule, createHotkey, createMarkInputRule, createRuleFactory, createSlateEditor, createSlatePlugin, createTSlatePlugin, createTextSubstitutionInputRule, createZustandStore, defaultsDeepToNodes, defineInputRule, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, flashTarget, getContainerTypes, getCorePlugins, getDataNodeProps, getEdgeNodes, getEditorPlugin, getHtmlComments, getInjectMatch, getInjectedPlugins, getMarkBoundaryAffinity, getNodeDataAttributeKeys, getPluginByType, getPluginKey, getPluginKeys, getPluginNodeProps, getPluginType, getPluginTypes, getSlateClass, getSlateElements, getSlatePlugin, htmlBodyToFragment, htmlBrToNewLine, htmlElementToElement, htmlElementToLeaf, htmlStringToDOMNode, htmlTextNodeToString, inferWhiteSpaceRule, init, inlineTagNames, insertExitBreak, isHotkey, isHtmlBlockElement, isHtmlComment, isHtmlElement, isHtmlFragmentHref, isHtmlInlineElement, isHtmlTable, isHtmlText, isLastNonEmptyTextOfInlineFormattingContext, isNodeAffinity, isNodesAffinity, isOlSymbol, isSlateEditor, isSlateElement, isSlateLeaf, isSlateNode, isSlatePluginElement, isSlatePluginNode, isSlateString, isSlateText, isSlateVoid, isType, keyToDataAttribute, liftBlock, matchBlockFence, matchBlockStart, matchDelimitedInline, mergeDeepToNodes, nanoid, navigate, normalizeDescendantsToDocumentFragment, normalizeNodeId, normalizeStaticValue, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, resolveNavigationFeedbackTarget, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };
528
+ export { AUTO_SCROLL, AffinityPlugin, AstPlugin, BaseParagraphPlugin, CARRIAGE_RETURN, ChunkingPlugin, DOMPlugin, DebugPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, LINE_FEED, LengthPlugin, NAVIGATION_FEEDBACK_KEY, NO_BREAK_SPACE, NavigationFeedbackPlugin, NavigationFeedbackPluginKey, NodeIdPlugin, OverridePlugin, ParserPlugin, PlateError, SPACE, STATIC_VALUE_CREATED_AT, SlateExtensionPlugin, TAB, ZERO_WIDTH_SPACE, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, clearNavigationFeedbackTarget, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createBlockFenceInputRule, createBlockStartInputRule, createHotkey, createMarkInputRule, createRuleFactory, createSlateEditor, createSlatePlugin, createTSlatePlugin, createTextSubstitutionInputRule, createZustandStore, defaultsDeepToNodes, defineInputRule, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, flashTarget, getContainerTypes, getCorePlugins, getDataNodeProps, getEdgeNodes, getEditorPlugin, getHtmlComments, getInjectMatch, getInjectedPlugins, getMarkBoundaryAffinity, getNodeDataAttributeKeys, getPluginByType, getPluginKey, getPluginKeys, getPluginNodeProps, getPluginType, getPluginTypes, getSlateClass, getSlateElements, getSlatePlugin, htmlBodyToFragment, htmlBrToNewLine, htmlElementToElement, htmlElementToLeaf, htmlStringToDOMNode, htmlTextNodeToString, inferWhiteSpaceRule, init, inlineTagNames, insertExitBreak, isHotkey, isHtmlBlockElement, isHtmlComment, isHtmlElement, isHtmlFragmentHref, isHtmlInlineElement, isHtmlTable, isHtmlText, isLastNonEmptyTextOfInlineFormattingContext, isNodeAffinity, isNodesAffinity, isOlSymbol, isSlateEditor, isSlateElement, isSlateLeaf, isSlateNode, isSlatePluginElement, isSlatePluginNode, isSlateString, isSlateText, isSlateVoid, isType, keyToDataAttribute, liftBlock, matchBlockFence, matchBlockStart, matchDelimitedInline, mergeDeepToNodes, nanoid, navigate, normalizeDescendantsToDocumentFragment, normalizeNodeId, normalizeNodeIdWithEditor, normalizeStaticValue, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, resolveNavigationFeedbackTarget, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };