@hankchen/canvas-editor-vue 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{canvas-CX1RdlFC.js → canvas-CptBzpwT.js} +7 -7
- package/dist/canvas.js +1 -1
- package/dist/index.js +12 -12
- package/dist/{layer-panel-Cd1e8xNB.js → layer-panel-Cz-tmbJJ.js} +1 -1
- package/dist/layer-panel.js +1 -1
- package/dist/{property-panel-B32ZBQdf.js → property-panel-OBqd6D8W.js} +326 -322
- package/dist/property-panel.js +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/useDataSourceSchema.d.ts +3 -1
- package/dist/shared/useExpressionDiagnostics.d.ts +11 -0
- package/dist/shared.js +7 -7
- package/dist/{status-bar-XMVbRLY9.js → status-bar-DCuK2R88.js} +67 -65
- package/dist/status-bar.js +1 -1
- package/dist/style.css +1 -1
- package/dist/{uploadFile-D1RY-ji0.js → uploadFile-DbB-KhII.js} +11 -7
- package/dist/{useDataSourceSchema-YV8g-lo0.js → useDataSourceSchema-CG9EGzwc.js} +7 -1
- package/package.json +2 -2
|
@@ -2,11 +2,11 @@ import { t as e } from "./createLucideIcon-SCvtEGVf.js";
|
|
|
2
2
|
import { a as t, c as n, d as r, f as i, i as a, l as o, n as s, p as c, r as l, s as u, t as d, u as f } from "./dist-DGtNmLwo.js";
|
|
3
3
|
import { a as p, i as m, r as h } from "./layerPath-uy2ywyld.js";
|
|
4
4
|
import { o as g, s as _ } from "./popupPosition-Ck5Gsvjy.js";
|
|
5
|
-
import { a as ee,
|
|
6
|
-
import { a as te,
|
|
7
|
-
import { n as
|
|
8
|
-
import { Fragment as
|
|
9
|
-
var
|
|
5
|
+
import { a as ee, n as v, r as y, t as b } from "./resourceTemplate-cdcQtp9a.js";
|
|
6
|
+
import { a as te, d as x, f as ne, i as re, l as ie, n as S, o as ae, s as oe, t as C, u as se } from "./uploadFile-DbB-KhII.js";
|
|
7
|
+
import { n as ce, r as le, t as ue } from "./usePathCompletion-Do17CQ6l.js";
|
|
8
|
+
import { Fragment as w, computed as T, createBlock as E, createCommentVNode as D, createElementBlock as O, createElementVNode as k, createTextVNode as de, createVNode as A, defineComponent as j, inject as fe, markRaw as M, nextTick as pe, normalizeClass as N, onScopeDispose as me, openBlock as P, provide as he, ref as F, renderList as I, resolveDynamicComponent as ge, shallowRef as L, toDisplayString as R, unref as z, vModelText as _e, watch as B, watchEffect as ve, withCtx as ye, withDirectives as be, withModifiers as V } from "vue";
|
|
9
|
+
var xe = e({
|
|
10
10
|
name: "grid-2x2",
|
|
11
11
|
size: 24,
|
|
12
12
|
node: [
|
|
@@ -28,7 +28,7 @@ var ve = e({
|
|
|
28
28
|
}]
|
|
29
29
|
],
|
|
30
30
|
aliases: ["grid-2-x-2"]
|
|
31
|
-
}),
|
|
31
|
+
}), Se = e({
|
|
32
32
|
name: "square-split-vertical",
|
|
33
33
|
size: 24,
|
|
34
34
|
node: [
|
|
@@ -46,7 +46,7 @@ var ve = e({
|
|
|
46
46
|
}]
|
|
47
47
|
],
|
|
48
48
|
aliases: ["split-square-vertical"]
|
|
49
|
-
}),
|
|
49
|
+
}), Ce = e({
|
|
50
50
|
name: "square",
|
|
51
51
|
size: 24,
|
|
52
52
|
node: [["rect", {
|
|
@@ -60,7 +60,7 @@ var ve = e({
|
|
|
60
60
|
});
|
|
61
61
|
//#endregion
|
|
62
62
|
//#region ../canvas-editor/src/shared/resourceStatus.ts
|
|
63
|
-
function
|
|
63
|
+
function we(e, n) {
|
|
64
64
|
if (e.type !== "ImageLayer") return !1;
|
|
65
65
|
if (e.expression !== null || e.src === null || t(e) <= 0 || a(e) <= 0) return !0;
|
|
66
66
|
if (n !== void 0) {
|
|
@@ -71,7 +71,7 @@ function xe(e, n) {
|
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/property-panel/fieldSchema.ts
|
|
74
|
-
var
|
|
74
|
+
var Te = "当前层内容未绘制,padding 不影响预览", H = {
|
|
75
75
|
title: "位置与尺寸",
|
|
76
76
|
fields: [
|
|
77
77
|
{
|
|
@@ -126,7 +126,7 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
126
126
|
control: "anchor"
|
|
127
127
|
}
|
|
128
128
|
]
|
|
129
|
-
},
|
|
129
|
+
}, U = {
|
|
130
130
|
title: "对齐",
|
|
131
131
|
fields: [{
|
|
132
132
|
key: ["align", "horizontal"],
|
|
@@ -139,7 +139,7 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
139
139
|
control: "align",
|
|
140
140
|
domain: l
|
|
141
141
|
}]
|
|
142
|
-
},
|
|
142
|
+
}, W = {
|
|
143
143
|
title: "形状",
|
|
144
144
|
fields: [
|
|
145
145
|
{
|
|
@@ -161,7 +161,7 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
161
161
|
label: "内边距",
|
|
162
162
|
control: "padding",
|
|
163
163
|
title: "内边距作用于内容盒,不改变图层尺寸",
|
|
164
|
-
hint: (e, t) =>
|
|
164
|
+
hint: (e, t) => we(e, t) ? Te : null
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
key: ["shape", "border"],
|
|
@@ -169,11 +169,11 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
169
169
|
control: "border"
|
|
170
170
|
}
|
|
171
171
|
]
|
|
172
|
-
},
|
|
172
|
+
}, Ee = {
|
|
173
173
|
ImageLayer: [
|
|
174
|
+
H,
|
|
174
175
|
U,
|
|
175
176
|
W,
|
|
176
|
-
G,
|
|
177
177
|
{
|
|
178
178
|
title: "图片",
|
|
179
179
|
fields: [{
|
|
@@ -186,9 +186,9 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
186
186
|
}
|
|
187
187
|
],
|
|
188
188
|
TextLayer: [
|
|
189
|
+
H,
|
|
189
190
|
U,
|
|
190
191
|
W,
|
|
191
|
-
G,
|
|
192
192
|
{
|
|
193
193
|
title: "文本",
|
|
194
194
|
fields: [
|
|
@@ -224,9 +224,9 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
224
224
|
}
|
|
225
225
|
],
|
|
226
226
|
QrCodeLayer: [
|
|
227
|
+
H,
|
|
227
228
|
U,
|
|
228
229
|
W,
|
|
229
|
-
G,
|
|
230
230
|
{
|
|
231
231
|
title: "二维码",
|
|
232
232
|
fields: [{
|
|
@@ -239,9 +239,9 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
239
239
|
}
|
|
240
240
|
],
|
|
241
241
|
TableLayer: [
|
|
242
|
+
H,
|
|
242
243
|
U,
|
|
243
244
|
W,
|
|
244
|
-
G,
|
|
245
245
|
{
|
|
246
246
|
title: "数据",
|
|
247
247
|
fields: [{
|
|
@@ -256,14 +256,14 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
256
256
|
}
|
|
257
257
|
],
|
|
258
258
|
TableRowLayer: [
|
|
259
|
+
H,
|
|
259
260
|
U,
|
|
260
|
-
W
|
|
261
|
-
G
|
|
261
|
+
W
|
|
262
262
|
],
|
|
263
263
|
TableCellLayer: [
|
|
264
|
+
H,
|
|
264
265
|
U,
|
|
265
|
-
W
|
|
266
|
-
G
|
|
266
|
+
W
|
|
267
267
|
],
|
|
268
268
|
TableRowTemplate: [{
|
|
269
269
|
title: "行模板(行宽由表宽同步)",
|
|
@@ -280,15 +280,15 @@ var Se = "当前层内容未绘制,padding 不影响预览", U = {
|
|
|
280
280
|
}]
|
|
281
281
|
}]
|
|
282
282
|
};
|
|
283
|
-
function
|
|
284
|
-
return
|
|
283
|
+
function De(e) {
|
|
284
|
+
return Ee[e] ?? [];
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function Oe(e) {
|
|
287
287
|
if (e[e.length - 1] === "content") return h(e) ? "templateContent" : "content";
|
|
288
288
|
let t = e[e.length - 2];
|
|
289
289
|
return t === "rows" ? "row" : t === "cells" ? "cell" : "root";
|
|
290
290
|
}
|
|
291
|
-
var
|
|
291
|
+
var ke = {
|
|
292
292
|
root: [],
|
|
293
293
|
cell: [],
|
|
294
294
|
row: ["shape.width", "shape.autoWidth"],
|
|
@@ -300,16 +300,16 @@ var Ee = {
|
|
|
300
300
|
],
|
|
301
301
|
templateContent: ["shape.width", "shape.autoWidth"]
|
|
302
302
|
};
|
|
303
|
-
function
|
|
303
|
+
function G(e, t) {
|
|
304
304
|
return [...e.key, ...t.key];
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
let n = new Set(
|
|
308
|
-
for (let e of
|
|
306
|
+
function Ae(e, t) {
|
|
307
|
+
let n = new Set(ke[Oe(e)]), r = [];
|
|
308
|
+
for (let e of De(t.type)) {
|
|
309
309
|
let i = [];
|
|
310
310
|
for (let r of e.fields) {
|
|
311
311
|
if (r.items) {
|
|
312
|
-
let e = r.items.filter((e) => !n.has(
|
|
312
|
+
let e = r.items.filter((e) => !n.has(G(r, e).join(".")) && (!e.visibleWhen || e.visibleWhen(t)));
|
|
313
313
|
e.length > 0 && i.push({
|
|
314
314
|
...r,
|
|
315
315
|
items: e
|
|
@@ -325,7 +325,7 @@ function De(e, t) {
|
|
|
325
325
|
}
|
|
326
326
|
return r;
|
|
327
327
|
}
|
|
328
|
-
var
|
|
328
|
+
var je = [{
|
|
329
329
|
title: "画布",
|
|
330
330
|
fields: [{
|
|
331
331
|
key: ["width"],
|
|
@@ -341,7 +341,7 @@ var Oe = [{
|
|
|
341
341
|
min: 1
|
|
342
342
|
}]
|
|
343
343
|
}];
|
|
344
|
-
function
|
|
344
|
+
function K(e, t) {
|
|
345
345
|
let n = e;
|
|
346
346
|
for (let e = 0; e < t.length; e += 1) {
|
|
347
347
|
if (typeof n != "object" || !n) return { ok: !1 };
|
|
@@ -354,14 +354,14 @@ function q(e, t) {
|
|
|
354
354
|
}
|
|
355
355
|
//#endregion
|
|
356
356
|
//#region src/property-panel/fields/AlignField.vue?vue&type=script&setup=true&lang.ts
|
|
357
|
-
var
|
|
357
|
+
var Me = ["aria-label"], Ne = [
|
|
358
358
|
"aria-pressed",
|
|
359
359
|
"title",
|
|
360
360
|
"onClick"
|
|
361
|
-
],
|
|
361
|
+
], Pe = {
|
|
362
362
|
key: 1,
|
|
363
363
|
class: "truncate px-1 text-[10px] leading-none"
|
|
364
|
-
},
|
|
364
|
+
}, Fe = /* @__PURE__ */ j({
|
|
365
365
|
__name: "AlignField",
|
|
366
366
|
props: {
|
|
367
367
|
field: {},
|
|
@@ -398,7 +398,7 @@ var ke = ["aria-label"], Ae = [
|
|
|
398
398
|
title: "底对齐"
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
|
-
}, p =
|
|
401
|
+
}, p = T(() => {
|
|
402
402
|
let e = a.field.domain ?? [], t = d[e.join(".")];
|
|
403
403
|
return e.map((e) => ({
|
|
404
404
|
value: e,
|
|
@@ -409,42 +409,42 @@ var ke = ["aria-label"], Ae = [
|
|
|
409
409
|
function m(e) {
|
|
410
410
|
e !== a.modelValue && u("change", e);
|
|
411
411
|
}
|
|
412
|
-
return (t, n) => (
|
|
412
|
+
return (t, n) => (P(), O("span", {
|
|
413
413
|
class: "cn-align flex h-7 min-w-0 flex-1 overflow-hidden rounded-md border border-cn-field-line bg-cn-field",
|
|
414
414
|
role: "group",
|
|
415
415
|
"aria-label": e.field.label
|
|
416
|
-
}, [(
|
|
416
|
+
}, [(P(!0), O(w, null, I(p.value, (t, n) => (P(), O("button", {
|
|
417
417
|
key: t.value,
|
|
418
418
|
type: "button",
|
|
419
|
-
class:
|
|
419
|
+
class: N(["cn-align__option flex min-w-0 flex-1 items-center justify-center p-0 transition-colors duration-100 focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cn-accent/40", [n > 0 ? "border-l border-cn-field-line" : "", t.value === e.modelValue ? "cn-align__option--active bg-cn-accent-soft text-cn-accent" : "text-cn-muted hover:text-cn-fg"]]),
|
|
420
420
|
"aria-pressed": t.value === e.modelValue,
|
|
421
421
|
title: t.title,
|
|
422
|
-
onClick:
|
|
423
|
-
}, [t.icon ? (
|
|
422
|
+
onClick: V((e) => m(t.value), ["prevent"])
|
|
423
|
+
}, [t.icon ? (P(), E(_, {
|
|
424
424
|
key: 0,
|
|
425
425
|
icon: t.icon
|
|
426
|
-
}, null, 8, ["icon"])) : (
|
|
426
|
+
}, null, 8, ["icon"])) : (P(), O("span", Pe, R(t.value), 1))], 10, Ne))), 128))], 8, Me));
|
|
427
427
|
}
|
|
428
|
-
}),
|
|
428
|
+
}), Ie = { class: "block" }, Le = ["aria-expanded", "title"], Re = { class: "cn-prop-field__label shrink-0 select-none truncate text-[11px] leading-none text-cn-muted" }, ze = { class: "flex shrink-0 items-center gap-1.5" }, Be = {
|
|
429
429
|
viewBox: "0 0 24 24",
|
|
430
430
|
class: "size-3.5",
|
|
431
431
|
"aria-hidden": "true"
|
|
432
|
-
},
|
|
432
|
+
}, Ve = [
|
|
433
433
|
"cx",
|
|
434
434
|
"cy",
|
|
435
435
|
"r"
|
|
436
|
-
],
|
|
436
|
+
], He = {
|
|
437
437
|
key: 0,
|
|
438
438
|
class: "mt-2 flex justify-end"
|
|
439
|
-
},
|
|
439
|
+
}, Ue = {
|
|
440
440
|
class: "cn-anchor grid w-[66px] shrink-0 grid-cols-3 gap-[3px]",
|
|
441
441
|
role: "group",
|
|
442
442
|
"aria-label": "九宫锚点"
|
|
443
|
-
},
|
|
443
|
+
}, We = [
|
|
444
444
|
"aria-pressed",
|
|
445
445
|
"title",
|
|
446
446
|
"onClick"
|
|
447
|
-
],
|
|
447
|
+
], Ge = /* @__PURE__ */ j({
|
|
448
448
|
__name: "AnchorDisclosureField",
|
|
449
449
|
props: {
|
|
450
450
|
field: {},
|
|
@@ -453,42 +453,42 @@ var ke = ["aria-label"], Ae = [
|
|
|
453
453
|
},
|
|
454
454
|
emits: ["change", "toggle"],
|
|
455
455
|
setup(e, { emit: t }) {
|
|
456
|
-
let n = e, r = t, i =
|
|
456
|
+
let n = e, r = t, i = M(d), a = Array.from({ length: 9 }, (e, t) => ({
|
|
457
457
|
index: t,
|
|
458
458
|
cx: 4 + t % 3 * 8,
|
|
459
459
|
cy: 4 + Math.floor(t / 3) * 8
|
|
460
|
-
})), o =
|
|
460
|
+
})), o = T(() => {
|
|
461
461
|
let e = n.modelValue.includes("top") ? 0 : n.modelValue.includes("bottom") ? 2 : 1, t = n.modelValue.includes("left") ? 0 : n.modelValue.includes("right") ? 2 : 1;
|
|
462
462
|
return e * 3 + t;
|
|
463
463
|
});
|
|
464
464
|
function s(e) {
|
|
465
465
|
r("change", e);
|
|
466
466
|
}
|
|
467
|
-
return (t, n) => (
|
|
467
|
+
return (t, n) => (P(), O("span", Ie, [k("button", {
|
|
468
468
|
type: "button",
|
|
469
469
|
class: "cn-anchor-disclosure__header flex w-full items-center justify-between gap-2",
|
|
470
470
|
"aria-expanded": e.expanded,
|
|
471
471
|
title: e.expanded ? "收起锚点" : `锚点:${e.modelValue}(点击展开调整)`,
|
|
472
472
|
onClick: n[0] ||= (e) => r("toggle")
|
|
473
|
-
}, [
|
|
473
|
+
}, [k("span", Re, R(e.field.label), 1), k("span", ze, [(P(), O("svg", Be, [(P(!0), O(w, null, I(z(a), (e) => (P(), O("circle", {
|
|
474
474
|
key: e.index,
|
|
475
475
|
cx: e.cx,
|
|
476
476
|
cy: e.cy,
|
|
477
477
|
r: e.index === o.value ? 3.2 : 2.2,
|
|
478
|
-
class:
|
|
479
|
-
}, null, 10,
|
|
480
|
-
icon:
|
|
481
|
-
class:
|
|
482
|
-
}, null, 8, ["icon", "class"])])], 8,
|
|
478
|
+
class: N(e.index === o.value ? "fill-cn-accent" : "fill-cn-muted/35")
|
|
479
|
+
}, null, 10, Ve))), 128))])), A(_, {
|
|
480
|
+
icon: z(u),
|
|
481
|
+
class: N(["text-cn-muted transition-transform duration-150", { "rotate-180": e.expanded }])
|
|
482
|
+
}, null, 8, ["icon", "class"])])], 8, Le), e.expanded ? (P(), O("span", He, [k("span", Ue, [(P(!0), O(w, null, I(z(i), (t) => (P(), O("button", {
|
|
483
483
|
key: t,
|
|
484
484
|
type: "button",
|
|
485
|
-
class:
|
|
485
|
+
class: N(["cn-anchor__cell relative aspect-square min-w-0 rounded-[4px] border p-0 transition-colors duration-100", t === e.modelValue ? "cn-anchor__cell--active border-cn-accent bg-cn-accent shadow-[0_0_8px_rgba(56,189,248,0.35)]" : "border-cn-field-line bg-cn-field hover:border-cn-muted/50"]),
|
|
486
486
|
"aria-pressed": t === e.modelValue,
|
|
487
487
|
title: t,
|
|
488
488
|
onClick: (e) => s(t)
|
|
489
|
-
}, null, 10,
|
|
489
|
+
}, null, 10, We))), 128))])])) : D("", !0)]));
|
|
490
490
|
}
|
|
491
|
-
}),
|
|
491
|
+
}), Ke = { class: "cn-bool relative inline-flex h-4 w-7 shrink-0 cursor-pointer items-center" }, qe = ["checked"], Je = /* @__PURE__ */ j({
|
|
492
492
|
__name: "BooleanField",
|
|
493
493
|
props: {
|
|
494
494
|
field: {},
|
|
@@ -496,26 +496,26 @@ var ke = ["aria-label"], Ae = [
|
|
|
496
496
|
},
|
|
497
497
|
emits: ["input", "change"],
|
|
498
498
|
setup(e, { emit: t }) {
|
|
499
|
-
let n = e, r = t, i =
|
|
499
|
+
let n = e, r = t, i = F(null);
|
|
500
500
|
async function a(e) {
|
|
501
|
-
r("change", e.target.checked), await
|
|
501
|
+
r("change", e.target.checked), await pe(), i.value && (i.value.checked = n.modelValue);
|
|
502
502
|
}
|
|
503
|
-
return
|
|
503
|
+
return ve(() => {
|
|
504
504
|
i.value && (i.value.checked = n.modelValue);
|
|
505
|
-
}), (t, n) => (
|
|
506
|
-
|
|
505
|
+
}), (t, n) => (P(), O("label", Ke, [
|
|
506
|
+
k("input", {
|
|
507
507
|
ref_key: "inputRef",
|
|
508
508
|
ref: i,
|
|
509
509
|
class: "cn-bool__input peer sr-only",
|
|
510
510
|
type: "checkbox",
|
|
511
511
|
checked: e.modelValue,
|
|
512
512
|
onChange: a
|
|
513
|
-
}, null, 40,
|
|
514
|
-
n[0] ||=
|
|
515
|
-
n[1] ||=
|
|
513
|
+
}, null, 40, qe),
|
|
514
|
+
n[0] ||= k("span", { class: "absolute inset-0 rounded-full border border-cn-field-line bg-cn-field transition-colors duration-150 peer-checked:border-cn-accent/60 peer-checked:bg-cn-accent/30 peer-focus-visible:ring-[3px] peer-focus-visible:ring-cn-accent/20" }, null, -1),
|
|
515
|
+
n[1] ||= k("span", { class: "relative mx-0.5 size-3 rounded-full bg-cn-muted shadow-sm transition-transform duration-150 peer-checked:translate-x-3 peer-checked:bg-cn-accent" }, null, -1)
|
|
516
516
|
]));
|
|
517
517
|
}
|
|
518
|
-
}),
|
|
518
|
+
}), Ye = {
|
|
519
519
|
1: [{
|
|
520
520
|
label: "四边",
|
|
521
521
|
rep: "top",
|
|
@@ -558,13 +558,13 @@ var ke = ["aria-label"], Ae = [
|
|
|
558
558
|
}
|
|
559
559
|
]
|
|
560
560
|
};
|
|
561
|
-
function
|
|
561
|
+
function Xe(e) {
|
|
562
562
|
return e === 1 ? 2 : e === 2 ? 4 : 1;
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Ze(e) {
|
|
565
565
|
return e.top === e.bottom && e.bottom === e.left && e.left === e.right ? 1 : e.top === e.bottom && e.left === e.right ? 2 : 4;
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function Qe(e, t) {
|
|
568
568
|
if (t === 1) {
|
|
569
569
|
let { top: t } = e;
|
|
570
570
|
return {
|
|
@@ -585,17 +585,17 @@ function Ye(e, t) {
|
|
|
585
585
|
}
|
|
586
586
|
return e;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function $e(e, t) {
|
|
589
589
|
return e.top === t.top && e.bottom === t.bottom && e.left === t.left && e.right === t.right;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function q(e, t) {
|
|
592
592
|
return e === null || t === null ? e === t : e.width === t.width && e.color === t.color;
|
|
593
593
|
}
|
|
594
|
-
function
|
|
594
|
+
function et(e) {
|
|
595
595
|
let { top: t, bottom: n, left: r, right: i } = e;
|
|
596
|
-
return t === null && n === null && r === null && i === null || t !== null &&
|
|
596
|
+
return t === null && n === null && r === null && i === null || t !== null && q(t, n) && q(t, r) && q(t, i) ? 1 : q(t, n) && q(r, i) ? 2 : 4;
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function tt(e, t) {
|
|
599
599
|
let n = (e) => e === null ? null : { ...e };
|
|
600
600
|
if (t === 1) {
|
|
601
601
|
let t = n(e.top);
|
|
@@ -617,18 +617,18 @@ function Qe(e, t) {
|
|
|
617
617
|
}
|
|
618
618
|
return e;
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return
|
|
620
|
+
function nt(e, t) {
|
|
621
|
+
return q(e.top, t.top) && q(e.bottom, t.bottom) && q(e.left, t.left) && q(e.right, t.right);
|
|
622
622
|
}
|
|
623
623
|
//#endregion
|
|
624
624
|
//#region src/property-panel/useShorthandMode.ts
|
|
625
|
-
function
|
|
626
|
-
let n =
|
|
627
|
-
|
|
625
|
+
function rt(e, t) {
|
|
626
|
+
let n = T(() => t(e())), r = F(null), i = T(() => r.value ?? n.value);
|
|
627
|
+
B(e, () => {
|
|
628
628
|
r.value = null;
|
|
629
629
|
});
|
|
630
630
|
function a() {
|
|
631
|
-
let e = i.value, t =
|
|
631
|
+
let e = i.value, t = Xe(e);
|
|
632
632
|
return r.value = t, {
|
|
633
633
|
from: e,
|
|
634
634
|
to: t
|
|
@@ -641,7 +641,7 @@ function et(e, t) {
|
|
|
641
641
|
}
|
|
642
642
|
//#endregion
|
|
643
643
|
//#region src/property-panel/controlStyles.ts
|
|
644
|
-
var
|
|
644
|
+
var J = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-field text-[11.5px] leading-none text-cn-fg outline-none transition-[border-color,box-shadow,background-color] duration-100 placeholder:text-cn-muted/60 hover:border-cn-muted/40 focus:border-cn-accent/70 focus:ring-[3px] focus:ring-cn-accent/15 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:border-cn-field-line", Y = `${J} text-right font-mono tabular-nums`, it = J, at = "w-full flex-1 min-w-0 resize-y rounded-md border border-cn-field-line bg-cn-field px-2 py-1.5 text-[11.5px] leading-5 text-cn-fg outline-none transition-[border-color,box-shadow] duration-100 placeholder:text-cn-muted/60 hover:border-cn-muted/40 focus:border-cn-accent/70 focus:ring-[3px] focus:ring-cn-accent/15 disabled:cursor-not-allowed disabled:opacity-40", ot = "size-7 shrink-0 cursor-pointer self-center rounded-md border border-cn-field-line bg-cn-field p-0.5 transition-colors hover:border-cn-muted/40 disabled:cursor-not-allowed disabled:opacity-40", st = ["aria-label"], ct = /* @__PURE__ */ j({
|
|
645
645
|
__name: "BorderWidthInput",
|
|
646
646
|
props: {
|
|
647
647
|
value: {},
|
|
@@ -649,8 +649,8 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
649
649
|
},
|
|
650
650
|
emits: ["input", "change"],
|
|
651
651
|
setup(e, { emit: t }) {
|
|
652
|
-
let n = e, r = t, i =
|
|
653
|
-
|
|
652
|
+
let n = e, r = t, i = F(n.value === null ? "" : String(n.value)), a = F(!1);
|
|
653
|
+
B(() => n.value, (e) => {
|
|
654
654
|
a.value || (i.value = e === null ? "" : String(e));
|
|
655
655
|
});
|
|
656
656
|
function o(e) {
|
|
@@ -679,9 +679,9 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
679
679
|
let a = o(t);
|
|
680
680
|
i.value = a === 0 ? "" : String(a), r("change", a);
|
|
681
681
|
}
|
|
682
|
-
return (t, n) =>
|
|
682
|
+
return (t, n) => be((P(), O("input", {
|
|
683
683
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
684
|
-
class:
|
|
684
|
+
class: N(["cn-field cn-field--number min-w-0 flex-1", z(Y)]),
|
|
685
685
|
type: "number",
|
|
686
686
|
"aria-label": e.label,
|
|
687
687
|
min: 0,
|
|
@@ -692,9 +692,9 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
692
692
|
onFocus: n[1] ||= (e) => a.value = !0,
|
|
693
693
|
onBlur: u,
|
|
694
694
|
onChange: u
|
|
695
|
-
}, null, 42,
|
|
695
|
+
}, null, 42, st)), [[_e, i.value]]);
|
|
696
696
|
}
|
|
697
|
-
}),
|
|
697
|
+
}), lt = ["aria-label", "title"], ut = /* @__PURE__ */ j({
|
|
698
698
|
__name: "ShorthandModeButton",
|
|
699
699
|
props: {
|
|
700
700
|
mode: {},
|
|
@@ -704,35 +704,35 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
704
704
|
setup(e, { emit: t }) {
|
|
705
705
|
let n = e, r = t, i = {
|
|
706
706
|
1: {
|
|
707
|
-
icon:
|
|
707
|
+
icon: Ce,
|
|
708
708
|
title: "统一值"
|
|
709
709
|
},
|
|
710
710
|
2: {
|
|
711
|
-
icon:
|
|
711
|
+
icon: Se,
|
|
712
712
|
title: "上下/左右"
|
|
713
713
|
},
|
|
714
714
|
4: {
|
|
715
|
-
icon:
|
|
715
|
+
icon: xe,
|
|
716
716
|
title: "四边独立"
|
|
717
717
|
}
|
|
718
|
-
}, a =
|
|
719
|
-
return (e, t) => (
|
|
718
|
+
}, a = T(() => i[n.mode]), o = T(() => `${n.label}:${a.value.title}(点击切换值模式)`);
|
|
719
|
+
return (e, t) => (P(), O("button", {
|
|
720
720
|
type: "button",
|
|
721
721
|
class: "cn-props__mode-toggle shrink-0",
|
|
722
722
|
"aria-label": o.value,
|
|
723
723
|
title: o.value,
|
|
724
|
-
onClick: t[0] ||=
|
|
725
|
-
}, [
|
|
724
|
+
onClick: t[0] ||= V((e) => r("cycle"), ["prevent"])
|
|
725
|
+
}, [A(_, {
|
|
726
726
|
icon: a.value.icon,
|
|
727
727
|
size: 12
|
|
728
|
-
}, null, 8, ["icon"])], 8,
|
|
728
|
+
}, null, 8, ["icon"])], 8, lt));
|
|
729
729
|
}
|
|
730
|
-
}),
|
|
730
|
+
}), dt = { class: "cn-border flex w-full min-w-0 items-center gap-1" }, ft = { class: "grid min-w-0 flex-1 gap-1 grid-cols-1" }, pt = { class: "w-5 shrink-0 select-none text-[10px] leading-none text-cn-muted" }, mt = [
|
|
731
731
|
"value",
|
|
732
732
|
"disabled",
|
|
733
733
|
"onInput",
|
|
734
734
|
"onChange"
|
|
735
|
-
],
|
|
735
|
+
], X = "#000000", ht = /* @__PURE__ */ j({
|
|
736
736
|
__name: "BorderField",
|
|
737
737
|
props: {
|
|
738
738
|
field: {},
|
|
@@ -740,12 +740,12 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
740
740
|
},
|
|
741
741
|
emits: ["input", "change"],
|
|
742
742
|
setup(e, { emit: t }) {
|
|
743
|
-
let n = e, r = t, { mode: i, cycle: a } =
|
|
743
|
+
let n = e, r = t, { mode: i, cycle: a } = rt(() => n.modelValue, et), o = T(() => Ye[i.value]);
|
|
744
744
|
function s(e) {
|
|
745
745
|
return n.modelValue[e.rep]?.width ?? null;
|
|
746
746
|
}
|
|
747
747
|
function c(e) {
|
|
748
|
-
return n.modelValue[e.rep]?.color ??
|
|
748
|
+
return n.modelValue[e.rep]?.color ?? X;
|
|
749
749
|
}
|
|
750
750
|
function l(e, t, i) {
|
|
751
751
|
let a = { ...n.modelValue };
|
|
@@ -753,7 +753,7 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
753
753
|
r(i ? "change" : "input", a);
|
|
754
754
|
}
|
|
755
755
|
function u(e, t, r) {
|
|
756
|
-
let i = n.modelValue[e.rep]?.color ??
|
|
756
|
+
let i = n.modelValue[e.rep]?.color ?? X;
|
|
757
757
|
l(e, t <= 0 ? null : {
|
|
758
758
|
width: t,
|
|
759
759
|
color: i
|
|
@@ -771,20 +771,20 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
771
771
|
function f() {
|
|
772
772
|
let { from: e, to: t } = a();
|
|
773
773
|
if (t < e) {
|
|
774
|
-
let e =
|
|
775
|
-
|
|
774
|
+
let e = tt(n.modelValue, t);
|
|
775
|
+
nt(e, n.modelValue) || r("change", e);
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
|
-
return (t, n) => (
|
|
779
|
-
mode:
|
|
778
|
+
return (t, n) => (P(), O("span", dt, [A(ut, {
|
|
779
|
+
mode: z(i),
|
|
780
780
|
label: "边框",
|
|
781
781
|
onCycle: f
|
|
782
|
-
}, null, 8, ["mode"]),
|
|
782
|
+
}, null, 8, ["mode"]), k("span", ft, [(P(!0), O(w, null, I(o.value, (t) => (P(), O("label", {
|
|
783
783
|
key: t.rep,
|
|
784
784
|
class: "flex items-center gap-1.5"
|
|
785
785
|
}, [
|
|
786
|
-
|
|
787
|
-
|
|
786
|
+
k("span", pt, R(t.label), 1),
|
|
787
|
+
A(ct, {
|
|
788
788
|
class: "cn-border__width",
|
|
789
789
|
value: s(t),
|
|
790
790
|
label: t.label,
|
|
@@ -796,7 +796,7 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
796
796
|
"onInput",
|
|
797
797
|
"onChange"
|
|
798
798
|
]),
|
|
799
|
-
|
|
799
|
+
k("input", {
|
|
800
800
|
class: "cn-border__color size-6 shrink-0 cursor-pointer self-center rounded-md border border-cn-field-line bg-cn-field p-0.5 transition-colors hover:border-cn-muted/40 disabled:cursor-not-allowed disabled:opacity-40",
|
|
801
801
|
type: "color",
|
|
802
802
|
title: "边框颜色",
|
|
@@ -804,17 +804,17 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
804
804
|
disabled: e.modelValue[t.rep] === null,
|
|
805
805
|
onInput: (e) => d(t, e, !1),
|
|
806
806
|
onChange: (e) => d(t, e, !0)
|
|
807
|
-
}, null, 40,
|
|
807
|
+
}, null, 40, mt)
|
|
808
808
|
]))), 128))])]));
|
|
809
809
|
}
|
|
810
|
-
}),
|
|
810
|
+
}), gt = ["value"], _t = {
|
|
811
811
|
key: 1,
|
|
812
812
|
class: "flex flex-1 items-center gap-1.5"
|
|
813
|
-
},
|
|
813
|
+
}, vt = ["value"], yt = ["value"], bt = [
|
|
814
814
|
"disabled",
|
|
815
815
|
"title",
|
|
816
816
|
"data-upload-error"
|
|
817
|
-
],
|
|
817
|
+
], xt = /* @__PURE__ */ j({
|
|
818
818
|
__name: "FontField",
|
|
819
819
|
props: {
|
|
820
820
|
field: {},
|
|
@@ -822,7 +822,7 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
822
822
|
},
|
|
823
823
|
emits: ["input", "change"],
|
|
824
824
|
setup(e, { emit: t }) {
|
|
825
|
-
let n = e, r = t, i =
|
|
825
|
+
let n = e, r = t, i = re(), a = T(() => {
|
|
826
826
|
if (i === null) return [];
|
|
827
827
|
let e = [{
|
|
828
828
|
label: "内置默认字体",
|
|
@@ -857,7 +857,7 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
857
857
|
function f(e) {
|
|
858
858
|
c = !1, r("change", e.target.value);
|
|
859
859
|
}
|
|
860
|
-
let p =
|
|
860
|
+
let p = F(!1), m = F(null), h = F(null);
|
|
861
861
|
function g() {
|
|
862
862
|
m.value = null, h.value?.click();
|
|
863
863
|
}
|
|
@@ -875,25 +875,25 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
875
875
|
}
|
|
876
876
|
}
|
|
877
877
|
}
|
|
878
|
-
return (t, n) =>
|
|
878
|
+
return (t, n) => z(i) === null ? (P(), O("input", {
|
|
879
879
|
key: 0,
|
|
880
|
-
class:
|
|
880
|
+
class: N(["cn-field", z(it)]),
|
|
881
881
|
type: "text",
|
|
882
882
|
value: e.modelValue,
|
|
883
883
|
onInput: l,
|
|
884
884
|
onCompositionstart: u,
|
|
885
885
|
onCompositionend: d,
|
|
886
886
|
onChange: f
|
|
887
|
-
}, null, 42,
|
|
888
|
-
|
|
889
|
-
class:
|
|
887
|
+
}, null, 42, gt)) : (P(), O("div", _t, [
|
|
888
|
+
k("select", {
|
|
889
|
+
class: N(["cn-field cn-select", z(J)]),
|
|
890
890
|
value: e.modelValue,
|
|
891
891
|
onChange: s
|
|
892
|
-
}, [(
|
|
892
|
+
}, [(P(!0), O(w, null, I(a.value, (e) => (P(), O("option", {
|
|
893
893
|
key: e.value,
|
|
894
894
|
value: e.value
|
|
895
|
-
},
|
|
896
|
-
|
|
895
|
+
}, R(e.label), 9, yt))), 128))], 42, vt),
|
|
896
|
+
k("input", {
|
|
897
897
|
ref_key: "fileInput",
|
|
898
898
|
ref: h,
|
|
899
899
|
type: "file",
|
|
@@ -901,7 +901,7 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
901
901
|
accept: ".ttf,.otf,.woff,.woff2,font/ttf,font/otf,font/woff,font/woff2",
|
|
902
902
|
onChange: _
|
|
903
903
|
}, null, 544),
|
|
904
|
-
|
|
904
|
+
z(i).canUpload ? (P(), O("button", {
|
|
905
905
|
key: 0,
|
|
906
906
|
type: "button",
|
|
907
907
|
class: "h-7 shrink-0 rounded-md border border-cn-field-line bg-cn-field px-2 text-[11px] leading-none text-cn-fg transition-colors duration-100 hover:border-cn-muted/40 disabled:cursor-not-allowed disabled:opacity-40",
|
|
@@ -909,10 +909,10 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
909
909
|
title: m.value ?? "上传本机字体(加入清单后可选)",
|
|
910
910
|
"data-upload-error": m.value ?? void 0,
|
|
911
911
|
onClick: g
|
|
912
|
-
},
|
|
912
|
+
}, R(p.value ? "…" : m.value ? "!" : "上传"), 9, bt)) : D("", !0)
|
|
913
913
|
]));
|
|
914
914
|
}
|
|
915
|
-
}),
|
|
915
|
+
}), St = { class: "cn-color flex min-w-0 flex-1 items-center gap-1.5" }, Ct = ["checked"], wt = ["value", "disabled"], Tt = ["value", "disabled"], Et = "#000000", Dt = /* @__PURE__ */ j({
|
|
916
916
|
__name: "ColorField",
|
|
917
917
|
props: {
|
|
918
918
|
field: {},
|
|
@@ -920,12 +920,12 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
920
920
|
},
|
|
921
921
|
emits: ["input", "change"],
|
|
922
922
|
setup(e, { emit: t }) {
|
|
923
|
-
let n = e, r = t, i =
|
|
924
|
-
|
|
923
|
+
let n = e, r = t, i = F(n.modelValue !== null), a = F(o(n.modelValue));
|
|
924
|
+
B(() => n.modelValue, (e) => {
|
|
925
925
|
i.value = e !== null, i.value && (a.value = o(e));
|
|
926
926
|
});
|
|
927
927
|
function o(e) {
|
|
928
|
-
return e !== null && /^#[0-9a-fA-F]{6}$/.test(e) ? e :
|
|
928
|
+
return e !== null && /^#[0-9a-fA-F]{6}$/.test(e) ? e : Et;
|
|
929
929
|
}
|
|
930
930
|
function s(e) {
|
|
931
931
|
let t = e.target.checked;
|
|
@@ -952,40 +952,40 @@ var Y = "h-7 flex-1 w-full min-w-0 rounded-md border border-cn-field-line bg-cn-
|
|
|
952
952
|
}
|
|
953
953
|
a.value = o(t), r("change", t);
|
|
954
954
|
}
|
|
955
|
-
return (t, n) => (
|
|
956
|
-
e.field.nullable ? (
|
|
955
|
+
return (t, n) => (P(), O("span", St, [
|
|
956
|
+
e.field.nullable ? (P(), O("input", {
|
|
957
957
|
key: 0,
|
|
958
958
|
class: "cn-color__toggle size-3.5 shrink-0 cursor-pointer accent-cn-accent",
|
|
959
959
|
type: "checkbox",
|
|
960
960
|
title: "启用颜色",
|
|
961
961
|
checked: i.value,
|
|
962
962
|
onChange: s
|
|
963
|
-
}, null, 40,
|
|
964
|
-
|
|
965
|
-
class:
|
|
963
|
+
}, null, 40, Ct)) : D("", !0),
|
|
964
|
+
k("input", {
|
|
965
|
+
class: N(["cn-color__swatch", z(ot)]),
|
|
966
966
|
type: "color",
|
|
967
967
|
value: a.value,
|
|
968
968
|
disabled: !i.value,
|
|
969
969
|
onInput: c,
|
|
970
970
|
onChange: l
|
|
971
|
-
}, null, 42,
|
|
972
|
-
|
|
973
|
-
class:
|
|
971
|
+
}, null, 42, wt),
|
|
972
|
+
k("input", {
|
|
973
|
+
class: N(["cn-color__text min-w-0 flex-1", z(J)]),
|
|
974
974
|
type: "text",
|
|
975
975
|
value: e.modelValue ?? "",
|
|
976
976
|
disabled: !i.value,
|
|
977
977
|
placeholder: "无",
|
|
978
978
|
onChange: u
|
|
979
|
-
}, null, 42,
|
|
979
|
+
}, null, 42, Tt)
|
|
980
980
|
]));
|
|
981
981
|
}
|
|
982
982
|
}), Z = Symbol("canvas-image-upload");
|
|
983
|
-
function
|
|
984
|
-
return
|
|
983
|
+
function Ot() {
|
|
984
|
+
return fe(Z, null);
|
|
985
985
|
}
|
|
986
986
|
//#endregion
|
|
987
987
|
//#region src/property-panel/fields/TextField.vue?vue&type=script&setup=true&lang.ts
|
|
988
|
-
var
|
|
988
|
+
var kt = ["value", "placeholder"], Q = /* @__PURE__ */ j({
|
|
989
989
|
__name: "TextField",
|
|
990
990
|
props: {
|
|
991
991
|
field: {},
|
|
@@ -993,7 +993,7 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
993
993
|
},
|
|
994
994
|
emits: ["input", "change"],
|
|
995
995
|
setup(e, { emit: t }) {
|
|
996
|
-
let n = e, r = t, i = !1, a =
|
|
996
|
+
let n = e, r = t, i = !1, a = F(!1);
|
|
997
997
|
function o(e) {
|
|
998
998
|
return n.field.nonEmpty === !0 ? e.trim() === "" ? (a.value = !0, !0) : (a.value = !1, !1) : !1;
|
|
999
999
|
}
|
|
@@ -1014,8 +1014,8 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1014
1014
|
let t = e.target.value;
|
|
1015
1015
|
o(t) || r("change", t);
|
|
1016
1016
|
}
|
|
1017
|
-
return (t, n) => (
|
|
1018
|
-
class:
|
|
1017
|
+
return (t, n) => (P(), O("input", {
|
|
1018
|
+
class: N(["cn-field", [z(it), a.value ? "cn-field--invalid" : ""]]),
|
|
1019
1019
|
type: "text",
|
|
1020
1020
|
value: e.modelValue,
|
|
1021
1021
|
placeholder: e.field.placeholder,
|
|
@@ -1023,9 +1023,9 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1023
1023
|
onCompositionstart: c,
|
|
1024
1024
|
onCompositionend: l,
|
|
1025
1025
|
onChange: u
|
|
1026
|
-
}, null, 42,
|
|
1026
|
+
}, null, 42, kt));
|
|
1027
1027
|
}
|
|
1028
|
-
}),
|
|
1028
|
+
}), At = /* @__PURE__ */ j({
|
|
1029
1029
|
__name: "ResourceValueField",
|
|
1030
1030
|
props: {
|
|
1031
1031
|
field: {},
|
|
@@ -1036,15 +1036,15 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1036
1036
|
},
|
|
1037
1037
|
emits: ["input", "change"],
|
|
1038
1038
|
setup(e, { emit: t }) {
|
|
1039
|
-
let n = e, r = t, i =
|
|
1039
|
+
let n = e, r = t, i = T(() => n.dataMode === "expression"), a = T(() => {
|
|
1040
1040
|
let e = n.modelValue ?? "";
|
|
1041
|
-
return i.value ?
|
|
1041
|
+
return i.value ? v(e) ?? e : "";
|
|
1042
1042
|
});
|
|
1043
1043
|
function o(e) {
|
|
1044
|
-
let t =
|
|
1044
|
+
let t = b(e);
|
|
1045
1045
|
r("input", t), r("change", t);
|
|
1046
1046
|
}
|
|
1047
|
-
return (t, n) => i.value ? (
|
|
1047
|
+
return (t, n) => i.value ? (P(), E(y, {
|
|
1048
1048
|
key: 0,
|
|
1049
1049
|
"model-value": a.value,
|
|
1050
1050
|
source: e.source ?? null,
|
|
@@ -1057,7 +1057,7 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1057
1057
|
"source",
|
|
1058
1058
|
"disabled",
|
|
1059
1059
|
"aria-label"
|
|
1060
|
-
])) : (
|
|
1060
|
+
])) : (P(), E(Q, {
|
|
1061
1061
|
key: 1,
|
|
1062
1062
|
field: e.field,
|
|
1063
1063
|
"model-value": e.modelValue ?? "",
|
|
@@ -1072,17 +1072,17 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1072
1072
|
"disabled"
|
|
1073
1073
|
]));
|
|
1074
1074
|
}
|
|
1075
|
-
}),
|
|
1075
|
+
}), jt = {
|
|
1076
1076
|
key: 0,
|
|
1077
1077
|
class: "flex flex-col gap-1.5"
|
|
1078
|
-
},
|
|
1078
|
+
}, Mt = [
|
|
1079
1079
|
"disabled",
|
|
1080
1080
|
"title",
|
|
1081
1081
|
"data-upload-error"
|
|
1082
|
-
],
|
|
1082
|
+
], Nt = ["src"], Pt = {
|
|
1083
1083
|
key: 2,
|
|
1084
1084
|
class: "relative"
|
|
1085
|
-
},
|
|
1085
|
+
}, Ft = { class: "flex items-center gap-1.5" }, It = /* @__PURE__ */ j({
|
|
1086
1086
|
__name: "ImageSrcField",
|
|
1087
1087
|
props: {
|
|
1088
1088
|
field: {},
|
|
@@ -1094,7 +1094,7 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1094
1094
|
},
|
|
1095
1095
|
emits: ["input", "change"],
|
|
1096
1096
|
setup(e, { emit: t }) {
|
|
1097
|
-
let n = e, r = t, i =
|
|
1097
|
+
let n = e, r = t, i = Ot(), a = T(() => i !== null && i.canUpload && n.dataMode !== "expression"), o = T(() => typeof n.modelValue == "string" && n.modelValue !== ""), s = T(() => n.resourceStatus === "pending" ? "装载中" : n.resourceStatus === "failed" ? "失败" : null), c = F(!1), l = F(null), u = F(null);
|
|
1098
1098
|
function d() {
|
|
1099
1099
|
l.value = null, u.value?.click();
|
|
1100
1100
|
}
|
|
@@ -1112,8 +1112,8 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
}
|
|
1115
|
-
return (t, n) => a.value ? (
|
|
1116
|
-
|
|
1115
|
+
return (t, n) => a.value ? (P(), O("div", jt, [
|
|
1116
|
+
k("button", {
|
|
1117
1117
|
type: "button",
|
|
1118
1118
|
class: "cn-imagesrc__thumb relative flex h-16 w-full items-center justify-center overflow-hidden rounded-md border border-dashed border-cn-field-line bg-cn-field/40 text-[11px] leading-none text-cn-muted transition-colors duration-100 hover:border-cn-muted/40 disabled:cursor-not-allowed disabled:opacity-40",
|
|
1119
1119
|
disabled: c.value,
|
|
@@ -1121,19 +1121,19 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1121
1121
|
"data-upload-error": l.value ?? void 0,
|
|
1122
1122
|
onClick: d
|
|
1123
1123
|
}, [
|
|
1124
|
-
o.value ? (
|
|
1124
|
+
o.value ? (P(), O("img", {
|
|
1125
1125
|
key: 0,
|
|
1126
1126
|
src: e.modelValue ?? void 0,
|
|
1127
1127
|
class: "absolute inset-0 size-full object-cover",
|
|
1128
1128
|
alt: ""
|
|
1129
|
-
}, null, 8,
|
|
1130
|
-
s.value ? (
|
|
1129
|
+
}, null, 8, Nt)) : D("", !0),
|
|
1130
|
+
s.value ? (P(), O("span", {
|
|
1131
1131
|
key: 1,
|
|
1132
|
-
class:
|
|
1133
|
-
},
|
|
1134
|
-
o.value ?
|
|
1135
|
-
], 8,
|
|
1136
|
-
|
|
1132
|
+
class: N(["cn-imagesrc__status absolute right-1 top-1 rounded bg-cn-bg-elevated/90 px-1 py-0.5 text-[10px] leading-none", e.resourceStatus === "failed" ? "text-red-400" : "text-cn-muted"])
|
|
1133
|
+
}, R(s.value), 3)) : D("", !0),
|
|
1134
|
+
o.value ? D("", !0) : (P(), O("span", Pt, R(c.value ? "…" : l.value ? "!" : "点击上传图片"), 1))
|
|
1135
|
+
], 8, Mt),
|
|
1136
|
+
k("input", {
|
|
1137
1137
|
ref_key: "fileInput",
|
|
1138
1138
|
ref: u,
|
|
1139
1139
|
type: "file",
|
|
@@ -1141,7 +1141,7 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1141
1141
|
accept: "image/*",
|
|
1142
1142
|
onChange: f
|
|
1143
1143
|
}, null, 544),
|
|
1144
|
-
|
|
1144
|
+
k("div", Ft, [A(Q, {
|
|
1145
1145
|
class: "flex-1",
|
|
1146
1146
|
field: e.field,
|
|
1147
1147
|
"model-value": e.modelValue ?? "",
|
|
@@ -1152,14 +1152,14 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1152
1152
|
"field",
|
|
1153
1153
|
"model-value",
|
|
1154
1154
|
"aria-label"
|
|
1155
|
-
]), o.value ? (
|
|
1155
|
+
]), o.value ? (P(), O("button", {
|
|
1156
1156
|
key: 0,
|
|
1157
1157
|
type: "button",
|
|
1158
1158
|
class: "cn-imagesrc__clear h-7 shrink-0 rounded-md border border-cn-field-line bg-cn-field px-2 text-[11px] leading-none text-cn-fg transition-colors duration-100 hover:border-cn-muted/40",
|
|
1159
1159
|
title: "清除图片(资源地址置空)",
|
|
1160
1160
|
onClick: n[2] ||= (e) => r("change", "")
|
|
1161
|
-
}, "清除")) :
|
|
1162
|
-
])) : e.dataMode === "expression" ? (
|
|
1161
|
+
}, "清除")) : D("", !0)])
|
|
1162
|
+
])) : e.dataMode === "expression" ? (P(), E(At, {
|
|
1163
1163
|
key: 1,
|
|
1164
1164
|
field: e.field,
|
|
1165
1165
|
"model-value": e.modelValue,
|
|
@@ -1173,7 +1173,7 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1173
1173
|
"model-value",
|
|
1174
1174
|
"source",
|
|
1175
1175
|
"disabled"
|
|
1176
|
-
])) : (
|
|
1176
|
+
])) : (P(), E(Q, {
|
|
1177
1177
|
key: 2,
|
|
1178
1178
|
field: e.field,
|
|
1179
1179
|
"model-value": e.modelValue ?? "",
|
|
@@ -1186,12 +1186,12 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1186
1186
|
"aria-label"
|
|
1187
1187
|
]));
|
|
1188
1188
|
}
|
|
1189
|
-
}),
|
|
1189
|
+
}), Lt = [
|
|
1190
1190
|
"aria-label",
|
|
1191
1191
|
"min",
|
|
1192
1192
|
"max",
|
|
1193
1193
|
"step"
|
|
1194
|
-
], $ = /* @__PURE__ */
|
|
1194
|
+
], $ = /* @__PURE__ */ j({
|
|
1195
1195
|
__name: "NumberField",
|
|
1196
1196
|
props: {
|
|
1197
1197
|
field: {},
|
|
@@ -1199,8 +1199,8 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1199
1199
|
},
|
|
1200
1200
|
emits: ["input", "change"],
|
|
1201
1201
|
setup(e, { emit: t }) {
|
|
1202
|
-
let n = e, r = t, i =
|
|
1203
|
-
|
|
1202
|
+
let n = e, r = t, i = F(String(n.modelValue)), a = F(!1);
|
|
1203
|
+
B(() => n.modelValue, (e) => {
|
|
1204
1204
|
a.value || (i.value = String(e));
|
|
1205
1205
|
});
|
|
1206
1206
|
function o(e) {
|
|
@@ -1227,9 +1227,9 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1227
1227
|
let a = o(t);
|
|
1228
1228
|
i.value = String(a), r("change", a);
|
|
1229
1229
|
}
|
|
1230
|
-
return (t, n) =>
|
|
1230
|
+
return (t, n) => be((P(), O("input", {
|
|
1231
1231
|
"onUpdate:modelValue": n[0] ||= (e) => i.value = e,
|
|
1232
|
-
class:
|
|
1232
|
+
class: N(["cn-field cn-field--number", z(Y)]),
|
|
1233
1233
|
type: "number",
|
|
1234
1234
|
"aria-label": e.field.label,
|
|
1235
1235
|
min: e.field.min,
|
|
@@ -1239,9 +1239,9 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1239
1239
|
onFocus: n[1] ||= (e) => a.value = !0,
|
|
1240
1240
|
onBlur: l,
|
|
1241
1241
|
onChange: l
|
|
1242
|
-
}, null, 42,
|
|
1242
|
+
}, null, 42, Lt)), [[_e, i.value]]);
|
|
1243
1243
|
}
|
|
1244
|
-
}),
|
|
1244
|
+
}), Rt = { class: "cn-padding flex w-full min-w-0 items-center gap-1.5" }, zt = { class: "w-5 shrink-0 select-none text-[10px] leading-none text-cn-muted" }, Bt = /* @__PURE__ */ j({
|
|
1245
1245
|
__name: "PaddingField",
|
|
1246
1246
|
props: {
|
|
1247
1247
|
field: {},
|
|
@@ -1249,7 +1249,7 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1249
1249
|
},
|
|
1250
1250
|
emits: ["input", "change"],
|
|
1251
1251
|
setup(e, { emit: t }) {
|
|
1252
|
-
let n = e, r = t, { mode: i, cycle: a } =
|
|
1252
|
+
let n = e, r = t, { mode: i, cycle: a } = rt(() => n.modelValue, Ze), o = T(() => Ye[i.value]);
|
|
1253
1253
|
function s(e) {
|
|
1254
1254
|
return {
|
|
1255
1255
|
key: ["padding", e.rep],
|
|
@@ -1265,18 +1265,18 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1265
1265
|
function l() {
|
|
1266
1266
|
let { from: e, to: t } = a();
|
|
1267
1267
|
if (t < e) {
|
|
1268
|
-
let e =
|
|
1269
|
-
|
|
1268
|
+
let e = Qe(n.modelValue, t);
|
|
1269
|
+
$e(e, n.modelValue) || r("change", e);
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
1272
|
-
return (t, n) => (
|
|
1273
|
-
mode:
|
|
1272
|
+
return (t, n) => (P(), O("span", Rt, [A(ut, {
|
|
1273
|
+
mode: z(i),
|
|
1274
1274
|
label: "内边距",
|
|
1275
1275
|
onCycle: l
|
|
1276
|
-
}, null, 8, ["mode"]),
|
|
1276
|
+
}, null, 8, ["mode"]), k("span", { class: N(["grid min-w-0 flex-1 gap-1.5", z(i) === 1 ? "grid-cols-1" : "grid-cols-2"]) }, [(P(!0), O(w, null, I(o.value, (t) => (P(), O("label", {
|
|
1277
1277
|
key: t.rep,
|
|
1278
1278
|
class: "flex min-w-0 items-center gap-1.5"
|
|
1279
|
-
}, [
|
|
1279
|
+
}, [k("span", zt, R(t.label), 1), A($, {
|
|
1280
1280
|
class: "min-w-0 flex-1",
|
|
1281
1281
|
field: s(t),
|
|
1282
1282
|
"model-value": e.modelValue[t.rep],
|
|
@@ -1289,16 +1289,16 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1289
1289
|
"onChange"
|
|
1290
1290
|
])]))), 128))], 2)]));
|
|
1291
1291
|
}
|
|
1292
|
-
}),
|
|
1292
|
+
}), Vt = { class: "grid w-full min-w-0 grid-cols-2 gap-1" }, Ht = ["title"], Ut = { class: "w-3.5 shrink-0 select-none text-[10px] leading-none text-cn-muted" }, Wt = [
|
|
1293
1293
|
"aria-pressed",
|
|
1294
1294
|
"title",
|
|
1295
1295
|
"onClick"
|
|
1296
|
-
],
|
|
1296
|
+
], Gt = [
|
|
1297
1297
|
"aria-label",
|
|
1298
1298
|
"value",
|
|
1299
1299
|
"placeholder",
|
|
1300
1300
|
"title"
|
|
1301
|
-
],
|
|
1301
|
+
], Kt = /* @__PURE__ */ j({
|
|
1302
1302
|
__name: "PairField",
|
|
1303
1303
|
props: {
|
|
1304
1304
|
field: {},
|
|
@@ -1311,16 +1311,16 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1311
1311
|
"sub-commit"
|
|
1312
1312
|
],
|
|
1313
1313
|
setup(e, { emit: t }) {
|
|
1314
|
-
let n = e, r = t, i =
|
|
1314
|
+
let n = e, r = t, i = T(() => n.field.items ?? []);
|
|
1315
1315
|
function a(e) {
|
|
1316
1316
|
if (!e.auto) return !1;
|
|
1317
|
-
let t =
|
|
1317
|
+
let t = K(n.modelValue, e.auto.key);
|
|
1318
1318
|
return t.ok && t.value === !0;
|
|
1319
1319
|
}
|
|
1320
1320
|
function o(e) {
|
|
1321
1321
|
return {
|
|
1322
1322
|
...e,
|
|
1323
|
-
key:
|
|
1323
|
+
key: G(n.field, e)
|
|
1324
1324
|
};
|
|
1325
1325
|
}
|
|
1326
1326
|
function s(e) {
|
|
@@ -1337,11 +1337,11 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1337
1337
|
r("sub-commit", s(e), !a(e), !0);
|
|
1338
1338
|
}
|
|
1339
1339
|
function u(e) {
|
|
1340
|
-
let t =
|
|
1340
|
+
let t = K(n.modelValue, e.key);
|
|
1341
1341
|
return t.ok && typeof t.value == "number" ? t.value : 0;
|
|
1342
1342
|
}
|
|
1343
1343
|
function d(e) {
|
|
1344
|
-
return n.displays?.[
|
|
1344
|
+
return n.displays?.[G(n.field, e).join(".")];
|
|
1345
1345
|
}
|
|
1346
1346
|
function f(e) {
|
|
1347
1347
|
let t = d(e);
|
|
@@ -1354,30 +1354,30 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1354
1354
|
let t = d(e);
|
|
1355
1355
|
return t?.preview ? "模板子树:预览盒尺寸(随行实例变化,非文档声明值)" : t === void 0 ? `${e.label}自适应:已开启` : `${e.label}自适应:布局解析值(与画布选择框同源)`;
|
|
1356
1356
|
}
|
|
1357
|
-
return (e, t) => (
|
|
1357
|
+
return (e, t) => (P(), O("span", Vt, [(P(!0), O(w, null, I(i.value, (e) => (P(), O("label", {
|
|
1358
1358
|
key: e.key.join("."),
|
|
1359
1359
|
class: "flex min-w-0 items-center gap-1",
|
|
1360
1360
|
title: e.auto ? void 0 : e.label
|
|
1361
1361
|
}, [
|
|
1362
|
-
|
|
1363
|
-
e.auto ? (
|
|
1362
|
+
k("span", Ut, R(e.label), 1),
|
|
1363
|
+
e.auto ? (P(), O("button", {
|
|
1364
1364
|
key: 0,
|
|
1365
1365
|
type: "button",
|
|
1366
|
-
class:
|
|
1366
|
+
class: N(["cn-props__auto-toggle shrink-0", { "cn-props__auto-toggle--active": a(e) }]),
|
|
1367
1367
|
"aria-pressed": a(e),
|
|
1368
1368
|
title: p(e),
|
|
1369
|
-
onClick:
|
|
1370
|
-
}, "自", 10,
|
|
1371
|
-
a(e) ? (
|
|
1369
|
+
onClick: V((t) => l(e), ["prevent"])
|
|
1370
|
+
}, "自", 10, Wt)) : D("", !0),
|
|
1371
|
+
a(e) ? (P(), O("input", {
|
|
1372
1372
|
key: 2,
|
|
1373
|
-
class:
|
|
1373
|
+
class: N(["cn-field cn-field--number min-w-0 flex-1", [z(Y), d(e)?.preview ? "cn-field--preview" : ""]]),
|
|
1374
1374
|
type: "number",
|
|
1375
1375
|
disabled: "",
|
|
1376
1376
|
"aria-label": e.label,
|
|
1377
1377
|
value: f(e),
|
|
1378
1378
|
placeholder: e.auto?.placeholder ?? "",
|
|
1379
1379
|
title: m(e)
|
|
1380
|
-
}, null, 10,
|
|
1380
|
+
}, null, 10, Gt)) : (P(), E($, {
|
|
1381
1381
|
key: 1,
|
|
1382
1382
|
class: "min-w-0 flex-1",
|
|
1383
1383
|
field: e,
|
|
@@ -1390,9 +1390,9 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1390
1390
|
"onInput",
|
|
1391
1391
|
"onChange"
|
|
1392
1392
|
]))
|
|
1393
|
-
], 8,
|
|
1393
|
+
], 8, Ht))), 128))]));
|
|
1394
1394
|
}
|
|
1395
|
-
}),
|
|
1395
|
+
}), qt = ["value"], Jt = ["value"], Yt = /* @__PURE__ */ j({
|
|
1396
1396
|
__name: "SelectField",
|
|
1397
1397
|
props: {
|
|
1398
1398
|
field: {},
|
|
@@ -1404,16 +1404,16 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1404
1404
|
function r(e) {
|
|
1405
1405
|
n("change", e.target.value);
|
|
1406
1406
|
}
|
|
1407
|
-
return (t, n) => (
|
|
1407
|
+
return (t, n) => (P(), O("select", {
|
|
1408
1408
|
class: "cn-select h-7 w-full min-w-0 flex-1 cursor-pointer appearance-none rounded-md border border-cn-field-line bg-cn-field py-0 pl-2 pr-6 text-[11px] leading-none text-cn-fg outline-none transition-[border-color,box-shadow] duration-100 hover:border-cn-muted/40 focus:border-cn-accent/70 focus:ring-[3px] focus:ring-cn-accent/15 disabled:cursor-not-allowed disabled:opacity-40",
|
|
1409
1409
|
value: e.modelValue,
|
|
1410
1410
|
onChange: r
|
|
1411
|
-
}, [(
|
|
1411
|
+
}, [(P(!0), O(w, null, I(e.field.domain ?? [], (e) => (P(), O("option", {
|
|
1412
1412
|
key: e,
|
|
1413
1413
|
value: e
|
|
1414
|
-
},
|
|
1414
|
+
}, R(e), 9, Jt))), 128))], 40, qt));
|
|
1415
1415
|
}
|
|
1416
|
-
}),
|
|
1416
|
+
}), Xt = ["value", "disabled"], Zt = /* @__PURE__ */ j({
|
|
1417
1417
|
__name: "TextareaField",
|
|
1418
1418
|
props: {
|
|
1419
1419
|
field: {},
|
|
@@ -1436,8 +1436,8 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1436
1436
|
function s(e) {
|
|
1437
1437
|
r = !1, n("change", e.target.value);
|
|
1438
1438
|
}
|
|
1439
|
-
return (t, n) => (
|
|
1440
|
-
class:
|
|
1439
|
+
return (t, n) => (P(), O("textarea", {
|
|
1440
|
+
class: N(["cn-field", z(at)]),
|
|
1441
1441
|
rows: "3",
|
|
1442
1442
|
value: e.modelValue,
|
|
1443
1443
|
disabled: e.disabled,
|
|
@@ -1445,67 +1445,67 @@ var Dt = ["value", "placeholder"], Q = /* @__PURE__ */ M({
|
|
|
1445
1445
|
onCompositionstart: a,
|
|
1446
1446
|
onCompositionend: o,
|
|
1447
1447
|
onChange: s
|
|
1448
|
-
}, null, 42,
|
|
1448
|
+
}, null, 42, Xt));
|
|
1449
1449
|
}
|
|
1450
|
-
}),
|
|
1451
|
-
number:
|
|
1452
|
-
text:
|
|
1453
|
-
textarea:
|
|
1454
|
-
color:
|
|
1455
|
-
select:
|
|
1456
|
-
boolean:
|
|
1457
|
-
pair:
|
|
1458
|
-
anchor:
|
|
1459
|
-
align:
|
|
1460
|
-
padding:
|
|
1461
|
-
border:
|
|
1462
|
-
font:
|
|
1463
|
-
imageSrc:
|
|
1464
|
-
resourceValue:
|
|
1450
|
+
}), Qt = {
|
|
1451
|
+
number: M($),
|
|
1452
|
+
text: M(Q),
|
|
1453
|
+
textarea: M(Zt),
|
|
1454
|
+
color: M(Dt),
|
|
1455
|
+
select: M(Yt),
|
|
1456
|
+
boolean: M(Je),
|
|
1457
|
+
pair: M(Kt),
|
|
1458
|
+
anchor: M(Ge),
|
|
1459
|
+
align: M(Fe),
|
|
1460
|
+
padding: M(Bt),
|
|
1461
|
+
border: M(ht),
|
|
1462
|
+
font: M(xt),
|
|
1463
|
+
imageSrc: M(It),
|
|
1464
|
+
resourceValue: M(At)
|
|
1465
1465
|
};
|
|
1466
1466
|
//#endregion
|
|
1467
1467
|
//#region src/property-panel/usePropertyPanel.ts
|
|
1468
|
-
function
|
|
1469
|
-
let t =
|
|
1468
|
+
function $t(e) {
|
|
1469
|
+
let t = L(e.store.doc), n = L(e.store.ui.selection), r = L(e.store.ui.anchorExpanded), i = L(e.store.ui.dataSourceSchema), a = L(e.store.ui.resourceStatuses), o = L(e.store.ui.editing), s = e.subscribe((s) => {
|
|
1470
1470
|
s.scope === "doc" ? (t.value = e.store.doc, n.value = e.store.ui.selection, a.value = e.store.ui.resourceStatuses, o.value = e.store.ui.editing) : s.scope === "ui" && (s.branch === "selection" ? (n.value = e.store.ui.selection, e.store.closeMerge()) : s.branch === "anchorExpanded" ? r.value = e.store.ui.anchorExpanded : s.branch === "dataSourceSchema" ? i.value = e.store.ui.dataSourceSchema : s.branch === "resourceStatuses" ? a.value = e.store.ui.resourceStatuses : s.branch === "editing" && (o.value = e.store.ui.editing));
|
|
1471
1471
|
});
|
|
1472
|
-
|
|
1473
|
-
let c =
|
|
1472
|
+
me(s, !0);
|
|
1473
|
+
let c = T(() => {
|
|
1474
1474
|
let e = t.value, r = n.value;
|
|
1475
1475
|
return e && r ? p(e, r) : null;
|
|
1476
|
-
}), l =
|
|
1476
|
+
}), l = T(() => t.value), u = T(() => {
|
|
1477
1477
|
let e = c.value, r = n.value;
|
|
1478
|
-
return e && r ?
|
|
1479
|
-
}), d =
|
|
1478
|
+
return e && r ? Ae(r, e) : t.value ? je : [];
|
|
1479
|
+
}), d = T(() => {
|
|
1480
1480
|
let r = n.value;
|
|
1481
1481
|
return r && t.value ? e.layerBoxAt(r) : null;
|
|
1482
|
-
}), f =
|
|
1482
|
+
}), f = T(() => {
|
|
1483
1483
|
let e = i.value;
|
|
1484
|
-
return e === null ? null :
|
|
1485
|
-
}), h =
|
|
1484
|
+
return e === null ? null : se(e, x(e, t.value, n.value));
|
|
1485
|
+
}), h = T(() => ce(le(t.value, n.value, i.value))), g = T(() => n.value?.includes("template") ?? !1), _ = T(() => {
|
|
1486
1486
|
let e = o.value, t = n.value;
|
|
1487
1487
|
return e !== null && t !== null && m(e.path, t);
|
|
1488
1488
|
});
|
|
1489
1489
|
function ee(t) {
|
|
1490
1490
|
e.store.setAnchorExpanded(t);
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1492
|
+
function v(e) {
|
|
1493
1493
|
if (!e.data) return !1;
|
|
1494
1494
|
if (_.value) return o.value?.expression === !0;
|
|
1495
1495
|
let t = c.value;
|
|
1496
1496
|
return t !== null && "expression" in t && t.expression !== null;
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1498
|
+
function y(r, i, a) {
|
|
1499
1499
|
if (!t.value) return;
|
|
1500
1500
|
let o = n.value;
|
|
1501
1501
|
if (!o) {
|
|
1502
|
-
|
|
1502
|
+
te(r, i, a);
|
|
1503
1503
|
return;
|
|
1504
1504
|
}
|
|
1505
|
-
let s =
|
|
1505
|
+
let s = S(o, r.key);
|
|
1506
1506
|
if (r.data) {
|
|
1507
|
-
if (
|
|
1508
|
-
let t =
|
|
1507
|
+
if (v(r)) {
|
|
1508
|
+
let t = S(o, ["data", "expression"]);
|
|
1509
1509
|
e.updateDataExpression(o, i, { mergeKey: t }), a && e.store.closeMerge(t);
|
|
1510
1510
|
return;
|
|
1511
1511
|
}
|
|
@@ -1514,18 +1514,18 @@ function Zt(e) {
|
|
|
1514
1514
|
}
|
|
1515
1515
|
e.updateSpec(o, r.key, i, { mergeKey: s }), a && e.store.closeMerge(s);
|
|
1516
1516
|
}
|
|
1517
|
-
function
|
|
1517
|
+
function b(t) {
|
|
1518
1518
|
let r = n.value;
|
|
1519
1519
|
r && t.data && e.toggleDataMode(r);
|
|
1520
1520
|
}
|
|
1521
|
-
function
|
|
1521
|
+
function te(t, n, r) {
|
|
1522
1522
|
let i = t.key[0];
|
|
1523
1523
|
if (i !== "width" && i !== "height" || typeof n != "number") return;
|
|
1524
1524
|
let a = `canvas:${i}`;
|
|
1525
1525
|
e.updateCanvasProp(i, n, { mergeKey: a }), r && e.store.closeMerge(a);
|
|
1526
1526
|
}
|
|
1527
1527
|
return {
|
|
1528
|
-
selection:
|
|
1528
|
+
selection: T(() => n.value),
|
|
1529
1529
|
layer: c,
|
|
1530
1530
|
canvas: l,
|
|
1531
1531
|
sections: u,
|
|
@@ -1533,26 +1533,26 @@ function Zt(e) {
|
|
|
1533
1533
|
isPreviewBox: g,
|
|
1534
1534
|
completionSource: f,
|
|
1535
1535
|
rowsPathSource: h,
|
|
1536
|
-
resourceStatuses:
|
|
1537
|
-
anchorExpanded:
|
|
1536
|
+
resourceStatuses: T(() => a.value),
|
|
1537
|
+
anchorExpanded: T(() => r.value),
|
|
1538
1538
|
contentLocked: _,
|
|
1539
|
-
editingSession:
|
|
1540
|
-
isDataMarked:
|
|
1541
|
-
commit:
|
|
1542
|
-
toggleDataMode:
|
|
1539
|
+
editingSession: T(() => o.value),
|
|
1540
|
+
isDataMarked: v,
|
|
1541
|
+
commit: y,
|
|
1542
|
+
toggleDataMode: b,
|
|
1543
1543
|
setAnchorExpanded: ee
|
|
1544
1544
|
};
|
|
1545
1545
|
}
|
|
1546
1546
|
//#endregion
|
|
1547
1547
|
//#region src/property-panel/fields/ValueTypeSegmented.vue?vue&type=script&setup=true&lang.ts
|
|
1548
|
-
var
|
|
1548
|
+
var en = ["aria-disabled"], tn = [
|
|
1549
1549
|
"aria-pressed",
|
|
1550
1550
|
"title",
|
|
1551
1551
|
"data-mode-static",
|
|
1552
1552
|
"data-mode-expression",
|
|
1553
1553
|
"disabled",
|
|
1554
1554
|
"onClick"
|
|
1555
|
-
],
|
|
1555
|
+
], nn = /* @__PURE__ */ j({
|
|
1556
1556
|
__name: "ValueTypeSegmented",
|
|
1557
1557
|
props: {
|
|
1558
1558
|
mode: {},
|
|
@@ -1572,27 +1572,30 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1572
1572
|
function a(e) {
|
|
1573
1573
|
n.disabled || e !== n.mode && r("change", e);
|
|
1574
1574
|
}
|
|
1575
|
-
return (t, n) => (
|
|
1576
|
-
class:
|
|
1575
|
+
return (t, n) => (P(), O("span", {
|
|
1576
|
+
class: N(["cn-valuetype flex h-7 shrink-0 items-stretch overflow-hidden rounded-md border border-cn-field-line bg-cn-field", { "opacity-60": e.disabled }]),
|
|
1577
1577
|
role: "group",
|
|
1578
1578
|
"aria-label": "取值方式",
|
|
1579
1579
|
"aria-disabled": e.disabled ? "true" : void 0
|
|
1580
|
-
}, [(
|
|
1580
|
+
}, [(P(), O(w, null, I(i, (t, n) => k("button", {
|
|
1581
1581
|
key: t.value,
|
|
1582
1582
|
type: "button",
|
|
1583
|
-
class:
|
|
1583
|
+
class: N(["cn-valuetype__option flex items-center justify-center p-0 px-1.5 text-[10px] leading-none transition-colors duration-100 focus-visible:z-10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-cn-accent/40", [n > 0 ? "border-l border-cn-field-line" : "", t.value === e.mode ? "cn-valuetype__option--active bg-cn-accent-soft text-cn-accent" : "text-cn-muted hover:text-cn-fg"]]),
|
|
1584
1584
|
"aria-pressed": t.value === e.mode,
|
|
1585
1585
|
title: t.value === e.mode ? t.title : `${t.title};点击切换`,
|
|
1586
1586
|
"data-mode-static": t.value === "static" || void 0,
|
|
1587
1587
|
"data-mode-expression": t.value === "expression" || void 0,
|
|
1588
1588
|
disabled: e.disabled,
|
|
1589
|
-
onClick:
|
|
1590
|
-
},
|
|
1589
|
+
onClick: V((e) => a(t.value), ["prevent"])
|
|
1590
|
+
}, R(t.label), 11, tn)), 64))], 10, en));
|
|
1591
1591
|
}
|
|
1592
|
-
}),
|
|
1592
|
+
}), rn = ["title"], an = {
|
|
1593
1593
|
key: 2,
|
|
1594
1594
|
class: "cn-prop-field__hint col-span-2 block text-[11px] leading-4 text-cn-muted"
|
|
1595
|
-
},
|
|
1595
|
+
}, on = ["title"], sn = {
|
|
1596
|
+
key: 4,
|
|
1597
|
+
class: "cn-prop-field__hint col-span-2 block text-[11px] leading-4 text-cn-muted"
|
|
1598
|
+
}, cn = /* @__PURE__ */ j({
|
|
1596
1599
|
__name: "PropertyField",
|
|
1597
1600
|
props: {
|
|
1598
1601
|
field: {},
|
|
@@ -1611,48 +1614,48 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1611
1614
|
"sub-commit"
|
|
1612
1615
|
],
|
|
1613
1616
|
setup(e, { emit: t }) {
|
|
1614
|
-
let n = e, r = t, i =
|
|
1615
|
-
function
|
|
1617
|
+
let n = e, r = t, i = T(() => Qt[n.field.control]), a = T(() => n.dataMode === "expression"), o = T(() => n.field.control === "pair" ? "cn-prop-field block" : "cn-prop-field grid grid-cols-[60px_minmax(0,1fr)] items-center gap-x-2 gap-y-1.5"), s = T(() => n.field.data === !0 ? "col-span-2" : ""), c = T(() => n.field.data === !0 && n.field.control === "textarea"), l = T(() => n.field.completion === "rowsPath"), u = T(() => c.value || l.value), d = T(() => n.field.resource === !0), f = F(null), p = T(() => n.field.data === !0 && a.value && typeof n.value == "string" ? n.field.resource === !0 ? n.value === "" ? [] : ee(n.value) : c.value ? ne(n.value) : [] : []), m = T(() => p.value.length === 0 ? "" : n.field.resource === !0 ? oe(n.completion != null) : ae(p.value)), h = T(() => n.field.resource === !0 && a.value && n.completion == null && p.value.length === 0 ? te : ""), _ = T(() => n.field.control === "textarea");
|
|
1618
|
+
function v() {
|
|
1616
1619
|
let e = p.value[0], t = f.value?.$el;
|
|
1617
1620
|
e !== void 0 && (t instanceof HTMLTextAreaElement || t instanceof HTMLInputElement) && (t.focus(), t.setSelectionRange(e.at.start, e.at.end));
|
|
1618
1621
|
}
|
|
1619
|
-
let
|
|
1622
|
+
let y = T(() => {
|
|
1620
1623
|
if (!u.value) return null;
|
|
1621
1624
|
let e = f.value?.$el;
|
|
1622
1625
|
return e instanceof HTMLTextAreaElement || e instanceof HTMLInputElement ? e : null;
|
|
1623
|
-
}),
|
|
1624
|
-
target:
|
|
1626
|
+
}), b = F(null), x = T(() => b.value?.rootEl ?? null), { popup: re, accept: S } = ie({
|
|
1627
|
+
target: y,
|
|
1625
1628
|
enabled: () => c.value && a.value && n.completion != null,
|
|
1626
1629
|
pairing: () => c.value && a.value,
|
|
1627
1630
|
resolve: (e) => n.completion?.(e) ?? null,
|
|
1628
|
-
popupEl:
|
|
1629
|
-
}), { popup:
|
|
1630
|
-
target:
|
|
1631
|
+
popupEl: x
|
|
1632
|
+
}), { popup: C, accept: se } = ue({
|
|
1633
|
+
target: y,
|
|
1631
1634
|
enabled: () => l.value && n.completion != null,
|
|
1632
1635
|
resolve: (e) => n.completion?.(e) ?? null,
|
|
1633
|
-
popupEl:
|
|
1636
|
+
popupEl: x
|
|
1634
1637
|
});
|
|
1635
|
-
function
|
|
1638
|
+
function ce(e, t, n) {
|
|
1636
1639
|
r("sub-commit", e, t, n);
|
|
1637
1640
|
}
|
|
1638
|
-
return (t, n) => (
|
|
1639
|
-
default:
|
|
1640
|
-
e.field.control === "pair" ?
|
|
1641
|
+
return (t, n) => (P(), O(w, null, [(P(), E(ge(e.field.control === "pair" || e.field.control === "imageSrc" ? "div" : "label"), { class: N(o.value) }, {
|
|
1642
|
+
default: ye(() => [
|
|
1643
|
+
e.field.control === "pair" ? D("", !0) : (P(), O("span", {
|
|
1641
1644
|
key: 0,
|
|
1642
1645
|
class: "cn-prop-field__label shrink-0 select-none truncate text-[11px] leading-none text-cn-muted",
|
|
1643
1646
|
title: e.field.title
|
|
1644
|
-
},
|
|
1645
|
-
e.field.data ? (
|
|
1647
|
+
}, R(e.field.label), 9, rn)),
|
|
1648
|
+
e.field.data ? (P(), E(nn, {
|
|
1646
1649
|
key: 1,
|
|
1647
1650
|
class: "justify-self-end",
|
|
1648
1651
|
mode: e.dataMode ?? "static",
|
|
1649
1652
|
disabled: e.locked,
|
|
1650
1653
|
onChange: n[0] ||= (e) => r("toggle-mode")
|
|
1651
|
-
}, null, 8, ["mode", "disabled"])) :
|
|
1652
|
-
(
|
|
1654
|
+
}, null, 8, ["mode", "disabled"])) : D("", !0),
|
|
1655
|
+
(P(), E(ge(i.value), {
|
|
1653
1656
|
ref_key: "controlRef",
|
|
1654
1657
|
ref: f,
|
|
1655
|
-
class:
|
|
1658
|
+
class: N(["cn-prop-field__control", [s.value, {
|
|
1656
1659
|
"cn-field--expression": a.value,
|
|
1657
1660
|
"cn-field--invalid": p.value.length > 0
|
|
1658
1661
|
}]]),
|
|
@@ -1665,7 +1668,7 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1665
1668
|
"resource-status": e.field.control === "imageSrc" ? e.resourceStatus : void 0,
|
|
1666
1669
|
onInput: n[1] ||= (e) => r("input", e),
|
|
1667
1670
|
onChange: n[2] ||= (e) => r("change", e),
|
|
1668
|
-
onSubCommit:
|
|
1671
|
+
onSubCommit: ce
|
|
1669
1672
|
}, null, 40, [
|
|
1670
1673
|
"class",
|
|
1671
1674
|
"field",
|
|
@@ -1676,55 +1679,56 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1676
1679
|
"source",
|
|
1677
1680
|
"resource-status"
|
|
1678
1681
|
])),
|
|
1679
|
-
e.hint ? (
|
|
1680
|
-
m.value ? (
|
|
1682
|
+
e.hint ? (P(), O("span", an, R(e.hint), 1)) : D("", !0),
|
|
1683
|
+
m.value ? (P(), O("span", {
|
|
1681
1684
|
key: 3,
|
|
1682
|
-
class:
|
|
1683
|
-
title:
|
|
1684
|
-
onClick:
|
|
1685
|
-
},
|
|
1685
|
+
class: N(["cn-prop-field__hint cn-prop-field__hint--error col-span-2 block text-[11px] leading-4 text-cn-danger", { "cursor-pointer": _.value }]),
|
|
1686
|
+
title: _.value ? "点击选中出错片段" : void 0,
|
|
1687
|
+
onClick: v
|
|
1688
|
+
}, R(m.value), 11, on)) : D("", !0),
|
|
1689
|
+
h.value ? (P(), O("span", sn, R(h.value), 1)) : D("", !0)
|
|
1686
1690
|
]),
|
|
1687
1691
|
_: 1
|
|
1688
|
-
}, 8, ["class"])), c.value ? (
|
|
1692
|
+
}, 8, ["class"])), c.value ? (P(), E(g, {
|
|
1689
1693
|
key: 0,
|
|
1690
1694
|
ref_key: "popupRef",
|
|
1691
|
-
ref:
|
|
1692
|
-
state:
|
|
1693
|
-
onSelect:
|
|
1694
|
-
}, null, 8, ["state", "onSelect"])) : l.value ? (
|
|
1695
|
+
ref: b,
|
|
1696
|
+
state: z(re),
|
|
1697
|
+
onSelect: z(S)
|
|
1698
|
+
}, null, 8, ["state", "onSelect"])) : l.value ? (P(), E(g, {
|
|
1695
1699
|
key: 1,
|
|
1696
1700
|
ref_key: "popupRef",
|
|
1697
|
-
ref:
|
|
1698
|
-
state:
|
|
1699
|
-
onSelect:
|
|
1700
|
-
}, null, 8, ["state", "onSelect"])) :
|
|
1701
|
+
ref: b,
|
|
1702
|
+
state: z(C),
|
|
1703
|
+
onSelect: z(se)
|
|
1704
|
+
}, null, 8, ["state", "onSelect"])) : D("", !0)], 64));
|
|
1701
1705
|
}
|
|
1702
|
-
}),
|
|
1706
|
+
}), ln = { class: "cn-props flex w-[288px] shrink-0 flex-col overflow-y-auto rounded-xl border border-cn-line bg-cn-bg text-cn-fg shadow-[0_16px_40px_-12px_rgba(2,6,23,0.55)]" }, un = { class: "sticky top-0 z-10 border-b border-cn-line bg-cn-bg-elevated/95 px-3.5 py-2.5 backdrop-blur-sm" }, dn = { class: "flex items-center gap-2" }, fn = { class: "inline-flex items-center gap-1.5 rounded border border-cn-accent/25 bg-cn-accent-soft px-1.5 py-0.5 font-mono text-[10px] leading-4 text-cn-accent" }, pn = { class: "text-[12px] font-medium tracking-wide text-cn-fg/90" }, mn = {
|
|
1703
1707
|
key: 0,
|
|
1704
1708
|
class: "mx-3.5 my-4 rounded-lg border border-dashed border-cn-line px-3 py-6 text-center text-[11px] leading-5 text-cn-muted"
|
|
1705
|
-
},
|
|
1709
|
+
}, hn = { class: "cn-props__section-title mb-2 text-[10px] font-semibold uppercase tracking-[0.16em] text-cn-muted" }, gn = { class: "flex flex-col gap-2" }, _n = "内容编辑中:请在画布编辑框内修改,退出后此处更新", vn = /* @__PURE__ */ j({
|
|
1706
1710
|
__name: "PropertyPanel",
|
|
1707
1711
|
props: { editor: {} },
|
|
1708
1712
|
setup(e) {
|
|
1709
|
-
let t = e, n =
|
|
1710
|
-
|
|
1713
|
+
let t = e, n = $t(t.editor);
|
|
1714
|
+
he(Z, {
|
|
1711
1715
|
canUpload: t.editor.canUpload,
|
|
1712
1716
|
uploadImage: (e) => t.editor.uploadImage(e)
|
|
1713
1717
|
});
|
|
1714
1718
|
function r(e) {
|
|
1715
1719
|
return e.completion === "rowsPath" ? n.rowsPathSource.value : n.completionSource.value;
|
|
1716
1720
|
}
|
|
1717
|
-
let i =
|
|
1721
|
+
let i = T(() => n.layer.value !== null), a = T(() => {
|
|
1718
1722
|
let e = n.layer.value;
|
|
1719
1723
|
return e ? e.type : n.canvas.value ? "Canvas" : "—";
|
|
1720
|
-
}), o =
|
|
1724
|
+
}), o = T(() => {
|
|
1721
1725
|
let e = n.layer.value ?? (n.selection.value ? null : n.canvas.value);
|
|
1722
1726
|
if (!e) return [];
|
|
1723
1727
|
let t = n.selection.value?.join(".") ?? "canvas", r = n.layer.value, i = n.resourceStatuses.value, a = [];
|
|
1724
1728
|
for (let o of n.sections.value) {
|
|
1725
1729
|
let s = [];
|
|
1726
1730
|
for (let a of o.fields) {
|
|
1727
|
-
let o =
|
|
1731
|
+
let o = K(e, a.key);
|
|
1728
1732
|
if (!o.ok) continue;
|
|
1729
1733
|
let c = n.contentLocked.value && a.data === !0;
|
|
1730
1734
|
s.push({
|
|
@@ -1733,7 +1737,7 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1733
1737
|
value: o.value,
|
|
1734
1738
|
dataMode: a.data ? n.isDataMarked(a) ? "expression" : "static" : void 0,
|
|
1735
1739
|
locked: c,
|
|
1736
|
-
hint: c ?
|
|
1740
|
+
hint: c ? _n : a.hint && r ? a.hint(r, i) ?? void 0 : void 0,
|
|
1737
1741
|
resourceStatus: a.control === "imageSrc" && typeof o.value == "string" && o.value !== "" ? i[o.value] : void 0
|
|
1738
1742
|
});
|
|
1739
1743
|
}
|
|
@@ -1743,14 +1747,14 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1743
1747
|
});
|
|
1744
1748
|
}
|
|
1745
1749
|
return a;
|
|
1746
|
-
}), s =
|
|
1750
|
+
}), s = T(() => {
|
|
1747
1751
|
let e = {}, t = n.layerBox.value, r = n.layer.value;
|
|
1748
1752
|
if (!t || !r) return e;
|
|
1749
1753
|
let i = /* @__PURE__ */ new Map();
|
|
1750
1754
|
if (r.shape.autoWidth && i.set("autoWidth", Math.round(t.width * 100) / 100), r.shape.autoHeight && i.set("autoHeight", Math.round(t.height * 100) / 100), i.size === 0) return e;
|
|
1751
1755
|
for (let t of n.sections.value) for (let r of t.fields) for (let t of r.items ?? []) {
|
|
1752
1756
|
let a = t.auto ? i.get(t.auto.key.join(".")) : void 0;
|
|
1753
|
-
a !== void 0 && (e[
|
|
1757
|
+
a !== void 0 && (e[G(r, t).join(".")] = {
|
|
1754
1758
|
value: a,
|
|
1755
1759
|
preview: n.isPreviewBox.value
|
|
1756
1760
|
});
|
|
@@ -1760,28 +1764,28 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1760
1764
|
function c() {
|
|
1761
1765
|
n.setAnchorExpanded(!n.anchorExpanded.value);
|
|
1762
1766
|
}
|
|
1763
|
-
return (e, t) => (
|
|
1764
|
-
|
|
1767
|
+
return (e, t) => (P(), O("aside", ln, [
|
|
1768
|
+
k("header", un, [k("div", dn, [k("span", fn, [t[0] ||= k("i", {
|
|
1765
1769
|
class: "size-1.5 rounded-full bg-cn-accent",
|
|
1766
1770
|
"aria-hidden": "true"
|
|
1767
|
-
}, null, -1),
|
|
1768
|
-
o.value.length === 0 ? (
|
|
1769
|
-
(
|
|
1771
|
+
}, null, -1), de(" " + R(a.value), 1)]), k("span", pn, R(i.value ? "图层属性" : "画布属性"), 1)])]),
|
|
1772
|
+
o.value.length === 0 ? (P(), O("p", mn, " 打开文档后可编辑属性 ")) : D("", !0),
|
|
1773
|
+
(P(!0), O(w, null, I(o.value, (e) => (P(), O("section", {
|
|
1770
1774
|
key: e.title,
|
|
1771
1775
|
class: "cn-props__section border-b border-cn-line/70 px-3.5 py-3 last:border-b-0"
|
|
1772
|
-
}, [
|
|
1776
|
+
}, [k("h3", hn, R(e.title), 1), k("div", gn, [(P(!0), O(w, null, I(e.fields, (e) => (P(), O(w, { key: e.key }, [e.field.control === "anchor" ? (P(), E(Ge, {
|
|
1773
1777
|
key: 0,
|
|
1774
1778
|
field: e.field,
|
|
1775
1779
|
"model-value": e.value,
|
|
1776
|
-
expanded:
|
|
1777
|
-
onChange: (t) =>
|
|
1780
|
+
expanded: z(n).anchorExpanded.value,
|
|
1781
|
+
onChange: (t) => z(n).commit(e.field, t, !0),
|
|
1778
1782
|
onToggle: c
|
|
1779
1783
|
}, null, 8, [
|
|
1780
1784
|
"field",
|
|
1781
1785
|
"model-value",
|
|
1782
1786
|
"expanded",
|
|
1783
1787
|
"onChange"
|
|
1784
|
-
])) : (
|
|
1788
|
+
])) : (P(), E(cn, {
|
|
1785
1789
|
key: 1,
|
|
1786
1790
|
field: e.field,
|
|
1787
1791
|
value: e.value,
|
|
@@ -1791,10 +1795,10 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1791
1795
|
completion: r(e.field),
|
|
1792
1796
|
displays: s.value,
|
|
1793
1797
|
"resource-status": e.resourceStatus,
|
|
1794
|
-
onInput: (t) =>
|
|
1795
|
-
onChange: (t) =>
|
|
1796
|
-
onToggleMode: (t) =>
|
|
1797
|
-
onSubCommit:
|
|
1798
|
+
onInput: (t) => z(n).commit(e.field, t, !1),
|
|
1799
|
+
onChange: (t) => z(n).commit(e.field, t, !0),
|
|
1800
|
+
onToggleMode: (t) => z(n).toggleDataMode(e.field),
|
|
1801
|
+
onSubCommit: z(n).commit
|
|
1798
1802
|
}, null, 8, [
|
|
1799
1803
|
"field",
|
|
1800
1804
|
"value",
|
|
@@ -1813,4 +1817,4 @@ var Qt = ["aria-disabled"], $t = [
|
|
|
1813
1817
|
}
|
|
1814
1818
|
});
|
|
1815
1819
|
//#endregion
|
|
1816
|
-
export { Z as a,
|
|
1820
|
+
export { Z as a, Ee as c, Oe as d, K as f, Qt as i, Ae as l, cn as n, Ot as o, $t as r, je as s, vn as t, De as u };
|