@harbour-enterprises/superdoc 0.12.30 → 0.12.31-next.2

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 (62) hide show
  1. package/dist/chunks/{super-editor.es-J7K_8fA3.es.js → super-editor.es-B4lJkgrf.es.js} +560 -270
  2. package/dist/chunks/{super-editor.es-0mAzj58N.cjs → super-editor.es-Du18AHQE.cjs} +546 -256
  3. package/dist/composables/use-high-contrast-mode.d.ts +5 -0
  4. package/dist/composables/use-high-contrast-mode.d.ts.map +1 -0
  5. package/dist/core/SuperDoc.d.ts +7 -0
  6. package/dist/core/SuperDoc.d.ts.map +1 -1
  7. package/dist/core/create-app.d.ts.map +1 -1
  8. package/dist/index.d.ts +2 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/style.css +299 -245
  11. package/dist/super-editor/ai-writer.es.js +2 -2
  12. package/dist/super-editor/chunks/{converter-BSr2Ue72.js → converter-CP_Na8aB.js} +2 -2
  13. package/dist/super-editor/chunks/{docx-zipper-BCUCSdEs.js → docx-zipper-BqcYpY0b.js} +1 -1
  14. package/dist/super-editor/chunks/{editor-DOwVVn_i.js → editor-CFxAdvpz.js} +143 -56
  15. package/dist/super-editor/chunks/{toolbar-hUPYR8un.js → toolbar-CNZaB4OD.js} +80 -36
  16. package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
  17. package/dist/super-editor/composables/use-high-contrast-mode.d.ts +5 -0
  18. package/dist/super-editor/composables/use-high-contrast-mode.d.ts.map +1 -0
  19. package/dist/super-editor/converter.es.js +1 -1
  20. package/dist/super-editor/core/Editor.d.ts +2 -1
  21. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  22. package/dist/super-editor/core/helpers/annotator.d.ts +5 -3
  23. package/dist/super-editor/core/helpers/annotator.d.ts.map +1 -1
  24. package/dist/super-editor/docx-zipper.es.js +2 -2
  25. package/dist/super-editor/editor.es.js +3 -3
  26. package/dist/super-editor/extensions/ai/ai-nodes.d.ts.map +1 -1
  27. package/dist/super-editor/extensions/bookmarks/bookmarks.d.ts.map +1 -1
  28. package/dist/super-editor/extensions/bullet-list/bullet-list.d.ts.map +1 -1
  29. package/dist/super-editor/extensions/comment/comment.d.ts.map +1 -1
  30. package/dist/super-editor/extensions/document/document.d.ts.map +1 -1
  31. package/dist/super-editor/extensions/field-annotation/field-annotation.d.ts.map +1 -1
  32. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts +2 -0
  33. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/getHeaderFooterAnnotations.d.ts.map +1 -0
  34. package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/index.d.ts +1 -0
  35. package/dist/super-editor/extensions/heading/heading.d.ts.map +1 -1
  36. package/dist/super-editor/extensions/image/image.d.ts.map +1 -1
  37. package/dist/super-editor/extensions/line-break/line-break.d.ts.map +1 -1
  38. package/dist/super-editor/extensions/list-item/list-item.d.ts.map +1 -1
  39. package/dist/super-editor/extensions/mention/mention.d.ts.map +1 -1
  40. package/dist/super-editor/extensions/ordered-list/ordered-list.d.ts.map +1 -1
  41. package/dist/super-editor/extensions/page-number/page-number.d.ts.map +1 -1
  42. package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
  43. package/dist/super-editor/extensions/run-item/run-item.d.ts.map +1 -1
  44. package/dist/super-editor/extensions/shape-container/shape-container.d.ts.map +1 -1
  45. package/dist/super-editor/extensions/shape-textbox/shape-textbox.d.ts.map +1 -1
  46. package/dist/super-editor/extensions/structured-content/structured-content.d.ts.map +1 -1
  47. package/dist/super-editor/extensions/table/table.d.ts.map +1 -1
  48. package/dist/super-editor/extensions/table-cell/table-cell.d.ts.map +1 -1
  49. package/dist/super-editor/extensions/table-header/table-header.d.ts.map +1 -1
  50. package/dist/super-editor/extensions/table-row/table-row.d.ts.map +1 -1
  51. package/dist/super-editor/file-zipper.es.js +1 -1
  52. package/dist/super-editor/index.d.ts +1 -1
  53. package/dist/super-editor/style.css +243 -196
  54. package/dist/super-editor/super-editor.es.js +335 -174
  55. package/dist/super-editor/toolbar.es.js +2 -2
  56. package/dist/super-editor.cjs +2 -1
  57. package/dist/super-editor.es.js +15 -14
  58. package/dist/superdoc.cjs +35 -9
  59. package/dist/superdoc.es.js +233 -207
  60. package/dist/superdoc.umd.js +583 -268
  61. package/dist/superdoc.umd.js.map +1 -1
  62. package/package.json +2 -1
@@ -1,6 +1,6 @@
1
1
  import { ref, onMounted, onUnmounted, computed, createElementBlock, openBlock, withModifiers, createElementVNode, withDirectives, unref, vModelText, createCommentVNode, nextTick } from "vue";
2
- import { T as TextSelection } from "./chunks/converter-BSr2Ue72.js";
3
- import { _ as _export_sfc } from "./chunks/editor-DOwVVn_i.js";
2
+ import { T as TextSelection } from "./chunks/converter-CP_Na8aB.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-CFxAdvpz.js";
4
4
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
5
5
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
6
6
  async function baseInsightsFetch(payload, options = {}) {
@@ -23309,7 +23309,7 @@ const _SuperConverter = class _SuperConverter {
23309
23309
  return;
23310
23310
  }
23311
23311
  }
23312
- static updateDocumentVersion(docx = this.convertedXml, version = "0.12.30") {
23312
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.12.31-next.2") {
23313
23313
  const customLocation = "docProps/custom.xml";
23314
23314
  if (!docx[customLocation]) {
23315
23315
  docx[customLocation] = generateCustomXml();
@@ -23778,7 +23778,7 @@ function storeSuperdocVersion(docx) {
23778
23778
  function generateCustomXml() {
23779
23779
  return DEFAULT_CUSTOM_XML;
23780
23780
  }
23781
- function generateSuperdocVersion(pid = 2, version = "0.12.30") {
23781
+ function generateSuperdocVersion(pid = 2, version = "0.12.31-next.2") {
23782
23782
  return {
23783
23783
  type: "element",
23784
23784
  name: "property",
@@ -1,4 +1,4 @@
1
- import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-BSr2Ue72.js";
1
+ import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-CP_Na8aB.js";
2
2
  function commonjsRequire(path) {
3
3
  throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
4
4
  }
@@ -12,9 +12,9 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
12
  var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _commandService, _css, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, insertNewFileData_fn, registerPluginByNameIfNotExists_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, createSchema_fn, generatePmData_fn, createDocFromHTML_fn, createView_fn, onCollaborationReady_fn, initComments_fn, initPagination_fn, dispatchTransaction_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-BSr2Ue72.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, c as callOrGet, i as isEmptyObject, S as Schema$1, T as TextSelection, b as canSplit, l as liftTarget, A as AllSelection, d as canJoin, j as joinPoint, N as NodeSelection, r as replaceStep$1, e as Selection, F as Fragment, R as ReplaceAroundStep, f as Slice, o as objectIncludes, g as deleteProps, D as DOMParser$1, h as ReplaceStep, k as NodeRange, m as findWrapping, n as isMacOS, p as isIOS, q as generateDocxRandomId, s as minMax, t as generateRandom32BitHex, u as DOMSerializer, v as Mark$1, w as dropPoint, x as process$1, B as Buffer2, y as isRegExp, z as TrackDeleteMarkName, C as TrackInsertMarkName, E as v4, G as TrackFormatMarkName, H as comments_module_events, I as AddMarkStep, J as RemoveMarkStep, K as twipsToLines, L as pixelsToTwips, O as SuperConverter, Q as EditorState, U as hasSomeParentWithClass, V as parseSizeUnit, W as getLineHeightValueString, X as toKebabCase, Y as kebabCase, Z as getColStyleDeclaration, _ as SelectionRange, $ as Transform, a0 as createColGroup } from "./converter-CP_Na8aB.js";
16
16
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
17
- import { D as DocxZipper } from "./docx-zipper-BCUCSdEs.js";
17
+ import { D as DocxZipper } from "./docx-zipper-BqcYpY0b.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -12839,6 +12839,9 @@ const createHeaderFooterEditor = ({
12839
12839
  pm.style.minHeight = "100%";
12840
12840
  pm.style.outline = "none";
12841
12841
  pm.style.border = "none";
12842
+ pm.setAttribute("role", "textbox");
12843
+ pm.setAttribute("aria-multiline", true);
12844
+ pm.setAttribute("aria-label", `${type} content area. Double click to start typing.`);
12842
12845
  return headerFooterEditor;
12843
12846
  };
12844
12847
  const broadcastEditorEvents = (editor, sectionEditor) => {
@@ -12860,13 +12863,16 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
12860
12863
  const toggleHeaderFooterEditMode = (editor, focusedSectionEditor, isEditMode) => {
12861
12864
  editor.converter.headerEditors.forEach((item) => {
12862
12865
  item.editor.setEditable(isEditMode, false);
12866
+ item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
12863
12867
  });
12864
12868
  editor.converter.footerEditors.forEach((item) => {
12865
12869
  item.editor.setEditable(isEditMode, false);
12870
+ item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
12866
12871
  });
12867
12872
  if (isEditMode) {
12868
12873
  const pm = document.querySelector(".ProseMirror");
12869
12874
  pm.classList.add("header-footer-edit");
12875
+ pm.setAttribute("aria-readonly", true);
12870
12876
  }
12871
12877
  if (focusedSectionEditor) {
12872
12878
  focusedSectionEditor.view.focus();
@@ -13785,11 +13791,12 @@ const generateTableIfNecessary = ({ tableNode, annotationValues, tr, state }) =>
13785
13791
  const getAnnotationValue = (id, annotationValues) => {
13786
13792
  return annotationValues.find((value) => value.input_id === id)?.input_value || null;
13787
13793
  };
13788
- const annotateHeadersAndFooters = ({ editor, annotationValues = [], hiddenFieldIds = [] }) => {
13794
+ const getAllHeaderFooterEditors = (editor) => {
13789
13795
  const sections = {
13790
13796
  header: editor.converter.headers || {},
13791
13797
  footer: editor.converter.footers || {}
13792
13798
  };
13799
+ const allEditors = [];
13793
13800
  Object.entries(sections).forEach(([type, items]) => {
13794
13801
  const editorsKey = `${type}Editors`;
13795
13802
  Object.entries(items).forEach(([sectionId, data]) => {
@@ -13807,25 +13814,38 @@ const annotateHeadersAndFooters = ({ editor, annotationValues = [], hiddenFieldI
13807
13814
  })
13808
13815
  };
13809
13816
  editor.converter[editorsKey].push(sectionEditor);
13817
+ allEditors.push({
13818
+ ...sectionEditor,
13819
+ key: editorsKey,
13820
+ type,
13821
+ sectionId
13822
+ });
13810
13823
  }
13811
- sectionEditor.editor.annotate(annotationValues, hiddenFieldIds);
13812
- onHeaderFooterDataUpdate(
13813
- { editor: sectionEditor.editor },
13814
- editor,
13815
- sectionId,
13816
- type
13817
- );
13818
13824
  });
13819
13825
  });
13826
+ return allEditors;
13827
+ };
13828
+ const annotateHeadersAndFooters = ({ editor, annotationValues = [], hiddenFieldIds = [], removeEmptyFields = false }) => {
13829
+ const allEditors = getAllHeaderFooterEditors(editor);
13830
+ allEditors.forEach(({ sectionId, editor: sectionEditor, type }) => {
13831
+ sectionEditor.annotate(annotationValues, hiddenFieldIds, removeEmptyFields);
13832
+ onHeaderFooterDataUpdate(
13833
+ { editor: sectionEditor },
13834
+ editor,
13835
+ sectionId,
13836
+ type
13837
+ );
13838
+ });
13820
13839
  };
13821
13840
  const annotateDocument = ({
13822
13841
  annotationValues = [],
13823
13842
  hiddenFieldIds = [],
13843
+ removeEmptyFields = false,
13824
13844
  schema,
13825
13845
  tr,
13826
13846
  editor
13827
13847
  }) => {
13828
- annotateHeadersAndFooters({ editor, annotationValues, hiddenFieldIds });
13848
+ annotateHeadersAndFooters({ editor, annotationValues, hiddenFieldIds, removeEmptyFields });
13829
13849
  const annotations = [];
13830
13850
  const FieldType = schema.nodes.fieldAnnotation;
13831
13851
  tr.doc.descendants((node, pos) => {
@@ -13878,11 +13898,13 @@ const annotateDocument = ({
13878
13898
  });
13879
13899
  }
13880
13900
  }
13881
- Array.from(toDelete).sort((a, b) => b - a).forEach((pos) => {
13882
- const ann = annotations.find((a) => a.pos === pos);
13883
- if (!ann) return;
13884
- tr = tr.delete(pos, pos + ann.node.nodeSize);
13885
- });
13901
+ if (removeEmptyFields) {
13902
+ Array.from(toDelete).sort((a, b) => b - a).forEach((pos) => {
13903
+ const ann = annotations.find((a) => a.pos === pos);
13904
+ if (!ann) return;
13905
+ tr = tr.delete(pos, pos + ann.node.nodeSize);
13906
+ });
13907
+ }
13886
13908
  return tr;
13887
13909
  };
13888
13910
  const getFormattedDate = (input = null, format = "") => {
@@ -13900,7 +13922,7 @@ const getFormattedDate = (input = null, format = "") => {
13900
13922
  // e.g. “2025”
13901
13923
  });
13902
13924
  };
13903
- const AnnotatorServices = {
13925
+ const AnnotatorHelpers = {
13904
13926
  getFieldAttrs,
13905
13927
  processTables,
13906
13928
  annotateDocument,
@@ -14054,6 +14076,16 @@ const generateCollaborationData = (editor) => {
14054
14076
  initializeMetaMap(ydoc, editor);
14055
14077
  return encodeStateAsUpdate(ydoc);
14056
14078
  };
14079
+ const isHighContrastMode = ref(false);
14080
+ function useHighContrastMode() {
14081
+ const setHighContrastMode = (value) => {
14082
+ isHighContrastMode.value = value;
14083
+ };
14084
+ return {
14085
+ isHighContrastMode,
14086
+ setHighContrastMode
14087
+ };
14088
+ }
14057
14089
  const _Editor = class _Editor extends EventEmitter {
14058
14090
  /**
14059
14091
  * Create a new Editor instance
@@ -14174,6 +14206,8 @@ const _Editor = class _Editor extends EventEmitter {
14174
14206
  }
14175
14207
  };
14176
14208
  let initMode = modes[this.options.mode] ?? modes.default;
14209
+ const { setHighContrastMode } = useHighContrastMode();
14210
+ this.setHighContrastMode = setHighContrastMode;
14177
14211
  initMode();
14178
14212
  }
14179
14213
  /**
@@ -14470,6 +14504,10 @@ const _Editor = class _Editor extends EventEmitter {
14470
14504
  if (!proseMirror || !pageSize || !pageMargins) {
14471
14505
  return;
14472
14506
  }
14507
+ proseMirror.setAttribute("role", "document");
14508
+ proseMirror.setAttribute("aria-multiline", true);
14509
+ proseMirror.setAttribute("aria-label", "Main content area, start typing to enter text.");
14510
+ proseMirror.setAttribute("aria-description", "");
14473
14511
  element.style.width = pageSize.width + "in";
14474
14512
  element.style.minWidth = pageSize.width + "in";
14475
14513
  element.style.minHeight = pageSize.height + "in";
@@ -14721,7 +14759,7 @@ const _Editor = class _Editor extends EventEmitter {
14721
14759
  * @returns {Object | void} Migration results
14722
14760
  */
14723
14761
  processCollaborationMigrations() {
14724
- console.debug("[checkVersionMigrations] Current editor version", "0.12.30");
14762
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.31-next.2");
14725
14763
  if (!this.options.ydoc) return;
14726
14764
  const metaMap = this.options.ydoc.getMap("meta");
14727
14765
  let docVersion = metaMap.get("version");
@@ -14810,10 +14848,8 @@ const _Editor = class _Editor extends EventEmitter {
14810
14848
  */
14811
14849
  prepareForAnnotations(annotationValues = []) {
14812
14850
  const { tr } = this.state;
14813
- const { dispatch } = this.view;
14814
- const newTr = AnnotatorServices.processTables({ state: this.state, tr, annotationValues });
14851
+ const newTr = AnnotatorHelpers.processTables({ state: this.state, tr, annotationValues });
14815
14852
  this.view.dispatch(newTr);
14816
- AnnotatorServices.annotateHeadersAndFooters({ editor: this, annotationValues });
14817
14853
  }
14818
14854
  /**
14819
14855
  * Annotate the document with the given annotation values.
@@ -14822,15 +14858,16 @@ const _Editor = class _Editor extends EventEmitter {
14822
14858
  * @param {String[]} hiddenIds List of field ids to remove from the document.
14823
14859
  * @returns {void}
14824
14860
  */
14825
- annotate(annotationValues = [], hiddenIds = []) {
14861
+ annotate(annotationValues = [], hiddenIds = [], removeEmptyFields = false) {
14826
14862
  const { state, view, schema } = this;
14827
14863
  let tr = state.tr;
14828
- tr = AnnotatorServices.processTables({ state: this.state, tr, annotationValues });
14829
- tr = AnnotatorServices.annotateDocument({
14864
+ tr = AnnotatorHelpers.processTables({ state: this.state, tr, annotationValues });
14865
+ tr = AnnotatorHelpers.annotateDocument({
14830
14866
  tr,
14831
14867
  schema,
14832
14868
  annotationValues,
14833
14869
  hiddenFieldIds: hiddenIds,
14870
+ removeEmptyFields,
14834
14871
  editor: this
14835
14872
  });
14836
14873
  if (tr.docChanged) view.dispatch(tr.scrollIntoView());
@@ -15181,6 +15218,7 @@ createView_fn = function() {
15181
15218
  toggleHeaderFooterEditMode(this, null, false);
15182
15219
  const pm = document.querySelector(".ProseMirror");
15183
15220
  pm.classList.remove("header-footer-edit");
15221
+ pm.setAttribute("aria-readonly", false);
15184
15222
  }
15185
15223
  }
15186
15224
  });
@@ -16191,7 +16229,8 @@ const AiLoaderNode = Node$1.create({
16191
16229
  return {
16192
16230
  htmlAttributes: {
16193
16231
  class: "sd-ai-loader",
16194
- contentEditable: "false"
16232
+ contentEditable: "false",
16233
+ "aria-label": "AI loader node"
16195
16234
  }
16196
16235
  };
16197
16236
  },
@@ -16387,7 +16426,8 @@ const Document = Node$1.create({
16387
16426
  addAttributes() {
16388
16427
  return {
16389
16428
  attributes: {
16390
- rendered: false
16429
+ rendered: false,
16430
+ "aria-label": "Document node"
16391
16431
  }
16392
16432
  };
16393
16433
  }
@@ -16411,7 +16451,8 @@ const RunItem = Node$1.create({
16411
16451
  addAttributes() {
16412
16452
  return {
16413
16453
  attributes: {
16414
- rendered: false
16454
+ rendered: false,
16455
+ "aria-label": "Run node"
16415
16456
  }
16416
16457
  };
16417
16458
  }
@@ -16464,7 +16505,9 @@ const BulletList = Node$1.create({
16464
16505
  addOptions() {
16465
16506
  return {
16466
16507
  itemTypeName: "listItem",
16467
- htmlAttributes: {},
16508
+ htmlAttributes: {
16509
+ "aria-label": "Bullet list node"
16510
+ },
16468
16511
  keepMarks: true,
16469
16512
  keepAttributes: false
16470
16513
  };
@@ -16755,7 +16798,9 @@ const OrderedList = Node$1.create({
16755
16798
  addOptions() {
16756
16799
  return {
16757
16800
  itemTypeName: "listItem",
16758
- htmlAttributes: {},
16801
+ htmlAttributes: {
16802
+ "aria-label": "Ordered list node"
16803
+ },
16759
16804
  keepMarks: true,
16760
16805
  keepAttributes: false,
16761
16806
  listStyleTypes: ["decimal", "lowerAlpha", "lowerRoman"]
@@ -17155,7 +17200,9 @@ const ListItem = Node$1.create({
17155
17200
  // to run listItem commands first
17156
17201
  addOptions() {
17157
17202
  return {
17158
- htmlAttributes: {},
17203
+ htmlAttributes: {
17204
+ "aria-label": "List item node"
17205
+ },
17159
17206
  bulletListTypeName: "bulletList",
17160
17207
  orderedListTypeName: "orderedList"
17161
17208
  };
@@ -17677,7 +17724,9 @@ const Heading = Node$1.create({
17677
17724
  addOptions() {
17678
17725
  return {
17679
17726
  levels: [1, 2, 3, 4, 5, 6],
17680
- htmlAttributes: {}
17727
+ htmlAttributes: {
17728
+ "aria-label": "Heading node"
17729
+ }
17681
17730
  };
17682
17731
  },
17683
17732
  addAttributes() {
@@ -17738,7 +17787,8 @@ const CommentRangeStart = Node$1.create({
17738
17787
  addOptions() {
17739
17788
  return {
17740
17789
  htmlAttributes: {
17741
- contentEditable: "false"
17790
+ contentEditable: "false",
17791
+ "aria-label": "Comment range start node"
17742
17792
  }
17743
17793
  };
17744
17794
  },
@@ -17767,7 +17817,8 @@ const CommentRangeEnd = Node$1.create({
17767
17817
  addOptions() {
17768
17818
  return {
17769
17819
  htmlAttributes: {
17770
- contentEditable: "false"
17820
+ contentEditable: "false",
17821
+ "aria-label": "Comment range end node"
17771
17822
  }
17772
17823
  };
17773
17824
  },
@@ -17795,7 +17846,8 @@ const CommentReference = Node$1.create({
17795
17846
  addOptions() {
17796
17847
  return {
17797
17848
  htmlAttributes: {
17798
- contentEditable: "false"
17849
+ contentEditable: "false",
17850
+ "aria-label": "Comment reference node"
17799
17851
  }
17800
17852
  };
17801
17853
  },
@@ -17970,7 +18022,9 @@ const HardBreak = Node$1.create({
17970
18022
  return {
17971
18023
  htmlAttributes: {
17972
18024
  contentEditable: "false",
17973
- lineBreakType: "page"
18025
+ lineBreakType: "page",
18026
+ "aria-hidden": "true",
18027
+ "aria-label": "Hard break node"
17974
18028
  }
17975
18029
  };
17976
18030
  },
@@ -20328,7 +20382,9 @@ const Table = Node$1.create({
20328
20382
  tableRole: "table",
20329
20383
  addOptions() {
20330
20384
  return {
20331
- htmlAttributes: {},
20385
+ htmlAttributes: {
20386
+ "aria-label": "Table node"
20387
+ },
20332
20388
  resizable: true,
20333
20389
  handleWidth: 5,
20334
20390
  cellMinWidth: 25,
@@ -20578,7 +20634,9 @@ const TableHeader = Node$1.create({
20578
20634
  isolating: true,
20579
20635
  addOptions() {
20580
20636
  return {
20581
- htmlAttributes: {}
20637
+ htmlAttributes: {
20638
+ "aria-label": "Table head node"
20639
+ }
20582
20640
  };
20583
20641
  },
20584
20642
  addAttributes() {
@@ -20618,7 +20676,9 @@ const TableRow = Node$1.create({
20618
20676
  tableRole: "row",
20619
20677
  addOptions() {
20620
20678
  return {
20621
- htmlAttributes: {}
20679
+ htmlAttributes: {
20680
+ "aria-label": "Table row node"
20681
+ }
20622
20682
  };
20623
20683
  },
20624
20684
  addAttributes() {
@@ -20646,7 +20706,9 @@ const TableCell = Node$1.create({
20646
20706
  isolating: true,
20647
20707
  addOptions() {
20648
20708
  return {
20649
- htmlAttributes: {}
20709
+ htmlAttributes: {
20710
+ "aria-label": "Table cell node"
20711
+ }
20650
20712
  };
20651
20713
  },
20652
20714
  addAttributes() {
@@ -21188,6 +21250,15 @@ function findFieldAnnotationsBetween(from2, to, doc2) {
21188
21250
  });
21189
21251
  return fieldAnnotations;
21190
21252
  }
21253
+ const getHeaderFooterAnnotations = (editor) => {
21254
+ const editors = getAllHeaderFooterEditors(editor);
21255
+ const allAnnotations = [];
21256
+ editors.forEach(({ id, editor: editor2 }) => {
21257
+ const annotations = getAllFieldAnnotations(editor2.state);
21258
+ allAnnotations.push(...annotations);
21259
+ });
21260
+ return allAnnotations;
21261
+ };
21191
21262
  const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21192
21263
  __proto__: null,
21193
21264
  findFieldAnnotations,
@@ -21197,6 +21268,7 @@ const index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
21197
21268
  findRemovedFieldAnnotations,
21198
21269
  getAllFieldAnnotations,
21199
21270
  getAllFieldAnnotationsWithRect,
21271
+ getHeaderFooterAnnotations,
21200
21272
  trackFieldAnnotationsDeletion
21201
21273
  }, Symbol.toStringTag, { value: "Module" }));
21202
21274
  function guard(low, high, value) {
@@ -21327,7 +21399,8 @@ const FieldAnnotation = Node$1.create({
21327
21399
  addOptions() {
21328
21400
  return {
21329
21401
  htmlAttributes: {
21330
- class: annotationClass
21402
+ class: annotationClass,
21403
+ "aria-label": "Field annotation node"
21331
21404
  },
21332
21405
  annotationClass,
21333
21406
  annotationContentClass,
@@ -22269,7 +22342,8 @@ const Image = Node$1.create({
22269
22342
  return {
22270
22343
  allowBase64: true,
22271
22344
  htmlAttributes: {
22272
- style: "display: inline-block;"
22345
+ style: "display: inline-block;",
22346
+ "aria-label": "Image node"
22273
22347
  }
22274
22348
  };
22275
22349
  },
@@ -22385,7 +22459,11 @@ const BookmarkStart = Node$1.create({
22385
22459
  inline: true,
22386
22460
  addOptions() {
22387
22461
  return {
22388
- htmlAttributes: { style: "height: 0; width: 0;" }
22462
+ htmlAttributes: {
22463
+ style: "height: 0; width: 0;",
22464
+ "aria-label": "Bookmark start node",
22465
+ role: "link"
22466
+ }
22389
22467
  };
22390
22468
  },
22391
22469
  addAttributes() {
@@ -22419,7 +22497,8 @@ const Mention = Node$1.create({
22419
22497
  addOptions() {
22420
22498
  return {
22421
22499
  htmlAttributes: {
22422
- class: "sd-editor-mention"
22500
+ class: "sd-editor-mention",
22501
+ "aria-label": "Mention node"
22423
22502
  }
22424
22503
  };
22425
22504
  },
@@ -22457,7 +22536,8 @@ const PageNumber = Node$1.create({
22457
22536
  addOptions() {
22458
22537
  return {
22459
22538
  htmlAttributes: {
22460
- "data-id": "auto-page-number"
22539
+ "data-id": "auto-page-number",
22540
+ "aria-label": "Page number node"
22461
22541
  }
22462
22542
  };
22463
22543
  },
@@ -22476,7 +22556,8 @@ const TotalPageCount = Node$1.create({
22476
22556
  addOptions() {
22477
22557
  return {
22478
22558
  htmlAttributes: {
22479
- "data-id": "auto-total-pages"
22559
+ "data-id": "auto-total-pages",
22560
+ "aria-label": "Total page count node"
22480
22561
  }
22481
22562
  };
22482
22563
  },
@@ -22495,7 +22576,8 @@ const ShapeContainer = Node$1.create({
22495
22576
  addOptions() {
22496
22577
  return {
22497
22578
  htmlAttributes: {
22498
- class: "sd-editor-shape-container"
22579
+ class: "sd-editor-shape-container",
22580
+ "aria-label": "Shape container node"
22499
22581
  }
22500
22582
  };
22501
22583
  },
@@ -22548,7 +22630,8 @@ const ShapeTextbox = Node$1.create({
22548
22630
  addOptions() {
22549
22631
  return {
22550
22632
  htmlAttributes: {
22551
- class: "sd-editor-shape-textbox"
22633
+ class: "sd-editor-shape-textbox",
22634
+ "aria-label": "Shape textbox node"
22552
22635
  }
22553
22636
  };
22554
22637
  },
@@ -22640,7 +22723,9 @@ const StructuredContent = Node$1.create({
22640
22723
  addOptions() {
22641
22724
  return {
22642
22725
  annotationClass: "sd-structured-content-tag",
22643
- htmlAttributes: {}
22726
+ htmlAttributes: {
22727
+ "aria-label": "Structured content node"
22728
+ }
22644
22729
  };
22645
22730
  },
22646
22731
  parseDOM() {
@@ -27312,16 +27397,18 @@ export {
27312
27397
  generateLinkedStyleString as b,
27313
27398
  findParentNode as c,
27314
27399
  getActiveFormatting as d,
27315
- getStarterExtensions as e,
27400
+ undoDepth as e,
27316
27401
  findPlaceholder as f,
27317
27402
  global as g,
27318
- getRichTextExtensions as h,
27403
+ getStarterExtensions as h,
27319
27404
  isInTable$1 as i,
27320
- Extension as j,
27321
- helpers as k,
27322
- index$1 as l,
27323
- index as m,
27324
- getMarksFromSelection as n,
27405
+ getRichTextExtensions as j,
27406
+ Extension as k,
27407
+ helpers as l,
27408
+ index$1 as m,
27409
+ index as n,
27410
+ AnnotatorHelpers as o,
27411
+ getMarksFromSelection as p,
27325
27412
  redoDepth as r,
27326
- undoDepth as u
27413
+ useHighContrastMode as u
27327
27414
  };