@lofcz/platejs-core 53.2.4 → 53.4.3

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.
@@ -3105,7 +3105,7 @@ declare const normalizeDescendantsToDocumentFragment: (editor: SlateEditor, {
3105
3105
  }) => Descendant[];
3106
3106
  //#endregion
3107
3107
  //#region src/lib/utils/omitPluginContext.d.ts
3108
- declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "editor" | "api" | "plugin" | "setOptions" | "tf" | "type" | "getOption" | "getOptions" | "setOption">;
3108
+ declare const omitPluginContext: <T extends SlatePluginContext<AnySlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "plugin" | "getOptions" | "type" | "getOption" | "tf" | "setOptions" | "setOption">;
3109
3109
  //#endregion
3110
3110
  //#region src/lib/utils/overridePluginsByKey.d.ts
3111
3111
  /**
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
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-fS5ruWhD";
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-BhmRdj7M";
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, 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,4 +1,4 @@
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-DNmYXPLn.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-B-XNrpsk.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,5 +1,5 @@
1
- import { Ct as NodeComponents, Et as PluginConfig, F as RenderLeafProps, I as RenderElementFn, Ii as ExtendEditor$1, J as BaseEditor, Jr as NavigationFeedbackConfig, L as RenderElementProps, M as RenderTextFn, Mi as AnySlatePlugin, Mo as HandlerReturnType, N as RenderTextProps, Ot as WithAnyKey, P as RenderLeafFn, Pa as ResolvedInputRulesMeta, Q as SlateEditor, Qa as createStaticEditor, R as RenderChunkFn, So as PlateStaticProps, St as NodeComponent, Tt as ParserOptions, U as BaseWithSlateOptions, Y as InferPlugins, _t as InferOptions, ai as WithAutoScrollOptions, at as BasePluginContext, ba as InputRulesConfig, bt as MatchRules, ct as BaseTransformOptions, et as AnyPluginConfig, fi as LiftBlockOptions, gi as InitOptions, gt as InferKey, hr as CorePluginTransforms, ht as InferApi, ia as SlatePluginContext, ii as ScrollMode, it as BasePlugin, j as EditableProps, kt as WithRequiredKey, mi as InsertExitBreakOptions, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, na as SlatePlugin, nt as BaseHtmlDeserializer, pr as CorePlugin, pt as GetInjectNodePropsOptions, qr as NavigationFeedbackActiveTarget, ra as SlatePluginConfig, ri as DomConfig, rt as BaseInjectProps, st as BaseSerializer, ti as AutoScrollOperationsMap, tt as BaseDeserializer, vt as InferSelectors, xa as InputRulesDefinition, yt as InferTransforms, z as RenderChunkProps } from "../index-fS5ruWhD";
2
- import * as _platejs_slate20 from "@platejs/slate";
1
+ import { Ct as NodeComponents, Et as PluginConfig, F as RenderLeafProps, I as RenderElementFn, Ii as ExtendEditor$1, J as BaseEditor, Jr as NavigationFeedbackConfig, L as RenderElementProps, M as RenderTextFn, Mi as AnySlatePlugin, Mo as HandlerReturnType, N as RenderTextProps, Ot as WithAnyKey, P as RenderLeafFn, Pa as ResolvedInputRulesMeta, Q as SlateEditor, Qa as createStaticEditor, R as RenderChunkFn, So as PlateStaticProps, St as NodeComponent, Tt as ParserOptions, U as BaseWithSlateOptions, Y as InferPlugins, _t as InferOptions, ai as WithAutoScrollOptions, at as BasePluginContext, ba as InputRulesConfig, bt as MatchRules, ct as BaseTransformOptions, et as AnyPluginConfig, fi as LiftBlockOptions, gi as InitOptions, gt as InferKey, hr as CorePluginTransforms, ht as InferApi, ia as SlatePluginContext, ii as ScrollMode, it as BasePlugin, j as EditableProps, kt as WithRequiredKey, mi as InsertExitBreakOptions, mr as CorePluginApi, mt as GetInjectNodePropsReturnType, na as SlatePlugin, nt as BaseHtmlDeserializer, pr as CorePlugin, pt as GetInjectNodePropsOptions, qr as NavigationFeedbackActiveTarget, ra as SlatePluginConfig, ri as DomConfig, rt as BaseInjectProps, st as BaseSerializer, ti as AutoScrollOperationsMap, tt as BaseDeserializer, vt as InferSelectors, xa as InputRulesDefinition, yt as InferTransforms, z as RenderChunkProps } from "../index-BhmRdj7M";
2
+ import * as _platejs_slate4 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";
@@ -7,7 +7,7 @@ import React$1, { DependencyList, HTMLAttributes } from "react";
7
7
  import { HotkeysEvent, HotkeysOptions, Keys } from "@udecode/react-hotkeys";
8
8
  import * as jotai10 from "jotai";
9
9
  import { Atom, atom } from "jotai";
10
- import * as jotai_x98 from "jotai-x";
10
+ import * as jotai_x0 from "jotai-x";
11
11
  import { JotaiStore, createAtomStore, useStoreAtomState, useStoreAtomValue, useStoreSetAtom } from "jotai-x";
12
12
  import * as zustand_x0 from "zustand-x";
13
13
  import { TCreatedStoreType, TEqualityChecker, createZustandStore, useStoreSelect, useStoreState, useStoreValue, useTracked, useTrackedStore } from "zustand-x";
@@ -17,32 +17,32 @@ import { createStore } from "jotai/vanilla";
17
17
  declare const SlateReactExtensionPlugin: PlatePlugin<PluginConfig<"slateExtension", {
18
18
  onNodeChange: (options: {
19
19
  editor: SlateEditor;
20
- node: _platejs_slate20.Descendant;
21
- operation: _platejs_slate20.NodeOperation;
22
- prevNode: _platejs_slate20.Descendant;
20
+ node: _platejs_slate4.Descendant;
21
+ operation: _platejs_slate4.NodeOperation;
22
+ prevNode: _platejs_slate4.Descendant;
23
23
  }) => void;
24
24
  onTextChange: (options: {
25
25
  editor: SlateEditor;
26
- node: _platejs_slate20.Descendant;
27
- operation: _platejs_slate20.TextOperation;
26
+ node: _platejs_slate4.Descendant;
27
+ operation: _platejs_slate4.TextOperation;
28
28
  prevText: string;
29
29
  text: string;
30
30
  }) => void;
31
31
  }, {
32
32
  redecorate: (() => void) & (() => void);
33
- isElementStateEmpty: (element: _platejs_slate20.TElement) => boolean;
33
+ isElementStateEmpty: (element: _platejs_slate4.TElement) => boolean;
34
34
  }, {
35
- reset: (options: _platejs_slate20.ResetOptions | undefined) => void;
35
+ reset: (options: _platejs_slate4.ResetOptions | undefined) => void;
36
36
  init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
37
37
  insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
38
38
  liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
39
39
  resetBlock: ((args_0?: {
40
- at?: _platejs_slate20.Path;
40
+ at?: _platejs_slate4.Path;
41
41
  } | undefined) => true | undefined) & ((args_0?: {
42
- at?: _platejs_slate20.Path;
42
+ at?: _platejs_slate4.Path;
43
43
  } | undefined) => true | undefined);
44
- setValue: ((value?: string | _platejs_slate20.Value | undefined) => void) & ((value?: string | _platejs_slate20.Value | undefined) => void);
45
- apply: <N$1 extends _platejs_slate20.TElement | _platejs_slate20.TText>(operation: _platejs_slate20.Operation<N$1>) => void;
44
+ setValue: ((value?: string | _platejs_slate4.Value | undefined) => void) & ((value?: string | _platejs_slate4.Value | undefined) => void);
45
+ apply: <N$1 extends _platejs_slate4.TElement | _platejs_slate4.TText>(operation: _platejs_slate4.Operation<N$1>) => void;
46
46
  }, {}>>;
47
47
  //#endregion
48
48
  //#region src/react/plugins/event-editor/EventEditorPlugin.d.ts
@@ -102,7 +102,7 @@ declare const ParagraphPlugin: PlatePlugin<PluginConfig<"p", {}, {}, {}, {}>>;
102
102
  declare const ReactPlugin: PlatePlugin<PluginConfig<"dom", {
103
103
  scrollMode?: ScrollMode;
104
104
  scrollOperations?: AutoScrollOperationsMap;
105
- scrollOptions?: _platejs_slate20.ScrollIntoViewOptions;
105
+ scrollOptions?: _platejs_slate4.ScrollIntoViewOptions;
106
106
  }, {
107
107
  isScrolling: () => boolean;
108
108
  }, {
@@ -819,36 +819,36 @@ declare const getPlateCorePlugins: ({
819
819
  }) => (PlatePlugin<PluginConfig<"eventEditor", {}, {}, {}, {}>> | PlatePlugin<PluginConfig<"slateExtension", {
820
820
  onNodeChange: (options: {
821
821
  editor: SlateEditor;
822
- node: _platejs_slate20.Descendant;
823
- operation: _platejs_slate20.NodeOperation;
824
- prevNode: _platejs_slate20.Descendant;
822
+ node: _platejs_slate4.Descendant;
823
+ operation: _platejs_slate4.NodeOperation;
824
+ prevNode: _platejs_slate4.Descendant;
825
825
  }) => void;
826
826
  onTextChange: (options: {
827
827
  editor: SlateEditor;
828
- node: _platejs_slate20.Descendant;
829
- operation: _platejs_slate20.TextOperation;
828
+ node: _platejs_slate4.Descendant;
829
+ operation: _platejs_slate4.TextOperation;
830
830
  prevText: string;
831
831
  text: string;
832
832
  }) => void;
833
833
  }, {
834
834
  redecorate: (() => void) & (() => void);
835
- isElementStateEmpty: (element: _platejs_slate20.TElement) => boolean;
835
+ isElementStateEmpty: (element: _platejs_slate4.TElement) => boolean;
836
836
  }, {
837
- reset: (options: _platejs_slate20.ResetOptions | undefined) => void;
837
+ reset: (options: _platejs_slate4.ResetOptions | undefined) => void;
838
838
  init: ((args_0: InitOptions) => void) & ((args_0: InitOptions) => void);
839
839
  insertExitBreak: ((args_0?: InsertExitBreakOptions | undefined) => true | undefined) & ((args_0?: InsertExitBreakOptions | undefined) => true | undefined);
840
840
  liftBlock: ((args_0?: LiftBlockOptions | undefined) => true | undefined) & ((args_0?: LiftBlockOptions | undefined) => true | undefined);
841
841
  resetBlock: ((args_0?: {
842
- at?: _platejs_slate20.Path;
842
+ at?: _platejs_slate4.Path;
843
843
  } | undefined) => true | undefined) & ((args_0?: {
844
- at?: _platejs_slate20.Path;
844
+ at?: _platejs_slate4.Path;
845
845
  } | undefined) => true | undefined);
846
- setValue: ((value?: string | _platejs_slate20.Value | undefined) => void) & ((value?: string | _platejs_slate20.Value | undefined) => void);
847
- apply: <N$1 extends _platejs_slate20.TElement | _platejs_slate20.TText>(operation: _platejs_slate20.Operation<N$1>) => void;
846
+ setValue: ((value?: string | _platejs_slate4.Value | undefined) => void) & ((value?: string | _platejs_slate4.Value | undefined) => void);
847
+ apply: <N$1 extends _platejs_slate4.TElement | _platejs_slate4.TText>(operation: _platejs_slate4.Operation<N$1>) => void;
848
848
  }, {}>> | PlatePlugin<PluginConfig<"dom", {
849
849
  scrollMode?: ScrollMode;
850
850
  scrollOperations?: AutoScrollOperationsMap;
851
- scrollOptions?: _platejs_slate20.ScrollIntoViewOptions;
851
+ scrollOptions?: _platejs_slate4.ScrollIntoViewOptions;
852
852
  }, {
853
853
  isScrolling: () => boolean;
854
854
  }, {
@@ -918,7 +918,7 @@ declare function getPlugin<C extends AnyPluginConfig = PluginConfig>(editor: Pla
918
918
  } ? C : PlatePlugin<C>;
919
919
  //#endregion
920
920
  //#region src/react/plugin/omitPluginContext.d.ts
921
- declare const omitPluginContext: <T extends PlatePluginContext<AnyPlatePlugin>>(ctx: T) => Omit<T, "editor" | "api" | "plugin" | "setOptions" | "tf" | "type" | "getOption" | "getOptions" | "setOption">;
921
+ declare const omitPluginContext: <T extends PlatePluginContext<AnyPlatePlugin>>(ctx: T) => Omit<T, "api" | "editor" | "plugin" | "getOptions" | "type" | "getOption" | "tf" | "setOptions" | "setOption">;
922
922
  //#endregion
923
923
  //#region src/react/plugin/toPlatePlugin.d.ts
924
924
  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'> & {
@@ -1094,11 +1094,11 @@ type ElementRuntimeStore = {
1094
1094
  setState: (nextState: ElementRuntimeState) => void;
1095
1095
  subscribe: (listener: () => void) => () => void;
1096
1096
  };
1097
- declare const elementStore: jotai_x98.StoreApi<ElementStoreState, object, "element">;
1097
+ declare const elementStore: jotai_x0.StoreApi<ElementStoreState, object, "element">;
1098
1098
  declare const withElementContext: <T>(context: Omit<ElementContextValue, "parent">, callback: () => T) => T;
1099
1099
  declare const useElementContext: (scope?: string) => ElementContextValue | null;
1100
1100
  declare const useElementStoreContext: (scope?: string) => ElementStoreContextValue | null;
1101
- declare const useElementStore: (scope?: string) => jotai_x98.ReturnOfUseStoreApi<ElementStoreState, object>;
1101
+ declare const useElementStore: (scope?: string) => jotai_x0.ReturnOfUseStoreApi<ElementStoreState, object>;
1102
1102
  declare function ElementProvider({
1103
1103
  children,
1104
1104
  path,
@@ -1232,7 +1232,7 @@ declare const createPlateStore: <E extends PlateEditor = PlateEditor>({
1232
1232
  onTextChange,
1233
1233
  onValueChange,
1234
1234
  ...state
1235
- }?: Partial<PlateStoreState<E>>) => jotai_x98.AtomStoreApi<PlateStoreState<E>, {
1235
+ }?: Partial<PlateStoreState<E>>) => jotai_x0.AtomStoreApi<PlateStoreState<E>, {
1236
1236
  trackedEditor: jotai10.Atom<{
1237
1237
  editor: any;
1238
1238
  version: number | null;
@@ -1246,12 +1246,12 @@ declare const createPlateStore: <E extends PlateEditor = PlateEditor>({
1246
1246
  version: number | null;
1247
1247
  }>;
1248
1248
  }, "plate">;
1249
- declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1249
+ declare const PlateStoreProvider: React$1.FC<jotai_x0.ProviderProps<{
1250
1250
  composing: boolean | null;
1251
1251
  decorate: ((options: {
1252
1252
  editor: PlateEditor;
1253
- entry: _platejs_slate20.NodeEntry;
1254
- }) => _platejs_slate20.TRange[]) | null;
1253
+ entry: _platejs_slate4.NodeEntry;
1254
+ }) => _platejs_slate4.TRange[]) | null;
1255
1255
  isMounted: boolean | null;
1256
1256
  primary: boolean | null;
1257
1257
  readOnly: boolean | null;
@@ -1265,34 +1265,34 @@ declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1265
1265
  versionValue: number | null;
1266
1266
  onChange: ((options: {
1267
1267
  editor: PlateEditor;
1268
- value: _platejs_slate20.Value;
1268
+ value: _platejs_slate4.Value;
1269
1269
  }) => void) | null;
1270
1270
  onNodeChange: ((options: {
1271
1271
  editor: PlateEditor;
1272
- node: _platejs_slate20.Descendant;
1273
- operation: _platejs_slate20.NodeOperation;
1274
- prevNode: _platejs_slate20.Descendant;
1272
+ node: _platejs_slate4.Descendant;
1273
+ operation: _platejs_slate4.NodeOperation;
1274
+ prevNode: _platejs_slate4.Descendant;
1275
1275
  }) => void) | null;
1276
1276
  onSelectionChange: ((options: {
1277
1277
  editor: PlateEditor;
1278
- selection: _platejs_slate20.TSelection;
1278
+ selection: _platejs_slate4.TSelection;
1279
1279
  }) => void) | null;
1280
1280
  onTextChange: ((options: {
1281
1281
  editor: PlateEditor;
1282
- node: _platejs_slate20.Descendant;
1283
- operation: _platejs_slate20.TextOperation;
1282
+ node: _platejs_slate4.Descendant;
1283
+ operation: _platejs_slate4.TextOperation;
1284
1284
  prevText: string;
1285
1285
  text: string;
1286
1286
  }) => void) | null;
1287
1287
  onValueChange: ((options: {
1288
1288
  editor: PlateEditor;
1289
- value: _platejs_slate20.Value;
1289
+ value: _platejs_slate4.Value;
1290
1290
  }) => void) | null;
1291
1291
  id: string;
1292
1292
  containerRef: React$1.RefObject<HTMLDivElement | null>;
1293
1293
  editor: PlateEditor;
1294
1294
  scrollRef: React$1.RefObject<HTMLDivElement | null>;
1295
- }>>, plateStore: jotai_x98.StoreApi<PlateStoreState<PlateEditor>, {
1295
+ }>>, plateStore: jotai_x0.StoreApi<PlateStoreState<PlateEditor>, {
1296
1296
  trackedEditor: jotai10.Atom<{
1297
1297
  editor: any;
1298
1298
  version: number | null;
@@ -1305,52 +1305,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1305
1305
  value: any;
1306
1306
  version: number | null;
1307
1307
  }>;
1308
- }, "plate">, usePlateLocalSet: <K$1 extends "editor" | "id" | "onChange" | "decorate" | "renderElement" | "renderText" | "renderLeaf" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x98.UseAtomOptions) => ({
1309
- composing: jotai_x98.SimpleWritableAtom<boolean | null>;
1310
- decorate: jotai_x98.SimpleWritableAtom<((options: {
1308
+ }, "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_x0.UseAtomOptions) => ({
1309
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1310
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1311
1311
  editor: PlateEditor;
1312
- entry: _platejs_slate20.NodeEntry;
1313
- }) => _platejs_slate20.TRange[]) | null>;
1314
- isMounted: jotai_x98.SimpleWritableAtom<boolean | null>;
1315
- primary: jotai_x98.SimpleWritableAtom<boolean | null>;
1316
- readOnly: jotai_x98.SimpleWritableAtom<boolean | null>;
1317
- renderChunk: jotai_x98.SimpleWritableAtom<RenderChunkFn | null>;
1318
- renderElement: jotai_x98.SimpleWritableAtom<RenderElementFn | null>;
1319
- renderLeaf: jotai_x98.SimpleWritableAtom<RenderLeafFn | null>;
1320
- renderText: jotai_x98.SimpleWritableAtom<RenderTextFn | null>;
1321
- versionDecorate: jotai_x98.SimpleWritableAtom<number | null>;
1322
- versionEditor: jotai_x98.SimpleWritableAtom<number | null>;
1323
- versionSelection: jotai_x98.SimpleWritableAtom<number | null>;
1324
- versionValue: jotai_x98.SimpleWritableAtom<number | null>;
1325
- onChange: jotai_x98.SimpleWritableAtom<((options: {
1312
+ entry: _platejs_slate4.NodeEntry;
1313
+ }) => _platejs_slate4.TRange[]) | null>;
1314
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1315
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1316
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1317
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1318
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1319
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1320
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1321
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1322
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1323
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1324
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1325
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1326
1326
  editor: PlateEditor;
1327
- value: _platejs_slate20.Value;
1327
+ value: _platejs_slate4.Value;
1328
1328
  }) => void) | null>;
1329
- onNodeChange: jotai_x98.SimpleWritableAtom<((options: {
1329
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1330
1330
  editor: PlateEditor;
1331
- node: _platejs_slate20.Descendant;
1332
- operation: _platejs_slate20.NodeOperation;
1333
- prevNode: _platejs_slate20.Descendant;
1331
+ node: _platejs_slate4.Descendant;
1332
+ operation: _platejs_slate4.NodeOperation;
1333
+ prevNode: _platejs_slate4.Descendant;
1334
1334
  }) => void) | null>;
1335
- onSelectionChange: jotai_x98.SimpleWritableAtom<((options: {
1335
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1336
1336
  editor: PlateEditor;
1337
- selection: _platejs_slate20.TSelection;
1337
+ selection: _platejs_slate4.TSelection;
1338
1338
  }) => void) | null>;
1339
- onTextChange: jotai_x98.SimpleWritableAtom<((options: {
1339
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1340
1340
  editor: PlateEditor;
1341
- node: _platejs_slate20.Descendant;
1342
- operation: _platejs_slate20.TextOperation;
1341
+ node: _platejs_slate4.Descendant;
1342
+ operation: _platejs_slate4.TextOperation;
1343
1343
  prevText: string;
1344
1344
  text: string;
1345
1345
  }) => void) | null>;
1346
- onValueChange: jotai_x98.SimpleWritableAtom<((options: {
1346
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1347
1347
  editor: PlateEditor;
1348
- value: _platejs_slate20.Value;
1348
+ value: _platejs_slate4.Value;
1349
1349
  }) => void) | null>;
1350
- id: jotai_x98.SimpleWritableAtom<string>;
1351
- containerRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1352
- editor: jotai_x98.SimpleWritableAtom<PlateEditor>;
1353
- scrollRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1350
+ id: jotai_x0.SimpleWritableAtom<string>;
1351
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1352
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1353
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1354
1354
  } & {
1355
1355
  trackedEditor: jotai10.Atom<{
1356
1356
  editor: any;
@@ -1364,52 +1364,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1364
1364
  value: any;
1365
1365
  version: number | null;
1366
1366
  }>;
1367
- })[K$1] extends jotai10.WritableAtom<infer _V, infer A extends unknown[], infer R> ? (...args: A) => R : never, usePlateLocalState: <K$1 extends "editor" | "id" | "onChange" | "decorate" | "renderElement" | "renderText" | "renderLeaf" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue">(key: K$1, options?: string | jotai_x98.UseAtomOptions) => ({
1368
- composing: jotai_x98.SimpleWritableAtom<boolean | null>;
1369
- decorate: jotai_x98.SimpleWritableAtom<((options: {
1367
+ })[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_x0.UseAtomOptions) => ({
1368
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1369
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1370
1370
  editor: PlateEditor;
1371
- entry: _platejs_slate20.NodeEntry;
1372
- }) => _platejs_slate20.TRange[]) | null>;
1373
- isMounted: jotai_x98.SimpleWritableAtom<boolean | null>;
1374
- primary: jotai_x98.SimpleWritableAtom<boolean | null>;
1375
- readOnly: jotai_x98.SimpleWritableAtom<boolean | null>;
1376
- renderChunk: jotai_x98.SimpleWritableAtom<RenderChunkFn | null>;
1377
- renderElement: jotai_x98.SimpleWritableAtom<RenderElementFn | null>;
1378
- renderLeaf: jotai_x98.SimpleWritableAtom<RenderLeafFn | null>;
1379
- renderText: jotai_x98.SimpleWritableAtom<RenderTextFn | null>;
1380
- versionDecorate: jotai_x98.SimpleWritableAtom<number | null>;
1381
- versionEditor: jotai_x98.SimpleWritableAtom<number | null>;
1382
- versionSelection: jotai_x98.SimpleWritableAtom<number | null>;
1383
- versionValue: jotai_x98.SimpleWritableAtom<number | null>;
1384
- onChange: jotai_x98.SimpleWritableAtom<((options: {
1371
+ entry: _platejs_slate4.NodeEntry;
1372
+ }) => _platejs_slate4.TRange[]) | null>;
1373
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1374
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1375
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1376
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1377
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1378
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1379
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1380
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1381
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1382
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1383
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1384
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1385
1385
  editor: PlateEditor;
1386
- value: _platejs_slate20.Value;
1386
+ value: _platejs_slate4.Value;
1387
1387
  }) => void) | null>;
1388
- onNodeChange: jotai_x98.SimpleWritableAtom<((options: {
1388
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1389
1389
  editor: PlateEditor;
1390
- node: _platejs_slate20.Descendant;
1391
- operation: _platejs_slate20.NodeOperation;
1392
- prevNode: _platejs_slate20.Descendant;
1390
+ node: _platejs_slate4.Descendant;
1391
+ operation: _platejs_slate4.NodeOperation;
1392
+ prevNode: _platejs_slate4.Descendant;
1393
1393
  }) => void) | null>;
1394
- onSelectionChange: jotai_x98.SimpleWritableAtom<((options: {
1394
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1395
1395
  editor: PlateEditor;
1396
- selection: _platejs_slate20.TSelection;
1396
+ selection: _platejs_slate4.TSelection;
1397
1397
  }) => void) | null>;
1398
- onTextChange: jotai_x98.SimpleWritableAtom<((options: {
1398
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1399
1399
  editor: PlateEditor;
1400
- node: _platejs_slate20.Descendant;
1401
- operation: _platejs_slate20.TextOperation;
1400
+ node: _platejs_slate4.Descendant;
1401
+ operation: _platejs_slate4.TextOperation;
1402
1402
  prevText: string;
1403
1403
  text: string;
1404
1404
  }) => void) | null>;
1405
- onValueChange: jotai_x98.SimpleWritableAtom<((options: {
1405
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1406
1406
  editor: PlateEditor;
1407
- value: _platejs_slate20.Value;
1407
+ value: _platejs_slate4.Value;
1408
1408
  }) => void) | null>;
1409
- id: jotai_x98.SimpleWritableAtom<string>;
1410
- containerRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1411
- editor: jotai_x98.SimpleWritableAtom<PlateEditor>;
1412
- scrollRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1409
+ id: jotai_x0.SimpleWritableAtom<string>;
1410
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1411
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1412
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1413
1413
  } & {
1414
1414
  trackedEditor: jotai10.Atom<{
1415
1415
  editor: any;
@@ -1423,7 +1423,7 @@ declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1423
1423
  value: any;
1424
1424
  version: number | null;
1425
1425
  }>;
1426
- })[K$1] extends jotai10.WritableAtom<infer V, infer A extends unknown[], infer R> ? [V, (...args: A) => R] : never, usePlateLocalStore: jotai_x98.UseStoreApi<PlateStoreState<PlateEditor>, {
1426
+ })[K$1] extends jotai10.WritableAtom<infer V, infer A extends unknown[], infer R> ? [V, (...args: A) => R] : never, usePlateLocalStore: jotai_x0.UseStoreApi<PlateStoreState<PlateEditor>, {
1427
1427
  trackedEditor: jotai10.Atom<{
1428
1428
  editor: any;
1429
1429
  version: number | null;
@@ -1436,52 +1436,52 @@ declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1436
1436
  value: any;
1437
1437
  version: number | null;
1438
1438
  }>;
1439
- }>, usePlateLocalValue: <K$1 extends "editor" | "id" | "onChange" | "decorate" | "renderElement" | "renderText" | "renderLeaf" | "onNodeChange" | "onTextChange" | "readOnly" | "composing" | "isMounted" | "primary" | "renderChunk" | "versionDecorate" | "versionEditor" | "versionSelection" | "versionValue" | "onSelectionChange" | "onValueChange" | "containerRef" | "scrollRef" | "trackedEditor" | "trackedSelection" | "trackedValue", S = (({
1440
- composing: jotai_x98.SimpleWritableAtom<boolean | null>;
1441
- decorate: jotai_x98.SimpleWritableAtom<((options: {
1439
+ }>, 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 = (({
1440
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1441
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1442
1442
  editor: PlateEditor;
1443
- entry: _platejs_slate20.NodeEntry;
1444
- }) => _platejs_slate20.TRange[]) | null>;
1445
- isMounted: jotai_x98.SimpleWritableAtom<boolean | null>;
1446
- primary: jotai_x98.SimpleWritableAtom<boolean | null>;
1447
- readOnly: jotai_x98.SimpleWritableAtom<boolean | null>;
1448
- renderChunk: jotai_x98.SimpleWritableAtom<RenderChunkFn | null>;
1449
- renderElement: jotai_x98.SimpleWritableAtom<RenderElementFn | null>;
1450
- renderLeaf: jotai_x98.SimpleWritableAtom<RenderLeafFn | null>;
1451
- renderText: jotai_x98.SimpleWritableAtom<RenderTextFn | null>;
1452
- versionDecorate: jotai_x98.SimpleWritableAtom<number | null>;
1453
- versionEditor: jotai_x98.SimpleWritableAtom<number | null>;
1454
- versionSelection: jotai_x98.SimpleWritableAtom<number | null>;
1455
- versionValue: jotai_x98.SimpleWritableAtom<number | null>;
1456
- onChange: jotai_x98.SimpleWritableAtom<((options: {
1443
+ entry: _platejs_slate4.NodeEntry;
1444
+ }) => _platejs_slate4.TRange[]) | null>;
1445
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1446
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1447
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1448
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1449
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1450
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1451
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1452
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1453
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1454
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1455
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1456
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1457
1457
  editor: PlateEditor;
1458
- value: _platejs_slate20.Value;
1458
+ value: _platejs_slate4.Value;
1459
1459
  }) => void) | null>;
1460
- onNodeChange: jotai_x98.SimpleWritableAtom<((options: {
1460
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1461
1461
  editor: PlateEditor;
1462
- node: _platejs_slate20.Descendant;
1463
- operation: _platejs_slate20.NodeOperation;
1464
- prevNode: _platejs_slate20.Descendant;
1462
+ node: _platejs_slate4.Descendant;
1463
+ operation: _platejs_slate4.NodeOperation;
1464
+ prevNode: _platejs_slate4.Descendant;
1465
1465
  }) => void) | null>;
1466
- onSelectionChange: jotai_x98.SimpleWritableAtom<((options: {
1466
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1467
1467
  editor: PlateEditor;
1468
- selection: _platejs_slate20.TSelection;
1468
+ selection: _platejs_slate4.TSelection;
1469
1469
  }) => void) | null>;
1470
- onTextChange: jotai_x98.SimpleWritableAtom<((options: {
1470
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1471
1471
  editor: PlateEditor;
1472
- node: _platejs_slate20.Descendant;
1473
- operation: _platejs_slate20.TextOperation;
1472
+ node: _platejs_slate4.Descendant;
1473
+ operation: _platejs_slate4.TextOperation;
1474
1474
  prevText: string;
1475
1475
  text: string;
1476
1476
  }) => void) | null>;
1477
- onValueChange: jotai_x98.SimpleWritableAtom<((options: {
1477
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1478
1478
  editor: PlateEditor;
1479
- value: _platejs_slate20.Value;
1479
+ value: _platejs_slate4.Value;
1480
1480
  }) => void) | null>;
1481
- id: jotai_x98.SimpleWritableAtom<string>;
1482
- containerRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1483
- editor: jotai_x98.SimpleWritableAtom<PlateEditor>;
1484
- scrollRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1481
+ id: jotai_x0.SimpleWritableAtom<string>;
1482
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1483
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1484
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1485
1485
  } & {
1486
1486
  trackedEditor: jotai10.Atom<{
1487
1487
  editor: any;
@@ -1497,51 +1497,51 @@ declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1497
1497
  }>;
1498
1498
  })[K$1] extends jotai10.Atom<infer V> ? V : never)>(key: K$1, options?: ({
1499
1499
  selector?: ((v: ({
1500
- composing: jotai_x98.SimpleWritableAtom<boolean | null>;
1501
- decorate: jotai_x98.SimpleWritableAtom<((options: {
1500
+ composing: jotai_x0.SimpleWritableAtom<boolean | null>;
1501
+ decorate: jotai_x0.SimpleWritableAtom<((options: {
1502
1502
  editor: PlateEditor;
1503
- entry: _platejs_slate20.NodeEntry;
1504
- }) => _platejs_slate20.TRange[]) | null>;
1505
- isMounted: jotai_x98.SimpleWritableAtom<boolean | null>;
1506
- primary: jotai_x98.SimpleWritableAtom<boolean | null>;
1507
- readOnly: jotai_x98.SimpleWritableAtom<boolean | null>;
1508
- renderChunk: jotai_x98.SimpleWritableAtom<RenderChunkFn | null>;
1509
- renderElement: jotai_x98.SimpleWritableAtom<RenderElementFn | null>;
1510
- renderLeaf: jotai_x98.SimpleWritableAtom<RenderLeafFn | null>;
1511
- renderText: jotai_x98.SimpleWritableAtom<RenderTextFn | null>;
1512
- versionDecorate: jotai_x98.SimpleWritableAtom<number | null>;
1513
- versionEditor: jotai_x98.SimpleWritableAtom<number | null>;
1514
- versionSelection: jotai_x98.SimpleWritableAtom<number | null>;
1515
- versionValue: jotai_x98.SimpleWritableAtom<number | null>;
1516
- onChange: jotai_x98.SimpleWritableAtom<((options: {
1503
+ entry: _platejs_slate4.NodeEntry;
1504
+ }) => _platejs_slate4.TRange[]) | null>;
1505
+ isMounted: jotai_x0.SimpleWritableAtom<boolean | null>;
1506
+ primary: jotai_x0.SimpleWritableAtom<boolean | null>;
1507
+ readOnly: jotai_x0.SimpleWritableAtom<boolean | null>;
1508
+ renderChunk: jotai_x0.SimpleWritableAtom<RenderChunkFn | null>;
1509
+ renderElement: jotai_x0.SimpleWritableAtom<RenderElementFn | null>;
1510
+ renderLeaf: jotai_x0.SimpleWritableAtom<RenderLeafFn | null>;
1511
+ renderText: jotai_x0.SimpleWritableAtom<RenderTextFn | null>;
1512
+ versionDecorate: jotai_x0.SimpleWritableAtom<number | null>;
1513
+ versionEditor: jotai_x0.SimpleWritableAtom<number | null>;
1514
+ versionSelection: jotai_x0.SimpleWritableAtom<number | null>;
1515
+ versionValue: jotai_x0.SimpleWritableAtom<number | null>;
1516
+ onChange: jotai_x0.SimpleWritableAtom<((options: {
1517
1517
  editor: PlateEditor;
1518
- value: _platejs_slate20.Value;
1518
+ value: _platejs_slate4.Value;
1519
1519
  }) => void) | null>;
1520
- onNodeChange: jotai_x98.SimpleWritableAtom<((options: {
1520
+ onNodeChange: jotai_x0.SimpleWritableAtom<((options: {
1521
1521
  editor: PlateEditor;
1522
- node: _platejs_slate20.Descendant;
1523
- operation: _platejs_slate20.NodeOperation;
1524
- prevNode: _platejs_slate20.Descendant;
1522
+ node: _platejs_slate4.Descendant;
1523
+ operation: _platejs_slate4.NodeOperation;
1524
+ prevNode: _platejs_slate4.Descendant;
1525
1525
  }) => void) | null>;
1526
- onSelectionChange: jotai_x98.SimpleWritableAtom<((options: {
1526
+ onSelectionChange: jotai_x0.SimpleWritableAtom<((options: {
1527
1527
  editor: PlateEditor;
1528
- selection: _platejs_slate20.TSelection;
1528
+ selection: _platejs_slate4.TSelection;
1529
1529
  }) => void) | null>;
1530
- onTextChange: jotai_x98.SimpleWritableAtom<((options: {
1530
+ onTextChange: jotai_x0.SimpleWritableAtom<((options: {
1531
1531
  editor: PlateEditor;
1532
- node: _platejs_slate20.Descendant;
1533
- operation: _platejs_slate20.TextOperation;
1532
+ node: _platejs_slate4.Descendant;
1533
+ operation: _platejs_slate4.TextOperation;
1534
1534
  prevText: string;
1535
1535
  text: string;
1536
1536
  }) => void) | null>;
1537
- onValueChange: jotai_x98.SimpleWritableAtom<((options: {
1537
+ onValueChange: jotai_x0.SimpleWritableAtom<((options: {
1538
1538
  editor: PlateEditor;
1539
- value: _platejs_slate20.Value;
1539
+ value: _platejs_slate4.Value;
1540
1540
  }) => void) | null>;
1541
- id: jotai_x98.SimpleWritableAtom<string>;
1542
- containerRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1543
- editor: jotai_x98.SimpleWritableAtom<PlateEditor>;
1544
- scrollRef: jotai_x98.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1541
+ id: jotai_x0.SimpleWritableAtom<string>;
1542
+ containerRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1543
+ editor: jotai_x0.SimpleWritableAtom<PlateEditor>;
1544
+ scrollRef: jotai_x0.SimpleWritableAtom<React$1.RefObject<HTMLDivElement | null>>;
1545
1545
  } & {
1546
1546
  trackedEditor: jotai10.Atom<{
1547
1547
  editor: any;
@@ -1557,8 +1557,8 @@ declare const PlateStoreProvider: React$1.FC<jotai_x98.ProviderProps<{
1557
1557
  }>;
1558
1558
  })[K$1] extends jotai10.Atom<infer V_1> ? V_1 : never, prevSelectorOutput?: S | undefined) => S) | undefined;
1559
1559
  equalityFn?: ((prev: S, next: S) => boolean) | undefined;
1560
- } & jotai_x98.UseAtomOptions) | undefined, deps?: unknown[]) => S;
1561
- declare const usePlateStore: (id?: string) => jotai_x98.ReturnOfUseStoreApi<PlateStoreState<PlateEditor>, {
1560
+ } & jotai_x0.UseAtomOptions) | undefined, deps?: unknown[]) => S;
1561
+ declare const usePlateStore: (id?: string) => jotai_x0.ReturnOfUseStoreApi<PlateStoreState<PlateEditor>, {
1562
1562
  trackedEditor: jotai10.Atom<{
1563
1563
  editor: any;
1564
1564
  version: number | null;
@@ -1664,7 +1664,7 @@ declare function useEditorPluginOptions<C extends AnyPluginConfig, U>(editor: Pl
1664
1664
  }): U;
1665
1665
  //#endregion
1666
1666
  //#region src/react/stores/plate-controller/plateControllerStore.d.ts
1667
- declare const PlateController: React$1.FC<jotai_x98.ProviderProps<{
1667
+ declare const PlateController: React$1.FC<jotai_x0.ProviderProps<{
1668
1668
  activeId: string | null;
1669
1669
  editorStores: Record<string, ({
1670
1670
  get: <Value$1>(atom: Atom<Value$1>) => Value$1;
@@ -1706,7 +1706,7 @@ declare const PlateController: React$1.FC<jotai_x98.ProviderProps<{
1706
1706
  dev_restore_atoms: (values: Iterable<readonly [Atom<unknown>, unknown]>) => void;
1707
1707
  }>) | null>;
1708
1708
  primaryEditorIds: string[];
1709
- }>>, plateControllerStore: jotai_x98.StoreApi<{
1709
+ }>>, plateControllerStore: jotai_x0.StoreApi<{
1710
1710
  activeId: jotai10.PrimitiveAtom<string | null> & {
1711
1711
  init: string | null;
1712
1712
  };
@@ -1792,7 +1792,7 @@ declare const PlateController: React$1.FC<jotai_x98.ProviderProps<{
1792
1792
  primaryEditorIds: jotai10.PrimitiveAtom<string[]> & {
1793
1793
  init: string[];
1794
1794
  };
1795
- }, object, "plateController">, _usePlateControllerStore: jotai_x98.UseStoreApi<{
1795
+ }, object, "plateController">, _usePlateControllerStore: jotai_x0.UseStoreApi<{
1796
1796
  activeId: jotai10.PrimitiveAtom<string | null> & {
1797
1797
  init: string | null;
1798
1798
  };
@@ -1994,7 +1994,7 @@ declare const useEditableProps: ({
1994
1994
  * if another node is updated in a way that affects this node's path, this hook
1995
1995
  * will not return the new path.
1996
1996
  */
1997
- declare const useNodePath: (node: TNode) => _platejs_slate20.Path | undefined;
1997
+ declare const useNodePath: (node: TNode) => _platejs_slate4.Path | undefined;
1998
1998
  //#endregion
1999
1999
  //#region src/react/hooks/useSlateProps.d.ts
2000
2000
  type SlateComponentProps = Omit<React$1.ComponentProps<typeof Slate>, 'children'>;
@@ -2009,7 +2009,7 @@ declare const useSlateProps: ({
2009
2009
  }) => PlateSlateProps;
2010
2010
  //#endregion
2011
2011
  //#region src/react/utils/createPlateFallbackEditor.d.ts
2012
- declare const createPlateFallbackEditor: (options?: CreatePlateEditorOptions) => TPlateEditor<_platejs_slate20.Value, PlateCorePlugin>;
2012
+ declare const createPlateFallbackEditor: (options?: CreatePlateEditorOptions) => TPlateEditor<_platejs_slate4.Value, PlateCorePlugin>;
2013
2013
  //#endregion
2014
2014
  //#region src/react/utils/dom-attributes.d.ts
2015
2015
  declare const DOM_HANDLERS: (keyof DOMHandlers)[];
@@ -1,6 +1,6 @@
1
- import { Ut as BaseParagraphPlugin, bt as getSlateClass, cn as getEditorPlugin$1, dt as ChunkingPlugin, ln as createSlatePlugin, m as isEditOnly, n as withSlate, nn as getPluginByType, s as SlateExtensionPlugin, st as DOMPlugin, x as NavigationFeedbackPlugin$1, xt as getPluginNodeProps } from "../withSlate-DNmYXPLn.js";
1
+ import { Ut as BaseParagraphPlugin, bt as getSlateClass, cn as getEditorPlugin$1, dt as ChunkingPlugin, ln as createSlatePlugin, m as isEditOnly, n as withSlate, nn as getPluginByType, s as SlateExtensionPlugin, st as DOMPlugin, x as NavigationFeedbackPlugin$1, xt as getPluginNodeProps } from "../withSlate-B-XNrpsk.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-CdjTnIdb.js";
3
+ import { A as pipeInjectNodeProps, C as createStaticEditor, k as pipeDecorate, s as PlateStatic } from "../static-BoOSg4dr.js";
4
4
  import { NodeApi, 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";
@@ -1413,7 +1413,7 @@ const useNodePath = (node) => {
1413
1413
  //#region src/react/hooks/useSlateProps.ts
1414
1414
  /** Get Slate props stored in a global store. */
1415
1415
  const useSlateProps = (t0) => {
1416
- const $ = c(19);
1416
+ const $ = c(23);
1417
1417
  const { id } = t0;
1418
1418
  const editor = useEditorRef(id);
1419
1419
  const store = usePlateStore(id);
@@ -1423,55 +1423,83 @@ const useSlateProps = (t0) => {
1423
1423
  const updateVersionEditor = useIncrementVersion("versionEditor", id);
1424
1424
  const updateVersionSelection = useIncrementVersion("versionSelection", id);
1425
1425
  const updateVersionValue = useIncrementVersion("versionValue", id);
1426
+ const prevSelectionRef = React.useRef(editor.selection);
1427
+ const prevValueRef = React.useRef(editor.children);
1426
1428
  let t1;
1427
- if ($[0] !== editor || $[1] !== onChangeProp || $[2] !== updateVersionEditor) {
1429
+ if ($[0] !== editor || $[1] !== onChangeProp || $[2] !== onSelectionChangeProp || $[3] !== onValueChangeProp || $[4] !== updateVersionEditor || $[5] !== updateVersionSelection || $[6] !== updateVersionValue) {
1428
1430
  t1 = (newValue) => {
1429
1431
  updateVersionEditor();
1430
1432
  if (!pipeOnChange(editor, newValue)) onChangeProp?.({
1431
1433
  editor,
1432
1434
  value: newValue
1433
1435
  });
1436
+ if (editor.children !== prevValueRef.current) {
1437
+ prevValueRef.current = editor.children;
1438
+ updateVersionValue();
1439
+ onValueChangeProp?.({
1440
+ editor,
1441
+ value: newValue
1442
+ });
1443
+ }
1444
+ if (editor.selection !== prevSelectionRef.current) {
1445
+ prevSelectionRef.current = editor.selection;
1446
+ updateVersionSelection();
1447
+ onSelectionChangeProp?.({
1448
+ editor,
1449
+ selection: editor.selection
1450
+ });
1451
+ }
1434
1452
  };
1435
1453
  $[0] = editor;
1436
1454
  $[1] = onChangeProp;
1437
- $[2] = updateVersionEditor;
1438
- $[3] = t1;
1439
- } else t1 = $[3];
1455
+ $[2] = onSelectionChangeProp;
1456
+ $[3] = onValueChangeProp;
1457
+ $[4] = updateVersionEditor;
1458
+ $[5] = updateVersionSelection;
1459
+ $[6] = updateVersionValue;
1460
+ $[7] = t1;
1461
+ } else t1 = $[7];
1440
1462
  const onChange = t1;
1441
1463
  let t2;
1442
- if ($[4] !== editor || $[5] !== onValueChangeProp || $[6] !== updateVersionValue) {
1464
+ if ($[8] !== editor || $[9] !== onValueChangeProp || $[10] !== updateVersionValue) {
1443
1465
  t2 = (value) => {
1444
- updateVersionValue();
1445
- onValueChangeProp?.({
1446
- editor,
1447
- value
1448
- });
1466
+ if (editor.children !== prevValueRef.current) {
1467
+ prevValueRef.current = editor.children;
1468
+ updateVersionValue();
1469
+ onValueChangeProp?.({
1470
+ editor,
1471
+ value
1472
+ });
1473
+ }
1449
1474
  };
1450
- $[4] = editor;
1451
- $[5] = onValueChangeProp;
1452
- $[6] = updateVersionValue;
1453
- $[7] = t2;
1454
- } else t2 = $[7];
1475
+ $[8] = editor;
1476
+ $[9] = onValueChangeProp;
1477
+ $[10] = updateVersionValue;
1478
+ $[11] = t2;
1479
+ } else t2 = $[11];
1455
1480
  const onValueChange = t2;
1456
1481
  let t3;
1457
- if ($[8] !== editor || $[9] !== onSelectionChangeProp || $[10] !== updateVersionSelection) {
1482
+ if ($[12] !== editor || $[13] !== onSelectionChangeProp || $[14] !== updateVersionSelection) {
1458
1483
  t3 = (selection) => {
1459
- updateVersionSelection();
1460
- onSelectionChangeProp?.({
1461
- editor,
1462
- selection
1463
- });
1484
+ if (editor.selection !== prevSelectionRef.current) {
1485
+ prevSelectionRef.current = editor.selection;
1486
+ updateVersionSelection();
1487
+ onSelectionChangeProp?.({
1488
+ editor,
1489
+ selection
1490
+ });
1491
+ }
1464
1492
  };
1465
- $[8] = editor;
1466
- $[9] = onSelectionChangeProp;
1467
- $[10] = updateVersionSelection;
1468
- $[11] = t3;
1469
- } else t3 = $[11];
1493
+ $[12] = editor;
1494
+ $[13] = onSelectionChangeProp;
1495
+ $[14] = updateVersionSelection;
1496
+ $[15] = t3;
1497
+ } else t3 = $[15];
1470
1498
  const onSelectionChange = t3;
1471
1499
  const t4 = editor;
1472
1500
  const t5 = editor.children;
1473
1501
  let t6;
1474
- if ($[12] !== editor.meta.key || $[13] !== onChange || $[14] !== onSelectionChange || $[15] !== onValueChange || $[16] !== t4 || $[17] !== t5) {
1502
+ if ($[16] !== editor.meta.key || $[17] !== onChange || $[18] !== onSelectionChange || $[19] !== onValueChange || $[20] !== t4 || $[21] !== t5) {
1475
1503
  t6 = {
1476
1504
  key: editor.meta.key,
1477
1505
  editor: t4,
@@ -1480,14 +1508,14 @@ const useSlateProps = (t0) => {
1480
1508
  onSelectionChange,
1481
1509
  onValueChange
1482
1510
  };
1483
- $[12] = editor.meta.key;
1484
- $[13] = onChange;
1485
- $[14] = onSelectionChange;
1486
- $[15] = onValueChange;
1487
- $[16] = t4;
1488
- $[17] = t5;
1489
- $[18] = t6;
1490
- } else t6 = $[18];
1511
+ $[16] = editor.meta.key;
1512
+ $[17] = onChange;
1513
+ $[18] = onSelectionChange;
1514
+ $[19] = onValueChange;
1515
+ $[20] = t4;
1516
+ $[21] = t5;
1517
+ $[22] = t6;
1518
+ } else t6 = $[22];
1491
1519
  return t6;
1492
1520
  };
1493
1521
 
@@ -1,2 +1,2 @@
1
- import { $a as getEditorDOMFromHtmlString, Ao as SlateRenderElement, Ba as stripHtmlClassNames, Co as SlateRenderText, Do as pipeRenderLeafStatic, Eo as SlateRenderLeaf, Ga as getSelectedDomBlocks, Ha as isSelectOutside, Ja as getPluginDataAttributes, Ka as getRenderNodeStaticProps, Oo as pluginRenderLeafStatic, Qa as createStaticEditor, So as PlateStaticProps, To as pluginRenderTextStatic, Ua as getSelectedDomNode, Va as pipeDecorate, Wa as getSelectedDomFragment, Xa as getStaticPlugins, Ya as createStaticString, Za as ViewPlugin, _o as SerializeHtmlOptions, ao as SlateNodeProps, bo as LeafStatic, co as StyledSlateElementProps, do as useNodeAttributes, eo as SlateElement, fo as BoxStaticProps, go as SlateRenderTextProps, ho as SlateRenderNodeProps, io as SlateLeafProps, jo as pluginRenderElementStatic, ko as pipeRenderElementStatic, lo as StyledSlateLeafProps, mo as SlateRenderLeafProps, no as SlateHTMLProps, oo as SlateText, po as SlateRenderElementProps, qa as getNodeDataAttributes, ro as SlateLeaf, so as SlateTextProps, to as SlateElementProps, uo as StyledSlateTextProps, vo as serializeHtml, wo as pipeRenderTextStatic, xo as PlateStatic, yo as ElementStatic, za as stripSlateDataAttributes } from "../index-fS5ruWhD";
1
+ import { $a as getEditorDOMFromHtmlString, Ao as SlateRenderElement, Ba as stripHtmlClassNames, Co as SlateRenderText, Do as pipeRenderLeafStatic, Eo as SlateRenderLeaf, Ga as getSelectedDomBlocks, Ha as isSelectOutside, Ja as getPluginDataAttributes, Ka as getRenderNodeStaticProps, Oo as pluginRenderLeafStatic, Qa as createStaticEditor, So as PlateStaticProps, To as pluginRenderTextStatic, Ua as getSelectedDomNode, Va as pipeDecorate, Wa as getSelectedDomFragment, Xa as getStaticPlugins, Ya as createStaticString, Za as ViewPlugin, _o as SerializeHtmlOptions, ao as SlateNodeProps, bo as LeafStatic, co as StyledSlateElementProps, do as useNodeAttributes, eo as SlateElement, fo as BoxStaticProps, go as SlateRenderTextProps, ho as SlateRenderNodeProps, io as SlateLeafProps, jo as pluginRenderElementStatic, ko as pipeRenderElementStatic, lo as StyledSlateLeafProps, mo as SlateRenderLeafProps, no as SlateHTMLProps, oo as SlateText, po as SlateRenderElementProps, qa as getNodeDataAttributes, ro as SlateLeaf, so as SlateTextProps, to as SlateElementProps, uo as StyledSlateTextProps, vo as serializeHtml, wo as pipeRenderTextStatic, xo as PlateStatic, yo as ElementStatic, za as stripSlateDataAttributes } from "../index-BhmRdj7M";
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-DNmYXPLn.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-CdjTnIdb.js";
1
+ import "../withSlate-B-XNrpsk.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-BoOSg4dr.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 keyToDataAttribute, Tt as getInjectMatch, bt as getSlateClass, cn as getEditorPlugin, m as isEditOnly, n as withSlate, nn as getPluginByType, st as DOMPlugin, xt as getPluginNodeProps } from "./withSlate-DNmYXPLn.js";
1
+ import { Ct as keyToDataAttribute, Tt as getInjectMatch, bt as getSlateClass, cn as getEditorPlugin, m as isEditOnly, n as withSlate, nn as getPluginByType, st as DOMPlugin, xt as getPluginNodeProps } from "./withSlate-B-XNrpsk.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";
@@ -2527,23 +2527,69 @@ const HtmlPlugin = createSlatePlugin({ key: "html" }).extendApi(({ editor }) =>
2527
2527
 
2528
2528
  //#endregion
2529
2529
  //#region src/lib/plugins/length/LengthPlugin.ts
2530
- const LengthPlugin = createTSlatePlugin({ key: "length" }).overrideEditor(({ editor, getOptions, tf: { apply } }) => ({ transforms: { apply(operation) {
2531
- editor.tf.withoutNormalizing(() => {
2532
- apply(operation);
2533
- const options = getOptions();
2534
- if (options.maxLength) {
2535
- const length = editor.api.string([]).length;
2536
- if (length > options.maxLength) {
2537
- const overflowLength = length - options.maxLength;
2538
- editor.tf.delete({
2539
- distance: overflowLength,
2540
- reverse: true,
2541
- unit: "character"
2542
- });
2543
- }
2530
+ const LengthPlugin = createTSlatePlugin({ key: "length" }).overrideEditor(({ editor, getOptions, tf: { apply } }) => {
2531
+ let isTrimming = false;
2532
+ let shouldTrimAgain = false;
2533
+ const deleteOverflow = (distance) => {
2534
+ const point = editor.selection?.focus;
2535
+ if (!point) return;
2536
+ const target = editor.api.before(point, {
2537
+ distance,
2538
+ unit: "character"
2539
+ }) ?? editor.api.start([]);
2540
+ if (!target) return;
2541
+ if (PathApi.equals(target.path, point.path)) {
2542
+ editor.tf.delete({ at: {
2543
+ anchor: target,
2544
+ focus: point
2545
+ } });
2546
+ return;
2544
2547
  }
2545
- });
2546
- } } }));
2548
+ if (point.offset > 0) {
2549
+ editor.tf.delete({ at: {
2550
+ anchor: {
2551
+ offset: 0,
2552
+ path: point.path
2553
+ },
2554
+ focus: point
2555
+ } });
2556
+ return;
2557
+ }
2558
+ const block = editor.api.block({ at: point });
2559
+ if (block && block[1].length === 1 && editor.api.isEmpty(block[0])) {
2560
+ editor.tf.removeNodes({ at: block[1] });
2561
+ return;
2562
+ }
2563
+ const previous = editor.api.previous({
2564
+ at: point,
2565
+ match: TextApi.isText
2566
+ });
2567
+ if (previous) editor.tf.select(editor.api.end(previous[1]));
2568
+ };
2569
+ return { transforms: { apply(operation) {
2570
+ editor.tf.withoutNormalizing(() => {
2571
+ apply(operation);
2572
+ const options = getOptions();
2573
+ if (!options.maxLength) return;
2574
+ if (isTrimming) {
2575
+ shouldTrimAgain = true;
2576
+ return;
2577
+ }
2578
+ isTrimming = true;
2579
+ try {
2580
+ do {
2581
+ shouldTrimAgain = false;
2582
+ const overflowLength = editor.api.string([]).length - options.maxLength;
2583
+ if (overflowLength <= 0) return;
2584
+ deleteOverflow(overflowLength);
2585
+ } while (shouldTrimAgain);
2586
+ } finally {
2587
+ isTrimming = false;
2588
+ shouldTrimAgain = false;
2589
+ }
2590
+ });
2591
+ } } };
2592
+ });
2547
2593
 
2548
2594
  //#endregion
2549
2595
  //#region src/lib/plugins/navigation-feedback/types.ts
@@ -3389,11 +3435,14 @@ const hasDifferentChildNodes = (descendants, isInline) => descendants.some((desc
3389
3435
  /**
3390
3436
  * Handles 3rd constraint: "Block nodes can only contain other blocks, or inline
3391
3437
  * and text nodes."
3438
+ *
3439
+ * At the root, inline and text nodes are always wrapped in the default block,
3440
+ * since the document root can only contain blocks.
3392
3441
  */
3393
- const normalizeDifferentNodeTypes = (descendants, isInline, makeDefaultBlock) => {
3394
- const hasDifferentNodes = hasDifferentChildNodes(descendants, isInline);
3442
+ const normalizeDifferentNodeTypes = (descendants, isInline, makeDefaultBlock, forceWrapInline) => {
3443
+ const shouldWrapInlines = forceWrapInline || hasDifferentChildNodes(descendants, isInline);
3395
3444
  const { fragment } = descendants.reduce((memo, node) => {
3396
- if (hasDifferentNodes && isInline(node)) {
3445
+ if (shouldWrapInlines && isInline(node)) {
3397
3446
  let block = memo.precedingBlock;
3398
3447
  if (!block) {
3399
3448
  block = makeDefaultBlock();
@@ -3420,13 +3469,13 @@ const normalizeEmptyChildren = (descendants) => {
3420
3469
  if (descendants.length === 0) return [{ text: "" }];
3421
3470
  return descendants;
3422
3471
  };
3423
- const normalize = (descendants, isInline, makeDefaultBlock) => {
3472
+ const normalize = (descendants, isInline, makeDefaultBlock, isRoot) => {
3424
3473
  descendants = normalizeEmptyChildren(descendants);
3425
- descendants = normalizeDifferentNodeTypes(descendants, isInline, makeDefaultBlock);
3474
+ descendants = normalizeDifferentNodeTypes(descendants, isInline, makeDefaultBlock, isRoot);
3426
3475
  descendants = descendants.map((node) => {
3427
3476
  if (ElementApi.isElement(node)) return {
3428
3477
  ...node,
3429
- children: normalize(node.children, isInline, makeDefaultBlock)
3478
+ children: normalize(node.children, isInline, makeDefaultBlock, false)
3430
3479
  };
3431
3480
  return node;
3432
3481
  });
@@ -3434,7 +3483,7 @@ const normalize = (descendants, isInline, makeDefaultBlock) => {
3434
3483
  };
3435
3484
  /** Normalize the descendants to a valid document fragment. */
3436
3485
  const normalizeDescendantsToDocumentFragment = (editor, { defaultElementPlugin = BaseParagraphPlugin, descendants }) => {
3437
- return normalize(descendants, isInlineNode(editor), makeBlockLazy(editor.getType(defaultElementPlugin.key)));
3486
+ return normalize(descendants, isInlineNode(editor), makeBlockLazy(editor.getType(defaultElementPlugin.key)), true);
3438
3487
  };
3439
3488
 
3440
3489
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lofcz/platejs-core",
3
- "version": "53.2.4",
3
+ "version": "53.4.3",
4
4
  "description": "The core of Plate – a plugin system for slate",
5
5
  "keywords": [
6
6
  "contentEditable",
@@ -46,17 +46,17 @@
46
46
  "nanoid": "^5.1.5",
47
47
  "optics-ts": "2.4.1",
48
48
  "react-compiler-runtime": "^1.0.0",
49
- "slate": "0.124.1",
50
- "slate-dom": "0.124.1",
49
+ "slate": "0.126.2",
50
+ "slate-dom": "0.126.0",
51
51
  "slate-hyperscript": "0.125.0",
52
- "slate-react": "0.124.2",
52
+ "slate-react": "0.126.0",
53
53
  "use-deep-compare": "^1.3.0",
54
54
  "zustand": "^5.0.5",
55
55
  "zustand-x": "6.2.1",
56
- "@platejs/slate": "npm:@lofcz/platejs-slate@53.1.7",
57
- "@udecode/react-hotkeys": "npm:@lofcz/udecode-react-hotkeys@52.3.6",
56
+ "@platejs/slate": "npm:@lofcz/platejs-slate@53.3.4",
58
57
  "@udecode/react-utils": "npm:@lofcz/udecode-react-utils@52.3.4",
59
- "@udecode/utils": "npm:@lofcz/udecode-utils@52.3.4"
58
+ "@udecode/utils": "npm:@lofcz/udecode-utils@52.3.4",
59
+ "@udecode/react-hotkeys": "npm:@lofcz/udecode-react-hotkeys@52.3.6"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "react": ">=18.0.0",