@floegence/floe-webapp-core 0.56.1 → 0.56.2
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.
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { insert as k, createComponent as
|
|
1
|
+
import { insert as k, createComponent as g, memo as be, effect as P, template as A, addEventListener as U, use as se, classList as it, setAttribute as s, style as he, spread as dt, mergeProps as st, className as De, setStyleProperty as xe, delegateEvents as ut } from "solid-js/web";
|
|
2
2
|
import { CANVAS_WHEEL_INTERACTIVE_ATTR as vt } from "../ui/localInteractionSurface.js";
|
|
3
3
|
import { CompositionToolbar as Fe, CompositionIcon as ue, CompositionDivider as mt } from "./WorkbenchCompositionToolbar.js";
|
|
4
4
|
import { useWorkbenchCompositionText as _e, WorkbenchCompositionActionsContext as We } from "./workbenchCompositionMessages.js";
|
|
5
5
|
import { SurfaceAnchoredLayer as Ae } from "../ui/SurfaceAnchoredLayer.js";
|
|
6
|
-
import { createSignal as re, createMemo as
|
|
7
|
-
import { GripVertical as Ge, Check as ot, ChevronDown as ht, Minus as
|
|
6
|
+
import { createSignal as re, createMemo as O, For as de, Show as oe, createEffect as fe, onCleanup as ye, useContext as Ne, untrack as Pe, batch as Te } from "solid-js";
|
|
7
|
+
import { GripVertical as Ge, Check as ot, ChevronDown as ht, Minus as wt, Plus as gt } from "../icons/index.js";
|
|
8
8
|
import { startHotInteraction as rt } from "../../utils/hotInteraction.js";
|
|
9
9
|
import { startPointerSession as at } from "../ui/pointerSession.js";
|
|
10
10
|
import { WORKBENCH_DEFAULT_TEXT_COLOR as bt, WORKBENCH_STICKY_NOTE_COLORS as ft, WORKBENCH_BACKGROUND_MATERIALS as yt, WORKBENCH_REGION_COLOR_OPTIONS as ct, WORKBENCH_TEXT_FONT_OPTIONS as Ie, WORKBENCH_TEXT_COLOR_OPTIONS as kt } from "./workbenchOptions.js";
|
|
11
11
|
import { compareWorkbenchLayerRenderOrder as xt, createWorkbenchWidgetSurfaceMetrics as $t } from "./workbenchHelpers.js";
|
|
12
|
-
import { createOwnerSafePropAccessor as
|
|
13
|
-
var Ct = /* @__PURE__ */ A("<span class=workbench-note-preview><span class=workbench-preview-writing>"), _t = /* @__PURE__ */ A("<div class=workbench-sticky__title role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-floe-workbench-sticky-local=true data-wb-text-editor=plain data-wb-part=content>"), St = /* @__PURE__ */ A("<div class=workbench-composition-selection aria-hidden=true>"), zt = /* @__PURE__ */ A('<button type=button class="workbench-layer-resize workbench-sticky__resize">'), pt = /* @__PURE__ */ A("<article class=workbench-sticky data-floe-canvas-interactive=true data-floe-workbench-widget-root=true data-wb-plane=work data-wb-object-kind=sticky tabindex=0><div class=workbench-sticky__surface data-floe-input-surface=true><button type=button class=workbench-sticky__grip data-floe-workbench-sticky-local=true data-wb-part=move></button><div class=workbench-sticky__content><div class=workbench-sticky__body role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-wb-text-editor=plain data-floe-workbench-sticky-local=true data-wb-part=content>"), lt = /* @__PURE__ */ A("<div class=workbench-color-options>"), Et = /* @__PURE__ */ A("<button type=button class=workbench-style-choice>"),
|
|
12
|
+
import { createOwnerSafePropAccessor as c } from "./workbenchOwnerSafeAccessors.js";
|
|
13
|
+
var Ct = /* @__PURE__ */ A("<span class=workbench-note-preview><span class=workbench-preview-writing>"), _t = /* @__PURE__ */ A("<div class=workbench-sticky__title role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-floe-workbench-sticky-local=true data-wb-text-editor=plain data-wb-part=content>"), St = /* @__PURE__ */ A("<div class=workbench-composition-selection aria-hidden=true>"), zt = /* @__PURE__ */ A('<button type=button class="workbench-layer-resize workbench-sticky__resize">'), pt = /* @__PURE__ */ A("<article class=workbench-sticky data-floe-canvas-interactive=true data-floe-workbench-widget-root=true data-wb-plane=work data-wb-object-kind=sticky tabindex=0><div class=workbench-sticky__surface data-floe-input-surface=true><button type=button class=workbench-sticky__grip data-floe-workbench-sticky-local=true data-wb-part=move></button><div class=workbench-sticky__content><div class=workbench-sticky__body role=textbox aria-multiline=true data-floe-workbench-text-selection-surface=true data-wb-text-editor=plain data-floe-workbench-sticky-local=true data-wb-part=content>"), lt = /* @__PURE__ */ A("<div class=workbench-color-options>"), Et = /* @__PURE__ */ A("<button type=button class=workbench-style-choice>"), ge = /* @__PURE__ */ A("<button type=button>"), He = /* @__PURE__ */ A("<button type=button class=is-danger>"), Rt = /* @__PURE__ */ A("<article class=workbench-text-annotation data-floe-input-surface=true data-wb-plane=annotation data-wb-object-kind=text data-wb-part=body><div class=workbench-text-annotation__content data-floe-workbench-text-selection-surface=true data-wb-text-editor=plain data-wb-part=content>"), Pt = /* @__PURE__ */ A("<article class=workbench-background-region data-wb-plane=background data-wb-object-kind=region data-wb-part=body><div class=workbench-background-region__label data-floe-input-surface=true><div role=textbox data-floe-workbench-text-selection-surface=true></div></div><button type=button class=workbench-region-grip>"), Tt = /* @__PURE__ */ A("<select><option value=more>"), Mt = /* @__PURE__ */ A('<div class="workbench-layer-control workbench-layer-control--text"data-floe-canvas-interactive=true data-wb-plane=overlay data-wb-object-kind=text data-wb-part=toolbar><div class="workbench-layer-control__selection is-text"aria-hidden=true></div><button type=button class=workbench-text-move data-wb-part=move></button><button type=button class=workbench-layer-resize data-wb-part=resize>'), Lt = /* @__PURE__ */ A("<div class=workbench-text-font-popover role=menu>"), It = /* @__PURE__ */ A("<div class=workbench-text-font-picker data-floe-canvas-interactive=true><button type=button aria-haspopup=menu class=workbench-text-font-trigger><span class=workbench-text-font-trigger__sample>Aa</span><span class=workbench-text-font-trigger__label>"), jt = /* @__PURE__ */ A("<div class=workbench-text-size-stepper role=group><button type=button class=workbench-text-size-stepper__button></button><input class=workbench-text-annotation__size-input type=text inputmode=numeric pattern=[0-9]*><button type=button class=workbench-text-size-stepper__button>"), Ot = /* @__PURE__ */ A("<button type=button role=menuitemradio class=workbench-text-font-option><span class=workbench-text-font-option__sample>Aa</span><span class=workbench-text-font-option__label>"), Dt = /* @__PURE__ */ A("<button type=button class=workbench-layer-swatch>"), Ft = /* @__PURE__ */ A("<option>"), Wt = /* @__PURE__ */ A("<button type=button class=workbench-name-trigger><span>"), At = /* @__PURE__ */ A('<div class="workbench-layer-control workbench-layer-control--region"data-floe-canvas-interactive=true data-wb-plane=overlay data-wb-object-kind=region data-wb-part=toolbar><div class="workbench-layer-control__selection is-region"aria-hidden=true></div><button type=button class=workbench-layer-resize data-wb-part=resize>'), Nt = /* @__PURE__ */ A("<span class=workbench-region-preview-mat><span>"), Gt = /* @__PURE__ */ A("<button type=button class=workbench-style-choice><span class=workbench-region-preview-mat><span>"), Ht = /* @__PURE__ */ A("<label><input type=range min=8 max=100>"), Bt = /* @__PURE__ */ A("<div aria-hidden=true data-wb-plane=overlay data-wb-object-kind=region-outline>"), Xt = /* @__PURE__ */ A("<div class=workbench-region-visibility-outline-layer aria-hidden=true>"), Yt = /* @__PURE__ */ A("<div class=workbench-background-layer>"), Ut = /* @__PURE__ */ A("<div class=workbench-annotation-layer>"), Kt = /* @__PURE__ */ A("<div class=workbench-control-overlay-layer data-wb-plane=overlay>");
|
|
14
14
|
const Vt = 190, qt = 132, Jt = 180, Qt = 120, Zt = 96, en = 42, tn = {
|
|
15
15
|
amber: "is-amber",
|
|
16
16
|
sage: "is-sage",
|
|
@@ -22,13 +22,13 @@ const Vt = 190, qt = 132, Jt = 180, Qt = 120, Zt = 96, en = 42, tn = {
|
|
|
22
22
|
function Sn() {
|
|
23
23
|
const e = /* @__PURE__ */ new Map(), [t, r] = re(0);
|
|
24
24
|
return {
|
|
25
|
-
register(
|
|
26
|
-
return e.set(
|
|
27
|
-
e.get(
|
|
25
|
+
register(v, o) {
|
|
26
|
+
return e.set(v, o), r((i) => i + 1), () => {
|
|
27
|
+
e.get(v) === o && (e.delete(v), r((i) => i + 1));
|
|
28
28
|
};
|
|
29
29
|
},
|
|
30
|
-
get(
|
|
31
|
-
return t(), e.get(
|
|
30
|
+
get(v) {
|
|
31
|
+
return t(), e.get(v);
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
}
|
|
@@ -39,20 +39,20 @@ function Xe(e) {
|
|
|
39
39
|
return new Map(e.map((t) => [t.id, t]));
|
|
40
40
|
}
|
|
41
41
|
function nn(e, t) {
|
|
42
|
-
const r = e.findIndex((
|
|
42
|
+
const r = e.findIndex((v) => v === t);
|
|
43
43
|
return e[(r + 1) % e.length] ?? e[0];
|
|
44
44
|
}
|
|
45
45
|
function on(e, t, r) {
|
|
46
46
|
fe(() => {
|
|
47
47
|
if (!e() || typeof document > "u") return;
|
|
48
|
-
const
|
|
48
|
+
const v = (i) => {
|
|
49
49
|
const x = t();
|
|
50
50
|
x && i.target instanceof Node && x.contains(i.target) || r();
|
|
51
51
|
}, o = (i) => {
|
|
52
52
|
i.key === "Escape" && r();
|
|
53
53
|
};
|
|
54
|
-
document.addEventListener("pointerdown",
|
|
55
|
-
document.removeEventListener("pointerdown",
|
|
54
|
+
document.addEventListener("pointerdown", v, !0), document.addEventListener("keydown", o), ye(() => {
|
|
55
|
+
document.removeEventListener("pointerdown", v, !0), document.removeEventListener("keydown", o);
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
}
|
|
@@ -62,38 +62,38 @@ function tt(e, t) {
|
|
|
62
62
|
return r === t || t.contains(r);
|
|
63
63
|
}
|
|
64
64
|
function Me(e) {
|
|
65
|
-
const [t, r] = re(), [
|
|
65
|
+
const [t, r] = re(), [v, o] = re(!1), [i, x] = re(!1);
|
|
66
66
|
let z;
|
|
67
|
-
const
|
|
68
|
-
const d = e.singleLine ? (
|
|
67
|
+
const D = () => t()?.textContent ?? "", B = (w) => r(w), F = (w) => {
|
|
68
|
+
const d = e.singleLine ? (w.textContent ?? "").trim() : w.innerHTML ?? "";
|
|
69
69
|
d !== e.value() && e.onCommit(d);
|
|
70
70
|
};
|
|
71
71
|
fe(() => {
|
|
72
|
-
const
|
|
73
|
-
if (!
|
|
72
|
+
const w = t();
|
|
73
|
+
if (!w || v() || i()) return;
|
|
74
74
|
const d = e.value();
|
|
75
|
-
(
|
|
75
|
+
(w.innerHTML ?? "") !== d && (e.singleLine ? w.textContent = d : w.innerHTML = d);
|
|
76
76
|
}), fe(() => {
|
|
77
|
-
const
|
|
78
|
-
if (!
|
|
79
|
-
const d = (
|
|
80
|
-
|
|
81
|
-
}, T =
|
|
77
|
+
const w = t();
|
|
78
|
+
if (!w || !i()) return;
|
|
79
|
+
const d = (h) => {
|
|
80
|
+
h.composedPath().includes(w) || w.blur();
|
|
81
|
+
}, T = w.ownerDocument;
|
|
82
82
|
T.addEventListener("pointerdown", d, !0), ye(() => T.removeEventListener("pointerdown", d, !0));
|
|
83
83
|
});
|
|
84
84
|
const p = () => {
|
|
85
85
|
x(!0);
|
|
86
|
-
}, Y = (
|
|
86
|
+
}, Y = (w) => {
|
|
87
87
|
const d = document.getSelection();
|
|
88
|
-
tt(d,
|
|
89
|
-
}, E = (
|
|
90
|
-
if (
|
|
91
|
-
const d =
|
|
92
|
-
|
|
93
|
-
},
|
|
88
|
+
tt(d, w.currentTarget) && (z = d.getRangeAt(0).cloneRange()), v() || F(w.currentTarget), x(!1);
|
|
89
|
+
}, E = (w) => {
|
|
90
|
+
if (w.stopPropagation(), v() || w.isComposing || w.keyCode === 229) return;
|
|
91
|
+
const d = w.ctrlKey || w.metaKey;
|
|
92
|
+
w.key === "Escape" || w.key === "Enter" && (d || e.singleLine) ? (w.preventDefault(), w.currentTarget.blur()) : d && w.key === "b" ? (w.preventDefault(), document.execCommand("bold", !1)) : d && w.key === "i" && (w.preventDefault(), document.execCommand("italic", !1));
|
|
93
|
+
}, I = () => {
|
|
94
94
|
o(!0);
|
|
95
|
-
}, C = (
|
|
96
|
-
document.activeElement !==
|
|
95
|
+
}, C = (w) => {
|
|
96
|
+
document.activeElement !== w.currentTarget && F(w.currentTarget), o(!1);
|
|
97
97
|
}, G = () => {
|
|
98
98
|
x(!0), t()?.focus({
|
|
99
99
|
preventScroll: !0
|
|
@@ -103,21 +103,21 @@ function Me(e) {
|
|
|
103
103
|
bind: B,
|
|
104
104
|
blur: () => t()?.blur(),
|
|
105
105
|
isFocused: i,
|
|
106
|
-
readText:
|
|
106
|
+
readText: D,
|
|
107
107
|
focus: G,
|
|
108
|
-
insertTextAtSelection: (
|
|
108
|
+
insertTextAtSelection: (w) => {
|
|
109
109
|
const d = t();
|
|
110
110
|
if (!d) return;
|
|
111
|
-
const T = document.getSelection(),
|
|
112
|
-
if (G(), !
|
|
113
|
-
|
|
114
|
-
const n = document.createTextNode(
|
|
115
|
-
|
|
111
|
+
const T = document.getSelection(), h = tt(T, d) ? T.getRangeAt(0).cloneRange() : void 0, l = z && d.contains(z.commonAncestorContainer) ? z : void 0, u = h ?? l?.cloneRange() ?? document.createRange();
|
|
112
|
+
if (G(), !h && !l && (u.selectNodeContents(d), u.collapse(!1)), T?.removeAllRanges(), T?.addRange(u), document.execCommand?.("insertText", !1, w)) return;
|
|
113
|
+
u.deleteContents();
|
|
114
|
+
const n = document.createTextNode(w);
|
|
115
|
+
u.insertNode(n), u.setStartAfter(n), u.collapse(!0), T?.removeAllRanges(), T?.addRange(u);
|
|
116
116
|
},
|
|
117
117
|
handleFocus: p,
|
|
118
118
|
handleBlur: Y,
|
|
119
119
|
handleKeyDown: E,
|
|
120
|
-
handleCompositionStart:
|
|
120
|
+
handleCompositionStart: I,
|
|
121
121
|
handleCompositionEnd: C
|
|
122
122
|
};
|
|
123
123
|
}
|
|
@@ -193,40 +193,40 @@ function Ee(e) {
|
|
|
193
193
|
};
|
|
194
194
|
}
|
|
195
195
|
function Le(e) {
|
|
196
|
-
const t =
|
|
196
|
+
const t = c(() => e.readPosition()), r = c(() => e.readGeometry?.() ?? {
|
|
197
197
|
width: 0,
|
|
198
198
|
height: 0
|
|
199
|
-
}),
|
|
199
|
+
}), v = c(() => e.viewportScale()), o = c(() => e.onCommitMove), i = c(() => e.onPreviewMove), x = c(() => e.onPreviewEnd), z = c(() => e.onInteractionStart), D = c(() => e.onInteractionEnd), B = c(() => e.onCommitStart), [F, p] = re(null);
|
|
200
200
|
let Y;
|
|
201
201
|
return ye(() => {
|
|
202
202
|
Y?.stop({
|
|
203
203
|
reason: "manual_stop",
|
|
204
204
|
commit: !1
|
|
205
|
-
}), Y = void 0, Pe(
|
|
205
|
+
}), Y = void 0, Pe(F)?.stopInteraction();
|
|
206
206
|
}), {
|
|
207
|
-
position:
|
|
208
|
-
const C =
|
|
207
|
+
position: O(() => {
|
|
208
|
+
const C = F();
|
|
209
209
|
return C ? {
|
|
210
210
|
x: C.worldX,
|
|
211
211
|
y: C.worldY
|
|
212
212
|
} : t();
|
|
213
213
|
}),
|
|
214
|
-
isDragging: () =>
|
|
214
|
+
isDragging: () => F() !== null,
|
|
215
215
|
beginDrag: (C) => {
|
|
216
216
|
if (C.button !== 0) return;
|
|
217
217
|
C.preventDefault(), C.stopPropagation(), Y?.stop({
|
|
218
218
|
reason: "manual_stop",
|
|
219
219
|
commit: !1
|
|
220
220
|
});
|
|
221
|
-
const G = t(), q = Math.max(
|
|
221
|
+
const G = t(), q = Math.max(v(), 1e-3), w = rt({
|
|
222
222
|
kind: "drag",
|
|
223
223
|
cursor: "grabbing"
|
|
224
224
|
});
|
|
225
225
|
let d = !1;
|
|
226
226
|
z()?.();
|
|
227
227
|
const T = () => {
|
|
228
|
-
d || (d = !0,
|
|
229
|
-
},
|
|
228
|
+
d || (d = !0, w(), D()?.());
|
|
229
|
+
}, h = r(), l = i(), u = x(), n = B(), L = o();
|
|
230
230
|
p({
|
|
231
231
|
pointerId: C.pointerId,
|
|
232
232
|
startClientX: C.clientX,
|
|
@@ -242,7 +242,7 @@ function Le(e) {
|
|
|
242
242
|
pointerEvent: C,
|
|
243
243
|
captureEl: C.currentTarget,
|
|
244
244
|
onMove: (X) => {
|
|
245
|
-
let
|
|
245
|
+
let j = null;
|
|
246
246
|
Te(() => {
|
|
247
247
|
p((S) => {
|
|
248
248
|
if (!S || S.pointerId !== X.pointerId) return S;
|
|
@@ -250,33 +250,33 @@ function Le(e) {
|
|
|
250
250
|
x: S.startWorldX + (X.clientX - S.startClientX) / S.scale,
|
|
251
251
|
y: S.startWorldY + (X.clientY - S.startClientY) / S.scale
|
|
252
252
|
};
|
|
253
|
-
return
|
|
253
|
+
return j = {
|
|
254
254
|
x: S.startWorldX + (X.clientX - S.startClientX) / S.scale,
|
|
255
255
|
y: S.startWorldY + (X.clientY - S.startClientY) / S.scale,
|
|
256
|
-
width:
|
|
257
|
-
height:
|
|
256
|
+
width: h.width,
|
|
257
|
+
height: h.height
|
|
258
258
|
}, {
|
|
259
259
|
...S,
|
|
260
260
|
worldX: te.x,
|
|
261
261
|
worldY: te.y,
|
|
262
262
|
moved: S.moved || Math.abs(te.x - S.startWorldX) > 2 || Math.abs(te.y - S.startWorldY) > 2
|
|
263
263
|
};
|
|
264
|
-
}),
|
|
264
|
+
}), j && l?.(j);
|
|
265
265
|
});
|
|
266
266
|
},
|
|
267
267
|
onEnd: ({
|
|
268
268
|
commit: X
|
|
269
269
|
}) => {
|
|
270
|
-
const
|
|
270
|
+
const j = Pe(F);
|
|
271
271
|
Te(() => {
|
|
272
|
-
if (
|
|
272
|
+
if (j && X) {
|
|
273
273
|
const S = {
|
|
274
|
-
x:
|
|
275
|
-
y:
|
|
274
|
+
x: j.worldX,
|
|
275
|
+
y: j.worldY
|
|
276
276
|
};
|
|
277
|
-
n?.(S),
|
|
277
|
+
n?.(S), j.moved && L(S);
|
|
278
278
|
}
|
|
279
|
-
|
|
279
|
+
j?.stopInteraction(), p(null), Y = void 0, u?.();
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
});
|
|
@@ -284,72 +284,72 @@ function Le(e) {
|
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
286
|
function Ye(e) {
|
|
287
|
-
const t =
|
|
288
|
-
let
|
|
287
|
+
const t = c(() => e.readSize()), r = c(() => e.viewportScale()), v = c(() => e.onCommitResize), o = c(() => e.onPreviewResize), i = c(() => e.onPreviewEnd), x = c(() => e.onInteractionStart), z = c(() => e.onInteractionEnd), [D, B] = re(null);
|
|
288
|
+
let F;
|
|
289
289
|
return ye(() => {
|
|
290
|
-
|
|
290
|
+
F?.stop({
|
|
291
291
|
reason: "manual_stop",
|
|
292
292
|
commit: !1
|
|
293
|
-
}),
|
|
293
|
+
}), F = void 0, Pe(D)?.stopInteraction();
|
|
294
294
|
}), {
|
|
295
|
-
size:
|
|
296
|
-
const E =
|
|
295
|
+
size: O(() => {
|
|
296
|
+
const E = D();
|
|
297
297
|
return E ? {
|
|
298
298
|
width: E.width,
|
|
299
299
|
height: E.height
|
|
300
300
|
} : t();
|
|
301
301
|
}),
|
|
302
|
-
isResizing: () =>
|
|
302
|
+
isResizing: () => D() !== null,
|
|
303
303
|
beginResize: (E) => {
|
|
304
304
|
if (E.button !== 0) return;
|
|
305
|
-
E.preventDefault(), E.stopPropagation(),
|
|
305
|
+
E.preventDefault(), E.stopPropagation(), F?.stop({
|
|
306
306
|
reason: "manual_stop",
|
|
307
307
|
commit: !1
|
|
308
308
|
});
|
|
309
|
-
const
|
|
309
|
+
const I = t(), C = Math.max(r(), 1e-3), G = rt({
|
|
310
310
|
kind: "resize",
|
|
311
311
|
cursor: "nwse-resize"
|
|
312
312
|
});
|
|
313
313
|
let q = !1;
|
|
314
314
|
x()?.();
|
|
315
|
-
const
|
|
315
|
+
const w = () => {
|
|
316
316
|
q || (q = !0, G(), z()?.());
|
|
317
|
-
}, d = o(), T = i(),
|
|
317
|
+
}, d = o(), T = i(), h = v();
|
|
318
318
|
B({
|
|
319
319
|
pointerId: E.pointerId,
|
|
320
320
|
startClientX: E.clientX,
|
|
321
321
|
startClientY: E.clientY,
|
|
322
|
-
startWidth:
|
|
323
|
-
startHeight:
|
|
324
|
-
width:
|
|
325
|
-
height:
|
|
322
|
+
startWidth: I.width,
|
|
323
|
+
startHeight: I.height,
|
|
324
|
+
width: I.width,
|
|
325
|
+
height: I.height,
|
|
326
326
|
scale: C,
|
|
327
|
-
stopInteraction:
|
|
328
|
-
}),
|
|
327
|
+
stopInteraction: w
|
|
328
|
+
}), F = at({
|
|
329
329
|
pointerEvent: E,
|
|
330
330
|
captureEl: E.currentTarget,
|
|
331
|
-
onMove: (
|
|
332
|
-
let
|
|
331
|
+
onMove: (l) => {
|
|
332
|
+
let u = null;
|
|
333
333
|
Te(() => {
|
|
334
|
-
B((n) => !n || n.pointerId !==
|
|
335
|
-
width: Math.max(e.minWidth, n.startWidth + (
|
|
336
|
-
height: Math.max(e.minHeight, n.startHeight + (
|
|
334
|
+
B((n) => !n || n.pointerId !== l.pointerId ? n : (u = {
|
|
335
|
+
width: Math.max(e.minWidth, n.startWidth + (l.clientX - n.startClientX) / n.scale),
|
|
336
|
+
height: Math.max(e.minHeight, n.startHeight + (l.clientY - n.startClientY) / n.scale)
|
|
337
337
|
}, {
|
|
338
338
|
...n,
|
|
339
|
-
width:
|
|
340
|
-
height:
|
|
341
|
-
})),
|
|
339
|
+
width: u.width,
|
|
340
|
+
height: u.height
|
|
341
|
+
})), u && d?.(u);
|
|
342
342
|
});
|
|
343
343
|
},
|
|
344
344
|
onEnd: ({
|
|
345
|
-
commit:
|
|
345
|
+
commit: l
|
|
346
346
|
}) => {
|
|
347
|
-
const
|
|
347
|
+
const u = Pe(D);
|
|
348
348
|
Te(() => {
|
|
349
|
-
|
|
350
|
-
width:
|
|
351
|
-
height:
|
|
352
|
-
}),
|
|
349
|
+
u && l && h({
|
|
350
|
+
width: u.width,
|
|
351
|
+
height: u.height
|
|
352
|
+
}), u?.stopInteraction(), B(null), F = void 0, T?.();
|
|
353
353
|
});
|
|
354
354
|
}
|
|
355
355
|
});
|
|
@@ -360,8 +360,8 @@ function nt(e) {
|
|
|
360
360
|
return (() => {
|
|
361
361
|
var t = Ct();
|
|
362
362
|
return P((r) => {
|
|
363
|
-
var
|
|
364
|
-
return
|
|
363
|
+
var v = e.color, o = e.material;
|
|
364
|
+
return v !== r.e && s(t, "data-note-color", r.e = v), o !== r.t && s(t, "data-note-material", r.t = o), r;
|
|
365
365
|
}, {
|
|
366
366
|
e: void 0,
|
|
367
367
|
t: void 0
|
|
@@ -369,21 +369,21 @@ function nt(e) {
|
|
|
369
369
|
})();
|
|
370
370
|
}
|
|
371
371
|
function zn(e) {
|
|
372
|
-
const t = _e(), [r,
|
|
372
|
+
const t = _e(), [r, v] = re(), o = c(() => e.item), i = c(() => e.selected), x = c(() => e.viewportScale), z = c(() => e.projectedViewport), D = c(() => e.surfaceReady ?? !0), B = c(() => e.renderLayer), F = c(() => e.topRenderLayer), p = c(() => e.locked), Y = c(() => e.filtered), E = c(() => e.visualFront ?? !1), I = c(() => e.onSelect), C = c(() => e.onContextMenu), G = c(() => e.onClaimVisualFrontOwner), q = c(() => e.onCommitFront), w = c(() => e.onCommitMove), d = c(() => e.onCommitResize), T = c(() => e.onUpdate), h = c(() => e.onDelete), l = c(() => e.onLayoutInteractionStart), u = c(() => e.onLayoutInteractionEnd), n = Me({
|
|
373
373
|
value: () => o().body,
|
|
374
374
|
onCommit: ($) => T()(o().id, {
|
|
375
375
|
body: $
|
|
376
376
|
})
|
|
377
|
-
}),
|
|
377
|
+
}), L = Me({
|
|
378
378
|
value: () => o().title ?? "",
|
|
379
379
|
onCommit: ($) => T()(o().id, {
|
|
380
380
|
title: $
|
|
381
381
|
})
|
|
382
382
|
});
|
|
383
383
|
fe(() => {
|
|
384
|
-
p() && (
|
|
384
|
+
p() && (L.blur(), n.blur());
|
|
385
385
|
});
|
|
386
|
-
const [X,
|
|
386
|
+
const [X, j] = re("body"), S = Ne(We), te = () => L.isFocused() || n.isFocused(), [ne, ae] = re(!1);
|
|
387
387
|
let _;
|
|
388
388
|
const J = () => {
|
|
389
389
|
typeof window > "u" || _ === void 0 || (window.clearTimeout(_), _ = void 0);
|
|
@@ -395,20 +395,20 @@ function zn(e) {
|
|
|
395
395
|
ye(() => J());
|
|
396
396
|
const ve = async () => {
|
|
397
397
|
typeof navigator > "u" || !navigator.clipboard?.writeText || (await navigator.clipboard.writeText(n.readText()), ce());
|
|
398
|
-
},
|
|
398
|
+
}, m = ($) => {
|
|
399
399
|
if ($.button !== 0) return;
|
|
400
400
|
const ie = o();
|
|
401
|
-
|
|
401
|
+
I()(ie.id), !p() && ($.target instanceof Element && $.target.closest('[data-floe-workbench-sticky-local="true"]') || (G()?.(ie.id), b.beginDrag($)));
|
|
402
402
|
}, b = Le({
|
|
403
403
|
viewportScale: x,
|
|
404
404
|
readPosition: () => ({
|
|
405
405
|
x: o().x,
|
|
406
406
|
y: o().y
|
|
407
407
|
}),
|
|
408
|
-
onCommitMove: ($) =>
|
|
408
|
+
onCommitMove: ($) => w()(o().id, $),
|
|
409
409
|
onCommitStart: () => q()?.(o().id),
|
|
410
|
-
onInteractionStart: () =>
|
|
411
|
-
onInteractionEnd: () =>
|
|
410
|
+
onInteractionStart: () => l()?.(),
|
|
411
|
+
onInteractionEnd: () => u()?.()
|
|
412
412
|
}), y = Ye({
|
|
413
413
|
viewportScale: x,
|
|
414
414
|
readSize: () => ({
|
|
@@ -418,9 +418,9 @@ function zn(e) {
|
|
|
418
418
|
minWidth: Vt,
|
|
419
419
|
minHeight: qt,
|
|
420
420
|
onCommitResize: ($) => d()(o().id, $),
|
|
421
|
-
onInteractionStart: () =>
|
|
422
|
-
onInteractionEnd: () =>
|
|
423
|
-
}), W =
|
|
421
|
+
onInteractionStart: () => l()?.(),
|
|
422
|
+
onInteractionEnd: () => u()?.()
|
|
423
|
+
}), W = O(() => b.position()), H = O(() => y.size()), f = O(() => {
|
|
424
424
|
const $ = z();
|
|
425
425
|
if ($)
|
|
426
426
|
return $t({
|
|
@@ -430,43 +430,43 @@ function zn(e) {
|
|
|
430
430
|
worldWidth: H().width,
|
|
431
431
|
worldHeight: H().height,
|
|
432
432
|
viewport: $(),
|
|
433
|
-
ready:
|
|
433
|
+
ready: D()
|
|
434
434
|
});
|
|
435
|
-
}), K =
|
|
435
|
+
}), K = O(() => f()?.rect.viewportScale ?? Math.max(x(), 1e-3)), Z = O(() => ({
|
|
436
436
|
"--workbench-layer-control-inverse-scale": `${1 / K()}`,
|
|
437
437
|
width: `${H().width}px`,
|
|
438
438
|
height: `${H().height}px`,
|
|
439
439
|
transform: z() ? `translate(${f()?.rect.screenX ?? 0}px, ${f()?.rect.screenY ?? 0}px) scale(${K()})` : `translate(${W().x}px, ${W().y}px)`,
|
|
440
440
|
"transform-origin": "0 0",
|
|
441
|
-
"z-index": `${i() || E() || b.isDragging() || y.isResizing() ?
|
|
441
|
+
"z-index": `${i() || E() || b.isDragging() || y.isResizing() ? F() + 1 : B()}`
|
|
442
442
|
}));
|
|
443
443
|
return (() => {
|
|
444
444
|
var $ = pt(), ie = $.firstChild, N = ie.firstChild, le = N.nextSibling, ee = le.firstChild;
|
|
445
445
|
$.$$contextmenu = (a) => {
|
|
446
446
|
a.preventDefault(), a.stopPropagation(), C()?.(a, o());
|
|
447
|
-
}, $.addEventListener("focus", () =>
|
|
447
|
+
}, $.addEventListener("focus", () => I()(o().id)), $.$$pointerdown = m, se(v, $), N.$$pointerdown = (a) => {
|
|
448
448
|
if (p()) return;
|
|
449
449
|
const M = o();
|
|
450
|
-
|
|
451
|
-
}, k(N,
|
|
450
|
+
I()(M.id), G()?.(M.id), b.beginDrag(a);
|
|
451
|
+
}, k(N, g(Ge, {
|
|
452
452
|
class: "w-3.5 h-3.5"
|
|
453
453
|
})), dt(le, st(() => ({
|
|
454
454
|
[vt]: i() ? "true" : void 0
|
|
455
|
-
})), !1, !0), k(le,
|
|
455
|
+
})), !1, !0), k(le, g(oe, {
|
|
456
456
|
get when() {
|
|
457
457
|
return o().title !== void 0;
|
|
458
458
|
},
|
|
459
459
|
get children() {
|
|
460
460
|
var a = _t();
|
|
461
|
-
U(a, "compositionend",
|
|
462
|
-
|
|
461
|
+
U(a, "compositionend", L.handleCompositionEnd), U(a, "compositionstart", L.handleCompositionStart), U(a, "keydown", L.handleKeyDown, !0), U(a, "blur", L.handleBlur), a.addEventListener("focus", (R) => {
|
|
462
|
+
j("title"), L.handleFocus(R);
|
|
463
463
|
}), a.$$pointerdown = (R) => {
|
|
464
|
-
R.stopPropagation(),
|
|
464
|
+
R.stopPropagation(), I()(o().id);
|
|
465
465
|
};
|
|
466
|
-
var M =
|
|
467
|
-
return typeof M == "function" ? se(M, a) :
|
|
468
|
-
var V = !p(), me = t("stickyTitle"),
|
|
469
|
-
return V !== R.e && s(a, "contenteditable", R.e = V), me !== R.t && s(a, "aria-label", R.t = me),
|
|
466
|
+
var M = L.bind;
|
|
467
|
+
return typeof M == "function" ? se(M, a) : L.bind = a, s(a, "spellcheck", !1), P((R) => {
|
|
468
|
+
var V = !p(), me = t("stickyTitle"), we = t("textPlaceholder");
|
|
469
|
+
return V !== R.e && s(a, "contenteditable", R.e = V), me !== R.t && s(a, "aria-label", R.t = me), we !== R.a && s(a, "data-placeholder", R.a = we), R;
|
|
470
470
|
}, {
|
|
471
471
|
e: void 0,
|
|
472
472
|
t: void 0,
|
|
@@ -474,17 +474,17 @@ function zn(e) {
|
|
|
474
474
|
}), a;
|
|
475
475
|
}
|
|
476
476
|
}), ee), U(ee, "compositionend", n.handleCompositionEnd), U(ee, "compositionstart", n.handleCompositionStart), U(ee, "keydown", n.handleKeyDown, !0), U(ee, "blur", n.handleBlur), ee.addEventListener("focus", (a) => {
|
|
477
|
-
|
|
477
|
+
j("body"), n.handleFocus(a);
|
|
478
478
|
}), ee.$$pointerdown = (a) => {
|
|
479
|
-
a.stopPropagation(),
|
|
479
|
+
a.stopPropagation(), I()(o().id);
|
|
480
480
|
};
|
|
481
481
|
var ke = n.bind;
|
|
482
|
-
return typeof ke == "function" ? se(ke, ee) : n.bind = ee, s(ee, "spellcheck", !1), k($,
|
|
482
|
+
return typeof ke == "function" ? se(ke, ee) : n.bind = ee, s(ee, "spellcheck", !1), k($, g(oe, {
|
|
483
483
|
get when() {
|
|
484
484
|
return be(() => !!i())() && !p();
|
|
485
485
|
},
|
|
486
486
|
get children() {
|
|
487
|
-
return
|
|
487
|
+
return g(Ae, {
|
|
488
488
|
reservedSpace: {
|
|
489
489
|
top: 64,
|
|
490
490
|
narrowTop: 106,
|
|
@@ -498,15 +498,15 @@ function zn(e) {
|
|
|
498
498
|
},
|
|
499
499
|
class: "workbench-object-tools",
|
|
500
500
|
get children() {
|
|
501
|
-
return
|
|
501
|
+
return g(Fe, {
|
|
502
502
|
kind: "sticky",
|
|
503
|
-
onInsertEmoji: (a) => (X() === "title" && o().title !== void 0 ?
|
|
503
|
+
onInsertEmoji: (a) => (X() === "title" && o().title !== void 0 ? L : n).insertTextAtSelection(a),
|
|
504
504
|
materials: ["tint", "tab", "ruled"],
|
|
505
505
|
get material() {
|
|
506
506
|
return o().material ?? "tint";
|
|
507
507
|
},
|
|
508
508
|
materialLabel: (a) => t("useStickyMaterial", t(a)),
|
|
509
|
-
preview: (a) =>
|
|
509
|
+
preview: (a) => g(nt, {
|
|
510
510
|
get color() {
|
|
511
511
|
return o().color;
|
|
512
512
|
},
|
|
@@ -518,20 +518,20 @@ function zn(e) {
|
|
|
518
518
|
get palette() {
|
|
519
519
|
return (() => {
|
|
520
520
|
var a = lt();
|
|
521
|
-
return k(a,
|
|
521
|
+
return k(a, g(de, {
|
|
522
522
|
each: ft,
|
|
523
523
|
children: (M) => (() => {
|
|
524
524
|
var R = Et();
|
|
525
525
|
return R.$$click = () => T()(o().id, {
|
|
526
526
|
color: M
|
|
527
|
-
}), R.$$pointerdown = Q, k(R,
|
|
527
|
+
}), R.$$pointerdown = Q, k(R, g(nt, {
|
|
528
528
|
color: M,
|
|
529
529
|
get material() {
|
|
530
530
|
return o().material ?? "tint";
|
|
531
531
|
}
|
|
532
|
-
}), null), k(R,
|
|
533
|
-
var me = t("stickyColor", t(M)),
|
|
534
|
-
return me !== V.e && s(R, "aria-label", V.e = me),
|
|
532
|
+
}), null), k(R, g(ot, {}), null), P((V) => {
|
|
533
|
+
var me = t("stickyColor", t(M)), we = o().color === M;
|
|
534
|
+
return me !== V.e && s(R, "aria-label", V.e = me), we !== V.t && s(R, "aria-pressed", V.t = we), V;
|
|
535
535
|
}, {
|
|
536
536
|
e: void 0,
|
|
537
537
|
t: void 0
|
|
@@ -541,12 +541,12 @@ function zn(e) {
|
|
|
541
541
|
})();
|
|
542
542
|
},
|
|
543
543
|
get actions() {
|
|
544
|
-
return [
|
|
544
|
+
return [g(oe, {
|
|
545
545
|
when: S,
|
|
546
546
|
get fallback() {
|
|
547
547
|
return (() => {
|
|
548
|
-
var a =
|
|
549
|
-
return a.$$click = ve, a.$$pointerdown = Q, k(a,
|
|
548
|
+
var a = ge();
|
|
549
|
+
return a.$$click = ve, a.$$pointerdown = Q, k(a, g(ue, {
|
|
550
550
|
name: "copy"
|
|
551
551
|
})), P((M) => {
|
|
552
552
|
var R = t("copySticky"), V = !!ne();
|
|
@@ -558,11 +558,11 @@ function zn(e) {
|
|
|
558
558
|
})();
|
|
559
559
|
},
|
|
560
560
|
get children() {
|
|
561
|
-
var a =
|
|
561
|
+
var a = ge();
|
|
562
562
|
return a.$$click = () => S?.duplicate({
|
|
563
563
|
kind: "sticky_note",
|
|
564
564
|
id: o().id
|
|
565
|
-
}), a.$$pointerdown = Q, k(a,
|
|
565
|
+
}), a.$$pointerdown = Q, k(a, g(ue, {
|
|
566
566
|
name: "copy"
|
|
567
567
|
})), P((M) => {
|
|
568
568
|
var R = t("duplicate"), V = t("duplicate");
|
|
@@ -574,7 +574,7 @@ function zn(e) {
|
|
|
574
574
|
}
|
|
575
575
|
}), (() => {
|
|
576
576
|
var a = He();
|
|
577
|
-
return a.$$click = () =>
|
|
577
|
+
return a.$$click = () => h()(o().id), a.$$pointerdown = Q, k(a, g(ue, {
|
|
578
578
|
name: "trash"
|
|
579
579
|
})), P((M) => {
|
|
580
580
|
var R = t("deleteSticky"), V = t("deleteSticky");
|
|
@@ -589,14 +589,14 @@ function zn(e) {
|
|
|
589
589
|
}
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
|
-
}), null), k($,
|
|
592
|
+
}), null), k($, g(oe, {
|
|
593
593
|
get when() {
|
|
594
594
|
return i();
|
|
595
595
|
},
|
|
596
596
|
get children() {
|
|
597
597
|
return St();
|
|
598
598
|
}
|
|
599
|
-
}), null), k($,
|
|
599
|
+
}), null), k($, g(oe, {
|
|
600
600
|
get when() {
|
|
601
601
|
return !p();
|
|
602
602
|
},
|
|
@@ -614,8 +614,8 @@ function zn(e) {
|
|
|
614
614
|
"is-copied": ne(),
|
|
615
615
|
"is-editing": te(),
|
|
616
616
|
[tn[o().color]]: !0
|
|
617
|
-
}, R = o().id, V = o().id, me = o().id,
|
|
618
|
-
return a.e = it($, M, a.e), R !== a.t && s($, "data-floe-workbench-widget-id", a.t = R), V !== a.a && s($, "data-wb-object-id", a.a = V), me !== a.o && s($, "data-floe-workbench-sticky-id", a.o = me), a.i = he($,
|
|
617
|
+
}, R = o().id, V = o().id, me = o().id, we = Z(), Ue = o().color, Ke = o().material ?? "tint", Ve = t("dragSticky"), qe = p(), Je = t("textPlaceholder"), Qe = !p(), Ze = p() ? "true" : void 0, et = t("stickyBody");
|
|
618
|
+
return a.e = it($, M, a.e), R !== a.t && s($, "data-floe-workbench-widget-id", a.t = R), V !== a.a && s($, "data-wb-object-id", a.a = V), me !== a.o && s($, "data-floe-workbench-sticky-id", a.o = me), a.i = he($, we, a.i), Ue !== a.n && s(ie, "data-note-color", a.n = Ue), Ke !== a.s && s(ie, "data-note-material", a.s = Ke), Ve !== a.h && s(N, "aria-label", a.h = Ve), qe !== a.r && (N.disabled = a.r = qe), Je !== a.d && s(ee, "data-placeholder", a.d = Je), Qe !== a.l && s(ee, "contenteditable", a.l = Qe), Ze !== a.u && s(ee, "aria-disabled", a.u = Ze), et !== a.c && s(ee, "aria-label", a.c = et), a;
|
|
619
619
|
}, {
|
|
620
620
|
e: void 0,
|
|
621
621
|
t: void 0,
|
|
@@ -634,27 +634,27 @@ function zn(e) {
|
|
|
634
634
|
})();
|
|
635
635
|
}
|
|
636
636
|
function cn(e) {
|
|
637
|
-
const t = _e(), r =
|
|
637
|
+
const t = _e(), r = c(() => e.item), v = c(() => e.selected), o = c(() => e.editable), i = c(() => e.viewportScale), x = c(() => e.viewport ?? {
|
|
638
638
|
x: 0,
|
|
639
639
|
y: 0,
|
|
640
640
|
scale: 1
|
|
641
|
-
}), z =
|
|
641
|
+
}), z = c(() => e.projection), D = c(() => e.preview), B = c(() => e.textEditorRegistry), F = c(() => e.onPreviewGeometry), p = c(() => e.onSelect), Y = c(() => e.onContextMenu), E = c(() => e.onCommitMove), I = c(() => e.onUpdate), C = Me({
|
|
642
642
|
value: () => r().text,
|
|
643
|
-
onCommit: (
|
|
644
|
-
text:
|
|
643
|
+
onCommit: (h) => I()(r().id, {
|
|
644
|
+
text: h
|
|
645
645
|
})
|
|
646
646
|
});
|
|
647
647
|
fe(() => {
|
|
648
|
-
const
|
|
649
|
-
if (!
|
|
650
|
-
const
|
|
648
|
+
const h = B();
|
|
649
|
+
if (!h) return;
|
|
650
|
+
const l = h.register(r().id, {
|
|
651
651
|
focus: C.focus,
|
|
652
652
|
blur: C.blur,
|
|
653
653
|
isFocused: C.isFocused,
|
|
654
654
|
insertTextAtSelection: C.insertTextAtSelection,
|
|
655
655
|
readText: C.readText
|
|
656
656
|
});
|
|
657
|
-
ye(
|
|
657
|
+
ye(l);
|
|
658
658
|
});
|
|
659
659
|
const G = Le({
|
|
660
660
|
viewportScale: i,
|
|
@@ -666,26 +666,26 @@ function cn(e) {
|
|
|
666
666
|
width: r().width,
|
|
667
667
|
height: r().height
|
|
668
668
|
}),
|
|
669
|
-
onCommitMove: (
|
|
670
|
-
onPreviewMove: (
|
|
669
|
+
onCommitMove: (h) => E()(r().id, h),
|
|
670
|
+
onPreviewMove: (h) => F()?.({
|
|
671
671
|
kind: "annotation",
|
|
672
672
|
id: r().id,
|
|
673
|
-
...
|
|
673
|
+
...h
|
|
674
674
|
}),
|
|
675
|
-
onPreviewEnd: () =>
|
|
676
|
-
}), q =
|
|
677
|
-
const
|
|
675
|
+
onPreviewEnd: () => F()?.(null)
|
|
676
|
+
}), q = O(() => {
|
|
677
|
+
const h = r(), l = Se(D(), "annotation", h.id);
|
|
678
678
|
return ze({
|
|
679
679
|
geometry: Ee({
|
|
680
|
-
preview:
|
|
680
|
+
preview: l,
|
|
681
681
|
position: G.position(),
|
|
682
|
-
width:
|
|
683
|
-
height:
|
|
682
|
+
width: h.width,
|
|
683
|
+
height: h.height
|
|
684
684
|
}),
|
|
685
685
|
viewport: x(),
|
|
686
686
|
projection: z()
|
|
687
687
|
});
|
|
688
|
-
}),
|
|
688
|
+
}), w = O(() => z() === "screen" ? Math.max(x().scale, 1e-3) : 1), d = O(() => ({
|
|
689
689
|
...pe(q()),
|
|
690
690
|
"z-index": `${r().z_index}`,
|
|
691
691
|
"--workbench-text-color": r().color,
|
|
@@ -698,24 +698,24 @@ function cn(e) {
|
|
|
698
698
|
"--workbench-text-weight": `${r().font_weight}`,
|
|
699
699
|
"--workbench-text-align": r().align,
|
|
700
700
|
"--workbench-text-family": r().font_family,
|
|
701
|
-
"--workbench-text-content-scale": `${
|
|
702
|
-
"--workbench-text-content-inverse-scale": `${1 /
|
|
703
|
-
})), T = (
|
|
704
|
-
!o() ||
|
|
701
|
+
"--workbench-text-content-scale": `${w()}`,
|
|
702
|
+
"--workbench-text-content-inverse-scale": `${1 / w()}`
|
|
703
|
+
})), T = (h) => {
|
|
704
|
+
!o() || h.button !== 0 || h.target instanceof Element && h.target.closest(".workbench-text-annotation__content") || (h.stopPropagation(), p()(r().id));
|
|
705
705
|
};
|
|
706
706
|
return (() => {
|
|
707
|
-
var
|
|
708
|
-
|
|
707
|
+
var h = Rt(), l = h.firstChild;
|
|
708
|
+
h.$$contextmenu = (n) => {
|
|
709
709
|
o() && (n.preventDefault(), n.stopPropagation(), p()(r().id), Y()?.(n, r()));
|
|
710
|
-
},
|
|
710
|
+
}, h.$$pointerdown = T, U(l, "compositionend", C.handleCompositionEnd), U(l, "compositionstart", C.handleCompositionStart), U(l, "blur", C.handleBlur), U(l, "keydown", C.handleKeyDown, !0), l.addEventListener("focus", (n) => {
|
|
711
711
|
C.handleFocus(n), o() && p()(r().id);
|
|
712
|
-
}),
|
|
712
|
+
}), l.$$pointerdown = (n) => {
|
|
713
713
|
!o() || n.button !== 0 || p()(r().id);
|
|
714
714
|
};
|
|
715
|
-
var
|
|
716
|
-
return typeof
|
|
717
|
-
var
|
|
718
|
-
return
|
|
715
|
+
var u = C.bind;
|
|
716
|
+
return typeof u == "function" ? se(u, l) : C.bind = l, s(l, "spellcheck", !1), P((n) => {
|
|
717
|
+
var L = !!v(), X = !!o(), j = o() ? "true" : void 0, S = r().id, te = d(), ne = o() ? "plaintext-only" : !1, ae = o() ? 0 : void 0, _ = o() ? "textbox" : void 0, J = t("textContent"), ce = o() ? "true" : void 0, ve = o() ? void 0 : "true";
|
|
718
|
+
return L !== n.e && h.classList.toggle("is-selected", n.e = L), X !== n.t && h.classList.toggle("is-editable", n.t = X), j !== n.a && s(h, "data-floe-canvas-interactive", n.a = j), S !== n.o && s(h, "data-wb-object-id", n.o = S), n.i = he(h, te, n.i), ne !== n.n && s(l, "contenteditable", n.n = ne), ae !== n.s && s(l, "tabindex", n.s = ae), _ !== n.h && s(l, "role", n.h = _), J !== n.r && s(l, "aria-label", n.r = J), ce !== n.d && s(l, "aria-multiline", n.d = ce), ve !== n.l && s(l, "aria-disabled", n.l = ve), n;
|
|
719
719
|
}, {
|
|
720
720
|
e: void 0,
|
|
721
721
|
t: void 0,
|
|
@@ -728,15 +728,15 @@ function cn(e) {
|
|
|
728
728
|
r: void 0,
|
|
729
729
|
d: void 0,
|
|
730
730
|
l: void 0
|
|
731
|
-
}),
|
|
731
|
+
}), h;
|
|
732
732
|
})();
|
|
733
733
|
}
|
|
734
734
|
function ln(e) {
|
|
735
|
-
const t = _e(), r =
|
|
735
|
+
const t = _e(), r = c(() => e.item), v = c(() => e.selected), o = c(() => e.editable), i = c(() => e.viewportScale), x = c(() => e.viewport ?? {
|
|
736
736
|
x: 0,
|
|
737
737
|
y: 0,
|
|
738
738
|
scale: 1
|
|
739
|
-
}), z =
|
|
739
|
+
}), z = c(() => e.projection), D = c(() => e.preview), B = c(() => e.onPreviewGeometry), F = c(() => e.onSelect), p = c(() => e.onContextMenu), Y = c(() => e.onCommitMove), E = Me({
|
|
740
740
|
value: () => r().name,
|
|
741
741
|
singleLine: !0,
|
|
742
742
|
onCommit: (d) => e.onUpdate?.(r().id, {
|
|
@@ -747,7 +747,7 @@ function ln(e) {
|
|
|
747
747
|
const d = e.textEditorRegistry?.register(r().id, E);
|
|
748
748
|
ye(() => d?.());
|
|
749
749
|
});
|
|
750
|
-
const
|
|
750
|
+
const I = Le({
|
|
751
751
|
viewportScale: i,
|
|
752
752
|
readPosition: () => ({
|
|
753
753
|
x: r().x,
|
|
@@ -764,45 +764,45 @@ function ln(e) {
|
|
|
764
764
|
...d
|
|
765
765
|
}),
|
|
766
766
|
onPreviewEnd: () => B()?.(null)
|
|
767
|
-
}), C =
|
|
768
|
-
const d = r(), T = Se(
|
|
767
|
+
}), C = O(() => {
|
|
768
|
+
const d = r(), T = Se(D(), "background_layer", d.id);
|
|
769
769
|
return ze({
|
|
770
770
|
geometry: Ee({
|
|
771
771
|
preview: T,
|
|
772
|
-
position:
|
|
772
|
+
position: I.position(),
|
|
773
773
|
width: d.width,
|
|
774
774
|
height: d.height
|
|
775
775
|
}),
|
|
776
776
|
viewport: x(),
|
|
777
777
|
projection: z()
|
|
778
778
|
});
|
|
779
|
-
}), G =
|
|
779
|
+
}), G = O(() => z() === "screen" ? Math.max(x().scale, 1e-3) : 1), q = O(() => ({
|
|
780
780
|
...pe(C()),
|
|
781
781
|
"z-index": `${r().z_index}`,
|
|
782
782
|
"--workbench-layer-control-inverse-scale": `${1 / C().scale}`,
|
|
783
783
|
"--workbench-region-content-scale": `${G()}`,
|
|
784
784
|
"--workbench-region-content-inverse-scale": `${1 / G()}`,
|
|
785
785
|
...Ce(r())
|
|
786
|
-
})),
|
|
787
|
-
!o() || d.button !== 0 || d.target instanceof Element && d.target.closest(".workbench-background-region__label, .workbench-background-region__toolbar, .workbench-layer-resize") || (
|
|
786
|
+
})), w = (d) => {
|
|
787
|
+
!o() || d.button !== 0 || d.target instanceof Element && d.target.closest(".workbench-background-region__label, .workbench-background-region__toolbar, .workbench-layer-resize") || (F()(r().id), I.beginDrag(d));
|
|
788
788
|
};
|
|
789
789
|
return (() => {
|
|
790
|
-
var d = Pt(), T = d.firstChild,
|
|
790
|
+
var d = Pt(), T = d.firstChild, h = T.firstChild, l = T.nextSibling;
|
|
791
791
|
d.$$contextmenu = (n) => {
|
|
792
|
-
o() && (n.preventDefault(), n.stopPropagation(),
|
|
793
|
-
}, d.addEventListener("focus", () => o() &&
|
|
794
|
-
n.stopPropagation(),
|
|
792
|
+
o() && (n.preventDefault(), n.stopPropagation(), F()(r().id), p()?.(n, r()));
|
|
793
|
+
}, d.addEventListener("focus", () => o() && F()(r().id)), d.$$pointerdown = w, U(h, "compositionend", E.handleCompositionEnd), U(h, "compositionstart", E.handleCompositionStart), U(h, "keydown", E.handleKeyDown, !0), U(h, "blur", E.handleBlur), U(h, "focus", E.handleFocus), h.$$pointerdown = (n) => {
|
|
794
|
+
n.stopPropagation(), F()(r().id);
|
|
795
795
|
};
|
|
796
|
-
var
|
|
797
|
-
return typeof
|
|
798
|
-
var
|
|
799
|
-
"is-selected":
|
|
796
|
+
var u = E.bind;
|
|
797
|
+
return typeof u == "function" ? se(u, h) : E.bind = h, l.$$pointerdown = w, k(l, g(Ge, {})), P((n) => {
|
|
798
|
+
var L = {
|
|
799
|
+
"is-selected": v(),
|
|
800
800
|
"is-editing": E.isFocused(),
|
|
801
801
|
"is-editable": o(),
|
|
802
|
-
"is-transforming":
|
|
802
|
+
"is-transforming": I.isDragging(),
|
|
803
803
|
[`is-material-${r().material}`]: !0
|
|
804
|
-
}, X = o() ? "true" : void 0,
|
|
805
|
-
return n.e = it(d,
|
|
804
|
+
}, X = o() ? "true" : void 0, j = r().id, S = q(), te = o() ? 0 : void 0, ne = !r().name.trim() && !E.isFocused(), ae = o() ? "plaintext-only" : !1, _ = t("regionName"), J = t("regionPlaceholder"), ce = t("moveRegion");
|
|
805
|
+
return n.e = it(d, L, n.e), X !== n.t && s(d, "data-floe-canvas-interactive", n.t = X), j !== n.a && s(d, "data-wb-object-id", n.a = j), n.o = he(d, S, n.o), te !== n.i && s(d, "tabindex", n.i = te), ne !== n.n && T.classList.toggle("is-empty", n.n = ne), ae !== n.s && s(h, "contenteditable", n.s = ae), _ !== n.h && s(h, "aria-label", n.h = _), J !== n.r && s(h, "data-placeholder", n.r = J), ce !== n.d && s(l, "aria-label", n.d = ce), n;
|
|
806
806
|
}, {
|
|
807
807
|
e: void 0,
|
|
808
808
|
t: void 0,
|
|
@@ -818,13 +818,13 @@ function ln(e) {
|
|
|
818
818
|
})();
|
|
819
819
|
}
|
|
820
820
|
function dn(e) {
|
|
821
|
-
const t = _e(), r = Ne(We), [
|
|
821
|
+
const t = _e(), r = Ne(We), [v, o] = re(), i = c(() => e.item), x = () => e.textEditorRegistry?.get(i().id), z = c(() => e.viewportScale), D = c(() => e.viewport ?? {
|
|
822
822
|
x: 0,
|
|
823
823
|
y: 0,
|
|
824
824
|
scale: 1
|
|
825
|
-
}), B =
|
|
825
|
+
}), B = c(() => e.projection), F = c(() => e.preview), p = c(() => e.onPreviewGeometry), Y = c(() => e.onCommitMove), E = c(() => e.onCommitResize), I = c(() => e.onUpdate), C = c(() => e.onDelete);
|
|
826
826
|
let G, q;
|
|
827
|
-
const [
|
|
827
|
+
const [w, d] = re(!1), [T, h] = re(""), [l, u] = re(!1), n = O(() => Ie.find((_) => _.fontFamily === i().font_family) ?? Ie[0]), L = Le({
|
|
828
828
|
viewportScale: z,
|
|
829
829
|
readPosition: () => ({
|
|
830
830
|
x: i().x,
|
|
@@ -859,26 +859,26 @@ function dn(e) {
|
|
|
859
859
|
height: _.height
|
|
860
860
|
}),
|
|
861
861
|
onPreviewEnd: () => p()?.(null)
|
|
862
|
-
}),
|
|
863
|
-
const _ = i(), J = Se(
|
|
862
|
+
}), j = O(() => {
|
|
863
|
+
const _ = i(), J = Se(F(), "annotation", _.id);
|
|
864
864
|
return ze({
|
|
865
865
|
geometry: Ee({
|
|
866
866
|
preview: J,
|
|
867
|
-
position:
|
|
867
|
+
position: L.position(),
|
|
868
868
|
width: X.size().width,
|
|
869
869
|
height: X.size().height
|
|
870
870
|
}),
|
|
871
|
-
viewport:
|
|
871
|
+
viewport: D(),
|
|
872
872
|
projection: B()
|
|
873
873
|
});
|
|
874
|
-
}), S =
|
|
875
|
-
...pe(
|
|
874
|
+
}), S = O(() => ({
|
|
875
|
+
...pe(j()),
|
|
876
876
|
"z-index": `${i().z_index}`,
|
|
877
|
-
"--workbench-layer-control-inverse-scale": `${1 / Math.max(
|
|
877
|
+
"--workbench-layer-control-inverse-scale": `${1 / Math.max(j().scale, 1e-3)}`
|
|
878
878
|
})), te = () => nn(["left", "center", "right"], i().align), ne = (_) => {
|
|
879
879
|
if (!Number.isFinite(_)) return;
|
|
880
880
|
const J = rn(_);
|
|
881
|
-
|
|
881
|
+
h(String(J)), I()(i().id, {
|
|
882
882
|
font_size: J
|
|
883
883
|
});
|
|
884
884
|
}, ae = () => {
|
|
@@ -887,160 +887,158 @@ function dn(e) {
|
|
|
887
887
|
ne(J);
|
|
888
888
|
return;
|
|
889
889
|
}
|
|
890
|
-
|
|
890
|
+
h(String(i().font_size));
|
|
891
891
|
};
|
|
892
892
|
return fe(() => {
|
|
893
|
-
typeof document < "u" && document.activeElement === G ||
|
|
894
|
-
}), on(
|
|
893
|
+
typeof document < "u" && document.activeElement === G || h(String(i().font_size));
|
|
894
|
+
}), on(l, () => q, () => u(!1)), (() => {
|
|
895
895
|
var _ = Mt(), J = _.firstChild, ce = J.nextSibling, ve = ce.nextSibling;
|
|
896
|
-
return se(o, _), U(ce, "pointerdown",
|
|
896
|
+
return se(o, _), U(ce, "pointerdown", L.beginDrag, !0), k(ce, g(Ge, {})), k(_, g(Ae, {
|
|
897
897
|
reservedSpace: {
|
|
898
898
|
top: 64,
|
|
899
899
|
narrowTop: 106,
|
|
900
900
|
bottom: 86
|
|
901
901
|
},
|
|
902
902
|
get anchor() {
|
|
903
|
-
return
|
|
903
|
+
return v();
|
|
904
904
|
},
|
|
905
905
|
get revision() {
|
|
906
906
|
return S();
|
|
907
907
|
},
|
|
908
908
|
class: "workbench-object-tools",
|
|
909
909
|
get children() {
|
|
910
|
-
return
|
|
910
|
+
return g(Fe, {
|
|
911
911
|
kind: "text",
|
|
912
|
-
onInsertEmoji: (
|
|
912
|
+
onInsertEmoji: (m) => x()?.insertTextAtSelection(m),
|
|
913
913
|
get moreOpen() {
|
|
914
|
-
return
|
|
914
|
+
return w();
|
|
915
915
|
},
|
|
916
916
|
onMoreClose: () => d(!1),
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
917
|
+
more: () => [(() => {
|
|
918
|
+
var m = It(), b = m.firstChild, y = b.firstChild, W = y.nextSibling;
|
|
919
|
+
m.$$click = Oe, m.$$pointerdown = je;
|
|
920
|
+
var H = q;
|
|
921
|
+
return typeof H == "function" ? se(H, m) : q = m, b.$$click = (f) => {
|
|
922
|
+
$e(f), u((K) => !K);
|
|
923
|
+
}, b.$$pointerdown = Q, k(W, () => t(n().id)), k(b, g(ht, {
|
|
924
|
+
class: "workbench-text-font-trigger__icon"
|
|
925
|
+
}), null), k(m, g(oe, {
|
|
926
|
+
get when() {
|
|
927
|
+
return l();
|
|
928
|
+
},
|
|
929
|
+
get children() {
|
|
930
|
+
var f = Lt();
|
|
931
|
+
return k(f, g(de, {
|
|
932
|
+
each: Ie,
|
|
933
|
+
children: (K) => (() => {
|
|
934
|
+
var Z = Ot(), $ = Z.firstChild, ie = $.nextSibling;
|
|
935
|
+
return Z.$$click = (N) => {
|
|
936
|
+
$e(N), I()(i().id, {
|
|
937
|
+
font_family: K.fontFamily,
|
|
938
|
+
font_weight: K.fontWeight
|
|
939
|
+
}), u(!1);
|
|
940
|
+
}, Z.$$pointerdown = Q, k(ie, () => t(K.id)), P((N) => {
|
|
941
|
+
var le = i().font_family === K.fontFamily, ee = t("useFont", t(K.id)), ke = t("fontPreview", t(K.id)), a = i().font_family === K.fontFamily, M = K.fontFamily, R = `${K.fontWeight}`;
|
|
942
|
+
return le !== N.e && s(Z, "aria-checked", N.e = le), ee !== N.t && s(Z, "aria-label", N.t = ee), ke !== N.a && s(Z, "title", N.a = ke), a !== N.o && Z.classList.toggle("is-active", N.o = a), M !== N.i && xe($, "font-family", N.i = M), R !== N.n && xe($, "font-weight", N.n = R), N;
|
|
943
|
+
}, {
|
|
944
|
+
e: void 0,
|
|
945
|
+
t: void 0,
|
|
946
|
+
a: void 0,
|
|
947
|
+
o: void 0,
|
|
948
|
+
i: void 0,
|
|
949
|
+
n: void 0
|
|
950
|
+
}), Z;
|
|
951
|
+
})()
|
|
952
|
+
})), P(() => s(f, "aria-label", t("boldFont"))), f;
|
|
953
|
+
}
|
|
954
|
+
}), null), P((f) => {
|
|
955
|
+
var K = t("chooseFont"), Z = l(), $ = t("chooseFont"), ie = n().fontFamily, N = `${n().fontWeight}`;
|
|
956
|
+
return K !== f.e && s(b, "aria-label", f.e = K), Z !== f.t && s(b, "aria-expanded", f.t = Z), $ !== f.a && s(b, "title", f.a = $), ie !== f.o && xe(y, "font-family", f.o = ie), N !== f.i && xe(y, "font-weight", f.i = N), f;
|
|
957
|
+
}, {
|
|
958
|
+
e: void 0,
|
|
959
|
+
t: void 0,
|
|
960
|
+
a: void 0,
|
|
961
|
+
o: void 0,
|
|
962
|
+
i: void 0
|
|
963
|
+
}), m;
|
|
964
|
+
})(), (() => {
|
|
965
|
+
var m = jt(), b = m.firstChild, y = b.nextSibling, W = y.nextSibling;
|
|
966
|
+
m.$$click = Oe, m.$$pointerdown = je, b.$$click = (f) => {
|
|
967
|
+
$e(f), ne(i().font_size - 1);
|
|
968
|
+
}, b.$$pointerdown = Q, k(b, g(wt, {
|
|
969
|
+
class: "w-3 h-3"
|
|
970
|
+
})), y.$$keydown = (f) => {
|
|
971
|
+
f.key === "Enter" && (f.preventDefault(), ae(), f.currentTarget.blur());
|
|
972
|
+
}, y.addEventListener("blur", ae), y.$$input = (f) => h(f.currentTarget.value), y.$$click = Oe, y.$$pointerdown = je;
|
|
973
|
+
var H = G;
|
|
974
|
+
return typeof H == "function" ? se(H, y) : G = y, W.$$click = (f) => {
|
|
975
|
+
$e(f), ne(i().font_size + 1);
|
|
976
|
+
}, W.$$pointerdown = Q, k(W, g(gt, {
|
|
977
|
+
class: "w-3 h-3"
|
|
978
|
+
})), P((f) => {
|
|
979
|
+
var K = t("textSize"), Z = t("decreaseSize"), $ = t("decreaseSize"), ie = t("sizeValue"), N = t("increaseSize"), le = t("increaseSize");
|
|
980
|
+
return K !== f.e && s(m, "aria-label", f.e = K), Z !== f.t && s(b, "aria-label", f.t = Z), $ !== f.a && s(b, "title", f.a = $), ie !== f.o && s(y, "aria-label", f.o = ie), N !== f.i && s(W, "aria-label", f.i = N), le !== f.n && s(W, "title", f.n = le), f;
|
|
981
|
+
}, {
|
|
982
|
+
e: void 0,
|
|
983
|
+
t: void 0,
|
|
984
|
+
a: void 0,
|
|
985
|
+
o: void 0,
|
|
986
|
+
i: void 0,
|
|
987
|
+
n: void 0
|
|
988
|
+
}), P(() => y.value = T()), m;
|
|
989
|
+
})(), g(de, {
|
|
990
|
+
each: kt,
|
|
991
|
+
children: (m) => (() => {
|
|
992
|
+
var b = Dt();
|
|
993
|
+
return b.$$click = (y) => {
|
|
994
|
+
$e(y), I()(i().id, {
|
|
995
|
+
color: m
|
|
996
|
+
});
|
|
997
|
+
}, b.$$pointerdown = Q, xe(b, "background", m), P((y) => {
|
|
998
|
+
var W = t("textColor", m), H = i().color === m;
|
|
999
|
+
return W !== y.e && s(b, "aria-label", y.e = W), H !== y.t && b.classList.toggle("is-active", y.t = H), y;
|
|
982
1000
|
}, {
|
|
983
1001
|
e: void 0,
|
|
984
|
-
t: void 0
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
var b = Dt();
|
|
994
|
-
return b.$$click = (y) => {
|
|
995
|
-
$e(y), L()(i().id, {
|
|
996
|
-
color: v
|
|
997
|
-
});
|
|
998
|
-
}, b.$$pointerdown = Q, xe(b, "background", v), P((y) => {
|
|
999
|
-
var W = t("textColor", v), H = i().color === v;
|
|
1000
|
-
return W !== y.e && s(b, "aria-label", y.e = W), H !== y.t && b.classList.toggle("is-active", y.t = H), y;
|
|
1001
|
-
}, {
|
|
1002
|
-
e: void 0,
|
|
1003
|
-
t: void 0
|
|
1004
|
-
}), b;
|
|
1005
|
-
})()
|
|
1006
|
-
}), (() => {
|
|
1007
|
-
var v = we();
|
|
1008
|
-
return v.$$click = () => L()(i().id, {
|
|
1009
|
-
align: te()
|
|
1010
|
-
}), v.$$pointerdown = Q, k(v, () => t(i().align)), v;
|
|
1011
|
-
})()];
|
|
1012
|
-
},
|
|
1002
|
+
t: void 0
|
|
1003
|
+
}), b;
|
|
1004
|
+
})()
|
|
1005
|
+
}), (() => {
|
|
1006
|
+
var m = ge();
|
|
1007
|
+
return m.$$click = () => I()(i().id, {
|
|
1008
|
+
align: te()
|
|
1009
|
+
}), m.$$pointerdown = Q, k(m, () => t(i().align)), m;
|
|
1010
|
+
})()],
|
|
1013
1011
|
get actions() {
|
|
1014
|
-
return [
|
|
1012
|
+
return [g(oe, {
|
|
1015
1013
|
when: r,
|
|
1016
1014
|
get children() {
|
|
1017
|
-
var
|
|
1018
|
-
return
|
|
1015
|
+
var m = ge();
|
|
1016
|
+
return m.$$click = () => r?.duplicate({
|
|
1019
1017
|
kind: "annotation",
|
|
1020
1018
|
id: i().id
|
|
1021
|
-
}),
|
|
1019
|
+
}), m.$$pointerdown = Q, k(m, g(ue, {
|
|
1022
1020
|
name: "copy"
|
|
1023
1021
|
})), P((b) => {
|
|
1024
1022
|
var y = t("duplicate"), W = t("duplicate");
|
|
1025
|
-
return y !== b.e && s(
|
|
1023
|
+
return y !== b.e && s(m, "aria-label", b.e = y), W !== b.t && s(m, "title", b.t = W), b;
|
|
1026
1024
|
}, {
|
|
1027
1025
|
e: void 0,
|
|
1028
1026
|
t: void 0
|
|
1029
|
-
}),
|
|
1027
|
+
}), m;
|
|
1030
1028
|
}
|
|
1031
1029
|
}), (() => {
|
|
1032
|
-
var
|
|
1033
|
-
return
|
|
1030
|
+
var m = He();
|
|
1031
|
+
return m.$$click = () => C()(i().id), m.$$pointerdown = Q, k(m, g(ue, {
|
|
1034
1032
|
name: "trash"
|
|
1035
|
-
})), P(() => s(
|
|
1033
|
+
})), P(() => s(m, "aria-label", t("deleteText"))), m;
|
|
1036
1034
|
})()];
|
|
1037
1035
|
},
|
|
1038
1036
|
get children() {
|
|
1039
1037
|
return [(() => {
|
|
1040
|
-
var
|
|
1041
|
-
return
|
|
1038
|
+
var m = Tt(), b = m.firstChild;
|
|
1039
|
+
return m.addEventListener("change", (y) => {
|
|
1042
1040
|
if (y.currentTarget.value === "more") {
|
|
1043
|
-
d(!
|
|
1041
|
+
d(!w());
|
|
1044
1042
|
return;
|
|
1045
1043
|
}
|
|
1046
1044
|
const W = {
|
|
@@ -1049,40 +1047,40 @@ function dn(e) {
|
|
|
1049
1047
|
body: 18,
|
|
1050
1048
|
caption: 14
|
|
1051
1049
|
}, H = y.currentTarget.value;
|
|
1052
|
-
|
|
1050
|
+
I()(i().id, {
|
|
1053
1051
|
font_size: W[H],
|
|
1054
1052
|
font_weight: H === "title" || H === "heading" ? 560 : 400
|
|
1055
1053
|
});
|
|
1056
|
-
}), k(
|
|
1054
|
+
}), k(m, g(de, {
|
|
1057
1055
|
each: ["title", "heading", "body", "caption"],
|
|
1058
1056
|
children: (y) => (() => {
|
|
1059
1057
|
var W = Ft();
|
|
1060
1058
|
return W.value = y, k(W, () => t(y)), W;
|
|
1061
1059
|
})()
|
|
1062
|
-
}), b), k(b, () => t("more")), P(() => s(
|
|
1063
|
-
})(),
|
|
1060
|
+
}), b), k(b, () => t("more")), P(() => s(m, "aria-label", t("typography"))), P(() => m.value = i().font_size >= 40 ? "title" : i().font_size >= 24 ? "heading" : i().font_size >= 16 ? "body" : "caption"), m;
|
|
1061
|
+
})(), g(de, {
|
|
1064
1062
|
each: ["left", "center"],
|
|
1065
|
-
children: (
|
|
1066
|
-
var b =
|
|
1067
|
-
return b.$$click = () =>
|
|
1068
|
-
align:
|
|
1069
|
-
}), b.$$pointerdown = Q, k(b,
|
|
1070
|
-
name:
|
|
1063
|
+
children: (m) => (() => {
|
|
1064
|
+
var b = ge();
|
|
1065
|
+
return b.$$click = () => I()(i().id, {
|
|
1066
|
+
align: m
|
|
1067
|
+
}), b.$$pointerdown = Q, k(b, g(ue, {
|
|
1068
|
+
name: m
|
|
1071
1069
|
})), P((y) => {
|
|
1072
|
-
var W = t(
|
|
1070
|
+
var W = t(m), H = i().align === m;
|
|
1073
1071
|
return W !== y.e && s(b, "aria-label", y.e = W), H !== y.t && s(b, "aria-pressed", y.t = H), y;
|
|
1074
1072
|
}, {
|
|
1075
1073
|
e: void 0,
|
|
1076
1074
|
t: void 0
|
|
1077
1075
|
}), b;
|
|
1078
1076
|
})()
|
|
1079
|
-
}),
|
|
1077
|
+
}), g(mt, {})];
|
|
1080
1078
|
}
|
|
1081
1079
|
});
|
|
1082
1080
|
}
|
|
1083
|
-
}), ve), U(ve, "pointerdown", X.beginResize, !0), P((
|
|
1081
|
+
}), ve), U(ve, "pointerdown", X.beginResize, !0), P((m) => {
|
|
1084
1082
|
var b = i().id, y = S(), W = t("moveText"), H = t("resizeText");
|
|
1085
|
-
return b !==
|
|
1083
|
+
return b !== m.e && s(_, "data-wb-object-id", m.e = b), m.t = he(_, y, m.t), W !== m.a && s(ce, "aria-label", m.a = W), H !== m.o && s(ve, "aria-label", m.o = H), m;
|
|
1086
1084
|
}, {
|
|
1087
1085
|
e: void 0,
|
|
1088
1086
|
t: void 0,
|
|
@@ -1092,12 +1090,12 @@ function dn(e) {
|
|
|
1092
1090
|
})();
|
|
1093
1091
|
}
|
|
1094
1092
|
function sn(e) {
|
|
1095
|
-
const t = _e(), r = Ne(We), [
|
|
1093
|
+
const t = _e(), r = Ne(We), [v, o] = re(), i = c(() => e.item), x = () => e.textEditorRegistry?.get(i().id), z = () => x()?.isFocused() ?? !1, D = c(() => e.viewportScale), B = c(() => e.viewport ?? {
|
|
1096
1094
|
x: 0,
|
|
1097
1095
|
y: 0,
|
|
1098
1096
|
scale: 1
|
|
1099
|
-
}),
|
|
1100
|
-
viewportScale:
|
|
1097
|
+
}), F = c(() => e.projection), p = c(() => e.preview), Y = c(() => e.onPreviewGeometry), E = c(() => e.onCommitResize), I = c(() => e.onUpdate), C = c(() => e.onDelete), G = Ye({
|
|
1098
|
+
viewportScale: D,
|
|
1101
1099
|
readSize: () => ({
|
|
1102
1100
|
width: i().width,
|
|
1103
1101
|
height: i().height
|
|
@@ -1114,7 +1112,7 @@ function sn(e) {
|
|
|
1114
1112
|
height: d.height
|
|
1115
1113
|
}),
|
|
1116
1114
|
onPreviewEnd: () => Y()?.(null)
|
|
1117
|
-
}), q =
|
|
1115
|
+
}), q = O(() => {
|
|
1118
1116
|
const d = i(), T = Se(p(), "background_layer", d.id);
|
|
1119
1117
|
return ze({
|
|
1120
1118
|
geometry: Ee({
|
|
@@ -1127,63 +1125,63 @@ function sn(e) {
|
|
|
1127
1125
|
height: G.size().height
|
|
1128
1126
|
}),
|
|
1129
1127
|
viewport: B(),
|
|
1130
|
-
projection:
|
|
1128
|
+
projection: F()
|
|
1131
1129
|
});
|
|
1132
|
-
}),
|
|
1130
|
+
}), w = O(() => ({
|
|
1133
1131
|
...pe(q()),
|
|
1134
1132
|
"z-index": `${i().z_index}`,
|
|
1135
1133
|
"--workbench-layer-control-inverse-scale": `${1 / Math.max(q().scale, 1e-3)}`,
|
|
1136
1134
|
...Ce(i())
|
|
1137
1135
|
}));
|
|
1138
1136
|
return (() => {
|
|
1139
|
-
var d = At(), T = d.firstChild,
|
|
1140
|
-
return se(o, d), k(d,
|
|
1137
|
+
var d = At(), T = d.firstChild, h = T.nextSibling;
|
|
1138
|
+
return se(o, d), k(d, g(Ae, {
|
|
1141
1139
|
reservedSpace: {
|
|
1142
1140
|
top: 64,
|
|
1143
1141
|
narrowTop: 106,
|
|
1144
1142
|
bottom: 86
|
|
1145
1143
|
},
|
|
1146
1144
|
get anchor() {
|
|
1147
|
-
return
|
|
1145
|
+
return v();
|
|
1148
1146
|
},
|
|
1149
1147
|
get revision() {
|
|
1150
|
-
return
|
|
1148
|
+
return w();
|
|
1151
1149
|
},
|
|
1152
1150
|
get topOffset() {
|
|
1153
1151
|
return be(() => !!(i().name.trim() || z()))() ? 34 * B().scale : 0;
|
|
1154
1152
|
},
|
|
1155
1153
|
class: "workbench-object-tools",
|
|
1156
1154
|
get children() {
|
|
1157
|
-
return
|
|
1155
|
+
return g(Fe, {
|
|
1158
1156
|
kind: "region",
|
|
1159
|
-
onInsertEmoji: (
|
|
1157
|
+
onInsertEmoji: (l) => x()?.insertTextAtSelection(l),
|
|
1160
1158
|
materials: yt,
|
|
1161
1159
|
get material() {
|
|
1162
1160
|
return i().material;
|
|
1163
1161
|
},
|
|
1164
|
-
materialLabel: (
|
|
1165
|
-
preview: (
|
|
1166
|
-
var
|
|
1167
|
-
return De(n, `workbench-region-material__sample is-material-${
|
|
1162
|
+
materialLabel: (l) => t("useRegionMaterial", t(l)),
|
|
1163
|
+
preview: (l) => (() => {
|
|
1164
|
+
var u = Nt(), n = u.firstChild;
|
|
1165
|
+
return De(n, `workbench-region-material__sample is-material-${l}`), P((L) => he(n, Ce(i()), L)), u;
|
|
1168
1166
|
})(),
|
|
1169
|
-
onMaterial: (
|
|
1170
|
-
material:
|
|
1167
|
+
onMaterial: (l) => I()(i().id, {
|
|
1168
|
+
material: l
|
|
1171
1169
|
}),
|
|
1172
1170
|
get palette() {
|
|
1173
1171
|
return (() => {
|
|
1174
|
-
var
|
|
1175
|
-
return k(
|
|
1172
|
+
var l = lt();
|
|
1173
|
+
return k(l, g(de, {
|
|
1176
1174
|
each: ct,
|
|
1177
|
-
children: (
|
|
1178
|
-
var n = Gt(),
|
|
1179
|
-
return n.$$click = () =>
|
|
1180
|
-
fill:
|
|
1181
|
-
}), n.$$pointerdown = Q, k(n,
|
|
1182
|
-
var S = t("regionColor", t(
|
|
1175
|
+
children: (u) => (() => {
|
|
1176
|
+
var n = Gt(), L = n.firstChild, X = L.firstChild;
|
|
1177
|
+
return n.$$click = () => I()(i().id, {
|
|
1178
|
+
fill: u.fill
|
|
1179
|
+
}), n.$$pointerdown = Q, k(n, g(ot, {}), null), P((j) => {
|
|
1180
|
+
var S = t("regionColor", t(u.color)), te = i().fill === u.fill, ne = `workbench-region-material__sample is-material-${i().material}`, ae = Ce({
|
|
1183
1181
|
...i(),
|
|
1184
|
-
fill:
|
|
1182
|
+
fill: u.fill
|
|
1185
1183
|
});
|
|
1186
|
-
return S !==
|
|
1184
|
+
return S !== j.e && s(n, "aria-label", j.e = S), te !== j.t && s(n, "aria-pressed", j.t = te), ne !== j.a && De(X, j.a = ne), j.o = he(X, ae, j.o), j;
|
|
1187
1185
|
}, {
|
|
1188
1186
|
e: void 0,
|
|
1189
1187
|
t: void 0,
|
|
@@ -1191,58 +1189,58 @@ function sn(e) {
|
|
|
1191
1189
|
o: void 0
|
|
1192
1190
|
}), n;
|
|
1193
1191
|
})()
|
|
1194
|
-
})),
|
|
1192
|
+
})), l;
|
|
1195
1193
|
})();
|
|
1196
1194
|
},
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1195
|
+
more: (l) => [(() => {
|
|
1196
|
+
var u = Ht(), n = u.firstChild;
|
|
1197
|
+
return k(u, () => t("opacity"), n), n.$$input = (L) => I()(i().id, {
|
|
1198
|
+
opacity: Number(L.currentTarget.value) / 100
|
|
1199
|
+
}), P(() => s(n, "aria-label", t("opacity"))), P(() => n.value = Math.round(i().opacity * 100)), u;
|
|
1200
|
+
})(), (() => {
|
|
1201
|
+
var u = ge();
|
|
1202
|
+
return u.$$click = () => {
|
|
1203
|
+
l(), I()(i().id, {
|
|
1206
1204
|
name: ""
|
|
1207
|
-
})
|
|
1208
|
-
})()
|
|
1209
|
-
},
|
|
1205
|
+
});
|
|
1206
|
+
}, u.$$pointerdown = Q, k(u, () => t("clearName")), P(() => u.disabled = !i().name.trim()), u;
|
|
1207
|
+
})()],
|
|
1210
1208
|
get actions() {
|
|
1211
|
-
return [
|
|
1209
|
+
return [g(oe, {
|
|
1212
1210
|
when: r,
|
|
1213
1211
|
get children() {
|
|
1214
|
-
var
|
|
1215
|
-
return
|
|
1212
|
+
var l = ge();
|
|
1213
|
+
return l.$$click = () => r?.duplicate({
|
|
1216
1214
|
kind: "background_layer",
|
|
1217
1215
|
id: i().id
|
|
1218
|
-
}),
|
|
1216
|
+
}), l.$$pointerdown = Q, k(l, g(ue, {
|
|
1219
1217
|
name: "copy"
|
|
1220
|
-
})), P((
|
|
1221
|
-
var n = t("duplicate"),
|
|
1222
|
-
return n !==
|
|
1218
|
+
})), P((u) => {
|
|
1219
|
+
var n = t("duplicate"), L = t("duplicate");
|
|
1220
|
+
return n !== u.e && s(l, "aria-label", u.e = n), L !== u.t && s(l, "title", u.t = L), u;
|
|
1223
1221
|
}, {
|
|
1224
1222
|
e: void 0,
|
|
1225
1223
|
t: void 0
|
|
1226
|
-
}),
|
|
1224
|
+
}), l;
|
|
1227
1225
|
}
|
|
1228
1226
|
}), (() => {
|
|
1229
|
-
var
|
|
1230
|
-
return
|
|
1227
|
+
var l = He();
|
|
1228
|
+
return l.$$click = () => C()(i().id), l.$$pointerdown = Q, k(l, g(ue, {
|
|
1231
1229
|
name: "trash"
|
|
1232
|
-
})), P(() => s(
|
|
1230
|
+
})), P(() => s(l, "aria-label", t("deleteRegion"))), l;
|
|
1233
1231
|
})()];
|
|
1234
1232
|
},
|
|
1235
1233
|
get children() {
|
|
1236
|
-
var
|
|
1237
|
-
return
|
|
1234
|
+
var l = Wt(), u = l.firstChild;
|
|
1235
|
+
return l.$$click = () => x()?.focus(), l.$$pointerdown = Q, k(l, g(ue, {
|
|
1238
1236
|
name: "text"
|
|
1239
|
-
}),
|
|
1237
|
+
}), u), k(u, () => t(i().name.trim() ? "regionName" : "addName")), l;
|
|
1240
1238
|
}
|
|
1241
1239
|
});
|
|
1242
1240
|
}
|
|
1243
|
-
}),
|
|
1244
|
-
var
|
|
1245
|
-
return
|
|
1241
|
+
}), h), U(h, "pointerdown", G.beginResize, !0), P((l) => {
|
|
1242
|
+
var u = i().id, n = w(), L = t("resizeRegion");
|
|
1243
|
+
return u !== l.e && s(d, "data-wb-object-id", l.e = u), l.t = he(d, n, l.t), L !== l.a && s(h, "aria-label", l.a = L), l;
|
|
1246
1244
|
}, {
|
|
1247
1245
|
e: void 0,
|
|
1248
1246
|
t: void 0,
|
|
@@ -1251,11 +1249,11 @@ function sn(e) {
|
|
|
1251
1249
|
})();
|
|
1252
1250
|
}
|
|
1253
1251
|
function un(e) {
|
|
1254
|
-
const t =
|
|
1255
|
-
const z = t(),
|
|
1252
|
+
const t = c(() => e.item), r = c(() => e.viewport), v = c(() => e.projection), o = c(() => e.preview), i = O(() => {
|
|
1253
|
+
const z = t(), D = Se(o(), "background_layer", z.id);
|
|
1256
1254
|
return ze({
|
|
1257
1255
|
geometry: Ee({
|
|
1258
|
-
preview:
|
|
1256
|
+
preview: D,
|
|
1259
1257
|
position: {
|
|
1260
1258
|
x: z.x,
|
|
1261
1259
|
y: z.y
|
|
@@ -1264,18 +1262,18 @@ function un(e) {
|
|
|
1264
1262
|
height: z.height
|
|
1265
1263
|
}),
|
|
1266
1264
|
viewport: r(),
|
|
1267
|
-
projection:
|
|
1265
|
+
projection: v()
|
|
1268
1266
|
});
|
|
1269
|
-
}), x =
|
|
1267
|
+
}), x = O(() => ({
|
|
1270
1268
|
...pe(i()),
|
|
1271
1269
|
"--workbench-layer-control-inverse-scale": `${1 / Math.max(i().scale, 1e-3)}`,
|
|
1272
1270
|
...Ce(t())
|
|
1273
1271
|
}));
|
|
1274
1272
|
return (() => {
|
|
1275
1273
|
var z = Bt();
|
|
1276
|
-
return P((
|
|
1277
|
-
var B = `workbench-region-visibility-outline is-material-${t().material}`,
|
|
1278
|
-
return B !==
|
|
1274
|
+
return P((D) => {
|
|
1275
|
+
var B = `workbench-region-visibility-outline is-material-${t().material}`, F = !!e.selected, p = t().id, Y = x();
|
|
1276
|
+
return B !== D.e && De(z, D.e = B), F !== D.t && z.classList.toggle("is-selected-region", D.t = F), p !== D.a && s(z, "data-wb-object-id", D.a = p), D.o = he(z, Y, D.o), D;
|
|
1279
1277
|
}, {
|
|
1280
1278
|
e: void 0,
|
|
1281
1279
|
t: void 0,
|
|
@@ -1285,20 +1283,20 @@ function un(e) {
|
|
|
1285
1283
|
})();
|
|
1286
1284
|
}
|
|
1287
1285
|
function vn(e) {
|
|
1288
|
-
const t =
|
|
1286
|
+
const t = O(() => Xe(e.items)), r = O(() => Be(e.items).map((v) => v.id));
|
|
1289
1287
|
return (() => {
|
|
1290
|
-
var
|
|
1291
|
-
return k(
|
|
1288
|
+
var v = Xt();
|
|
1289
|
+
return k(v, g(de, {
|
|
1292
1290
|
get each() {
|
|
1293
1291
|
return r();
|
|
1294
1292
|
},
|
|
1295
1293
|
children: (o) => {
|
|
1296
|
-
const i =
|
|
1297
|
-
return
|
|
1294
|
+
const i = O(() => t().get(o) ?? null);
|
|
1295
|
+
return g(oe, {
|
|
1298
1296
|
get when() {
|
|
1299
1297
|
return i();
|
|
1300
1298
|
},
|
|
1301
|
-
children: (x) =>
|
|
1299
|
+
children: (x) => g(un, {
|
|
1302
1300
|
get item() {
|
|
1303
1301
|
return x();
|
|
1304
1302
|
},
|
|
@@ -1317,24 +1315,24 @@ function vn(e) {
|
|
|
1317
1315
|
})
|
|
1318
1316
|
});
|
|
1319
1317
|
}
|
|
1320
|
-
})),
|
|
1318
|
+
})), v;
|
|
1321
1319
|
})();
|
|
1322
1320
|
}
|
|
1323
1321
|
function pn(e) {
|
|
1324
|
-
const t =
|
|
1322
|
+
const t = O(() => Xe(e.items)), r = O(() => Be(e.items).map((v) => v.id));
|
|
1325
1323
|
return (() => {
|
|
1326
|
-
var
|
|
1327
|
-
return k(
|
|
1324
|
+
var v = Yt();
|
|
1325
|
+
return k(v, g(de, {
|
|
1328
1326
|
get each() {
|
|
1329
1327
|
return r();
|
|
1330
1328
|
},
|
|
1331
1329
|
children: (o) => {
|
|
1332
|
-
const i =
|
|
1333
|
-
return
|
|
1330
|
+
const i = O(() => t().get(o) ?? null);
|
|
1331
|
+
return g(oe, {
|
|
1334
1332
|
get when() {
|
|
1335
1333
|
return i();
|
|
1336
1334
|
},
|
|
1337
|
-
children: (x) =>
|
|
1335
|
+
children: (x) => g(ln, {
|
|
1338
1336
|
get item() {
|
|
1339
1337
|
return x();
|
|
1340
1338
|
},
|
|
@@ -1379,28 +1377,28 @@ function pn(e) {
|
|
|
1379
1377
|
}
|
|
1380
1378
|
})), P((o) => {
|
|
1381
1379
|
var i = !!e.editable, x = !!e.filtered;
|
|
1382
|
-
return i !== o.e &&
|
|
1380
|
+
return i !== o.e && v.classList.toggle("is-editable", o.e = i), x !== o.t && v.classList.toggle("is-filtered-out", o.t = x), o;
|
|
1383
1381
|
}, {
|
|
1384
1382
|
e: void 0,
|
|
1385
1383
|
t: void 0
|
|
1386
|
-
}),
|
|
1384
|
+
}), v;
|
|
1387
1385
|
})();
|
|
1388
1386
|
}
|
|
1389
1387
|
function En(e) {
|
|
1390
|
-
const t =
|
|
1388
|
+
const t = O(() => Xe(e.items)), r = O(() => Be(e.items).map((v) => v.id));
|
|
1391
1389
|
return (() => {
|
|
1392
|
-
var
|
|
1393
|
-
return k(
|
|
1390
|
+
var v = Ut();
|
|
1391
|
+
return k(v, g(de, {
|
|
1394
1392
|
get each() {
|
|
1395
1393
|
return r();
|
|
1396
1394
|
},
|
|
1397
1395
|
children: (o) => {
|
|
1398
|
-
const i =
|
|
1399
|
-
return
|
|
1396
|
+
const i = O(() => t().get(o) ?? null);
|
|
1397
|
+
return g(oe, {
|
|
1400
1398
|
get when() {
|
|
1401
1399
|
return i();
|
|
1402
1400
|
},
|
|
1403
|
-
children: (x) =>
|
|
1401
|
+
children: (x) => g(cn, {
|
|
1404
1402
|
get item() {
|
|
1405
1403
|
return x();
|
|
1406
1404
|
},
|
|
@@ -1445,23 +1443,23 @@ function En(e) {
|
|
|
1445
1443
|
}
|
|
1446
1444
|
})), P((o) => {
|
|
1447
1445
|
var i = !!e.editable, x = !!e.filtered;
|
|
1448
|
-
return i !== o.e &&
|
|
1446
|
+
return i !== o.e && v.classList.toggle("is-editable", o.e = i), x !== o.t && v.classList.toggle("is-filtered-out", o.t = x), o;
|
|
1449
1447
|
}, {
|
|
1450
1448
|
e: void 0,
|
|
1451
1449
|
t: void 0
|
|
1452
|
-
}),
|
|
1450
|
+
}), v;
|
|
1453
1451
|
})();
|
|
1454
1452
|
}
|
|
1455
1453
|
function Rn(e) {
|
|
1456
|
-
const t =
|
|
1454
|
+
const t = O(() => e.selectedObject?.kind === "annotation" ? e.annotations.find((v) => v.id === e.selectedObject?.id && v.kind === "text") ?? null : null), r = O(() => e.selectedObject?.kind === "background_layer" ? e.backgroundLayers.find((v) => v.id === e.selectedObject?.id) ?? null : null);
|
|
1457
1455
|
return (() => {
|
|
1458
|
-
var
|
|
1459
|
-
return k(
|
|
1456
|
+
var v = Kt();
|
|
1457
|
+
return k(v, g(oe, {
|
|
1460
1458
|
get when() {
|
|
1461
1459
|
return e.showRegionOutlines;
|
|
1462
1460
|
},
|
|
1463
1461
|
get children() {
|
|
1464
|
-
return
|
|
1462
|
+
return g(vn, {
|
|
1465
1463
|
get items() {
|
|
1466
1464
|
return e.backgroundLayers;
|
|
1467
1465
|
},
|
|
@@ -1479,11 +1477,11 @@ function Rn(e) {
|
|
|
1479
1477
|
}
|
|
1480
1478
|
});
|
|
1481
1479
|
}
|
|
1482
|
-
}), null), k(
|
|
1480
|
+
}), null), k(v, g(oe, {
|
|
1483
1481
|
get when() {
|
|
1484
1482
|
return be(() => !!e.editable)() && r();
|
|
1485
1483
|
},
|
|
1486
|
-
children: (o) =>
|
|
1484
|
+
children: (o) => g(sn, {
|
|
1487
1485
|
get textEditorRegistry() {
|
|
1488
1486
|
return e.textEditorRegistry;
|
|
1489
1487
|
},
|
|
@@ -1515,11 +1513,11 @@ function Rn(e) {
|
|
|
1515
1513
|
return e.onDeleteBackgroundLayer;
|
|
1516
1514
|
}
|
|
1517
1515
|
})
|
|
1518
|
-
}), null), k(
|
|
1516
|
+
}), null), k(v, g(oe, {
|
|
1519
1517
|
get when() {
|
|
1520
1518
|
return be(() => !!e.editable)() && t();
|
|
1521
1519
|
},
|
|
1522
|
-
children: (o) =>
|
|
1520
|
+
children: (o) => g(dn, {
|
|
1523
1521
|
get item() {
|
|
1524
1522
|
return o();
|
|
1525
1523
|
},
|
|
@@ -1554,7 +1552,7 @@ function Rn(e) {
|
|
|
1554
1552
|
return e.onDeleteAnnotation;
|
|
1555
1553
|
}
|
|
1556
1554
|
})
|
|
1557
|
-
}), null), P(() =>
|
|
1555
|
+
}), null), P(() => v.classList.toggle("is-editable", !!e.editable)), v;
|
|
1558
1556
|
})();
|
|
1559
1557
|
}
|
|
1560
1558
|
ut(["pointerdown", "contextmenu", "keydown", "click", "input"]);
|