platejs 54.0.0-beta.13 → 54.0.0-beta.14

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 (221) hide show
  1. package/dist/{EditorStatic-CKG5xM3y.d.ts → EditorStatic-eXOA489B.d.ts} +4 -4
  2. package/dist/ai/index.d.ts +2 -2
  3. package/dist/ai/lib/aiDraftSession.js +9 -7
  4. package/dist/ai/lib/aiPolicy.internal.js +43 -6
  5. package/dist/ai/lib/editorAgent.js +30 -21
  6. package/dist/ai/lib/editorAgentSync.internal.js +2 -2
  7. package/dist/ai/lib/lockedContext.js +5 -4
  8. package/dist/ai/react/copilotInline.internal.js +6 -5
  9. package/dist/ai/react/index.d.ts +7 -7
  10. package/dist/ai/react/useEditorAgent.js +14 -3
  11. package/dist/authored/index.d.ts +4 -4
  12. package/dist/{authored-CJL7S8qI-BxC9ip4d.d.ts → authored-qetvpvU--DSWESzxK.d.ts} +3 -3
  13. package/dist/clipboard-format-key-BBu85J9m-BLhtd159.d.ts +1 -0
  14. package/dist/code-block/codemirror/index.d.ts +2 -2
  15. package/dist/{comment-anchor.internal-DTBP1huU.d.ts → comment-anchor.internal-CoNK9gTD.d.ts} +2 -2
  16. package/dist/compiler/index.d.ts +3 -3
  17. package/dist/{core-CTB0OBoh.d.ts → core-By92GWYW.d.ts} +45 -20
  18. package/dist/diff/index.d.ts +2 -2
  19. package/dist/docs/agents/skills.md +6 -2
  20. package/dist/docs/agents.md +1 -1
  21. package/dist/docs/ai-agents.md +8 -4
  22. package/dist/docs/ai.md +5 -0
  23. package/dist/docs/api/plate.md +15 -7
  24. package/dist/docs/api/react-hooks.md +32 -2
  25. package/dist/docs/authored-changes.md +4 -0
  26. package/dist/docs/block-menu.md +4 -0
  27. package/dist/docs/board.md +4 -0
  28. package/dist/docs/callout.md +63 -9
  29. package/dist/docs/collaboration.md +6 -1
  30. package/dist/docs/combobox.md +9 -2
  31. package/dist/docs/comment.md +4 -0
  32. package/dist/docs/components/toolbar-buttons.md +1 -1
  33. package/dist/docs/copilot.md +4 -0
  34. package/dist/docs/deck.md +173 -0
  35. package/dist/docs/details.md +4 -0
  36. package/dist/docs/diff.md +4 -0
  37. package/dist/docs/discussion.md +4 -0
  38. package/dist/docs/dnd.md +4 -0
  39. package/dist/docs/docx.md +6 -0
  40. package/dist/docs/emoji.md +2 -2
  41. package/dist/docs/equation.md +4 -0
  42. package/dist/docs/examples/collaboration-example.md +4 -0
  43. package/dist/docs/examples/export.md +40 -28
  44. package/dist/docs/examples/merge.md +4 -0
  45. package/dist/docs/examples/version-history.md +4 -0
  46. package/dist/docs/field.md +4 -0
  47. package/dist/docs/footnote.md +4 -0
  48. package/dist/docs/format-painter.md +1 -1
  49. package/dist/docs/html.md +4 -0
  50. package/dist/docs/index.md +4 -0
  51. package/dist/docs/ink.md +6 -0
  52. package/dist/docs/installation/manual.md +2 -4
  53. package/dist/docs/installation/next.md +1 -3
  54. package/dist/docs/installation/plate-ui.md +6 -2
  55. package/dist/docs/installation/rsc.md +1 -1
  56. package/dist/docs/installation.md +4 -0
  57. package/dist/docs/link.md +4 -0
  58. package/dist/docs/llms.txt +3 -1
  59. package/dist/docs/lock.md +34 -2
  60. package/dist/docs/markdown.md +4 -0
  61. package/dist/docs/media.md +4 -0
  62. package/dist/docs/mention.md +5 -0
  63. package/dist/docs/pagination.md +4 -0
  64. package/dist/docs/prompt-editor.md +17 -1
  65. package/dist/docs/reference.md +192 -0
  66. package/dist/docs/roots.md +4 -0
  67. package/dist/docs/serializing.md +23 -0
  68. package/dist/docs/slash-command.md +58 -4
  69. package/dist/docs/static.md +29 -20
  70. package/dist/docs/suggestion.md +4 -0
  71. package/dist/docs/sync.md +4 -0
  72. package/dist/docs/table.md +31 -0
  73. package/dist/docs/toolbar.md +4 -0
  74. package/dist/docs/unit-testing.md +4 -0
  75. package/dist/docs/upload.md +4 -0
  76. package/dist/docx/export/index.d.ts +5 -5
  77. package/dist/docx/import/index.d.ts +5 -5
  78. package/dist/docx/paste/index.d.ts +4 -4
  79. package/dist/dom/index.d.ts +1 -1
  80. package/dist/features/basic-nodes/lib/BaseMarkPlugins.js +1 -1
  81. package/dist/features/basic-styles/lib/BaseFormattingPlugin.js +61 -28
  82. package/dist/features/basic-styles/lib/BaseStylePlugins.js +28 -7
  83. package/dist/features/board/index.d.ts +1 -1
  84. package/dist/features/callout/index.d.ts +2 -160
  85. package/dist/features/callout/lib/BaseCalloutPlugin.js +109 -9
  86. package/dist/features/column/index.d.ts +1 -1
  87. package/dist/features/comments/index.d.ts +2 -2
  88. package/dist/features/date/index.d.ts +3 -3
  89. package/dist/features/details/index.d.ts +3 -3
  90. package/dist/features/field/index.d.ts +1 -1
  91. package/dist/features/field/lib/BaseFieldPlugin.js +111 -53
  92. package/dist/features/field/lib/fieldCache.internal.js +9 -21
  93. package/dist/features/find/index.d.ts +3 -3
  94. package/dist/features/footnote/index.d.ts +3 -3
  95. package/dist/features/ink/index.d.ts +1 -1
  96. package/dist/features/link/lib/BaseLinkPlugin.js +5 -2
  97. package/dist/features/lint/index.d.ts +3 -3
  98. package/dist/features/list/lib/listKeyboard.internal.js +7 -2
  99. package/dist/features/lock/index.d.ts +1 -1
  100. package/dist/features/media/index.d.ts +1 -1
  101. package/dist/features/mention/index.d.ts +1 -1
  102. package/dist/features/reference/index.d.ts +236 -0
  103. package/dist/features/reference/index.js +2 -0
  104. package/dist/features/reference/lib/BaseReferencePlugin.js +589 -0
  105. package/dist/features/table/index.d.ts +2 -2
  106. package/dist/features/toc/index.d.ts +1 -1
  107. package/dist/features/upload/index.d.ts +1 -1
  108. package/dist/history/index.d.ts +1 -1
  109. package/dist/html/index.d.ts +4 -4
  110. package/dist/html/server/index.d.ts +2 -2
  111. package/dist/html/server/serverCssParser.internal.js +14 -25
  112. package/dist/html/server/serverCssStyle.internal.js +4 -7
  113. package/dist/{htmlConversion-Y-M6PLRi.d.ts → htmlConversion-CRnxMGw-.d.ts} +2 -2
  114. package/dist/{htmlTypes-CNhoCFjK.d.ts → htmlTypes-3laowz-3.d.ts} +3 -3
  115. package/dist/hyperscript/index.d.ts +1 -1
  116. package/dist/{index-B-8L9f6a2.d.ts → index-B3VOCxNR.d.ts} +5 -5
  117. package/dist/{index-B8JeECEk.d.ts → index-B9UlNijk.d.ts} +2 -2
  118. package/dist/{index-Bqva6PJc.d.ts → index-BJPT0Tv_.d.ts} +3 -3
  119. package/dist/{index-CWutqVQ_-BO-UgVeK.d.ts → index-BKPWmnLg-Bp_vItjr.d.ts} +1 -1
  120. package/dist/{index-BFWK852j.d.ts → index-BcD2RAB9.d.ts} +3 -3
  121. package/dist/{index-DhsryaAC.d.ts → index-C5Xw3JDc.d.ts} +1 -1
  122. package/dist/{index-BEXBAmJf.d.ts → index-CAshLTjV.d.ts} +3 -3
  123. package/dist/{index-qqrnWAk_.d.ts → index-CHlITvuq.d.ts} +7 -7
  124. package/dist/index-CKSwab_O.d.ts +1 -0
  125. package/dist/{index-DJhwDkfd.d.ts → index-CRQoHk18.d.ts} +3 -3
  126. package/dist/index-CyY3O6c7.d.ts +3 -0
  127. package/dist/index-D8EGVCeT.d.ts +305 -0
  128. package/dist/{index-B0R9sXv2-T1dxG9oM.d.ts → index-DAKucat0--VOaL_NN.d.ts} +4 -4
  129. package/dist/{index-UYpvOBXG.d.ts → index-DCTRNYwy.d.ts} +2 -2
  130. package/dist/{index-CXd5hwaH.d.ts → index-DQpHoxDX.d.ts} +1 -1
  131. package/dist/{index-BfJKfAwk.d.ts → index-DTd1D-BF.d.ts} +3 -3
  132. package/dist/index-DUhUT9bV.d.ts +1 -0
  133. package/dist/{index-B4aToRMv.d.ts → index-DXm_v0Qq.d.ts} +3 -3
  134. package/dist/{index-D3bhjdRz.d.ts → index-Djwcl0Ff.d.ts} +3 -3
  135. package/dist/{index-DYuqsDrP.d.ts → index-Dyw6BJx8.d.ts} +3 -3
  136. package/dist/{index-CLPMcGC5.d.ts → index-KG95XVaC.d.ts} +4 -4
  137. package/dist/{index-mcBtG6pK-CitQV9Bq.d.ts → index-LEcSTRgn-BR_p4GVY.d.ts} +2 -2
  138. package/dist/{index-D54VPeky.d.ts → index-k-wvVxKl.d.ts} +2 -2
  139. package/dist/{index-CHud6Aa-.d.ts → index-s34W6hUI.d.ts} +3 -3
  140. package/dist/{index-DXCdafUk.d.ts → index-wEkvA-wI.d.ts} +43 -20
  141. package/dist/index.d.ts +3 -3
  142. package/dist/internal/plugin/pluginInjectNodeProps.js +33 -5
  143. package/dist/internal/utils/urlPolicy.js +11 -1
  144. package/dist/lib/editor/withPlite.js +8 -6
  145. package/dist/lib/plugins/html/cssLexer.internal.js +126 -29
  146. package/dist/lib/plugins/html/cssSafety.internal.js +100 -0
  147. package/dist/lib/plugins/html/htmlDecode.internal.js +2 -2
  148. package/dist/lib/plugins/html/htmlMatcher.internal.js +1 -1
  149. package/dist/lib/plugins/html/htmlRules.internal.js +2 -13
  150. package/dist/lib/plugins/html/htmlSafety.js +17 -24
  151. package/dist/lib/plugins/html/htmlSerialize.internal.js +16 -2
  152. package/dist/lib/plugins/html/htmlStyleInline.internal.js +22 -23
  153. package/dist/lib/plugins/input-rules/inputRuleVeto.internal.js +27 -1
  154. package/dist/markdown/index.d.ts +1 -1
  155. package/dist/markdown/lib/internal/markdownAttributes.js +16 -7
  156. package/dist/markdown/lib/internal/markdownMappings.js +123 -16
  157. package/dist/markdown/lib/serializer/convertPhrasingSerialize.js +16 -1
  158. package/dist/math/index.d.ts +3 -3
  159. package/dist/math/react/index.d.ts +4 -4
  160. package/dist/migrations/index.d.ts +4 -4
  161. package/dist/migrations/migratePlateV54Urls.internal.js +63 -1
  162. package/dist/pagination/index.d.ts +1 -1
  163. package/dist/pagination/react/index.d.ts +3 -3
  164. package/dist/{protocol-CSuP7AWG-DAorqpaF.d.ts → protocol-Cp9xayOe-0OSfTMnt.d.ts} +1 -1
  165. package/dist/react/authored/index.d.ts +4 -4
  166. package/dist/react/components/PlateView.js +7 -1
  167. package/dist/react/features/board/index.d.ts +5 -5
  168. package/dist/react/features/callout/index.d.ts +93 -4
  169. package/dist/react/features/column/index.d.ts +5 -5
  170. package/dist/react/features/combobox/combobox.internal.js +35 -22
  171. package/dist/react/features/combobox/comboboxOwner.internal.js +29 -2
  172. package/dist/react/features/combobox/index.d.ts +8 -6
  173. package/dist/react/features/comments/index.d.ts +6 -6
  174. package/dist/react/features/date/index.d.ts +4 -4
  175. package/dist/react/features/details/index.d.ts +4 -4
  176. package/dist/react/features/field/FieldPlugin.js +2 -2
  177. package/dist/react/features/field/index.d.ts +5 -5
  178. package/dist/react/features/footnote/index.d.ts +4 -4
  179. package/dist/react/features/format-painter/FormatPainterPlugin.js +27 -34
  180. package/dist/react/features/format-painter/index.d.ts +4 -4
  181. package/dist/react/features/ink/index.d.ts +5 -5
  182. package/dist/react/features/lock/index.d.ts +5 -5
  183. package/dist/react/features/media/index.d.ts +5 -5
  184. package/dist/react/features/mention/index.d.ts +4 -4
  185. package/dist/react/features/table/index.d.ts +6 -6
  186. package/dist/react/features/toc/index.d.ts +2 -2
  187. package/dist/react/features/upload/index.d.ts +5 -5
  188. package/dist/react/index.d.ts +6 -6
  189. package/dist/react/virtualized.d.ts +3 -3
  190. package/dist/refusal-CwFxNUf7-BLhtd159.d.ts +1 -0
  191. package/dist/{registerEditorTools-Cl-o_Wnq.d.ts → registerEditorTools-D_3hPpTx.d.ts} +16 -8
  192. package/dist/shared-room-26tNRhZE-BLhtd159.d.ts +1 -0
  193. package/dist/skills/plate/SKILL.md +4 -3
  194. package/dist/skills/plate/references/ai-and-agents.md +2 -2
  195. package/dist/skills/plate/references/pricing.md +3 -3
  196. package/dist/skills/plate/references/setup.md +6 -0
  197. package/dist/skills/plate/references/ui-and-sync.md +4 -3
  198. package/dist/{source-DUP5aKcT.d.ts → source-BW7JD_oS.d.ts} +3 -3
  199. package/dist/static/index.d.ts +23 -9
  200. package/dist/static/internal/staticPendingMedia.internal.js +2 -1
  201. package/dist/static/internal/staticPresentation.js +1 -0
  202. package/dist/static/renderStaticHtml.js +85 -39
  203. package/dist/{storage-EzfLDqRy-Cu4DQ-Rf.d.ts → storage-C7xSH1I5-BJLoUfo9.d.ts} +2 -2
  204. package/dist/sync/cloudflare/index.d.ts +3 -3
  205. package/dist/sync/index.d.ts +4 -4
  206. package/dist/sync/postgres/index.d.ts +1 -1
  207. package/dist/sync/react/index.d.ts +6 -6
  208. package/dist/sync/server/index.d.ts +5 -5
  209. package/dist/tabbable/react/index.d.ts +4 -4
  210. package/dist/testing/index.d.ts +3 -3
  211. package/dist/{transport-DAforzBt-BFwAhC-N.d.ts → transport-B-ON68Y4-DCfT5-eN.d.ts} +1 -1
  212. package/dist/utils/plate-keys.js +1 -0
  213. package/dist/{widths-BjIZxtaJ.d.ts → widths-9NNziDRW.d.ts} +5 -5
  214. package/package.json +9 -2
  215. package/dist/clipboard-format-key-D9rnh20X-CR00YA0H.d.ts +0 -1
  216. package/dist/index-CKAkaSJK.d.ts +0 -3
  217. package/dist/index-CxyK4HrT.d.ts +0 -1
  218. package/dist/index-zcb_RtZC.d.ts +0 -1
  219. package/dist/refusal-DCzeB9nD-CR00YA0H.d.ts +0 -1
  220. package/dist/shared-room-Bg8qMvm1-CR00YA0H.d.ts +0 -1
  221. /package/dist/{tx-only-CWT-IURY-BqIFhy44.d.ts → tx-only-sIj7BcYh-BMFkGMuq.d.ts} +0 -0
@@ -0,0 +1,589 @@
1
+ import { definePlugin } from "../../../lib/plugin/definePlugin.js";
2
+ import { getCaretInline, selectAfterInline } from "../../../internal/plugin/inlineInsertion.js";
3
+ import { PLUGINS } from "../../../utils/plate-keys.js";
4
+ import { ElementApi, PathApi, TextApi, locateAt, property, txLocate } from "../../../core.js";
5
+ //#region src/features/reference/lib/BaseReferencePlugin.ts
6
+ const REFERENCE_URL_PREFIX = "ref:";
7
+ const MAIN_ROOT_KEY = "main";
8
+ const AUTHORED_MARKS_KEY = "authored";
9
+ const isValidReferenceString = (value) => typeof value === "string" && value.trim().length > 0 && !value.includes("\0");
10
+ const normalizeReferenceQuote = (value) => value.replace(/\r\n?/g, "\n");
11
+ const normalizeWhitespace = (value) => value.replace(/\s+/g, " ").trim();
12
+ const encodeUriComponentSafe = (value) => {
13
+ let encoded = "";
14
+ for (const character of value) {
15
+ const code = character.charCodeAt(0);
16
+ if (character.length === 1 && code >= 55296 && code <= 57343) encoded += [
17
+ 224 | code >> 12,
18
+ 128 | code >> 6 & 63,
19
+ 128 | code & 63
20
+ ].map((byte) => `%${byte.toString(16).toUpperCase()}`).join("");
21
+ else encoded += encodeURIComponent(character).replace(/\(/g, "%28").replace(/\)/g, "%29");
22
+ }
23
+ return encoded;
24
+ };
25
+ const HEX_PAIR = /^[0-9A-Fa-f]{2}$/;
26
+ const decodeUriComponentSafe = (value) => {
27
+ const bytes = [];
28
+ for (let index = 0; index < value.length; index += 1) {
29
+ if (value[index] === "%") {
30
+ const hex = value.slice(index + 1, index + 3);
31
+ if (!HEX_PAIR.test(hex)) return null;
32
+ bytes.push(Number.parseInt(hex, 16));
33
+ index += 2;
34
+ continue;
35
+ }
36
+ const code = value.charCodeAt(index);
37
+ if (code <= 127) bytes.push(code);
38
+ else if (code >= 55296 && code <= 56319 && index + 1 < value.length) {
39
+ const low = value.charCodeAt(index + 1);
40
+ if (low >= 56320 && low <= 57343) {
41
+ const cp = (code - 55296 << 10) + (low - 56320) + 65536;
42
+ bytes.push(240 | cp >> 18, 128 | cp >> 12 & 63, 128 | cp >> 6 & 63, 128 | cp & 63);
43
+ index += 1;
44
+ } else bytes.push(224 | code >> 12, 128 | code >> 6 & 63, 128 | code & 63);
45
+ } else if (code <= 2047) bytes.push(192 | code >> 6, 128 | code & 63);
46
+ else bytes.push(224 | code >> 12, 128 | code >> 6 & 63, 128 | code & 63);
47
+ }
48
+ let out = "";
49
+ let i = 0;
50
+ while (i < bytes.length) {
51
+ const b0 = bytes[i];
52
+ if (b0 < 128) {
53
+ out += String.fromCharCode(b0);
54
+ i += 1;
55
+ } else if ((b0 & 224) === 192 && i + 1 < bytes.length) {
56
+ const b1 = bytes[i + 1];
57
+ if ((b1 & 192) !== 128) return null;
58
+ const cp = (b0 & 31) << 6 | b1 & 63;
59
+ if (cp < 128) return null;
60
+ out += String.fromCharCode(cp);
61
+ i += 2;
62
+ } else if ((b0 & 240) === 224 && i + 2 < bytes.length) {
63
+ const b1 = bytes[i + 1];
64
+ const b2 = bytes[i + 2];
65
+ if ((b1 & 192) !== 128 || (b2 & 192) !== 128) return null;
66
+ const cp = (b0 & 15) << 12 | (b1 & 63) << 6 | b2 & 63;
67
+ if (cp < 2048) return null;
68
+ out += String.fromCharCode(cp);
69
+ i += 3;
70
+ } else if ((b0 & 248) === 240 && i + 3 < bytes.length) {
71
+ const b1 = bytes[i + 1];
72
+ const b2 = bytes[i + 2];
73
+ const b3 = bytes[i + 3];
74
+ if ((b1 & 192) !== 128 || (b2 & 192) !== 128 || (b3 & 192) !== 128) return null;
75
+ const cp = (b0 & 7) << 18 | (b1 & 63) << 12 | (b2 & 63) << 6 | b3 & 63;
76
+ if (cp < 65536 || cp > 1114111) return null;
77
+ out += String.fromCodePoint(cp);
78
+ i += 4;
79
+ } else return null;
80
+ }
81
+ return out;
82
+ };
83
+ const getLeafMarkEntries = (leaf) => Object.entries(leaf).filter(([key, value]) => key !== "text" && value !== void 0);
84
+ /**
85
+ * Stateless inline markable-void primitive unifying rename-safe wikilinks,
86
+ * block references, hover-transclusion anchors, and version-pinned citations.
87
+ */
88
+ const BaseReferencePlugin = definePlugin(PLUGINS.reference, {
89
+ schema: { element: {
90
+ properties: {
91
+ alias: property.string({
92
+ validate: isValidReferenceString,
93
+ validationVersion: 1
94
+ }),
95
+ blockId: property.string({
96
+ validate: isValidReferenceString,
97
+ validationVersion: 1
98
+ }),
99
+ label: property.string({
100
+ validate: isValidReferenceString,
101
+ validationVersion: 1
102
+ }),
103
+ quote: property.string({
104
+ validate: isValidReferenceString,
105
+ validationVersion: 1
106
+ }),
107
+ ref: property.string({
108
+ required: true,
109
+ validate: isValidReferenceString,
110
+ validationVersion: 1
111
+ }),
112
+ revision: property.string({
113
+ validate: isValidReferenceString,
114
+ validationVersion: 1
115
+ }),
116
+ root: property.string({
117
+ validate: isValidReferenceString,
118
+ validationVersion: 1
119
+ })
120
+ },
121
+ void: "markable-inline"
122
+ } },
123
+ formats: ({ defineFormats, schema: { type } }) => defineFormats({
124
+ docx: { encode: ({ node }) => ({
125
+ kind: "text",
126
+ text: node.alias ?? node.label ?? node.ref
127
+ }) },
128
+ plainText: { encode: ({ node }) => node.alias ?? node.label ?? node.ref },
129
+ html: {
130
+ decode: ({ element, preserve }) => {
131
+ const ref = element.getAttribute("data-editor-html-reference-ref");
132
+ if (!isValidReferenceString(ref)) return void 0;
133
+ const blockId = element.getAttribute("data-editor-html-reference-block-id");
134
+ const root = element.getAttribute("data-editor-html-reference-root");
135
+ const label = element.getAttribute("data-editor-html-reference-label");
136
+ const alias = element.getAttribute("data-editor-html-reference-alias");
137
+ const revision = element.getAttribute("data-editor-html-reference-revision");
138
+ const rawQuote = element.getAttribute("data-editor-html-reference-quote");
139
+ const quote = rawQuote === null ? null : normalizeReferenceQuote(rawQuote);
140
+ preserve("data-editor-html-reference", "data-editor-html-reference-alias", "data-editor-html-reference-block-id", "data-editor-html-reference-label", "data-editor-html-reference-quote", "data-editor-html-reference-ref", "data-editor-html-reference-revision", "data-editor-html-reference-root");
141
+ const decodedNode = {
142
+ children: [{ text: "" }],
143
+ ref
144
+ };
145
+ if (isValidReferenceString(alias)) decodedNode.alias = alias;
146
+ if (isValidReferenceString(blockId)) decodedNode.blockId = blockId;
147
+ if (isValidReferenceString(label)) decodedNode.label = label;
148
+ if (isValidReferenceString(quote)) decodedNode.quote = quote;
149
+ if (isValidReferenceString(revision)) decodedNode.revision = revision;
150
+ if (isValidReferenceString(root)) decodedNode.root = root;
151
+ return decodedNode;
152
+ },
153
+ encode: ({ content, node, preserve }) => {
154
+ preserve("alias", "blockId", "label", "quote", "ref", "revision", "root");
155
+ const display = node.alias ?? node.label ?? node.ref ?? "";
156
+ return {
157
+ attributes: {
158
+ "data-editor-html-reference": true,
159
+ "data-editor-html-reference-alias": node.alias,
160
+ "data-editor-html-reference-block-id": node.blockId,
161
+ "data-editor-html-reference-label": node.label,
162
+ "data-editor-html-reference-quote": node.quote === void 0 ? void 0 : normalizeReferenceQuote(node.quote),
163
+ "data-editor-html-reference-ref": node.ref,
164
+ "data-editor-html-reference-revision": node.revision,
165
+ "data-editor-html-reference-root": node.root
166
+ },
167
+ children: [content, { text: display }],
168
+ tag: "span"
169
+ };
170
+ },
171
+ match: [{
172
+ attributes: { "data-editor-html-reference": true },
173
+ tag: "span"
174
+ }],
175
+ priority: 11
176
+ },
177
+ markdown: {
178
+ node: "link",
179
+ priority: 11,
180
+ decode: ({ decode, marks, node, report }) => {
181
+ if (!node.url.startsWith(REFERENCE_URL_PREFIX)) return void 0;
182
+ const rest = node.url.slice(4);
183
+ const hashIndex = rest.indexOf("#");
184
+ const beforeHash = hashIndex === -1 ? rest : rest.slice(0, hashIndex);
185
+ const rawFragment = hashIndex === -1 ? void 0 : rest.slice(hashIndex + 1);
186
+ const queryIndex = beforeHash.indexOf("?");
187
+ const rawRef = queryIndex === -1 ? beforeHash : beforeHash.slice(0, queryIndex);
188
+ const rawQuery = queryIndex === -1 ? void 0 : beforeHash.slice(queryIndex + 1);
189
+ const ref = decodeUriComponentSafe(rawRef);
190
+ if (ref === null || !isValidReferenceString(ref)) return void 0;
191
+ let blockId;
192
+ if (rawFragment !== void 0 && rawFragment.length > 0) {
193
+ const decodedFragment = decodeUriComponentSafe(rawFragment);
194
+ if (decodedFragment === null) return void 0;
195
+ if (isValidReferenceString(decodedFragment)) blockId = decodedFragment;
196
+ }
197
+ let root;
198
+ let revision;
199
+ let queryLabel;
200
+ let hasAliasFlag = false;
201
+ let queryQuote;
202
+ if (rawQuery !== void 0 && rawQuery.length > 0) for (const pair of rawQuery.split("&")) {
203
+ if (pair.length === 0) continue;
204
+ const eqIndex = pair.indexOf("=");
205
+ const rawKey = eqIndex === -1 ? pair : pair.slice(0, eqIndex);
206
+ const rawVal = eqIndex === -1 ? "" : pair.slice(eqIndex + 1);
207
+ const key = decodeUriComponentSafe(rawKey);
208
+ const val = decodeUriComponentSafe(rawVal);
209
+ if (key === null || val === null) return void 0;
210
+ switch (key) {
211
+ case "root":
212
+ if (isValidReferenceString(val)) root = val;
213
+ break;
214
+ case "rev":
215
+ if (isValidReferenceString(val)) revision = val;
216
+ break;
217
+ case "label":
218
+ if (isValidReferenceString(val)) queryLabel = val;
219
+ break;
220
+ case "alias":
221
+ if (val === "1") hasAliasFlag = true;
222
+ break;
223
+ case "quote": {
224
+ const normalized = normalizeReferenceQuote(val);
225
+ if (isValidReferenceString(normalized)) queryQuote = normalized;
226
+ break;
227
+ }
228
+ default: break;
229
+ }
230
+ }
231
+ const titleQuote = typeof node.title === "string" ? normalizeReferenceQuote(node.title) : void 0;
232
+ const quote = queryQuote ?? (isValidReferenceString(titleQuote) ? titleQuote : void 0);
233
+ const buildDecodedMarkdownNode = (leaf, resolvedAlias, resolvedLabel) => {
234
+ const result = {
235
+ children: [{
236
+ ...leaf,
237
+ text: ""
238
+ }],
239
+ ref,
240
+ type
241
+ };
242
+ if (resolvedAlias) result.alias = resolvedAlias;
243
+ if (blockId) result.blockId = blockId;
244
+ if (resolvedLabel) result.label = resolvedLabel;
245
+ if (quote) result.quote = quote;
246
+ if (revision) result.revision = revision;
247
+ if (root) result.root = root;
248
+ return result;
249
+ };
250
+ if (node.children.length === 0) return buildDecodedMarkdownNode(marks, void 0, queryLabel);
251
+ const decoded = decode(node.children, marks);
252
+ const leaves = [];
253
+ let hasNonText = false;
254
+ for (const child of decoded) if (TextApi.isText(child)) leaves.push(child);
255
+ else hasNonText = true;
256
+ if (hasNonText) report({
257
+ action: "dropped",
258
+ kind: "element",
259
+ message: "Markdown reference link cannot contain non-text inline elements.",
260
+ nodeType: "link"
261
+ });
262
+ const rawDisplay = leaves.map((leaf) => leaf.text).join("");
263
+ const nonEmptyLeaves = leaves.filter((leaf) => leaf.text.length > 0);
264
+ let resolvedMarks;
265
+ if (nonEmptyLeaves.length === 0) resolvedMarks = { ...marks };
266
+ else {
267
+ const firstEntries = getLeafMarkEntries(nonEmptyLeaves[0]);
268
+ const shared = {};
269
+ for (const [key, value] of firstEntries) if (nonEmptyLeaves.every((leaf) => Object.hasOwn(leaf, key) && Object.is(leaf[key], value))) shared[key] = value;
270
+ if (nonEmptyLeaves.some((leaf) => getLeafMarkEntries(leaf).some(([key, value]) => !Object.hasOwn(shared, key) || !Object.is(shared[key], value)))) report({
271
+ action: "dropped",
272
+ kind: "property",
273
+ message: "Markdown reference link cannot preserve partial formatting across its label.",
274
+ nodeType: "link"
275
+ });
276
+ resolvedMarks = shared;
277
+ }
278
+ let alias;
279
+ let label;
280
+ if (hasAliasFlag) {
281
+ if (isValidReferenceString(rawDisplay)) alias = rawDisplay;
282
+ label = queryLabel;
283
+ } else label = queryLabel ?? (isValidReferenceString(rawDisplay) && rawDisplay !== ref ? rawDisplay : void 0);
284
+ return buildDecodedMarkdownNode(resolvedMarks, alias, label);
285
+ },
286
+ encode: ({ encodePhrasing, node, preserve }) => {
287
+ preserve("alias", "blockId", "label", "quote", "ref", "revision", "root");
288
+ const params = [];
289
+ if (node.root !== void 0) params.push(`root=${encodeUriComponentSafe(node.root)}`);
290
+ if (node.revision !== void 0) params.push(`rev=${encodeUriComponentSafe(node.revision)}`);
291
+ if (node.alias !== void 0) {
292
+ if (node.label !== void 0) params.push(`label=${encodeUriComponentSafe(node.label)}`);
293
+ params.push("alias=1");
294
+ } else if (node.label !== void 0 && node.label === node.ref) params.push(`label=${encodeUriComponentSafe(node.label)}`);
295
+ let title;
296
+ if (node.quote !== void 0) {
297
+ const normalizedQuote = normalizeReferenceQuote(node.quote);
298
+ if (normalizedQuote.includes("\n")) params.push(`quote=${encodeUriComponentSafe(normalizedQuote)}`);
299
+ else title = normalizedQuote;
300
+ }
301
+ const encodedRef = encodeUriComponentSafe(node.ref);
302
+ const query = params.length > 0 ? `?${params.join("&")}` : "";
303
+ const fragment = node.blockId === void 0 ? "" : `#${encodeUriComponentSafe(node.blockId)}`;
304
+ const [leaf] = node.children;
305
+ const text = node.alias ?? node.label ?? node.ref;
306
+ const children = encodePhrasing([{
307
+ ...leaf,
308
+ text
309
+ }]);
310
+ const url = `${REFERENCE_URL_PREFIX}${encodedRef}${query}${fragment}`;
311
+ if (title !== void 0) return {
312
+ children,
313
+ title,
314
+ type: "link",
315
+ url
316
+ };
317
+ return {
318
+ children,
319
+ type: "link",
320
+ url
321
+ };
322
+ }
323
+ }
324
+ }),
325
+ update: ({ tx, schema: { type } }) => ({ insert: txLocate(locateAt(1), (input, options = {}) => {
326
+ if (!isValidReferenceString(input.ref)) throw new TypeError("Reference ref must be a non-empty string without NUL bytes.");
327
+ const { trailingSpace, ...insertOptions } = options;
328
+ const normalizedQuote = input.quote === void 0 ? void 0 : normalizeReferenceQuote(input.quote);
329
+ const reference = {
330
+ ...isValidReferenceString(input.alias) ? { alias: input.alias } : {},
331
+ ...isValidReferenceString(input.blockId) ? { blockId: input.blockId } : {},
332
+ children: [{ text: "" }],
333
+ ...isValidReferenceString(input.label) ? { label: input.label } : {},
334
+ ...isValidReferenceString(normalizedQuote) ? { quote: normalizedQuote } : {},
335
+ ref: input.ref,
336
+ ...isValidReferenceString(input.revision) ? { revision: input.revision } : {},
337
+ ...isValidReferenceString(input.root) ? { root: input.root } : {},
338
+ type
339
+ };
340
+ tx.nodes.insert(reference, insertOptions);
341
+ if (insertOptions.at !== void 0 || insertOptions.select !== void 0) return;
342
+ const inline = getCaretInline(tx, type);
343
+ if (!inline) return;
344
+ const blockPath = tx.nodes.block({ at: inline })?.[1];
345
+ const after = tx.points.after(inline);
346
+ const isAtBlockEnd = Boolean(trailingSpace) && blockPath !== void 0 && (!after || !PathApi.isDescendant(after.path, blockPath) || tx.points.isEnd(after, blockPath));
347
+ selectAfterInline(tx, inline);
348
+ if (isAtBlockEnd) tx.text.insert(" ");
349
+ }) })
350
+ });
351
+ const hasAuthoredDeleteMark = (node) => {
352
+ if (typeof node !== "object" || node === null) return false;
353
+ const record = node;
354
+ const authored = record[AUTHORED_MARKS_KEY];
355
+ if (Array.isArray(authored)) {
356
+ if (authored.some((entry) => typeof entry === "object" && entry !== null && entry.kind === "delete")) return true;
357
+ } else if (typeof authored === "object" && authored !== null) {
358
+ for (const entry of Object.values(authored)) if (typeof entry === "object" && entry !== null && entry.kind === "delete") return true;
359
+ }
360
+ for (const [key, value] of Object.entries(record)) if (key.startsWith("suggestion_") && typeof value === "object" && value !== null && value.type === "remove") return true;
361
+ return false;
362
+ };
363
+ const readOptionalValidString = (value) => isValidReferenceString(value) ? value : void 0;
364
+ const KNOWN_INLINE_TYPES = /* @__PURE__ */ new Set([
365
+ "a",
366
+ "date",
367
+ "footnoteReference",
368
+ "inlineEquation",
369
+ "kbd",
370
+ "link",
371
+ "mention",
372
+ "reference"
373
+ ]);
374
+ const isKnownInlineElement = (node, referenceType) => node.type === referenceType || KNOWN_INLINE_TYPES.has(node.type);
375
+ const isBlockLikeNode = (node, referenceType) => {
376
+ if (isKnownInlineElement(node, referenceType)) return false;
377
+ if (!Array.isArray(node.children) || node.children.length === 0) return false;
378
+ return node.children.every((child) => TextApi.isText(child) || ElementApi.isElement(child) && isKnownInlineElement(child, referenceType));
379
+ };
380
+ /**
381
+ * Extract all outgoing reference occurrences across `main` and all named `roots`
382
+ * of a detached `EditorDocumentValue` without constructing an editor.
383
+ */
384
+ function extractDocumentReferences(document, options = {}) {
385
+ const referenceType = options.type ?? PLUGINS.reference;
386
+ const includeDeleted = options.includeDeleted === true;
387
+ const results = [];
388
+ const walk = (nodes, sourceRoot, parentPath, enclosingBlockId, inLeafBlock = false) => {
389
+ for (let index = 0; index < nodes.length; index += 1) {
390
+ const node = nodes[index];
391
+ if (!ElementApi.isElement(node)) continue;
392
+ if (!includeDeleted && hasAuthoredDeleteMark(node)) continue;
393
+ const path = [...parentPath, index];
394
+ const record = node;
395
+ const ownId = readOptionalValidString(record.id);
396
+ if (node.type === referenceType) {
397
+ const ref = readOptionalValidString(record.ref);
398
+ if (ref !== void 0) {
399
+ const alias = readOptionalValidString(record.alias);
400
+ const blockId = readOptionalValidString(record.blockId);
401
+ const label = readOptionalValidString(record.label);
402
+ const quote = readOptionalValidString(record.quote);
403
+ const revision = readOptionalValidString(record.revision);
404
+ const root = readOptionalValidString(record.root);
405
+ results.push({
406
+ ...alias ? { alias } : {},
407
+ ...blockId ? { blockId } : {},
408
+ ...label ? { label } : {},
409
+ path,
410
+ ...quote ? { quote } : {},
411
+ ref,
412
+ ...revision ? { revision } : {},
413
+ ...root ? { root } : {},
414
+ ...enclosingBlockId ? { sourceBlockId: enclosingBlockId } : {},
415
+ sourceRoot
416
+ });
417
+ }
418
+ continue;
419
+ }
420
+ const isLeafBlock = !inLeafBlock && isBlockLikeNode(node, referenceType);
421
+ const nextBlockId = !inLeafBlock && ownId !== void 0 && !isKnownInlineElement(node, referenceType) && (enclosingBlockId === void 0 || isLeafBlock) ? ownId : enclosingBlockId;
422
+ if (Array.isArray(node.children)) walk(node.children, sourceRoot, path, nextBlockId, inLeafBlock || isLeafBlock);
423
+ }
424
+ };
425
+ walk(document.children, MAIN_ROOT_KEY, []);
426
+ if (document.roots) {
427
+ for (const [rootName, rootNodes] of Object.entries(document.roots)) if (Array.isArray(rootNodes)) walk(rootNodes, rootName, []);
428
+ }
429
+ return results;
430
+ }
431
+ const isBlockContainerChildren = (children) => children.some((child) => ElementApi.isElement(child) && !isKnownInlineElement(child, PLUGINS.reference));
432
+ const extractNodePlainText = (node) => {
433
+ if (typeof node !== "object" || node === null) return "";
434
+ if (hasAuthoredDeleteMark(node)) return "";
435
+ const record = node;
436
+ if (typeof record.text === "string") return record.text;
437
+ if (record.type === PLUGINS.reference) {
438
+ const alias = readOptionalValidString(record.alias);
439
+ const label = readOptionalValidString(record.label);
440
+ const ref = readOptionalValidString(record.ref);
441
+ return alias ?? label ?? ref ?? "";
442
+ }
443
+ if (record.type === PLUGINS.mention) {
444
+ const label = readOptionalValidString(record.label);
445
+ const ref = readOptionalValidString(record.ref);
446
+ return `@${label ?? ref ?? ""}`;
447
+ }
448
+ if (Array.isArray(record.children)) {
449
+ const separator = isBlockContainerChildren(record.children) ? "\n" : "";
450
+ const parts = [];
451
+ for (const child of record.children) {
452
+ const text = extractNodePlainText(child);
453
+ if (text.length > 0) parts.push(text);
454
+ }
455
+ return parts.join(separator);
456
+ }
457
+ return "";
458
+ };
459
+ const extractTreePlainText = (nodes) => nodes.map((node) => extractNodePlainText(node)).filter((text) => text.length > 0).join("\n");
460
+ const findElementByIdAcrossRoots = (document, blockId) => {
461
+ const search = (nodes) => {
462
+ for (const node of nodes) {
463
+ if (!ElementApi.isElement(node)) continue;
464
+ if (hasAuthoredDeleteMark(node)) continue;
465
+ if (node.id === blockId) return node;
466
+ if (Array.isArray(node.children)) {
467
+ const nested = search(node.children);
468
+ if (nested) return nested;
469
+ }
470
+ }
471
+ return null;
472
+ };
473
+ const inMain = search(document.children);
474
+ if (inMain) return inMain;
475
+ if (document.roots) for (const rootNodes of Object.values(document.roots)) {
476
+ if (!Array.isArray(rootNodes)) continue;
477
+ const inRoot = search(rootNodes);
478
+ if (inRoot) return inRoot;
479
+ }
480
+ return null;
481
+ };
482
+ const findUniqueQuoteBlockId = (document, normalizedQuote) => {
483
+ if (normalizedQuote.length === 0) return void 0;
484
+ const matchedBlockIds = /* @__PURE__ */ new Set();
485
+ const scan = (nodes) => {
486
+ let anyChildMatched = false;
487
+ for (const node of nodes) {
488
+ if (!ElementApi.isElement(node)) continue;
489
+ if (hasAuthoredDeleteMark(node)) continue;
490
+ if (isKnownInlineElement(node, PLUGINS.reference)) continue;
491
+ if (Array.isArray(node.children) ? scan(node.children) : false) {
492
+ anyChildMatched = true;
493
+ continue;
494
+ }
495
+ const id = readOptionalValidString(node.id);
496
+ if (id === void 0) continue;
497
+ if (normalizeWhitespace(extractNodePlainText(node)).includes(normalizedQuote)) {
498
+ matchedBlockIds.add(id);
499
+ anyChildMatched = true;
500
+ }
501
+ }
502
+ return anyChildMatched;
503
+ };
504
+ scan(document.children);
505
+ if (document.roots) {
506
+ for (const rootNodes of Object.values(document.roots)) if (Array.isArray(rootNodes)) scan(rootNodes);
507
+ }
508
+ if (matchedBlockIds.size === 1) return matchedBlockIds.values().next().value;
509
+ };
510
+ /**
511
+ * Evaluate whether a pinned reference or citation has drifted from its target.
512
+ *
513
+ * When `quote` is present, quote matching always runs even if `revision` equals
514
+ * `target.revision`, preventing silent drift or spoofed revision tokens.
515
+ */
516
+ function evaluateReferenceDrift(reference, target) {
517
+ const pinnedRevision = readOptionalValidString(reference.revision);
518
+ const pinnedQuote = reference.quote === void 0 ? void 0 : readOptionalValidString(normalizeReferenceQuote(reference.quote));
519
+ if (pinnedRevision === void 0 && pinnedQuote === void 0) return { status: "unpinned" };
520
+ if (target === null) return { status: "unavailable" };
521
+ if (target.partialVisibility === true) return { status: "unverifiable" };
522
+ const currentRevision = readOptionalValidString(target.revision);
523
+ let liveText = target.liveText === void 0 ? void 0 : target.liveText;
524
+ if (liveText === void 0 && target.document !== void 0) {
525
+ const blockId = readOptionalValidString(reference.blockId);
526
+ const root = readOptionalValidString(reference.root);
527
+ if (blockId !== void 0) {
528
+ const found = findElementByIdAcrossRoots(target.document, blockId);
529
+ if (!found) {
530
+ const reanchoredBlockId = pinnedQuote === void 0 ? void 0 : findUniqueQuoteBlockId(target.document, normalizeWhitespace(pinnedQuote));
531
+ return {
532
+ ...currentRevision ? { currentRevision } : {},
533
+ ...pinnedQuote ? { pinnedQuote } : {},
534
+ ...pinnedRevision ? { pinnedRevision } : {},
535
+ ...reanchoredBlockId ? { reanchoredBlockId } : {},
536
+ reason: "target-not-found",
537
+ status: "drifted"
538
+ };
539
+ }
540
+ liveText = extractNodePlainText(found);
541
+ } else if (root !== void 0 && root !== MAIN_ROOT_KEY) {
542
+ const { roots } = target.document;
543
+ const rootNodes = roots ? Object.entries(roots).find(([key]) => key === root)?.[1] : void 0;
544
+ if (!Array.isArray(rootNodes)) return {
545
+ ...currentRevision ? { currentRevision } : {},
546
+ ...pinnedQuote ? { pinnedQuote } : {},
547
+ ...pinnedRevision ? { pinnedRevision } : {},
548
+ reason: "target-not-found",
549
+ status: "drifted"
550
+ };
551
+ liveText = extractTreePlainText(rootNodes);
552
+ } else liveText = extractTreePlainText(target.document.children);
553
+ }
554
+ if (pinnedQuote !== void 0) {
555
+ if (liveText === void 0 && target.document === void 0) return { status: "unverifiable" };
556
+ const normalizedPinned = normalizeWhitespace(pinnedQuote);
557
+ const normalizedLive = liveText === void 0 ? "" : normalizeWhitespace(liveText);
558
+ if (liveText === void 0 || !normalizedLive.includes(normalizedPinned)) {
559
+ const reanchoredBlockId = target.document === void 0 ? void 0 : findUniqueQuoteBlockId(target.document, normalizedPinned);
560
+ return {
561
+ ...currentRevision ? { currentRevision } : {},
562
+ ...liveText === void 0 ? {} : { liveText },
563
+ pinnedQuote,
564
+ ...pinnedRevision ? { pinnedRevision } : {},
565
+ ...reanchoredBlockId ? { reanchoredBlockId } : {},
566
+ reason: "quote-changed",
567
+ status: "drifted"
568
+ };
569
+ }
570
+ }
571
+ if (pinnedRevision !== void 0) {
572
+ if (currentRevision === void 0) return { status: "unverifiable" };
573
+ if (pinnedRevision !== currentRevision) return {
574
+ currentRevision,
575
+ ...liveText === void 0 ? {} : { liveText },
576
+ ...pinnedQuote ? { pinnedQuote } : {},
577
+ pinnedRevision,
578
+ reason: "revision-changed",
579
+ status: "drifted"
580
+ };
581
+ }
582
+ return {
583
+ ...currentRevision ? { currentRevision } : {},
584
+ ...liveText === void 0 ? {} : { liveText },
585
+ status: "current"
586
+ };
587
+ }
588
+ //#endregion
589
+ export { BaseReferencePlugin, evaluateReferenceDrift, extractDocumentReferences };
@@ -1,3 +1,3 @@
1
- import { A as TableToggleBordersOptions, C as TableResolvedCellBorder, D as TableSelectionBounds, E as TableSelection, F as TableCellElement, I as TableElement, L as TablePluginState, M as BaseTableCellPlugin, N as BaseTablePlugin, O as TableSetBordersOptions, P as BaseTableRowPlugin, R as TableRowElement, S as TableResizeTarget, T as TableSelectOptions, _ as TableDistributeColumnsOptions, a as TableAxisMoveOptions, b as TableResize, c as TableBorderTarget, d as TableCellBorders, f as TableCellInfo, g as TableCreateOptions, h as TableColumnResize, i as TableAxisInsertOptions, j as TableToggleHeaderOptions, k as TableTargetOptions, l as TableCellBackgroundOptions, m as TableCellTarget, n as BorderDirection, o as TableBorderState, p as TableCellReadOptions, r as TableAxisDuplicateOptions, s as TableBorderStates, u as TableCellBorder, v as TableHeaderOptions, w as TableResolvedCellBorders, x as TableResizeOptions, y as TableNodeTarget } from "../../widths-BjIZxtaJ.js";
2
- import "../../index-zcb_RtZC.js";
1
+ import { A as TableToggleBordersOptions, C as TableResolvedCellBorder, D as TableSelectionBounds, E as TableSelection, F as TableCellElement, I as TableElement, L as TablePluginState, M as BaseTableCellPlugin, N as BaseTablePlugin, O as TableSetBordersOptions, P as BaseTableRowPlugin, R as TableRowElement, S as TableResizeTarget, T as TableSelectOptions, _ as TableDistributeColumnsOptions, a as TableAxisMoveOptions, b as TableResize, c as TableBorderTarget, d as TableCellBorders, f as TableCellInfo, g as TableCreateOptions, h as TableColumnResize, i as TableAxisInsertOptions, j as TableToggleHeaderOptions, k as TableTargetOptions, l as TableCellBackgroundOptions, m as TableCellTarget, n as BorderDirection, o as TableBorderState, p as TableCellReadOptions, r as TableAxisDuplicateOptions, s as TableBorderStates, u as TableCellBorder, v as TableHeaderOptions, w as TableResolvedCellBorders, x as TableResizeOptions, y as TableNodeTarget } from "../../widths-9NNziDRW.js";
2
+ import "../../index-DUhUT9bV.js";
3
3
  export { BaseTableCellPlugin, BaseTablePlugin, BaseTableRowPlugin, BorderDirection, TableAxisDuplicateOptions, TableAxisInsertOptions, TableAxisMoveOptions, TableBorderState, TableBorderStates, TableBorderTarget, TableCellBackgroundOptions, TableCellBorder, TableCellBorders, TableCellElement, TableCellInfo, TableCellReadOptions, TableCellTarget, TableColumnResize, TableCreateOptions, TableDistributeColumnsOptions, TableElement, TableHeaderOptions, TableNodeTarget, TablePluginState, TableResize, TableResizeOptions, TableResizeTarget, TableResolvedCellBorder, TableResolvedCellBorders, TableRowElement, TableSelectOptions, TableSelection, TableSelectionBounds, TableSetBordersOptions, TableTargetOptions, TableToggleBordersOptions, TableToggleHeaderOptions };
@@ -1,2 +1,2 @@
1
- import { i as readTocHeadings, n as Heading, r as TocDefinition, t as BaseTocPlugin } from "../../index-D54VPeky.js";
1
+ import { i as readTocHeadings, n as Heading, r as TocDefinition, t as BaseTocPlugin } from "../../index-k-wvVxKl.js";
2
2
  export { BaseTocPlugin, Heading, TocDefinition, readTocHeadings };
@@ -1,2 +1,2 @@
1
- import { _ as UploadTaskState, a as UploadElement, c as UploadHandlerOptions, d as UploadProgress, f as UploadRefusal, g as UploadTask, h as UploadSubmitOptions, i as UploadAdmitOptions, l as UploadKind, m as UploadRules, n as UploadAdmission, o as UploadFailure, p as UploadRule, r as UploadAdmissionError, s as UploadHandler, t as BaseUploadPlugin, u as UploadPluginState, v as UPLOAD_KINDS } from "../../index-BFWK852j.js";
1
+ import { _ as UploadTaskState, a as UploadElement, c as UploadHandlerOptions, d as UploadProgress, f as UploadRefusal, g as UploadTask, h as UploadSubmitOptions, i as UploadAdmitOptions, l as UploadKind, m as UploadRules, n as UploadAdmission, o as UploadFailure, p as UploadRule, r as UploadAdmissionError, s as UploadHandler, t as BaseUploadPlugin, u as UploadPluginState, v as UPLOAD_KINDS } from "../../index-BcD2RAB9.js";
2
2
  export { BaseUploadPlugin, UPLOAD_KINDS, UploadAdmission, UploadAdmissionError, UploadAdmitOptions, UploadElement, UploadFailure, UploadHandler, UploadHandlerOptions, UploadKind, UploadPluginState, UploadProgress, UploadRefusal, UploadRule, UploadRules, UploadSubmitOptions, UploadTask, UploadTaskState };
@@ -1,2 +1,2 @@
1
- import { a as HistoryStateApi, n as History, o as HistoryTxApi, r as HistoryJSON, t as Batch } from "../index-CXd5hwaH.js";
1
+ import { a as HistoryStateApi, n as History, o as HistoryTxApi, r as HistoryJSON, t as Batch } from "../index-DQpHoxDX.js";
2
2
  export { type Batch, History, type HistoryJSON, type HistoryStateApi, type HistoryTxApi };
@@ -1,5 +1,5 @@
1
- import { a as HtmlEditorSerializeOptions, c as HtmlParseLimits, d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation, t as HtmlApi, u as HtmlSerializeOptions } from "../htmlTypes-CNhoCFjK.js";
2
- import { $ as HtmlWrapperSpec, J as HtmlElementPatch, K as HtmlAttributes, X as HtmlMatcher, Xt as HtmlPlugin, Y as HtmlMatchValue, Z as HtmlNodeSpec, Zt as decodeHtmlDataTransfer, q as HtmlContentToken } from "../core-CTB0OBoh.js";
3
- import { n as serializeHtml, t as parseHtml } from "../htmlConversion-Y-M6PLRi.js";
4
- import "../index-CKAkaSJK.js";
1
+ import { a as HtmlEditorSerializeOptions, c as HtmlParseLimits, d as HtmlSerializeResult, f as HtmlSliceParseResult, i as HtmlEditorParseOptions, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation, t as HtmlApi, u as HtmlSerializeOptions } from "../htmlTypes-3laowz-3.js";
2
+ import { $ as HtmlWrapperSpec, J as HtmlElementPatch, K as HtmlAttributes, X as HtmlMatcher, Xt as HtmlPlugin, Y as HtmlMatchValue, Z as HtmlNodeSpec, Zt as decodeHtmlDataTransfer, q as HtmlContentToken } from "../core-By92GWYW.js";
3
+ import { n as serializeHtml, t as parseHtml } from "../htmlConversion-CRnxMGw-.js";
4
+ import "../index-CyY3O6c7.js";
5
5
  export { type HtmlApi, type HtmlAttributes, type HtmlContentToken, type HtmlDiagnostic, type HtmlDocumentParseResult, type HtmlEditorParseOptions, type HtmlEditorSerializeOptions, type HtmlElementPatch, type HtmlErrorDiagnostic, type HtmlMatchValue, type HtmlMatcher, type HtmlModelLocation, type HtmlNodeSpec, type HtmlParseLimits, type HtmlParseOptions, HtmlPlugin, type HtmlSerializeOptions, type HtmlSerializeResult, type HtmlSliceParseResult, type HtmlSourceLocation, type HtmlWarningDiagnostic, type HtmlWrapperSpec, decodeHtmlDataTransfer, parseHtml, serializeHtml };
@@ -1,5 +1,5 @@
1
- import { c as HtmlParseLimits, d as HtmlSerializeResult, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation, u as HtmlSerializeOptions } from "../../htmlTypes-CNhoCFjK.js";
2
- import { n as serializeHtml } from "../../htmlConversion-Y-M6PLRi.js";
1
+ import { c as HtmlParseLimits, d as HtmlSerializeResult, l as HtmlParseOptions, m as HtmlWarningDiagnostic, n as HtmlDiagnostic, o as HtmlErrorDiagnostic, p as HtmlSourceLocation, r as HtmlDocumentParseResult, s as HtmlModelLocation, u as HtmlSerializeOptions } from "../../htmlTypes-3laowz-3.js";
2
+ import { n as serializeHtml } from "../../htmlConversion-CRnxMGw-.js";
3
3
  /**
4
4
  * Parse an HTML string into a Plate document in Node.js using `linkedom`.
5
5
  */