@harbour-enterprises/superdoc 1.0.0-next.2 → 1.0.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{PdfViewer-eykNsWyi.es.js → PdfViewer-PUn0q_lG.es.js} +2 -2
- package/dist/chunks/{PdfViewer-B-xTd4XY.cjs → PdfViewer-cVGt7Ne7.cjs} +1 -1
- package/dist/chunks/{eventemitter3-CcXAdeql.es.js → eventemitter3-44XulWQe.es.js} +1 -1
- package/dist/chunks/{index-BDVXUeCy-Di6ozaOM.cjs → index-DLO-SgUP-BNtYQDPq.cjs} +1 -1
- package/dist/chunks/{index-BDVXUeCy-7mwhYeJ7.es.js → index-DLO-SgUP-c73otQJ5.es.js} +1 -1
- package/dist/chunks/{index-rF5HExWB.cjs → index-Djmhr-R6.cjs} +465 -228
- package/dist/chunks/{index-DpQ8ZYM0.es.js → index-mHanL4xN.es.js} +468 -231
- package/dist/chunks/{jszip-5vvIqAEE.es.js → jszip-VP334ufO.es.js} +1 -1
- package/dist/chunks/{super-editor.es-CcKbh84I.cjs → super-editor.es-Cve8WKfM.cjs} +619 -379
- package/dist/chunks/{super-editor.es-CxajnL9u.es.js → super-editor.es-S9Kp_7dy.es.js} +620 -380
- package/dist/chunks/{vue-Dysv_7z5.es.js → vue-BuPTonTJ.es.js} +27 -27
- package/dist/chunks/xml-js-LkEmUa9-.es.js +2 -0
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts +42 -0
- package/dist/packages/superdoc/src/composables/useUiFontFamily.d.ts.map +1 -0
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts +3 -3
- package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
- package/dist/packages/superdoc/src/core/types/index.d.ts +4 -167
- package/dist/packages/superdoc/src/core/types/index.d.ts.map +1 -1
- package/dist/style.css +88 -86
- package/dist/super-editor/ai-writer.es.js +3 -3
- package/dist/super-editor/chunks/{converter-DN_dhslo.js → converter-ByybZRFp.js} +1 -1
- package/dist/super-editor/chunks/{docx-zipper-Bhl_yBjL.js → docx-zipper-CFQANTLI.js} +1 -1
- package/dist/super-editor/chunks/{editor-3klx7hyV.js → editor-Cu4hD14N.js} +16 -16
- package/dist/super-editor/chunks/{index-BDVXUeCy.js → index-DLO-SgUP.js} +1 -1
- package/dist/super-editor/chunks/{toolbar-8YA9ltNC.js → toolbar-5MMla0sj.js} +804 -568
- package/dist/super-editor/converter.es.js +1 -1
- package/dist/super-editor/docx-zipper.es.js +2 -2
- package/dist/super-editor/editor.es.js +3 -3
- package/dist/super-editor/file-zipper.es.js +1 -1
- package/dist/super-editor/style.css +22 -21
- package/dist/super-editor/super-editor.es.js +10 -6
- package/dist/super-editor/toolbar.es.js +2 -2
- package/dist/super-editor.cjs +1 -1
- package/dist/super-editor.es.js +2 -2
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist/superdoc.umd.js +1082 -605
- package/dist/superdoc.umd.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/xml-js-ClO_jHnq.es.js +0 -2
|
@@ -42427,7 +42427,7 @@ const _SuperConverter = class _SuperConverter2 {
|
|
|
42427
42427
|
static getStoredSuperdocVersion(docx) {
|
|
42428
42428
|
return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
|
|
42429
42429
|
}
|
|
42430
|
-
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-next.
|
|
42430
|
+
static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-next.3") {
|
|
42431
42431
|
return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
|
|
42432
42432
|
}
|
|
42433
42433
|
/**
|
|
@@ -58566,28 +58566,28 @@ const setImageNodeSelection = (view, pos) => {
|
|
|
58566
58566
|
}
|
|
58567
58567
|
return false;
|
|
58568
58568
|
};
|
|
58569
|
-
function canRenderFont(fontName,
|
|
58570
|
-
const _canRenderFont = (fontName2,
|
|
58569
|
+
function canRenderFont(fontName, uiDisplayFallbackFont = "sans-serif") {
|
|
58570
|
+
const _canRenderFont = (fontName2, uiDisplayFallbackFont2) => {
|
|
58571
58571
|
const canvas2 = document.createElement("canvas");
|
|
58572
58572
|
const ctx2 = canvas2.getContext("2d");
|
|
58573
58573
|
ctx2.textBaseline = "top";
|
|
58574
58574
|
const text = "abcdefghijklmnopqrstuvwxyz0123456789";
|
|
58575
|
-
ctx2.font = `72px ${
|
|
58575
|
+
ctx2.font = `72px ${uiDisplayFallbackFont2}`;
|
|
58576
58576
|
const initialTextMeasurement = ctx2.measureText(text);
|
|
58577
58577
|
const fallbackWidth = initialTextMeasurement.width;
|
|
58578
58578
|
const fallbackHeight = initialTextMeasurement.actualBoundingBoxDescent;
|
|
58579
|
-
ctx2.font = `72px "${fontName2}", ${
|
|
58579
|
+
ctx2.font = `72px "${fontName2}", ${uiDisplayFallbackFont2}`;
|
|
58580
58580
|
const customTextMeasurement = ctx2.measureText(text);
|
|
58581
58581
|
const customFontWidth = customTextMeasurement.width;
|
|
58582
58582
|
const customFontHeight = customTextMeasurement.actualBoundingBoxDescent;
|
|
58583
58583
|
const isAvailable = customFontWidth !== fallbackWidth || customFontHeight !== fallbackHeight;
|
|
58584
58584
|
return isAvailable;
|
|
58585
58585
|
};
|
|
58586
|
-
if (_canRenderFont(fontName,
|
|
58586
|
+
if (_canRenderFont(fontName, uiDisplayFallbackFont)) {
|
|
58587
58587
|
return true;
|
|
58588
58588
|
}
|
|
58589
|
-
const
|
|
58590
|
-
return _canRenderFont(fontName,
|
|
58589
|
+
const oppositeUiDisplayFallbackFont = uiDisplayFallbackFont === "sans-serif" ? "serif" : "sans-serif";
|
|
58590
|
+
return _canRenderFont(fontName, oppositeUiDisplayFallbackFont);
|
|
58591
58591
|
}
|
|
58592
58592
|
const { findChildren: findChildren$3 } = helpers;
|
|
58593
58593
|
function getAllFieldAnnotations(state2) {
|
|
@@ -59655,7 +59655,7 @@ const isHeadless = (editor) => {
|
|
|
59655
59655
|
const shouldSkipNodeView = (editor) => {
|
|
59656
59656
|
return isHeadless(editor);
|
|
59657
59657
|
};
|
|
59658
|
-
const summaryVersion = "1.0.0-next.
|
|
59658
|
+
const summaryVersion = "1.0.0-next.3";
|
|
59659
59659
|
const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
|
|
59660
59660
|
const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
|
|
59661
59661
|
function mapAttributes(attrs) {
|
|
@@ -60444,7 +60444,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
60444
60444
|
{ default: remarkStringify },
|
|
60445
60445
|
{ default: remarkGfm }
|
|
60446
60446
|
] = await Promise.all([
|
|
60447
|
-
Promise.resolve().then(() => require("./index-
|
|
60447
|
+
Promise.resolve().then(() => require("./index-DLO-SgUP-BNtYQDPq.cjs")),
|
|
60448
60448
|
Promise.resolve().then(() => require("./index-DRCvimau-H4Ck3S9a.cjs")),
|
|
60449
60449
|
Promise.resolve().then(() => require("./index-C_x_N6Uh-Db3CUJMX.cjs")),
|
|
60450
60450
|
Promise.resolve().then(() => require("./index-D_sWOSiG-BtDZzJ6I.cjs")),
|
|
@@ -60649,7 +60649,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
|
|
|
60649
60649
|
* Process collaboration migrations
|
|
60650
60650
|
*/
|
|
60651
60651
|
processCollaborationMigrations() {
|
|
60652
|
-
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-next.
|
|
60652
|
+
console.debug("[checkVersionMigrations] Current editor version", "1.0.0-next.3");
|
|
60653
60653
|
if (!this.options.ydoc) return;
|
|
60654
60654
|
const metaMap = this.options.ydoc.getMap("meta");
|
|
60655
60655
|
let docVersion = metaMap.get("version");
|
|
@@ -68379,9 +68379,9 @@ const extractFirstTextRunFont = (para) => {
|
|
|
68379
68379
|
const font = findFirstTextFont(para.content);
|
|
68380
68380
|
return font;
|
|
68381
68381
|
};
|
|
68382
|
-
const applyBaseRunDefaults = (run2, defaults,
|
|
68382
|
+
const applyBaseRunDefaults = (run2, defaults, uiDisplayFallbackFont, fallbackSize) => {
|
|
68383
68383
|
if (!run2) return;
|
|
68384
|
-
if (defaults.fontFamily && run2.fontFamily ===
|
|
68384
|
+
if (defaults.fontFamily && run2.fontFamily === uiDisplayFallbackFont) {
|
|
68385
68385
|
run2.fontFamily = defaults.fontFamily;
|
|
68386
68386
|
}
|
|
68387
68387
|
if (defaults.fontSizePx != null && run2.fontSize === fallbackSize) {
|
|
@@ -86218,8 +86218,8 @@ async function measureParagraphBlock(block, maxWidth) {
|
|
|
86218
86218
|
}
|
|
86219
86219
|
}
|
|
86220
86220
|
if (!currentLine && lines.length === 0) {
|
|
86221
|
-
const
|
|
86222
|
-
const metrics = calculateTypographyMetrics(
|
|
86221
|
+
const uiDisplayFallbackFontSize = (block.runs[0]?.kind === "text" ? block.runs[0].fontSize : void 0) ?? 12;
|
|
86222
|
+
const metrics = calculateTypographyMetrics(uiDisplayFallbackFontSize, spacing);
|
|
86223
86223
|
const fallbackLine = {
|
|
86224
86224
|
fromRun: 0,
|
|
86225
86225
|
fromChar: 0,
|
|
@@ -110856,316 +110856,6 @@ const toolbarIcons = {
|
|
|
110856
110856
|
paste: pasteIconSvg,
|
|
110857
110857
|
strikethrough: strikethroughSvg
|
|
110858
110858
|
};
|
|
110859
|
-
const _hoisted_1$4$1 = { class: "toolbar-icon" };
|
|
110860
|
-
const _hoisted_2$3$1 = ["innerHTML"];
|
|
110861
|
-
const _sfc_main$5$1 = {
|
|
110862
|
-
__name: "ToolbarButtonIcon",
|
|
110863
|
-
props: {
|
|
110864
|
-
name: {
|
|
110865
|
-
type: String,
|
|
110866
|
-
required: true
|
|
110867
|
-
},
|
|
110868
|
-
color: {
|
|
110869
|
-
type: String,
|
|
110870
|
-
default: null
|
|
110871
|
-
},
|
|
110872
|
-
icon: {
|
|
110873
|
-
type: String,
|
|
110874
|
-
default: null
|
|
110875
|
-
}
|
|
110876
|
-
},
|
|
110877
|
-
setup(__props) {
|
|
110878
|
-
const props = __props;
|
|
110879
|
-
const getBarColor = vue.computed(() => {
|
|
110880
|
-
if (props.name === "color") return { backgroundColor: props.color || "#111111" };
|
|
110881
|
-
if (props.name === "highlight") return { backgroundColor: props.color || "#D6D6D6" };
|
|
110882
|
-
});
|
|
110883
|
-
const hasColorBar = vue.computed(() => {
|
|
110884
|
-
return ["color", "highlight"].includes(props.name);
|
|
110885
|
-
});
|
|
110886
|
-
return (_ctx, _cache) => {
|
|
110887
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4$1, [
|
|
110888
|
-
vue.createBaseVNode("div", {
|
|
110889
|
-
class: vue.normalizeClass(["toolbar-icon__icon", [`toolbar-icon__icon--${props.name}`]]),
|
|
110890
|
-
innerHTML: __props.icon
|
|
110891
|
-
}, null, 10, _hoisted_2$3$1),
|
|
110892
|
-
hasColorBar.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
110893
|
-
key: 0,
|
|
110894
|
-
class: "color-bar",
|
|
110895
|
-
style: vue.normalizeStyle(getBarColor.value)
|
|
110896
|
-
}, null, 4)) : vue.createCommentVNode("", true)
|
|
110897
|
-
]);
|
|
110898
|
-
};
|
|
110899
|
-
}
|
|
110900
|
-
};
|
|
110901
|
-
const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5$1, [["__scopeId", "data-v-6d7523ab"]]);
|
|
110902
|
-
const _hoisted_1$3$1 = ["role", "aria-label", "onKeydown"];
|
|
110903
|
-
const _hoisted_2$2$1 = ["data-item"];
|
|
110904
|
-
const _hoisted_3$2$1 = {
|
|
110905
|
-
key: 1,
|
|
110906
|
-
class: "button-label"
|
|
110907
|
-
};
|
|
110908
|
-
const _hoisted_4$1$1 = { key: 2 };
|
|
110909
|
-
const _hoisted_5$4 = ["onKeydown", "id"];
|
|
110910
|
-
const _hoisted_6$2 = ["placeholder", "onKeydown", "id"];
|
|
110911
|
-
const _hoisted_7$1 = ["innerHTML"];
|
|
110912
|
-
const _hoisted_8$1 = {
|
|
110913
|
-
"aria-live": "polite",
|
|
110914
|
-
class: "visually-hidden"
|
|
110915
|
-
};
|
|
110916
|
-
const _sfc_main$4$1 = {
|
|
110917
|
-
__name: "ToolbarButton",
|
|
110918
|
-
props: {
|
|
110919
|
-
iconColor: {
|
|
110920
|
-
type: String,
|
|
110921
|
-
default: null
|
|
110922
|
-
},
|
|
110923
|
-
active: {
|
|
110924
|
-
type: Boolean,
|
|
110925
|
-
default: false
|
|
110926
|
-
},
|
|
110927
|
-
isNarrow: {
|
|
110928
|
-
type: Boolean,
|
|
110929
|
-
default: false
|
|
110930
|
-
},
|
|
110931
|
-
isWide: {
|
|
110932
|
-
type: Boolean,
|
|
110933
|
-
default: false
|
|
110934
|
-
},
|
|
110935
|
-
toolbarItem: {
|
|
110936
|
-
type: Object,
|
|
110937
|
-
required: true
|
|
110938
|
-
},
|
|
110939
|
-
defaultLabel: {
|
|
110940
|
-
type: String,
|
|
110941
|
-
default: null
|
|
110942
|
-
},
|
|
110943
|
-
isOverflowItem: {
|
|
110944
|
-
type: Boolean,
|
|
110945
|
-
default: false
|
|
110946
|
-
}
|
|
110947
|
-
},
|
|
110948
|
-
emits: ["buttonClick", "textSubmit"],
|
|
110949
|
-
setup(__props, { emit: __emit }) {
|
|
110950
|
-
const emit = __emit;
|
|
110951
|
-
const props = __props;
|
|
110952
|
-
const {
|
|
110953
|
-
name,
|
|
110954
|
-
active,
|
|
110955
|
-
icon,
|
|
110956
|
-
label,
|
|
110957
|
-
hideLabel,
|
|
110958
|
-
iconColor,
|
|
110959
|
-
hasCaret,
|
|
110960
|
-
disabled,
|
|
110961
|
-
inlineTextInputVisible,
|
|
110962
|
-
hasInlineTextInput,
|
|
110963
|
-
minWidth,
|
|
110964
|
-
style: style2,
|
|
110965
|
-
attributes
|
|
110966
|
-
} = props.toolbarItem;
|
|
110967
|
-
const inlineTextInput = vue.ref(label);
|
|
110968
|
-
const inlineInput = vue.ref(null);
|
|
110969
|
-
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
110970
|
-
const handleClick2 = () => {
|
|
110971
|
-
if (hasInlineTextInput) {
|
|
110972
|
-
vue.nextTick(() => {
|
|
110973
|
-
inlineInput.value?.focus();
|
|
110974
|
-
inlineInput.value?.select();
|
|
110975
|
-
});
|
|
110976
|
-
}
|
|
110977
|
-
emit("buttonClick");
|
|
110978
|
-
};
|
|
110979
|
-
const handleInputSubmit = () => {
|
|
110980
|
-
const value = inlineTextInput.value;
|
|
110981
|
-
const cleanValue = value.match(/^\d+(\.5)?$/) ? value : Math.floor(parseFloat(value)).toString();
|
|
110982
|
-
emit("textSubmit", cleanValue);
|
|
110983
|
-
inlineTextInput.value = cleanValue;
|
|
110984
|
-
};
|
|
110985
|
-
const getStyle = vue.computed(() => {
|
|
110986
|
-
if (style2.value) return style2.value;
|
|
110987
|
-
return {
|
|
110988
|
-
minWidth: props.minWidth
|
|
110989
|
-
};
|
|
110990
|
-
});
|
|
110991
|
-
const caretIcon = vue.computed(() => {
|
|
110992
|
-
return active.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
|
|
110993
|
-
});
|
|
110994
|
-
return (_ctx, _cache) => {
|
|
110995
|
-
return vue.openBlock(), vue.createElementBlock("div", {
|
|
110996
|
-
class: vue.normalizeClass(["toolbar-item", vue.unref(attributes).className]),
|
|
110997
|
-
style: vue.normalizeStyle(getStyle.value),
|
|
110998
|
-
role: __props.isOverflowItem ? "menuitem" : "button",
|
|
110999
|
-
"aria-label": vue.unref(attributes).ariaLabel,
|
|
111000
|
-
onClick: handleClick2,
|
|
111001
|
-
onKeydown: vue.withKeys(vue.withModifiers(handleClick2, ["stop"]), ["enter"]),
|
|
111002
|
-
tabindex: "0"
|
|
111003
|
-
}, [
|
|
111004
|
-
vue.createBaseVNode("div", {
|
|
111005
|
-
class: vue.normalizeClass(["toolbar-button", {
|
|
111006
|
-
active: vue.unref(active),
|
|
111007
|
-
disabled: vue.unref(disabled),
|
|
111008
|
-
narrow: __props.isNarrow,
|
|
111009
|
-
wide: __props.isWide,
|
|
111010
|
-
"has-inline-text-input": vue.unref(hasInlineTextInput),
|
|
111011
|
-
"high-contrast": vue.unref(isHighContrastMode2)
|
|
111012
|
-
}]),
|
|
111013
|
-
"data-item": `btn-${vue.unref(name) || ""}`
|
|
111014
|
-
}, [
|
|
111015
|
-
vue.unref(icon) ? (vue.openBlock(), vue.createBlock(ToolbarButtonIcon, {
|
|
111016
|
-
key: 0,
|
|
111017
|
-
color: vue.unref(iconColor),
|
|
111018
|
-
class: "toolbar-icon",
|
|
111019
|
-
icon: vue.unref(icon),
|
|
111020
|
-
name: vue.unref(name)
|
|
111021
|
-
}, null, 8, ["color", "icon", "name"])) : vue.createCommentVNode("", true),
|
|
111022
|
-
vue.unref(label) && !vue.unref(hideLabel) && !vue.unref(inlineTextInputVisible) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2$1, vue.toDisplayString(vue.unref(label)), 1)) : vue.createCommentVNode("", true),
|
|
111023
|
-
vue.unref(inlineTextInputVisible) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$1$1, [
|
|
111024
|
-
vue.unref(name) === "fontSize" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
111025
|
-
key: 0,
|
|
111026
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
|
|
111027
|
-
onKeydown: vue.withKeys(vue.withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
111028
|
-
type: "text",
|
|
111029
|
-
class: vue.normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": vue.unref(isHighContrastMode2) }]),
|
|
111030
|
-
id: "inlineTextInput-" + vue.unref(name),
|
|
111031
|
-
autocomplete: "off",
|
|
111032
|
-
ref_key: "inlineInput",
|
|
111033
|
-
ref: inlineInput
|
|
111034
|
-
}, null, 42, _hoisted_5$4)), [
|
|
111035
|
-
[vue.vModelText, inlineTextInput.value]
|
|
111036
|
-
]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
111037
|
-
key: 1,
|
|
111038
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inlineTextInput.value = $event),
|
|
111039
|
-
placeholder: vue.unref(label),
|
|
111040
|
-
onKeydown: vue.withKeys(vue.withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
111041
|
-
type: "text",
|
|
111042
|
-
class: "button-text-input",
|
|
111043
|
-
id: "inlineTextInput-" + vue.unref(name),
|
|
111044
|
-
autocomplete: "off",
|
|
111045
|
-
ref_key: "inlineInput",
|
|
111046
|
-
ref: inlineInput
|
|
111047
|
-
}, null, 40, _hoisted_6$2)), [
|
|
111048
|
-
[vue.vModelText, inlineTextInput.value]
|
|
111049
|
-
])
|
|
111050
|
-
])) : vue.createCommentVNode("", true),
|
|
111051
|
-
vue.unref(hasCaret) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
111052
|
-
key: 3,
|
|
111053
|
-
class: "dropdown-caret",
|
|
111054
|
-
innerHTML: caretIcon.value,
|
|
111055
|
-
style: vue.normalizeStyle({ opacity: vue.unref(disabled) ? 0.6 : 1 })
|
|
111056
|
-
}, null, 12, _hoisted_7$1)) : vue.createCommentVNode("", true),
|
|
111057
|
-
vue.createBaseVNode("div", _hoisted_8$1, vue.toDisplayString(`${vue.unref(attributes).ariaLabel} ${vue.unref(active) ? "selected" : "unset"}`), 1)
|
|
111058
|
-
], 10, _hoisted_2$2$1)
|
|
111059
|
-
], 46, _hoisted_1$3$1);
|
|
111060
|
-
};
|
|
111061
|
-
}
|
|
111062
|
-
};
|
|
111063
|
-
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["__scopeId", "data-v-ea93b080"]]);
|
|
111064
|
-
const _hoisted_1$2$1 = {
|
|
111065
|
-
class: "toolbar-separator",
|
|
111066
|
-
role: "separator",
|
|
111067
|
-
"aria-label": "Toolbar separator"
|
|
111068
|
-
};
|
|
111069
|
-
const _sfc_main$3$1 = {
|
|
111070
|
-
__name: "ToolbarSeparator",
|
|
111071
|
-
props: {
|
|
111072
|
-
active: {
|
|
111073
|
-
type: Boolean,
|
|
111074
|
-
default: false
|
|
111075
|
-
}
|
|
111076
|
-
},
|
|
111077
|
-
emits: ["command"],
|
|
111078
|
-
setup(__props, { emit: __emit }) {
|
|
111079
|
-
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
111080
|
-
const getSeparatorColor = () => {
|
|
111081
|
-
if (isHighContrastMode2.value) {
|
|
111082
|
-
return "#000";
|
|
111083
|
-
}
|
|
111084
|
-
return "#dbdbdb";
|
|
111085
|
-
};
|
|
111086
|
-
return (_ctx, _cache) => {
|
|
111087
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2$1, [
|
|
111088
|
-
vue.createBaseVNode("div", {
|
|
111089
|
-
class: "separator-inner",
|
|
111090
|
-
style: vue.normalizeStyle({ backgroundColor: getSeparatorColor() })
|
|
111091
|
-
}, null, 4)
|
|
111092
|
-
]);
|
|
111093
|
-
};
|
|
111094
|
-
}
|
|
111095
|
-
};
|
|
111096
|
-
const ToolbarSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$3$1, [["__scopeId", "data-v-4ef9aa18"]]);
|
|
111097
|
-
const _hoisted_1$1$1 = { class: "overflow-menu" };
|
|
111098
|
-
const _hoisted_2$1$1 = { class: "overflow-menu-trigger" };
|
|
111099
|
-
const _hoisted_3$1$1 = {
|
|
111100
|
-
key: 0,
|
|
111101
|
-
class: "overflow-menu_items",
|
|
111102
|
-
role: "group"
|
|
111103
|
-
};
|
|
111104
|
-
const _sfc_main$2$1 = {
|
|
111105
|
-
__name: "OverflowMenu",
|
|
111106
|
-
props: {
|
|
111107
|
-
toolbarItem: {
|
|
111108
|
-
type: Object,
|
|
111109
|
-
required: true
|
|
111110
|
-
},
|
|
111111
|
-
overflowItems: {
|
|
111112
|
-
type: Array,
|
|
111113
|
-
required: true
|
|
111114
|
-
}
|
|
111115
|
-
},
|
|
111116
|
-
emits: ["buttonClick", "close"],
|
|
111117
|
-
setup(__props, { emit: __emit }) {
|
|
111118
|
-
const { proxy } = vue.getCurrentInstance();
|
|
111119
|
-
const emit = __emit;
|
|
111120
|
-
const props = __props;
|
|
111121
|
-
const isOverflowMenuOpened = vue.computed(() => props.toolbarItem.expand.value);
|
|
111122
|
-
const hasOpenDropdown = vue.ref(false);
|
|
111123
|
-
const overflowToolbarItem = vue.computed(() => ({
|
|
111124
|
-
...props.toolbarItem,
|
|
111125
|
-
active: isOverflowMenuOpened.value
|
|
111126
|
-
}));
|
|
111127
|
-
const toggleOverflowMenu = () => {
|
|
111128
|
-
emit("buttonClick", props.toolbarItem);
|
|
111129
|
-
};
|
|
111130
|
-
const handleCommand = ({ item, argument }) => {
|
|
111131
|
-
proxy.$toolbar.emitCommand({ item, argument });
|
|
111132
|
-
};
|
|
111133
|
-
const handleKeyDown2 = (e) => {
|
|
111134
|
-
if (e.key === "Escape") {
|
|
111135
|
-
if (isOverflowMenuOpened.value && !hasOpenDropdown.value) {
|
|
111136
|
-
e.preventDefault();
|
|
111137
|
-
emit("close");
|
|
111138
|
-
}
|
|
111139
|
-
}
|
|
111140
|
-
};
|
|
111141
|
-
vue.onMounted(() => {
|
|
111142
|
-
document.addEventListener("keydown", handleKeyDown2, true);
|
|
111143
|
-
});
|
|
111144
|
-
vue.onBeforeUnmount(() => {
|
|
111145
|
-
document.removeEventListener("keydown", handleKeyDown2, true);
|
|
111146
|
-
});
|
|
111147
|
-
return (_ctx, _cache) => {
|
|
111148
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1$1, [
|
|
111149
|
-
vue.createBaseVNode("div", _hoisted_2$1$1, [
|
|
111150
|
-
vue.createVNode(ToolbarButton, {
|
|
111151
|
-
"toolbar-item": overflowToolbarItem.value,
|
|
111152
|
-
onButtonClick: toggleOverflowMenu
|
|
111153
|
-
}, null, 8, ["toolbar-item"])
|
|
111154
|
-
]),
|
|
111155
|
-
isOverflowMenuOpened.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1$1, [
|
|
111156
|
-
vue.createVNode(ButtonGroup, {
|
|
111157
|
-
class: "superdoc-toolbar-overflow",
|
|
111158
|
-
"toolbar-items": __props.overflowItems,
|
|
111159
|
-
"from-overflow": "",
|
|
111160
|
-
onCommand: handleCommand,
|
|
111161
|
-
onDropdownUpdateShow: _cache[0] || (_cache[0] = ($event) => hasOpenDropdown.value = $event)
|
|
111162
|
-
}, null, 8, ["toolbar-items"])
|
|
111163
|
-
])) : vue.createCommentVNode("", true)
|
|
111164
|
-
]);
|
|
111165
|
-
};
|
|
111166
|
-
}
|
|
111167
|
-
};
|
|
111168
|
-
const OverflowMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2$1, [["__scopeId", "data-v-ef28da92"]]);
|
|
111169
110859
|
function plugin$1(options) {
|
|
111170
110860
|
let _bPrefix = ".";
|
|
111171
110861
|
let _ePrefix = "__";
|
|
@@ -114776,30 +114466,30 @@ const defaultClsPrefix = "n";
|
|
|
114776
114466
|
function useConfig(props = {}, options = {
|
|
114777
114467
|
defaultBordered: true
|
|
114778
114468
|
}) {
|
|
114779
|
-
const
|
|
114469
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
114780
114470
|
return {
|
|
114781
114471
|
// NConfigProvider,
|
|
114782
|
-
inlineThemeDisabled:
|
|
114783
|
-
mergedRtlRef:
|
|
114784
|
-
mergedComponentPropsRef:
|
|
114785
|
-
mergedBreakpointsRef:
|
|
114472
|
+
inlineThemeDisabled: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled,
|
|
114473
|
+
mergedRtlRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef,
|
|
114474
|
+
mergedComponentPropsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef,
|
|
114475
|
+
mergedBreakpointsRef: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef,
|
|
114786
114476
|
mergedBorderedRef: vue.computed(() => {
|
|
114787
114477
|
var _a2, _b2;
|
|
114788
114478
|
const {
|
|
114789
114479
|
bordered
|
|
114790
114480
|
} = props;
|
|
114791
114481
|
if (bordered !== void 0) return bordered;
|
|
114792
|
-
return (_b2 = (_a2 =
|
|
114482
|
+
return (_b2 = (_a2 = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value) !== null && _a2 !== void 0 ? _a2 : options.defaultBordered) !== null && _b2 !== void 0 ? _b2 : true;
|
|
114793
114483
|
}),
|
|
114794
|
-
mergedClsPrefixRef:
|
|
114795
|
-
namespaceRef: vue.computed(() =>
|
|
114484
|
+
mergedClsPrefixRef: NConfigProvider2 ? NConfigProvider2.mergedClsPrefixRef : vue.shallowRef(defaultClsPrefix),
|
|
114485
|
+
namespaceRef: vue.computed(() => NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value)
|
|
114796
114486
|
};
|
|
114797
114487
|
}
|
|
114798
114488
|
function useThemeClass(componentName, hashRef, cssVarsRef, props) {
|
|
114799
114489
|
if (!cssVarsRef) throwError("useThemeClass", "cssVarsRef is not passed");
|
|
114800
|
-
const
|
|
114801
|
-
const mergedThemeHashRef =
|
|
114802
|
-
const styleMountTarget =
|
|
114490
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
114491
|
+
const mergedThemeHashRef = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeHashRef;
|
|
114492
|
+
const styleMountTarget = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget;
|
|
114803
114493
|
const themeClassRef = vue.ref("");
|
|
114804
114494
|
const ssrAdapter2 = useSsrAdapter();
|
|
114805
114495
|
let renderCallback;
|
|
@@ -116144,7 +115834,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
|
|
|
116144
115834
|
}
|
|
116145
115835
|
return componentRtlState;
|
|
116146
115836
|
});
|
|
116147
|
-
const
|
|
115837
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
116148
115838
|
const mountStyle = () => {
|
|
116149
115839
|
vue.watchEffect(() => {
|
|
116150
115840
|
const {
|
|
@@ -116164,7 +115854,7 @@ function useRtl(mountId, rtlStateRef, clsPrefixRef) {
|
|
|
116164
115854
|
bPrefix: clsPrefix ? `.${clsPrefix}-` : void 0
|
|
116165
115855
|
},
|
|
116166
115856
|
ssr: ssrAdapter2,
|
|
116167
|
-
parent:
|
|
115857
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
116168
115858
|
});
|
|
116169
115859
|
});
|
|
116170
115860
|
};
|
|
@@ -116222,7 +115912,7 @@ function createTheme(theme) {
|
|
|
116222
115912
|
}
|
|
116223
115913
|
function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef) {
|
|
116224
115914
|
const ssrAdapter2 = useSsrAdapter();
|
|
116225
|
-
const
|
|
115915
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
116226
115916
|
if (style2) {
|
|
116227
115917
|
const mountStyle = () => {
|
|
116228
115918
|
const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value;
|
|
@@ -116234,15 +115924,15 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
|
|
|
116234
115924
|
},
|
|
116235
115925
|
anchorMetaName: cssrAnchorMetaName,
|
|
116236
115926
|
ssr: ssrAdapter2,
|
|
116237
|
-
parent:
|
|
115927
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
116238
115928
|
});
|
|
116239
|
-
if (!(
|
|
115929
|
+
if (!(NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled)) {
|
|
116240
115930
|
globalStyle.mount({
|
|
116241
115931
|
id: "n-global",
|
|
116242
115932
|
head: true,
|
|
116243
115933
|
anchorMetaName: cssrAnchorMetaName,
|
|
116244
115934
|
ssr: ssrAdapter2,
|
|
116245
|
-
parent:
|
|
115935
|
+
parent: NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget
|
|
116246
115936
|
});
|
|
116247
115937
|
}
|
|
116248
115938
|
};
|
|
@@ -116274,11 +115964,11 @@ function useTheme(resolveId, mountId, style2, defaultTheme, props, clsPrefixRef)
|
|
|
116274
115964
|
self: globalSelf = void 0,
|
|
116275
115965
|
peers: globalPeers = {}
|
|
116276
115966
|
} = {}
|
|
116277
|
-
} = (
|
|
115967
|
+
} = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value) || {};
|
|
116278
115968
|
const {
|
|
116279
115969
|
common: globalCommonOverrides = void 0,
|
|
116280
115970
|
[resolveId]: globalSelfOverrides = {}
|
|
116281
|
-
} = (
|
|
115971
|
+
} = (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value) || {};
|
|
116282
115972
|
const {
|
|
116283
115973
|
common: globalSelfCommonOverrides,
|
|
116284
115974
|
peers: globalPeersOverrides = {}
|
|
@@ -119036,6 +118726,209 @@ const NPopover = vue.defineComponent({
|
|
|
119036
118726
|
});
|
|
119037
118727
|
}
|
|
119038
118728
|
});
|
|
118729
|
+
const configProviderProps = {
|
|
118730
|
+
abstract: Boolean,
|
|
118731
|
+
bordered: {
|
|
118732
|
+
type: Boolean,
|
|
118733
|
+
default: void 0
|
|
118734
|
+
},
|
|
118735
|
+
clsPrefix: String,
|
|
118736
|
+
locale: Object,
|
|
118737
|
+
dateLocale: Object,
|
|
118738
|
+
namespace: String,
|
|
118739
|
+
rtl: Array,
|
|
118740
|
+
tag: {
|
|
118741
|
+
type: String,
|
|
118742
|
+
default: "div"
|
|
118743
|
+
},
|
|
118744
|
+
hljs: Object,
|
|
118745
|
+
katex: Object,
|
|
118746
|
+
theme: Object,
|
|
118747
|
+
themeOverrides: Object,
|
|
118748
|
+
componentOptions: Object,
|
|
118749
|
+
icons: Object,
|
|
118750
|
+
breakpoints: Object,
|
|
118751
|
+
preflightStyleDisabled: Boolean,
|
|
118752
|
+
styleMountTarget: Object,
|
|
118753
|
+
inlineThemeDisabled: {
|
|
118754
|
+
type: Boolean,
|
|
118755
|
+
default: void 0
|
|
118756
|
+
},
|
|
118757
|
+
// deprecated
|
|
118758
|
+
as: {
|
|
118759
|
+
type: String,
|
|
118760
|
+
validator: () => {
|
|
118761
|
+
warn("config-provider", "`as` is deprecated, please use `tag` instead.");
|
|
118762
|
+
return true;
|
|
118763
|
+
},
|
|
118764
|
+
default: void 0
|
|
118765
|
+
}
|
|
118766
|
+
};
|
|
118767
|
+
const NConfigProvider = vue.defineComponent({
|
|
118768
|
+
name: "ConfigProvider",
|
|
118769
|
+
alias: ["App"],
|
|
118770
|
+
props: configProviderProps,
|
|
118771
|
+
setup(props) {
|
|
118772
|
+
const NConfigProvider2 = vue.inject(configProviderInjectionKey, null);
|
|
118773
|
+
const mergedThemeRef = vue.computed(() => {
|
|
118774
|
+
const {
|
|
118775
|
+
theme
|
|
118776
|
+
} = props;
|
|
118777
|
+
if (theme === null) return void 0;
|
|
118778
|
+
const inheritedTheme = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeRef.value;
|
|
118779
|
+
return theme === void 0 ? inheritedTheme : inheritedTheme === void 0 ? theme : Object.assign({}, inheritedTheme, theme);
|
|
118780
|
+
});
|
|
118781
|
+
const mergedThemeOverridesRef = vue.computed(() => {
|
|
118782
|
+
const {
|
|
118783
|
+
themeOverrides
|
|
118784
|
+
} = props;
|
|
118785
|
+
if (themeOverrides === null) return void 0;
|
|
118786
|
+
if (themeOverrides === void 0) {
|
|
118787
|
+
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
|
|
118788
|
+
} else {
|
|
118789
|
+
const inheritedThemeOverrides = NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedThemeOverridesRef.value;
|
|
118790
|
+
if (inheritedThemeOverrides === void 0) {
|
|
118791
|
+
return themeOverrides;
|
|
118792
|
+
} else {
|
|
118793
|
+
return merge$1({}, inheritedThemeOverrides, themeOverrides);
|
|
118794
|
+
}
|
|
118795
|
+
}
|
|
118796
|
+
});
|
|
118797
|
+
const mergedNamespaceRef = useMemo(() => {
|
|
118798
|
+
const {
|
|
118799
|
+
namespace: namespace2
|
|
118800
|
+
} = props;
|
|
118801
|
+
return namespace2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedNamespaceRef.value : namespace2;
|
|
118802
|
+
});
|
|
118803
|
+
const mergedBorderedRef = useMemo(() => {
|
|
118804
|
+
const {
|
|
118805
|
+
bordered
|
|
118806
|
+
} = props;
|
|
118807
|
+
return bordered === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBorderedRef.value : bordered;
|
|
118808
|
+
});
|
|
118809
|
+
const mergedIconsRef = vue.computed(() => {
|
|
118810
|
+
const {
|
|
118811
|
+
icons: icons2
|
|
118812
|
+
} = props;
|
|
118813
|
+
return icons2 === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedIconsRef.value : icons2;
|
|
118814
|
+
});
|
|
118815
|
+
const mergedComponentPropsRef = vue.computed(() => {
|
|
118816
|
+
const {
|
|
118817
|
+
componentOptions
|
|
118818
|
+
} = props;
|
|
118819
|
+
if (componentOptions !== void 0) return componentOptions;
|
|
118820
|
+
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedComponentPropsRef.value;
|
|
118821
|
+
});
|
|
118822
|
+
const mergedClsPrefixRef = vue.computed(() => {
|
|
118823
|
+
const {
|
|
118824
|
+
clsPrefix
|
|
118825
|
+
} = props;
|
|
118826
|
+
if (clsPrefix !== void 0) return clsPrefix;
|
|
118827
|
+
if (NConfigProvider2) return NConfigProvider2.mergedClsPrefixRef.value;
|
|
118828
|
+
return defaultClsPrefix;
|
|
118829
|
+
});
|
|
118830
|
+
const mergedRtlRef = vue.computed(() => {
|
|
118831
|
+
var _a2;
|
|
118832
|
+
const {
|
|
118833
|
+
rtl
|
|
118834
|
+
} = props;
|
|
118835
|
+
if (rtl === void 0) {
|
|
118836
|
+
return NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedRtlRef.value;
|
|
118837
|
+
}
|
|
118838
|
+
const rtlEnabledState = {};
|
|
118839
|
+
for (const rtlInfo of rtl) {
|
|
118840
|
+
rtlEnabledState[rtlInfo.name] = vue.markRaw(rtlInfo);
|
|
118841
|
+
(_a2 = rtlInfo.peers) === null || _a2 === void 0 ? void 0 : _a2.forEach((peerRtlInfo) => {
|
|
118842
|
+
if (!(peerRtlInfo.name in rtlEnabledState)) {
|
|
118843
|
+
rtlEnabledState[peerRtlInfo.name] = vue.markRaw(peerRtlInfo);
|
|
118844
|
+
}
|
|
118845
|
+
});
|
|
118846
|
+
}
|
|
118847
|
+
return rtlEnabledState;
|
|
118848
|
+
});
|
|
118849
|
+
const mergedBreakpointsRef = vue.computed(() => {
|
|
118850
|
+
return props.breakpoints || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedBreakpointsRef.value);
|
|
118851
|
+
});
|
|
118852
|
+
const inlineThemeDisabled = props.inlineThemeDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.inlineThemeDisabled);
|
|
118853
|
+
const preflightStyleDisabled = props.preflightStyleDisabled || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.preflightStyleDisabled);
|
|
118854
|
+
const styleMountTarget = props.styleMountTarget || (NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.styleMountTarget);
|
|
118855
|
+
const mergedThemeHashRef = vue.computed(() => {
|
|
118856
|
+
const {
|
|
118857
|
+
value: theme
|
|
118858
|
+
} = mergedThemeRef;
|
|
118859
|
+
const {
|
|
118860
|
+
value: mergedThemeOverrides
|
|
118861
|
+
} = mergedThemeOverridesRef;
|
|
118862
|
+
const hasThemeOverrides = mergedThemeOverrides && Object.keys(mergedThemeOverrides).length !== 0;
|
|
118863
|
+
const themeName = theme === null || theme === void 0 ? void 0 : theme.name;
|
|
118864
|
+
if (themeName) {
|
|
118865
|
+
if (hasThemeOverrides) {
|
|
118866
|
+
return `${themeName}-${murmur2(JSON.stringify(mergedThemeOverridesRef.value))}`;
|
|
118867
|
+
}
|
|
118868
|
+
return themeName;
|
|
118869
|
+
} else {
|
|
118870
|
+
if (hasThemeOverrides) {
|
|
118871
|
+
return murmur2(JSON.stringify(mergedThemeOverridesRef.value));
|
|
118872
|
+
}
|
|
118873
|
+
return "";
|
|
118874
|
+
}
|
|
118875
|
+
});
|
|
118876
|
+
vue.provide(configProviderInjectionKey, {
|
|
118877
|
+
mergedThemeHashRef,
|
|
118878
|
+
mergedBreakpointsRef,
|
|
118879
|
+
mergedRtlRef,
|
|
118880
|
+
mergedIconsRef,
|
|
118881
|
+
mergedComponentPropsRef,
|
|
118882
|
+
mergedBorderedRef,
|
|
118883
|
+
mergedNamespaceRef,
|
|
118884
|
+
mergedClsPrefixRef,
|
|
118885
|
+
mergedLocaleRef: vue.computed(() => {
|
|
118886
|
+
const {
|
|
118887
|
+
locale
|
|
118888
|
+
} = props;
|
|
118889
|
+
if (locale === null) return void 0;
|
|
118890
|
+
return locale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedLocaleRef.value : locale;
|
|
118891
|
+
}),
|
|
118892
|
+
mergedDateLocaleRef: vue.computed(() => {
|
|
118893
|
+
const {
|
|
118894
|
+
dateLocale
|
|
118895
|
+
} = props;
|
|
118896
|
+
if (dateLocale === null) return void 0;
|
|
118897
|
+
return dateLocale === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedDateLocaleRef.value : dateLocale;
|
|
118898
|
+
}),
|
|
118899
|
+
mergedHljsRef: vue.computed(() => {
|
|
118900
|
+
const {
|
|
118901
|
+
hljs
|
|
118902
|
+
} = props;
|
|
118903
|
+
return hljs === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedHljsRef.value : hljs;
|
|
118904
|
+
}),
|
|
118905
|
+
mergedKatexRef: vue.computed(() => {
|
|
118906
|
+
const {
|
|
118907
|
+
katex
|
|
118908
|
+
} = props;
|
|
118909
|
+
return katex === void 0 ? NConfigProvider2 === null || NConfigProvider2 === void 0 ? void 0 : NConfigProvider2.mergedKatexRef.value : katex;
|
|
118910
|
+
}),
|
|
118911
|
+
mergedThemeRef,
|
|
118912
|
+
mergedThemeOverridesRef,
|
|
118913
|
+
inlineThemeDisabled: inlineThemeDisabled || false,
|
|
118914
|
+
preflightStyleDisabled: preflightStyleDisabled || false,
|
|
118915
|
+
styleMountTarget
|
|
118916
|
+
});
|
|
118917
|
+
return {
|
|
118918
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
118919
|
+
mergedBordered: mergedBorderedRef,
|
|
118920
|
+
mergedNamespace: mergedNamespaceRef,
|
|
118921
|
+
mergedTheme: mergedThemeRef,
|
|
118922
|
+
mergedThemeOverrides: mergedThemeOverridesRef
|
|
118923
|
+
};
|
|
118924
|
+
},
|
|
118925
|
+
render() {
|
|
118926
|
+
var _a2, _b2, _c, _d;
|
|
118927
|
+
return !this.abstract ? vue.h(this.as || this.tag, {
|
|
118928
|
+
class: `${this.mergedClsPrefix || defaultClsPrefix}-config-provider`
|
|
118929
|
+
}, (_b2 = (_a2 = this.$slots).default) === null || _b2 === void 0 ? void 0 : _b2.call(_a2)) : (_d = (_c = this.$slots).default) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
118930
|
+
}
|
|
118931
|
+
});
|
|
119039
118932
|
const commonVariables = {
|
|
119040
118933
|
padding: "4px 0",
|
|
119041
118934
|
optionIconSizeSmall: "14px",
|
|
@@ -120513,6 +120406,316 @@ const NSkeleton = vue.defineComponent({
|
|
|
120513
120406
|
return child;
|
|
120514
120407
|
}
|
|
120515
120408
|
});
|
|
120409
|
+
const _hoisted_1$4$1 = { class: "toolbar-icon" };
|
|
120410
|
+
const _hoisted_2$3$1 = ["innerHTML"];
|
|
120411
|
+
const _sfc_main$5$1 = {
|
|
120412
|
+
__name: "ToolbarButtonIcon",
|
|
120413
|
+
props: {
|
|
120414
|
+
name: {
|
|
120415
|
+
type: String,
|
|
120416
|
+
required: true
|
|
120417
|
+
},
|
|
120418
|
+
color: {
|
|
120419
|
+
type: String,
|
|
120420
|
+
default: null
|
|
120421
|
+
},
|
|
120422
|
+
icon: {
|
|
120423
|
+
type: String,
|
|
120424
|
+
default: null
|
|
120425
|
+
}
|
|
120426
|
+
},
|
|
120427
|
+
setup(__props) {
|
|
120428
|
+
const props = __props;
|
|
120429
|
+
const getBarColor = vue.computed(() => {
|
|
120430
|
+
if (props.name === "color") return { backgroundColor: props.color || "#111111" };
|
|
120431
|
+
if (props.name === "highlight") return { backgroundColor: props.color || "#D6D6D6" };
|
|
120432
|
+
});
|
|
120433
|
+
const hasColorBar = vue.computed(() => {
|
|
120434
|
+
return ["color", "highlight"].includes(props.name);
|
|
120435
|
+
});
|
|
120436
|
+
return (_ctx, _cache) => {
|
|
120437
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4$1, [
|
|
120438
|
+
vue.createBaseVNode("div", {
|
|
120439
|
+
class: vue.normalizeClass(["toolbar-icon__icon", [`toolbar-icon__icon--${props.name}`]]),
|
|
120440
|
+
innerHTML: __props.icon
|
|
120441
|
+
}, null, 10, _hoisted_2$3$1),
|
|
120442
|
+
hasColorBar.value ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
120443
|
+
key: 0,
|
|
120444
|
+
class: "color-bar",
|
|
120445
|
+
style: vue.normalizeStyle(getBarColor.value)
|
|
120446
|
+
}, null, 4)) : vue.createCommentVNode("", true)
|
|
120447
|
+
]);
|
|
120448
|
+
};
|
|
120449
|
+
}
|
|
120450
|
+
};
|
|
120451
|
+
const ToolbarButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$5$1, [["__scopeId", "data-v-6d7523ab"]]);
|
|
120452
|
+
const _hoisted_1$3$1 = ["role", "aria-label", "onKeydown"];
|
|
120453
|
+
const _hoisted_2$2$1 = ["data-item"];
|
|
120454
|
+
const _hoisted_3$2$1 = {
|
|
120455
|
+
key: 1,
|
|
120456
|
+
class: "button-label"
|
|
120457
|
+
};
|
|
120458
|
+
const _hoisted_4$1$1 = { key: 2 };
|
|
120459
|
+
const _hoisted_5$4 = ["onKeydown", "id"];
|
|
120460
|
+
const _hoisted_6$2 = ["placeholder", "onKeydown", "id"];
|
|
120461
|
+
const _hoisted_7$1 = ["innerHTML"];
|
|
120462
|
+
const _hoisted_8$1 = {
|
|
120463
|
+
"aria-live": "polite",
|
|
120464
|
+
class: "visually-hidden"
|
|
120465
|
+
};
|
|
120466
|
+
const _sfc_main$4$1 = {
|
|
120467
|
+
__name: "ToolbarButton",
|
|
120468
|
+
props: {
|
|
120469
|
+
iconColor: {
|
|
120470
|
+
type: String,
|
|
120471
|
+
default: null
|
|
120472
|
+
},
|
|
120473
|
+
active: {
|
|
120474
|
+
type: Boolean,
|
|
120475
|
+
default: false
|
|
120476
|
+
},
|
|
120477
|
+
isNarrow: {
|
|
120478
|
+
type: Boolean,
|
|
120479
|
+
default: false
|
|
120480
|
+
},
|
|
120481
|
+
isWide: {
|
|
120482
|
+
type: Boolean,
|
|
120483
|
+
default: false
|
|
120484
|
+
},
|
|
120485
|
+
toolbarItem: {
|
|
120486
|
+
type: Object,
|
|
120487
|
+
required: true
|
|
120488
|
+
},
|
|
120489
|
+
defaultLabel: {
|
|
120490
|
+
type: String,
|
|
120491
|
+
default: null
|
|
120492
|
+
},
|
|
120493
|
+
isOverflowItem: {
|
|
120494
|
+
type: Boolean,
|
|
120495
|
+
default: false
|
|
120496
|
+
}
|
|
120497
|
+
},
|
|
120498
|
+
emits: ["buttonClick", "textSubmit"],
|
|
120499
|
+
setup(__props, { emit: __emit }) {
|
|
120500
|
+
const emit = __emit;
|
|
120501
|
+
const props = __props;
|
|
120502
|
+
const {
|
|
120503
|
+
name,
|
|
120504
|
+
active,
|
|
120505
|
+
icon,
|
|
120506
|
+
label,
|
|
120507
|
+
hideLabel,
|
|
120508
|
+
iconColor,
|
|
120509
|
+
hasCaret,
|
|
120510
|
+
disabled,
|
|
120511
|
+
inlineTextInputVisible,
|
|
120512
|
+
hasInlineTextInput,
|
|
120513
|
+
minWidth,
|
|
120514
|
+
style: style2,
|
|
120515
|
+
attributes
|
|
120516
|
+
} = props.toolbarItem;
|
|
120517
|
+
const inlineTextInput = vue.ref(label);
|
|
120518
|
+
const inlineInput = vue.ref(null);
|
|
120519
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
120520
|
+
const handleClick2 = () => {
|
|
120521
|
+
if (hasInlineTextInput) {
|
|
120522
|
+
vue.nextTick(() => {
|
|
120523
|
+
inlineInput.value?.focus();
|
|
120524
|
+
inlineInput.value?.select();
|
|
120525
|
+
});
|
|
120526
|
+
}
|
|
120527
|
+
emit("buttonClick");
|
|
120528
|
+
};
|
|
120529
|
+
const handleInputSubmit = () => {
|
|
120530
|
+
const value = inlineTextInput.value;
|
|
120531
|
+
const cleanValue = value.match(/^\d+(\.5)?$/) ? value : Math.floor(parseFloat(value)).toString();
|
|
120532
|
+
emit("textSubmit", cleanValue);
|
|
120533
|
+
inlineTextInput.value = cleanValue;
|
|
120534
|
+
};
|
|
120535
|
+
const getStyle = vue.computed(() => {
|
|
120536
|
+
if (style2.value) return style2.value;
|
|
120537
|
+
return {
|
|
120538
|
+
minWidth: props.minWidth
|
|
120539
|
+
};
|
|
120540
|
+
});
|
|
120541
|
+
const caretIcon = vue.computed(() => {
|
|
120542
|
+
return active.value ? toolbarIcons.dropdownCaretUp : toolbarIcons.dropdownCaretDown;
|
|
120543
|
+
});
|
|
120544
|
+
return (_ctx, _cache) => {
|
|
120545
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
120546
|
+
class: vue.normalizeClass(["toolbar-item", vue.unref(attributes).className]),
|
|
120547
|
+
style: vue.normalizeStyle(getStyle.value),
|
|
120548
|
+
role: __props.isOverflowItem ? "menuitem" : "button",
|
|
120549
|
+
"aria-label": vue.unref(attributes).ariaLabel,
|
|
120550
|
+
onClick: handleClick2,
|
|
120551
|
+
onKeydown: vue.withKeys(vue.withModifiers(handleClick2, ["stop"]), ["enter"]),
|
|
120552
|
+
tabindex: "0"
|
|
120553
|
+
}, [
|
|
120554
|
+
vue.createBaseVNode("div", {
|
|
120555
|
+
class: vue.normalizeClass(["toolbar-button", {
|
|
120556
|
+
active: vue.unref(active),
|
|
120557
|
+
disabled: vue.unref(disabled),
|
|
120558
|
+
narrow: __props.isNarrow,
|
|
120559
|
+
wide: __props.isWide,
|
|
120560
|
+
"has-inline-text-input": vue.unref(hasInlineTextInput),
|
|
120561
|
+
"high-contrast": vue.unref(isHighContrastMode2)
|
|
120562
|
+
}]),
|
|
120563
|
+
"data-item": `btn-${vue.unref(name) || ""}`
|
|
120564
|
+
}, [
|
|
120565
|
+
vue.unref(icon) ? (vue.openBlock(), vue.createBlock(ToolbarButtonIcon, {
|
|
120566
|
+
key: 0,
|
|
120567
|
+
color: vue.unref(iconColor),
|
|
120568
|
+
class: "toolbar-icon",
|
|
120569
|
+
icon: vue.unref(icon),
|
|
120570
|
+
name: vue.unref(name)
|
|
120571
|
+
}, null, 8, ["color", "icon", "name"])) : vue.createCommentVNode("", true),
|
|
120572
|
+
vue.unref(label) && !vue.unref(hideLabel) && !vue.unref(inlineTextInputVisible) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2$1, vue.toDisplayString(vue.unref(label)), 1)) : vue.createCommentVNode("", true),
|
|
120573
|
+
vue.unref(inlineTextInputVisible) ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$1$1, [
|
|
120574
|
+
vue.unref(name) === "fontSize" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
120575
|
+
key: 0,
|
|
120576
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inlineTextInput.value = $event),
|
|
120577
|
+
onKeydown: vue.withKeys(vue.withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
120578
|
+
type: "text",
|
|
120579
|
+
class: vue.normalizeClass(["button-text-input button-text-input--font-size", { "high-contrast": vue.unref(isHighContrastMode2) }]),
|
|
120580
|
+
id: "inlineTextInput-" + vue.unref(name),
|
|
120581
|
+
autocomplete: "off",
|
|
120582
|
+
ref_key: "inlineInput",
|
|
120583
|
+
ref: inlineInput
|
|
120584
|
+
}, null, 42, _hoisted_5$4)), [
|
|
120585
|
+
[vue.vModelText, inlineTextInput.value]
|
|
120586
|
+
]) : vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
|
|
120587
|
+
key: 1,
|
|
120588
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => inlineTextInput.value = $event),
|
|
120589
|
+
placeholder: vue.unref(label),
|
|
120590
|
+
onKeydown: vue.withKeys(vue.withModifiers(handleInputSubmit, ["prevent"]), ["enter"]),
|
|
120591
|
+
type: "text",
|
|
120592
|
+
class: "button-text-input",
|
|
120593
|
+
id: "inlineTextInput-" + vue.unref(name),
|
|
120594
|
+
autocomplete: "off",
|
|
120595
|
+
ref_key: "inlineInput",
|
|
120596
|
+
ref: inlineInput
|
|
120597
|
+
}, null, 40, _hoisted_6$2)), [
|
|
120598
|
+
[vue.vModelText, inlineTextInput.value]
|
|
120599
|
+
])
|
|
120600
|
+
])) : vue.createCommentVNode("", true),
|
|
120601
|
+
vue.unref(hasCaret) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
120602
|
+
key: 3,
|
|
120603
|
+
class: "dropdown-caret",
|
|
120604
|
+
innerHTML: caretIcon.value,
|
|
120605
|
+
style: vue.normalizeStyle({ opacity: vue.unref(disabled) ? 0.6 : 1 })
|
|
120606
|
+
}, null, 12, _hoisted_7$1)) : vue.createCommentVNode("", true),
|
|
120607
|
+
vue.createBaseVNode("div", _hoisted_8$1, vue.toDisplayString(`${vue.unref(attributes).ariaLabel} ${vue.unref(active) ? "selected" : "unset"}`), 1)
|
|
120608
|
+
], 10, _hoisted_2$2$1)
|
|
120609
|
+
], 46, _hoisted_1$3$1);
|
|
120610
|
+
};
|
|
120611
|
+
}
|
|
120612
|
+
};
|
|
120613
|
+
const ToolbarButton = /* @__PURE__ */ _export_sfc(_sfc_main$4$1, [["__scopeId", "data-v-ea93b080"]]);
|
|
120614
|
+
const _hoisted_1$2$1 = {
|
|
120615
|
+
class: "toolbar-separator",
|
|
120616
|
+
role: "separator",
|
|
120617
|
+
"aria-label": "Toolbar separator"
|
|
120618
|
+
};
|
|
120619
|
+
const _sfc_main$3$1 = {
|
|
120620
|
+
__name: "ToolbarSeparator",
|
|
120621
|
+
props: {
|
|
120622
|
+
active: {
|
|
120623
|
+
type: Boolean,
|
|
120624
|
+
default: false
|
|
120625
|
+
}
|
|
120626
|
+
},
|
|
120627
|
+
emits: ["command"],
|
|
120628
|
+
setup(__props, { emit: __emit }) {
|
|
120629
|
+
const { isHighContrastMode: isHighContrastMode2 } = useHighContrastMode();
|
|
120630
|
+
const getSeparatorColor = () => {
|
|
120631
|
+
if (isHighContrastMode2.value) {
|
|
120632
|
+
return "#000";
|
|
120633
|
+
}
|
|
120634
|
+
return "#dbdbdb";
|
|
120635
|
+
};
|
|
120636
|
+
return (_ctx, _cache) => {
|
|
120637
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2$1, [
|
|
120638
|
+
vue.createBaseVNode("div", {
|
|
120639
|
+
class: "separator-inner",
|
|
120640
|
+
style: vue.normalizeStyle({ backgroundColor: getSeparatorColor() })
|
|
120641
|
+
}, null, 4)
|
|
120642
|
+
]);
|
|
120643
|
+
};
|
|
120644
|
+
}
|
|
120645
|
+
};
|
|
120646
|
+
const ToolbarSeparator = /* @__PURE__ */ _export_sfc(_sfc_main$3$1, [["__scopeId", "data-v-4ef9aa18"]]);
|
|
120647
|
+
const _hoisted_1$1$1 = { class: "overflow-menu" };
|
|
120648
|
+
const _hoisted_2$1$1 = { class: "overflow-menu-trigger" };
|
|
120649
|
+
const _hoisted_3$1$1 = {
|
|
120650
|
+
key: 0,
|
|
120651
|
+
class: "overflow-menu_items",
|
|
120652
|
+
role: "group"
|
|
120653
|
+
};
|
|
120654
|
+
const _sfc_main$2$1 = {
|
|
120655
|
+
__name: "OverflowMenu",
|
|
120656
|
+
props: {
|
|
120657
|
+
toolbarItem: {
|
|
120658
|
+
type: Object,
|
|
120659
|
+
required: true
|
|
120660
|
+
},
|
|
120661
|
+
overflowItems: {
|
|
120662
|
+
type: Array,
|
|
120663
|
+
required: true
|
|
120664
|
+
}
|
|
120665
|
+
},
|
|
120666
|
+
emits: ["buttonClick", "close"],
|
|
120667
|
+
setup(__props, { emit: __emit }) {
|
|
120668
|
+
const { proxy } = vue.getCurrentInstance();
|
|
120669
|
+
const emit = __emit;
|
|
120670
|
+
const props = __props;
|
|
120671
|
+
const isOverflowMenuOpened = vue.computed(() => props.toolbarItem.expand.value);
|
|
120672
|
+
const hasOpenDropdown = vue.ref(false);
|
|
120673
|
+
const overflowToolbarItem = vue.computed(() => ({
|
|
120674
|
+
...props.toolbarItem,
|
|
120675
|
+
active: isOverflowMenuOpened.value
|
|
120676
|
+
}));
|
|
120677
|
+
const toggleOverflowMenu = () => {
|
|
120678
|
+
emit("buttonClick", props.toolbarItem);
|
|
120679
|
+
};
|
|
120680
|
+
const handleCommand = ({ item, argument }) => {
|
|
120681
|
+
proxy.$toolbar.emitCommand({ item, argument });
|
|
120682
|
+
};
|
|
120683
|
+
const handleKeyDown2 = (e) => {
|
|
120684
|
+
if (e.key === "Escape") {
|
|
120685
|
+
if (isOverflowMenuOpened.value && !hasOpenDropdown.value) {
|
|
120686
|
+
e.preventDefault();
|
|
120687
|
+
emit("close");
|
|
120688
|
+
}
|
|
120689
|
+
}
|
|
120690
|
+
};
|
|
120691
|
+
vue.onMounted(() => {
|
|
120692
|
+
document.addEventListener("keydown", handleKeyDown2, true);
|
|
120693
|
+
});
|
|
120694
|
+
vue.onBeforeUnmount(() => {
|
|
120695
|
+
document.removeEventListener("keydown", handleKeyDown2, true);
|
|
120696
|
+
});
|
|
120697
|
+
return (_ctx, _cache) => {
|
|
120698
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1$1, [
|
|
120699
|
+
vue.createBaseVNode("div", _hoisted_2$1$1, [
|
|
120700
|
+
vue.createVNode(ToolbarButton, {
|
|
120701
|
+
"toolbar-item": overflowToolbarItem.value,
|
|
120702
|
+
onButtonClick: toggleOverflowMenu
|
|
120703
|
+
}, null, 8, ["toolbar-item"])
|
|
120704
|
+
]),
|
|
120705
|
+
isOverflowMenuOpened.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$1$1, [
|
|
120706
|
+
vue.createVNode(ButtonGroup, {
|
|
120707
|
+
class: "superdoc-toolbar-overflow",
|
|
120708
|
+
"toolbar-items": __props.overflowItems,
|
|
120709
|
+
"from-overflow": "",
|
|
120710
|
+
onCommand: handleCommand,
|
|
120711
|
+
onDropdownUpdateShow: _cache[0] || (_cache[0] = ($event) => hasOpenDropdown.value = $event)
|
|
120712
|
+
}, null, 8, ["toolbar-items"])
|
|
120713
|
+
])) : vue.createCommentVNode("", true)
|
|
120714
|
+
]);
|
|
120715
|
+
};
|
|
120716
|
+
}
|
|
120717
|
+
};
|
|
120718
|
+
const OverflowMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2$1, [["__scopeId", "data-v-ef28da92"]]);
|
|
120516
120719
|
const _hoisted_1$h = ["onKeydown", "tabindex", "data-item-id"];
|
|
120517
120720
|
const _hoisted_2$b = { key: 0 };
|
|
120518
120721
|
const _hoisted_3$9 = { key: 0 };
|
|
@@ -120528,6 +120731,16 @@ const _sfc_main$1$1 = {
|
|
|
120528
120731
|
type: Array,
|
|
120529
120732
|
default: () => []
|
|
120530
120733
|
},
|
|
120734
|
+
/**
|
|
120735
|
+
* The font-family to use for UI elements like dropdowns and tooltips.
|
|
120736
|
+
* This ensures consistent typography across toolbar UI components.
|
|
120737
|
+
* @type {string}
|
|
120738
|
+
* @default 'Arial, Helvetica, sans-serif'
|
|
120739
|
+
*/
|
|
120740
|
+
uiFontFamily: {
|
|
120741
|
+
type: String,
|
|
120742
|
+
default: "Arial, Helvetica, sans-serif"
|
|
120743
|
+
},
|
|
120531
120744
|
position: {
|
|
120532
120745
|
type: String,
|
|
120533
120746
|
default: "left"
|
|
@@ -120720,6 +120933,7 @@ const _sfc_main$1$1 = {
|
|
|
120720
120933
|
options: dropdownOptions(item),
|
|
120721
120934
|
trigger: item.disabled.value ? null : "click",
|
|
120722
120935
|
show: item.expand.value,
|
|
120936
|
+
"content-style": { fontFamily: props.uiFontFamily },
|
|
120723
120937
|
size: "medium",
|
|
120724
120938
|
placement: "bottom-start",
|
|
120725
120939
|
class: vue.normalizeClass(["toolbar-button toolbar-dropdown sd-editor-toolbar-dropdown", { "high-contrast": vue.unref(isHighContrastMode2) }]),
|
|
@@ -120727,14 +120941,16 @@ const _sfc_main$1$1 = {
|
|
|
120727
120941
|
onUpdateShow: handleDropdownUpdateShow,
|
|
120728
120942
|
style: vue.normalizeStyle(item.dropdownStyles.value),
|
|
120729
120943
|
"menu-props": () => ({
|
|
120730
|
-
role: "menu"
|
|
120944
|
+
role: "menu",
|
|
120945
|
+
style: { fontFamily: props.uiFontFamily }
|
|
120731
120946
|
}),
|
|
120732
120947
|
"node-props": (option) => getDropdownAttributes(option, item)
|
|
120733
120948
|
}, {
|
|
120734
120949
|
default: vue.withCtx(() => [
|
|
120735
120950
|
vue.createVNode(vue.unref(NTooltip), {
|
|
120736
120951
|
trigger: "hover",
|
|
120737
|
-
disabled: !item.tooltip?.value
|
|
120952
|
+
disabled: !item.tooltip?.value,
|
|
120953
|
+
"content-style": { fontFamily: props.uiFontFamily }
|
|
120738
120954
|
}, {
|
|
120739
120955
|
trigger: vue.withCtx(() => [
|
|
120740
120956
|
vue.createVNode(ToolbarButton, {
|
|
@@ -120751,13 +120967,14 @@ const _sfc_main$1$1 = {
|
|
|
120751
120967
|
])
|
|
120752
120968
|
]),
|
|
120753
120969
|
_: 2
|
|
120754
|
-
}, 1032, ["disabled"])
|
|
120970
|
+
}, 1032, ["disabled", "content-style"])
|
|
120755
120971
|
]),
|
|
120756
120972
|
_: 2
|
|
120757
|
-
}, 1032, ["options", "trigger", "show", "class", "onSelect", "style", "node-props"])) : isButton(item) ? (vue.openBlock(), vue.createBlock(vue.unref(NTooltip), {
|
|
120973
|
+
}, 1032, ["options", "trigger", "show", "content-style", "class", "onSelect", "style", "menu-props", "node-props"])) : isButton(item) ? (vue.openBlock(), vue.createBlock(vue.unref(NTooltip), {
|
|
120758
120974
|
key: 2,
|
|
120759
120975
|
trigger: "hover",
|
|
120760
|
-
class: "sd-editor-toolbar-tooltip"
|
|
120976
|
+
class: "sd-editor-toolbar-tooltip",
|
|
120977
|
+
"content-style": { fontFamily: props.uiFontFamily }
|
|
120761
120978
|
}, {
|
|
120762
120979
|
trigger: vue.withCtx(() => [
|
|
120763
120980
|
vue.createVNode(ToolbarButton, {
|
|
@@ -120774,7 +120991,7 @@ const _sfc_main$1$1 = {
|
|
|
120774
120991
|
])) : vue.createCommentVNode("", true)
|
|
120775
120992
|
]),
|
|
120776
120993
|
_: 2
|
|
120777
|
-
},
|
|
120994
|
+
}, 1032, ["content-style"])) : vue.createCommentVNode("", true),
|
|
120778
120995
|
isOverflow(item) && __props.overflowItems.length ? (vue.openBlock(), vue.createBlock(OverflowMenu, {
|
|
120779
120996
|
key: 3,
|
|
120780
120997
|
"toolbar-item": item,
|
|
@@ -120788,13 +121005,21 @@ const _sfc_main$1$1 = {
|
|
|
120788
121005
|
};
|
|
120789
121006
|
}
|
|
120790
121007
|
};
|
|
120791
|
-
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-
|
|
121008
|
+
const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-f732136c"]]);
|
|
121009
|
+
const DEFAULT_UI_FONT_FAMILY = "Arial, Helvetica, sans-serif";
|
|
120792
121010
|
const _sfc_main$j = {
|
|
120793
121011
|
__name: "Toolbar",
|
|
120794
121012
|
emits: ["command", "toggle", "select"],
|
|
120795
121013
|
setup(__props, { emit: __emit }) {
|
|
120796
121014
|
const { proxy } = vue.getCurrentInstance();
|
|
120797
121015
|
let toolbarKey = vue.ref(1);
|
|
121016
|
+
const uiFontFamily = vue.computed(() => {
|
|
121017
|
+
const configured = proxy?.$toolbar?.config?.uiDisplayFallbackFont;
|
|
121018
|
+
if (typeof configured === "string" && configured.trim()) {
|
|
121019
|
+
return configured.trim();
|
|
121020
|
+
}
|
|
121021
|
+
return DEFAULT_UI_FONT_FAMILY;
|
|
121022
|
+
});
|
|
120798
121023
|
const showLeftSide = proxy.$toolbar.config?.toolbarGroups?.includes("left");
|
|
120799
121024
|
const showRightSide = proxy.$toolbar.config?.toolbarGroups?.includes("right");
|
|
120800
121025
|
const excludeButtonsList = proxy.$toolbar.config?.toolbarButtonsExclude || [];
|
|
@@ -120841,37 +121066,48 @@ const _sfc_main$j = {
|
|
|
120841
121066
|
"aria-label": "Toolbar",
|
|
120842
121067
|
"data-editor-ui-surface": ""
|
|
120843
121068
|
}, [
|
|
120844
|
-
vue.
|
|
120845
|
-
|
|
120846
|
-
|
|
120847
|
-
|
|
120848
|
-
|
|
120849
|
-
|
|
120850
|
-
|
|
120851
|
-
|
|
120852
|
-
|
|
120853
|
-
|
|
120854
|
-
|
|
120855
|
-
|
|
120856
|
-
|
|
120857
|
-
|
|
120858
|
-
|
|
120859
|
-
|
|
120860
|
-
|
|
120861
|
-
|
|
120862
|
-
|
|
120863
|
-
|
|
120864
|
-
|
|
120865
|
-
|
|
120866
|
-
|
|
120867
|
-
|
|
120868
|
-
|
|
120869
|
-
|
|
121069
|
+
vue.createVNode(vue.unref(NConfigProvider), {
|
|
121070
|
+
abstract: "",
|
|
121071
|
+
"preflight-style-disabled": ""
|
|
121072
|
+
}, {
|
|
121073
|
+
default: vue.withCtx(() => [
|
|
121074
|
+
vue.unref(showLeftSide) ? (vue.openBlock(), vue.createBlock(ButtonGroup, {
|
|
121075
|
+
key: 0,
|
|
121076
|
+
tabindex: "0",
|
|
121077
|
+
"toolbar-items": getFilteredItems("left"),
|
|
121078
|
+
"ui-font-family": uiFontFamily.value,
|
|
121079
|
+
position: "left",
|
|
121080
|
+
onCommand: handleCommand,
|
|
121081
|
+
onItemClicked: restoreSelection2,
|
|
121082
|
+
class: "superdoc-toolbar-group-side"
|
|
121083
|
+
}, null, 8, ["toolbar-items", "ui-font-family"])) : vue.createCommentVNode("", true),
|
|
121084
|
+
vue.createVNode(ButtonGroup, {
|
|
121085
|
+
tabindex: "0",
|
|
121086
|
+
"toolbar-items": getFilteredItems("center"),
|
|
121087
|
+
"overflow-items": vue.unref(proxy).$toolbar.overflowItems,
|
|
121088
|
+
"ui-font-family": uiFontFamily.value,
|
|
121089
|
+
position: "center",
|
|
121090
|
+
onCommand: handleCommand,
|
|
121091
|
+
onItemClicked: restoreSelection2
|
|
121092
|
+
}, null, 8, ["toolbar-items", "overflow-items", "ui-font-family"]),
|
|
121093
|
+
vue.unref(showRightSide) ? (vue.openBlock(), vue.createBlock(ButtonGroup, {
|
|
121094
|
+
key: 1,
|
|
121095
|
+
tabindex: "0",
|
|
121096
|
+
"toolbar-items": getFilteredItems("right"),
|
|
121097
|
+
"ui-font-family": uiFontFamily.value,
|
|
121098
|
+
position: "right",
|
|
121099
|
+
onCommand: handleCommand,
|
|
121100
|
+
onItemClicked: restoreSelection2,
|
|
121101
|
+
class: "superdoc-toolbar-group-side"
|
|
121102
|
+
}, null, 8, ["toolbar-items", "ui-font-family"])) : vue.createCommentVNode("", true)
|
|
121103
|
+
]),
|
|
121104
|
+
_: 1
|
|
121105
|
+
})
|
|
120870
121106
|
]);
|
|
120871
121107
|
};
|
|
120872
121108
|
}
|
|
120873
121109
|
};
|
|
120874
|
-
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-
|
|
121110
|
+
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-c7a72aa9"]]);
|
|
120875
121111
|
const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
|
|
120876
121112
|
const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
|
|
120877
121113
|
async function baseInsightsFetch(payload, options = {}) {
|
|
@@ -121388,7 +121624,7 @@ const _sfc_main$i = {
|
|
|
121388
121624
|
};
|
|
121389
121625
|
}
|
|
121390
121626
|
};
|
|
121391
|
-
const AIWriter = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-
|
|
121627
|
+
const AIWriter = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-a4bc3d14"]]);
|
|
121392
121628
|
async function createZip(blobs, fileNames) {
|
|
121393
121629
|
const zip = new JSZip();
|
|
121394
121630
|
blobs.forEach((blob, index2) => {
|
|
@@ -124237,6 +124473,10 @@ const _SuperToolbar = class _SuperToolbar2 extends EventEmitter2 {
|
|
|
124237
124473
|
this.config.selector = this.config.element;
|
|
124238
124474
|
}
|
|
124239
124475
|
this.toolbarContainer = this.findElementBySelector(this.config.selector);
|
|
124476
|
+
if (this.toolbarContainer) {
|
|
124477
|
+
const uiFontFamily = (this.config?.uiDisplayFallbackFont || "").toString().trim() || "Arial, Helvetica, sans-serif";
|
|
124478
|
+
this.toolbarContainer.style.setProperty("--sd-ui-font-family", uiFontFamily);
|
|
124479
|
+
}
|
|
124240
124480
|
__privateMethod(this, _SuperToolbar_instances, initToolbarGroups_fn).call(this);
|
|
124241
124481
|
__privateMethod(this, _SuperToolbar_instances, makeToolbarItems_fn).call(this, {
|
|
124242
124482
|
superToolbar: this,
|