@aham.ro/ui-designer 0.1.11 → 0.1.12
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/Designer.vue.d.ts +1 -6
- package/dist/stores/translations.d.ts +2 -0
- package/dist/ui-designer.css +1 -1
- package/dist/ui-designer.js +327 -350
- package/dist/widgets/Header.vue.d.ts +3 -0
- package/dist/widgets/Workspace.vue.d.ts +2 -2
- package/package.json +4 -1
- package/dist/widgets/SideInfo.vue.d.ts +0 -7
package/dist/ui-designer.js
CHANGED
|
@@ -56,6 +56,15 @@ var H = B("translations", {
|
|
|
56
56
|
},
|
|
57
57
|
clear() {
|
|
58
58
|
this.items = [];
|
|
59
|
+
},
|
|
60
|
+
exportData() {
|
|
61
|
+
return this.items.map((e) => ({
|
|
62
|
+
...e,
|
|
63
|
+
translations: { ...e.translations }
|
|
64
|
+
}));
|
|
65
|
+
},
|
|
66
|
+
importData(e) {
|
|
67
|
+
this.items = e.map((e) => V(e));
|
|
59
68
|
}
|
|
60
69
|
}
|
|
61
70
|
}), U = B("theme", {
|
|
@@ -97,70 +106,70 @@ function W(e, t) {
|
|
|
97
106
|
function ee(e, t) {
|
|
98
107
|
return e.id === t || !!e.children?.some((e) => ee(e, t));
|
|
99
108
|
}
|
|
100
|
-
function
|
|
109
|
+
function G(e, t) {
|
|
101
110
|
if (e.some((e) => e.id === t)) return e;
|
|
102
111
|
for (let n of e) {
|
|
103
|
-
let e = n.children &&
|
|
112
|
+
let e = n.children && G(n.children, t);
|
|
104
113
|
if (e) return e;
|
|
105
114
|
}
|
|
106
115
|
}
|
|
107
|
-
function
|
|
116
|
+
function te(e, t, n = 1) {
|
|
108
117
|
for (let r of e) {
|
|
109
118
|
if (r.id === t) return n;
|
|
110
|
-
let e = r.children &&
|
|
119
|
+
let e = r.children && te(r.children, t, n + 1);
|
|
111
120
|
if (e !== void 0) return e;
|
|
112
121
|
}
|
|
113
122
|
}
|
|
114
|
-
function
|
|
123
|
+
function ne(e) {
|
|
115
124
|
return `document-${e ?? "default"}`;
|
|
116
125
|
}
|
|
117
|
-
function
|
|
126
|
+
function K(e) {
|
|
118
127
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
119
128
|
}
|
|
120
|
-
function
|
|
121
|
-
return
|
|
129
|
+
function re(e) {
|
|
130
|
+
return K(e) && K(e.phone) && K(e.tablet) && K(e.desktop);
|
|
122
131
|
}
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
125
|
-
let t =
|
|
132
|
+
function ie(e) {
|
|
133
|
+
if (re(e)) return e;
|
|
134
|
+
let t = K(e) ? e : {};
|
|
126
135
|
return {
|
|
127
136
|
phone: { ...t },
|
|
128
137
|
tablet: { ...t },
|
|
129
138
|
desktop: { ...t }
|
|
130
139
|
};
|
|
131
140
|
}
|
|
132
|
-
function
|
|
141
|
+
function ae(e, t) {
|
|
133
142
|
return {
|
|
134
143
|
...e.props.base,
|
|
135
144
|
...e.props[t] ?? {}
|
|
136
145
|
};
|
|
137
146
|
}
|
|
138
|
-
function
|
|
139
|
-
return
|
|
147
|
+
function oe(e) {
|
|
148
|
+
return K(e) && K(e.base) ? {
|
|
140
149
|
base: e.base,
|
|
141
|
-
...
|
|
142
|
-
...
|
|
143
|
-
...
|
|
144
|
-
} : { base:
|
|
150
|
+
...K(e.phone) ? { phone: e.phone } : {},
|
|
151
|
+
...K(e.tablet) ? { tablet: e.tablet } : {},
|
|
152
|
+
...K(e.desktop) ? { desktop: e.desktop } : {}
|
|
153
|
+
} : { base: K(e) ? e : {} };
|
|
145
154
|
}
|
|
146
|
-
function
|
|
155
|
+
function se(e) {
|
|
147
156
|
let { deviceProps: t, ...n } = e;
|
|
148
157
|
return {
|
|
149
158
|
...n,
|
|
150
159
|
props: {
|
|
151
|
-
...
|
|
160
|
+
...oe(e.props),
|
|
152
161
|
...t ?? {}
|
|
153
162
|
},
|
|
154
|
-
...e.children ? { children: e.children.map(
|
|
163
|
+
...e.children ? { children: e.children.map(se) } : {}
|
|
155
164
|
};
|
|
156
165
|
}
|
|
157
|
-
function
|
|
158
|
-
return !
|
|
166
|
+
function ce(e) {
|
|
167
|
+
return !K(e) || typeof e.id != "string" || typeof e.type != "string" || !K(e.props) ? !1 : e.children === void 0 || Array.isArray(e.children) && e.children.every(ce);
|
|
159
168
|
}
|
|
160
|
-
function
|
|
161
|
-
return
|
|
169
|
+
function le(e) {
|
|
170
|
+
return K(e) && Array.isArray(e.templates) && e.templates.every((e) => K(e) && e.version === 1 && typeof e.templateId == "string" && typeof e.templateName == "string" && Array.isArray(e.components) && e.components.every(ce) && (re(e.documentProps) || K(e.documentProps)));
|
|
162
171
|
}
|
|
163
|
-
var
|
|
172
|
+
var ue = B("workspace", {
|
|
164
173
|
state: () => ({
|
|
165
174
|
components: [],
|
|
166
175
|
selectedId: void 0,
|
|
@@ -178,9 +187,9 @@ var de = B("workspace", {
|
|
|
178
187
|
let t = W(e.components, e.selectedId);
|
|
179
188
|
if (t) return {
|
|
180
189
|
...t,
|
|
181
|
-
props: { base:
|
|
190
|
+
props: { base: ae(t, e.activeDevice) }
|
|
182
191
|
};
|
|
183
|
-
if (e.selectedId ===
|
|
192
|
+
if (e.selectedId === ne(e.activeTemplateId)) return {
|
|
184
193
|
id: e.selectedId,
|
|
185
194
|
type: "document",
|
|
186
195
|
props: { base: e.documentProps[e.activeTemplateId ?? "default"]?.[e.activeDevice] ?? {} }
|
|
@@ -198,30 +207,30 @@ var de = B("workspace", {
|
|
|
198
207
|
let r = {
|
|
199
208
|
id: `${e}-${Date.now()}-${this.components.length}`,
|
|
200
209
|
type: e,
|
|
201
|
-
props:
|
|
210
|
+
props: oe(n)
|
|
202
211
|
};
|
|
203
212
|
return t === void 0 || t >= this.components.length ? this.components.push(r) : this.components.splice(Math.max(0, t), 0, r), this.selectedId = r.id, r;
|
|
204
213
|
},
|
|
205
214
|
selectDocument() {
|
|
206
|
-
this.selectedId =
|
|
215
|
+
this.selectedId = ne(this.activeTemplateId);
|
|
207
216
|
},
|
|
208
217
|
addChildComponent(e, t, n = {}) {
|
|
209
|
-
let r = this.findComponent(e), i =
|
|
218
|
+
let r = this.findComponent(e), i = te(this.components, e);
|
|
210
219
|
if (!r || i === void 0 || i >= 10) return;
|
|
211
220
|
let a = {
|
|
212
221
|
id: `${t}-${Date.now()}-${r.children?.length ?? 0}`,
|
|
213
222
|
type: t,
|
|
214
|
-
props:
|
|
223
|
+
props: oe(n)
|
|
215
224
|
};
|
|
216
225
|
return (r.children ??= []).push(a), this.selectedId = a.id, a;
|
|
217
226
|
},
|
|
218
227
|
canAddChild(e) {
|
|
219
|
-
let t =
|
|
228
|
+
let t = te(this.components, e);
|
|
220
229
|
return t !== void 0 && t < 10;
|
|
221
230
|
},
|
|
222
231
|
updateComponentProps(e, t) {
|
|
223
|
-
if (e ===
|
|
224
|
-
let e = this.activeTemplateId ?? "default", n = this.documentProps[e] ??
|
|
232
|
+
if (e === ne(this.activeTemplateId)) {
|
|
233
|
+
let e = this.activeTemplateId ?? "default", n = this.documentProps[e] ?? ie({});
|
|
225
234
|
this.documentProps[e] = {
|
|
226
235
|
...n,
|
|
227
236
|
[this.activeDevice]: {
|
|
@@ -241,7 +250,7 @@ var de = B("workspace", {
|
|
|
241
250
|
});
|
|
242
251
|
},
|
|
243
252
|
getComponentProps(e) {
|
|
244
|
-
return
|
|
253
|
+
return ae(e, this.activeDevice);
|
|
245
254
|
},
|
|
246
255
|
selectComponent(e) {
|
|
247
256
|
let t = this.components[e];
|
|
@@ -264,14 +273,14 @@ var de = B("workspace", {
|
|
|
264
273
|
},
|
|
265
274
|
moveComponentBefore(e, t) {
|
|
266
275
|
if (e === t) return;
|
|
267
|
-
let n = W(this.components, e), r = W(this.components, t), i =
|
|
276
|
+
let n = W(this.components, e), r = W(this.components, t), i = G(this.components, e), a = G(this.components, t);
|
|
268
277
|
if (!n || !r || !i || !a || ee(n, t)) return;
|
|
269
278
|
i.splice(i.indexOf(n), 1);
|
|
270
279
|
let o = a.indexOf(r);
|
|
271
280
|
a.splice(o < 0 ? a.length : o, 0, n);
|
|
272
281
|
},
|
|
273
282
|
moveComponentToRoot(e, t) {
|
|
274
|
-
let n = W(this.components, e), r =
|
|
283
|
+
let n = W(this.components, e), r = G(this.components, e);
|
|
275
284
|
if (!n || !r || r === this.components) return;
|
|
276
285
|
r.splice(r.indexOf(n), 1);
|
|
277
286
|
let i = Math.min(t ?? this.components.length, this.components.length);
|
|
@@ -279,7 +288,7 @@ var de = B("workspace", {
|
|
|
279
288
|
},
|
|
280
289
|
moveComponentInto(e, t) {
|
|
281
290
|
if (e === t) return;
|
|
282
|
-
let n = W(this.components, e), r = W(this.components, t), i =
|
|
291
|
+
let n = W(this.components, e), r = W(this.components, t), i = G(this.components, e);
|
|
283
292
|
n && r && i && !ee(n, t) && (i.splice(i.indexOf(n), 1), (r.children ??= []).push(n), this.selectedId = n.id);
|
|
284
293
|
},
|
|
285
294
|
remove(e) {
|
|
@@ -295,11 +304,11 @@ var de = B("workspace", {
|
|
|
295
304
|
templateId: e,
|
|
296
305
|
templateName: e === this.activeTemplateId ? this.activeTemplateName : this.templateNames[e] ?? e,
|
|
297
306
|
components: t,
|
|
298
|
-
documentProps: this.documentProps[e] ??
|
|
307
|
+
documentProps: this.documentProps[e] ?? ie({})
|
|
299
308
|
})) };
|
|
300
309
|
},
|
|
301
310
|
importData(e) {
|
|
302
|
-
let t = Object.fromEntries(e.templates.map((e) => [e.templateId, e.components.map(
|
|
311
|
+
let t = Object.fromEntries(e.templates.map((e) => [e.templateId, e.components.map(se)])), n = Object.fromEntries(e.templates.map((e) => [e.templateId, ie(e.documentProps)]));
|
|
303
312
|
this.templateComponents = t, this.templateNames = Object.fromEntries(e.templates.map((e) => [e.templateId, e.templateName])), this.documentProps = n;
|
|
304
313
|
let r = e.templates.find((e) => e.templateId === this.activeTemplateId) ?? e.templates[0];
|
|
305
314
|
r ? (this.activeTemplateId = r.templateId, this.activeTemplateName = r.templateName, this.components = r.components) : (this.components = [], this.selectedId = void 0), this.selectedId = void 0;
|
|
@@ -312,7 +321,7 @@ var de = B("workspace", {
|
|
|
312
321
|
});
|
|
313
322
|
//#endregion
|
|
314
323
|
//#region src/composables/useTranslation.ts
|
|
315
|
-
function
|
|
324
|
+
function de() {
|
|
316
325
|
let e = f()?.appContext.config.globalProperties, t = e?.$t, n = typeof t == "function" ? t.bind(e) : void 0;
|
|
317
326
|
return (e, t) => {
|
|
318
327
|
let r = n?.(e);
|
|
@@ -1220,17 +1229,17 @@ var ar = "os-trinsic-observer", or = "os-theme-none", sr = "os-scrollbar", cr =
|
|
|
1220
1229
|
return [
|
|
1221
1230
|
() => Y(Ke, J(B, E())),
|
|
1222
1231
|
({ Dt: e, It: t, Zt: n, tn: a }) => {
|
|
1223
|
-
let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = Ur(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, I] = e("scrollbars.theme"), [L, R] = e("scrollbars.visibility"), [B, H] = e("scrollbars.autoHide"), [U, W] = e("scrollbars.autoHideSuspend"), [ee] = e("scrollbars.autoHideDelay"), [
|
|
1232
|
+
let { nn: o, sn: s, en: m, cn: g } = a || {}, { Ct: _, ft: v } = n || {}, { B: y } = r, { M: b, P: S } = Ur(), { rn: C, j: w } = i, [T, E] = e("showNativeOverlaidScrollbars"), [D, I] = e("scrollbars.theme"), [L, R] = e("scrollbars.visibility"), [B, H] = e("scrollbars.autoHide"), [U, W] = e("scrollbars.autoHideSuspend"), [ee] = e("scrollbars.autoHideDelay"), [G, te] = e("scrollbars.dragScroll"), [ne, K] = e("scrollbars.clickScroll"), [re, ie] = e("overflow"), ae = v && !t, oe = o || s || g || _ || t, se = m || R || ie, ce = T && b.x && b.y, le = !S && !V, ue = ce || le, de = (e, t, n) => {
|
|
1224
1233
|
let r = e.includes(ot) && (L === it || L === "auto" && t === ot);
|
|
1225
1234
|
return A(pr, r, n), r;
|
|
1226
1235
|
};
|
|
1227
|
-
if (p = ee, (E ||
|
|
1236
|
+
if (p = ee, (E || le) && A(or, ue), I && (A(d), A(D, !0), d = D), (W || ae) && (z(!U), ae && U && (w.x || w.y ? (f(), x((() => {
|
|
1228
1237
|
f = Z(O, ot, h(Y(z, !0)), { A: !0 });
|
|
1229
|
-
}))) : z(!0))), H && (c = B === "move", l = B === "leave", u = B === "never", F(u, !0)),
|
|
1230
|
-
let e =
|
|
1238
|
+
}))) : z(!0))), H && (c = B === "move", l = B === "leave", u = B === "never", F(u, !0)), te && A(xr, G), K && A(br, !!ne), se) {
|
|
1239
|
+
let e = de(re.x, C.x, !0), t = de(re.y, C.y, !1);
|
|
1231
1240
|
A(mr, !(e && t));
|
|
1232
1241
|
}
|
|
1233
|
-
|
|
1242
|
+
oe && (M(), j(), P(), g && N(), A(gr, !w.x, !0), A(gr, !w.y, !1), A(cr, y && !k));
|
|
1234
1243
|
},
|
|
1235
1244
|
{},
|
|
1236
1245
|
T
|
|
@@ -1269,7 +1278,7 @@ var ar = "os-trinsic-observer", or = "os-theme-none", sr = "os-scrollbar", cr =
|
|
|
1269
1278
|
B,
|
|
1270
1279
|
z,
|
|
1271
1280
|
R
|
|
1272
|
-
].find(((e) => e && !P(e)))), ee = E ? R : H || V,
|
|
1281
|
+
].find(((e) => e && !P(e)))), ee = E ? R : H || V, G = Y(Ke, U);
|
|
1273
1282
|
return [
|
|
1274
1283
|
L,
|
|
1275
1284
|
() => {
|
|
@@ -1282,9 +1291,9 @@ var ar = "os-trinsic-observer", or = "os-theme-none", sr = "os-scrollbar", cr =
|
|
|
1282
1291
|
return wt(z, Wn, T ? "" : Gn), wt(B, er, ""), wt(V, Kn, ""), wt(H, tr, ""), T || (wt(V, a, o || "-1"), m && wt(g, Un, "")), Wt(ee, W), Wt(z, B), Wt(B || z, !T && V), Wt(V, H), J(U, [s, () => {
|
|
1283
1292
|
let e = Vt(), t = P(V), n = t && e === V ? R : e, s = i(n);
|
|
1284
1293
|
Tt(B, er), Tt(H, tr), Tt(V, Kn), m && Tt(g, Un), o ? wt(V, a, o) : Tt(V, a), P(H) && r(H), t && r(V), P(B) && r(B), On(n), s();
|
|
1285
|
-
}]), n && !T && (Ot(V, Kn, Qn), J(U, Y(Tt, V, Kn))), On(!T && m && t === R && e.top === e ? V : t), s(), W = 0,
|
|
1294
|
+
}]), n && !T && (Ot(V, Kn, Qn), J(U, Y(Tt, V, Kn))), On(!T && m && t === R && e.top === e ? V : t), s(), W = 0, G;
|
|
1286
1295
|
},
|
|
1287
|
-
|
|
1296
|
+
G
|
|
1288
1297
|
];
|
|
1289
1298
|
}, ii = ({ ht: e }) => ({ Zt: t, fn: n, It: r }) => {
|
|
1290
1299
|
let { $t: i } = t || {}, { Ot: a } = n;
|
|
@@ -1422,39 +1431,39 @@ var ar = "os-trinsic-observer", or = "os-theme-none", sr = "os-scrollbar", cr =
|
|
|
1422
1431
|
o: wn()
|
|
1423
1432
|
}), R = In(Or), z = (e, t) => `${t ? qn : Jn}${st(e)}`;
|
|
1424
1433
|
return ({ Dt: o, Zt: s, fn: c, It: l }, { dn: h }) => {
|
|
1425
|
-
let { _t: g, Ht: _, xt: v, Ct: z, ft: B, Et: V } = s || {}, { X: H, Y: U, W } = R && R.R(e, t, c, n, o) || {}, [ee,
|
|
1426
|
-
if (
|
|
1434
|
+
let { _t: g, Ht: _, xt: v, Ct: z, ft: B, Et: V } = s || {}, { X: H, Y: U, W } = R && R.R(e, t, c, n, o) || {}, [ee, G] = Cr(o, n), [te, ne] = o("overflow"), K = wr(te.x), re = wr(te.y), ie = g || h || v || z || V || G, ae = E(l), oe = O(l), se = A(l), ce = N(l);
|
|
1435
|
+
if (G && f && u(Qn, !ee), ie) {
|
|
1427
1436
|
At(r, Wn, Hn) && y(!0);
|
|
1428
|
-
let e = U && U(), [t] =
|
|
1437
|
+
let e = U && U(), [t] = ae = T(l), [n] = oe = D(l), i = dn(a), o = p && ln(d()), s = {
|
|
1429
1438
|
w: m(n.w + t.w),
|
|
1430
1439
|
h: m(n.h + t.h)
|
|
1431
1440
|
}, c = {
|
|
1432
1441
|
w: m((o ? o.w : i.w + m(i.w - n.w)) + t.w),
|
|
1433
1442
|
h: m((o ? o.h : i.h + m(i.h - n.h)) + t.h)
|
|
1434
1443
|
};
|
|
1435
|
-
e && e(),
|
|
1444
|
+
e && e(), ce = M(c), se = k(S(s, c), l);
|
|
1436
1445
|
}
|
|
1437
|
-
let [
|
|
1438
|
-
x:
|
|
1439
|
-
y:
|
|
1440
|
-
}), ve =
|
|
1446
|
+
let [le, ue] = ce, [de, fe] = se, [pe, me] = oe, [he, ge] = ae, [_e] = j({
|
|
1447
|
+
x: de.w > 0,
|
|
1448
|
+
y: de.h > 0
|
|
1449
|
+
}), ve = K && re && (_e.x || _e.y) || K && _e.x && !_e.y || re && _e.y && !_e.x, ye = h || z || V || ge || me || ue || fe || ne || G || ie || _ && p, [be] = o("update.flowDirectionStyles"), [xe, Se] = F(be ? be(a) || {} : b(), l), [Ce, we] = z || B || Se || l ? I(x(xe, !!be), l) : L(), Te = C(_e, te);
|
|
1441
1450
|
y(!1), ye && (w(Te), Te = Dr(a, _e), W && H && (H(Te, pe, he), tn(a, W(Te))));
|
|
1442
1451
|
let [Ee, De] = P(Te);
|
|
1443
1452
|
return kt(r, Wn, Hn, ve), kt(i, er, Hn, ve), X(t, {
|
|
1444
1453
|
rn: Ee,
|
|
1445
1454
|
Vt: {
|
|
1446
|
-
x:
|
|
1447
|
-
y:
|
|
1455
|
+
x: le.w,
|
|
1456
|
+
y: le.h
|
|
1448
1457
|
},
|
|
1449
1458
|
Rt: {
|
|
1450
|
-
x:
|
|
1451
|
-
y:
|
|
1459
|
+
x: de.w,
|
|
1460
|
+
y: de.h
|
|
1452
1461
|
},
|
|
1453
1462
|
j: _e,
|
|
1454
|
-
Tt: Tn(Ce,
|
|
1463
|
+
Tt: Tn(Ce, de)
|
|
1455
1464
|
}), {
|
|
1456
1465
|
en: De,
|
|
1457
|
-
nn:
|
|
1466
|
+
nn: ue,
|
|
1458
1467
|
sn: fe,
|
|
1459
1468
|
cn: we || fe
|
|
1460
1469
|
};
|
|
@@ -1887,7 +1896,7 @@ var mi = () => {
|
|
|
1887
1896
|
__name: "ComponenList",
|
|
1888
1897
|
emits: ["select"],
|
|
1889
1898
|
setup(t, { emit: n }) {
|
|
1890
|
-
let i = n, a =
|
|
1899
|
+
let i = n, a = de(), c = C(""), d = C(), f = {
|
|
1891
1900
|
overflow: {
|
|
1892
1901
|
x: "hidden",
|
|
1893
1902
|
y: "scroll"
|
|
@@ -2166,7 +2175,7 @@ var mi = () => {
|
|
|
2166
2175
|
let c = r, l = C(!1), u = C(), d = C(), f = C(), p = C({
|
|
2167
2176
|
top: 0,
|
|
2168
2177
|
right: 0
|
|
2169
|
-
}), h =
|
|
2178
|
+
}), h = de()("tooltip-sidebar-more", "More");
|
|
2170
2179
|
function g() {
|
|
2171
2180
|
if (!d.value) return;
|
|
2172
2181
|
let e = d.value.getBoundingClientRect();
|
|
@@ -2247,7 +2256,7 @@ var mi = () => {
|
|
|
2247
2256
|
}
|
|
2248
2257
|
},
|
|
2249
2258
|
setup(e) {
|
|
2250
|
-
let t =
|
|
2259
|
+
let t = de();
|
|
2251
2260
|
return (n, r) => (x(), o("button", {
|
|
2252
2261
|
class: "save-button",
|
|
2253
2262
|
type: "button",
|
|
@@ -2263,6 +2272,7 @@ var mi = () => {
|
|
|
2263
2272
|
darkModeChangeable: { type: Boolean },
|
|
2264
2273
|
moreItems: {},
|
|
2265
2274
|
darkMode: { type: Boolean },
|
|
2275
|
+
contentDarkMode: { type: Boolean },
|
|
2266
2276
|
translationsOpen: { type: Boolean },
|
|
2267
2277
|
themeOpen: { type: Boolean },
|
|
2268
2278
|
previewOpen: { type: Boolean }
|
|
@@ -2270,14 +2280,18 @@ var mi = () => {
|
|
|
2270
2280
|
emits: [
|
|
2271
2281
|
"moreSelect",
|
|
2272
2282
|
"toggleTheme",
|
|
2283
|
+
"toggleContentTheme",
|
|
2273
2284
|
"toggleTranslations",
|
|
2274
2285
|
"toggleThemePanel",
|
|
2275
2286
|
"togglePreview"
|
|
2276
2287
|
],
|
|
2277
2288
|
setup(e, { emit: t }) {
|
|
2278
|
-
let n = e, r = t, c =
|
|
2279
|
-
|
|
2280
|
-
|
|
2289
|
+
let n = e, r = t, c = de();
|
|
2290
|
+
function l() {
|
|
2291
|
+
n.previewOpen ? r("toggleContentTheme") : r("toggleTheme");
|
|
2292
|
+
}
|
|
2293
|
+
return (t, d) => (x(), o("header", null, [
|
|
2294
|
+
s("div", Bi, [d[4] ||= s("span", { class: "icon" }, "design_services", -1), s("span", Vi, A(M(c)("designer", "Designer")), 1)]),
|
|
2281
2295
|
s("div", Hi, [s("span", Ui, A(e.subject), 1), e.shared ? (x(), o("span", {
|
|
2282
2296
|
key: 0,
|
|
2283
2297
|
class: "shared icon",
|
|
@@ -2289,26 +2303,26 @@ var mi = () => {
|
|
|
2289
2303
|
icon: "translate",
|
|
2290
2304
|
title: M(c)("translations", "Translations"),
|
|
2291
2305
|
active: n.translationsOpen,
|
|
2292
|
-
onClick:
|
|
2306
|
+
onClick: d[0] ||= (e) => r("toggleTranslations")
|
|
2293
2307
|
}, null, 8, ["title", "active"])),
|
|
2294
2308
|
n.previewOpen ? a("", !0) : (x(), i(Mi, {
|
|
2295
2309
|
key: 1,
|
|
2296
2310
|
icon: "format_paint",
|
|
2297
2311
|
title: M(c)("change-theme", "Change theme"),
|
|
2298
2312
|
active: n.themeOpen,
|
|
2299
|
-
onClick:
|
|
2313
|
+
onClick: d[1] ||= (e) => r("toggleThemePanel")
|
|
2300
2314
|
}, null, 8, ["title", "active"])),
|
|
2301
2315
|
n.previewOpen || n.darkModeChangeable !== !1 ? (x(), i(Mi, {
|
|
2302
2316
|
key: 2,
|
|
2303
|
-
icon: n.darkMode ? "light_mode" : "dark_mode",
|
|
2317
|
+
icon: (n.previewOpen ? n.contentDarkMode : n.darkMode) ? "light_mode" : "dark_mode",
|
|
2304
2318
|
title: M(c)("toggle-theme", "Toggle theme"),
|
|
2305
|
-
onClick: l
|
|
2319
|
+
onClick: l
|
|
2306
2320
|
}, null, 8, ["icon", "title"])) : a("", !0),
|
|
2307
2321
|
u(Mi, {
|
|
2308
2322
|
icon: n.previewOpen ? "close" : "visibility",
|
|
2309
2323
|
title: M(c)(n.previewOpen ? "exit-preview" : "preview", n.previewOpen ? "Exit preview" : "Preview"),
|
|
2310
2324
|
active: n.previewOpen,
|
|
2311
|
-
onClick:
|
|
2325
|
+
onClick: d[2] ||= (e) => r("togglePreview")
|
|
2312
2326
|
}, null, 8, [
|
|
2313
2327
|
"icon",
|
|
2314
2328
|
"title",
|
|
@@ -2320,12 +2334,12 @@ var mi = () => {
|
|
|
2320
2334
|
}),
|
|
2321
2335
|
u(Ii, {
|
|
2322
2336
|
items: n.moreItems,
|
|
2323
|
-
onSelect:
|
|
2337
|
+
onSelect: d[3] ||= (e) => r("moreSelect", e)
|
|
2324
2338
|
}, null, 8, ["items"])
|
|
2325
2339
|
])
|
|
2326
2340
|
]));
|
|
2327
2341
|
}
|
|
2328
|
-
}), [["__scopeId", "data-v-
|
|
2342
|
+
}), [["__scopeId", "data-v-009556cc"]]), qi = ["value"], Ji = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
2329
2343
|
__name: "ColorPicker",
|
|
2330
2344
|
props: {
|
|
2331
2345
|
value: {},
|
|
@@ -3540,7 +3554,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3540
3554
|
"moveIntoLayer"
|
|
3541
3555
|
],
|
|
3542
3556
|
setup(t, { emit: n }) {
|
|
3543
|
-
let c = t, u = n, d = H(), f = U(), p =
|
|
3557
|
+
let c = t, u = n, d = H(), f = U(), p = de(), m = C(), g = C(), b = C(30), S = C(), T = !1, E = {
|
|
3544
3558
|
overflow: {
|
|
3545
3559
|
x: "auto",
|
|
3546
3560
|
y: "auto"
|
|
@@ -3602,7 +3616,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3602
3616
|
function ee() {
|
|
3603
3617
|
T && (T = !1, document.body.style.removeProperty("cursor"), document.removeEventListener("pointermove", W), document.removeEventListener("pointerup", ee));
|
|
3604
3618
|
}
|
|
3605
|
-
function
|
|
3619
|
+
function G(e) {
|
|
3606
3620
|
T = !0, document.body.style.cursor = "row-resize", document.addEventListener("pointermove", W), document.addEventListener("pointerup", ee), e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
3607
3621
|
}
|
|
3608
3622
|
return y(() => {
|
|
@@ -3679,7 +3693,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3679
3693
|
type: "button",
|
|
3680
3694
|
class: "layers-resizer",
|
|
3681
3695
|
"aria-label": "Resize properties and layers panels",
|
|
3682
|
-
onPointerdown:
|
|
3696
|
+
onPointerdown: G
|
|
3683
3697
|
}, [...r[7] ||= [s("span", { "aria-hidden": "true" }, null, -1)]], 32),
|
|
3684
3698
|
s("div", {
|
|
3685
3699
|
class: "layers",
|
|
@@ -3717,62 +3731,17 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3717
3731
|
], 512);
|
|
3718
3732
|
};
|
|
3719
3733
|
}
|
|
3720
|
-
}), [["__scopeId", "data-v-311a38bf"]]), Wo = {
|
|
3721
|
-
key: 0,
|
|
3722
|
-
class: "side-info"
|
|
3723
|
-
}, Go = { class: "info-title" }, Ko = 102, qo = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
3724
|
-
__name: "SideInfo",
|
|
3725
|
-
props: { items: {} },
|
|
3726
|
-
setup(t) {
|
|
3727
|
-
let n = t, c = K(), l = C(), u = C(0), d = r(() => (n.items?.length ?? 0) > 1 && u.value > Ko), f;
|
|
3728
|
-
function p() {
|
|
3729
|
-
u.value = l.value?.scrollHeight ?? 0;
|
|
3730
|
-
}
|
|
3731
|
-
return P(() => n.items, () => void m(p), { deep: !0 }), y(() => {
|
|
3732
|
-
m(() => {
|
|
3733
|
-
p(), f = new ResizeObserver(p), l.value && f.observe(l.value);
|
|
3734
|
-
});
|
|
3735
|
-
}), v(() => f?.disconnect()), (t, r) => n.items?.length ? (x(), o("section", Wo, [s("div", Go, A(M(c)("checklist", "Checklist")), 1), d.value ? (x(), i(M(gi), {
|
|
3736
|
-
key: 0,
|
|
3737
|
-
class: "info-list scrollable",
|
|
3738
|
-
options: {
|
|
3739
|
-
overflow: {
|
|
3740
|
-
x: "hidden",
|
|
3741
|
-
y: "scroll"
|
|
3742
|
-
},
|
|
3743
|
-
scrollbars: { autoHide: "never" }
|
|
3744
|
-
},
|
|
3745
|
-
defer: ""
|
|
3746
|
-
}, {
|
|
3747
|
-
default: I(() => [s("div", {
|
|
3748
|
-
ref_key: "listElement",
|
|
3749
|
-
ref: l
|
|
3750
|
-
}, [(x(!0), o(e, null, w(n.items, (e) => (x(), o("div", {
|
|
3751
|
-
key: e.id,
|
|
3752
|
-
class: "info-row"
|
|
3753
|
-
}, [s("span", { class: h(["info-dot", { complete: e.complete }]) }, null, 2), s("span", null, A(e.label), 1)]))), 128))], 512)]),
|
|
3754
|
-
_: 1
|
|
3755
|
-
})) : (x(), o("div", {
|
|
3756
|
-
key: 1,
|
|
3757
|
-
ref_key: "listElement",
|
|
3758
|
-
ref: l,
|
|
3759
|
-
class: "info-list"
|
|
3760
|
-
}, [(x(!0), o(e, null, w(n.items, (e) => (x(), o("div", {
|
|
3761
|
-
key: e.id,
|
|
3762
|
-
class: "info-row"
|
|
3763
|
-
}, [s("span", { class: h(["info-dot", { complete: e.complete }]) }, null, 2), s("span", null, A(e.label), 1)]))), 128))], 512))])) : a("", !0);
|
|
3764
|
-
}
|
|
3765
|
-
}), [["__scopeId", "data-v-ee9b479a"]]), Jo = { class: "template-list" }, Yo = { class: "section-head" }, Xo = ["title"], Zo = ["aria-label", "title"], Qo = ["onClick"], $o = {
|
|
3734
|
+
}), [["__scopeId", "data-v-311a38bf"]]), Wo = { class: "template-list" }, Go = { class: "section-head" }, Ko = ["title"], qo = ["aria-label", "title"], Jo = ["onClick"], Yo = {
|
|
3766
3735
|
class: "tab-icon icon",
|
|
3767
3736
|
"aria-hidden": "true"
|
|
3768
|
-
},
|
|
3737
|
+
}, Xo = ["onKeydown", "onBlur"], Zo = { class: "tab-channel" }, Qo = { class: "tab-version" }, $o = {
|
|
3769
3738
|
key: 2,
|
|
3770
3739
|
class: "tab-changed",
|
|
3771
3740
|
"aria-label": "Unsaved changes"
|
|
3772
|
-
},
|
|
3741
|
+
}, es = {
|
|
3773
3742
|
key: 0,
|
|
3774
3743
|
class: "empty-list"
|
|
3775
|
-
},
|
|
3744
|
+
}, ts = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
3776
3745
|
__name: "TemplateList",
|
|
3777
3746
|
props: {
|
|
3778
3747
|
templates: {},
|
|
@@ -3784,7 +3753,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3784
3753
|
"select"
|
|
3785
3754
|
],
|
|
3786
3755
|
setup(t, { emit: n }) {
|
|
3787
|
-
let r = t, c = n, d =
|
|
3756
|
+
let r = t, c = n, d = de(), f = /* @__PURE__ */ new Map(), p = C(), g = C(""), _ = C();
|
|
3788
3757
|
function v(e, t) {
|
|
3789
3758
|
t instanceof HTMLElement ? f.set(e, t) : f.delete(e);
|
|
3790
3759
|
}
|
|
@@ -3803,12 +3772,12 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3803
3772
|
}
|
|
3804
3773
|
return P(() => r.focusedTemplateId, (e) => {
|
|
3805
3774
|
e && y(e);
|
|
3806
|
-
}, { immediate: !0 }), (n, r) => (x(), o("section",
|
|
3775
|
+
}, { immediate: !0 }), (n, r) => (x(), o("section", Wo, [s("div", Go, [s("span", { title: M(d)("screens", "Screens") }, A(M(d)("screens", "Screens")), 9, Ko), s("button", {
|
|
3807
3776
|
type: "button",
|
|
3808
3777
|
"aria-label": M(d)("add-screen", "Add screen"),
|
|
3809
3778
|
title: M(d)("add-screen", "Add screen"),
|
|
3810
3779
|
onClick: r[0] ||= (e) => c("add")
|
|
3811
|
-
}, [...r[4] ||= [s("span", { "aria-hidden": "true" }, "+", -1)]], 8,
|
|
3780
|
+
}, [...r[4] ||= [s("span", { "aria-hidden": "true" }, "+", -1)]], 8, qo)]), u(M(gi), {
|
|
3812
3781
|
class: "template-tabs",
|
|
3813
3782
|
options: {
|
|
3814
3783
|
overflow: {
|
|
@@ -3827,7 +3796,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3827
3796
|
class: h(["template-tab", { active: t.focusedTemplateId ? e.id === t.focusedTemplateId : n === 0 }]),
|
|
3828
3797
|
onClick: (t) => c("select", e.id)
|
|
3829
3798
|
}, [
|
|
3830
|
-
s("span",
|
|
3799
|
+
s("span", Yo, A(e.icon), 1),
|
|
3831
3800
|
p.value === e.id ? L((x(), o("input", {
|
|
3832
3801
|
key: 0,
|
|
3833
3802
|
ref_for: !0,
|
|
@@ -3840,7 +3809,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3840
3809
|
onDblclick: r[3] ||= z(() => {}, ["stop"]),
|
|
3841
3810
|
onKeydown: [R(z((t) => S(e), ["prevent"]), ["enter"]), R(z(T, ["prevent"]), ["esc"])],
|
|
3842
3811
|
onBlur: (t) => S(e)
|
|
3843
|
-
}, null, 40,
|
|
3812
|
+
}, null, 40, Xo)), [[N, g.value]]) : (x(), i(vi, {
|
|
3844
3813
|
key: 1,
|
|
3845
3814
|
class: "tab-label",
|
|
3846
3815
|
onDblclick: z((t) => e.type === "dynamic" && b(e), ["stop"])
|
|
@@ -3848,20 +3817,20 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3848
3817
|
default: I(() => [l(A(e.name), 1)]),
|
|
3849
3818
|
_: 2
|
|
3850
3819
|
}, 1032, ["onDblclick"])),
|
|
3851
|
-
s("span",
|
|
3852
|
-
s("span",
|
|
3853
|
-
e.changed ? (x(), o("span",
|
|
3854
|
-
], 10,
|
|
3820
|
+
s("span", Zo, A(e.channel.charAt(0).toUpperCase()), 1),
|
|
3821
|
+
s("span", Qo, A(e.version), 1),
|
|
3822
|
+
e.changed ? (x(), o("span", $o)) : a("", !0)
|
|
3823
|
+
], 10, Jo))), 128)), t.templates?.length ? a("", !0) : (x(), o("p", es, "No screens yet."))]),
|
|
3855
3824
|
_: 1
|
|
3856
3825
|
})]));
|
|
3857
3826
|
}
|
|
3858
|
-
}), [["__scopeId", "data-v-927e0835"]]),
|
|
3827
|
+
}), [["__scopeId", "data-v-927e0835"]]), ns = {
|
|
3859
3828
|
class: "theme-sidebar",
|
|
3860
3829
|
"aria-label": "Theme"
|
|
3861
|
-
},
|
|
3830
|
+
}, rs = { class: "theme-header" }, is = { class: "theme-heading" }, as = ["title"], os = { class: "theme-body" }, ss = { class: "theme-toolbar" }, cs = { class: "theme-mode" }, ls = { class: "theme-mode-label" }, us = { class: "theme-mode-buttons" }, ds = { class: "theme-search" }, fs = ["placeholder"], ps = { class: "theme-color-row theme-variable-row" }, ms = ["value", "aria-label"], hs = ["value", "onChange"], gs = ["value"], _s = {
|
|
3862
3831
|
key: 0,
|
|
3863
3832
|
class: "theme-empty"
|
|
3864
|
-
},
|
|
3833
|
+
}, vs = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
3865
3834
|
__name: "ThemeSidebar",
|
|
3866
3835
|
props: {
|
|
3867
3836
|
open: { type: Boolean },
|
|
@@ -3875,7 +3844,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
3875
3844
|
"mode"
|
|
3876
3845
|
],
|
|
3877
3846
|
setup(t, { emit: c }) {
|
|
3878
|
-
let d = t, f = c, p =
|
|
3847
|
+
let d = t, f = c, p = de(), m = U(), g = C({ ...d.colors }), _ = C(""), v = [
|
|
3879
3848
|
{
|
|
3880
3849
|
key: "background",
|
|
3881
3850
|
title: "Background color",
|
|
@@ -4106,19 +4075,19 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4106
4075
|
key: 0,
|
|
4107
4076
|
class: "theme-overlay",
|
|
4108
4077
|
onClick: c[4] ||= z((e) => f("close"), ["self"])
|
|
4109
|
-
}, [s("aside",
|
|
4078
|
+
}, [s("aside", ns, [s("div", rs, [
|
|
4110
4079
|
c[5] ||= s("span", {
|
|
4111
4080
|
class: "theme-icon icon",
|
|
4112
4081
|
"aria-hidden": "true"
|
|
4113
4082
|
}, "palette", -1),
|
|
4114
|
-
s("div",
|
|
4083
|
+
s("div", is, [s("strong", null, A(M(p)("theme", "Theme")), 1), s("span", null, A(M(p)("theme-subtitle", "Colors used across every screen")), 1)]),
|
|
4115
4084
|
s("button", {
|
|
4116
4085
|
type: "button",
|
|
4117
4086
|
class: "theme-close icon",
|
|
4118
4087
|
title: M(p)("close", "Close"),
|
|
4119
4088
|
onClick: c[0] ||= (e) => f("close")
|
|
4120
|
-
}, "close", 8,
|
|
4121
|
-
]), s("div",
|
|
4089
|
+
}, "close", 8, as)
|
|
4090
|
+
]), s("div", os, [s("div", ss, [s("div", cs, [s("span", ls, A(M(p)("theme-mode", "Appearance")), 1), s("div", us, [s("button", {
|
|
4122
4091
|
type: "button",
|
|
4123
4092
|
class: h(["theme-mode-button", { active: !d.darkMode }]),
|
|
4124
4093
|
onClick: c[1] ||= (e) => f("mode", !1)
|
|
@@ -4132,7 +4101,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4132
4101
|
}, [c[7] ||= s("span", {
|
|
4133
4102
|
class: "icon",
|
|
4134
4103
|
"aria-hidden": "true"
|
|
4135
|
-
}, "dark_mode", -1), l(" " + A(M(p)("dark", "Dark")), 1)], 2)])]), s("label",
|
|
4104
|
+
}, "dark_mode", -1), l(" " + A(M(p)("dark", "Dark")), 1)], 2)])]), s("label", ds, [c[8] ||= s("span", {
|
|
4136
4105
|
class: "icon",
|
|
4137
4106
|
"aria-hidden": "true"
|
|
4138
4107
|
}, "search", -1), L(s("input", {
|
|
@@ -4140,18 +4109,18 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4140
4109
|
type: "search",
|
|
4141
4110
|
placeholder: M(p)("search-theme-variables", "Search variables"),
|
|
4142
4111
|
"aria-label": "Search theme variables"
|
|
4143
|
-
}, null, 8,
|
|
4112
|
+
}, null, 8, fs), [[N, _.value]])])]), (x(!0), o(e, null, w(b.value, (t) => (x(), o("div", {
|
|
4144
4113
|
key: t.key,
|
|
4145
4114
|
class: "theme-field"
|
|
4146
4115
|
}, [
|
|
4147
4116
|
s("span", null, A(E(t)), 1),
|
|
4148
|
-
s("div",
|
|
4117
|
+
s("div", ps, [
|
|
4149
4118
|
s("input", {
|
|
4150
4119
|
class: "theme-input theme-variable-input",
|
|
4151
4120
|
value: t.name,
|
|
4152
4121
|
readonly: "",
|
|
4153
4122
|
"aria-label": `${t.title} variable name`
|
|
4154
|
-
}, null, 8,
|
|
4123
|
+
}, null, 8, ms),
|
|
4155
4124
|
t.type === "color" ? (x(), o(e, { key: 0 }, [u(Ji, {
|
|
4156
4125
|
value: T(t),
|
|
4157
4126
|
size: 32,
|
|
@@ -4160,41 +4129,41 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4160
4129
|
class: "theme-input theme-hex-input",
|
|
4161
4130
|
value: T(t),
|
|
4162
4131
|
onChange: (e) => S(t.key, e.target.value)
|
|
4163
|
-
}, null, 40,
|
|
4132
|
+
}, null, 40, hs)], 64)) : a("", !0),
|
|
4164
4133
|
t.type === "size" ? (x(), o("input", {
|
|
4165
4134
|
key: 1,
|
|
4166
4135
|
class: "theme-input theme-size-input",
|
|
4167
4136
|
value: T(t),
|
|
4168
4137
|
"aria-label": "Medium spacing value"
|
|
4169
|
-
}, null, 8,
|
|
4138
|
+
}, null, 8, gs)) : a("", !0)
|
|
4170
4139
|
]),
|
|
4171
|
-
b.value.length ? a("", !0) : (x(), o("div",
|
|
4140
|
+
b.value.length ? a("", !0) : (x(), o("div", _s, A(M(p)("no-theme-variables", "No matching variables")), 1))
|
|
4172
4141
|
]))), 128))])])])) : a("", !0)]),
|
|
4173
4142
|
_: 1
|
|
4174
4143
|
}));
|
|
4175
4144
|
}
|
|
4176
|
-
}), [["__scopeId", "data-v-5f7097ad"]]),
|
|
4145
|
+
}), [["__scopeId", "data-v-5f7097ad"]]), ys = {
|
|
4177
4146
|
class: "translation-sidebar",
|
|
4178
4147
|
"aria-label": "Translations"
|
|
4179
|
-
},
|
|
4148
|
+
}, bs = { class: "translation-header" }, xs = { class: "translation-heading" }, Ss = ["title"], Cs = { class: "translation-body" }, ws = { class: "translation-controls" }, Ts = { class: "language-row" }, Es = { class: "language-heading" }, Ds = ["disabled", "title"], Os = {
|
|
4180
4149
|
key: 0,
|
|
4181
4150
|
class: "translate-spinner",
|
|
4182
4151
|
"aria-hidden": "true"
|
|
4183
|
-
},
|
|
4152
|
+
}, ks = { key: 1 }, As = [
|
|
4184
4153
|
"aria-keyshortcuts",
|
|
4185
4154
|
"onClick",
|
|
4186
4155
|
"onKeydown"
|
|
4187
|
-
],
|
|
4156
|
+
], js = { class: "translation-search" }, Ms = {
|
|
4188
4157
|
key: 0,
|
|
4189
4158
|
class: "translation-fields"
|
|
4190
|
-
},
|
|
4159
|
+
}, Ns = { class: "translation-field-heading" }, Ps = { class: "field-language" }, Fs = { class: "field-path" }, Is = [
|
|
4191
4160
|
"value",
|
|
4192
4161
|
"aria-label",
|
|
4193
4162
|
"onInput"
|
|
4194
|
-
],
|
|
4163
|
+
], Ls = {
|
|
4195
4164
|
key: 1,
|
|
4196
4165
|
class: "translation-empty"
|
|
4197
|
-
},
|
|
4166
|
+
}, Rs = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4198
4167
|
__name: "TranslationSidebar",
|
|
4199
4168
|
props: {
|
|
4200
4169
|
open: { type: Boolean },
|
|
@@ -4203,7 +4172,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4203
4172
|
},
|
|
4204
4173
|
emits: ["close", "update"],
|
|
4205
4174
|
setup(t, { emit: c }) {
|
|
4206
|
-
let l = t, d = c, f =
|
|
4175
|
+
let l = t, d = c, f = de(), p = H(), g = C(["en"]), _ = C("en"), b = C(""), S = C(!1), T = C(""), E = C(!1), D = C(), O = C(), k = C(), j = C(), F = r(() => p.fields), B = r(() => {
|
|
4207
4176
|
let e = b.value.trim().toLowerCase();
|
|
4208
4177
|
return e ? F.value.filter((t) => [
|
|
4209
4178
|
t.id,
|
|
@@ -4232,7 +4201,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4232
4201
|
}
|
|
4233
4202
|
g.value.push(e), _.value = e, W();
|
|
4234
4203
|
}
|
|
4235
|
-
function
|
|
4204
|
+
function G(e) {
|
|
4236
4205
|
if (e === "en") return;
|
|
4237
4206
|
let t = g.value.indexOf(e);
|
|
4238
4207
|
if (t !== -1) {
|
|
@@ -4243,20 +4212,20 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4243
4212
|
g.value.splice(t, 1), D.value = void 0, _.value === e && (_.value = g.value[Math.max(0, t - 1)] ?? "en");
|
|
4244
4213
|
}
|
|
4245
4214
|
}
|
|
4246
|
-
function
|
|
4215
|
+
function te() {
|
|
4247
4216
|
E.value = !0, m(() => k.value?.focus());
|
|
4248
4217
|
}
|
|
4249
|
-
function
|
|
4218
|
+
function ne(e) {
|
|
4250
4219
|
E.value && !O.value?.contains(e.target) && W(), j.value?.contains(e.target) || (D.value = void 0);
|
|
4251
4220
|
}
|
|
4252
|
-
function
|
|
4221
|
+
function K(e) {
|
|
4253
4222
|
if (e.key === "Escape") {
|
|
4254
4223
|
D.value = void 0, E.value && W();
|
|
4255
4224
|
return;
|
|
4256
4225
|
}
|
|
4257
|
-
!l.open || E.value || e.key !== "Delete" && e.key !== "Backspace" || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement ||
|
|
4226
|
+
!l.open || E.value || e.key !== "Delete" && e.key !== "Backspace" || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || G(_.value);
|
|
4258
4227
|
}
|
|
4259
|
-
async function
|
|
4228
|
+
async function re() {
|
|
4260
4229
|
if (_.value === "en" || S.value || !F.value.length) return;
|
|
4261
4230
|
S.value = !0;
|
|
4262
4231
|
let e = F.value, t = e.map((e) => U(e, "en")).join("\n"), n = new URL("https://translate.googleapis.com/translate_a/single");
|
|
@@ -4276,36 +4245,36 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4276
4245
|
}
|
|
4277
4246
|
}
|
|
4278
4247
|
return y(() => {
|
|
4279
|
-
document.addEventListener("pointerdown",
|
|
4248
|
+
document.addEventListener("pointerdown", ne), document.addEventListener("keydown", K);
|
|
4280
4249
|
}), v(() => {
|
|
4281
|
-
document.removeEventListener("pointerdown",
|
|
4250
|
+
document.removeEventListener("pointerdown", ne), document.removeEventListener("keydown", K);
|
|
4282
4251
|
}), (r, c) => (x(), i(n, { name: "translation" }, {
|
|
4283
4252
|
default: I(() => [t.open ? (x(), o("div", {
|
|
4284
4253
|
key: 0,
|
|
4285
4254
|
class: "translation-overlay",
|
|
4286
4255
|
onClick: c[3] ||= z((e) => d("close"), ["self"])
|
|
4287
|
-
}, [s("aside",
|
|
4256
|
+
}, [s("aside", ys, [s("div", bs, [
|
|
4288
4257
|
c[4] ||= s("span", {
|
|
4289
4258
|
class: "translation-icon icon",
|
|
4290
4259
|
"aria-hidden": "true"
|
|
4291
4260
|
}, "translate", -1),
|
|
4292
|
-
s("div",
|
|
4261
|
+
s("div", xs, [s("strong", null, A(M(f)("translations", "Translations")), 1), s("span", null, A(M(f)("translations-subtitle", "Translate this screen")), 1)]),
|
|
4293
4262
|
s("button", {
|
|
4294
4263
|
type: "button",
|
|
4295
4264
|
class: "translation-close icon",
|
|
4296
4265
|
title: M(f)("close", "Close"),
|
|
4297
4266
|
onClick: c[0] ||= (e) => d("close")
|
|
4298
|
-
}, "close", 8,
|
|
4299
|
-
]), s("div",
|
|
4267
|
+
}, "close", 8, Ss)
|
|
4268
|
+
]), s("div", Cs, [s("div", ws, [s("div", Ts, [s("div", Es, [s("span", null, A(M(f)("language", "Language")), 1), s("button", {
|
|
4300
4269
|
type: "button",
|
|
4301
4270
|
class: "translate-labels-button",
|
|
4302
4271
|
disabled: _.value === "en" || S.value,
|
|
4303
4272
|
title: M(f)("auto-translate", "Auto-translate"),
|
|
4304
|
-
onClick:
|
|
4273
|
+
onClick: re
|
|
4305
4274
|
}, [c[5] ||= s("span", {
|
|
4306
4275
|
class: "icon",
|
|
4307
4276
|
"aria-hidden": "true"
|
|
4308
|
-
}, "translate", -1), S.value ? (x(), o("span",
|
|
4277
|
+
}, "translate", -1), S.value ? (x(), o("span", Os)) : (x(), o("span", ks, A(M(f)("auto-translate", "Auto-translate")), 1))], 8, Ds)]), s("div", {
|
|
4309
4278
|
ref_key: "languageChips",
|
|
4310
4279
|
ref: j,
|
|
4311
4280
|
class: "language-chips"
|
|
@@ -4320,8 +4289,8 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4320
4289
|
onClick: (t) => {
|
|
4321
4290
|
_.value = e, D.value = void 0;
|
|
4322
4291
|
},
|
|
4323
|
-
onKeydown: [R(z((t) =>
|
|
4324
|
-
}, A(e), 43,
|
|
4292
|
+
onKeydown: [R(z((t) => G(e), ["prevent"]), ["delete"]), R(z((t) => G(e), ["prevent"]), ["backspace"])]
|
|
4293
|
+
}, A(e), 43, As))), 128)), E.value ? (x(), o("span", {
|
|
4325
4294
|
key: 0,
|
|
4326
4295
|
ref_key: "languageAdder",
|
|
4327
4296
|
ref: O,
|
|
@@ -4336,8 +4305,8 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4336
4305
|
type: "button",
|
|
4337
4306
|
class: "add-language-button",
|
|
4338
4307
|
"aria-label": "Add language",
|
|
4339
|
-
onClick:
|
|
4340
|
-
}, "+"))], 512)]), s("div",
|
|
4308
|
+
onClick: te
|
|
4309
|
+
}, "+"))], 512)]), s("div", js, [c[6] ||= s("span", {
|
|
4341
4310
|
class: "icon",
|
|
4342
4311
|
"aria-hidden": "true"
|
|
4343
4312
|
}, "search", -1), L(s("input", {
|
|
@@ -4356,20 +4325,20 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4356
4325
|
},
|
|
4357
4326
|
defer: ""
|
|
4358
4327
|
}, {
|
|
4359
|
-
default: I(() => [B.value.length ? (x(), o("div",
|
|
4328
|
+
default: I(() => [B.value.length ? (x(), o("div", Ms, [(x(!0), o(e, null, w(B.value, (e) => (x(), o("div", {
|
|
4360
4329
|
key: e.id,
|
|
4361
4330
|
class: "translation-field"
|
|
4362
|
-
}, [s("div",
|
|
4331
|
+
}, [s("div", Ns, [s("span", Ps, A(U(e, "en")), 1), s("span", Fs, A(e.key ?? e.path), 1)]), s("input", {
|
|
4363
4332
|
value: U(e, _.value),
|
|
4364
4333
|
"aria-label": e.source,
|
|
4365
4334
|
onInput: (t) => d("update", e.id, t.target.value, _.value)
|
|
4366
|
-
}, null, 40,
|
|
4335
|
+
}, null, 40, Is)]))), 128))])) : (x(), o("p", Ls, A(M(f)("no-translations", "No translatable fields are available for this screen.")), 1))]),
|
|
4367
4336
|
_: 1
|
|
4368
4337
|
})])])])) : a("", !0)]),
|
|
4369
4338
|
_: 1
|
|
4370
4339
|
}));
|
|
4371
4340
|
}
|
|
4372
|
-
}), [["__scopeId", "data-v-19047d8f"]]),
|
|
4341
|
+
}), [["__scopeId", "data-v-19047d8f"]]), zs = B("templates", {
|
|
4373
4342
|
state: () => ({
|
|
4374
4343
|
templates: [],
|
|
4375
4344
|
template: null
|
|
@@ -4401,13 +4370,13 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4401
4370
|
this.templates = [], this.template = null;
|
|
4402
4371
|
}
|
|
4403
4372
|
}
|
|
4404
|
-
}),
|
|
4373
|
+
}), Bs = { class: "breadcrumb-label" }, Vs = {
|
|
4405
4374
|
class: "breadcrumb-template-icon icon",
|
|
4406
4375
|
"aria-hidden": "true"
|
|
4407
|
-
},
|
|
4376
|
+
}, Hs = { class: "breadcrumb-selection" }, Us = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4408
4377
|
__name: "Breadcrumb",
|
|
4409
4378
|
setup(t) {
|
|
4410
|
-
let n =
|
|
4379
|
+
let n = zs(), i = ue();
|
|
4411
4380
|
function c() {
|
|
4412
4381
|
i.deselect();
|
|
4413
4382
|
}
|
|
@@ -4426,8 +4395,8 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4426
4395
|
let e = i.selectedComponent?.type;
|
|
4427
4396
|
return e ? l[e] ?? e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase()) : "";
|
|
4428
4397
|
}), d = r(() => n.template?.icon || "widgets");
|
|
4429
|
-
return (t, n) => (x(), o("span",
|
|
4430
|
-
s("span",
|
|
4398
|
+
return (t, n) => (x(), o("span", Bs, [
|
|
4399
|
+
s("span", Vs, A(d.value), 1),
|
|
4431
4400
|
s("button", {
|
|
4432
4401
|
type: "button",
|
|
4433
4402
|
class: "breadcrumb-template",
|
|
@@ -4436,13 +4405,13 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4436
4405
|
u.value ? (x(), o(e, { key: 0 }, [n[0] ||= s("span", {
|
|
4437
4406
|
class: "breadcrumb-separator",
|
|
4438
4407
|
"aria-hidden": "true"
|
|
4439
|
-
}, "/", -1), s("span",
|
|
4408
|
+
}, "/", -1), s("span", Hs, A(u.value), 1)], 64)) : a("", !0)
|
|
4440
4409
|
]));
|
|
4441
4410
|
}
|
|
4442
|
-
}), [["__scopeId", "data-v-cba8ee60"]]),
|
|
4411
|
+
}), [["__scopeId", "data-v-cba8ee60"]]), Ws = {
|
|
4443
4412
|
key: 0,
|
|
4444
4413
|
class: "renderer-components"
|
|
4445
|
-
},
|
|
4414
|
+
}, Gs = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4446
4415
|
__name: "Renderer",
|
|
4447
4416
|
props: {
|
|
4448
4417
|
components: {},
|
|
@@ -4451,7 +4420,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4451
4420
|
emits: ["select"],
|
|
4452
4421
|
setup(t, { emit: n }) {
|
|
4453
4422
|
let r = t, i = n;
|
|
4454
|
-
return (t, n) => r.components.length ? (x(), o("div",
|
|
4423
|
+
return (t, n) => r.components.length ? (x(), o("div", Ws, [(x(!0), o(e, null, w(r.components, (e, n) => T(t.$slots, "default", {
|
|
4455
4424
|
type: e.type,
|
|
4456
4425
|
props: e.props,
|
|
4457
4426
|
index: n,
|
|
@@ -4459,7 +4428,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4459
4428
|
select: () => i("select", n)
|
|
4460
4429
|
}, void 0, !0, `${e.type}-${n}`)), 128))])) : a("", !0);
|
|
4461
4430
|
}
|
|
4462
|
-
}), [["__scopeId", "data-v-c70747fe"]]),
|
|
4431
|
+
}), [["__scopeId", "data-v-c70747fe"]]), Ks = ["data-component-id", "draggable"], qs = { class: "component-content" }, Js = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4463
4432
|
__name: "ComponentHandler",
|
|
4464
4433
|
props: {
|
|
4465
4434
|
type: {},
|
|
@@ -4491,12 +4460,12 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4491
4460
|
draggable: !n.preview,
|
|
4492
4461
|
onDragstart: r[0] ||= z((t) => a("moveStart", e.id ?? "", t), ["stop"]),
|
|
4493
4462
|
onClick: u
|
|
4494
|
-
}, [s("div",
|
|
4463
|
+
}, [s("div", qs, [(x(), i(O(M(bo)[e.type]), g(p(l.value)), {
|
|
4495
4464
|
default: I(() => [T(t.$slots, "default", {}, void 0, !0)]),
|
|
4496
4465
|
_: 3
|
|
4497
|
-
}, 16))])], 46,
|
|
4466
|
+
}, 16))])], 46, Ks));
|
|
4498
4467
|
}
|
|
4499
|
-
}), [["__scopeId", "data-v-2e9fd141"]]),
|
|
4468
|
+
}), [["__scopeId", "data-v-2e9fd141"]]), Ys = ["data-component-id"], Xs = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4500
4469
|
__name: "WorkspaceNode",
|
|
4501
4470
|
props: {
|
|
4502
4471
|
component: {},
|
|
@@ -4543,7 +4512,7 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4543
4512
|
onDragover: y,
|
|
4544
4513
|
onDragleave: S,
|
|
4545
4514
|
onDrop: b
|
|
4546
|
-
}, [u(
|
|
4515
|
+
}, [u(Js, {
|
|
4547
4516
|
type: t.component.type,
|
|
4548
4517
|
"component-props": {
|
|
4549
4518
|
...t.component.props.base,
|
|
@@ -4583,18 +4552,18 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4583
4552
|
"id",
|
|
4584
4553
|
"selected",
|
|
4585
4554
|
"preview"
|
|
4586
|
-
])], 46,
|
|
4555
|
+
])], 46, Ys);
|
|
4587
4556
|
};
|
|
4588
4557
|
}
|
|
4589
|
-
}), [["__scopeId", "data-v-b3970577"]]),
|
|
4558
|
+
}), [["__scopeId", "data-v-b3970577"]]), Zs = {
|
|
4590
4559
|
key: 1,
|
|
4591
4560
|
class: "composer-empty"
|
|
4592
|
-
},
|
|
4561
|
+
}, Qs = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4593
4562
|
__name: "Composer",
|
|
4594
4563
|
props: { preview: { type: Boolean } },
|
|
4595
4564
|
emits: ["componentDrop", "componentSelect"],
|
|
4596
4565
|
setup(e, { expose: t, emit: n }) {
|
|
4597
|
-
let i = n, s = e, c = r(() => s.preview === !0), l =
|
|
4566
|
+
let i = n, s = e, c = r(() => s.preview === !0), l = ue(), d = de(), f = C(!1), p = C(), m = C(12), g = C(), b = C(), S = () => l.components;
|
|
4598
4567
|
function w(e) {
|
|
4599
4568
|
if (s.preview) return;
|
|
4600
4569
|
let t = l.selectedId, n = t ? l.findComponent(t) : void 0;
|
|
@@ -4729,13 +4698,13 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4729
4698
|
style: _({ top: `${m.value}px` }),
|
|
4730
4699
|
"aria-hidden": "true"
|
|
4731
4700
|
}, null, 4)) : a("", !0),
|
|
4732
|
-
M(l).components.length ? a("", !0) : (x(), o("div",
|
|
4733
|
-
u(
|
|
4701
|
+
M(l).components.length ? a("", !0) : (x(), o("div", Zs, A(M(d)("composer-empty", "Click or drag a component from the list to start building.")), 1)),
|
|
4702
|
+
u(Gs, {
|
|
4734
4703
|
components: S(),
|
|
4735
4704
|
"selected-index": M(l).selectedIndex,
|
|
4736
4705
|
onSelect: T
|
|
4737
4706
|
}, {
|
|
4738
|
-
default: I(({ index: e }) => [u(
|
|
4707
|
+
default: I(({ index: e }) => [u(Xs, {
|
|
4739
4708
|
component: M(l).components[e],
|
|
4740
4709
|
"selected-id": M(l).selectedId,
|
|
4741
4710
|
device: M(l).activeDevice,
|
|
@@ -4753,25 +4722,25 @@ var So = /* @__PURE__ */ new Set([
|
|
|
4753
4722
|
}, 8, ["components", "selected-index"])
|
|
4754
4723
|
], 34));
|
|
4755
4724
|
}
|
|
4756
|
-
}), [["__scopeId", "data-v-734e6e1c"]]),
|
|
4757
|
-
function
|
|
4758
|
-
return x(), o("div",
|
|
4725
|
+
}), [["__scopeId", "data-v-734e6e1c"]]), $s = {}, ec = { class: "desktop" }, tc = { class: "desktop-content" };
|
|
4726
|
+
function nc(e, t) {
|
|
4727
|
+
return x(), o("div", ec, [t[0] ||= s("div", { class: "browser-bar" }, [
|
|
4759
4728
|
s("span"),
|
|
4760
4729
|
s("span"),
|
|
4761
4730
|
s("span"),
|
|
4762
4731
|
s("i")
|
|
4763
|
-
], -1), s("div",
|
|
4732
|
+
], -1), s("div", tc, [T(e.$slots, "default", {}, void 0, !0)])]);
|
|
4764
4733
|
}
|
|
4765
|
-
var
|
|
4734
|
+
var rc = /*#__PURE__*/ Q($s, [["render", nc], ["__scopeId", "data-v-ddbb2283"]]), ic = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4766
4735
|
__name: "Device",
|
|
4767
4736
|
props: { mode: {} },
|
|
4768
4737
|
setup(e) {
|
|
4769
4738
|
return (t, n) => (x(), o("div", { class: h(["device", `device-${e.mode}`]) }, [T(t.$slots, "default", {}, void 0, !0)], 2));
|
|
4770
4739
|
}
|
|
4771
|
-
}), [["__scopeId", "data-v-fe85293d"]]),
|
|
4740
|
+
}), [["__scopeId", "data-v-fe85293d"]]), ac = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4772
4741
|
__name: "Mobile",
|
|
4773
4742
|
setup(e) {
|
|
4774
|
-
return (e, t) => (x(), i(
|
|
4743
|
+
return (e, t) => (x(), i(ic, {
|
|
4775
4744
|
mode: "phone",
|
|
4776
4745
|
class: "mobile-device"
|
|
4777
4746
|
}, {
|
|
@@ -4779,10 +4748,10 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
4779
4748
|
_: 3
|
|
4780
4749
|
}));
|
|
4781
4750
|
}
|
|
4782
|
-
}), [["__scopeId", "data-v-568d04d9"]]),
|
|
4751
|
+
}), [["__scopeId", "data-v-568d04d9"]]), oc = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4783
4752
|
__name: "Tablet",
|
|
4784
4753
|
setup(e) {
|
|
4785
|
-
return (e, t) => (x(), i(
|
|
4754
|
+
return (e, t) => (x(), i(ic, {
|
|
4786
4755
|
mode: "tablet",
|
|
4787
4756
|
class: "tablet-device"
|
|
4788
4757
|
}, {
|
|
@@ -4790,11 +4759,11 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
4790
4759
|
_: 3
|
|
4791
4760
|
}));
|
|
4792
4761
|
}
|
|
4793
|
-
}), [["__scopeId", "data-v-3cc52b8c"]]),
|
|
4762
|
+
}), [["__scopeId", "data-v-3cc52b8c"]]), sc = {
|
|
4794
4763
|
key: 0,
|
|
4795
4764
|
class: "debug-actions",
|
|
4796
4765
|
"aria-label": "Debug data"
|
|
4797
|
-
},
|
|
4766
|
+
}, cc = ["disabled"], lc = ["disabled"], uc = { class: "canvas-actions" }, dc = { class: "zoom-controls" }, fc = ["disabled"], pc = ["disabled"], mc = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4798
4767
|
__name: "ZoomController",
|
|
4799
4768
|
props: {
|
|
4800
4769
|
modelValue: {},
|
|
@@ -4807,102 +4776,110 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
4807
4776
|
"center"
|
|
4808
4777
|
],
|
|
4809
4778
|
setup(e, { emit: t }) {
|
|
4810
|
-
let n = e, r = t, i =
|
|
4811
|
-
function
|
|
4779
|
+
let n = e, r = t, i = ue(), c = U(), l = H(), u = C(!1), d = C(), f;
|
|
4780
|
+
function p(e, t) {
|
|
4812
4781
|
let n = e instanceof Error ? `${t}: ${e.message}` : t;
|
|
4813
4782
|
window.alert(n);
|
|
4814
4783
|
}
|
|
4815
|
-
function
|
|
4784
|
+
function m(e) {
|
|
4816
4785
|
r("update:modelValue", Math.min(1.25, Math.max(.5, Number((n.modelValue + e).toFixed(2)))));
|
|
4817
4786
|
}
|
|
4818
|
-
function
|
|
4787
|
+
function g() {
|
|
4819
4788
|
r("update:pan", !n.pan);
|
|
4820
4789
|
}
|
|
4821
|
-
function
|
|
4790
|
+
function _() {
|
|
4822
4791
|
r("center");
|
|
4823
4792
|
}
|
|
4824
|
-
async function
|
|
4825
|
-
|
|
4793
|
+
async function y() {
|
|
4794
|
+
u.value = !0;
|
|
4826
4795
|
try {
|
|
4827
4796
|
await navigator.clipboard.writeText(JSON.stringify({
|
|
4828
4797
|
workspace: i.exportData(),
|
|
4829
|
-
theme: c.exportData()
|
|
4830
|
-
|
|
4798
|
+
theme: c.exportData(),
|
|
4799
|
+
translations: l.exportData()
|
|
4800
|
+
}, null, 2)), S("copy");
|
|
4831
4801
|
} catch (e) {
|
|
4832
|
-
|
|
4802
|
+
p(e, "Copy failed");
|
|
4833
4803
|
} finally {
|
|
4834
|
-
|
|
4804
|
+
u.value = !1;
|
|
4835
4805
|
}
|
|
4836
4806
|
}
|
|
4837
|
-
async function
|
|
4838
|
-
|
|
4807
|
+
async function b() {
|
|
4808
|
+
u.value = !0;
|
|
4839
4809
|
try {
|
|
4840
4810
|
let e = JSON.parse(await navigator.clipboard.readText()), t = e && typeof e == "object" && "workspace" in e ? e : { workspace: e };
|
|
4841
|
-
if (!
|
|
4842
|
-
|
|
4811
|
+
if (!le(t.workspace)) {
|
|
4812
|
+
p(void 0, "Paste failed: invalid workspace data");
|
|
4843
4813
|
return;
|
|
4844
4814
|
}
|
|
4845
|
-
i.importData(t.workspace), t.theme &&
|
|
4815
|
+
i.importData(t.workspace), t.theme && w(t.theme) && c.importData(t.theme), t.translations && T(t.translations) && l.importData(t.translations), S("paste");
|
|
4846
4816
|
} catch (e) {
|
|
4847
|
-
|
|
4817
|
+
p(e, "Paste failed");
|
|
4848
4818
|
} finally {
|
|
4849
|
-
|
|
4819
|
+
u.value = !1;
|
|
4850
4820
|
}
|
|
4851
4821
|
}
|
|
4852
|
-
function
|
|
4853
|
-
|
|
4854
|
-
|
|
4822
|
+
function S(e) {
|
|
4823
|
+
d.value = e, f && clearTimeout(f), f = setTimeout(() => {
|
|
4824
|
+
d.value = void 0;
|
|
4855
4825
|
}, 2e3);
|
|
4856
4826
|
}
|
|
4857
|
-
function
|
|
4827
|
+
function w(e) {
|
|
4858
4828
|
if (!e || typeof e != "object") return !1;
|
|
4859
4829
|
let t = e;
|
|
4860
4830
|
return Array.isArray(t.variables) && !!t.values && typeof t.values == "object";
|
|
4861
4831
|
}
|
|
4832
|
+
function T(e) {
|
|
4833
|
+
return Array.isArray(e) && e.every((e) => {
|
|
4834
|
+
if (!e || typeof e != "object") return !1;
|
|
4835
|
+
let t = e;
|
|
4836
|
+
return typeof t.id == "string" && typeof t.key == "string" && typeof t.path == "string" && typeof t.source == "string" && !!t.translations && typeof t.translations == "object";
|
|
4837
|
+
});
|
|
4838
|
+
}
|
|
4862
4839
|
return v(() => {
|
|
4863
|
-
|
|
4840
|
+
f && clearTimeout(f);
|
|
4864
4841
|
}), (e, t) => (x(), o("div", {
|
|
4865
4842
|
class: "workspace-controls",
|
|
4866
4843
|
onPointerdown: t[2] ||= z(() => {}, ["stop"]),
|
|
4867
4844
|
onClick: t[3] ||= z(() => {}, ["stop"])
|
|
4868
4845
|
}, [
|
|
4869
|
-
n.debug ? (x(), o("div",
|
|
4846
|
+
n.debug ? (x(), o("div", sc, [s("button", {
|
|
4870
4847
|
type: "button",
|
|
4871
4848
|
class: "zoom-button icon",
|
|
4872
4849
|
"aria-label": "Copy data",
|
|
4873
4850
|
title: "Copy workspace data as JSON",
|
|
4874
|
-
disabled:
|
|
4875
|
-
onClick:
|
|
4876
|
-
}, A(
|
|
4851
|
+
disabled: u.value,
|
|
4852
|
+
onClick: y
|
|
4853
|
+
}, A(d.value === "copy" ? "check" : "content_copy"), 9, cc), s("button", {
|
|
4877
4854
|
type: "button",
|
|
4878
4855
|
class: "zoom-button icon",
|
|
4879
4856
|
"aria-label": "Paste data",
|
|
4880
4857
|
title: "Paste workspace data from JSON",
|
|
4881
|
-
disabled:
|
|
4882
|
-
onClick:
|
|
4883
|
-
}, A(
|
|
4884
|
-
s("div",
|
|
4858
|
+
disabled: u.value,
|
|
4859
|
+
onClick: b
|
|
4860
|
+
}, A(d.value === "paste" ? "check" : "content_paste"), 9, lc)])) : a("", !0),
|
|
4861
|
+
s("div", uc, [s("button", {
|
|
4885
4862
|
type: "button",
|
|
4886
4863
|
class: "zoom-button icon",
|
|
4887
4864
|
"aria-label": "Center canvas",
|
|
4888
4865
|
title: "Center canvas",
|
|
4889
|
-
onClick:
|
|
4866
|
+
onClick: _
|
|
4890
4867
|
}, "center_focus_strong"), s("button", {
|
|
4891
4868
|
type: "button",
|
|
4892
4869
|
class: h(["zoom-button icon", { active: n.pan }]),
|
|
4893
4870
|
"aria-label": "Move canvas",
|
|
4894
4871
|
title: "Move canvas",
|
|
4895
|
-
onClick:
|
|
4872
|
+
onClick: g
|
|
4896
4873
|
}, "pan_tool", 2)]),
|
|
4897
|
-
s("div",
|
|
4874
|
+
s("div", dc, [
|
|
4898
4875
|
s("button", {
|
|
4899
4876
|
type: "button",
|
|
4900
4877
|
class: "zoom-button icon",
|
|
4901
4878
|
"aria-label": "Zoom out",
|
|
4902
4879
|
title: "Zoom out",
|
|
4903
4880
|
disabled: n.modelValue <= .5,
|
|
4904
|
-
onClick: t[0] ||= (e) =>
|
|
4905
|
-
}, "remove", 8,
|
|
4881
|
+
onClick: t[0] ||= (e) => m(-.1)
|
|
4882
|
+
}, "remove", 8, fc),
|
|
4906
4883
|
s("span", null, A(Math.round(n.modelValue * 100)) + "%", 1),
|
|
4907
4884
|
s("button", {
|
|
4908
4885
|
type: "button",
|
|
@@ -4910,18 +4887,18 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
4910
4887
|
"aria-label": "Zoom in",
|
|
4911
4888
|
title: "Zoom in",
|
|
4912
4889
|
disabled: n.modelValue >= 1.25,
|
|
4913
|
-
onClick: t[1] ||= (e) =>
|
|
4914
|
-
}, "add", 8,
|
|
4890
|
+
onClick: t[1] ||= (e) => m(.1)
|
|
4891
|
+
}, "add", 8, pc)
|
|
4915
4892
|
])
|
|
4916
4893
|
], 32));
|
|
4917
4894
|
}
|
|
4918
|
-
}), [["__scopeId", "data-v-
|
|
4895
|
+
}), [["__scopeId", "data-v-19788344"]]), hc = {
|
|
4919
4896
|
key: 0,
|
|
4920
4897
|
class: "canvas-topbar"
|
|
4921
|
-
},
|
|
4898
|
+
}, gc = { class: "breadcrumb" }, _c = {
|
|
4922
4899
|
key: 1,
|
|
4923
4900
|
class: "theme-controls"
|
|
4924
|
-
},
|
|
4901
|
+
}, vc = ["aria-label", "title"], yc = { class: "device-switch" }, bc = { class: "canvas-frame-shell" }, xc = "aham-ui-designer-device", Sc = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
4925
4902
|
__name: "Workspace",
|
|
4926
4903
|
props: {
|
|
4927
4904
|
subject: {},
|
|
@@ -4940,10 +4917,10 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
4940
4917
|
scrollLeft: 0,
|
|
4941
4918
|
scrollTop: 0
|
|
4942
4919
|
}), T = C(), E = C(0), D, k = {
|
|
4943
|
-
phone:
|
|
4944
|
-
tablet:
|
|
4945
|
-
desktop:
|
|
4946
|
-
}, j = C(), N =
|
|
4920
|
+
phone: ac,
|
|
4921
|
+
tablet: oc,
|
|
4922
|
+
desktop: rc
|
|
4923
|
+
}, j = C(), N = ue(), F = U(), L = {
|
|
4947
4924
|
phone: 393,
|
|
4948
4925
|
tablet: 768,
|
|
4949
4926
|
desktop: 1920
|
|
@@ -4955,7 +4932,7 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
4955
4932
|
let e = N.documentProps[N.activeTemplateId ?? "default"]?.[d.value] ?? {}, t = e.padding === void 0 ? 24 : Number(e.padding);
|
|
4956
4933
|
return {
|
|
4957
4934
|
width: String(e.width ?? "100%"),
|
|
4958
|
-
|
|
4935
|
+
height: String(e.height ?? "100%"),
|
|
4959
4936
|
minHeight: `${Number(e.minHeight ?? 640)}px`,
|
|
4960
4937
|
padding: `${Number.isFinite(t) ? t : 0}px`,
|
|
4961
4938
|
background: String(e.background ?? "var(--color-background, var(--designer-panel))"),
|
|
@@ -4999,34 +4976,34 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
4999
4976
|
let t = e.target.closest("[data-overlayscrollbars-viewport]");
|
|
5000
4977
|
t && (t.scrollLeft = w.value.scrollLeft - (e.clientX - w.value.x), t.scrollTop = w.value.scrollTop - (e.clientY - w.value.y));
|
|
5001
4978
|
}
|
|
5002
|
-
function
|
|
4979
|
+
function G() {
|
|
5003
4980
|
S.value = !1;
|
|
5004
4981
|
}
|
|
5005
|
-
function
|
|
4982
|
+
function te() {
|
|
5006
4983
|
let e = T.value?.querySelector("[data-overlayscrollbars-viewport]");
|
|
5007
4984
|
e && (e.scrollLeft = Math.max(0, (e.scrollWidth - e.clientWidth) / 2), e.scrollTop = Math.max(0, (e.scrollHeight - e.clientHeight) / 2));
|
|
5008
4985
|
}
|
|
5009
|
-
function
|
|
4986
|
+
function ne(e) {
|
|
5010
4987
|
let t = e.target;
|
|
5011
4988
|
!c.preview && !t.closest(".component-handler") && N.selectDocument();
|
|
5012
4989
|
}
|
|
5013
|
-
function
|
|
4990
|
+
function K(e) {
|
|
5014
4991
|
c.preview || e.target.closest(".canvas-frame") || N.deselect();
|
|
5015
4992
|
}
|
|
5016
4993
|
t({ addComponent: H });
|
|
5017
|
-
function
|
|
4994
|
+
function re(e) {
|
|
5018
4995
|
d.value = e, N.setActiveDevice(e), f.value = e === "desktop" ? .75 : 1;
|
|
5019
4996
|
}
|
|
5020
4997
|
return y(() => {
|
|
5021
4998
|
N.setActiveDevice(d.value), D = new ResizeObserver(([e]) => {
|
|
5022
4999
|
E.value = e.contentRect.width;
|
|
5023
5000
|
}), T.value && D.observe(T.value);
|
|
5024
|
-
let e = localStorage.getItem(
|
|
5001
|
+
let e = localStorage.getItem(xc);
|
|
5025
5002
|
(e === "phone" || e === "tablet" || e === "desktop") && (d.value = e, f.value = e === "desktop" ? .75 : 1), m(() => {
|
|
5026
|
-
requestAnimationFrame(() => requestAnimationFrame(
|
|
5003
|
+
requestAnimationFrame(() => requestAnimationFrame(te));
|
|
5027
5004
|
});
|
|
5028
5005
|
}), v(() => D?.disconnect()), P(d, (e) => {
|
|
5029
|
-
N.setActiveDevice(e), localStorage.setItem(
|
|
5006
|
+
N.setActiveDevice(e), localStorage.setItem(xc, e);
|
|
5030
5007
|
}), P(() => c.templateId, (e) => {
|
|
5031
5008
|
N.setActiveTemplate(e, c.templateName ?? e);
|
|
5032
5009
|
}, { immediate: !0 }), P(() => c.templateName, (e) => {
|
|
@@ -5035,34 +5012,34 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5035
5012
|
ref_key: "canvasWrap",
|
|
5036
5013
|
ref: T,
|
|
5037
5014
|
class: h(["canvas-wrap", { preview: c.preview }])
|
|
5038
|
-
}, [c.preview ? a("", !0) : (x(), o("div",
|
|
5039
|
-
s("span",
|
|
5040
|
-
c.preview ? a("", !0) : (x(), i(
|
|
5015
|
+
}, [c.preview ? a("", !0) : (x(), o("div", hc, [
|
|
5016
|
+
s("span", gc, [u(Us)]),
|
|
5017
|
+
c.preview ? a("", !0) : (x(), i(mc, {
|
|
5041
5018
|
key: 0,
|
|
5042
5019
|
modelValue: f.value,
|
|
5043
5020
|
"onUpdate:modelValue": t[0] ||= (e) => f.value = e,
|
|
5044
5021
|
pan: b.value,
|
|
5045
5022
|
"onUpdate:pan": t[1] ||= (e) => b.value = e,
|
|
5046
5023
|
debug: c.debug,
|
|
5047
|
-
onCenter:
|
|
5024
|
+
onCenter: te
|
|
5048
5025
|
}, null, 8, [
|
|
5049
5026
|
"modelValue",
|
|
5050
5027
|
"pan",
|
|
5051
5028
|
"debug"
|
|
5052
5029
|
])),
|
|
5053
|
-
c.preview ? a("", !0) : (x(), o("div",
|
|
5030
|
+
c.preview ? a("", !0) : (x(), o("div", _c, [s("button", {
|
|
5054
5031
|
type: "button",
|
|
5055
5032
|
class: "theme-toggle icon",
|
|
5056
5033
|
"aria-label": c.contentDarkMode ? "Use light content theme" : "Use dark content theme",
|
|
5057
5034
|
title: c.contentDarkMode ? "Use light content theme" : "Use dark content theme",
|
|
5058
5035
|
onClick: t[2] ||= (e) => l("toggleContentTheme")
|
|
5059
|
-
}, A(c.contentDarkMode ? "light_mode" : "dark_mode"), 9,
|
|
5060
|
-
s("div",
|
|
5036
|
+
}, A(c.contentDarkMode ? "light_mode" : "dark_mode"), 9, vc)])),
|
|
5037
|
+
s("div", yc, [
|
|
5061
5038
|
s("button", {
|
|
5062
5039
|
type: "button",
|
|
5063
5040
|
class: h(["device-button", { active: d.value === "phone" }]),
|
|
5064
5041
|
"aria-label": "Phone preview",
|
|
5065
|
-
onClick: t[3] ||= (e) =>
|
|
5042
|
+
onClick: t[3] ||= (e) => re("phone")
|
|
5066
5043
|
}, [...t[6] ||= [s("span", {
|
|
5067
5044
|
class: "icon",
|
|
5068
5045
|
"aria-hidden": "true"
|
|
@@ -5071,7 +5048,7 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5071
5048
|
type: "button",
|
|
5072
5049
|
class: h(["device-button", { active: d.value === "tablet" }]),
|
|
5073
5050
|
"aria-label": "Tablet preview",
|
|
5074
|
-
onClick: t[4] ||= (e) =>
|
|
5051
|
+
onClick: t[4] ||= (e) => re("tablet")
|
|
5075
5052
|
}, [...t[7] ||= [s("span", {
|
|
5076
5053
|
class: "icon",
|
|
5077
5054
|
"aria-hidden": "true"
|
|
@@ -5080,7 +5057,7 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5080
5057
|
type: "button",
|
|
5081
5058
|
class: h(["device-button", { active: d.value === "desktop" }]),
|
|
5082
5059
|
"aria-label": "Desktop preview",
|
|
5083
|
-
onClick: t[5] ||= (e) =>
|
|
5060
|
+
onClick: t[5] ||= (e) => re("desktop")
|
|
5084
5061
|
}, [...t[8] ||= [s("span", {
|
|
5085
5062
|
class: "icon",
|
|
5086
5063
|
"aria-hidden": "true"
|
|
@@ -5092,14 +5069,14 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5092
5069
|
defer: "",
|
|
5093
5070
|
onPointerdownCapture: W,
|
|
5094
5071
|
onPointermoveCapture: ee,
|
|
5095
|
-
onPointerupCapture:
|
|
5096
|
-
onPointercancelCapture:
|
|
5072
|
+
onPointerupCapture: G,
|
|
5073
|
+
onPointercancelCapture: G
|
|
5097
5074
|
}, {
|
|
5098
5075
|
default: I(() => [s("div", {
|
|
5099
5076
|
class: h(["canvas-stage", `stage-${d.value}`]),
|
|
5100
5077
|
style: _({ "--canvas-zoom": R.value }),
|
|
5101
|
-
onClick:
|
|
5102
|
-
}, [s("div",
|
|
5078
|
+
onClick: K
|
|
5079
|
+
}, [s("div", bc, [s("div", {
|
|
5103
5080
|
class: h(["canvas-frame", [
|
|
5104
5081
|
`device-${d.value}`,
|
|
5105
5082
|
d.value,
|
|
@@ -5107,12 +5084,12 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5107
5084
|
]]),
|
|
5108
5085
|
style: _({ transform: `scale(${R.value})` }),
|
|
5109
5086
|
onPointerdownCapture: W,
|
|
5110
|
-
onClick:
|
|
5087
|
+
onClick: ne
|
|
5111
5088
|
}, [(x(), i(O(k[d.value]), g(p(d.value === "desktop" ? {} : void 0)), {
|
|
5112
5089
|
default: I(() => [s("div", {
|
|
5113
5090
|
class: "document-surface",
|
|
5114
5091
|
style: _(z.value)
|
|
5115
|
-
}, [u(
|
|
5092
|
+
}, [u(Qs, {
|
|
5116
5093
|
ref_key: "composer",
|
|
5117
5094
|
ref: j,
|
|
5118
5095
|
preview: c.preview,
|
|
@@ -5123,7 +5100,7 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5123
5100
|
_: 1
|
|
5124
5101
|
}, 8, ["class"])], 2));
|
|
5125
5102
|
}
|
|
5126
|
-
}), [["__scopeId", "data-v-
|
|
5103
|
+
}), [["__scopeId", "data-v-45d81c35"]]), Cc = ["data-theme", "data-theme-mode"], wc = { class: "contents" }, Tc = "aham-ui-designer-screens-height", Ec = "aham-ui-designer-theme", Dc = "aham-ui-designer-content-theme", Oc = /*#__PURE__*/ Q(/* @__PURE__ */ d({
|
|
5127
5104
|
__name: "Designer",
|
|
5128
5105
|
props: {
|
|
5129
5106
|
value: {},
|
|
@@ -5146,10 +5123,10 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5146
5123
|
violet: "#8b6fae",
|
|
5147
5124
|
amber: "#c9973f",
|
|
5148
5125
|
red: "#b8564a"
|
|
5149
|
-
}), w = C("--color-background"), T = C(!1), E = H(), D = U(), O =
|
|
5126
|
+
}), w = C("--color-background"), T = C(!1), E = H(), D = U(), O = ue(), k = C(!1), A = "", j = C(), N = !1, F, I = r(() => n.options?.theme?.mode ?? "default"), L = r(() => I.value === "custom" ? {} : {
|
|
5150
5127
|
...Object.fromEntries(D.variables.map((e) => [e.name, D.value(e, f.value)])),
|
|
5151
5128
|
...S.value.primary ? { "--color-primary": S.value.primary } : {}
|
|
5152
|
-
})
|
|
5129
|
+
}), R = r(() => {
|
|
5153
5130
|
let e = {
|
|
5154
5131
|
alert: {
|
|
5155
5132
|
label: "Alert",
|
|
@@ -5248,23 +5225,10 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5248
5225
|
depth: r
|
|
5249
5226
|
}, ...t(n.children ?? [], r + 1)]);
|
|
5250
5227
|
return t(O.components);
|
|
5251
|
-
})
|
|
5252
|
-
...e,
|
|
5253
|
-
complete: e.check ? e.check({ templates: c.value }) : e.complete
|
|
5254
|
-
})));
|
|
5228
|
+
});
|
|
5255
5229
|
P(() => n.options?.templates, (e) => {
|
|
5256
5230
|
c.value = e ? [...e] : [], !l.value && c.value[0] && (l.value = c.value[0].id);
|
|
5257
|
-
}, { immediate: !0 })
|
|
5258
|
-
e && E.setItems(e);
|
|
5259
|
-
}, { immediate: !0 }), P(() => n.options?.translationScreens, (e) => {
|
|
5260
|
-
Object.entries(e ?? {}).forEach(([e, t]) => {
|
|
5261
|
-
E.setScreenItems(e, t);
|
|
5262
|
-
});
|
|
5263
|
-
}), P(() => n.options?.translationComponents, (e) => {
|
|
5264
|
-
Object.entries(e ?? {}).forEach(([e, t]) => {
|
|
5265
|
-
E.setComponentItems(e, t);
|
|
5266
|
-
});
|
|
5267
|
-
});
|
|
5231
|
+
}, { immediate: !0 });
|
|
5268
5232
|
function z() {
|
|
5269
5233
|
let e = c.value.filter((e) => e.icon === "view_column").length, t = `layout-${Date.now()}`, n = {
|
|
5270
5234
|
id: t,
|
|
@@ -5291,74 +5255,84 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5291
5255
|
function ee() {
|
|
5292
5256
|
f.value = !f.value;
|
|
5293
5257
|
}
|
|
5294
|
-
function
|
|
5258
|
+
function G() {
|
|
5295
5259
|
p.value = !p.value;
|
|
5296
5260
|
}
|
|
5297
|
-
function
|
|
5261
|
+
function te() {
|
|
5298
5262
|
m.value = !m.value, m.value && (b.value = !1);
|
|
5299
5263
|
}
|
|
5300
|
-
function
|
|
5264
|
+
function ne(e) {
|
|
5301
5265
|
g.value = e, m.value = !0, b.value = !1;
|
|
5302
5266
|
}
|
|
5303
|
-
function
|
|
5267
|
+
function K() {
|
|
5304
5268
|
b.value = !b.value, b.value && (m.value = !1);
|
|
5305
5269
|
}
|
|
5306
|
-
function
|
|
5270
|
+
function re() {
|
|
5307
5271
|
T.value = !T.value, T.value && (m.value = !1, b.value = !1, O.deselect());
|
|
5308
5272
|
}
|
|
5309
|
-
function
|
|
5273
|
+
function ie(e, t) {
|
|
5310
5274
|
S.value[e] = t, e === "primary" && i("themeUpdate", t);
|
|
5311
5275
|
}
|
|
5312
|
-
function
|
|
5276
|
+
function ae(e) {
|
|
5313
5277
|
i("componentDrop", e);
|
|
5314
5278
|
}
|
|
5315
|
-
function
|
|
5279
|
+
function oe(e) {
|
|
5316
5280
|
j.value?.addComponent(e);
|
|
5317
5281
|
}
|
|
5318
|
-
function
|
|
5282
|
+
function se(e, t, n) {
|
|
5319
5283
|
E.updateValue(e, t, n), i("translationUpdate", e, t, n);
|
|
5320
5284
|
}
|
|
5321
|
-
function
|
|
5322
|
-
N && (N = !1, document.body.style.removeProperty("cursor"), document.removeEventListener("pointermove",
|
|
5285
|
+
function ce() {
|
|
5286
|
+
N && (N = !1, document.body.style.removeProperty("cursor"), document.removeEventListener("pointermove", de), document.removeEventListener("pointerup", ce));
|
|
5323
5287
|
}
|
|
5324
|
-
function
|
|
5288
|
+
function de(e) {
|
|
5325
5289
|
let t = a.value?.getBoundingClientRect();
|
|
5326
5290
|
if (!t) return;
|
|
5327
5291
|
let n = (e.clientY - t.top) / t.height * 100;
|
|
5328
5292
|
d.value = Math.min(80, Math.max(20, n));
|
|
5329
5293
|
}
|
|
5330
5294
|
function fe(e) {
|
|
5331
|
-
N = !0, document.body.style.cursor = "row-resize", document.addEventListener("pointermove",
|
|
5295
|
+
N = !0, document.body.style.cursor = "row-resize", document.addEventListener("pointermove", de), document.addEventListener("pointerup", ce), e.currentTarget.setPointerCapture?.(e.pointerId);
|
|
5332
5296
|
}
|
|
5333
5297
|
return y(() => {
|
|
5334
5298
|
A = `aham-ui-designer-workspace:${window.location.href}`;
|
|
5335
|
-
let e = Number(localStorage.getItem(
|
|
5336
|
-
Number.isFinite(e) && (d.value = Math.min(80, Math.max(20, e)))
|
|
5337
|
-
let t =
|
|
5338
|
-
|
|
5339
|
-
let e =
|
|
5340
|
-
|
|
5299
|
+
let e = Number(localStorage.getItem(Tc));
|
|
5300
|
+
Number.isFinite(e) && (d.value = Math.min(80, Math.max(20, e)));
|
|
5301
|
+
let t = document.documentElement.dataset.theme;
|
|
5302
|
+
f.value = t === "dark" || t !== "light" && localStorage.getItem(Ec) === "dark", p.value = localStorage.getItem(Dc) === "dark", F = new MutationObserver(() => {
|
|
5303
|
+
let e = document.documentElement.dataset.theme;
|
|
5304
|
+
(e === "dark" || e === "light") && (f.value = e === "dark");
|
|
5305
|
+
}), F.observe(document.documentElement, {
|
|
5306
|
+
attributes: !0,
|
|
5307
|
+
attributeFilter: ["data-theme"]
|
|
5308
|
+
});
|
|
5309
|
+
let n = localStorage.getItem(A);
|
|
5310
|
+
if (n) try {
|
|
5311
|
+
let e = JSON.parse(n);
|
|
5312
|
+
le(e) && O.importData(e);
|
|
5341
5313
|
} catch {
|
|
5342
5314
|
localStorage.removeItem(A);
|
|
5343
5315
|
}
|
|
5344
5316
|
k.value = !0;
|
|
5345
5317
|
}), P(d, (e) => {
|
|
5346
|
-
localStorage.setItem(
|
|
5347
|
-
}), P([f,
|
|
5348
|
-
t === "default" && localStorage.setItem(
|
|
5318
|
+
localStorage.setItem(Tc, String(e));
|
|
5319
|
+
}), P([f, I], ([e, t]) => {
|
|
5320
|
+
t === "default" && localStorage.setItem(Ec, e ? "dark" : "light");
|
|
5349
5321
|
}), P(p, (e) => {
|
|
5350
|
-
localStorage.setItem(
|
|
5322
|
+
localStorage.setItem(Dc, e ? "dark" : "light");
|
|
5351
5323
|
}), P(() => O.$state, () => {
|
|
5352
5324
|
k.value && localStorage.setItem(A, JSON.stringify(O.exportData()));
|
|
5353
|
-
}, { deep: !0 }), v(
|
|
5325
|
+
}, { deep: !0 }), v(() => {
|
|
5326
|
+
ce(), F?.disconnect();
|
|
5327
|
+
}), (t, r) => (x(), o("section", {
|
|
5354
5328
|
class: h(["ui-designer", { "preview-mode": T.value }]),
|
|
5355
5329
|
"data-theme": f.value ? "dark" : "light",
|
|
5356
|
-
"data-theme-mode":
|
|
5330
|
+
"data-theme-mode": I.value,
|
|
5357
5331
|
style: _({
|
|
5358
5332
|
"--designer-violet": S.value.violet,
|
|
5359
5333
|
"--designer-amber": S.value.amber,
|
|
5360
5334
|
"--designer-danger": S.value.red,
|
|
5361
|
-
...
|
|
5335
|
+
...L.value
|
|
5362
5336
|
})
|
|
5363
5337
|
}, [
|
|
5364
5338
|
u(Ki, {
|
|
@@ -5366,33 +5340,36 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5366
5340
|
shared: e.options?.shared,
|
|
5367
5341
|
"dark-mode-changeable": e.options?.theme?.darkModeChangeable,
|
|
5368
5342
|
"dark-mode": f.value,
|
|
5343
|
+
"content-dark-mode": p.value,
|
|
5369
5344
|
"translations-open": m.value,
|
|
5370
5345
|
"theme-open": b.value,
|
|
5371
5346
|
"preview-open": T.value,
|
|
5372
5347
|
"more-items": e.options?.moreItems,
|
|
5373
5348
|
onMoreSelect: W,
|
|
5374
5349
|
onToggleTheme: ee,
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5350
|
+
onToggleContentTheme: G,
|
|
5351
|
+
onToggleTranslations: te,
|
|
5352
|
+
onToggleThemePanel: K,
|
|
5353
|
+
onTogglePreview: re
|
|
5378
5354
|
}, null, 8, [
|
|
5379
5355
|
"subject",
|
|
5380
5356
|
"shared",
|
|
5381
5357
|
"dark-mode-changeable",
|
|
5382
5358
|
"dark-mode",
|
|
5359
|
+
"content-dark-mode",
|
|
5383
5360
|
"translations-open",
|
|
5384
5361
|
"theme-open",
|
|
5385
5362
|
"preview-open",
|
|
5386
5363
|
"more-items"
|
|
5387
5364
|
]),
|
|
5388
|
-
s("div",
|
|
5365
|
+
s("div", wc, [
|
|
5389
5366
|
s("aside", null, [s("div", {
|
|
5390
5367
|
ref_key: "sidebarPanels",
|
|
5391
5368
|
ref: a,
|
|
5392
5369
|
class: "sidebar-panels",
|
|
5393
5370
|
style: _({ "--screens-height": `${d.value}%` })
|
|
5394
5371
|
}, [
|
|
5395
|
-
u(
|
|
5372
|
+
u(ts, {
|
|
5396
5373
|
templates: c.value,
|
|
5397
5374
|
"focused-template-id": l.value,
|
|
5398
5375
|
onAdd: z,
|
|
@@ -5405,9 +5382,9 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5405
5382
|
"aria-label": "Resize screens and components panels",
|
|
5406
5383
|
onPointerdown: fe
|
|
5407
5384
|
}, [...r[7] ||= [s("span", { "aria-hidden": "true" }, null, -1)]], 32),
|
|
5408
|
-
u(ki, { onSelect:
|
|
5409
|
-
], 4)
|
|
5410
|
-
u(
|
|
5385
|
+
u(ki, { onSelect: oe })
|
|
5386
|
+
], 4)]),
|
|
5387
|
+
u(Sc, {
|
|
5411
5388
|
ref_key: "workspace",
|
|
5412
5389
|
ref: j,
|
|
5413
5390
|
class: "workspace",
|
|
@@ -5418,8 +5395,8 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5418
5395
|
"content-primary": S.value.primary,
|
|
5419
5396
|
"template-id": l.value,
|
|
5420
5397
|
"template-name": c.value.find(({ id: e }) => e === l.value)?.name,
|
|
5421
|
-
onComponentDrop:
|
|
5422
|
-
onToggleContentTheme:
|
|
5398
|
+
onComponentDrop: ae,
|
|
5399
|
+
onToggleContentTheme: G
|
|
5423
5400
|
}, null, 8, [
|
|
5424
5401
|
"subject",
|
|
5425
5402
|
"preview",
|
|
@@ -5431,43 +5408,43 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5431
5408
|
]),
|
|
5432
5409
|
u(Uo, {
|
|
5433
5410
|
class: "properties",
|
|
5434
|
-
layers:
|
|
5411
|
+
layers: R.value,
|
|
5435
5412
|
"selected-component": M(O).selectedComponent,
|
|
5436
5413
|
"content-dark-mode": p.value,
|
|
5437
5414
|
onUpdateProps: r[0] ||= (e) => M(O).selectedComponent && M(O).updateComponentProps(M(O).selectedComponent.id, e),
|
|
5438
5415
|
onSelectLayer: r[1] ||= (e) => M(O).selectComponentById(e),
|
|
5439
5416
|
onReorderLayer: r[2] ||= (e, t) => M(O).moveComponentBefore(e, t),
|
|
5440
5417
|
onMoveIntoLayer: r[3] ||= (e, t) => M(O).moveComponentInto(e, t),
|
|
5441
|
-
onFocusTranslation:
|
|
5418
|
+
onFocusTranslation: ne
|
|
5442
5419
|
}, null, 8, [
|
|
5443
5420
|
"layers",
|
|
5444
5421
|
"selected-component",
|
|
5445
5422
|
"content-dark-mode"
|
|
5446
5423
|
])
|
|
5447
5424
|
]),
|
|
5448
|
-
u(
|
|
5425
|
+
u(Rs, {
|
|
5449
5426
|
open: m.value,
|
|
5450
5427
|
"focused-field-id": g.value,
|
|
5451
5428
|
onClose: r[4] ||= (e) => m.value = !1,
|
|
5452
|
-
onUpdate:
|
|
5429
|
+
onUpdate: se
|
|
5453
5430
|
}, null, 8, ["open", "focused-field-id"]),
|
|
5454
|
-
u(
|
|
5431
|
+
u(vs, {
|
|
5455
5432
|
open: b.value,
|
|
5456
5433
|
colors: S.value,
|
|
5457
|
-
"dark-mode":
|
|
5434
|
+
"dark-mode": p.value,
|
|
5458
5435
|
"background-variable": w.value,
|
|
5459
5436
|
onClose: r[5] ||= (e) => b.value = !1,
|
|
5460
|
-
onUpdate:
|
|
5461
|
-
onMode: r[6] ||= (e) =>
|
|
5437
|
+
onUpdate: ie,
|
|
5438
|
+
onMode: r[6] ||= (e) => p.value = e
|
|
5462
5439
|
}, null, 8, [
|
|
5463
5440
|
"open",
|
|
5464
5441
|
"colors",
|
|
5465
5442
|
"dark-mode",
|
|
5466
5443
|
"background-variable"
|
|
5467
5444
|
])
|
|
5468
|
-
], 14,
|
|
5445
|
+
], 14, Cc));
|
|
5469
5446
|
}
|
|
5470
|
-
}), [["__scopeId", "data-v-
|
|
5447
|
+
}), [["__scopeId", "data-v-92f98f16"]]), kc = B("checklist", {
|
|
5471
5448
|
state: () => ({ items: [{
|
|
5472
5449
|
id: "all-screens-completed",
|
|
5473
5450
|
label: "All screens completed",
|
|
@@ -5487,4 +5464,4 @@ var sc = /*#__PURE__*/ Q(rc, [["render", oc], ["__scopeId", "data-v-ddbb2283"]])
|
|
|
5487
5464
|
}
|
|
5488
5465
|
});
|
|
5489
5466
|
//#endregion
|
|
5490
|
-
export { oo as Alert, ma as Card, Wa as Checkbox, sa as Color, Ji as ColorPicker,
|
|
5467
|
+
export { oo as Alert, ma as Card, Wa as Checkbox, sa as Color, Ji as ColorPicker, Js as ComponentHandler, Qs as Composer, uo as ConsentCard, pa as Container, co as Content, Oc as Designer, rc as Desktop, ic as Device, va as Divider, go as Document, Da as EmailInput, Xa as Heading, io as Image, ya as Layout, Ca as LayoutRef, ac as Mobile, Va as OtpInput, La as PasswordInput, Gs as Renderer, po as ScopeList, qa as SocialButton, ha as Spacer, Ga as SubmitButton, oc as Tablet, Qa as Text, Ma as TextInput, Ya as TextLink, vi as TextScroller, vs as ThemeSidebar, kc as useChecklistStore, zs as useTemplatesStore, U as useThemeStore, H as useTranslationStore, ue as useWorkspaceStore, $ as withEditable };
|