@lofcz/pptist 2.0.22 → 2.0.23
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/embed/agentic-manifest.json +2 -2
- package/dist/embed/pptist-embed.css +1 -1
- package/dist/embed/pptist-embed.js +118 -103
- package/dist/types/views/components/element/ProsemirrorEditor.vue.d.ts +2 -0
- package/dist/types/views/components/element/hooks/useTextFit.d.ts +1 -1
- package/package.json +1 -1
|
@@ -49073,27 +49073,31 @@ function bP(e, t = 1) {
|
|
|
49073
49073
|
let n = 10 ** t;
|
|
49074
49074
|
return Math.round(e * n) / n;
|
|
49075
49075
|
}
|
|
49076
|
-
var xP = (e) => {
|
|
49077
|
-
let { locale:
|
|
49078
|
-
let
|
|
49079
|
-
|
|
49080
|
-
|
|
49076
|
+
var xP = (e, t) => {
|
|
49077
|
+
let { locale: n } = Jd(), r = O(1), a = () => t?.value ?? e.value.content, o = i(() => {
|
|
49078
|
+
let t = e.value;
|
|
49079
|
+
return !!t.fixedHeight && !t.vertical && !!a();
|
|
49080
|
+
}), s = () => {
|
|
49081
|
+
let t = e.value, i = a();
|
|
49082
|
+
if (!t.fixedHeight || t.vertical || !i) {
|
|
49083
|
+
r.value = 1;
|
|
49081
49084
|
return;
|
|
49082
49085
|
}
|
|
49083
|
-
let
|
|
49084
|
-
sP(
|
|
49085
|
-
let { blocks:
|
|
49086
|
-
|
|
49087
|
-
innerWidth:
|
|
49088
|
-
innerHeight:
|
|
49089
|
-
lineHeight:
|
|
49090
|
-
blockSpace:
|
|
49086
|
+
let o = t.inset || fte, s = t.width - o[1] - o[3], c = t.height - o[0] - o[2];
|
|
49087
|
+
sP(n.value);
|
|
49088
|
+
let { blocks: l } = _P(i, { defaultFontFamily: t.defaultFontName || mte });
|
|
49089
|
+
r.value = uP(l, {
|
|
49090
|
+
innerWidth: s,
|
|
49091
|
+
innerHeight: c,
|
|
49092
|
+
lineHeight: t.lineHeight ?? pte,
|
|
49093
|
+
blockSpace: t.paragraphSpace ?? vP,
|
|
49091
49094
|
bulletIndent: 28,
|
|
49092
49095
|
minScale: yP
|
|
49093
49096
|
});
|
|
49094
49097
|
};
|
|
49095
49098
|
return V(() => [
|
|
49096
49099
|
e.value.content,
|
|
49100
|
+
t?.value,
|
|
49097
49101
|
e.value.width,
|
|
49098
49102
|
e.value.height,
|
|
49099
49103
|
e.value.fixedHeight,
|
|
@@ -49102,16 +49106,19 @@ var xP = (e) => {
|
|
|
49102
49106
|
e.value.paragraphSpace,
|
|
49103
49107
|
e.value.defaultFontName,
|
|
49104
49108
|
e.value.inset,
|
|
49105
|
-
|
|
49106
|
-
],
|
|
49109
|
+
n.value
|
|
49110
|
+
], s, {
|
|
49107
49111
|
immediate: !0,
|
|
49108
49112
|
deep: !0
|
|
49109
49113
|
}), w(() => {
|
|
49110
|
-
typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(
|
|
49114
|
+
typeof document < "u" && document.fonts?.ready && document.fonts.ready.then(s).catch(() => {});
|
|
49111
49115
|
}), {
|
|
49112
|
-
fitScale:
|
|
49113
|
-
fittedContent: i(() =>
|
|
49114
|
-
|
|
49116
|
+
fitScale: r,
|
|
49117
|
+
fittedContent: i(() => {
|
|
49118
|
+
let e = a();
|
|
49119
|
+
return !o.value || r.value >= 1 ? e : dte(e, r.value);
|
|
49120
|
+
}),
|
|
49121
|
+
fitVars: i(() => !o.value || r.value >= 1 ? {} : { "--text-fit-base-size": `${bP(16 * r.value)}px` })
|
|
49115
49122
|
};
|
|
49116
49123
|
};
|
|
49117
49124
|
//#endregion
|
|
@@ -53868,46 +53875,51 @@ var zB = (e, t, n, r) => {
|
|
|
53868
53875
|
"focus",
|
|
53869
53876
|
"blur",
|
|
53870
53877
|
"mousedown",
|
|
53871
|
-
"emptyChange"
|
|
53878
|
+
"emptyChange",
|
|
53879
|
+
"docChange"
|
|
53872
53880
|
],
|
|
53873
53881
|
setup(e, { expose: t, emit: n }) {
|
|
53874
53882
|
let { LL: r } = Jd(), a = e, o = n, s = ls(), { handleElementId: l, textFormatPainter: u, richTextAttrs: d, activeElementIdList: f } = G(s), { ctrlOrShiftKeyActive: p } = G(Ds()), m = O(null), h, g = () => {
|
|
53875
53883
|
h && o("emptyChange", h.state.doc.textContent.trim().length === 0);
|
|
53876
|
-
}, _ =
|
|
53884
|
+
}, _ = 0, v = () => {
|
|
53885
|
+
_ || typeof requestAnimationFrame > "u" || (_ = requestAnimationFrame(() => {
|
|
53886
|
+
_ = 0, h && o("docChange", h.dom.innerHTML);
|
|
53887
|
+
}));
|
|
53888
|
+
}, y = (0, oa.debounce)(function(e = !1) {
|
|
53877
53889
|
a.value.replace(/ style=\"\"/g, "") !== h.dom.innerHTML.replace(/ style=\"\"/g, "") && o("update", {
|
|
53878
53890
|
value: h.dom.innerHTML,
|
|
53879
53891
|
ignore: e
|
|
53880
53892
|
});
|
|
53881
|
-
}, 300, { trailing: !0 }),
|
|
53893
|
+
}, 300, { trailing: !0 }), x = () => {
|
|
53882
53894
|
(!p.value || f.value.length <= 1) && s.setDisableHotkeysState(!0), o("focus");
|
|
53883
|
-
},
|
|
53895
|
+
}, S = () => {
|
|
53884
53896
|
if (s.setDisableHotkeysState(!1), h.state.doc.textContent.trim().length === 0) {
|
|
53885
|
-
|
|
53897
|
+
y.cancel();
|
|
53886
53898
|
let { doc: e, tr: t } = h.state;
|
|
53887
53899
|
e.content.size > 0 && h.dispatch(t.replaceRangeWith(0, e.content.size, PB(""))), o("update", {
|
|
53888
53900
|
value: "",
|
|
53889
53901
|
ignore: !0
|
|
53890
53902
|
});
|
|
53891
|
-
} else
|
|
53903
|
+
} else y.flush();
|
|
53892
53904
|
g(), o("blur");
|
|
53893
|
-
},
|
|
53905
|
+
}, C = (0, oa.debounce)(function() {
|
|
53894
53906
|
let e = ki(h, {
|
|
53895
53907
|
color: a.defaultColor,
|
|
53896
53908
|
fontname: a.defaultFontName
|
|
53897
53909
|
});
|
|
53898
53910
|
s.setRichtextAttrs(e);
|
|
53899
|
-
}, 30, { trailing: !0 }),
|
|
53911
|
+
}, 30, { trailing: !0 }), D = (e, t) => {
|
|
53900
53912
|
let { ctrlKey: n, shiftKey: r, metaKey: i } = t, a = n || r || i, o = t.key.toUpperCase();
|
|
53901
|
-
|
|
53902
|
-
},
|
|
53903
|
-
V(
|
|
53913
|
+
y(a && (o === zs.Z || o === zs.Y)), C();
|
|
53914
|
+
}, k = i(() => a.value);
|
|
53915
|
+
V(k, () => {
|
|
53904
53916
|
if (!h || h.hasFocus()) return;
|
|
53905
53917
|
let { doc: e, tr: t } = h.state;
|
|
53906
|
-
h.dispatch(t.replaceRangeWith(0, e.content.size, PB(
|
|
53918
|
+
h.dispatch(t.replaceRangeWith(0, e.content.size, PB(k.value)));
|
|
53907
53919
|
}), V(() => a.editable, () => {
|
|
53908
53920
|
h.setProps({ editable: () => a.editable });
|
|
53909
53921
|
}), t({ focus: () => h.focus() });
|
|
53910
|
-
let
|
|
53922
|
+
let A = ({ target: e, action: t }) => {
|
|
53911
53923
|
if (!e && l.value !== a.elementId || e && e !== a.elementId) return;
|
|
53912
53924
|
let n = "command" in t ? [t] : t;
|
|
53913
53925
|
for (let e of n) if (e.command === "fontname" && e.value !== void 0) {
|
|
@@ -54003,13 +54015,13 @@ var zB = (e, t, n, r) => {
|
|
|
54003
54015
|
title: e.value
|
|
54004
54016
|
})(h.state, h.dispatch));
|
|
54005
54017
|
} else e.command === "insert" && e.value ? h.dispatch(h.state.tr.insertText(e.value)) : e.command === "replace" && e.value && WB(h, e.value);
|
|
54006
|
-
h.focus(),
|
|
54007
|
-
},
|
|
54018
|
+
h.focus(), y(), C();
|
|
54019
|
+
}, j = (e, t, n, r) => n.type.name === "math" ? (wP.emit(CP.OPEN_INLINE_MATH_EDITOR, {
|
|
54008
54020
|
elementId: a.elementId,
|
|
54009
54021
|
pos: r,
|
|
54010
54022
|
latex: n.attrs.latex,
|
|
54011
54023
|
display: !!n.attrs.display
|
|
54012
|
-
}), !0) : !1,
|
|
54024
|
+
}), !0) : !1, M = ({ elementId: e, pos: t, latex: n, html: r, display: i }) => {
|
|
54013
54025
|
if (e !== a.elementId || !h) return;
|
|
54014
54026
|
let o = h.state.doc.nodeAt(t);
|
|
54015
54027
|
if (!o || o.type.name !== "math") return;
|
|
@@ -54018,8 +54030,8 @@ var zB = (e, t, n, r) => {
|
|
|
54018
54030
|
html: r,
|
|
54019
54031
|
display: i
|
|
54020
54032
|
});
|
|
54021
|
-
h.dispatch(s),
|
|
54022
|
-
},
|
|
54033
|
+
h.dispatch(s), y(), y.flush();
|
|
54034
|
+
}, N = () => {
|
|
54023
54035
|
if (!u.value) return;
|
|
54024
54036
|
let { keep: e, ...t } = u.value, n = [{ command: "clear" }];
|
|
54025
54037
|
for (let e of Object.keys(t)) {
|
|
@@ -54029,32 +54041,32 @@ var zB = (e, t, n, r) => {
|
|
|
54029
54041
|
value: r
|
|
54030
54042
|
});
|
|
54031
54043
|
}
|
|
54032
|
-
|
|
54044
|
+
A({ action: n }), e || s.setTextFormatPainter(null);
|
|
54033
54045
|
};
|
|
54034
54046
|
w(() => {
|
|
54035
|
-
h = FB(m.value,
|
|
54047
|
+
h = FB(m.value, k.value, {
|
|
54036
54048
|
handleDOMEvents: {
|
|
54037
|
-
focus:
|
|
54038
|
-
blur:
|
|
54039
|
-
keydown:
|
|
54040
|
-
click:
|
|
54041
|
-
mouseup:
|
|
54049
|
+
focus: x,
|
|
54050
|
+
blur: S,
|
|
54051
|
+
keydown: D,
|
|
54052
|
+
click: C,
|
|
54053
|
+
mouseup: N
|
|
54042
54054
|
},
|
|
54043
|
-
handleDoubleClickOn:
|
|
54055
|
+
handleDoubleClickOn: j,
|
|
54044
54056
|
editable: () => a.editable,
|
|
54045
54057
|
dispatchTransaction(e) {
|
|
54046
54058
|
let t = h.state.apply(e);
|
|
54047
|
-
h.updateState(t), g();
|
|
54059
|
+
h.updateState(t), g(), e.docChanged && v();
|
|
54048
54060
|
}
|
|
54049
54061
|
}), a.autoFocus && h.focus(), g();
|
|
54050
54062
|
}), T(() => {
|
|
54051
|
-
h && (h.state.doc.textContent.trim().length !== 0 &&
|
|
54063
|
+
_ && cancelAnimationFrame(_), h && (h.state.doc.textContent.trim().length !== 0 && y.flush(), h.destroy());
|
|
54052
54064
|
});
|
|
54053
|
-
let
|
|
54054
|
-
l.value === a.elementId &&
|
|
54065
|
+
let P = () => {
|
|
54066
|
+
l.value === a.elementId && C();
|
|
54055
54067
|
};
|
|
54056
|
-
return wP.on(CP.RICH_TEXT_COMMAND,
|
|
54057
|
-
wP.off(CP.RICH_TEXT_COMMAND,
|
|
54068
|
+
return wP.on(CP.RICH_TEXT_COMMAND, A), wP.on(CP.SYNC_RICH_TEXT_ATTRS_TO_STORE, P), wP.on(CP.APPLY_INLINE_MATH, M), T(() => {
|
|
54069
|
+
wP.off(CP.RICH_TEXT_COMMAND, A), wP.off(CP.SYNC_RICH_TEXT_ATTRS_TO_STORE, P), wP.off(CP.APPLY_INLINE_MATH, M);
|
|
54058
54070
|
}), (e, t) => (E(), c("div", {
|
|
54059
54071
|
class: b(["prosemirror-editor", { "format-painter": L(u) }]),
|
|
54060
54072
|
ref_key: "editorViewRef",
|
|
@@ -54062,7 +54074,7 @@ var zB = (e, t, n, r) => {
|
|
|
54062
54074
|
onMousedown: t[0] || (t[0] = (e) => o("mousedown", e))
|
|
54063
54075
|
}, null, 34));
|
|
54064
54076
|
}
|
|
54065
|
-
}), [["__scopeId", "data-v-
|
|
54077
|
+
}), [["__scopeId", "data-v-cf4c428f"]]), KB = ["data-content-type"], qB = {
|
|
54066
54078
|
key: 0,
|
|
54067
54079
|
class: "bullet"
|
|
54068
54080
|
}, JB = { class: "label" }, YB = /* @__PURE__ */ Y(/* @__PURE__ */ p({
|
|
@@ -54097,24 +54109,24 @@ var zB = (e, t, n, r) => {
|
|
|
54097
54109
|
contextmenus: { type: Function }
|
|
54098
54110
|
},
|
|
54099
54111
|
setup(e) {
|
|
54100
|
-
let t = e, n = ls(), r = ss(), { handleElementId: a, isScaling: u } = G(n), { currentSlide: d, theme: p } = G(r), { addHistorySnapshot: m } = pd(), h = O(null), g = O(null), _ = O(!1), { shadowStyle:
|
|
54112
|
+
let t = e, n = ls(), r = ss(), { handleElementId: a, isScaling: u } = G(n), { currentSlide: d, theme: p } = G(r), { addHistorySnapshot: m } = pd(), h = O(null), g = O(null), _ = O(!1), v = O(null), { shadowStyle: S } = wj(i(() => t.elementInfo.shadow)), C = i(() => t.elementInfo.inset || [
|
|
54101
54113
|
10,
|
|
54102
54114
|
10,
|
|
54103
54115
|
10,
|
|
54104
54116
|
10
|
|
54105
|
-
]), { fitVars:
|
|
54117
|
+
]), { fitVars: D } = xP(i(() => t.elementInfo), v), k = i(() => {
|
|
54106
54118
|
if (t.elementInfo.fixedHeight) return {
|
|
54107
54119
|
top: "flex-start",
|
|
54108
54120
|
middle: "center",
|
|
54109
54121
|
bottom: "flex-end"
|
|
54110
54122
|
}[t.elementInfo.vAlign || "top"];
|
|
54111
|
-
}),
|
|
54123
|
+
}), A = (e) => !e.replace(/<br\s*\/?>/gi, "").replace(/<[^>]+>/g, "").replace(/ /g, " ").trim(), j = O(A(t.elementInfo.content));
|
|
54112
54124
|
V(() => t.elementInfo.content, (e) => {
|
|
54113
|
-
_.value || (
|
|
54125
|
+
_.value || (j.value = A(e));
|
|
54114
54126
|
});
|
|
54115
|
-
let
|
|
54116
|
-
if (
|
|
54117
|
-
}),
|
|
54127
|
+
let M = i(() => !!t.elementInfo.placeholder && j.value), P = i(() => M.value && !_.value), F = i(() => {
|
|
54128
|
+
if (M.value) return `${t.elementInfo.placeholderFontSize ?? 20}px`;
|
|
54129
|
+
}), I = i(() => {
|
|
54118
54130
|
let e = d.value?.background, t;
|
|
54119
54131
|
if (e?.type === "solid") t = e.color;
|
|
54120
54132
|
else if (e?.type === "gradient") {
|
|
@@ -54124,8 +54136,8 @@ var zB = (e, t, n, r) => {
|
|
|
54124
54136
|
if (t || (t = p.value?.backgroundColor), !t) return null;
|
|
54125
54137
|
let n = Kc(t);
|
|
54126
54138
|
return n.isValid() ? n : null;
|
|
54127
|
-
}),
|
|
54128
|
-
let e =
|
|
54139
|
+
}), R = i(() => {
|
|
54140
|
+
let e = I.value, n = t.elementInfo.placeholderColor;
|
|
54129
54141
|
if (!e) return n ?? XB;
|
|
54130
54142
|
if (n) {
|
|
54131
54143
|
let t = Kc(n);
|
|
@@ -54133,36 +54145,36 @@ var zB = (e, t, n, r) => {
|
|
|
54133
54145
|
}
|
|
54134
54146
|
let r = Kc(t.elementInfo.defaultColor || p.value?.fontColor || "#333333");
|
|
54135
54147
|
return (r.isValid() && Kc.readability(r, e) >= ZB ? r : Kc(e.isLight() ? "#000000" : "#ffffff")).setAlpha(.5).toRgbString();
|
|
54136
|
-
}),
|
|
54148
|
+
}), z = (e, n = !0) => {
|
|
54137
54149
|
t.elementInfo.lock || (e.stopPropagation(), t.selectElement(e, t.elementInfo, n));
|
|
54138
|
-
},
|
|
54139
|
-
|
|
54150
|
+
}, B = (e) => {
|
|
54151
|
+
z(e, !1), _.value = !0, y(() => {
|
|
54140
54152
|
g.value?.focus(), t.elementInfo.textType === "content" && wP.emit(CP.RICH_TEXT_COMMAND, {
|
|
54141
54153
|
target: t.elementInfo.id,
|
|
54142
54154
|
action: { command: "bulletList" }
|
|
54143
54155
|
});
|
|
54144
54156
|
});
|
|
54145
|
-
},
|
|
54157
|
+
}, ee = O(-1), H = O(-1);
|
|
54146
54158
|
V(u, () => {
|
|
54147
|
-
a.value === t.elementInfo.id && (u.value || (!t.elementInfo.fixedHeight && !t.elementInfo.vertical &&
|
|
54159
|
+
a.value === t.elementInfo.id && (u.value || (!t.elementInfo.fixedHeight && !t.elementInfo.vertical && ee.value !== -1 && (r.updateElement({
|
|
54148
54160
|
id: t.elementInfo.id,
|
|
54149
|
-
props: { height:
|
|
54150
|
-
}),
|
|
54161
|
+
props: { height: ee.value }
|
|
54162
|
+
}), ee.value = -1), !t.elementInfo.fixedHeight && t.elementInfo.vertical && H.value !== -1 && (r.updateElement({
|
|
54151
54163
|
id: t.elementInfo.id,
|
|
54152
|
-
props: { width:
|
|
54153
|
-
}),
|
|
54164
|
+
props: { width: H.value }
|
|
54165
|
+
}), H.value = -1)));
|
|
54154
54166
|
}), V(() => t.elementInfo.inset, () => {
|
|
54155
54167
|
y(() => {
|
|
54156
54168
|
if (h.value) {
|
|
54157
54169
|
if (!t.elementInfo.fixedHeight && !t.elementInfo.vertical && t.elementInfo.height !== h.value.offsetHeight) {
|
|
54158
|
-
if (
|
|
54170
|
+
if (M.value) return;
|
|
54159
54171
|
r.updateElement({
|
|
54160
54172
|
id: t.elementInfo.id,
|
|
54161
54173
|
props: { height: h.value.offsetHeight }
|
|
54162
54174
|
});
|
|
54163
54175
|
}
|
|
54164
54176
|
if (!t.elementInfo.fixedHeight && t.elementInfo.vertical && t.elementInfo.width !== h.value.offsetWidth) {
|
|
54165
|
-
if (
|
|
54177
|
+
if (M.value) return;
|
|
54166
54178
|
r.updateElement({
|
|
54167
54179
|
id: t.elementInfo.id,
|
|
54168
54180
|
props: { width: h.value.offsetWidth }
|
|
@@ -54171,33 +54183,33 @@ var zB = (e, t, n, r) => {
|
|
|
54171
54183
|
}
|
|
54172
54184
|
});
|
|
54173
54185
|
});
|
|
54174
|
-
let
|
|
54186
|
+
let te = new ResizeObserver((e) => {
|
|
54175
54187
|
let n = e[0].contentRect;
|
|
54176
54188
|
if (!h.value) return;
|
|
54177
|
-
let i = n.height +
|
|
54178
|
-
|
|
54189
|
+
let i = n.height + C.value[0] + C.value[2], a = n.width + C.value[1] + C.value[3];
|
|
54190
|
+
M.value || (!t.elementInfo.fixedHeight && !t.elementInfo.vertical && t.elementInfo.height !== i && (u.value ? ee.value = i : r.updateElement({
|
|
54179
54191
|
id: t.elementInfo.id,
|
|
54180
54192
|
props: { height: i }
|
|
54181
|
-
})), !t.elementInfo.fixedHeight && t.elementInfo.vertical && t.elementInfo.width !== a && (u.value ?
|
|
54193
|
+
})), !t.elementInfo.fixedHeight && t.elementInfo.vertical && t.elementInfo.width !== a && (u.value ? H.value = a : r.updateElement({
|
|
54182
54194
|
id: t.elementInfo.id,
|
|
54183
54195
|
props: { width: a }
|
|
54184
54196
|
})));
|
|
54185
54197
|
});
|
|
54186
54198
|
w(() => {
|
|
54187
|
-
h.value &&
|
|
54199
|
+
h.value && te.observe(h.value);
|
|
54188
54200
|
}), T(() => {
|
|
54189
|
-
h.value &&
|
|
54201
|
+
h.value && te.unobserve(h.value);
|
|
54190
54202
|
});
|
|
54191
|
-
let
|
|
54203
|
+
let W = (e, n = !1) => {
|
|
54192
54204
|
r.updateElement({
|
|
54193
54205
|
id: t.elementInfo.id,
|
|
54194
54206
|
props: { content: e }
|
|
54195
54207
|
}), n || m();
|
|
54196
|
-
},
|
|
54208
|
+
}, ne = (0, oa.debounce)(function() {
|
|
54197
54209
|
t.elementInfo.placeholder || t.elementInfo.content.replace(/<[^>]+>/g, "") || r.deleteElement(t.elementInfo.id);
|
|
54198
|
-
}, 300, { trailing: !0 }),
|
|
54199
|
-
return V(
|
|
54200
|
-
|
|
54210
|
+
}, 300, { trailing: !0 }), re = i(() => a.value === t.elementInfo.id);
|
|
54211
|
+
return V(re, () => {
|
|
54212
|
+
re.value || ne();
|
|
54201
54213
|
}), (e, t) => {
|
|
54202
54214
|
let n = N("contextmenu");
|
|
54203
54215
|
return E(), c("div", {
|
|
@@ -54214,7 +54226,7 @@ var zB = (e, t, n, r) => {
|
|
|
54214
54226
|
}, [U((E(), c("div", {
|
|
54215
54227
|
class: b(["element-content", {
|
|
54216
54228
|
"placeholder-element": e.elementInfo.placeholder,
|
|
54217
|
-
"show-placeholder":
|
|
54229
|
+
"show-placeholder": P.value
|
|
54218
54230
|
}]),
|
|
54219
54231
|
ref_key: "elementRef",
|
|
54220
54232
|
ref: h,
|
|
@@ -54223,25 +54235,25 @@ var zB = (e, t, n, r) => {
|
|
|
54223
54235
|
height: !e.elementInfo.vertical && !e.elementInfo.fixedHeight ? "auto" : e.elementInfo.height + "px",
|
|
54224
54236
|
backgroundColor: e.elementInfo.fill,
|
|
54225
54237
|
opacity: e.elementInfo.opacity,
|
|
54226
|
-
textShadow: L(
|
|
54238
|
+
textShadow: L(S),
|
|
54227
54239
|
lineHeight: e.elementInfo.lineHeight,
|
|
54228
54240
|
letterSpacing: (e.elementInfo.wordSpace || 0) + "px",
|
|
54229
54241
|
color: e.elementInfo.defaultColor,
|
|
54230
54242
|
fontFamily: e.elementInfo.defaultFontName,
|
|
54231
|
-
fontSize:
|
|
54232
|
-
textAlign:
|
|
54243
|
+
fontSize: F.value,
|
|
54244
|
+
textAlign: M.value ? e.elementInfo.placeholderAlign ?? "center" : void 0,
|
|
54233
54245
|
writingMode: e.elementInfo.vertical ? "vertical-rl" : "horizontal-tb",
|
|
54234
|
-
padding: `${
|
|
54235
|
-
minHeight:
|
|
54246
|
+
padding: `${C.value[0]}px ${C.value[1]}px ${C.value[2]}px ${C.value[3]}px`,
|
|
54247
|
+
minHeight: M.value ? e.elementInfo.height + "px" : void 0,
|
|
54236
54248
|
display: e.elementInfo.fixedHeight ? "flex" : void 0,
|
|
54237
54249
|
flexDirection: e.elementInfo.fixedHeight ? "column" : void 0,
|
|
54238
|
-
justifyContent:
|
|
54250
|
+
justifyContent: k.value,
|
|
54239
54251
|
overflow: e.elementInfo.fixedHeight ? "hidden" : void 0,
|
|
54240
54252
|
"--paragraphSpace": `${e.elementInfo.paragraphSpace === void 0 ? 5 : e.elementInfo.paragraphSpace}px`,
|
|
54241
|
-
...L(
|
|
54253
|
+
...L(D)
|
|
54242
54254
|
}),
|
|
54243
|
-
onMousedown: t[
|
|
54244
|
-
onTouchstart: t[
|
|
54255
|
+
onMousedown: t[6] || (t[6] = (e) => z(e)),
|
|
54256
|
+
onTouchstart: t[7] || (t[7] = (e) => z(e))
|
|
54245
54257
|
}, [
|
|
54246
54258
|
f(DP, {
|
|
54247
54259
|
width: e.elementInfo.width,
|
|
@@ -54261,11 +54273,14 @@ var zB = (e, t, n, r) => {
|
|
|
54261
54273
|
value: e.elementInfo.content,
|
|
54262
54274
|
ref_key: "prosemirrorEditorRef",
|
|
54263
54275
|
ref: g,
|
|
54264
|
-
onUpdate: t[0] || (t[0] = ({ value: e, ignore: t }) =>
|
|
54265
|
-
onMousedown: t[1] || (t[1] = (e) =>
|
|
54276
|
+
onUpdate: t[0] || (t[0] = ({ value: e, ignore: t }) => W(e, t)),
|
|
54277
|
+
onMousedown: t[1] || (t[1] = (e) => z(e, !1)),
|
|
54266
54278
|
onFocus: t[2] || (t[2] = (e) => _.value = !0),
|
|
54267
|
-
onBlur: t[3] || (t[3] = (
|
|
54268
|
-
|
|
54279
|
+
onBlur: t[3] || (t[3] = () => {
|
|
54280
|
+
_.value = !1, v.value = null;
|
|
54281
|
+
}),
|
|
54282
|
+
onEmptyChange: t[4] || (t[4] = (e) => j.value = e),
|
|
54283
|
+
onDocChange: t[5] || (t[5] = (e) => v.value = e)
|
|
54269
54284
|
}, null, 8, [
|
|
54270
54285
|
"elementId",
|
|
54271
54286
|
"defaultColor",
|
|
@@ -54273,14 +54288,14 @@ var zB = (e, t, n, r) => {
|
|
|
54273
54288
|
"editable",
|
|
54274
54289
|
"value"
|
|
54275
54290
|
]),
|
|
54276
|
-
|
|
54291
|
+
P.value ? (E(), o(YB, {
|
|
54277
54292
|
key: 0,
|
|
54278
54293
|
label: e.elementInfo.placeholder,
|
|
54279
54294
|
contentType: e.elementInfo.textType ?? "content",
|
|
54280
54295
|
fontSize: e.elementInfo.placeholderFontSize ?? 20,
|
|
54281
|
-
color:
|
|
54296
|
+
color: R.value,
|
|
54282
54297
|
align: e.elementInfo.placeholderAlign ?? "center",
|
|
54283
|
-
onActivate:
|
|
54298
|
+
onActivate: B
|
|
54284
54299
|
}, null, 8, [
|
|
54285
54300
|
"label",
|
|
54286
54301
|
"contentType",
|
|
@@ -54288,12 +54303,12 @@ var zB = (e, t, n, r) => {
|
|
|
54288
54303
|
"color",
|
|
54289
54304
|
"align"
|
|
54290
54305
|
])) : s("", !0),
|
|
54291
|
-
t[
|
|
54292
|
-
t[
|
|
54306
|
+
t[8] || (t[8] = l("div", { class: "drag-handler top" }, null, -1)),
|
|
54307
|
+
t[9] || (t[9] = l("div", { class: "drag-handler bottom" }, null, -1))
|
|
54293
54308
|
], 38)), [[n, e.contextmenus]])], 4)], 6);
|
|
54294
54309
|
};
|
|
54295
54310
|
}
|
|
54296
|
-
}), [["__scopeId", "data-v-
|
|
54311
|
+
}), [["__scopeId", "data-v-91768b66"]]), $B = (e, t) => ({ fill: i(() => e.value.pattern ? `url(#${t}-pattern-${e.value.id})` : e.value.gradient ? `url(#${t}-gradient-${e.value.id})` : e.value.fill || "none") }), eV = ["id", "gradientTransform"], tV = ["offset", "stop-color"], nV = ["id"], rV = ["offset", "stop-color"], iV = /* @__PURE__ */ p({
|
|
54297
54312
|
__name: "GradientDefs",
|
|
54298
54313
|
props: {
|
|
54299
54314
|
id: {},
|
|
@@ -17,6 +17,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
17
17
|
ignore: boolean;
|
|
18
18
|
}) => any;
|
|
19
19
|
emptyChange: (empty: boolean) => any;
|
|
20
|
+
docChange: (html: string) => any;
|
|
20
21
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
21
22
|
onBlur?: (() => any) | undefined;
|
|
22
23
|
onFocus?: (() => any) | undefined;
|
|
@@ -26,6 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
26
27
|
ignore: boolean;
|
|
27
28
|
}) => any) | undefined;
|
|
28
29
|
onEmptyChange?: ((empty: boolean) => any) | undefined;
|
|
30
|
+
onDocChange?: ((html: string) => any) | undefined;
|
|
29
31
|
}>, {
|
|
30
32
|
editable: boolean;
|
|
31
33
|
autoFocus: boolean;
|
|
@@ -14,7 +14,7 @@ import type { PPTTextElement } from '../../../../types/slides';
|
|
|
14
14
|
* variable (the computed px value), since `.ProseMirror` hardcodes 16px.
|
|
15
15
|
* Vertical (top-to-bottom) text is left untouched.
|
|
16
16
|
*/
|
|
17
|
-
declare const _default: (elementInfo: Ref<PPTTextElement>) => {
|
|
17
|
+
declare const _default: (elementInfo: Ref<PPTTextElement>, liveContent?: Ref<string | null>) => {
|
|
18
18
|
fitScale: Ref<number, number>;
|
|
19
19
|
fittedContent: import("vue").ComputedRef<string>;
|
|
20
20
|
fitVars: import("vue").ComputedRef<CSSProperties>;
|