@burger-editor/client 4.0.0-alpha.77 → 4.0.0-alpha.78

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 (50) hide show
  1. package/README.md +42 -41
  2. package/dist/block-swap-view-transition-css.d.ts +7 -0
  3. package/dist/block-swap-view-transition-css.d.ts.map +1 -0
  4. package/dist/client.css +158 -18
  5. package/dist/client.js +354 -281
  6. package/dist/client.js.map +1 -1
  7. package/dist/components/block-catalog.d.ts.map +1 -1
  8. package/dist/components/block-menu-anchors.d.ts +25 -0
  9. package/dist/components/block-menu-anchors.d.ts.map +1 -0
  10. package/dist/components/block-menu-button.d.ts +7 -2
  11. package/dist/components/block-menu-button.d.ts.map +1 -1
  12. package/dist/components/block-menu-view.d.ts +35 -29
  13. package/dist/components/block-menu-view.d.ts.map +1 -1
  14. package/dist/components/block-menu.d.ts.map +1 -1
  15. package/dist/components/block-options.d.ts.map +1 -1
  16. package/dist/components/editable-area-view.d.ts.map +1 -1
  17. package/dist/components/front-matter-editor.d.ts +16 -5
  18. package/dist/components/front-matter-editor.d.ts.map +1 -1
  19. package/dist/components/index.d.ts +3 -1
  20. package/dist/components/index.d.ts.map +1 -1
  21. package/dist/components/thumbnail-button.d.ts +39 -0
  22. package/dist/components/thumbnail-button.d.ts.map +1 -0
  23. package/dist/create-mock-engine-BloCpuEu.js +87 -0
  24. package/dist/create-mock-engine-BloCpuEu.js.map +1 -0
  25. package/dist/{engine-context-j4-LLPEh.js → dist-DYydjVsL.js} +772 -516
  26. package/dist/dist-DYydjVsL.js.map +1 -0
  27. package/dist/{editable-area-view-BRYT222Y.js → editable-area-view-CAeVDyOh.js} +538 -532
  28. package/dist/editable-area-view-CAeVDyOh.js.map +1 -0
  29. package/dist/engine-context-oEEsvNSx.js +49 -0
  30. package/dist/engine-context-oEEsvNSx.js.map +1 -0
  31. package/dist/form/select-field.d.ts +4 -1
  32. package/dist/form/select-field.d.ts.map +1 -1
  33. package/dist/form/text-field.d.ts +11 -1
  34. package/dist/form/text-field.d.ts.map +1 -1
  35. package/dist/interest-hints.d.ts +21 -0
  36. package/dist/interest-hints.d.ts.map +1 -0
  37. package/dist/replace-element.d.ts +12 -4
  38. package/dist/replace-element.d.ts.map +1 -1
  39. package/dist/testing/create-mock-engine.d.ts +3 -0
  40. package/dist/testing/create-mock-engine.d.ts.map +1 -1
  41. package/dist/testing-mock-engine.js +1 -0
  42. package/dist/testing.js +4 -55
  43. package/dist/testing.js.map +1 -1
  44. package/dist/ui.d.ts +1 -0
  45. package/dist/ui.d.ts.map +1 -1
  46. package/dist/ui.js +267 -160
  47. package/dist/ui.js.map +1 -1
  48. package/package.json +25 -21
  49. package/dist/editable-area-view-BRYT222Y.js.map +0 -1
  50. package/dist/engine-context-j4-LLPEh.js.map +0 -1
package/dist/client.js CHANGED
@@ -1,10 +1,11 @@
1
- import { i as BurgerEditorEngine, n as useEngine, t as EngineProvider } from "./engine-context-j4-LLPEh.js";
2
- import { d as registerEngineCommands, f as useUIState, g as BlockCatalog, h as BlockOptions, l as reactMount, m as EditorDialog, p as ItemEditorHost, s as RootErrorBoundary, t as EditableAreaView, u as DraftSwitcher } from "./editable-area-view-BRYT222Y.js";
1
+ import { n as BurgerEditorEngine } from "./dist-DYydjVsL.js";
2
+ import { _ as BlockCatalog, c as RootErrorBoundary, d as DraftSwitcher, f as registerEngineCommands, g as BlockOptions, h as EditorDialog, m as ItemEditorHost, p as useUIState, t as EditableAreaView, u as reactMount } from "./editable-area-view-CAeVDyOh.js";
3
+ import { n as useEngine, t as EngineProvider } from "./engine-context-oEEsvNSx.js";
3
4
  import { c } from "react/compiler-runtime";
4
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
6
  import { createRoot } from "react-dom/client";
6
7
  import { createPortal } from "react-dom";
7
- //#region ../utils/dist/normalize-html.js
8
+ // ../utils/dist/normalize-html.js
8
9
  /**
9
10
  * HTMLの構造を正規化して比較する
10
11
  * 空白や属性順序の違いを無視し、タグ構造のみを比較する
@@ -78,8 +79,7 @@ function compareAttributes(attrs1, attrs2) {
78
79
  function normalizeText(text) {
79
80
  return text.replaceAll(/\s+/g, " ").trim();
80
81
  }
81
- //#endregion
82
- //#region ../core/dist/block/apply-block-options.js
82
+ // ../core/dist/block/apply-block-options.js
83
83
  /**
84
84
  * Apply the block options dialog's submitted form data to a block.
85
85
  * All options — including the frame semantics (div/ul/ol) — take effect
@@ -146,77 +146,53 @@ function applyBlockOptions(block, formData) {
146
146
  function isContainerFrameSemantics(value) {
147
147
  return value === "div" || value === "ul" || value === "ol";
148
148
  }
149
- //#endregion
150
- //#region ../../../node_modules/@tabler/icons/icons/outline/align-box-center-stretch.svg?raw
149
+ // ../../../node_modules/@tabler/icons/icons/outline/align-box-center-stretch.svg?raw
151
150
  var align_box_center_stretch_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-align-box-center-stretch\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M3 19v-14a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2\" />\n <path d=\"M11 17h2\" />\n <path d=\"M9 12h6\" />\n <path d=\"M10 7h4\" />\n</svg>";
152
- //#endregion
153
- //#region ../../../node_modules/@tabler/icons/icons/outline/align-center.svg?raw
151
+ // ../../../node_modules/@tabler/icons/icons/outline/align-center.svg?raw
154
152
  var align_center_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-align-center\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M4 6l16 0\" />\n <path d=\"M8 12l8 0\" />\n <path d=\"M6 18l12 0\" />\n</svg>";
155
- //#endregion
156
- //#region ../../../node_modules/@tabler/icons/icons/outline/align-left.svg?raw
153
+ // ../../../node_modules/@tabler/icons/icons/outline/align-left.svg?raw
157
154
  var align_left_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-align-left\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M4 6l16 0\" />\n <path d=\"M4 12l10 0\" />\n <path d=\"M4 18l14 0\" />\n</svg>";
158
- //#endregion
159
- //#region ../../../node_modules/@tabler/icons/icons/outline/align-right.svg?raw
155
+ // ../../../node_modules/@tabler/icons/icons/outline/align-right.svg?raw
160
156
  var align_right_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-align-right\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M4 6l16 0\" />\n <path d=\"M10 12l10 0\" />\n <path d=\"M6 18l14 0\" />\n</svg>";
161
- //#endregion
162
- //#region ../../../node_modules/@tabler/icons/icons/outline/blockquote.svg?raw
157
+ // ../../../node_modules/@tabler/icons/icons/outline/blockquote.svg?raw
163
158
  var blockquote_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-blockquote\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M6 15h15\" />\n <path d=\"M21 19h-15\" />\n <path d=\"M15 11h6\" />\n <path d=\"M21 7h-6\" />\n <path d=\"M9 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2\" />\n <path d=\"M3 9h1a1 1 0 1 1 -1 1v-2.5a2 2 0 0 1 2 -2\" />\n</svg>";
164
- //#endregion
165
- //#region ../../../node_modules/@tabler/icons/icons/outline/bold.svg?raw
159
+ // ../../../node_modules/@tabler/icons/icons/outline/bold.svg?raw
166
160
  var bold_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-bold\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M7 5h6a3.5 3.5 0 0 1 0 7h-6l0 -7\" />\n <path d=\"M13 12h1a3.5 3.5 0 0 1 0 7h-7v-7\" />\n</svg>";
167
- //#endregion
168
- //#region ../../../node_modules/@tabler/icons/icons/outline/cloud.svg?raw
161
+ // ../../../node_modules/@tabler/icons/icons/outline/cloud.svg?raw
169
162
  var cloud_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-cloud\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878\" />\n</svg>";
170
- //#endregion
171
- //#region ../../../node_modules/@tabler/icons/icons/outline/code.svg?raw
163
+ // ../../../node_modules/@tabler/icons/icons/outline/code.svg?raw
172
164
  var code_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-code\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M7 8l-4 4l4 4\" />\n <path d=\"M17 8l4 4l-4 4\" />\n <path d=\"M14 4l-4 16\" />\n</svg>";
173
- //#endregion
174
- //#region ../../../node_modules/@tabler/icons/icons/outline/h-1.svg?raw
165
+ // ../../../node_modules/@tabler/icons/icons/outline/h-1.svg?raw
175
166
  var h_1_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-h-1\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M19 18v-8l-2 2\" />\n <path d=\"M4 6v12\" />\n <path d=\"M12 6v12\" />\n <path d=\"M11 18h2\" />\n <path d=\"M3 18h2\" />\n <path d=\"M4 12h8\" />\n <path d=\"M3 6h2\" />\n <path d=\"M11 6h2\" />\n</svg>";
176
- //#endregion
177
- //#region ../../../node_modules/@tabler/icons/icons/outline/h-2.svg?raw
167
+ // ../../../node_modules/@tabler/icons/icons/outline/h-2.svg?raw
178
168
  var h_2_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-h-2\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M17 12a2 2 0 1 1 4 0c0 .591 -.417 1.318 -.816 1.858l-3.184 4.143l4 0\" />\n <path d=\"M4 6v12\" />\n <path d=\"M12 6v12\" />\n <path d=\"M11 18h2\" />\n <path d=\"M3 18h2\" />\n <path d=\"M4 12h8\" />\n <path d=\"M3 6h2\" />\n <path d=\"M11 6h2\" />\n</svg>";
179
- //#endregion
180
- //#region ../../../node_modules/@tabler/icons/icons/outline/h-3.svg?raw
169
+ // ../../../node_modules/@tabler/icons/icons/outline/h-3.svg?raw
181
170
  var h_3_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-h-3\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M19 14a2 2 0 1 0 -2 -2\" />\n <path d=\"M17 16a2 2 0 1 0 2 -2\" />\n <path d=\"M4 6v12\" />\n <path d=\"M12 6v12\" />\n <path d=\"M11 18h2\" />\n <path d=\"M3 18h2\" />\n <path d=\"M4 12h8\" />\n <path d=\"M3 6h2\" />\n <path d=\"M11 6h2\" />\n</svg>";
182
- //#endregion
183
- //#region ../../../node_modules/@tabler/icons/icons/outline/h-4.svg?raw
171
+ // ../../../node_modules/@tabler/icons/icons/outline/h-4.svg?raw
184
172
  var h_4_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-h-4\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M20 18v-8l-4 6h5\" />\n <path d=\"M4 6v12\" />\n <path d=\"M12 6v12\" />\n <path d=\"M11 18h2\" />\n <path d=\"M3 18h2\" />\n <path d=\"M4 12h8\" />\n <path d=\"M3 6h2\" />\n <path d=\"M11 6h2\" />\n</svg>";
185
- //#endregion
186
- //#region ../../../node_modules/@tabler/icons/icons/outline/h-5.svg?raw
173
+ // ../../../node_modules/@tabler/icons/icons/outline/h-5.svg?raw
187
174
  var h_5_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-h-5\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M17 18h2a2 2 0 1 0 0 -4h-2v-4h4\" />\n <path d=\"M4 6v12\" />\n <path d=\"M12 6v12\" />\n <path d=\"M11 18h2\" />\n <path d=\"M3 18h2\" />\n <path d=\"M4 12h8\" />\n <path d=\"M3 6h2\" />\n <path d=\"M11 6h2\" />\n</svg>";
188
- //#endregion
189
- //#region ../../../node_modules/@tabler/icons/icons/outline/h-6.svg?raw
175
+ // ../../../node_modules/@tabler/icons/icons/outline/h-6.svg?raw
190
176
  var h_6_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-h-6\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M19 14a2 2 0 1 0 0 4a2 2 0 0 0 0 -4\" />\n <path d=\"M21 12a2 2 0 1 0 -4 0v4\" />\n <path d=\"M4 6v12\" />\n <path d=\"M12 6v12\" />\n <path d=\"M11 18h2\" />\n <path d=\"M3 18h2\" />\n <path d=\"M4 12h8\" />\n <path d=\"M3 6h2\" />\n <path d=\"M11 6h2\" />\n</svg>";
191
- //#endregion
192
- //#region ../../../node_modules/@tabler/icons/icons/outline/italic.svg?raw
177
+ // ../../../node_modules/@tabler/icons/icons/outline/italic.svg?raw
193
178
  var italic_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-italic\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M11 5l6 0\" />\n <path d=\"M7 19l6 0\" />\n <path d=\"M14 5l-4 14\" />\n</svg>";
194
- //#endregion
195
- //#region ../../../node_modules/@tabler/icons/icons/outline/link.svg?raw
179
+ // ../../../node_modules/@tabler/icons/icons/outline/link.svg?raw
196
180
  var link_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-link\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M9 15l6 -6\" />\n <path d=\"M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464\" />\n <path d=\"M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463\" />\n</svg>";
197
- //#endregion
198
- //#region ../../../node_modules/@tabler/icons/icons/outline/list-numbers.svg?raw
181
+ // ../../../node_modules/@tabler/icons/icons/outline/list-numbers.svg?raw
199
182
  var list_numbers_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-list-numbers\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M11 6h9\" />\n <path d=\"M11 12h9\" />\n <path d=\"M12 18h8\" />\n <path d=\"M4 16a2 2 0 1 1 4 0c0 .591 -.5 1 -1 1.5l-3 2.5h4\" />\n <path d=\"M6 10v-6l-2 2\" />\n</svg>";
200
- //#endregion
201
- //#region ../../../node_modules/@tabler/icons/icons/outline/list.svg?raw
183
+ // ../../../node_modules/@tabler/icons/icons/outline/list.svg?raw
202
184
  var list_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-list\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M9 6l11 0\" />\n <path d=\"M9 12l11 0\" />\n <path d=\"M9 18l11 0\" />\n <path d=\"M5 6l0 .01\" />\n <path d=\"M5 12l0 .01\" />\n <path d=\"M5 18l0 .01\" />\n</svg>";
203
- //#endregion
204
- //#region ../../../node_modules/@tabler/icons/icons/outline/notes.svg?raw
185
+ // ../../../node_modules/@tabler/icons/icons/outline/notes.svg?raw
205
186
  var notes_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-notes\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M5 5a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -14\" />\n <path d=\"M9 7l6 0\" />\n <path d=\"M9 11l6 0\" />\n <path d=\"M9 15l4 0\" />\n</svg>";
206
- //#endregion
207
- //#region ../../../node_modules/@tabler/icons/icons/outline/strikethrough.svg?raw
187
+ // ../../../node_modules/@tabler/icons/icons/outline/strikethrough.svg?raw
208
188
  var strikethrough_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-strikethrough\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M5 12l14 0\" />\n <path d=\"M16 6.5a4 2 0 0 0 -4 -1.5h-1a3.5 3.5 0 0 0 0 7h2a3.5 3.5 0 0 1 0 7h-1.5a4 2 0 0 1 -4 -1.5\" />\n</svg>";
209
- //#endregion
210
- //#region ../../../node_modules/@tabler/icons/icons/outline/subscript.svg?raw
189
+ // ../../../node_modules/@tabler/icons/icons/outline/subscript.svg?raw
211
190
  var subscript_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-subscript\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M5 7l8 10m-8 0l8 -10\" />\n <path d=\"M21 20h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2\" />\n</svg>";
212
- //#endregion
213
- //#region ../../../node_modules/@tabler/icons/icons/outline/superscript.svg?raw
191
+ // ../../../node_modules/@tabler/icons/icons/outline/superscript.svg?raw
214
192
  var superscript_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-superscript\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M5 7l8 10m-8 0l8 -10\" />\n <path d=\"M21 11h-4l3.5 -4a1.73 1.73 0 0 0 -3.5 -2\" />\n</svg>";
215
- //#endregion
216
- //#region ../../../node_modules/@tabler/icons/icons/outline/underline.svg?raw
193
+ // ../../../node_modules/@tabler/icons/icons/outline/underline.svg?raw
217
194
  var underline_default = "<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n class=\"icon icon-tabler icons-tabler-outline icon-tabler-underline\"\n>\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\" />\n <path d=\"M7 5v5a5 5 0 0 0 10 0v-5\" />\n <path d=\"M5 19h14\" />\n</svg>";
218
- //#endregion
219
- //#region ../../../node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js
195
+ // ../../../node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js
220
196
  var __defProp = Object.defineProperty;
221
197
  var __exportAll = (all, no_symbols) => {
222
198
  let target = {};
@@ -227,8 +203,7 @@ var __exportAll = (all, no_symbols) => {
227
203
  if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
228
204
  return target;
229
205
  };
230
- //#endregion
231
- //#region ../../../node_modules/orderedmap/dist/index.js
206
+ // ../../../node_modules/orderedmap/dist/index.js
232
207
  function OrderedMap(content) {
233
208
  this.content = content;
234
209
  }
@@ -309,8 +284,7 @@ OrderedMap.from = function(value) {
309
284
  if (value) for (var prop in value) content.push(prop, value[prop]);
310
285
  return new OrderedMap(content);
311
286
  };
312
- //#endregion
313
- //#region ../../../node_modules/prosemirror-model/dist/index.js
287
+ // ../../../node_modules/prosemirror-model/dist/index.js
314
288
  function findDiffStart(a, b, pos) {
315
289
  for (let i = 0;; i++) {
316
290
  if (i == a.childCount || i == b.childCount) return a.childCount == b.childCount ? null : pos;
@@ -1307,7 +1281,7 @@ tree shape like this (without back pointers) makes easy.
1307
1281
  **Do not** directly mutate the properties of a `Node` object. See
1308
1282
  [the guide](https://prosemirror.net/docs/guide/#doc) for more information.
1309
1283
  */
1310
- var Node$2 = class Node$2 {
1284
+ var Node$1 = class Node$1 {
1311
1285
  /**
1312
1286
  @internal
1313
1287
  */
@@ -1437,14 +1411,14 @@ var Node$2 = class Node$2 {
1437
1411
  */
1438
1412
  copy(content = null) {
1439
1413
  if (content == this.content) return this;
1440
- return new Node$2(this.type, this.attrs, content, this.marks);
1414
+ return new Node$1(this.type, this.attrs, content, this.marks);
1441
1415
  }
1442
1416
  /**
1443
1417
  Create a copy of this node, with the given set of marks instead
1444
1418
  of the node's own marks.
1445
1419
  */
1446
1420
  mark(marks) {
1447
- return marks == this.marks ? this : new Node$2(this.type, this.attrs, this.content, marks);
1421
+ return marks == this.marks ? this : new Node$1(this.type, this.attrs, this.content, marks);
1448
1422
  }
1449
1423
  /**
1450
1424
  Create a copy of this node with only the content between the
@@ -1698,8 +1672,17 @@ var Node$2 = class Node$2 {
1698
1672
  return schema.nodeType(json.type).create(json.attrs, content, marks);
1699
1673
  }
1700
1674
  };
1701
- Node$2.prototype.text = void 0;
1702
- var TextNode = class TextNode extends Node$2 {
1675
+ Node$1.prototype.text = void 0;
1676
+ var v8InternHack = (() => {
1677
+ let { stack } = /* @__PURE__ */ new Error("/");
1678
+ if (!stack || !/\n\s*at\s/.test(stack)) return (s) => s;
1679
+ let obj = Object.create(null);
1680
+ return (s) => {
1681
+ obj[s];
1682
+ return s;
1683
+ };
1684
+ })();
1685
+ var TextNode = class TextNode extends Node$1 {
1703
1686
  /**
1704
1687
  @internal
1705
1688
  */
@@ -1716,7 +1699,7 @@ var TextNode = class TextNode extends Node$2 {
1716
1699
  return this.text;
1717
1700
  }
1718
1701
  textBetween(from, to) {
1719
- return this.text.slice(from, to);
1702
+ return v8InternHack(this.text.slice(from, to));
1720
1703
  }
1721
1704
  get nodeSize() {
1722
1705
  return this.text.length;
@@ -1730,7 +1713,7 @@ var TextNode = class TextNode extends Node$2 {
1730
1713
  }
1731
1714
  cut(from = 0, to = this.text.length) {
1732
1715
  if (from == 0 && to == this.text.length) return this;
1733
- return this.withText(this.text.slice(from, to));
1716
+ return this.withText(v8InternHack(this.text.slice(from, to)));
1734
1717
  }
1735
1718
  eq(other) {
1736
1719
  return this.sameMarkup(other) && this.text == other.text;
@@ -2271,7 +2254,7 @@ var NodeType$1 = class NodeType$1 {
2271
2254
  */
2272
2255
  create(attrs = null, content, marks) {
2273
2256
  if (this.isText) throw new Error("NodeType.create can't construct text nodes");
2274
- return new Node$2(this, this.computeAttrs(attrs), Fragment$1.from(content), Mark$1.setFrom(marks));
2257
+ return new Node$1(this, this.computeAttrs(attrs), Fragment$1.from(content), Mark$1.setFrom(marks));
2275
2258
  }
2276
2259
  /**
2277
2260
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
@@ -2281,7 +2264,7 @@ var NodeType$1 = class NodeType$1 {
2281
2264
  createChecked(attrs = null, content, marks) {
2282
2265
  content = Fragment$1.from(content);
2283
2266
  this.checkContent(content);
2284
- return new Node$2(this, this.computeAttrs(attrs), content, Mark$1.setFrom(marks));
2267
+ return new Node$1(this, this.computeAttrs(attrs), content, Mark$1.setFrom(marks));
2285
2268
  }
2286
2269
  /**
2287
2270
  Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but see if it is
@@ -2302,7 +2285,7 @@ var NodeType$1 = class NodeType$1 {
2302
2285
  let matched = this.contentMatch.matchFragment(content);
2303
2286
  let after = matched && matched.fillBefore(Fragment$1.empty, true);
2304
2287
  if (!after) return null;
2305
- return new Node$2(this, attrs, content.append(after), Mark$1.setFrom(marks));
2288
+ return new Node$1(this, attrs, content.append(after), Mark$1.setFrom(marks));
2306
2289
  }
2307
2290
  /**
2308
2291
  Returns true if the given fragment is valid content for this node
@@ -2490,7 +2473,7 @@ var Schema = class {
2490
2473
  let type = this.marks[prop], excl = type.spec.excludes;
2491
2474
  type.excluded = excl == null ? [type] : excl == "" ? [] : gatherMarks(this, excl.split(" "));
2492
2475
  }
2493
- this.nodeFromJSON = (json) => Node$2.fromJSON(this, json);
2476
+ this.nodeFromJSON = (json) => Node$1.fromJSON(this, json);
2494
2477
  this.markFromJSON = (json) => Mark$1.fromJSON(this, json);
2495
2478
  this.topNodeType = this.nodes[this.spec.topNode || "doc"];
2496
2479
  this.cached.wrappings = Object.create(null);
@@ -3296,8 +3279,7 @@ function renderSpec(doc, structure, xmlNS, blockArraysIn) {
3296
3279
  contentDOM
3297
3280
  };
3298
3281
  }
3299
- //#endregion
3300
- //#region ../../../node_modules/prosemirror-transform/dist/index.js
3282
+ // ../../../node_modules/prosemirror-transform/dist/index.js
3301
3283
  var lower16 = 65535;
3302
3284
  var factor16 = Math.pow(2, 16);
3303
3285
  function makeRecover(index, offset) {
@@ -3720,13 +3702,24 @@ var AddMarkStep = class AddMarkStep extends Step {
3720
3702
  }, parent), oldSlice.openStart, oldSlice.openEnd);
3721
3703
  return StepResult.fromReplace(doc, this.from, this.to, slice);
3722
3704
  }
3723
- invert() {
3724
- return new RemoveMarkStep(this.from, this.to, this.mark);
3705
+ invert(doc) {
3706
+ let steps = [];
3707
+ doc.nodesBetween(this.from, this.to, (node, pos) => {
3708
+ if (node.isInline && node.isAtom) {
3709
+ let added = this.mark.addToSet(node.marks);
3710
+ if (!Mark$1.sameSet(added, node.marks)) {
3711
+ let from = Math.max(this.from, pos), to = Math.min(this.to, pos + node.nodeSize);
3712
+ pushMarkStep(RemoveMarkStep, from, to, this.mark, steps);
3713
+ for (let mark of node.marks) if (!mark.isInSet(added)) pushMarkStep(AddMarkStep, from, to, mark, steps);
3714
+ }
3715
+ }
3716
+ });
3717
+ return steps.length == 1 ? steps[0] : new MarkSetStep(steps);
3725
3718
  }
3726
3719
  map(mapping) {
3727
- let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);
3728
- if (from.deleted && to.deleted || from.pos >= to.pos) return null;
3729
- return new AddMarkStep(from.pos, to.pos, this.mark);
3720
+ let from = mapping.map(this.from, 1), to = mapping.map(this.to, -1);
3721
+ if (from >= to) return null;
3722
+ return new AddMarkStep(from, to, this.mark);
3730
3723
  }
3731
3724
  merge(other) {
3732
3725
  if (other instanceof AddMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new AddMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);
@@ -3769,13 +3762,17 @@ var RemoveMarkStep = class RemoveMarkStep extends Step {
3769
3762
  }, doc), oldSlice.openStart, oldSlice.openEnd);
3770
3763
  return StepResult.fromReplace(doc, this.from, this.to, slice);
3771
3764
  }
3772
- invert() {
3773
- return new AddMarkStep(this.from, this.to, this.mark);
3765
+ invert(doc) {
3766
+ let steps = [];
3767
+ doc.nodesBetween(this.from, this.to, (node, pos) => {
3768
+ if (node.isInline && node.isAtom && this.mark.isInSet(node.marks)) pushMarkStep(AddMarkStep, Math.max(this.from, pos), Math.min(this.to, pos + node.nodeSize), this.mark, steps);
3769
+ });
3770
+ return steps.length == 1 ? steps[0] : new MarkSetStep(steps);
3774
3771
  }
3775
3772
  map(mapping) {
3776
- let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);
3777
- if (from.deleted && to.deleted || from.pos >= to.pos) return null;
3778
- return new RemoveMarkStep(from.pos, to.pos, this.mark);
3773
+ let from = mapping.map(this.from, 1), to = mapping.map(this.to, -1);
3774
+ if (from >= to) return null;
3775
+ return new RemoveMarkStep(from, to, this.mark);
3779
3776
  }
3780
3777
  merge(other) {
3781
3778
  if (other instanceof RemoveMarkStep && other.mark.eq(this.mark) && this.from <= other.to && this.to >= other.from) return new RemoveMarkStep(Math.min(this.from, other.from), Math.max(this.to, other.to), this.mark);
@@ -3798,6 +3795,47 @@ var RemoveMarkStep = class RemoveMarkStep extends Step {
3798
3795
  }
3799
3796
  };
3800
3797
  Step.jsonID("removeMark", RemoveMarkStep);
3798
+ function pushMarkStep(cls, from, to, mark, target) {
3799
+ let last = target.length ? target[target.length - 1] : null;
3800
+ if (last && last instanceof cls && last.to == from && last.mark.eq(mark)) target[target.length - 1] = new cls(last.from, to, mark);
3801
+ else target.push(new cls(from, to, mark));
3802
+ }
3803
+ var MarkSetStep = class MarkSetStep extends Step {
3804
+ constructor(steps) {
3805
+ super();
3806
+ this.steps = steps;
3807
+ }
3808
+ apply(doc) {
3809
+ for (let step of this.steps) {
3810
+ let result = step.apply(doc);
3811
+ if (!result.doc) return result;
3812
+ doc = result.doc;
3813
+ }
3814
+ return new StepResult(doc, null);
3815
+ }
3816
+ invert(doc) {
3817
+ return new MarkSetStep(this.steps.map((s) => s.invert(doc)));
3818
+ }
3819
+ map(mapping) {
3820
+ let result = [];
3821
+ for (let step of this.steps) {
3822
+ let mapped = step.map(mapping);
3823
+ if (mapped) result.push(mapped);
3824
+ }
3825
+ return result.length ? new MarkSetStep(result) : null;
3826
+ }
3827
+ toJSON() {
3828
+ return {
3829
+ stepType: "markSet",
3830
+ steps: this.steps.map((s) => s.toJSON())
3831
+ };
3832
+ }
3833
+ static fromJSON(schema, json) {
3834
+ if (!Array.isArray(json.steps) || !json.steps.every((s) => s.stepType == "addMark" || s.stepType == "removeMark")) throw new RangeError("Invalid JSON for MarkSetStep");
3835
+ return new MarkSetStep(json.steps.map((s) => Step.fromJSON(schema, s)));
3836
+ }
3837
+ };
3838
+ Step.jsonID("markSet", MarkSetStep);
3801
3839
  /**
3802
3840
  Add a mark to a specific node.
3803
3841
  */
@@ -4016,7 +4054,7 @@ var ReplaceAroundStep = class ReplaceAroundStep extends Step {
4016
4054
  let from = mapping.mapResult(this.from, 1), to = mapping.mapResult(this.to, -1);
4017
4055
  let gapFrom = this.from == this.gapFrom ? from.pos : mapping.map(this.gapFrom, -1);
4018
4056
  let gapTo = this.to == this.gapTo ? to.pos : mapping.map(this.gapTo, 1);
4019
- if (from.deletedAcross && to.deletedAcross || gapFrom < from.pos || gapTo > to.pos) return null;
4057
+ if (from.deletedAcross && to.deletedAcross || gapFrom < from.pos || gapTo > to.pos || gapFrom > gapTo) return null;
4020
4058
  return new ReplaceAroundStep(from.pos, to.pos, gapFrom, gapTo, this.slice, this.insert, this.structure);
4021
4059
  }
4022
4060
  toJSON() {
@@ -4058,29 +4096,18 @@ function contentBetween(doc, from, to) {
4058
4096
  return false;
4059
4097
  }
4060
4098
  function addMark(tr, from, to, mark) {
4061
- let removed = [], added = [];
4062
- let removing, adding;
4099
+ let added = [];
4063
4100
  tr.doc.nodesBetween(from, to, (node, pos, parent) => {
4064
4101
  if (!node.isInline) return;
4065
4102
  let marks = node.marks;
4066
- if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) {
4067
- let start = Math.max(pos, from), end = Math.min(pos + node.nodeSize, to);
4068
- let newSet = mark.addToSet(marks);
4069
- for (let i = 0; i < marks.length; i++) if (!marks[i].isInSet(newSet)) {
4070
- if (removing && removing.to == start && removing.mark.eq(marks[i])) removing.to = end;
4071
- else removed.push(removing = new RemoveMarkStep(start, end, marks[i]));
4072
- }
4073
- if (adding && adding.to == start) adding.to = end;
4074
- else added.push(adding = new AddMarkStep(start, end, mark));
4075
- }
4103
+ if (!mark.isInSet(marks) && parent.type.allowsMarkType(mark.type)) pushMarkStep(AddMarkStep, Math.max(pos, from), Math.min(pos + node.nodeSize, to), mark, added);
4076
4104
  });
4077
- removed.forEach((s) => tr.step(s));
4078
4105
  added.forEach((s) => tr.step(s));
4079
4106
  }
4080
4107
  function removeMark(tr, from, to, mark) {
4081
4108
  let matched = [], step = 0;
4082
4109
  tr.doc.nodesBetween(from, to, (node, pos) => {
4083
- if (!node.isInline) return;
4110
+ if (!node.isInline || !node.isAtom) return;
4084
4111
  step++;
4085
4112
  let toRemove = null;
4086
4113
  if (mark instanceof MarkType) {
@@ -4566,15 +4593,14 @@ var Fitter = class {
4566
4593
  this.placed = addToFragment(this.placed, frontierDepth, Fragment$1.from(add));
4567
4594
  this.frontier[frontierDepth].match = match;
4568
4595
  if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1) this.closeFrontierNode();
4569
- for (let i = 0, cur = fragment; i < openEndCount; i++) {
4570
- let node = cur.lastChild;
4596
+ for (let i = 0, cur = add[add.length - 1]; cur && i < openEndCount; i++) {
4571
4597
  this.frontier.push({
4572
- type: node.type,
4573
- match: node.contentMatchAt(node.childCount)
4598
+ type: cur.type,
4599
+ match: cur.contentMatchAt(cur.childCount)
4574
4600
  });
4575
- cur = node.content;
4601
+ cur = cur.lastChild;
4576
4602
  }
4577
- this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), slice.openStart, slice.openEnd) : sliceDepth == 0 ? Slice.empty : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);
4603
+ this.unplaced = !toEnd ? new Slice(dropFromFragment(slice.content, sliceDepth, taken), sliceDepth, slice.openEnd) : sliceDepth == 0 ? Slice.empty : new Slice(dropFromFragment(slice.content, sliceDepth - 1, 1), sliceDepth - 1, openEndCount < 0 ? slice.openEnd : sliceDepth - 1);
4578
4604
  }
4579
4605
  mustMoveInline() {
4580
4606
  if (!this.$to.parent.isTextblock) return -1;
@@ -5157,8 +5183,7 @@ var Transform = class {
5157
5183
  return this;
5158
5184
  }
5159
5185
  };
5160
- //#endregion
5161
- //#region ../../../node_modules/prosemirror-state/dist/index.js
5186
+ // ../../../node_modules/prosemirror-state/dist/index.js
5162
5187
  var classesById = Object.create(null);
5163
5188
  /**
5164
5189
  Superclass for editor selections. Every selection type should
@@ -6031,7 +6056,7 @@ var EditorState = class EditorState {
6031
6056
  let $config = new Configuration(config.schema, config.plugins);
6032
6057
  let instance = new EditorState($config);
6033
6058
  $config.fields.forEach((field) => {
6034
- if (field.name == "doc") instance.doc = Node$2.fromJSON(config.schema, json.doc);
6059
+ if (field.name == "doc") instance.doc = Node$1.fromJSON(config.schema, json.doc);
6035
6060
  else if (field.name == "selection") instance.selection = Selection$1.fromJSON(instance.doc, json.selection);
6036
6061
  else if (field.name == "storedMarks") {
6037
6062
  if (json.storedMarks) instance.storedMarks = json.storedMarks.map(config.schema.markFromJSON);
@@ -6116,8 +6141,7 @@ var PluginKey = class {
6116
6141
  return state[this.key];
6117
6142
  }
6118
6143
  };
6119
- //#endregion
6120
- //#region ../../../node_modules/prosemirror-commands/dist/index.js
6144
+ // ../../../node_modules/prosemirror-commands/dist/index.js
6121
6145
  /**
6122
6146
  Delete the selection, if there is one.
6123
6147
  */
@@ -6675,8 +6699,7 @@ var macBaseKeymap = {
6675
6699
  };
6676
6700
  for (let key in pcBaseKeymap) macBaseKeymap[key] = pcBaseKeymap[key];
6677
6701
  typeof navigator != "undefined" ? /Mac|iP(hone|[oa]d)/.test(navigator.platform) : typeof os != "undefined" && os.platform && os.platform();
6678
- //#endregion
6679
- //#region ../../../node_modules/prosemirror-schema-list/dist/index.js
6702
+ // ../../../node_modules/prosemirror-schema-list/dist/index.js
6680
6703
  /**
6681
6704
  Returns a command function that wraps the selection in a list with
6682
6705
  the given type an attributes. If `dispatch` is null, only return a
@@ -6799,8 +6822,7 @@ function sinkListItem(itemType) {
6799
6822
  return true;
6800
6823
  };
6801
6824
  }
6802
- //#endregion
6803
- //#region ../../../node_modules/prosemirror-view/dist/index.js
6825
+ // ../../../node_modules/prosemirror-view/dist/index.js
6804
6826
  var domIndex = function(node) {
6805
6827
  for (var index = 0;; index++) {
6806
6828
  node = node.previousSibling;
@@ -7468,8 +7490,11 @@ var ViewDesc = class {
7468
7490
  }
7469
7491
  let atEnd;
7470
7492
  if (dom == this.dom && this.contentDOM) atEnd = offset > domIndex(this.contentDOM);
7471
- else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) atEnd = !!(dom.compareDocumentPosition(this.contentDOM) & 4);
7472
- else if (this.dom.firstChild) {
7493
+ else if (this.contentDOM && this.contentDOM != this.dom && this.dom.contains(this.contentDOM)) {
7494
+ let rel = dom.compareDocumentPosition(this.contentDOM);
7495
+ if (rel & 16) atEnd = offset > Array.from(dom.childNodes).findIndex((n) => n.contains(this.contentDOM));
7496
+ else atEnd = !(rel & 4);
7497
+ } else if (this.dom.firstChild) {
7473
7498
  if (offset == 0) for (let search = dom;; search = search.parentNode) {
7474
7499
  if (search == this.dom) {
7475
7500
  atEnd = false;
@@ -7735,7 +7760,10 @@ var WidgetViewDesc = class extends ViewDesc {
7735
7760
  });
7736
7761
  if (!widget.type.spec.raw) {
7737
7762
  let elt = isElt(dom) ? dom : document.createElement("span");
7738
- if (elt != dom) elt.appendChild(dom);
7763
+ if (elt != dom) {
7764
+ elt.appendChild(dom);
7765
+ dom = elt;
7766
+ }
7739
7767
  if (!elt.hasAttribute("contenteditable")) elt.contentEditable = "false";
7740
7768
  elt.classList.add("ProseMirror-widget");
7741
7769
  }
@@ -8730,7 +8758,7 @@ function selectHorizontally(view, dir, mods) {
8730
8758
  let next = moveSelectionBlock(view.state, dir);
8731
8759
  if (next && next instanceof NodeSelection) return apply(view, next);
8732
8760
  return false;
8733
- } else if (!(mac$2 && mods.indexOf("m") > -1)) {
8761
+ } else if (!mac$2 || mods.indexOf("m") < 0) {
8734
8762
  let $head = sel.$head, node = $head.textOffset ? null : dir < 0 ? $head.nodeBefore : $head.nodeAfter, desc;
8735
8763
  if (!node || node.isText) return false;
8736
8764
  let nodePos = dir < 0 ? $head.pos - node.nodeSize : $head.pos;
@@ -8862,15 +8890,13 @@ function setSelFocus(view, node, offset) {
8862
8890
  offset = before.nodeValue.length;
8863
8891
  }
8864
8892
  }
8865
- let sel = view.domSelection();
8893
+ let sel = view.domSelection(), range = view.domSelectionRange();
8866
8894
  if (!sel) return;
8867
- if (selectionCollapsed(sel)) {
8868
- let range = document.createRange();
8869
- range.setEnd(node, offset);
8870
- range.setStart(node, offset);
8871
- sel.removeAllRanges();
8872
- sel.addRange(range);
8873
- } else if (sel.extend) sel.extend(node, offset);
8895
+ if (selectionCollapsed(range)) sel.collapse(node, offset);
8896
+ else if (sel.extend) {
8897
+ sel.collapse(range.anchorNode, range.anchorOffset);
8898
+ sel.extend(node, offset);
8899
+ }
8874
8900
  view.domObserver.setCurSelection();
8875
8901
  let { state } = view;
8876
8902
  setTimeout(() => {
@@ -8892,7 +8918,12 @@ function findDirection(view, pos) {
8892
8918
  if (mid > coords.top && mid < coords.bottom && Math.abs(after.left - coords.left) > 1) return after.left > coords.left ? "ltr" : "rtl";
8893
8919
  }
8894
8920
  }
8895
- return getComputedStyle(view.dom).direction == "rtl" ? "rtl" : "ltr";
8921
+ let block = view.dom;
8922
+ for (let d = $pos.depth; d > 0; d--) if ($pos.node(d).isBlock) {
8923
+ block = view.nodeDOM($pos.before(d)) || block;
8924
+ break;
8925
+ }
8926
+ return getComputedStyle(block).direction == "rtl" ? "rtl" : "ltr";
8896
8927
  }
8897
8928
  function selectVertically(view, dir, mods) {
8898
8929
  let sel = view.state.selection;
@@ -9209,6 +9240,7 @@ var InputState = class {
9209
9240
  this.mouseDown = null;
9210
9241
  this.lastKeyCode = null;
9211
9242
  this.lastKeyCodeTime = 0;
9243
+ this.lastKeyDispatched = false;
9212
9244
  this.lastClick = {
9213
9245
  time: 0,
9214
9246
  x: 0,
@@ -9277,12 +9309,20 @@ function eventBelongsToView(view, event) {
9277
9309
  function dispatchEvent(view, event) {
9278
9310
  if (!runCustomHandler(view, event) && handlers[event.type] && (view.editable || !(event.type in editHandlers))) handlers[event.type](view, event);
9279
9311
  }
9312
+ function dispatchKey(view, event) {
9313
+ let { input } = view;
9314
+ if (input.lastKeyDispatched || view.composing) return false;
9315
+ input.lastKeyDispatched = true;
9316
+ if (typeof event == "string") event = keyEvent(event == "Backspace" ? 8 : 13, event);
9317
+ return view.someProp("handleKeyDown", (f) => f(view, event));
9318
+ }
9280
9319
  editHandlers.keydown = (view, _event) => {
9281
9320
  let event = _event;
9282
9321
  view.input.shiftKey = event.keyCode == 16 || event.shiftKey;
9283
9322
  if (inOrNearComposition(view)) return;
9284
9323
  view.input.lastKeyCode = event.keyCode;
9285
9324
  view.input.lastKeyCodeTime = Date.now();
9325
+ view.input.lastKeyDispatched = false;
9286
9326
  if (android && chrome && event.keyCode == 13) return;
9287
9327
  if (event.keyCode != 229) view.domObserver.forceFlush();
9288
9328
  if (ios && event.keyCode == 13 && !event.ctrlKey && !event.altKey && !event.metaKey) {
@@ -9290,11 +9330,11 @@ editHandlers.keydown = (view, _event) => {
9290
9330
  view.input.lastIOSEnter = now;
9291
9331
  view.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
9292
9332
  if (view.input.lastIOSEnter == now) {
9293
- view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")));
9333
+ dispatchKey(view, "Enter");
9294
9334
  view.input.lastIOSEnter = 0;
9295
9335
  }
9296
9336
  }, 200);
9297
- } else if (view.someProp("handleKeyDown", (f) => f(view, event)) || captureKeyDown(view, event)) event.preventDefault();
9337
+ } else if (dispatchKey(view, event) || captureKeyDown(view, event)) event.preventDefault();
9298
9338
  else setSelectionOrigin(view, "key");
9299
9339
  };
9300
9340
  editHandlers.keyup = (view, event) => {
@@ -9821,9 +9861,14 @@ handlers.focus = (view) => {
9821
9861
  view.dom.classList.add("ProseMirror-focused");
9822
9862
  view.domObserver.start();
9823
9863
  view.focused = true;
9824
- setTimeout(() => {
9825
- if (view.docView && view.hasFocus() && !view.domObserver.currentSelection.eq(view.domSelectionRange())) selectionToDOM(view);
9826
- }, 20);
9864
+ let startSel = view.domSelectionRange();
9865
+ if (!view.domObserver.currentSelection.eq(startSel)) {
9866
+ let { focusNode, focusOffset } = startSel;
9867
+ setTimeout(() => {
9868
+ let newSel = view.domSelectionRange();
9869
+ if (newSel.focusNode == focusNode && newSel.focusOffset == focusOffset && view.docView && view.hasFocus()) selectionToDOM(view);
9870
+ }, 20);
9871
+ }
9827
9872
  }
9828
9873
  };
9829
9874
  handlers.blur = (view, _event) => {
@@ -9841,10 +9886,10 @@ handlers.beforeinput = (view, _event) => {
9841
9886
  view.domObserver.flushSoon();
9842
9887
  let { domChangeCount } = view.input;
9843
9888
  setTimeout(() => {
9844
- if (view.input.domChangeCount != domChangeCount) return;
9889
+ if (view.input.domChangeCount != domChangeCount || view.domObserver.pendingRecords().length) return;
9845
9890
  view.dom.blur();
9846
9891
  view.focus();
9847
- if (view.someProp("handleKeyDown", (f) => f(view, keyEvent(8, "Backspace")))) return;
9892
+ if (dispatchKey(view, "Backspace")) return;
9848
9893
  let { $cursor } = view.state.selection;
9849
9894
  if ($cursor && $cursor.pos > 0) view.dispatch(view.state.tr.delete($cursor.pos - 1, $cursor.pos).scrollIntoView());
9850
9895
  }, 50);
@@ -9857,6 +9902,22 @@ function compareObjs(a, b) {
9857
9902
  for (let p in b) if (!(p in a)) return false;
9858
9903
  return true;
9859
9904
  }
9905
+ var FragmentCursor = class {
9906
+ constructor(frag) {
9907
+ this.frag = frag;
9908
+ this.index = 0;
9909
+ this.off = 0;
9910
+ }
9911
+ nodeAt(off) {
9912
+ while (this.off <= off && this.index < this.frag.childCount) {
9913
+ let next = this.frag.child(this.index);
9914
+ if (this.off == off) return next;
9915
+ this.off += next.nodeSize;
9916
+ this.index++;
9917
+ }
9918
+ return null;
9919
+ }
9920
+ };
9860
9921
  var WidgetType = class WidgetType {
9861
9922
  constructor(toDOM, spec) {
9862
9923
  this.toDOM = toDOM;
@@ -9910,9 +9971,9 @@ var NodeType = class NodeType {
9910
9971
  if (to.deleted || to.pos <= from.pos) return null;
9911
9972
  return new Decoration(from.pos - offset, to.pos - offset, this);
9912
9973
  }
9913
- valid(node, span) {
9914
- let { index, offset } = node.content.findIndex(span.from), child;
9915
- return offset == span.from && !(child = node.child(index)).isText && offset + child.nodeSize == span.to;
9974
+ valid(node, span, cursor) {
9975
+ let found = cursor.nodeAt(span.from);
9976
+ return !!found && !found.isText && span.from + found.nodeSize == span.to;
9916
9977
  }
9917
9978
  eq(other) {
9918
9979
  return this == other || other instanceof NodeType && compareObjs(this.attrs, other.attrs) && compareObjs(this.spec, other.spec);
@@ -10057,10 +10118,13 @@ var DecorationSet = class DecorationSet {
10057
10118
  */
10058
10119
  mapInner(mapping, node, offset, oldOffset, options) {
10059
10120
  let newLocal;
10060
- for (let i = 0; i < this.local.length; i++) {
10061
- let mapped = this.local[i].map(mapping, offset, oldOffset);
10062
- if (mapped && mapped.type.valid(node, mapped)) (newLocal || (newLocal = [])).push(mapped);
10063
- else if (options.onRemove) options.onRemove(this.local[i].spec);
10121
+ if (this.local.length) {
10122
+ let cur = new FragmentCursor(node.content);
10123
+ for (let i = 0; i < this.local.length; i++) {
10124
+ let mapped = this.local[i].map(mapping, offset, oldOffset);
10125
+ if (mapped && mapped.type.valid(node, mapped, cur)) (newLocal || (newLocal = [])).push(mapped);
10126
+ else if (options.onRemove) options.onRemove(this.local[i].spec);
10127
+ }
10064
10128
  }
10065
10129
  if (this.children.length) return mapChildren(this.children, newLocal || [], mapping, node, offset, oldOffset, options);
10066
10130
  else return newLocal ? new DecorationSet(newLocal.sort(byPos), none) : empty;
@@ -10088,7 +10152,10 @@ var DecorationSet = class DecorationSet {
10088
10152
  childIndex += 3;
10089
10153
  });
10090
10154
  let local = moveSpans(childIndex ? withoutNulls(decorations) : decorations, -offset);
10091
- for (let i = 0; i < local.length; i++) if (!local[i].type.valid(doc, local[i])) local.splice(i--, 1);
10155
+ if (local.length) {
10156
+ let cur = new FragmentCursor(doc.content);
10157
+ for (let i = 0; i < local.length; i++) if (!local[i].type.valid(doc, local[i], cur)) local.splice(i--, 1);
10158
+ }
10092
10159
  return new DecorationSet(local.length ? this.local.concat(local).sort(byPos) : this.local, children || this.children);
10093
10160
  }
10094
10161
  /**
@@ -10350,9 +10417,12 @@ function buildTree(spans, node, offset, options) {
10350
10417
  }
10351
10418
  });
10352
10419
  let locals = moveSpans(hasNulls ? withoutNulls(spans) : spans, -offset).sort(byPos);
10353
- for (let i = 0; i < locals.length; i++) if (!locals[i].type.valid(node, locals[i])) {
10354
- if (options.onRemove) options.onRemove(locals[i].spec);
10355
- locals.splice(i--, 1);
10420
+ if (locals.length) {
10421
+ let cur = new FragmentCursor(node.content);
10422
+ for (let i = 0; i < locals.length; i++) if (!locals[i].type.valid(node, locals[i], cur)) {
10423
+ if (options.onRemove) options.onRemove(locals[i].spec);
10424
+ locals.splice(i--, 1);
10425
+ }
10356
10426
  }
10357
10427
  return locals.length || children.length ? new DecorationSet(locals, children) : empty;
10358
10428
  }
@@ -10536,8 +10606,11 @@ var DOMObserver = class {
10536
10606
  if (!view.docView || this.flushingSoon > -1) return;
10537
10607
  let mutations = this.pendingRecords();
10538
10608
  if (mutations.length) this.queue = [];
10539
- let sel = view.domSelectionRange();
10540
- let newSel = !this.suppressingSelectionUpdates && !this.currentSelection.eq(sel) && hasFocusAndSelection(view) && !this.ignoreSelectionChange(sel);
10609
+ let selRange, newSel = false;
10610
+ if (!this.suppressingSelectionUpdates && hasFocusAndSelection(view)) {
10611
+ selRange = view.domSelectionRange();
10612
+ newSel = !this.currentSelection.eq(selRange) && !this.ignoreSelectionChange(selRange);
10613
+ }
10541
10614
  let from = -1, to = -1, typeOver = false, added = [];
10542
10615
  if (view.editable) for (let i = 0; i < mutations.length; i++) {
10543
10616
  let result = this.registerMutation(mutations[i], added);
@@ -10573,10 +10646,10 @@ var DOMObserver = class {
10573
10646
  }
10574
10647
  }
10575
10648
  let readSel = null;
10576
- if (from < 0 && newSel && view.input.lastFocus > Date.now() - 200 && Math.max(view.input.lastTouch, view.input.lastClick.time) < Date.now() - 300 && selectionCollapsed(sel) && (readSel = selectionFromDOM(view)) && readSel.eq(Selection$1.near(view.state.doc.resolve(0), 1))) {
10649
+ if (from < 0 && newSel && view.input.lastFocus > Date.now() - 200 && Math.max(view.input.lastTouch, view.input.lastClick.time) < Date.now() - 300 && selectionCollapsed(selRange) && (readSel = selectionFromDOM(view)) && readSel.eq(Selection$1.near(view.state.doc.resolve(0), 1))) {
10577
10650
  view.input.lastFocus = 0;
10578
10651
  selectionToDOM(view);
10579
- this.currentSelection.set(sel);
10652
+ this.currentSelection.set(selRange);
10580
10653
  view.scrollToSelection();
10581
10654
  } else if (from > -1 || newSel) {
10582
10655
  if (from > -1) {
@@ -10589,8 +10662,8 @@ var DOMObserver = class {
10589
10662
  }
10590
10663
  this.handleDOMChange(from, to, typeOver, added);
10591
10664
  if (view.docView && view.docView.dirty) view.updateState(view.state);
10592
- else if (!this.currentSelection.eq(sel)) selectionToDOM(view);
10593
- this.currentSelection.set(sel);
10665
+ else if (selRange && !this.currentSelection.eq(selRange)) selectionToDOM(view);
10666
+ if (selRange) this.currentSelection.set(selRange);
10594
10667
  }
10595
10668
  }
10596
10669
  registerMutation(mut, added) {
@@ -10781,7 +10854,7 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
10781
10854
  let origin = view.input.lastSelectionTime > Date.now() - 50 ? view.input.lastSelectionOrigin : null;
10782
10855
  let newSel = selectionFromDOM(view, origin);
10783
10856
  if (newSel && !view.state.selection.eq(newSel)) {
10784
- if (chrome && android && view.input.lastKeyCode === 13 && Date.now() - 100 < view.input.lastKeyCodeTime && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) return;
10857
+ if (chrome && android && view.input.lastKeyCode === 13 && Date.now() - 100 < view.input.lastKeyCodeTime && dispatchKey(view, "Enter")) return;
10785
10858
  let tr = view.state.tr.setSelection(newSel);
10786
10859
  if (origin == "pointer") tr.setMeta("pointer", true);
10787
10860
  else if (origin == "key") tr.scrollIntoView();
@@ -10808,7 +10881,7 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
10808
10881
  view.input.lastKeyCode = null;
10809
10882
  let change = findDiff(compare.content, parse.doc.content, parse.from, preferredPos, preferredSide);
10810
10883
  if (change) view.input.domChangeCount++;
10811
- if ((ios && view.input.lastIOSEnter > Date.now() - 225 || android) && addedNodes.some((n) => isElt(n) && !isInline.test(n.nodeName)) && (!change || change.endA >= change.endB) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
10884
+ if ((ios && view.input.lastIOSEnter > Date.now() - 225 || android) && addedNodes.some((n) => isElt(n) && !isInline.test(n.nodeName)) && (!change || change.endA >= change.endB) && dispatchKey(view, "Enter")) {
10812
10885
  view.input.lastIOSEnter = 0;
10813
10886
  return;
10814
10887
  }
@@ -10846,11 +10919,11 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
10846
10919
  let $to = parse.doc.resolveNoCache(change.endB - parse.from);
10847
10920
  let $fromA = doc.resolve(change.start);
10848
10921
  let inlineChange = $from.sameParent($to) && $from.parent.inlineContent && $fromA.end() >= change.endA;
10849
- if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && looksLikeEnter(parse.doc, $from.pos, $to.pos)) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(13, "Enter")))) {
10922
+ if ((ios && view.input.lastIOSEnter > Date.now() - 225 && (!inlineChange || addedNodes.some((n) => n.nodeName == "DIV" || n.nodeName == "P")) || !inlineChange && looksLikeEnter(parse.doc, $from.pos, $to.pos)) && dispatchKey(view, "Enter")) {
10850
10923
  view.input.lastIOSEnter = 0;
10851
10924
  return;
10852
10925
  }
10853
- if (view.state.selection.anchor > change.start && looksLikeBackspace(doc, change.start, change.endA, $from, $to) && view.someProp("handleKeyDown", (f) => f(view, keyEvent(8, "Backspace")))) {
10926
+ if (view.state.selection.anchor > change.start && (inlineChange ? change.endA > change.start && change.endB == change.start : looksLikeBlockJoin(doc, change.start, change.endA, $from, $to)) && dispatchKey(view, "Backspace")) {
10854
10927
  if (android && chrome) view.domObserver.suppressSelectionUpdates();
10855
10928
  return;
10856
10929
  }
@@ -10858,11 +10931,7 @@ function readDOMChange(view, from, to, typeOver, addedNodes) {
10858
10931
  if (android && !inlineChange && $from.start() != $to.start() && $to.parentOffset == 0 && $from.depth == $to.depth && parse.sel && parse.sel.anchor == parse.sel.head && parse.sel.head == change.endA) {
10859
10932
  change.endB -= 2;
10860
10933
  $to = parse.doc.resolveNoCache(change.endB - parse.from);
10861
- setTimeout(() => {
10862
- view.someProp("handleKeyDown", function(f) {
10863
- return f(view, keyEvent(13, "Enter"));
10864
- });
10865
- }, 20);
10934
+ setTimeout(() => dispatchKey(view, "Enter"), 20);
10866
10935
  }
10867
10936
  let chFrom = change.start, chTo = change.endA;
10868
10937
  let mkTr = (base) => {
@@ -10922,10 +10991,10 @@ function isMarkChange(cur, prev) {
10922
10991
  type
10923
10992
  };
10924
10993
  }
10925
- function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
10994
+ function looksLikeBlockJoin(old, start, end, $newStart, $newEnd) {
10926
10995
  if (end - start <= $newEnd.pos - $newStart.pos || skipClosingAndOpening($newStart, true, false) < $newEnd.pos) return false;
10927
10996
  let $start = old.resolve(start);
10928
- if (!$newStart.parent.isTextblock) {
10997
+ if (!$newStart.parent.inlineContent) {
10929
10998
  let after = $start.nodeAfter;
10930
10999
  return after != null && end == start + after.nodeSize;
10931
11000
  }
@@ -11478,8 +11547,7 @@ function changedNodeViews(a, b) {
11478
11547
  function checkStateComponent(plugin) {
11479
11548
  if (plugin.spec.state || plugin.spec.filterTransaction || plugin.spec.appendTransaction) throw new RangeError("Plugins passed directly to the view must not have a state component");
11480
11549
  }
11481
- //#endregion
11482
- //#region ../../../node_modules/w3c-keyname/index.js
11550
+ // ../../../node_modules/w3c-keyname/index.js
11483
11551
  var base = {
11484
11552
  8: "Backspace",
11485
11553
  9: "Tab",
@@ -11579,8 +11647,7 @@ function keyName(event) {
11579
11647
  if (name == "Down") name = "ArrowDown";
11580
11648
  return name;
11581
11649
  }
11582
- //#endregion
11583
- //#region ../../../node_modules/prosemirror-keymap/dist/index.js
11650
+ // ../../../node_modules/prosemirror-keymap/dist/index.js
11584
11651
  var mac = typeof navigator != "undefined" && /Mac|iP(hone|[oa]d)/.test(navigator.platform);
11585
11652
  var windows = typeof navigator != "undefined" && /Win/.test(navigator.platform);
11586
11653
  function normalizeKeyName$1(name) {
@@ -11673,8 +11740,7 @@ function keydownHandler(bindings) {
11673
11740
  return false;
11674
11741
  };
11675
11742
  }
11676
- //#endregion
11677
- //#region ../../../node_modules/rope-sequence/dist/index.js
11743
+ // ../../../node_modules/rope-sequence/dist/index.js
11678
11744
  var GOOD_LEAF_SIZE = 200;
11679
11745
  var RopeSequence = function RopeSequence() {};
11680
11746
  RopeSequence.prototype.append = function append(other) {
@@ -11810,8 +11876,7 @@ var Append = /* @__PURE__ */ function(RopeSequence) {
11810
11876
  };
11811
11877
  return Append;
11812
11878
  }(RopeSequence);
11813
- //#endregion
11814
- //#region ../../../node_modules/prosemirror-history/dist/index.js
11879
+ // ../../../node_modules/prosemirror-history/dist/index.js
11815
11880
  var max_empty_items = 500;
11816
11881
  var Branch = class Branch {
11817
11882
  constructor(items, eventCount) {
@@ -12134,8 +12199,7 @@ plugin.
12134
12199
  function isHistoryTransaction(tr) {
12135
12200
  return tr.getMeta(historyKey) != null;
12136
12201
  }
12137
- //#endregion
12138
- //#region ../../../node_modules/@tiptap/core/dist/index.js
12202
+ // ../../../node_modules/@tiptap/core/dist/index.js
12139
12203
  /**
12140
12204
  * Takes a Transaction & Editor State and turns it into a chainable state object
12141
12205
  * @param config The transaction and state to create the chainable state from
@@ -18012,7 +18076,7 @@ var ResizableNodeView = class {
18012
18076
  * The Node class is used to create custom node extensions.
18013
18077
  * @see https://tiptap.dev/api/extensions#create-a-new-extension
18014
18078
  */
18015
- var Node$1 = class Node extends Extendable {
18079
+ var Node$2 = class Node extends Extendable {
18016
18080
  constructor(..._args) {
18017
18081
  super(..._args);
18018
18082
  this.type = "node";
@@ -18064,8 +18128,7 @@ function markPasteRule(config) {
18064
18128
  }
18065
18129
  });
18066
18130
  }
18067
- //#endregion
18068
- //#region ../../../node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
18131
+ // ../../../node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js
18069
18132
  var jsxElements = /* @__PURE__ */ new WeakSet();
18070
18133
  var jsxFragments = /* @__PURE__ */ new WeakSet();
18071
18134
  /** Create a new JSX element from the given spec */
@@ -18117,8 +18180,7 @@ function render(tag, attributes) {
18117
18180
  return createJSXElement([tag, rest]);
18118
18181
  }
18119
18182
  var h = (tag, attributes) => render(tag, attributes);
18120
- //#endregion
18121
- //#region ../../../node_modules/@tiptap/extension-blockquote/dist/index.js
18183
+ // ../../../node_modules/@tiptap/extension-blockquote/dist/index.js
18122
18184
  /**
18123
18185
  * Restructure the blockquote boundary at the caret.
18124
18186
  *
@@ -18169,7 +18231,7 @@ var inputRegex$3 = /^\s*>\s$/;
18169
18231
  * This extension allows you to create blockquotes.
18170
18232
  * @see https://tiptap.dev/api/nodes/blockquote
18171
18233
  */
18172
- var Blockquote = Node$1.create({
18234
+ var Blockquote = Node$2.create({
18173
18235
  name: "blockquote",
18174
18236
  addOptions() {
18175
18237
  return { HTMLAttributes: {} };
@@ -18231,8 +18293,7 @@ var Blockquote = Node$1.create({
18231
18293
  })];
18232
18294
  }
18233
18295
  });
18234
- //#endregion
18235
- //#region ../../../node_modules/@tiptap/extension-bold/dist/index.js
18296
+ // ../../../node_modules/@tiptap/extension-bold/dist/index.js
18236
18297
  /** @jsxImportSource @tiptap/core */
18237
18298
  /**
18238
18299
  * Matches bold text via `**` as input.
@@ -18331,8 +18392,7 @@ var Bold = Mark.create({
18331
18392
  })];
18332
18393
  }
18333
18394
  });
18334
- //#endregion
18335
- //#region ../../../node_modules/@tiptap/extension-code/dist/index.js
18395
+ // ../../../node_modules/@tiptap/extension-code/dist/index.js
18336
18396
  /**
18337
18397
  * A function-based finder for the inline code input rule.
18338
18398
  * Used internally by the extension to ensure the preceding character
@@ -18439,8 +18499,7 @@ var Code = Mark.create({
18439
18499
  })];
18440
18500
  }
18441
18501
  });
18442
- //#endregion
18443
- //#region ../../../node_modules/@tiptap/extension-code-block/dist/index.js
18502
+ // ../../../node_modules/@tiptap/extension-code-block/dist/index.js
18444
18503
  var DEFAULT_TAB_SIZE = 4;
18445
18504
  /**
18446
18505
  * Matches a code block with backticks.
@@ -18454,7 +18513,7 @@ var tildeInputRegex = /^~~~([a-z]+)?[\s\n]$/;
18454
18513
  * This extension allows you to create code blocks.
18455
18514
  * @see https://tiptap.dev/api/nodes/code-block
18456
18515
  */
18457
- var CodeBlock = Node$1.create({
18516
+ var CodeBlock = Node$2.create({
18458
18517
  name: "codeBlock",
18459
18518
  addOptions() {
18460
18519
  return {
@@ -18679,13 +18738,12 @@ var CodeBlock = Node$1.create({
18679
18738
  })];
18680
18739
  }
18681
18740
  });
18682
- //#endregion
18683
- //#region ../../../node_modules/@tiptap/extension-document/dist/index.js
18741
+ // ../../../node_modules/@tiptap/extension-document/dist/index.js
18684
18742
  /**
18685
18743
  * The default document node which represents the top level node of the editor.
18686
18744
  * @see https://tiptap.dev/api/nodes/document
18687
18745
  */
18688
- var Document = Node$1.create({
18746
+ var Document = Node$2.create({
18689
18747
  name: "doc",
18690
18748
  topNode: true,
18691
18749
  content: "block+",
@@ -18694,13 +18752,12 @@ var Document = Node$1.create({
18694
18752
  return h.renderChildren(node.content, "\n\n");
18695
18753
  }
18696
18754
  });
18697
- //#endregion
18698
- //#region ../../../node_modules/@tiptap/extension-hard-break/dist/index.js
18755
+ // ../../../node_modules/@tiptap/extension-hard-break/dist/index.js
18699
18756
  /**
18700
18757
  * This extension allows you to insert hard breaks.
18701
18758
  * @see https://www.tiptap.dev/api/nodes/hard-break
18702
18759
  */
18703
- var HardBreak = Node$1.create({
18760
+ var HardBreak = Node$2.create({
18704
18761
  name: "hardBreak",
18705
18762
  markdownTokenName: "br",
18706
18763
  addOptions() {
@@ -18751,13 +18808,12 @@ var HardBreak = Node$1.create({
18751
18808
  };
18752
18809
  }
18753
18810
  });
18754
- //#endregion
18755
- //#region ../../../node_modules/@tiptap/extension-heading/dist/index.js
18811
+ // ../../../node_modules/@tiptap/extension-heading/dist/index.js
18756
18812
  /**
18757
18813
  * This extension allows you to create headings.
18758
18814
  * @see https://www.tiptap.dev/api/nodes/heading
18759
18815
  */
18760
- var Heading = Node$1.create({
18816
+ var Heading = Node$2.create({
18761
18817
  name: "heading",
18762
18818
  addOptions() {
18763
18819
  return {
@@ -18832,13 +18888,12 @@ var Heading = Node$1.create({
18832
18888
  });
18833
18889
  }
18834
18890
  });
18835
- //#endregion
18836
- //#region ../../../node_modules/@tiptap/extension-horizontal-rule/dist/index.js
18891
+ // ../../../node_modules/@tiptap/extension-horizontal-rule/dist/index.js
18837
18892
  /**
18838
18893
  * This extension allows you to insert horizontal rules.
18839
18894
  * @see https://www.tiptap.dev/api/nodes/horizontal-rule
18840
18895
  */
18841
- var HorizontalRule = Node$1.create({
18896
+ var HorizontalRule = Node$2.create({
18842
18897
  name: "horizontalRule",
18843
18898
  addOptions() {
18844
18899
  return {
@@ -18897,8 +18952,7 @@ var HorizontalRule = Node$1.create({
18897
18952
  })];
18898
18953
  }
18899
18954
  });
18900
- //#endregion
18901
- //#region ../../../node_modules/@tiptap/extension-italic/dist/index.js
18955
+ // ../../../node_modules/@tiptap/extension-italic/dist/index.js
18902
18956
  /**
18903
18957
  * Matches an italic to a *italic* on input.
18904
18958
  */
@@ -18994,8 +19048,7 @@ var Italic = Mark.create({
18994
19048
  })];
18995
19049
  }
18996
19050
  });
18997
- //#endregion
18998
- //#region ../../../node_modules/linkifyjs/dist/linkify.mjs
19051
+ // ../../../node_modules/linkifyjs/dist/linkify.mjs
18999
19052
  var encodedTlds = "aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2";
19000
19053
  var encodedUtlds = "ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2";
19001
19054
  /**
@@ -20426,8 +20479,7 @@ function find(str, type = null, opts = null) {
20426
20479
  }
20427
20480
  return filtered;
20428
20481
  }
20429
- //#endregion
20430
- //#region ../../../node_modules/@tiptap/extension-link/dist/index.js
20482
+ // ../../../node_modules/@tiptap/extension-link/dist/index.js
20431
20483
  var UNICODE_WHITESPACE_PATTERN = "[\0- \xA0 ᠎ -\u2029  ]";
20432
20484
  var UNICODE_WHITESPACE_REGEX = new RegExp(UNICODE_WHITESPACE_PATTERN);
20433
20485
  var UNICODE_WHITESPACE_REGEX_END = new RegExp(`${UNICODE_WHITESPACE_PATTERN}$`);
@@ -20955,8 +21007,7 @@ var Link = Mark.create({
20955
21007
  return plugins;
20956
21008
  }
20957
21009
  });
20958
- //#endregion
20959
- //#region ../../../node_modules/@tiptap/extension-list/dist/index.js
21010
+ // ../../../node_modules/@tiptap/extension-list/dist/index.js
20960
21011
  var ListItemName$1 = "listItem";
20961
21012
  var TextStyleName$1 = "textStyle";
20962
21013
  /**
@@ -20969,7 +21020,7 @@ var bulletListInputRegex = /^\s*([-+*])\s$/;
20969
21020
  * @see https://tiptap.dev/api/nodes/bullet-list
20970
21021
  * @see https://tiptap.dev/api/nodes/list-item.
20971
21022
  */
20972
- var BulletList = Node$1.create({
21023
+ var BulletList = Node$2.create({
20973
21024
  name: "bulletList",
20974
21025
  addOptions() {
20975
21026
  return {
@@ -21354,7 +21405,7 @@ function parseSameLineOrderedListText(text, helpers) {
21354
21405
  * This extension allows you to create list items.
21355
21406
  * @see https://www.tiptap.dev/api/nodes/list-item
21356
21407
  */
21357
- var ListItem = Node$1.create({
21408
+ var ListItem = Node$2.create({
21358
21409
  name: "listItem",
21359
21410
  addOptions() {
21360
21411
  return {
@@ -21922,7 +21973,7 @@ function cssListStyleTypeToHtmlType(style) {
21922
21973
  * @see https://www.tiptap.dev/api/nodes/ordered-list
21923
21974
  * @see https://www.tiptap.dev/api/nodes/list-item
21924
21975
  */
21925
- var OrderedList = Node$1.create({
21976
+ var OrderedList = Node$2.create({
21926
21977
  name: "orderedList",
21927
21978
  addOptions() {
21928
21979
  return {
@@ -22094,7 +22145,7 @@ var getCheckboxLabel = (node, checked, a11y) => {
22094
22145
  * This extension allows you to create task items.
22095
22146
  * @see https://www.tiptap.dev/api/nodes/task-item
22096
22147
  */
22097
- var TaskItem = Node$1.create({
22148
+ var TaskItem = Node$2.create({
22098
22149
  name: "taskItem",
22099
22150
  addOptions() {
22100
22151
  return {
@@ -22264,7 +22315,7 @@ var TaskItem = Node$1.create({
22264
22315
  * This extension allows you to create task lists.
22265
22316
  * @see https://www.tiptap.dev/api/nodes/task-list
22266
22317
  */
22267
- var TaskList = Node$1.create({
22318
+ var TaskList = Node$2.create({
22268
22319
  name: "taskList",
22269
22320
  addOptions() {
22270
22321
  return {
@@ -22387,8 +22438,7 @@ Extension.create({
22387
22438
  return extensions;
22388
22439
  }
22389
22440
  });
22390
- //#endregion
22391
- //#region ../../../node_modules/@tiptap/extension-paragraph/dist/index.js
22441
+ // ../../../node_modules/@tiptap/extension-paragraph/dist/index.js
22392
22442
  /**
22393
22443
  * Markdown marker for empty paragraphs to preserve blank lines.
22394
22444
  * Using &nbsp; (non-breaking space HTML entity) ensures the paragraph
@@ -22404,7 +22454,7 @@ var NBSP_CHAR = "\xA0";
22404
22454
  * This extension allows you to create paragraphs.
22405
22455
  * @see https://www.tiptap.dev/api/nodes/paragraph
22406
22456
  */
22407
- var Paragraph = Node$1.create({
22457
+ var Paragraph = Node$2.create({
22408
22458
  name: "paragraph",
22409
22459
  priority: 1e3,
22410
22460
  addOptions() {
@@ -22449,8 +22499,7 @@ var Paragraph = Node$1.create({
22449
22499
  }
22450
22500
  });
22451
22501
  var src_default$3 = Paragraph;
22452
- //#endregion
22453
- //#region ../../../node_modules/@tiptap/extension-strike/dist/index.js
22502
+ // ../../../node_modules/@tiptap/extension-strike/dist/index.js
22454
22503
  /**
22455
22504
  * Matches a strike to a ~~strike~~ on input.
22456
22505
  */
@@ -22523,13 +22572,12 @@ var Strike = Mark.create({
22523
22572
  })];
22524
22573
  }
22525
22574
  });
22526
- //#endregion
22527
- //#region ../../../node_modules/@tiptap/extension-text/dist/index.js
22575
+ // ../../../node_modules/@tiptap/extension-text/dist/index.js
22528
22576
  /**
22529
22577
  * This extension allows you to create text nodes.
22530
22578
  * @see https://www.tiptap.dev/api/nodes/text
22531
22579
  */
22532
- var Text = Node$1.create({
22580
+ var Text = Node$2.create({
22533
22581
  name: "text",
22534
22582
  group: "inline",
22535
22583
  parseMarkdown: (token) => {
@@ -22540,8 +22588,7 @@ var Text = Node$1.create({
22540
22588
  },
22541
22589
  renderMarkdown: (node) => node.text || ""
22542
22590
  });
22543
- //#endregion
22544
- //#region ../../../node_modules/@tiptap/extension-underline/dist/index.js
22591
+ // ../../../node_modules/@tiptap/extension-underline/dist/index.js
22545
22592
  /**
22546
22593
  * This extension allows you to create underline text.
22547
22594
  * @see https://www.tiptap.dev/api/marks/underline
@@ -22609,8 +22656,7 @@ var Underline = Mark.create({
22609
22656
  };
22610
22657
  }
22611
22658
  });
22612
- //#endregion
22613
- //#region ../../../node_modules/prosemirror-dropcursor/dist/index.js
22659
+ // ../../../node_modules/prosemirror-dropcursor/dist/index.js
22614
22660
  /**
22615
22661
  Create a plugin that, when added to a ProseMirror instance,
22616
22662
  causes a decoration to show up at the drop position when something
@@ -22770,8 +22816,7 @@ var DropCursorView = class {
22770
22816
  if (!this.editorView.dom.contains(event.relatedTarget)) this.setCursor(null);
22771
22817
  }
22772
22818
  };
22773
- //#endregion
22774
- //#region ../../../node_modules/prosemirror-gapcursor/dist/index.js
22819
+ // ../../../node_modules/prosemirror-gapcursor/dist/index.js
22775
22820
  /**
22776
22821
  Gap cursor selections are represented using this class. Its
22777
22822
  `$anchor` and `$head` properties both point at the cursor position.
@@ -23733,8 +23778,7 @@ var src_default = Mark.create({
23733
23778
  return { "Mod-.": () => this.editor.commands.toggleSuperscript() };
23734
23779
  }
23735
23780
  });
23736
- //#endregion
23737
- //#region ../../../node_modules/@tiptap/extension-image/dist/index.js
23781
+ // ../../../node_modules/@tiptap/extension-image/dist/index.js
23738
23782
  /**
23739
23783
  * Matches an image to a ![image](src "title") on input.
23740
23784
  */
@@ -23743,7 +23787,7 @@ var inputRegex = /(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/;
23743
23787
  * This extension allows you to insert images.
23744
23788
  * @see https://www.tiptap.dev/api/nodes/image
23745
23789
  */
23746
- var Image$1 = Node$1.create({
23790
+ var Image$1 = Node$2.create({
23747
23791
  name: "image",
23748
23792
  addOptions() {
23749
23793
  return {
@@ -23900,8 +23944,7 @@ var Image$1 = Node$1.create({
23900
23944
  })];
23901
23945
  }
23902
23946
  });
23903
- //#endregion
23904
- //#region ../../../node_modules/prosemirror-tables/dist/index.js
23947
+ // ../../../node_modules/prosemirror-tables/dist/index.js
23905
23948
  var readFromCache;
23906
23949
  var addToCache;
23907
23950
  if (typeof WeakMap != "undefined") {
@@ -25862,8 +25905,7 @@ function tableEditing({ allowTableNodeSelection = false } = {}) {
25862
25905
  }
25863
25906
  });
25864
25907
  }
25865
- //#endregion
25866
- //#region ../../../node_modules/@tiptap/extension-table/dist/index.js
25908
+ // ../../../node_modules/@tiptap/extension-table/dist/index.js
25867
25909
  /**
25868
25910
  * Normalize unknown input into a supported table alignment
25869
25911
  *
@@ -25963,7 +26005,7 @@ function omitDefaultSpanAttribute(attributes, renderedAttributes, name) {
25963
26005
  * This extension allows you to create table cells.
25964
26006
  * @see https://www.tiptap.dev/api/nodes/table-cell
25965
26007
  */
25966
- var TableCell$1 = Node$1.create({
26008
+ var TableCell$1 = Node$2.create({
25967
26009
  name: "tableCell",
25968
26010
  addOptions() {
25969
26011
  return { HTMLAttributes: {} };
@@ -26004,7 +26046,7 @@ var TableCell$1 = Node$1.create({
26004
26046
  * This extension allows you to create table headers.
26005
26047
  * @see https://www.tiptap.dev/api/nodes/table-header
26006
26048
  */
26007
- var TableHeader$1 = Node$1.create({
26049
+ var TableHeader$1 = Node$2.create({
26008
26050
  name: "tableHeader",
26009
26051
  addOptions() {
26010
26052
  return { HTMLAttributes: {} };
@@ -26045,7 +26087,7 @@ var TableHeader$1 = Node$1.create({
26045
26087
  * This extension allows you to create table rows.
26046
26088
  * @see https://www.tiptap.dev/api/nodes/table-row
26047
26089
  */
26048
- var TableRow$1 = Node$1.create({
26090
+ var TableRow$1 = Node$2.create({
26049
26091
  name: "tableRow",
26050
26092
  addOptions() {
26051
26093
  return { HTMLAttributes: {} };
@@ -26392,7 +26434,7 @@ function preserveCellSelectionOnContextMenu() {
26392
26434
  * This extension allows you to create tables.
26393
26435
  * @see https://www.tiptap.dev/api/nodes/table
26394
26436
  */
26395
- var Table$1 = Node$1.create({
26437
+ var Table$1 = Node$2.create({
26396
26438
  name: "table",
26397
26439
  addOptions() {
26398
26440
  return {
@@ -26630,9 +26672,8 @@ Extension.create({
26630
26672
  return extensions;
26631
26673
  }
26632
26674
  });
26633
- //#endregion
26634
- //#region ../custom-element/dist/index.js
26635
- var ButtonLikeLink = Node$1.create({
26675
+ // ../custom-element/dist/index.js
26676
+ var ButtonLikeLink = Node$2.create({
26636
26677
  name: "buttonLikeLink",
26637
26678
  group: "block",
26638
26679
  content: "paragraph+",
@@ -26686,7 +26727,7 @@ var ButtonLikeLink = Node$1.create({
26686
26727
  } };
26687
26728
  }
26688
26729
  });
26689
- var DescriptionListDetail = Node$1.create({
26730
+ var DescriptionListDetail = Node$2.create({
26690
26731
  name: "descriptionListDetail",
26691
26732
  content: "paragraph block*",
26692
26733
  parseHTML() {
@@ -26700,7 +26741,7 @@ var DescriptionListDetail = Node$1.create({
26700
26741
  ];
26701
26742
  }
26702
26743
  });
26703
- var DescriptionListTermGroup = Node$1.create({
26744
+ var DescriptionListTermGroup = Node$2.create({
26704
26745
  name: "descriptionListTermGroup",
26705
26746
  content: "descriptionListTerm descriptionListDetail",
26706
26747
  parseHTML() {
@@ -26714,7 +26755,7 @@ var DescriptionListTermGroup = Node$1.create({
26714
26755
  ];
26715
26756
  }
26716
26757
  });
26717
- var DescriptionListTerm = Node$1.create({
26758
+ var DescriptionListTerm = Node$2.create({
26718
26759
  name: "descriptionListTerm",
26719
26760
  content: "inline*",
26720
26761
  parseHTML() {
@@ -26728,7 +26769,7 @@ var DescriptionListTerm = Node$1.create({
26728
26769
  ];
26729
26770
  }
26730
26771
  });
26731
- var DescriptionList = Node$1.create({
26772
+ var DescriptionList = Node$2.create({
26732
26773
  name: "descriptionList",
26733
26774
  group: "block",
26734
26775
  content: "descriptionListTermGroup+",
@@ -26744,7 +26785,7 @@ var DescriptionList = Node$1.create({
26744
26785
  ];
26745
26786
  }
26746
26787
  });
26747
- var FlexBox = Node$1.create({
26788
+ var FlexBox = Node$2.create({
26748
26789
  name: "flexBox",
26749
26790
  group: "block",
26750
26791
  /**
@@ -26822,7 +26863,7 @@ var FlexBox = Node$1.create({
26822
26863
  } };
26823
26864
  }
26824
26865
  });
26825
- var GeneralBlock = Node$1.create({
26866
+ var GeneralBlock = Node$2.create({
26826
26867
  name: "generalBlock",
26827
26868
  group: "block",
26828
26869
  content: "block*",
@@ -26851,7 +26892,7 @@ var GeneralBlock = Node$1.create({
26851
26892
  var Image = Image$1.extend({ renderHTML({ HTMLAttributes }) {
26852
26893
  return ["img", HTMLAttributes];
26853
26894
  } });
26854
- var Note = Node$1.create({
26895
+ var Note = Node$2.create({
26855
26896
  name: "note",
26856
26897
  group: "block",
26857
26898
  content: "paragraph block*",
@@ -26915,7 +26956,7 @@ var ParagraphWithAlign = src_default$3.extend({
26915
26956
  };
26916
26957
  }
26917
26958
  });
26918
- var TableBody = Node$1.create({
26959
+ var TableBody = Node$2.create({
26919
26960
  name: "tableBody",
26920
26961
  content: "tableRow+",
26921
26962
  parseHTML() {
@@ -26929,7 +26970,7 @@ var TableBody = Node$1.create({
26929
26970
  ];
26930
26971
  }
26931
26972
  });
26932
- var TableCaption = Node$1.create({
26973
+ var TableCaption = Node$2.create({
26933
26974
  name: "tableCaption",
26934
26975
  content: "text*",
26935
26976
  parseHTML() {
@@ -26950,7 +26991,7 @@ var TableCell = TableCell$1.extend({ renderHTML() {
26950
26991
  0
26951
26992
  ];
26952
26993
  } });
26953
- var TableFoot = Node$1.create({
26994
+ var TableFoot = Node$2.create({
26954
26995
  name: "tableFoot",
26955
26996
  content: "tableRow+",
26956
26997
  parseHTML() {
@@ -26964,7 +27005,7 @@ var TableFoot = Node$1.create({
26964
27005
  ];
26965
27006
  }
26966
27007
  });
26967
- var TableHead = Node$1.create({
27008
+ var TableHead = Node$2.create({
26968
27009
  name: "tableHead",
26969
27010
  content: "tableRow+",
26970
27011
  parseHTML() {
@@ -27738,6 +27779,44 @@ var BUTTON_TO_STATE_KEY_MAP = {
27738
27779
  "align-end": "alignEnd",
27739
27780
  image: "image"
27740
27781
  };
27782
+ var TOOLBAR_BUTTON_ACCESSIBLE_NAMES = {
27783
+ bold: "太字",
27784
+ italic: "斜体",
27785
+ underline: "下線",
27786
+ strikethrough: "取り消し線",
27787
+ subscript: "下付き",
27788
+ superscript: "上付き",
27789
+ code: "コード",
27790
+ link: "リンク",
27791
+ "button-like-link": "ボタン風リンク",
27792
+ blockquote: "引用",
27793
+ "bullet-list": "箇条書き",
27794
+ "ordered-list": "番号付きリスト",
27795
+ note: "ノートブロック",
27796
+ h1: "見出しレベル1",
27797
+ h2: "見出しレベル2",
27798
+ h3: "見出しレベル3",
27799
+ h4: "見出しレベル4",
27800
+ h5: "見出しレベル5",
27801
+ h6: "見出しレベル6",
27802
+ "flex-box": "フレックスボックス",
27803
+ "align-start": "左寄せ",
27804
+ "align-center": "中央寄せ",
27805
+ "align-end": "右寄せ"
27806
+ };
27807
+ var MODE_SELECTOR_ACCESSIBLE_NAME = "編集モード";
27808
+ function iconSvgWithAriaHidden(rawSvg) {
27809
+ return rawSvg.replace(/^<svg\b/, "<svg aria-hidden=\"true\"");
27810
+ }
27811
+ function renderIconToolbarButton(editorId, toggleCommand, command, icon, innerMarkup) {
27812
+ const label = TOOLBAR_BUTTON_ACCESSIBLE_NAMES[command];
27813
+ if (!label) throw new Error(`Missing accessible name for toolbar button: ${command}`);
27814
+ const labelId = `${editorId}-toolbar-label-${command}`;
27815
+ return `<div data-bge-toolbar-button-host style="--name: ${`--anchor-${editorId}-${command}`}">
27816
+ <button type="button" ${toggleCommand} data-bge-toolbar-button="${command}" aria-labelledby="${labelId}">${innerMarkup ?? iconSvgWithAriaHidden(icon)}</button>
27817
+ <span id="${labelId}">${label}</span>
27818
+ </div>`;
27819
+ }
27741
27820
  function defineBgeWysiwygEditorElement(options, global = window) {
27742
27821
  defineBgeWysiwygElement(options, global);
27743
27822
  if (options?.wrapperElement) BgeWysiwygEditorElement.wrapperElement = options.wrapperElement;
@@ -27840,32 +27919,32 @@ var BgeWysiwygEditorElement = class BgeWysiwygEditorElement extends HTMLElement
27840
27919
  <legend>${label}</legend>
27841
27920
  <div data-bge-toolbar>
27842
27921
  <div data-bge-toolbar-group>
27843
- ${commands.includes("bold") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="bold">${bold_default}</button>` : ""}
27844
- ${commands.includes("italic") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="italic">${italic_default}</button>` : ""}
27845
- ${commands.includes("strikethrough") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="strikethrough">${strikethrough_default}</button>` : ""}
27846
- ${commands.includes("underline") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="underline">${underline_default}</button>` : ""}
27847
- ${commands.includes("subscript") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="subscript">${subscript_default}</button>` : ""}
27848
- ${commands.includes("superscript") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="superscript">${superscript_default}</button>` : ""}
27849
- ${commands.includes("code") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="code">${code_default}</button>` : ""}
27850
- ${commands.includes("link") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="link">${link_default}</button>` : ""}
27851
- ${commands.includes("button-like-link") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="button-like-link">${cloud_default}</button>` : ""}
27852
- ${commands.includes("blockquote") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="blockquote">${blockquote_default}</button>` : ""}
27853
- ${commands.includes("bullet-list") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="bullet-list">${list_default}</button>` : ""}
27854
- ${commands.includes("ordered-list") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="ordered-list">${list_numbers_default}</button>` : ""}
27855
- ${commands.includes("note") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="note">${notes_default}</button>` : ""}
27856
- ${commands.includes("h1") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="h1">${h_1_default}</button>` : ""}
27857
- ${commands.includes("h2") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="h2">${h_2_default}</button>` : ""}
27858
- ${commands.includes("h3") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="h3">${h_3_default}</button>` : ""}
27859
- ${commands.includes("h4") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="h4">${h_4_default}</button>` : ""}
27860
- ${commands.includes("h5") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="h5">${h_5_default}</button>` : ""}
27861
- ${commands.includes("h6") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="h6">${h_6_default}</button>` : ""}
27862
- ${commands.includes("flex-box") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="flex-box"><span data-bge-rotate>${align_box_center_stretch_default}</span></button>` : ""}
27863
- ${commands.includes("align-start") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="align-start">${align_left_default}</button>` : ""}
27864
- ${commands.includes("align-center") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="align-center">${align_center_default}</button>` : ""}
27865
- ${commands.includes("align-end") ? `<button type="button" ${toggleCommand} data-bge-toolbar-button="align-end">${align_right_default}</button>` : ""}
27922
+ ${commands.includes("bold") ? renderIconToolbarButton(this.id, toggleCommand, "bold", bold_default) : ""}
27923
+ ${commands.includes("italic") ? renderIconToolbarButton(this.id, toggleCommand, "italic", italic_default) : ""}
27924
+ ${commands.includes("strikethrough") ? renderIconToolbarButton(this.id, toggleCommand, "strikethrough", strikethrough_default) : ""}
27925
+ ${commands.includes("underline") ? renderIconToolbarButton(this.id, toggleCommand, "underline", underline_default) : ""}
27926
+ ${commands.includes("subscript") ? renderIconToolbarButton(this.id, toggleCommand, "subscript", subscript_default) : ""}
27927
+ ${commands.includes("superscript") ? renderIconToolbarButton(this.id, toggleCommand, "superscript", superscript_default) : ""}
27928
+ ${commands.includes("code") ? renderIconToolbarButton(this.id, toggleCommand, "code", code_default) : ""}
27929
+ ${commands.includes("link") ? renderIconToolbarButton(this.id, toggleCommand, "link", link_default) : ""}
27930
+ ${commands.includes("button-like-link") ? renderIconToolbarButton(this.id, toggleCommand, "button-like-link", cloud_default) : ""}
27931
+ ${commands.includes("blockquote") ? renderIconToolbarButton(this.id, toggleCommand, "blockquote", blockquote_default) : ""}
27932
+ ${commands.includes("bullet-list") ? renderIconToolbarButton(this.id, toggleCommand, "bullet-list", list_default) : ""}
27933
+ ${commands.includes("ordered-list") ? renderIconToolbarButton(this.id, toggleCommand, "ordered-list", list_numbers_default) : ""}
27934
+ ${commands.includes("note") ? renderIconToolbarButton(this.id, toggleCommand, "note", notes_default) : ""}
27935
+ ${commands.includes("h1") ? renderIconToolbarButton(this.id, toggleCommand, "h1", h_1_default) : ""}
27936
+ ${commands.includes("h2") ? renderIconToolbarButton(this.id, toggleCommand, "h2", h_2_default) : ""}
27937
+ ${commands.includes("h3") ? renderIconToolbarButton(this.id, toggleCommand, "h3", h_3_default) : ""}
27938
+ ${commands.includes("h4") ? renderIconToolbarButton(this.id, toggleCommand, "h4", h_4_default) : ""}
27939
+ ${commands.includes("h5") ? renderIconToolbarButton(this.id, toggleCommand, "h5", h_5_default) : ""}
27940
+ ${commands.includes("h6") ? renderIconToolbarButton(this.id, toggleCommand, "h6", h_6_default) : ""}
27941
+ ${commands.includes("flex-box") ? renderIconToolbarButton(this.id, toggleCommand, "flex-box", align_box_center_stretch_default, `<span data-bge-rotate>${iconSvgWithAriaHidden(align_box_center_stretch_default)}</span>`) : ""}
27942
+ ${commands.includes("align-start") ? renderIconToolbarButton(this.id, toggleCommand, "align-start", align_left_default) : ""}
27943
+ ${commands.includes("align-center") ? renderIconToolbarButton(this.id, toggleCommand, "align-center", align_center_default) : ""}
27944
+ ${commands.includes("align-end") ? renderIconToolbarButton(this.id, toggleCommand, "align-end", align_right_default) : ""}
27866
27945
  </div>
27867
27946
  <div data-bge-toolbar-group>
27868
- ${BgeWysiwygEditorElement.experimentalTextOnlyMode ? `<select data-bge-mode-selector>
27947
+ ${BgeWysiwygEditorElement.experimentalTextOnlyMode ? `<select data-bge-mode-selector aria-label="${MODE_SELECTOR_ACCESSIBLE_NAME}">
27869
27948
  <option value="wysiwyg">\u30C7\u30B6\u30A4\u30F3\u30E2\u30FC\u30C9</option>
27870
27949
  <option value="text-only">\u30C6\u30AD\u30B9\u30C8\u7DE8\u96C6\u30E2\u30FC\u30C9</option>
27871
27950
  <option value="html">HTML\u30E2\u30FC\u30C9</option>
@@ -28090,8 +28169,7 @@ function updateButtonState(button, state, editorElement) {
28090
28169
  button.disabled = isNonWysiwygMode || buttonState.disabled;
28091
28170
  button.ariaPressed = buttonState.active ? "true" : "false";
28092
28171
  }
28093
- //#endregion
28094
- //#region src/burger-editor-root.tsx
28172
+ // src/burger-editor-root.tsx
28095
28173
  /**
28096
28174
  * Root of the editor chrome React tree. Renders every dialog
28097
28175
  * declaratively from the engine's UI state store. Reads the engine via
@@ -28206,8 +28284,7 @@ function BurgerEditorRoot() {
28206
28284
  } else t13 = $[26];
28207
28285
  return t13;
28208
28286
  }
28209
- //#endregion
28210
- //#region src/view/create-react-view.tsx
28287
+ // src/view/create-react-view.tsx
28211
28288
  /**
28212
28289
  * A `ReactView` extends the core {@link BurgerEditorView} contract with a
28213
28290
  * client-only escape hatch: `mountChrome` lets `createBurgerEditorClient`
@@ -28302,11 +28379,9 @@ function createReactView() {
28302
28379
  [Symbol.dispose]: teardown
28303
28380
  };
28304
28381
  }
28305
- //#endregion
28306
- //#region ../migrator/dist/index.js
28382
+ // ../migrator/dist/index.js
28307
28383
  var Migrator = class {};
28308
- //#endregion
28309
- //#region src/get-config.ts
28384
+ // src/get-config.ts
28310
28385
  /**
28311
28386
  * 意味ない。たぶんそれぞれのプラットフォームでConfigの型が違うから。
28312
28387
  * @deprecated
@@ -28353,9 +28428,8 @@ function parseConfig(config) {
28353
28428
  throw new SyntaxError("parse error: Configuration JSON.");
28354
28429
  }
28355
28430
  }
28356
- //#endregion
28357
- //#region src/index.tsx
28358
- var version = "4.0.0-alpha.77";
28431
+ // src/index.tsx
28432
+ var version = "4.0.0-alpha.78";
28359
28433
  /**
28360
28434
  * 本稿⇄下書き切替UIをビューエリアの直前にマウントする
28361
28435
  *
@@ -28428,7 +28502,6 @@ async function createBurgerEditorClient(options) {
28428
28502
  view.mountChrome(/* @__PURE__ */ jsx(BurgerEditorRoot, {}));
28429
28503
  return { engine };
28430
28504
  }
28431
- //#endregion
28432
28505
  export { Migrator, attachDraftSwitcher, createBurgerEditorClient, getConfig, version };
28433
28506
 
28434
28507
  //# sourceMappingURL=client.js.map