superdoc 2.23.0 → 2.23.1-next.10
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/{create-super-doc-ui-B8N_IUG2.es.js → create-super-doc-ui-DFNXiKvQ.es.js} +1 -0
- package/dist/chunks/{create-super-doc-ui-1uZB3O_w.cjs → create-super-doc-ui-D_FbXpOQ.cjs} +1 -0
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +5 -0
- package/dist/document-api/src/contract/operation-definitions.d.ts +1 -1
- package/dist/document-api/src/types/query.d.ts +1 -1
- package/dist/layout-engine/contracts/src/index.d.ts +9 -0
- package/dist/layout-engine/layout-engine/src/layout-table.d.ts +2 -0
- package/dist/layout-engine/painters/dom/src/runs/formatting-marks.d.ts +1 -0
- package/dist/layout-engine/painters/dom/src/table/renderTableRow.d.ts +4 -1
- package/dist/layout-engine/painters/dom/src/web-flow/types.d.ts +1 -0
- package/dist/public/ui-react.cjs +1 -1
- package/dist/public/ui-react.es.js +1 -1
- package/dist/public/ui-vue.cjs +1 -1
- package/dist/public/ui-vue.es.js +1 -1
- package/dist/public/ui.cjs +1 -1
- package/dist/public/ui.es.js +1 -1
- package/dist/style.css +76 -78
- package/dist/style.layered.css +76 -78
- package/dist/superdoc/src/components/CommentsLayer/comment-urls.d.ts +2 -0
- package/dist/superdoc/src/core/SuperDoc.d.ts +1 -1
- package/dist/superdoc/src/core/editor-runtime/types.d.ts +1 -0
- package/dist/superdoc/src/core/editor-runtime/v2/v2-editor-runtime-adapter.d.ts +1 -0
- package/dist/superdoc.cjs +194 -121
- package/dist/superdoc.es.js +194 -121
- package/dist-cdn/style.layered.css +1 -1
- package/dist-cdn/superdoc.min.css +1 -1
- package/dist-cdn/superdoc.min.js +42 -42
- package/package.json +2 -2
package/dist/superdoc.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_rolldown_runtime = require("./chunks/rolldown-runtime-74VwNCz7.cjs");
|
|
3
3
|
const require_blank_docx = require("./chunks/blank-docx-BuFAbRjs.cjs");
|
|
4
|
-
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-
|
|
4
|
+
const require_create_super_doc_ui = require("./chunks/create-super-doc-ui-D_FbXpOQ.cjs");
|
|
5
5
|
const require_eventemitter3 = require("./chunks/eventemitter3-C_TAnXOl.cjs");
|
|
6
6
|
const require_uuid = require("./chunks/uuid-BhG0ngwk.cjs");
|
|
7
7
|
const require__plugin_vue_export_helper = require("./chunks/_plugin-vue_export-helper-CYxINHh_.cjs");
|
|
@@ -304,7 +304,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
304
304
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
305
305
|
function getSuperdocVersion() {
|
|
306
306
|
try {
|
|
307
|
-
return "2.23.
|
|
307
|
+
return "2.23.1-next.10";
|
|
308
308
|
} catch {
|
|
309
309
|
return "unknown";
|
|
310
310
|
}
|
|
@@ -12202,7 +12202,7 @@ function useUiFontFamily() {
|
|
|
12202
12202
|
}
|
|
12203
12203
|
//#endregion
|
|
12204
12204
|
//#region src/components/CommentsLayer/CommentsDropdown.vue
|
|
12205
|
-
var _hoisted_1$
|
|
12205
|
+
var _hoisted_1$31 = { class: "comments-dropdown" };
|
|
12206
12206
|
var _hoisted_2$25 = ["onClick"];
|
|
12207
12207
|
var _hoisted_3$21 = {
|
|
12208
12208
|
key: 0,
|
|
@@ -12333,7 +12333,7 @@ var _sfc_main$39 = {
|
|
|
12333
12333
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
12334
12334
|
});
|
|
12335
12335
|
return (_ctx, _cache) => {
|
|
12336
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
12336
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$31, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
12337
12337
|
ref_key: "triggerRef",
|
|
12338
12338
|
ref: triggerRef,
|
|
12339
12339
|
class: "comments-dropdown__trigger",
|
|
@@ -12363,7 +12363,7 @@ var _sfc_main$39 = {
|
|
|
12363
12363
|
var CommentsDropdown_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$39, [["__scopeId", "data-v-7eced80a"]]);
|
|
12364
12364
|
//#endregion
|
|
12365
12365
|
//#region src/components/CommentsLayer/InternalDropdown.vue
|
|
12366
|
-
var _hoisted_1$
|
|
12366
|
+
var _hoisted_1$30 = { class: "sd-comment-option" };
|
|
12367
12367
|
var _hoisted_2$24 = ["innerHTML"];
|
|
12368
12368
|
var _hoisted_3$20 = { class: "sd-option-state" };
|
|
12369
12369
|
var _hoisted_4$12 = ["innerHTML"];
|
|
@@ -12434,7 +12434,7 @@ var _sfc_main$38 = {
|
|
|
12434
12434
|
disabled: __props.isDisabled,
|
|
12435
12435
|
"content-style": { fontFamily: require__plugin_vue_export_helper.unref(uiFontFamily) }
|
|
12436
12436
|
}, {
|
|
12437
|
-
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_1$
|
|
12437
|
+
default: require__plugin_vue_export_helper.withCtx(() => [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_1$30, [
|
|
12438
12438
|
require__plugin_vue_export_helper.createElementVNode("div", {
|
|
12439
12439
|
class: "sd-active-icon",
|
|
12440
12440
|
innerHTML: activeIcon.value
|
|
@@ -12600,7 +12600,7 @@ var isAllowed = (permission, role, isInternal, context = {}) => {
|
|
|
12600
12600
|
};
|
|
12601
12601
|
//#endregion
|
|
12602
12602
|
//#region src/components/general/Avatar.vue
|
|
12603
|
-
var _hoisted_1$
|
|
12603
|
+
var _hoisted_1$29 = { class: "user-container" };
|
|
12604
12604
|
var _hoisted_2$23 = ["src"];
|
|
12605
12605
|
var _hoisted_3$19 = {
|
|
12606
12606
|
key: 1,
|
|
@@ -12623,7 +12623,7 @@ var _sfc_main$37 = {
|
|
|
12623
12623
|
return email?.substring(0, 1)?.toUpperCase() || null;
|
|
12624
12624
|
};
|
|
12625
12625
|
return (_ctx, _cache) => {
|
|
12626
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
12626
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$29, [__props.user.image ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("img", {
|
|
12627
12627
|
key: 0,
|
|
12628
12628
|
class: "user-bg",
|
|
12629
12629
|
src: __props.user.image.startsWith("http") ? __props.user.image : `data:image/png;base64,${__props.user.image}`
|
|
@@ -12634,7 +12634,7 @@ var _sfc_main$37 = {
|
|
|
12634
12634
|
var Avatar_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$37, [["__scopeId", "data-v-c95b2073"]]);
|
|
12635
12635
|
//#endregion
|
|
12636
12636
|
//#region src/components/CommentsLayer/CommentHeader.vue
|
|
12637
|
-
var _hoisted_1$
|
|
12637
|
+
var _hoisted_1$28 = { class: "card-section comment-header" };
|
|
12638
12638
|
var _hoisted_2$22 = { class: "comment-header-left" };
|
|
12639
12639
|
var _hoisted_3$18 = { class: "user-info" };
|
|
12640
12640
|
var _hoisted_4$11 = { class: "user-name" };
|
|
@@ -12894,7 +12894,7 @@ var _sfc_main$36 = {
|
|
|
12894
12894
|
return user;
|
|
12895
12895
|
});
|
|
12896
12896
|
return (_ctx, _cache) => {
|
|
12897
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
12897
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$28, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$22, [require__plugin_vue_export_helper.createVNode(Avatar_default, {
|
|
12898
12898
|
user: getCurrentUser.value,
|
|
12899
12899
|
class: "avatar"
|
|
12900
12900
|
}, null, 8, ["user"]), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_3$18, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_4$11, [require__plugin_vue_export_helper.createTextVNode(require__plugin_vue_export_helper.toDisplayString(getCurrentUser.value.name), 1), isImported.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("span", _hoisted_5$9, "IMPORTED")) : require__plugin_vue_export_helper.createCommentVNode("", true)]), props.comment.createdTime ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_6$8, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(formatDate)(props.comment.createdTime)), 1)) : require__plugin_vue_export_helper.createCommentVNode("", true)])]), require__plugin_vue_export_helper.createElementVNode("div", { class: require__plugin_vue_export_helper.normalizeClass(["overflow-menu", { "is-visible": props.isActive }]) }, [
|
|
@@ -12946,7 +12946,7 @@ var _sfc_main$36 = {
|
|
|
12946
12946
|
var CommentHeader_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$36, [["__scopeId", "data-v-f2f11c96"]]);
|
|
12947
12947
|
//#endregion
|
|
12948
12948
|
//#region src/components/CommentsLayer/CommentInput.vue
|
|
12949
|
-
var _hoisted_1$
|
|
12949
|
+
var _hoisted_1$27 = { class: "input-section" };
|
|
12950
12950
|
var _hoisted_2$21 = { class: "comment-composer" };
|
|
12951
12951
|
var _hoisted_3$17 = [
|
|
12952
12952
|
"aria-expanded",
|
|
@@ -13120,7 +13120,7 @@ var _sfc_main$35 = {
|
|
|
13120
13120
|
require__plugin_vue_export_helper.watch(currentCommentText, scheduleInputHeightSync);
|
|
13121
13121
|
__expose({ focus });
|
|
13122
13122
|
return (_ctx, _cache) => {
|
|
13123
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
13123
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$27, [__props.includeHeader ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(CommentHeader_default, {
|
|
13124
13124
|
key: 0,
|
|
13125
13125
|
config: __props.config,
|
|
13126
13126
|
comment: __props.comment,
|
|
@@ -13166,8 +13166,116 @@ var _sfc_main$35 = {
|
|
|
13166
13166
|
};
|
|
13167
13167
|
var CommentInput_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$35, [["__scopeId", "data-v-0720a671"]]);
|
|
13168
13168
|
//#endregion
|
|
13169
|
+
//#region src/internal/toolbar/built-in/url-safety.js
|
|
13170
|
+
/**
|
|
13171
|
+
* Minimal href sanitizer for the built-in link popover.
|
|
13172
|
+
*
|
|
13173
|
+
* The v1 toolbar used the shared `@superdoc/url-validation` package, which is not
|
|
13174
|
+
* a resolvable runtime dependency of the published `superdoc` ES build. This
|
|
13175
|
+
* keeps the same fail-closed posture (only known-safe schemes pass) without
|
|
13176
|
+
* pulling in that package: dangerous schemes (`javascript:`, `data:`,
|
|
13177
|
+
* `vbscript:`) return `null`, mirroring the v1 contract that callers treat a
|
|
13178
|
+
* `null` result as an invalid URL.
|
|
13179
|
+
*/
|
|
13180
|
+
var SAFE_SCHEME = /^(https?|mailto|tel):/i;
|
|
13181
|
+
var DANGEROUS_SCHEME = /^(javascript|data|vbscript):/i;
|
|
13182
|
+
var HAS_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
|
|
13183
|
+
/**
|
|
13184
|
+
* Validate and normalize an href. Returns `{ href }` for safe values, or `null`.
|
|
13185
|
+
* @param {string} value
|
|
13186
|
+
* @returns {{ href: string }|null}
|
|
13187
|
+
*/
|
|
13188
|
+
function sanitizeHref(value) {
|
|
13189
|
+
if (typeof value !== "string") return null;
|
|
13190
|
+
const trimmed = value.trim();
|
|
13191
|
+
if (!trimmed) return null;
|
|
13192
|
+
if (trimmed.startsWith("#")) return { href: trimmed };
|
|
13193
|
+
if (DANGEROUS_SCHEME.test(trimmed)) return null;
|
|
13194
|
+
if (HAS_SCHEME.test(trimmed)) return SAFE_SCHEME.test(trimmed) ? { href: trimmed } : null;
|
|
13195
|
+
return { href: trimmed };
|
|
13196
|
+
}
|
|
13197
|
+
//#endregion
|
|
13198
|
+
//#region src/components/CommentsLayer/comment-urls.js
|
|
13199
|
+
function isAbsoluteWebUrl(value) {
|
|
13200
|
+
if (!/^https?:\/\/[^\s/?#\\]+/i.test(value) || /[\s\\]/u.test(value)) return false;
|
|
13201
|
+
try {
|
|
13202
|
+
const url = new URL(value);
|
|
13203
|
+
return (url.protocol === "https:" || url.protocol === "http:") && Boolean(url.hostname);
|
|
13204
|
+
} catch {
|
|
13205
|
+
return false;
|
|
13206
|
+
}
|
|
13207
|
+
}
|
|
13208
|
+
function trimUrlPunctuation(value) {
|
|
13209
|
+
const closingDelimiter = {
|
|
13210
|
+
"(": ")",
|
|
13211
|
+
"[": "]",
|
|
13212
|
+
"{": "}"
|
|
13213
|
+
};
|
|
13214
|
+
const balance = {
|
|
13215
|
+
")": 0,
|
|
13216
|
+
"]": 0,
|
|
13217
|
+
"}": 0
|
|
13218
|
+
};
|
|
13219
|
+
for (const character of value) {
|
|
13220
|
+
const close = closingDelimiter[character];
|
|
13221
|
+
if (close) balance[close] += 1;
|
|
13222
|
+
else if (Object.hasOwn(balance, character)) balance[character] -= 1;
|
|
13223
|
+
}
|
|
13224
|
+
let end = value.length;
|
|
13225
|
+
while (end > 0) {
|
|
13226
|
+
const character = value[end - 1];
|
|
13227
|
+
if (".,!?;:".includes(character)) end -= 1;
|
|
13228
|
+
else if (balance[character] < 0) {
|
|
13229
|
+
balance[character] += 1;
|
|
13230
|
+
end -= 1;
|
|
13231
|
+
} else break;
|
|
13232
|
+
}
|
|
13233
|
+
return value.slice(0, end);
|
|
13234
|
+
}
|
|
13235
|
+
function configureLink(link, href) {
|
|
13236
|
+
link.setAttribute("href", href);
|
|
13237
|
+
link.setAttribute("target", "_blank");
|
|
13238
|
+
link.setAttribute("rel", "noopener noreferrer");
|
|
13239
|
+
}
|
|
13240
|
+
/** Render links without rewriting stored comment HTML or its rich-text structure. */
|
|
13241
|
+
function renderCommentHtml(value) {
|
|
13242
|
+
if (typeof value !== "string") return "";
|
|
13243
|
+
if (typeof document === "undefined") return value;
|
|
13244
|
+
const template = document.createElement("template");
|
|
13245
|
+
template.innerHTML = value;
|
|
13246
|
+
for (const link of template.content.querySelectorAll("a")) {
|
|
13247
|
+
const safe = sanitizeHref(link.getAttribute("href"));
|
|
13248
|
+
if (safe && (isAbsoluteWebUrl(safe.href) || /^(mailto|tel):\S+$/i.test(safe.href))) configureLink(link, safe.href);
|
|
13249
|
+
else link.replaceWith(...link.childNodes);
|
|
13250
|
+
}
|
|
13251
|
+
const walker = document.createTreeWalker(template.content, NodeFilter.SHOW_TEXT);
|
|
13252
|
+
const textNodes = [];
|
|
13253
|
+
while (walker.nextNode()) textNodes.push(walker.currentNode);
|
|
13254
|
+
for (const node of textNodes) {
|
|
13255
|
+
if (node.parentElement?.closest("a, script, style, textarea, code, pre")) continue;
|
|
13256
|
+
const text = node.textContent;
|
|
13257
|
+
const fragment = document.createDocumentFragment();
|
|
13258
|
+
let end = 0;
|
|
13259
|
+
for (const match of text.matchAll(/(^|[\s([{])(https?:\/\/[^\s<>"']+)/gi)) {
|
|
13260
|
+
const href = trimUrlPunctuation(match[2]);
|
|
13261
|
+
if (!isAbsoluteWebUrl(href)) continue;
|
|
13262
|
+
const start = match.index + match[1].length;
|
|
13263
|
+
fragment.append(document.createTextNode(text.slice(end, start)));
|
|
13264
|
+
const link = document.createElement("a");
|
|
13265
|
+
configureLink(link, href);
|
|
13266
|
+
link.textContent = href;
|
|
13267
|
+
fragment.append(link);
|
|
13268
|
+
end = start + href.length;
|
|
13269
|
+
}
|
|
13270
|
+
if (end === 0) continue;
|
|
13271
|
+
fragment.append(document.createTextNode(text.slice(end)));
|
|
13272
|
+
node.replaceWith(fragment);
|
|
13273
|
+
}
|
|
13274
|
+
return template.innerHTML;
|
|
13275
|
+
}
|
|
13276
|
+
//#endregion
|
|
13169
13277
|
//#region src/components/CommentsLayer/CommentDialog.vue
|
|
13170
|
-
var _hoisted_1$
|
|
13278
|
+
var _hoisted_1$26 = [
|
|
13171
13279
|
"aria-label",
|
|
13172
13280
|
"data-comment-instance-id",
|
|
13173
13281
|
"data-comment-thread-id",
|
|
@@ -13547,6 +13655,12 @@ var _sfc_main$34 = {
|
|
|
13547
13655
|
return a.createdTime - b.createdTime;
|
|
13548
13656
|
});
|
|
13549
13657
|
});
|
|
13658
|
+
const renderedCommentTexts = require__plugin_vue_export_helper.computed(() => new Map(comments.value.map((comment) => [comment.commentId, renderCommentHtml(comment.commentText)])));
|
|
13659
|
+
const handleDialogClick = (event) => {
|
|
13660
|
+
if (event.target instanceof Element && event.target.closest(".comment a[href]")) return;
|
|
13661
|
+
event.preventDefault();
|
|
13662
|
+
return setFocus();
|
|
13663
|
+
};
|
|
13550
13664
|
const dialogAccessibleLabel = require__plugin_vue_export_helper.computed(() => {
|
|
13551
13665
|
if (props.comment.trackedChangeLabel) return props.comment.trackedChangeLabel;
|
|
13552
13666
|
if (props.comment.trackedChange) return "Tracked change discussion";
|
|
@@ -14175,7 +14289,7 @@ var _sfc_main$34 = {
|
|
|
14175
14289
|
"is-active": isDialogActive.value || isPendingNewComment.value,
|
|
14176
14290
|
"is-resolved": props.comment.resolvedTime
|
|
14177
14291
|
}]),
|
|
14178
|
-
onClick: require__plugin_vue_export_helper.withModifiers(
|
|
14292
|
+
onClick: require__plugin_vue_export_helper.withModifiers(handleDialogClick, ["stop"]),
|
|
14179
14293
|
style: require__plugin_vue_export_helper.normalizeStyle(getSidebarCommentStyle.value),
|
|
14180
14294
|
ref_key: "commentDialogElement",
|
|
14181
14295
|
ref: commentDialogElement,
|
|
@@ -14312,7 +14426,7 @@ var _sfc_main$34 = {
|
|
|
14312
14426
|
class: require__plugin_vue_export_helper.normalizeClass(["comment", index === 0 ? bodyOverflowClass.value : void 0]),
|
|
14313
14427
|
ref_for: true,
|
|
14314
14428
|
ref: index === 0 ? setParentBodyRef : void 0,
|
|
14315
|
-
innerHTML: comment.
|
|
14429
|
+
innerHTML: renderedCommentTexts.value.get(comment.commentId)
|
|
14316
14430
|
}, null, 10, _hoisted_38)) : require__plugin_vue_export_helper.unref(isDebugging) && !isEditingThisComment.value(comment) ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_39, require__plugin_vue_export_helper.toDisplayString(require__plugin_vue_export_helper.unref(editorCommentPositions)[comment.importedId !== void 0 ? comment.importedId : comment.commentId]?.bounds), 1)) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_40, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_41, [require__plugin_vue_export_helper.createVNode(CommentInput_default, {
|
|
14317
14431
|
ref_for: true,
|
|
14318
14432
|
ref: setEditCommentInputRef(comment.commentId),
|
|
@@ -14385,14 +14499,14 @@ var _sfc_main$34 = {
|
|
|
14385
14499
|
disabled: !hasTextContent.value || isV2WriteDisabled.value || isSubmittingReply.value,
|
|
14386
14500
|
"data-disabled-reason": v2ReplyDisabledReason.value
|
|
14387
14501
|
}, " Reply ", 10, _hoisted_53)])]))], 64)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
14388
|
-
], 64))], 14, _hoisted_1$
|
|
14502
|
+
], 64))], 14, _hoisted_1$26)), [[_directive_click_outside, handleClickOutside]]);
|
|
14389
14503
|
};
|
|
14390
14504
|
}
|
|
14391
14505
|
};
|
|
14392
|
-
var CommentDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$34, [["__scopeId", "data-v-
|
|
14506
|
+
var CommentDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$34, [["__scopeId", "data-v-c189ab35"]]);
|
|
14393
14507
|
//#endregion
|
|
14394
14508
|
//#region src/components/CommentsLayer/commentsList/ReviewDirectoryListItem.vue
|
|
14395
|
-
var _hoisted_1$
|
|
14509
|
+
var _hoisted_1$25 = [
|
|
14396
14510
|
"tabindex",
|
|
14397
14511
|
"aria-posinset",
|
|
14398
14512
|
"aria-setsize",
|
|
@@ -14530,14 +14644,14 @@ var _sfc_main$33 = {
|
|
|
14530
14644
|
"floating-page-index",
|
|
14531
14645
|
"floating-position-entry",
|
|
14532
14646
|
"is-floating-instance-active"
|
|
14533
|
-
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 44, _hoisted_1$
|
|
14647
|
+
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 44, _hoisted_1$25);
|
|
14534
14648
|
};
|
|
14535
14649
|
}
|
|
14536
14650
|
};
|
|
14537
14651
|
var ReviewDirectoryListItem_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$33, [["__scopeId", "data-v-29650a06"]]);
|
|
14538
14652
|
//#endregion
|
|
14539
14653
|
//#region src/components/CommentsLayer/commentsList/commentsList.vue
|
|
14540
|
-
var _hoisted_1$
|
|
14654
|
+
var _hoisted_1$24 = ["aria-busy"];
|
|
14541
14655
|
var _hoisted_2$19 = { key: 0 };
|
|
14542
14656
|
var _hoisted_3$15 = { key: 1 };
|
|
14543
14657
|
var REPEATED_HEADER_FOOTER_STORY_TYPE = "headerFooterPart";
|
|
@@ -14698,7 +14812,7 @@ var _sfc_main$32 = {
|
|
|
14698
14812
|
"total",
|
|
14699
14813
|
"tab-index"
|
|
14700
14814
|
]);
|
|
14701
|
-
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 8, _hoisted_1$
|
|
14815
|
+
}), 128))])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 8, _hoisted_1$24);
|
|
14702
14816
|
};
|
|
14703
14817
|
}
|
|
14704
14818
|
};
|
|
@@ -15168,7 +15282,7 @@ var resolveRemovedReviewCardContinuityTarget = ({ previousIds, currentIds, remov
|
|
|
15168
15282
|
};
|
|
15169
15283
|
//#endregion
|
|
15170
15284
|
//#region src/components/CommentsLayer/FloatingComments.vue
|
|
15171
|
-
var _hoisted_1$
|
|
15285
|
+
var _hoisted_1$23 = [
|
|
15172
15286
|
"data-comment-id",
|
|
15173
15287
|
"data-comment-instance-id",
|
|
15174
15288
|
"data-comment-thread-id",
|
|
@@ -16038,7 +16152,7 @@ var _sfc_main$31 = {
|
|
|
16038
16152
|
"floating-page-index",
|
|
16039
16153
|
"floating-position-entry",
|
|
16040
16154
|
"is-floating-instance-active"
|
|
16041
|
-
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 14, _hoisted_1$
|
|
16155
|
+
])) : require__plugin_vue_export_helper.createCommentVNode("", true)], 14, _hoisted_1$23);
|
|
16042
16156
|
}), 128))], 4)], 36);
|
|
16043
16157
|
};
|
|
16044
16158
|
}
|
|
@@ -16046,7 +16160,7 @@ var _sfc_main$31 = {
|
|
|
16046
16160
|
var FloatingComments_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$31, [["__scopeId", "data-v-15b59a51"]]);
|
|
16047
16161
|
//#endregion
|
|
16048
16162
|
//#region src/components/CommentsLayer/PdfCommentsLayer.vue
|
|
16049
|
-
var _hoisted_1$
|
|
16163
|
+
var _hoisted_1$22 = {
|
|
16050
16164
|
class: "superdoc__pdf-comments-layer pdf-comments-layer",
|
|
16051
16165
|
"aria-hidden": "false"
|
|
16052
16166
|
};
|
|
@@ -16152,7 +16266,7 @@ var PdfCommentsLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._
|
|
|
16152
16266
|
emit("anchor-activate", anchor.commentId);
|
|
16153
16267
|
};
|
|
16154
16268
|
return (_ctx, _cache) => {
|
|
16155
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
16269
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$22, [(require__plugin_vue_export_helper.openBlock(true), require__plugin_vue_export_helper.createElementBlock(require__plugin_vue_export_helper.Fragment, null, require__plugin_vue_export_helper.renderList(pdfCommentAnchors.value, (anchor) => {
|
|
16156
16270
|
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
16157
16271
|
key: anchor.commentId,
|
|
16158
16272
|
class: "sd-comment-anchor sd-highlight",
|
|
@@ -16321,7 +16435,7 @@ var useWhiteboard = ({ proxy, layers, documents, modules }) => {
|
|
|
16321
16435
|
};
|
|
16322
16436
|
//#endregion
|
|
16323
16437
|
//#region src/components/Whiteboard/WhiteboardPage.vue
|
|
16324
|
-
var _hoisted_1$
|
|
16438
|
+
var _hoisted_1$21 = ["data-page-index"];
|
|
16325
16439
|
var _sfc_main$29 = {
|
|
16326
16440
|
__name: "WhiteboardPage",
|
|
16327
16441
|
props: {
|
|
@@ -16453,7 +16567,7 @@ var _sfc_main$29 = {
|
|
|
16453
16567
|
height: (__props.pageSize?.height ?? __props.page.size?.height) + "px",
|
|
16454
16568
|
transform: `translate(${__props.pageOffset?.left ?? 0}px, ${__props.pageOffset?.top ?? 0}px)`
|
|
16455
16569
|
})
|
|
16456
|
-
}, null, 44, _hoisted_1$
|
|
16570
|
+
}, null, 44, _hoisted_1$21);
|
|
16457
16571
|
};
|
|
16458
16572
|
}
|
|
16459
16573
|
};
|
|
@@ -16532,7 +16646,7 @@ var _sfc_main$28 = {
|
|
|
16532
16646
|
var WhiteboardLayer_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$28, [["__scopeId", "data-v-54546c3d"]]);
|
|
16533
16647
|
//#endregion
|
|
16534
16648
|
//#region src/components/HtmlViewer/HtmlViewer.vue
|
|
16535
|
-
var _hoisted_1$
|
|
16649
|
+
var _hoisted_1$20 = { class: "superdoc-html-viewer" };
|
|
16536
16650
|
var _hoisted_2$17 = { class: "superdoc-html-viewer__document" };
|
|
16537
16651
|
var _hoisted_3$14 = ["innerHTML"];
|
|
16538
16652
|
var _sfc_main$27 = {
|
|
@@ -16582,7 +16696,7 @@ var _sfc_main$27 = {
|
|
|
16582
16696
|
initViewer();
|
|
16583
16697
|
});
|
|
16584
16698
|
return (_ctx, _cache) => {
|
|
16585
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
16699
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$20, [require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$17, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
16586
16700
|
class: "superdoc-html-viewer__content",
|
|
16587
16701
|
innerHTML: documentContent.value,
|
|
16588
16702
|
onMouseup: handleSelectionChange
|
|
@@ -18623,35 +18737,6 @@ function shouldHandleFindShortcut(event, { focusInside, owner }) {
|
|
|
18623
18737
|
return (!active || active === document.body || active === document.documentElement) && ownsAmbientFindShortcut(owner);
|
|
18624
18738
|
}
|
|
18625
18739
|
//#endregion
|
|
18626
|
-
//#region src/internal/toolbar/built-in/url-safety.js
|
|
18627
|
-
/**
|
|
18628
|
-
* Minimal href sanitizer for the built-in link popover.
|
|
18629
|
-
*
|
|
18630
|
-
* The v1 toolbar used the shared `@superdoc/url-validation` package, which is not
|
|
18631
|
-
* a resolvable runtime dependency of the published `superdoc` ES build. This
|
|
18632
|
-
* keeps the same fail-closed posture (only known-safe schemes pass) without
|
|
18633
|
-
* pulling in that package: dangerous schemes (`javascript:`, `data:`,
|
|
18634
|
-
* `vbscript:`) return `null`, mirroring the v1 contract that callers treat a
|
|
18635
|
-
* `null` result as an invalid URL.
|
|
18636
|
-
*/
|
|
18637
|
-
var SAFE_SCHEME = /^(https?|mailto|tel):/i;
|
|
18638
|
-
var DANGEROUS_SCHEME = /^(javascript|data|vbscript):/i;
|
|
18639
|
-
var HAS_SCHEME = /^[a-z][a-z0-9+.-]*:/i;
|
|
18640
|
-
/**
|
|
18641
|
-
* Validate and normalize an href. Returns `{ href }` for safe values, or `null`.
|
|
18642
|
-
* @param {string} value
|
|
18643
|
-
* @returns {{ href: string }|null}
|
|
18644
|
-
*/
|
|
18645
|
-
function sanitizeHref(value) {
|
|
18646
|
-
if (typeof value !== "string") return null;
|
|
18647
|
-
const trimmed = value.trim();
|
|
18648
|
-
if (!trimmed) return null;
|
|
18649
|
-
if (trimmed.startsWith("#")) return { href: trimmed };
|
|
18650
|
-
if (DANGEROUS_SCHEME.test(trimmed)) return null;
|
|
18651
|
-
if (HAS_SCHEME.test(trimmed)) return SAFE_SCHEME.test(trimmed) ? { href: trimmed } : null;
|
|
18652
|
-
return { href: trimmed };
|
|
18653
|
-
}
|
|
18654
|
-
//#endregion
|
|
18655
18740
|
//#region ../../shared/common/icons/bold-solid.svg?raw
|
|
18656
18741
|
var bold_solid_default = "<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=\"M0 64C0 46.3 14.3 32 32 32l48 0 16 0 128 0c70.7 0 128 57.3 128 128c0 31.3-11.3 60.1-30 82.3c37.1 22.4 62 63.1 62 109.7c0 70.7-57.3 128-128 128L96 480l-16 0-48 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l16 0 0-160L48 96 32 96C14.3 96 0 81.7 0 64zM224 224c35.3 0 64-28.7 64-64s-28.7-64-64-64L112 96l0 128 112 0zM112 288l0 128 144 0c35.3 0 64-28.7 64-64s-28.7-64-64-64l-32 0-112 0z\"/></svg>";
|
|
18657
18742
|
//#endregion
|
|
@@ -18874,7 +18959,7 @@ var toolbarIcons = {
|
|
|
18874
18959
|
};
|
|
18875
18960
|
//#endregion
|
|
18876
18961
|
//#region src/internal/toolbar/built-in/LinkInput.vue
|
|
18877
|
-
var _hoisted_1$
|
|
18962
|
+
var _hoisted_1$19 = {
|
|
18878
18963
|
key: 0,
|
|
18879
18964
|
class: "link-title"
|
|
18880
18965
|
};
|
|
@@ -19133,7 +19218,7 @@ var _sfc_main$26 = {
|
|
|
19133
19218
|
if (props.goToAnchor) props.goToAnchor(anchorUrl);
|
|
19134
19219
|
};
|
|
19135
19220
|
return (_ctx, _cache) => {
|
|
19136
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", { class: require__plugin_vue_export_helper.normalizeClass(["link-input-ctn", { "high-contrast": require__plugin_vue_export_helper.unref(isHighContrastMode) }]) }, [isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
19221
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", { class: require__plugin_vue_export_helper.normalizeClass(["link-input-ctn", { "high-contrast": require__plugin_vue_export_helper.unref(isHighContrastMode) }]) }, [isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$19, "Page anchor")) : isViewingMode.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_2$16, "Link details")) : isEditing.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_3$13, "Edit link")) : (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_4$8, "Add link")), __props.showInput && !isAnchor.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_5$6, [
|
|
19137
19222
|
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_6$5, [_cache[5] || (_cache[5] = require__plugin_vue_export_helper.createElementVNode("div", { class: "input-icon text-input-icon" }, "T", -1)), require__plugin_vue_export_helper.withDirectives(require__plugin_vue_export_helper.createElementVNode("input", {
|
|
19138
19223
|
type: "text",
|
|
19139
19224
|
name: "text",
|
|
@@ -20778,6 +20863,9 @@ function createV2EditorRuntimeAdapter(options) {
|
|
|
20778
20863
|
setTrackedChangesRenderOptions(options) {
|
|
20779
20864
|
host.setTrackedChangesRenderOptions(options);
|
|
20780
20865
|
},
|
|
20866
|
+
setShowFormattingMarks(show) {
|
|
20867
|
+
host.setShowFormattingMarks(show);
|
|
20868
|
+
},
|
|
20781
20869
|
getLegacyEditorProjection: () => getLegacyEditorProjection?.() ?? DEFAULT_V2_LEGACY_PROJECTION,
|
|
20782
20870
|
focus,
|
|
20783
20871
|
dispose,
|
|
@@ -21507,7 +21595,7 @@ var FOCUSABLE_SELECTOR = [
|
|
|
21507
21595
|
].join(", ");
|
|
21508
21596
|
//#endregion
|
|
21509
21597
|
//#region src/components/surfaces/SurfaceDialog.vue
|
|
21510
|
-
var _hoisted_1$
|
|
21598
|
+
var _hoisted_1$18 = ["aria-labelledby", "aria-label"];
|
|
21511
21599
|
var _hoisted_2$15 = ["id"];
|
|
21512
21600
|
var _hoisted_3$12 = { class: "sd-surface-dialog__content" };
|
|
21513
21601
|
var _sfc_main$24 = {
|
|
@@ -21655,14 +21743,14 @@ var _sfc_main$24 = {
|
|
|
21655
21743
|
"render",
|
|
21656
21744
|
"resolve",
|
|
21657
21745
|
"close"
|
|
21658
|
-
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 12, _hoisted_1$
|
|
21746
|
+
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 12, _hoisted_1$18)], 32);
|
|
21659
21747
|
};
|
|
21660
21748
|
}
|
|
21661
21749
|
};
|
|
21662
21750
|
var SurfaceDialog_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$24, [["__scopeId", "data-v-582b6534"]]);
|
|
21663
21751
|
//#endregion
|
|
21664
21752
|
//#region src/components/surfaces/SurfaceFloating.vue
|
|
21665
|
-
var _hoisted_1$
|
|
21753
|
+
var _hoisted_1$17 = ["aria-labelledby", "aria-label"];
|
|
21666
21754
|
var _hoisted_2$14 = ["id"];
|
|
21667
21755
|
var _hoisted_3$11 = { class: "sd-surface-floating__content" };
|
|
21668
21756
|
var _sfc_main$23 = {
|
|
@@ -21810,7 +21898,7 @@ var _sfc_main$23 = {
|
|
|
21810
21898
|
"render",
|
|
21811
21899
|
"resolve",
|
|
21812
21900
|
"close"
|
|
21813
|
-
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 14, _hoisted_1$
|
|
21901
|
+
])) : __props.surface.component ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createBlock(require__plugin_vue_export_helper.resolveDynamicComponent(__props.surface.component), require__plugin_vue_export_helper.normalizeProps(require__plugin_vue_export_helper.mergeProps({ key: 1 }, mergedComponentProps.value)), null, 16)) : require__plugin_vue_export_helper.createCommentVNode("", true)])], 14, _hoisted_1$17);
|
|
21814
21902
|
};
|
|
21815
21903
|
}
|
|
21816
21904
|
};
|
|
@@ -22042,7 +22130,7 @@ var _sfc_main$22 = {
|
|
|
22042
22130
|
var SurfaceHost_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$22, [["__scopeId", "data-v-dad99b67"]]);
|
|
22043
22131
|
//#endregion
|
|
22044
22132
|
//#region src/SuperDoc.vue
|
|
22045
|
-
var _hoisted_1$
|
|
22133
|
+
var _hoisted_1$16 = ["innerHTML"];
|
|
22046
22134
|
var _hoisted_2$13 = { class: "superdoc__document document" };
|
|
22047
22135
|
var _hoisted_3$10 = { class: "floating-comments" };
|
|
22048
22136
|
var TRACKED_CHANGE_CARRIERS_RESTAMPED_EVENT = "superdoc:v2-tracked-change-carriers-restamped";
|
|
@@ -24490,7 +24578,7 @@ var SuperDoc_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_v
|
|
|
24490
24578
|
}, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
24491
24579
|
class: "superdoc__tools-icon",
|
|
24492
24580
|
innerHTML: require__plugin_vue_export_helper.unref(superdocIcons).comment
|
|
24493
|
-
}, null, 8, _hoisted_1$
|
|
24581
|
+
}, null, 8, _hoisted_1$16)], 32)], 4)) : require__plugin_vue_export_helper.createCommentVNode("", true), require__plugin_vue_export_helper.createElementVNode("div", _hoisted_2$13, [
|
|
24494
24582
|
isCommentsEnabled.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
24495
24583
|
key: 0,
|
|
24496
24584
|
class: "superdoc__selection-layer selection-layer",
|
|
@@ -39186,7 +39274,7 @@ var throttle = (func, wait, options) => {
|
|
|
39186
39274
|
};
|
|
39187
39275
|
//#endregion
|
|
39188
39276
|
//#region src/internal/toolbar/built-in/ToolbarButtonIcon.vue
|
|
39189
|
-
var _hoisted_1$
|
|
39277
|
+
var _hoisted_1$15 = { class: "sd-toolbar-icon" };
|
|
39190
39278
|
var _hoisted_2$12 = ["innerHTML"];
|
|
39191
39279
|
var _sfc_main$20 = {
|
|
39192
39280
|
__name: "ToolbarButtonIcon",
|
|
@@ -39214,7 +39302,7 @@ var _sfc_main$20 = {
|
|
|
39214
39302
|
return ["color", "highlight"].includes(props.name);
|
|
39215
39303
|
});
|
|
39216
39304
|
return (_ctx, _cache) => {
|
|
39217
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
39305
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$15, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
39218
39306
|
class: require__plugin_vue_export_helper.normalizeClass(["sd-toolbar-icon__icon", [`sd-toolbar-icon__icon--${props.name}`]]),
|
|
39219
39307
|
innerHTML: __props.icon
|
|
39220
39308
|
}, null, 10, _hoisted_2$12), hasColorBar.value ? (require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", {
|
|
@@ -39228,7 +39316,7 @@ var _sfc_main$20 = {
|
|
|
39228
39316
|
var ToolbarButtonIcon_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$20, [["__scopeId", "data-v-65ecd5b1"]]);
|
|
39229
39317
|
//#endregion
|
|
39230
39318
|
//#region src/internal/toolbar/built-in/ToolbarButton.vue
|
|
39231
|
-
var _hoisted_1$
|
|
39319
|
+
var _hoisted_1$14 = [
|
|
39232
39320
|
"role",
|
|
39233
39321
|
"aria-label",
|
|
39234
39322
|
"aria-disabled"
|
|
@@ -39522,14 +39610,14 @@ var _sfc_main$19 = {
|
|
|
39522
39610
|
}, null, 12, _hoisted_10$1)) : require__plugin_vue_export_helper.createCommentVNode("", true)
|
|
39523
39611
|
], 64)),
|
|
39524
39612
|
require__plugin_vue_export_helper.createElementVNode("div", _hoisted_11$1, require__plugin_vue_export_helper.toDisplayString(`${require__plugin_vue_export_helper.unref(attributes).ariaLabel} ${require__plugin_vue_export_helper.unref(active) ? "selected" : "unset"}`), 1)
|
|
39525
|
-
], 10, _hoisted_2$11)], 46, _hoisted_1$
|
|
39613
|
+
], 10, _hoisted_2$11)], 46, _hoisted_1$14);
|
|
39526
39614
|
};
|
|
39527
39615
|
}
|
|
39528
39616
|
};
|
|
39529
39617
|
var ToolbarButton_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$19, [["__scopeId", "data-v-96796456"]]);
|
|
39530
39618
|
//#endregion
|
|
39531
39619
|
//#region src/internal/toolbar/built-in/ToolbarSeparator.vue
|
|
39532
|
-
var _hoisted_1$
|
|
39620
|
+
var _hoisted_1$13 = {
|
|
39533
39621
|
class: "toolbar-separator",
|
|
39534
39622
|
role: "separator",
|
|
39535
39623
|
"aria-label": "Toolbar separator"
|
|
@@ -39548,7 +39636,7 @@ var _sfc_main$18 = {
|
|
|
39548
39636
|
return "var(--sd-ui-border, #dbdbdb)";
|
|
39549
39637
|
};
|
|
39550
39638
|
return (_ctx, _cache) => {
|
|
39551
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
39639
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$13, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
39552
39640
|
class: "separator-inner",
|
|
39553
39641
|
style: require__plugin_vue_export_helper.normalizeStyle({ backgroundColor: getSeparatorColor() })
|
|
39554
39642
|
}, null, 4)]);
|
|
@@ -39558,7 +39646,7 @@ var _sfc_main$18 = {
|
|
|
39558
39646
|
var ToolbarSeparator_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$18, [["__scopeId", "data-v-cb82253a"]]);
|
|
39559
39647
|
//#endregion
|
|
39560
39648
|
//#region src/internal/toolbar/built-in/ToolbarDropdown.vue
|
|
39561
|
-
var _hoisted_1$
|
|
39649
|
+
var _hoisted_1$12 = { class: "toolbar-dropdown" };
|
|
39562
39650
|
var _hoisted_2$10 = ["onClick"];
|
|
39563
39651
|
var _hoisted_3$8 = {
|
|
39564
39652
|
key: 0,
|
|
@@ -39913,7 +40001,7 @@ var _sfc_main$17 = {
|
|
|
39913
40001
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
39914
40002
|
});
|
|
39915
40003
|
return (_ctx, _cache) => {
|
|
39916
|
-
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$
|
|
40004
|
+
return require__plugin_vue_export_helper.openBlock(), require__plugin_vue_export_helper.createElementBlock("div", _hoisted_1$12, [require__plugin_vue_export_helper.createElementVNode("div", {
|
|
39917
40005
|
ref_key: "triggerRef",
|
|
39918
40006
|
ref: triggerRef,
|
|
39919
40007
|
class: "toolbar-dropdown-trigger",
|
|
@@ -40180,7 +40268,7 @@ var normalizeCustomFontSize = (value) => {
|
|
|
40180
40268
|
};
|
|
40181
40269
|
//#endregion
|
|
40182
40270
|
//#region src/internal/toolbar/built-in/ToolbarComboBox.vue
|
|
40183
|
-
var _hoisted_1$
|
|
40271
|
+
var _hoisted_1$11 = ["data-item"];
|
|
40184
40272
|
var _hoisted_2$9 = [
|
|
40185
40273
|
"id",
|
|
40186
40274
|
"value",
|
|
@@ -40691,7 +40779,7 @@ var _sfc_main$15 = {
|
|
|
40691
40779
|
}), [require__plugin_vue_export_helper.createElementVNode("span", _hoisted_7$1, require__plugin_vue_export_helper.toDisplayString(option.label), 1)], 16, _hoisted_6$3);
|
|
40692
40780
|
}), 128))], 14, _hoisted_5$4)) : require__plugin_vue_export_helper.createCommentVNode("", true)])),
|
|
40693
40781
|
require__plugin_vue_export_helper.createElementVNode("span", _hoisted_8$1, require__plugin_vue_export_helper.toDisplayString(appliedLabel.value), 1)
|
|
40694
|
-
], 14, _hoisted_1$
|
|
40782
|
+
], 14, _hoisted_1$11);
|
|
40695
40783
|
};
|
|
40696
40784
|
}
|
|
40697
40785
|
};
|
|
@@ -40780,7 +40868,6 @@ var _sfc_main$13 = {
|
|
|
40780
40868
|
};
|
|
40781
40869
|
//#endregion
|
|
40782
40870
|
//#region src/internal/toolbar/built-in/SdTooltip.vue
|
|
40783
|
-
var _hoisted_1$11 = ["data-placement"];
|
|
40784
40871
|
var AUTO_HIDE_DELAY = 2500;
|
|
40785
40872
|
var _sfc_main$12 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
40786
40873
|
__name: "SdTooltip",
|
|
@@ -40814,20 +40901,25 @@ var _sfc_main$12 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
40814
40901
|
const contentRef = require__plugin_vue_export_helper.ref(null);
|
|
40815
40902
|
const position = require__plugin_vue_export_helper.ref({
|
|
40816
40903
|
top: "0px",
|
|
40817
|
-
left: "0px"
|
|
40904
|
+
left: "0px",
|
|
40905
|
+
below: false
|
|
40818
40906
|
});
|
|
40819
|
-
const placement = require__plugin_vue_export_helper.ref("top");
|
|
40820
40907
|
let closeTimeout = null;
|
|
40821
40908
|
let openTimeout = null;
|
|
40822
40909
|
let autoHideTimeout = null;
|
|
40823
|
-
const mergedContentClass = require__plugin_vue_export_helper.computed(() => [
|
|
40910
|
+
const mergedContentClass = require__plugin_vue_export_helper.computed(() => [
|
|
40911
|
+
"sd-tooltip-content",
|
|
40912
|
+
position.value.below && "sd-tooltip-below",
|
|
40913
|
+
attrs.class
|
|
40914
|
+
]);
|
|
40824
40915
|
const contentStyle = require__plugin_vue_export_helper.computed(() => ({
|
|
40825
40916
|
...props.contentStyle,
|
|
40826
40917
|
...attrs.style || {},
|
|
40827
40918
|
position: "fixed",
|
|
40828
40919
|
top: position.value.top,
|
|
40829
40920
|
left: position.value.left,
|
|
40830
|
-
zIndex: 2100
|
|
40921
|
+
zIndex: 2100,
|
|
40922
|
+
transformOrigin: position.value.below ? "top center" : "bottom center"
|
|
40831
40923
|
}));
|
|
40832
40924
|
const clearCloseTimeout = () => {
|
|
40833
40925
|
if (closeTimeout) {
|
|
@@ -40854,49 +40946,24 @@ var _sfc_main$12 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
40854
40946
|
close();
|
|
40855
40947
|
}, AUTO_HIDE_DELAY);
|
|
40856
40948
|
};
|
|
40857
|
-
const getElementSize = (element, dimension) => {
|
|
40858
|
-
const styles = window.getComputedStyle(element);
|
|
40859
|
-
const size = parseFloat(styles[dimension]);
|
|
40860
|
-
if (!Number.isFinite(size)) return dimension === "width" ? element.offsetWidth : element.offsetHeight;
|
|
40861
|
-
if (styles.boxSizing === "border-box") return size;
|
|
40862
|
-
return (dimension === "width" ? [
|
|
40863
|
-
"paddingLeft",
|
|
40864
|
-
"paddingRight",
|
|
40865
|
-
"borderLeftWidth",
|
|
40866
|
-
"borderRightWidth"
|
|
40867
|
-
] : [
|
|
40868
|
-
"paddingTop",
|
|
40869
|
-
"paddingBottom",
|
|
40870
|
-
"borderTopWidth",
|
|
40871
|
-
"borderBottomWidth"
|
|
40872
|
-
]).reduce((total, property) => total + (parseFloat(styles[property]) || 0), size);
|
|
40873
|
-
};
|
|
40874
40949
|
const updatePosition = () => {
|
|
40875
40950
|
if (!triggerRef.value || !contentRef.value) return;
|
|
40876
40951
|
const triggerRect = triggerRef.value.getBoundingClientRect();
|
|
40877
|
-
const contentWidth =
|
|
40878
|
-
const contentHeight =
|
|
40952
|
+
const contentWidth = contentRef.value.offsetWidth;
|
|
40953
|
+
const contentHeight = contentRef.value.offsetHeight;
|
|
40879
40954
|
const viewportWidth = window.innerWidth || document.documentElement.clientWidth || 0;
|
|
40880
|
-
const viewportHeight = document.documentElement.clientHeight ||
|
|
40955
|
+
const viewportHeight = window.innerHeight || document.documentElement.clientHeight || 0;
|
|
40881
40956
|
const gutter = 8;
|
|
40882
|
-
const offset = 10;
|
|
40883
40957
|
let left = triggerRect.left + triggerRect.width / 2 - contentWidth / 2;
|
|
40884
40958
|
left = Math.max(gutter, Math.min(left, viewportWidth - contentWidth - gutter));
|
|
40885
|
-
const
|
|
40886
|
-
const
|
|
40887
|
-
const
|
|
40888
|
-
const
|
|
40889
|
-
const availableAbove = triggerRect.top - offset;
|
|
40890
|
-
const availableBelow = viewportHeight - triggerRect.bottom - offset;
|
|
40891
|
-
if (fitsAbove) placement.value = "top";
|
|
40892
|
-
else if (fitsBelow) placement.value = "bottom";
|
|
40893
|
-
else placement.value = availableAbove >= availableBelow ? "top" : "bottom";
|
|
40894
|
-
const desiredTop = placement.value === "top" ? topAbove : topBelow;
|
|
40895
|
-
const minTop = Math.min(gutter, Math.max(0, viewportHeight - contentHeight));
|
|
40896
|
-
const maxTop = Math.max(minTop, viewportHeight - contentHeight - gutter);
|
|
40959
|
+
const aboveTop = triggerRect.top - contentHeight - 10;
|
|
40960
|
+
const below = aboveTop < gutter;
|
|
40961
|
+
const preferredTop = below ? triggerRect.bottom + 10 : aboveTop;
|
|
40962
|
+
const top = Math.max(gutter, Math.min(preferredTop, viewportHeight - contentHeight - gutter));
|
|
40897
40963
|
position.value = {
|
|
40898
|
-
top: `${
|
|
40899
|
-
left: `${left}px
|
|
40964
|
+
top: `${top}px`,
|
|
40965
|
+
left: `${left}px`,
|
|
40966
|
+
below
|
|
40900
40967
|
};
|
|
40901
40968
|
};
|
|
40902
40969
|
const open = async () => {
|
|
@@ -41006,19 +41073,18 @@ var _sfc_main$12 = /*@__PURE__*/ Object.assign({ inheritAttrs: false }, {
|
|
|
41006
41073
|
ref: contentRef,
|
|
41007
41074
|
class: require__plugin_vue_export_helper.normalizeClass(mergedContentClass.value),
|
|
41008
41075
|
style: require__plugin_vue_export_helper.normalizeStyle(contentStyle.value),
|
|
41009
|
-
"data-placement": placement.value,
|
|
41010
41076
|
onMouseenter: handleContentMouseEnter,
|
|
41011
41077
|
onMouseleave: handleContentMouseLeave
|
|
41012
41078
|
}, [_cache[0] || (_cache[0] = require__plugin_vue_export_helper.createElementVNode("span", {
|
|
41013
41079
|
class: "sd-tooltip-arrow",
|
|
41014
41080
|
"aria-hidden": "true"
|
|
41015
|
-
}, null, -1)), require__plugin_vue_export_helper.renderSlot(_ctx.$slots, "default", {}, void 0, true)],
|
|
41081
|
+
}, null, -1)), require__plugin_vue_export_helper.renderSlot(_ctx.$slots, "default", {}, void 0, true)], 38)) : require__plugin_vue_export_helper.createCommentVNode("", true)]),
|
|
41016
41082
|
_: 3
|
|
41017
41083
|
}, 8, ["css"])]))], 64);
|
|
41018
41084
|
};
|
|
41019
41085
|
}
|
|
41020
41086
|
});
|
|
41021
|
-
var SdTooltip_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$12, [["__scopeId", "data-v-
|
|
41087
|
+
var SdTooltip_default = /*#__PURE__*/ require__plugin_vue_export_helper._plugin_vue_export_helper_default(_sfc_main$12, [["__scopeId", "data-v-71c6de4c"]]);
|
|
41022
41088
|
//#endregion
|
|
41023
41089
|
//#region src/internal/toolbar/built-in/ButtonGroup.vue
|
|
41024
41090
|
var _hoisted_1$10 = [
|
|
@@ -46469,7 +46535,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46469
46535
|
}
|
|
46470
46536
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46471
46537
|
this.colorIndex = 0;
|
|
46472
|
-
this.version = "2.23.
|
|
46538
|
+
this.version = "2.23.1-next.10";
|
|
46473
46539
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46474
46540
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46475
46541
|
this.colors = this.config.colors ?? [];
|
|
@@ -47916,6 +47982,8 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
47916
47982
|
*/
|
|
47917
47983
|
registerEditorRuntime(runtime) {
|
|
47918
47984
|
this.#editorRuntimeRegistry.register(runtime);
|
|
47985
|
+
const show = this.config.layoutEngineOptions?.showFormattingMarks;
|
|
47986
|
+
if (typeof show === "boolean") runtime.setShowFormattingMarks(show);
|
|
47919
47987
|
}
|
|
47920
47988
|
/**
|
|
47921
47989
|
* Unregister a mounted editor runtime by id. If it was active, active state
|
|
@@ -48160,7 +48228,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
48160
48228
|
});
|
|
48161
48229
|
}
|
|
48162
48230
|
/**
|
|
48163
|
-
* Toggle nonprinting formatting marks (spaces, tabs, paragraph marks) in the
|
|
48231
|
+
* Toggle nonprinting formatting marks (spaces, tabs, paragraph marks and manual line breaks) in the
|
|
48164
48232
|
* rendered layout. This is a view-only setting and is not exported to DOCX.
|
|
48165
48233
|
*/
|
|
48166
48234
|
setShowFormattingMarks(show = true) {
|
|
@@ -48169,6 +48237,11 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
48169
48237
|
if (layoutOptions.showFormattingMarks === nextValue) return;
|
|
48170
48238
|
layoutOptions.showFormattingMarks = nextValue;
|
|
48171
48239
|
this.superdocStore?.documents?.forEach((doc) => {
|
|
48240
|
+
const runtimes = typeof doc.id === "string" ? this.#editorRuntimeRegistry.getAllByDocumentId(doc.id) : [];
|
|
48241
|
+
if (runtimes.length) {
|
|
48242
|
+
for (const runtime of runtimes) runtime.setShowFormattingMarks(nextValue);
|
|
48243
|
+
return;
|
|
48244
|
+
}
|
|
48172
48245
|
(doc.getDocumentRuntime?.())?.setShowFormattingMarks?.(nextValue);
|
|
48173
48246
|
});
|
|
48174
48247
|
this.emit("formatting-marks-change", {
|