@harbour-enterprises/superdoc 1.0.0-next.2 → 1.0.0-next.3

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 (40) hide show
  1. package/dist/chunks/{PdfViewer-eykNsWyi.es.js → PdfViewer-PUn0q_lG.es.js} +2 -2
  2. package/dist/chunks/{PdfViewer-B-xTd4XY.cjs → PdfViewer-cVGt7Ne7.cjs} +1 -1
  3. package/dist/chunks/{eventemitter3-CcXAdeql.es.js → eventemitter3-44XulWQe.es.js} +1 -1
  4. package/dist/chunks/{index-BDVXUeCy-Di6ozaOM.cjs → index-DLO-SgUP-BNtYQDPq.cjs} +1 -1
  5. package/dist/chunks/{index-BDVXUeCy-7mwhYeJ7.es.js → index-DLO-SgUP-c73otQJ5.es.js} +1 -1
  6. package/dist/chunks/{index-rF5HExWB.cjs → index-Djmhr-R6.cjs} +465 -228
  7. package/dist/chunks/{index-DpQ8ZYM0.es.js → index-mHanL4xN.es.js} +468 -231
  8. package/dist/chunks/{jszip-5vvIqAEE.es.js → jszip-VP334ufO.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-CcKbh84I.cjs → super-editor.es-Cve8WKfM.cjs} +619 -379
  10. package/dist/chunks/{super-editor.es-CxajnL9u.es.js → super-editor.es-S9Kp_7dy.es.js} +620 -380
  11. package/dist/chunks/{vue-Dysv_7z5.es.js → vue-BuPTonTJ.es.js} +27 -27
  12. package/dist/chunks/xml-js-LkEmUa9-.es.js +2 -0
  13. package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts +42 -0
  14. package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts.map +1 -0
  15. package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
  16. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  17. package/dist/packages/superdoc/src/core/types/index.d.ts +4 -167
  18. package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
  19. package/dist/style.css +88 -86
  20. package/dist/super-editor/ai-writer.es.js +3 -3
  21. package/dist/super-editor/chunks/{converter-DN_dhslo.js → converter-ByybZRFp.js} +1 -1
  22. package/dist/super-editor/chunks/{docx-zipper-Bhl_yBjL.js → docx-zipper-CFQANTLI.js} +1 -1
  23. package/dist/super-editor/chunks/{editor-3klx7hyV.js → editor-Cu4hD14N.js} +16 -16
  24. package/dist/super-editor/chunks/{index-BDVXUeCy.js → index-DLO-SgUP.js} +1 -1
  25. package/dist/super-editor/chunks/{toolbar-8YA9ltNC.js → toolbar-5MMla0sj.js} +804 -568
  26. package/dist/super-editor/converter.es.js +1 -1
  27. package/dist/super-editor/docx-zipper.es.js +2 -2
  28. package/dist/super-editor/editor.es.js +3 -3
  29. package/dist/super-editor/file-zipper.es.js +1 -1
  30. package/dist/super-editor/style.css +22 -21
  31. package/dist/super-editor/super-editor.es.js +10 -6
  32. package/dist/super-editor/toolbar.es.js +2 -2
  33. package/dist/super-editor.cjs +1 -1
  34. package/dist/super-editor.es.js +2 -2
  35. package/dist/superdoc.cjs +2 -2
  36. package/dist/superdoc.es.js +2 -2
  37. package/dist/superdoc.umd.js +1082 -605
  38. package/dist/superdoc.umd.js.map +1 -1
  39. package/package.json +1 -1
  40. package/dist/chunks/xml-js-ClO_jHnq.es.js +0 -2
@@ -42428,7 +42428,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
42428
42428
  static getStoredSuperdocVersion(docx) {
42429
42429
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
42430
42430
  }
42431
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-next.2") {
42431
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-next.3") {
42432
42432
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
42433
42433
  }
42434
42434
  /**
@@ -66424,28 +66424,28 @@ Please report this to https://github.com/markedjs/marked.`, e) {
66424
66424
  }
66425
66425
  return false;
66426
66426
  };
66427
- function canRenderFont(fontName, fallbackFont = "sans-serif") {
66428
- const _canRenderFont = (fontName2, fallbackFont2) => {
66427
+ function canRenderFont(fontName, uiDisplayFallbackFont = "sans-serif") {
66428
+ const _canRenderFont = (fontName2, uiDisplayFallbackFont2) => {
66429
66429
  const canvas2 = document.createElement("canvas");
66430
66430
  const ctx2 = canvas2.getContext("2d");
66431
66431
  ctx2.textBaseline = "top";
66432
66432
  const text2 = "abcdefghijklmnopqrstuvwxyz0123456789";
66433
- ctx2.font = `72px ${fallbackFont2}`;
66433
+ ctx2.font = `72px ${uiDisplayFallbackFont2}`;
66434
66434
  const initialTextMeasurement = ctx2.measureText(text2);
66435
66435
  const fallbackWidth = initialTextMeasurement.width;
66436
66436
  const fallbackHeight = initialTextMeasurement.actualBoundingBoxDescent;
66437
- ctx2.font = `72px "${fontName2}", ${fallbackFont2}`;
66437
+ ctx2.font = `72px "${fontName2}", ${uiDisplayFallbackFont2}`;
66438
66438
  const customTextMeasurement = ctx2.measureText(text2);
66439
66439
  const customFontWidth = customTextMeasurement.width;
66440
66440
  const customFontHeight = customTextMeasurement.actualBoundingBoxDescent;
66441
66441
  const isAvailable = customFontWidth !== fallbackWidth || customFontHeight !== fallbackHeight;
66442
66442
  return isAvailable;
66443
66443
  };
66444
- if (_canRenderFont(fontName, fallbackFont)) {
66444
+ if (_canRenderFont(fontName, uiDisplayFallbackFont)) {
66445
66445
  return true;
66446
66446
  }
66447
- const oppositeFallbackFont = fallbackFont === "sans-serif" ? "serif" : "sans-serif";
66448
- return _canRenderFont(fontName, oppositeFallbackFont);
66447
+ const oppositeUiDisplayFallbackFont = uiDisplayFallbackFont === "sans-serif" ? "serif" : "sans-serif";
66448
+ return _canRenderFont(fontName, oppositeUiDisplayFallbackFont);
66449
66449
  }
66450
66450
  const { findChildren: findChildren$3 } = helpers;
66451
66451
  function getAllFieldAnnotations(state2) {
@@ -67513,7 +67513,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
67513
67513
  const shouldSkipNodeView = (editor) => {
67514
67514
  return isHeadless(editor);
67515
67515
  };
67516
- const summaryVersion = "1.0.0-next.2";
67516
+ const summaryVersion = "1.0.0-next.3";
67517
67517
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
67518
67518
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
67519
67519
  function mapAttributes(attrs) {
@@ -68302,7 +68302,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68302
68302
  { default: remarkStringify2 },
68303
68303
  { default: remarkGfm2 }
68304
68304
  ] = await Promise.all([
68305
- Promise.resolve().then(() => indexBDVXUeCy),
68305
+ Promise.resolve().then(() => indexDLOSgUP),
68306
68306
  Promise.resolve().then(() => indexDRCvimau),
68307
68307
  Promise.resolve().then(() => indexC_x_N6Uh),
68308
68308
  Promise.resolve().then(() => indexD_sWOSiG),
@@ -68507,7 +68507,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68507
68507
  * Process collaboration migrations
68508
68508
  */
68509
68509
  processCollaborationMigrations() {
68510
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-next.2");
68510
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-next.3");
68511
68511
  if (!this.options.ydoc) return;
68512
68512
  const metaMap = this.options.ydoc.getMap("meta");
68513
68513
  let docVersion = metaMap.get("version");
@@ -76237,9 +76237,9 @@ Please report this to https://github.com/markedjs/marked.`, e) {
76237
76237
  const font = findFirstTextFont(para.content);
76238
76238
  return font;
76239
76239
  };
76240
- const applyBaseRunDefaults = (run2, defaults2, fallbackFont, fallbackSize) => {
76240
+ const applyBaseRunDefaults = (run2, defaults2, uiDisplayFallbackFont, fallbackSize) => {
76241
76241
  if (!run2) return;
76242
- if (defaults2.fontFamily && run2.fontFamily === fallbackFont) {
76242
+ if (defaults2.fontFamily && run2.fontFamily === uiDisplayFallbackFont) {
76243
76243
  run2.fontFamily = defaults2.fontFamily;
76244
76244
  }
76245
76245
  if (defaults2.fontSizePx != null && run2.fontSize === fallbackSize) {
@@ -94076,8 +94076,8 @@ ${l}
94076
94076
  }
94077
94077
  }
94078
94078
  if (!currentLine && lines.length === 0) {
94079
- const fallbackFontSize = (block.runs[0]?.kind === "text" ? block.runs[0].fontSize : void 0) ?? 12;
94080
- const metrics = calculateTypographyMetrics(fallbackFontSize, spacing);
94079
+ const uiDisplayFallbackFontSize = (block.runs[0]?.kind === "text" ? block.runs[0].fontSize : void 0) ?? 12;
94080
+ const metrics = calculateTypographyMetrics(uiDisplayFallbackFontSize, spacing);
94081
94081
  const fallbackLine = {
94082
94082
  fromRun: 0,
94083
94083
  fromChar: 0,
@@ -118714,316 +118714,6 @@ ${l}
118714
118714
  paste: pasteIconSvg,
118715
118715
  strikethrough: strikethroughSvg
118716
118716
  };
118717
- const _hoisted_1$4$2 = { class: "toolbar-icon" };
118718
- const _hoisted_2$3$2 = ["innerHTML"];
118719
- const _sfc_main$5$2 = {
118720
- __name: "ToolbarButtonIcon",
118721
- props: {
118722
- name: {
118723
- type: String,
118724
- required: true
118725
- },
118726
- color: {
118727
- type: String,
118728
- default: null
118729
- },
118730
- icon: {
118731
- type: String,
118732
- default: null
118733
- }
118734
- },
118735
- setup(__props) {
118736
- const props = __props;
118737
- const getBarColor = computed(() => {
118738
- if (props.name === "color") return { backgroundColor: props.color || "#111111" };
118739
- if (props.name === "highlight") return { backgroundColor: props.color || "#D6D6D6" };
118740
- });
118741
- const hasColorBar = computed(() => {
118742
- return ["color", "highlight"].includes(props.name);
118743
- });
118744
- return (_ctx, _cache) => {
118745
- return openBlock(), createElementBlock("div", _hoisted_1$4$2, [
118746
- createBaseVNode("div", {
118747
- class: normalizeClass(["toolbar-icon__icon", [`toolbar-icon__icon--${props.name}`]]),
118748
- innerHTML: __props.icon
118749
- }, null, 10, _hoisted_2$3$2),
118750
- hasColorBar.value ? (openBlock(), createElementBlock("div", {
118751
- key: 0,
118752
- class: "color-bar",
118753
- style: normalizeStyle(getBarColor.value)
118754
- }, null, 4)) : createCommentVNode("", true)
118755
- ]);
118756
- };
118757
- }
118758
- };
118759
- const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$5$2, [["__scopeId", "data-v-6d7523ab"]]);
118760
- const _hoisted_1$3$2 = ["role", "aria-label", "onKeydown"];
118761
- const _hoisted_2$2$2 = ["data-item"];
118762
- const _hoisted_3$2$2 = {
118763
- key: 1,
118764
- class: "button-label"
118765
- };
118766
- const _hoisted_4$1$2 = { key: 2 };
118767
- const _hoisted_5$5 = ["onKeydown", "id"];
118768
- const _hoisted_6$3 = ["placeholder", "onKeydown", "id"];
118769
- const _hoisted_7$3 = ["innerHTML"];
118770
- const _hoisted_8$3 = {
118771
- "aria-live": "polite",
118772
- class: "visually-hidden"
118773
- };
118774
- const _sfc_main$4$2 = {
118775
- __name: "ToolbarButton",
118776
- props: {
118777
- iconColor: {
118778
- type: String,
118779
- default: null
118780
- },
118781
- active: {
118782
- type: Boolean,
118783
- default: false
118784
- },
118785
- isNarrow: {
118786
- type: Boolean,
118787
- default: false
118788
- },
118789
- isWide: {
118790
- type: Boolean,
118791
- default: false
118792
- },
118793
- toolbarItem: {
118794
- type: Object,
118795
- required: true
118796
- },
118797
- defaultLabel: {
118798
- type: String,
118799
- default: null
118800
- },
118801
- isOverflowItem: {
118802
- type: Boolean,
118803
- default: false
118804
- }
118805
- },
118806
- emits: ["buttonClick", "textSubmit"],
118807
- setup(__props, { emit: __emit }) {
118808
- const emit2 = __emit;
118809
- const props = __props;
118810
- const {
118811
- name,
118812
- active,
118813
- icon,
118814
- label,
118815
- hideLabel,
118816
- iconColor,
118817
- hasCaret,
118818
- disabled,
118819
- inlineTextInputVisible,
118820
- hasInlineTextInput,
118821
- minWidth,
118822
- style: style2,
118823
- attributes
118824
- } = props.toolbarItem;
118825
- const inlineTextInput = ref(label);
118826
- const inlineInput = ref(null);
118827
- const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode$1();
118828
- const handleClick2 = () => {
118829
- if (hasInlineTextInput) {
118830
- nextTick(() => {
118831
- inlineInput.value?.focus();
118832
- inlineInput.value?.select();
118833
- });
118834
- }
118835
- emit2("buttonClick");
118836
- };
118837
- const handleInputSubmit = () => {
118838
- const value = inlineTextInput.value;
118839
- const cleanValue = value.match(/^\d+(\.5)?$/) ? value : Math.floor(parseFloat(value)).toString();
118840
- emit2("textSubmit", cleanValue);
118841
- inlineTextInput.value = cleanValue;
118842
- };
118843
- const getStyle = computed(() => {
118844
- if (style2.value) return style2.value;
118845
- return {
118846
- minWidth: props.minWidth
118847
- };
118848
- });
118849
- const caretIcon = computed(() => {
118850
- return active.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
118851
- });
118852
- return (_ctx, _cache) => {
118853
- return openBlock(), createElementBlock("div", {
118854
- class: normalizeClass(["toolbar-item", unref(attributes).className]),
118855
- style: normalizeStyle(getStyle.value),
118856
- role: __props.isOverflowItem ? "menuitem" : "button",
118857
- "aria-label": unref(attributes).ariaLabel,
118858
- onClick: handleClick2,
118859
- onKeydown: withKeys(withModifiers(handleClick2, ["stop"]), ["enter"]),
118860
- tabindex: "0"
118861
- }, [
118862
- createBaseVNode("div", {
118863
- class: normalizeClass(["toolbar-button", {
118864
- active: unref(active),
118865
- disabled: unref(disabled),
118866
- narrow: __props.isNarrow,
118867
- wide: __props.isWide,
118868
- "has-inline-text-input": unref(hasInlineTextInput),
118869
- "high-contrast": unref(isHighContrastMode2)
118870
- }]),
118871
- "data-item": `btn-${unref(name) || ""}`
118872
- }, [
118873
- unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon, {
118874
- key: 0,
118875
- color: unref(iconColor),
118876
- class: "toolbar-icon",
118877
- icon: unref(icon),
118878
- name: unref(name)
118879
- }, null, 8, ["color", "icon", "name"])) : createCommentVNode("", true),
118880
- unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div", _hoisted_3$2$2, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
118881
- unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$1$2, [
118882
- unref(name) === "fontSize" ? withDirectives((openBlock(), createElementBlock("input", {
118883
- key: 0,
118884
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
118885
- onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
118886
- type: "text",
118887
- class: normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": unref(isHighContrastMode2) }]),
118888
- id: "inlineTextInput-" + unref(name),
118889
- autocomplete: "off",
118890
- ref_key: "inlineInput",
118891
- ref: inlineInput
118892
- }, null, 42, _hoisted_5$5)), [
118893
- [vModelText, inlineTextInput.value]
118894
- ]) : withDirectives((openBlock(), createElementBlock("input", {
118895
- key: 1,
118896
- "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inlineTextInput.value = $event),
118897
- placeholder: unref(label),
118898
- onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
118899
- type: "text",
118900
- class: "button-text-input",
118901
- id: "inlineTextInput-" + unref(name),
118902
- autocomplete: "off",
118903
- ref_key: "inlineInput",
118904
- ref: inlineInput
118905
- }, null, 40, _hoisted_6$3)), [
118906
- [vModelText, inlineTextInput.value]
118907
- ])
118908
- ])) : createCommentVNode("", true),
118909
- unref(hasCaret) ? (openBlock(), createElementBlock("div", {
118910
- key: 3,
118911
- class: "dropdown-caret",
118912
- innerHTML: caretIcon.value,
118913
- style: normalizeStyle({ opacity: unref(disabled) ? 0.6 : 1 })
118914
- }, null, 12, _hoisted_7$3)) : createCommentVNode("", true),
118915
- createBaseVNode("div", _hoisted_8$3, toDisplayString(`${unref(attributes).ariaLabel} ${unref(active) ? "selected" : "unset"}`), 1)
118916
- ], 10, _hoisted_2$2$2)
118917
- ], 46, _hoisted_1$3$2);
118918
- };
118919
- }
118920
- };
118921
- const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-ea93b080"]]);
118922
- const _hoisted_1$2$2 = {
118923
- class: "toolbar-separator",
118924
- role: "separator",
118925
- "aria-label": "Toolbar separator"
118926
- };
118927
- const _sfc_main$3$2 = {
118928
- __name: "ToolbarSeparator",
118929
- props: {
118930
- active: {
118931
- type: Boolean,
118932
- default: false
118933
- }
118934
- },
118935
- emits: ["command"],
118936
- setup(__props, { emit: __emit }) {
118937
- const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode$1();
118938
- const getSeparatorColor = () => {
118939
- if (isHighContrastMode2.value) {
118940
- return "#000";
118941
- }
118942
- return "#dbdbdb";
118943
- };
118944
- return (_ctx, _cache) => {
118945
- return openBlock(), createElementBlock("div", _hoisted_1$2$2, [
118946
- createBaseVNode("div", {
118947
- class: "separator-inner",
118948
- style: normalizeStyle({ backgroundColor: getSeparatorColor() })
118949
- }, null, 4)
118950
- ]);
118951
- };
118952
- }
118953
- };
118954
- const ToolbarSeparator = /* @__PURE__ */ _export_sfc$1(_sfc_main$3$2, [["__scopeId", "data-v-4ef9aa18"]]);
118955
- const _hoisted_1$1$2 = { class: "overflow-menu" };
118956
- const _hoisted_2$1$2 = { class: "overflow-menu-trigger" };
118957
- const _hoisted_3$1$2 = {
118958
- key: 0,
118959
- class: "overflow-menu_items",
118960
- role: "group"
118961
- };
118962
- const _sfc_main$2$2 = {
118963
- __name: "OverflowMenu",
118964
- props: {
118965
- toolbarItem: {
118966
- type: Object,
118967
- required: true
118968
- },
118969
- overflowItems: {
118970
- type: Array,
118971
- required: true
118972
- }
118973
- },
118974
- emits: ["buttonClick", "close"],
118975
- setup(__props, { emit: __emit }) {
118976
- const { proxy } = getCurrentInstance();
118977
- const emit2 = __emit;
118978
- const props = __props;
118979
- const isOverflowMenuOpened = computed(() => props.toolbarItem.expand.value);
118980
- const hasOpenDropdown = ref(false);
118981
- const overflowToolbarItem = computed(() => ({
118982
- ...props.toolbarItem,
118983
- active: isOverflowMenuOpened.value
118984
- }));
118985
- const toggleOverflowMenu = () => {
118986
- emit2("buttonClick", props.toolbarItem);
118987
- };
118988
- const handleCommand = ({ item, argument }) => {
118989
- proxy.$toolbar.emitCommand({ item, argument });
118990
- };
118991
- const handleKeyDown2 = (e) => {
118992
- if (e.key === "Escape") {
118993
- if (isOverflowMenuOpened.value && !hasOpenDropdown.value) {
118994
- e.preventDefault();
118995
- emit2("close");
118996
- }
118997
- }
118998
- };
118999
- onMounted(() => {
119000
- document.addEventListener("keydown", handleKeyDown2, true);
119001
- });
119002
- onBeforeUnmount(() => {
119003
- document.removeEventListener("keydown", handleKeyDown2, true);
119004
- });
119005
- return (_ctx, _cache) => {
119006
- return openBlock(), createElementBlock("div", _hoisted_1$1$2, [
119007
- createBaseVNode("div", _hoisted_2$1$2, [
119008
- createVNode(ToolbarButton, {
119009
- "toolbar-item": overflowToolbarItem.value,
119010
- onButtonClick: toggleOverflowMenu
119011
- }, null, 8, ["toolbar-item"])
119012
- ]),
119013
- isOverflowMenuOpened.value ? (openBlock(), createElementBlock("div", _hoisted_3$1$2, [
119014
- createVNode(ButtonGroup, {
119015
- class: "superdoc-toolbar-overflow",
119016
- "toolbar-items": __props.overflowItems,
119017
- "from-overflow": "",
119018
- onCommand: handleCommand,
119019
- onDropdownUpdateShow: _cache[0] || (_cache[0] = ($event) => hasOpenDropdown.value = $event)
119020
- }, null, 8, ["toolbar-items"])
119021
- ])) : createCommentVNode("", true)
119022
- ]);
119023
- };
119024
- }
119025
- };
119026
- const OverflowMenu = /* @__PURE__ */ _export_sfc$1(_sfc_main$2$2, [["__scopeId", "data-v-ef28da92"]]);
119027
118717
  function plugin$1$1(options) {
119028
118718
  let _bPrefix = ".";
119029
118719
  let _ePrefix = "__";
@@ -122634,30 +122324,30 @@ ${style2}
122634
122324
  function useConfig$1(props = {}, options = {
122635
122325
  defaultBordered: true
122636
122326
  }) {
122637
- const NConfigProvider = inject(configProviderInjectionKey$1, null);
122327
+ const NConfigProvider2 = inject(configProviderInjectionKey$1, null);
122638
122328
  return {
122639
122329
  // NConfigProvider,
122640
- inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,
122641
- mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,
122642
- mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,
122643
- mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,
122330
+ inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
122331
+ mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
122332
+ mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
122333
+ mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
122644
122334
  mergedBorderedRef: computed(() => {
122645
122335
  var _a2, _b2;
122646
122336
  const {
122647
122337
  bordered
122648
122338
  } = props;
122649
122339
  if (bordered !== void 0) return bordered;
122650
- return (_b2 = (_a2 = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value) !== null && _a2 !== void 0 ? _a2 : options.defaultBordered) !== null && _b2 !== void 0 ? _b2 : true;
122340
+ return (_b2 = (_a2 = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value) !== null && _a2 !== void 0 ? _a2 : options.defaultBordered) !== null && _b2 !== void 0 ? _b2 : true;
122651
122341
  }),
122652
- mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix$1),
122653
- namespaceRef: computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value)
122342
+ mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : shallowRef(defaultClsPrefix$1),
122343
+ namespaceRef: computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
122654
122344
  };
122655
122345
  }
122656
122346
  function useThemeClass$1(componentName, hashRef, cssVarsRef, props) {
122657
122347
  if (!cssVarsRef) throwError$1("useThemeClass", "cssVarsRef is not passed");
122658
- const NConfigProvider = inject(configProviderInjectionKey$1, null);
122659
- const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef;
122660
- const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget;
122348
+ const NConfigProvider2 = inject(configProviderInjectionKey$1, null);
122349
+ const mergedThemeHashRef = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeHashRef;
122350
+ const styleMountTarget = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget;
122661
122351
  const themeClassRef = ref("");
122662
122352
  const ssrAdapter2 = useSsrAdapter$1();
122663
122353
  let renderCallback;
@@ -124002,7 +123692,7 @@ ${style2}
124002
123692
  }
124003
123693
  return componentRtlState;
124004
123694
  });
124005
- const NConfigProvider = inject(configProviderInjectionKey$1, null);
123695
+ const NConfigProvider2 = inject(configProviderInjectionKey$1, null);
124006
123696
  const mountStyle = () => {
124007
123697
  watchEffect(() => {
124008
123698
  const {
@@ -124022,7 +123712,7 @@ ${style2}
124022
123712
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
124023
123713
  },
124024
123714
  ssr: ssrAdapter2,
124025
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
123715
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
124026
123716
  });
124027
123717
  });
124028
123718
  };
@@ -124080,7 +123770,7 @@ ${style2}
124080
123770
  }
124081
123771
  function useTheme$1(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
124082
123772
  const ssrAdapter2 = useSsrAdapter$1();
124083
- const NConfigProvider = inject(configProviderInjectionKey$1, null);
123773
+ const NConfigProvider2 = inject(configProviderInjectionKey$1, null);
124084
123774
  if (style2) {
124085
123775
  const mountStyle = () => {
124086
123776
  const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
@@ -124092,15 +123782,15 @@ ${style2}
124092
123782
  },
124093
123783
  anchorMetaName: cssrAnchorMetaName$2,
124094
123784
  ssr: ssrAdapter2,
124095
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
123785
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
124096
123786
  });
124097
- if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
123787
+ if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
124098
123788
  globalStyle$1.mount({
124099
123789
  id: "n-global",
124100
123790
  head: true,
124101
123791
  anchorMetaName: cssrAnchorMetaName$2,
124102
123792
  ssr: ssrAdapter2,
124103
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
123793
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
124104
123794
  });
124105
123795
  }
124106
123796
  };
@@ -124132,11 +123822,11 @@ ${style2}
124132
123822
  self: globalSelf = void 0,
124133
123823
  peers: globalPeers = {}
124134
123824
  } = {}
124135
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {};
123825
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
124136
123826
  const {
124137
123827
  common: globalCommonOverrides = void 0,
124138
123828
  [resolveId]: globalSelfOverrides = {}
124139
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {};
123829
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
124140
123830
  const {
124141
123831
  common: globalSelfCommonOverrides,
124142
123832
  peers: globalPeersOverrides = {}
@@ -126894,6 +126584,209 @@ ${style2}
126894
126584
  });
126895
126585
  }
126896
126586
  });
126587
+ const configProviderProps$1 = {
126588
+ abstract: Boolean,
126589
+ bordered: {
126590
+ type: Boolean,
126591
+ default: void 0
126592
+ },
126593
+ clsPrefix: String,
126594
+ locale: Object,
126595
+ dateLocale: Object,
126596
+ namespace: String,
126597
+ rtl: Array,
126598
+ tag: {
126599
+ type: String,
126600
+ default: "div"
126601
+ },
126602
+ hljs: Object,
126603
+ katex: Object,
126604
+ theme: Object,
126605
+ themeOverrides: Object,
126606
+ componentOptions: Object,
126607
+ icons: Object,
126608
+ breakpoints: Object,
126609
+ preflightStyleDisabled: Boolean,
126610
+ styleMountTarget: Object,
126611
+ inlineThemeDisabled: {
126612
+ type: Boolean,
126613
+ default: void 0
126614
+ },
126615
+ // deprecated
126616
+ as: {
126617
+ type: String,
126618
+ validator: () => {
126619
+ warn$3("config-provider", "`as` is deprecated, please use `tag` instead.");
126620
+ return true;
126621
+ },
126622
+ default: void 0
126623
+ }
126624
+ };
126625
+ const NConfigProvider$1 = /* @__PURE__ */ defineComponent({
126626
+ name: "ConfigProvider",
126627
+ alias: ["App"],
126628
+ props: configProviderProps$1,
126629
+ setup(props) {
126630
+ const NConfigProvider2 = inject(configProviderInjectionKey$1, null);
126631
+ const mergedThemeRef = computed(() => {
126632
+ const {
126633
+ theme
126634
+ } = props;
126635
+ if (theme === null) return void 0;
126636
+ const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
126637
+ return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
126638
+ });
126639
+ const mergedThemeOverridesRef = computed(() => {
126640
+ const {
126641
+ themeOverrides
126642
+ } = props;
126643
+ if (themeOverrides === null) return void 0;
126644
+ if (themeOverrides === void 0) {
126645
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
126646
+ } else {
126647
+ const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
126648
+ if (inheritedThemeOverrides === void 0) {
126649
+ return themeOverrides;
126650
+ } else {
126651
+ return merge$1$1({}, inheritedThemeOverrides, themeOverrides);
126652
+ }
126653
+ }
126654
+ });
126655
+ const mergedNamespaceRef = useMemo$1(() => {
126656
+ const {
126657
+ namespace: namespace2
126658
+ } = props;
126659
+ return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
126660
+ });
126661
+ const mergedBorderedRef = useMemo$1(() => {
126662
+ const {
126663
+ bordered
126664
+ } = props;
126665
+ return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
126666
+ });
126667
+ const mergedIconsRef = computed(() => {
126668
+ const {
126669
+ icons: icons2
126670
+ } = props;
126671
+ return icons2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons2;
126672
+ });
126673
+ const mergedComponentPropsRef = computed(() => {
126674
+ const {
126675
+ componentOptions
126676
+ } = props;
126677
+ if (componentOptions !== void 0) return componentOptions;
126678
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
126679
+ });
126680
+ const mergedClsPrefixRef = computed(() => {
126681
+ const {
126682
+ clsPrefix
126683
+ } = props;
126684
+ if (clsPrefix !== void 0) return clsPrefix;
126685
+ if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
126686
+ return defaultClsPrefix$1;
126687
+ });
126688
+ const mergedRtlRef = computed(() => {
126689
+ var _a2;
126690
+ const {
126691
+ rtl
126692
+ } = props;
126693
+ if (rtl === void 0) {
126694
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
126695
+ }
126696
+ const rtlEnabledState = {};
126697
+ for (const rtlInfo of rtl) {
126698
+ rtlEnabledState[rtlInfo.name] = markRaw(rtlInfo);
126699
+ (_a2 = rtlInfo.peers) === null || _a2 === void 0 ? void 0 : _a2.forEach((peerRtlInfo) => {
126700
+ if (!(peerRtlInfo.name in rtlEnabledState)) {
126701
+ rtlEnabledState[peerRtlInfo.name] = markRaw(peerRtlInfo);
126702
+ }
126703
+ });
126704
+ }
126705
+ return rtlEnabledState;
126706
+ });
126707
+ const mergedBreakpointsRef = computed(() => {
126708
+ return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
126709
+ });
126710
+ const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
126711
+ const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
126712
+ const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
126713
+ const mergedThemeHashRef = computed(() => {
126714
+ const {
126715
+ value: theme
126716
+ } = mergedThemeRef;
126717
+ const {
126718
+ value: mergedThemeOverrides
126719
+ } = mergedThemeOverridesRef;
126720
+ const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
126721
+ const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
126722
+ if (themeName) {
126723
+ if (hasThemeOverrides) {
126724
+ return `${themeName}-${murmur2$1(JSON.stringify(mergedThemeOverridesRef.value))}`;
126725
+ }
126726
+ return themeName;
126727
+ } else {
126728
+ if (hasThemeOverrides) {
126729
+ return murmur2$1(JSON.stringify(mergedThemeOverridesRef.value));
126730
+ }
126731
+ return "";
126732
+ }
126733
+ });
126734
+ provide(configProviderInjectionKey$1, {
126735
+ mergedThemeHashRef,
126736
+ mergedBreakpointsRef,
126737
+ mergedRtlRef,
126738
+ mergedIconsRef,
126739
+ mergedComponentPropsRef,
126740
+ mergedBorderedRef,
126741
+ mergedNamespaceRef,
126742
+ mergedClsPrefixRef,
126743
+ mergedLocaleRef: computed(() => {
126744
+ const {
126745
+ locale
126746
+ } = props;
126747
+ if (locale === null) return void 0;
126748
+ return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
126749
+ }),
126750
+ mergedDateLocaleRef: computed(() => {
126751
+ const {
126752
+ dateLocale
126753
+ } = props;
126754
+ if (dateLocale === null) return void 0;
126755
+ return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
126756
+ }),
126757
+ mergedHljsRef: computed(() => {
126758
+ const {
126759
+ hljs
126760
+ } = props;
126761
+ return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
126762
+ }),
126763
+ mergedKatexRef: computed(() => {
126764
+ const {
126765
+ katex
126766
+ } = props;
126767
+ return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
126768
+ }),
126769
+ mergedThemeRef,
126770
+ mergedThemeOverridesRef,
126771
+ inlineThemeDisabled: inlineThemeDisabled || false,
126772
+ preflightStyleDisabled: preflightStyleDisabled || false,
126773
+ styleMountTarget
126774
+ });
126775
+ return {
126776
+ mergedClsPrefix: mergedClsPrefixRef,
126777
+ mergedBordered: mergedBorderedRef,
126778
+ mergedNamespace: mergedNamespaceRef,
126779
+ mergedTheme: mergedThemeRef,
126780
+ mergedThemeOverrides: mergedThemeOverridesRef
126781
+ };
126782
+ },
126783
+ render() {
126784
+ var _a2, _b2, _c, _d;
126785
+ return !this.abstract ? h$1(this.as || this.tag, {
126786
+ class: `${this.mergedClsPrefix || defaultClsPrefix$1}-config-provider`
126787
+ }, (_b2 = (_a2 = this.$slots).default) === null || _b2 === void 0 ? void 0 : _b2.call(_a2)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);
126788
+ }
126789
+ });
126897
126790
  const commonVariables$5 = {
126898
126791
  padding: "4px 0",
126899
126792
  optionIconSizeSmall: "14px",
@@ -128371,6 +128264,316 @@ ${style2}
128371
128264
  return child;
128372
128265
  }
128373
128266
  });
128267
+ const _hoisted_1$4$2 = { class: "toolbar-icon" };
128268
+ const _hoisted_2$3$2 = ["innerHTML"];
128269
+ const _sfc_main$5$2 = {
128270
+ __name: "ToolbarButtonIcon",
128271
+ props: {
128272
+ name: {
128273
+ type: String,
128274
+ required: true
128275
+ },
128276
+ color: {
128277
+ type: String,
128278
+ default: null
128279
+ },
128280
+ icon: {
128281
+ type: String,
128282
+ default: null
128283
+ }
128284
+ },
128285
+ setup(__props) {
128286
+ const props = __props;
128287
+ const getBarColor = computed(() => {
128288
+ if (props.name === "color") return { backgroundColor: props.color || "#111111" };
128289
+ if (props.name === "highlight") return { backgroundColor: props.color || "#D6D6D6" };
128290
+ });
128291
+ const hasColorBar = computed(() => {
128292
+ return ["color", "highlight"].includes(props.name);
128293
+ });
128294
+ return (_ctx, _cache) => {
128295
+ return openBlock(), createElementBlock("div", _hoisted_1$4$2, [
128296
+ createBaseVNode("div", {
128297
+ class: normalizeClass(["toolbar-icon__icon", [`toolbar-icon__icon--${props.name}`]]),
128298
+ innerHTML: __props.icon
128299
+ }, null, 10, _hoisted_2$3$2),
128300
+ hasColorBar.value ? (openBlock(), createElementBlock("div", {
128301
+ key: 0,
128302
+ class: "color-bar",
128303
+ style: normalizeStyle(getBarColor.value)
128304
+ }, null, 4)) : createCommentVNode("", true)
128305
+ ]);
128306
+ };
128307
+ }
128308
+ };
128309
+ const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc$1(_sfc_main$5$2, [["__scopeId", "data-v-6d7523ab"]]);
128310
+ const _hoisted_1$3$2 = ["role", "aria-label", "onKeydown"];
128311
+ const _hoisted_2$2$2 = ["data-item"];
128312
+ const _hoisted_3$2$2 = {
128313
+ key: 1,
128314
+ class: "button-label"
128315
+ };
128316
+ const _hoisted_4$1$2 = { key: 2 };
128317
+ const _hoisted_5$5 = ["onKeydown", "id"];
128318
+ const _hoisted_6$3 = ["placeholder", "onKeydown", "id"];
128319
+ const _hoisted_7$3 = ["innerHTML"];
128320
+ const _hoisted_8$3 = {
128321
+ "aria-live": "polite",
128322
+ class: "visually-hidden"
128323
+ };
128324
+ const _sfc_main$4$2 = {
128325
+ __name: "ToolbarButton",
128326
+ props: {
128327
+ iconColor: {
128328
+ type: String,
128329
+ default: null
128330
+ },
128331
+ active: {
128332
+ type: Boolean,
128333
+ default: false
128334
+ },
128335
+ isNarrow: {
128336
+ type: Boolean,
128337
+ default: false
128338
+ },
128339
+ isWide: {
128340
+ type: Boolean,
128341
+ default: false
128342
+ },
128343
+ toolbarItem: {
128344
+ type: Object,
128345
+ required: true
128346
+ },
128347
+ defaultLabel: {
128348
+ type: String,
128349
+ default: null
128350
+ },
128351
+ isOverflowItem: {
128352
+ type: Boolean,
128353
+ default: false
128354
+ }
128355
+ },
128356
+ emits: ["buttonClick", "textSubmit"],
128357
+ setup(__props, { emit: __emit }) {
128358
+ const emit2 = __emit;
128359
+ const props = __props;
128360
+ const {
128361
+ name,
128362
+ active,
128363
+ icon,
128364
+ label,
128365
+ hideLabel,
128366
+ iconColor,
128367
+ hasCaret,
128368
+ disabled,
128369
+ inlineTextInputVisible,
128370
+ hasInlineTextInput,
128371
+ minWidth,
128372
+ style: style2,
128373
+ attributes
128374
+ } = props.toolbarItem;
128375
+ const inlineTextInput = ref(label);
128376
+ const inlineInput = ref(null);
128377
+ const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode$1();
128378
+ const handleClick2 = () => {
128379
+ if (hasInlineTextInput) {
128380
+ nextTick(() => {
128381
+ inlineInput.value?.focus();
128382
+ inlineInput.value?.select();
128383
+ });
128384
+ }
128385
+ emit2("buttonClick");
128386
+ };
128387
+ const handleInputSubmit = () => {
128388
+ const value = inlineTextInput.value;
128389
+ const cleanValue = value.match(/^\d+(\.5)?$/) ? value : Math.floor(parseFloat(value)).toString();
128390
+ emit2("textSubmit", cleanValue);
128391
+ inlineTextInput.value = cleanValue;
128392
+ };
128393
+ const getStyle = computed(() => {
128394
+ if (style2.value) return style2.value;
128395
+ return {
128396
+ minWidth: props.minWidth
128397
+ };
128398
+ });
128399
+ const caretIcon = computed(() => {
128400
+ return active.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
128401
+ });
128402
+ return (_ctx, _cache) => {
128403
+ return openBlock(), createElementBlock("div", {
128404
+ class: normalizeClass(["toolbar-item", unref(attributes).className]),
128405
+ style: normalizeStyle(getStyle.value),
128406
+ role: __props.isOverflowItem ? "menuitem" : "button",
128407
+ "aria-label": unref(attributes).ariaLabel,
128408
+ onClick: handleClick2,
128409
+ onKeydown: withKeys(withModifiers(handleClick2, ["stop"]), ["enter"]),
128410
+ tabindex: "0"
128411
+ }, [
128412
+ createBaseVNode("div", {
128413
+ class: normalizeClass(["toolbar-button", {
128414
+ active: unref(active),
128415
+ disabled: unref(disabled),
128416
+ narrow: __props.isNarrow,
128417
+ wide: __props.isWide,
128418
+ "has-inline-text-input": unref(hasInlineTextInput),
128419
+ "high-contrast": unref(isHighContrastMode2)
128420
+ }]),
128421
+ "data-item": `btn-${unref(name) || ""}`
128422
+ }, [
128423
+ unref(icon) ? (openBlock(), createBlock(ToolbarButtonIcon, {
128424
+ key: 0,
128425
+ color: unref(iconColor),
128426
+ class: "toolbar-icon",
128427
+ icon: unref(icon),
128428
+ name: unref(name)
128429
+ }, null, 8, ["color", "icon", "name"])) : createCommentVNode("", true),
128430
+ unref(label) && !unref(hideLabel) && !unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("div", _hoisted_3$2$2, toDisplayString(unref(label)), 1)) : createCommentVNode("", true),
128431
+ unref(inlineTextInputVisible) ? (openBlock(), createElementBlock("span", _hoisted_4$1$2, [
128432
+ unref(name) === "fontSize" ? withDirectives((openBlock(), createElementBlock("input", {
128433
+ key: 0,
128434
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
128435
+ onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
128436
+ type: "text",
128437
+ class: normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": unref(isHighContrastMode2) }]),
128438
+ id: "inlineTextInput-" + unref(name),
128439
+ autocomplete: "off",
128440
+ ref_key: "inlineInput",
128441
+ ref: inlineInput
128442
+ }, null, 42, _hoisted_5$5)), [
128443
+ [vModelText, inlineTextInput.value]
128444
+ ]) : withDirectives((openBlock(), createElementBlock("input", {
128445
+ key: 1,
128446
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inlineTextInput.value = $event),
128447
+ placeholder: unref(label),
128448
+ onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
128449
+ type: "text",
128450
+ class: "button-text-input",
128451
+ id: "inlineTextInput-" + unref(name),
128452
+ autocomplete: "off",
128453
+ ref_key: "inlineInput",
128454
+ ref: inlineInput
128455
+ }, null, 40, _hoisted_6$3)), [
128456
+ [vModelText, inlineTextInput.value]
128457
+ ])
128458
+ ])) : createCommentVNode("", true),
128459
+ unref(hasCaret) ? (openBlock(), createElementBlock("div", {
128460
+ key: 3,
128461
+ class: "dropdown-caret",
128462
+ innerHTML: caretIcon.value,
128463
+ style: normalizeStyle({ opacity: unref(disabled) ? 0.6 : 1 })
128464
+ }, null, 12, _hoisted_7$3)) : createCommentVNode("", true),
128465
+ createBaseVNode("div", _hoisted_8$3, toDisplayString(`${unref(attributes).ariaLabel} ${unref(active) ? "selected" : "unset"}`), 1)
128466
+ ], 10, _hoisted_2$2$2)
128467
+ ], 46, _hoisted_1$3$2);
128468
+ };
128469
+ }
128470
+ };
128471
+ const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-ea93b080"]]);
128472
+ const _hoisted_1$2$2 = {
128473
+ class: "toolbar-separator",
128474
+ role: "separator",
128475
+ "aria-label": "Toolbar separator"
128476
+ };
128477
+ const _sfc_main$3$2 = {
128478
+ __name: "ToolbarSeparator",
128479
+ props: {
128480
+ active: {
128481
+ type: Boolean,
128482
+ default: false
128483
+ }
128484
+ },
128485
+ emits: ["command"],
128486
+ setup(__props, { emit: __emit }) {
128487
+ const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode$1();
128488
+ const getSeparatorColor = () => {
128489
+ if (isHighContrastMode2.value) {
128490
+ return "#000";
128491
+ }
128492
+ return "#dbdbdb";
128493
+ };
128494
+ return (_ctx, _cache) => {
128495
+ return openBlock(), createElementBlock("div", _hoisted_1$2$2, [
128496
+ createBaseVNode("div", {
128497
+ class: "separator-inner",
128498
+ style: normalizeStyle({ backgroundColor: getSeparatorColor() })
128499
+ }, null, 4)
128500
+ ]);
128501
+ };
128502
+ }
128503
+ };
128504
+ const ToolbarSeparator = /* @__PURE__ */ _export_sfc$1(_sfc_main$3$2, [["__scopeId", "data-v-4ef9aa18"]]);
128505
+ const _hoisted_1$1$2 = { class: "overflow-menu" };
128506
+ const _hoisted_2$1$2 = { class: "overflow-menu-trigger" };
128507
+ const _hoisted_3$1$2 = {
128508
+ key: 0,
128509
+ class: "overflow-menu_items",
128510
+ role: "group"
128511
+ };
128512
+ const _sfc_main$2$2 = {
128513
+ __name: "OverflowMenu",
128514
+ props: {
128515
+ toolbarItem: {
128516
+ type: Object,
128517
+ required: true
128518
+ },
128519
+ overflowItems: {
128520
+ type: Array,
128521
+ required: true
128522
+ }
128523
+ },
128524
+ emits: ["buttonClick", "close"],
128525
+ setup(__props, { emit: __emit }) {
128526
+ const { proxy } = getCurrentInstance();
128527
+ const emit2 = __emit;
128528
+ const props = __props;
128529
+ const isOverflowMenuOpened = computed(() => props.toolbarItem.expand.value);
128530
+ const hasOpenDropdown = ref(false);
128531
+ const overflowToolbarItem = computed(() => ({
128532
+ ...props.toolbarItem,
128533
+ active: isOverflowMenuOpened.value
128534
+ }));
128535
+ const toggleOverflowMenu = () => {
128536
+ emit2("buttonClick", props.toolbarItem);
128537
+ };
128538
+ const handleCommand = ({ item, argument }) => {
128539
+ proxy.$toolbar.emitCommand({ item, argument });
128540
+ };
128541
+ const handleKeyDown2 = (e) => {
128542
+ if (e.key === "Escape") {
128543
+ if (isOverflowMenuOpened.value && !hasOpenDropdown.value) {
128544
+ e.preventDefault();
128545
+ emit2("close");
128546
+ }
128547
+ }
128548
+ };
128549
+ onMounted(() => {
128550
+ document.addEventListener("keydown", handleKeyDown2, true);
128551
+ });
128552
+ onBeforeUnmount(() => {
128553
+ document.removeEventListener("keydown", handleKeyDown2, true);
128554
+ });
128555
+ return (_ctx, _cache) => {
128556
+ return openBlock(), createElementBlock("div", _hoisted_1$1$2, [
128557
+ createBaseVNode("div", _hoisted_2$1$2, [
128558
+ createVNode(ToolbarButton, {
128559
+ "toolbar-item": overflowToolbarItem.value,
128560
+ onButtonClick: toggleOverflowMenu
128561
+ }, null, 8, ["toolbar-item"])
128562
+ ]),
128563
+ isOverflowMenuOpened.value ? (openBlock(), createElementBlock("div", _hoisted_3$1$2, [
128564
+ createVNode(ButtonGroup, {
128565
+ class: "superdoc-toolbar-overflow",
128566
+ "toolbar-items": __props.overflowItems,
128567
+ "from-overflow": "",
128568
+ onCommand: handleCommand,
128569
+ onDropdownUpdateShow: _cache[0] || (_cache[0] = ($event) => hasOpenDropdown.value = $event)
128570
+ }, null, 8, ["toolbar-items"])
128571
+ ])) : createCommentVNode("", true)
128572
+ ]);
128573
+ };
128574
+ }
128575
+ };
128576
+ const OverflowMenu = /* @__PURE__ */ _export_sfc$1(_sfc_main$2$2, [["__scopeId", "data-v-ef28da92"]]);
128374
128577
  const _hoisted_1$j = ["onKeydown", "tabindex", "data-item-id"];
128375
128578
  const _hoisted_2$c = { key: 0 };
128376
128579
  const _hoisted_3$a = { key: 0 };
@@ -128386,6 +128589,16 @@ ${style2}
128386
128589
  type: Array,
128387
128590
  default: () => []
128388
128591
  },
128592
+ /**
128593
+ * The font-family to use for UI elements like dropdowns and tooltips.
128594
+ * This ensures consistent typography across toolbar UI components.
128595
+ * @type {string}
128596
+ * @default 'Arial, Helvetica, sans-serif'
128597
+ */
128598
+ uiFontFamily: {
128599
+ type: String,
128600
+ default: "Arial, Helvetica, sans-serif"
128601
+ },
128389
128602
  position: {
128390
128603
  type: String,
128391
128604
  default: "left"
@@ -128578,6 +128791,7 @@ ${style2}
128578
128791
  options: dropdownOptions(item),
128579
128792
  trigger: item.disabled.value ? null : "click",
128580
128793
  show: item.expand.value,
128794
+ "content-style": { fontFamily: props.uiFontFamily },
128581
128795
  size: "medium",
128582
128796
  placement: "bottom-start",
128583
128797
  class: normalizeClass(["toolbar-button toolbar-dropdown sd-editor-toolbar-dropdown", { "high-contrast": unref(isHighContrastMode2) }]),
@@ -128585,14 +128799,16 @@ ${style2}
128585
128799
  onUpdateShow: handleDropdownUpdateShow,
128586
128800
  style: normalizeStyle(item.dropdownStyles.value),
128587
128801
  "menu-props": () => ({
128588
- role: "menu"
128802
+ role: "menu",
128803
+ style: { fontFamily: props.uiFontFamily }
128589
128804
  }),
128590
128805
  "node-props": (option) => getDropdownAttributes(option, item)
128591
128806
  }, {
128592
128807
  default: withCtx(() => [
128593
128808
  createVNode(unref(NTooltip), {
128594
128809
  trigger: "hover",
128595
- disabled: !item.tooltip?.value
128810
+ disabled: !item.tooltip?.value,
128811
+ "content-style": { fontFamily: props.uiFontFamily }
128596
128812
  }, {
128597
128813
  trigger: withCtx(() => [
128598
128814
  createVNode(ToolbarButton, {
@@ -128609,13 +128825,14 @@ ${style2}
128609
128825
  ])
128610
128826
  ]),
128611
128827
  _: 2
128612
- }, 1032, ["disabled"])
128828
+ }, 1032, ["disabled", "content-style"])
128613
128829
  ]),
128614
128830
  _: 2
128615
- }, 1032, ["options", "trigger", "show", "class", "onSelect", "style", "node-props"])) : isButton(item) ? (openBlock(), createBlock(unref(NTooltip), {
128831
+ }, 1032, ["options", "trigger", "show", "content-style", "class", "onSelect", "style", "menu-props", "node-props"])) : isButton(item) ? (openBlock(), createBlock(unref(NTooltip), {
128616
128832
  key: 2,
128617
128833
  trigger: "hover",
128618
- class: "sd-editor-toolbar-tooltip"
128834
+ class: "sd-editor-toolbar-tooltip",
128835
+ "content-style": { fontFamily: props.uiFontFamily }
128619
128836
  }, {
128620
128837
  trigger: withCtx(() => [
128621
128838
  createVNode(ToolbarButton, {
@@ -128632,7 +128849,7 @@ ${style2}
128632
128849
  ])) : createCommentVNode("", true)
128633
128850
  ]),
128634
128851
  _: 2
128635
- }, 1024)) : createCommentVNode("", true),
128852
+ }, 1032, ["content-style"])) : createCommentVNode("", true),
128636
128853
  isOverflow(item) && __props.overflowItems.length ? (openBlock(), createBlock(OverflowMenu, {
128637
128854
  key: 3,
128638
128855
  "toolbar-item": item,
@@ -128646,13 +128863,21 @@ ${style2}
128646
128863
  };
128647
128864
  }
128648
128865
  };
128649
- const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$2, [["__scopeId", "data-v-c80a1e51"]]);
128866
+ const ButtonGroup = /* @__PURE__ */ _export_sfc$1(_sfc_main$1$2, [["__scopeId", "data-v-f732136c"]]);
128867
+ const DEFAULT_UI_FONT_FAMILY$1 = "Arial, Helvetica, sans-serif";
128650
128868
  const _sfc_main$k = {
128651
128869
  __name: "Toolbar",
128652
128870
  emits: ["command", "toggle", "select"],
128653
128871
  setup(__props, { emit: __emit }) {
128654
128872
  const { proxy } = getCurrentInstance();
128655
128873
  let toolbarKey = ref(1);
128874
+ const uiFontFamily = computed(() => {
128875
+ const configured = proxy?.$toolbar?.config?.uiDisplayFallbackFont;
128876
+ if (typeof configured === "string" && configured.trim()) {
128877
+ return configured.trim();
128878
+ }
128879
+ return DEFAULT_UI_FONT_FAMILY$1;
128880
+ });
128656
128881
  const showLeftSide = proxy.$toolbar.config?.toolbarGroups?.includes("left");
128657
128882
  const showRightSide = proxy.$toolbar.config?.toolbarGroups?.includes("right");
128658
128883
  const excludeButtonsList = proxy.$toolbar.config?.toolbarButtonsExclude || [];
@@ -128699,37 +128924,48 @@ ${style2}
128699
128924
  "aria-label": "Toolbar",
128700
128925
  "data-editor-ui-surface": ""
128701
128926
  }, [
128702
- unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
128703
- key: 0,
128704
- tabindex: "0",
128705
- "toolbar-items": getFilteredItems("left"),
128706
- position: "left",
128707
- onCommand: handleCommand,
128708
- onItemClicked: restoreSelection2,
128709
- class: "superdoc-toolbar-group-side"
128710
- }, null, 8, ["toolbar-items"])) : createCommentVNode("", true),
128711
- createVNode(ButtonGroup, {
128712
- tabindex: "0",
128713
- "toolbar-items": getFilteredItems("center"),
128714
- "overflow-items": unref(proxy).$toolbar.overflowItems,
128715
- position: "center",
128716
- onCommand: handleCommand,
128717
- onItemClicked: restoreSelection2
128718
- }, null, 8, ["toolbar-items", "overflow-items"]),
128719
- unref(showRightSide) ? (openBlock(), createBlock(ButtonGroup, {
128720
- key: 1,
128721
- tabindex: "0",
128722
- "toolbar-items": getFilteredItems("right"),
128723
- position: "right",
128724
- onCommand: handleCommand,
128725
- onItemClicked: restoreSelection2,
128726
- class: "superdoc-toolbar-group-side"
128727
- }, null, 8, ["toolbar-items"])) : createCommentVNode("", true)
128927
+ createVNode(unref(NConfigProvider$1), {
128928
+ abstract: "",
128929
+ "preflight-style-disabled": ""
128930
+ }, {
128931
+ default: withCtx(() => [
128932
+ unref(showLeftSide) ? (openBlock(), createBlock(ButtonGroup, {
128933
+ key: 0,
128934
+ tabindex: "0",
128935
+ "toolbar-items": getFilteredItems("left"),
128936
+ "ui-font-family": uiFontFamily.value,
128937
+ position: "left",
128938
+ onCommand: handleCommand,
128939
+ onItemClicked: restoreSelection2,
128940
+ class: "superdoc-toolbar-group-side"
128941
+ }, null, 8, ["toolbar-items", "ui-font-family"])) : createCommentVNode("", true),
128942
+ createVNode(ButtonGroup, {
128943
+ tabindex: "0",
128944
+ "toolbar-items": getFilteredItems("center"),
128945
+ "overflow-items": unref(proxy).$toolbar.overflowItems,
128946
+ "ui-font-family": uiFontFamily.value,
128947
+ position: "center",
128948
+ onCommand: handleCommand,
128949
+ onItemClicked: restoreSelection2
128950
+ }, null, 8, ["toolbar-items", "overflow-items", "ui-font-family"]),
128951
+ unref(showRightSide) ? (openBlock(), createBlock(ButtonGroup, {
128952
+ key: 1,
128953
+ tabindex: "0",
128954
+ "toolbar-items": getFilteredItems("right"),
128955
+ "ui-font-family": uiFontFamily.value,
128956
+ position: "right",
128957
+ onCommand: handleCommand,
128958
+ onItemClicked: restoreSelection2,
128959
+ class: "superdoc-toolbar-group-side"
128960
+ }, null, 8, ["toolbar-items", "ui-font-family"])) : createCommentVNode("", true)
128961
+ ]),
128962
+ _: 1
128963
+ })
128728
128964
  ]);
128729
128965
  };
128730
128966
  }
128731
128967
  };
128732
- const Toolbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__scopeId", "data-v-3f5ec271"]]);
128968
+ const Toolbar = /* @__PURE__ */ _export_sfc$1(_sfc_main$k, [["__scopeId", "data-v-c7a72aa9"]]);
128733
128969
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
128734
128970
  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: ";
128735
128971
  async function baseInsightsFetch(payload, options = {}) {
@@ -129246,7 +129482,7 @@ ${style2}
129246
129482
  };
129247
129483
  }
129248
129484
  };
129249
- const AIWriter = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["__scopeId", "data-v-d869be75"]]);
129485
+ const AIWriter = /* @__PURE__ */ _export_sfc$1(_sfc_main$j, [["__scopeId", "data-v-a4bc3d14"]]);
129250
129486
  async function createZip(blobs, fileNames) {
129251
129487
  const zip = new JSZip();
129252
129488
  blobs.forEach((blob, index2) => {
@@ -132095,6 +132331,10 @@ ${style2}
132095
132331
  this.config.selector = this.config.element;
132096
132332
  }
132097
132333
  this.toolbarContainer = this.findElementBySelector(this.config.selector);
132334
+ if (this.toolbarContainer) {
132335
+ const uiFontFamily = (this.config?.uiDisplayFallbackFont || "").toString().trim() || "Arial, Helvetica, sans-serif";
132336
+ this.toolbarContainer.style.setProperty("--sd-ui-font-family", uiFontFamily);
132337
+ }
132098
132338
  __privateMethod(this, _SuperToolbar_instances, initToolbarGroups_fn).call(this);
132099
132339
  __privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
132100
132340
  superToolbar: this,
@@ -139076,6 +139316,62 @@ ${reason}`);
139076
139316
  handleTrackedChangeUpdate
139077
139317
  };
139078
139318
  });
139319
+ const commentIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"/></svg>';
139320
+ const caretDownIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"/></svg>';
139321
+ const userCheckIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM625 177L497 305c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L591 143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>';
139322
+ const usersIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192l42.7 0c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0L21.3 320C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7l42.7 0C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3l-213.3 0zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352l117.3 0C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7l-330.7 0c-14.7 0-26.7-11.9-26.7-26.7z"/></svg>';
139323
+ const checkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>';
139324
+ const xmarkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>';
139325
+ const ellipsisVerticalSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/></svg>';
139326
+ const superdocIcons = {
139327
+ comment: commentIconSvg,
139328
+ caretDown: caretDownIconSvg,
139329
+ internal: userCheckIconSvg,
139330
+ external: usersIconSvg,
139331
+ markDone: checkIconSvg,
139332
+ acceptChange: checkIconSvg,
139333
+ rejectChange: xmarkIconSvg,
139334
+ overflow: ellipsisVerticalSvg
139335
+ };
139336
+ const _export_sfc = (sfc, props) => {
139337
+ const target = sfc.__vccOpts || sfc;
139338
+ for (const [key2, val] of props) {
139339
+ target[key2] = val;
139340
+ }
139341
+ return target;
139342
+ };
139343
+ const _hoisted_1$g = { class: "user-container" };
139344
+ const _hoisted_2$9 = ["src"];
139345
+ const _hoisted_3$7 = {
139346
+ key: 1,
139347
+ class: "user-bg"
139348
+ };
139349
+ const _sfc_main$h = {
139350
+ __name: "Avatar",
139351
+ props: {
139352
+ user: {
139353
+ type: Object,
139354
+ required: true
139355
+ }
139356
+ },
139357
+ setup(__props) {
139358
+ const getInitials2 = (name, email) => {
139359
+ if (!name && !email) return;
139360
+ const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
139361
+ return firstLetter;
139362
+ };
139363
+ return (_ctx, _cache) => {
139364
+ return openBlock(), createElementBlock("div", _hoisted_1$g, [
139365
+ __props.user.image ? (openBlock(), createElementBlock("img", {
139366
+ key: 0,
139367
+ class: "user-bg",
139368
+ src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
139369
+ }, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(getInitials2(__props.user.name, __props.user.email)), 1))
139370
+ ]);
139371
+ };
139372
+ }
139373
+ };
139374
+ const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-53e13009"]]);
139079
139375
  function plugin$1(options) {
139080
139376
  let _bPrefix = ".";
139081
139377
  let _ePrefix = "__";
@@ -142663,30 +142959,30 @@ ${style2}
142663
142959
  function useConfig(props = {}, options = {
142664
142960
  defaultBordered: true
142665
142961
  }) {
142666
- const NConfigProvider = inject(configProviderInjectionKey, null);
142962
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
142667
142963
  return {
142668
142964
  // NConfigProvider,
142669
- inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,
142670
- mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,
142671
- mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,
142672
- mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,
142965
+ inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
142966
+ mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
142967
+ mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
142968
+ mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
142673
142969
  mergedBorderedRef: computed(() => {
142674
142970
  var _a2, _b2;
142675
142971
  const {
142676
142972
  bordered
142677
142973
  } = props;
142678
142974
  if (bordered !== void 0) return bordered;
142679
- return (_b2 = (_a2 = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value) !== null && _a2 !== void 0 ? _a2 : options.defaultBordered) !== null && _b2 !== void 0 ? _b2 : true;
142975
+ return (_b2 = (_a2 = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value) !== null && _a2 !== void 0 ? _a2 : options.defaultBordered) !== null && _b2 !== void 0 ? _b2 : true;
142680
142976
  }),
142681
- mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix),
142682
- namespaceRef: computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value)
142977
+ mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : shallowRef(defaultClsPrefix),
142978
+ namespaceRef: computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
142683
142979
  };
142684
142980
  }
142685
142981
  function useThemeClass(componentName, hashRef, cssVarsRef, props) {
142686
142982
  if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
142687
- const NConfigProvider = inject(configProviderInjectionKey, null);
142688
- const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef;
142689
- const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget;
142983
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
142984
+ const mergedThemeHashRef = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeHashRef;
142985
+ const styleMountTarget = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget;
142690
142986
  const themeClassRef = ref("");
142691
142987
  const ssrAdapter2 = useSsrAdapter();
142692
142988
  let renderCallback;
@@ -144155,7 +144451,7 @@ ${style2}
144155
144451
  }
144156
144452
  return componentRtlState;
144157
144453
  });
144158
- const NConfigProvider = inject(configProviderInjectionKey, null);
144454
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
144159
144455
  const mountStyle = () => {
144160
144456
  watchEffect(() => {
144161
144457
  const {
@@ -144175,7 +144471,7 @@ ${style2}
144175
144471
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
144176
144472
  },
144177
144473
  ssr: ssrAdapter2,
144178
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
144474
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
144179
144475
  });
144180
144476
  });
144181
144477
  };
@@ -144233,7 +144529,7 @@ ${style2}
144233
144529
  return;
144234
144530
  }
144235
144531
  const ssrAdapter2 = useSsrAdapter();
144236
- const NConfigProvider = inject(configProviderInjectionKey, null);
144532
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
144237
144533
  const mountStyle = () => {
144238
144534
  const clsPrefix = clsPrefixRef.value;
144239
144535
  style2.mount({
@@ -144244,15 +144540,15 @@ ${style2}
144244
144540
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
144245
144541
  },
144246
144542
  ssr: ssrAdapter2,
144247
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
144543
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
144248
144544
  });
144249
- if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
144545
+ if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
144250
144546
  globalStyle.mount({
144251
144547
  id: "n-global",
144252
144548
  head: true,
144253
144549
  anchorMetaName: cssrAnchorMetaName,
144254
144550
  ssr: ssrAdapter2,
144255
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
144551
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
144256
144552
  });
144257
144553
  }
144258
144554
  };
@@ -144267,7 +144563,7 @@ ${style2}
144267
144563
  }
144268
144564
  function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
144269
144565
  const ssrAdapter2 = useSsrAdapter();
144270
- const NConfigProvider = inject(configProviderInjectionKey, null);
144566
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
144271
144567
  if (style2) {
144272
144568
  const mountStyle = () => {
144273
144569
  const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
@@ -144279,15 +144575,15 @@ ${style2}
144279
144575
  },
144280
144576
  anchorMetaName: cssrAnchorMetaName,
144281
144577
  ssr: ssrAdapter2,
144282
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
144578
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
144283
144579
  });
144284
- if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
144580
+ if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
144285
144581
  globalStyle.mount({
144286
144582
  id: "n-global",
144287
144583
  head: true,
144288
144584
  anchorMetaName: cssrAnchorMetaName,
144289
144585
  ssr: ssrAdapter2,
144290
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
144586
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
144291
144587
  });
144292
144588
  }
144293
144589
  };
@@ -144319,11 +144615,11 @@ ${style2}
144319
144615
  self: globalSelf = void 0,
144320
144616
  peers: globalPeers = {}
144321
144617
  } = {}
144322
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {};
144618
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
144323
144619
  const {
144324
144620
  common: globalCommonOverrides = void 0,
144325
144621
  [resolveId]: globalSelfOverrides = {}
144326
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {};
144622
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
144327
144623
  const {
144328
144624
  common: globalSelfCommonOverrides,
144329
144625
  peers: globalPeersOverrides = {}
@@ -148129,6 +148425,209 @@ ${style2}
148129
148425
  }))), labelNode);
148130
148426
  }
148131
148427
  });
148428
+ const configProviderProps = {
148429
+ abstract: Boolean,
148430
+ bordered: {
148431
+ type: Boolean,
148432
+ default: void 0
148433
+ },
148434
+ clsPrefix: String,
148435
+ locale: Object,
148436
+ dateLocale: Object,
148437
+ namespace: String,
148438
+ rtl: Array,
148439
+ tag: {
148440
+ type: String,
148441
+ default: "div"
148442
+ },
148443
+ hljs: Object,
148444
+ katex: Object,
148445
+ theme: Object,
148446
+ themeOverrides: Object,
148447
+ componentOptions: Object,
148448
+ icons: Object,
148449
+ breakpoints: Object,
148450
+ preflightStyleDisabled: Boolean,
148451
+ styleMountTarget: Object,
148452
+ inlineThemeDisabled: {
148453
+ type: Boolean,
148454
+ default: void 0
148455
+ },
148456
+ // deprecated
148457
+ as: {
148458
+ type: String,
148459
+ validator: () => {
148460
+ warn("config-provider", "`as` is deprecated, please use `tag` instead.");
148461
+ return true;
148462
+ },
148463
+ default: void 0
148464
+ }
148465
+ };
148466
+ const NConfigProvider = /* @__PURE__ */ defineComponent({
148467
+ name: "ConfigProvider",
148468
+ alias: ["App"],
148469
+ props: configProviderProps,
148470
+ setup(props) {
148471
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
148472
+ const mergedThemeRef = computed(() => {
148473
+ const {
148474
+ theme
148475
+ } = props;
148476
+ if (theme === null) return void 0;
148477
+ const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
148478
+ return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
148479
+ });
148480
+ const mergedThemeOverridesRef = computed(() => {
148481
+ const {
148482
+ themeOverrides
148483
+ } = props;
148484
+ if (themeOverrides === null) return void 0;
148485
+ if (themeOverrides === void 0) {
148486
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
148487
+ } else {
148488
+ const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
148489
+ if (inheritedThemeOverrides === void 0) {
148490
+ return themeOverrides;
148491
+ } else {
148492
+ return merge$2({}, inheritedThemeOverrides, themeOverrides);
148493
+ }
148494
+ }
148495
+ });
148496
+ const mergedNamespaceRef = useMemo(() => {
148497
+ const {
148498
+ namespace: namespace2
148499
+ } = props;
148500
+ return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
148501
+ });
148502
+ const mergedBorderedRef = useMemo(() => {
148503
+ const {
148504
+ bordered
148505
+ } = props;
148506
+ return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
148507
+ });
148508
+ const mergedIconsRef = computed(() => {
148509
+ const {
148510
+ icons: icons2
148511
+ } = props;
148512
+ return icons2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons2;
148513
+ });
148514
+ const mergedComponentPropsRef = computed(() => {
148515
+ const {
148516
+ componentOptions
148517
+ } = props;
148518
+ if (componentOptions !== void 0) return componentOptions;
148519
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
148520
+ });
148521
+ const mergedClsPrefixRef = computed(() => {
148522
+ const {
148523
+ clsPrefix
148524
+ } = props;
148525
+ if (clsPrefix !== void 0) return clsPrefix;
148526
+ if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
148527
+ return defaultClsPrefix;
148528
+ });
148529
+ const mergedRtlRef = computed(() => {
148530
+ var _a2;
148531
+ const {
148532
+ rtl
148533
+ } = props;
148534
+ if (rtl === void 0) {
148535
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
148536
+ }
148537
+ const rtlEnabledState = {};
148538
+ for (const rtlInfo of rtl) {
148539
+ rtlEnabledState[rtlInfo.name] = markRaw(rtlInfo);
148540
+ (_a2 = rtlInfo.peers) === null || _a2 === void 0 ? void 0 : _a2.forEach((peerRtlInfo) => {
148541
+ if (!(peerRtlInfo.name in rtlEnabledState)) {
148542
+ rtlEnabledState[peerRtlInfo.name] = markRaw(peerRtlInfo);
148543
+ }
148544
+ });
148545
+ }
148546
+ return rtlEnabledState;
148547
+ });
148548
+ const mergedBreakpointsRef = computed(() => {
148549
+ return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
148550
+ });
148551
+ const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
148552
+ const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
148553
+ const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
148554
+ const mergedThemeHashRef = computed(() => {
148555
+ const {
148556
+ value: theme
148557
+ } = mergedThemeRef;
148558
+ const {
148559
+ value: mergedThemeOverrides
148560
+ } = mergedThemeOverridesRef;
148561
+ const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
148562
+ const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
148563
+ if (themeName) {
148564
+ if (hasThemeOverrides) {
148565
+ return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
148566
+ }
148567
+ return themeName;
148568
+ } else {
148569
+ if (hasThemeOverrides) {
148570
+ return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
148571
+ }
148572
+ return "";
148573
+ }
148574
+ });
148575
+ provide(configProviderInjectionKey, {
148576
+ mergedThemeHashRef,
148577
+ mergedBreakpointsRef,
148578
+ mergedRtlRef,
148579
+ mergedIconsRef,
148580
+ mergedComponentPropsRef,
148581
+ mergedBorderedRef,
148582
+ mergedNamespaceRef,
148583
+ mergedClsPrefixRef,
148584
+ mergedLocaleRef: computed(() => {
148585
+ const {
148586
+ locale
148587
+ } = props;
148588
+ if (locale === null) return void 0;
148589
+ return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
148590
+ }),
148591
+ mergedDateLocaleRef: computed(() => {
148592
+ const {
148593
+ dateLocale
148594
+ } = props;
148595
+ if (dateLocale === null) return void 0;
148596
+ return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
148597
+ }),
148598
+ mergedHljsRef: computed(() => {
148599
+ const {
148600
+ hljs
148601
+ } = props;
148602
+ return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
148603
+ }),
148604
+ mergedKatexRef: computed(() => {
148605
+ const {
148606
+ katex
148607
+ } = props;
148608
+ return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
148609
+ }),
148610
+ mergedThemeRef,
148611
+ mergedThemeOverridesRef,
148612
+ inlineThemeDisabled: inlineThemeDisabled || false,
148613
+ preflightStyleDisabled: preflightStyleDisabled || false,
148614
+ styleMountTarget
148615
+ });
148616
+ return {
148617
+ mergedClsPrefix: mergedClsPrefixRef,
148618
+ mergedBordered: mergedBorderedRef,
148619
+ mergedNamespace: mergedNamespaceRef,
148620
+ mergedTheme: mergedThemeRef,
148621
+ mergedThemeOverrides: mergedThemeOverridesRef
148622
+ };
148623
+ },
148624
+ render() {
148625
+ var _a2, _b2, _c, _d;
148626
+ return !this.abstract ? h$1(this.as || this.tag, {
148627
+ class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
148628
+ }, (_b2 = (_a2 = this.$slots).default) === null || _b2 === void 0 ? void 0 : _b2.call(_a2)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);
148629
+ }
148630
+ });
148132
148631
  const commonVariables$1 = {
148133
148632
  padding: "4px 0",
148134
148633
  optionIconSizeSmall: "14px",
@@ -150224,62 +150723,20 @@ ${style2}
150224
150723
  })) : icon;
150225
150724
  }
150226
150725
  });
150227
- const commentIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"/></svg>';
150228
- const caretDownIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"/></svg>';
150229
- const userCheckIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M96 128a128 128 0 1 1 256 0A128 128 0 1 1 96 128zM0 482.3C0 383.8 79.8 304 178.3 304l91.4 0C368.2 304 448 383.8 448 482.3c0 16.4-13.3 29.7-29.7 29.7L29.7 512C13.3 512 0 498.7 0 482.3zM625 177L497 305c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L591 143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"/></svg>';
150230
- const usersIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192l42.7 0c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0L21.3 320C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7l42.7 0C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3l-213.3 0zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352l117.3 0C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7l-330.7 0c-14.7 0-26.7-11.9-26.7-26.7z"/></svg>';
150231
- const checkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>';
150232
- const xmarkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"/></svg>';
150233
- const ellipsisVerticalSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"/></svg>';
150234
- const superdocIcons = {
150235
- comment: commentIconSvg,
150236
- caretDown: caretDownIconSvg,
150237
- internal: userCheckIconSvg,
150238
- external: usersIconSvg,
150239
- markDone: checkIconSvg,
150240
- acceptChange: checkIconSvg,
150241
- rejectChange: xmarkIconSvg,
150242
- overflow: ellipsisVerticalSvg
150243
- };
150244
- const _export_sfc = (sfc, props) => {
150245
- const target = sfc.__vccOpts || sfc;
150246
- for (const [key2, val] of props) {
150247
- target[key2] = val;
150248
- }
150249
- return target;
150250
- };
150251
- const _hoisted_1$g = { class: "user-container" };
150252
- const _hoisted_2$9 = ["src"];
150253
- const _hoisted_3$7 = {
150254
- key: 1,
150255
- class: "user-bg"
150256
- };
150257
- const _sfc_main$h = {
150258
- __name: "Avatar",
150259
- props: {
150260
- user: {
150261
- type: Object,
150262
- required: true
150726
+ const DEFAULT_UI_FONT_FAMILY = "Arial, Helvetica, sans-serif";
150727
+ function useUiFontFamily() {
150728
+ const instance = getCurrentInstance();
150729
+ const uiFontFamily = computed(() => {
150730
+ const configured = instance?.proxy?.$superdoc?.config?.uiDisplayFallbackFont;
150731
+ if (typeof configured === "string" && configured.trim()) {
150732
+ return configured.trim();
150263
150733
  }
150264
- },
150265
- setup(__props) {
150266
- const getInitials2 = (name, email) => {
150267
- if (!name && !email) return;
150268
- const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
150269
- return firstLetter;
150270
- };
150271
- return (_ctx, _cache) => {
150272
- return openBlock(), createElementBlock("div", _hoisted_1$g, [
150273
- __props.user.image ? (openBlock(), createElementBlock("img", {
150274
- key: 0,
150275
- class: "user-bg",
150276
- src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
150277
- }, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(getInitials2(__props.user.name, __props.user.email)), 1))
150278
- ]);
150279
- };
150280
- }
150281
- };
150282
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-53e13009"]]);
150734
+ return DEFAULT_UI_FONT_FAMILY;
150735
+ });
150736
+ return {
150737
+ uiFontFamily
150738
+ };
150739
+ }
150283
150740
  const _hoisted_1$f = { class: "comment-option" };
150284
150741
  const _hoisted_2$8 = ["innerHTML"];
150285
150742
  const _hoisted_3$6 = { class: "option-state" };
@@ -150300,6 +150757,7 @@ ${style2}
150300
150757
  setup(__props, { emit: __emit }) {
150301
150758
  const emit2 = __emit;
150302
150759
  const props = __props;
150760
+ const { uiFontFamily } = useUiFontFamily();
150303
150761
  const renderIcon = (icon) => {
150304
150762
  return () => {
150305
150763
  return h$1("div", { innerHTML: icon, class: "internal-dropdown__item-icon" });
@@ -150361,7 +150819,8 @@ ${style2}
150361
150819
  trigger: "click",
150362
150820
  options,
150363
150821
  onSelect: _cache[0] || (_cache[0] = ($event) => handleSelect($event)),
150364
- disabled: __props.isDisabled
150822
+ disabled: __props.isDisabled,
150823
+ "content-style": { fontFamily: unref(uiFontFamily) }
150365
150824
  }, {
150366
150825
  default: withCtx(() => [
150367
150826
  createBaseVNode("div", _hoisted_1$f, [
@@ -150377,12 +150836,12 @@ ${style2}
150377
150836
  ])
150378
150837
  ]),
150379
150838
  _: 1
150380
- }, 8, ["disabled"])
150839
+ }, 8, ["disabled", "content-style"])
150381
150840
  ], 4);
150382
150841
  };
150383
150842
  }
150384
150843
  };
150385
- const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-a88dddd9"]]);
150844
+ const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-8b9e3b75"]]);
150386
150845
  function formatDate(timestamp) {
150387
150846
  const date = new Date(timestamp);
150388
150847
  const hours = date.getHours();
@@ -150528,6 +150987,7 @@ ${style2}
150528
150987
  const role = proxy.$superdoc.config.role;
150529
150988
  const isInternal = proxy.$superdoc.config.isInternal;
150530
150989
  const isOwnComment = props.comment.creatorEmail === proxy.$superdoc.config.user.email;
150990
+ const { uiFontFamily } = useUiFontFamily();
150531
150991
  const OVERFLOW_OPTIONS = Object.freeze({
150532
150992
  edit: { label: "Edit", key: "edit" },
150533
150993
  delete: { label: "Delete", key: "delete" }
@@ -150631,7 +151091,8 @@ ${style2}
150631
151091
  key: 2,
150632
151092
  trigger: "click",
150633
151093
  options: getOverflowOptions.value,
150634
- onSelect: handleSelect
151094
+ onSelect: handleSelect,
151095
+ "content-style": { fontFamily: unref(uiFontFamily) }
150635
151096
  }, {
150636
151097
  default: withCtx(() => [
150637
151098
  createBaseVNode("div", {
@@ -150646,13 +151107,13 @@ ${style2}
150646
151107
  ])
150647
151108
  ]),
150648
151109
  _: 1
150649
- }, 8, ["options"])) : createCommentVNode("", true)
151110
+ }, 8, ["options", "content-style"])) : createCommentVNode("", true)
150650
151111
  ])
150651
151112
  ]);
150652
151113
  };
150653
151114
  }
150654
151115
  };
150655
- const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-0f4f53ef"]]);
151116
+ const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-5e404f08"]]);
150656
151117
  const _hoisted_1$d = { class: "input-section" };
150657
151118
  const _sfc_main$e = {
150658
151119
  __name: "CommentInput",
@@ -151072,7 +151533,7 @@ ${style2}
151072
151533
  };
151073
151534
  }
151074
151535
  };
151075
- const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-36e5f63e"]]);
151536
+ const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-abfa4e05"]]);
151076
151537
  const _hoisted_1$b = { class: "comments-list" };
151077
151538
  const _hoisted_2$5 = { key: 0 };
151078
151539
  const _hoisted_3$3 = { class: "comment-item" };
@@ -151673,7 +152134,7 @@ ${style2}
151673
152134
  };
151674
152135
  }
151675
152136
  };
151676
- const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-b8cacb22"]]);
152137
+ const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-1e49d9b3"]]);
151677
152138
  const floor = (val, precision) => {
151678
152139
  const multiplier = 10 ** precision;
151679
152140
  return Math.floor(val * multiplier) / multiplier;
@@ -152118,11 +152579,15 @@ ${style2}
152118
152579
  const { proxy } = getCurrentInstance();
152119
152580
  commentsStore.proxy = proxy;
152120
152581
  const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
152582
+ const { uiFontFamily } = useUiFontFamily();
152121
152583
  const commentsModuleConfig = computed(() => {
152122
152584
  const config2 = modules.comments;
152123
152585
  if (config2 === false || config2 == null) return null;
152124
152586
  return config2;
152125
152587
  });
152588
+ const superdocStyleVars = computed(() => ({
152589
+ "--sd-ui-font-family": uiFontFamily.value
152590
+ }));
152126
152591
  const layers = ref(null);
152127
152592
  const commentsLayer = ref(null);
152128
152593
  const toolsMenuPosition = reactive({ top: null, right: "-25px", zIndex: 101 });
@@ -152639,155 +153104,164 @@ ${style2}
152639
153104
  });
152640
153105
  return (_ctx, _cache) => {
152641
153106
  const _directive_click_outside = resolveDirective("click-outside");
152642
- return openBlock(), createElementBlock("div", {
152643
- class: normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": unref(isHighContrastMode2) }])
152644
- }, [
152645
- createBaseVNode("div", {
152646
- class: "superdoc__layers layers",
152647
- ref_key: "layers",
152648
- ref: layers,
152649
- role: "group"
152650
- }, [
152651
- showToolsFloatingMenu.value ? (openBlock(), createElementBlock("div", {
152652
- key: 0,
152653
- class: "superdoc__tools tools",
152654
- style: normalizeStyle(toolsMenuPosition)
153107
+ return openBlock(), createBlock(unref(NConfigProvider), {
153108
+ abstract: "",
153109
+ "preflight-style-disabled": ""
153110
+ }, {
153111
+ default: withCtx(() => [
153112
+ createBaseVNode("div", {
153113
+ class: normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": unref(isHighContrastMode2) }]),
153114
+ style: normalizeStyle(superdocStyleVars.value)
152655
153115
  }, [
152656
153116
  createBaseVNode("div", {
152657
- class: "tools-item",
152658
- "data-id": "is-tool",
152659
- onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
152660
- }, [
152661
- createBaseVNode("div", {
152662
- class: "superdoc__tools-icon",
152663
- innerHTML: unref(superdocIcons).comment
152664
- }, null, 8, _hoisted_1$1)
152665
- ], 32),
152666
- unref(proxy).$superdoc.config.modules.ai ? (openBlock(), createElementBlock("div", {
152667
- key: 0,
152668
- class: "tools-item",
152669
- "data-id": "is-tool",
152670
- onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
152671
- }, [..._cache[3] || (_cache[3] = [
152672
- createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
152673
- ])], 32)) : createCommentVNode("", true)
152674
- ], 4)) : createCommentVNode("", true),
152675
- createBaseVNode("div", _hoisted_2, [
152676
- isCommentsEnabled.value ? (openBlock(), createElementBlock("div", {
152677
- key: 0,
152678
- class: "superdoc__selection-layer selection-layer",
152679
- onMousedown: handleSelectionStart,
152680
- onMouseup: handleDragEnd,
152681
- ref_key: "selectionLayer",
152682
- ref: selectionLayer
153117
+ class: "superdoc__layers layers",
153118
+ ref_key: "layers",
153119
+ ref: layers,
153120
+ role: "group"
152683
153121
  }, [
152684
- unref(selectionPosition) && shouldShowSelection.value ? (openBlock(), createElementBlock("div", {
153122
+ showToolsFloatingMenu.value ? (openBlock(), createElementBlock("div", {
152685
153123
  key: 0,
152686
- style: normalizeStyle(getSelectionPosition.value),
152687
- class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
152688
- }, null, 4)) : createCommentVNode("", true)
152689
- ], 544)) : createCommentVNode("", true),
152690
- "hrbr-fields" in unref(modules) && layers.value ? (openBlock(), createBlock(HrbrFieldsLayer, {
152691
- key: 1,
152692
- fields: unref(modules)["hrbr-fields"],
152693
- class: "superdoc__comments-layer comments-layer",
152694
- style: { "z-index": "2" },
152695
- ref_key: "hrbrFieldsLayer",
152696
- ref: hrbrFieldsLayer
152697
- }, null, 8, ["fields"])) : createCommentVNode("", true),
152698
- layers.value ? (openBlock(), createBlock(CommentsLayer, {
152699
- key: 2,
152700
- class: "superdoc__comments-layer comments-layer",
152701
- style: { "z-index": "3" },
152702
- ref_key: "commentsLayer",
152703
- ref: commentsLayer,
152704
- parent: layers.value,
152705
- user: unref(user),
152706
- onHighlightClick: handleHighlightClick
152707
- }, null, 8, ["parent", "user"])) : createCommentVNode("", true),
152708
- unref(showAiLayer) ? (openBlock(), createBlock(AiLayer, {
152709
- key: 3,
152710
- class: "ai-layer",
152711
- style: { "z-index": "4" },
152712
- ref_key: "aiLayer",
152713
- ref: aiLayer,
152714
- editor: unref(proxy).$superdoc.activeEditor
152715
- }, null, 8, ["editor"])) : createCommentVNode("", true),
152716
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(documents), (doc2) => {
152717
- return openBlock(), createElementBlock("div", {
152718
- class: "superdoc__sub-document sub-document",
152719
- key: doc2.id
153124
+ class: "superdoc__tools tools",
153125
+ style: normalizeStyle(toolsMenuPosition)
152720
153126
  }, [
152721
- doc2.type === unref(PDF) ? (openBlock(), createBlock(unref(PdfViewer2), {
153127
+ createBaseVNode("div", {
153128
+ class: "tools-item",
153129
+ "data-id": "is-tool",
153130
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
153131
+ }, [
153132
+ createBaseVNode("div", {
153133
+ class: "superdoc__tools-icon",
153134
+ innerHTML: unref(superdocIcons).comment
153135
+ }, null, 8, _hoisted_1$1)
153136
+ ], 32),
153137
+ unref(proxy).$superdoc.config.modules.ai ? (openBlock(), createElementBlock("div", {
152722
153138
  key: 0,
152723
- "document-data": doc2,
152724
- config: unref(pdfConfig),
152725
- onSelectionChange: handleSelectionChange,
152726
- onReady: handleDocumentReady,
152727
- onPageLoaded: unref(handlePageReady),
152728
- onBypassSelection: handlePdfClick
152729
- }, null, 8, ["document-data", "config", "onPageLoaded"])) : createCommentVNode("", true),
152730
- createVNode(unref(NMessageProvider), null, {
152731
- default: withCtx(() => [
152732
- doc2.type === unref(DOCX) ? (openBlock(), createBlock(unref(SuperEditor), {
153139
+ class: "tools-item",
153140
+ "data-id": "is-tool",
153141
+ onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
153142
+ }, [..._cache[3] || (_cache[3] = [
153143
+ createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
153144
+ ])], 32)) : createCommentVNode("", true)
153145
+ ], 4)) : createCommentVNode("", true),
153146
+ createBaseVNode("div", _hoisted_2, [
153147
+ isCommentsEnabled.value ? (openBlock(), createElementBlock("div", {
153148
+ key: 0,
153149
+ class: "superdoc__selection-layer selection-layer",
153150
+ onMousedown: handleSelectionStart,
153151
+ onMouseup: handleDragEnd,
153152
+ ref_key: "selectionLayer",
153153
+ ref: selectionLayer
153154
+ }, [
153155
+ unref(selectionPosition) && shouldShowSelection.value ? (openBlock(), createElementBlock("div", {
153156
+ key: 0,
153157
+ style: normalizeStyle(getSelectionPosition.value),
153158
+ class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
153159
+ }, null, 4)) : createCommentVNode("", true)
153160
+ ], 544)) : createCommentVNode("", true),
153161
+ "hrbr-fields" in unref(modules) && layers.value ? (openBlock(), createBlock(HrbrFieldsLayer, {
153162
+ key: 1,
153163
+ fields: unref(modules)["hrbr-fields"],
153164
+ class: "superdoc__comments-layer comments-layer",
153165
+ style: { "z-index": "2" },
153166
+ ref_key: "hrbrFieldsLayer",
153167
+ ref: hrbrFieldsLayer
153168
+ }, null, 8, ["fields"])) : createCommentVNode("", true),
153169
+ layers.value ? (openBlock(), createBlock(CommentsLayer, {
153170
+ key: 2,
153171
+ class: "superdoc__comments-layer comments-layer",
153172
+ style: { "z-index": "3" },
153173
+ ref_key: "commentsLayer",
153174
+ ref: commentsLayer,
153175
+ parent: layers.value,
153176
+ user: unref(user),
153177
+ onHighlightClick: handleHighlightClick
153178
+ }, null, 8, ["parent", "user"])) : createCommentVNode("", true),
153179
+ unref(showAiLayer) ? (openBlock(), createBlock(AiLayer, {
153180
+ key: 3,
153181
+ class: "ai-layer",
153182
+ style: { "z-index": "4" },
153183
+ ref_key: "aiLayer",
153184
+ ref: aiLayer,
153185
+ editor: unref(proxy).$superdoc.activeEditor
153186
+ }, null, 8, ["editor"])) : createCommentVNode("", true),
153187
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(documents), (doc2) => {
153188
+ return openBlock(), createElementBlock("div", {
153189
+ class: "superdoc__sub-document sub-document",
153190
+ key: doc2.id
153191
+ }, [
153192
+ doc2.type === unref(PDF) ? (openBlock(), createBlock(unref(PdfViewer2), {
152733
153193
  key: 0,
153194
+ "document-data": doc2,
153195
+ config: unref(pdfConfig),
153196
+ onSelectionChange: handleSelectionChange,
153197
+ onReady: handleDocumentReady,
153198
+ onPageLoaded: unref(handlePageReady),
153199
+ onBypassSelection: handlePdfClick
153200
+ }, null, 8, ["document-data", "config", "onPageLoaded"])) : createCommentVNode("", true),
153201
+ createVNode(unref(NMessageProvider), null, {
153202
+ default: withCtx(() => [
153203
+ doc2.type === unref(DOCX) ? (openBlock(), createBlock(unref(SuperEditor), {
153204
+ key: 0,
153205
+ "file-source": doc2.data,
153206
+ state: doc2.state,
153207
+ "document-id": doc2.id,
153208
+ options: { ...editorOptions(doc2), rulers: doc2.rulers },
153209
+ onEditorReady,
153210
+ onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc2, $event)
153211
+ }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : createCommentVNode("", true)
153212
+ ]),
153213
+ _: 2
153214
+ }, 1024),
153215
+ doc2.type === unref(HTML) ? (openBlock(), createBlock(HtmlViewer, {
153216
+ key: 1,
153217
+ onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
153218
+ onSelectionChange: handleSelectionChange,
152734
153219
  "file-source": doc2.data,
152735
- state: doc2.state,
152736
- "document-id": doc2.id,
152737
- options: { ...editorOptions(doc2), rulers: doc2.rulers },
152738
- onEditorReady,
152739
- onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc2, $event)
152740
- }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : createCommentVNode("", true)
152741
- ]),
152742
- _: 2
152743
- }, 1024),
152744
- doc2.type === unref(HTML) ? (openBlock(), createBlock(HtmlViewer, {
152745
- key: 1,
152746
- onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
152747
- onSelectionChange: handleSelectionChange,
152748
- "file-source": doc2.data,
152749
- "document-id": doc2.id
152750
- }, null, 8, ["file-source", "document-id"])) : createCommentVNode("", true)
152751
- ]);
152752
- }), 128))
152753
- ])
152754
- ], 512),
152755
- showCommentsSidebar.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
152756
- unref(pendingComment) ? withDirectives((openBlock(), createBlock(CommentDialog, {
152757
- key: 0,
152758
- comment: unref(pendingComment),
152759
- "auto-focus": true,
152760
- "is-floating": true
152761
- }, null, 8, ["comment"])), [
152762
- [_directive_click_outside, cancelPendingComment]
152763
- ]) : createCommentVNode("", true),
152764
- createBaseVNode("div", _hoisted_4, [
152765
- unref(hasInitializedLocations) && unref(getFloatingComments).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(documentsWithConverations), (doc2) => {
152766
- return openBlock(), createBlock(FloatingComments, {
152767
- parent: layers.value,
152768
- "current-document": doc2
152769
- }, null, 8, ["parent", "current-document"]);
152770
- }), 256)) : createCommentVNode("", true)
152771
- ])
152772
- ])) : createCommentVNode("", true),
152773
- unref(showAiWriter) ? (openBlock(), createElementBlock("div", {
152774
- key: 1,
152775
- class: "ai-writer-container",
152776
- style: normalizeStyle(unref(aiWriterPosition))
152777
- }, [
152778
- createVNode(unref(AIWriter), {
152779
- "selected-text": unref(selectedText),
152780
- "handle-close": unref(handleAiWriterClose),
152781
- editor: unref(proxy).$superdoc.activeEditor,
152782
- "api-key": unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
152783
- endpoint: unref(proxy).$superdoc.config?.modules?.ai?.endpoint
152784
- }, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
152785
- ], 4)) : createCommentVNode("", true)
152786
- ], 2);
153220
+ "document-id": doc2.id
153221
+ }, null, 8, ["file-source", "document-id"])) : createCommentVNode("", true)
153222
+ ]);
153223
+ }), 128))
153224
+ ])
153225
+ ], 512),
153226
+ showCommentsSidebar.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
153227
+ unref(pendingComment) ? withDirectives((openBlock(), createBlock(CommentDialog, {
153228
+ key: 0,
153229
+ comment: unref(pendingComment),
153230
+ "auto-focus": true,
153231
+ "is-floating": true
153232
+ }, null, 8, ["comment"])), [
153233
+ [_directive_click_outside, cancelPendingComment]
153234
+ ]) : createCommentVNode("", true),
153235
+ createBaseVNode("div", _hoisted_4, [
153236
+ unref(hasInitializedLocations) && unref(getFloatingComments).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(documentsWithConverations), (doc2) => {
153237
+ return openBlock(), createBlock(FloatingComments, {
153238
+ parent: layers.value,
153239
+ "current-document": doc2
153240
+ }, null, 8, ["parent", "current-document"]);
153241
+ }), 256)) : createCommentVNode("", true)
153242
+ ])
153243
+ ])) : createCommentVNode("", true),
153244
+ unref(showAiWriter) ? (openBlock(), createElementBlock("div", {
153245
+ key: 1,
153246
+ class: "ai-writer-container",
153247
+ style: normalizeStyle(unref(aiWriterPosition))
153248
+ }, [
153249
+ createVNode(unref(AIWriter), {
153250
+ "selected-text": unref(selectedText),
153251
+ "handle-close": unref(handleAiWriterClose),
153252
+ editor: unref(proxy).$superdoc.activeEditor,
153253
+ "api-key": unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
153254
+ endpoint: unref(proxy).$superdoc.config?.modules?.ai?.endpoint
153255
+ }, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
153256
+ ], 4)) : createCommentVNode("", true)
153257
+ ], 6)
153258
+ ]),
153259
+ _: 1
153260
+ });
152787
153261
  };
152788
153262
  }
152789
153263
  };
152790
- const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e229774d"]]);
153264
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-309688b3"]]);
152791
153265
  const createSuperdocVueApp = () => {
152792
153266
  const app = createApp(App);
152793
153267
  const pinia = createPinia();
@@ -152897,6 +153371,8 @@ ${style2}
152897
153371
  toolbarGroups: ["left", "center", "right"],
152898
153372
  toolbarIcons: {},
152899
153373
  toolbarTexts: {},
153374
+ // UI font for SuperDoc surfaces (toolbar, comments UI, etc.)
153375
+ uiDisplayFallbackFont: "Arial, Helvetica, sans-serif",
152900
153376
  isDev: false,
152901
153377
  // telemetry config
152902
153378
  telemetry: null,
@@ -152967,7 +153443,7 @@ ${style2}
152967
153443
  this.config.colors = shuffleArray(this.config.colors);
152968
153444
  this.userColorMap = /* @__PURE__ */ new Map();
152969
153445
  this.colorIndex = 0;
152970
- this.version = "1.0.0-next.2";
153446
+ this.version = "1.0.0-next.3";
152971
153447
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
152972
153448
  this.superdocId = config2.superdocId || v4();
152973
153449
  this.colors = this.config.colors;
@@ -153326,6 +153802,7 @@ ${style2}
153326
153802
  superdoc: this,
153327
153803
  aiApiKey: this.config.modules?.ai?.apiKey,
153328
153804
  aiEndpoint: this.config.modules?.ai?.endpoint,
153805
+ uiDisplayFallbackFont: this.config.uiDisplayFallbackFont,
153329
153806
  ...moduleConfig,
153330
153807
  excludeItems
153331
153808
  // Override moduleConfig.excludeItems with our computed list
@@ -155439,7 +155916,7 @@ ${style2}
155439
155916
  value && typeof value === "object" && "byteLength" in value && "byteOffset" in value
155440
155917
  );
155441
155918
  }
155442
- const indexBDVXUeCy = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
155919
+ const indexDLOSgUP = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
155443
155920
  __proto__: null,
155444
155921
  unified
155445
155922
  }, Symbol.toStringTag, { value: "Module" }));