@harbour-enterprises/superdoc 0.13.2-rev5 → 0.13.2-rev7

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 (27) hide show
  1. package/dist/chunks/{super-editor.es-Dz4VUz6_.es.js → super-editor.es-C25JkSnI.es.js} +54 -15
  2. package/dist/chunks/{super-editor.es-8qHwmdQ6.cjs → super-editor.es-Djlcx6Si.cjs} +54 -15
  3. package/dist/super-editor/ai-writer.es.js +2 -2
  4. package/dist/super-editor/chunks/{converter-CtLZIbF7.js → converter-Fwt4-8Pg.js} +2 -2
  5. package/dist/super-editor/chunks/{docx-zipper-JbUHPfi1.js → docx-zipper-BOV7cSCY.js} +1 -1
  6. package/dist/super-editor/chunks/{editor-CNrlIkRQ.js → editor-CR0_l9jt.js} +57 -15
  7. package/dist/super-editor/chunks/{toolbar-BhoFnMH2.js → toolbar-D38Br8cP.js} +2 -2
  8. package/dist/super-editor/converter.es.js +1 -1
  9. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  10. package/dist/super-editor/core/helpers/setImageNodeSelection.d.ts +2 -0
  11. package/dist/super-editor/core/helpers/setImageNodeSelection.d.ts.map +1 -0
  12. package/dist/super-editor/docx-zipper.es.js +2 -2
  13. package/dist/super-editor/editor.es.js +3 -3
  14. package/dist/super-editor/extensions/image/imageHelpers/startImageUpload.d.ts.map +1 -1
  15. package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts +6 -1
  16. package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
  17. package/dist/super-editor/extensions/pagination/pagination.d.ts.map +1 -1
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +3 -3
  25. package/dist/superdoc.umd.js +55 -16
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -23972,7 +23972,7 @@ const _SuperConverter = class _SuperConverter2 {
23972
23972
  return;
23973
23973
  }
23974
23974
  }
23975
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev5") {
23975
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev7") {
23976
23976
  const customLocation = "docProps/custom.xml";
23977
23977
  if (!docx[customLocation]) {
23978
23978
  docx[customLocation] = generateCustomXml();
@@ -24439,7 +24439,7 @@ function storeSuperdocVersion(docx) {
24439
24439
  function generateCustomXml() {
24440
24440
  return DEFAULT_CUSTOM_XML;
24441
24441
  }
24442
- function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev5") {
24442
+ function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev7") {
24443
24443
  return {
24444
24444
  type: "element",
24445
24445
  name: "property",
@@ -26972,7 +26972,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
26972
26972
  var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
26973
26973
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
26974
26974
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
26975
- 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, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
26975
+ 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, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
26976
26976
  function getMarksFromSelection(state2) {
26977
26977
  const { from: from2, to, empty: empty2 } = state2.selection;
26978
26978
  const marks = [];
@@ -39270,14 +39270,16 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
39270
39270
  });
39271
39271
  });
39272
39272
  };
39273
- const toggleHeaderFooterEditMode = (editor, focusedSectionEditor, isEditMode) => {
39273
+ const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
39274
39274
  editor.converter.headerEditors.forEach((item) => {
39275
39275
  item.editor.setEditable(isEditMode, false);
39276
39276
  item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
39277
+ item.editor.view.dom.setAttribute("documentmode", documentMode);
39277
39278
  });
39278
39279
  editor.converter.footerEditors.forEach((item) => {
39279
39280
  item.editor.setEditable(isEditMode, false);
39280
39281
  item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
39282
+ item.editor.view.dom.setAttribute("documentmode", documentMode);
39281
39283
  });
39282
39284
  if (isEditMode) {
39283
39285
  const pm = document.querySelector(".ProseMirror");
@@ -40607,6 +40609,16 @@ const setWordSelection = (view, pos) => {
40607
40609
  const tr = state2.tr.setSelection(TextSelection.create(state2.doc, word.from, word.to));
40608
40610
  dispatch(tr);
40609
40611
  };
40612
+ const setImageNodeSelection = (view, pos) => {
40613
+ const { doc: doc2 } = view.state;
40614
+ const node2 = doc2.nodeAt(pos);
40615
+ if (node2 && node2.type.name === "image") {
40616
+ const tr = view.state.tr.setSelection(NodeSelection.create(doc2, pos));
40617
+ view.dispatch(tr);
40618
+ return true;
40619
+ }
40620
+ return false;
40621
+ };
40610
40622
  const _Editor = class _Editor2 extends EventEmitter$1 {
40611
40623
  /**
40612
40624
  * Create a new Editor instance
@@ -40809,7 +40821,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
40809
40821
  this.commands.toggleTrackChangesShowOriginal();
40810
40822
  this.setEditable(false, false);
40811
40823
  this.setOptions({ documentMode: "viewing" });
40812
- toggleHeaderFooterEditMode(this, null, false);
40824
+ toggleHeaderFooterEditMode({
40825
+ editor: this,
40826
+ focusedSectionEditor: null,
40827
+ isEditMode: false,
40828
+ documentMode: cleanedMode
40829
+ });
40813
40830
  } else if (cleanedMode === "suggesting") {
40814
40831
  __privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
40815
40832
  this.commands.disableTrackChangesShowOriginal();
@@ -40822,7 +40839,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
40822
40839
  this.commands.disableTrackChanges();
40823
40840
  this.setEditable(true, false);
40824
40841
  this.setOptions({ documentMode: "editing" });
40825
- toggleHeaderFooterEditMode(this, null, false);
40842
+ toggleHeaderFooterEditMode({
40843
+ editor: this,
40844
+ focusedSectionEditor: null,
40845
+ isEditMode: false,
40846
+ documentMode: cleanedMode
40847
+ });
40826
40848
  }
40827
40849
  }
40828
40850
  /**
@@ -41296,7 +41318,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
41296
41318
  * @returns {Object | void} Migration results
41297
41319
  */
41298
41320
  processCollaborationMigrations() {
41299
- console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev5");
41321
+ console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev7");
41300
41322
  if (!this.options.ydoc) return;
41301
41323
  const metaMap = this.options.ydoc.getMap("meta");
41302
41324
  let docVersion = metaMap.get("version");
@@ -41666,6 +41688,7 @@ createView_fn = function(element) {
41666
41688
  ...this.options.editorProps,
41667
41689
  dispatchTransaction: __privateMethod$1(this, _Editor_instances, dispatchTransaction_fn).bind(this),
41668
41690
  state: EditorState.create(state2),
41691
+ handleClick: __privateMethod$1(this, _Editor_instances, handleNodeSelection_fn).bind(this),
41669
41692
  handleDoubleClick: async (view, pos, event) => {
41670
41693
  if (this.options.documentMode !== "editing") return;
41671
41694
  const isHeader = hasSomeParentWithClass(event.target, "pagination-section-header");
@@ -41679,7 +41702,12 @@ createView_fn = function(element) {
41679
41702
  event.stopPropagation();
41680
41703
  if (!this.options.editable) {
41681
41704
  this.setEditable(true, false);
41682
- toggleHeaderFooterEditMode(this, null, false);
41705
+ toggleHeaderFooterEditMode({
41706
+ editor: this,
41707
+ focusedSectionEditor: null,
41708
+ isEditMode: false,
41709
+ documentMode: this.options.documentMode
41710
+ });
41683
41711
  const pm = document.querySelector(".ProseMirror");
41684
41712
  pm.classList.remove("header-footer-edit");
41685
41713
  pm.setAttribute("aria-readonly", false);
@@ -41784,6 +41812,11 @@ dispatchTransaction_fn = function(transaction) {
41784
41812
  transaction
41785
41813
  });
41786
41814
  };
41815
+ handleNodeSelection_fn = function(view, pos) {
41816
+ if (this.options.isHeaderOrFooter) {
41817
+ return setImageNodeSelection(view, pos);
41818
+ }
41819
+ };
41787
41820
  prepareDocumentForImport_fn = function(doc2) {
41788
41821
  const newState = EditorState.create({
41789
41822
  schema: this.schema,
@@ -49046,12 +49079,16 @@ const startImageUpload = async ({ editor, view, file }) => {
49046
49079
  }
49047
49080
  let id = {};
49048
49081
  let { tr, schema } = view.state;
49049
- if (!tr.selection.empty) {
49082
+ let { selection } = tr;
49083
+ if (editor.options.isHeaderOrFooter) {
49084
+ selection = editor.options.lastSelection;
49085
+ }
49086
+ if (!selection.empty && !editor.options.isHeaderOrFooter) {
49050
49087
  tr.deleteSelection();
49051
49088
  }
49052
49089
  let imageMeta = {
49053
49090
  type: "add",
49054
- pos: tr.selection.from,
49091
+ pos: selection.from,
49055
49092
  id
49056
49093
  };
49057
49094
  tr.setMeta(ImagePlaceholderPluginKey, imageMeta);
@@ -54351,10 +54388,7 @@ const Pagination = Extension.create({
54351
54388
  const imagePluginTransaction = tr.getMeta(ImagePlaceholderPluginKey);
54352
54389
  if (imagePluginTransaction) {
54353
54390
  if (imagePluginTransaction.type === "remove") {
54354
- const imagePos = imagePluginTransaction.pos;
54355
- const domImage = editor.view.domAtPos(imagePos).node.querySelector("img");
54356
- if (domImage.complete) onImageLoad(editor);
54357
- else domImage.onload = () => onImageLoad(editor);
54391
+ onImageLoad(editor);
54358
54392
  }
54359
54393
  return { ...oldState };
54360
54394
  }
@@ -54740,7 +54774,12 @@ const getHeaderFooterEditorKey = ({
54740
54774
  const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
54741
54775
  if (editor.options.documentMode !== "editing") return;
54742
54776
  editor.setEditable(false, false);
54743
- toggleHeaderFooterEditMode(editor, currentFocusedSectionEditor, true);
54777
+ toggleHeaderFooterEditMode({
54778
+ editor,
54779
+ focusedSectionEditor: currentFocusedSectionEditor,
54780
+ isEditMode: true,
54781
+ documentMode: editor.options.documentMode
54782
+ });
54744
54783
  };
54745
54784
  function createPageBreak({ editor, header, footer, footerBottom = null, isFirstHeader, isLastFooter, isInTable: isInTable2 = false }) {
54746
54785
  const { pageSize, pageMargins } = editor.converter.pageStyles;
@@ -23989,7 +23989,7 @@ const _SuperConverter = class _SuperConverter2 {
23989
23989
  return;
23990
23990
  }
23991
23991
  }
23992
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev5") {
23992
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.13.2-rev7") {
23993
23993
  const customLocation = "docProps/custom.xml";
23994
23994
  if (!docx[customLocation]) {
23995
23995
  docx[customLocation] = generateCustomXml();
@@ -24456,7 +24456,7 @@ function storeSuperdocVersion(docx) {
24456
24456
  function generateCustomXml() {
24457
24457
  return DEFAULT_CUSTOM_XML;
24458
24458
  }
24459
- function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev5") {
24459
+ function generateSuperdocVersion(pid = 2, version2 = "0.13.2-rev7") {
24460
24460
  return {
24461
24461
  type: "element",
24462
24462
  name: "property",
@@ -26989,7 +26989,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
26989
26989
  var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
26990
26990
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
26991
26991
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
26992
- 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, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
26992
+ 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, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
26993
26993
  function getMarksFromSelection(state2) {
26994
26994
  const { from: from2, to, empty: empty2 } = state2.selection;
26995
26995
  const marks = [];
@@ -39287,14 +39287,16 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
39287
39287
  });
39288
39288
  });
39289
39289
  };
39290
- const toggleHeaderFooterEditMode = (editor, focusedSectionEditor, isEditMode) => {
39290
+ const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
39291
39291
  editor.converter.headerEditors.forEach((item) => {
39292
39292
  item.editor.setEditable(isEditMode, false);
39293
39293
  item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
39294
+ item.editor.view.dom.setAttribute("documentmode", documentMode);
39294
39295
  });
39295
39296
  editor.converter.footerEditors.forEach((item) => {
39296
39297
  item.editor.setEditable(isEditMode, false);
39297
39298
  item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
39299
+ item.editor.view.dom.setAttribute("documentmode", documentMode);
39298
39300
  });
39299
39301
  if (isEditMode) {
39300
39302
  const pm = document.querySelector(".ProseMirror");
@@ -40624,6 +40626,16 @@ const setWordSelection = (view, pos) => {
40624
40626
  const tr = state2.tr.setSelection(TextSelection.create(state2.doc, word.from, word.to));
40625
40627
  dispatch(tr);
40626
40628
  };
40629
+ const setImageNodeSelection = (view, pos) => {
40630
+ const { doc: doc2 } = view.state;
40631
+ const node2 = doc2.nodeAt(pos);
40632
+ if (node2 && node2.type.name === "image") {
40633
+ const tr = view.state.tr.setSelection(NodeSelection.create(doc2, pos));
40634
+ view.dispatch(tr);
40635
+ return true;
40636
+ }
40637
+ return false;
40638
+ };
40627
40639
  const _Editor = class _Editor2 extends EventEmitter$1 {
40628
40640
  /**
40629
40641
  * Create a new Editor instance
@@ -40826,7 +40838,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
40826
40838
  this.commands.toggleTrackChangesShowOriginal();
40827
40839
  this.setEditable(false, false);
40828
40840
  this.setOptions({ documentMode: "viewing" });
40829
- toggleHeaderFooterEditMode(this, null, false);
40841
+ toggleHeaderFooterEditMode({
40842
+ editor: this,
40843
+ focusedSectionEditor: null,
40844
+ isEditMode: false,
40845
+ documentMode: cleanedMode
40846
+ });
40830
40847
  } else if (cleanedMode === "suggesting") {
40831
40848
  __privateMethod$1(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
40832
40849
  this.commands.disableTrackChangesShowOriginal();
@@ -40839,7 +40856,12 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
40839
40856
  this.commands.disableTrackChanges();
40840
40857
  this.setEditable(true, false);
40841
40858
  this.setOptions({ documentMode: "editing" });
40842
- toggleHeaderFooterEditMode(this, null, false);
40859
+ toggleHeaderFooterEditMode({
40860
+ editor: this,
40861
+ focusedSectionEditor: null,
40862
+ isEditMode: false,
40863
+ documentMode: cleanedMode
40864
+ });
40843
40865
  }
40844
40866
  }
40845
40867
  /**
@@ -41313,7 +41335,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
41313
41335
  * @returns {Object | void} Migration results
41314
41336
  */
41315
41337
  processCollaborationMigrations() {
41316
- console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev5");
41338
+ console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev7");
41317
41339
  if (!this.options.ydoc) return;
41318
41340
  const metaMap = this.options.ydoc.getMap("meta");
41319
41341
  let docVersion = metaMap.get("version");
@@ -41683,6 +41705,7 @@ createView_fn = function(element) {
41683
41705
  ...this.options.editorProps,
41684
41706
  dispatchTransaction: __privateMethod$1(this, _Editor_instances, dispatchTransaction_fn).bind(this),
41685
41707
  state: EditorState.create(state2),
41708
+ handleClick: __privateMethod$1(this, _Editor_instances, handleNodeSelection_fn).bind(this),
41686
41709
  handleDoubleClick: async (view, pos, event) => {
41687
41710
  if (this.options.documentMode !== "editing") return;
41688
41711
  const isHeader = hasSomeParentWithClass(event.target, "pagination-section-header");
@@ -41696,7 +41719,12 @@ createView_fn = function(element) {
41696
41719
  event.stopPropagation();
41697
41720
  if (!this.options.editable) {
41698
41721
  this.setEditable(true, false);
41699
- toggleHeaderFooterEditMode(this, null, false);
41722
+ toggleHeaderFooterEditMode({
41723
+ editor: this,
41724
+ focusedSectionEditor: null,
41725
+ isEditMode: false,
41726
+ documentMode: this.options.documentMode
41727
+ });
41700
41728
  const pm = document.querySelector(".ProseMirror");
41701
41729
  pm.classList.remove("header-footer-edit");
41702
41730
  pm.setAttribute("aria-readonly", false);
@@ -41801,6 +41829,11 @@ dispatchTransaction_fn = function(transaction) {
41801
41829
  transaction
41802
41830
  });
41803
41831
  };
41832
+ handleNodeSelection_fn = function(view, pos) {
41833
+ if (this.options.isHeaderOrFooter) {
41834
+ return setImageNodeSelection(view, pos);
41835
+ }
41836
+ };
41804
41837
  prepareDocumentForImport_fn = function(doc2) {
41805
41838
  const newState = EditorState.create({
41806
41839
  schema: this.schema,
@@ -49063,12 +49096,16 @@ const startImageUpload = async ({ editor, view, file }) => {
49063
49096
  }
49064
49097
  let id = {};
49065
49098
  let { tr, schema } = view.state;
49066
- if (!tr.selection.empty) {
49099
+ let { selection } = tr;
49100
+ if (editor.options.isHeaderOrFooter) {
49101
+ selection = editor.options.lastSelection;
49102
+ }
49103
+ if (!selection.empty && !editor.options.isHeaderOrFooter) {
49067
49104
  tr.deleteSelection();
49068
49105
  }
49069
49106
  let imageMeta = {
49070
49107
  type: "add",
49071
- pos: tr.selection.from,
49108
+ pos: selection.from,
49072
49109
  id
49073
49110
  };
49074
49111
  tr.setMeta(ImagePlaceholderPluginKey, imageMeta);
@@ -54368,10 +54405,7 @@ const Pagination = Extension.create({
54368
54405
  const imagePluginTransaction = tr.getMeta(ImagePlaceholderPluginKey);
54369
54406
  if (imagePluginTransaction) {
54370
54407
  if (imagePluginTransaction.type === "remove") {
54371
- const imagePos = imagePluginTransaction.pos;
54372
- const domImage = editor.view.domAtPos(imagePos).node.querySelector("img");
54373
- if (domImage.complete) onImageLoad(editor);
54374
- else domImage.onload = () => onImageLoad(editor);
54408
+ onImageLoad(editor);
54375
54409
  }
54376
54410
  return { ...oldState };
54377
54411
  }
@@ -54757,7 +54791,12 @@ const getHeaderFooterEditorKey = ({
54757
54791
  const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
54758
54792
  if (editor.options.documentMode !== "editing") return;
54759
54793
  editor.setEditable(false, false);
54760
- toggleHeaderFooterEditMode(editor, currentFocusedSectionEditor, true);
54794
+ toggleHeaderFooterEditMode({
54795
+ editor,
54796
+ focusedSectionEditor: currentFocusedSectionEditor,
54797
+ isEditMode: true,
54798
+ documentMode: editor.options.documentMode
54799
+ });
54761
54800
  };
54762
54801
  function createPageBreak({ editor, header, footer, footerBottom = null, isFirstHeader, isLastFooter, isInTable: isInTable2 = false }) {
54763
54802
  const { pageSize, pageMargins } = editor.converter.pageStyles;
@@ -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-CtLZIbF7.js";
3
- import { _ as _export_sfc } from "./chunks/editor-CNrlIkRQ.js";
2
+ import { T as TextSelection } from "./chunks/converter-Fwt4-8Pg.js";
3
+ import { _ as _export_sfc } from "./chunks/editor-CR0_l9jt.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 = {}) {
@@ -23991,7 +23991,7 @@ const _SuperConverter = class _SuperConverter {
23991
23991
  return;
23992
23992
  }
23993
23993
  }
23994
- static updateDocumentVersion(docx = this.convertedXml, version = "0.13.2-rev5") {
23994
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.13.2-rev7") {
23995
23995
  const customLocation = "docProps/custom.xml";
23996
23996
  if (!docx[customLocation]) {
23997
23997
  docx[customLocation] = generateCustomXml();
@@ -24461,7 +24461,7 @@ function storeSuperdocVersion(docx) {
24461
24461
  function generateCustomXml() {
24462
24462
  return DEFAULT_CUSTOM_XML;
24463
24463
  }
24464
- function generateSuperdocVersion(pid = 2, version = "0.13.2-rev5") {
24464
+ function generateSuperdocVersion(pid = 2, version = "0.13.2-rev7") {
24465
24465
  return {
24466
24466
  type: "element",
24467
24467
  name: "property",
@@ -1,4 +1,4 @@
1
- import { y as process$1, a4 as commonjsGlobal, B as Buffer, a5 as getDefaultExportFromCjs, a6 as getContentTypesFromXml, a7 as xmljs } from "./converter-CtLZIbF7.js";
1
+ import { y as process$1, a4 as commonjsGlobal, B as Buffer, a5 as getDefaultExportFromCjs, a6 as getContentTypesFromXml, a7 as xmljs } from "./converter-Fwt4-8Pg.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
  }
@@ -9,12 +9,12 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
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, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn;
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, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_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 chainableEditorState, u as generateRandom32BitHex, v as DOMSerializer, w as Mark$1, x as dropPoint, y as process$1, B as Buffer2, z as inputRulesPlugin, C as TrackDeleteMarkName, E as TrackInsertMarkName, G as v4, H as TrackFormatMarkName, I as comments_module_events, J as AddMarkStep, K as RemoveMarkStep, L as twipsToLines, O as pixelsToTwips, Q as CommandService, U as SuperConverter, V as EditorState, W as hasSomeParentWithClass, X as parseSizeUnit, Y as getLineHeightValueString, Z as InputRule, _ as toKebabCase, $ as kebabCase, a0 as getColStyleDeclaration, a1 as SelectionRange, a2 as Transform, a3 as createColGroup } from "./converter-CtLZIbF7.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 chainableEditorState, u as generateRandom32BitHex, v as DOMSerializer, w as Mark$1, x as dropPoint, y as process$1, B as Buffer2, z as inputRulesPlugin, C as TrackDeleteMarkName, E as TrackInsertMarkName, G as v4, H as TrackFormatMarkName, I as comments_module_events, J as AddMarkStep, K as RemoveMarkStep, L as twipsToLines, O as pixelsToTwips, Q as CommandService, U as SuperConverter, V as EditorState, W as hasSomeParentWithClass, X as parseSizeUnit, Y as getLineHeightValueString, Z as InputRule, _ as toKebabCase, $ as kebabCase, a0 as getColStyleDeclaration, a1 as SelectionRange, a2 as Transform, a3 as createColGroup } from "./converter-Fwt4-8Pg.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-JbUHPfi1.js";
17
+ import { D as DocxZipper } from "./docx-zipper-BOV7cSCY.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -12321,14 +12321,16 @@ const broadcastEditorEvents = (editor, sectionEditor) => {
12321
12321
  });
12322
12322
  });
12323
12323
  };
12324
- const toggleHeaderFooterEditMode = (editor, focusedSectionEditor, isEditMode) => {
12324
+ const toggleHeaderFooterEditMode = ({ editor, focusedSectionEditor, isEditMode, documentMode }) => {
12325
12325
  editor.converter.headerEditors.forEach((item) => {
12326
12326
  item.editor.setEditable(isEditMode, false);
12327
12327
  item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
12328
+ item.editor.view.dom.setAttribute("documentmode", documentMode);
12328
12329
  });
12329
12330
  editor.converter.footerEditors.forEach((item) => {
12330
12331
  item.editor.setEditable(isEditMode, false);
12331
12332
  item.editor.view.dom.setAttribute("aria-readonly", !isEditMode);
12333
+ item.editor.view.dom.setAttribute("documentmode", documentMode);
12332
12334
  });
12333
12335
  if (isEditMode) {
12334
12336
  const pm = document.querySelector(".ProseMirror");
@@ -13658,6 +13660,16 @@ const setWordSelection = (view, pos) => {
13658
13660
  const tr = state.tr.setSelection(TextSelection.create(state.doc, word.from, word.to));
13659
13661
  dispatch(tr);
13660
13662
  };
13663
+ const setImageNodeSelection = (view, pos) => {
13664
+ const { doc: doc2 } = view.state;
13665
+ const node = doc2.nodeAt(pos);
13666
+ if (node && node.type.name === "image") {
13667
+ const tr = view.state.tr.setSelection(NodeSelection.create(doc2, pos));
13668
+ view.dispatch(tr);
13669
+ return true;
13670
+ }
13671
+ return false;
13672
+ };
13661
13673
  const _Editor = class _Editor extends EventEmitter {
13662
13674
  /**
13663
13675
  * Create a new Editor instance
@@ -13888,7 +13900,12 @@ const _Editor = class _Editor extends EventEmitter {
13888
13900
  this.commands.toggleTrackChangesShowOriginal();
13889
13901
  this.setEditable(false, false);
13890
13902
  this.setOptions({ documentMode: "viewing" });
13891
- toggleHeaderFooterEditMode(this, null, false);
13903
+ toggleHeaderFooterEditMode({
13904
+ editor: this,
13905
+ focusedSectionEditor: null,
13906
+ isEditMode: false,
13907
+ documentMode: cleanedMode
13908
+ });
13892
13909
  } else if (cleanedMode === "suggesting") {
13893
13910
  __privateMethod(this, _Editor_instances, registerPluginByNameIfNotExists_fn).call(this, "TrackChangesBase");
13894
13911
  this.commands.disableTrackChangesShowOriginal();
@@ -13901,7 +13918,12 @@ const _Editor = class _Editor extends EventEmitter {
13901
13918
  this.commands.disableTrackChanges();
13902
13919
  this.setEditable(true, false);
13903
13920
  this.setOptions({ documentMode: "editing" });
13904
- toggleHeaderFooterEditMode(this, null, false);
13921
+ toggleHeaderFooterEditMode({
13922
+ editor: this,
13923
+ focusedSectionEditor: null,
13924
+ isEditMode: false,
13925
+ documentMode: cleanedMode
13926
+ });
13905
13927
  }
13906
13928
  }
13907
13929
  /**
@@ -14375,7 +14397,7 @@ const _Editor = class _Editor extends EventEmitter {
14375
14397
  * @returns {Object | void} Migration results
14376
14398
  */
14377
14399
  processCollaborationMigrations() {
14378
- console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev5");
14400
+ console.debug("[checkVersionMigrations] Current editor version", "0.13.2-rev7");
14379
14401
  if (!this.options.ydoc) return;
14380
14402
  const metaMap = this.options.ydoc.getMap("meta");
14381
14403
  let docVersion = metaMap.get("version");
@@ -14841,6 +14863,7 @@ createView_fn = function(element) {
14841
14863
  ...this.options.editorProps,
14842
14864
  dispatchTransaction: __privateMethod(this, _Editor_instances, dispatchTransaction_fn).bind(this),
14843
14865
  state: EditorState.create(state),
14866
+ handleClick: __privateMethod(this, _Editor_instances, handleNodeSelection_fn).bind(this),
14844
14867
  handleDoubleClick: async (view, pos, event) => {
14845
14868
  if (this.options.documentMode !== "editing") return;
14846
14869
  const isHeader = hasSomeParentWithClass(event.target, "pagination-section-header");
@@ -14854,7 +14877,12 @@ createView_fn = function(element) {
14854
14877
  event.stopPropagation();
14855
14878
  if (!this.options.editable) {
14856
14879
  this.setEditable(true, false);
14857
- toggleHeaderFooterEditMode(this, null, false);
14880
+ toggleHeaderFooterEditMode({
14881
+ editor: this,
14882
+ focusedSectionEditor: null,
14883
+ isEditMode: false,
14884
+ documentMode: this.options.documentMode
14885
+ });
14858
14886
  const pm = document.querySelector(".ProseMirror");
14859
14887
  pm.classList.remove("header-footer-edit");
14860
14888
  pm.setAttribute("aria-readonly", false);
@@ -14979,6 +15007,14 @@ dispatchTransaction_fn = function(transaction) {
14979
15007
  transaction
14980
15008
  });
14981
15009
  };
15010
+ /**
15011
+ * Handles image node selection for header/footer editor
15012
+ */
15013
+ handleNodeSelection_fn = function(view, pos) {
15014
+ if (this.options.isHeaderOrFooter) {
15015
+ return setImageNodeSelection(view, pos);
15016
+ }
15017
+ };
14982
15018
  /**
14983
15019
  * Perform any post conversion pre prosemirror import processing.
14984
15020
  * Comments are processed here.
@@ -22259,12 +22295,16 @@ const startImageUpload = async ({ editor, view, file }) => {
22259
22295
  }
22260
22296
  let id = {};
22261
22297
  let { tr, schema } = view.state;
22262
- if (!tr.selection.empty) {
22298
+ let { selection } = tr;
22299
+ if (editor.options.isHeaderOrFooter) {
22300
+ selection = editor.options.lastSelection;
22301
+ }
22302
+ if (!selection.empty && !editor.options.isHeaderOrFooter) {
22263
22303
  tr.deleteSelection();
22264
22304
  }
22265
22305
  let imageMeta = {
22266
22306
  type: "add",
22267
- pos: tr.selection.from,
22307
+ pos: selection.from,
22268
22308
  id
22269
22309
  };
22270
22310
  tr.setMeta(ImagePlaceholderPluginKey, imageMeta);
@@ -27564,10 +27604,7 @@ const Pagination = Extension.create({
27564
27604
  const imagePluginTransaction = tr.getMeta(ImagePlaceholderPluginKey);
27565
27605
  if (imagePluginTransaction) {
27566
27606
  if (imagePluginTransaction.type === "remove") {
27567
- const imagePos = imagePluginTransaction.pos;
27568
- const domImage = editor.view.domAtPos(imagePos).node.querySelector("img");
27569
- if (domImage.complete) onImageLoad(editor);
27570
- else domImage.onload = () => onImageLoad(editor);
27607
+ onImageLoad(editor);
27571
27608
  }
27572
27609
  return { ...oldState };
27573
27610
  }
@@ -27953,7 +27990,12 @@ const getHeaderFooterEditorKey = ({
27953
27990
  const onHeaderFooterDblClick = (editor, currentFocusedSectionEditor) => {
27954
27991
  if (editor.options.documentMode !== "editing") return;
27955
27992
  editor.setEditable(false, false);
27956
- toggleHeaderFooterEditMode(editor, currentFocusedSectionEditor, true);
27993
+ toggleHeaderFooterEditMode({
27994
+ editor,
27995
+ focusedSectionEditor: currentFocusedSectionEditor,
27996
+ isEditMode: true,
27997
+ documentMode: editor.options.documentMode
27998
+ });
27957
27999
  };
27958
28000
  function createPageBreak({ editor, header, footer, footerBottom = null, isFirstHeader, isLastFooter, isInTable: isInTable2 = false }) {
27959
28001
  const { pageSize, pageMargins } = editor.converter.pageStyles;
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { y as process$1 } from "./converter-CtLZIbF7.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CNrlIkRQ.js";
2
+ import { y as process$1 } from "./converter-Fwt4-8Pg.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CR0_l9jt.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { U } from "./chunks/converter-CtLZIbF7.js";
1
+ import { U } from "./chunks/converter-Fwt4-8Pg.js";
2
2
  export {
3
3
  U as SuperConverter
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Editor.d.ts","sourceRoot":"","sources":["../../src/core/Editor.js"],"names":[],"mappings":"AA6BA;;;;GAIG;AAEH;;;;;GAKG;AACH;;;;;EAKE;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AAEH;;;;GAIG;AACH;IAmrBE;;;;;;;;;;;;OAYG;IACH,+BARW,IAAI,GAAC,IAAI,GAAC,MAAM,WAChB,OAAO,GACL,OAAO,OAAO,CAc1B;IAED;;;;;OAKG;IACH,qCAFa,MAAM,CAKlB;IAED;;;;;;OAMG;IACH,gDAHW,MAAM,OAMhB;IAwsBD;;;;;OAKG;IACH,2CAFa,OAAO,CAOnB;IAn0CD;;;;OAIG;IACH,qBAHW,aAAa,EAwBvB;IAlID;;;OAGG;IACH,sBAAiB;IAEjB;;;OAGG;IACH,sBAAsB;IAEtB;;;OAGG;IACH,YAAO;IAEP;;;OAGG;IACH,UAAK;IAEL;;;OAGG;IACH,WAFU,OAAO,CAEC;IAQlB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAkEE;IA0BA,0CAA8C;IAoHhD,qBAOC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAsBP,OAAO;;;;mBACP,OAAO;;;;WACP,MAAM;;6BApGS,mBAAmB"}
@@ -0,0 +1,2 @@
1
+ export function setImageNodeSelection(view: any, pos: any): boolean;
2
+ //# sourceMappingURL=setImageNodeSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setImageNodeSelection.d.ts","sourceRoot":"","sources":["../../../src/core/helpers/setImageNodeSelection.js"],"names":[],"mappings":"AAEO,oEASN"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-CtLZIbF7.js";
2
- import { D } from "./chunks/docx-zipper-JbUHPfi1.js";
1
+ import "./chunks/converter-Fwt4-8Pg.js";
2
+ import { D } from "./chunks/docx-zipper-BOV7cSCY.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-CNrlIkRQ.js";
2
- import "./chunks/converter-CtLZIbF7.js";
3
- import "./chunks/docx-zipper-JbUHPfi1.js";
1
+ import { E } from "./chunks/editor-CR0_l9jt.js";
2
+ import "./chunks/converter-Fwt4-8Pg.js";
3
+ import "./chunks/docx-zipper-BOV7cSCY.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"startImageUpload.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image/imageHelpers/startImageUpload.js"],"names":[],"mappings":"AAIO;;;;kBAuFN"}
1
+ {"version":3,"file":"startImageUpload.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image/imageHelpers/startImageUpload.js"],"names":[],"mappings":"AAIO;;;;kBA2FN"}
@@ -11,7 +11,12 @@ export function createHeaderFooterEditor({ editor, data, editorContainer, append
11
11
  currentPageNumber: any;
12
12
  }): any;
13
13
  export function broadcastEditorEvents(editor: any, sectionEditor: any): void;
14
- export function toggleHeaderFooterEditMode(editor: any, focusedSectionEditor: any, isEditMode: any): void;
14
+ export function toggleHeaderFooterEditMode({ editor, focusedSectionEditor, isEditMode, documentMode }: {
15
+ editor: any;
16
+ focusedSectionEditor: any;
17
+ isEditMode: any;
18
+ documentMode: any;
19
+ }): void;
15
20
  export function onHeaderFooterDataUpdate({ editor, transaction }: {
16
21
  editor: any;
17
22
  transaction: any;