platejs 54.0.0-beta.2 → 54.0.0-beta.4

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.
Files changed (255) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +56 -0
  3. package/dist/{AIChatRequestContext-BMVWhfPV.d.ts → AIChatRequestContext-DrUahdTc.d.ts} +2 -2
  4. package/dist/{BaseSuggestionPlugin-DBl3fqnm.d.ts → BaseSuggestionPlugin-_7Ka6nY3.d.ts} +7 -3
  5. package/dist/{PlateStatic-DhNv2ejp.d.ts → PlateStatic-D3Cb-QwH.d.ts} +7 -7
  6. package/dist/ai/index.d.ts +1 -1
  7. package/dist/ai/react/AIChatPlugin.js +113 -78
  8. package/dist/ai/react/CopilotPlugin.js +1 -1
  9. package/dist/ai/react/index.d.ts +23 -16
  10. package/dist/authored/index.d.ts +4 -4
  11. package/dist/code-block/codemirror/createCodeMirrorAdapter.js +12 -9
  12. package/dist/code-block/codemirror/index.d.ts +1 -1
  13. package/dist/{combobox-DkBGgyd3.d.ts → combobox-Dr0OYZIE.d.ts} +2 -2
  14. package/dist/{comparison-types-CYnJ35qU.d.ts → comparison-types-DdwE6mYq-BogsHoUO.d.ts} +10 -2
  15. package/dist/compiler/index.d.ts +2 -2
  16. package/dist/{core-BJG8l_mk.d.ts → core-BqR-fEDp.d.ts} +493 -116
  17. package/dist/diff/index.d.ts +2 -2
  18. package/dist/docs/ai.md +4 -3
  19. package/dist/docs/api/core/plate-components.md +0 -19
  20. package/dist/docs/api/core/plate-controller.md +5 -3
  21. package/dist/docs/api/core/plate-plugin.md +3 -0
  22. package/dist/docs/api/core/plate-store.md +3 -3
  23. package/dist/docs/api/core.md +45 -5
  24. package/dist/docs/api/dom.md +11 -4
  25. package/dist/docs/api/editor-transforms.md +2 -1
  26. package/dist/docs/api/react-hooks.md +45 -13
  27. package/dist/docs/authored-changes.md +9 -4
  28. package/dist/docs/basic-blocks.md +42 -29
  29. package/dist/docs/block-placeholder.md +4 -2
  30. package/dist/docs/blockquote.md +5 -3
  31. package/dist/docs/board.md +118 -10
  32. package/dist/docs/code-block.md +47 -0
  33. package/dist/docs/comment.md +2 -2
  34. package/dist/docs/discussion.md +1 -1
  35. package/dist/docs/document-model.md +15 -3
  36. package/dist/docs/docx.md +1 -1
  37. package/dist/docs/dom-coverage.md +5 -0
  38. package/dist/docs/editor.md +50 -4
  39. package/dist/docs/examples/editable-voids.md +2 -3
  40. package/dist/docs/external-text.md +2 -0
  41. package/dist/docs/field.md +370 -0
  42. package/dist/docs/find.md +9 -6
  43. package/dist/docs/form.md +2 -0
  44. package/dist/docs/heading.md +6 -0
  45. package/dist/docs/installation/manual.md +0 -4
  46. package/dist/docs/link.md +3 -3
  47. package/dist/docs/llms.txt +4 -2
  48. package/dist/docs/markdown.md +270 -14
  49. package/dist/docs/plugin-components.md +13 -10
  50. package/dist/docs/plugin-input-rules.md +66 -15
  51. package/dist/docs/prompt-editor.md +205 -0
  52. package/dist/docs/roots.md +8 -6
  53. package/dist/docs/rtl.md +6 -4
  54. package/dist/docs/selection.md +7 -4
  55. package/dist/docs/suggestion.md +1 -1
  56. package/dist/docs/toolbar.md +26 -30
  57. package/dist/docs/upload.md +106 -17
  58. package/dist/docx/export/index.d.ts +3 -3
  59. package/dist/docx/export/lib/docxStaticComponents.js +12 -2
  60. package/dist/docx/export/lib/exportDocx.js +46 -17
  61. package/dist/docx/export/lib/internal/xml-builder.js +11 -16
  62. package/dist/docx/export/lib/reviewPart.js +1 -1
  63. package/dist/docx/export/lib/reviewProjection.js +52 -10
  64. package/dist/docx/import/index.d.ts +4 -4
  65. package/dist/docx/paste/index.d.ts +4 -4
  66. package/dist/dom/index.d.ts +1 -6
  67. package/dist/dom/plite-dom.internal.js +2 -2
  68. package/dist/excalidraw/index.d.ts +3 -2
  69. package/dist/excalidraw/react/index.d.ts +3 -2
  70. package/dist/facade.js +2 -2
  71. package/dist/features/basic-nodes/lib/BaseBlockPlugins.js +13 -5
  72. package/dist/features/basic-nodes/lib/BaseHeadingPlugins.js +32 -10
  73. package/dist/features/board/index.d.ts +2 -2
  74. package/dist/features/board/lib/BaseBoardPlugin.js +14 -1
  75. package/dist/features/board/lib/boardStroke.internal.js +13 -1
  76. package/dist/features/board/lib/boardTypes.internal.js +16 -0
  77. package/dist/features/callout/index.d.ts +3 -2
  78. package/dist/features/code-block/lib/BaseCodeBlockPlugin.js +14 -5
  79. package/dist/features/combobox/index.d.ts +2 -2
  80. package/dist/features/comments/BaseCommentsPlugin.js +33 -17
  81. package/dist/features/comments/index.d.ts +1 -1
  82. package/dist/features/date/index.d.ts +3 -2
  83. package/dist/features/details/index.d.ts +3 -2
  84. package/dist/features/details/lib/BaseDetailsPlugin.js +25 -12
  85. package/dist/features/field/index.d.ts +2 -0
  86. package/dist/features/field/index.js +4 -0
  87. package/dist/features/field/lib/BaseFieldPlugin.js +360 -0
  88. package/dist/features/field/lib/applyFieldValues.js +188 -0
  89. package/dist/features/field/lib/fieldRules.internal.js +204 -0
  90. package/dist/features/find/index.d.ts +3 -2
  91. package/dist/features/footnote/index.d.ts +1 -1
  92. package/dist/features/ink/index.d.ts +1 -1
  93. package/dist/features/ink/lib/BaseInkPlugin.js +126 -103
  94. package/dist/features/ink/lib/inkCodec.internal.js +130 -0
  95. package/dist/features/ink/lib/inkGone.internal.js +229 -48
  96. package/dist/features/ink/lib/inkPlaces.internal.js +534 -64
  97. package/dist/features/layout/index.d.ts +1 -1
  98. package/dist/features/link/lib/BaseLinkPlugin.js +6 -4
  99. package/dist/features/lint/index.d.ts +3 -2
  100. package/dist/features/media/index.d.ts +2 -2
  101. package/dist/features/media/index.js +2 -2
  102. package/dist/features/media/lib/media/parseMediaUrl.js +11 -1
  103. package/dist/features/media/lib/media-embed/BaseMediaEmbedPlugin.js +206 -4
  104. package/dist/features/mention/index.d.ts +5 -4
  105. package/dist/features/suggestion/index.d.ts +1 -1
  106. package/dist/features/table/index.d.ts +1 -1
  107. package/dist/features/table/lib/BaseTablePlugin.js +64 -15
  108. package/dist/features/table/lib/internal/selection.js +4 -2
  109. package/dist/features/toc/index.d.ts +1 -1
  110. package/dist/features/upload/index.d.ts +2 -2
  111. package/dist/features/upload/lib/BaseUploadPlugin.js +464 -250
  112. package/dist/history/index.d.ts +2 -2
  113. package/dist/html/index.d.ts +3 -3
  114. package/dist/html/server/index.d.ts +1 -1
  115. package/dist/{htmlTypes-DjeFG3P8.d.ts → htmlTypes-eT2ZGDAj.d.ts} +2 -31
  116. package/dist/hyperscript/index.d.ts +1 -1
  117. package/dist/{index-DzD6BIFJ.d.ts → index-B33E1CRJ.d.ts} +295 -6
  118. package/dist/{index-Cl77E9yr.d.ts → index-B7moSod7.d.ts} +2 -2
  119. package/dist/{index-hsC_sOn2.d.ts → index-B8-5Sr7I.d.ts} +35 -5
  120. package/dist/{index-BiQerPJS.d.ts → index-B8QJDAmG.d.ts} +2 -2
  121. package/dist/{index-BBKGrsG3.d.ts → index-BTx5oK7k.d.ts} +1 -1
  122. package/dist/{index-iaZOhA76.d.ts → index-BWPcE4ac-Cto_IsNs.d.ts} +7 -1
  123. package/dist/{index-BU6k1Aev.d.ts → index-BXjLmx1n-CXk17buG.d.ts} +4781 -4584
  124. package/dist/{index-kLKMc-pI.d.ts → index-BXwU9QH6.d.ts} +2 -2
  125. package/dist/{index-DTgaSxKr.d.ts → index-BkwR-5hH.d.ts} +40 -4
  126. package/dist/{index-Bq3sdm3S.d.ts → index-BsV2McRr.d.ts} +5 -4
  127. package/dist/index-C9Fu-P4E.d.ts +773 -0
  128. package/dist/{index-D5W-p9bS.d.ts → index-Ca48r1ng.d.ts} +49 -4
  129. package/dist/{index-CcZbqPqk.d.ts → index-Cob_iBdu.d.ts} +116 -41
  130. package/dist/{index-Bxfvicyy.d.ts → index-CpY7Xnxw.d.ts} +4 -3
  131. package/dist/{index-BkR7-GLI.d.ts → index-DNQXzU-X.d.ts} +2 -2
  132. package/dist/{index-D1CFXA-i.d.ts → index-DPowErHa.d.ts} +471 -141
  133. package/dist/{index-DaM37gF6.d.ts → index-DShbzec2.d.ts} +38 -23
  134. package/dist/{index-DC_MNGyu.d.ts → index-DYdObeFQ.d.ts} +3 -3
  135. package/dist/{index-Bc2Yg_2j.d.ts → index-Dq3Jlj8O-BJ6NxZm0.d.ts} +2 -2
  136. package/dist/{index-CT7miqQN.d.ts → index-DwWQVwQt.d.ts} +29 -11
  137. package/dist/{index-xdmCBvlT.d.ts → index-JWgwL5l3.d.ts} +5 -2
  138. package/dist/{index-DLA2DUR2.d.ts → index-M781pyx9.d.ts} +4 -3
  139. package/dist/{index-DdIRduDG.d.ts → index-d7io3MzC.d.ts} +3 -2
  140. package/dist/index.d.ts +4 -4
  141. package/dist/{react/internal → internal}/penStroke.internal.js +1 -1
  142. package/dist/internal/plugin/OverridePlugin.js +101 -119
  143. package/dist/internal/plugin/collectPlateNodeMappings.js +5 -1
  144. package/dist/internal/plugin/pastedUploadFiles.js +4 -0
  145. package/dist/internal/plugin/resolvePlugin.js +1 -1
  146. package/dist/internal/plugin/resolvePlugins.js +3 -0
  147. package/dist/internal/plugin/uploadDrafts.js +6 -0
  148. package/dist/internal/utils/mergePlugins.js +1 -0
  149. package/dist/lib/plugins/element-id/ElementIdPlugin.js +14 -18
  150. package/dist/lib/plugins/html/HtmlPlugin.js +9 -0
  151. package/dist/lib/plugins/html/htmlSafety.js +1 -1
  152. package/dist/lib/plugins/input-rules/InputRulesPlugin.js +77 -28
  153. package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +16 -0
  154. package/dist/markdown/index.d.ts +2 -2
  155. package/dist/markdown/index.js +3 -1
  156. package/dist/markdown/lib/MarkdownPlugin.js +14 -11
  157. package/dist/markdown/lib/RawHtmlPlugin.js +26 -0
  158. package/dist/markdown/lib/deserializer/mdastToSlate.js +12 -2
  159. package/dist/markdown/lib/internal/markdownConversion.js +776 -74
  160. package/dist/markdown/lib/internal/markdownDiagnostics.js +18 -7
  161. package/dist/markdown/lib/internal/markdownFootnoteWriter.js +35 -0
  162. package/dist/markdown/lib/internal/markdownFrontmatter.js +102 -0
  163. package/dist/markdown/lib/internal/markdownIntrinsics.js +125 -43
  164. package/dist/markdown/lib/internal/markdownLine.js +5 -3
  165. package/dist/markdown/lib/internal/markdownMappings.js +19 -7
  166. package/dist/markdown/lib/internal/markdownOpenTail.js +381 -0
  167. package/dist/markdown/lib/internal/markdownRawHtml.js +353 -0
  168. package/dist/markdown/lib/internal/markdownSegments.js +57 -48
  169. package/dist/markdown/lib/internal/markdownTags.js +29 -9
  170. package/dist/markdown/lib/serializer/convertNodesSerialize.js +10 -8
  171. package/dist/markdown/lib/serializer/convertPhrasingSerialize.js +226 -0
  172. package/dist/markdown/lib/serializer/listToMdastTree.js +2 -0
  173. package/dist/math/index.d.ts +3 -2
  174. package/dist/math/react/index.d.ts +4 -3
  175. package/dist/migrations/index.d.ts +3 -3
  176. package/dist/migrations/migratePlateV54.js +4 -6
  177. package/dist/migrations/migratePlateV54RetiredMarks.internal.js +23 -8
  178. package/dist/migrations/migratePlateV54Suggestions.internal.js +2 -2
  179. package/dist/migrations/v53-manifest.internal.js +4 -0
  180. package/dist/pagination/index.d.ts +1 -1
  181. package/dist/pagination/react/index.d.ts +4 -4
  182. package/dist/react/components/EditorContentView.internal.js +42 -23
  183. package/dist/react/components/EditorProvider.js +5 -5
  184. package/dist/react/components/Plate.js +102 -128
  185. package/dist/react/components/PlateContainer.js +40 -32
  186. package/dist/react/components/PlateController.js +28 -16
  187. package/dist/react/components/PlateRoot.internal.js +3 -2
  188. package/dist/react/core.js +4 -4
  189. package/dist/react/features/board/BoardSurface.js +116 -87
  190. package/dist/react/features/board/boardClipboard.internal.js +15 -5
  191. package/dist/react/features/board/boardExport.internal.js +470 -0
  192. package/dist/react/features/board/boardGesture.internal.js +6 -3
  193. package/dist/react/features/board/boardIndex.internal.js +7 -18
  194. package/dist/react/features/board/boardPictureStyles.internal.js +415 -0
  195. package/dist/react/features/board/boardPictures.internal.js +19 -13
  196. package/dist/react/features/board/boardView.internal.js +190 -50
  197. package/dist/react/features/board/boardVoice.internal.js +10 -11
  198. package/dist/react/features/board/index.d.ts +108 -18
  199. package/dist/react/features/callout/index.d.ts +3 -2
  200. package/dist/react/features/combobox/index.d.ts +8 -8
  201. package/dist/react/features/comments/index.d.ts +6 -5
  202. package/dist/react/features/date/index.d.ts +4 -3
  203. package/dist/react/features/details/index.d.ts +4 -3
  204. package/dist/react/features/field/FieldPlugin.js +35 -0
  205. package/dist/react/features/field/index.d.ts +315 -0
  206. package/dist/react/features/field/index.js +2 -0
  207. package/dist/react/features/footnote/index.d.ts +7 -6
  208. package/dist/react/features/format-painter/index.d.ts +4 -3
  209. package/dist/react/features/ink/InkContent.js +313 -0
  210. package/dist/react/features/ink/index.d.ts +57 -33
  211. package/dist/react/features/ink/index.js +2 -2
  212. package/dist/react/features/ink/inkCapture.internal.js +39 -17
  213. package/dist/react/features/ink/inkInput.internal.js +1 -1
  214. package/dist/react/features/ink/inkLayout.internal.js +6 -3
  215. package/dist/react/features/ink/inkPaint.internal.js +78 -2
  216. package/dist/react/features/ink/inkPlacement.internal.js +332 -104
  217. package/dist/react/features/ink/inkWatch.internal.js +7 -5
  218. package/dist/react/features/layout/index.d.ts +5 -4
  219. package/dist/react/features/media/index.d.ts +5 -4
  220. package/dist/react/features/mention/index.d.ts +6 -5
  221. package/dist/react/features/resizable/Resizable.js +4 -6
  222. package/dist/react/features/resizable/index.d.ts +5 -5
  223. package/dist/react/features/suggestion/index.d.ts +6 -5
  224. package/dist/react/features/table/TablePlugin.js +4 -11
  225. package/dist/react/features/table/index.d.ts +10 -8
  226. package/dist/react/features/table/useTableResize.js +10 -1
  227. package/dist/react/features/toc/index.d.ts +2 -2
  228. package/dist/react/features/upload/index.d.ts +11 -6
  229. package/dist/react/index.d.ts +6 -6
  230. package/dist/react/index.js +4 -4
  231. package/dist/react/internal/plate-context.js +434 -188
  232. package/dist/react/plite-react.js +2 -2
  233. package/dist/react/plugins/navigation-feedback/NavigationFeedbackPlugin.js +12 -10
  234. package/dist/react/stores/plate/useEditor.js +32 -14
  235. package/dist/react/stores/plate/useEditorHistory.js +55 -0
  236. package/dist/react/stores/plate/useEditorSelector.js +79 -21
  237. package/dist/react/utils/BlockPlaceholderPlugin.js +5 -2
  238. package/dist/react/utils/pipeRenderElement.internal.js +1 -1
  239. package/dist/react/utils/pluginRenderElement.internal.js +1 -1
  240. package/dist/react/virtualized.d.ts +4 -4
  241. package/dist/{source-CNKy99Th.d.ts → source-BGohy8vH.d.ts} +4 -4
  242. package/dist/static/index.d.ts +18 -18
  243. package/dist/static/internal/renderStaticHtmlWithOverrides.js +2 -2
  244. package/dist/static/internal/staticPresentation.js +4 -4
  245. package/dist/static/internal/writeStaticSelectionClipboardData.js +7 -2
  246. package/dist/tabbable/index.d.ts +1 -1
  247. package/dist/tabbable/react/index.d.ts +3 -3
  248. package/dist/testing/index.d.ts +3 -3
  249. package/dist/yjs/index.d.ts +1 -1
  250. package/dist/yjs/react/index.d.ts +6 -6
  251. package/package.json +20 -2
  252. package/dist/markdown/lib/serializer/convertTextsSerialize.js +0 -163
  253. package/dist/react/components/EditorSelectionView.js +0 -40
  254. package/dist/react/features/ink/InkLayer.js +0 -218
  255. package/dist/react/internal/createPlateTargetScope.js +0 -62
@@ -1,16 +1,180 @@
1
- import { goneIn } from "./inkGone.internal.js";
1
+ import { ElementApi, MAIN_ROOT_KEY, getActiveEditorUpdateId, getDocumentValueNode, getEditorCommitNode, getEditorCommitValue, getEditorRuntimeOwner, getRecordSetVersion, getSnapshotVersion, getValueRecords, readElementById, readShownDocument, readShownRecords, recordSetChanges, withStoredAuthoredRead } from "../../../facade.js";
2
+ import { COPIES, GONE, MARKS, besideAt, goneIn, idOf, reachGone, walkGone } from "./inkGone.internal.js";
2
3
  import { inkText } from "./inkMatch.internal.js";
3
4
  //#region src/features/ink/lib/inkPlaces.internal.ts
4
- const indexes = /* @__PURE__ */ new WeakMap();
5
- const resolveBlock = (places, state, id) => {
6
- const holder = state.unique.holder("id", id);
7
- const [node] = holder && state.nodes.get(holder.key) || [];
8
- if (!holder || !node) return;
9
- const text = inkText(state.schema, node);
10
- for (const [copyId, copy] of places.blocks.get(id) ?? []) places.held.set(copyId, {
11
- key: holder.key,
12
- kind: text === copy.text ? "live" : "changed"
5
+ const committed = /* @__PURE__ */ new WeakMap();
6
+ const shownPlaces = /* @__PURE__ */ new WeakMap();
7
+ const metrics = {
8
+ chains: 0,
9
+ holders: 0,
10
+ hops: 0,
11
+ reads: 0,
12
+ resolved: 0
13
+ };
14
+ const work = {
15
+ copies: 0,
16
+ directions: 0,
17
+ groups: 0,
18
+ members: 0,
19
+ signs: 0
20
+ };
21
+ const emptyPlaces = (schema) => ({
22
+ blockOfKey: /* @__PURE__ */ new Map(),
23
+ blocks: /* @__PURE__ */ new Map(),
24
+ chainEnds: {
25
+ next: /* @__PURE__ */ new Map(),
26
+ previous: /* @__PURE__ */ new Map()
27
+ },
28
+ changed: /* @__PURE__ */ new Set(),
29
+ copies: /* @__PURE__ */ new Map(),
30
+ groups: /* @__PURE__ */ new Map(),
31
+ held: /* @__PURE__ */ new Map(),
32
+ identity: schema.identity(),
33
+ schema,
34
+ signs: /* @__PURE__ */ new Map(),
35
+ stale: /* @__PURE__ */ new Map(),
36
+ walked: /* @__PURE__ */ new Set()
37
+ });
38
+ const START = {
39
+ beside: { at: "start" },
40
+ kind: "gone"
41
+ };
42
+ const beside = (side, key) => ({
43
+ beside: {
44
+ at: side === "previous" ? "after" : "before",
45
+ key
46
+ },
47
+ kind: "gone"
48
+ });
49
+ const keyOf = (place) => place.kind !== "gone" ? `on:${place.key}` : place.beside.at === "start" ? "start" : `${place.beside.at}:${place.beside.key}`;
50
+ const byMark = (a, b) => a.at - b.at || (a.id < b.id ? -1 : 1);
51
+ const size = (of) => of.marks.ltr.length + of.marks.rtl.length + of.pending.size;
52
+ const touch = (places) => {
53
+ places.deleted = void 0;
54
+ work.groups += 1;
55
+ };
56
+ const groupAt = (places, place, anchor) => {
57
+ let group = places.groups.get(keyOf(place));
58
+ if (!group) {
59
+ group = {
60
+ anchor,
61
+ blocks: /* @__PURE__ */ new Set(),
62
+ ids: {
63
+ ltr: [],
64
+ rtl: []
65
+ },
66
+ marks: {
67
+ ltr: [],
68
+ rtl: []
69
+ },
70
+ members: /* @__PURE__ */ new Map(),
71
+ pending: /* @__PURE__ */ new Map(),
72
+ place,
73
+ sign: {
74
+ place,
75
+ state: "deleted"
76
+ }
77
+ };
78
+ places.groups.set(keyOf(place), group);
79
+ touch(places);
80
+ }
81
+ return group;
82
+ };
83
+ const pend = (places, kept, joins = true) => {
84
+ kept.group?.pending.set(kept.mark.id, {
85
+ joins,
86
+ mark: kept.mark
13
87
  });
88
+ if (kept.group) places.changed.add(kept.group);
89
+ places.deleted = void 0;
90
+ };
91
+ const dropSign = (places, mark) => {
92
+ const kept = places.signs.get(mark);
93
+ for (const { block } of kept?.copies ?? []) places.blocks.get(block)?.signed.delete(mark);
94
+ if (!kept) return;
95
+ pend(places, kept, false);
96
+ places.signs.delete(mark);
97
+ places.stale.set(mark, kept.mark);
98
+ };
99
+ const dissolve = (places, from, into) => {
100
+ const key = keyOf(from.place);
101
+ if (places.groups.get(key) === from) places.groups.delete(key);
102
+ places.changed.delete(from);
103
+ touch(places);
104
+ for (const id of from.blocks) {
105
+ const block = places.blocks.get(id);
106
+ into?.blocks.add(id);
107
+ if (block?.group === from) block.group = into;
108
+ }
109
+ for (const id of [...[...from.marks.ltr, ...from.marks.rtl].map((mark) => mark.id), ...from.pending.keys()]) {
110
+ const kept = places.signs.get(id);
111
+ if (kept?.group !== from) continue;
112
+ kept.group = into;
113
+ if (into) pend(places, kept);
114
+ else dropSign(places, id);
115
+ }
116
+ };
117
+ const moveGroup = (places, group, place, anchor) => {
118
+ const there = places.groups.get(keyOf(place));
119
+ places.groups.delete(keyOf(group.place));
120
+ touch(places);
121
+ Object.assign(group, {
122
+ anchor,
123
+ place,
124
+ sign: {
125
+ place,
126
+ state: "deleted"
127
+ }
128
+ });
129
+ const merges = there !== void 0 && size(there) >= size(group);
130
+ const into = merges ? there : group;
131
+ places.groups.set(keyOf(place), into);
132
+ if (there) dissolve(places, merges ? group : there, into);
133
+ };
134
+ const holderIn = (state, id) => {
135
+ metrics.holders += 1;
136
+ const entry = readElementById(state.nodes, id);
137
+ return entry ? {
138
+ key: entry.key,
139
+ node: entry.node,
140
+ root: entry.root ?? MAIN_ROOT_KEY
141
+ } : void 0;
142
+ };
143
+ const keptHolderIn = (commit, holder) => {
144
+ const [node] = holder && getEditorCommitNode(commit, holder.key, holder.root) || [];
145
+ return holder && node ? {
146
+ ...holder,
147
+ node
148
+ } : void 0;
149
+ };
150
+ const resolveBlock = (places, id, at) => {
151
+ const block = places.blocks.get(id);
152
+ if (!block) return;
153
+ metrics.resolved += 1;
154
+ if (block.holder?.key !== at?.key) {
155
+ if (block.holder && places.blockOfKey.get(block.holder.key) === id) places.blockOfKey.delete(block.holder.key);
156
+ if (at) places.blockOfKey.set(at.key, id);
157
+ block.holder = at ? {
158
+ key: at.key,
159
+ root: at.root
160
+ } : null;
161
+ }
162
+ const text = at && inkText(places.schema, at.node);
163
+ let moved = false;
164
+ for (const [copyId, copy] of block.copies) {
165
+ const was = places.held.get(copyId);
166
+ const kind = text === copy.text ? "live" : "changed";
167
+ if (at ? was?.key === at.key && was.kind === kind : !was) continue;
168
+ if (at) places.held.set(copyId, {
169
+ key: at.key,
170
+ kind
171
+ });
172
+ else places.held.delete(copyId);
173
+ moved = true;
174
+ }
175
+ if (at) block.group?.blocks.delete(id);
176
+ if (at) block.group = void 0;
177
+ if (moved) for (const mark of block.signed) dropSign(places, mark);
14
178
  };
15
179
  const trackCopy = (places, read, id) => {
16
180
  const tracked = places.copies.get(id);
@@ -19,67 +183,373 @@ const trackCopy = (places, read, id) => {
19
183
  if (!copy) return void 0;
20
184
  const block = places.blocks.get(copy.block);
21
185
  places.copies.set(id, copy);
22
- if (block) block.set(id, copy);
23
- else places.blocks.set(copy.block, /* @__PURE__ */ new Map([[id, copy]]));
24
- resolveBlock(places, read.state, copy.block);
186
+ if (block) block.copies.set(id, copy);
187
+ else places.blocks.set(copy.block, {
188
+ copies: /* @__PURE__ */ new Map([[id, copy]]),
189
+ holder: null,
190
+ signed: /* @__PURE__ */ new Set()
191
+ });
192
+ resolveBlock(places, copy.block, holderIn(read.state, copy.block));
25
193
  return copy;
26
194
  };
27
- const nearestPresent = (places, state, records, id, side) => {
28
- const chainEnds = places.chainEnds[side];
29
- const walked = /* @__PURE__ */ new Set([id]);
30
- let end = id;
31
- let at = chainEnds.get(id) ?? goneIn(records, id)?.[side];
32
- let found;
33
- while (at !== void 0 && !walked.has(at)) {
34
- end = at;
35
- const holder = state.unique.holder("id", at);
36
- if (holder) {
37
- found = holder;
38
- break;
39
- }
40
- walked.add(at);
41
- at = chainEnds.get(at) ?? goneIn(records, at)?.[side];
42
- }
43
- for (const passed of walked) if (passed !== end) chainEnds.set(passed, end);
44
- return found;
195
+ const untrackCopy = (places, id) => {
196
+ const copy = places.copies.get(id);
197
+ const block = copy && places.blocks.get(copy.block);
198
+ if (!copy || !block) return;
199
+ for (const mark of block.signed) dropSign(places, mark);
200
+ places.copies.delete(id);
201
+ places.held.delete(id);
202
+ block.copies.delete(id);
203
+ if (block.copies.size > 0) return;
204
+ places.blocks.delete(copy.block);
205
+ block.group?.blocks.delete(copy.block);
206
+ if (block.holder && places.blockOfKey.get(block.holder.key) === copy.block) places.blockOfKey.delete(block.holder.key);
45
207
  };
46
- const placeOf = (places, read, copyId) => {
47
- const copy = trackCopy(places, read, copyId);
48
- if (!copy) return void 0;
49
- const known = places.held.get(copyId) ?? places.gone.get(copyId);
50
- if (known) return known;
51
- const { records } = read.state.value();
52
- const previous = nearestPresent(places, read.state, records, copy.block, "previous");
53
- const anchor = previous ?? nearestPresent(places, read.state, records, copy.block, "next");
54
- const gone = {
55
- beside: anchor ? {
56
- at: previous ? "after" : "before",
57
- key: anchor.key
58
- } : { at: "start" },
59
- kind: "gone"
208
+ const startEpoch = (places) => {
209
+ places.chainEnds.next.clear();
210
+ places.chainEnds.previous.clear();
211
+ places.walked.clear();
212
+ for (const group of [...places.groups.values()]) if (group.place.kind === "gone") dissolve(places, group);
213
+ };
214
+ const walkIn = (state, gone) => ({
215
+ holder: (id) => readElementById(state.nodes, id) ?? void 0,
216
+ record: (id) => goneIn(gone, id)
217
+ });
218
+ const goneGroupOf = (places, read, id) => {
219
+ const block = places.blocks.get(id);
220
+ if (block?.group) return block.group;
221
+ const gone = getRecordSetVersion(readShownRecords(read.editor), GONE);
222
+ const memo = {
223
+ ...places.chainEnds,
224
+ walked: places.walked
60
225
  };
61
- places.gone.set(copyId, gone);
62
- return gone;
226
+ const { found, last } = walkGone(walkIn(read.state, gone), id, memo, metrics);
227
+ const group = found ? groupAt(places, beside(found.side, found.holder.key), {
228
+ ...found,
229
+ top: last
230
+ }) : groupAt(places, START);
231
+ group.blocks.add(id);
232
+ if (block) block.group = group;
233
+ return group;
63
234
  };
64
- const placesOf = ({ state }) => {
65
- const value = state.value();
66
- const identity = state.schema.identity();
67
- const kept = indexes.get(value);
68
- if (kept?.identity === identity) return kept;
69
- const places = {
70
- blocks: /* @__PURE__ */ new Map(),
71
- chainEnds: {
72
- next: /* @__PURE__ */ new Map(),
73
- previous: /* @__PURE__ */ new Map()
235
+ const reanchor = (places, state, gone, group) => {
236
+ const { anchor, place } = group;
237
+ if (!anchor || place.kind !== "gone" || place.beside.at === "start") return;
238
+ metrics.holders += 1;
239
+ const holder = readElementById(state.nodes, anchor.id);
240
+ const memo = {
241
+ ...places.chainEnds,
242
+ walked: places.walked
243
+ };
244
+ const walk = walkIn(state, gone);
245
+ const back = holder ? {
246
+ found: {
247
+ holder,
248
+ id: anchor.id,
249
+ side: anchor.side
74
250
  },
75
- copies: /* @__PURE__ */ new Map(),
76
- gone: /* @__PURE__ */ new Map(),
77
- held: /* @__PURE__ */ new Map(),
78
- identity
251
+ last: anchor.top
252
+ } : reachGone(walk, anchor.id, anchor.side, memo, metrics);
253
+ const top = goneIn(gone, anchor.id) ? back.last : anchor.top;
254
+ const found = back.found ?? (anchor.side === "previous" ? reachGone(walk, top, "next", memo, metrics).found : void 0);
255
+ if (found?.side === anchor.side && found.holder.key === place.beside.key) return;
256
+ if (found) moveGroup(places, group, beside(found.side, found.holder.key), {
257
+ ...found,
258
+ top
259
+ });
260
+ else dissolve(places, group);
261
+ };
262
+ const keepSign = (places, read, mark) => {
263
+ work.signs += 1;
264
+ const copies = mark.blocks.flatMap((block) => trackCopy(places, read, block.copy) ?? []);
265
+ places.stale.delete(mark.id);
266
+ if (copies.length < mark.blocks.length) return void 0;
267
+ const held = copies.map((copy) => places.held.get(copy.id));
268
+ const shown = held.findIndex((place) => place?.kind !== "live");
269
+ const place = held[shown];
270
+ const kept = {
271
+ copies,
272
+ mark
79
273
  };
80
- indexes.set(value, places);
274
+ if (held.includes(void 0)) {
275
+ kept.group = place ? groupAt(places, place) : goneGroupOf(places, read, copies[shown].block);
276
+ pend(places, kept);
277
+ } else if (!mark.margin && place?.kind === "changed") kept.changed = {
278
+ place,
279
+ state: "changed"
280
+ };
281
+ places.signs.set(mark.id, kept);
282
+ for (const { block } of copies) places.blocks.get(block)?.signed.add(mark.id);
283
+ return kept;
284
+ };
285
+ const placesOf = ({ editor, state }) => {
286
+ const identity = state.schema.identity();
287
+ const owner = getEditorRuntimeOwner(editor);
288
+ const version = getSnapshotVersion(owner);
289
+ const document = readShownDocument(editor) ?? (getActiveEditorUpdateId(editor) ? state.value() : null);
290
+ if (document) {
291
+ const shown = shownPlaces.get(document);
292
+ if (shown?.version === version && shown.places.identity === identity) return shown.places;
293
+ const places = emptyPlaces(state.schema);
294
+ shownPlaces.set(document, {
295
+ places,
296
+ version
297
+ });
298
+ return places;
299
+ }
300
+ const kept = committed.get(owner);
301
+ if (kept?.version === version && kept.places.identity === identity) return kept.places;
302
+ const store = getValueRecords(state.value());
303
+ const places = emptyPlaces(state.schema);
304
+ committed.set(owner, {
305
+ places,
306
+ sets: {
307
+ [COPIES]: getRecordSetVersion(store, COPIES),
308
+ [GONE]: getRecordSetVersion(store, GONE),
309
+ [MARKS]: getRecordSetVersion(store, MARKS)
310
+ },
311
+ version
312
+ });
81
313
  return places;
82
314
  };
83
- const readInkPlace = (read, copyId) => placeOf(placesOf(read), read, copyId);
315
+ const memoUpdates = /* @__PURE__ */ new WeakSet();
316
+ const takeFirstChangeWalkMemo = (editor) => {
317
+ const owner = getEditorRuntimeOwner(editor);
318
+ const kept = committed.get(owner);
319
+ const update = getActiveEditorUpdateId(editor);
320
+ if (!update || memoUpdates.has(update)) return void 0;
321
+ memoUpdates.add(update);
322
+ return kept?.version === getSnapshotVersion(owner) ? kept.places.chainEnds : void 0;
323
+ };
324
+ const readInkPlace = (read, copyId) => {
325
+ const places = placesOf(read);
326
+ const copy = trackCopy(places, read, copyId);
327
+ return copy && (places.held.get(copy.id) ?? goneGroupOf(places, read, copy.block).place);
328
+ };
329
+ const indexedMark = (places, read, mark) => places.signs.get(mark.id) ?? keepSign(places, read, mark);
330
+ const readInkIndexedMark = (read, mark) => indexedMark(placesOf(read), read, mark);
331
+ const readInkSign = (read, mark) => {
332
+ const kept = indexedMark(placesOf(read), read, mark);
333
+ return kept?.group?.sign ?? kept?.changed;
334
+ };
335
+ const placeIn = (marks, mark) => {
336
+ let from = 0;
337
+ let to = marks.length;
338
+ while (from < to) {
339
+ const at = from + to >>> 1;
340
+ work.members += 1;
341
+ if (byMark(marks[at], mark) < 0) from = at + 1;
342
+ else to = at;
343
+ }
344
+ return from;
345
+ };
346
+ const byCut = (a, b) => a.at - b.at || (a.mark && b.mark ? byMark(a.mark, b.mark) : a.mark ? -1 : b.mark ? 1 : 0);
347
+ const cutIn = (group, direction, cuts) => {
348
+ const marks = group.marks[direction];
349
+ const ids = group.ids[direction];
350
+ const nextMarks = [];
351
+ const nextIds = [];
352
+ let from = 0;
353
+ const keep = (to) => {
354
+ for (; from < to; from++) {
355
+ nextMarks.push(marks[from]);
356
+ nextIds.push(ids[from]);
357
+ }
358
+ };
359
+ work.copies += 1;
360
+ for (const { at, mark } of cuts) {
361
+ keep(at);
362
+ if (mark) {
363
+ nextMarks.push(mark);
364
+ nextIds.push(mark.id);
365
+ } else from += 1;
366
+ }
367
+ keep(marks.length);
368
+ group.marks[direction] = nextMarks;
369
+ group.ids[direction] = nextIds;
370
+ };
371
+ const settle = (places, group) => {
372
+ const cuts = {
373
+ ltr: [],
374
+ rtl: []
375
+ };
376
+ for (const [id, { joins, mark }] of group.pending) {
377
+ const member = group.members.get(id);
378
+ if (member) {
379
+ cuts[member.direction].push({ at: placeIn(group.marks[member.direction], member) });
380
+ group.members.delete(id);
381
+ }
382
+ if (joins) {
383
+ cuts[mark.direction].push({
384
+ at: placeIn(group.marks[mark.direction], mark),
385
+ mark
386
+ });
387
+ group.members.set(id, mark);
388
+ }
389
+ }
390
+ for (const direction of ["ltr", "rtl"]) {
391
+ if (cuts[direction].length === 0) continue;
392
+ work.directions += 1;
393
+ cutIn(group, direction, cuts[direction].sort(byCut));
394
+ }
395
+ group.pending.clear();
396
+ if (group.blocks.size + size(group) === 0) places.groups.delete(keyOf(group.place));
397
+ };
398
+ const readInkDeletedSigns = (read) => {
399
+ const places = placesOf(read);
400
+ const marks = read.marks();
401
+ if (places.listed !== marks) {
402
+ places.listed = marks;
403
+ for (const mark of marks) if (places.signs.get(mark.id)?.mark !== mark) dropSign(places, mark.id);
404
+ places.stale = new Map(marks.flatMap((mark) => places.signs.has(mark.id) ? [] : [[mark.id, mark]]));
405
+ }
406
+ for (const mark of places.stale.values()) keepSign(places, read, mark);
407
+ if (places.deleted) return places.deleted;
408
+ for (const group of places.changed) settle(places, group);
409
+ places.changed.clear();
410
+ places.deleted = Object.freeze([...places.groups.values()].flatMap(({ ids, marks: of, place }) => ["ltr", "rtl"].flatMap((direction) => of[direction].length > 0 ? [{
411
+ ids: ids[direction],
412
+ marks: of[direction],
413
+ place
414
+ }] : [])).sort((a, b) => byMark(a.marks[0], b.marks[0])));
415
+ return places.deleted;
416
+ };
417
+ const addArrivedBlocks = (places, state, keys, dirty) => {
418
+ for (const key of keys) {
419
+ const [node] = state.nodes.get(key) ?? [];
420
+ const id = node && idOf(node);
421
+ if (id === void 0) continue;
422
+ if (places.blocks.has(id)) dirty.add(id);
423
+ if (places.walked.has(id)) startEpoch(places);
424
+ }
425
+ };
426
+ const slideRemoval = (places, commit, gone) => {
427
+ const { changed } = commit;
428
+ const removed = new Set(changed.nodeKeysAll("presence"));
429
+ if (removed.size === 0 || changed.hasAny("properties")) return false;
430
+ const { index } = commit.before;
431
+ const value = getEditorCommitValue(commit, "before");
432
+ const left = /* @__PURE__ */ new Map();
433
+ for (const key of removed) {
434
+ const path = index.pathOf(key);
435
+ const node = path && getDocumentValueNode(value, path);
436
+ if (!node) return false;
437
+ if (ElementApi.isElement(node) && node.children.some((_, at) => {
438
+ const child = index.keyAt([...path, at]);
439
+ return !child || !removed.has(child);
440
+ })) return false;
441
+ left.set(key, {
442
+ id: idOf(node),
443
+ path
444
+ });
445
+ }
446
+ const ids = new Set([...left.values()].flatMap(({ id }) => id ?? []));
447
+ const skips = (path) => {
448
+ const key = index.keyAt(path);
449
+ return !key || removed.has(key);
450
+ };
451
+ const keptBeside = (path, side) => {
452
+ const found = side === "previous" ? besideAt(value, path, -1, skips) : besideAt(value, [...path.slice(0, -1), (path.at(-1) ?? 0) + 1], 1, skips);
453
+ const key = found && index.keyAt(found.path);
454
+ return found && key ? {
455
+ id: found.id,
456
+ key
457
+ } : void 0;
458
+ };
459
+ const known = (id) => ids.has(id) || places.walked.has(id);
460
+ const walk = {
461
+ holder: (id) => known(id) ? void 0 : id,
462
+ record: (id) => goneIn(gone, id)
463
+ };
464
+ const memo = {
465
+ ...places.chainEnds,
466
+ walked: places.walked
467
+ };
468
+ const landing = (id, path, side, top) => {
469
+ const first = reachGone(walk, id, side, memo, metrics);
470
+ const from = first.found || side === "next" || top === void 0 ? void 0 : goneIn(gone, id) ? first.last : top;
471
+ const found = first.found ?? (from === void 0 ? void 0 : reachGone(walk, from, "next", memo, metrics).found);
472
+ const to = found && keptBeside(path, found.side);
473
+ if (!found) return {
474
+ anchor: void 0,
475
+ key: void 0
476
+ };
477
+ if (to?.id !== found.id) return void 0;
478
+ return {
479
+ anchor: {
480
+ id: to.id,
481
+ side: found.side,
482
+ top: from ?? first.last
483
+ },
484
+ key: to.key
485
+ };
486
+ };
487
+ const steps = [];
488
+ for (const [key, { id, path }] of left) {
489
+ const block = places.blockOfKey.get(key);
490
+ for (const side of ["previous", "next"]) {
491
+ const group = places.groups.get(keyOf(beside(side, key)));
492
+ const anchor = group?.anchor;
493
+ const hints = side === "previous" && block !== void 0;
494
+ if (anchor && anchor.id !== id) return false;
495
+ if (id === void 0 || !(anchor || hints)) continue;
496
+ const lands = landing(id, path, side, anchor?.top);
497
+ if (anchor && !lands) return false;
498
+ if (!lands) continue;
499
+ steps.push(() => {
500
+ const into = lands.anchor && lands.key && beside(lands.anchor.side, lands.key);
501
+ if (group && places.groups.get(keyOf(group.place)) === group) if (into) moveGroup(places, group, into, lands.anchor);
502
+ else dissolve(places, group);
503
+ const kept = block !== void 0 && places.blocks.get(block);
504
+ if (!hints || !into || !kept || lands.anchor?.side !== side) return;
505
+ kept.group = groupAt(places, into, lands.anchor);
506
+ kept.group.blocks.add(block);
507
+ });
508
+ }
509
+ }
510
+ for (const step of steps) step();
511
+ return true;
512
+ };
513
+ const advanceInkPlaces = (editor, commit) => {
514
+ const owner = getEditorRuntimeOwner(editor);
515
+ const kept = committed.get(owner);
516
+ if (!kept || commit.version <= kept.version) return;
517
+ if (commit.previousVersion !== kept.version || commit.changed.hasAny("replace")) {
518
+ committed.delete(owner);
519
+ return;
520
+ }
521
+ const { places, sets } = kept;
522
+ const { changed } = commit;
523
+ const store = getValueRecords(getEditorCommitValue(commit));
524
+ const changedIn = (set) => {
525
+ const before = sets[set];
526
+ sets[set] = getRecordSetVersion(store, set);
527
+ return recordSetChanges(before, sets[set]);
528
+ };
529
+ if (changedIn("ink-gone").some((id) => places.walked.has(id))) startEpoch(places);
530
+ for (const id of changedIn(COPIES)) untrackCopy(places, id);
531
+ for (const id of changedIn(MARKS)) dropSign(places, id);
532
+ const dirty = /* @__PURE__ */ new Set();
533
+ const moved = changed.hasAny("structure") || changed.hasAny("properties");
534
+ const keys = moved ? [...changed.nodeKeysAll("node"), ...changed.nodeKeysAll("presence")] : changed.nodeKeysAll("node");
535
+ for (const key of keys) {
536
+ const block = places.blockOfKey.get(key);
537
+ if (block !== void 0) dirty.add(block);
538
+ }
539
+ const watches = places.copies.size > 0 || places.walked.size > 0;
540
+ if (places.schema.identity() !== places.identity) {
541
+ committed.delete(owner);
542
+ return;
543
+ }
544
+ if (moved && (dirty.size > 0 || watches) && !slideRemoval(places, commit, sets["ink-gone"])) withStoredAuthoredRead(editor, () => editor.read((state) => {
545
+ metrics.reads += 1;
546
+ addArrivedBlocks(places, state, keys, dirty);
547
+ for (const block of dirty) resolveBlock(places, block, holderIn(state, block));
548
+ const anchored = keys.flatMap((key) => ["previous", "next"].flatMap((side) => places.groups.get(keyOf(beside(side, key))) ?? []));
549
+ for (const group of anchored) if (places.groups.get(keyOf(group.place)) === group) reanchor(places, state, sets[GONE], group);
550
+ }));
551
+ else for (const id of dirty) resolveBlock(places, id, keptHolderIn(commit, places.blocks.get(id)?.holder));
552
+ kept.version = commit.version;
553
+ };
84
554
  //#endregion
85
- export { readInkPlace };
555
+ export { advanceInkPlaces, byMark, readInkDeletedSigns, readInkIndexedMark, readInkPlace, readInkSign, takeFirstChangeWalkMemo };
@@ -1,2 +1,2 @@
1
- import { a as ColumnGroupElement, i as ColumnElement, n as BaseColumnItemPlugin, o as SetColumnsOptions, r as ColumnDefinition, s as ToggleColumnGroupOptions, t as BaseColumnGroupPlugin } from "../../index-DdIRduDG.js";
1
+ import { a as ColumnGroupElement, i as ColumnElement, n as BaseColumnItemPlugin, o as SetColumnsOptions, r as ColumnDefinition, s as ToggleColumnGroupOptions, t as BaseColumnGroupPlugin } from "../../index-d7io3MzC.js";
2
2
  export { BaseColumnGroupPlugin, BaseColumnItemPlugin, ColumnDefinition, ColumnElement, ColumnGroupElement, SetColumnsOptions, ToggleColumnGroupOptions };
@@ -310,10 +310,9 @@ const BaseLinkPlugin = definePlugin("link", {
310
310
  }) || void 0;
311
311
  })
312
312
  }) })).extend(({ plugin }) => ({ commands: ({ around }) => [around(editorCommands.insertText, ({ input, state, next }) => {
313
- const target = input.options?.at;
314
- const currentSelection = state.selection();
315
- if (target && (!currentSelection || !RangeApi.isRange(target) || !RangeApi.equals(target, currentSelection))) return next();
313
+ const { at, ...options } = input.options ?? {};
316
314
  const selection = state.selection();
315
+ if (at && (!selection || !RangeApi.isRange(at) || !RangeApi.equals(at, selection))) return next();
317
316
  if (!selection || !state.selection.isCollapsed()) return next();
318
317
  const link = state.nodes.above({
319
318
  at: selection,
@@ -323,7 +322,10 @@ const BaseLinkPlugin = definePlugin("link", {
323
322
  const prefix = state.transaction((tx) => {
324
323
  tx.plugin(plugin.name).exitEnd();
325
324
  });
326
- return next.after(prefix);
325
+ return next.after(prefix, {
326
+ ...input,
327
+ options
328
+ });
327
329
  })] }));
328
330
  const findAutolink = (editor) => {
329
331
  const selection = editor.read.selection();
@@ -1,5 +1,6 @@
1
- import { Ec as Element, Qo as TxDeclaredMethod } from "../../index-BU6k1Aev.js";
2
- import { _ as BasePlugin, u as Editor } from "../../core-BJG8l_mk.js";
1
+ import { Ci as Element, iu as TxDeclaredMethod } from "../../index-BXjLmx1n-CXk17buG.js";
2
+ import "../../htmlTypes-eT2ZGDAj.js";
3
+ import { _ as BasePlugin, u as Editor } from "../../core-BqR-fEDp.js";
3
4
  type LintFinding = Readonly<{
4
5
  id: string;
5
6
  ruleId: string;
@@ -1,2 +1,2 @@
1
- import { A as ProviderMediaInsertInput, C as FileInsertInput, D as MediaPluginState, E as MediaInsertInput, F as mediaElementProperties, M as VideoElement, N as VideoPluginState, O as MediaUrlKind, P as defineMediaPlugin, S as FileElement, T as ImageInsertInput, _ as AudioElement, a as EmbedUrlData, b as BaseFilePlugin, c as parseIframeUrl, d as parseVideoUrl, f as BaseImagePlugin, g as AlignedMediaInsertInput, h as ImagePluginState, i as MediaEmbedPluginState, j as ResizableElement, k as MediaUrlProperties, l as parseMediaUrl, m as ImageElement, n as MediaEmbedDefinition, o as EmbedUrlParser, p as ImageDefinition, r as MediaEmbedElement, s as VIDEO_PROVIDERS, t as BaseMediaEmbedPlugin, u as parseTwitterUrl, v as AudioPluginState, w as FilePluginState, x as BaseVideoPlugin, y as BaseAudioPlugin } from "../../index-DzD6BIFJ.js";
2
- export { AlignedMediaInsertInput, AudioElement, AudioPluginState, BaseAudioPlugin, BaseFilePlugin, BaseImagePlugin, BaseMediaEmbedPlugin, BaseVideoPlugin, EmbedUrlData, EmbedUrlParser, FileElement, FileInsertInput, FilePluginState, ImageDefinition, ImageElement, ImageInsertInput, ImagePluginState, MediaEmbedDefinition, MediaEmbedElement, MediaEmbedPluginState, MediaInsertInput, MediaPluginState, MediaUrlKind, MediaUrlProperties, ProviderMediaInsertInput, ResizableElement, VIDEO_PROVIDERS, VideoElement, VideoPluginState, defineMediaPlugin, mediaElementProperties, parseIframeUrl, parseMediaUrl, parseTwitterUrl, parseVideoUrl };
1
+ import { A as MediaUrlProperties, C as FileElement, D as MediaInsertInput, E as ImageInsertInput, F as defineMediaPlugin, I as mediaElementProperties, M as ResizableElement, N as VideoElement, O as MediaPluginState, P as VideoPluginState, S as BaseVideoPlugin, T as FilePluginState, _ as AlignedMediaInsertInput, a as MediaEmbedRules, b as BaseAudioPlugin, c as VIDEO_PROVIDERS, d as parseTwitterUrl, f as parseVideoUrl, g as ImagePluginState, h as ImageElement, i as MediaEmbedPluginState, j as ProviderMediaInsertInput, k as MediaUrlKind, l as parseIframeUrl, m as ImageDefinition, n as MediaEmbedDefinition, o as EmbedUrlData, p as BaseImagePlugin, r as MediaEmbedElement, s as EmbedUrlParser, t as BaseMediaEmbedPlugin, u as parseMediaUrl, v as AudioElement, w as FileInsertInput, x as BaseFilePlugin, y as AudioPluginState } from "../../index-B33E1CRJ.js";
2
+ export { AlignedMediaInsertInput, AudioElement, AudioPluginState, BaseAudioPlugin, BaseFilePlugin, BaseImagePlugin, BaseMediaEmbedPlugin, BaseVideoPlugin, EmbedUrlData, EmbedUrlParser, FileElement, FileInsertInput, FilePluginState, ImageDefinition, ImageElement, ImageInsertInput, ImagePluginState, MediaEmbedDefinition, MediaEmbedElement, MediaEmbedPluginState, MediaEmbedRules, MediaInsertInput, MediaPluginState, MediaUrlKind, MediaUrlProperties, ProviderMediaInsertInput, ResizableElement, VIDEO_PROVIDERS, VideoElement, VideoPluginState, defineMediaPlugin, mediaElementProperties, parseIframeUrl, parseMediaUrl, parseTwitterUrl, parseVideoUrl };
@@ -1,5 +1,5 @@
1
1
  import { BaseAudioPlugin, BaseFilePlugin, BaseVideoPlugin, defineMediaPlugin, mediaElementProperties } from "./lib/BaseMediaPlugin.js";
2
2
  import { BaseImagePlugin } from "./lib/image/BaseImagePlugin.js";
3
3
  import { VIDEO_PROVIDERS, parseIframeUrl, parseMediaUrl, parseTwitterUrl, parseVideoUrl } from "./lib/media/parseMediaUrl.js";
4
- import { BaseMediaEmbedPlugin } from "./lib/media-embed/BaseMediaEmbedPlugin.js";
5
- export { BaseAudioPlugin, BaseFilePlugin, BaseImagePlugin, BaseMediaEmbedPlugin, BaseVideoPlugin, VIDEO_PROVIDERS, defineMediaPlugin, mediaElementProperties, parseIframeUrl, parseMediaUrl, parseTwitterUrl, parseVideoUrl };
4
+ import { BaseMediaEmbedPlugin, MediaEmbedRules } from "./lib/media-embed/BaseMediaEmbedPlugin.js";
5
+ export { BaseAudioPlugin, BaseFilePlugin, BaseImagePlugin, BaseMediaEmbedPlugin, BaseVideoPlugin, MediaEmbedRules, VIDEO_PROVIDERS, defineMediaPlugin, mediaElementProperties, parseIframeUrl, parseMediaUrl, parseTwitterUrl, parseVideoUrl };