@lofcz/platejs-core 53.1.6 → 53.2.1

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<{
@@ -953,6 +959,7 @@ declare const resetBlock: (editor: SlateEditor, {
953
959
  declare const setValue: <V extends Value>(editor: SlateEditor, value?: V | string) => void;
954
960
  //#endregion
955
961
  //#region src/lib/plugins/slate-extension/SlateExtensionPlugin.d.ts
962
+ declare const isElementStateEmpty: (editor: SlateEditor, element: TElement) => boolean;
956
963
  type SlateExtensionConfig = PluginConfig<'slateExtension', {
957
964
  onNodeChange: (options: {
958
965
  editor: SlateEditor;
@@ -992,6 +999,7 @@ declare const SlateExtensionPlugin: SlatePlugin<PluginConfig<"slateExtension", {
992
999
  text: string;
993
1000
  }) => void;
994
1001
  }, {
1002
+ isElementStateEmpty: (element: TElement) => boolean;
995
1003
  redecorate: () => void;
996
1004
  }, {
997
1005
  init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
@@ -1003,7 +1011,7 @@ declare const SlateExtensionPlugin: SlatePlugin<PluginConfig<"slateExtension", {
1003
1011
  at?: _platejs_slate30.Path;
1004
1012
  } | undefined) => true | undefined);
1005
1013
  setValue: ((value?: string | _platejs_slate30.Value | undefined) => void) & ((value?: string | _platejs_slate30.Value | undefined) => void);
1006
- apply: <N$1 extends _platejs_slate30.TElement | TText>(operation: _platejs_slate30.Operation<N$1>) => void;
1014
+ apply: <N$1 extends TElement | TText>(operation: _platejs_slate30.Operation<N$1>) => void;
1007
1015
  }, {}>>;
1008
1016
  //#endregion
1009
1017
  //#region src/lib/plugins/dom/withScrolling.d.ts
@@ -1217,13 +1225,35 @@ type NodeIdOptions = {
1217
1225
  */
1218
1226
  idKey?: string;
1219
1227
  /**
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 })`.
1228
+ * Controls how missing ids are assigned in the initial value.
1223
1229
  *
1224
- * @default false
1230
+ * - `'if-needed'`: normalize only when the first or last top-level node is
1231
+ * missing an id
1232
+ * - `'always'`: walk the whole initial value and fill any missing ids
1233
+ * - `false`: skip initial-value id assignment
1234
+ *
1235
+ * @default 'if-needed'
1225
1236
  */
1226
- normalizeInitialValue?: boolean;
1237
+ initialValueIds?: false | 'always' | 'if-needed';
1238
+ /**
1239
+ * Legacy alias for `initialValueIds`.
1240
+ *
1241
+ * - `false`: only check the first and last top-level nodes
1242
+ * - `true`: walk the whole initial value and fill missing ids
1243
+ * - `null`: skip initial-value id assignment
1244
+ *
1245
+ * @deprecated Use `initialValueIds` instead.
1246
+ */
1247
+ normalizeInitialValue?: boolean | null;
1248
+ /**
1249
+ * Reports duplicate-id scan cost during inserted-node normalization.
1250
+ */
1251
+ onDuplicateIdScan?: (stats: {
1252
+ candidateCount: number;
1253
+ duration: number;
1254
+ existingCount: number;
1255
+ visitedCount: number;
1256
+ }) => void;
1227
1257
  /**
1228
1258
  * Reuse ids on undo/redo and copy/pasting if not existing in the document.
1229
1259
  * This is disabled by default to avoid duplicate ids across documents.
@@ -1239,11 +1269,12 @@ type NodeIdOptions = {
1239
1269
  idCreator?: () => any;
1240
1270
  } & QueryNodeOptions;
1241
1271
  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
1272
  declare const normalizeNodeId: <V extends Value>(value: V, options?: NormalizeNodeIdOptions) => V;
1273
+ declare const normalizeNodeIdWithEditor: <V extends Value>(editor: {
1274
+ api: {
1275
+ isBlock: (node: Descendant) => boolean;
1276
+ };
1277
+ }, value: V, options?: NormalizeNodeIdOptions) => V;
1247
1278
  type NodeIdConfig = PluginConfig<'nodeId', NodeIdOptions, {}, {
1248
1279
  nodeId: {
1249
1280
  normalize: () => void;
@@ -1276,13 +1307,35 @@ declare const NodeIdPlugin: SlatePlugin<PluginConfig<"nodeId", {
1276
1307
  */
1277
1308
  idKey?: string;
1278
1309
  /**
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 })`.
1310
+ * Controls how missing ids are assigned in the initial value.
1282
1311
  *
1283
- * @default false
1312
+ * - `'if-needed'`: normalize only when the first or last top-level node is
1313
+ * missing an id
1314
+ * - `'always'`: walk the whole initial value and fill any missing ids
1315
+ * - `false`: skip initial-value id assignment
1316
+ *
1317
+ * @default 'if-needed'
1284
1318
  */
1285
- normalizeInitialValue?: boolean;
1319
+ initialValueIds?: false | "always" | "if-needed";
1320
+ /**
1321
+ * Legacy alias for `initialValueIds`.
1322
+ *
1323
+ * - `false`: only check the first and last top-level nodes
1324
+ * - `true`: walk the whole initial value and fill missing ids
1325
+ * - `null`: skip initial-value id assignment
1326
+ *
1327
+ * @deprecated Use `initialValueIds` instead.
1328
+ */
1329
+ normalizeInitialValue?: boolean | null;
1330
+ /**
1331
+ * Reports duplicate-id scan cost during inserted-node normalization.
1332
+ */
1333
+ onDuplicateIdScan?: (stats: {
1334
+ candidateCount: number;
1335
+ duration: number;
1336
+ existingCount: number;
1337
+ visitedCount: number;
1338
+ }) => void;
1286
1339
  /**
1287
1340
  * Reuse ids on undo/redo and copy/pasting if not existing in the document.
1288
1341
  * This is disabled by default to avoid duplicate ids across documents.
@@ -1368,6 +1421,7 @@ declare const getCorePlugins: ({
1368
1421
  text: string;
1369
1422
  }) => void;
1370
1423
  }, {
1424
+ isElementStateEmpty: (element: _platejs_slate30.TElement) => boolean;
1371
1425
  redecorate: () => void;
1372
1426
  }, {
1373
1427
  init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
@@ -1414,7 +1468,14 @@ declare const getCorePlugins: ({
1414
1468
  filterInline?: boolean;
1415
1469
  filterText?: boolean;
1416
1470
  idKey?: string;
1417
- normalizeInitialValue?: boolean;
1471
+ initialValueIds?: false | "always" | "if-needed";
1472
+ normalizeInitialValue?: boolean | null;
1473
+ onDuplicateIdScan?: (stats: {
1474
+ candidateCount: number;
1475
+ duration: number;
1476
+ existingCount: number;
1477
+ visitedCount: number;
1478
+ }) => void;
1418
1479
  reuseId?: boolean;
1419
1480
  idCreator?: () => any;
1420
1481
  } & _platejs_slate30.QueryNodeOptions, {}, {
@@ -2156,7 +2217,7 @@ type BasePlugin<C extends AnyPluginConfig = PluginConfig> = {
2156
2217
  * always be active.
2157
2218
  * - `inject` (for `inject.nodeProps`): Edit-only by default (true if not
2158
2219
  * specified). Set to `false` to always be active.
2159
- * - `normalizeInitialValue`: NOT edit-only by default (false if not specified).
2220
+ * - `transformInitialValue`: NOT edit-only by default (false if not specified).
2160
2221
  * Set to `true` to make it edit-only.
2161
2222
  */
2162
2223
  editOnly?: EditOnlyConfig | boolean;
@@ -2263,6 +2324,16 @@ type BasePluginNode<C extends AnyPluginConfig = PluginConfig> = {
2263
2324
  * inlineVoid core plugin.
2264
2325
  */
2265
2326
  isMarkableVoid?: boolean;
2327
+ /**
2328
+ * Returns whether an element prop is inert metadata for empty-state checks.
2329
+ *
2330
+ * Props not claimed by a plugin are treated as meaningful state.
2331
+ */
2332
+ isMetadataProp?: (options: BasePluginContext<C> & {
2333
+ key: string;
2334
+ node: TElement;
2335
+ value: unknown;
2336
+ }) => boolean;
2266
2337
  /**
2267
2338
  * Whether the node is selectable.
2268
2339
  *
@@ -2372,11 +2443,15 @@ type EditOnlyConfig = {
2372
2443
  */
2373
2444
  inject?: boolean;
2374
2445
  /**
2375
- * If true, `normalizeInitialValue` is only called when the editor is not
2446
+ * If true, `transformInitialValue` is only called when the editor is not
2376
2447
  * read-only.
2377
2448
  *
2378
2449
  * @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
2450
  */
2451
+ transformInitialValue?: boolean;
2452
+ /**
2453
+ * @deprecated Use `transformInitialValue` instead.
2454
+ */
2380
2455
  normalizeInitialValue?: boolean;
2381
2456
  /**
2382
2457
  * If true, `render` functions are only active when the editor is not
@@ -2484,13 +2559,14 @@ type BaseEditor = EditorBase & {
2484
2559
  node: {
2485
2560
  isContainer: string[];
2486
2561
  isLeaf: string[];
2562
+ isMetadataProp: string[];
2487
2563
  isText: string[];
2488
2564
  leafProps: string[];
2489
2565
  textProps: string[];
2490
2566
  /** Node types to plugin keys. */
2491
2567
  types: Record<string, string>;
2492
2568
  };
2493
- normalizeInitialValue: string[];
2569
+ transformInitialValue: string[];
2494
2570
  render: {
2495
2571
  aboveEditable: string[];
2496
2572
  aboveNodes: string[];
@@ -2695,7 +2771,7 @@ type BaseWithSlateOptions<P extends AnyPluginConfig = CorePlugin> = {
2695
2771
  */
2696
2772
  skipInitialization?: boolean;
2697
2773
  };
2698
- type WithSlateOptions<V extends Value = Value, P extends AnyPluginConfig = CorePlugin> = BaseWithSlateOptions<P> & Pick<Partial<AnySlatePlugin>, 'api' | 'decorate' | 'extendEditor' | 'inject' | 'normalizeInitialValue' | 'options' | 'override' | 'transforms'> & {
2774
+ 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
2775
  /**
2700
2776
  * Initial content for the editor.
2701
2777
  *
@@ -3029,7 +3105,7 @@ declare const normalizeDescendantsToDocumentFragment: (editor: SlateEditor, {
3029
3105
  }) => Descendant[];
3030
3106
  //#endregion
3031
3107
  //#region src/lib/utils/omitPluginContext.d.ts
3032
- declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "getOptions" | "getOption" | "tf" | "type" | "setOptions" | "setOption" | "plugin">;
3108
+ declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "getOptions" | "type" | "getOption" | "tf" | "setOptions" | "setOption" | "plugin">;
3033
3109
  //#endregion
3034
3110
  //#region src/lib/utils/overridePluginsByKey.d.ts
3035
3111
  /**
@@ -3048,4 +3124,4 @@ declare const pipeOnNodeChange: (editor: SlateEditor, node: Descendant, prevNode
3048
3124
  //#region src/lib/utils/pipeOnTextChange.d.ts
3049
3125
  declare const pipeOnTextChange: (editor: SlateEditor, node: Descendant, text: string, prevText: string, operation: TextOperation) => boolean;
3050
3126
  //#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 };
3127
+ export { TSlateEditor as $, getEditorDOMFromHtmlString as $a, RenderStaticNodeWrapperFunction as $i, cleanHtmlFontElements as $n, NavigationNavigateOptions as $r, upsertInlineFormattingContext as $t, applyDeepToNodes as A, MatchBlockFenceOptions as Aa, createTSlatePlugin as Ai, isHtmlInlineElement as An, SlateRenderElement as Ao, LogLevel as Ar, BaseParagraphPlugin as At, ZustandStoreApi as B, stripHtmlClassNames as Ba, HtmlSerializer as Bi, htmlBrToNewLine as Bn, ElementAffinity as Br, STATIC_VALUE_CREATED_AT as Bt, isSlateNode as C, InsertBreakInputRule as Ca, getPluginKey as Ci, pipeDeserializeHtmlLeaf as Cn, SlateRenderText as Co, NodeIdOptions as Cr, NodeComponents as Ct, isSlateText as D, InsertTextInputRule as Da, getSlatePlugin as Di, isOlSymbol as Dn, pipeRenderLeafStatic as Do, normalizeNodeIdWithEditor as Dr, SelectionRules as Dt, isSlateString as E, InsertDataInputRuleContext as Ea, getPluginTypes as Ei, parseHtmlDocument as En, SlateRenderLeaf as Eo, normalizeNodeId as Er, PluginConfig as Et, RenderLeafProps as F, SelectionInputRuleContext as Fa, EditorPlugin as Fi, inlineTagNames as Fn, getMarkBoundaryAffinity as Fr, withBreakRules as Ft, WithSlateOptions as G, getSelectedDomBlocks as Ga, NodeStaticWrapperComponent as Gi, someHtmlElement as Gn, NavigationFeedbackPlugin as Gr, createBlockFenceInputRule as Gt, nanoid$1 as H, isSelectOutside as Ha, InjectNodeProps as Hi, getHtmlComments as Hn, clearNavigationFeedbackTarget as Hr, LengthPlugin as Ht, RenderElementFn as I, TextSubstitutionInputRuleConfig as Ia, ExtendEditor as Ii, htmlTextNodeToString as In, getEdgeNodes as Ir, OverridePlugin as It, BaseEditor as J, getPluginDataAttributes as Ja, NormalizeInitialValue as Ji, deserializeHtmlElement as Jn, NavigationFeedbackConfig as Jr, createTextSubstitutionInputRule as Jt, createSlateEditor as K, getRenderNodeStaticProps as Ka, NodeStaticWrapperComponentProps as Ki, deserializeHtmlNodeChildren as Kn, NAVIGATION_FEEDBACK_KEY as Kr, createBlockStartInputRule as Kt, RenderElementProps as L, TextSubstitutionMatch as La, ExtendEditorApi as Li, htmlStringToDOMNode as Ln, EdgeNodes as Lr, withOverrides as Lt, RenderTextFn as M, MatchDelimitedInlineOptions as Ma, AnySlatePlugin as Mi, isHtmlElement as Mn, HandlerReturnType as Mo, setAffinitySelection as Mr, withNormalizeRules as Mt, RenderTextProps as N, ResolvedInputRule as Na, Decorate as Ni, isHtmlComment as Nn, AstPlugin as No, isNodeAffinity as Nr, withMergeRules as Nt, isSlateVoid as O, InsertTextInputRuleContext as Oa, getEditorPlugin as Oi, isHtmlText as On, pluginRenderLeafStatic as Oo, DebugErrorType as Or, WithAnyKey as Ot, RenderLeafFn as P, ResolvedInputRulesMeta as Pa, Deserializer as Pi, isHtmlBlockElement as Pn, isNodesAffinity as Pr, withDeleteRules as Pt, SlateEditor as Q, createStaticEditor as Qa, RenderStaticNodeWrapper as Qi, cleanHtmlLinkElements as Qn, NavigationFlashTargetOptions as Qr, endInlineFormattingContext as Qt, RenderChunkFn as R, TextSubstitutionPattern as Ra, ExtendEditorTransforms as Ri, htmlElementToLeaf as Rn, AffinityConfig as Rr, withNodeId as Rt, isSlateLeaf as S, InputRulesFactoryContext as Sa, getPluginByType as Si, pluginDeserializeHtml as Sn, PlateStaticProps as So, NodeIdConfig as Sr, NodeComponent as St, isSlatePluginNode as T, InsertDataInputRule as Ta, getPluginType as Ti, parseHtmlElement as Tn, pluginRenderTextStatic as To, NormalizeNodeIdOptions as Tr, ParserOptions as Tt, BaseWithSlateOptions as U, getSelectedDomNode as Ua, LeafStaticProps as Ui, getDataNodeProps as Un, flashTarget as Ur, defineInputRule as Ut, createZustandStore$1 as V, pipeDecorate as Va, InferConfig as Vi, htmlBodyToFragment as Vn, navigate as Vr, normalizeStaticValue as Vt, CreateSlateEditorOptions as W, getSelectedDomFragment as Wa, NodeStaticProps as Wi, findHtmlElement as Wn, resolveNavigationFeedbackTarget as Wr, createRuleFactory as Wt, KeyofNodePlugins as X, getStaticPlugins as Xa, Parser as Xi, copyBlockMarksToSpanChild as Xn, NavigationFeedbackStoredTarget as Xr, matchBlockStart as Xt, InferPlugins as Y, createStaticString as Ya, OverrideEditor as Yi, deserializeHtml as Yn, NavigationFeedbackPluginKey as Yr, matchBlockFence as Yt, KeyofPlugins as Z, ViewPlugin as Za, PartialEditorPlugin as Zi, cleanHtmlTextNodes as Zn, NavigationFeedbackTarget as Zr, matchDelimitedInline as Zt, getInjectMatch as _, DelimitedInlineInputRuleMatch as _a, init as _i, replaceTagName as _n, SerializeHtmlOptions as _o, GetCorePluginsOptions as _r, InferOptions as _t, omitPluginContext as a, SlatePluginMethods as aa, WithAutoScrollOptions as ai, collapseWhiteSpaceChildren as an, SlateNodeProps as ao, CARRIAGE_RETURN as ar, BasePluginContext as at, isSlateEditor as b, InputRulesConfig as ba, withPlateHistory as bi, preCleanHtml as bn, LeafStatic as bo, ChunkingConfig as br, MatchRules as bt, isType as c, TextStaticProps as ca, SlateExtensionPlugin as ci, CollapseWhiteSpaceState as cn, StyledSlateElementProps as co, SPACE as cr, BaseTransformOptions as ct, isHotkey as d, AnyInputRule as da, resetBlock as di, WhiteSpaceRule as dn, useNodeAttributes as do, HtmlPlugin as dr, EditOnlyConfig as dt, RenderStaticNodeWrapperProps as ea, AUTO_SCROLL as ei, isLastNonEmptyTextOfInlineFormattingContext as en, SlateElement as eo, cleanHtmlEmptyElements as er, AnyPluginConfig as et, getSlateClass as f, BaseInputRule as fa, LiftBlockOptions as fi, unwrapHtmlElement as fn, BoxStaticProps as fo, withChunking as fr, ExtendConfig as ft, getInjectedPlugins as g, BlockStartInputRuleMatch as ga, InitOptions as gi, traverseHtmlComments as gn, SlateRenderTextProps as go, DebugConfig as gr, InferKey as gt, keyToDataAttribute as h, BlockStartInputRuleConfig as ha, insertExitBreak as hi, traverseHtmlElements as hn, SlateRenderNodeProps as ho, CorePluginTransforms as hr, InferApi as ht, overridePluginsByKey as i, SlatePluginContext as ia, ScrollMode as ii, collapseWhiteSpaceElement as in, SlateLeafProps as io, DeserializeHtmlNodeReturnType as ir, BasePlugin as it, EditableProps as j, MatchBlockStartOptions as ja, AnyEditorPlugin as ji, isHtmlFragmentHref as jn, pluginRenderElementStatic as jo, PlateError as jr, ParagraphConfig as jt, ApplyDeepToNodesOptions as k, MarkInputRuleConfig as ka, createSlatePlugin as ki, isHtmlTable as kn, pipeRenderElementStatic as ko, DebugPlugin as kr, WithRequiredKey as kt, Hotkeys as l, TransformInitialValue as la, isElementStateEmpty as li, TrimEndRule as ln, StyledSlateLeafProps as lo, TAB as lr, BreakRules as lt, getNodeDataAttributeKeys as m, BlockFenceInputRuleMatch as ma, InsertExitBreakOptions as mi, traverseHtmlNode as mn, SlateRenderLeafProps as mo, CorePluginApi as mr, GetInjectNodePropsReturnType as mt, pipeOnNodeChange as n, SlatePlugin as na, DOMPlugin as ni, collapseWhiteSpaceText as nn, SlateHTMLProps as no, cleanHtmlBrElements as nr, BaseHtmlDeserializer as nt, normalizeDescendantsToDocumentFragment as o, SlatePlugins as oa, withScrolling as oi, collapseWhiteSpace as on, SlateText as oo, LINE_FEED as or, BasePluginNode as ot, getPluginNodeProps as p, BlockFenceInputRuleConfig as pa, liftBlock as pi, traverseHtmlTexts as pn, SlateRenderElementProps as po, CorePlugin as pr, GetInjectNodePropsOptions as pt, withSlate as q, getNodeDataAttributes as qa, NodeStaticWrapperComponentReturnType as qi, deserializeHtmlNode as qn, NavigationFeedbackActiveTarget as qr, createMarkInputRule as qt, pipeInsertDataQuery as r, SlatePluginConfig$1 as ra, DomConfig as ri, collapseWhiteSpaceNode as rn, SlateLeaf as ro, DeserializeHtmlChildren as rr, BaseInjectProps as rt, mergeDeepToNodes as s, SlateShortcut as sa, SlateExtensionConfig as si, collapseString as sn, SlateTextProps as so, NO_BREAK_SPACE as sr, BaseSerializer as st, pipeOnTextChange as t, Serializer as ta, AutoScrollOperationsMap as ti, inferWhiteSpaceRule as tn, SlateElementProps as to, cleanHtmlCrLf as tr, BaseDeserializer as tt, createHotkey as u, TransformOptions as ua, setValue as ui, TrimStartRule as un, StyledSlateTextProps as uo, ZERO_WIDTH_SPACE as ur, DeleteRules as ut, defaultsDeepToNodes as v, InputRuleBuilder as va, ParserPlugin as vi, removeHtmlSurroundings as vn, serializeHtml as vo, LengthConfig as vr, InferSelectors as vt, isSlatePluginElement as w, InsertBreakInputRuleContext as wa, getPluginKeys as wi, pipeDeserializeHtmlElement as wn, pipeRenderTextStatic as wo, NodeIdPlugin as wr, NormalizeRules as wt, isSlateElement as x, InputRulesDefinition as xa, getContainerTypes as xi, postCleanHtml as xn, PlateStatic as xo, ChunkingPlugin as xr, MergeRules as xt, getSlateElements as y, InputRuleTarget as ya, HistoryPlugin as yi, removeHtmlNodesBetweenComments as yn, ElementStatic as yo, getCorePlugins as yr, InferTransforms as yt, RenderChunkProps as z, stripSlateDataAttributes as za, HtmlDeserializer 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-BooMghRU";
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 RenderStaticNodeWrapperFunction, $n as cleanHtmlFontElements, $r as NavigationNavigateOptions, $t as upsertInlineFormattingContext, A as applyDeepToNodes, Aa as MatchBlockFenceOptions, Ai as createTSlatePlugin, An as isHtmlInlineElement, Ar as LogLevel, At as BaseParagraphPlugin, B as ZustandStoreApi, Bi as HtmlSerializer, Bn as htmlBrToNewLine, Br as ElementAffinity, Bt as STATIC_VALUE_CREATED_AT, C as isSlateNode, Ca as InsertBreakInputRule, Ci as getPluginKey, Cn as pipeDeserializeHtmlLeaf, Cr as NodeIdOptions, Ct as NodeComponents, D as isSlateText, Da as InsertTextInputRule, Di as getSlatePlugin, Dn as isOlSymbol, Dr as normalizeNodeIdWithEditor, Dt as SelectionRules, E as isSlateString, Ea as InsertDataInputRuleContext, Ei as getPluginTypes, En as parseHtmlDocument, Er as normalizeNodeId, Et as PluginConfig, F as RenderLeafProps, Fa as SelectionInputRuleContext, Fi as EditorPlugin, Fn as inlineTagNames, Fr as getMarkBoundaryAffinity, Ft as withBreakRules, G as WithSlateOptions, Gi as NodeStaticWrapperComponent, Gn as someHtmlElement, Gr as NavigationFeedbackPlugin, Gt as createBlockFenceInputRule, H as nanoid, Hi as InjectNodeProps, Hn as getHtmlComments, Hr as clearNavigationFeedbackTarget, Ht as LengthPlugin, I as RenderElementFn, Ia as TextSubstitutionInputRuleConfig, Ii as ExtendEditor, In as htmlTextNodeToString, Ir as getEdgeNodes, It as OverridePlugin, J as BaseEditor, Ji as NormalizeInitialValue, Jn as deserializeHtmlElement, Jr as NavigationFeedbackConfig, Jt as createTextSubstitutionInputRule, K as createSlateEditor, Ki as NodeStaticWrapperComponentProps, Kn as deserializeHtmlNodeChildren, Kr as NAVIGATION_FEEDBACK_KEY, Kt as createBlockStartInputRule, L as RenderElementProps, La as TextSubstitutionMatch, Li as ExtendEditorApi, Ln as htmlStringToDOMNode, Lr as EdgeNodes, Lt as withOverrides, M as RenderTextFn, Ma as MatchDelimitedInlineOptions, Mi as AnySlatePlugin, Mn as isHtmlElement, Mo as HandlerReturnType, Mr as setAffinitySelection, Mt as withNormalizeRules, N as RenderTextProps, Na as ResolvedInputRule, Ni as Decorate, Nn as isHtmlComment, No as AstPlugin, Nr as isNodeAffinity, Nt as withMergeRules, O as isSlateVoid, Oa as InsertTextInputRuleContext, Oi as getEditorPlugin, On as isHtmlText, Or as DebugErrorType, Ot as WithAnyKey, P as RenderLeafFn, Pa as ResolvedInputRulesMeta, Pi as Deserializer, Pn as isHtmlBlockElement, Pr as isNodesAffinity, Pt as withDeleteRules, Q as SlateEditor, Qi as RenderStaticNodeWrapper, Qn as cleanHtmlLinkElements, Qr as NavigationFlashTargetOptions, Qt as endInlineFormattingContext, R as RenderChunkFn, Ra as TextSubstitutionPattern, Ri as ExtendEditorTransforms, Rn as htmlElementToLeaf, Rr as AffinityConfig, Rt as withNodeId, S as isSlateLeaf, Sa as InputRulesFactoryContext, Si as getPluginByType, Sn as pluginDeserializeHtml, Sr as NodeIdConfig, St as NodeComponent, T as isSlatePluginNode, Ta as InsertDataInputRule, Ti as getPluginType, Tn as parseHtmlElement, Tr as NormalizeNodeIdOptions, Tt as ParserOptions, U as BaseWithSlateOptions, Ui as LeafStaticProps, Un as getDataNodeProps, Ur as flashTarget, Ut as defineInputRule, V as createZustandStore, Vi as InferConfig, Vn as htmlBodyToFragment, Vr as navigate, Vt as normalizeStaticValue, W as CreateSlateEditorOptions, Wi as NodeStaticProps, Wn as findHtmlElement, Wr as resolveNavigationFeedbackTarget, Wt as createRuleFactory, X as KeyofNodePlugins, Xi as Parser, Xn as copyBlockMarksToSpanChild, Xr as NavigationFeedbackStoredTarget, Xt as matchBlockStart, Y as InferPlugins, Yi as OverrideEditor, Yn as deserializeHtml, Yr as NavigationFeedbackPluginKey, Yt as matchBlockFence, Z as KeyofPlugins, Zi as PartialEditorPlugin, Zn as cleanHtmlTextNodes, Zr as NavigationFeedbackTarget, Zt as matchDelimitedInline, _ as getInjectMatch, _a as DelimitedInlineInputRuleMatch, _i as init, _n as replaceTagName, _r as GetCorePluginsOptions, _t as InferOptions, a as omitPluginContext, aa as SlatePluginMethods, ai as WithAutoScrollOptions, an as collapseWhiteSpaceChildren, ar as CARRIAGE_RETURN, at as BasePluginContext, b as isSlateEditor, ba as InputRulesConfig, bi as withPlateHistory, bn as preCleanHtml, br as ChunkingConfig, bt as MatchRules, c as isType, ca as TextStaticProps, ci as SlateExtensionPlugin, cn as CollapseWhiteSpaceState, cr as SPACE, ct as BaseTransformOptions, d as isHotkey, da as AnyInputRule, di as resetBlock, dn as WhiteSpaceRule, dr as HtmlPlugin, dt as EditOnlyConfig, ea as RenderStaticNodeWrapperProps, ei as AUTO_SCROLL, en as isLastNonEmptyTextOfInlineFormattingContext, er as cleanHtmlEmptyElements, et as AnyPluginConfig, f as getSlateClass, fa as BaseInputRule, fi as LiftBlockOptions, fn as unwrapHtmlElement, fr as withChunking, ft as ExtendConfig, g as getInjectedPlugins, ga as BlockStartInputRuleMatch, gi as InitOptions, gn as traverseHtmlComments, gr as DebugConfig, gt as InferKey, h as keyToDataAttribute, ha as BlockStartInputRuleConfig, hi as insertExitBreak, hn as traverseHtmlElements, hr as CorePluginTransforms, ht as InferApi, i as overridePluginsByKey, ia as SlatePluginContext, ii as ScrollMode, in as collapseWhiteSpaceElement, ir as DeserializeHtmlNodeReturnType, it as BasePlugin, j as EditableProps, ja as MatchBlockStartOptions, ji as AnyEditorPlugin, jn as isHtmlFragmentHref, jr as PlateError, jt as ParagraphConfig, k as ApplyDeepToNodesOptions, ka as MarkInputRuleConfig, ki as createSlatePlugin, kn as isHtmlTable, kr as DebugPlugin, kt as WithRequiredKey, l as Hotkeys, la as TransformInitialValue, li as isElementStateEmpty, ln as TrimEndRule, lr as TAB, lt as BreakRules, m as getNodeDataAttributeKeys, ma as BlockFenceInputRuleMatch, mi as InsertExitBreakOptions, mn as traverseHtmlNode, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, n as pipeOnNodeChange, na as SlatePlugin, ni as DOMPlugin, nn as collapseWhiteSpaceText, nr as cleanHtmlBrElements, nt as BaseHtmlDeserializer, o as normalizeDescendantsToDocumentFragment, oa as SlatePlugins, oi as withScrolling, on as collapseWhiteSpace, or as LINE_FEED, ot as BasePluginNode, p as getPluginNodeProps, pa as BlockFenceInputRuleConfig, pi as liftBlock, pn as traverseHtmlTexts, pr as CorePlugin, pt as GetInjectNodePropsOptions, q as withSlate, qi as NodeStaticWrapperComponentReturnType, qn as deserializeHtmlNode, qr as NavigationFeedbackActiveTarget, qt as createMarkInputRule, r as pipeInsertDataQuery, ra as SlatePluginConfig, ri as DomConfig, rn as collapseWhiteSpaceNode, rr as DeserializeHtmlChildren, rt as BaseInjectProps, s as mergeDeepToNodes, sa as SlateShortcut, si as SlateExtensionConfig, sn as collapseString, sr as NO_BREAK_SPACE, st as BaseSerializer, t as pipeOnTextChange, ta as Serializer, ti as AutoScrollOperationsMap, tn as inferWhiteSpaceRule, tr as cleanHtmlCrLf, tt as BaseDeserializer, u as createHotkey, ua as TransformOptions, ui as setValue, un as TrimStartRule, ur as ZERO_WIDTH_SPACE, ut as DeleteRules, v as defaultsDeepToNodes, va as InputRuleBuilder, vi as ParserPlugin, vn as removeHtmlSurroundings, vr as LengthConfig, vt as InferSelectors, w as isSlatePluginElement, wa as InsertBreakInputRuleContext, wi as getPluginKeys, wn as pipeDeserializeHtmlElement, wr as NodeIdPlugin, wt as NormalizeRules, x as isSlateElement, xa as InputRulesDefinition, xi as getContainerTypes, xn as postCleanHtml, xr as ChunkingPlugin, xt as MergeRules, y as getSlateElements, ya as InputRuleTarget, yi as HistoryPlugin, yn as removeHtmlNodesBetweenComments, yr as getCorePlugins, yt as InferTransforms, z as RenderChunkProps, zi as HtmlDeserializer, zn as htmlElementToElement, zr as AffinityPlugin, zt as NormalizeStaticValueOptions } from "./index-ClAE30YQ";
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, isElementStateEmpty, 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-Ck8dLhUt.js";
1
+ import { $ as isLastNonEmptyTextOfInlineFormattingContext, $t as matchDelimitedInline, A as parseHtmlDocument, At as isSlateNode, B as pluginDeserializeHtml, Bt as withMergeRules, C as clearNavigationFeedbackTarget, Ct as keyToDataAttribute, D as NavigationFeedbackPluginKey, Dt as isSlateEditor, E as NAVIGATION_FEEDBACK_KEY, Et as getSlateElements, F as htmlTextNodeToString, Ft as isSlateVoid, G as collapseWhiteSpace, Gt as withPlateHistory, H as htmlBrToNewLine, Ht as withBreakRules, I as htmlElementToLeaf, It as applyDeepToNodes, J as collapseWhiteSpaceChildren, Jt as createBlockStartInputRule, K as collapseWhiteSpaceElement, Kt as AstPlugin, L as pipeDeserializeHtmlLeaf, Lt as OverridePlugin, M as htmlStringToDOMNode, Mt as isSlatePluginNode, N as deserializeHtmlElement, Nt as isSlateString, O as LengthPlugin, Ot as isSlateElement, P as deserializeHtmlNode, Pt as isSlateText, Q as upsertInlineFormattingContext, Qt as matchBlockStart, R as htmlElementToElement, Rt as withOverrides, S as navigate, St as getNodeDataAttributeKeys, T as resolveNavigationFeedbackTarget, Tt as getInjectMatch, U as htmlBodyToFragment, Ut as BaseParagraphPlugin, V as getDataNodeProps, Vt as withDeleteRules, W as deserializeHtmlNodeChildren, Wt as HistoryPlugin, X as collapseWhiteSpaceText, Xt as createTextSubstitutionInputRule, Y as collapseWhiteSpaceNode, Yt as createMarkInputRule, Z as endInlineFormattingContext, Zt as matchBlockFence, _ as NodeIdPlugin, _t as getMarkBoundaryAffinity, a as pipeInsertDataQuery, an as getPluginType, at as isHtmlElement, b as withNodeId, bt as getSlateClass, c as isElementStateEmpty, cn as getEditorPlugin, ct as withScrolling, d as liftBlock, dt as ChunkingPlugin, en as defineInputRule, et as collapseString, f as insertExitBreak, ft as withChunking, g as pipeOnNodeChange, gt as isNodesAffinity, h as pipeOnTextChange, ht as isNodeAffinity, i as ParserPlugin, in as getPluginKeys, it as isHtmlText, j as deserializeHtml, jt as isSlatePluginElement, k as HtmlPlugin, kt as isSlateLeaf, l as setValue, ln as createSlatePlugin, lt as DebugPlugin, mt as setAffinitySelection, n as withSlate, nn as getPluginByType, nt as isHtmlInlineElement, o as normalizeDescendantsToDocumentFragment, on as getPluginTypes, ot as AUTO_SCROLL, p as init, pt as AffinityPlugin, q as inferWhiteSpaceRule, qt as createBlockFenceInputRule, r as getCorePlugins, rn as getPluginKey, rt as inlineTagNames, s as SlateExtensionPlugin, sn as getSlatePlugin, st as DOMPlugin, t as createSlateEditor, tn as getContainerTypes, tt as isHtmlBlockElement, u as resetBlock, un as createTSlatePlugin, ut as PlateError, v as normalizeNodeId, vt as getEdgeNodes, w as flashTarget, wt as getInjectedPlugins, x as NavigationFeedbackPlugin, xt as getPluginNodeProps, y as normalizeNodeIdWithEditor, yt as mergeDeepToNodes, z as pipeDeserializeHtmlElement, zt as withNormalizeRules } from "./withSlate-pfxNb3FA.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, isElementStateEmpty, 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 };