@lofcz/platejs-core 53.1.1 → 53.1.6

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.
@@ -1,4 +1,4 @@
1
- import * as _platejs_slate1 from "@platejs/slate";
1
+ import * as _platejs_slate30 from "@platejs/slate";
2
2
  import { Ancestor, DOMRange, DecoratedRange, Descendant, Editor, EditorAboveOptions, EditorApi, EditorBase, EditorTransforms, InsertTextOptions, LeafPosition, NodeEntry, NodeOf, NodeOperation, Operation, Path, PathRef, Point, QueryNodeOptions, ScrollIntoViewOptions, TElement, TNode, TRange, TSelection, TText, TextOperation, Value } from "@platejs/slate";
3
3
  import { nanoid as nanoid$1 } from "nanoid";
4
4
  import { AnyObject, Deep2Partial, Modify, Nullable, OmitFirst, UnionToIntersection, UnknownObject } from "@udecode/utils";
@@ -200,9 +200,9 @@ declare const createStaticEditor: <V extends Value = Value, P extends AnyPluginC
200
200
  declare const ViewPlugin: SlatePlugin<PluginConfig<"dom", {
201
201
  scrollMode?: ScrollMode;
202
202
  scrollOperations?: AutoScrollOperationsMap;
203
- scrollOptions?: _platejs_slate1.ScrollIntoViewOptions;
203
+ scrollOptions?: _platejs_slate30.ScrollIntoViewOptions;
204
204
  }, {
205
- getFragment: () => _platejs_slate1.Descendant[];
205
+ getFragment: () => _platejs_slate30.Descendant[];
206
206
  isScrolling: () => boolean;
207
207
  }, {
208
208
  withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
@@ -212,9 +212,9 @@ declare const ViewPlugin: SlatePlugin<PluginConfig<"dom", {
212
212
  declare const getStaticPlugins: () => SlatePlugin<PluginConfig<"dom", {
213
213
  scrollMode?: ScrollMode;
214
214
  scrollOperations?: AutoScrollOperationsMap;
215
- scrollOptions?: _platejs_slate1.ScrollIntoViewOptions;
215
+ scrollOptions?: _platejs_slate30.ScrollIntoViewOptions;
216
216
  }, {
217
- getFragment: () => _platejs_slate1.Descendant[];
217
+ getFragment: () => _platejs_slate30.Descendant[];
218
218
  isScrolling: () => boolean;
219
219
  }, {
220
220
  withScrolling: (fn: () => void, options?: WithAutoScrollOptions | undefined) => void;
@@ -998,12 +998,12 @@ declare const SlateExtensionPlugin: SlatePlugin<PluginConfig<"slateExtension", {
998
998
  insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
999
999
  liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
1000
1000
  resetBlock: ((args_0?: {
1001
- at?: _platejs_slate1.Path;
1001
+ at?: _platejs_slate30.Path;
1002
1002
  } | undefined) => true | undefined) & ((args_0?: {
1003
- at?: _platejs_slate1.Path;
1003
+ at?: _platejs_slate30.Path;
1004
1004
  } | undefined) => true | undefined);
1005
- setValue: ((value?: string | _platejs_slate1.Value | undefined) => void) & ((value?: string | _platejs_slate1.Value | undefined) => void);
1006
- apply: <N$1 extends _platejs_slate1.TElement | TText>(operation: _platejs_slate1.Operation<N$1>) => void;
1005
+ 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;
1007
1007
  }, {}>>;
1008
1008
  //#endregion
1009
1009
  //#region src/lib/plugins/dom/withScrolling.d.ts
@@ -1109,7 +1109,7 @@ declare const NavigationFeedbackPlugin: SlatePlugin<PluginConfig<"navigationFeed
1109
1109
  navigation: {
1110
1110
  activeTarget: () => NavigationFeedbackActiveTarget | null;
1111
1111
  clear: () => void;
1112
- isTarget: (path: _platejs_slate1.Path) => boolean;
1112
+ isTarget: (path: _platejs_slate30.Path) => boolean;
1113
1113
  };
1114
1114
  }, {
1115
1115
  navigation: {
@@ -1356,14 +1356,14 @@ declare const getCorePlugins: ({
1356
1356
  }: GetCorePluginsOptions) => (SlatePlugin<DebugConfig> | SlatePlugin<PluginConfig<"slateExtension", {
1357
1357
  onNodeChange: (options: {
1358
1358
  editor: SlateEditor;
1359
- node: _platejs_slate1.Descendant;
1360
- operation: _platejs_slate1.NodeOperation;
1361
- prevNode: _platejs_slate1.Descendant;
1359
+ node: _platejs_slate30.Descendant;
1360
+ operation: _platejs_slate30.NodeOperation;
1361
+ prevNode: _platejs_slate30.Descendant;
1362
1362
  }) => void;
1363
1363
  onTextChange: (options: {
1364
1364
  editor: SlateEditor;
1365
- node: _platejs_slate1.Descendant;
1366
- operation: _platejs_slate1.TextOperation;
1365
+ node: _platejs_slate30.Descendant;
1366
+ operation: _platejs_slate30.TextOperation;
1367
1367
  prevText: string;
1368
1368
  text: string;
1369
1369
  }) => void;
@@ -1374,16 +1374,16 @@ declare const getCorePlugins: ({
1374
1374
  insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
1375
1375
  liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
1376
1376
  resetBlock: ((args_0?: {
1377
- at?: _platejs_slate1.Path;
1377
+ at?: _platejs_slate30.Path;
1378
1378
  } | undefined) => true | undefined) & ((args_0?: {
1379
- at?: _platejs_slate1.Path;
1379
+ at?: _platejs_slate30.Path;
1380
1380
  } | undefined) => true | undefined);
1381
- setValue: ((value?: string | _platejs_slate1.Value | undefined) => void) & ((value?: string | _platejs_slate1.Value | undefined) => void);
1382
- apply: <N$1 extends _platejs_slate1.TElement | _platejs_slate1.TText>(operation: _platejs_slate1.Operation<N$1>) => void;
1381
+ setValue: ((value?: string | _platejs_slate30.Value | undefined) => void) & ((value?: string | _platejs_slate30.Value | undefined) => void);
1382
+ apply: <N$1 extends _platejs_slate30.TElement | _platejs_slate30.TText>(operation: _platejs_slate30.Operation<N$1>) => void;
1383
1383
  }, {}>> | SlatePlugin<PluginConfig<"dom", {
1384
1384
  scrollMode?: ScrollMode;
1385
1385
  scrollOperations?: AutoScrollOperationsMap;
1386
- scrollOptions?: _platejs_slate1.ScrollIntoViewOptions;
1386
+ scrollOptions?: _platejs_slate30.ScrollIntoViewOptions;
1387
1387
  }, {
1388
1388
  isScrolling: () => boolean;
1389
1389
  }, {
@@ -1395,7 +1395,7 @@ declare const getCorePlugins: ({
1395
1395
  navigation: {
1396
1396
  activeTarget: () => NavigationFeedbackActiveTarget | null;
1397
1397
  clear: () => void;
1398
- isTarget: (path: _platejs_slate1.Path) => boolean;
1398
+ isTarget: (path: _platejs_slate30.Path) => boolean;
1399
1399
  };
1400
1400
  }, {
1401
1401
  navigation: {
@@ -1408,7 +1408,7 @@ declare const getCorePlugins: ({
1408
1408
  element: HTMLElement | string;
1409
1409
  collapseWhiteSpace?: boolean;
1410
1410
  defaultElementPlugin?: WithRequiredKey;
1411
- }) => _platejs_slate1.Descendant[];
1411
+ }) => _platejs_slate30.Descendant[];
1412
1412
  }>, {}, {}>> | SlatePlugin<PluginConfig<"ast", {}, {}, {}, {}>> | SlatePlugin<PluginConfig<"nodeId", {
1413
1413
  disableInsertOverrides?: boolean;
1414
1414
  filterInline?: boolean;
@@ -1417,7 +1417,7 @@ declare const getCorePlugins: ({
1417
1417
  normalizeInitialValue?: boolean;
1418
1418
  reuseId?: boolean;
1419
1419
  idCreator?: () => any;
1420
- } & _platejs_slate1.QueryNodeOptions, {}, {
1420
+ } & _platejs_slate30.QueryNodeOptions, {}, {
1421
1421
  nodeId: {
1422
1422
  normalize: () => void;
1423
1423
  };
@@ -1457,7 +1457,7 @@ declare const HtmlPlugin: SlatePlugin<PluginConfig<"html", {}, Record<"html", {
1457
1457
  element: HTMLElement | string;
1458
1458
  collapseWhiteSpace?: boolean;
1459
1459
  defaultElementPlugin?: WithRequiredKey;
1460
- }) => _platejs_slate1.Descendant[];
1460
+ }) => _platejs_slate30.Descendant[];
1461
1461
  }>, {}, {}>>;
1462
1462
  //#endregion
1463
1463
  //#region src/lib/plugins/html/constants.d.ts
@@ -3029,7 +3029,7 @@ declare const normalizeDescendantsToDocumentFragment: (editor: SlateEditor, {
3029
3029
  }) => Descendant[];
3030
3030
  //#endregion
3031
3031
  //#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">;
3032
+ declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "getOptions" | "getOption" | "tf" | "type" | "setOptions" | "setOption" | "plugin">;
3033
3033
  //#endregion
3034
3034
  //#region src/lib/utils/overridePluginsByKey.d.ts
3035
3035
  /**
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";
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
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 };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
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 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";
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";
@@ -1,11 +1,11 @@
1
- import { Ai as AnySlatePlugin, Ct as NodeComponents, Et as PluginConfig, F as RenderLeafProps, I as RenderElementFn, J as BaseEditor, Kr as NavigationFeedbackActiveTarget, L as RenderElementProps, M as RenderTextFn, N as RenderTextProps, Ot as WithAnyKey, P as RenderLeafFn, Pi as ExtendEditor$1, Q as SlateEditor, R as RenderChunkFn, St as NodeComponent, Tt as ParserOptions, U as BaseWithSlateOptions, Y as InferPlugins, Ya as createStaticEditor, _a as InputRulesConfig, _t as InferOptions, at as BasePluginContext, bt as MatchRules, ct as BaseTransformOptions, ea as SlatePlugin, ei as AutoScrollOperationsMap, et as AnyPluginConfig, fi as InsertExitBreakOptions, gt as InferKey, hr as CorePluginTransforms, ht as InferApi, ii as WithAutoScrollOptions, it as BasePlugin, j as EditableProps, ja as ResolvedInputRulesMeta, ko as HandlerReturnType, kt as WithRequiredKey, mi as InitOptions, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, na as SlatePluginContext, ni as DomConfig, nt as BaseHtmlDeserializer, pr as CorePlugin, pt as GetInjectNodePropsOptions, qr as NavigationFeedbackConfig, ri as ScrollMode, rt as BaseInjectProps, st as BaseSerializer, ta as SlatePluginConfig, tt as BaseDeserializer, ui as LiftBlockOptions, va as InputRulesDefinition, vt as InferSelectors, yo as PlateStaticProps, yt as InferTransforms, z as RenderChunkProps } from "../index-DRweaH9Q";
2
- import * as _platejs_slate19 from "@platejs/slate";
1
+ import { Ai as AnySlatePlugin, Ct as NodeComponents, Et as PluginConfig, F as RenderLeafProps, I as RenderElementFn, J as BaseEditor, Kr as NavigationFeedbackActiveTarget, L as RenderElementProps, M as RenderTextFn, N as RenderTextProps, Ot as WithAnyKey, P as RenderLeafFn, Pi as ExtendEditor$1, Q as SlateEditor, R as RenderChunkFn, St as NodeComponent, Tt as ParserOptions, U as BaseWithSlateOptions, Y as InferPlugins, Ya as createStaticEditor, _a as InputRulesConfig, _t as InferOptions, at as BasePluginContext, bt as MatchRules, ct as BaseTransformOptions, ea as SlatePlugin, ei as AutoScrollOperationsMap, et as AnyPluginConfig, fi as InsertExitBreakOptions, gt as InferKey, hr as CorePluginTransforms, ht as InferApi, ii as WithAutoScrollOptions, it as BasePlugin, j as EditableProps, ja as ResolvedInputRulesMeta, ko as HandlerReturnType, kt as WithRequiredKey, mi as InitOptions, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, na as SlatePluginContext, ni as DomConfig, nt as BaseHtmlDeserializer, pr as CorePlugin, pt as GetInjectNodePropsOptions, qr as NavigationFeedbackConfig, ri as ScrollMode, rt as BaseInjectProps, st as BaseSerializer, ta as SlatePluginConfig, tt as BaseDeserializer, ui as LiftBlockOptions, va as InputRulesDefinition, vt as InferSelectors, yo as PlateStaticProps, yt as InferTransforms, z as RenderChunkProps } from "../index-BooMghRU";
2
+ import * as _platejs_slate15 from "@platejs/slate";
3
3
  import { DecoratedRange, Descendant, DescendantIn, Editor, EditorApi, EditorTransforms, ElementEntry, NodeEntry, NodeOperation, Operation, Path, TElement, TNode, TRange, TSelection, TText, TextOperation, Value, ValueOf } from "@platejs/slate";
4
4
  import { AnyObject, Deep2Partial, Modify, Nullable, UnionToIntersection, UnknownObject } from "@udecode/utils";
5
5
  import { DefaultPlaceholder, Editable, RenderPlaceholderProps, Slate, useComposing, useFocused, useReadOnly, useSelected, useSlateStatic, withReact } from "slate-react";
6
6
  import React$1, { HTMLAttributes } from "react";
7
7
  import { HotkeysEvent, HotkeysOptions, Keys } from "@udecode/react-hotkeys";
8
- import * as jotai_x2 from "jotai-x";
8
+ import * as jotai_x0 from "jotai-x";
9
9
  import { JotaiStore, createAtomStore, useStoreAtomState, useStoreAtomValue, useStoreSetAtom } from "jotai-x";
10
10
  import * as jotai10 from "jotai";
11
11
  import { Atom, atom } from "jotai";
@@ -16,31 +16,31 @@ import { TCreatedStoreType, TEqualityChecker, createZustandStore, useStoreSelect
16
16
  declare const SlateReactExtensionPlugin: PlatePlugin<PluginConfig<"slateExtension", {
17
17
  onNodeChange: (options: {
18
18
  editor: SlateEditor;
19
- node: _platejs_slate19.Descendant;
20
- operation: _platejs_slate19.NodeOperation;
21
- prevNode: _platejs_slate19.Descendant;
19
+ node: _platejs_slate15.Descendant;
20
+ operation: _platejs_slate15.NodeOperation;
21
+ prevNode: _platejs_slate15.Descendant;
22
22
  }) => void;
23
23
  onTextChange: (options: {
24
24
  editor: SlateEditor;
25
- node: _platejs_slate19.Descendant;
26
- operation: _platejs_slate19.TextOperation;
25
+ node: _platejs_slate15.Descendant;
26
+ operation: _platejs_slate15.TextOperation;
27
27
  prevText: string;
28
28
  text: string;
29
29
  }) => void;
30
30
  }, {
31
31
  redecorate: (() => void) & (() => void);
32
32
  }, {
33
- reset: (options: _platejs_slate19.ResetOptions | undefined) => void;
33
+ reset: (options: _platejs_slate15.ResetOptions | undefined) => void;
34
34
  init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
35
35
  insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
36
36
  liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
37
37
  resetBlock: ((args_0?: {
38
- at?: _platejs_slate19.Path;
38
+ at?: _platejs_slate15.Path;
39
39
  } | undefined) => true | undefined) & ((args_0?: {
40
- at?: _platejs_slate19.Path;
40
+ at?: _platejs_slate15.Path;
41
41
  } | undefined) => true | undefined);
42
- setValue: ((value?: string | _platejs_slate19.Value | undefined) => void) & ((value?: string | _platejs_slate19.Value | undefined) => void);
43
- apply: <N$1 extends _platejs_slate19.TElement | _platejs_slate19.TText>(operation: _platejs_slate19.Operation<N$1>) => void;
42
+ setValue: ((value?: string | _platejs_slate15.Value | undefined) => void) & ((value?: string | _platejs_slate15.Value | undefined) => void);
43
+ apply: <N$1 extends _platejs_slate15.TElement | _platejs_slate15.TText>(operation: _platejs_slate15.Operation<N$1>) => void;
44
44
  }, {}>>;
45
45
  //#endregion
46
46
  //#region src/react/plugins/event-editor/EventEditorPlugin.d.ts
@@ -100,7 +100,7 @@ declare const ParagraphPlugin: PlatePlugin<PluginConfig<"p", {}, {}, {}, {}>>;
100
100
  declare const ReactPlugin: PlatePlugin<PluginConfig<"dom", {
101
101
  scrollMode?: ScrollMode;
102
102
  scrollOperations?: AutoScrollOperationsMap;
103
- scrollOptions?: _platejs_slate19.ScrollIntoViewOptions;
103
+ scrollOptions?: _platejs_slate15.ScrollIntoViewOptions;
104
104
  }, {
105
105
  isScrolling: () => boolean;
106
106
  }, {
@@ -810,35 +810,35 @@ declare const getPlateCorePlugins: ({
810
810
  }) => (PlatePlugin<PluginConfig<"eventEditor", {}, {}, {}, {}>> | PlatePlugin<PluginConfig<"slateExtension", {
811
811
  onNodeChange: (options: {
812
812
  editor: SlateEditor;
813
- node: _platejs_slate19.Descendant;
814
- operation: _platejs_slate19.NodeOperation;
815
- prevNode: _platejs_slate19.Descendant;
813
+ node: _platejs_slate15.Descendant;
814
+ operation: _platejs_slate15.NodeOperation;
815
+ prevNode: _platejs_slate15.Descendant;
816
816
  }) => void;
817
817
  onTextChange: (options: {
818
818
  editor: SlateEditor;
819
- node: _platejs_slate19.Descendant;
820
- operation: _platejs_slate19.TextOperation;
819
+ node: _platejs_slate15.Descendant;
820
+ operation: _platejs_slate15.TextOperation;
821
821
  prevText: string;
822
822
  text: string;
823
823
  }) => void;
824
824
  }, {
825
825
  redecorate: (() => void) & (() => void);
826
826
  }, {
827
- reset: (options: _platejs_slate19.ResetOptions | undefined) => void;
827
+ reset: (options: _platejs_slate15.ResetOptions | undefined) => void;
828
828
  init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
829
829
  insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
830
830
  liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
831
831
  resetBlock: ((args_0?: {
832
- at?: _platejs_slate19.Path;
832
+ at?: _platejs_slate15.Path;
833
833
  } | undefined) => true | undefined) & ((args_0?: {
834
- at?: _platejs_slate19.Path;
834
+ at?: _platejs_slate15.Path;
835
835
  } | undefined) => true | undefined);
836
- setValue: ((value?: string | _platejs_slate19.Value | undefined) => void) & ((value?: string | _platejs_slate19.Value | undefined) => void);
837
- apply: <N$1 extends _platejs_slate19.TElement | _platejs_slate19.TText>(operation: _platejs_slate19.Operation<N$1>) => void;
836
+ setValue: ((value?: string | _platejs_slate15.Value | undefined) => void) & ((value?: string | _platejs_slate15.Value | undefined) => void);
837
+ apply: <N$1 extends _platejs_slate15.TElement | _platejs_slate15.TText>(operation: _platejs_slate15.Operation<N$1>) => void;
838
838
  }, {}>> | PlatePlugin<PluginConfig<"dom", {
839
839
  scrollMode?: ScrollMode;
840
840
  scrollOperations?: AutoScrollOperationsMap;
841
- scrollOptions?: _platejs_slate19.ScrollIntoViewOptions;
841
+ scrollOptions?: _platejs_slate15.ScrollIntoViewOptions;
842
842
  }, {
843
843
  isScrolling: () => boolean;
844
844
  }, {
@@ -908,7 +908,7 @@ declare function getPlugin<C extends AnyPluginConfig = PluginConfig>(editor: Pla
908
908
  } ? C : PlatePlugin<C>;
909
909
  //#endregion
910
910
  //#region src/react/plugin/omitPluginContext.d.ts
911
- declare const omitPluginContext: <T extends PlatePluginContext<AnyPlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "plugin" | "getOptions" | "getOption" | "tf" | "type" | "setOptions" | "setOption">;
911
+ declare const omitPluginContext: <T extends PlatePluginContext<AnyPlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "getOptions" | "getOption" | "tf" | "type" | "setOptions" | "setOption" | "plugin">;
912
912
  //#endregion
913
913
  //#region src/react/plugin/toPlatePlugin.d.ts
914
914
  type PlatePluginConfig$1<C extends AnyPluginConfig, EO = {}, EA = {}, ET = {}, ES = {}> = Omit<Partial<PlatePlugin<PluginConfig<C['key'], EO & InferOptions<C>, EA & InferApi<C>, ET & InferTransforms<C>, ES & InferSelectors<C>>>>, keyof PlatePluginMethods | 'api' | 'node' | 'options' | 'transforms'> & {
@@ -1065,11 +1065,11 @@ type ElementStoreState = {
1065
1065
  entry: ElementEntry;
1066
1066
  path: Path;
1067
1067
  };
1068
- declare const ElementProvider: React$1.FC<jotai_x2.ProviderProps<{
1068
+ declare const ElementProvider: React$1.FC<jotai_x0.ProviderProps<{
1069
1069
  element: TElement;
1070
1070
  entry: ElementEntry;
1071
1071
  path: Path;
1072
- }>>, elementStore: jotai_x2.StoreApi<ElementStoreState, object, "element">, useElementStore: jotai_x2.UseStoreApi<ElementStoreState, object>;
1072
+ }>>, elementStore: jotai_x0.StoreApi<ElementStoreState, object, "element">, useElementStore: jotai_x0.UseStoreApi<ElementStoreState, object>;
1073
1073
  //#endregion
1074
1074
  //#region src/react/stores/element/usePath.d.ts
1075
1075
  /** Get the memoized path of the closest element. */
@@ -1194,7 +1194,7 @@ declare const createPlateStore: <E extends PlateEditor = PlateEditor>({
1194
1194
  onTextChange,
1195
1195
  onValueChange,
1196
1196
  ...state
1197
- }?: Partial<PlateStoreState<E>>) => jotai_x2.AtomStoreApi<PlateStoreState<E>, {
1197
+ }?: Partial<PlateStoreState<E>>) => jotai_x0.AtomStoreApi<PlateStoreState<E>, {
1198
1198
  trackedEditor: jotai10.Atom<{
1199
1199
  editor: any;
1200
1200
  version: number | null;
@@ -1208,12 +1208,12 @@ declare const createPlateStore: <E extends PlateEditor = PlateEditor>({
1208
1208
  version: number | null;
1209
1209
  }>;
1210
1210
  }, "plate">;
1211
- declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1211
+ declare const PlateStoreProvider: React$1.FC<jotai_x0.ProviderProps<{
1212
1212
  composing: boolean | null;
1213
1213
  decorate: ((options: {
1214
1214
  editor: PlateEditor;
1215
- entry: _platejs_slate19.NodeEntry;
1216
- }) => _platejs_slate19.TRange[]) | null;
1215
+ entry: _platejs_slate15.NodeEntry;
1216
+ }) => _platejs_slate15.TRange[]) | null;
1217
1217
  isMounted: boolean | null;
1218
1218
  primary: boolean | null;
1219
1219
  readOnly: boolean | null;
@@ -1227,34 +1227,34 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1227
1227
  versionValue: number | null;
1228
1228
  onChange: ((options: {
1229
1229
  editor: PlateEditor;
1230
- value: _platejs_slate19.Value;
1230
+ value: _platejs_slate15.Value;
1231
1231
  }) => void) | null;
1232
1232
  onNodeChange: ((options: {
1233
1233
  editor: PlateEditor;
1234
- node: _platejs_slate19.Descendant;
1235
- operation: _platejs_slate19.NodeOperation;
1236
- prevNode: _platejs_slate19.Descendant;
1234
+ node: _platejs_slate15.Descendant;
1235
+ operation: _platejs_slate15.NodeOperation;
1236
+ prevNode: _platejs_slate15.Descendant;
1237
1237
  }) => void) | null;
1238
1238
  onSelectionChange: ((options: {
1239
1239
  editor: PlateEditor;
1240
- selection: _platejs_slate19.TSelection;
1240
+ selection: _platejs_slate15.TSelection;
1241
1241
  }) => void) | null;
1242
1242
  onTextChange: ((options: {
1243
1243
  editor: PlateEditor;
1244
- node: _platejs_slate19.Descendant;
1245
- operation: _platejs_slate19.TextOperation;
1244
+ node: _platejs_slate15.Descendant;
1245
+ operation: _platejs_slate15.TextOperation;
1246
1246
  prevText: string;
1247
1247
  text: string;
1248
1248
  }) => void) | null;
1249
1249
  onValueChange: ((options: {
1250
1250
  editor: PlateEditor;
1251
- value: _platejs_slate19.Value;
1251
+ value: _platejs_slate15.Value;
1252
1252
  }) => void) | null;
1253
1253
  id: string;
1254
1254
  containerRef: React$1.RefObject<HTMLDivElement | null>;
1255
1255
  editor: PlateEditor;
1256
1256
  scrollRef: React$1.RefObject<HTMLDivElement | null>;
1257
- }>>, plateStore: jotai_x2.StoreApi<PlateStoreState<PlateEditor>, {
1257
+ }>>, plateStore: jotai_x0.StoreApi<PlateStoreState<PlateEditor>, {
1258
1258
  trackedEditor: jotai10.Atom<{
1259
1259
  editor: any;
1260
1260
  version: number | null;
@@ -1267,52 +1267,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1267
1267
  value: any;
1268
1268
  version: number | null;
1269
1269
  }>;
1270
- }, "plate">, usePlateLocalSet: <K$1 extends "renderElement" | "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x2.UseAtomOptions) => ({
1271
- composing: jotai_x2.SimpleWritableAtom<boolean | null>;
1272
- decorate: jotai_x2.SimpleWritableAtom<((options: {
1270
+ }, "plate">, usePlateLocalSet: <K$1 extends "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "renderElement" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x0.UseAtomOptions) => ({
1271
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1272
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1273
1273
  editor: PlateEditor;
1274
- entry: _platejs_slate19.NodeEntry;
1275
- }) => _platejs_slate19.TRange[]) | null>;
1276
- isMounted: jotai_x2.SimpleWritableAtom<boolean | null>;
1277
- primary: jotai_x2.SimpleWritableAtom<boolean | null>;
1278
- readOnly: jotai_x2.SimpleWritableAtom<boolean | null>;
1279
- renderChunk: jotai_x2.SimpleWritableAtom<RenderChunkFn | null>;
1280
- renderElement: jotai_x2.SimpleWritableAtom<RenderElementFn | null>;
1281
- renderLeaf: jotai_x2.SimpleWritableAtom<RenderLeafFn | null>;
1282
- renderText: jotai_x2.SimpleWritableAtom<RenderTextFn | null>;
1283
- versionDecorate: jotai_x2.SimpleWritableAtom<number | null>;
1284
- versionEditor: jotai_x2.SimpleWritableAtom<number | null>;
1285
- versionSelection: jotai_x2.SimpleWritableAtom<number | null>;
1286
- versionValue: jotai_x2.SimpleWritableAtom<number | null>;
1287
- onChange: jotai_x2.SimpleWritableAtom<((options: {
1274
+ entry: _platejs_slate15.NodeEntry;
1275
+ }) => _platejs_slate15.TRange[]) | null>;
1276
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1277
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1278
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1279
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1280
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1281
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1282
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1283
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1284
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1285
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1286
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1287
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1288
1288
  editor: PlateEditor;
1289
- value: _platejs_slate19.Value;
1289
+ value: _platejs_slate15.Value;
1290
1290
  }) => void) | null>;
1291
- onNodeChange: jotai_x2.SimpleWritableAtom<((options: {
1291
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1292
1292
  editor: PlateEditor;
1293
- node: _platejs_slate19.Descendant;
1294
- operation: _platejs_slate19.NodeOperation;
1295
- prevNode: _platejs_slate19.Descendant;
1293
+ node: _platejs_slate15.Descendant;
1294
+ operation: _platejs_slate15.NodeOperation;
1295
+ prevNode: _platejs_slate15.Descendant;
1296
1296
  }) => void) | null>;
1297
- onSelectionChange: jotai_x2.SimpleWritableAtom<((options: {
1297
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1298
1298
  editor: PlateEditor;
1299
- selection: _platejs_slate19.TSelection;
1299
+ selection: _platejs_slate15.TSelection;
1300
1300
  }) => void) | null>;
1301
- onTextChange: jotai_x2.SimpleWritableAtom<((options: {
1301
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1302
1302
  editor: PlateEditor;
1303
- node: _platejs_slate19.Descendant;
1304
- operation: _platejs_slate19.TextOperation;
1303
+ node: _platejs_slate15.Descendant;
1304
+ operation: _platejs_slate15.TextOperation;
1305
1305
  prevText: string;
1306
1306
  text: string;
1307
1307
  }) => void) | null>;
1308
- onValueChange: jotai_x2.SimpleWritableAtom<((options: {
1308
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1309
1309
  editor: PlateEditor;
1310
- value: _platejs_slate19.Value;
1310
+ value: _platejs_slate15.Value;
1311
1311
  }) => void) | null>;
1312
- id: jotai_x2.SimpleWritableAtom<string>;
1313
- containerRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1314
- editor: jotai_x2.SimpleWritableAtom<PlateEditor>;
1315
- scrollRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1312
+ id: jotai_x0.SimpleWritableAtom<string>;
1313
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1314
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1315
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1316
1316
  } & {
1317
1317
  trackedEditor: jotai10.Atom<{
1318
1318
  editor: any;
@@ -1326,52 +1326,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1326
1326
  value: any;
1327
1327
  version: number | null;
1328
1328
  }>;
1329
- })[K$1] extends jotai10.WritableAtom<infer _V, infer A extends unknown[], infer R> ? (...args: A) => R : never, usePlateLocalState: <K$1 extends "renderElement" | "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x2.UseAtomOptions) => ({
1330
- composing: jotai_x2.SimpleWritableAtom<boolean | null>;
1331
- decorate: jotai_x2.SimpleWritableAtom<((options: {
1329
+ })[K$1] extends jotai10.WritableAtom<infer _V, infer A extends unknown[], infer R> ? (...args: A) => R : never, usePlateLocalState: <K$1 extends "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "renderElement" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x0.UseAtomOptions) => ({
1330
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1331
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1332
1332
  editor: PlateEditor;
1333
- entry: _platejs_slate19.NodeEntry;
1334
- }) => _platejs_slate19.TRange[]) | null>;
1335
- isMounted: jotai_x2.SimpleWritableAtom<boolean | null>;
1336
- primary: jotai_x2.SimpleWritableAtom<boolean | null>;
1337
- readOnly: jotai_x2.SimpleWritableAtom<boolean | null>;
1338
- renderChunk: jotai_x2.SimpleWritableAtom<RenderChunkFn | null>;
1339
- renderElement: jotai_x2.SimpleWritableAtom<RenderElementFn | null>;
1340
- renderLeaf: jotai_x2.SimpleWritableAtom<RenderLeafFn | null>;
1341
- renderText: jotai_x2.SimpleWritableAtom<RenderTextFn | null>;
1342
- versionDecorate: jotai_x2.SimpleWritableAtom<number | null>;
1343
- versionEditor: jotai_x2.SimpleWritableAtom<number | null>;
1344
- versionSelection: jotai_x2.SimpleWritableAtom<number | null>;
1345
- versionValue: jotai_x2.SimpleWritableAtom<number | null>;
1346
- onChange: jotai_x2.SimpleWritableAtom<((options: {
1333
+ entry: _platejs_slate15.NodeEntry;
1334
+ }) => _platejs_slate15.TRange[]) | null>;
1335
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1336
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1337
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1338
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1339
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1340
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1341
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1342
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1343
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1344
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1345
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1346
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1347
1347
  editor: PlateEditor;
1348
- value: _platejs_slate19.Value;
1348
+ value: _platejs_slate15.Value;
1349
1349
  }) => void) | null>;
1350
- onNodeChange: jotai_x2.SimpleWritableAtom<((options: {
1350
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1351
1351
  editor: PlateEditor;
1352
- node: _platejs_slate19.Descendant;
1353
- operation: _platejs_slate19.NodeOperation;
1354
- prevNode: _platejs_slate19.Descendant;
1352
+ node: _platejs_slate15.Descendant;
1353
+ operation: _platejs_slate15.NodeOperation;
1354
+ prevNode: _platejs_slate15.Descendant;
1355
1355
  }) => void) | null>;
1356
- onSelectionChange: jotai_x2.SimpleWritableAtom<((options: {
1356
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1357
1357
  editor: PlateEditor;
1358
- selection: _platejs_slate19.TSelection;
1358
+ selection: _platejs_slate15.TSelection;
1359
1359
  }) => void) | null>;
1360
- onTextChange: jotai_x2.SimpleWritableAtom<((options: {
1360
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1361
1361
  editor: PlateEditor;
1362
- node: _platejs_slate19.Descendant;
1363
- operation: _platejs_slate19.TextOperation;
1362
+ node: _platejs_slate15.Descendant;
1363
+ operation: _platejs_slate15.TextOperation;
1364
1364
  prevText: string;
1365
1365
  text: string;
1366
1366
  }) => void) | null>;
1367
- onValueChange: jotai_x2.SimpleWritableAtom<((options: {
1367
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1368
1368
  editor: PlateEditor;
1369
- value: _platejs_slate19.Value;
1369
+ value: _platejs_slate15.Value;
1370
1370
  }) => void) | null>;
1371
- id: jotai_x2.SimpleWritableAtom<string>;
1372
- containerRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1373
- editor: jotai_x2.SimpleWritableAtom<PlateEditor>;
1374
- scrollRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1371
+ id: jotai_x0.SimpleWritableAtom<string>;
1372
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1373
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1374
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1375
1375
  } & {
1376
1376
  trackedEditor: jotai10.Atom<{
1377
1377
  editor: any;
@@ -1385,7 +1385,7 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1385
1385
  value: any;
1386
1386
  version: number | null;
1387
1387
  }>;
1388
- })[K$1] extends jotai10.WritableAtom<infer V, infer A extends unknown[], infer R> ? [V, (...args: A) => R] : never, usePlateLocalStore: jotai_x2.UseStoreApi<PlateStoreState<PlateEditor>, {
1388
+ })[K$1] extends jotai10.WritableAtom<infer V, infer A extends unknown[], infer R> ? [V, (...args: A) => R] : never, usePlateLocalStore: jotai_x0.UseStoreApi<PlateStoreState<PlateEditor>, {
1389
1389
  trackedEditor: jotai10.Atom<{
1390
1390
  editor: any;
1391
1391
  version: number | null;
@@ -1398,52 +1398,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1398
1398
  value: any;
1399
1399
  version: number | null;
1400
1400
  }>;
1401
- }>, usePlateLocalValue: <K$1 extends "renderElement" | "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue", S = (({
1402
- composing: jotai_x2.SimpleWritableAtom<boolean | null>;
1403
- decorate: jotai_x2.SimpleWritableAtom<((options: {
1401
+ }>, usePlateLocalValue: <K$1 extends "decorate" | "renderLeaf" | "renderText" | "editor" | "id" | "onChange" | "renderElement" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue", S = (({
1402
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1403
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1404
1404
  editor: PlateEditor;
1405
- entry: _platejs_slate19.NodeEntry;
1406
- }) => _platejs_slate19.TRange[]) | null>;
1407
- isMounted: jotai_x2.SimpleWritableAtom<boolean | null>;
1408
- primary: jotai_x2.SimpleWritableAtom<boolean | null>;
1409
- readOnly: jotai_x2.SimpleWritableAtom<boolean | null>;
1410
- renderChunk: jotai_x2.SimpleWritableAtom<RenderChunkFn | null>;
1411
- renderElement: jotai_x2.SimpleWritableAtom<RenderElementFn | null>;
1412
- renderLeaf: jotai_x2.SimpleWritableAtom<RenderLeafFn | null>;
1413
- renderText: jotai_x2.SimpleWritableAtom<RenderTextFn | null>;
1414
- versionDecorate: jotai_x2.SimpleWritableAtom<number | null>;
1415
- versionEditor: jotai_x2.SimpleWritableAtom<number | null>;
1416
- versionSelection: jotai_x2.SimpleWritableAtom<number | null>;
1417
- versionValue: jotai_x2.SimpleWritableAtom<number | null>;
1418
- onChange: jotai_x2.SimpleWritableAtom<((options: {
1405
+ entry: _platejs_slate15.NodeEntry;
1406
+ }) => _platejs_slate15.TRange[]) | null>;
1407
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1408
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1409
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1410
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1411
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1412
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1413
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1414
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1415
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1416
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1417
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1418
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1419
1419
  editor: PlateEditor;
1420
- value: _platejs_slate19.Value;
1420
+ value: _platejs_slate15.Value;
1421
1421
  }) => void) | null>;
1422
- onNodeChange: jotai_x2.SimpleWritableAtom<((options: {
1422
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1423
1423
  editor: PlateEditor;
1424
- node: _platejs_slate19.Descendant;
1425
- operation: _platejs_slate19.NodeOperation;
1426
- prevNode: _platejs_slate19.Descendant;
1424
+ node: _platejs_slate15.Descendant;
1425
+ operation: _platejs_slate15.NodeOperation;
1426
+ prevNode: _platejs_slate15.Descendant;
1427
1427
  }) => void) | null>;
1428
- onSelectionChange: jotai_x2.SimpleWritableAtom<((options: {
1428
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1429
1429
  editor: PlateEditor;
1430
- selection: _platejs_slate19.TSelection;
1430
+ selection: _platejs_slate15.TSelection;
1431
1431
  }) => void) | null>;
1432
- onTextChange: jotai_x2.SimpleWritableAtom<((options: {
1432
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1433
1433
  editor: PlateEditor;
1434
- node: _platejs_slate19.Descendant;
1435
- operation: _platejs_slate19.TextOperation;
1434
+ node: _platejs_slate15.Descendant;
1435
+ operation: _platejs_slate15.TextOperation;
1436
1436
  prevText: string;
1437
1437
  text: string;
1438
1438
  }) => void) | null>;
1439
- onValueChange: jotai_x2.SimpleWritableAtom<((options: {
1439
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1440
1440
  editor: PlateEditor;
1441
- value: _platejs_slate19.Value;
1441
+ value: _platejs_slate15.Value;
1442
1442
  }) => void) | null>;
1443
- id: jotai_x2.SimpleWritableAtom<string>;
1444
- containerRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1445
- editor: jotai_x2.SimpleWritableAtom<PlateEditor>;
1446
- scrollRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1443
+ id: jotai_x0.SimpleWritableAtom<string>;
1444
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1445
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1446
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1447
1447
  } & {
1448
1448
  trackedEditor: jotai10.Atom<{
1449
1449
  editor: any;
@@ -1459,51 +1459,51 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1459
1459
  }>;
1460
1460
  })[K$1] extends jotai10.Atom<infer V> ? V : never)>(key: K$1, options?: ({
1461
1461
  selector?: ((v: ({
1462
- composing: jotai_x2.SimpleWritableAtom<boolean | null>;
1463
- decorate: jotai_x2.SimpleWritableAtom<((options: {
1462
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1463
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1464
1464
  editor: PlateEditor;
1465
- entry: _platejs_slate19.NodeEntry;
1466
- }) => _platejs_slate19.TRange[]) | null>;
1467
- isMounted: jotai_x2.SimpleWritableAtom<boolean | null>;
1468
- primary: jotai_x2.SimpleWritableAtom<boolean | null>;
1469
- readOnly: jotai_x2.SimpleWritableAtom<boolean | null>;
1470
- renderChunk: jotai_x2.SimpleWritableAtom<RenderChunkFn | null>;
1471
- renderElement: jotai_x2.SimpleWritableAtom<RenderElementFn | null>;
1472
- renderLeaf: jotai_x2.SimpleWritableAtom<RenderLeafFn | null>;
1473
- renderText: jotai_x2.SimpleWritableAtom<RenderTextFn | null>;
1474
- versionDecorate: jotai_x2.SimpleWritableAtom<number | null>;
1475
- versionEditor: jotai_x2.SimpleWritableAtom<number | null>;
1476
- versionSelection: jotai_x2.SimpleWritableAtom<number | null>;
1477
- versionValue: jotai_x2.SimpleWritableAtom<number | null>;
1478
- onChange: jotai_x2.SimpleWritableAtom<((options: {
1465
+ entry: _platejs_slate15.NodeEntry;
1466
+ }) => _platejs_slate15.TRange[]) | null>;
1467
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1468
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1469
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1470
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1471
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1472
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1473
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1474
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1475
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1476
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1477
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1478
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1479
1479
  editor: PlateEditor;
1480
- value: _platejs_slate19.Value;
1480
+ value: _platejs_slate15.Value;
1481
1481
  }) => void) | null>;
1482
- onNodeChange: jotai_x2.SimpleWritableAtom<((options: {
1482
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1483
1483
  editor: PlateEditor;
1484
- node: _platejs_slate19.Descendant;
1485
- operation: _platejs_slate19.NodeOperation;
1486
- prevNode: _platejs_slate19.Descendant;
1484
+ node: _platejs_slate15.Descendant;
1485
+ operation: _platejs_slate15.NodeOperation;
1486
+ prevNode: _platejs_slate15.Descendant;
1487
1487
  }) => void) | null>;
1488
- onSelectionChange: jotai_x2.SimpleWritableAtom<((options: {
1488
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1489
1489
  editor: PlateEditor;
1490
- selection: _platejs_slate19.TSelection;
1490
+ selection: _platejs_slate15.TSelection;
1491
1491
  }) => void) | null>;
1492
- onTextChange: jotai_x2.SimpleWritableAtom<((options: {
1492
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1493
1493
  editor: PlateEditor;
1494
- node: _platejs_slate19.Descendant;
1495
- operation: _platejs_slate19.TextOperation;
1494
+ node: _platejs_slate15.Descendant;
1495
+ operation: _platejs_slate15.TextOperation;
1496
1496
  prevText: string;
1497
1497
  text: string;
1498
1498
  }) => void) | null>;
1499
- onValueChange: jotai_x2.SimpleWritableAtom<((options: {
1499
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1500
1500
  editor: PlateEditor;
1501
- value: _platejs_slate19.Value;
1501
+ value: _platejs_slate15.Value;
1502
1502
  }) => void) | null>;
1503
- id: jotai_x2.SimpleWritableAtom<string>;
1504
- containerRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1505
- editor: jotai_x2.SimpleWritableAtom<PlateEditor>;
1506
- scrollRef: jotai_x2.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1503
+ id: jotai_x0.SimpleWritableAtom<string>;
1504
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1505
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1506
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1507
1507
  } & {
1508
1508
  trackedEditor: jotai10.Atom<{
1509
1509
  editor: any;
@@ -1519,8 +1519,8 @@ declare const PlateStoreProvider: React$1.FC<jotai_x2.ProviderProps<{
1519
1519
  }>;
1520
1520
  })[K$1] extends jotai10.Atom<infer V_1> ? V_1 : never, prevSelectorOutput?: S | undefined) => S) | undefined;
1521
1521
  equalityFn?: ((prev: S, next: S) => boolean) | undefined;
1522
- } & jotai_x2.UseAtomOptions) | undefined, deps?: unknown[]) => S;
1523
- declare const usePlateStore: (id?: string) => jotai_x2.ReturnOfUseStoreApi<PlateStoreState<PlateEditor>, {
1522
+ } & jotai_x0.UseAtomOptions) | undefined, deps?: unknown[]) => S;
1523
+ declare const usePlateStore: (id?: string) => jotai_x0.ReturnOfUseStoreApi<PlateStoreState<PlateEditor>, {
1524
1524
  trackedEditor: jotai10.Atom<{
1525
1525
  editor: any;
1526
1526
  version: number | null;
@@ -1626,7 +1626,7 @@ declare function useEditorPluginOptions<C extends AnyPluginConfig, U>(editor: Pl
1626
1626
  }): U;
1627
1627
  //#endregion
1628
1628
  //#region src/react/stores/plate-controller/plateControllerStore.d.ts
1629
- declare const PlateController: React$1.FC<jotai_x2.ProviderProps<{
1629
+ declare const PlateController: React$1.FC<jotai_x0.ProviderProps<{
1630
1630
  activeId: string | null;
1631
1631
  editorStores: Record<string, ({
1632
1632
  get: <Value$1>(atom: Atom<Value$1>) => Value$1;
@@ -1668,7 +1668,7 @@ declare const PlateController: React$1.FC<jotai_x2.ProviderProps<{
1668
1668
  dev_restore_atoms: (values: Iterable<readonly [Atom<unknown>, unknown]>) => void;
1669
1669
  }>) | null>;
1670
1670
  primaryEditorIds: string[];
1671
- }>>, plateControllerStore: jotai_x2.StoreApi<{
1671
+ }>>, plateControllerStore: jotai_x0.StoreApi<{
1672
1672
  activeId: jotai10.PrimitiveAtom<string | null> & {
1673
1673
  init: string | null;
1674
1674
  };
@@ -1754,7 +1754,7 @@ declare const PlateController: React$1.FC<jotai_x2.ProviderProps<{
1754
1754
  primaryEditorIds: jotai10.PrimitiveAtom<string[]> & {
1755
1755
  init: string[];
1756
1756
  };
1757
- }, object, "plateController">, _usePlateControllerStore: jotai_x2.UseStoreApi<{
1757
+ }, object, "plateController">, _usePlateControllerStore: jotai_x0.UseStoreApi<{
1758
1758
  activeId: jotai10.PrimitiveAtom<string | null> & {
1759
1759
  init: string | null;
1760
1760
  };
@@ -1956,7 +1956,7 @@ declare const useEditableProps: ({
1956
1956
  * if another node is updated in a way that affects this node's path, this hook
1957
1957
  * will not return the new path.
1958
1958
  */
1959
- declare const useNodePath: (node: TNode) => _platejs_slate19.Path | undefined;
1959
+ declare const useNodePath: (node: TNode) => _platejs_slate15.Path | undefined;
1960
1960
  //#endregion
1961
1961
  //#region src/react/hooks/useSlateProps.d.ts
1962
1962
  type SlateComponentProps = Omit<React$1.ComponentProps<typeof Slate>, 'children'>;
@@ -1971,7 +1971,7 @@ declare const useSlateProps: ({
1971
1971
  }) => PlateSlateProps;
1972
1972
  //#endregion
1973
1973
  //#region src/react/utils/createPlateFallbackEditor.d.ts
1974
- declare const createPlateFallbackEditor: (options?: CreatePlateEditorOptions) => TPlateEditor<_platejs_slate19.Value, PlateCorePlugin>;
1974
+ declare const createPlateFallbackEditor: (options?: CreatePlateEditorOptions) => TPlateEditor<_platejs_slate15.Value, PlateCorePlugin>;
1975
1975
  //#endregion
1976
1976
  //#region src/react/utils/dom-attributes.d.ts
1977
1977
  declare const DOM_HANDLERS: (keyof DOMHandlers)[];
@@ -1,6 +1,6 @@
1
- import { Ht as BaseParagraphPlugin, at as DOMPlugin, cn as createSlatePlugin, lt as ChunkingPlugin, n as withSlate, p as isEditOnly, s as SlateExtensionPlugin, sn as getEditorPlugin$1, tn as getPluginByType, vt as getSlateClass, y as NavigationFeedbackPlugin$1, yt as getPluginNodeProps } from "../withSlate-DsAgt7dN.js";
1
+ import { Ht as BaseParagraphPlugin, at as DOMPlugin, cn as createSlatePlugin, lt as ChunkingPlugin, n as withSlate, p as isEditOnly, s as SlateExtensionPlugin, sn as getEditorPlugin$1, tn as getPluginByType, vt as getSlateClass, y as NavigationFeedbackPlugin$1, yt as getPluginNodeProps } from "../withSlate-Ck8dLhUt.js";
2
2
  import { t as Hotkeys } from "../hotkeys-DI1HPO2Q.js";
3
- import { A as pipeInjectNodeProps, C as createStaticEditor, k as pipeDecorate, s as PlateStatic } from "../static-HrbPXDQ1.js";
3
+ import { A as pipeInjectNodeProps, C as createStaticEditor, k as pipeDecorate, s as PlateStatic } from "../static-DAs0P1Ms.js";
4
4
  import { PathApi, createEditor } from "@platejs/slate";
5
5
  import { isDefined } from "@udecode/utils";
6
6
  import { DefaultPlaceholder, Editable, Slate, useComposing, useFocused, useReadOnly, useSelected, useSlateStatic, withReact } from "slate-react";
@@ -1,2 +1,2 @@
1
- import { $a as SlateHTMLProps, Ba as getSelectedDomNode, Co as SlateRenderLeaf, Do as SlateRenderElement, Eo as pipeRenderElementStatic, Ga as getPluginDataAttributes, Ha as getSelectedDomBlocks, Ia as stripSlateDataAttributes, Ja as ViewPlugin, Ka as createStaticString, La as stripHtmlClassNames, Oo as pluginRenderElementStatic, Qa as SlateElementProps, Ra as pipeDecorate, So as pluginRenderTextStatic, To as pluginRenderLeafStatic, Ua as getRenderNodeStaticProps, Va as getSelectedDomFragment, Wa as getNodeDataAttributes, Xa as getEditorDOMFromHtmlString, Ya as createStaticEditor, Za as SlateElement, _o as LeafStatic, ao as StyledSlateElementProps, bo as SlateRenderText, co as useNodeAttributes, do as SlateRenderLeafProps, eo as SlateLeaf, fo as SlateRenderNodeProps, go as ElementStatic, ho as serializeHtml, io as SlateTextProps, lo as BoxStaticProps, mo as SerializeHtmlOptions, no as SlateNodeProps, oo as StyledSlateLeafProps, po as SlateRenderTextProps, qa as getStaticPlugins, ro as SlateText, so as StyledSlateTextProps, to as SlateLeafProps, uo as SlateRenderElementProps, vo as PlateStatic, wo as pipeRenderLeafStatic, xo as pipeRenderTextStatic, yo as PlateStaticProps, za as isSelectOutside } from "../index-DRweaH9Q";
1
+ import { $a as SlateHTMLProps, Ba as getSelectedDomNode, Co as SlateRenderLeaf, Do as SlateRenderElement, Eo as pipeRenderElementStatic, Ga as getPluginDataAttributes, Ha as getSelectedDomBlocks, Ia as stripSlateDataAttributes, Ja as ViewPlugin, Ka as createStaticString, La as stripHtmlClassNames, Oo as pluginRenderElementStatic, Qa as SlateElementProps, Ra as pipeDecorate, So as pluginRenderTextStatic, To as pluginRenderLeafStatic, Ua as getRenderNodeStaticProps, Va as getSelectedDomFragment, Wa as getNodeDataAttributes, Xa as getEditorDOMFromHtmlString, Ya as createStaticEditor, Za as SlateElement, _o as LeafStatic, ao as StyledSlateElementProps, bo as SlateRenderText, co as useNodeAttributes, do as SlateRenderLeafProps, eo as SlateLeaf, fo as SlateRenderNodeProps, go as ElementStatic, ho as serializeHtml, io as SlateTextProps, lo as BoxStaticProps, mo as SerializeHtmlOptions, no as SlateNodeProps, oo as StyledSlateLeafProps, po as SlateRenderTextProps, qa as getStaticPlugins, ro as SlateText, so as StyledSlateTextProps, to as SlateLeafProps, uo as SlateRenderElementProps, vo as PlateStatic, wo as pipeRenderLeafStatic, xo as pipeRenderTextStatic, yo as PlateStaticProps, za as isSelectOutside } from "../index-BooMghRU";
2
2
  export { BoxStaticProps, ElementStatic, LeafStatic, PlateStatic, PlateStaticProps, SerializeHtmlOptions, SlateElement, SlateElementProps, SlateHTMLProps, SlateLeaf, SlateLeafProps, SlateNodeProps, SlateRenderElement, SlateRenderElementProps, SlateRenderLeaf, SlateRenderLeafProps, SlateRenderNodeProps, SlateRenderText, SlateRenderTextProps, SlateText, SlateTextProps, StyledSlateElementProps, StyledSlateLeafProps, StyledSlateTextProps, ViewPlugin, createStaticEditor, createStaticString, getEditorDOMFromHtmlString, getNodeDataAttributes, getPluginDataAttributes, getRenderNodeStaticProps, getSelectedDomBlocks, getSelectedDomFragment, getSelectedDomNode, getStaticPlugins, isSelectOutside, pipeDecorate, pipeRenderElementStatic, pipeRenderLeafStatic, pipeRenderTextStatic, pluginRenderElementStatic, pluginRenderLeafStatic, pluginRenderTextStatic, serializeHtml, stripHtmlClassNames, stripSlateDataAttributes, useNodeAttributes };
@@ -1,4 +1,4 @@
1
- import "../withSlate-DsAgt7dN.js";
2
- import { C as createStaticEditor, D as getSelectedDomNode, E as isSelectOutside, O as getSelectedDomFragment, S as useNodeAttributes, T as ViewPlugin, _ as getPluginDataAttributes, a as ElementStatic, b as SlateLeaf, c as pipeRenderTextStatic, d as pluginRenderElementStatic, f as stripSlateDataAttributes, g as getNodeDataAttributes, h as getRenderNodeStaticProps, i as pluginRenderLeafStatic, k as pipeDecorate, l as pluginRenderTextStatic, m as getSelectedDomBlocks, n as serializeHtml, o as LeafStatic, p as stripHtmlClassNames, r as pipeRenderLeafStatic, s as PlateStatic, t as getEditorDOMFromHtmlString, u as pipeRenderElementStatic, v as createStaticString, w as getStaticPlugins, x as SlateText, y as SlateElement } from "../static-HrbPXDQ1.js";
1
+ import "../withSlate-Ck8dLhUt.js";
2
+ import { C as createStaticEditor, D as getSelectedDomNode, E as isSelectOutside, O as getSelectedDomFragment, S as useNodeAttributes, T as ViewPlugin, _ as getPluginDataAttributes, a as ElementStatic, b as SlateLeaf, c as pipeRenderTextStatic, d as pluginRenderElementStatic, f as stripSlateDataAttributes, g as getNodeDataAttributes, h as getRenderNodeStaticProps, i as pluginRenderLeafStatic, k as pipeDecorate, l as pluginRenderTextStatic, m as getSelectedDomBlocks, n as serializeHtml, o as LeafStatic, p as stripHtmlClassNames, r as pipeRenderLeafStatic, s as PlateStatic, t as getEditorDOMFromHtmlString, u as pipeRenderElementStatic, v as createStaticString, w as getStaticPlugins, x as SlateText, y as SlateElement } from "../static-DAs0P1Ms.js";
3
3
 
4
4
  export { ElementStatic, LeafStatic, PlateStatic, SlateElement, SlateLeaf, SlateText, ViewPlugin, createStaticEditor, createStaticString, getEditorDOMFromHtmlString, getNodeDataAttributes, getPluginDataAttributes, getRenderNodeStaticProps, getSelectedDomBlocks, getSelectedDomFragment, getSelectedDomNode, getStaticPlugins, isSelectOutside, pipeDecorate, pipeRenderElementStatic, pipeRenderLeafStatic, pipeRenderTextStatic, pluginRenderElementStatic, pluginRenderLeafStatic, pluginRenderTextStatic, serializeHtml, stripHtmlClassNames, stripSlateDataAttributes, useNodeAttributes };
@@ -1,4 +1,4 @@
1
- import { Ct as getInjectMatch, at as DOMPlugin, n as withSlate, p as isEditOnly, sn as getEditorPlugin, tn as getPluginByType, vt as getSlateClass, xt as keyToDataAttribute, yt as getPluginNodeProps } from "./withSlate-DsAgt7dN.js";
1
+ import { Ct as getInjectMatch, at as DOMPlugin, n as withSlate, p as isEditOnly, sn as getEditorPlugin, tn as getPluginByType, vt as getSlateClass, xt as keyToDataAttribute, yt as getPluginNodeProps } from "./withSlate-Ck8dLhUt.js";
2
2
  import { ElementApi, NodeApi, RangeApi, TextApi, createEditor, isElementDecorationsEqual, isTextDecorationsEqual } from "@platejs/slate";
3
3
  import { isDefined } from "@udecode/utils";
4
4
  import React from "react";
@@ -308,11 +308,10 @@ const resolvePlugin = (editor, _plugin) => {
308
308
  let plugin = mergePlugins({}, _plugin);
309
309
  plugin.__resolved = true;
310
310
  if (plugin.__configuration) {
311
- const configResult = plugin.__configuration(getEditorPlugin(editor, plugin));
312
- if (configResult.inputRules !== void 0) {
313
- const normalizedInputRules = normalizeConfiguredInputRules(configResult.inputRules);
311
+ const { inputRules: configInputRules, ...configResult } = plugin.__configuration(getEditorPlugin(editor, plugin));
312
+ if (configInputRules !== void 0) {
313
+ const normalizedInputRules = normalizeConfiguredInputRules(configInputRules);
314
314
  plugin.__configuredInputRules = [...normalizeConfiguredInputRules(plugin.__configuredInputRules), ...normalizedInputRules];
315
- configResult.inputRules = void 0;
316
315
  }
317
316
  plugin = mergePlugins(plugin, configResult);
318
317
  plugin.__configuration = void 0;
@@ -629,12 +628,10 @@ const matchDelimitedInline = (context, { boundaryRe, close, followRe, open, requ
629
628
  };
630
629
  };
631
630
  const getTextSubstitutionMatchRange = ({ match, trigger }) => {
632
- const start = match;
633
- const reversed = start.split("").reverse().join("");
634
- const triggers = trigger ? Array.isArray(trigger) ? [...trigger] : [trigger] : [reversed.slice(-1)];
631
+ const triggers = trigger ? Array.isArray(trigger) ? [...trigger] : [trigger] : [match.slice(-1)];
635
632
  return {
636
- end: trigger ? reversed : reversed.slice(0, -1),
637
- start,
633
+ end: trigger ? match : match.slice(0, -1),
634
+ start: match,
638
635
  triggers
639
636
  };
640
637
  };
@@ -668,33 +665,46 @@ const getTextSubstitutionMatchPoints = (editor, { end, start }) => {
668
665
  beforeStartMatchPoint
669
666
  };
670
667
  };
671
- const getTextSubstitutionTriggers = (patterns) => Array.from(new Set(patterns.flatMap((pattern) => {
672
- return (Array.isArray(pattern.match) ? [...pattern.match] : [pattern.match]).flatMap((match) => getTextSubstitutionMatchRange({
673
- match,
674
- trigger: pattern.trigger
675
- }).triggers);
676
- })));
677
- const resolveTextSubstitution = ({ editor, patterns, text }) => {
668
+ const compilePatternsByTrigger = (patterns) => {
669
+ const byTrigger = /* @__PURE__ */ new Map();
678
670
  for (const pattern of patterns) {
679
- const matches = Array.isArray(pattern.match) ? [...pattern.match] : [pattern.match];
671
+ const matches = Array.isArray(pattern.match) ? pattern.match : [pattern.match];
672
+ const isPaired = Array.isArray(pattern.format);
680
673
  for (const match of matches) {
681
674
  const { end, start, triggers } = getTextSubstitutionMatchRange({
682
675
  match,
683
676
  trigger: pattern.trigger
684
677
  });
685
- if (!triggers.includes(text)) continue;
686
- const points = getTextSubstitutionMatchPoints(editor, {
687
- end: Array.isArray(pattern.format) ? "" : end,
688
- start
689
- });
690
- if (!points) continue;
691
- return {
692
- end: Array.isArray(pattern.format) ? "" : end,
678
+ const compiled = {
679
+ end: isPaired ? "" : end,
693
680
  pattern,
694
- points
681
+ start: isPaired ? start : ""
695
682
  };
683
+ for (const trigger of triggers) {
684
+ let list = byTrigger.get(trigger);
685
+ if (!list) {
686
+ list = [];
687
+ byTrigger.set(trigger, list);
688
+ }
689
+ list.push(compiled);
690
+ }
696
691
  }
697
692
  }
693
+ return byTrigger;
694
+ };
695
+ const resolveTextSubstitution = ({ candidates, editor }) => {
696
+ for (const { end, pattern, start } of candidates) {
697
+ const points = getTextSubstitutionMatchPoints(editor, {
698
+ end,
699
+ start
700
+ });
701
+ if (!points) continue;
702
+ return {
703
+ end,
704
+ pattern,
705
+ points
706
+ };
707
+ }
698
708
  };
699
709
  const applyTextSubstitution = (editor, match) => {
700
710
  const selection = editor.selection;
@@ -715,21 +725,25 @@ const applyTextSubstitution = (editor, match) => {
715
725
  }
716
726
  return true;
717
727
  };
718
- const createTextSubstitutionInputRule = ({ enabled, patterns, priority }) => defineInputRule({
719
- enabled,
720
- priority,
721
- target: "insertText",
722
- trigger: getTextSubstitutionTriggers(patterns),
723
- resolve: ({ editor, text }) => {
724
- if (!editor.selection || !editor.api.isCollapsed()) return;
725
- return resolveTextSubstitution({
726
- editor,
727
- patterns,
728
- text
729
- });
730
- },
731
- apply: ({ editor }, match) => applyTextSubstitution(editor, match)
732
- });
728
+ const createTextSubstitutionInputRule = ({ enabled, patterns, priority }) => {
729
+ const patternsByTrigger = compilePatternsByTrigger(patterns);
730
+ return defineInputRule({
731
+ enabled,
732
+ priority,
733
+ target: "insertText",
734
+ trigger: Array.from(patternsByTrigger.keys()),
735
+ resolve: ({ editor, text }) => {
736
+ if (!editor.selection || !editor.api.isCollapsed()) return;
737
+ const candidates = patternsByTrigger.get(text);
738
+ if (!candidates) return;
739
+ return resolveTextSubstitution({
740
+ candidates,
741
+ editor
742
+ });
743
+ },
744
+ apply: ({ editor }, match) => applyTextSubstitution(editor, match)
745
+ });
746
+ };
733
747
 
734
748
  //#endregion
735
749
  //#region src/lib/plugins/input-rules/internal/createInputRuleBuilder.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lofcz/platejs-core",
3
- "version": "53.1.1",
3
+ "version": "53.1.6",
4
4
  "description": "The core of Plate – a plugin system for slate",
5
5
  "keywords": [
6
6
  "contentEditable",