@harbour-enterprises/superdoc 0.12.34-next.2 → 0.12.35-next.1

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-C9AkEjnH.cjs → super-editor.es-CrLkFZx3.cjs} +153 -57
  2. package/dist/chunks/{super-editor.es-BL9qks26.es.js → super-editor.es-DKDM0ods.es.js} +153 -57
  3. package/dist/style.css +42 -35
  4. package/dist/super-editor/ai-writer.es.js +2 -2
  5. package/dist/super-editor/chunks/{converter-DASNJ_pe.js → converter-fyrJGAG_.js} +22 -19
  6. package/dist/super-editor/chunks/{docx-zipper-Ba5P9kSx.js → docx-zipper-2BesmPVy.js} +1 -1
  7. package/dist/super-editor/chunks/{editor-Cizth369.js → editor-JPMSAwgN.js} +5 -5
  8. package/dist/super-editor/chunks/{toolbar-CjP-3g7l.js → toolbar-BdZhVjSi.js} +119 -35
  9. package/dist/super-editor/components/toolbar/super-toolbar.d.ts +1 -1
  10. package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/core/super-converter/SuperConverter.d.ts +3 -0
  13. package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
  14. package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
  15. package/dist/super-editor/docx-zipper.es.js +2 -2
  16. package/dist/super-editor/editor.es.js +3 -3
  17. package/dist/super-editor/file-zipper.es.js +1 -1
  18. package/dist/super-editor/style.css +42 -35
  19. package/dist/super-editor/super-editor.es.js +18 -9
  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 +154 -58
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -27828,24 +27828,26 @@
27828
27828
  if (!name && node2.type === "text") {
27829
27829
  return node2.text;
27830
27830
  }
27831
- if (name === "w:instrText") {
27832
- tags.push(elements[0].text);
27833
- } else if (name === "w:t" || name === "w:delText" || name === "wp:posOffset") {
27834
- const text = __privateMethod$2(this, _DocxExporter_instances, replaceSpecialCharacters_fn).call(this, elements[0].text);
27835
- tags.push(text);
27836
- } else {
27837
- if (elements) {
27838
- for (let child of elements) {
27839
- const newElements = __privateMethod$2(this, _DocxExporter_instances, generateXml_fn).call(this, child);
27840
- if (!newElements) continue;
27841
- if (typeof newElements === "string") {
27842
- tags.push(newElements);
27843
- continue;
27831
+ if (elements) {
27832
+ if (name === "w:instrText") {
27833
+ tags.push(elements[0].text);
27834
+ } else if (name === "w:t" || name === "w:delText" || name === "wp:posOffset") {
27835
+ const text = __privateMethod$2(this, _DocxExporter_instances, replaceSpecialCharacters_fn).call(this, elements[0].text);
27836
+ tags.push(text);
27837
+ } else {
27838
+ if (elements) {
27839
+ for (let child of elements) {
27840
+ const newElements = __privateMethod$2(this, _DocxExporter_instances, generateXml_fn).call(this, child);
27841
+ if (!newElements) continue;
27842
+ if (typeof newElements === "string") {
27843
+ tags.push(newElements);
27844
+ continue;
27845
+ }
27846
+ const removeUndefined = newElements.filter((el) => {
27847
+ return el !== "<undefined>" && el !== "</undefined>";
27848
+ });
27849
+ tags.push(...removeUndefined);
27844
27850
  }
27845
- const removeUndefined = newElements.filter((el) => {
27846
- return el !== "<undefined>" && el !== "</undefined>";
27847
- });
27848
- tags.push(...removeUndefined);
27849
27851
  }
27850
27852
  }
27851
27853
  }
@@ -30667,7 +30669,7 @@
30667
30669
  return;
30668
30670
  }
30669
30671
  }
30670
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.34-next.2") {
30672
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.12.35-next.1") {
30671
30673
  const customLocation = "docProps/custom.xml";
30672
30674
  if (!docx[customLocation]) {
30673
30675
  docx[customLocation] = generateCustomXml();
@@ -30794,6 +30796,7 @@
30794
30796
  getThemeInfo(themeName) {
30795
30797
  themeName = themeName.toLowerCase();
30796
30798
  const theme1 = this.convertedXml["word/theme/theme1.xml"];
30799
+ if (!theme1) return {};
30797
30800
  const themeData = theme1.elements.find((el) => el.name === "a:theme");
30798
30801
  const themeElements = themeData.elements.find((el) => el.name === "a:themeElements");
30799
30802
  const fontScheme = themeElements.elements.find((el) => el.name === "a:fontScheme");
@@ -31133,7 +31136,7 @@
31133
31136
  function generateCustomXml() {
31134
31137
  return DEFAULT_CUSTOM_XML;
31135
31138
  }
31136
- function generateSuperdocVersion(pid = 2, version2 = "0.12.34-next.2") {
31139
+ function generateSuperdocVersion(pid = 2, version2 = "0.12.35-next.1") {
31137
31140
  return {
31138
31141
  type: "element",
31139
31142
  name: "property",
@@ -48410,7 +48413,7 @@
48410
48413
  * @returns {Object | void} Migration results
48411
48414
  */
48412
48415
  processCollaborationMigrations() {
48413
- console.debug("[checkVersionMigrations] Current editor version", "0.12.34-next.2");
48416
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.35-next.1");
48414
48417
  if (!this.options.ydoc) return;
48415
48418
  const metaMap = this.options.ydoc.getMap("meta");
48416
48419
  let docVersion = metaMap.get("version");
@@ -60150,7 +60153,7 @@
60150
60153
  if (currentPageNumber === 1) {
60151
60154
  const headerId2 = getHeaderFooterId(currentPageNumber, "headerIds", editor, currentNode);
60152
60155
  decorations.pop();
60153
- const newFirstHeader = createHeader(pageMargins, pageSize, sectionData, headerId2);
60156
+ const newFirstHeader = createHeader(pageMargins, pageSize, sectionData, headerId2, editor);
60154
60157
  const pageBreak2 = createPageBreak({ editor, header: newFirstHeader, isFirstHeader: true });
60155
60158
  decorations.push(Decoration.widget(0, pageBreak2, { key: "stable-key" }));
60156
60159
  }
@@ -60230,7 +60233,7 @@
60230
60233
  const headerHeight = Math.max(headerDef?.height || 0, minHeaderHeight) + headerOffset;
60231
60234
  const availableHeight = headerHeight - headerMargin;
60232
60235
  const editorContainer = document.createElement("div");
60233
- if (!headerId && !editor.converter.headerIds["default"]) {
60236
+ if (!headerId && !editor?.converter?.headerIds?.["default"]) {
60234
60237
  headerId = "rId" + generateDocxRandomId();
60235
60238
  editor.converter.headerIds["default"] = headerId;
60236
60239
  }
@@ -61090,16 +61093,20 @@
61090
61093
  }
61091
61094
  };
61092
61095
  const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$5$2, [["__scopeId", "data-v-6d7523ab"]]);
61093
- const _hoisted_1$3$2 = ["role"];
61094
- const _hoisted_2$2$2 = ["data-item", "aria-label"];
61096
+ const _hoisted_1$3$2 = ["role", "aria-label", "onKeydown"];
61097
+ const _hoisted_2$2$2 = ["data-item"];
61095
61098
  const _hoisted_3$2$2 = {
61096
61099
  key: 1,
61097
61100
  class: "button-label"
61098
61101
  };
61099
- const _hoisted_4$7 = { key: 2 };
61102
+ const _hoisted_4$1$2 = { key: 2 };
61100
61103
  const _hoisted_5$5 = ["placeholder", "onKeydown", "id"];
61101
61104
  const _hoisted_6$3 = ["placeholder", "onKeydown", "id"];
61102
61105
  const _hoisted_7$3 = ["innerHTML"];
61106
+ const _hoisted_8$3 = {
61107
+ "aria-live": "polite",
61108
+ class: "visually-hidden"
61109
+ };
61103
61110
  const _sfc_main$4$2 = {
61104
61111
  __name: "ToolbarButton",
61105
61112
  props: {
@@ -61182,14 +61189,15 @@
61182
61189
  return openBlock(), createElementBlock("div", {
61183
61190
  class: normalizeClass(["toolbar-item", unref(attributes).className]),
61184
61191
  style: normalizeStyle(getStyle.value),
61185
- role: __props.isOverflowItem ? "menuitem" : ""
61192
+ role: __props.isOverflowItem ? "menuitem" : "button",
61193
+ "aria-label": unref(attributes).ariaLabel,
61194
+ onClick: handleClick2,
61195
+ onKeydown: withKeys(withModifiers(handleClick2, ["stop"]), ["enter"]),
61196
+ tabindex: "0"
61186
61197
  }, [
61187
61198
  createBaseVNode("div", {
61188
- onClick: handleClick2,
61189
61199
  class: normalizeClass(["toolbar-button", { active: unref(active), disabled: unref(disabled), narrow: __props.isNarrow, wide: __props.isWide, "has-inline-text-input": unref(hasInlineTextInput), "high-contrast": unref(isHighContrastMode2) }]),
61190
- "data-item": `btn-${unref(name) || ""}`,
61191
- "aria-label": unref(attributes).ariaLabel,
61192
- role: "button"
61200
+ "data-item": `btn-${unref(name) || ""}`
61193
61201
  }, [
61194
61202
  unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon, {
61195
61203
  key: 0,
@@ -61199,7 +61207,7 @@
61199
61207
  name: unref(name)
61200
61208
  }, null, 8, ["color", "icon", "name"])) : createCommentVNode("", true),
61201
61209
  unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div", _hoisted_3$2$2, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
61202
- unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$7, [
61210
+ unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$1$2, [
61203
61211
  unref(name) === "fontSize" ? withDirectives((openBlock(), createElementBlock("input", {
61204
61212
  key: 0,
61205
61213
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
@@ -61209,7 +61217,7 @@
61209
61217
  type: "text",
61210
61218
  class: normalizeClass(["button-text-input", { "high-contrast": unref(isHighContrastMode2) }]),
61211
61219
  id: "inlineTextInput-" + unref(name),
61212
- autoccomplete: "off",
61220
+ autocomplete: "off",
61213
61221
  ref_key: "inlineInput",
61214
61222
  ref: inlineInput
61215
61223
  }, null, 42, _hoisted_5$5)), [
@@ -61222,7 +61230,7 @@
61222
61230
  type: "text",
61223
61231
  class: "button-text-input",
61224
61232
  id: "inlineTextInput-" + unref(name),
61225
- autoccomplete: "off",
61233
+ autocomplete: "off",
61226
61234
  ref_key: "inlineInput",
61227
61235
  ref: inlineInput
61228
61236
  }, null, 40, _hoisted_6$3)), [
@@ -61234,13 +61242,14 @@
61234
61242
  class: "dropdown-caret",
61235
61243
  innerHTML: caretIcon.value,
61236
61244
  style: normalizeStyle({ opacity: unref(disabled) ? 0.6 : 1 })
61237
- }, null, 12, _hoisted_7$3)) : createCommentVNode("", true)
61245
+ }, null, 12, _hoisted_7$3)) : createCommentVNode("", true),
61246
+ createBaseVNode("div", _hoisted_8$3, toDisplayString(`${unref(attributes).ariaLabel} ${unref(active) ? "selected" : "unset"}`), 1)
61238
61247
  ], 10, _hoisted_2$2$2)
61239
- ], 14, _hoisted_1$3$2);
61248
+ ], 46, _hoisted_1$3$2);
61240
61249
  };
61241
61250
  }
61242
61251
  };
61243
- const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-6eb57404"]]);
61252
+ const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-2518a3d1"]]);
61244
61253
  const _hoisted_1$2$2 = {
61245
61254
  class: "toolbar-separator",
61246
61255
  role: "separator",
@@ -70658,9 +70667,10 @@ ${style2}
70658
70667
  return child;
70659
70668
  }
70660
70669
  });
70661
- const _hoisted_1$j = { key: 0 };
70670
+ const _hoisted_1$j = ["onKeydown", "tabindex"];
70662
70671
  const _hoisted_2$d = { key: 0 };
70663
70672
  const _hoisted_3$a = { key: 0 };
70673
+ const _hoisted_4$7 = { key: 0 };
70664
70674
  const _sfc_main$1$1 = {
70665
70675
  __name: "ButtonGroup",
70666
70676
  props: {
@@ -70710,11 +70720,11 @@ ${style2}
70710
70720
  const isDropdown = (item) => item.type === "dropdown";
70711
70721
  const isSeparator = (item) => item.type === "separator";
70712
70722
  const isOverflow = (item) => item.type === "overflow";
70713
- const handleToolbarButtonClick = (item, argument = null) => {
70723
+ const handleToolbarButtonClick = (item, argument = null, switchFocusToEditor = true) => {
70714
70724
  currentItem.value = item;
70715
70725
  currentItem.value.expand = true;
70716
70726
  if (item.disabled.value) return;
70717
- emit2("command", { item, argument });
70727
+ emit2("command", { item, argument, switchFocusToEditor });
70718
70728
  };
70719
70729
  const handleToolbarButtonTextSubmit = (item, argument) => {
70720
70730
  if (item.disabled.value) return;
@@ -70730,7 +70740,7 @@ ${style2}
70730
70740
  const handleSelect = (item, option) => {
70731
70741
  closeDropdowns();
70732
70742
  const value = item.dropdownValueKey.value ? option[item.dropdownValueKey.value] : option.label;
70733
- emit2("command", { item, argument: value, option });
70743
+ emit2("command", { item, argument: value, option, switchFocusToEditor: true });
70734
70744
  selectedOption.value = option.key;
70735
70745
  };
70736
70746
  const dropdownOptions = (item) => {
@@ -70754,19 +70764,92 @@ ${style2}
70754
70764
  const handleClickOutside = (e) => {
70755
70765
  closeDropdowns();
70756
70766
  };
70767
+ const moveToNextButton = (e) => {
70768
+ const currentButton = e.target;
70769
+ const nextButton = e.target.closest(".toolbar-item-ctn").nextElementSibling;
70770
+ if (nextButton) {
70771
+ currentButton.setAttribute("tabindex", "-1");
70772
+ nextButton.setAttribute("tabindex", "0");
70773
+ nextButton.focus();
70774
+ }
70775
+ };
70776
+ const moveToPreviousButton = (e) => {
70777
+ const currentButton = e.target;
70778
+ const previousButton = e.target.closest(".toolbar-item-ctn").previousElementSibling;
70779
+ if (previousButton) {
70780
+ currentButton.setAttribute("tabindex", "-1");
70781
+ previousButton.setAttribute("tabindex", "0");
70782
+ previousButton.focus();
70783
+ }
70784
+ };
70785
+ const moveToNextButtonGroup = (e) => {
70786
+ const nextButtonGroup = e.target.closest(".button-group").nextElementSibling;
70787
+ if (nextButtonGroup) {
70788
+ nextButtonGroup.setAttribute("tabindex", "0");
70789
+ nextButtonGroup.focus();
70790
+ } else {
70791
+ const editor = document.querySelector(".ProseMirror");
70792
+ if (editor) {
70793
+ editor.focus();
70794
+ }
70795
+ }
70796
+ };
70797
+ const moveToPreviousButtonGroup = (e) => {
70798
+ const previousButtonGroup = e.target.closest(".button-group").previousElementSibling;
70799
+ if (previousButtonGroup) {
70800
+ previousButtonGroup.setAttribute("tabindex", "0");
70801
+ previousButtonGroup.focus();
70802
+ }
70803
+ };
70804
+ const handleKeyDown2 = (e, item) => {
70805
+ e.preventDefault();
70806
+ switch (e.key) {
70807
+ case "Enter":
70808
+ handleToolbarButtonClick(item, null, false);
70809
+ break;
70810
+ case "Escape":
70811
+ closeDropdowns();
70812
+ break;
70813
+ case "ArrowRight":
70814
+ closeDropdowns();
70815
+ moveToNextButton(e);
70816
+ break;
70817
+ case "ArrowLeft":
70818
+ closeDropdowns();
70819
+ moveToPreviousButton(e);
70820
+ break;
70821
+ case "Tab":
70822
+ if (e.shiftKey) {
70823
+ moveToPreviousButtonGroup(e);
70824
+ } else {
70825
+ moveToNextButtonGroup(e);
70826
+ }
70827
+ break;
70828
+ }
70829
+ };
70830
+ const handleFocus = (e) => {
70831
+ const firstButton = e.target.closest(".button-group").querySelector(".toolbar-item-ctn:not(.disabled)");
70832
+ if (firstButton) {
70833
+ firstButton.focus();
70834
+ }
70835
+ };
70757
70836
  return (_ctx, _cache) => {
70758
70837
  return openBlock(), createElementBlock("div", {
70759
70838
  style: normalizeStyle(getPositionStyle.value),
70760
70839
  class: "button-group",
70761
- role: "group"
70840
+ role: "group",
70841
+ onFocus: handleFocus
70762
70842
  }, [
70763
- (openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.toolbarItems, (item) => {
70843
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.toolbarItems, (item, index2) => {
70764
70844
  return openBlock(), createElementBlock("div", {
70765
70845
  key: item.id.value,
70766
70846
  class: normalizeClass([{
70767
70847
  narrow: item.isNarrow.value,
70768
- wide: item.isWide.value
70769
- }, "toolbar-item-ctn"])
70848
+ wide: item.isWide.value,
70849
+ disabled: item.disabled.value
70850
+ }, "toolbar-item-ctn"]),
70851
+ onKeydown: (e) => handleKeyDown2(e, item),
70852
+ tabindex: index2 === 0 ? 0 : -1
70770
70853
  }, [
70771
70854
  isSeparator(item) ? (openBlock(), createBlock(ToolbarSeparator, {
70772
70855
  key: 0,
@@ -70796,14 +70879,15 @@ ${style2}
70796
70879
  trigger: withCtx(() => [
70797
70880
  createVNode(ToolbarButton, {
70798
70881
  "toolbar-item": item,
70882
+ disabled: item.disabled.value,
70799
70883
  onTextSubmit: ($event) => handleToolbarButtonTextSubmit(item, $event),
70800
70884
  onButtonClick: ($event) => handleToolbarButtonClick(item)
70801
- }, null, 8, ["toolbar-item", "onTextSubmit", "onButtonClick"])
70885
+ }, null, 8, ["toolbar-item", "disabled", "onTextSubmit", "onButtonClick"])
70802
70886
  ]),
70803
70887
  default: withCtx(() => [
70804
70888
  createBaseVNode("div", null, [
70805
70889
  createTextVNode(toDisplayString(item.tooltip) + " ", 1),
70806
- item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_1$j, "(disabled)")) : createCommentVNode("", true)
70890
+ item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_2$d, "(disabled)")) : createCommentVNode("", true)
70807
70891
  ])
70808
70892
  ]),
70809
70893
  _: 2
@@ -70824,9 +70908,9 @@ ${style2}
70824
70908
  }, null, 8, ["toolbar-item", "is-overflow-item", "onTextSubmit", "onButtonClick"])
70825
70909
  ]),
70826
70910
  default: withCtx(() => [
70827
- item.tooltip ? (openBlock(), createElementBlock("div", _hoisted_2$d, [
70911
+ item.tooltip ? (openBlock(), createElementBlock("div", _hoisted_3$a, [
70828
70912
  createTextVNode(toDisplayString(item.tooltip) + " ", 1),
70829
- item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_3$a, "(disabled)")) : createCommentVNode("", true)
70913
+ item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_4$7, "(disabled)")) : createCommentVNode("", true)
70830
70914
  ])) : createCommentVNode("", true)
70831
70915
  ]),
70832
70916
  _: 2
@@ -70836,13 +70920,13 @@ ${style2}
70836
70920
  "toolbar-item": item,
70837
70921
  "overflow-items": __props.overflowItems
70838
70922
  }, null, 8, ["toolbar-item", "overflow-items"])) : createCommentVNode("", true)
70839
- ], 2);
70923
+ ], 42, _hoisted_1$j);
70840
70924
  }), 128))
70841
- ], 4);
70925
+ ], 36);
70842
70926
  };
70843
70927
  }
70844
70928
  };
70845
- const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-b09e5a20"]]);
70929
+ const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$1, [["__scopeId", "data-v-53a792b0"]]);
70846
70930
  const _sfc_main$k = {
70847
70931
  __name: "Toolbar",
70848
70932
  emits: ["command", "toggle", "select"],
@@ -70881,8 +70965,8 @@ ${style2}
70881
70965
  toolbarKey.value += 1;
70882
70966
  };
70883
70967
  const onResizeThrottled = throttle(onWindowResized, 300);
70884
- const handleCommand = ({ item, argument, option }) => {
70885
- proxy.$toolbar.emitCommand({ item, argument, option });
70968
+ const handleCommand = ({ item, argument, option, switchFocusToEditor = true }) => {
70969
+ proxy.$toolbar.emitCommand({ item, argument, option, switchFocusToEditor });
70886
70970
  };
70887
70971
  return (_ctx, _cache) => {
70888
70972
  return openBlock(), createElementBlock("div", {
@@ -70893,12 +70977,14 @@ ${style2}
70893
70977
  }, [
70894
70978
  unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
70895
70979
  key: 0,
70980
+ tabindex: "0",
70896
70981
  "toolbar-items": getFilteredItems("left"),
70897
70982
  position: "left",
70898
70983
  onCommand: handleCommand,
70899
70984
  class: "superdoc-toolbar-group-side"
70900
70985
  }, null, 8, ["toolbar-items"])) : createCommentVNode("", true),
70901
70986
  createVNode(ButtonGroup, {
70987
+ tabindex: "0",
70902
70988
  "toolbar-items": getFilteredItems("center"),
70903
70989
  "overflow-items": unref(proxy).$toolbar.overflowItems,
70904
70990
  position: "center",
@@ -70906,6 +70992,7 @@ ${style2}
70906
70992
  }, null, 8, ["toolbar-items", "overflow-items"]),
70907
70993
  unref(showRightSide) ? (openBlock(), createBlock(ButtonGroup, {
70908
70994
  key: 1,
70995
+ tabindex: "0",
70909
70996
  "toolbar-items": getFilteredItems("right"),
70910
70997
  position: "right",
70911
70998
  onCommand: handleCommand,
@@ -70915,7 +71002,7 @@ ${style2}
70915
71002
  };
70916
71003
  }
70917
71004
  };
70918
- const Toolbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__scopeId", "data-v-2a400574"]]);
71005
+ const Toolbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__scopeId", "data-v-b182f42b"]]);
70919
71006
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
70920
71007
  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: ";
70921
71008
  async function baseInsightsFetch(payload, options2 = {}) {
@@ -74172,8 +74259,8 @@ ${style2}
74172
74259
  * @param {*} [params.argument] - The argument passed to the command
74173
74260
  * @returns {*} The result of the executed command, undefined if no result is returned
74174
74261
  */
74175
- emitCommand({ item, argument, option }) {
74176
- if (this.activeEditor && !this.activeEditor.options.isHeaderOrFooter) {
74262
+ emitCommand({ item, argument, option, switchFocusToEditor = true }) {
74263
+ if (this.activeEditor && !this.activeEditor.options.isHeaderOrFooter && switchFocusToEditor) {
74177
74264
  this.activeEditor.focus();
74178
74265
  }
74179
74266
  const { command: command2 } = item;
@@ -74670,6 +74757,15 @@ ${style2}
74670
74757
  });
74671
74758
  };
74672
74759
  const handleSuperEditorKeydown = (event) => {
74760
+ if ((event.metaKey || event.ctrlKey) && event.altKey && event.shiftKey) {
74761
+ if (event.code === "KeyM") {
74762
+ const toolbar = document.querySelector(".superdoc-toolbar");
74763
+ if (toolbar) {
74764
+ toolbar.setAttribute("tabindex", "0");
74765
+ toolbar.focus();
74766
+ }
74767
+ }
74768
+ }
74673
74769
  emit2("editor-keydown", { editor: editor.value });
74674
74770
  };
74675
74771
  const handleSuperEditorClick = (event) => {
@@ -74775,7 +74871,7 @@ ${style2}
74775
74871
  };
74776
74872
  }
74777
74873
  };
74778
- const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$2$1, [["__scopeId", "data-v-f27b7c30"]]);
74874
+ const SuperEditor = /* @__PURE__ */ _export_sfc$1(_sfc_main$2$1, [["__scopeId", "data-v-199a4ecf"]]);
74779
74875
  const _hoisted_1$h = ["innerHTML"];
74780
74876
  const _sfc_main$i = {
74781
74877
  __name: "SuperInput",
@@ -89869,7 +89965,7 @@ ${style2}
89869
89965
  this.config.colors = shuffleArray(this.config.colors);
89870
89966
  this.userColorMap = /* @__PURE__ */ new Map();
89871
89967
  this.colorIndex = 0;
89872
- this.version = "0.12.34-next.2";
89968
+ this.version = "0.12.35-next.1";
89873
89969
  console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
89874
89970
  this.superdocId = config.superdocId || v4();
89875
89971
  this.colors = this.config.colors;