@harbour-enterprises/superdoc 0.12.34-next.3 → 0.12.35

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-BbaXC2pT.cjs → super-editor.es-B4SPMXXo.cjs} +151 -55
  2. package/dist/chunks/{super-editor.es-B9igwxv-.es.js → super-editor.es-D8BL6ojY.es.js} +151 -55
  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-DzsjYmnd.js → converter-DQPyKWs_.js} +22 -19
  6. package/dist/super-editor/chunks/{docx-zipper-DQONSIAh.js → docx-zipper-cJ42om_0.js} +1 -1
  7. package/dist/super-editor/chunks/{editor-CO-n6iZ8.js → editor-B5TyAe8v.js} +3 -3
  8. package/dist/super-editor/chunks/{toolbar-CNeu8BVd.js → toolbar-CDeO5r_T.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 +152 -56
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -20470,24 +20470,26 @@ generateXml_fn = function(node2, debug = false) {
20470
20470
  if (!name && node2.type === "text") {
20471
20471
  return node2.text;
20472
20472
  }
20473
- if (name === "w:instrText") {
20474
- tags.push(elements[0].text);
20475
- } else if (name === "w:t" || name === "w:delText" || name === "wp:posOffset") {
20476
- const text = __privateMethod(this, _DocxExporter_instances, replaceSpecialCharacters_fn).call(this, elements[0].text);
20477
- tags.push(text);
20478
- } else {
20479
- if (elements) {
20480
- for (let child of elements) {
20481
- const newElements = __privateMethod(this, _DocxExporter_instances, generateXml_fn).call(this, child);
20482
- if (!newElements) continue;
20483
- if (typeof newElements === "string") {
20484
- tags.push(newElements);
20485
- continue;
20473
+ if (elements) {
20474
+ if (name === "w:instrText") {
20475
+ tags.push(elements[0].text);
20476
+ } else if (name === "w:t" || name === "w:delText" || name === "wp:posOffset") {
20477
+ const text = __privateMethod(this, _DocxExporter_instances, replaceSpecialCharacters_fn).call(this, elements[0].text);
20478
+ tags.push(text);
20479
+ } else {
20480
+ if (elements) {
20481
+ for (let child of elements) {
20482
+ const newElements = __privateMethod(this, _DocxExporter_instances, generateXml_fn).call(this, child);
20483
+ if (!newElements) continue;
20484
+ if (typeof newElements === "string") {
20485
+ tags.push(newElements);
20486
+ continue;
20487
+ }
20488
+ const removeUndefined = newElements.filter((el) => {
20489
+ return el !== "<undefined>" && el !== "</undefined>";
20490
+ });
20491
+ tags.push(...removeUndefined);
20486
20492
  }
20487
- const removeUndefined = newElements.filter((el) => {
20488
- return el !== "<undefined>" && el !== "</undefined>";
20489
- });
20490
- tags.push(...removeUndefined);
20491
20493
  }
20492
20494
  }
20493
20495
  }
@@ -23309,7 +23311,7 @@ const _SuperConverter = class _SuperConverter {
23309
23311
  return;
23310
23312
  }
23311
23313
  }
23312
- static updateDocumentVersion(docx = this.convertedXml, version = "0.12.34-next.3") {
23314
+ static updateDocumentVersion(docx = this.convertedXml, version = "0.12.35") {
23313
23315
  const customLocation = "docProps/custom.xml";
23314
23316
  if (!docx[customLocation]) {
23315
23317
  docx[customLocation] = generateCustomXml();
@@ -23436,6 +23438,7 @@ const _SuperConverter = class _SuperConverter {
23436
23438
  getThemeInfo(themeName) {
23437
23439
  themeName = themeName.toLowerCase();
23438
23440
  const theme1 = this.convertedXml["word/theme/theme1.xml"];
23441
+ if (!theme1) return {};
23439
23442
  const themeData = theme1.elements.find((el) => el.name === "a:theme");
23440
23443
  const themeElements = themeData.elements.find((el) => el.name === "a:themeElements");
23441
23444
  const fontScheme = themeElements.elements.find((el) => el.name === "a:fontScheme");
@@ -23778,7 +23781,7 @@ function storeSuperdocVersion(docx) {
23778
23781
  function generateCustomXml() {
23779
23782
  return DEFAULT_CUSTOM_XML;
23780
23783
  }
23781
- function generateSuperdocVersion(pid = 2, version = "0.12.34-next.3") {
23784
+ function generateSuperdocVersion(pid = 2, version = "0.12.35") {
23782
23785
  return {
23783
23786
  type: "element",
23784
23787
  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-DzsjYmnd.js";
1
+ import { x as process$1, a1 as commonjsGlobal, B as Buffer, a2 as getDefaultExportFromCjs, a3 as getContentTypesFromXml, a4 as xmljs } from "./converter-DQPyKWs_.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-DzsjYmnd.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-DQPyKWs_.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-DQONSIAh.js";
17
+ import { D as DocxZipper } from "./docx-zipper-cJ42om_0.js";
18
18
  function getMarksFromSelection(state) {
19
19
  const { from: from2, to, empty: empty2 } = state.selection;
20
20
  const marks = [];
@@ -14795,7 +14795,7 @@ const _Editor = class _Editor extends EventEmitter {
14795
14795
  * @returns {Object | void} Migration results
14796
14796
  */
14797
14797
  processCollaborationMigrations() {
14798
- console.debug("[checkVersionMigrations] Current editor version", "0.12.34-next.3");
14798
+ console.debug("[checkVersionMigrations] Current editor version", "0.12.35");
14799
14799
  if (!this.options.ydoc) return;
14800
14800
  const metaMap = this.options.ydoc.getMap("meta");
14801
14801
  let docVersion = metaMap.get("version");
@@ -1,6 +1,6 @@
1
- import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, unref, createBlock, toDisplayString, withDirectives, withKeys, withModifiers, 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 { x as process$1 } from "./converter-DzsjYmnd.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CO-n6iZ8.js";
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 { x as process$1 } from "./converter-DQPyKWs_.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-B5TyAe8v.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -191,16 +191,20 @@ const _sfc_main$5 = {
191
191
  }
192
192
  };
193
193
  const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-6d7523ab"]]);
194
- const _hoisted_1$3 = ["role"];
195
- const _hoisted_2$2 = ["data-item", "aria-label"];
194
+ const _hoisted_1$3 = ["role", "aria-label", "onKeydown"];
195
+ const _hoisted_2$2 = ["data-item"];
196
196
  const _hoisted_3$2 = {
197
197
  key: 1,
198
198
  class: "button-label"
199
199
  };
200
- const _hoisted_4 = { key: 2 };
200
+ const _hoisted_4$1 = { key: 2 };
201
201
  const _hoisted_5 = ["placeholder", "onKeydown", "id"];
202
202
  const _hoisted_6 = ["placeholder", "onKeydown", "id"];
203
203
  const _hoisted_7 = ["innerHTML"];
204
+ const _hoisted_8 = {
205
+ "aria-live": "polite",
206
+ class: "visually-hidden"
207
+ };
204
208
  const _sfc_main$4 = {
205
209
  __name: "ToolbarButton",
206
210
  props: {
@@ -283,14 +287,15 @@ const _sfc_main$4 = {
283
287
  return openBlock(), createElementBlock("div", {
284
288
  class: normalizeClass(["toolbar-item", unref(attributes).className]),
285
289
  style: normalizeStyle(getStyle.value),
286
- role: __props.isOverflowItem ? "menuitem" : ""
290
+ role: __props.isOverflowItem ? "menuitem" : "button",
291
+ "aria-label": unref(attributes).ariaLabel,
292
+ onClick: handleClick,
293
+ onKeydown: withKeys(withModifiers(handleClick, ["stop"]), ["enter"]),
294
+ tabindex: "0"
287
295
  }, [
288
296
  createElementVNode("div", {
289
- onClick: handleClick,
290
297
  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(isHighContrastMode) }]),
291
- "data-item": `btn-${unref(name) || ""}`,
292
- "aria-label": unref(attributes).ariaLabel,
293
- role: "button"
298
+ "data-item": `btn-${unref(name) || ""}`
294
299
  }, [
295
300
  unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon, {
296
301
  key: 0,
@@ -300,7 +305,7 @@ const _sfc_main$4 = {
300
305
  name: unref(name)
301
306
  }, null, 8, ["color", "icon", "name"])) : createCommentVNode("", true),
302
307
  unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
303
- unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4, [
308
+ unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$1, [
304
309
  unref(name) === "fontSize" ? withDirectives((openBlock(), createElementBlock("input", {
305
310
  key: 0,
306
311
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
@@ -310,7 +315,7 @@ const _sfc_main$4 = {
310
315
  type: "text",
311
316
  class: normalizeClass(["button-text-input", { "high-contrast": unref(isHighContrastMode) }]),
312
317
  id: "inlineTextInput-" + unref(name),
313
- autoccomplete: "off",
318
+ autocomplete: "off",
314
319
  ref_key: "inlineInput",
315
320
  ref: inlineInput
316
321
  }, null, 42, _hoisted_5)), [
@@ -323,7 +328,7 @@ const _sfc_main$4 = {
323
328
  type: "text",
324
329
  class: "button-text-input",
325
330
  id: "inlineTextInput-" + unref(name),
326
- autoccomplete: "off",
331
+ autocomplete: "off",
327
332
  ref_key: "inlineInput",
328
333
  ref: inlineInput
329
334
  }, null, 40, _hoisted_6)), [
@@ -335,13 +340,14 @@ const _sfc_main$4 = {
335
340
  class: "dropdown-caret",
336
341
  innerHTML: caretIcon.value,
337
342
  style: normalizeStyle({ opacity: unref(disabled) ? 0.6 : 1 })
338
- }, null, 12, _hoisted_7)) : createCommentVNode("", true)
343
+ }, null, 12, _hoisted_7)) : createCommentVNode("", true),
344
+ createElementVNode("div", _hoisted_8, toDisplayString(`${unref(attributes).ariaLabel} ${unref(active) ? "selected" : "unset"}`), 1)
339
345
  ], 10, _hoisted_2$2)
340
- ], 14, _hoisted_1$3);
346
+ ], 46, _hoisted_1$3);
341
347
  };
342
348
  }
343
349
  };
344
- const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-6eb57404"]]);
350
+ const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2518a3d1"]]);
345
351
  const _hoisted_1$2 = {
346
352
  class: "toolbar-separator",
347
353
  role: "separator",
@@ -9759,9 +9765,10 @@ const NSkeleton = defineComponent({
9759
9765
  return child;
9760
9766
  }
9761
9767
  });
9762
- const _hoisted_1 = { key: 0 };
9768
+ const _hoisted_1 = ["onKeydown", "tabindex"];
9763
9769
  const _hoisted_2 = { key: 0 };
9764
9770
  const _hoisted_3 = { key: 0 };
9771
+ const _hoisted_4 = { key: 0 };
9765
9772
  const _sfc_main$1 = {
9766
9773
  __name: "ButtonGroup",
9767
9774
  props: {
@@ -9811,11 +9818,11 @@ const _sfc_main$1 = {
9811
9818
  const isDropdown = (item) => item.type === "dropdown";
9812
9819
  const isSeparator = (item) => item.type === "separator";
9813
9820
  const isOverflow = (item) => item.type === "overflow";
9814
- const handleToolbarButtonClick = (item, argument = null) => {
9821
+ const handleToolbarButtonClick = (item, argument = null, switchFocusToEditor = true) => {
9815
9822
  currentItem.value = item;
9816
9823
  currentItem.value.expand = true;
9817
9824
  if (item.disabled.value) return;
9818
- emit("command", { item, argument });
9825
+ emit("command", { item, argument, switchFocusToEditor });
9819
9826
  };
9820
9827
  const handleToolbarButtonTextSubmit = (item, argument) => {
9821
9828
  if (item.disabled.value) return;
@@ -9831,7 +9838,7 @@ const _sfc_main$1 = {
9831
9838
  const handleSelect = (item, option) => {
9832
9839
  closeDropdowns();
9833
9840
  const value = item.dropdownValueKey.value ? option[item.dropdownValueKey.value] : option.label;
9834
- emit("command", { item, argument: value, option });
9841
+ emit("command", { item, argument: value, option, switchFocusToEditor: true });
9835
9842
  selectedOption.value = option.key;
9836
9843
  };
9837
9844
  const dropdownOptions = (item) => {
@@ -9855,19 +9862,92 @@ const _sfc_main$1 = {
9855
9862
  const handleClickOutside = (e) => {
9856
9863
  closeDropdowns();
9857
9864
  };
9865
+ const moveToNextButton = (e) => {
9866
+ const currentButton = e.target;
9867
+ const nextButton = e.target.closest(".toolbar-item-ctn").nextElementSibling;
9868
+ if (nextButton) {
9869
+ currentButton.setAttribute("tabindex", "-1");
9870
+ nextButton.setAttribute("tabindex", "0");
9871
+ nextButton.focus();
9872
+ }
9873
+ };
9874
+ const moveToPreviousButton = (e) => {
9875
+ const currentButton = e.target;
9876
+ const previousButton = e.target.closest(".toolbar-item-ctn").previousElementSibling;
9877
+ if (previousButton) {
9878
+ currentButton.setAttribute("tabindex", "-1");
9879
+ previousButton.setAttribute("tabindex", "0");
9880
+ previousButton.focus();
9881
+ }
9882
+ };
9883
+ const moveToNextButtonGroup = (e) => {
9884
+ const nextButtonGroup = e.target.closest(".button-group").nextElementSibling;
9885
+ if (nextButtonGroup) {
9886
+ nextButtonGroup.setAttribute("tabindex", "0");
9887
+ nextButtonGroup.focus();
9888
+ } else {
9889
+ const editor = document.querySelector(".ProseMirror");
9890
+ if (editor) {
9891
+ editor.focus();
9892
+ }
9893
+ }
9894
+ };
9895
+ const moveToPreviousButtonGroup = (e) => {
9896
+ const previousButtonGroup = e.target.closest(".button-group").previousElementSibling;
9897
+ if (previousButtonGroup) {
9898
+ previousButtonGroup.setAttribute("tabindex", "0");
9899
+ previousButtonGroup.focus();
9900
+ }
9901
+ };
9902
+ const handleKeyDown = (e, item) => {
9903
+ e.preventDefault();
9904
+ switch (e.key) {
9905
+ case "Enter":
9906
+ handleToolbarButtonClick(item, null, false);
9907
+ break;
9908
+ case "Escape":
9909
+ closeDropdowns();
9910
+ break;
9911
+ case "ArrowRight":
9912
+ closeDropdowns();
9913
+ moveToNextButton(e);
9914
+ break;
9915
+ case "ArrowLeft":
9916
+ closeDropdowns();
9917
+ moveToPreviousButton(e);
9918
+ break;
9919
+ case "Tab":
9920
+ if (e.shiftKey) {
9921
+ moveToPreviousButtonGroup(e);
9922
+ } else {
9923
+ moveToNextButtonGroup(e);
9924
+ }
9925
+ break;
9926
+ }
9927
+ };
9928
+ const handleFocus = (e) => {
9929
+ const firstButton = e.target.closest(".button-group").querySelector(".toolbar-item-ctn:not(.disabled)");
9930
+ if (firstButton) {
9931
+ firstButton.focus();
9932
+ }
9933
+ };
9858
9934
  return (_ctx, _cache) => {
9859
9935
  return openBlock(), createElementBlock("div", {
9860
9936
  style: normalizeStyle(getPositionStyle.value),
9861
9937
  class: "button-group",
9862
- role: "group"
9938
+ role: "group",
9939
+ onFocus: handleFocus
9863
9940
  }, [
9864
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.toolbarItems, (item) => {
9941
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.toolbarItems, (item, index) => {
9865
9942
  return openBlock(), createElementBlock("div", {
9866
9943
  key: item.id.value,
9867
9944
  class: normalizeClass([{
9868
9945
  narrow: item.isNarrow.value,
9869
- wide: item.isWide.value
9870
- }, "toolbar-item-ctn"])
9946
+ wide: item.isWide.value,
9947
+ disabled: item.disabled.value
9948
+ }, "toolbar-item-ctn"]),
9949
+ onKeydown: (e) => handleKeyDown(e, item),
9950
+ tabindex: index === 0 ? 0 : -1
9871
9951
  }, [
9872
9952
  isSeparator(item) ? (openBlock(), createBlock(ToolbarSeparator, {
9873
9953
  key: 0,
@@ -9897,14 +9977,15 @@ const _sfc_main$1 = {
9897
9977
  trigger: withCtx(() => [
9898
9978
  createVNode(ToolbarButton, {
9899
9979
  "toolbar-item": item,
9980
+ disabled: item.disabled.value,
9900
9981
  onTextSubmit: ($event) => handleToolbarButtonTextSubmit(item, $event),
9901
9982
  onButtonClick: ($event) => handleToolbarButtonClick(item)
9902
- }, null, 8, ["toolbar-item", "onTextSubmit", "onButtonClick"])
9983
+ }, null, 8, ["toolbar-item", "disabled", "onTextSubmit", "onButtonClick"])
9903
9984
  ]),
9904
9985
  default: withCtx(() => [
9905
9986
  createElementVNode("div", null, [
9906
9987
  createTextVNode(toDisplayString(item.tooltip) + " ", 1),
9907
- item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_1, "(disabled)")) : createCommentVNode("", true)
9988
+ item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_2, "(disabled)")) : createCommentVNode("", true)
9908
9989
  ])
9909
9990
  ]),
9910
9991
  _: 2
@@ -9925,9 +10006,9 @@ const _sfc_main$1 = {
9925
10006
  }, null, 8, ["toolbar-item", "is-overflow-item", "onTextSubmit", "onButtonClick"])
9926
10007
  ]),
9927
10008
  default: withCtx(() => [
9928
- item.tooltip ? (openBlock(), createElementBlock("div", _hoisted_2, [
10009
+ item.tooltip ? (openBlock(), createElementBlock("div", _hoisted_3, [
9929
10010
  createTextVNode(toDisplayString(item.tooltip) + " ", 1),
9930
- item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_3, "(disabled)")) : createCommentVNode("", true)
10011
+ item.disabled.value ? (openBlock(), createElementBlock("span", _hoisted_4, "(disabled)")) : createCommentVNode("", true)
9931
10012
  ])) : createCommentVNode("", true)
9932
10013
  ]),
9933
10014
  _: 2
@@ -9937,13 +10018,13 @@ const _sfc_main$1 = {
9937
10018
  "toolbar-item": item,
9938
10019
  "overflow-items": __props.overflowItems
9939
10020
  }, null, 8, ["toolbar-item", "overflow-items"])) : createCommentVNode("", true)
9940
- ], 2);
10021
+ ], 42, _hoisted_1);
9941
10022
  }), 128))
9942
- ], 4);
10023
+ ], 36);
9943
10024
  };
9944
10025
  }
9945
10026
  };
9946
- const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-b09e5a20"]]);
10027
+ const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-53a792b0"]]);
9947
10028
  const _sfc_main = {
9948
10029
  __name: "Toolbar",
9949
10030
  emits: ["command", "toggle", "select"],
@@ -9982,8 +10063,8 @@ const _sfc_main = {
9982
10063
  toolbarKey.value += 1;
9983
10064
  };
9984
10065
  const onResizeThrottled = throttle(onWindowResized, 300);
9985
- const handleCommand = ({ item, argument, option }) => {
9986
- proxy.$toolbar.emitCommand({ item, argument, option });
10066
+ const handleCommand = ({ item, argument, option, switchFocusToEditor = true }) => {
10067
+ proxy.$toolbar.emitCommand({ item, argument, option, switchFocusToEditor });
9987
10068
  };
9988
10069
  return (_ctx, _cache) => {
9989
10070
  return openBlock(), createElementBlock("div", {
@@ -9994,12 +10075,14 @@ const _sfc_main = {
9994
10075
  }, [
9995
10076
  unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
9996
10077
  key: 0,
10078
+ tabindex: "0",
9997
10079
  "toolbar-items": getFilteredItems("left"),
9998
10080
  position: "left",
9999
10081
  onCommand: handleCommand,
10000
10082
  class: "superdoc-toolbar-group-side"
10001
10083
  }, null, 8, ["toolbar-items"])) : createCommentVNode("", true),
10002
10084
  createVNode(ButtonGroup, {
10085
+ tabindex: "0",
10003
10086
  "toolbar-items": getFilteredItems("center"),
10004
10087
  "overflow-items": unref(proxy).$toolbar.overflowItems,
10005
10088
  position: "center",
@@ -10007,6 +10090,7 @@ const _sfc_main = {
10007
10090
  }, null, 8, ["toolbar-items", "overflow-items"]),
10008
10091
  unref(showRightSide) ? (openBlock(), createBlock(ButtonGroup, {
10009
10092
  key: 1,
10093
+ tabindex: "0",
10010
10094
  "toolbar-items": getFilteredItems("right"),
10011
10095
  position: "right",
10012
10096
  onCommand: handleCommand,
@@ -10016,7 +10100,7 @@ const _sfc_main = {
10016
10100
  };
10017
10101
  }
10018
10102
  };
10019
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2a400574"]]);
10103
+ const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b182f42b"]]);
10020
10104
  export {
10021
10105
  NSkeleton as N,
10022
10106
  Toolbar as T,
@@ -187,7 +187,7 @@ export class SuperToolbar extends EventEmitter<string | symbol, any> {
187
187
  * @param {*} [params.argument] - The argument passed to the command
188
188
  * @returns {*} The result of the executed command, undefined if no result is returned
189
189
  */
190
- emitCommand({ item, argument, option }: CommandItem): any;
190
+ emitCommand({ item, argument, option, switchFocusToEditor }: CommandItem): any;
191
191
  #private;
192
192
  }
193
193
  export type ToolbarConfig = {
@@ -1 +1 @@
1
- {"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AAEH;;;;GAIG;AAEH;;;;GAIG;AACH;IAwBE;;;;OAIG;IACH,oBAHW,aAAa,EA4DvB;IArFD;;;OAGG;IACH,QAFU,aAAa,CAmBrB;IAWA,oBAAsB;IACtB,qBAAuB;IACvB,kBAAoD;IACpD,WAAkC;IAClC,cAA+B;IAC/B,aAAmC;IACnC,sBAA4B;IAuC5B,gCA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;cACA;QAA6B,KAAK,EAAvB,OAAO;KAClB;;;;YACA;QAA2B,KAAK,EAArB,OAAO;KAClB;;;;cACA;QAAuB,KAAK,EAAjB,GAAC;KACZ;;;;cACA;QAAuB,KAAK,EAAjB,GAAC;KACZ;;;;gBACA;QAAyB,KAAK,EAAnB,GAAC;KACZ;;;;eACA;QAAwB,KAAK,EAAlB,GAAC;KACZ;;;;eACA;QAAwB,KAAK,EAAlB,GAAC;KACZ;;;;cACA;QAA6B,KAAK,EAAvB,OAAO;KAClB;;;;oBACA;QAA6B,KAAK,EAAvB,GAAC;KACZ;;;;oBACA;QAAmC,KAAK,EAA7B,OAAO;KAClB;;;;oBACA;QAA6B,KAAK,EAAvB,GAAC;KACZ;;;;kBACA;QAA2B,KAAK,EAArB,GAAC;KACZ;;;;WACA;QAAoB,KAAK,EAAd,GAAC;KACZ;;;;eACA;QAA8B,KAAK,EAAxB,OAAO;KAClB;;;;4BACA;QAA2C,KAAK,EAArC,OAAO;KAClB;;;;wBACA;QAAuC,KAAK,EAAjC,OAAO;KAClB;;;;cACA;QAAuB,KAAK,EAAjB,GAAC;KACZ;;;;eACA;QAAwB,KAAK,EAAlB,GAAC;KACZ;;;;wBACA;QAAuC,KAAK,EAAjC,OAAO;KAClB;;;;sBACA;QAA+B,KAAK,EAAzB,GAAC;KACZ;;;;mBACA;QAA4B,KAAK,EAAtB,GAAC;KACZ;;;;cACA;QAAuB,KAAK,EAAjB,GAAC;KACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAWW,WAAW;;;;eACX,GAAC;;6BArHc,eAAe"}
1
+ {"version":3,"file":"super-toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/super-toolbar.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;GAeG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;AAEH;;;;GAIG;AAEH;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converter-DzsjYmnd.js";
1
+ import { O } from "./chunks/converter-DQPyKWs_.js";
2
2
  export {
3
3
  O as SuperConverter
4
4
  };
@@ -101,6 +101,9 @@ export class SuperConverter {
101
101
  };
102
102
  };
103
103
  getThemeInfo(themeName: any): {
104
+ typeface?: undefined;
105
+ panose?: undefined;
106
+ } | {
104
107
  typeface: any;
105
108
  panose: any;
106
109
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SuperConverter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/SuperConverter.js"],"names":[],"mappings":"AAeA;IACE;;;;;;;;;;;;;;;;;;OAuBG;IAEH;;;;;;;;;;SAiBE;IAEF;;;;;;OAMG;IAEH,6BAAsF;IAwFtF,gDAoBC;IAED,6DAqBC;IAjID,0BA8DC;IA5DC,WAAmC;IAGnC,iBAAuB;IACvB,wBAA8B;IAG9B,iBAAsB;IACtB,UAA8B;IAC9B,WAAgC;IAEhC,WAAgC;IAEhC,eAAoB;IACpB,gBAAkB;IAGlB,4BAAoC;IAGpC,SAAsB;IAItB,cAAmB;IAInB,gBAAsB;IAGtB,iBAAuB;IAGvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IACvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IAGvB,oBAAsB;IAGtB,UAAwB;IAExB,0BAAiC;IACjC,0BAA4B;IAG5B,eAA0C;IAC1C,wBAA8B;IAG9B,gBAA4C;IAC5C,gBAA4C;IAM9C,qBAgBC;IAED,8BAEC;IA+CD;;;;;;;;;;MAwCC;IAED,2BAmDC;IAED,8BAwBC;IAED;;;;;;MAWC;IAED;;;MAgBC;IAED,2EAeC;IAED,gDAGC;IAED,gKA4DC;IAED;;;;;;;;;;;;MA8BC;;CAkNF"}
1
+ {"version":3,"file":"SuperConverter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/SuperConverter.js"],"names":[],"mappings":"AAeA;IACE;;;;;;;;;;;;;;;;;;OAuBG;IAEH;;;;;;;;;;SAiBE;IAEF;;;;;;OAMG;IAEH,6BAAsF;IAwFtF,gDAoBC;IAED,6DAqBC;IAjID,0BA8DC;IA5DC,WAAmC;IAGnC,iBAAuB;IACvB,wBAA8B;IAG9B,iBAAsB;IACtB,UAA8B;IAC9B,WAAgC;IAEhC,WAAgC;IAEhC,eAAoB;IACpB,gBAAkB;IAGlB,4BAAoC;IAGpC,SAAsB;IAItB,cAAmB;IAInB,gBAAsB;IAGtB,iBAAuB;IAGvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IACvB,YAAiB;IACjB;;;;;MAAsE;IACtE,qBAAuB;IAGvB,oBAAsB;IAGtB,UAAwB;IAExB,0BAAiC;IACjC,0BAA4B;IAG5B,eAA0C;IAC1C,wBAA8B;IAG9B,gBAA4C;IAC5C,gBAA4C;IAM9C,qBAgBC;IAED,8BAEC;IA+CD;;;;;;;;;;MAwCC;IAED,2BAmDC;IAED,8BAwBC;IAED;;;;;;MAWC;IAED;;;;;;MAiBC;IAED,2EAeC;IAED,gDAGC;IAED,gKA4DC;IAED;;;;;;;;;;;;MA8BC;;CAkNF"}
@@ -1 +1 @@
1
- {"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/exporter.js"],"names":[],"mappings":"AAwBA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH,2CAHW,YAAY,GACV,YAAY,CAsCxB;AA+DD;;;;;GAKG;AACH,qDAFa,YAAY,CAyBxB;AAm5DD;;;;;;;;;EAcC;AA+FD;IACE,4BAEC;IADC,eAA0B;IAG5B,gDAGC;;CAsEF;;;;;;;;;;;;;mBArvEa,KAAQ;;;;;;UAKR,MAAM;;;;aACN,KAAK,CAAC,UAAU,CAAC;;;;;;;;;;;;;UAMjB,MAAM;;;;cACN,KAAK,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;UAgBnB,MAAM"}
1
+ {"version":3,"file":"exporter.d.ts","sourceRoot":"","sources":["../../../src/core/super-converter/exporter.js"],"names":[],"mappings":"AAwBA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH;;;GAGG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AACH,2CAHW,YAAY,GACV,YAAY,CAsCxB;AA+DD;;;;;GAKG;AACH,qDAFa,YAAY,CAyBxB;AAm5DD;;;;;;;;;EAcC;AA+FD;IACE,4BAEC;IADC,eAA0B;IAG5B,gDAGC;;CAwEF;;;;;;;;;;;;;mBAvvEa,KAAQ;;;;;;UAKR,MAAM;;;;aACN,KAAK,CAAC,UAAU,CAAC;;;;;;;;;;;;;UAMjB,MAAM;;;;cACN,KAAK,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;UAgBnB,MAAM"}
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-DzsjYmnd.js";
2
- import { D } from "./chunks/docx-zipper-DQONSIAh.js";
1
+ import "./chunks/converter-DQPyKWs_.js";
2
+ import { D } from "./chunks/docx-zipper-cJ42om_0.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-CO-n6iZ8.js";
2
- import "./chunks/converter-DzsjYmnd.js";
3
- import "./chunks/docx-zipper-DQONSIAh.js";
1
+ import { E } from "./chunks/editor-B5TyAe8v.js";
2
+ import "./chunks/converter-DQPyKWs_.js";
3
+ import "./chunks/docx-zipper-cJ42om_0.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-DQONSIAh.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-cJ42om_0.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {