@stll/folio-vue 0.23.0 → 0.25.0
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/README.md +24 -0
- package/dist/ListButtons-B8HxA64I.cjs +4 -0
- package/dist/{ListButtons-DjLPhg8p.js → ListButtons-BeELtp_-.js} +201 -188
- package/dist/{SplitCellDialog-Id6nLwrR.js → SplitCellDialog-CSqbtDum.js} +748 -732
- package/dist/SplitCellDialog-DzKBu09z.cjs +15 -0
- package/dist/components/AnonymizationRectsOverlay.vue.d.ts +20 -0
- package/dist/components/AutocompleteCaretOverlay.vue.d.ts +4 -0
- package/dist/components/AutocompleteSuggestionOverlay.vue.d.ts +11 -0
- package/dist/components/CommentMarginMarkers.vue.d.ts +16 -0
- package/dist/components/ContentControlWidgetsOverlay.vue.d.ts +8 -0
- package/dist/components/DecorationLayer.vue.d.ts +12 -0
- package/dist/components/DocumentName.vue.d.ts +13 -0
- package/dist/components/DocumentOutline.vue.d.ts +28 -0
- package/dist/components/DocxEditor/DocxEditorDialogs.vue.d.ts +73 -0
- package/dist/components/DocxEditor/DocxEditorMenuBar.vue.d.ts +39 -0
- package/dist/components/DocxEditor/DocxEditorOverlays.vue.d.ts +42 -0
- package/dist/components/DocxEditor/types.d.ts +11 -4
- package/dist/components/DocxEditor.vue.d.ts +58 -0
- package/dist/components/EditingModeDropdown.vue.d.ts +11 -0
- package/dist/components/EditorToolbar.vue.d.ts +30 -0
- package/dist/components/FormattingBar.vue.d.ts +20 -0
- package/dist/components/HeaderFooterSelectionOverlay.vue.d.ts +12 -0
- package/dist/components/ImageContextMenu.vue.d.ts +24 -0
- package/dist/components/ImageSelectionOverlay.vue.d.ts +21 -0
- package/dist/components/InlineHeaderFooterEditor.vue.d.ts +15 -0
- package/dist/components/MenuBar.vue.d.ts +18 -0
- package/dist/components/PageIndicator.vue.d.ts +8 -0
- package/dist/components/PassageHighlightOverlay.vue.d.ts +16 -0
- package/dist/components/PrintButton.vue.d.ts +16 -0
- package/dist/components/ReviewControls.vue.d.ts +17 -0
- package/dist/components/TemplateDirectivesOverlay.vue.d.ts +15 -0
- package/dist/components/TextContextMenu.vue.d.ts +46 -0
- package/dist/components/TitleBar.vue.d.ts +17 -0
- package/dist/components/Toolbar.vue.d.ts +139 -0
- package/dist/components/UnifiedSidebar.vue.d.ts +55 -0
- package/dist/components/dialogs/FindReplaceDialog.vue.d.ts +20 -0
- package/dist/components/dialogs/FootnotePropertiesDialog.vue.d.ts +15 -0
- package/dist/components/dialogs/HyperlinkDialog.vue.d.ts +30 -0
- package/dist/components/dialogs/ImagePositionDialog.vue.d.ts +29 -0
- package/dist/components/dialogs/ImagePropertiesDialog.vue.d.ts +13 -0
- package/dist/components/dialogs/InsertImageDialog.vue.d.ts +21 -0
- package/dist/components/dialogs/InsertSymbolDialog.vue.d.ts +12 -0
- package/dist/components/dialogs/InsertTableDialog.vue.d.ts +22 -0
- package/dist/components/dialogs/PageSetupDialog.vue.d.ts +14 -0
- package/dist/components/dialogs/PasteSpecialDialog.vue.d.ts +16 -0
- package/dist/components/dialogs/SetNumberingValueDialog.vue.d.ts +12 -0
- package/dist/components/dialogs/SplitCellDialog.vue.d.ts +22 -0
- package/dist/components/dialogs/TablePropertiesDialog.vue.d.ts +15 -0
- package/dist/components/dialogs/WatermarkDialog.vue.d.ts +14 -0
- package/dist/components/dialogs/index.d.ts +13 -13
- package/dist/components/sidebar/AddCommentCard.vue.d.ts +9 -0
- package/dist/components/sidebar/Avatar.vue.d.ts +10 -0
- package/dist/components/sidebar/CommentCard.vue.d.ts +21 -0
- package/dist/components/sidebar/ReplyInput.vue.d.ts +7 -0
- package/dist/components/sidebar/ReplyThread.vue.d.ts +8 -0
- package/dist/components/sidebar/ResolvedCommentMarker.vue.d.ts +11 -0
- package/dist/components/sidebar/TrackedChangeCard.vue.d.ts +20 -0
- package/dist/components/ui/AlignmentButtons.vue.d.ts +15 -0
- package/dist/components/ui/Button.vue.d.ts +30 -0
- package/dist/components/ui/Checkbox.vue.d.ts +11 -0
- package/dist/components/ui/ColorPicker.vue.d.ts +30 -0
- package/dist/components/ui/DatePickerPopover.vue.d.ts +13 -0
- package/dist/components/ui/Dialog.vue.d.ts +28 -0
- package/dist/components/ui/FontPicker.vue.d.ts +21 -0
- package/dist/components/ui/FontSizePicker.vue.d.ts +27 -0
- package/dist/components/ui/HorizontalRuler.vue.d.ts +39 -0
- package/dist/components/ui/HyperlinkPopup.vue.d.ts +21 -0
- package/dist/components/ui/IconGridDropdown.vue.d.ts +32 -0
- package/dist/components/ui/ImageTransformDropdown.vue.d.ts +11 -0
- package/dist/components/ui/ImageWrapDropdown.vue.d.ts +15 -0
- package/dist/components/ui/Input.vue.d.ts +17 -0
- package/dist/components/ui/LineSpacingPicker.vue.d.ts +20 -0
- package/dist/components/ui/ListButtons.vue.d.ts +30 -0
- package/dist/components/ui/MaterialSymbol.vue.d.ts +13 -0
- package/dist/components/ui/MenuDropdown.vue.d.ts +42 -0
- package/dist/components/ui/OutlineRail.vue.d.ts +19 -0
- package/dist/components/ui/Popover.vue.d.ts +40 -0
- package/dist/components/ui/Select.vue.d.ts +15 -0
- package/dist/components/ui/StylePicker.vue.d.ts +16 -0
- package/dist/components/ui/TableBorderColorPicker.vue.d.ts +14 -0
- package/dist/components/ui/TableBorderPicker.vue.d.ts +11 -0
- package/dist/components/ui/TableBorderWidthPicker.vue.d.ts +10 -0
- package/dist/components/ui/TableCellFillPicker.vue.d.ts +14 -0
- package/dist/components/ui/TableGridInline.vue.d.ts +14 -0
- package/dist/components/ui/TableGridPicker.vue.d.ts +18 -0
- package/dist/components/ui/TableMoreDropdown.vue.d.ts +51 -0
- package/dist/components/ui/TableStyleGallery.vue.d.ts +10 -0
- package/dist/components/ui/TableToolbar.vue.d.ts +61 -0
- package/dist/components/ui/VerticalRuler.vue.d.ts +20 -0
- package/dist/components/ui/ZoomControl.vue.d.ts +12 -0
- package/dist/components/ui/icon-paths.json.d.ts +276 -0
- package/dist/composables/useDocxEditor.d.ts +3 -0
- package/dist/composables/useDocxEditorRefApi.d.ts +3 -0
- package/dist/composables/useFindReplace.d.ts +5 -1
- package/dist/composables/useFontLifecycle.d.ts +1 -0
- package/dist/composables.cjs +2 -2
- package/dist/composables.js +45 -44
- package/dist/dialogs.cjs +1 -1
- package/dist/dialogs.js +2 -5
- package/dist/folio-vue.css +1 -156
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1456 -1409
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +2 -2
- package/dist/useFindReplace-BbW0xWo7.js +74 -0
- package/dist/useFindReplace-neQmDh2i.cjs +1 -0
- package/dist/useZoom-B1miNAf_.cjs +1 -0
- package/dist/{useZoom-D8Wi1XkB.js → useZoom-Bw5gp69V.js} +262 -252
- package/dist/utils/embeddedFonts.d.ts +1 -1
- package/package.json +22 -10
- package/dist/ListButtons-DIWR-Q8d.cjs +0 -4
- package/dist/SplitCellDialog-B_z6ynxm.cjs +0 -15
- package/dist/useFindReplace-CL8Rbc3y.js +0 -59
- package/dist/useFindReplace-ZCrdvwEk.cjs +0 -1
- package/dist/useZoom-CkbPWZ64.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as e, F as t, N as n, P as r, y as i } from "./SplitCellDialog-
|
|
1
|
+
import { D as e, F as t, N as n, P as r, y as i } from "./SplitCellDialog-CSqbtDum.js";
|
|
2
2
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeProps as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onBeforeUnmount as v, onMounted as y, openBlock as b, reactive as x, ref as S, renderList as C, renderSlot as w, resolveDynamicComponent as T, toDisplayString as E, toRef as D, unref as O, vModelSelect as k, vModelText as A, watch as j, withCtx as M, withDirectives as N, withKeys as P, withModifiers as F } from "vue";
|
|
3
3
|
import { NO_LIST_STATE as I, listStateLevel as L } from "@stll/folio-core/prosemirror";
|
|
4
4
|
import { getTableContext as R } from "@stll/folio-core/prosemirror/extensions/nodes/TableExtension";
|
|
@@ -6,14 +6,15 @@ import { extractSelectionContext as z } from "@stll/folio-core/prosemirror/plugi
|
|
|
6
6
|
import { PANEL_METRICS as B } from "@stll/folio-core/panel-layout";
|
|
7
7
|
import { createRenderedDomContext as V } from "@stll/folio-core/render-dom/RenderedDomContext";
|
|
8
8
|
import { commentAnchorSelector as H, indexCommentAnchors as U } from "@stll/folio-core/render-dom/commentAnchorAttributes";
|
|
9
|
-
import {
|
|
10
|
-
import { DISPLAY_MODES as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
9
|
+
import { sliceText as W } from "@stll/folio-core/utils/sliceText";
|
|
10
|
+
import { DISPLAY_MODES as G } from "@stll/folio-core/managers/EditorModeManager";
|
|
11
|
+
import { pixelsToTwips as ee, twipsToPixels as K } from "@stll/folio-core/utils/units";
|
|
12
|
+
import { redoDepth as te, undoDepth as q } from "prosemirror-history";
|
|
13
|
+
import { clearFormatting as J } from "@stll/folio-core/prosemirror/commands/formatting";
|
|
14
|
+
import { executeEditorCommand as Y } from "@stll/folio-core/prosemirror/executeEditorCommand";
|
|
15
|
+
import { resolveSidebarItemPositions as X } from "@stll/folio-core/render-dom/resolveSidebarItemPositions";
|
|
15
16
|
//#region src/components/CommentMarginMarkers.vue?vue&type=script&setup=true&lang.ts
|
|
16
|
-
var
|
|
17
|
+
var ne = ["title", "onClick"], Z = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
17
18
|
__name: "CommentMarginMarkers",
|
|
18
19
|
props: {
|
|
19
20
|
comments: {},
|
|
@@ -63,12 +64,12 @@ var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
63
64
|
}, [f(r, {
|
|
64
65
|
name: n.isResolved ? "chat_bubble_check" : "chat_bubble_outline",
|
|
65
66
|
size: 18
|
|
66
|
-
}, null, 8, ["name"])], 12,
|
|
67
|
+
}, null, 8, ["name"])], 12, ne))), 128))], 36)) : c("", !0);
|
|
67
68
|
}
|
|
68
|
-
}), [["__scopeId", "data-v-bf75a017"]]),
|
|
69
|
+
}), [["__scopeId", "data-v-bf75a017"]]), re = { class: "doc-name" }, ie = ["value"], ae = {
|
|
69
70
|
key: 1,
|
|
70
71
|
class: "doc-name__text"
|
|
71
|
-
},
|
|
72
|
+
}, oe = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
72
73
|
__name: "DocumentName",
|
|
73
74
|
props: {
|
|
74
75
|
modelValue: {},
|
|
@@ -90,16 +91,16 @@ var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
90
91
|
let t = e.target;
|
|
91
92
|
t instanceof HTMLInputElement && (t.value.trim() || r("update:modelValue", "Untitled document.docx"));
|
|
92
93
|
}
|
|
93
|
-
return (t, n) => (b(), l("div",
|
|
94
|
+
return (t, n) => (b(), l("div", re, [e.editable ? (b(), l("input", {
|
|
94
95
|
key: 0,
|
|
95
96
|
class: "doc-name__input",
|
|
96
97
|
value: i.value,
|
|
97
98
|
placeholder: "Untitled document",
|
|
98
99
|
onInput: a,
|
|
99
100
|
onBlur: s
|
|
100
|
-
}, null, 40,
|
|
101
|
+
}, null, 40, ie)) : (b(), l("span", ae, E(i.value || "Untitled document"), 1))]));
|
|
101
102
|
}
|
|
102
|
-
}), [["__scopeId", "data-v-ae6cb472"]]),
|
|
103
|
+
}), [["__scopeId", "data-v-ae6cb472"]]), se = ["aria-selected", "onMouseenter"], ce = { class: "docx-table-grid-inline__label" }, Q = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
103
104
|
__name: "TableGridInline",
|
|
104
105
|
props: {
|
|
105
106
|
gridRows: { default: 6 },
|
|
@@ -135,7 +136,7 @@ var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
135
136
|
i.value = e.r, s.value = e.c;
|
|
136
137
|
},
|
|
137
138
|
onClick: F(d, ["prevent"])
|
|
138
|
-
}, null, 42,
|
|
139
|
+
}, null, 42, se))), 128))], 36), u("div", ce, E(i.value > 0 && s.value > 0 ? `${s.value} × ${i.value}` : "Select size"), 1)]));
|
|
139
140
|
}
|
|
140
141
|
}), [["__scopeId", "data-v-79c593ca"]]), le = {
|
|
141
142
|
class: "menu-bar",
|
|
@@ -252,7 +253,7 @@ var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
252
253
|
label: O(h)("toolbar.insert"),
|
|
253
254
|
items: y.value
|
|
254
255
|
}, {
|
|
255
|
-
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(
|
|
256
|
+
submenu: M(({ item: e, closeMenu: t }) => [e.key === "table" ? (b(), s(Q, {
|
|
256
257
|
key: 0,
|
|
257
258
|
onInsert: (e, n) => {
|
|
258
259
|
m("insert-table", e, n), t();
|
|
@@ -277,13 +278,13 @@ var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
277
278
|
}, null, 8, ["label", "items"])) : c("", !0)
|
|
278
279
|
]));
|
|
279
280
|
}
|
|
280
|
-
}), [["__scopeId", "data-v-bd3f3f2c"]]),
|
|
281
|
+
}), [["__scopeId", "data-v-bd3f3f2c"]]), $ = [
|
|
281
282
|
"disabled",
|
|
282
283
|
"aria-label",
|
|
283
284
|
"title",
|
|
284
285
|
"aria-expanded",
|
|
285
286
|
"onClick"
|
|
286
|
-
],
|
|
287
|
+
], pe = { class: "docx-icon-grid__panel" }, me = ["title", "onClick"], he = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
287
288
|
__name: "IconGridDropdown",
|
|
288
289
|
props: {
|
|
289
290
|
options: {},
|
|
@@ -319,8 +320,8 @@ var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
319
320
|
}, null, 8, ["name"]), f(r, {
|
|
320
321
|
name: "arrow_drop_down",
|
|
321
322
|
size: 14
|
|
322
|
-
})], 10,
|
|
323
|
-
panel: M(() => [u("div",
|
|
323
|
+
})], 10, $)]),
|
|
324
|
+
panel: M(() => [u("div", pe, [(b(!0), l(a, null, C(e.options, (t) => (b(), l("button", {
|
|
324
325
|
key: t.value,
|
|
325
326
|
type: "button",
|
|
326
327
|
class: g(["docx-icon-grid__option", { "docx-icon-grid__option--active": e.activeValue === t.value }]),
|
|
@@ -589,7 +590,7 @@ var X = ["title", "onClick"], ne = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
|
589
590
|
panel: M(() => [u("div", {
|
|
590
591
|
class: "review-controls__panel",
|
|
591
592
|
onMousedown: n[3] ||= F(() => {}, ["prevent"])
|
|
592
|
-
}, [(b(!0), l(a, null, C(O(
|
|
593
|
+
}, [(b(!0), l(a, null, C(O(G), (t) => (b(), l("button", {
|
|
593
594
|
key: t,
|
|
594
595
|
type: "button",
|
|
595
596
|
class: "review-controls__option",
|
|
@@ -1045,10 +1046,10 @@ var Ze = {
|
|
|
1045
1046
|
inInsertion: !1,
|
|
1046
1047
|
inDeletion: !1
|
|
1047
1048
|
};
|
|
1048
|
-
}),
|
|
1049
|
+
}), ee = o(() => {
|
|
1049
1050
|
let e = G.value.textFormatting.fontFamily;
|
|
1050
1051
|
return e?.ascii || e?.hAnsi || "Arial";
|
|
1051
|
-
}),
|
|
1052
|
+
}), K = o(() => {
|
|
1052
1053
|
let e = G.value.textFormatting.fontSize;
|
|
1053
1054
|
return e ? e / 2 : 11;
|
|
1054
1055
|
}), X = o(() => G.value.paragraphFormatting.alignment || "left"), ne = o(() => {
|
|
@@ -1065,11 +1066,11 @@ var Ze = {
|
|
|
1065
1066
|
}), ie = o(() => {
|
|
1066
1067
|
if (m.stateTick, m.canUndo !== void 0) return m.canUndo;
|
|
1067
1068
|
let e = m.view;
|
|
1068
|
-
return e ?
|
|
1069
|
+
return e ? q(e.state) > 0 : !1;
|
|
1069
1070
|
}), ae = o(() => {
|
|
1070
1071
|
if (m.stateTick, m.canRedo !== void 0) return m.canRedo;
|
|
1071
1072
|
let e = m.view;
|
|
1072
|
-
return e ?
|
|
1073
|
+
return e ? te(e.state) > 0 : !1;
|
|
1073
1074
|
}), oe = o(() => {
|
|
1074
1075
|
let e = G.value, t = L(e.listState) > 0, n = (e.paragraphFormatting.indentLeft ?? 0) > 0;
|
|
1075
1076
|
return t || n;
|
|
@@ -1079,43 +1080,43 @@ var Ze = {
|
|
|
1079
1080
|
}), ce = o(() => {
|
|
1080
1081
|
let e = G.value.textFormatting.highlight;
|
|
1081
1082
|
if (!(!e || e === "none")) return e.replace(/^#/, "").toUpperCase();
|
|
1082
|
-
}),
|
|
1083
|
+
}), Q = o(() => Pe(m.fontFamilies) ?? Le), le = o(() => Ie(m.documentFonts, Q.value.map((e) => e.name))), ue = o(() => [
|
|
1083
1084
|
{
|
|
1084
1085
|
label: h("font.documentFonts"),
|
|
1085
|
-
fonts:
|
|
1086
|
+
fonts: le.value
|
|
1086
1087
|
},
|
|
1087
1088
|
{
|
|
1088
1089
|
label: h("font.sansSerif"),
|
|
1089
|
-
fonts:
|
|
1090
|
+
fonts: Q.value.filter((e) => e.category === "sans-serif")
|
|
1090
1091
|
},
|
|
1091
1092
|
{
|
|
1092
1093
|
label: h("font.serif"),
|
|
1093
|
-
fonts:
|
|
1094
|
+
fonts: Q.value.filter((e) => e.category === "serif")
|
|
1094
1095
|
},
|
|
1095
1096
|
{
|
|
1096
1097
|
label: h("font.monospace"),
|
|
1097
|
-
fonts:
|
|
1098
|
+
fonts: Q.value.filter((e) => e.category === "monospace")
|
|
1098
1099
|
},
|
|
1099
1100
|
{
|
|
1100
1101
|
label: h("font.other"),
|
|
1101
|
-
fonts:
|
|
1102
|
+
fonts: Q.value.filter((e) => !e.category || e.category === "other")
|
|
1102
1103
|
}
|
|
1103
1104
|
]);
|
|
1104
|
-
function
|
|
1105
|
+
function de() {
|
|
1105
1106
|
if (m.onUndo) {
|
|
1106
1107
|
m.onUndo();
|
|
1107
1108
|
return;
|
|
1108
1109
|
}
|
|
1109
|
-
|
|
1110
|
+
$("undo");
|
|
1110
1111
|
}
|
|
1111
|
-
function
|
|
1112
|
+
function fe() {
|
|
1112
1113
|
if (m.onRedo) {
|
|
1113
1114
|
m.onRedo();
|
|
1114
1115
|
return;
|
|
1115
1116
|
}
|
|
1116
|
-
|
|
1117
|
+
$("redo");
|
|
1117
1118
|
}
|
|
1118
|
-
function
|
|
1119
|
+
function $(e, ...t) {
|
|
1119
1120
|
let n = m.view;
|
|
1120
1121
|
if (!n) return;
|
|
1121
1122
|
let r = m.getCommands()[e];
|
|
@@ -1123,38 +1124,38 @@ var Ze = {
|
|
|
1123
1124
|
typeof console < "u" && console.warn("[Toolbar] command not found:", e);
|
|
1124
1125
|
return;
|
|
1125
1126
|
}
|
|
1126
|
-
|
|
1127
|
+
Y(n, r(...t)), n.hasFocus() || n.focus(), V.value = null;
|
|
1127
1128
|
}
|
|
1128
|
-
function
|
|
1129
|
-
|
|
1129
|
+
function pe(e) {
|
|
1130
|
+
$("setFontFamily", e);
|
|
1130
1131
|
}
|
|
1131
|
-
let { onSizeFocus:
|
|
1132
|
-
currentFontSize:
|
|
1132
|
+
let { onSizeFocus: me, onSizeInput: he, commitFontSize: ve, pickFontSize: ye, increaseFontSize: be, decreaseFontSize: xe } = Ue({
|
|
1133
|
+
currentFontSize: K,
|
|
1133
1134
|
openDropdown: V,
|
|
1134
1135
|
recomputeDropdownPos: W,
|
|
1135
|
-
execCommand:
|
|
1136
|
+
execCommand: $
|
|
1136
1137
|
});
|
|
1137
|
-
function
|
|
1138
|
+
function Se(e) {
|
|
1138
1139
|
if (typeof e == "object" && e.auto) {
|
|
1139
|
-
|
|
1140
|
+
$("clearTextColor");
|
|
1140
1141
|
return;
|
|
1141
1142
|
}
|
|
1142
|
-
|
|
1143
|
+
$("setTextColor", typeof e == "string" ? { rgb: e } : e);
|
|
1143
1144
|
}
|
|
1144
|
-
function
|
|
1145
|
+
function Ce() {
|
|
1145
1146
|
let e = m.view;
|
|
1146
|
-
e && (
|
|
1147
|
+
e && (Y(e, J), e.hasFocus() || e.focus());
|
|
1148
|
+
}
|
|
1149
|
+
function we(e) {
|
|
1150
|
+
$("setHighlight", typeof e == "string" ? e : e.rgb ?? "none");
|
|
1147
1151
|
}
|
|
1148
1152
|
function Ee(e) {
|
|
1149
|
-
|
|
1153
|
+
v("apply-style", e), V.value = null;
|
|
1150
1154
|
}
|
|
1151
1155
|
function De(e) {
|
|
1152
|
-
|
|
1156
|
+
$("setLineSpacing", e);
|
|
1153
1157
|
}
|
|
1154
1158
|
function Oe(e) {
|
|
1155
|
-
Q("setLineSpacing", e);
|
|
1156
|
-
}
|
|
1157
|
-
function ke(e) {
|
|
1158
1159
|
let t = G.value.paragraphFormatting.lineSpacing;
|
|
1159
1160
|
return t ? Math.abs(t - e) < 10 : e === 240;
|
|
1160
1161
|
}
|
|
@@ -1163,13 +1164,13 @@ var Ze = {
|
|
|
1163
1164
|
title: O(h)("undoShortcut"),
|
|
1164
1165
|
"aria-label": O(h)("undo"),
|
|
1165
1166
|
disabled: !ie.value,
|
|
1166
|
-
onMousedown: F(
|
|
1167
|
+
onMousedown: F(de, ["prevent"])
|
|
1167
1168
|
}, [f(r, { name: "undo" })], 40, Qe),
|
|
1168
1169
|
u("button", {
|
|
1169
1170
|
title: O(h)("redoShortcut"),
|
|
1170
1171
|
"aria-label": O(h)("redo"),
|
|
1171
1172
|
disabled: !ae.value,
|
|
1172
|
-
onMousedown: F(
|
|
1173
|
+
onMousedown: F(fe, ["prevent"])
|
|
1173
1174
|
}, [f(r, { name: "redo" })], 40, $e),
|
|
1174
1175
|
n[43] ||= u("span", { class: "divider" }, null, -1),
|
|
1175
1176
|
k.value ? (b(), l("div", {
|
|
@@ -1233,7 +1234,7 @@ var Ze = {
|
|
|
1233
1234
|
}, [(b(!0), l(a, null, C(O(Z), (e) => (b(), l("button", {
|
|
1234
1235
|
key: e.id,
|
|
1235
1236
|
class: g(["toolbar-dropdown__item", { active: (G.value.paragraphFormatting.styleId || "Normal") === e.id }]),
|
|
1236
|
-
onMousedown: F((t) =>
|
|
1237
|
+
onMousedown: F((t) => Ee(e.id), ["prevent"])
|
|
1237
1238
|
}, [u("span", { style: _({ ...e.previewStyle }) }, E(e.label), 5)], 42, at))), 128))], 4)) : c("", !0)], 512),
|
|
1238
1239
|
n[45] ||= u("span", { class: "divider" }, null, -1),
|
|
1239
1240
|
u("div", {
|
|
@@ -1246,7 +1247,7 @@ var Ze = {
|
|
|
1246
1247
|
"aria-expanded": O(V) === "font",
|
|
1247
1248
|
"aria-haspopup": "listbox",
|
|
1248
1249
|
title: O(h)("font.selectAriaLabel")
|
|
1249
|
-
}, [d(E(
|
|
1250
|
+
}, [d(E(ee.value) + " ", 1), f(r, {
|
|
1250
1251
|
class: "chevron",
|
|
1251
1252
|
name: "arrow_drop_down",
|
|
1252
1253
|
size: 16
|
|
@@ -1254,11 +1255,11 @@ var Ze = {
|
|
|
1254
1255
|
key: 0,
|
|
1255
1256
|
style: _(O(H)),
|
|
1256
1257
|
class: "toolbar-dropdown__menu font-menu"
|
|
1257
|
-
}, [(b(!0), l(a, null, C(
|
|
1258
|
+
}, [(b(!0), l(a, null, C(ue.value, (e) => (b(), l(a, { key: e.label }, [e.fonts.length > 0 ? (b(), l("div", st, E(e.label), 1)) : c("", !0), (b(!0), l(a, null, C(e.fonts, (e) => (b(), l("button", {
|
|
1258
1259
|
key: e.name,
|
|
1259
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1260
|
+
class: g(["toolbar-dropdown__item", { active: ee.value === e.name }]),
|
|
1260
1261
|
style: _({ fontFamily: e.fontFamily }),
|
|
1261
|
-
onMousedown: F((t) =>
|
|
1262
|
+
onMousedown: F((t) => pe(e.name), ["prevent"])
|
|
1262
1263
|
}, E(e.name), 47, ct))), 128))], 64))), 128))], 4)) : c("", !0)], 512),
|
|
1263
1264
|
u("div", {
|
|
1264
1265
|
class: "toolbar-dropdown font-size-group",
|
|
@@ -1267,29 +1268,29 @@ var Ze = {
|
|
|
1267
1268
|
}, [
|
|
1268
1269
|
u("button", {
|
|
1269
1270
|
class: "size-btn",
|
|
1270
|
-
onMousedown: n[5] ||= F((...e) => O(
|
|
1271
|
+
onMousedown: n[5] ||= F((...e) => O(xe) && O(xe)(...e), ["prevent"]),
|
|
1271
1272
|
title: O(h)("decreaseFontSize")
|
|
1272
1273
|
}, " − ", 40, lt),
|
|
1273
1274
|
u("input", {
|
|
1274
1275
|
class: "size-trigger size-input",
|
|
1275
1276
|
type: "text",
|
|
1276
|
-
value:
|
|
1277
|
+
value: K.value,
|
|
1277
1278
|
title: O(h)("fontSize"),
|
|
1278
1279
|
onMousedown: n[6] ||= F(() => {}, ["stop"]),
|
|
1279
|
-
onFocus: n[7] ||= (...e) => O(
|
|
1280
|
+
onFocus: n[7] ||= (...e) => O(me) && O(me)(...e),
|
|
1280
1281
|
"aria-expanded": O(V) === "size",
|
|
1281
1282
|
"aria-haspopup": "listbox",
|
|
1282
|
-
onInput: n[8] ||= (...e) => O(
|
|
1283
|
+
onInput: n[8] ||= (...e) => O(he) && O(he)(...e),
|
|
1283
1284
|
onKeydown: [
|
|
1284
|
-
n[9] ||= P(F((e) => O(
|
|
1285
|
-
n[10] ||= P(F((e) => O(
|
|
1286
|
-
n[11] ||= P(F((e) => O(
|
|
1285
|
+
n[9] ||= P(F((e) => O(be)(), ["prevent", "stop"]), ["up"]),
|
|
1286
|
+
n[10] ||= P(F((e) => O(xe)(), ["prevent", "stop"]), ["down"]),
|
|
1287
|
+
n[11] ||= P(F((e) => O(ve)(e), ["prevent"]), ["enter"])
|
|
1287
1288
|
],
|
|
1288
|
-
onBlur: n[12] ||= (e) => O(
|
|
1289
|
+
onBlur: n[12] ||= (e) => O(ve)(e)
|
|
1289
1290
|
}, null, 40, ut),
|
|
1290
1291
|
u("button", {
|
|
1291
1292
|
class: "size-btn",
|
|
1292
|
-
onMousedown: n[13] ||= F((...e) => O(
|
|
1293
|
+
onMousedown: n[13] ||= F((...e) => O(be) && O(be)(...e), ["prevent"]),
|
|
1293
1294
|
title: O(h)("increaseFontSize")
|
|
1294
1295
|
}, " + ", 40, dt),
|
|
1295
1296
|
O(V) === "size" ? (b(), l("div", {
|
|
@@ -1298,8 +1299,8 @@ var Ze = {
|
|
|
1298
1299
|
class: "toolbar-dropdown__menu size-menu"
|
|
1299
1300
|
}, [(b(!0), l(a, null, C(O(Re), (e) => (b(), l("button", {
|
|
1300
1301
|
key: e,
|
|
1301
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1302
|
-
onMousedown: F((t) => O(
|
|
1302
|
+
class: g(["toolbar-dropdown__item", { active: K.value === e }]),
|
|
1303
|
+
onMousedown: F((t) => O(ye)(e), ["prevent"])
|
|
1303
1304
|
}, E(e), 43, ft))), 128))], 4)) : c("", !0)
|
|
1304
1305
|
], 512),
|
|
1305
1306
|
n[46] ||= u("span", { class: "divider" }, null, -1),
|
|
@@ -1307,37 +1308,37 @@ var Ze = {
|
|
|
1307
1308
|
title: O(h)("boldShortcut"),
|
|
1308
1309
|
"aria-label": O(h)("bold"),
|
|
1309
1310
|
class: g({ active: G.value.textFormatting.bold }),
|
|
1310
|
-
onMousedown: n[14] ||= F((e) =>
|
|
1311
|
+
onMousedown: n[14] ||= F((e) => $("toggleBold"), ["prevent"])
|
|
1311
1312
|
}, [f(r, { name: "format_bold" })], 42, pt),
|
|
1312
1313
|
u("button", {
|
|
1313
1314
|
title: O(h)("italicShortcut"),
|
|
1314
1315
|
"aria-label": O(h)("italic"),
|
|
1315
1316
|
class: g({ active: G.value.textFormatting.italic }),
|
|
1316
|
-
onMousedown: n[15] ||= F((e) =>
|
|
1317
|
+
onMousedown: n[15] ||= F((e) => $("toggleItalic"), ["prevent"])
|
|
1317
1318
|
}, [f(r, { name: "format_italic" })], 42, mt),
|
|
1318
1319
|
u("button", {
|
|
1319
1320
|
title: O(h)("underlineShortcut"),
|
|
1320
1321
|
"aria-label": O(h)("underline"),
|
|
1321
1322
|
class: g({ active: !!G.value.textFormatting.underline }),
|
|
1322
|
-
onMousedown: n[16] ||= F((e) =>
|
|
1323
|
+
onMousedown: n[16] ||= F((e) => $("toggleUnderline"), ["prevent"])
|
|
1323
1324
|
}, [f(r, { name: "format_underlined" })], 42, ht),
|
|
1324
1325
|
u("button", {
|
|
1325
1326
|
title: O(h)("formattingBar.strikethrough"),
|
|
1326
1327
|
"aria-label": O(h)("formattingBar.strikethrough"),
|
|
1327
1328
|
class: g({ active: G.value.textFormatting.strike }),
|
|
1328
|
-
onMousedown: n[17] ||= F((e) =>
|
|
1329
|
+
onMousedown: n[17] ||= F((e) => $("toggleStrike"), ["prevent"])
|
|
1329
1330
|
}, [f(r, { name: "strikethrough_s" })], 42, gt),
|
|
1330
1331
|
f(O(p), {
|
|
1331
1332
|
mode: "text",
|
|
1332
1333
|
value: se.value,
|
|
1333
1334
|
theme: e.theme ?? null,
|
|
1334
|
-
onChange:
|
|
1335
|
+
onChange: Se
|
|
1335
1336
|
}, null, 8, ["value", "theme"]),
|
|
1336
1337
|
f(O(p), {
|
|
1337
1338
|
mode: "highlight",
|
|
1338
1339
|
value: ce.value,
|
|
1339
1340
|
theme: e.theme ?? null,
|
|
1340
|
-
onChange:
|
|
1341
|
+
onChange: we
|
|
1341
1342
|
}, null, 8, ["value", "theme"]),
|
|
1342
1343
|
u("button", {
|
|
1343
1344
|
title: O(h)("formattingBar.insertLinkShortcut"),
|
|
@@ -1348,13 +1349,13 @@ var Ze = {
|
|
|
1348
1349
|
title: O(h)("formattingBar.superscriptShortcut"),
|
|
1349
1350
|
"aria-label": O(h)("formattingBar.superscript"),
|
|
1350
1351
|
class: g({ active: G.value.textFormatting.vertAlign === "superscript" }),
|
|
1351
|
-
onMousedown: n[19] ||= F((e) =>
|
|
1352
|
+
onMousedown: n[19] ||= F((e) => $("toggleSuperscript"), ["prevent"])
|
|
1352
1353
|
}, [f(r, { name: "superscript" })], 42, vt),
|
|
1353
1354
|
u("button", {
|
|
1354
1355
|
title: O(h)("formattingBar.subscriptShortcut"),
|
|
1355
1356
|
"aria-label": O(h)("formattingBar.subscript"),
|
|
1356
1357
|
class: g({ active: G.value.textFormatting.vertAlign === "subscript" }),
|
|
1357
|
-
onMousedown: n[20] ||= F((e) =>
|
|
1358
|
+
onMousedown: n[20] ||= F((e) => $("toggleSubscript"), ["prevent"])
|
|
1358
1359
|
}, [f(r, { name: "subscript" })], 42, yt),
|
|
1359
1360
|
n[47] ||= u("span", { class: "divider" }, null, -1),
|
|
1360
1361
|
u("div", {
|
|
@@ -1380,7 +1381,7 @@ var Ze = {
|
|
|
1380
1381
|
class: g(["align-strip__btn", { active: X.value === "left" }]),
|
|
1381
1382
|
title: `${O(h)("alignLeft")} (${O(h)("alignment.alignLeftShortcut")})`,
|
|
1382
1383
|
onMousedown: n[22] ||= F((e) => {
|
|
1383
|
-
|
|
1384
|
+
$("alignLeft"), V.value = null;
|
|
1384
1385
|
}, ["prevent"])
|
|
1385
1386
|
}, [f(r, {
|
|
1386
1387
|
name: "format_align_left",
|
|
@@ -1390,7 +1391,7 @@ var Ze = {
|
|
|
1390
1391
|
class: g(["align-strip__btn", { active: X.value === "center" }]),
|
|
1391
1392
|
title: `${O(h)("alignCenter")} (${O(h)("alignment.centerShortcut")})`,
|
|
1392
1393
|
onMousedown: n[23] ||= F((e) => {
|
|
1393
|
-
|
|
1394
|
+
$("alignCenter"), V.value = null;
|
|
1394
1395
|
}, ["prevent"])
|
|
1395
1396
|
}, [f(r, {
|
|
1396
1397
|
name: "format_align_center",
|
|
@@ -1400,7 +1401,7 @@ var Ze = {
|
|
|
1400
1401
|
class: g(["align-strip__btn", { active: X.value === "right" }]),
|
|
1401
1402
|
title: `${O(h)("alignRight")} (${O(h)("alignment.alignRightShortcut")})`,
|
|
1402
1403
|
onMousedown: n[24] ||= F((e) => {
|
|
1403
|
-
|
|
1404
|
+
$("alignRight"), V.value = null;
|
|
1404
1405
|
}, ["prevent"])
|
|
1405
1406
|
}, [f(r, {
|
|
1406
1407
|
name: "format_align_right",
|
|
@@ -1410,7 +1411,7 @@ var Ze = {
|
|
|
1410
1411
|
class: g(["align-strip__btn", { active: X.value === "both" }]),
|
|
1411
1412
|
title: `${O(h)("justify")} (${O(h)("alignment.justifyShortcut")})`,
|
|
1412
1413
|
onMousedown: n[25] ||= F((e) => {
|
|
1413
|
-
|
|
1414
|
+
$("alignJustify"), V.value = null;
|
|
1414
1415
|
}, ["prevent"])
|
|
1415
1416
|
}, [f(r, {
|
|
1416
1417
|
name: "format_align_justify",
|
|
@@ -1421,24 +1422,24 @@ var Ze = {
|
|
|
1421
1422
|
title: O(h)("bulletList"),
|
|
1422
1423
|
"aria-label": O(h)("bulletList"),
|
|
1423
1424
|
class: g({ active: G.value.listState.type === "bullet" }),
|
|
1424
|
-
onMousedown: n[26] ||= F((e) =>
|
|
1425
|
+
onMousedown: n[26] ||= F((e) => $("toggleBulletList"), ["prevent"])
|
|
1425
1426
|
}, [f(r, { name: "format_list_bulleted" })], 42, Tt),
|
|
1426
1427
|
u("button", {
|
|
1427
1428
|
title: O(h)("numberedList"),
|
|
1428
1429
|
"aria-label": O(h)("numberedList"),
|
|
1429
1430
|
class: g({ active: G.value.listState.type === "numbered" }),
|
|
1430
|
-
onMousedown: n[27] ||= F((e) =>
|
|
1431
|
+
onMousedown: n[27] ||= F((e) => $("toggleNumberedList"), ["prevent"])
|
|
1431
1432
|
}, [f(r, { name: "format_list_numbered" })], 42, Et),
|
|
1432
1433
|
u("button", {
|
|
1433
1434
|
title: O(h)("decreaseIndent"),
|
|
1434
1435
|
"aria-label": O(h)("decreaseIndent"),
|
|
1435
1436
|
disabled: !oe.value,
|
|
1436
|
-
onMousedown: n[28] ||= F((e) =>
|
|
1437
|
+
onMousedown: n[28] ||= F((e) => $("outdent"), ["prevent"])
|
|
1437
1438
|
}, [f(r, { name: "format_indent_decrease" })], 40, Dt),
|
|
1438
1439
|
u("button", {
|
|
1439
1440
|
title: O(h)("increaseIndent"),
|
|
1440
1441
|
"aria-label": O(h)("increaseIndent"),
|
|
1441
|
-
onMousedown: n[29] ||= F((e) =>
|
|
1442
|
+
onMousedown: n[29] ||= F((e) => $("indent"), ["prevent"])
|
|
1442
1443
|
}, [f(r, { name: "format_indent_increase" })], 40, Ot),
|
|
1443
1444
|
u("div", {
|
|
1444
1445
|
class: "toolbar-dropdown",
|
|
@@ -1460,13 +1461,13 @@ var Ze = {
|
|
|
1460
1461
|
class: "toolbar-dropdown__menu"
|
|
1461
1462
|
}, [(b(!0), l(a, null, C(O(Be), (e) => (b(), l("button", {
|
|
1462
1463
|
key: e.value,
|
|
1463
|
-
class: g(["toolbar-dropdown__item", { active:
|
|
1464
|
-
onMousedown: F((t) =>
|
|
1464
|
+
class: g(["toolbar-dropdown__item", { active: Oe(e.value) }]),
|
|
1465
|
+
onMousedown: F((t) => De(e.value), ["prevent"])
|
|
1465
1466
|
}, E(e.labelKey ? O(h)(e.labelKey) : e.label), 43, At))), 128))], 4)) : c("", !0)], 512),
|
|
1466
1467
|
u("button", {
|
|
1467
1468
|
title: O(h)("formattingBar.clearFormatting"),
|
|
1468
1469
|
"aria-label": O(h)("formattingBar.clearFormatting"),
|
|
1469
|
-
onMousedown: F(
|
|
1470
|
+
onMousedown: F(Ce, ["prevent"])
|
|
1470
1471
|
}, [f(r, { name: "format_clear" })], 40, jt),
|
|
1471
1472
|
n[48] ||= u("span", { class: "divider" }, null, -1),
|
|
1472
1473
|
e.outlineDrawer ? (b(), l("button", {
|
|
@@ -1558,10 +1559,10 @@ var Ze = {
|
|
|
1558
1559
|
setup(e, { emit: t }) {
|
|
1559
1560
|
let n = e, r = t, i = Math.round(qt * 1.6), s = S(null), d = S(null), f = S(null), p = S(0), m = S("");
|
|
1560
1561
|
function h(e) {
|
|
1561
|
-
return
|
|
1562
|
+
return K(e) * n.zoom;
|
|
1562
1563
|
}
|
|
1563
1564
|
function g(e) {
|
|
1564
|
-
return Math.round(
|
|
1565
|
+
return Math.round(ee(e / n.zoom));
|
|
1565
1566
|
}
|
|
1566
1567
|
let y = o(() => n.sectionProps?.pageWidth ?? Bt), x = o(() => n.sectionProps?.marginLeft ?? Vt), w = o(() => n.sectionProps?.marginRight ?? Vt), T = o(() => y.value - x.value - w.value), D = o(() => h(y.value)), O = o(() => h(x.value)), k = o(() => h(w.value)), A = o(() => h(n.indentLeft)), j = o(() => h(n.indentRight)), M = o(() => n.hangingIndent ? -n.firstLineIndent : n.firstLineIndent), N = o(() => h(M.value)), P = o(() => O.value + A.value), I = o(() => D.value - k.value - j.value), L = o(() => O.value + A.value + N.value), R = o(() => ({
|
|
1567
1568
|
position: "relative",
|
|
@@ -1645,10 +1646,10 @@ var Ze = {
|
|
|
1645
1646
|
function U(e) {
|
|
1646
1647
|
return n.unit === "cm" ? (e / Ut).toFixed(1) + " cm" : (e / Ht).toFixed(2) + "\"";
|
|
1647
1648
|
}
|
|
1648
|
-
function
|
|
1649
|
+
function W(e) {
|
|
1649
1650
|
return d.value === e ? Kt : f.value === e ? Gt : Wt;
|
|
1650
1651
|
}
|
|
1651
|
-
function
|
|
1652
|
+
function G(e, t, r) {
|
|
1652
1653
|
return {
|
|
1653
1654
|
position: "absolute",
|
|
1654
1655
|
left: t - qt + "px",
|
|
@@ -1773,27 +1774,27 @@ var Ze = {
|
|
|
1773
1774
|
e.showFirstLineIndent ? (b(), l("div", {
|
|
1774
1775
|
key: 0,
|
|
1775
1776
|
class: "docx-ruler-indent",
|
|
1776
|
-
style: _(
|
|
1777
|
+
style: _(G("down", L.value, d.value === "firstLineIndent")),
|
|
1777
1778
|
onMousedown: n[2] ||= F((t) => e.editable ? J("firstLineIndent", t) : null, ["prevent", "stop"]),
|
|
1778
1779
|
onMouseenter: n[3] ||= (e) => f.value = "firstLineIndent",
|
|
1779
1780
|
onMouseleave: n[4] ||= (e) => f.value = null
|
|
1780
|
-
}, [u("div", { style: _(te("down",
|
|
1781
|
+
}, [u("div", { style: _(te("down", W("firstLineIndent"))) }, null, 4)], 36)) : c("", !0),
|
|
1781
1782
|
e.editable ? (b(), l("div", {
|
|
1782
1783
|
key: 1,
|
|
1783
1784
|
class: "docx-ruler-indent",
|
|
1784
|
-
style: _(
|
|
1785
|
+
style: _(G("up", P.value, d.value === "leftIndent")),
|
|
1785
1786
|
onMousedown: n[5] ||= F((e) => J("leftIndent", e), ["prevent", "stop"]),
|
|
1786
1787
|
onMouseenter: n[6] ||= (e) => f.value = "leftIndent",
|
|
1787
1788
|
onMouseleave: n[7] ||= (e) => f.value = null
|
|
1788
|
-
}, [u("div", { style: _(te("up",
|
|
1789
|
+
}, [u("div", { style: _(te("up", W("leftIndent"))) }, null, 4)], 36)) : c("", !0),
|
|
1789
1790
|
e.editable ? (b(), l("div", {
|
|
1790
1791
|
key: 2,
|
|
1791
1792
|
class: "docx-ruler-indent",
|
|
1792
|
-
style: _(
|
|
1793
|
+
style: _(G("down", I.value, d.value === "rightIndent")),
|
|
1793
1794
|
onMousedown: n[8] ||= F((e) => J("rightIndent", e), ["prevent", "stop"]),
|
|
1794
1795
|
onMouseenter: n[9] ||= (e) => f.value = "rightIndent",
|
|
1795
1796
|
onMouseleave: n[10] ||= (e) => f.value = null
|
|
1796
|
-
}, [u("div", { style: _(te("down",
|
|
1797
|
+
}, [u("div", { style: _(te("down", W("rightIndent"))) }, null, 4)], 36)) : c("", !0),
|
|
1797
1798
|
(b(!0), l(a, null, C(H.value, (e, n) => (b(), l("div", {
|
|
1798
1799
|
key: n,
|
|
1799
1800
|
class: "docx-horizontal-ruler__tab",
|
|
@@ -2621,10 +2622,10 @@ var Ze = {
|
|
|
2621
2622
|
setup(e, { emit: t }) {
|
|
2622
2623
|
let n = e, r = t, i = S(null), s = S(null);
|
|
2623
2624
|
function d(e) {
|
|
2624
|
-
return
|
|
2625
|
+
return K(e) * n.zoom;
|
|
2625
2626
|
}
|
|
2626
2627
|
function f(e) {
|
|
2627
|
-
return Math.round(
|
|
2628
|
+
return Math.round(ee(e / n.zoom));
|
|
2628
2629
|
}
|
|
2629
2630
|
let p = o(() => n.sectionProps?.pageHeight ?? Hn), m = o(() => n.sectionProps?.marginTop ?? Un), h = o(() => n.sectionProps?.marginBottom ?? Un), g = o(() => d(p.value)), y = o(() => d(m.value)), x = o(() => d(h.value)), w = o(() => ({
|
|
2630
2631
|
position: "relative",
|
|
@@ -2768,7 +2769,15 @@ function Jn(e) {
|
|
|
2768
2769
|
}) : "";
|
|
2769
2770
|
}
|
|
2770
2771
|
function Yn(e) {
|
|
2771
|
-
return
|
|
2772
|
+
return W({
|
|
2773
|
+
text: e.split(/\s+/).map((e) => W({
|
|
2774
|
+
text: e,
|
|
2775
|
+
units: "graphemes",
|
|
2776
|
+
end: 1
|
|
2777
|
+
})).join("").toUpperCase(),
|
|
2778
|
+
units: "graphemes",
|
|
2779
|
+
end: 2
|
|
2780
|
+
});
|
|
2772
2781
|
}
|
|
2773
2782
|
var Xn = [
|
|
2774
2783
|
"#6DCCB1",
|
|
@@ -2789,12 +2798,16 @@ function Zn(e) {
|
|
|
2789
2798
|
for (let n = 0; n < e.length; n++) t = e.charCodeAt(n) + ((t << 5) - t);
|
|
2790
2799
|
return Xn[Math.abs(t) % Xn.length] ?? "#888888";
|
|
2791
2800
|
}
|
|
2792
|
-
function
|
|
2793
|
-
return e.length > t ?
|
|
2801
|
+
function Qn(e, t = 50) {
|
|
2802
|
+
return e.length > t ? W({
|
|
2803
|
+
text: e,
|
|
2804
|
+
units: "codeUnits",
|
|
2805
|
+
end: t
|
|
2806
|
+
}) + "..." : e;
|
|
2794
2807
|
}
|
|
2795
2808
|
//#endregion
|
|
2796
2809
|
//#region src/components/sidebar/Avatar.vue
|
|
2797
|
-
var
|
|
2810
|
+
var $n = /* @__PURE__ */ p({
|
|
2798
2811
|
__name: "Avatar",
|
|
2799
2812
|
props: {
|
|
2800
2813
|
name: { default: "U" },
|
|
@@ -2819,13 +2832,13 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2819
2832
|
style: _(r.value)
|
|
2820
2833
|
}, E(n.value), 5));
|
|
2821
2834
|
}
|
|
2822
|
-
}),
|
|
2835
|
+
}), er = {
|
|
2823
2836
|
key: 0,
|
|
2824
2837
|
class: "reply-thread"
|
|
2825
|
-
},
|
|
2838
|
+
}, tr = {
|
|
2826
2839
|
key: 0,
|
|
2827
2840
|
class: "reply-thread__more"
|
|
2828
|
-
},
|
|
2841
|
+
}, nr = { class: "reply-thread__header" }, rr = { class: "reply-thread__author-block" }, ir = { class: "reply-thread__author" }, ar = { class: "reply-thread__date" }, or = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2829
2842
|
__name: "ReplyThread",
|
|
2830
2843
|
props: {
|
|
2831
2844
|
replies: {},
|
|
@@ -2833,15 +2846,15 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2833
2846
|
},
|
|
2834
2847
|
setup(e) {
|
|
2835
2848
|
let t = e, n = o(() => t.isExpanded ? t.replies : t.replies.slice(-1)), r = o(() => t.isExpanded ? 0 : Math.max(0, t.replies.length - 1));
|
|
2836
|
-
return (t, i) => e.replies.length > 0 ? (b(), l("div",
|
|
2849
|
+
return (t, i) => e.replies.length > 0 ? (b(), l("div", er, [r.value > 0 ? (b(), l("div", tr, E(r.value) + " " + E(r.value === 1 ? "reply" : "replies"), 1)) : c("", !0), (b(!0), l(a, null, C(n.value, (t) => (b(), l("div", {
|
|
2837
2850
|
key: t.id,
|
|
2838
2851
|
class: g(["reply-thread__item", { "reply-thread__item--expanded": e.isExpanded }])
|
|
2839
|
-
}, [u("div",
|
|
2852
|
+
}, [u("div", nr, [f($n, {
|
|
2840
2853
|
name: t.author,
|
|
2841
2854
|
size: 28
|
|
2842
|
-
}, null, 8, ["name"]), u("div",
|
|
2855
|
+
}, null, 8, ["name"]), u("div", rr, [u("div", ir, E(t.author || "Unknown"), 1), u("div", ar, E(O(Jn)(t.date)), 1)])]), u("div", { class: g(["reply-thread__body", { "reply-thread__body--clamp": !e.isExpanded }]) }, E(O(qn)(t.content)), 3)], 2))), 128))])) : c("", !0);
|
|
2843
2856
|
}
|
|
2844
|
-
}), [["__scopeId", "data-v-06331fac"]]),
|
|
2857
|
+
}), [["__scopeId", "data-v-06331fac"]]), sr = ["onKeydown"], cr = { class: "reply-input__actions" }, lr = ["disabled"], ur = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2845
2858
|
__name: "ReplyInput",
|
|
2846
2859
|
emits: ["submit"],
|
|
2847
2860
|
setup(e, { emit: t }) {
|
|
@@ -2873,14 +2886,14 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2873
2886
|
P(F(p, ["prevent"]), ["enter"]),
|
|
2874
2887
|
P(f, ["esc"])
|
|
2875
2888
|
]
|
|
2876
|
-
}, null, 40,
|
|
2889
|
+
}, null, 40, sr), [[A, i.value]]), u("div", cr, [u("button", {
|
|
2877
2890
|
class: "reply-input__cancel",
|
|
2878
2891
|
onClick: F(f, ["stop"])
|
|
2879
2892
|
}, "Cancel"), u("button", {
|
|
2880
2893
|
class: g(["reply-input__submit", { "reply-input__submit--active": c.value }]),
|
|
2881
2894
|
disabled: !c.value,
|
|
2882
2895
|
onClick: F(p, ["stop"])
|
|
2883
|
-
}, " Reply ", 10,
|
|
2896
|
+
}, " Reply ", 10, lr)])], 64)) : (b(), l("input", {
|
|
2884
2897
|
key: 0,
|
|
2885
2898
|
readonly: "",
|
|
2886
2899
|
placeholder: "Reply",
|
|
@@ -2889,13 +2902,13 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2889
2902
|
onClick: F(d, ["stop"])
|
|
2890
2903
|
}, null, 32))], 32));
|
|
2891
2904
|
}
|
|
2892
|
-
}), [["__scopeId", "data-v-fea8646c"]]),
|
|
2905
|
+
}), [["__scopeId", "data-v-fea8646c"]]), dr = ["data-comment-id"], fr = {
|
|
2893
2906
|
key: 0,
|
|
2894
2907
|
class: "comment-card__resolved"
|
|
2895
|
-
},
|
|
2908
|
+
}, pr = { class: "comment-card__head" }, mr = { class: "comment-card__author-block" }, hr = { class: "comment-card__author" }, gr = { class: "comment-card__date" }, _r = {
|
|
2896
2909
|
key: 0,
|
|
2897
2910
|
class: "comment-card__actions"
|
|
2898
|
-
},
|
|
2911
|
+
}, vr = ["title"], yr = { class: "comment-card__body" }, br = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2899
2912
|
__name: "CommentCard",
|
|
2900
2913
|
props: {
|
|
2901
2914
|
comment: {},
|
|
@@ -2920,17 +2933,17 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2920
2933
|
onClick: n[5] ||= (e) => t.$emit("click"),
|
|
2921
2934
|
onMousedown: n[6] ||= F(() => {}, ["stop"])
|
|
2922
2935
|
}, [
|
|
2923
|
-
e.comment.done ? (b(), l("div",
|
|
2936
|
+
e.comment.done ? (b(), l("div", fr, [f(r, {
|
|
2924
2937
|
name: "check",
|
|
2925
2938
|
size: 12
|
|
2926
2939
|
}), n[7] ||= u("span", null, "Resolved", -1)])) : c("", !0),
|
|
2927
|
-
u("div",
|
|
2928
|
-
f(
|
|
2940
|
+
u("div", pr, [
|
|
2941
|
+
f($n, {
|
|
2929
2942
|
name: e.comment.author,
|
|
2930
2943
|
size: 32
|
|
2931
2944
|
}, null, 8, ["name"]),
|
|
2932
|
-
u("div",
|
|
2933
|
-
e.expanded ? (b(), l("div",
|
|
2945
|
+
u("div", mr, [u("div", hr, E(e.comment.author || "Unknown"), 1), u("div", gr, E(O(Jn)(e.comment.date)), 1)]),
|
|
2946
|
+
e.expanded ? (b(), l("div", _r, [
|
|
2934
2947
|
u("button", {
|
|
2935
2948
|
class: "comment-card__icon-btn",
|
|
2936
2949
|
title: e.comment.done ? "Reopen" : "Resolve",
|
|
@@ -2938,7 +2951,7 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2938
2951
|
}, [f(r, {
|
|
2939
2952
|
name: e.comment.done ? "undo" : "check",
|
|
2940
2953
|
size: 20
|
|
2941
|
-
}, null, 8, ["name"])], 8,
|
|
2954
|
+
}, null, 8, ["name"])], 8, vr),
|
|
2942
2955
|
u("button", {
|
|
2943
2956
|
class: "comment-card__icon-btn",
|
|
2944
2957
|
title: "More options",
|
|
@@ -2958,18 +2971,18 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2958
2971
|
}, "Delete")], 32)) : c("", !0)
|
|
2959
2972
|
])) : c("", !0)
|
|
2960
2973
|
]),
|
|
2961
|
-
u("div",
|
|
2962
|
-
f(
|
|
2974
|
+
u("div", yr, E(O(qn)(e.comment.content)), 1),
|
|
2975
|
+
f(or, {
|
|
2963
2976
|
replies: e.replies,
|
|
2964
2977
|
"is-expanded": e.expanded
|
|
2965
2978
|
}, null, 8, ["replies", "is-expanded"]),
|
|
2966
|
-
e.expanded && !e.comment.done ? (b(), s(
|
|
2979
|
+
e.expanded && !e.comment.done ? (b(), s(ur, {
|
|
2967
2980
|
key: 1,
|
|
2968
2981
|
onSubmit: n[4] ||= (n) => t.$emit("reply", e.comment.id, n)
|
|
2969
2982
|
})) : c("", !0)
|
|
2970
|
-
], 42,
|
|
2983
|
+
], 42, dr));
|
|
2971
2984
|
}
|
|
2972
|
-
}), [["__scopeId", "data-v-7a3ee7ac"]]),
|
|
2985
|
+
}), [["__scopeId", "data-v-7a3ee7ac"]]), xr = ["data-comment-id"], Sr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
2973
2986
|
__name: "ResolvedCommentMarker",
|
|
2974
2987
|
props: { comment: {} },
|
|
2975
2988
|
emits: ["toggle-expand"],
|
|
@@ -2983,39 +2996,39 @@ var Qn = /* @__PURE__ */ p({
|
|
|
2983
2996
|
}, [f(r, {
|
|
2984
2997
|
name: "chat_bubble_check",
|
|
2985
2998
|
size: 20
|
|
2986
|
-
})], 40,
|
|
2999
|
+
})], 40, xr));
|
|
2987
3000
|
}
|
|
2988
|
-
}), [["__scopeId", "data-v-d0c228f6"]]),
|
|
3001
|
+
}), [["__scopeId", "data-v-d0c228f6"]]), Cr = { class: "tc-card__head" }, wr = { class: "tc-card__author-block" }, Tr = { class: "tc-card__author" }, Er = {
|
|
2989
3002
|
key: 0,
|
|
2990
3003
|
class: "tc-card__date"
|
|
2991
|
-
},
|
|
3004
|
+
}, Dr = {
|
|
2992
3005
|
key: 0,
|
|
2993
3006
|
class: "tc-card__actions"
|
|
2994
|
-
},
|
|
3007
|
+
}, Or = ["title"], kr = ["title"], Ar = { class: "tc-card__body" }, jr = { class: "tc-card__deleted" }, Mr = { class: "tc-card__inserted" }, Nr = { class: "tc-card__inserted" }, Pr = { class: "tc-card__deleted" }, Fr = {
|
|
2995
3008
|
key: 0,
|
|
2996
3009
|
class: "tc-card__changed"
|
|
2997
|
-
},
|
|
3010
|
+
}, Ir = { class: "tc-card__changed" }, Lr = { class: "tc-card__changed" }, Rr = {
|
|
2998
3011
|
key: 5,
|
|
2999
3012
|
class: "tc-card__inserted"
|
|
3000
|
-
},
|
|
3013
|
+
}, zr = {
|
|
3001
3014
|
key: 6,
|
|
3002
3015
|
class: "tc-card__deleted"
|
|
3003
|
-
},
|
|
3016
|
+
}, Br = {
|
|
3004
3017
|
key: 7,
|
|
3005
3018
|
class: "tc-card__inserted"
|
|
3006
|
-
},
|
|
3019
|
+
}, Vr = {
|
|
3007
3020
|
key: 8,
|
|
3008
3021
|
class: "tc-card__deleted"
|
|
3009
|
-
},
|
|
3022
|
+
}, Hr = {
|
|
3010
3023
|
key: 9,
|
|
3011
3024
|
class: "tc-card__changed"
|
|
3012
|
-
},
|
|
3025
|
+
}, Ur = {
|
|
3013
3026
|
key: 10,
|
|
3014
3027
|
class: "tc-card__inserted"
|
|
3015
|
-
},
|
|
3028
|
+
}, Wr = {
|
|
3016
3029
|
key: 11,
|
|
3017
3030
|
class: "tc-card__deleted"
|
|
3018
|
-
},
|
|
3031
|
+
}, Gr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3019
3032
|
__name: "TrackedChangeCard",
|
|
3020
3033
|
props: {
|
|
3021
3034
|
change: {},
|
|
@@ -3078,45 +3091,45 @@ var Qn = /* @__PURE__ */ p({
|
|
|
3078
3091
|
onClick: n[1] ||= (e) => t.$emit("click"),
|
|
3079
3092
|
onMousedown: n[2] ||= F(() => {}, ["stop"])
|
|
3080
3093
|
}, [
|
|
3081
|
-
u("div",
|
|
3082
|
-
f(
|
|
3094
|
+
u("div", Cr, [
|
|
3095
|
+
f($n, {
|
|
3083
3096
|
name: h.value,
|
|
3084
3097
|
size: 32
|
|
3085
3098
|
}, null, 8, ["name"]),
|
|
3086
|
-
u("div",
|
|
3087
|
-
e.expanded ? (b(), l("div",
|
|
3099
|
+
u("div", wr, [u("div", Tr, E(h.value), 1), e.change.date ? (b(), l("div", Er, E(O(Jn)(e.change.date)), 1)) : c("", !0)]),
|
|
3100
|
+
e.expanded ? (b(), l("div", Dr, [u("button", {
|
|
3088
3101
|
class: "tc-card__icon-btn",
|
|
3089
3102
|
title: O(i)("acceptChange"),
|
|
3090
3103
|
onClick: F(x, ["stop"])
|
|
3091
3104
|
}, [f(r, {
|
|
3092
3105
|
name: "check",
|
|
3093
3106
|
size: 20
|
|
3094
|
-
})], 8,
|
|
3107
|
+
})], 8, Or), u("button", {
|
|
3095
3108
|
class: "tc-card__icon-btn",
|
|
3096
3109
|
title: O(i)("rejectChange"),
|
|
3097
3110
|
onClick: F(S, ["stop"])
|
|
3098
3111
|
}, [f(r, {
|
|
3099
3112
|
name: "close",
|
|
3100
3113
|
size: 20
|
|
3101
|
-
})], 8,
|
|
3114
|
+
})], 8, kr)])) : c("", !0)
|
|
3102
3115
|
]),
|
|
3103
|
-
u("div",
|
|
3116
|
+
u("div", Ar, [e.change.type === "replacement" ? (b(), l(a, { key: 0 }, [
|
|
3104
3117
|
d(E(O(i)("trackedChanges.replaced")) + " ", 1),
|
|
3105
|
-
u("span",
|
|
3118
|
+
u("span", jr, "\"" + E(O(Qn)(e.change.deletedText || "")) + "\"", 1),
|
|
3106
3119
|
d(" " + E(O(i)("trackedChanges.with")) + " ", 1),
|
|
3107
|
-
u("span",
|
|
3108
|
-
], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[3] ||= d(": ", -1), u("span",
|
|
3109
|
-
f(
|
|
3120
|
+
u("span", Mr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)
|
|
3121
|
+
], 64)) : e.change.type === "paragraphMarkInsertion" ? (b(), l(a, { key: 1 }, [d(E(O(i)("revisions.paragraphMarkInserted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[3] ||= d(": ", -1), u("span", Nr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "paragraphMarkDeletion" ? (b(), l(a, { key: 2 }, [d(E(O(i)("revisions.paragraphMarkDeleted")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[4] ||= d(": ", -1), u("span", Pr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : v.value ? (b(), l(a, { key: 3 }, [v.value.shape === "label-only" ? (b(), l("span", Fr, E(v.value.label), 1)) : (b(), l(a, { key: 1 }, [d(E(v.value.label), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[5] ||= d(": ", -1), u("span", Ir, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64))], 64)) : e.change.type === "runPropertiesChanged" ? (b(), l(a, { key: 4 }, [d(E(O(i)("revisions.runPropertiesChanged")), 1), e.change.text ? (b(), l(a, { key: 0 }, [n[6] ||= d(": ", -1), u("span", Lr, "\"" + E(O(Qn)(e.change.text)) + "\"", 1)], 64)) : c("", !0)], 64)) : e.change.type === "rowInserted" ? (b(), l("span", Rr, E(O(i)("revisions.rowInserted")), 1)) : e.change.type === "rowDeleted" ? (b(), l("span", zr, E(O(i)("revisions.rowDeleted")), 1)) : e.change.type === "cellInserted" ? (b(), l("span", Br, E(O(i)("revisions.cellInserted")), 1)) : e.change.type === "cellDeleted" ? (b(), l("span", Vr, E(O(i)("revisions.cellDeleted")), 1)) : e.change.type === "cellMerged" ? (b(), l("span", Hr, E(O(i)("revisions.cellMerged")), 1)) : e.change.type === "tableInserted" ? (b(), l("span", Ur, E(O(i)("revisions.tableInserted")), 1)) : e.change.type === "tableDeleted" ? (b(), l("span", Wr, E(O(i)("revisions.tableDeleted")), 1)) : (b(), l(a, { key: 12 }, [d(E(e.change.type === "insertion" ? O(i)("inserted") : O(i)("deleted")) + " ", 1), u("span", { class: g(e.change.type === "insertion" ? "tc-card__inserted" : "tc-card__deleted") }, " \"" + E(O(Qn)(e.change.text)) + "\" ", 3)], 64))]),
|
|
3122
|
+
f(or, {
|
|
3110
3123
|
replies: e.replies,
|
|
3111
3124
|
"is-expanded": e.expanded
|
|
3112
3125
|
}, null, 8, ["replies", "is-expanded"]),
|
|
3113
|
-
e.expanded ? (b(), s(
|
|
3126
|
+
e.expanded ? (b(), s(ur, {
|
|
3114
3127
|
key: 0,
|
|
3115
3128
|
onSubmit: n[0] ||= (n) => t.$emit("reply", e.change.revisionId, n)
|
|
3116
3129
|
})) : c("", !0)
|
|
3117
3130
|
], 34));
|
|
3118
3131
|
}
|
|
3119
|
-
}), [["__scopeId", "data-v-b19a1fcd"]]),
|
|
3132
|
+
}), [["__scopeId", "data-v-b19a1fcd"]]), Kr = ["onKeydown"], qr = { class: "add-comment-card__actions" }, Jr = ["disabled"], Yr = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3120
3133
|
__name: "AddCommentCard",
|
|
3121
3134
|
emits: ["submit", "cancel"],
|
|
3122
3135
|
setup(e, { emit: t }) {
|
|
@@ -3145,19 +3158,19 @@ var Qn = /* @__PURE__ */ p({
|
|
|
3145
3158
|
P(F(s, ["exact", "prevent"]), ["enter"]),
|
|
3146
3159
|
P(c, ["esc"])
|
|
3147
3160
|
]
|
|
3148
|
-
}, null, 40,
|
|
3161
|
+
}, null, 40, Kr), [[A, r.value]]), u("div", qr, [u("button", {
|
|
3149
3162
|
class: "add-comment-card__cancel",
|
|
3150
3163
|
onClick: c
|
|
3151
3164
|
}, "Cancel"), u("button", {
|
|
3152
3165
|
class: g(["add-comment-card__submit", { "add-comment-card__submit--active": a.value }]),
|
|
3153
3166
|
disabled: !a.value,
|
|
3154
3167
|
onClick: s
|
|
3155
|
-
}, " Comment ", 10,
|
|
3168
|
+
}, " Comment ", 10, Jr)])], 32));
|
|
3156
3169
|
}
|
|
3157
3170
|
}), [["__scopeId", "data-v-2939f9cd"]]);
|
|
3158
3171
|
//#endregion
|
|
3159
3172
|
//#region src/composables/useCommentSidebarItems.ts
|
|
3160
|
-
function
|
|
3173
|
+
function Xr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment: r, addCommentYPosition: i }) {
|
|
3161
3174
|
return o(() => {
|
|
3162
3175
|
let a = [];
|
|
3163
3176
|
r?.value && i?.value != null && a.push({
|
|
@@ -3200,7 +3213,7 @@ function Yr({ comments: e, trackedChanges: t, showResolved: n, isAddingComment:
|
|
|
3200
3213
|
}
|
|
3201
3214
|
//#endregion
|
|
3202
3215
|
//#region src/components/UnifiedSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
3203
|
-
var
|
|
3216
|
+
var Zr = ["data-folio-comments-surface", "tabindex"], Qr = ["data-card-id"], $r = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3204
3217
|
__name: "UnifiedSidebar",
|
|
3205
3218
|
props: {
|
|
3206
3219
|
isOpen: { type: Boolean },
|
|
@@ -3242,7 +3255,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3242
3255
|
let t = e.target;
|
|
3243
3256
|
t instanceof HTMLElement && t.closest(".unified-sidebar__card-slot") || p.value !== null && (f.value = null, r("update:activeItemId", null));
|
|
3244
3257
|
}
|
|
3245
|
-
let x =
|
|
3258
|
+
let x = Xr({
|
|
3246
3259
|
comments: D(n, "comments"),
|
|
3247
3260
|
trackedChanges: D(n, "trackedChanges"),
|
|
3248
3261
|
showResolved: o(() => n.showResolved ?? !1),
|
|
@@ -3302,7 +3315,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3302
3315
|
t && u.set(t, e.offsetHeight);
|
|
3303
3316
|
}
|
|
3304
3317
|
let f = /* @__PURE__ */ new Map();
|
|
3305
|
-
for (let { item: n, y: r } of
|
|
3318
|
+
for (let { item: n, y: r } of X({
|
|
3306
3319
|
items: t,
|
|
3307
3320
|
anchorPositions: c,
|
|
3308
3321
|
renderedDomContext: V(e),
|
|
@@ -3342,14 +3355,14 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3342
3355
|
let s = o.getBoundingClientRect().right - r.left + B.commentsGap, c = Math.max(8, e.clientWidth - B.commentsWidth - 8);
|
|
3343
3356
|
z.value = Math.max(8, Math.min(s, c));
|
|
3344
3357
|
}
|
|
3345
|
-
let
|
|
3358
|
+
let ee = o(() => ({
|
|
3346
3359
|
position: "sticky",
|
|
3347
3360
|
top: 0,
|
|
3348
3361
|
maxHeight: W.value.height || void 0,
|
|
3349
3362
|
overflowY: "auto",
|
|
3350
3363
|
paddingBlock: B.commentsGap + "px",
|
|
3351
3364
|
boxSizing: "border-box"
|
|
3352
|
-
})),
|
|
3365
|
+
})), K = o(() => {
|
|
3353
3366
|
let e = p.value;
|
|
3354
3367
|
if (!e) return "";
|
|
3355
3368
|
if (e.startsWith("comment-")) return `${H(e.slice(8), ".paged-editor__pages ")} { background-color: rgba(255, 212, 0, 0.35) !important; border-bottom: 2px solid rgba(255, 212, 0, 0.7) !important; }`;
|
|
@@ -3392,7 +3405,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3392
3405
|
};
|
|
3393
3406
|
}
|
|
3394
3407
|
let J = !1;
|
|
3395
|
-
function
|
|
3408
|
+
function Y() {
|
|
3396
3409
|
J || (J = !0, requestAnimationFrame(() => {
|
|
3397
3410
|
J = !1, L();
|
|
3398
3411
|
}));
|
|
@@ -3407,7 +3420,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3407
3420
|
n.addCommentYPosition,
|
|
3408
3421
|
n.surface,
|
|
3409
3422
|
n.isOpen
|
|
3410
|
-
], () =>
|
|
3423
|
+
], () => Y(), { immediate: !0 });
|
|
3411
3424
|
function ne(e) {
|
|
3412
3425
|
let t = e?.parentElement ?? null;
|
|
3413
3426
|
for (; t;) {
|
|
@@ -3419,14 +3432,14 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3419
3432
|
}
|
|
3420
3433
|
let Z = null;
|
|
3421
3434
|
function re() {
|
|
3422
|
-
Z && Z.removeEventListener("scroll",
|
|
3435
|
+
Z && Z.removeEventListener("scroll", Y), Z = ne(n.pagesContainer), Z && (Z.addEventListener("scroll", Y, { passive: !0 }), N?.observe(Z));
|
|
3423
3436
|
}
|
|
3424
3437
|
return y(() => {
|
|
3425
|
-
P = new ResizeObserver(() =>
|
|
3438
|
+
P = new ResizeObserver(() => Y()), Y(), n.pagesContainer && (N = new ResizeObserver(() => Y()), N.observe(n.pagesContainer), re()), window.addEventListener("resize", Y);
|
|
3426
3439
|
}), j(() => n.pagesContainer, (e) => {
|
|
3427
|
-
N?.disconnect(), N = null, e && (N = new ResizeObserver(() =>
|
|
3440
|
+
N?.disconnect(), N = null, e && (N = new ResizeObserver(() => Y()), N.observe(e)), re(), Y();
|
|
3428
3441
|
}), v(() => {
|
|
3429
|
-
N?.disconnect(), P?.disconnect(), Z && Z.removeEventListener("scroll",
|
|
3442
|
+
N?.disconnect(), P?.disconnect(), Z && Z.removeEventListener("scroll", Y), window.removeEventListener("resize", Y);
|
|
3430
3443
|
}), j(() => n.isOpen && i.value, (e, t, n) => {
|
|
3431
3444
|
if (!e || typeof document > "u") return;
|
|
3432
3445
|
let i = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -3440,8 +3453,8 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3440
3453
|
}, {
|
|
3441
3454
|
immediate: !0,
|
|
3442
3455
|
flush: "post"
|
|
3443
|
-
}), (t, n) => (b(), l(a, null, [
|
|
3444
|
-
default: M(() => [d(E(
|
|
3456
|
+
}), (t, n) => (b(), l(a, null, [K.value ? (b(), s(T("style"), { key: 0 }, {
|
|
3457
|
+
default: M(() => [d(E(K.value), 1)]),
|
|
3445
3458
|
_: 1
|
|
3446
3459
|
})) : c("", !0), e.isOpen ? (b(), l("aside", {
|
|
3447
3460
|
key: 1,
|
|
@@ -3455,21 +3468,21 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3455
3468
|
onMousedown: h
|
|
3456
3469
|
}, [u("div", {
|
|
3457
3470
|
class: "unified-sidebar__inner",
|
|
3458
|
-
style: _(i.value ?
|
|
3471
|
+
style: _(i.value ? ee.value : { minHeight: R.value + "px" })
|
|
3459
3472
|
}, [(b(!0), l(a, null, C(O(x), (e) => (b(), l("div", {
|
|
3460
3473
|
key: e.id,
|
|
3461
3474
|
class: "unified-sidebar__card-slot",
|
|
3462
3475
|
"data-card-id": e.id,
|
|
3463
3476
|
style: _(q(e.id))
|
|
3464
|
-
}, [e.kind === "add-comment" ? (b(), s(
|
|
3477
|
+
}, [e.kind === "add-comment" ? (b(), s(Yr, {
|
|
3465
3478
|
key: 0,
|
|
3466
3479
|
onSubmit: n[0] ||= (e) => t.$emit("add-comment", e),
|
|
3467
3480
|
onCancel: n[1] ||= (e) => t.$emit("cancel-add-comment")
|
|
3468
|
-
})) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (b(), s(
|
|
3481
|
+
})) : e.kind === "comment" && e.comment.done && p.value !== e.id ? (b(), s(Sr, {
|
|
3469
3482
|
key: 1,
|
|
3470
3483
|
comment: e.comment,
|
|
3471
3484
|
onToggleExpand: (t) => m(e.id)
|
|
3472
|
-
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(
|
|
3485
|
+
}, null, 8, ["comment", "onToggleExpand"])) : e.kind === "comment" ? (b(), s(br, {
|
|
3473
3486
|
key: 2,
|
|
3474
3487
|
comment: e.comment,
|
|
3475
3488
|
replies: e.replies,
|
|
@@ -3484,7 +3497,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3484
3497
|
"replies",
|
|
3485
3498
|
"expanded",
|
|
3486
3499
|
"onClick"
|
|
3487
|
-
])) : e.kind === "tracked-change" ? (b(), s(
|
|
3500
|
+
])) : e.kind === "tracked-change" ? (b(), s(Gr, {
|
|
3488
3501
|
key: 3,
|
|
3489
3502
|
change: e.change,
|
|
3490
3503
|
replies: e.replies ?? [],
|
|
@@ -3500,9 +3513,9 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3500
3513
|
"replies",
|
|
3501
3514
|
"expanded",
|
|
3502
3515
|
"onClick"
|
|
3503
|
-
])) : c("", !0)], 12,
|
|
3516
|
+
])) : c("", !0)], 12, Qr))), 128))], 4)], 46, Zr)) : c("", !0)], 64));
|
|
3504
3517
|
}
|
|
3505
|
-
}), [["__scopeId", "data-v-071b08b5"]]),
|
|
3518
|
+
}), [["__scopeId", "data-v-071b08b5"]]), ei = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3506
3519
|
__name: "StylePicker",
|
|
3507
3520
|
props: {
|
|
3508
3521
|
value: {},
|
|
@@ -3561,12 +3574,12 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3561
3574
|
"class"
|
|
3562
3575
|
]));
|
|
3563
3576
|
}
|
|
3564
|
-
}), [["__scopeId", "data-v-06469e2c"]]),
|
|
3577
|
+
}), [["__scopeId", "data-v-06469e2c"]]), ti = [
|
|
3565
3578
|
"disabled",
|
|
3566
3579
|
"title",
|
|
3567
3580
|
"aria-expanded",
|
|
3568
3581
|
"onClick"
|
|
3569
|
-
],
|
|
3582
|
+
], ni = { class: "docx-align__panel" }, ri = ["title", "onClick"], ii = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3570
3583
|
__name: "AlignmentButtons",
|
|
3571
3584
|
props: {
|
|
3572
3585
|
value: { default: "left" },
|
|
@@ -3625,8 +3638,8 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3625
3638
|
}, null, 8, ["name"]), f(r, {
|
|
3626
3639
|
name: "arrow_drop_down",
|
|
3627
3640
|
size: 14
|
|
3628
|
-
})], 10,
|
|
3629
|
-
panel: M(() => [u("div",
|
|
3641
|
+
})], 10, ti)]),
|
|
3642
|
+
panel: M(() => [u("div", ni, [(b(), l(a, null, C(m, (t) => u("button", {
|
|
3630
3643
|
key: t.value,
|
|
3631
3644
|
type: "button",
|
|
3632
3645
|
class: g(["docx-align__option", { "docx-align__option--active": e.value === t.value }]),
|
|
@@ -3635,11 +3648,11 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3635
3648
|
}, [f(r, {
|
|
3636
3649
|
name: t.icon,
|
|
3637
3650
|
size: 20
|
|
3638
|
-
}, null, 8, ["name"])], 10,
|
|
3651
|
+
}, null, 8, ["name"])], 10, ri)), 64))])]),
|
|
3639
3652
|
_: 1
|
|
3640
3653
|
}, 8, ["open"]));
|
|
3641
3654
|
}
|
|
3642
|
-
}), [["__scopeId", "data-v-088792b0"]]),
|
|
3655
|
+
}), [["__scopeId", "data-v-088792b0"]]), ai = { class: "docx-list-btns" }, oi = ["disabled"], si = ["disabled"], ci = ["disabled"], li = ["disabled"], ui = /*#__PURE__*/ t(/* @__PURE__ */ p({
|
|
3643
3656
|
__name: "ListButtons",
|
|
3644
3657
|
props: {
|
|
3645
3658
|
listState: {},
|
|
@@ -3663,7 +3676,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3663
3676
|
"outdent"
|
|
3664
3677
|
],
|
|
3665
3678
|
setup(e) {
|
|
3666
|
-
return (t, n) => (b(), l("span",
|
|
3679
|
+
return (t, n) => (b(), l("span", ai, [
|
|
3667
3680
|
u("button", {
|
|
3668
3681
|
type: "button",
|
|
3669
3682
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "bullet" }]),
|
|
@@ -3673,7 +3686,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3673
3686
|
}, [f(r, {
|
|
3674
3687
|
name: "format_list_bulleted",
|
|
3675
3688
|
size: 20
|
|
3676
|
-
})], 10,
|
|
3689
|
+
})], 10, oi),
|
|
3677
3690
|
u("button", {
|
|
3678
3691
|
type: "button",
|
|
3679
3692
|
class: g(["docx-list-btns__btn", { "docx-list-btns__btn--active": e.listState?.type === "numbered" }]),
|
|
@@ -3683,7 +3696,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3683
3696
|
}, [f(r, {
|
|
3684
3697
|
name: "format_list_numbered",
|
|
3685
3698
|
size: 20
|
|
3686
|
-
})], 10,
|
|
3699
|
+
})], 10, si),
|
|
3687
3700
|
e.showIndentButtons ? (b(), l(a, { key: 0 }, [u("button", {
|
|
3688
3701
|
type: "button",
|
|
3689
3702
|
class: "docx-list-btns__btn",
|
|
@@ -3693,7 +3706,7 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3693
3706
|
}, [f(r, {
|
|
3694
3707
|
name: "format_indent_decrease",
|
|
3695
3708
|
size: 20
|
|
3696
|
-
})], 8,
|
|
3709
|
+
})], 8, ci), u("button", {
|
|
3697
3710
|
type: "button",
|
|
3698
3711
|
class: "docx-list-btns__btn",
|
|
3699
3712
|
disabled: e.disabled,
|
|
@@ -3702,9 +3715,9 @@ var Xr = ["data-folio-comments-surface", "tabindex"], Zr = ["data-card-id"], Qr
|
|
|
3702
3715
|
}, [f(r, {
|
|
3703
3716
|
name: "format_indent_increase",
|
|
3704
3717
|
size: 20
|
|
3705
|
-
})], 8,
|
|
3718
|
+
})], 8, li)], 64)) : c("", !0)
|
|
3706
3719
|
]));
|
|
3707
3720
|
}
|
|
3708
3721
|
}), [["__scopeId", "data-v-7cc21148"]]);
|
|
3709
3722
|
//#endregion
|
|
3710
|
-
export { he as C,
|
|
3723
|
+
export { he as C, Z as D, oe as E, ge as S, Q as T, Qt as _, Yr as a, Te as b, br as c, Kn as d, Bn as f, $t as g, an as h, $r as i, ur as l, on as m, ii as n, Gr as o, zn as p, ei as r, Sr as s, ui as t, or as u, Jt as v, fe as w, _e as x, It as y };
|