@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.
- package/dist/chunks/{PdfViewer-eykNsWyi.es.js → PdfViewer-PUn0q_lG.es.js} +2 -2
- package/dist/chunks/{PdfViewer-B-xTd4XY.cjs → PdfViewer-cVGt7Ne7.cjs} +1 -1
- package/dist/chunks/{eventemitter3-CcXAdeql.es.js → eventemitter3-44XulWQe.es.js} +1 -1
- package/dist/chunks/{index-BDVXUeCy-Di6ozaOM.cjs → index-DLO-SgUP-BNtYQDPq.cjs} +1 -1
- package/dist/chunks/{index-BDVXUeCy-7mwhYeJ7.es.js → index-DLO-SgUP-c73otQJ5.es.js} +1 -1
- package/dist/chunks/{index-rF5HExWB.cjs → index-Djmhr-R6.cjs} +465 -228
- package/dist/chunks/{index-DpQ8ZYM0.es.js → index-mHanL4xN.es.js} +468 -231
- package/dist/chunks/{jszip-5vvIqAEE.es.js → jszip-VP334ufO.es.js} +1 -1
- package/dist/chunks/{super-editor.es-CcKbh84I.cjs → super-editor.es-Cve8WKfM.cjs} +619 -379
- package/dist/chunks/{super-editor.es-CxajnL9u.es.js → super-editor.es-S9Kp_7dy.es.js} +620 -380
- package/dist/chunks/{vue-Dysv_7z5.es.js → vue-BuPTonTJ.es.js} +27 -27
- package/dist/chunks/xml-js-LkEmUa9-.es.js +2 -0
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts +42 -0
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +4 -167
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/style.css +88 -86
- package/dist/super-editor/ai-writer.es.js +3 -3
- package/dist/super-editor/chunks/{converter-DN_dhslo.js → converter-ByybZRFp.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-Bhl_yBjL.js → docx-zipper-CFQANTLI.js} +1 -1
- package/dist/super-editor/chunks/{editor-3klx7hyV.js → editor-Cu4hD14N.js} +16 -16
- package/dist/super-editor/chunks/{index-BDVXUeCy.js → index-DLO-SgUP.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-8YA9ltNC.js → toolbar-5MMla0sj.js} +804 -568
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +22 -21
- package/dist/super-editor/super-editor.es.js +10 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +1082 -605
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-ClO_jHnq.es.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const superEditor_es = require("./super-editor.es-
|
|
2
|
+
const superEditor_es = require("./super-editor.es-Cve8WKfM.cjs");
|
|
3
3
|
const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
|
|
4
4
|
const eventemitter3 = require("./eventemitter3-DQmQUge-.cjs");
|
|
5
5
|
const provider = require("@hocuspocus/provider");
|
|
@@ -4425,6 +4425,62 @@ const useCommentsStore = /* @__PURE__ */ defineStore("comments", () => {
|
|
|
4425
4425
|
handleTrackedChangeUpdate
|
|
4426
4426
|
};
|
|
4427
4427
|
});
|
|
4428
|
+
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>';
|
|
4429
|
+
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>';
|
|
4430
|
+
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>';
|
|
4431
|
+
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>';
|
|
4432
|
+
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>';
|
|
4433
|
+
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>';
|
|
4434
|
+
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>';
|
|
4435
|
+
const superdocIcons = {
|
|
4436
|
+
comment: commentIconSvg,
|
|
4437
|
+
caretDown: caretDownIconSvg,
|
|
4438
|
+
internal: userCheckIconSvg,
|
|
4439
|
+
external: usersIconSvg,
|
|
4440
|
+
markDone: checkIconSvg,
|
|
4441
|
+
acceptChange: checkIconSvg,
|
|
4442
|
+
rejectChange: xmarkIconSvg,
|
|
4443
|
+
overflow: ellipsisVerticalSvg
|
|
4444
|
+
};
|
|
4445
|
+
const _export_sfc = (sfc, props) => {
|
|
4446
|
+
const target = sfc.__vccOpts || sfc;
|
|
4447
|
+
for (const [key, val] of props) {
|
|
4448
|
+
target[key] = val;
|
|
4449
|
+
}
|
|
4450
|
+
return target;
|
|
4451
|
+
};
|
|
4452
|
+
const _hoisted_1$f = { class: "user-container" };
|
|
4453
|
+
const _hoisted_2$9 = ["src"];
|
|
4454
|
+
const _hoisted_3$7 = {
|
|
4455
|
+
key: 1,
|
|
4456
|
+
class: "user-bg"
|
|
4457
|
+
};
|
|
4458
|
+
const _sfc_main$g = {
|
|
4459
|
+
__name: "Avatar",
|
|
4460
|
+
props: {
|
|
4461
|
+
user: {
|
|
4462
|
+
type: Object,
|
|
4463
|
+
required: true
|
|
4464
|
+
}
|
|
4465
|
+
},
|
|
4466
|
+
setup(__props) {
|
|
4467
|
+
const getInitials = (name, email) => {
|
|
4468
|
+
if (!name && !email) return;
|
|
4469
|
+
const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
|
|
4470
|
+
return firstLetter;
|
|
4471
|
+
};
|
|
4472
|
+
return (_ctx, _cache) => {
|
|
4473
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
|
|
4474
|
+
__props.user.image ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
4475
|
+
key: 0,
|
|
4476
|
+
class: "user-bg",
|
|
4477
|
+
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
4478
|
+
}, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
|
|
4479
|
+
]);
|
|
4480
|
+
};
|
|
4481
|
+
}
|
|
4482
|
+
};
|
|
4483
|
+
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
|
|
4428
4484
|
function plugin$1(options) {
|
|
4429
4485
|
let _bPrefix = ".";
|
|
4430
4486
|
let _ePrefix = "__";
|
|
@@ -8025,30 +8081,30 @@ const defaultClsPrefix = "n";
|
|
|
8025
8081
|
function useConfig(props = {}, options = {
|
|
8026
8082
|
defaultBordered: true
|
|
8027
8083
|
}) {
|
|
8028
|
-
const
|
|
8084
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
8029
8085
|
return {
|
|
8030
8086
|
// NConfigProvider,
|
|
8031
|
-
inlineThemeDisabled:
|
|
8032
|
-
mergedRtlRef:
|
|
8033
|
-
mergedComponentPropsRef:
|
|
8034
|
-
mergedBreakpointsRef:
|
|
8087
|
+
inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
|
|
8088
|
+
mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
|
|
8089
|
+
mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
|
|
8090
|
+
mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
|
|
8035
8091
|
mergedBorderedRef: vue.computed(() => {
|
|
8036
8092
|
var _a, _b;
|
|
8037
8093
|
const {
|
|
8038
8094
|
bordered
|
|
8039
8095
|
} = props;
|
|
8040
8096
|
if (bordered !== void 0) return bordered;
|
|
8041
|
-
return (_b = (_a =
|
|
8097
|
+
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;
|
|
8042
8098
|
}),
|
|
8043
|
-
mergedClsPrefixRef:
|
|
8044
|
-
namespaceRef: vue.computed(() =>
|
|
8099
|
+
mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : vue.shallowRef(defaultClsPrefix),
|
|
8100
|
+
namespaceRef: vue.computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
|
|
8045
8101
|
};
|
|
8046
8102
|
}
|
|
8047
8103
|
function useThemeClass(componentName, hashRef, cssVarsRef, props) {
|
|
8048
8104
|
if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
|
|
8049
|
-
const
|
|
8050
|
-
const mergedThemeHashRef =
|
|
8051
|
-
const styleMountTarget =
|
|
8105
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
8106
|
+
const mergedThemeHashRef = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeHashRef;
|
|
8107
|
+
const styleMountTarget = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget;
|
|
8052
8108
|
const themeClassRef = vue.ref("");
|
|
8053
8109
|
const ssrAdapter2 = useSsrAdapter();
|
|
8054
8110
|
let renderCallback;
|
|
@@ -9517,7 +9573,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
|
|
|
9517
9573
|
}
|
|
9518
9574
|
return componentRtlState;
|
|
9519
9575
|
});
|
|
9520
|
-
const
|
|
9576
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
9521
9577
|
const mountStyle = () => {
|
|
9522
9578
|
vue.watchEffect(() => {
|
|
9523
9579
|
const {
|
|
@@ -9537,7 +9593,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
|
|
|
9537
9593
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
9538
9594
|
},
|
|
9539
9595
|
ssr: ssrAdapter2,
|
|
9540
|
-
parent:
|
|
9596
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
9541
9597
|
});
|
|
9542
9598
|
});
|
|
9543
9599
|
};
|
|
@@ -9596,7 +9652,7 @@ function useStyle(mountId, style2, clsPrefixRef) {
|
|
|
9596
9652
|
return;
|
|
9597
9653
|
}
|
|
9598
9654
|
const ssrAdapter2 = useSsrAdapter();
|
|
9599
|
-
const
|
|
9655
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
9600
9656
|
const mountStyle = () => {
|
|
9601
9657
|
const clsPrefix = clsPrefixRef.value;
|
|
9602
9658
|
style2.mount({
|
|
@@ -9607,15 +9663,15 @@ function useStyle(mountId, style2, clsPrefixRef) {
|
|
|
9607
9663
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
9608
9664
|
},
|
|
9609
9665
|
ssr: ssrAdapter2,
|
|
9610
|
-
parent:
|
|
9666
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
9611
9667
|
});
|
|
9612
|
-
if (!(
|
|
9668
|
+
if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
|
|
9613
9669
|
globalStyle.mount({
|
|
9614
9670
|
id: "n-global",
|
|
9615
9671
|
head: true,
|
|
9616
9672
|
anchorMetaName: cssrAnchorMetaName,
|
|
9617
9673
|
ssr: ssrAdapter2,
|
|
9618
|
-
parent:
|
|
9674
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
9619
9675
|
});
|
|
9620
9676
|
}
|
|
9621
9677
|
};
|
|
@@ -9630,7 +9686,7 @@ function createTheme(theme) {
|
|
|
9630
9686
|
}
|
|
9631
9687
|
function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
|
|
9632
9688
|
const ssrAdapter2 = useSsrAdapter();
|
|
9633
|
-
const
|
|
9689
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
9634
9690
|
if (style2) {
|
|
9635
9691
|
const mountStyle = () => {
|
|
9636
9692
|
const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
|
|
@@ -9642,15 +9698,15 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
|
|
|
9642
9698
|
},
|
|
9643
9699
|
anchorMetaName: cssrAnchorMetaName,
|
|
9644
9700
|
ssr: ssrAdapter2,
|
|
9645
|
-
parent:
|
|
9701
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
9646
9702
|
});
|
|
9647
|
-
if (!(
|
|
9703
|
+
if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
|
|
9648
9704
|
globalStyle.mount({
|
|
9649
9705
|
id: "n-global",
|
|
9650
9706
|
head: true,
|
|
9651
9707
|
anchorMetaName: cssrAnchorMetaName,
|
|
9652
9708
|
ssr: ssrAdapter2,
|
|
9653
|
-
parent:
|
|
9709
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
9654
9710
|
});
|
|
9655
9711
|
}
|
|
9656
9712
|
};
|
|
@@ -9682,11 +9738,11 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
|
|
|
9682
9738
|
self: globalSelf = void 0,
|
|
9683
9739
|
peers: globalPeers = {}
|
|
9684
9740
|
} = {}
|
|
9685
|
-
} = (
|
|
9741
|
+
} = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
|
|
9686
9742
|
const {
|
|
9687
9743
|
common: globalCommonOverrides = void 0,
|
|
9688
9744
|
[resolveId]: globalSelfOverrides = {}
|
|
9689
|
-
} = (
|
|
9745
|
+
} = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
|
|
9690
9746
|
const {
|
|
9691
9747
|
common: globalSelfCommonOverrides,
|
|
9692
9748
|
peers: globalPeersOverrides = {}
|
|
@@ -13529,6 +13585,209 @@ const NCheckbox = vue.defineComponent({
|
|
|
13529
13585
|
}))), labelNode);
|
|
13530
13586
|
}
|
|
13531
13587
|
});
|
|
13588
|
+
const configProviderProps = {
|
|
13589
|
+
abstract: Boolean,
|
|
13590
|
+
bordered: {
|
|
13591
|
+
type: Boolean,
|
|
13592
|
+
default: void 0
|
|
13593
|
+
},
|
|
13594
|
+
clsPrefix: String,
|
|
13595
|
+
locale: Object,
|
|
13596
|
+
dateLocale: Object,
|
|
13597
|
+
namespace: String,
|
|
13598
|
+
rtl: Array,
|
|
13599
|
+
tag: {
|
|
13600
|
+
type: String,
|
|
13601
|
+
default: "div"
|
|
13602
|
+
},
|
|
13603
|
+
hljs: Object,
|
|
13604
|
+
katex: Object,
|
|
13605
|
+
theme: Object,
|
|
13606
|
+
themeOverrides: Object,
|
|
13607
|
+
componentOptions: Object,
|
|
13608
|
+
icons: Object,
|
|
13609
|
+
breakpoints: Object,
|
|
13610
|
+
preflightStyleDisabled: Boolean,
|
|
13611
|
+
styleMountTarget: Object,
|
|
13612
|
+
inlineThemeDisabled: {
|
|
13613
|
+
type: Boolean,
|
|
13614
|
+
default: void 0
|
|
13615
|
+
},
|
|
13616
|
+
// deprecated
|
|
13617
|
+
as: {
|
|
13618
|
+
type: String,
|
|
13619
|
+
validator: () => {
|
|
13620
|
+
warn("config-provider", "`as` is deprecated, please use `tag` instead.");
|
|
13621
|
+
return true;
|
|
13622
|
+
},
|
|
13623
|
+
default: void 0
|
|
13624
|
+
}
|
|
13625
|
+
};
|
|
13626
|
+
const NConfigProvider = vue.defineComponent({
|
|
13627
|
+
name: "ConfigProvider",
|
|
13628
|
+
alias: ["App"],
|
|
13629
|
+
props: configProviderProps,
|
|
13630
|
+
setup(props) {
|
|
13631
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
13632
|
+
const mergedThemeRef = vue.computed(() => {
|
|
13633
|
+
const {
|
|
13634
|
+
theme
|
|
13635
|
+
} = props;
|
|
13636
|
+
if (theme === null) return void 0;
|
|
13637
|
+
const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
|
|
13638
|
+
return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
|
|
13639
|
+
});
|
|
13640
|
+
const mergedThemeOverridesRef = vue.computed(() => {
|
|
13641
|
+
const {
|
|
13642
|
+
themeOverrides
|
|
13643
|
+
} = props;
|
|
13644
|
+
if (themeOverrides === null) return void 0;
|
|
13645
|
+
if (themeOverrides === void 0) {
|
|
13646
|
+
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
|
|
13647
|
+
} else {
|
|
13648
|
+
const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
|
|
13649
|
+
if (inheritedThemeOverrides === void 0) {
|
|
13650
|
+
return themeOverrides;
|
|
13651
|
+
} else {
|
|
13652
|
+
return merge$1({}, inheritedThemeOverrides, themeOverrides);
|
|
13653
|
+
}
|
|
13654
|
+
}
|
|
13655
|
+
});
|
|
13656
|
+
const mergedNamespaceRef = useMemo(() => {
|
|
13657
|
+
const {
|
|
13658
|
+
namespace: namespace2
|
|
13659
|
+
} = props;
|
|
13660
|
+
return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
|
|
13661
|
+
});
|
|
13662
|
+
const mergedBorderedRef = useMemo(() => {
|
|
13663
|
+
const {
|
|
13664
|
+
bordered
|
|
13665
|
+
} = props;
|
|
13666
|
+
return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
|
|
13667
|
+
});
|
|
13668
|
+
const mergedIconsRef = vue.computed(() => {
|
|
13669
|
+
const {
|
|
13670
|
+
icons
|
|
13671
|
+
} = props;
|
|
13672
|
+
return icons === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons;
|
|
13673
|
+
});
|
|
13674
|
+
const mergedComponentPropsRef = vue.computed(() => {
|
|
13675
|
+
const {
|
|
13676
|
+
componentOptions
|
|
13677
|
+
} = props;
|
|
13678
|
+
if (componentOptions !== void 0) return componentOptions;
|
|
13679
|
+
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
|
|
13680
|
+
});
|
|
13681
|
+
const mergedClsPrefixRef = vue.computed(() => {
|
|
13682
|
+
const {
|
|
13683
|
+
clsPrefix
|
|
13684
|
+
} = props;
|
|
13685
|
+
if (clsPrefix !== void 0) return clsPrefix;
|
|
13686
|
+
if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
|
|
13687
|
+
return defaultClsPrefix;
|
|
13688
|
+
});
|
|
13689
|
+
const mergedRtlRef = vue.computed(() => {
|
|
13690
|
+
var _a;
|
|
13691
|
+
const {
|
|
13692
|
+
rtl
|
|
13693
|
+
} = props;
|
|
13694
|
+
if (rtl === void 0) {
|
|
13695
|
+
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
|
|
13696
|
+
}
|
|
13697
|
+
const rtlEnabledState = {};
|
|
13698
|
+
for (const rtlInfo of rtl) {
|
|
13699
|
+
rtlEnabledState[rtlInfo.name] = vue.markRaw(rtlInfo);
|
|
13700
|
+
(_a = rtlInfo.peers) === null || _a === void 0 ? void 0 : _a.forEach((peerRtlInfo) => {
|
|
13701
|
+
if (!(peerRtlInfo.name in rtlEnabledState)) {
|
|
13702
|
+
rtlEnabledState[peerRtlInfo.name] = vue.markRaw(peerRtlInfo);
|
|
13703
|
+
}
|
|
13704
|
+
});
|
|
13705
|
+
}
|
|
13706
|
+
return rtlEnabledState;
|
|
13707
|
+
});
|
|
13708
|
+
const mergedBreakpointsRef = vue.computed(() => {
|
|
13709
|
+
return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
|
|
13710
|
+
});
|
|
13711
|
+
const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
|
|
13712
|
+
const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
|
|
13713
|
+
const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
|
|
13714
|
+
const mergedThemeHashRef = vue.computed(() => {
|
|
13715
|
+
const {
|
|
13716
|
+
value: theme
|
|
13717
|
+
} = mergedThemeRef;
|
|
13718
|
+
const {
|
|
13719
|
+
value: mergedThemeOverrides
|
|
13720
|
+
} = mergedThemeOverridesRef;
|
|
13721
|
+
const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
|
|
13722
|
+
const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
|
|
13723
|
+
if (themeName) {
|
|
13724
|
+
if (hasThemeOverrides) {
|
|
13725
|
+
return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
|
|
13726
|
+
}
|
|
13727
|
+
return themeName;
|
|
13728
|
+
} else {
|
|
13729
|
+
if (hasThemeOverrides) {
|
|
13730
|
+
return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
|
|
13731
|
+
}
|
|
13732
|
+
return "";
|
|
13733
|
+
}
|
|
13734
|
+
});
|
|
13735
|
+
vue.provide(configProviderInjectionKey, {
|
|
13736
|
+
mergedThemeHashRef,
|
|
13737
|
+
mergedBreakpointsRef,
|
|
13738
|
+
mergedRtlRef,
|
|
13739
|
+
mergedIconsRef,
|
|
13740
|
+
mergedComponentPropsRef,
|
|
13741
|
+
mergedBorderedRef,
|
|
13742
|
+
mergedNamespaceRef,
|
|
13743
|
+
mergedClsPrefixRef,
|
|
13744
|
+
mergedLocaleRef: vue.computed(() => {
|
|
13745
|
+
const {
|
|
13746
|
+
locale
|
|
13747
|
+
} = props;
|
|
13748
|
+
if (locale === null) return void 0;
|
|
13749
|
+
return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
|
|
13750
|
+
}),
|
|
13751
|
+
mergedDateLocaleRef: vue.computed(() => {
|
|
13752
|
+
const {
|
|
13753
|
+
dateLocale
|
|
13754
|
+
} = props;
|
|
13755
|
+
if (dateLocale === null) return void 0;
|
|
13756
|
+
return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
|
|
13757
|
+
}),
|
|
13758
|
+
mergedHljsRef: vue.computed(() => {
|
|
13759
|
+
const {
|
|
13760
|
+
hljs
|
|
13761
|
+
} = props;
|
|
13762
|
+
return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
|
|
13763
|
+
}),
|
|
13764
|
+
mergedKatexRef: vue.computed(() => {
|
|
13765
|
+
const {
|
|
13766
|
+
katex
|
|
13767
|
+
} = props;
|
|
13768
|
+
return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
|
|
13769
|
+
}),
|
|
13770
|
+
mergedThemeRef,
|
|
13771
|
+
mergedThemeOverridesRef,
|
|
13772
|
+
inlineThemeDisabled: inlineThemeDisabled || false,
|
|
13773
|
+
preflightStyleDisabled: preflightStyleDisabled || false,
|
|
13774
|
+
styleMountTarget
|
|
13775
|
+
});
|
|
13776
|
+
return {
|
|
13777
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
13778
|
+
mergedBordered: mergedBorderedRef,
|
|
13779
|
+
mergedNamespace: mergedNamespaceRef,
|
|
13780
|
+
mergedTheme: mergedThemeRef,
|
|
13781
|
+
mergedThemeOverrides: mergedThemeOverridesRef
|
|
13782
|
+
};
|
|
13783
|
+
},
|
|
13784
|
+
render() {
|
|
13785
|
+
var _a, _b, _c, _d;
|
|
13786
|
+
return !this.abstract ? vue.h(this.as || this.tag, {
|
|
13787
|
+
class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
|
|
13788
|
+
}, (_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);
|
|
13789
|
+
}
|
|
13790
|
+
});
|
|
13532
13791
|
const commonVariables$1 = {
|
|
13533
13792
|
padding: "4px 0",
|
|
13534
13793
|
optionIconSizeSmall: "14px",
|
|
@@ -15405,62 +15664,20 @@ const NMessageProvider = vue.defineComponent({
|
|
|
15405
15664
|
}))) : null);
|
|
15406
15665
|
}
|
|
15407
15666
|
});
|
|
15408
|
-
const
|
|
15409
|
-
|
|
15410
|
-
const
|
|
15411
|
-
const
|
|
15412
|
-
const
|
|
15413
|
-
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
|
|
15417
|
-
|
|
15418
|
-
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
rejectChange: xmarkIconSvg,
|
|
15423
|
-
overflow: ellipsisVerticalSvg
|
|
15424
|
-
};
|
|
15425
|
-
const _export_sfc = (sfc, props) => {
|
|
15426
|
-
const target = sfc.__vccOpts || sfc;
|
|
15427
|
-
for (const [key, val] of props) {
|
|
15428
|
-
target[key] = val;
|
|
15429
|
-
}
|
|
15430
|
-
return target;
|
|
15431
|
-
};
|
|
15432
|
-
const _hoisted_1$f = { class: "user-container" };
|
|
15433
|
-
const _hoisted_2$9 = ["src"];
|
|
15434
|
-
const _hoisted_3$7 = {
|
|
15435
|
-
key: 1,
|
|
15436
|
-
class: "user-bg"
|
|
15437
|
-
};
|
|
15438
|
-
const _sfc_main$g = {
|
|
15439
|
-
__name: "Avatar",
|
|
15440
|
-
props: {
|
|
15441
|
-
user: {
|
|
15442
|
-
type: Object,
|
|
15443
|
-
required: true
|
|
15444
|
-
}
|
|
15445
|
-
},
|
|
15446
|
-
setup(__props) {
|
|
15447
|
-
const getInitials = (name, email) => {
|
|
15448
|
-
if (!name && !email) return;
|
|
15449
|
-
const firstLetter = name?.substring(0, 1) || email?.substring(0, 1) || null;
|
|
15450
|
-
return firstLetter;
|
|
15451
|
-
};
|
|
15452
|
-
return (_ctx, _cache) => {
|
|
15453
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$f, [
|
|
15454
|
-
__props.user.image ? (vue.openBlock(), vue.createElementBlock("img", {
|
|
15455
|
-
key: 0,
|
|
15456
|
-
class: "user-bg",
|
|
15457
|
-
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
15458
|
-
}, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
|
|
15459
|
-
]);
|
|
15460
|
-
};
|
|
15461
|
-
}
|
|
15462
|
-
};
|
|
15463
|
-
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-53e13009"]]);
|
|
15667
|
+
const DEFAULT_UI_FONT_FAMILY = "Arial, Helvetica, sans-serif";
|
|
15668
|
+
function useUiFontFamily() {
|
|
15669
|
+
const instance = vue.getCurrentInstance();
|
|
15670
|
+
const uiFontFamily = vue.computed(() => {
|
|
15671
|
+
const configured = instance?.proxy?.$superdoc?.config?.uiDisplayFallbackFont;
|
|
15672
|
+
if (typeof configured === "string" && configured.trim()) {
|
|
15673
|
+
return configured.trim();
|
|
15674
|
+
}
|
|
15675
|
+
return DEFAULT_UI_FONT_FAMILY;
|
|
15676
|
+
});
|
|
15677
|
+
return {
|
|
15678
|
+
uiFontFamily
|
|
15679
|
+
};
|
|
15680
|
+
}
|
|
15464
15681
|
const _hoisted_1$e = { class: "comment-option" };
|
|
15465
15682
|
const _hoisted_2$8 = ["innerHTML"];
|
|
15466
15683
|
const _hoisted_3$6 = { class: "option-state" };
|
|
@@ -15481,6 +15698,7 @@ const _sfc_main$f = {
|
|
|
15481
15698
|
setup(__props, { emit: __emit }) {
|
|
15482
15699
|
const emit = __emit;
|
|
15483
15700
|
const props = __props;
|
|
15701
|
+
const { uiFontFamily } = useUiFontFamily();
|
|
15484
15702
|
const renderIcon = (icon) => {
|
|
15485
15703
|
return () => {
|
|
15486
15704
|
return vue.h("div", { innerHTML: icon, class: "internal-dropdown__item-icon" });
|
|
@@ -15542,7 +15760,8 @@ const _sfc_main$f = {
|
|
|
15542
15760
|
trigger: "click",
|
|
15543
15761
|
options,
|
|
15544
15762
|
onSelect: _cache[0] || (_cache[0] = ($event) => handleSelect($event)),
|
|
15545
|
-
disabled: __props.isDisabled
|
|
15763
|
+
disabled: __props.isDisabled,
|
|
15764
|
+
"content-style": { fontFamily: vue.unref(uiFontFamily) }
|
|
15546
15765
|
}, {
|
|
15547
15766
|
default: vue.withCtx(() => [
|
|
15548
15767
|
vue.createBaseVNode("div", _hoisted_1$e, [
|
|
@@ -15558,12 +15777,12 @@ const _sfc_main$f = {
|
|
|
15558
15777
|
])
|
|
15559
15778
|
]),
|
|
15560
15779
|
_: 1
|
|
15561
|
-
}, 8, ["disabled"])
|
|
15780
|
+
}, 8, ["disabled", "content-style"])
|
|
15562
15781
|
], 4);
|
|
15563
15782
|
};
|
|
15564
15783
|
}
|
|
15565
15784
|
};
|
|
15566
|
-
const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-
|
|
15785
|
+
const InternalDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-8b9e3b75"]]);
|
|
15567
15786
|
function formatDate(timestamp) {
|
|
15568
15787
|
const date = new Date(timestamp);
|
|
15569
15788
|
const hours = date.getHours();
|
|
@@ -15709,6 +15928,7 @@ const _sfc_main$e = {
|
|
|
15709
15928
|
const role = proxy.$superdoc.config.role;
|
|
15710
15929
|
const isInternal = proxy.$superdoc.config.isInternal;
|
|
15711
15930
|
const isOwnComment = props.comment.creatorEmail === proxy.$superdoc.config.user.email;
|
|
15931
|
+
const { uiFontFamily } = useUiFontFamily();
|
|
15712
15932
|
const OVERFLOW_OPTIONS = Object.freeze({
|
|
15713
15933
|
edit: { label: "Edit", key: "edit" },
|
|
15714
15934
|
delete: { label: "Delete", key: "delete" }
|
|
@@ -15812,7 +16032,8 @@ const _sfc_main$e = {
|
|
|
15812
16032
|
key: 2,
|
|
15813
16033
|
trigger: "click",
|
|
15814
16034
|
options: getOverflowOptions.value,
|
|
15815
|
-
onSelect: handleSelect
|
|
16035
|
+
onSelect: handleSelect,
|
|
16036
|
+
"content-style": { fontFamily: vue.unref(uiFontFamily) }
|
|
15816
16037
|
}, {
|
|
15817
16038
|
default: vue.withCtx(() => [
|
|
15818
16039
|
vue.createBaseVNode("div", {
|
|
@@ -15827,13 +16048,13 @@ const _sfc_main$e = {
|
|
|
15827
16048
|
])
|
|
15828
16049
|
]),
|
|
15829
16050
|
_: 1
|
|
15830
|
-
}, 8, ["options"])) : vue.createCommentVNode("", true)
|
|
16051
|
+
}, 8, ["options", "content-style"])) : vue.createCommentVNode("", true)
|
|
15831
16052
|
])
|
|
15832
16053
|
]);
|
|
15833
16054
|
};
|
|
15834
16055
|
}
|
|
15835
16056
|
};
|
|
15836
|
-
const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
16057
|
+
const CommentHeader = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-5e404f08"]]);
|
|
15837
16058
|
const _hoisted_1$c = { class: "input-section" };
|
|
15838
16059
|
const _sfc_main$d = {
|
|
15839
16060
|
__name: "CommentInput",
|
|
@@ -16253,7 +16474,7 @@ const _sfc_main$c = {
|
|
|
16253
16474
|
};
|
|
16254
16475
|
}
|
|
16255
16476
|
};
|
|
16256
|
-
const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
16477
|
+
const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-abfa4e05"]]);
|
|
16257
16478
|
const _hoisted_1$a = { class: "comments-list" };
|
|
16258
16479
|
const _hoisted_2$5 = { key: 0 };
|
|
16259
16480
|
const _hoisted_3$3 = { class: "comment-item" };
|
|
@@ -16854,7 +17075,7 @@ const _sfc_main$4 = {
|
|
|
16854
17075
|
};
|
|
16855
17076
|
}
|
|
16856
17077
|
};
|
|
16857
|
-
const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
17078
|
+
const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-1e49d9b3"]]);
|
|
16858
17079
|
const floor = (val, precision) => {
|
|
16859
17080
|
const multiplier = 10 ** precision;
|
|
16860
17081
|
return Math.floor(val * multiplier) / multiplier;
|
|
@@ -17259,7 +17480,7 @@ const _sfc_main = {
|
|
|
17259
17480
|
__name: "SuperDoc",
|
|
17260
17481
|
emits: ["selection-update"],
|
|
17261
17482
|
setup(__props, { emit: __emit }) {
|
|
17262
|
-
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-
|
|
17483
|
+
const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-cVGt7Ne7.cjs")));
|
|
17263
17484
|
const superdocStore = useSuperdocStore();
|
|
17264
17485
|
const commentsStore = useCommentsStore();
|
|
17265
17486
|
const {
|
|
@@ -17299,11 +17520,15 @@ const _sfc_main = {
|
|
|
17299
17520
|
const { proxy } = vue.getCurrentInstance();
|
|
17300
17521
|
commentsStore.proxy = proxy;
|
|
17301
17522
|
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
17523
|
+
const { uiFontFamily } = useUiFontFamily();
|
|
17302
17524
|
const commentsModuleConfig = vue.computed(() => {
|
|
17303
17525
|
const config = modules.comments;
|
|
17304
17526
|
if (config === false || config == null) return null;
|
|
17305
17527
|
return config;
|
|
17306
17528
|
});
|
|
17529
|
+
const superdocStyleVars = vue.computed(() => ({
|
|
17530
|
+
"--sd-ui-font-family": uiFontFamily.value
|
|
17531
|
+
}));
|
|
17307
17532
|
const layers = vue.ref(null);
|
|
17308
17533
|
const commentsLayer = vue.ref(null);
|
|
17309
17534
|
const toolsMenuPosition = vue.reactive({ top: null, right: "-25px", zIndex: 101 });
|
|
@@ -17820,155 +18045,164 @@ const _sfc_main = {
|
|
|
17820
18045
|
});
|
|
17821
18046
|
return (_ctx, _cache) => {
|
|
17822
18047
|
const _directive_click_outside = vue.resolveDirective("click-outside");
|
|
17823
|
-
return vue.openBlock(), vue.
|
|
17824
|
-
|
|
17825
|
-
|
|
17826
|
-
|
|
17827
|
-
|
|
17828
|
-
|
|
17829
|
-
|
|
17830
|
-
|
|
17831
|
-
}, [
|
|
17832
|
-
showToolsFloatingMenu.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
17833
|
-
key: 0,
|
|
17834
|
-
class: "superdoc__tools tools",
|
|
17835
|
-
style: vue.normalizeStyle(toolsMenuPosition)
|
|
18048
|
+
return vue.openBlock(), vue.createBlock(vue.unref(NConfigProvider), {
|
|
18049
|
+
abstract: "",
|
|
18050
|
+
"preflight-style-disabled": ""
|
|
18051
|
+
}, {
|
|
18052
|
+
default: vue.withCtx(() => [
|
|
18053
|
+
vue.createBaseVNode("div", {
|
|
18054
|
+
class: vue.normalizeClass(["superdoc", { "superdoc--with-sidebar": showCommentsSidebar.value, "high-contrast": vue.unref(isHighContrastMode2) }]),
|
|
18055
|
+
style: vue.normalizeStyle(superdocStyleVars.value)
|
|
17836
18056
|
}, [
|
|
17837
18057
|
vue.createBaseVNode("div", {
|
|
17838
|
-
class: "
|
|
17839
|
-
|
|
17840
|
-
|
|
17841
|
-
|
|
17842
|
-
vue.createBaseVNode("div", {
|
|
17843
|
-
class: "superdoc__tools-icon",
|
|
17844
|
-
innerHTML: vue.unref(superdocIcons).comment
|
|
17845
|
-
}, null, 8, _hoisted_1)
|
|
17846
|
-
], 32),
|
|
17847
|
-
vue.unref(proxy).$superdoc.config.modules.ai ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
17848
|
-
key: 0,
|
|
17849
|
-
class: "tools-item",
|
|
17850
|
-
"data-id": "is-tool",
|
|
17851
|
-
onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
|
|
17852
|
-
}, [..._cache[3] || (_cache[3] = [
|
|
17853
|
-
vue.createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
|
|
17854
|
-
])], 32)) : vue.createCommentVNode("", true)
|
|
17855
|
-
], 4)) : vue.createCommentVNode("", true),
|
|
17856
|
-
vue.createBaseVNode("div", _hoisted_2, [
|
|
17857
|
-
isCommentsEnabled.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
17858
|
-
key: 0,
|
|
17859
|
-
class: "superdoc__selection-layer selection-layer",
|
|
17860
|
-
onMousedown: handleSelectionStart,
|
|
17861
|
-
onMouseup: handleDragEnd,
|
|
17862
|
-
ref_key: "selectionLayer",
|
|
17863
|
-
ref: selectionLayer
|
|
18058
|
+
class: "superdoc__layers layers",
|
|
18059
|
+
ref_key: "layers",
|
|
18060
|
+
ref: layers,
|
|
18061
|
+
role: "group"
|
|
17864
18062
|
}, [
|
|
17865
|
-
|
|
18063
|
+
showToolsFloatingMenu.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
17866
18064
|
key: 0,
|
|
17867
|
-
|
|
17868
|
-
|
|
17869
|
-
}, null, 4)) : vue.createCommentVNode("", true)
|
|
17870
|
-
], 544)) : vue.createCommentVNode("", true),
|
|
17871
|
-
"hrbr-fields" in vue.unref(modules) && layers.value ? (vue.openBlock(), vue.createBlock(HrbrFieldsLayer, {
|
|
17872
|
-
key: 1,
|
|
17873
|
-
fields: vue.unref(modules)["hrbr-fields"],
|
|
17874
|
-
class: "superdoc__comments-layer comments-layer",
|
|
17875
|
-
style: { "z-index": "2" },
|
|
17876
|
-
ref_key: "hrbrFieldsLayer",
|
|
17877
|
-
ref: hrbrFieldsLayer
|
|
17878
|
-
}, null, 8, ["fields"])) : vue.createCommentVNode("", true),
|
|
17879
|
-
layers.value ? (vue.openBlock(), vue.createBlock(CommentsLayer, {
|
|
17880
|
-
key: 2,
|
|
17881
|
-
class: "superdoc__comments-layer comments-layer",
|
|
17882
|
-
style: { "z-index": "3" },
|
|
17883
|
-
ref_key: "commentsLayer",
|
|
17884
|
-
ref: commentsLayer,
|
|
17885
|
-
parent: layers.value,
|
|
17886
|
-
user: vue.unref(user),
|
|
17887
|
-
onHighlightClick: handleHighlightClick
|
|
17888
|
-
}, null, 8, ["parent", "user"])) : vue.createCommentVNode("", true),
|
|
17889
|
-
vue.unref(showAiLayer) ? (vue.openBlock(), vue.createBlock(AiLayer, {
|
|
17890
|
-
key: 3,
|
|
17891
|
-
class: "ai-layer",
|
|
17892
|
-
style: { "z-index": "4" },
|
|
17893
|
-
ref_key: "aiLayer",
|
|
17894
|
-
ref: aiLayer,
|
|
17895
|
-
editor: vue.unref(proxy).$superdoc.activeEditor
|
|
17896
|
-
}, null, 8, ["editor"])) : vue.createCommentVNode("", true),
|
|
17897
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(documents), (doc) => {
|
|
17898
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
17899
|
-
class: "superdoc__sub-document sub-document",
|
|
17900
|
-
key: doc.id
|
|
18065
|
+
class: "superdoc__tools tools",
|
|
18066
|
+
style: vue.normalizeStyle(toolsMenuPosition)
|
|
17901
18067
|
}, [
|
|
17902
|
-
|
|
18068
|
+
vue.createBaseVNode("div", {
|
|
18069
|
+
class: "tools-item",
|
|
18070
|
+
"data-id": "is-tool",
|
|
18071
|
+
onMousedown: _cache[0] || (_cache[0] = vue.withModifiers(($event) => handleToolClick("comments"), ["stop", "prevent"]))
|
|
18072
|
+
}, [
|
|
18073
|
+
vue.createBaseVNode("div", {
|
|
18074
|
+
class: "superdoc__tools-icon",
|
|
18075
|
+
innerHTML: vue.unref(superdocIcons).comment
|
|
18076
|
+
}, null, 8, _hoisted_1)
|
|
18077
|
+
], 32),
|
|
18078
|
+
vue.unref(proxy).$superdoc.config.modules.ai ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
18079
|
+
key: 0,
|
|
18080
|
+
class: "tools-item",
|
|
18081
|
+
"data-id": "is-tool",
|
|
18082
|
+
onMousedown: _cache[1] || (_cache[1] = vue.withModifiers(($event) => handleToolClick("ai"), ["stop", "prevent"]))
|
|
18083
|
+
}, [..._cache[3] || (_cache[3] = [
|
|
18084
|
+
vue.createBaseVNode("div", { class: "superdoc__tools-icon ai-tool" }, null, -1)
|
|
18085
|
+
])], 32)) : vue.createCommentVNode("", true)
|
|
18086
|
+
], 4)) : vue.createCommentVNode("", true),
|
|
18087
|
+
vue.createBaseVNode("div", _hoisted_2, [
|
|
18088
|
+
isCommentsEnabled.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
17903
18089
|
key: 0,
|
|
17904
|
-
"
|
|
17905
|
-
|
|
17906
|
-
|
|
17907
|
-
|
|
17908
|
-
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
|
|
17912
|
-
|
|
17913
|
-
|
|
18090
|
+
class: "superdoc__selection-layer selection-layer",
|
|
18091
|
+
onMousedown: handleSelectionStart,
|
|
18092
|
+
onMouseup: handleDragEnd,
|
|
18093
|
+
ref_key: "selectionLayer",
|
|
18094
|
+
ref: selectionLayer
|
|
18095
|
+
}, [
|
|
18096
|
+
vue.unref(selectionPosition) && shouldShowSelection.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
18097
|
+
key: 0,
|
|
18098
|
+
style: vue.normalizeStyle(getSelectionPosition.value),
|
|
18099
|
+
class: "superdoc__temp-selection temp-selection sd-highlight sd-initial-highlight"
|
|
18100
|
+
}, null, 4)) : vue.createCommentVNode("", true)
|
|
18101
|
+
], 544)) : vue.createCommentVNode("", true),
|
|
18102
|
+
"hrbr-fields" in vue.unref(modules) && layers.value ? (vue.openBlock(), vue.createBlock(HrbrFieldsLayer, {
|
|
18103
|
+
key: 1,
|
|
18104
|
+
fields: vue.unref(modules)["hrbr-fields"],
|
|
18105
|
+
class: "superdoc__comments-layer comments-layer",
|
|
18106
|
+
style: { "z-index": "2" },
|
|
18107
|
+
ref_key: "hrbrFieldsLayer",
|
|
18108
|
+
ref: hrbrFieldsLayer
|
|
18109
|
+
}, null, 8, ["fields"])) : vue.createCommentVNode("", true),
|
|
18110
|
+
layers.value ? (vue.openBlock(), vue.createBlock(CommentsLayer, {
|
|
18111
|
+
key: 2,
|
|
18112
|
+
class: "superdoc__comments-layer comments-layer",
|
|
18113
|
+
style: { "z-index": "3" },
|
|
18114
|
+
ref_key: "commentsLayer",
|
|
18115
|
+
ref: commentsLayer,
|
|
18116
|
+
parent: layers.value,
|
|
18117
|
+
user: vue.unref(user),
|
|
18118
|
+
onHighlightClick: handleHighlightClick
|
|
18119
|
+
}, null, 8, ["parent", "user"])) : vue.createCommentVNode("", true),
|
|
18120
|
+
vue.unref(showAiLayer) ? (vue.openBlock(), vue.createBlock(AiLayer, {
|
|
18121
|
+
key: 3,
|
|
18122
|
+
class: "ai-layer",
|
|
18123
|
+
style: { "z-index": "4" },
|
|
18124
|
+
ref_key: "aiLayer",
|
|
18125
|
+
ref: aiLayer,
|
|
18126
|
+
editor: vue.unref(proxy).$superdoc.activeEditor
|
|
18127
|
+
}, null, 8, ["editor"])) : vue.createCommentVNode("", true),
|
|
18128
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(documents), (doc) => {
|
|
18129
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
18130
|
+
class: "superdoc__sub-document sub-document",
|
|
18131
|
+
key: doc.id
|
|
18132
|
+
}, [
|
|
18133
|
+
doc.type === vue.unref(PDF) ? (vue.openBlock(), vue.createBlock(vue.unref(PdfViewer), {
|
|
17914
18134
|
key: 0,
|
|
18135
|
+
"document-data": doc,
|
|
18136
|
+
config: vue.unref(pdfConfig),
|
|
18137
|
+
onSelectionChange: handleSelectionChange,
|
|
18138
|
+
onReady: handleDocumentReady,
|
|
18139
|
+
onPageLoaded: vue.unref(handlePageReady),
|
|
18140
|
+
onBypassSelection: handlePdfClick
|
|
18141
|
+
}, null, 8, ["document-data", "config", "onPageLoaded"])) : vue.createCommentVNode("", true),
|
|
18142
|
+
vue.createVNode(vue.unref(NMessageProvider), null, {
|
|
18143
|
+
default: vue.withCtx(() => [
|
|
18144
|
+
doc.type === vue.unref(DOCX) ? (vue.openBlock(), vue.createBlock(vue.unref(superEditor_es.SuperEditor), {
|
|
18145
|
+
key: 0,
|
|
18146
|
+
"file-source": doc.data,
|
|
18147
|
+
state: doc.state,
|
|
18148
|
+
"document-id": doc.id,
|
|
18149
|
+
options: { ...editorOptions(doc), rulers: doc.rulers },
|
|
18150
|
+
onEditorReady,
|
|
18151
|
+
onPageMarginsChange: ($event) => handleSuperEditorPageMarginsChange(doc, $event)
|
|
18152
|
+
}, null, 8, ["file-source", "state", "document-id", "options", "onPageMarginsChange"])) : vue.createCommentVNode("", true)
|
|
18153
|
+
]),
|
|
18154
|
+
_: 2
|
|
18155
|
+
}, 1024),
|
|
18156
|
+
doc.type === vue.unref(HTML) ? (vue.openBlock(), vue.createBlock(HtmlViewer, {
|
|
18157
|
+
key: 1,
|
|
18158
|
+
onReady: _cache[2] || (_cache[2] = (id) => handleDocumentReady(id, null)),
|
|
18159
|
+
onSelectionChange: handleSelectionChange,
|
|
17915
18160
|
"file-source": doc.data,
|
|
17916
|
-
|
|
17917
|
-
|
|
17918
|
-
|
|
17919
|
-
|
|
17920
|
-
|
|
17921
|
-
|
|
17922
|
-
|
|
17923
|
-
|
|
17924
|
-
|
|
17925
|
-
|
|
17926
|
-
|
|
17927
|
-
|
|
17928
|
-
|
|
17929
|
-
|
|
17930
|
-
|
|
17931
|
-
|
|
17932
|
-
|
|
17933
|
-
|
|
17934
|
-
|
|
17935
|
-
|
|
17936
|
-
|
|
17937
|
-
|
|
17938
|
-
|
|
17939
|
-
|
|
17940
|
-
"
|
|
17941
|
-
|
|
17942
|
-
|
|
17943
|
-
|
|
17944
|
-
|
|
17945
|
-
|
|
17946
|
-
|
|
17947
|
-
|
|
17948
|
-
|
|
17949
|
-
"
|
|
17950
|
-
|
|
17951
|
-
|
|
17952
|
-
|
|
17953
|
-
|
|
17954
|
-
|
|
17955
|
-
|
|
17956
|
-
|
|
17957
|
-
style: vue.normalizeStyle(vue.unref(aiWriterPosition))
|
|
17958
|
-
}, [
|
|
17959
|
-
vue.createVNode(vue.unref(superEditor_es.AIWriter), {
|
|
17960
|
-
"selected-text": vue.unref(selectedText),
|
|
17961
|
-
"handle-close": vue.unref(handleAiWriterClose),
|
|
17962
|
-
editor: vue.unref(proxy).$superdoc.activeEditor,
|
|
17963
|
-
"api-key": vue.unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
|
|
17964
|
-
endpoint: vue.unref(proxy).$superdoc.config?.modules?.ai?.endpoint
|
|
17965
|
-
}, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
|
|
17966
|
-
], 4)) : vue.createCommentVNode("", true)
|
|
17967
|
-
], 2);
|
|
18161
|
+
"document-id": doc.id
|
|
18162
|
+
}, null, 8, ["file-source", "document-id"])) : vue.createCommentVNode("", true)
|
|
18163
|
+
]);
|
|
18164
|
+
}), 128))
|
|
18165
|
+
])
|
|
18166
|
+
], 512),
|
|
18167
|
+
showCommentsSidebar.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3, [
|
|
18168
|
+
vue.unref(pendingComment) ? vue.withDirectives((vue.openBlock(), vue.createBlock(CommentDialog, {
|
|
18169
|
+
key: 0,
|
|
18170
|
+
comment: vue.unref(pendingComment),
|
|
18171
|
+
"auto-focus": true,
|
|
18172
|
+
"is-floating": true
|
|
18173
|
+
}, null, 8, ["comment"])), [
|
|
18174
|
+
[_directive_click_outside, cancelPendingComment]
|
|
18175
|
+
]) : vue.createCommentVNode("", true),
|
|
18176
|
+
vue.createBaseVNode("div", _hoisted_4, [
|
|
18177
|
+
vue.unref(hasInitializedLocations) && vue.unref(getFloatingComments).length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(vue.unref(documentsWithConverations), (doc) => {
|
|
18178
|
+
return vue.openBlock(), vue.createBlock(FloatingComments, {
|
|
18179
|
+
parent: layers.value,
|
|
18180
|
+
"current-document": doc
|
|
18181
|
+
}, null, 8, ["parent", "current-document"]);
|
|
18182
|
+
}), 256)) : vue.createCommentVNode("", true)
|
|
18183
|
+
])
|
|
18184
|
+
])) : vue.createCommentVNode("", true),
|
|
18185
|
+
vue.unref(showAiWriter) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
18186
|
+
key: 1,
|
|
18187
|
+
class: "ai-writer-container",
|
|
18188
|
+
style: vue.normalizeStyle(vue.unref(aiWriterPosition))
|
|
18189
|
+
}, [
|
|
18190
|
+
vue.createVNode(vue.unref(superEditor_es.AIWriter), {
|
|
18191
|
+
"selected-text": vue.unref(selectedText),
|
|
18192
|
+
"handle-close": vue.unref(handleAiWriterClose),
|
|
18193
|
+
editor: vue.unref(proxy).$superdoc.activeEditor,
|
|
18194
|
+
"api-key": vue.unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
|
|
18195
|
+
endpoint: vue.unref(proxy).$superdoc.config?.modules?.ai?.endpoint
|
|
18196
|
+
}, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
|
|
18197
|
+
], 4)) : vue.createCommentVNode("", true)
|
|
18198
|
+
], 6)
|
|
18199
|
+
]),
|
|
18200
|
+
_: 1
|
|
18201
|
+
});
|
|
17968
18202
|
};
|
|
17969
18203
|
}
|
|
17970
18204
|
};
|
|
17971
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
18205
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-309688b3"]]);
|
|
17972
18206
|
const createSuperdocVueApp = () => {
|
|
17973
18207
|
const app = vue.createApp(App);
|
|
17974
18208
|
const pinia = createPinia();
|
|
@@ -18078,6 +18312,8 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18078
18312
|
toolbarGroups: ["left", "center", "right"],
|
|
18079
18313
|
toolbarIcons: {},
|
|
18080
18314
|
toolbarTexts: {},
|
|
18315
|
+
// UI font for SuperDoc surfaces (toolbar, comments UI, etc.)
|
|
18316
|
+
uiDisplayFallbackFont: "Arial, Helvetica, sans-serif",
|
|
18081
18317
|
isDev: false,
|
|
18082
18318
|
// telemetry config
|
|
18083
18319
|
telemetry: null,
|
|
@@ -18148,7 +18384,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18148
18384
|
this.config.colors = shuffleArray(this.config.colors);
|
|
18149
18385
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
18150
18386
|
this.colorIndex = 0;
|
|
18151
|
-
this.version = "1.0.0-next.
|
|
18387
|
+
this.version = "1.0.0-next.3";
|
|
18152
18388
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
18153
18389
|
this.superdocId = config.superdocId || uuid.v4();
|
|
18154
18390
|
this.colors = this.config.colors;
|
|
@@ -18507,6 +18743,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
18507
18743
|
superdoc: this,
|
|
18508
18744
|
aiApiKey: this.config.modules?.ai?.apiKey,
|
|
18509
18745
|
aiEndpoint: this.config.modules?.ai?.endpoint,
|
|
18746
|
+
uiDisplayFallbackFont: this.config.uiDisplayFallbackFont,
|
|
18510
18747
|
...moduleConfig,
|
|
18511
18748
|
excludeItems
|
|
18512
18749
|
// Override moduleConfig.excludeItems with our computed list
|