@lofcz/platejs-core 52.3.4 → 52.3.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.
- package/dist/hotkeys-DI1HPO2Q.js +1 -2
- package/dist/{index-NTp--CEF.d.ts → index-CLvWpTKx.d.ts} +52 -1745
- package/dist/index.d.ts +2 -2
- package/dist/index.js +31 -3
- package/dist/react/index.d.ts +194 -195
- package/dist/react/index.js +3 -4
- package/dist/static/index.d.ts +1 -1
- package/dist/static/index.js +2 -2
- package/dist/{static-CVN6JhaR.js → static-DIYyt_jS.js} +27 -15
- package/dist/{withSlate-1B0SfAWG.js → withSlate-BfRR5wTZ.js} +98 -81
- package/package.json +5 -5
- package/dist/hotkeys-DI1HPO2Q.js.map +0 -1
- package/dist/index-NTp--CEF.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/react/index.d.ts.map +0 -1
- package/dist/react/index.js.map +0 -1
- package/dist/static-CVN6JhaR.js.map +0 -1
- package/dist/withSlate-1B0SfAWG.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as TSlateEditor, $n as
|
|
2
|
-
export { AUTO_SCROLL, AffinityConfig, AffinityPlugin, AnyEditorPlugin, AnyPluginConfig, AnySlatePlugin, ApplyDeepToNodesOptions, AstPlugin, AutoScrollOperationsMap, BaseDeserializer, BaseEditor, BaseHtmlDeserializer, BaseInjectProps, BaseParagraphPlugin, BasePlugin, BasePluginContext, BasePluginNode, BaseSerializer, BaseTransformOptions, BaseWithSlateOptions, BreakRules, CARRIAGE_RETURN, ChunkingConfig, ChunkingPlugin, CollapseWhiteSpaceState, CorePlugin, CorePluginApi, CorePluginTransforms, CreateSlateEditorOptions, DOMPlugin, DebugConfig, DebugErrorType, DebugPlugin, Decorate, DeleteRules, 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, InsertExitBreakOptions, KeyofNodePlugins, KeyofPlugins, LINE_FEED, LeafStaticProps, LengthConfig, LengthPlugin, LogLevel, MatchRules, MergeRules, NO_BREAK_SPACE, NodeComponent, NodeComponents, NodeIdConfig, NodeIdOptions, NodeIdPlugin, NodeStaticProps, NodeStaticWrapperComponent, NodeStaticWrapperComponentProps, NodeStaticWrapperComponentReturnType, NormalizeInitialValue, NormalizeNodeIdOptions, NormalizeRules, OverrideEditor, OverridePlugin, ParagraphConfig, Parser, ParserOptions, ParserPlugin, PartialEditorPlugin, PlateError, PluginConfig, RenderChunkFn, RenderChunkProps, RenderElementFn, RenderElementProps, RenderLeafFn, RenderLeafProps, RenderStaticNodeWrapper, RenderStaticNodeWrapperFunction, RenderStaticNodeWrapperProps, RenderTextFn, RenderTextProps, SPACE, ScrollMode, SelectionRules, Serializer, SlateEditor, SlateExtensionConfig, SlateExtensionPlugin, SlatePlugin, SlatePluginConfig, SlatePluginContext, SlatePluginMethods, SlatePlugins, SlateShortcut, TAB, TSlateEditor, TextStaticProps, TransformOptions, TrimEndRule, TrimStartRule, WhiteSpaceRule, WithAnyKey, WithAutoScrollOptions, WithRequiredKey, WithSlateOptions, ZERO_WIDTH_SPACE, ZustandStoreApi, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createHotkey, createSlateEditor, createSlatePlugin, createTSlatePlugin, createZustandStore, defaultsDeepToNodes, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, 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, mergeDeepToNodes, nanoid, normalizeDescendantsToDocumentFragment, normalizeNodeId, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };
|
|
1
|
+
import { $ as TSlateEditor, $n as SPACE, $r as getPluginType, $t as CollapseWhiteSpaceState, A as applyDeepToNodes, Ai as SlatePlugin, An as htmlElementToElement, Ar as ElementAffinity, At as BaseParagraphPlugin, B as ZustandStoreApi, Bn as deserializeHtml, Br as setValue, Bt as STATIC_VALUE_CREATED_AT, C as isSlateNode, Ci as OverrideEditor, Cn as isHtmlElement, Cr as isNodeAffinity, Ct as NodeComponents, D as isSlateText, Di as RenderStaticNodeWrapperFunction, Dn as htmlTextNodeToString, Dr as EdgeNodes, Dt as SelectionRules, E as isSlateString, Ei as RenderStaticNodeWrapper, En as inlineTagNames, Er as getEdgeNodes, Et as PluginConfig, F as RenderLeafProps, Fi as SlateShortcut, Fn as findHtmlElement, Fr as ScrollMode, Ft as withBreakRules, G as WithSlateOptions, Gn as cleanHtmlEmptyElements, Gr as init, Gt as isLastNonEmptyTextOfInlineFormattingContext, H as nanoid, Hn as cleanHtmlTextNodes, Hr as InsertExitBreakOptions, Ht as LengthPlugin, I as RenderElementFn, Ii as TextStaticProps, In as someHtmlElement, Ir as WithAutoScrollOptions, It as OverridePlugin, J as BaseEditor, Jn as DeserializeHtmlChildren, Jr as withPlateHistory, Jt as collapseWhiteSpaceNode, K as createSlateEditor, Kn as cleanHtmlCrLf, Kr as ParserPlugin, Kt as inferWhiteSpaceRule, L as RenderElementProps, Li as TransformOptions, Ln as deserializeHtmlNodeChildren, Lr as withScrolling, Lt as withOverrides, M as RenderTextFn, Ma as AstPlugin, Mi as SlatePluginContext, Mn as htmlBodyToFragment, Mr as AutoScrollOperationsMap, Mt as withNormalizeRules, N as RenderTextProps, Ni as SlatePluginMethods, Nn as getHtmlComments, Nr as DOMPlugin, Nt as withMergeRules, O as isSlateVoid, Oi as RenderStaticNodeWrapperProps, On as htmlStringToDOMNode, Or as AffinityConfig, Ot as WithAnyKey, P as RenderLeafFn, Pi as SlatePlugins, Pn as getDataNodeProps, Pr as DomConfig, Pt as withDeleteRules, Q as SlateEditor, Qn as NO_BREAK_SPACE, Qr as getPluginKeys, Qt as collapseString, R as RenderChunkFn, Rn as deserializeHtmlNode, Rr as SlateExtensionConfig, Rt as withNodeId, S as isSlateLeaf, Si as NormalizeInitialValue, Sn as isHtmlFragmentHref, Sr as setAffinitySelection, St as NodeComponent, T as isSlatePluginNode, Ti as PartialEditorPlugin, Tn as isHtmlBlockElement, Tr as getMarkBoundaryAffinity, Tt as ParserOptions, U as BaseWithSlateOptions, Un as cleanHtmlLinkElements, Ur as insertExitBreak, Ut as endInlineFormattingContext, V as createZustandStore, Vn as copyBlockMarksToSpanChild, Vr as resetBlock, Vt as normalizeStaticValue, W as CreateSlateEditorOptions, Wn as cleanHtmlFontElements, Wr as InitOptions, Wt as upsertInlineFormattingContext, X as KeyofNodePlugins, Xn as CARRIAGE_RETURN, Xr as getPluginByType, Xt as collapseWhiteSpaceChildren, Y as InferPlugins, Yn as DeserializeHtmlNodeReturnType, Yr as getContainerTypes, Yt as collapseWhiteSpaceElement, Z as KeyofPlugins, Zn as LINE_FEED, Zr as getPluginKey, Zt as collapseWhiteSpace, _ as getInjectMatch, _i as LeafStaticProps, _n as parseHtmlDocument, _r as normalizeNodeId, _t as InferOptions, a as omitPluginContext, ai as AnyEditorPlugin, an as traverseHtmlNode, ar as CorePluginApi, at as BasePluginContext, b as isSlateEditor, bi as NodeStaticWrapperComponentProps, bn as isHtmlTable, br as LogLevel, bt as MatchRules, c as isType, ci as Deserializer, cn as replaceTagName, cr as GetCorePluginsOptions, ct as BaseTransformOptions, d as isHotkey, di as ExtendEditorApi, dn as preCleanHtml, dr as ChunkingConfig, dt as EditOnlyConfig, ei as getPluginTypes, en as TrimEndRule, er as TAB, et as AnyPluginConfig, f as getSlateClass, fi as ExtendEditorTransforms, fn as postCleanHtml, fr as ChunkingPlugin, ft as ExtendConfig, g as getInjectedPlugins, gi as InjectNodeProps, gn as parseHtmlElement, gr as NormalizeNodeIdOptions, gt as InferKey, h as keyToDataAttribute, hi as InferConfig, hn as pipeDeserializeHtmlElement, hr as NodeIdPlugin, ht as InferApi, i as overridePluginsByKey, ii as createTSlatePlugin, in as traverseHtmlTexts, ir as CorePlugin, it as BasePlugin, j as EditableProps, ja as HandlerReturnType, ji as SlatePluginConfig, jn as htmlBrToNewLine, jr as AUTO_SCROLL, jt as ParagraphConfig, k as ApplyDeepToNodesOptions, ki as Serializer, kn as htmlElementToLeaf, kr as AffinityPlugin, kt as WithRequiredKey, l as Hotkeys, li as EditorPlugin, ln as removeHtmlSurroundings, lr as LengthConfig, lt as BreakRules, m as getNodeDataAttributeKeys, mi as HtmlSerializer, mn as pipeDeserializeHtmlLeaf, mr as NodeIdOptions, mt as GetInjectNodePropsReturnType, n as pipeOnNodeChange, ni as getEditorPlugin, nn as WhiteSpaceRule, nr as HtmlPlugin, nt as BaseHtmlDeserializer, o as normalizeDescendantsToDocumentFragment, oi as AnySlatePlugin, on as traverseHtmlElements, or as CorePluginTransforms, ot as BasePluginNode, p as getPluginNodeProps, pi as HtmlDeserializer, pn as pluginDeserializeHtml, pr as NodeIdConfig, pt as GetInjectNodePropsOptions, q as withSlate, qn as cleanHtmlBrElements, qr as HistoryPlugin, qt as collapseWhiteSpaceText, r as pipeInsertDataQuery, ri as createSlatePlugin, rn as unwrapHtmlElement, rr as withChunking, rt as BaseInjectProps, s as mergeDeepToNodes, si as Decorate, sn as traverseHtmlComments, sr as DebugConfig, st as BaseSerializer, t as pipeOnTextChange, ti as getSlatePlugin, tn as TrimStartRule, tr as ZERO_WIDTH_SPACE, tt as BaseDeserializer, u as createHotkey, ui as ExtendEditor, un as removeHtmlNodesBetweenComments, ur as getCorePlugins, ut as DeleteRules, v as defaultsDeepToNodes, vi as NodeStaticProps, vn as isOlSymbol, vr as DebugErrorType, vt as InferSelectors, w as isSlatePluginElement, wi as Parser, wn as isHtmlComment, wr as isNodesAffinity, wt as NormalizeRules, x as isSlateElement, xi as NodeStaticWrapperComponentReturnType, xn as isHtmlInlineElement, xr as PlateError, xt as MergeRules, y as getSlateElements, yi as NodeStaticWrapperComponent, yn as isHtmlText, yr as DebugPlugin, yt as InferTransforms, z as RenderChunkProps, zn as deserializeHtmlElement, zr as SlateExtensionPlugin, zt as NormalizeStaticValueOptions } from "./index-CLvWpTKx";
|
|
2
|
+
export { AUTO_SCROLL, AffinityConfig, AffinityPlugin, AnyEditorPlugin, AnyPluginConfig, AnySlatePlugin, ApplyDeepToNodesOptions, AstPlugin, AutoScrollOperationsMap, BaseDeserializer, BaseEditor, BaseHtmlDeserializer, BaseInjectProps, BaseParagraphPlugin, BasePlugin, BasePluginContext, BasePluginNode, BaseSerializer, BaseTransformOptions, BaseWithSlateOptions, BreakRules, CARRIAGE_RETURN, ChunkingConfig, ChunkingPlugin, CollapseWhiteSpaceState, CorePlugin, CorePluginApi, CorePluginTransforms, CreateSlateEditorOptions, DOMPlugin, DebugConfig, DebugErrorType, DebugPlugin, Decorate, DeleteRules, 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, InsertExitBreakOptions, KeyofNodePlugins, KeyofPlugins, LINE_FEED, LeafStaticProps, LengthConfig, LengthPlugin, LogLevel, MatchRules, MergeRules, NO_BREAK_SPACE, 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, SPACE, STATIC_VALUE_CREATED_AT, ScrollMode, SelectionRules, Serializer, SlateEditor, SlateExtensionConfig, SlateExtensionPlugin, SlatePlugin, SlatePluginConfig, SlatePluginContext, SlatePluginMethods, SlatePlugins, SlateShortcut, TAB, TSlateEditor, TextStaticProps, TransformOptions, TrimEndRule, TrimStartRule, WhiteSpaceRule, WithAnyKey, WithAutoScrollOptions, WithRequiredKey, WithSlateOptions, ZERO_WIDTH_SPACE, ZustandStoreApi, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createHotkey, createSlateEditor, createSlatePlugin, createTSlatePlugin, createZustandStore, defaultsDeepToNodes, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, 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, mergeDeepToNodes, nanoid, normalizeDescendantsToDocumentFragment, normalizeNodeId, normalizeStaticValue, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, 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,8 +1,9 @@
|
|
|
1
|
-
import { $ as DebugPlugin, A as pluginDeserializeHtml, At as withNormalizeRules, B as collapseWhiteSpaceText, Bt as getPluginKey, C as deserializeHtmlElement, Ct as isSlatePluginNode, D as pipeDeserializeHtmlLeaf, Dt as applyDeepToNodes, E as htmlElementToLeaf, Et as isSlateVoid, F as collapseWhiteSpace, Ft as HistoryPlugin, G as isHtmlBlockElement, Gt as getEditorPlugin, H as upsertInlineFormattingContext, Ht as getPluginType, I as collapseWhiteSpaceElement, It as withPlateHistory, J as isHtmlText, K as isHtmlInlineElement, Kt as createSlatePlugin, L as inferWhiteSpaceRule, Lt as AstPlugin, M as htmlBrToNewLine, Mt as withDeleteRules, N as htmlBodyToFragment, Nt as withBreakRules, O as htmlElementToElement, Ot as OverridePlugin, P as deserializeHtmlNodeChildren, Pt as BaseParagraphPlugin, Q as withScrolling, R as collapseWhiteSpaceChildren, Rt as getContainerTypes, S as htmlStringToDOMNode, St as isSlatePluginElement, T as htmlTextNodeToString, Tt as isSlateText, U as isLastNonEmptyTextOfInlineFormattingContext, Ut as getPluginTypes, V as endInlineFormattingContext, Vt as getPluginKeys, W as collapseString, Wt as getSlatePlugin, X as AUTO_SCROLL, Y as isHtmlElement, Z as DOMPlugin, _ as withNodeId, _t as getSlateElements, a as pipeInsertDataQuery, at as isNodeAffinity, b as parseHtmlDocument, bt as isSlateLeaf, c as setValue, ct as getEdgeNodes, d as init, dt as getPluginNodeProps, et as PlateError, ft as getNodeDataAttributeKeys, g as normalizeNodeId, gt as defaultsDeepToNodes, h as NodeIdPlugin, ht as getInjectMatch, i as ParserPlugin, it as setAffinitySelection, j as getDataNodeProps, jt as withMergeRules, k as pipeDeserializeHtmlElement, kt as withOverrides, l as resetBlock, lt as mergeDeepToNodes, m as pipeOnNodeChange, mt as getInjectedPlugins, n as withSlate, nt as withChunking, o as normalizeDescendantsToDocumentFragment, ot as isNodesAffinity, p as pipeOnTextChange, pt as keyToDataAttribute, q as inlineTagNames, qt as createTSlatePlugin, r as getCorePlugins, rt as AffinityPlugin, s as SlateExtensionPlugin, st as getMarkBoundaryAffinity, t as createSlateEditor, tt as ChunkingPlugin, u as insertExitBreak, ut as getSlateClass, v as LengthPlugin, vt as isSlateEditor, w as deserializeHtmlNode, wt as isSlateString, x as deserializeHtml, xt as isSlateNode, y as HtmlPlugin, yt as isSlateElement, z as collapseWhiteSpaceNode, zt as getPluginByType } from "./withSlate-
|
|
1
|
+
import { $ as DebugPlugin, A as pluginDeserializeHtml, At as withNormalizeRules, B as collapseWhiteSpaceText, Bt as getPluginKey, C as deserializeHtmlElement, Ct as isSlatePluginNode, D as pipeDeserializeHtmlLeaf, Dt as applyDeepToNodes, E as htmlElementToLeaf, Et as isSlateVoid, F as collapseWhiteSpace, Ft as HistoryPlugin, G as isHtmlBlockElement, Gt as getEditorPlugin, H as upsertInlineFormattingContext, Ht as getPluginType, I as collapseWhiteSpaceElement, It as withPlateHistory, J as isHtmlText, K as isHtmlInlineElement, Kt as createSlatePlugin, L as inferWhiteSpaceRule, Lt as AstPlugin, M as htmlBrToNewLine, Mt as withDeleteRules, N as htmlBodyToFragment, Nt as withBreakRules, O as htmlElementToElement, Ot as OverridePlugin, P as deserializeHtmlNodeChildren, Pt as BaseParagraphPlugin, Q as withScrolling, R as collapseWhiteSpaceChildren, Rt as getContainerTypes, S as htmlStringToDOMNode, St as isSlatePluginElement, T as htmlTextNodeToString, Tt as isSlateText, U as isLastNonEmptyTextOfInlineFormattingContext, Ut as getPluginTypes, V as endInlineFormattingContext, Vt as getPluginKeys, W as collapseString, Wt as getSlatePlugin, X as AUTO_SCROLL, Y as isHtmlElement, Z as DOMPlugin, _ as withNodeId, _t as getSlateElements, a as pipeInsertDataQuery, at as isNodeAffinity, b as parseHtmlDocument, bt as isSlateLeaf, c as setValue, ct as getEdgeNodes, d as init, dt as getPluginNodeProps, et as PlateError, ft as getNodeDataAttributeKeys, g as normalizeNodeId, gt as defaultsDeepToNodes, h as NodeIdPlugin, ht as getInjectMatch, i as ParserPlugin, it as setAffinitySelection, j as getDataNodeProps, jt as withMergeRules, k as pipeDeserializeHtmlElement, kt as withOverrides, l as resetBlock, lt as mergeDeepToNodes, m as pipeOnNodeChange, mt as getInjectedPlugins, n as withSlate, nt as withChunking, o as normalizeDescendantsToDocumentFragment, ot as isNodesAffinity, p as pipeOnTextChange, pt as keyToDataAttribute, q as inlineTagNames, qt as createTSlatePlugin, r as getCorePlugins, rt as AffinityPlugin, s as SlateExtensionPlugin, st as getMarkBoundaryAffinity, t as createSlateEditor, tt as ChunkingPlugin, u as insertExitBreak, ut as getSlateClass, v as LengthPlugin, vt as isSlateEditor, w as deserializeHtmlNode, wt as isSlateString, x as deserializeHtml, xt as isSlateNode, y as HtmlPlugin, yt as isSlateElement, z as collapseWhiteSpaceNode, zt as getPluginByType } from "./withSlate-BfRR5wTZ.js";
|
|
2
2
|
import { n as createHotkey, r as isHotkey, t as Hotkeys } from "./hotkeys-DI1HPO2Q.js";
|
|
3
3
|
import { nanoid } from "nanoid";
|
|
4
4
|
import { createVanillaStore as createZustandStore } from "zustand-x/vanilla";
|
|
5
5
|
import castArray from "lodash/castArray.js";
|
|
6
|
+
import cloneDeep from "lodash/cloneDeep.js";
|
|
6
7
|
import defaultsDeep from "lodash/defaultsDeep.js";
|
|
7
8
|
|
|
8
9
|
//#region src/lib/utils/isType.ts
|
|
@@ -355,6 +356,34 @@ const removeHtmlNodesBetweenComments = (rootNode, start, end) => {
|
|
|
355
356
|
});
|
|
356
357
|
};
|
|
357
358
|
|
|
359
|
+
//#endregion
|
|
360
|
+
//#region src/lib/plugins/node-id/normalizeStaticValue.ts
|
|
361
|
+
const STATIC_VALUE_CREATED_AT = 17040672e5;
|
|
362
|
+
const createStaticIdFactory = () => {
|
|
363
|
+
let id = 0;
|
|
364
|
+
return () => `static-${String(++id).padStart(4, "0")}`;
|
|
365
|
+
};
|
|
366
|
+
const replaceStaticMetadata = (value, createdAt) => {
|
|
367
|
+
if (Array.isArray(value)) return value.map((item) => replaceStaticMetadata(item, createdAt));
|
|
368
|
+
if (!value || typeof value !== "object") return value;
|
|
369
|
+
const next = {};
|
|
370
|
+
for (const [key, nestedValue] of Object.entries(value)) {
|
|
371
|
+
if (key === "createdAt" && typeof nestedValue === "number") {
|
|
372
|
+
next[key] = createdAt;
|
|
373
|
+
continue;
|
|
374
|
+
}
|
|
375
|
+
next[key] = replaceStaticMetadata(nestedValue, createdAt);
|
|
376
|
+
}
|
|
377
|
+
return next;
|
|
378
|
+
};
|
|
379
|
+
const normalizeStaticValue = (value, options = {}) => {
|
|
380
|
+
const { createdAt = STATIC_VALUE_CREATED_AT, idCreator = createStaticIdFactory(), ...normalizeNodeIdOptions } = options;
|
|
381
|
+
return replaceStaticMetadata(normalizeNodeId(cloneDeep(value), {
|
|
382
|
+
...normalizeNodeIdOptions,
|
|
383
|
+
idCreator
|
|
384
|
+
}), createdAt);
|
|
385
|
+
};
|
|
386
|
+
|
|
358
387
|
//#endregion
|
|
359
388
|
//#region src/lib/utils/omitPluginContext.ts
|
|
360
389
|
const omitPluginContext = (ctx) => {
|
|
@@ -383,5 +412,4 @@ const overridePluginsByKey = (plugin, overrideByKey = {}, nested = false) => {
|
|
|
383
412
|
};
|
|
384
413
|
|
|
385
414
|
//#endregion
|
|
386
|
-
export { AUTO_SCROLL, AffinityPlugin, AstPlugin, BaseParagraphPlugin, CARRIAGE_RETURN, ChunkingPlugin, DOMPlugin, DebugPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, LINE_FEED, LengthPlugin, NO_BREAK_SPACE, NodeIdPlugin, OverridePlugin, ParserPlugin, PlateError, SPACE, SlateExtensionPlugin, TAB, ZERO_WIDTH_SPACE, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createHotkey, createSlateEditor, createSlatePlugin, createTSlatePlugin, createZustandStore, defaultsDeepToNodes, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, 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, mergeDeepToNodes, nanoid, normalizeDescendantsToDocumentFragment, normalizeNodeId, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };
|
|
387
|
-
//# sourceMappingURL=index.js.map
|
|
415
|
+
export { AUTO_SCROLL, AffinityPlugin, AstPlugin, BaseParagraphPlugin, CARRIAGE_RETURN, ChunkingPlugin, DOMPlugin, DebugPlugin, HistoryPlugin, Hotkeys, HtmlPlugin, LINE_FEED, LengthPlugin, NO_BREAK_SPACE, NodeIdPlugin, OverridePlugin, ParserPlugin, PlateError, SPACE, STATIC_VALUE_CREATED_AT, SlateExtensionPlugin, TAB, ZERO_WIDTH_SPACE, applyDeepToNodes, cleanHtmlBrElements, cleanHtmlCrLf, cleanHtmlEmptyElements, cleanHtmlFontElements, cleanHtmlLinkElements, cleanHtmlTextNodes, collapseString, collapseWhiteSpace, collapseWhiteSpaceChildren, collapseWhiteSpaceElement, collapseWhiteSpaceNode, collapseWhiteSpaceText, copyBlockMarksToSpanChild, createHotkey, createSlateEditor, createSlatePlugin, createTSlatePlugin, createZustandStore, defaultsDeepToNodes, deserializeHtml, deserializeHtmlElement, deserializeHtmlNode, deserializeHtmlNodeChildren, endInlineFormattingContext, findHtmlElement, 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, mergeDeepToNodes, nanoid, normalizeDescendantsToDocumentFragment, normalizeNodeId, normalizeStaticValue, omitPluginContext, overridePluginsByKey, parseHtmlDocument, parseHtmlElement, pipeDeserializeHtmlElement, pipeDeserializeHtmlLeaf, pipeInsertDataQuery, pipeOnNodeChange, pipeOnTextChange, pluginDeserializeHtml, postCleanHtml, preCleanHtml, removeHtmlNodesBetweenComments, removeHtmlSurroundings, replaceTagName, resetBlock, setAffinitySelection, setValue, someHtmlElement, traverseHtmlComments, traverseHtmlElements, traverseHtmlNode, traverseHtmlTexts, unwrapHtmlElement, upsertInlineFormattingContext, withBreakRules, withChunking, withDeleteRules, withMergeRules, withNodeId, withNormalizeRules, withOverrides, withPlateHistory, withScrolling, withSlate };
|