@harbour-enterprises/superdoc 0.14.0-next.2 → 0.14.0-next.21
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/{eventemitter3-BrspJk8q.es.js → eventemitter3-BIPEy-pY.es.js} +1 -1
- package/dist/chunks/{eventemitter3-DfVviFzP.cjs → eventemitter3-DGnD-HK9.cjs} +1 -1
- package/dist/chunks/{index-Diu6UKHt.es.js → index-BvK-G6B1.es.js} +4 -4
- package/dist/chunks/{index-B4J7wgs6.cjs → index-CCRVYhTn.cjs} +2 -2
- package/dist/chunks/{index-Cdsq63Xq.cjs → index-CgJ5KVh6.cjs} +4 -4
- package/dist/chunks/{index-Hr3Um-Bg.es.js → index-oHslWah4.es.js} +2 -2
- package/dist/chunks/{jszip-DckFs3A7.es.js → jszip-CYDYUNnI.es.js} +1 -1
- package/dist/chunks/{jszip-BTAcmbVg.cjs → jszip-D5XoMX4C.cjs} +1 -1
- package/dist/chunks/{super-editor.es-C6TRTeBI.es.js → super-editor.es-Cu7C5Ezf.es.js} +3414 -2237
- package/dist/chunks/{super-editor.es-DFls-Ipj.cjs → super-editor.es-DM3LYkiV.cjs} +3402 -2225
- package/dist/chunks/{url-BIzg4y2i.cjs → url-BG1Z_Z2_.cjs} +2 -2
- package/dist/chunks/{url-CHayXMZH.es.js → url-Dvx6wrNT.es.js} +2 -2
- package/dist/chunks/{vue-Bi1uWinj.es.js → vue-lU0o_RlU.es.js} +35 -15
- package/dist/chunks/{vue-HIY1g7dm.cjs → vue-tQYF719J.cjs} +24 -4
- package/dist/chunks/{xml-js-BjqmFOSP.cjs → xml-js-BHJlXtfU.cjs} +13 -6
- package/dist/chunks/{xml-js-CfClL-1b.es.js → xml-js-DNISVjNF.es.js} +13 -6
- package/dist/composables/use-ai.d.ts +1 -3
- package/dist/composables/use-ai.d.ts.map +1 -1
- package/dist/core/SuperDoc.d.ts +5 -0
- package/dist/core/SuperDoc.d.ts.map +1 -1
- package/dist/helpers/floor.d.ts +2 -0
- package/dist/helpers/floor.d.ts.map +1 -0
- package/dist/stores/hrbr-fields-store.d.ts.map +1 -1
- package/dist/style.css +407 -291
- package/dist/super-editor/ai-writer.es.js +18 -33
- package/dist/super-editor/chunks/{converter-2R-ZXcMD.js → converter-BnCzxu5M.js} +1685 -1609
- package/dist/super-editor/chunks/{docx-zipper-D1Hg-x9a.js → docx-zipper-BPw_B6hI.js} +1 -1
- package/dist/super-editor/chunks/{editor-DYjOoB1N.js → editor-DD4MGOZb.js} +1788 -1251
- package/dist/super-editor/chunks/{toolbar-WyGfV3qj.js → toolbar-BCtZctWE.js} +33 -38
- package/dist/super-editor/components/cursor-helpers.d.ts +23 -0
- package/dist/super-editor/components/cursor-helpers.d.ts.map +1 -1
- package/dist/super-editor/components/slash-menu/constants.d.ts +64 -0
- package/dist/super-editor/components/slash-menu/constants.d.ts.map +1 -0
- package/dist/super-editor/components/slash-menu/menuItems.d.ts +35 -0
- package/dist/super-editor/components/slash-menu/menuItems.d.ts.map +1 -0
- package/dist/super-editor/components/slash-menu/utils.d.ts +10 -0
- package/dist/super-editor/components/slash-menu/utils.d.ts.map +1 -0
- package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/super-toolbar.d.ts.map +1 -1
- package/dist/super-editor/components/toolbar/toolbarIcons.d.ts +3 -12
- package/dist/super-editor/components/toolbar/toolbarTexts.d.ts +0 -11
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/core/Editor.d.ts +12 -4
- package/dist/super-editor/core/Editor.d.ts.map +1 -1
- package/dist/super-editor/core/InputRule.d.ts.map +1 -1
- package/dist/super-editor/core/commands/decreaseListIndent.d.ts.map +1 -1
- package/dist/super-editor/core/commands/deleteListItem.d.ts.map +1 -1
- package/dist/super-editor/core/commands/deleteSelection.d.ts +2 -0
- package/dist/super-editor/core/commands/deleteSelection.d.ts.map +1 -1
- package/dist/super-editor/core/commands/increaseListIndent.d.ts.map +1 -1
- package/dist/super-editor/core/commands/joinBackward.d.ts.map +1 -1
- package/dist/super-editor/core/commands/joinForward.d.ts.map +1 -1
- package/dist/super-editor/core/commands/splitListItem.d.ts.map +1 -1
- package/dist/super-editor/core/commands/toggleList.d.ts +5 -1
- package/dist/super-editor/core/commands/toggleList.d.ts.map +1 -1
- package/dist/super-editor/core/extensions/keymap.d.ts.map +1 -1
- package/dist/super-editor/core/helpers/list-numbering-helpers.d.ts +6 -5
- package/dist/super-editor/core/helpers/list-numbering-helpers.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/SuperConverter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/exporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/annotationImporter.d.ts +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/annotationImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/hyperlinkImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/listImporter.d.ts.map +1 -1
- package/dist/super-editor/core/super-converter/v2/importer/paragraphNodeImporter.d.ts.map +1 -1
- package/dist/super-editor/core/utilities/clipboardUtils.d.ts +27 -0
- package/dist/super-editor/core/utilities/clipboardUtils.d.ts.map +1 -0
- package/dist/super-editor/core/utilities/index.d.ts +1 -0
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/extensions/ai/ai-plugin.d.ts.map +1 -1
- package/dist/super-editor/extensions/bullet-list/bullet-list.d.ts.map +1 -1
- package/dist/super-editor/extensions/field-annotation/fieldAnnotationHelpers/findRemovedFieldAnnotations.d.ts.map +1 -1
- package/dist/super-editor/extensions/index.d.ts.map +1 -1
- package/dist/super-editor/extensions/list-item/list-item.d.ts.map +1 -1
- package/dist/super-editor/extensions/noderesizer/noderesizer.d.ts +0 -3
- package/dist/super-editor/extensions/noderesizer/noderesizer.d.ts.map +1 -1
- package/dist/super-editor/extensions/ordered-list/helpers/orderedListSyncPlugin.d.ts.map +1 -1
- package/dist/super-editor/extensions/pagination/pagination-helpers.d.ts.map +1 -1
- package/dist/super-editor/extensions/pagination/pagination.d.ts.map +1 -1
- package/dist/super-editor/extensions/paragraph/paragraph.d.ts.map +1 -1
- package/dist/super-editor/extensions/slash-menu/index.d.ts +2 -0
- package/dist/super-editor/extensions/slash-menu/index.d.ts.map +1 -0
- package/dist/super-editor/extensions/slash-menu/slash-menu.d.ts +4 -0
- package/dist/super-editor/extensions/slash-menu/slash-menu.d.ts.map +1 -0
- package/dist/super-editor/extensions/table/table.d.ts.map +1 -1
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/index.d.ts +1 -1
- package/dist/super-editor/index.d.ts.map +1 -1
- package/dist/super-editor/style.css +368 -261
- package/dist/super-editor/super-editor.es.js +1202 -608
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +3 -2
- package/dist/super-editor.es.js +15 -14
- package/dist/superdoc.cjs +89 -76
- package/dist/superdoc.es.js +141 -128
- package/dist/superdoc.umd.js +3716 -2509
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +2 -2
package/dist/super-editor.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
require("./chunks/vue-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-DM3LYkiV.cjs");
|
|
4
|
+
require("./chunks/vue-tQYF719J.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
|
7
7
|
exports.BasicUpload = superEditor_es._sfc_main$1;
|
|
@@ -9,6 +9,7 @@ exports.CommentsPluginKey = superEditor_es.CommentsPluginKey;
|
|
|
9
9
|
exports.DocxZipper = superEditor_es.DocxZipper;
|
|
10
10
|
exports.Editor = superEditor_es.Editor;
|
|
11
11
|
exports.Extensions = superEditor_es.Extensions;
|
|
12
|
+
exports.SlashMenu = superEditor_es._sfc_main$5;
|
|
12
13
|
exports.SuperConverter = superEditor_es.SuperConverter;
|
|
13
14
|
exports.SuperEditor = superEditor_es.SuperEditor;
|
|
14
15
|
exports.SuperInput = superEditor_es.SuperInput;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b,
|
|
2
|
-
import "./chunks/vue-
|
|
1
|
+
import { A, a, _, C, D, E, b, c, S, d, e, f, T, g, h, i, j, k, l, m, n, o, p } from "./chunks/super-editor.es-Cu7C5Ezf.es.js";
|
|
2
|
+
import "./chunks/vue-lU0o_RlU.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
|
5
5
|
a as AnnotatorHelpers,
|
|
@@ -8,19 +8,20 @@ export {
|
|
|
8
8
|
D as DocxZipper,
|
|
9
9
|
E as Editor,
|
|
10
10
|
b as Extensions,
|
|
11
|
+
c as SlashMenu,
|
|
11
12
|
S as SuperConverter,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
d as SuperEditor,
|
|
14
|
+
e as SuperInput,
|
|
15
|
+
f as SuperToolbar,
|
|
15
16
|
T as Toolbar,
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
g as TrackChangesBasePluginKey,
|
|
18
|
+
h as createZip,
|
|
18
19
|
i as fieldAnnotationHelpers,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
j as getActiveFormatting,
|
|
21
|
+
k as getAllowedImageDimensions,
|
|
22
|
+
l as getMarksFromSelection,
|
|
23
|
+
m as getRichTextExtensions,
|
|
24
|
+
n as getStarterExtensions,
|
|
25
|
+
o as helpers,
|
|
26
|
+
p as trackChangesHelpers
|
|
26
27
|
};
|
package/dist/superdoc.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
4
|
-
const vue = require("./chunks/vue-
|
|
5
|
-
const jszip = require("./chunks/jszip-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-DM3LYkiV.cjs");
|
|
4
|
+
const vue = require("./chunks/vue-tQYF719J.cjs");
|
|
5
|
+
const jszip = require("./chunks/jszip-D5XoMX4C.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-CPqX9RF5.cjs");
|
|
7
|
-
const eventemitter3 = require("./chunks/eventemitter3-
|
|
7
|
+
const eventemitter3 = require("./chunks/eventemitter3-DGnD-HK9.cjs");
|
|
8
8
|
const provider = require("@hocuspocus/provider");
|
|
9
9
|
const Y = require("yjs");
|
|
10
10
|
const uuid = require("./chunks/uuid-CQzaMNgL.cjs");
|
|
@@ -2172,8 +2172,8 @@ function useField(field) {
|
|
|
2172
2172
|
const originalJSON = field;
|
|
2173
2173
|
const fieldStyle = vue.reactive({
|
|
2174
2174
|
fontFamily: field.fontfamily || "Arial",
|
|
2175
|
-
fontSize: field.font_size || "
|
|
2176
|
-
originalFontSize: field.original_font_size || "
|
|
2175
|
+
fontSize: field.font_size || "12pt",
|
|
2176
|
+
originalFontSize: field.original_font_size || "12pt"
|
|
2177
2177
|
});
|
|
2178
2178
|
const logicRules = vue.ref(field.logicrules);
|
|
2179
2179
|
const hidden = vue.ref(false);
|
|
@@ -2445,7 +2445,7 @@ hasConf("production");
|
|
|
2445
2445
|
const forceColor = isNode && isOneOf(vue.process$1.env.FORCE_COLOR, ["true", "1", "2"]);
|
|
2446
2446
|
forceColor || !hasParam("--no-colors") && // @todo deprecate --no-colors
|
|
2447
2447
|
!hasConf("no-color") && (!isNode || vue.process$1.stdout.isTTY) && (!isNode || hasParam("--color") || getVariable("COLORTERM") !== null || (getVariable("TERM") || "").includes("color"));
|
|
2448
|
-
const floor = Math.floor;
|
|
2448
|
+
const floor$1 = Math.floor;
|
|
2449
2449
|
const min = (a, b) => a < b ? a : b;
|
|
2450
2450
|
const max = (a, b) => a > b ? a : b;
|
|
2451
2451
|
const pow = Math.pow;
|
|
@@ -2490,7 +2490,7 @@ const write = (encoder, num) => {
|
|
|
2490
2490
|
const writeVarUint = (encoder, num) => {
|
|
2491
2491
|
while (num > BITS7) {
|
|
2492
2492
|
write(encoder, BIT8 | BITS7 & num);
|
|
2493
|
-
num = floor(num / 128);
|
|
2493
|
+
num = floor$1(num / 128);
|
|
2494
2494
|
}
|
|
2495
2495
|
write(encoder, BITS7 & num);
|
|
2496
2496
|
};
|
|
@@ -2878,7 +2878,7 @@ class Awareness extends Observable {
|
|
|
2878
2878
|
if (remove.length > 0) {
|
|
2879
2879
|
removeAwarenessStates(this, remove, "timeout");
|
|
2880
2880
|
}
|
|
2881
|
-
}, floor(outdatedTimeout / 10));
|
|
2881
|
+
}, floor$1(outdatedTimeout / 10));
|
|
2882
2882
|
doc.on("destroy", () => {
|
|
2883
2883
|
this.destroy();
|
|
2884
2884
|
});
|
|
@@ -13335,7 +13335,6 @@ const style$2 = cB("icon", `
|
|
|
13335
13335
|
display: inline-block;
|
|
13336
13336
|
position: relative;
|
|
13337
13337
|
fill: currentColor;
|
|
13338
|
-
transform: translateZ(0);
|
|
13339
13338
|
`, [cM("color-transition", {
|
|
13340
13339
|
transition: "color .3s var(--n-bezier)"
|
|
13341
13340
|
}), cM("depth", {
|
|
@@ -14712,7 +14711,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
14712
14711
|
return target;
|
|
14713
14712
|
};
|
|
14714
14713
|
const _hoisted_1$g = { class: "user-container" };
|
|
14715
|
-
const _hoisted_2$
|
|
14714
|
+
const _hoisted_2$9 = ["src"];
|
|
14716
14715
|
const _hoisted_3$7 = {
|
|
14717
14716
|
key: 1,
|
|
14718
14717
|
class: "user-bg"
|
|
@@ -14737,14 +14736,14 @@ const _sfc_main$h = {
|
|
|
14737
14736
|
key: 0,
|
|
14738
14737
|
class: "user-bg",
|
|
14739
14738
|
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
14740
|
-
}, null, 8, _hoisted_2$
|
|
14739
|
+
}, null, 8, _hoisted_2$9)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$7, vue.toDisplayString(getInitials(__props.user.name, __props.user.email)), 1))
|
|
14741
14740
|
]);
|
|
14742
14741
|
};
|
|
14743
14742
|
}
|
|
14744
14743
|
};
|
|
14745
14744
|
const Avatar = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-53e13009"]]);
|
|
14746
14745
|
const _hoisted_1$f = { class: "comment-option" };
|
|
14747
|
-
const _hoisted_2$
|
|
14746
|
+
const _hoisted_2$8 = ["innerHTML"];
|
|
14748
14747
|
const _hoisted_3$6 = { class: "option-state" };
|
|
14749
14748
|
const _hoisted_4$4 = ["innerHTML"];
|
|
14750
14749
|
const _sfc_main$g = {
|
|
@@ -14828,7 +14827,7 @@ const _sfc_main$g = {
|
|
|
14828
14827
|
vue.createBaseVNode("div", {
|
|
14829
14828
|
class: "active-icon",
|
|
14830
14829
|
innerHTML: activeIcon.value
|
|
14831
|
-
}, null, 8, _hoisted_2$
|
|
14830
|
+
}, null, 8, _hoisted_2$8),
|
|
14832
14831
|
vue.createBaseVNode("div", _hoisted_3$6, vue.toDisplayString(getState.value), 1),
|
|
14833
14832
|
vue.createBaseVNode("div", {
|
|
14834
14833
|
class: "dropdown-caret",
|
|
@@ -14857,7 +14856,7 @@ function formatDate(timestamp) {
|
|
|
14857
14856
|
return formattedDate;
|
|
14858
14857
|
}
|
|
14859
14858
|
const _hoisted_1$e = { class: "card-section comment-header" };
|
|
14860
|
-
const _hoisted_2$
|
|
14859
|
+
const _hoisted_2$7 = { class: "comment-header-left" };
|
|
14861
14860
|
const _hoisted_3$5 = { class: "user-info" };
|
|
14862
14861
|
const _hoisted_4$3 = { class: "user-name" };
|
|
14863
14862
|
const _hoisted_5$2 = {
|
|
@@ -14953,7 +14952,7 @@ const _sfc_main$f = {
|
|
|
14953
14952
|
});
|
|
14954
14953
|
return (_ctx, _cache) => {
|
|
14955
14954
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$e, [
|
|
14956
|
-
vue.createBaseVNode("div", _hoisted_2$
|
|
14955
|
+
vue.createBaseVNode("div", _hoisted_2$7, [
|
|
14957
14956
|
vue.createVNode(Avatar, {
|
|
14958
14957
|
user: getCurrentUser.value,
|
|
14959
14958
|
class: "avatar"
|
|
@@ -15065,7 +15064,7 @@ const _hoisted_1$c = {
|
|
|
15065
15064
|
key: 0,
|
|
15066
15065
|
class: "existing-internal-input"
|
|
15067
15066
|
};
|
|
15068
|
-
const _hoisted_2$
|
|
15067
|
+
const _hoisted_2$6 = {
|
|
15069
15068
|
key: 0,
|
|
15070
15069
|
class: "card-section comment-body"
|
|
15071
15070
|
};
|
|
@@ -15329,7 +15328,7 @@ const _sfc_main$d = {
|
|
|
15329
15328
|
onReject: handleReject,
|
|
15330
15329
|
onOverflowSelect: ($event) => handleOverflowSelect($event, comment)
|
|
15331
15330
|
}, null, 8, ["config", "timestamp", "comment", "onOverflowSelect"]),
|
|
15332
|
-
comment.trackedChange ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
15331
|
+
comment.trackedChange ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$6, [
|
|
15333
15332
|
vue.createBaseVNode("div", _hoisted_3$4, [
|
|
15334
15333
|
vue.createBaseVNode("div", _hoisted_4$2, [
|
|
15335
15334
|
comment.trackedChangeType === "trackFormat" ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$1, [
|
|
@@ -15402,7 +15401,7 @@ const _sfc_main$d = {
|
|
|
15402
15401
|
};
|
|
15403
15402
|
const CommentDialog = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-ff48cd67"]]);
|
|
15404
15403
|
const _hoisted_1$b = { class: "comments-list" };
|
|
15405
|
-
const _hoisted_2$
|
|
15404
|
+
const _hoisted_2$5 = { key: 0 };
|
|
15406
15405
|
const _hoisted_3$3 = { class: "comment-item" };
|
|
15407
15406
|
const _hoisted_4$1 = { key: 1 };
|
|
15408
15407
|
const _hoisted_5 = { class: "comment-item" };
|
|
@@ -15436,7 +15435,7 @@ const _sfc_main$c = {
|
|
|
15436
15435
|
});
|
|
15437
15436
|
return (_ctx, _cache) => {
|
|
15438
15437
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$b, [
|
|
15439
|
-
__props.showMainComments ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$
|
|
15438
|
+
__props.showMainComments ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$5, [
|
|
15440
15439
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(getGroupedComments).parentComments, (comment) => {
|
|
15441
15440
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_3$3, [
|
|
15442
15441
|
vue.createVNode(CommentDialog, { comment }, null, 8, ["comment"])
|
|
@@ -24407,13 +24406,13 @@ var __webpack_exports__$1 = globalThis.pdfjsLib = {};
|
|
|
24407
24406
|
"./chunks/empty-lth7LH78.cjs"
|
|
24408
24407
|
)), http = await Promise.resolve().then(() => require(
|
|
24409
24408
|
/*webpackIgnore: true*/
|
|
24410
|
-
"./chunks/index-
|
|
24409
|
+
"./chunks/index-CgJ5KVh6.cjs"
|
|
24411
24410
|
)).then((n) => n.index), https = await Promise.resolve().then(() => require(
|
|
24412
24411
|
/*webpackIgnore: true*/
|
|
24413
|
-
"./chunks/index-
|
|
24412
|
+
"./chunks/index-CCRVYhTn.cjs"
|
|
24414
24413
|
)).then((n) => n.index), url = await Promise.resolve().then(() => require(
|
|
24415
24414
|
/*webpackIgnore: true*/
|
|
24416
|
-
"./chunks/url-
|
|
24415
|
+
"./chunks/url-BG1Z_Z2_.cjs"
|
|
24417
24416
|
)).then((n) => n.url);
|
|
24418
24417
|
let canvas, path2d;
|
|
24419
24418
|
try {
|
|
@@ -46281,7 +46280,7 @@ const _hoisted_1$9 = {
|
|
|
46281
46280
|
class: "comments-container",
|
|
46282
46281
|
id: "commentsContainer"
|
|
46283
46282
|
};
|
|
46284
|
-
const _hoisted_2$
|
|
46283
|
+
const _hoisted_2$4 = { class: "comments-layer" };
|
|
46285
46284
|
const _hoisted_3$2 = ["onClick", "data-id"];
|
|
46286
46285
|
const _sfc_main$a = {
|
|
46287
46286
|
__name: "CommentsLayer",
|
|
@@ -46376,7 +46375,7 @@ const _sfc_main$a = {
|
|
|
46376
46375
|
});
|
|
46377
46376
|
return (_ctx, _cache) => {
|
|
46378
46377
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$9, [
|
|
46379
|
-
vue.createBaseVNode("div", _hoisted_2$
|
|
46378
|
+
vue.createBaseVNode("div", _hoisted_2$4, [
|
|
46380
46379
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(getCurrentComments.value, (conversation) => {
|
|
46381
46380
|
return vue.openBlock(), vue.createElementBlock("div", {
|
|
46382
46381
|
class: "sd-comment-anchor sd-highlight",
|
|
@@ -46392,7 +46391,7 @@ const _sfc_main$a = {
|
|
|
46392
46391
|
};
|
|
46393
46392
|
const CommentsLayer = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0dbcad34"]]);
|
|
46394
46393
|
const _hoisted_1$8 = { class: "sidebar-container calculation-container" };
|
|
46395
|
-
const _hoisted_2$
|
|
46394
|
+
const _hoisted_2$3 = ["id"];
|
|
46396
46395
|
const _sfc_main$9 = {
|
|
46397
46396
|
__name: "FloatingComments",
|
|
46398
46397
|
props: {
|
|
@@ -46528,7 +46527,7 @@ const _sfc_main$9 = {
|
|
|
46528
46527
|
parent: __props.parent,
|
|
46529
46528
|
comment
|
|
46530
46529
|
}, null, 8, ["parent", "comment"]))
|
|
46531
|
-
], 8, _hoisted_2$
|
|
46530
|
+
], 8, _hoisted_2$3)
|
|
46532
46531
|
]);
|
|
46533
46532
|
}), 128))
|
|
46534
46533
|
]),
|
|
@@ -46593,7 +46592,6 @@ const _sfc_main$8 = {
|
|
|
46593
46592
|
};
|
|
46594
46593
|
const TextField = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-f3984d30"]]);
|
|
46595
46594
|
const _hoisted_1$7 = ["innerHTML"];
|
|
46596
|
-
const _hoisted_2$3 = { key: 1 };
|
|
46597
46595
|
const _sfc_main$7 = {
|
|
46598
46596
|
__name: "ParagraphField",
|
|
46599
46597
|
props: {
|
|
@@ -46613,24 +46611,24 @@ const _sfc_main$7 = {
|
|
|
46613
46611
|
}
|
|
46614
46612
|
},
|
|
46615
46613
|
setup(__props) {
|
|
46616
|
-
const props = __props;
|
|
46617
46614
|
const getStyle = vue.computed(() => {
|
|
46618
|
-
const fontSize2 = props.styleOverride?.originalFontSize || 120;
|
|
46619
46615
|
return {
|
|
46620
|
-
fontSize:
|
|
46616
|
+
fontSize: "11pt"
|
|
46621
46617
|
};
|
|
46622
46618
|
});
|
|
46623
46619
|
return (_ctx, _cache) => {
|
|
46624
46620
|
return __props.field.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
46625
46621
|
key: 0,
|
|
46626
46622
|
class: "paragraph-field",
|
|
46627
|
-
style: vue.normalizeStyle(getStyle.value),
|
|
46628
46623
|
innerHTML: __props.field.value
|
|
46629
|
-
}, null,
|
|
46624
|
+
}, null, 8, _hoisted_1$7)) : (vue.openBlock(), vue.createElementBlock("span", {
|
|
46625
|
+
key: 1,
|
|
46626
|
+
style: vue.normalizeStyle(getStyle.value)
|
|
46627
|
+
}, vue.toDisplayString(__props.field.placeholder || __props.field.label), 5));
|
|
46630
46628
|
};
|
|
46631
46629
|
}
|
|
46632
46630
|
};
|
|
46633
|
-
const ParagraphField = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-
|
|
46631
|
+
const ParagraphField = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-512d3292"]]);
|
|
46634
46632
|
const _hoisted_1$6 = ["src"];
|
|
46635
46633
|
const _hoisted_2$2 = { key: 1 };
|
|
46636
46634
|
const _sfc_main$6 = {
|
|
@@ -46706,6 +46704,11 @@ const _sfc_main$5 = {
|
|
|
46706
46704
|
optionId: {
|
|
46707
46705
|
type: String,
|
|
46708
46706
|
required: true
|
|
46707
|
+
},
|
|
46708
|
+
styleOverride: {
|
|
46709
|
+
type: Object,
|
|
46710
|
+
required: false,
|
|
46711
|
+
default: () => ({})
|
|
46709
46712
|
}
|
|
46710
46713
|
},
|
|
46711
46714
|
setup(__props) {
|
|
@@ -46714,17 +46717,33 @@ const _sfc_main$5 = {
|
|
|
46714
46717
|
const match2 = props.field.options.find((o) => o.annotationId.includes(props.optionId));
|
|
46715
46718
|
return match2?.checked;
|
|
46716
46719
|
});
|
|
46720
|
+
const getPreviewStyle = vue.computed(() => {
|
|
46721
|
+
const borderWidth = 2;
|
|
46722
|
+
const width = Number.parseFloat(props.styleOverride?.coordinates?.minWidth || 0) - borderWidth + "px";
|
|
46723
|
+
const height = Number.parseFloat(props.styleOverride?.coordinates?.minHeight || 0) - borderWidth + "px";
|
|
46724
|
+
const fontSize2 = parseFloat(width) + "pt";
|
|
46725
|
+
return {
|
|
46726
|
+
width,
|
|
46727
|
+
height,
|
|
46728
|
+
fontSize: fontSize2
|
|
46729
|
+
};
|
|
46730
|
+
});
|
|
46717
46731
|
return (_ctx, _cache) => {
|
|
46718
46732
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
|
|
46719
|
-
vue.
|
|
46733
|
+
props.isEditing ? (vue.openBlock(), vue.createBlock(vue.unref(NCheckbox), {
|
|
46734
|
+
key: 0,
|
|
46720
46735
|
checked: getValue2.value,
|
|
46721
46736
|
disabled: !props.isEditing
|
|
46722
|
-
}, null, 8, ["checked", "disabled"])
|
|
46737
|
+
}, null, 8, ["checked", "disabled"])) : (vue.openBlock(), vue.createElementBlock("div", {
|
|
46738
|
+
key: 1,
|
|
46739
|
+
class: "checkbox-preview",
|
|
46740
|
+
style: vue.normalizeStyle(getPreviewStyle.value)
|
|
46741
|
+
}, vue.toDisplayString(getValue2.value ? "x" : ""), 5))
|
|
46723
46742
|
]);
|
|
46724
46743
|
};
|
|
46725
46744
|
}
|
|
46726
46745
|
};
|
|
46727
|
-
const CheckboxField = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
46746
|
+
const CheckboxField = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-94bf1b6c"]]);
|
|
46728
46747
|
const _hoisted_1$4 = { key: 0 };
|
|
46729
46748
|
const _sfc_main$4 = {
|
|
46730
46749
|
__name: "SelectField",
|
|
@@ -46760,6 +46779,10 @@ const _sfc_main$4 = {
|
|
|
46760
46779
|
}
|
|
46761
46780
|
};
|
|
46762
46781
|
const SelectField = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-b8cacb22"]]);
|
|
46782
|
+
const floor = (val, precision) => {
|
|
46783
|
+
const multiplier = 10 ** precision;
|
|
46784
|
+
return Math.floor(val * multiplier) / multiplier;
|
|
46785
|
+
};
|
|
46763
46786
|
const useHrbrFieldsStore = /* @__PURE__ */ defineStore("hrbr-fields", () => {
|
|
46764
46787
|
const superdocStore = useSuperdocStore();
|
|
46765
46788
|
const { documents, pages } = storeToRefs(superdocStore);
|
|
@@ -46806,8 +46829,9 @@ const useHrbrFieldsStore = /* @__PURE__ */ defineStore("hrbr-fields", () => {
|
|
|
46806
46829
|
const pageLeft = pageBounds.left - bounds.left;
|
|
46807
46830
|
const mappedCoordinates = _mapAnnotation(coordinates, scale, pageBottom, pageLeft);
|
|
46808
46831
|
const annotationStyle = {
|
|
46809
|
-
fontSize: annotation.original_font_size + "
|
|
46810
|
-
|
|
46832
|
+
fontSize: floor(annotation.original_font_size * scale, 2) + "pt",
|
|
46833
|
+
fontFamily: annotation.fontfamily || "Arial",
|
|
46834
|
+
originalFontSize: floor(annotation.original_font_size * scale, 2),
|
|
46811
46835
|
coordinates: mappedCoordinates
|
|
46812
46836
|
};
|
|
46813
46837
|
const field = {
|
|
@@ -47067,32 +47091,11 @@ function useSelectedText(editorRef) {
|
|
|
47067
47091
|
selectedText
|
|
47068
47092
|
};
|
|
47069
47093
|
}
|
|
47070
|
-
function useAi({
|
|
47094
|
+
function useAi({ activeEditorRef }) {
|
|
47071
47095
|
const showAiLayer = vue.ref(false);
|
|
47072
47096
|
const showAiWriter = vue.ref(false);
|
|
47073
47097
|
const aiWriterPosition = vue.reactive({ top: 0, left: 0 });
|
|
47074
47098
|
const aiLayer = vue.ref(null);
|
|
47075
|
-
const handleAiHighlight = ({ type, data }) => {
|
|
47076
|
-
if (!aiLayer.value) return;
|
|
47077
|
-
const editor = activeEditorRef.value;
|
|
47078
|
-
switch (type) {
|
|
47079
|
-
case "add":
|
|
47080
|
-
if (editor && !editor.isDestroyed) {
|
|
47081
|
-
editor.commands.clearAiHighlightStyle();
|
|
47082
|
-
}
|
|
47083
|
-
aiLayer.value.addAiHighlight();
|
|
47084
|
-
break;
|
|
47085
|
-
case "remove":
|
|
47086
|
-
if (editor && !editor.isDestroyed) {
|
|
47087
|
-
editor.commands.clearAiHighlightStyle();
|
|
47088
|
-
}
|
|
47089
|
-
aiLayer.value.removeAiHighlight();
|
|
47090
|
-
break;
|
|
47091
|
-
case "update":
|
|
47092
|
-
aiLayer.value.updateAiHighlight();
|
|
47093
|
-
break;
|
|
47094
|
-
}
|
|
47095
|
-
};
|
|
47096
47099
|
const showAiWriterAtCursor = () => {
|
|
47097
47100
|
const editor = activeEditorRef.value;
|
|
47098
47101
|
if (!editor || editor.isDestroyed) {
|
|
@@ -47103,7 +47106,7 @@ function useAi({ emitAiHighlight, activeEditorRef }) {
|
|
|
47103
47106
|
const { view } = editor;
|
|
47104
47107
|
const { selection } = view.state;
|
|
47105
47108
|
if (!selection.empty) {
|
|
47106
|
-
|
|
47109
|
+
editor.commands.insertAiMark();
|
|
47107
47110
|
}
|
|
47108
47111
|
let coords;
|
|
47109
47112
|
try {
|
|
@@ -47142,7 +47145,12 @@ function useAi({ emitAiHighlight, activeEditorRef }) {
|
|
|
47142
47145
|
showAiLayer.value = value;
|
|
47143
47146
|
};
|
|
47144
47147
|
const handleAiToolClick = () => {
|
|
47145
|
-
|
|
47148
|
+
const editor = activeEditorRef.value;
|
|
47149
|
+
if (!editor || editor.isDestroyed) {
|
|
47150
|
+
console.error("[useAi] Editor not available");
|
|
47151
|
+
return;
|
|
47152
|
+
}
|
|
47153
|
+
editor.commands.insertAiMark();
|
|
47146
47154
|
showAiWriterAtCursor();
|
|
47147
47155
|
};
|
|
47148
47156
|
return {
|
|
@@ -47153,7 +47161,6 @@ function useAi({ emitAiHighlight, activeEditorRef }) {
|
|
|
47153
47161
|
aiLayer,
|
|
47154
47162
|
// Methods
|
|
47155
47163
|
initAiLayer,
|
|
47156
|
-
handleAiHighlight,
|
|
47157
47164
|
showAiWriterAtCursor,
|
|
47158
47165
|
handleAiWriterClose,
|
|
47159
47166
|
handleAiToolClick
|
|
@@ -47222,11 +47229,9 @@ const _sfc_main = {
|
|
|
47222
47229
|
aiWriterPosition,
|
|
47223
47230
|
aiLayer,
|
|
47224
47231
|
initAiLayer,
|
|
47225
|
-
handleAiHighlight,
|
|
47226
47232
|
handleAiWriterClose,
|
|
47227
47233
|
handleAiToolClick
|
|
47228
47234
|
} = useAi({
|
|
47229
|
-
emitAiHighlight: (params2) => proxy.$superdoc.emit("ai-highlight", params2),
|
|
47230
47235
|
activeEditorRef
|
|
47231
47236
|
});
|
|
47232
47237
|
const hrbrFieldsLayer = vue.ref(null);
|
|
@@ -47355,6 +47360,7 @@ const _sfc_main = {
|
|
|
47355
47360
|
isInternal: proxy.$superdoc.config.isInternal,
|
|
47356
47361
|
annotations: proxy.$superdoc.config.annotations,
|
|
47357
47362
|
isCommentsEnabled: proxy.$superdoc.config.modules?.comments,
|
|
47363
|
+
isAiEnabled: proxy.$superdoc.config.modules?.ai,
|
|
47358
47364
|
onBeforeCreate: onEditorBeforeCreate,
|
|
47359
47365
|
onCreate: onEditorCreate,
|
|
47360
47366
|
onDestroy: onEditorDestroy,
|
|
@@ -47423,11 +47429,9 @@ const _sfc_main = {
|
|
|
47423
47429
|
if (isCommentsEnabled.value && !modules.comments.readOnly) {
|
|
47424
47430
|
document.addEventListener("mousedown", handleDocumentMouseDown);
|
|
47425
47431
|
}
|
|
47426
|
-
proxy.$superdoc.on("ai-highlight", handleAiHighlight);
|
|
47427
47432
|
});
|
|
47428
47433
|
vue.onBeforeUnmount(() => {
|
|
47429
47434
|
document.removeEventListener("mousedown", handleDocumentMouseDown);
|
|
47430
|
-
proxy.$superdoc.off("ai-highlight", handleAiHighlight);
|
|
47431
47435
|
});
|
|
47432
47436
|
const selectionLayer = vue.ref(null);
|
|
47433
47437
|
const isDragging = vue.ref(false);
|
|
@@ -47697,15 +47701,14 @@ const _sfc_main = {
|
|
|
47697
47701
|
"handle-close": vue.unref(handleAiWriterClose),
|
|
47698
47702
|
editor: vue.unref(proxy).$superdoc.activeEditor,
|
|
47699
47703
|
"api-key": vue.unref(proxy).$superdoc.toolbar?.config?.aiApiKey,
|
|
47700
|
-
endpoint: vue.unref(proxy).$superdoc.config?.modules?.ai?.endpoint
|
|
47701
|
-
|
|
47702
|
-
}, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint", "onAiHighlight"])
|
|
47704
|
+
endpoint: vue.unref(proxy).$superdoc.config?.modules?.ai?.endpoint
|
|
47705
|
+
}, null, 8, ["selected-text", "handle-close", "editor", "api-key", "endpoint"])
|
|
47703
47706
|
], 4)) : vue.createCommentVNode("", true)
|
|
47704
47707
|
], 2);
|
|
47705
47708
|
};
|
|
47706
47709
|
}
|
|
47707
47710
|
};
|
|
47708
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
47711
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f1c59a62"]]);
|
|
47709
47712
|
const createSuperdocVueApp = () => {
|
|
47710
47713
|
const app = vue.createApp(App);
|
|
47711
47714
|
const pinia = createPinia();
|
|
@@ -47804,7 +47807,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
47804
47807
|
this.config.colors = shuffleArray(this.config.colors);
|
|
47805
47808
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
47806
47809
|
this.colorIndex = 0;
|
|
47807
|
-
this.version = "0.14.0-next.
|
|
47810
|
+
this.version = "0.14.0-next.21";
|
|
47808
47811
|
console.debug("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
47809
47812
|
this.superdocId = config.superdocId || uuid.v4();
|
|
47810
47813
|
this.colors = this.config.colors;
|
|
@@ -48047,6 +48050,19 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
48047
48050
|
doc.rulers = this.config.rulers;
|
|
48048
48051
|
});
|
|
48049
48052
|
}
|
|
48053
|
+
/**
|
|
48054
|
+
* Toggle pagination for SuperEditors
|
|
48055
|
+
* @returns {void}
|
|
48056
|
+
*/
|
|
48057
|
+
togglePagination() {
|
|
48058
|
+
this.config.pagination = !this.config.pagination;
|
|
48059
|
+
this.superdocStore.documents.forEach((doc) => {
|
|
48060
|
+
const editor = doc.getEditor();
|
|
48061
|
+
if (editor) {
|
|
48062
|
+
editor.commands.togglePagination();
|
|
48063
|
+
}
|
|
48064
|
+
});
|
|
48065
|
+
}
|
|
48050
48066
|
#addToolbar() {
|
|
48051
48067
|
const moduleConfig = this.config.modules?.toolbar || {};
|
|
48052
48068
|
this.toolbarElement = this.config.modules?.toolbar?.selector || this.config.toolbar;
|
|
@@ -48070,9 +48086,6 @@ class SuperDoc extends eventemitter3.EventEmitter {
|
|
|
48070
48086
|
};
|
|
48071
48087
|
this.toolbar = new superEditor_es.SuperToolbar(config);
|
|
48072
48088
|
this.toolbar.on("superdoc-command", this.onToolbarCommand.bind(this));
|
|
48073
|
-
this.toolbar.on("ai-highlight", ({ type, data }) => {
|
|
48074
|
-
this.emit("ai-highlight", { type, data });
|
|
48075
|
-
});
|
|
48076
48089
|
this.once("editorCreate", () => this.toolbar.updateToolbarState());
|
|
48077
48090
|
}
|
|
48078
48091
|
/**
|