@superdoc-dev/mcp 0.10.0-next.9 → 0.11.0-next.1
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/index.js +215 -121
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -52208,7 +52208,7 @@ var init_remark_gfm_BhnWr3yf_es = __esm(() => {
|
|
|
52208
52208
|
emptyOptions2 = {};
|
|
52209
52209
|
});
|
|
52210
52210
|
|
|
52211
|
-
// ../../packages/superdoc/dist/chunks/SuperConverter-
|
|
52211
|
+
// ../../packages/superdoc/dist/chunks/SuperConverter-CQg2Zq8Z.es.js
|
|
52212
52212
|
function getExtensionConfigField(extension$1, field, context = { name: "" }) {
|
|
52213
52213
|
const fieldValue = extension$1.config[field];
|
|
52214
52214
|
if (typeof fieldValue === "function")
|
|
@@ -107929,7 +107929,7 @@ var isRegExp = (value) => {
|
|
|
107929
107929
|
if (id)
|
|
107930
107930
|
return trackedChanges.filter(({ mark }) => mark.attrs.id === id);
|
|
107931
107931
|
return trackedChanges;
|
|
107932
|
-
}, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.
|
|
107932
|
+
}, groupedCache, SDT_NODE_NAMES, SDT_BLOCK_NAME = "structuredContentBlock", SDT_INLINE_NAME = "structuredContent", SDT_NODE_TYPES, VALID_CONTROL_TYPES, VALID_LOCK_MODES, VALID_APPEARANCES, FIELD_LIKE_SDT_TYPES, liveDocumentCountsCache, BIBLIOGRAPHY_NAMESPACE_URI = "http://schemas.openxmlformats.org/officeDocument/2006/bibliography", CUSTOM_XML_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", DEFAULT_SELECTED_STYLE = "/APA.XSL", DEFAULT_STYLE_NAME = "APA", DEFAULT_VERSION = "6", API_TO_OOXML_SOURCE_TYPE, OOXML_TO_API_SOURCE_TYPE, SIMPLE_FIELD_TO_XML_TAG, XML_TAG_TO_SIMPLE_FIELD, import_lib2, FONT_FAMILY_FALLBACKS, DEFAULT_GENERIC_FALLBACK = "sans-serif", DEFAULT_FONT_SIZE_PT = 10, CURRENT_APP_VERSION = "1.38.0", SUPERDOC_DOCUMENT_ORIGIN_PROPERTY = "SuperdocDocumentOrigin", STORED_DOCUMENT_ORIGINS, collectRunDefaultProperties = (runProps, { allowOverrideTypeface = true, allowOverrideSize = true, themeResolver, state }) => {
|
|
107933
107933
|
if (!runProps?.elements?.length || !state)
|
|
107934
107934
|
return;
|
|
107935
107935
|
const fontsNode = runProps.elements.find((el) => el.name === "w:rFonts");
|
|
@@ -107963,7 +107963,7 @@ var isRegExp = (value) => {
|
|
|
107963
107963
|
state.kern = kernNode.attributes["w:val"];
|
|
107964
107964
|
}
|
|
107965
107965
|
}, SuperConverter;
|
|
107966
|
-
var
|
|
107966
|
+
var init_SuperConverter_CQg2Zq8Z_es = __esm(() => {
|
|
107967
107967
|
init_rolldown_runtime_Bg48TavK_es();
|
|
107968
107968
|
init_jszip_C49i9kUs_es();
|
|
107969
107969
|
init_xml_js_CqGKpaft_es();
|
|
@@ -146279,7 +146279,7 @@ var init_SuperConverter_C6hKp29w_es = __esm(() => {
|
|
|
146279
146279
|
};
|
|
146280
146280
|
});
|
|
146281
146281
|
|
|
146282
|
-
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-
|
|
146282
|
+
// ../../packages/superdoc/dist/chunks/create-headless-toolbar-BjHgBUHt.es.js
|
|
146283
146283
|
function parseSizeUnit(val = "0") {
|
|
146284
146284
|
const length = val.toString() || "0";
|
|
146285
146285
|
const value = Number.parseFloat(length);
|
|
@@ -156628,8 +156628,8 @@ var CSS_DIMENSION_REGEX, DOM_SIZE_UNITS, normalizeActorId = (value) => {
|
|
|
156628
156628
|
}
|
|
156629
156629
|
};
|
|
156630
156630
|
};
|
|
156631
|
-
var
|
|
156632
|
-
|
|
156631
|
+
var init_create_headless_toolbar_BjHgBUHt_es = __esm(() => {
|
|
156632
|
+
init_SuperConverter_CQg2Zq8Z_es();
|
|
156633
156633
|
init_uuid_qzgm05fK_es();
|
|
156634
156634
|
init_constants_D_X7xF4s_es();
|
|
156635
156635
|
init_dist_B8HfvhaK_es();
|
|
@@ -211378,7 +211378,7 @@ var init_remark_gfm_eZN6yzWQ_es = __esm(() => {
|
|
|
211378
211378
|
init_remark_gfm_BhnWr3yf_es();
|
|
211379
211379
|
});
|
|
211380
211380
|
|
|
211381
|
-
// ../../packages/superdoc/dist/chunks/src-
|
|
211381
|
+
// ../../packages/superdoc/dist/chunks/src-GT3sTaEO.es.js
|
|
211382
211382
|
function deleteProps(obj, propOrProps) {
|
|
211383
211383
|
const props = typeof propOrProps === "string" ? [propOrProps] : propOrProps;
|
|
211384
211384
|
const removeNested = (target, pathParts, index2 = 0) => {
|
|
@@ -211452,7 +211452,7 @@ function prosemirrorToYXmlFragment(doc$12, xmlFragment) {
|
|
|
211452
211452
|
}
|
|
211453
211453
|
function getSuperdocVersion() {
|
|
211454
211454
|
try {
|
|
211455
|
-
return "1.
|
|
211455
|
+
return "1.38.0";
|
|
211456
211456
|
} catch {
|
|
211457
211457
|
return "unknown";
|
|
211458
211458
|
}
|
|
@@ -271966,7 +271966,7 @@ var Node$13 = class Node$14 {
|
|
|
271966
271966
|
}, isToolbarInput = (target) => {
|
|
271967
271967
|
return !!target?.closest(".button-text-input") || target?.classList?.contains("button-text-input");
|
|
271968
271968
|
}, isToolbarButton = (target) => {
|
|
271969
|
-
return !!target?.closest(".toolbar-button") || target?.classList?.contains("toolbar-button");
|
|
271969
|
+
return !!target?.closest(".sd-toolbar-button") || !!target?.closest(".toolbar-button") || target?.classList?.contains("sd-toolbar-button") || target?.classList?.contains("toolbar-button");
|
|
271970
271970
|
}, CustomSelection, History, createUndoPlugin = () => {
|
|
271971
271971
|
return yUndoPlugin();
|
|
271972
271972
|
}, Color, FontFamily, FontSize, LetterSpacing, TextAlign, toggleMarkCascade = (markName, options = {}) => ({ state, chain, editor }) => {
|
|
@@ -281070,7 +281070,7 @@ var Node$13 = class Node$14 {
|
|
|
281070
281070
|
}
|
|
281071
281071
|
});
|
|
281072
281072
|
}
|
|
281073
|
-
}, COMPOSITION_INPUT_TYPES, COMBINING_MARK_REGEX, graphemeSegmenter, DEAD_KEY_PLACEHOLDER_MARKS, getTextNodeAtPos = ({ doc: doc$12, pos }) => {
|
|
281073
|
+
}, COMPOSITION_INPUT_TYPES, COMBINING_MARK_REGEX, graphemeSegmenter, DEAD_KEY_PLACEHOLDER_MARKS, TRACKABLE_META_KEYS, PASSTHROUGH_META_KEYS, ALLOWED_META_KEYS, getTextNodeAtPos = ({ doc: doc$12, pos }) => {
|
|
281074
281074
|
let found2 = null;
|
|
281075
281075
|
doc$12.nodesBetween(Math.max(0, pos - 1), Math.min(doc$12.content.size, pos + 1), (node2, nodePos) => {
|
|
281076
281076
|
if (found2 || !node2.isText || !node2.text)
|
|
@@ -281261,6 +281261,12 @@ var Node$13 = class Node$14 {
|
|
|
281261
281261
|
...existingMeta,
|
|
281262
281262
|
...extraMeta
|
|
281263
281263
|
});
|
|
281264
|
+
}, copyPassthroughMeta = (sourceTr, targetTr) => {
|
|
281265
|
+
PASSTHROUGH_META_KEYS.forEach((key2) => {
|
|
281266
|
+
const value = sourceTr.getMeta(key2);
|
|
281267
|
+
if (value !== undefined)
|
|
281268
|
+
targetTr.setMeta(key2, value);
|
|
281269
|
+
});
|
|
281264
281270
|
}, getPendingDeadKeyPlaceholder = ({ tr, newTr, user }) => {
|
|
281265
281271
|
if (!isCompositionTransaction(tr) || tr.steps.length !== 1)
|
|
281266
281272
|
return null;
|
|
@@ -281290,13 +281296,6 @@ var Node$13 = class Node$14 {
|
|
|
281290
281296
|
authorEmail: user.email
|
|
281291
281297
|
};
|
|
281292
281298
|
}, trackedTransaction = ({ tr, state, user, replacements = "paired" }) => {
|
|
281293
|
-
const onlyInputTypeMeta = [
|
|
281294
|
-
"inputType",
|
|
281295
|
-
"uiEvent",
|
|
281296
|
-
"paste",
|
|
281297
|
-
"pointer",
|
|
281298
|
-
"composition"
|
|
281299
|
-
];
|
|
281300
281299
|
const notAllowedMeta = [
|
|
281301
281300
|
"historyUndo",
|
|
281302
281301
|
"historyRedo",
|
|
@@ -281305,13 +281304,7 @@ var Node$13 = class Node$14 {
|
|
|
281305
281304
|
const isProgrammaticInput = tr.getMeta("inputType") === "programmatic";
|
|
281306
281305
|
const ySyncMeta = tr.getMeta(ySyncPluginKey);
|
|
281307
281306
|
const pendingDeadKeyPlaceholder = TrackChangesBasePluginKey.getState(state)?.pendingDeadKeyPlaceholder ?? null;
|
|
281308
|
-
const
|
|
281309
|
-
...onlyInputTypeMeta,
|
|
281310
|
-
ySyncPluginKey.key,
|
|
281311
|
-
"forceTrackChanges",
|
|
281312
|
-
"protectTrackedReviewState"
|
|
281313
|
-
]);
|
|
281314
|
-
const hasDisallowedMeta = tr.meta && Object.keys(tr.meta).some((meta4) => !allowedMeta.has(meta4));
|
|
281307
|
+
const hasDisallowedMeta = tr.meta && Object.keys(tr.meta).some((meta4) => !ALLOWED_META_KEYS.has(meta4));
|
|
281315
281308
|
if (ySyncMeta?.isChangeOrigin || !tr.steps.length || hasDisallowedMeta && !isProgrammaticInput || notAllowedMeta.includes(tr.getMeta("inputType")) || tr.getMeta(CommentsPluginKey)) {
|
|
281316
281309
|
if (pendingDeadKeyPlaceholder && !isCompositionTransaction(tr))
|
|
281317
281310
|
mergeTrackChangesMeta(tr, { pendingDeadKeyPlaceholder: null });
|
|
@@ -281386,14 +281379,7 @@ var Node$13 = class Node$14 {
|
|
|
281386
281379
|
else
|
|
281387
281380
|
newTr.step(step2);
|
|
281388
281381
|
});
|
|
281389
|
-
|
|
281390
|
-
newTr.setMeta("inputType", tr.getMeta("inputType"));
|
|
281391
|
-
if (tr.getMeta("uiEvent"))
|
|
281392
|
-
newTr.setMeta("uiEvent", tr.getMeta("uiEvent"));
|
|
281393
|
-
if (tr.getMeta("composition") !== undefined)
|
|
281394
|
-
newTr.setMeta("composition", tr.getMeta("composition"));
|
|
281395
|
-
if (tr.getMeta("addToHistory") !== undefined)
|
|
281396
|
-
newTr.setMeta("addToHistory", tr.getMeta("addToHistory"));
|
|
281382
|
+
copyPassthroughMeta(tr, newTr);
|
|
281397
281383
|
mergeTrackChangesMeta(newTr, { pendingDeadKeyPlaceholder: getPendingDeadKeyPlaceholder({
|
|
281398
281384
|
tr,
|
|
281399
281385
|
newTr,
|
|
@@ -285380,7 +285366,7 @@ var Node$13 = class Node$14 {
|
|
|
285380
285366
|
disabled: role !== "editor",
|
|
285381
285367
|
attributes: {
|
|
285382
285368
|
dropdownPosition: "right",
|
|
285383
|
-
className: "toolbar-item--doc-mode",
|
|
285369
|
+
className: "sd-toolbar-item--doc-mode",
|
|
285384
285370
|
ariaLabel: "Document mode"
|
|
285385
285371
|
},
|
|
285386
285372
|
options: [{
|
|
@@ -285468,7 +285454,7 @@ var Node$13 = class Node$14 {
|
|
|
285468
285454
|
suppressActiveHighlight: true,
|
|
285469
285455
|
disabled: false,
|
|
285470
285456
|
attributes: {
|
|
285471
|
-
className: "toolbar-item--linked-styles",
|
|
285457
|
+
className: "sd-toolbar-item--linked-styles",
|
|
285472
285458
|
ariaLabel: "Linked styles"
|
|
285473
285459
|
},
|
|
285474
285460
|
options: [{
|
|
@@ -285551,8 +285537,7 @@ var Node$13 = class Node$14 {
|
|
|
285551
285537
|
"clearFormatting",
|
|
285552
285538
|
"copyFormat",
|
|
285553
285539
|
"ruler",
|
|
285554
|
-
"formattingMarks"
|
|
285555
|
-
"tableOfContents"
|
|
285540
|
+
"formattingMarks"
|
|
285556
285541
|
];
|
|
285557
285542
|
const itemsToHideSM = [
|
|
285558
285543
|
"zoom",
|
|
@@ -285562,15 +285547,16 @@ var Node$13 = class Node$14 {
|
|
|
285562
285547
|
];
|
|
285563
285548
|
const shouldUseLgCompactStyles = availableWidth <= RESPONSIVE_BREAKPOINTS.lg;
|
|
285564
285549
|
const shouldIncludeFormattingMarks = superToolbar.config?.showFormattingMarksButton === true;
|
|
285550
|
+
const shouldIncludeTableOfContents = superToolbar.config?.showTableOfContentsButton === true;
|
|
285565
285551
|
if (shouldUseLgCompactStyles)
|
|
285566
285552
|
documentMode.attributes.value = {
|
|
285567
285553
|
...documentMode.attributes.value,
|
|
285568
|
-
className: `${documentMode.attributes.value.className} toolbar-item--doc-mode-compact`
|
|
285554
|
+
className: `${documentMode.attributes.value.className} sd-toolbar-item--doc-mode-compact`
|
|
285569
285555
|
};
|
|
285570
285556
|
if (shouldUseLgCompactStyles)
|
|
285571
285557
|
linkedStyles.attributes.value = {
|
|
285572
285558
|
...linkedStyles.attributes.value,
|
|
285573
|
-
className: `${linkedStyles.attributes.value.className} toolbar-item--linked-styles-compact`
|
|
285559
|
+
className: `${linkedStyles.attributes.value.className} sd-toolbar-item--linked-styles-compact`
|
|
285574
285560
|
};
|
|
285575
285561
|
let toolbarItems = [
|
|
285576
285562
|
undo$2,
|
|
@@ -285591,7 +285577,7 @@ var Node$13 = class Node$14 {
|
|
|
285591
285577
|
separator,
|
|
285592
285578
|
link2,
|
|
285593
285579
|
image2,
|
|
285594
|
-
tableOfContents,
|
|
285580
|
+
...shouldIncludeTableOfContents ? [tableOfContents] : [],
|
|
285595
285581
|
tableItem,
|
|
285596
285582
|
tableActionsItem,
|
|
285597
285583
|
separator,
|
|
@@ -286512,7 +286498,7 @@ var Node$13 = class Node$14 {
|
|
|
286512
286498
|
domAvailabilityCache = false;
|
|
286513
286499
|
return false;
|
|
286514
286500
|
}
|
|
286515
|
-
}, summaryVersion = "1.
|
|
286501
|
+
}, summaryVersion = "1.38.0", nodeKeys, markKeys, transformListsInCopiedContent = (html3) => {
|
|
286516
286502
|
const container = document.createElement("div");
|
|
286517
286503
|
container.innerHTML = html3;
|
|
286518
286504
|
const result = [];
|
|
@@ -287697,7 +287683,7 @@ var Node$13 = class Node$14 {
|
|
|
287697
287683
|
return () => {};
|
|
287698
287684
|
const handle3 = setInterval(callback, intervalMs);
|
|
287699
287685
|
return () => clearInterval(handle3);
|
|
287700
|
-
}, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.
|
|
287686
|
+
}, HISTORY_UNSAFE_OPS, CANONICAL_COMMENT_IGNORED_KEYS, INITIAL_HASH, ROUND_CONSTANTS, V1_COVERAGE, V2_COVERAGE, SNAPSHOT_VERSION_V2 = "sd-diff-snapshot/v2", PAYLOAD_VERSION_V1 = "sd-diff-payload/v1", PAYLOAD_VERSION_V2 = "sd-diff-payload/v2", ENGINE_ID = "super-editor", STAGED_CONVERTER_KEYS, DiffServiceError, TC_LEVEL_MIN = 1, TC_LEVEL_MAX = 9, ALLOWED_WRAP_ATTRS, WRAP_TYPES_SUPPORTING_SIDE, WRAP_TYPES_SUPPORTING_DISTANCES, RELATIVE_HEIGHT_MIN = 0, RELATIVE_HEIGHT_MAX = 4294967295, FORBIDDEN_RAW_PATCH_NAMES, CONTROL_TYPE_SDT_PR_ELEMENTS, DEFAULT_CHECKBOX_SYMBOL_FONT2 = "MS Gothic", DEFAULT_CHECKBOX_CHECKED_HEX2 = "2612", DEFAULT_CHECKBOX_UNCHECKED_HEX2 = "2610", VARIANT_ORDER, KIND_ORDER, HEADER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header", FOOTER_RELATIONSHIP_TYPE3 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer", DOCUMENT_RELS_PATH2 = "word/_rels/document.xml.rels", HEADER_FILE_PATTERN2, FOOTER_FILE_PATTERN2, SPECIAL_NOTE_TYPES, BOOKMARK_SCAN_REVISION_PREFIX = "bookmark-scan:", import_lib4, CUSTOM_XML_DATA_RELATIONSHIP_TYPE = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml", CUSTOM_XML_PROPS_RELATIONSHIP_TYPE2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps", CUSTOM_XML_DATASTORE_NAMESPACE = "http://schemas.openxmlformats.org/officeDocument/2006/customXml", SETTINGS_PART, RESTART_POLICY_TO_OOXML, VALID_DISPLAYS, REFERENCE_BLOCK_PREFIX, CAPTION_STYLE_NAMES, CAPTION_PARAGRAPH_STYLE_ID = "Caption", CAPTION_FORMAT_TO_OOXML, DOCUMENT_STAT_FIELD_TYPES, TOA_LEADER_REVERSE_MAP, EDGE_NODE_TYPES, CONTENT_TYPES_PART_ID = "[Content_Types].xml", CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types", contentTypesPartDescriptor, empty_exports, init_empty, CURRENT_APP_VERSION2 = "1.38.0", PIXELS_PER_INCH2 = 96, MAX_HEIGHT_BUFFER_PX = 50, MAX_WIDTH_BUFFER_PX = 20, TRACKED_REVIEW_MARK_NAMES2, isTrackedReviewMark = (mark2) => Boolean(mark2?.type?.name && TRACKED_REVIEW_MARK_NAMES2.has(mark2.type.name)), trackedReviewMarkKey = (mark2) => {
|
|
287701
287687
|
if (!isTrackedReviewMark(mark2))
|
|
287702
287688
|
return null;
|
|
287703
287689
|
const id2 = typeof mark2.attrs?.id === "string" ? mark2.attrs.id : "";
|
|
@@ -308429,13 +308415,13 @@ menclose::after {
|
|
|
308429
308415
|
return;
|
|
308430
308416
|
console.log(...args$1);
|
|
308431
308417
|
}, HEADER_FOOTER_INIT_BUDGET_MS = 200, MAX_ZOOM_WARNING_THRESHOLD = 10, MAX_SELECTION_RECTS_PER_USER = 100, SEMANTIC_RESIZE_DEBOUNCE_MS = 120, MIN_SEMANTIC_CONTENT_WIDTH_PX = 1, GLOBAL_PERFORMANCE, PresentationEditor, ICONS, TEXTS, tableActionsOptions, TRACKED_MARK_NAMES;
|
|
308432
|
-
var
|
|
308418
|
+
var init_src_GT3sTaEO_es = __esm(() => {
|
|
308433
308419
|
init_rolldown_runtime_Bg48TavK_es();
|
|
308434
|
-
|
|
308420
|
+
init_SuperConverter_CQg2Zq8Z_es();
|
|
308435
308421
|
init_jszip_C49i9kUs_es();
|
|
308436
308422
|
init_xml_js_CqGKpaft_es();
|
|
308437
308423
|
init_uuid_qzgm05fK_es();
|
|
308438
|
-
|
|
308424
|
+
init_create_headless_toolbar_BjHgBUHt_es();
|
|
308439
308425
|
init_constants_D_X7xF4s_es();
|
|
308440
308426
|
init_dist_B8HfvhaK_es();
|
|
308441
308427
|
init_unified_Dsuw2be5_es();
|
|
@@ -325420,6 +325406,26 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
325420
325406
|
["~", "̃"],
|
|
325421
325407
|
["¨", "̈"]
|
|
325422
325408
|
]);
|
|
325409
|
+
TRACKABLE_META_KEYS = [
|
|
325410
|
+
"inputType",
|
|
325411
|
+
"uiEvent",
|
|
325412
|
+
"paste",
|
|
325413
|
+
"pointer",
|
|
325414
|
+
"composition",
|
|
325415
|
+
"superdocSlicePaste",
|
|
325416
|
+
"forceTrackChanges",
|
|
325417
|
+
"protectTrackedReviewState"
|
|
325418
|
+
];
|
|
325419
|
+
PASSTHROUGH_META_KEYS = [
|
|
325420
|
+
"inputType",
|
|
325421
|
+
"uiEvent",
|
|
325422
|
+
"paste",
|
|
325423
|
+
"pointer",
|
|
325424
|
+
"composition",
|
|
325425
|
+
"addToHistory",
|
|
325426
|
+
"superdocSlicePaste"
|
|
325427
|
+
];
|
|
325428
|
+
ALLOWED_META_KEYS = new Set([...TRACKABLE_META_KEYS, ySyncPluginKey.key]);
|
|
325423
325429
|
TrackFormat = Mark3.create({
|
|
325424
325430
|
name: TrackFormatMarkName,
|
|
325425
325431
|
group: "track",
|
|
@@ -326154,12 +326160,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326154
326160
|
onMouseenter: ($event) => activeUserIndex.value = index2,
|
|
326155
326161
|
onMouseleave: _cache[0] || (_cache[0] = ($event) => activeUserIndex.value = null),
|
|
326156
326162
|
key: user.email,
|
|
326157
|
-
class: exports_vue.normalizeClass(["user-row", { selected: activeUserIndex.value === index2 }])
|
|
326163
|
+
class: exports_vue.normalizeClass(["user-row", { "sd-selected": activeUserIndex.value === index2 }])
|
|
326158
326164
|
}, [user.name ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_2$17, [user.name ? (exports_vue.openBlock(), exports_vue.createElementBlock("span", _hoisted_3$13, exports_vue.toDisplayString(user.name), 1)) : exports_vue.createCommentVNode("", true), user.name && user.email ? (exports_vue.openBlock(), exports_vue.createElementBlock("span", _hoisted_4$9, " (" + exports_vue.toDisplayString(user.email) + ")", 1)) : exports_vue.createCommentVNode("", true)])) : (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_5$7, [exports_vue.createElementVNode("span", null, exports_vue.toDisplayString(user.email), 1)]))], 42, _hoisted_1$22);
|
|
326159
326165
|
}), 128))], 544);
|
|
326160
326166
|
};
|
|
326161
326167
|
}
|
|
326162
|
-
}, [["__scopeId", "data-v-
|
|
326168
|
+
}, [["__scopeId", "data-v-b9684aad"]]);
|
|
326163
326169
|
popoverPluginKey = new PluginKey("popoverPlugin");
|
|
326164
326170
|
PopoverPlugin = Extension.create({
|
|
326165
326171
|
name: "popoverPlugin",
|
|
@@ -326698,8 +326704,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
326698
326704
|
if (dispatch)
|
|
326699
326705
|
dispatch(tr);
|
|
326700
326706
|
const presentationEditor = editor.presentationEditor;
|
|
326701
|
-
|
|
326702
|
-
|
|
326707
|
+
const scrollOpts = {
|
|
326708
|
+
block: "center",
|
|
326709
|
+
ifNeeded: true,
|
|
326710
|
+
suppressSelectionSyncScroll: true
|
|
326711
|
+
};
|
|
326712
|
+
if (!(presentationEditor?.scrollToPosition?.(from$1, scrollOpts) ?? false)) {
|
|
326713
|
+
Promise.resolve(presentationEditor?.scrollToPositionAsync?.(from$1, scrollOpts)).catch(() => {});
|
|
326703
326714
|
const { node: node2 } = editor.view.domAtPos(from$1);
|
|
326704
326715
|
if (node2?.scrollIntoView)
|
|
326705
326716
|
node2.scrollIntoView({
|
|
@@ -327621,7 +327632,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327621
327632
|
}, null, 8, _hoisted_5$6)) : exports_vue.createCommentVNode("", true)])], 544);
|
|
327622
327633
|
};
|
|
327623
327634
|
}
|
|
327624
|
-
}, [["__scopeId", "data-v-
|
|
327635
|
+
}, [["__scopeId", "data-v-5444b0c8"]]);
|
|
327625
327636
|
isHighContrastMode = exports_vue.ref(false);
|
|
327626
327637
|
toolbarIcons = {
|
|
327627
327638
|
undo: rotate_left_solid_default,
|
|
@@ -327785,7 +327796,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327785
327796
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", { class: exports_vue.normalizeClass(["alignment-buttons", { "high-contrast": exports_vue.unref(isHighContrastMode$1) }]) }, [(exports_vue.openBlock(), exports_vue.createElementBlock(exports_vue.Fragment, null, exports_vue.renderList(alignmentButtons, (button, index2) => {
|
|
327786
327797
|
return exports_vue.createElementVNode("div", {
|
|
327787
327798
|
key: button.key,
|
|
327788
|
-
class: "button-icon",
|
|
327799
|
+
class: "sd-button-icon",
|
|
327789
327800
|
onClick: ($event) => select2(button.key),
|
|
327790
327801
|
innerHTML: button.icon,
|
|
327791
327802
|
"data-item": "btn-textAlign-option",
|
|
@@ -327799,7 +327810,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327799
327810
|
}), 64))], 2);
|
|
327800
327811
|
};
|
|
327801
327812
|
}
|
|
327802
|
-
}, [["__scopeId", "data-v-
|
|
327813
|
+
}, [["__scopeId", "data-v-ceb338e0"]]);
|
|
327803
327814
|
_hoisted_1$19 = [
|
|
327804
327815
|
"onClick",
|
|
327805
327816
|
"innerHTML",
|
|
@@ -327879,7 +327890,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327879
327890
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", { class: exports_vue.normalizeClass(["style-buttons-list", { "high-contrast": exports_vue.unref(isHighContrastMode$1) }]) }, [(exports_vue.openBlock(true), exports_vue.createElementBlock(exports_vue.Fragment, null, exports_vue.renderList(props.buttons, (button, index2) => {
|
|
327880
327891
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
327881
327892
|
key: button.key,
|
|
327882
|
-
class: exports_vue.normalizeClass(["button-icon", { selected: props.selectedStyle === button.key }]),
|
|
327893
|
+
class: exports_vue.normalizeClass(["sd-button-icon", { "sd-selected": props.selectedStyle === button.key }]),
|
|
327883
327894
|
style: exports_vue.normalizeStyle(iconStyle.value),
|
|
327884
327895
|
onClick: ($event) => select2(button.key),
|
|
327885
327896
|
innerHTML: button.icon,
|
|
@@ -327893,7 +327904,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
327893
327904
|
}), 128))], 2);
|
|
327894
327905
|
};
|
|
327895
327906
|
}
|
|
327896
|
-
}, [["__scopeId", "data-v-
|
|
327907
|
+
}, [["__scopeId", "data-v-701c1d54"]]);
|
|
327897
327908
|
bulletStyleButtons = [
|
|
327898
327909
|
{
|
|
327899
327910
|
key: "disc",
|
|
@@ -328011,7 +328022,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328011
328022
|
return (_ctx, _cache) => {
|
|
328012
328023
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", { class: exports_vue.normalizeClass(["document-mode", { "high-contrast": exports_vue.unref(isHighContrastMode$1) }]) }, [(exports_vue.openBlock(true), exports_vue.createElementBlock(exports_vue.Fragment, null, exports_vue.renderList(__props.options, (option, index2) => {
|
|
328013
328024
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
328014
|
-
class: exports_vue.normalizeClass(["option-item", { disabled: option.disabled }]),
|
|
328025
|
+
class: exports_vue.normalizeClass(["sd-option-item", { "sd-disabled": option.disabled }]),
|
|
328015
328026
|
onClick: ($event) => handleClick$1(option),
|
|
328016
328027
|
"data-item": "btn-documentMode-option",
|
|
328017
328028
|
role: "menuitem",
|
|
@@ -328026,7 +328037,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328026
328037
|
}), 256))], 2);
|
|
328027
328038
|
};
|
|
328028
328039
|
}
|
|
328029
|
-
}, [["__scopeId", "data-v-
|
|
328040
|
+
}, [["__scopeId", "data-v-abd514d9"]]);
|
|
328030
328041
|
_hoisted_1$17 = {
|
|
328031
328042
|
key: 0,
|
|
328032
328043
|
class: "linked-style-buttons",
|
|
@@ -328328,13 +328339,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328328
328339
|
type: "text",
|
|
328329
328340
|
name: "link",
|
|
328330
328341
|
placeholder: "Type or paste a link",
|
|
328331
|
-
class: exports_vue.normalizeClass({ error: urlError.value }),
|
|
328342
|
+
class: exports_vue.normalizeClass({ "sd-error": urlError.value }),
|
|
328332
328343
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => rawUrl.value = $event),
|
|
328333
328344
|
readonly: isViewingMode.value,
|
|
328334
328345
|
onKeydown: [exports_vue.withKeys(exports_vue.withModifiers(handleSubmit, ["stop", "prevent"]), ["enter"]), _cache[3] || (_cache[3] = ($event) => urlError.value = false)]
|
|
328335
328346
|
}, null, 42, _hoisted_10$1), [[exports_vue.vModelText, rawUrl.value]]),
|
|
328336
328347
|
exports_vue.createElementVNode("div", {
|
|
328337
|
-
class: exports_vue.normalizeClass(["open-link-icon", { disabled: !validUrl.value }]),
|
|
328348
|
+
class: exports_vue.normalizeClass(["open-link-icon", { "sd-disabled": !validUrl.value }]),
|
|
328338
328349
|
innerHTML: exports_vue.unref(toolbarIcons).openLink,
|
|
328339
328350
|
onClick: openLink,
|
|
328340
328351
|
"data-item": "btn-link-open"
|
|
@@ -328349,14 +328360,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328349
328360
|
class: "remove-btn__icon",
|
|
328350
328361
|
innerHTML: exports_vue.unref(toolbarIcons).removeLink
|
|
328351
328362
|
}, null, 8, _hoisted_13), _cache[6] || (_cache[6] = exports_vue.createTextVNode(" Remove ", -1))])) : exports_vue.createCommentVNode("", true), exports_vue.createElementVNode("button", {
|
|
328352
|
-
class: exports_vue.normalizeClass(["submit-btn", { "disable-btn": isDisabled.value }]),
|
|
328363
|
+
class: exports_vue.normalizeClass(["sd-submit-btn", { "disable-btn": isDisabled.value }]),
|
|
328353
328364
|
onClick: handleSubmit,
|
|
328354
328365
|
"data-item": "btn-link-apply"
|
|
328355
328366
|
}, " Apply ", 2)])) : exports_vue.createCommentVNode("", true)
|
|
328356
328367
|
])) : isAnchor.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_14, [exports_vue.createElementVNode("a", { onClick: _cache[4] || (_cache[4] = exports_vue.withModifiers(($event) => navigateToAnchor(rawUrl.value), ["stop", "prevent"])) }, "Go to " + exports_vue.toDisplayString(rawUrl.value.startsWith("#_") ? rawUrl.value.substring(2) : rawUrl.value), 1)])) : exports_vue.createCommentVNode("", true)], 2);
|
|
328357
328368
|
};
|
|
328358
328369
|
}
|
|
328359
|
-
}, [["__scopeId", "data-v-
|
|
328370
|
+
}, [["__scopeId", "data-v-c490d677"]]);
|
|
328360
328371
|
_hoisted_1$15 = [
|
|
328361
328372
|
"aria-label",
|
|
328362
328373
|
"onClick",
|
|
@@ -328463,7 +328474,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328463
328474
|
return (_ctx, _cache) => {
|
|
328464
328475
|
return exports_vue.openBlock(true), exports_vue.createElementBlock(exports_vue.Fragment, null, exports_vue.renderList(__props.icons, (row2, rowIndex) => {
|
|
328465
328476
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
328466
|
-
class: "option-row",
|
|
328477
|
+
class: "sd-option-row",
|
|
328467
328478
|
key: rowIndex,
|
|
328468
328479
|
role: "group",
|
|
328469
328480
|
ref_for: true,
|
|
@@ -328471,7 +328482,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328471
328482
|
ref: rowRefs
|
|
328472
328483
|
}, [(exports_vue.openBlock(true), exports_vue.createElementBlock(exports_vue.Fragment, null, exports_vue.renderList(row2, (option, optionIndex) => {
|
|
328473
328484
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
328474
|
-
class: "option",
|
|
328485
|
+
class: "sd-option",
|
|
328475
328486
|
key: optionIndex,
|
|
328476
328487
|
"aria-label": option.label,
|
|
328477
328488
|
role: "menuitem",
|
|
@@ -328481,12 +328492,12 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328481
328492
|
onClick: exports_vue.withModifiers(($event) => handleClick$1(option), ["stop", "prevent"]),
|
|
328482
328493
|
onKeydown: exports_vue.withModifiers((event) => handleKeyDown$1(event, rowIndex, optionIndex, option), ["prevent"])
|
|
328483
328494
|
}, [exports_vue.createElementVNode("div", {
|
|
328484
|
-
class: "option__icon",
|
|
328495
|
+
class: "sd-option__icon",
|
|
328485
328496
|
innerHTML: option.icon,
|
|
328486
328497
|
style: exports_vue.normalizeStyle(option.style)
|
|
328487
328498
|
}, null, 12, _hoisted_2$12), isActive$1.value(option) ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
328488
328499
|
key: 0,
|
|
328489
|
-
class: "option__check",
|
|
328500
|
+
class: "sd-option__check",
|
|
328490
328501
|
innerHTML: exports_vue.unref(toolbarIcons).colorOptionCheck,
|
|
328491
328502
|
style: exports_vue.normalizeStyle(getCheckStyle(option.value, optionIndex))
|
|
328492
328503
|
}, null, 12, _hoisted_3$9)) : exports_vue.createCommentVNode("", true)], 40, _hoisted_1$15);
|
|
@@ -328494,7 +328505,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328494
328505
|
}), 128);
|
|
328495
328506
|
};
|
|
328496
328507
|
}
|
|
328497
|
-
}, [["__scopeId", "data-v-
|
|
328508
|
+
}, [["__scopeId", "data-v-30cad300"]]);
|
|
328498
328509
|
_hoisted_1$14 = { class: "options-grid-wrap" };
|
|
328499
328510
|
_hoisted_2$11 = ["innerHTML"];
|
|
328500
328511
|
_hoisted_3$8 = { class: "option-grid-ctn" };
|
|
@@ -328650,9 +328661,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328650
328661
|
let itemsCols = parseInt(item.dataset.cols, 10);
|
|
328651
328662
|
let itemsRows = parseInt(item.dataset.rows, 10);
|
|
328652
328663
|
if (itemsCols <= cols && itemsRows <= rows)
|
|
328653
|
-
item.classList.add("selected");
|
|
328664
|
+
item.classList.add("sd-selected");
|
|
328654
328665
|
else
|
|
328655
|
-
item.classList.remove("selected");
|
|
328666
|
+
item.classList.remove("sd-selected");
|
|
328656
328667
|
}
|
|
328657
328668
|
};
|
|
328658
328669
|
const handleClick$1 = ({ cols, rows }) => {
|
|
@@ -328745,7 +328756,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328745
328756
|
}, exports_vue.toDisplayString(selectedRows.value) + " x " + exports_vue.toDisplayString(selectedCols.value), 9, _hoisted_2$10)], 2);
|
|
328746
328757
|
};
|
|
328747
328758
|
}
|
|
328748
|
-
}, [["__scopeId", "data-v-
|
|
328759
|
+
}, [["__scopeId", "data-v-168b91ce"]]);
|
|
328749
328760
|
_hoisted_1$12 = { class: "toolbar-table-actions" };
|
|
328750
328761
|
_hoisted_2$9 = [
|
|
328751
328762
|
"onClick",
|
|
@@ -328781,7 +328792,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328781
328792
|
}
|
|
328782
328793
|
}, [["__scopeId", "data-v-652015c8"]]);
|
|
328783
328794
|
_hoisted_1$11 = { class: "search-input-ctn" };
|
|
328784
|
-
_hoisted_2$8 = { class: "row" };
|
|
328795
|
+
_hoisted_2$8 = { class: "sd-row" };
|
|
328785
328796
|
_hoisted_3$6 = ["onKeydown"];
|
|
328786
328797
|
SearchInput_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
328787
328798
|
__name: "SearchInput",
|
|
@@ -328802,13 +328813,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328802
328813
|
name: "search",
|
|
328803
328814
|
placeholder: "Type search string",
|
|
328804
328815
|
onKeydown: exports_vue.withKeys(exports_vue.withModifiers(handleSubmit, ["stop", "prevent"]), ["enter"])
|
|
328805
|
-
}, null, 40, _hoisted_3$6), [[exports_vue.vModelText, searchValue.value]])]), exports_vue.createElementVNode("div", { class: "row submit" }, [exports_vue.createElementVNode("button", {
|
|
328806
|
-
class: "submit-btn",
|
|
328816
|
+
}, null, 40, _hoisted_3$6), [[exports_vue.vModelText, searchValue.value]])]), exports_vue.createElementVNode("div", { class: "sd-row sd-submit" }, [exports_vue.createElementVNode("button", {
|
|
328817
|
+
class: "sd-submit-btn",
|
|
328807
328818
|
onClick: handleSubmit
|
|
328808
328819
|
}, "Apply")])]);
|
|
328809
328820
|
};
|
|
328810
328821
|
}
|
|
328811
|
-
}, [["__scopeId", "data-v-
|
|
328822
|
+
}, [["__scopeId", "data-v-d25821a5"]]);
|
|
328812
328823
|
TOOLBAR_FONTS = [
|
|
328813
328824
|
{
|
|
328814
328825
|
label: "Georgia",
|
|
@@ -328975,7 +328986,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
328975
328986
|
HEADLESS_TOOLBAR_COMMANDS = [...new Set([...Object.values(HEADLESS_ITEM_MAP), ...TABLE_ACTION_COMMAND_IDS])];
|
|
328976
328987
|
NON_HEADLESS_EXECUTE_ITEM_NAMES = new Set(["link"]);
|
|
328977
328988
|
HEADLESS_EXECUTE_ITEMS = new Set(Object.keys(HEADLESS_ITEM_MAP).filter((itemName) => !NON_HEADLESS_EXECUTE_ITEM_NAMES.has(itemName)));
|
|
328978
|
-
_hoisted_1$10 = { class: "toolbar-icon" };
|
|
328989
|
+
_hoisted_1$10 = { class: "sd-toolbar-icon" };
|
|
328979
328990
|
_hoisted_2$7 = ["innerHTML"];
|
|
328980
328991
|
ToolbarButtonIcon_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
328981
328992
|
__name: "ToolbarButtonIcon",
|
|
@@ -329006,7 +329017,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329006
329017
|
});
|
|
329007
329018
|
return (_ctx, _cache) => {
|
|
329008
329019
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_1$10, [exports_vue.createElementVNode("div", {
|
|
329009
|
-
class: exports_vue.normalizeClass(["toolbar-icon__icon", [`toolbar-icon__icon--${props.name}`]]),
|
|
329020
|
+
class: exports_vue.normalizeClass(["sd-toolbar-icon__icon", [`sd-toolbar-icon__icon--${props.name}`]]),
|
|
329010
329021
|
innerHTML: __props.icon
|
|
329011
329022
|
}, null, 10, _hoisted_2$7), hasColorBar.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
329012
329023
|
key: 0,
|
|
@@ -329015,19 +329026,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329015
329026
|
}, null, 4)) : exports_vue.createCommentVNode("", true)]);
|
|
329016
329027
|
};
|
|
329017
329028
|
}
|
|
329018
|
-
}, [["__scopeId", "data-v-
|
|
329029
|
+
}, [["__scopeId", "data-v-521c3d93"]]);
|
|
329019
329030
|
_hoisted_1$9 = ["role", "aria-label"];
|
|
329020
329031
|
_hoisted_2$6 = ["data-item"];
|
|
329021
329032
|
_hoisted_3$5 = ["data-item"];
|
|
329022
329033
|
_hoisted_4$4 = {
|
|
329023
329034
|
key: 1,
|
|
329024
|
-
class: "button-label"
|
|
329035
|
+
class: "sd-button-label"
|
|
329025
329036
|
};
|
|
329026
329037
|
_hoisted_5$2 = ["data-item", "aria-label"];
|
|
329027
329038
|
_hoisted_6$1 = ["innerHTML"];
|
|
329028
329039
|
_hoisted_7$1 = {
|
|
329029
329040
|
key: 1,
|
|
329030
|
-
class: "button-label"
|
|
329041
|
+
class: "sd-button-label"
|
|
329031
329042
|
};
|
|
329032
329043
|
_hoisted_8 = { key: 2 };
|
|
329033
329044
|
_hoisted_9 = ["onKeydown", "id"];
|
|
@@ -329039,7 +329050,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329039
329050
|
_hoisted_11 = ["innerHTML"];
|
|
329040
329051
|
_hoisted_12 = {
|
|
329041
329052
|
"aria-live": "polite",
|
|
329042
|
-
class: "visually-hidden"
|
|
329053
|
+
class: "sd-visually-hidden"
|
|
329043
329054
|
};
|
|
329044
329055
|
ToolbarButton_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
329045
329056
|
__name: "ToolbarButton",
|
|
@@ -329137,17 +329148,18 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329137
329148
|
});
|
|
329138
329149
|
return (_ctx, _cache) => {
|
|
329139
329150
|
return exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
329140
|
-
class: exports_vue.normalizeClass(["toolbar-item", exports_vue.unref(attributes).className]),
|
|
329151
|
+
class: exports_vue.normalizeClass(["sd-toolbar-item", exports_vue.unref(attributes).className]),
|
|
329141
329152
|
style: exports_vue.normalizeStyle(getStyle.value),
|
|
329142
329153
|
role: __props.isOverflowItem ? "menuitem" : "button",
|
|
329143
329154
|
"aria-label": exports_vue.unref(attributes).ariaLabel,
|
|
329155
|
+
"data-sd-part": "toolbar-item",
|
|
329144
329156
|
onClick: handleOuterClick,
|
|
329145
329157
|
onKeydown: _cache[3] || (_cache[3] = exports_vue.withKeys(($event) => onEnterKeydown($event), ["enter"])),
|
|
329146
329158
|
tabindex: "0"
|
|
329147
329159
|
}, [exports_vue.createElementVNode("div", {
|
|
329148
|
-
class: exports_vue.normalizeClass(["toolbar-button", {
|
|
329149
|
-
active: exports_vue.unref(active),
|
|
329150
|
-
disabled: exports_vue.unref(disabled),
|
|
329160
|
+
class: exports_vue.normalizeClass(["sd-toolbar-button", {
|
|
329161
|
+
"sd-active": exports_vue.unref(active),
|
|
329162
|
+
"sd-disabled": exports_vue.unref(disabled),
|
|
329151
329163
|
narrow: __props.isNarrow,
|
|
329152
329164
|
wide: __props.isWide,
|
|
329153
329165
|
split: isSplit.value,
|
|
@@ -329158,13 +329170,13 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329158
329170
|
}, [
|
|
329159
329171
|
isSplit.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
329160
329172
|
key: 0,
|
|
329161
|
-
class: "toolbar-button__main",
|
|
329173
|
+
class: "sd-toolbar-button__main",
|
|
329162
329174
|
"data-item": `btn-${exports_vue.unref(name) || ""}-main`,
|
|
329163
329175
|
onClick: _cache[0] || (_cache[0] = ($event) => handleSplitMainClick($event))
|
|
329164
329176
|
}, [exports_vue.unref(icon) ? (exports_vue.openBlock(), exports_vue.createBlock(ToolbarButtonIcon_default, {
|
|
329165
329177
|
key: 0,
|
|
329166
329178
|
color: exports_vue.unref(iconColor),
|
|
329167
|
-
class: "toolbar-icon",
|
|
329179
|
+
class: "sd-toolbar-icon",
|
|
329168
329180
|
icon: exports_vue.unref(icon),
|
|
329169
329181
|
name: exports_vue.unref(name)
|
|
329170
329182
|
}, null, 8, [
|
|
@@ -329174,19 +329186,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329174
329186
|
])) : exports_vue.createCommentVNode("", true), exports_vue.unref(label) && !exports_vue.unref(hideLabel) && !exports_vue.unref(inlineTextInputVisible) ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", _hoisted_4$4, exports_vue.toDisplayString(exports_vue.unref(label)), 1)) : exports_vue.createCommentVNode("", true)], 8, _hoisted_3$5)) : exports_vue.createCommentVNode("", true),
|
|
329175
329187
|
isSplit.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
329176
329188
|
key: 1,
|
|
329177
|
-
class: "toolbar-button__caret",
|
|
329189
|
+
class: "sd-toolbar-button__caret",
|
|
329178
329190
|
"data-item": `btn-${exports_vue.unref(name) || ""}-caret`,
|
|
329179
329191
|
"aria-label": `${exports_vue.unref(attributes).ariaLabel} options`,
|
|
329180
329192
|
role: "button"
|
|
329181
329193
|
}, [exports_vue.createElementVNode("div", {
|
|
329182
|
-
class: "dropdown-caret",
|
|
329194
|
+
class: "sd-dropdown-caret",
|
|
329183
329195
|
innerHTML: caretIcon.value,
|
|
329184
329196
|
style: exports_vue.normalizeStyle({ opacity: exports_vue.unref(disabled) ? 0.6 : 1 })
|
|
329185
329197
|
}, null, 12, _hoisted_6$1)], 8, _hoisted_5$2)) : (exports_vue.openBlock(), exports_vue.createElementBlock(exports_vue.Fragment, { key: 2 }, [
|
|
329186
329198
|
exports_vue.unref(icon) ? (exports_vue.openBlock(), exports_vue.createBlock(ToolbarButtonIcon_default, {
|
|
329187
329199
|
key: 0,
|
|
329188
329200
|
color: exports_vue.unref(iconColor),
|
|
329189
|
-
class: "toolbar-icon",
|
|
329201
|
+
class: "sd-toolbar-icon",
|
|
329190
329202
|
icon: exports_vue.unref(icon),
|
|
329191
329203
|
name: exports_vue.unref(name)
|
|
329192
329204
|
}, null, 8, [
|
|
@@ -329219,7 +329231,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329219
329231
|
}, null, 40, _hoisted_10)), [[exports_vue.vModelText, inlineTextInput.value]])])) : exports_vue.createCommentVNode("", true),
|
|
329220
329232
|
exports_vue.unref(hasCaret) ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", {
|
|
329221
329233
|
key: 3,
|
|
329222
|
-
class: "dropdown-caret",
|
|
329234
|
+
class: "sd-dropdown-caret",
|
|
329223
329235
|
innerHTML: caretIcon.value,
|
|
329224
329236
|
style: exports_vue.normalizeStyle({ opacity: exports_vue.unref(disabled) ? 0.6 : 1 })
|
|
329225
329237
|
}, null, 12, _hoisted_11)) : exports_vue.createCommentVNode("", true)
|
|
@@ -329228,7 +329240,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329228
329240
|
], 10, _hoisted_2$6)], 46, _hoisted_1$9);
|
|
329229
329241
|
};
|
|
329230
329242
|
}
|
|
329231
|
-
}, [["__scopeId", "data-v-
|
|
329243
|
+
}, [["__scopeId", "data-v-360f6a95"]]);
|
|
329232
329244
|
_hoisted_1$8 = {
|
|
329233
329245
|
class: "toolbar-separator",
|
|
329234
329246
|
role: "separator",
|
|
@@ -329465,11 +329477,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329465
329477
|
if (!value)
|
|
329466
329478
|
return false;
|
|
329467
329479
|
if (typeof value === "string")
|
|
329468
|
-
return value.split(/\s+/).includes("selected");
|
|
329480
|
+
return value.split(/\s+/).includes("sd-selected");
|
|
329469
329481
|
if (Array.isArray(value))
|
|
329470
329482
|
return value.some(classHasSelected);
|
|
329471
329483
|
if (typeof value === "object")
|
|
329472
|
-
return Boolean(value
|
|
329484
|
+
return Boolean(value["sd-selected"]);
|
|
329473
329485
|
return false;
|
|
329474
329486
|
};
|
|
329475
329487
|
const isOptionSelected = (option) => {
|
|
@@ -329660,12 +329672,14 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329660
329672
|
ref_key: "triggerRef",
|
|
329661
329673
|
ref: triggerRef,
|
|
329662
329674
|
class: "toolbar-dropdown-trigger",
|
|
329675
|
+
"data-sd-part": "dropdown-trigger",
|
|
329663
329676
|
onClick: onTriggerClick
|
|
329664
329677
|
}, [exports_vue.renderSlot(_ctx.$slots, "trigger", {}, undefined, true)], 512), (exports_vue.openBlock(), exports_vue.createBlock(exports_vue.Teleport, { to: "body" }, [exports_vue.createVNode(exports_vue.Transition, { name: "fade-in-scale-up-transition" }, {
|
|
329665
329678
|
default: exports_vue.withCtx(() => [isOpen.value ? (exports_vue.openBlock(), exports_vue.createElementBlock("div", exports_vue.mergeProps({
|
|
329666
329679
|
key: 0,
|
|
329667
329680
|
ref_key: "menuRef",
|
|
329668
329681
|
ref: menuRef,
|
|
329682
|
+
"data-sd-part": "dropdown-menu",
|
|
329669
329683
|
class: mergedMenuClass.value,
|
|
329670
329684
|
style: menuStyle.value
|
|
329671
329685
|
}, computedMenuAttrs.value), [(exports_vue.openBlock(true), exports_vue.createElementBlock(exports_vue.Fragment, null, exports_vue.renderList(__props.options, (option, index2) => {
|
|
@@ -329677,8 +329691,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329677
329691
|
option.class,
|
|
329678
329692
|
option.props?.class,
|
|
329679
329693
|
{
|
|
329680
|
-
disabled: option.disabled,
|
|
329681
|
-
render: isRenderOption(option)
|
|
329694
|
+
"sd-disabled": option.disabled,
|
|
329695
|
+
"sd-render": isRenderOption(option)
|
|
329682
329696
|
}
|
|
329683
329697
|
]],
|
|
329684
329698
|
tabindex: "-1",
|
|
@@ -329695,7 +329709,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
329695
329709
|
})]))]);
|
|
329696
329710
|
};
|
|
329697
329711
|
}
|
|
329698
|
-
}, [["__scopeId", "data-v-
|
|
329712
|
+
}, [["__scopeId", "data-v-302f7d86"]]);
|
|
329699
329713
|
SdTooltip_default = /* @__PURE__ */ __plugin_vue_export_helper_default(/* @__PURE__ */ Object.assign({ inheritAttrs: false }, {
|
|
329700
329714
|
__name: "SdTooltip",
|
|
329701
329715
|
props: {
|
|
@@ -330046,7 +330060,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330046
330060
|
...option,
|
|
330047
330061
|
props: {
|
|
330048
330062
|
...option.props,
|
|
330049
|
-
class: isSelected ? "selected" : ""
|
|
330063
|
+
class: isSelected ? "sd-selected" : ""
|
|
330050
330064
|
}
|
|
330051
330065
|
};
|
|
330052
330066
|
});
|
|
@@ -330059,7 +330073,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330059
330073
|
};
|
|
330060
330074
|
const moveToNextButton = (e) => {
|
|
330061
330075
|
const currentButton = e.target;
|
|
330062
|
-
const nextButton = e.target.closest(".toolbar-item-ctn").nextElementSibling;
|
|
330076
|
+
const nextButton = e.target.closest(".sd-toolbar-item-ctn").nextElementSibling;
|
|
330063
330077
|
if (nextButton) {
|
|
330064
330078
|
currentButton.setAttribute("tabindex", "-1");
|
|
330065
330079
|
nextButton.setAttribute("tabindex", "0");
|
|
@@ -330068,7 +330082,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330068
330082
|
};
|
|
330069
330083
|
const moveToPreviousButton = (e) => {
|
|
330070
330084
|
const currentButton = e.target;
|
|
330071
|
-
const previousButton = e.target.closest(".toolbar-item-ctn").previousElementSibling;
|
|
330085
|
+
const previousButton = e.target.closest(".sd-toolbar-item-ctn").previousElementSibling;
|
|
330072
330086
|
if (previousButton) {
|
|
330073
330087
|
currentButton.setAttribute("tabindex", "-1");
|
|
330074
330088
|
previousButton.setAttribute("tabindex", "0");
|
|
@@ -330146,7 +330160,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330146
330160
|
}
|
|
330147
330161
|
};
|
|
330148
330162
|
const handleFocus = (e) => {
|
|
330149
|
-
const firstButton = toolbarItemRefs.value.find((item) => !item.classList.contains("disabled"));
|
|
330163
|
+
const firstButton = toolbarItemRefs.value.find((item) => !item.classList.contains("sd-disabled"));
|
|
330150
330164
|
if (firstButton) {
|
|
330151
330165
|
firstButton.setAttribute("tabindex", "0");
|
|
330152
330166
|
firstButton.focus();
|
|
@@ -330202,8 +330216,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330202
330216
|
class: exports_vue.normalizeClass([{
|
|
330203
330217
|
narrow: item.isNarrow.value,
|
|
330204
330218
|
wide: item.isWide.value,
|
|
330205
|
-
disabled: item.disabled.value
|
|
330206
|
-
}, "toolbar-item-ctn"]),
|
|
330219
|
+
"sd-disabled": item.disabled.value
|
|
330220
|
+
}, "sd-toolbar-item-ctn"]),
|
|
330207
330221
|
onKeydown: (e) => handleKeyDown$1(e, item),
|
|
330208
330222
|
ref_for: true,
|
|
330209
330223
|
ref_key: "toolbarItemRefs",
|
|
@@ -330222,7 +330236,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330222
330236
|
show: getExpanded(item),
|
|
330223
330237
|
"content-style": { fontFamily: props.uiFontFamily },
|
|
330224
330238
|
placement: "bottom-start",
|
|
330225
|
-
class: "toolbar-button sd-editor-toolbar-dropdown",
|
|
330239
|
+
class: "sd-toolbar-button sd-editor-toolbar-dropdown",
|
|
330226
330240
|
onSelect: (key2, option) => handleSelect(item, option),
|
|
330227
330241
|
"onUpdate:show": (open) => handleDropdownUpdateShowForItem(open, item),
|
|
330228
330242
|
style: exports_vue.normalizeStyle(item.dropdownStyles.value),
|
|
@@ -330299,7 +330313,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330299
330313
|
}), 128))], 36);
|
|
330300
330314
|
};
|
|
330301
330315
|
}
|
|
330302
|
-
}, [["__scopeId", "data-v-
|
|
330316
|
+
}, [["__scopeId", "data-v-9c3524ec"]]);
|
|
330303
330317
|
Toolbar_default = /* @__PURE__ */ __plugin_vue_export_helper_default({
|
|
330304
330318
|
__name: "Toolbar",
|
|
330305
330319
|
emits: [
|
|
@@ -330393,6 +330407,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330393
330407
|
key: exports_vue.unref(toolbarKey),
|
|
330394
330408
|
role: "toolbar",
|
|
330395
330409
|
"aria-label": "Toolbar",
|
|
330410
|
+
"data-sd-part": "toolbar",
|
|
330396
330411
|
"data-editor-ui-surface": "",
|
|
330397
330412
|
onMousedown: handleToolbarMousedown
|
|
330398
330413
|
}, [
|
|
@@ -330444,7 +330459,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330444
330459
|
], 32);
|
|
330445
330460
|
};
|
|
330446
330461
|
}
|
|
330447
|
-
}, [["__scopeId", "data-v-
|
|
330462
|
+
}, [["__scopeId", "data-v-b83d488a"]]);
|
|
330448
330463
|
toolbarTexts = {
|
|
330449
330464
|
bold: "Bold",
|
|
330450
330465
|
fontFamily: "Font",
|
|
@@ -330533,7 +330548,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
330533
330548
|
aiApiKey: null,
|
|
330534
330549
|
aiEndpoint: null,
|
|
330535
330550
|
customButtons: [],
|
|
330536
|
-
showFormattingMarksButton: false
|
|
330551
|
+
showFormattingMarksButton: false,
|
|
330552
|
+
showTableOfContentsButton: false
|
|
330537
330553
|
};
|
|
330538
330554
|
toolbarItems = [];
|
|
330539
330555
|
overflowItems = [];
|
|
@@ -336559,6 +336575,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
336559
336575
|
#isRerendering = false;
|
|
336560
336576
|
#selectionSync = new SelectionSyncCoordinator;
|
|
336561
336577
|
#shouldScrollSelectionIntoView = false;
|
|
336578
|
+
#suppressSelectionScrollUntilRaf = false;
|
|
336562
336579
|
#dragDropIndicatorPos = null;
|
|
336563
336580
|
#epochMapper = new EpochPositionMapper;
|
|
336564
336581
|
#layoutEpoch = 0;
|
|
@@ -338231,6 +338248,19 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338231
338248
|
}
|
|
338232
338249
|
return null;
|
|
338233
338250
|
}
|
|
338251
|
+
#isElementFullyVisibleInScrollContainer(el) {
|
|
338252
|
+
const rect = el.getBoundingClientRect();
|
|
338253
|
+
const viewport$1 = this.#scrollContainer instanceof Window ? {
|
|
338254
|
+
top: 0,
|
|
338255
|
+
bottom: this.#scrollContainer.innerHeight
|
|
338256
|
+
} : this.#scrollContainer instanceof Element ? this.#scrollContainer.getBoundingClientRect() : this.#visibleHost?.ownerDocument?.defaultView ? {
|
|
338257
|
+
top: 0,
|
|
338258
|
+
bottom: this.#visibleHost.ownerDocument.defaultView.innerHeight
|
|
338259
|
+
} : null;
|
|
338260
|
+
if (!viewport$1)
|
|
338261
|
+
return false;
|
|
338262
|
+
return rect.top >= viewport$1.top && rect.bottom <= viewport$1.bottom;
|
|
338263
|
+
}
|
|
338234
338264
|
scrollToPosition(pos, options = {}) {
|
|
338235
338265
|
if (this.#focusScrollRafId != null) {
|
|
338236
338266
|
const win = this.#visibleHost.ownerDocument?.defaultView;
|
|
@@ -338245,7 +338275,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338245
338275
|
return false;
|
|
338246
338276
|
const clampedPos = Math.max(0, Math.min(pos, doc$12.content.size));
|
|
338247
338277
|
const behavior = options.behavior ?? "auto";
|
|
338248
|
-
const
|
|
338278
|
+
const requestedBlock = options.block ?? "center";
|
|
338249
338279
|
const layout = this.#layoutState.layout;
|
|
338250
338280
|
const sessionMode = this.#headerFooterSession?.session?.mode ?? "body";
|
|
338251
338281
|
if (layout && sessionMode === "body") {
|
|
@@ -338265,7 +338295,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338265
338295
|
if (pageIndex != null) {
|
|
338266
338296
|
const pageEl = getPageElementByIndex(this.#viewportHost, pageIndex);
|
|
338267
338297
|
if (pageEl) {
|
|
338268
|
-
const
|
|
338298
|
+
const targetEl = this.#findElementAtPosition(pageEl, clampedPos);
|
|
338299
|
+
const elToScroll = targetEl ?? pageEl;
|
|
338300
|
+
const block = options.ifNeeded && targetEl && this.#isElementFullyVisibleInScrollContainer(targetEl) ? "nearest" : requestedBlock;
|
|
338269
338301
|
elToScroll.scrollIntoView({
|
|
338270
338302
|
block,
|
|
338271
338303
|
inline: "nearest",
|
|
@@ -338273,7 +338305,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338273
338305
|
});
|
|
338274
338306
|
this.#shouldScrollSelectionIntoView = false;
|
|
338275
338307
|
const win = this.#visibleHost.ownerDocument?.defaultView;
|
|
338276
|
-
if (win)
|
|
338308
|
+
if (win) {
|
|
338309
|
+
if (options.suppressSelectionSyncScroll)
|
|
338310
|
+
this.#suppressSelectionScrollUntilRaf = true;
|
|
338277
338311
|
win.requestAnimationFrame(() => {
|
|
338278
338312
|
elToScroll.scrollIntoView({
|
|
338279
338313
|
block,
|
|
@@ -338281,7 +338315,9 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338281
338315
|
behavior
|
|
338282
338316
|
});
|
|
338283
338317
|
this.#shouldScrollSelectionIntoView = false;
|
|
338318
|
+
this.#suppressSelectionScrollUntilRaf = false;
|
|
338284
338319
|
});
|
|
338320
|
+
}
|
|
338285
338321
|
return true;
|
|
338286
338322
|
}
|
|
338287
338323
|
}
|
|
@@ -338415,12 +338451,24 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338415
338451
|
console.warn(`[PresentationEditor] scrollToPositionAsync: Page ${pageIndex} failed to mount within timeout`);
|
|
338416
338452
|
return false;
|
|
338417
338453
|
}
|
|
338418
|
-
return this.scrollToPosition(pos,
|
|
338454
|
+
return this.scrollToPosition(pos, {
|
|
338455
|
+
...options,
|
|
338456
|
+
ifNeeded: false
|
|
338457
|
+
});
|
|
338419
338458
|
}
|
|
338420
338459
|
async scrollContentControlIntoView(entityId, options = {}) {
|
|
338460
|
+
const pos = this.#resolveContentControlCaretPos(entityId);
|
|
338461
|
+
if (pos == null)
|
|
338462
|
+
return false;
|
|
338463
|
+
return this.scrollToPositionAsync(pos, {
|
|
338464
|
+
behavior: options.behavior ?? "smooth",
|
|
338465
|
+
block: options.block ?? "center"
|
|
338466
|
+
});
|
|
338467
|
+
}
|
|
338468
|
+
#resolveContentControlCaretPos(entityId) {
|
|
338421
338469
|
const editor = this.#editor;
|
|
338422
338470
|
if (!editor || typeof entityId !== "string" || entityId.length === 0)
|
|
338423
|
-
return
|
|
338471
|
+
return null;
|
|
338424
338472
|
let found2 = null;
|
|
338425
338473
|
editor.state.doc.descendants((node2, pos) => {
|
|
338426
338474
|
if (found2)
|
|
@@ -338436,7 +338484,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338436
338484
|
return true;
|
|
338437
338485
|
});
|
|
338438
338486
|
if (!found2)
|
|
338439
|
-
return
|
|
338487
|
+
return null;
|
|
338440
338488
|
let contentPos = found2.pos + 1;
|
|
338441
338489
|
let textFound = false;
|
|
338442
338490
|
found2.node?.descendants((child, rel) => {
|
|
@@ -338449,10 +338497,48 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
338449
338497
|
}
|
|
338450
338498
|
return true;
|
|
338451
338499
|
});
|
|
338452
|
-
return
|
|
338500
|
+
return contentPos;
|
|
338501
|
+
}
|
|
338502
|
+
async focusContentControl(entityId, options = {}) {
|
|
338503
|
+
const editor = this.#editor;
|
|
338504
|
+
if (!editor)
|
|
338505
|
+
return {
|
|
338506
|
+
success: false,
|
|
338507
|
+
reason: "not-ready"
|
|
338508
|
+
};
|
|
338509
|
+
if (typeof entityId !== "string" || entityId.length === 0)
|
|
338510
|
+
return {
|
|
338511
|
+
success: false,
|
|
338512
|
+
reason: "invalid-id"
|
|
338513
|
+
};
|
|
338514
|
+
const pos = this.#resolveContentControlCaretPos(entityId);
|
|
338515
|
+
if (pos == null)
|
|
338516
|
+
return {
|
|
338517
|
+
success: false,
|
|
338518
|
+
reason: "not-found"
|
|
338519
|
+
};
|
|
338520
|
+
if (typeof editor.commands?.setTextSelection !== "function")
|
|
338521
|
+
return {
|
|
338522
|
+
success: false,
|
|
338523
|
+
reason: "not-ready"
|
|
338524
|
+
};
|
|
338525
|
+
if (!await this.scrollToPositionAsync(pos, {
|
|
338453
338526
|
behavior: options.behavior ?? "smooth",
|
|
338454
338527
|
block: options.block ?? "center"
|
|
338455
|
-
})
|
|
338528
|
+
}))
|
|
338529
|
+
return {
|
|
338530
|
+
success: false,
|
|
338531
|
+
reason: "not-reachable"
|
|
338532
|
+
};
|
|
338533
|
+
if (!editor.commands.setTextSelection({
|
|
338534
|
+
from: pos,
|
|
338535
|
+
to: pos
|
|
338536
|
+
}))
|
|
338537
|
+
return {
|
|
338538
|
+
success: false,
|
|
338539
|
+
reason: "not-reachable"
|
|
338540
|
+
};
|
|
338541
|
+
return { success: true };
|
|
338456
338542
|
}
|
|
338457
338543
|
async scrollToPage(pageNumber, scrollBehavior = "smooth") {
|
|
338458
338544
|
const layout = this.#layoutState.layout;
|
|
@@ -340642,6 +340728,8 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
340642
340728
|
}
|
|
340643
340729
|
}
|
|
340644
340730
|
#scrollActiveEndIntoView(pageIndex) {
|
|
340731
|
+
if (this.#suppressSelectionScrollUntilRaf)
|
|
340732
|
+
return;
|
|
340645
340733
|
if (!!!this.#painterHost.querySelector(`[data-page-index="${pageIndex}"]`)) {
|
|
340646
340734
|
this.#scrollPageIntoView(pageIndex);
|
|
340647
340735
|
return;
|
|
@@ -342768,11 +342856,11 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
342768
342856
|
]);
|
|
342769
342857
|
});
|
|
342770
342858
|
|
|
342771
|
-
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-
|
|
342859
|
+
// ../../packages/superdoc/dist/chunks/create-super-doc-ui-BghVjsf3.es.js
|
|
342772
342860
|
var MOD_ALIASES, ALT_ALIASES, CTRL_ALIASES, SHIFT_ALIASES, BUILTIN_CONTEXT_MENU_GROUPS, BUILTIN_GROUP_ORDER, RESERVED_PROXY_PROPERTY_NAMES, ALL_TOOLBAR_COMMAND_IDS, EMPTY_ACTIVE_IDS;
|
|
342773
|
-
var
|
|
342774
|
-
|
|
342775
|
-
|
|
342861
|
+
var init_create_super_doc_ui_BghVjsf3_es = __esm(() => {
|
|
342862
|
+
init_SuperConverter_CQg2Zq8Z_es();
|
|
342863
|
+
init_create_headless_toolbar_BjHgBUHt_es();
|
|
342776
342864
|
MOD_ALIASES = new Set([
|
|
342777
342865
|
"Mod",
|
|
342778
342866
|
"Meta",
|
|
@@ -342814,16 +342902,16 @@ var init_zipper_yaJVJ4z9_es = __esm(() => {
|
|
|
342814
342902
|
|
|
342815
342903
|
// ../../packages/superdoc/dist/super-editor.es.js
|
|
342816
342904
|
var init_super_editor_es = __esm(() => {
|
|
342817
|
-
|
|
342818
|
-
|
|
342905
|
+
init_src_GT3sTaEO_es();
|
|
342906
|
+
init_SuperConverter_CQg2Zq8Z_es();
|
|
342819
342907
|
init_jszip_C49i9kUs_es();
|
|
342820
342908
|
init_xml_js_CqGKpaft_es();
|
|
342821
|
-
|
|
342909
|
+
init_create_headless_toolbar_BjHgBUHt_es();
|
|
342822
342910
|
init_constants_D_X7xF4s_es();
|
|
342823
342911
|
init_dist_B8HfvhaK_es();
|
|
342824
342912
|
init_unified_Dsuw2be5_es();
|
|
342825
342913
|
init_DocxZipper_nv_KfOqb_es();
|
|
342826
|
-
|
|
342914
|
+
init_create_super_doc_ui_BghVjsf3_es();
|
|
342827
342915
|
init_ui_C5PAS9hY_es();
|
|
342828
342916
|
init_eventemitter3_BnGqBE_Q_es();
|
|
342829
342917
|
init_errors_CNaD6vcg_es();
|
|
@@ -464678,7 +464766,7 @@ var DEFAULT_SELECTION_STATE2, normalizeSelectionState2 = (state = {}) => ({
|
|
|
464678
464766
|
}, isToolbarInput2 = (target) => {
|
|
464679
464767
|
return !!target?.closest(".button-text-input") || target?.classList?.contains("button-text-input");
|
|
464680
464768
|
}, isToolbarButton2 = (target) => {
|
|
464681
|
-
return !!target?.closest(".toolbar-button") || target?.classList?.contains("toolbar-button");
|
|
464769
|
+
return !!target?.closest(".sd-toolbar-button") || !!target?.closest(".toolbar-button") || target?.classList?.contains("sd-toolbar-button") || target?.classList?.contains("toolbar-button");
|
|
464682
464770
|
}, CustomSelection2;
|
|
464683
464771
|
var init_custom_selection = __esm(() => {
|
|
464684
464772
|
init_Extension();
|
|
@@ -486560,7 +486648,7 @@ import { createRequire as createRequire2 } from "node:module";
|
|
|
486560
486648
|
async function main() {
|
|
486561
486649
|
await server.connect(transport);
|
|
486562
486650
|
}
|
|
486563
|
-
var require2, version4, server, sessions, transport;
|
|
486651
|
+
var require2, version4, PRESETS_SUPPORTED, requestedPreset, server, sessions, transport;
|
|
486564
486652
|
var init_server3 = __esm(() => {
|
|
486565
486653
|
init_mcp();
|
|
486566
486654
|
init_stdio2();
|
|
@@ -486568,6 +486656,12 @@ var init_server3 = __esm(() => {
|
|
|
486568
486656
|
init_tools();
|
|
486569
486657
|
require2 = createRequire2(import.meta.url);
|
|
486570
486658
|
({ version: version4 } = require2("../package.json"));
|
|
486659
|
+
PRESETS_SUPPORTED = new Set(["legacy"]);
|
|
486660
|
+
requestedPreset = process.env.MCP_PRESET ?? "legacy";
|
|
486661
|
+
if (!PRESETS_SUPPORTED.has(requestedPreset)) {
|
|
486662
|
+
console.error(`SuperDoc MCP: unknown preset "${requestedPreset}". Supported: ${[...PRESETS_SUPPORTED].join(", ")}.`);
|
|
486663
|
+
process.exit(2);
|
|
486664
|
+
}
|
|
486571
486665
|
server = new McpServer({
|
|
486572
486666
|
name: "superdoc",
|
|
486573
486667
|
version: version4
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdoc-dev/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0-next.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"@types/bun": "^1.3.8",
|
|
20
20
|
"@types/node": "22.19.2",
|
|
21
21
|
"typescript": "^5.9.2",
|
|
22
|
-
"superdoc": "
|
|
23
|
-
"
|
|
24
|
-
"@superdoc/
|
|
22
|
+
"@superdoc/document-api": "0.0.1",
|
|
23
|
+
"superdoc": "1.38.0",
|
|
24
|
+
"@superdoc/super-editor": "0.0.1"
|
|
25
25
|
},
|
|
26
26
|
"publishConfig": {
|
|
27
27
|
"access": "public"
|