@harbour-enterprises/superdoc 0.25.0-next.2 → 0.25.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-CEc5ST9t.cjs → PdfViewer-DDL0V0l5.cjs} +1 -1
- package/dist/chunks/{PdfViewer-CoEXViCu.es.js → PdfViewer-Y13XRanw.es.js} +1 -1
- package/dist/chunks/{index-ChgYIPZ8.cjs → index-Bo5YCvD5.cjs} +5 -7
- package/dist/chunks/{index-DtXgSPMT.es.js → index-DKNVSdr6.es.js} +5 -7
- package/dist/chunks/{super-editor.es-BePxEtE8.es.js → super-editor.es-CYtLh0Ob.es.js} +22 -12
- package/dist/chunks/{super-editor.es-B-E_YaLO.cjs → super-editor.es-Ct2sXbNV.cjs} +22 -12
- package/dist/style.css +57 -54
- package/dist/super-editor/ai-writer.es.js +1 -1
- package/dist/super-editor/chunks/{editor-yaef8OIs.js → editor-CoX24lXQ.js} +5 -4
- package/dist/super-editor/chunks/{toolbar-Dc5uyyIp.js → toolbar-BTw9-jfX.js} +3 -3
- package/dist/super-editor/editor.es.js +1 -1
- package/dist/super-editor/style.css +30 -27
- package/dist/super-editor/super-editor/src/components/toolbar/use-toolbar-item.d.ts +1 -1
- package/dist/super-editor/super-editor.es.js +18 -9
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +1 -1
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +25 -17
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
|
@@ -15290,6 +15290,7 @@ init_fn = function() {
|
|
|
15290
15290
|
this.on("paginationUpdate", this.options.onPaginationUpdate);
|
|
15291
15291
|
this.on("comment-positions", this.options.onCommentLocationsUpdate);
|
|
15292
15292
|
this.on("list-definitions-change", this.options.onListDefinitionsChange);
|
|
15293
|
+
this.on("fonts-resolved", this.options.onFontsResolved);
|
|
15293
15294
|
this.on("exception", this.options.onException);
|
|
15294
15295
|
if (!this.options.isHeadless) {
|
|
15295
15296
|
this.initializeCollaborationData();
|
|
@@ -15493,7 +15494,7 @@ checkFonts_fn = async function() {
|
|
|
15493
15494
|
if (!("queryLocalFonts" in window)) {
|
|
15494
15495
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
15495
15496
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
15496
|
-
this.
|
|
15497
|
+
this.emit("fonts-resolved", {
|
|
15497
15498
|
documentFonts: fontsUsedInDocument,
|
|
15498
15499
|
unsupportedFonts
|
|
15499
15500
|
});
|
|
@@ -15503,7 +15504,7 @@ checkFonts_fn = async function() {
|
|
|
15503
15504
|
if (localFontAccess.state === "denied") {
|
|
15504
15505
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
15505
15506
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
15506
|
-
this.
|
|
15507
|
+
this.emit("fonts-resolved", {
|
|
15507
15508
|
documentFonts: fontsUsedInDocument,
|
|
15508
15509
|
unsupportedFonts
|
|
15509
15510
|
});
|
|
@@ -15513,14 +15514,14 @@ checkFonts_fn = async function() {
|
|
|
15513
15514
|
const localFonts = await window.queryLocalFonts();
|
|
15514
15515
|
const uniqueLocalFonts = [...new Set(localFonts.map((font) => font.family))];
|
|
15515
15516
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithLocalFonts_fn).call(this, fontsUsedInDocument, uniqueLocalFonts);
|
|
15516
|
-
this.
|
|
15517
|
+
this.emit("fonts-resolved", {
|
|
15517
15518
|
documentFonts: fontsUsedInDocument,
|
|
15518
15519
|
unsupportedFonts
|
|
15519
15520
|
});
|
|
15520
15521
|
} catch {
|
|
15521
15522
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
15522
15523
|
const unsupportedFonts = __privateMethod(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
15523
|
-
this.
|
|
15524
|
+
this.emit("fonts-resolved", {
|
|
15524
15525
|
documentFonts: fontsUsedInDocument,
|
|
15525
15526
|
unsupportedFonts
|
|
15526
15527
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
|
|
2
2
|
import { p as process$1 } from "./converter-gSy6s2VK.js";
|
|
3
|
-
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-
|
|
3
|
+
import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-CoX24lXQ.js";
|
|
4
4
|
const sanitizeNumber = (value, defaultNumber) => {
|
|
5
5
|
let sanitized = value.replace(/[^0-9.]/g, "");
|
|
6
6
|
sanitized = parseFloat(sanitized);
|
|
@@ -326,7 +326,7 @@ const _sfc_main$4 = {
|
|
|
326
326
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
|
|
327
327
|
onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
328
328
|
type: "text",
|
|
329
|
-
class: normalizeClass(["button-text-input", { "high-contrast": unref(isHighContrastMode) }]),
|
|
329
|
+
class: normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": unref(isHighContrastMode) }]),
|
|
330
330
|
id: "inlineTextInput-" + unref(name),
|
|
331
331
|
autocomplete: "off",
|
|
332
332
|
ref_key: "inlineInput",
|
|
@@ -360,7 +360,7 @@ const _sfc_main$4 = {
|
|
|
360
360
|
};
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
|
-
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-
|
|
363
|
+
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-ea93b080"]]);
|
|
364
364
|
const _hoisted_1$2 = {
|
|
365
365
|
class: "toolbar-separator",
|
|
366
366
|
role: "separator",
|
|
@@ -64,20 +64,20 @@
|
|
|
64
64
|
width: 16px;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
.toolbar-item[data-v-
|
|
67
|
+
.toolbar-item[data-v-ea93b080] {
|
|
68
68
|
position: relative;
|
|
69
69
|
z-index: 1;
|
|
70
70
|
min-width: 30px;
|
|
71
71
|
margin: 0 1px;
|
|
72
72
|
}
|
|
73
|
-
.visually-hidden[data-v-
|
|
73
|
+
.visually-hidden[data-v-ea93b080] {
|
|
74
74
|
position: absolute;
|
|
75
75
|
left: -9999px;
|
|
76
76
|
height: 1px;
|
|
77
77
|
width: 1px;
|
|
78
78
|
overflow: hidden;
|
|
79
79
|
}
|
|
80
|
-
.toolbar-button[data-v-
|
|
80
|
+
.toolbar-button[data-v-ea93b080] {
|
|
81
81
|
padding: 5px;
|
|
82
82
|
height: 32px;
|
|
83
83
|
max-height: 32px;
|
|
@@ -93,21 +93,21 @@
|
|
|
93
93
|
position: relative;
|
|
94
94
|
box-sizing: border-box;
|
|
95
95
|
}
|
|
96
|
-
.toolbar-button[data-v-
|
|
96
|
+
.toolbar-button[data-v-ea93b080]:hover {
|
|
97
97
|
background-color: #dbdbdb;
|
|
98
98
|
}
|
|
99
|
-
.toolbar-button:hover .toolbar-icon.high-contrast[data-v-
|
|
99
|
+
.toolbar-button:hover .toolbar-icon.high-contrast[data-v-ea93b080] {
|
|
100
100
|
color: #fff;
|
|
101
101
|
}
|
|
102
|
-
.toolbar-button:hover.high-contrast[data-v-
|
|
102
|
+
.toolbar-button:hover.high-contrast[data-v-ea93b080] {
|
|
103
103
|
background-color: #000;
|
|
104
104
|
color: #fff;
|
|
105
105
|
}
|
|
106
|
-
.toolbar-button[data-v-
|
|
107
|
-
.active[data-v-
|
|
106
|
+
.toolbar-button[data-v-ea93b080]:active,
|
|
107
|
+
.active[data-v-ea93b080] {
|
|
108
108
|
background-color: #c8d0d8;
|
|
109
109
|
}
|
|
110
|
-
.button-label[data-v-
|
|
110
|
+
.button-label[data-v-ea93b080] {
|
|
111
111
|
overflow: hidden;
|
|
112
112
|
width: 100%;
|
|
113
113
|
text-align: center;
|
|
@@ -117,37 +117,37 @@
|
|
|
117
117
|
font-size: 15px;
|
|
118
118
|
margin: 5px;
|
|
119
119
|
}
|
|
120
|
-
.toolbar-icon + .dropdown-caret[data-v-
|
|
120
|
+
.toolbar-icon + .dropdown-caret[data-v-ea93b080] {
|
|
121
121
|
margin-left: 4px;
|
|
122
122
|
}
|
|
123
|
-
.left[data-v-
|
|
124
|
-
.right[data-v-
|
|
123
|
+
.left[data-v-ea93b080],
|
|
124
|
+
.right[data-v-ea93b080] {
|
|
125
125
|
width: 50%;
|
|
126
126
|
height: 100%;
|
|
127
127
|
background-color: #dbdbdb;
|
|
128
128
|
border-radius: 60%;
|
|
129
129
|
}
|
|
130
|
-
.has-inline-text-input[data-v-
|
|
130
|
+
.has-inline-text-input[data-v-ea93b080]:hover {
|
|
131
131
|
cursor: text;
|
|
132
132
|
}
|
|
133
|
-
.disabled[data-v-
|
|
133
|
+
.disabled[data-v-ea93b080] {
|
|
134
134
|
cursor: default;
|
|
135
135
|
}
|
|
136
|
-
.disabled[data-v-
|
|
136
|
+
.disabled[data-v-ea93b080]:hover {
|
|
137
137
|
cursor: default;
|
|
138
138
|
background-color: initial;
|
|
139
139
|
}
|
|
140
|
-
.disabled .toolbar-icon[data-v-
|
|
141
|
-
.disabled .caret[data-v-
|
|
142
|
-
.disabled .button-label[data-v-
|
|
140
|
+
.disabled .toolbar-icon[data-v-ea93b080],
|
|
141
|
+
.disabled .caret[data-v-ea93b080],
|
|
142
|
+
.disabled .button-label[data-v-ea93b080] {
|
|
143
143
|
opacity: 0.35;
|
|
144
144
|
}
|
|
145
|
-
.caret[data-v-
|
|
145
|
+
.caret[data-v-ea93b080] {
|
|
146
146
|
font-size: 1em;
|
|
147
147
|
padding-left: 2px;
|
|
148
148
|
padding-right: 2px;
|
|
149
149
|
}
|
|
150
|
-
.button-text-input[data-v-
|
|
150
|
+
.button-text-input[data-v-ea93b080] {
|
|
151
151
|
color: #47484a;
|
|
152
152
|
border-radius: 4px;
|
|
153
153
|
text-align: center;
|
|
@@ -161,13 +161,16 @@
|
|
|
161
161
|
border: 1px solid #d8dee5;
|
|
162
162
|
box-sizing: border-box;
|
|
163
163
|
}
|
|
164
|
-
.button-text-input.high-contrast[data-v-
|
|
164
|
+
.button-text-input.high-contrast[data-v-ea93b080] {
|
|
165
165
|
background-color: #fff;
|
|
166
166
|
}
|
|
167
|
-
.button-text-input[data-v-
|
|
167
|
+
.button-text-input--font-size[data-v-ea93b080] {
|
|
168
|
+
width: 36px;
|
|
169
|
+
}
|
|
170
|
+
.button-text-input[data-v-ea93b080]::placeholder {
|
|
168
171
|
color: #47484a;
|
|
169
172
|
}
|
|
170
|
-
.dropdown-caret[data-v-
|
|
173
|
+
.dropdown-caret[data-v-ea93b080] {
|
|
171
174
|
display: inline-flex;
|
|
172
175
|
align-items: center;
|
|
173
176
|
justify-content: center;
|
|
@@ -177,16 +180,16 @@
|
|
|
177
180
|
height: 10px;
|
|
178
181
|
}
|
|
179
182
|
@media (max-width: 1280px) {
|
|
180
|
-
.toolbar-item--doc-mode .button-label[data-v-
|
|
183
|
+
.toolbar-item--doc-mode .button-label[data-v-ea93b080] {
|
|
181
184
|
display: none;
|
|
182
185
|
}
|
|
183
|
-
.toolbar-item--doc-mode .toolbar-icon[data-v-
|
|
186
|
+
.toolbar-item--doc-mode .toolbar-icon[data-v-ea93b080] {
|
|
184
187
|
margin-right: 5px;
|
|
185
188
|
}
|
|
186
|
-
.toolbar-item--linked-styles[data-v-
|
|
189
|
+
.toolbar-item--linked-styles[data-v-ea93b080] {
|
|
187
190
|
width: auto !important;
|
|
188
191
|
}
|
|
189
|
-
.toolbar-item--linked-styles .button-label[data-v-
|
|
192
|
+
.toolbar-item--linked-styles .button-label[data-v-ea93b080] {
|
|
190
193
|
display: none;
|
|
191
194
|
}
|
|
192
195
|
}
|
|
@@ -11,10 +11,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
11
11
|
var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
|
|
12
12
|
import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, H as findParentNode, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, a as Plugin } from "./chunks/converter-gSy6s2VK.js";
|
|
13
13
|
import { c1, a5, i, a2 } from "./chunks/converter-gSy6s2VK.js";
|
|
14
|
-
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, M as Mark, n as Extension, A as Attribute, N as Node } from "./chunks/editor-
|
|
15
|
-
import { q, C, t, T, o, v, p } from "./chunks/editor-
|
|
14
|
+
import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, M as Mark, n as Extension, A as Attribute, N as Node } from "./chunks/editor-CoX24lXQ.js";
|
|
15
|
+
import { q, C, t, T, o, v, p } from "./chunks/editor-CoX24lXQ.js";
|
|
16
16
|
import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, reactive, onUnmounted, renderSlot, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
|
|
17
|
-
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-
|
|
17
|
+
import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BTw9-jfX.js";
|
|
18
18
|
import AIWriter from "./ai-writer.es.js";
|
|
19
19
|
import { D } from "./chunks/docx-zipper-CceGxV02.js";
|
|
20
20
|
import { createZip } from "./file-zipper.es.js";
|
|
@@ -236,8 +236,8 @@ const useToolbarItem = (options) => {
|
|
|
236
236
|
if (!Array.isArray(options.options)) throw new Error("Invalid toolbar item options - " + options.options);
|
|
237
237
|
nestedOptions.value?.push(...options.options);
|
|
238
238
|
}
|
|
239
|
-
const activate = (attrs) => {
|
|
240
|
-
onActivate(attrs);
|
|
239
|
+
const activate = (attrs, ...args) => {
|
|
240
|
+
onActivate(attrs, ...args);
|
|
241
241
|
if (suppressActiveHighlight.value) return;
|
|
242
242
|
active.value = true;
|
|
243
243
|
};
|
|
@@ -1538,7 +1538,12 @@ const makeDefaultItems = ({
|
|
|
1538
1538
|
ariaLabel: "Font size"
|
|
1539
1539
|
},
|
|
1540
1540
|
options: fontSizeOptions,
|
|
1541
|
-
onActivate: ({ fontSize: size }) => {
|
|
1541
|
+
onActivate: ({ fontSize: size }, isMultiple = false) => {
|
|
1542
|
+
if (isMultiple) {
|
|
1543
|
+
fontSize.label.value = "";
|
|
1544
|
+
fontSize.selectedValue.value = "";
|
|
1545
|
+
return;
|
|
1546
|
+
}
|
|
1542
1547
|
const defaultSize = fontSizeOptions.find((i2) => i2.label === String(fontSize.defaultLabel.value));
|
|
1543
1548
|
if (!size) {
|
|
1544
1549
|
fontSize.label.value = fontSize.defaultLabel.value;
|
|
@@ -1555,8 +1560,6 @@ const makeDefaultItems = ({
|
|
|
1555
1560
|
});
|
|
1556
1561
|
if (foundSize) {
|
|
1557
1562
|
fontSize.selectedValue.value = foundSize.key;
|
|
1558
|
-
} else if (defaultSize) {
|
|
1559
|
-
fontSize.selectedValue.value = defaultSize.key;
|
|
1560
1563
|
} else {
|
|
1561
1564
|
fontSize.selectedValue.value = "";
|
|
1562
1565
|
}
|
|
@@ -3020,7 +3023,13 @@ class SuperToolbar extends EventEmitter {
|
|
|
3020
3023
|
const markNegated = rawActiveMark ? isNegatedMark(rawActiveMark.name, rawActiveMark.attrs) : false;
|
|
3021
3024
|
const activeMark = markNegated ? null : rawActiveMark;
|
|
3022
3025
|
if (activeMark) {
|
|
3023
|
-
|
|
3026
|
+
if (activeMark.name === "fontSize") {
|
|
3027
|
+
const fontSizes = marks.filter((i2) => i2.name === "fontSize").map((i2) => i2.attrs.fontSize);
|
|
3028
|
+
const isMultiple = [...new Set(fontSizes)].length > 1;
|
|
3029
|
+
item.activate(activeMark.attrs, isMultiple);
|
|
3030
|
+
} else {
|
|
3031
|
+
item.activate(activeMark.attrs);
|
|
3032
|
+
}
|
|
3024
3033
|
} else {
|
|
3025
3034
|
item.deactivate();
|
|
3026
3035
|
}
|
package/dist/super-editor.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const superEditor_es = require("./chunks/super-editor.es-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-Ct2sXbNV.cjs");
|
|
4
4
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
5
5
|
exports.AIWriter = superEditor_es.AIWriter;
|
|
6
6
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/super-editor.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-
|
|
1
|
+
import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-CYtLh0Ob.es.js";
|
|
2
2
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
3
3
|
export {
|
|
4
4
|
A as AIWriter,
|
package/dist/superdoc.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
|
-
const superdoc = require("./chunks/index-
|
|
3
|
+
const superEditor_es = require("./chunks/super-editor.es-Ct2sXbNV.cjs");
|
|
4
|
+
const superdoc = require("./chunks/index-Bo5YCvD5.cjs");
|
|
5
5
|
require("./chunks/vue-DKMj1I9B.cjs");
|
|
6
6
|
const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
|
|
7
7
|
exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
|
package/dist/superdoc.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-
|
|
2
|
-
import { D, H, P, S as S2, m, l } from "./chunks/index-
|
|
1
|
+
import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-CYtLh0Ob.es.js";
|
|
2
|
+
import { D, H, P, S as S2, m, l } from "./chunks/index-DKNVSdr6.es.js";
|
|
3
3
|
import "./chunks/vue-ZWZLQtoU.es.js";
|
|
4
4
|
import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
|
|
5
5
|
export {
|
package/dist/superdoc.umd.js
CHANGED
|
@@ -61252,6 +61252,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61252
61252
|
this.on("paginationUpdate", this.options.onPaginationUpdate);
|
|
61253
61253
|
this.on("comment-positions", this.options.onCommentLocationsUpdate);
|
|
61254
61254
|
this.on("list-definitions-change", this.options.onListDefinitionsChange);
|
|
61255
|
+
this.on("fonts-resolved", this.options.onFontsResolved);
|
|
61255
61256
|
this.on("exception", this.options.onException);
|
|
61256
61257
|
if (!this.options.isHeadless) {
|
|
61257
61258
|
this.initializeCollaborationData();
|
|
@@ -61402,7 +61403,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61402
61403
|
if (!("queryLocalFonts" in window)) {
|
|
61403
61404
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
61404
61405
|
const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
61405
|
-
this.
|
|
61406
|
+
this.emit("fonts-resolved", {
|
|
61406
61407
|
documentFonts: fontsUsedInDocument,
|
|
61407
61408
|
unsupportedFonts
|
|
61408
61409
|
});
|
|
@@ -61412,7 +61413,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61412
61413
|
if (localFontAccess.state === "denied") {
|
|
61413
61414
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
61414
61415
|
const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
61415
|
-
this.
|
|
61416
|
+
this.emit("fonts-resolved", {
|
|
61416
61417
|
documentFonts: fontsUsedInDocument,
|
|
61417
61418
|
unsupportedFonts
|
|
61418
61419
|
});
|
|
@@ -61422,14 +61423,14 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
61422
61423
|
const localFonts = await window.queryLocalFonts();
|
|
61423
61424
|
const uniqueLocalFonts = [...new Set(localFonts.map((font) => font.family))];
|
|
61424
61425
|
const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithLocalFonts_fn).call(this, fontsUsedInDocument, uniqueLocalFonts);
|
|
61425
|
-
this.
|
|
61426
|
+
this.emit("fonts-resolved", {
|
|
61426
61427
|
documentFonts: fontsUsedInDocument,
|
|
61427
61428
|
unsupportedFonts
|
|
61428
61429
|
});
|
|
61429
61430
|
} catch {
|
|
61430
61431
|
console.warn("[SuperDoc] Could not get access to local fonts. Using fallback solution.");
|
|
61431
61432
|
const unsupportedFonts = __privateMethod$1(this, _Editor_instances, determineUnsupportedFontsWithCanvas_fn).call(this, fontsUsedInDocument);
|
|
61432
|
-
this.
|
|
61433
|
+
this.emit("fonts-resolved", {
|
|
61433
61434
|
documentFonts: fontsUsedInDocument,
|
|
61434
61435
|
unsupportedFonts
|
|
61435
61436
|
});
|
|
@@ -81218,7 +81219,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
81218
81219
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
|
|
81219
81220
|
onKeydown: withKeys(withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
81220
81221
|
type: "text",
|
|
81221
|
-
class: normalizeClass(["button-text-input", { "high-contrast": unref(isHighContrastMode2) }]),
|
|
81222
|
+
class: normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": unref(isHighContrastMode2) }]),
|
|
81222
81223
|
id: "inlineTextInput-" + unref(name),
|
|
81223
81224
|
autocomplete: "off",
|
|
81224
81225
|
ref_key: "inlineInput",
|
|
@@ -81252,7 +81253,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
|
|
|
81252
81253
|
};
|
|
81253
81254
|
}
|
|
81254
81255
|
};
|
|
81255
|
-
const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-
|
|
81256
|
+
const ToolbarButton = /* @__PURE__ */ _export_sfc$1(_sfc_main$4$2, [["__scopeId", "data-v-ea93b080"]]);
|
|
81256
81257
|
const _hoisted_1$2$2 = {
|
|
81257
81258
|
class: "toolbar-separator",
|
|
81258
81259
|
role: "separator",
|
|
@@ -91803,8 +91804,8 @@ ${style2}
|
|
|
91803
91804
|
if (!Array.isArray(options.options)) throw new Error("Invalid toolbar item options - " + options.options);
|
|
91804
91805
|
nestedOptions.value?.push(...options.options);
|
|
91805
91806
|
}
|
|
91806
|
-
const activate = (attrs) => {
|
|
91807
|
-
onActivate(attrs);
|
|
91807
|
+
const activate = (attrs, ...args) => {
|
|
91808
|
+
onActivate(attrs, ...args);
|
|
91808
91809
|
if (suppressActiveHighlight.value) return;
|
|
91809
91810
|
active.value = true;
|
|
91810
91811
|
};
|
|
@@ -93105,7 +93106,12 @@ ${style2}
|
|
|
93105
93106
|
ariaLabel: "Font size"
|
|
93106
93107
|
},
|
|
93107
93108
|
options: fontSizeOptions,
|
|
93108
|
-
onActivate: ({ fontSize: size2 }) => {
|
|
93109
|
+
onActivate: ({ fontSize: size2 }, isMultiple = false) => {
|
|
93110
|
+
if (isMultiple) {
|
|
93111
|
+
fontSize2.label.value = "";
|
|
93112
|
+
fontSize2.selectedValue.value = "";
|
|
93113
|
+
return;
|
|
93114
|
+
}
|
|
93109
93115
|
const defaultSize = fontSizeOptions.find((i2) => i2.label === String(fontSize2.defaultLabel.value));
|
|
93110
93116
|
if (!size2) {
|
|
93111
93117
|
fontSize2.label.value = fontSize2.defaultLabel.value;
|
|
@@ -93122,8 +93128,6 @@ ${style2}
|
|
|
93122
93128
|
});
|
|
93123
93129
|
if (foundSize) {
|
|
93124
93130
|
fontSize2.selectedValue.value = foundSize.key;
|
|
93125
|
-
} else if (defaultSize) {
|
|
93126
|
-
fontSize2.selectedValue.value = defaultSize.key;
|
|
93127
93131
|
} else {
|
|
93128
93132
|
fontSize2.selectedValue.value = "";
|
|
93129
93133
|
}
|
|
@@ -94574,7 +94578,13 @@ ${style2}
|
|
|
94574
94578
|
const markNegated = rawActiveMark ? isNegatedMark(rawActiveMark.name, rawActiveMark.attrs) : false;
|
|
94575
94579
|
const activeMark = markNegated ? null : rawActiveMark;
|
|
94576
94580
|
if (activeMark) {
|
|
94577
|
-
|
|
94581
|
+
if (activeMark.name === "fontSize") {
|
|
94582
|
+
const fontSizes = marks.filter((i2) => i2.name === "fontSize").map((i2) => i2.attrs.fontSize);
|
|
94583
|
+
const isMultiple = [...new Set(fontSizes)].length > 1;
|
|
94584
|
+
item.activate(activeMark.attrs, isMultiple);
|
|
94585
|
+
} else {
|
|
94586
|
+
item.activate(activeMark.attrs);
|
|
94587
|
+
}
|
|
94578
94588
|
} else {
|
|
94579
94589
|
item.deactivate();
|
|
94580
94590
|
}
|
|
@@ -113263,10 +113273,8 @@ ${style2}
|
|
|
113263
113273
|
const onEditorListdefinitionsChange = (params2) => {
|
|
113264
113274
|
proxy.$superdoc.emit("list-definitions-change", params2);
|
|
113265
113275
|
};
|
|
113266
|
-
const onFontsResolved = (params2) => {
|
|
113267
|
-
proxy.$superdoc.emit("fonts-resolved", params2);
|
|
113268
|
-
};
|
|
113269
113276
|
const editorOptions = (doc2) => {
|
|
113277
|
+
const onFontsResolvedFn = proxy.$superdoc.listeners?.("fonts-resolved")?.length > 0 ? proxy.$superdoc.listeners("fonts-resolved")[0] : null;
|
|
113270
113278
|
const options = {
|
|
113271
113279
|
isDebug: proxy.$superdoc.config.isDebug || false,
|
|
113272
113280
|
pagination: proxy.$superdoc.config.pagination,
|
|
@@ -113298,7 +113306,7 @@ ${style2}
|
|
|
113298
113306
|
onCommentsUpdate: onEditorCommentsUpdate,
|
|
113299
113307
|
onCommentLocationsUpdate: onEditorCommentLocationsUpdate,
|
|
113300
113308
|
onListDefinitionsChange: onEditorListdefinitionsChange,
|
|
113301
|
-
onFontsResolved:
|
|
113309
|
+
onFontsResolved: onFontsResolvedFn,
|
|
113302
113310
|
onTransaction: onEditorTransaction,
|
|
113303
113311
|
ydoc: doc2.ydoc,
|
|
113304
113312
|
collaborationProvider: doc2.provider || null,
|
|
@@ -113682,7 +113690,7 @@ ${style2}
|
|
|
113682
113690
|
};
|
|
113683
113691
|
}
|
|
113684
113692
|
};
|
|
113685
|
-
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
113693
|
+
const App = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-715d68b1"]]);
|
|
113686
113694
|
const createSuperdocVueApp = () => {
|
|
113687
113695
|
const app = createApp(App);
|
|
113688
113696
|
const pinia = createPinia();
|