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

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-B-xTd4XY.cjs → PdfViewer-CtSTAdvv.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-eykNsWyi.es.js → PdfViewer-DtdN17V4.es.js} +2 -2
  3. package/dist/chunks/{eventemitter3-CcXAdeql.es.js → eventemitter3-44XulWQe.es.js} +1 -1
  4. package/dist/chunks/{index-rF5HExWB.cjs → index-Bj1kFbYe.cjs} +465 -228
  5. package/dist/chunks/{index-DpQ8ZYM0.es.js → index-Cxv7dMYN.es.js} +468 -231
  6. package/dist/chunks/{index-BDVXUeCy-7mwhYeJ7.es.js → index-D_KE9gpD-aIqhxcuF.es.js} +1 -1
  7. package/dist/chunks/{index-BDVXUeCy-Di6ozaOM.cjs → index-D_KE9gpD-radGpP4I.cjs} +1 -1
  8. package/dist/chunks/{jszip-5vvIqAEE.es.js → jszip-VP334ufO.es.js} +1 -1
  9. package/dist/chunks/{super-editor.es-CxajnL9u.es.js → super-editor.es-B2fSLkzN.es.js} +1033 -493
  10. package/dist/chunks/{super-editor.es-CcKbh84I.cjs → super-editor.es-BhQu31e4.cjs} +1032 -492
  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-CVqUjX24.js} +1 -1
  22. package/dist/super-editor/chunks/{docx-zipper-Bhl_yBjL.js → docx-zipper-CsWjoVKD.js} +1 -1
  23. package/dist/super-editor/chunks/{editor-3klx7hyV.js → editor-Cc8nus2C.js} +429 -129
  24. package/dist/super-editor/chunks/{index-BDVXUeCy.js → index-D_KE9gpD.js} +1 -1
  25. package/dist/super-editor/chunks/{toolbar-8YA9ltNC.js → toolbar-CoOpR1xE.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 +1495 -718
  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
@@ -1,11 +1,11 @@
1
- import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CxajnL9u.es.js";
1
+ import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-B2fSLkzN.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
- import { E as EventEmitter } from "./eventemitter3-CcXAdeql.es.js";
3
+ import { E as EventEmitter } from "./eventemitter3-44XulWQe.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
5
- import { a1 as effectScope, r as ref, X as markRaw, a0 as process$1, a2 as toRaw, a as computed, a3 as isRef, a4 as isReactive, E as toRef, i as inject, m as getCurrentInstance, l as watch, v as unref, a5 as hasInjectionContext, M as reactive, q as nextTick, a6 as getCurrentScope, a7 as onScopeDispose, a8 as toRefs, g as global$1, B as shallowRef, N as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, S as onActivated, p as onDeactivated, D as createTextVNode, F as Fragment, Q as Comment, y as defineComponent, G as provide, I as withDirectives, z as h, U as Teleport, R as renderSlot, V as isVNode, J as watchEffect, O as Transition, a9 as TransitionGroup, A as mergeProps, P as vShow, H as cloneVNode, T as Text, b as createElementBlock, o as openBlock, t as toDisplayString, u as createVNode, C as withCtx, f as createBaseVNode, x as normalizeStyle, e as createCommentVNode, s as createBlock, w as withModifiers, n as normalizeClass, aa as resolveDirective, d as renderList, c as createApp, Y as resolveDynamicComponent, ab as defineAsyncComponent } from "./vue-Dysv_7z5.es.js";
5
+ import { a1 as effectScope, r as ref, D as markRaw, a0 as process$1, a2 as toRaw, a as computed, a3 as isRef, a4 as isReactive, H as toRef, i as inject, m as getCurrentInstance, l as watch, x as unref, a5 as hasInjectionContext, N as reactive, q as nextTick, a6 as getCurrentScope, a7 as onScopeDispose, a8 as toRefs, g as global$1, C as shallowRef, b as createElementBlock, o as openBlock, t as toDisplayString, O as readonly, j as onMounted, k as onBeforeUnmount, h as onBeforeMount, U as onActivated, p as onDeactivated, G as createTextVNode, F as Fragment, R as Comment, y as defineComponent, E as provide, J as withDirectives, A as h, V as Teleport, S as renderSlot, W as isVNode, K as watchEffect, P as Transition, a9 as TransitionGroup, B as mergeProps, Q as vShow, I as cloneVNode, T as Text, s as createVNode, u as withCtx, f as createBaseVNode, z as normalizeStyle, e as createCommentVNode, v as createBlock, w as withModifiers, n as normalizeClass, aa as resolveDirective, d as renderList, c as createApp, Y as resolveDynamicComponent, ab as defineAsyncComponent } from "./vue-BuPTonTJ.es.js";
6
6
  import * as Y from "yjs";
7
7
  import { Doc, Map as Map$2 } from "yjs";
8
- import { B as Buffer$2 } from "./jszip-5vvIqAEE.es.js";
8
+ import { B as Buffer$2 } from "./jszip-VP334ufO.es.js";
9
9
  import { v as v4 } from "./uuid-CjlX8hrF.es.js";
10
10
  const DOCX = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
11
11
  const PDF = "application/pdf";
@@ -4408,6 +4408,62 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
4408
4408
  handleTrackedChangeUpdate
4409
4409
  };
4410
4410
  });
4411
+ 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>';
4412
+ 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>';
4413
+ 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>';
4414
+ 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>';
4415
+ 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>';
4416
+ 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>';
4417
+ 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>';
4418
+ const superdocIcons = {
4419
+ comment: commentIconSvg,
4420
+ caretDown: caretDownIconSvg,
4421
+ internal: userCheckIconSvg,
4422
+ external: usersIconSvg,
4423
+ markDone: checkIconSvg,
4424
+ acceptChange: checkIconSvg,
4425
+ rejectChange: xmarkIconSvg,
4426
+ overflow: ellipsisVerticalSvg
4427
+ };
4428
+ const _export_sfc = (sfc, props) => {
4429
+ const target = sfc.__vccOpts || sfc;
4430
+ for (const [key, val] of props) {
4431
+ target[key] = val;
4432
+ }
4433
+ return target;
4434
+ };
4435
+ const _hoisted_1$f = { class: "user-container" };
4436
+ const _hoisted_2$9 = ["src"];
4437
+ const _hoisted_3$7 = {
4438
+ key: 1,
4439
+ class: "user-bg"
4440
+ };
4441
+ const _sfc_main$g = {
4442
+ __name: "Avatar",
4443
+ props: {
4444
+ user: {
4445
+ type: Object,
4446
+ required: true
4447
+ }
4448
+ },
4449
+ setup(__props) {
4450
+ const getInitials = (name, email) => {
4451
+ if (!name && !email) return;
4452
+ const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
4453
+ return firstLetter;
4454
+ };
4455
+ return (_ctx, _cache) => {
4456
+ return openBlock(), createElementBlock("div", _hoisted_1$f, [
4457
+ __props.user.image ? (openBlock(), createElementBlock("img", {
4458
+ key: 0,
4459
+ class: "user-bg",
4460
+ src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
4461
+ }, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
4462
+ ]);
4463
+ };
4464
+ }
4465
+ };
4466
+ const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
4411
4467
  function plugin$1(options) {
4412
4468
  let _bPrefix = ".";
4413
4469
  let _ePrefix = "__";
@@ -8008,30 +8064,30 @@ const defaultClsPrefix = "n";
8008
8064
  function useConfig(props = {}, options = {
8009
8065
  defaultBordered: true
8010
8066
  }) {
8011
- const NConfigProvider = inject(configProviderInjectionKey, null);
8067
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
8012
8068
  return {
8013
8069
  // NConfigProvider,
8014
- inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled,
8015
- mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef,
8016
- mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef,
8017
- mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef,
8070
+ inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
8071
+ mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
8072
+ mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
8073
+ mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
8018
8074
  mergedBorderedRef: computed(() => {
8019
8075
  var _a, _b;
8020
8076
  const {
8021
8077
  bordered
8022
8078
  } = props;
8023
8079
  if (bordered !== void 0) return bordered;
8024
- return (_b = (_a = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;
8080
+ return (_b = (_a = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true;
8025
8081
  }),
8026
- mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix),
8027
- namespaceRef: computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value)
8082
+ mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : shallowRef(defaultClsPrefix),
8083
+ namespaceRef: computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
8028
8084
  };
8029
8085
  }
8030
8086
  function useThemeClass(componentName, hashRef, cssVarsRef, props) {
8031
8087
  if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
8032
- const NConfigProvider = inject(configProviderInjectionKey, null);
8033
- const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef;
8034
- const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget;
8088
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
8089
+ const mergedThemeHashRef = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeHashRef;
8090
+ const styleMountTarget = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget;
8035
8091
  const themeClassRef = ref("");
8036
8092
  const ssrAdapter2 = useSsrAdapter();
8037
8093
  let renderCallback;
@@ -9500,7 +9556,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
9500
9556
  }
9501
9557
  return componentRtlState;
9502
9558
  });
9503
- const NConfigProvider = inject(configProviderInjectionKey, null);
9559
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
9504
9560
  const mountStyle = () => {
9505
9561
  watchEffect(() => {
9506
9562
  const {
@@ -9520,7 +9576,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
9520
9576
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
9521
9577
  },
9522
9578
  ssr: ssrAdapter2,
9523
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9579
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9524
9580
  });
9525
9581
  });
9526
9582
  };
@@ -9579,7 +9635,7 @@ function useStyle(mountId, style2, clsPrefixRef) {
9579
9635
  return;
9580
9636
  }
9581
9637
  const ssrAdapter2 = useSsrAdapter();
9582
- const NConfigProvider = inject(configProviderInjectionKey, null);
9638
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
9583
9639
  const mountStyle = () => {
9584
9640
  const clsPrefix = clsPrefixRef.value;
9585
9641
  style2.mount({
@@ -9590,15 +9646,15 @@ function useStyle(mountId, style2, clsPrefixRef) {
9590
9646
  bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
9591
9647
  },
9592
9648
  ssr: ssrAdapter2,
9593
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9649
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9594
9650
  });
9595
- if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
9651
+ if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
9596
9652
  globalStyle.mount({
9597
9653
  id: "n-global",
9598
9654
  head: true,
9599
9655
  anchorMetaName: cssrAnchorMetaName,
9600
9656
  ssr: ssrAdapter2,
9601
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9657
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9602
9658
  });
9603
9659
  }
9604
9660
  };
@@ -9613,7 +9669,7 @@ function createTheme(theme) {
9613
9669
  }
9614
9670
  function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
9615
9671
  const ssrAdapter2 = useSsrAdapter();
9616
- const NConfigProvider = inject(configProviderInjectionKey, null);
9672
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
9617
9673
  if (style2) {
9618
9674
  const mountStyle = () => {
9619
9675
  const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
@@ -9625,15 +9681,15 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
9625
9681
  },
9626
9682
  anchorMetaName: cssrAnchorMetaName,
9627
9683
  ssr: ssrAdapter2,
9628
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9684
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9629
9685
  });
9630
- if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) {
9686
+ if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
9631
9687
  globalStyle.mount({
9632
9688
  id: "n-global",
9633
9689
  head: true,
9634
9690
  anchorMetaName: cssrAnchorMetaName,
9635
9691
  ssr: ssrAdapter2,
9636
- parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget
9692
+ parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
9637
9693
  });
9638
9694
  }
9639
9695
  };
@@ -9665,11 +9721,11 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
9665
9721
  self: globalSelf = void 0,
9666
9722
  peers: globalPeers = {}
9667
9723
  } = {}
9668
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {};
9724
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
9669
9725
  const {
9670
9726
  common: globalCommonOverrides = void 0,
9671
9727
  [resolveId]: globalSelfOverrides = {}
9672
- } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {};
9728
+ } = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
9673
9729
  const {
9674
9730
  common: globalSelfCommonOverrides,
9675
9731
  peers: globalPeersOverrides = {}
@@ -13512,6 +13568,209 @@ const NCheckbox = defineComponent({
13512
13568
  }))), labelNode);
13513
13569
  }
13514
13570
  });
13571
+ const configProviderProps = {
13572
+ abstract: Boolean,
13573
+ bordered: {
13574
+ type: Boolean,
13575
+ default: void 0
13576
+ },
13577
+ clsPrefix: String,
13578
+ locale: Object,
13579
+ dateLocale: Object,
13580
+ namespace: String,
13581
+ rtl: Array,
13582
+ tag: {
13583
+ type: String,
13584
+ default: "div"
13585
+ },
13586
+ hljs: Object,
13587
+ katex: Object,
13588
+ theme: Object,
13589
+ themeOverrides: Object,
13590
+ componentOptions: Object,
13591
+ icons: Object,
13592
+ breakpoints: Object,
13593
+ preflightStyleDisabled: Boolean,
13594
+ styleMountTarget: Object,
13595
+ inlineThemeDisabled: {
13596
+ type: Boolean,
13597
+ default: void 0
13598
+ },
13599
+ // deprecated
13600
+ as: {
13601
+ type: String,
13602
+ validator: () => {
13603
+ warn("config-provider", "`as` is deprecated, please use `tag` instead.");
13604
+ return true;
13605
+ },
13606
+ default: void 0
13607
+ }
13608
+ };
13609
+ const NConfigProvider = defineComponent({
13610
+ name: "ConfigProvider",
13611
+ alias: ["App"],
13612
+ props: configProviderProps,
13613
+ setup(props) {
13614
+ const NConfigProvider2 = inject(configProviderInjectionKey, null);
13615
+ const mergedThemeRef = computed(() => {
13616
+ const {
13617
+ theme
13618
+ } = props;
13619
+ if (theme === null) return void 0;
13620
+ const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
13621
+ return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
13622
+ });
13623
+ const mergedThemeOverridesRef = computed(() => {
13624
+ const {
13625
+ themeOverrides
13626
+ } = props;
13627
+ if (themeOverrides === null) return void 0;
13628
+ if (themeOverrides === void 0) {
13629
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
13630
+ } else {
13631
+ const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
13632
+ if (inheritedThemeOverrides === void 0) {
13633
+ return themeOverrides;
13634
+ } else {
13635
+ return merge$1({}, inheritedThemeOverrides, themeOverrides);
13636
+ }
13637
+ }
13638
+ });
13639
+ const mergedNamespaceRef = useMemo(() => {
13640
+ const {
13641
+ namespace: namespace2
13642
+ } = props;
13643
+ return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
13644
+ });
13645
+ const mergedBorderedRef = useMemo(() => {
13646
+ const {
13647
+ bordered
13648
+ } = props;
13649
+ return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
13650
+ });
13651
+ const mergedIconsRef = computed(() => {
13652
+ const {
13653
+ icons
13654
+ } = props;
13655
+ return icons === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons;
13656
+ });
13657
+ const mergedComponentPropsRef = computed(() => {
13658
+ const {
13659
+ componentOptions
13660
+ } = props;
13661
+ if (componentOptions !== void 0) return componentOptions;
13662
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
13663
+ });
13664
+ const mergedClsPrefixRef = computed(() => {
13665
+ const {
13666
+ clsPrefix
13667
+ } = props;
13668
+ if (clsPrefix !== void 0) return clsPrefix;
13669
+ if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
13670
+ return defaultClsPrefix;
13671
+ });
13672
+ const mergedRtlRef = computed(() => {
13673
+ var _a;
13674
+ const {
13675
+ rtl
13676
+ } = props;
13677
+ if (rtl === void 0) {
13678
+ return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
13679
+ }
13680
+ const rtlEnabledState = {};
13681
+ for (const rtlInfo of rtl) {
13682
+ rtlEnabledState[rtlInfo.name] = markRaw(rtlInfo);
13683
+ (_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach((peerRtlInfo) => {
13684
+ if (!(peerRtlInfo.name in rtlEnabledState)) {
13685
+ rtlEnabledState[peerRtlInfo.name] = markRaw(peerRtlInfo);
13686
+ }
13687
+ });
13688
+ }
13689
+ return rtlEnabledState;
13690
+ });
13691
+ const mergedBreakpointsRef = computed(() => {
13692
+ return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
13693
+ });
13694
+ const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
13695
+ const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
13696
+ const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
13697
+ const mergedThemeHashRef = computed(() => {
13698
+ const {
13699
+ value: theme
13700
+ } = mergedThemeRef;
13701
+ const {
13702
+ value: mergedThemeOverrides
13703
+ } = mergedThemeOverridesRef;
13704
+ const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
13705
+ const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
13706
+ if (themeName) {
13707
+ if (hasThemeOverrides) {
13708
+ return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
13709
+ }
13710
+ return themeName;
13711
+ } else {
13712
+ if (hasThemeOverrides) {
13713
+ return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
13714
+ }
13715
+ return "";
13716
+ }
13717
+ });
13718
+ provide(configProviderInjectionKey, {
13719
+ mergedThemeHashRef,
13720
+ mergedBreakpointsRef,
13721
+ mergedRtlRef,
13722
+ mergedIconsRef,
13723
+ mergedComponentPropsRef,
13724
+ mergedBorderedRef,
13725
+ mergedNamespaceRef,
13726
+ mergedClsPrefixRef,
13727
+ mergedLocaleRef: computed(() => {
13728
+ const {
13729
+ locale
13730
+ } = props;
13731
+ if (locale === null) return void 0;
13732
+ return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
13733
+ }),
13734
+ mergedDateLocaleRef: computed(() => {
13735
+ const {
13736
+ dateLocale
13737
+ } = props;
13738
+ if (dateLocale === null) return void 0;
13739
+ return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
13740
+ }),
13741
+ mergedHljsRef: computed(() => {
13742
+ const {
13743
+ hljs
13744
+ } = props;
13745
+ return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
13746
+ }),
13747
+ mergedKatexRef: computed(() => {
13748
+ const {
13749
+ katex
13750
+ } = props;
13751
+ return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
13752
+ }),
13753
+ mergedThemeRef,
13754
+ mergedThemeOverridesRef,
13755
+ inlineThemeDisabled: inlineThemeDisabled || false,
13756
+ preflightStyleDisabled: preflightStyleDisabled || false,
13757
+ styleMountTarget
13758
+ });
13759
+ return {
13760
+ mergedClsPrefix: mergedClsPrefixRef,
13761
+ mergedBordered: mergedBorderedRef,
13762
+ mergedNamespace: mergedNamespaceRef,
13763
+ mergedTheme: mergedThemeRef,
13764
+ mergedThemeOverrides: mergedThemeOverridesRef
13765
+ };
13766
+ },
13767
+ render() {
13768
+ var _a, _b, _c, _d;
13769
+ return !this.abstract ? h(this.as || this.tag, {
13770
+ class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
13771
+ }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);
13772
+ }
13773
+ });
13515
13774
  const commonVariables$1 = {
13516
13775
  padding: "4px 0",
13517
13776
  optionIconSizeSmall: "14px",
@@ -15388,62 +15647,20 @@ const NMessageProvider = defineComponent({
15388
15647
  }))) : null);
15389
15648
  }
15390
15649
  });
15391
- 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>';
15392
- 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>';
15393
- 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>';
15394
- 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>';
15395
- 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>';
15396
- 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>';
15397
- 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>';
15398
- const superdocIcons = {
15399
- comment: commentIconSvg,
15400
- caretDown: caretDownIconSvg,
15401
- internal: userCheckIconSvg,
15402
- external: usersIconSvg,
15403
- markDone: checkIconSvg,
15404
- acceptChange: checkIconSvg,
15405
- rejectChange: xmarkIconSvg,
15406
- overflow: ellipsisVerticalSvg
15407
- };
15408
- const _export_sfc = (sfc, props) => {
15409
- const target = sfc.__vccOpts || sfc;
15410
- for (const [key, val] of props) {
15411
- target[key] = val;
15412
- }
15413
- return target;
15414
- };
15415
- const _hoisted_1$f = { class: "user-container" };
15416
- const _hoisted_2$9 = ["src"];
15417
- const _hoisted_3$7 = {
15418
- key: 1,
15419
- class: "user-bg"
15420
- };
15421
- const _sfc_main$g = {
15422
- __name: "Avatar",
15423
- props: {
15424
- user: {
15425
- type: Object,
15426
- required: true
15427
- }
15428
- },
15429
- setup(__props) {
15430
- const getInitials = (name, email) => {
15431
- if (!name && !email) return;
15432
- const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
15433
- return firstLetter;
15434
- };
15435
- return (_ctx, _cache) => {
15436
- return openBlock(), createElementBlock("div", _hoisted_1$f, [
15437
- __props.user.image ? (openBlock(), createElementBlock("img", {
15438
- key: 0,
15439
- class: "user-bg",
15440
- src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
15441
- }, null, 8, _hoisted_2$9)) : (openBlock(), createElementBlock("span", _hoisted_3$7, toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
15442
- ]);
15443
- };
15444
- }
15445
- };
15446
- const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
15650
+ const DEFAULT_UI_FONT_FAMILY = "Arial, Helvetica, sans-serif";
15651
+ function useUiFontFamily() {
15652
+ const instance = getCurrentInstance();
15653
+ const uiFontFamily = computed(() => {
15654
+ const configured = instance?.proxy?.$superdoc?.config?.uiDisplayFallbackFont;
15655
+ if (typeof configured === "string" && configured.trim()) {
15656
+ return configured.trim();
15657
+ }
15658
+ return DEFAULT_UI_FONT_FAMILY;
15659
+ });
15660
+ return {
15661
+ uiFontFamily
15662
+ };
15663
+ }
15447
15664
  const _hoisted_1$e = { class: "comment-option" };
15448
15665
  const _hoisted_2$8 = ["innerHTML"];
15449
15666
  const _hoisted_3$6 = { class: "option-state" };
@@ -15464,6 +15681,7 @@ const _sfc_main$f = {
15464
15681
  setup(__props, { emit: __emit }) {
15465
15682
  const emit = __emit;
15466
15683
  const props = __props;
15684
+ const { uiFontFamily } = useUiFontFamily();
15467
15685
  const renderIcon = (icon) => {
15468
15686
  return () => {
15469
15687
  return h("div", { innerHTML: icon, class: "internal-dropdown__item-icon" });
@@ -15525,7 +15743,8 @@ const _sfc_main$f = {
15525
15743
  trigger: "click",
15526
15744
  options,
15527
15745
  onSelect: _cache[0] || (_cache[0] = ($event) => handleSelect($event)),
15528
- disabled: __props.isDisabled
15746
+ disabled: __props.isDisabled,
15747
+ "content-style": { fontFamily: unref(uiFontFamily) }
15529
15748
  }, {
15530
15749
  default: withCtx(() => [
15531
15750
  createBaseVNode("div", _hoisted_1$e, [
@@ -15541,12 +15760,12 @@ const _sfc_main$f = {
15541
15760
  ])
15542
15761
  ]),
15543
15762
  _: 1
15544
- }, 8, ["disabled"])
15763
+ }, 8, ["disabled", "content-style"])
15545
15764
  ], 4);
15546
15765
  };
15547
15766
  }
15548
15767
  };
15549
- const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-a88dddd9"]]);
15768
+ const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-8b9e3b75"]]);
15550
15769
  function formatDate(timestamp) {
15551
15770
  const date = new Date(timestamp);
15552
15771
  const hours = date.getHours();
@@ -15692,6 +15911,7 @@ const _sfc_main$e = {
15692
15911
  const role = proxy.$superdoc.config.role;
15693
15912
  const isInternal = proxy.$superdoc.config.isInternal;
15694
15913
  const isOwnComment = props.comment.creatorEmail === proxy.$superdoc.config.user.email;
15914
+ const { uiFontFamily } = useUiFontFamily();
15695
15915
  const OVERFLOW_OPTIONS = Object.freeze({
15696
15916
  edit: { label: "Edit", key: "edit" },
15697
15917
  delete: { label: "Delete", key: "delete" }
@@ -15795,7 +16015,8 @@ const _sfc_main$e = {
15795
16015
  key: 2,
15796
16016
  trigger: "click",
15797
16017
  options: getOverflowOptions.value,
15798
- onSelect: handleSelect
16018
+ onSelect: handleSelect,
16019
+ "content-style": { fontFamily: unref(uiFontFamily) }
15799
16020
  }, {
15800
16021
  default: withCtx(() => [
15801
16022
  createBaseVNode("div", {
@@ -15810,13 +16031,13 @@ const _sfc_main$e = {
15810
16031
  ])
15811
16032
  ]),
15812
16033
  _: 1
15813
- }, 8, ["options"])) : createCommentVNode("", true)
16034
+ }, 8, ["options", "content-style"])) : createCommentVNode("", true)
15814
16035
  ])
15815
16036
  ]);
15816
16037
  };
15817
16038
  }
15818
16039
  };
15819
- const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-0f4f53ef"]]);
16040
+ const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-5e404f08"]]);
15820
16041
  const _hoisted_1$c = { class: "input-section" };
15821
16042
  const _sfc_main$d = {
15822
16043
  __name: "CommentInput",
@@ -16236,7 +16457,7 @@ const _sfc_main$c = {
16236
16457
  };
16237
16458
  }
16238
16459
  };
16239
- const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-36e5f63e"]]);
16460
+ const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-abfa4e05"]]);
16240
16461
  const _hoisted_1$a = { class: "comments-list" };
16241
16462
  const _hoisted_2$5 = { key: 0 };
16242
16463
  const _hoisted_3$3 = { class: "comment-item" };
@@ -16837,7 +17058,7 @@ const _sfc_main$4 = {
16837
17058
  };
16838
17059
  }
16839
17060
  };
16840
- const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b8cacb22"]]);
17061
+ const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1e49d9b3"]]);
16841
17062
  const floor = (val, precision) => {
16842
17063
  const multiplier = 10 ** precision;
16843
17064
  return Math.floor(val * multiplier) / multiplier;
@@ -17242,7 +17463,7 @@ const _sfc_main = {
17242
17463
  __name: "SuperDoc",
17243
17464
  emits: ["selection-update"],
17244
17465
  setup(__props, { emit: __emit }) {
17245
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-eykNsWyi.es.js"));
17466
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-DtdN17V4.es.js"));
17246
17467
  const superdocStore = useSuperdocStore();
17247
17468
  const commentsStore = useCommentsStore();
17248
17469
  const {
@@ -17282,11 +17503,15 @@ const _sfc_main = {
17282
17503
  const { proxy } = getCurrentInstance();
17283
17504
  commentsStore.proxy = proxy;
17284
17505
  const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
17506
+ const { uiFontFamily } = useUiFontFamily();
17285
17507
  const commentsModuleConfig = computed(() => {
17286
17508
  const config = modules.comments;
17287
17509
  if (config === false || config == null) return null;
17288
17510
  return config;
17289
17511
  });
17512
+ const superdocStyleVars = computed(() => ({
17513
+ "--sd-ui-font-family": uiFontFamily.value
17514
+ }));
17290
17515
  const layers = ref(null);
17291
17516
  const commentsLayer = ref(null);
17292
17517
  const toolsMenuPosition = reactive({ top: null, right: "-25px", zIndex: 101 });
@@ -17803,155 +18028,164 @@ const _sfc_main = {
17803
18028
  });
17804
18029
  return (_ctx, _cache) => {
17805
18030
  const _directive_click_outside = resolveDirective("click-outside");
17806
- return openBlock(), createElementBlock("div", {
17807
- class: normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": unref(isHighContrastMode2) }])
17808
- }, [
17809
- createBaseVNode("div", {
17810
- class: "superdoc__layers layers",
17811
- ref_key: "layers",
17812
- ref: layers,
17813
- role: "group"
17814
- }, [
17815
- showToolsFloatingMenu.value ? (openBlock(), createElementBlock("div", {
17816
- key: 0,
17817
- class: "superdoc__tools tools",
17818
- style: normalizeStyle(toolsMenuPosition)
18031
+ return openBlock(), createBlock(unref(NConfigProvider), {
18032
+ abstract: "",
18033
+ "preflight-style-disabled": ""
18034
+ }, {
18035
+ default: withCtx(() => [
18036
+ createBaseVNode("div", {
18037
+ class: normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": unref(isHighContrastMode2) }]),
18038
+ style: normalizeStyle(superdocStyleVars.value)
17819
18039
  }, [
17820
18040
  createBaseVNode("div", {
17821
- class: "tools-item",
17822
- "data-id": "is-tool",
17823
- onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
17824
- }, [
17825
- createBaseVNode("div", {
17826
- class: "superdoc__tools-icon",
17827
- innerHTML: unref(superdocIcons).comment
17828
- }, null, 8, _hoisted_1)
17829
- ], 32),
17830
- unref(proxy).$superdoc.config.modules.ai ? (openBlock(), createElementBlock("div", {
17831
- key: 0,
17832
- class: "tools-item",
17833
- "data-id": "is-tool",
17834
- onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
17835
- }, [..._cache[3] || (_cache[3] = [
17836
- createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
17837
- ])], 32)) : createCommentVNode("", true)
17838
- ], 4)) : createCommentVNode("", true),
17839
- createBaseVNode("div", _hoisted_2, [
17840
- isCommentsEnabled.value ? (openBlock(), createElementBlock("div", {
17841
- key: 0,
17842
- class: "superdoc__selection-layer selection-layer",
17843
- onMousedown: handleSelectionStart,
17844
- onMouseup: handleDragEnd,
17845
- ref_key: "selectionLayer",
17846
- ref: selectionLayer
18041
+ class: "superdoc__layers layers",
18042
+ ref_key: "layers",
18043
+ ref: layers,
18044
+ role: "group"
17847
18045
  }, [
17848
- unref(selectionPosition) && shouldShowSelection.value ? (openBlock(), createElementBlock("div", {
18046
+ showToolsFloatingMenu.value ? (openBlock(), createElementBlock("div", {
17849
18047
  key: 0,
17850
- style: normalizeStyle(getSelectionPosition.value),
17851
- class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
17852
- }, null, 4)) : createCommentVNode("", true)
17853
- ], 544)) : createCommentVNode("", true),
17854
- "hrbr-fields" in unref(modules) && layers.value ? (openBlock(), createBlock(HrbrFieldsLayer, {
17855
- key: 1,
17856
- fields: unref(modules)["hrbr-fields"],
17857
- class: "superdoc__comments-layer comments-layer",
17858
- style: { "z-index": "2" },
17859
- ref_key: "hrbrFieldsLayer",
17860
- ref: hrbrFieldsLayer
17861
- }, null, 8, ["fields"])) : createCommentVNode("", true),
17862
- layers.value ? (openBlock(), createBlock(CommentsLayer, {
17863
- key: 2,
17864
- class: "superdoc__comments-layer comments-layer",
17865
- style: { "z-index": "3" },
17866
- ref_key: "commentsLayer",
17867
- ref: commentsLayer,
17868
- parent: layers.value,
17869
- user: unref(user),
17870
- onHighlightClick: handleHighlightClick
17871
- }, null, 8, ["parent", "user"])) : createCommentVNode("", true),
17872
- unref(showAiLayer) ? (openBlock(), createBlock(AiLayer, {
17873
- key: 3,
17874
- class: "ai-layer",
17875
- style: { "z-index": "4" },
17876
- ref_key: "aiLayer",
17877
- ref: aiLayer,
17878
- editor: unref(proxy).$superdoc.activeEditor
17879
- }, null, 8, ["editor"])) : createCommentVNode("", true),
17880
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(documents), (doc) => {
17881
- return openBlock(), createElementBlock("div", {
17882
- class: "superdoc__sub-document sub-document",
17883
- key: doc.id
18048
+ class: "superdoc__tools tools",
18049
+ style: normalizeStyle(toolsMenuPosition)
17884
18050
  }, [
17885
- doc.type === unref(PDF) ? (openBlock(), createBlock(unref(PdfViewer), {
18051
+ createBaseVNode("div", {
18052
+ class: "tools-item",
18053
+ "data-id": "is-tool",
18054
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
18055
+ }, [
18056
+ createBaseVNode("div", {
18057
+ class: "superdoc__tools-icon",
18058
+ innerHTML: unref(superdocIcons).comment
18059
+ }, null, 8, _hoisted_1)
18060
+ ], 32),
18061
+ unref(proxy).$superdoc.config.modules.ai ? (openBlock(), createElementBlock("div", {
18062
+ key: 0,
18063
+ class: "tools-item",
18064
+ "data-id": "is-tool",
18065
+ onMousedown: _cache[1] || (_cache[1] = withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
18066
+ }, [..._cache[3] || (_cache[3] = [
18067
+ createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
18068
+ ])], 32)) : createCommentVNode("", true)
18069
+ ], 4)) : createCommentVNode("", true),
18070
+ createBaseVNode("div", _hoisted_2, [
18071
+ isCommentsEnabled.value ? (openBlock(), createElementBlock("div", {
17886
18072
  key: 0,
17887
- "document-data": doc,
17888
- config: unref(pdfConfig),
17889
- onSelectionChange: handleSelectionChange,
17890
- onReady: handleDocumentReady,
17891
- onPageLoaded: unref(handlePageReady),
17892
- onBypassSelection: handlePdfClick
17893
- }, null, 8, ["document-data", "config", "onPageLoaded"])) : createCommentVNode("", true),
17894
- createVNode(unref(NMessageProvider), null, {
17895
- default: withCtx(() => [
17896
- doc.type === unref(DOCX) ? (openBlock(), createBlock(unref(SuperEditor), {
18073
+ class: "superdoc__selection-layer selection-layer",
18074
+ onMousedown: handleSelectionStart,
18075
+ onMouseup: handleDragEnd,
18076
+ ref_key: "selectionLayer",
18077
+ ref: selectionLayer
18078
+ }, [
18079
+ unref(selectionPosition) && shouldShowSelection.value ? (openBlock(), createElementBlock("div", {
18080
+ key: 0,
18081
+ style: normalizeStyle(getSelectionPosition.value),
18082
+ class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
18083
+ }, null, 4)) : createCommentVNode("", true)
18084
+ ], 544)) : createCommentVNode("", true),
18085
+ "hrbr-fields" in unref(modules) && layers.value ? (openBlock(), createBlock(HrbrFieldsLayer, {
18086
+ key: 1,
18087
+ fields: unref(modules)["hrbr-fields"],
18088
+ class: "superdoc__comments-layer comments-layer",
18089
+ style: { "z-index": "2" },
18090
+ ref_key: "hrbrFieldsLayer",
18091
+ ref: hrbrFieldsLayer
18092
+ }, null, 8, ["fields"])) : createCommentVNode("", true),
18093
+ layers.value ? (openBlock(), createBlock(CommentsLayer, {
18094
+ key: 2,
18095
+ class: "superdoc__comments-layer comments-layer",
18096
+ style: { "z-index": "3" },
18097
+ ref_key: "commentsLayer",
18098
+ ref: commentsLayer,
18099
+ parent: layers.value,
18100
+ user: unref(user),
18101
+ onHighlightClick: handleHighlightClick
18102
+ }, null, 8, ["parent", "user"])) : createCommentVNode("", true),
18103
+ unref(showAiLayer) ? (openBlock(), createBlock(AiLayer, {
18104
+ key: 3,
18105
+ class: "ai-layer",
18106
+ style: { "z-index": "4" },
18107
+ ref_key: "aiLayer",
18108
+ ref: aiLayer,
18109
+ editor: unref(proxy).$superdoc.activeEditor
18110
+ }, null, 8, ["editor"])) : createCommentVNode("", true),
18111
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(documents), (doc) => {
18112
+ return openBlock(), createElementBlock("div", {
18113
+ class: "superdoc__sub-document sub-document",
18114
+ key: doc.id
18115
+ }, [
18116
+ doc.type === unref(PDF) ? (openBlock(), createBlock(unref(PdfViewer), {
17897
18117
  key: 0,
18118
+ "document-data": doc,
18119
+ config: unref(pdfConfig),
18120
+ onSelectionChange: handleSelectionChange,
18121
+ onReady: handleDocumentReady,
18122
+ onPageLoaded: unref(handlePageReady),
18123
+ onBypassSelection: handlePdfClick
18124
+ }, null, 8, ["document-data", "config", "onPageLoaded"])) : createCommentVNode("", true),
18125
+ createVNode(unref(NMessageProvider), null, {
18126
+ default: withCtx(() => [
18127
+ doc.type === unref(DOCX) ? (openBlock(), createBlock(unref(SuperEditor), {
18128
+ key: 0,
18129
+ "file-source": doc.data,
18130
+ state: doc.state,
18131
+ "document-id": doc.id,
18132
+ options: { ...editorOptions(doc), rulers: doc.rulers },
18133
+ onEditorReady,
18134
+ onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc, $event)
18135
+ }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : createCommentVNode("", true)
18136
+ ]),
18137
+ _: 2
18138
+ }, 1024),
18139
+ doc.type === unref(HTML) ? (openBlock(), createBlock(HtmlViewer, {
18140
+ key: 1,
18141
+ onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
18142
+ onSelectionChange: handleSelectionChange,
17898
18143
  "file-source": doc.data,
17899
- state: doc.state,
17900
- "document-id": doc.id,
17901
- options: { ...editorOptions(doc), rulers: doc.rulers },
17902
- onEditorReady,
17903
- onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc, $event)
17904
- }, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : createCommentVNode("", true)
17905
- ]),
17906
- _: 2
17907
- }, 1024),
17908
- doc.type === unref(HTML) ? (openBlock(), createBlock(HtmlViewer, {
17909
- key: 1,
17910
- onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
17911
- onSelectionChange: handleSelectionChange,
17912
- "file-source": doc.data,
17913
- "document-id": doc.id
17914
- }, null, 8, ["file-source", "document-id"])) : createCommentVNode("", true)
17915
- ]);
17916
- }), 128))
17917
- ])
17918
- ], 512),
17919
- showCommentsSidebar.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
17920
- unref(pendingComment) ? withDirectives((openBlock(), createBlock(CommentDialog, {
17921
- key: 0,
17922
- comment: unref(pendingComment),
17923
- "auto-focus": true,
17924
- "is-floating": true
17925
- }, null, 8, ["comment"])), [
17926
- [_directive_click_outside, cancelPendingComment]
17927
- ]) : createCommentVNode("", true),
17928
- createBaseVNode("div", _hoisted_4, [
17929
- unref(hasInitializedLocations) && unref(getFloatingComments).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(documentsWithConverations), (doc) => {
17930
- return openBlock(), createBlock(FloatingComments, {
17931
- parent: layers.value,
17932
- "current-document": doc
17933
- }, null, 8, ["parent", "current-document"]);
17934
- }), 256)) : createCommentVNode("", true)
17935
- ])
17936
- ])) : createCommentVNode("", true),
17937
- unref(showAiWriter) ? (openBlock(), createElementBlock("div", {
17938
- key: 1,
17939
- class: "ai-writer-container",
17940
- style: normalizeStyle(unref(aiWriterPosition))
17941
- }, [
17942
- createVNode(unref(AIWriter), {
17943
- "selected-text": unref(selectedText),
17944
- "handle-close": unref(handleAiWriterClose),
17945
- editor: unref(proxy).$superdoc.activeEditor,
17946
- "api-key": unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
17947
- endpoint: unref(proxy).$superdoc.config?.modules?.ai?.endpoint
17948
- }, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
17949
- ], 4)) : createCommentVNode("", true)
17950
- ], 2);
18144
+ "document-id": doc.id
18145
+ }, null, 8, ["file-source", "document-id"])) : createCommentVNode("", true)
18146
+ ]);
18147
+ }), 128))
18148
+ ])
18149
+ ], 512),
18150
+ showCommentsSidebar.value ? (openBlock(), createElementBlock("div", _hoisted_3, [
18151
+ unref(pendingComment) ? withDirectives((openBlock(), createBlock(CommentDialog, {
18152
+ key: 0,
18153
+ comment: unref(pendingComment),
18154
+ "auto-focus": true,
18155
+ "is-floating": true
18156
+ }, null, 8, ["comment"])), [
18157
+ [_directive_click_outside, cancelPendingComment]
18158
+ ]) : createCommentVNode("", true),
18159
+ createBaseVNode("div", _hoisted_4, [
18160
+ unref(hasInitializedLocations) && unref(getFloatingComments).length > 0 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(documentsWithConverations), (doc) => {
18161
+ return openBlock(), createBlock(FloatingComments, {
18162
+ parent: layers.value,
18163
+ "current-document": doc
18164
+ }, null, 8, ["parent", "current-document"]);
18165
+ }), 256)) : createCommentVNode("", true)
18166
+ ])
18167
+ ])) : createCommentVNode("", true),
18168
+ unref(showAiWriter) ? (openBlock(), createElementBlock("div", {
18169
+ key: 1,
18170
+ class: "ai-writer-container",
18171
+ style: normalizeStyle(unref(aiWriterPosition))
18172
+ }, [
18173
+ createVNode(unref(AIWriter), {
18174
+ "selected-text": unref(selectedText),
18175
+ "handle-close": unref(handleAiWriterClose),
18176
+ editor: unref(proxy).$superdoc.activeEditor,
18177
+ "api-key": unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
18178
+ endpoint: unref(proxy).$superdoc.config?.modules?.ai?.endpoint
18179
+ }, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
18180
+ ], 4)) : createCommentVNode("", true)
18181
+ ], 6)
18182
+ ]),
18183
+ _: 1
18184
+ });
17951
18185
  };
17952
18186
  }
17953
18187
  };
17954
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-e229774d"]]);
18188
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-309688b3"]]);
17955
18189
  const createSuperdocVueApp = () => {
17956
18190
  const app = createApp(App);
17957
18191
  const pinia = createPinia();
@@ -18061,6 +18295,8 @@ class SuperDoc extends EventEmitter {
18061
18295
  toolbarGroups: ["left", "center", "right"],
18062
18296
  toolbarIcons: {},
18063
18297
  toolbarTexts: {},
18298
+ // UI font for SuperDoc surfaces (toolbar, comments UI, etc.)
18299
+ uiDisplayFallbackFont: "Arial, Helvetica, sans-serif",
18064
18300
  isDev: false,
18065
18301
  // telemetry config
18066
18302
  telemetry: null,
@@ -18131,7 +18367,7 @@ class SuperDoc extends EventEmitter {
18131
18367
  this.config.colors = shuffleArray(this.config.colors);
18132
18368
  this.userColorMap = /* @__PURE__ */ new Map();
18133
18369
  this.colorIndex = 0;
18134
- this.version = "1.0.0-next.2";
18370
+ this.version = "1.0.0-next.4";
18135
18371
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18136
18372
  this.superdocId = config.superdocId || v4();
18137
18373
  this.colors = this.config.colors;
@@ -18490,6 +18726,7 @@ class SuperDoc extends EventEmitter {
18490
18726
  superdoc: this,
18491
18727
  aiApiKey: this.config.modules?.ai?.apiKey,
18492
18728
  aiEndpoint: this.config.modules?.ai?.endpoint,
18729
+ uiDisplayFallbackFont: this.config.uiDisplayFallbackFont,
18493
18730
  ...moduleConfig,
18494
18731
  excludeItems
18495
18732
  // Override moduleConfig.excludeItems with our computed list