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