@cratis/event-models 0.225.1 → 0.226.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -0
- package/dist/Headers/AnnotationBadge.d.ts +6 -0
- package/dist/Headers/annotationSeverity.d.ts +2 -0
- package/dist/Headers/index.d.ts +2 -0
- package/dist/Messages/EventModelMessages.d.ts +6 -0
- package/dist/Model/AnnotationSeverity.d.ts +5 -0
- package/dist/Model/Slice.d.ts +2 -0
- package/dist/Model/SliceAnnotation.d.ts +8 -0
- package/dist/Model/index.d.ts +2 -0
- package/dist/Reading/readSliceAnnotation.d.ts +3 -0
- package/dist/Rows/Events/EventCard.d.ts +3 -2
- package/dist/Rows/Events/EventMarker.d.ts +6 -0
- package/dist/Rows/Events/EventReferenceCard.d.ts +3 -2
- package/dist/Slices/SliceHeaderSlice.d.ts +1 -1
- package/dist/event-model-document.schema.json +21 -0
- package/dist/event-models.css +1 -1
- package/dist/index.js +2800 -2730
- package/dist/index.js.map +1 -1
- package/dist/screen-editor/ScreenEditor/DesignMode/DesignModeStrings.d.ts +1 -0
- package/dist/screen-editor/index.js +765 -739
- package/package.json +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { c as Ja, d as Qa, f as ze, l as tr, m as oo, p as Ya, s as Xa, t as nr, u as Xt } from "./defaultStructuredEditorStrings-Ch1I0Lci.js";
|
|
2
2
|
import { t as or } from "./QueryBindingEditor-MTd0R7iQ.js";
|
|
3
3
|
import { i as Za, n as es, r as ts, t as ns } from "./toTemplateSources-Chd2UNJQ.js";
|
|
4
|
-
import { _ as os, a as
|
|
4
|
+
import { _ as os, a as fv, c as Ho, d as ir, f as is, g as gv, h as rs, i as as, l as vv, m as ss, n as bv, o as ln, p as rr, r as ls, s as yv, t as wv, u as kv, v as Sv, y as Cv } from "./structuredValue-vqCZttsk.js";
|
|
5
5
|
import { a as we, n as cs, r as ds } from "./iconDiagnostics-Ds4CnqD0.js";
|
|
6
|
-
import { t as
|
|
6
|
+
import { t as Iv } from "./StructuredValueEditor-DUSATTWd.js";
|
|
7
7
|
import { createContext as us, createElement as wt, useCallback as z, useContext as ps, useEffect as ce, useId as ms, useLayoutEffect as Se, useMemo as U, useRef as V, useState as j } from "react";
|
|
8
8
|
import { Fragment as le, jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
9
|
-
import { BindingMode as
|
|
9
|
+
import { BindingMode as Dv, BindingNullBehavior as Rv, BindingSourceKind as Fv, BindingSourceKind as xt, CollectionOperation as ke, ColorScheme as hs, ComponentCategory as fs, DestinationKind as Ev, DestinationKind as ar, DiagnosticCode as gs, EditTarget as vs, EditingScopeKind as Vt, FlowContainerKind as cn, FormGenerationMode as ge, FormWidthUnit as Ce, GridUnitType as bs, HorizontalAlignment as io, InteractionActionKind as lt, InteractionTriggerKind as sr, NavigationRegionKind as Go, NavigationRegionMode as De, Orientation as ct, PackageKind as dt, PropertyEditorKind as X, PropertyValueType as K, ProvenanceKind as qo, QueryOriginKind as ys, QueryResultShape as ws, SceneEditKind as Y, SceneNodeKind as ks, TemplateReferenceSource as Ss, TemplateScope as Cs, ValueSource as lr, VerticalAlignment as ro, Visibility as ao, componentCategories as Ns } from "@cratis/scene.model";
|
|
10
10
|
import { ApplicationStructureIndex as Zt, EffectiveIconCatalog as Ts, NavigationEditKind as Ko, TemplateCatalogKind as cr, ToolbarDiagnosticSeverity as Is, addNavItem as Ps, applicableTemplates as xs, applyEdit as dr, applyNavigationEdits as Os, baseComponentLibraries as Ds, componentArgumentSourcePrefix as Rs, componentBadge as Vo, computeSizeClass as Fs, corePackage as so, createDescriptorCatalog as Es, diagnoseNavigationRegions as Ms, effectiveNavigation as ur, effectivePackages as pr, elementNodeId as re, findComponentDescriptor as lo, findLayoutTypeDescriptor as Jo, inspect as co, isCanvas as ut, isDockPanel as As, isExternalComponent as qe, isGrid as uo, isPackageSelectionValid as _s, isPanel as jt, isStackPanel as po, isThemeCompatible as $s, isWrapPanel as Ls, matchComponentQuery as Bs, normalizeToolbarButton as js, packagesOfKind as Qo, rankFrequentlyUsedComponents as Us, resolveComponentName as Tt, resolveEffectiveConfiguration as mr, resolveIconLibraries as Ws, resolvePackageDependencies as zs, resolveTemplateChain as mo, resolveToolbarButton as Hs, setApplicationLogo as Gs, switchRegionMode as hr, toComponentCatalog as en, toolbarButtonFromItem as ho, validateToolbarButtons as qs, validateValue as dn } from "@cratis/scene.engine";
|
|
11
11
|
import { ErrorBoundary as Ve, IconButton as xe, Tabs as Ks } from "@cratis/components/Common";
|
|
12
12
|
import { ColorScheme as Vs, ComponentName as Js, LayoutConfigProvider as fr, LayoutMode as Qs, LayoutName as Ys, TemplatePreviewState as at, applyTemplatePreviewState as Xs, composeApplicationScreen as Zs, composeScreenElement as el, defaultApplicationChrome as tl, defaultBlueprint as gr, defaultBlueprintName as vr, effectiveShellOf as br, externalComponent as fo, foundationSamples as nl, previewProfile as ol, resolveElementComponentNames as go } from "@cratis/scene.blueprint.default";
|
|
@@ -132,38 +132,38 @@ var Qd = (e) => e ? {
|
|
|
132
132
|
height: window.innerHeight
|
|
133
133
|
}));
|
|
134
134
|
ce(() => {
|
|
135
|
-
const
|
|
135
|
+
const M = () => m({
|
|
136
136
|
width: window.innerWidth,
|
|
137
137
|
height: window.innerHeight
|
|
138
138
|
});
|
|
139
|
-
return window.addEventListener("resize",
|
|
139
|
+
return window.addEventListener("resize", M), () => window.removeEventListener("resize", M);
|
|
140
140
|
}, []);
|
|
141
|
-
const v = z(() => f((
|
|
141
|
+
const v = z(() => f((M) => !M), []), w = V(null);
|
|
142
142
|
ce(() => {
|
|
143
|
-
const
|
|
144
|
-
return () => cancelAnimationFrame(
|
|
143
|
+
const M = requestAnimationFrame(() => c("visible"));
|
|
144
|
+
return () => cancelAnimationFrame(M);
|
|
145
145
|
}, []);
|
|
146
146
|
const P = z(async () => {
|
|
147
147
|
r && !await r(p.current) || (c("closing"), setTimeout(() => s(p.current), 300));
|
|
148
|
-
}, [r, s]), x = (
|
|
148
|
+
}, [r, s]), x = (M, q) => {
|
|
149
149
|
q.stopPropagation(), q.preventDefault(), w.current = {
|
|
150
|
-
direction:
|
|
150
|
+
direction: M,
|
|
151
151
|
startX: q.clientX,
|
|
152
152
|
startY: q.clientY,
|
|
153
153
|
startWidth: u.width,
|
|
154
154
|
startHeight: u.height
|
|
155
155
|
}, q.target.setPointerCapture(q.pointerId);
|
|
156
|
-
},
|
|
156
|
+
}, S = z((M) => {
|
|
157
157
|
const q = w.current;
|
|
158
158
|
if (!q) return;
|
|
159
159
|
const { direction: ne } = q;
|
|
160
160
|
let ye = q.startWidth, me = q.startHeight;
|
|
161
161
|
if (ne.includes("e") || ne.includes("w")) {
|
|
162
|
-
const ue = ne.includes("e") ?
|
|
162
|
+
const ue = ne.includes("e") ? M.clientX - q.startX : q.startX - M.clientX;
|
|
163
163
|
ye = Math.max(Vd, q.startWidth + ue * 2);
|
|
164
164
|
}
|
|
165
165
|
if (ne.includes("s") || ne.includes("n")) {
|
|
166
|
-
const ue = ne.includes("s") ?
|
|
166
|
+
const ue = ne.includes("s") ? M.clientY - q.startY : q.startY - M.clientY;
|
|
167
167
|
me = Math.max(Jd, q.startHeight + ue * 2);
|
|
168
168
|
}
|
|
169
169
|
d({
|
|
@@ -172,7 +172,7 @@ var Qd = (e) => e ? {
|
|
|
172
172
|
});
|
|
173
173
|
}, []), k = z(() => {
|
|
174
174
|
w.current = null;
|
|
175
|
-
}, []), y = Kd(u, g, n - (h ? 360 / 2 : 0)),
|
|
175
|
+
}, []), y = Kd(u, g, n - (h ? 360 / 2 : 0)), N = y.offsetX, A = {
|
|
176
176
|
size: u,
|
|
177
177
|
setSize: d,
|
|
178
178
|
isInspectorOpen: h,
|
|
@@ -180,42 +180,42 @@ var Qd = (e) => e ? {
|
|
|
180
180
|
close: () => {
|
|
181
181
|
P();
|
|
182
182
|
}
|
|
183
|
-
},
|
|
183
|
+
}, T = e.left + e.width / 2, C = e.top + e.height / 2, _ = g.width / 2 + N - y.width / 2, L = g.height / 2 - y.height / 2, D = `${T - _}px ${C - L}px`, I = [
|
|
184
184
|
"prototype-editor-overlay-content",
|
|
185
185
|
l === "visible" ? "prototype-editor-overlay-content--visible" : "",
|
|
186
186
|
l === "closing" ? "prototype-editor-overlay-content--closing" : ""
|
|
187
|
-
].join(" "),
|
|
187
|
+
].join(" "), F = ["prototype-editor-overlay-backdrop", l === "visible" ? "prototype-editor-overlay-backdrop--visible" : ""].join(" ");
|
|
188
188
|
return /* @__PURE__ */ b("div", {
|
|
189
|
-
className:
|
|
189
|
+
className: F,
|
|
190
190
|
"data-testid": "studio-screen-editor-backdrop",
|
|
191
191
|
onClick: P,
|
|
192
192
|
children: [/* @__PURE__ */ b("div", {
|
|
193
|
-
className:
|
|
193
|
+
className: I,
|
|
194
194
|
"data-testid": "studio-screen-editor-frame",
|
|
195
195
|
style: {
|
|
196
|
-
transformOrigin:
|
|
196
|
+
transformOrigin: D,
|
|
197
197
|
width: y.width,
|
|
198
198
|
height: y.height,
|
|
199
|
-
marginLeft: -(y.width / 2) +
|
|
199
|
+
marginLeft: -(y.width / 2) + N,
|
|
200
200
|
marginTop: -(y.height / 2)
|
|
201
201
|
},
|
|
202
|
-
onClick: (
|
|
203
|
-
onPointerDown: (
|
|
204
|
-
children: [l === "visible" && Yd.map((
|
|
205
|
-
className: `prototype-editor-overlay-resize prototype-editor-overlay-resize--${
|
|
206
|
-
onPointerDown: (q) => x(
|
|
207
|
-
onPointerMove:
|
|
202
|
+
onClick: (M) => M.stopPropagation(),
|
|
203
|
+
onPointerDown: (M) => M.stopPropagation(),
|
|
204
|
+
children: [l === "visible" && Yd.map((M) => /* @__PURE__ */ a("div", {
|
|
205
|
+
className: `prototype-editor-overlay-resize prototype-editor-overlay-resize--${M}`,
|
|
206
|
+
onPointerDown: (q) => x(M, q),
|
|
207
|
+
onPointerMove: S,
|
|
208
208
|
onPointerUp: k,
|
|
209
209
|
onPointerCancel: k
|
|
210
|
-
},
|
|
210
|
+
}, M)), o(A)]
|
|
211
211
|
}), i && /* @__PURE__ */ a("aside", {
|
|
212
212
|
className: `prototype-editor-overlay-inspector${h && l === "visible" ? " prototype-editor-overlay-inspector--open" : ""}`,
|
|
213
213
|
style: { width: 360 },
|
|
214
214
|
"aria-hidden": !h,
|
|
215
215
|
inert: !h,
|
|
216
|
-
onClick: (
|
|
217
|
-
onPointerDown: (
|
|
218
|
-
children: i(
|
|
216
|
+
onClick: (M) => M.stopPropagation(),
|
|
217
|
+
onPointerDown: (M) => M.stopPropagation(),
|
|
218
|
+
children: i(A)
|
|
219
219
|
})]
|
|
220
220
|
});
|
|
221
221
|
}, wo = {
|
|
@@ -344,10 +344,10 @@ function zt(e, t = () => {
|
|
|
344
344
|
}
|
|
345
345
|
var fe = (e, t) => typeof e == "number" ? e : t;
|
|
346
346
|
function Ur(e, t) {
|
|
347
|
-
const n = e, o = { ...n.properties ?? {} }, i = Xt(e).map((
|
|
347
|
+
const n = e, o = { ...n.properties ?? {} }, i = Xt(e).map((S) => Ur(S, t)), r = o[cu];
|
|
348
348
|
if (r != null && typeof r == "object") return mu(r, n, o, i);
|
|
349
349
|
const s = o[fi], l = typeof o.legacyType == "string" && o.legacyType !== "" ? o[hi] : void 0, c = l ?? (jt(e) ? lu(jr(e)) : t(qe(e) ? e.componentName : "")), u = qe(e) ? e.componentName : "", { [hi]: d, [fi]: p, [Je]: h, [Qe]: f, ...g } = o, m = {};
|
|
350
|
-
for (const
|
|
350
|
+
for (const S of s?.topKeys ?? []) S in g && (m[S] = g[S], delete g[S]);
|
|
351
351
|
const v = fe(h, s?.position.x ?? 0), w = fe(f, s?.position.y ?? 0), P = n.name ?? "", x = s?.emptyName === !0 && P === (l ?? "");
|
|
352
352
|
return {
|
|
353
353
|
...pu(n, s),
|
|
@@ -600,64 +600,64 @@ var gi = {
|
|
|
600
600
|
ArrowRight: Re.Indent
|
|
601
601
|
};
|
|
602
602
|
function qr({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEdit: r, onRemove: s }) {
|
|
603
|
-
const [l, c] = j(() => new Set(e.flatMap((
|
|
603
|
+
const [l, c] = j(() => new Set(e.flatMap((T) => [t.idOf(T), ...t.childrenOf(T).map((C) => t.idOf(C))]))), [u, d] = j(o), [p, h] = j(), [f, g] = j(), [m, v] = j(""), w = U(() => Hr(e, l, t), [
|
|
604
604
|
e,
|
|
605
605
|
l,
|
|
606
606
|
t
|
|
607
|
-
]), P = w.some((
|
|
608
|
-
const
|
|
609
|
-
return
|
|
610
|
-
}), []),
|
|
611
|
-
if (!
|
|
612
|
-
const
|
|
613
|
-
v(
|
|
614
|
-
}, [r, n]), k = (
|
|
615
|
-
|
|
616
|
-
}, y = (
|
|
617
|
-
const
|
|
618
|
-
if (
|
|
619
|
-
|
|
607
|
+
]), P = w.some((T) => T.id === u) ? u : w[0]?.id, x = z((T) => c((C) => {
|
|
608
|
+
const _ = new Set(C);
|
|
609
|
+
return _.delete(T) || _.add(T), _;
|
|
610
|
+
}), []), S = z((T) => {
|
|
611
|
+
if (!T) return;
|
|
612
|
+
const C = r(T);
|
|
613
|
+
v(C ? n.rejection[C] : n.moved), !C && T.targetParentId && c((_) => new Set(_).add(T.targetParentId));
|
|
614
|
+
}, [r, n]), k = (T) => {
|
|
615
|
+
T && (d(T), requestAnimationFrame(() => document.querySelector(`[data-row-id="${CSS.escape(T)}"]`)?.focus()));
|
|
616
|
+
}, y = (T, C) => {
|
|
617
|
+
const _ = w.findIndex((D) => D.id === C), L = w[_];
|
|
618
|
+
if (T.altKey && gi[T.key]) {
|
|
619
|
+
T.preventDefault(), S(fu(e, C, gi[T.key], t)), k(C);
|
|
620
620
|
return;
|
|
621
621
|
}
|
|
622
|
-
if (ko(
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
s(
|
|
622
|
+
if (ko(T) && s && jn(e, C, t)) {
|
|
623
|
+
T.preventDefault();
|
|
624
|
+
const D = zr(e, C, t);
|
|
625
|
+
s(C), k(D);
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
switch (
|
|
628
|
+
switch (T.key) {
|
|
629
629
|
case "ArrowDown":
|
|
630
|
-
|
|
630
|
+
T.preventDefault(), k(w[_ + 1]?.id);
|
|
631
631
|
break;
|
|
632
632
|
case "ArrowUp":
|
|
633
|
-
|
|
633
|
+
T.preventDefault(), k(w[_ - 1]?.id);
|
|
634
634
|
break;
|
|
635
635
|
case "Home":
|
|
636
|
-
|
|
636
|
+
T.preventDefault(), k(w[0]?.id);
|
|
637
637
|
break;
|
|
638
638
|
case "End":
|
|
639
|
-
|
|
639
|
+
T.preventDefault(), k(w[w.length - 1]?.id);
|
|
640
640
|
break;
|
|
641
641
|
case "ArrowRight":
|
|
642
|
-
|
|
642
|
+
T.preventDefault(), L.hasChildren && !L.isExpanded ? x(C) : k(w[_ + 1]?.parentId === C ? w[_ + 1].id : void 0);
|
|
643
643
|
break;
|
|
644
644
|
case "ArrowLeft":
|
|
645
|
-
|
|
645
|
+
T.preventDefault(), L.isExpanded ? x(C) : k(L.parentId ?? void 0);
|
|
646
646
|
break;
|
|
647
647
|
case "Enter":
|
|
648
648
|
case " ":
|
|
649
|
-
|
|
649
|
+
T.preventDefault(), i(C);
|
|
650
650
|
}
|
|
651
|
-
},
|
|
651
|
+
}, N = (T, C) => {
|
|
652
652
|
if (!p) return;
|
|
653
|
-
|
|
654
|
-
const
|
|
653
|
+
T.preventDefault();
|
|
654
|
+
const _ = T.currentTarget.getBoundingClientRect(), L = w.find((D) => D.id === C);
|
|
655
655
|
g({
|
|
656
|
-
id:
|
|
657
|
-
zone: vu(
|
|
656
|
+
id: C,
|
|
657
|
+
zone: vu(T.clientY - _.top, _.height, !!L && t.acceptsChildren(L.node))
|
|
658
658
|
});
|
|
659
|
-
},
|
|
660
|
-
|
|
659
|
+
}, A = (T, C) => {
|
|
660
|
+
T.preventDefault(), p && f?.id === C && S(gu(e, p, C, f.zone, t)), h(void 0), g(void 0);
|
|
661
661
|
};
|
|
662
662
|
return w.length === 0 ? /* @__PURE__ */ a("p", {
|
|
663
663
|
className: "studio-editor-structure-empty",
|
|
@@ -666,25 +666,25 @@ function qr({ roots: e, adapter: t, strings: n, selectedId: o, onSelect: i, onEd
|
|
|
666
666
|
role: "tree",
|
|
667
667
|
"aria-label": n.structureLabel,
|
|
668
668
|
className: "studio-editor-structure-tree",
|
|
669
|
-
children: w.map((
|
|
670
|
-
row:
|
|
669
|
+
children: w.map((T) => /* @__PURE__ */ a(bu, {
|
|
670
|
+
row: T,
|
|
671
671
|
adapter: t,
|
|
672
672
|
strings: n,
|
|
673
|
-
isSelected:
|
|
674
|
-
isFocusable:
|
|
675
|
-
dropZone: f?.id ===
|
|
676
|
-
onSelect: (
|
|
677
|
-
d(
|
|
673
|
+
isSelected: T.id === o,
|
|
674
|
+
isFocusable: T.id === P,
|
|
675
|
+
dropZone: f?.id === T.id ? f.zone : void 0,
|
|
676
|
+
onSelect: (C) => {
|
|
677
|
+
d(C), i(C);
|
|
678
678
|
},
|
|
679
679
|
onToggle: x,
|
|
680
680
|
onKeyDown: y,
|
|
681
681
|
onDragStart: h,
|
|
682
|
-
onDragOver:
|
|
683
|
-
onDrop:
|
|
682
|
+
onDragOver: N,
|
|
683
|
+
onDrop: A,
|
|
684
684
|
onDragEnd: () => {
|
|
685
685
|
h(void 0), g(void 0);
|
|
686
686
|
}
|
|
687
|
-
},
|
|
687
|
+
}, T.id))
|
|
688
688
|
}), /* @__PURE__ */ a("p", {
|
|
689
689
|
className: "studio-editor-structure-announcement",
|
|
690
690
|
role: "status",
|
|
@@ -2135,13 +2135,13 @@ function Si(e, t) {
|
|
|
2135
2135
|
};
|
|
2136
2136
|
}
|
|
2137
2137
|
var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, diagnostics: r, presentation: s = "field" }) => {
|
|
2138
|
-
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ja(t), { editor: h, failed: f } = Si(e, d?.id), { editor: g } = Si(e, p ? "bindingExpression" : void 0), m = n.strings.editors, v = !t.editable || c.readOnly === !0, w = t.editable ? c.readOnly === !0 ? m.readOnly : void 0 : t.reason ?? m.inherited, P = t.effectiveValue, x = Fp(t, r),
|
|
2138
|
+
const l = s === "popover", { descriptor: c } = t, u = `pe-${o}-${c.path}`.replace(/[^A-Za-z0-9_-]/g, "-"), d = e.resolve(c), p = Ja(t), { editor: h, failed: f } = Si(e, d?.id), { editor: g } = Si(e, p ? "bindingExpression" : void 0), m = n.strings.editors, v = !t.editable || c.readOnly === !0, w = t.editable ? c.readOnly === !0 ? m.readOnly : void 0 : t.reason ?? m.inherited, P = t.effectiveValue, x = Fp(t, r), S = P == null || !Ho(c) ? void 0 : dn(c, P) ?? Hn(c, P), k = S !== void 0 && dn(c, P) !== void 0 ? os(c, P) : void 0, y = k !== void 0 && dn(c, k) === void 0, N = (_) => i(t, _), A = p && Xa(P), T = c.valueType === "boolean", C = Ho(c);
|
|
2139
2139
|
return /* @__PURE__ */ b("div", {
|
|
2140
|
-
className: `studio-editor-field${
|
|
2140
|
+
className: `studio-editor-field${T ? " studio-editor-field--inline" : ""}`,
|
|
2141
2141
|
"data-property": c.path,
|
|
2142
2142
|
"data-editor": d?.id,
|
|
2143
2143
|
children: [
|
|
2144
|
-
|
|
2144
|
+
C || l ? /* @__PURE__ */ a("span", {
|
|
2145
2145
|
id: `${u}-label`,
|
|
2146
2146
|
hidden: !0,
|
|
2147
2147
|
children: c.label
|
|
@@ -2153,25 +2153,25 @@ var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
2153
2153
|
}),
|
|
2154
2154
|
/* @__PURE__ */ b("div", {
|
|
2155
2155
|
className: "studio-editor-field__control",
|
|
2156
|
-
children: [
|
|
2156
|
+
children: [S !== void 0 ? /* @__PURE__ */ b("div", {
|
|
2157
2157
|
className: "studio-editor-structured__mismatch",
|
|
2158
2158
|
role: "alert",
|
|
2159
2159
|
children: [
|
|
2160
|
-
/* @__PURE__ */ a("p", { children: n.strings.structured.mismatch(c.label,
|
|
2160
|
+
/* @__PURE__ */ a("p", { children: n.strings.structured.mismatch(c.label, S) }),
|
|
2161
2161
|
/* @__PURE__ */ a("button", {
|
|
2162
2162
|
type: "button",
|
|
2163
2163
|
disabled: v || !y,
|
|
2164
|
-
onClick: () =>
|
|
2164
|
+
onClick: () => N(k),
|
|
2165
2165
|
children: n.strings.structured.convert
|
|
2166
2166
|
}),
|
|
2167
2167
|
/* @__PURE__ */ a("button", {
|
|
2168
2168
|
type: "button",
|
|
2169
2169
|
disabled: v,
|
|
2170
|
-
onClick: () =>
|
|
2170
|
+
onClick: () => N(void 0),
|
|
2171
2171
|
children: n.strings.structured.clear
|
|
2172
2172
|
})
|
|
2173
2173
|
]
|
|
2174
|
-
}) :
|
|
2174
|
+
}) : A ? null : h ? /* @__PURE__ */ a(Ve, {
|
|
2175
2175
|
fallback: /* @__PURE__ */ a("p", {
|
|
2176
2176
|
className: "studio-editor-binding__missing",
|
|
2177
2177
|
role: "alert",
|
|
@@ -2180,7 +2180,7 @@ var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
2180
2180
|
children: /* @__PURE__ */ a(h, {
|
|
2181
2181
|
id: u,
|
|
2182
2182
|
value: P,
|
|
2183
|
-
onChange:
|
|
2183
|
+
onChange: N,
|
|
2184
2184
|
descriptor: c,
|
|
2185
2185
|
context: n,
|
|
2186
2186
|
disabled: v,
|
|
@@ -2203,7 +2203,7 @@ var To = ({ registry: e, property: t, context: n, componentId: o, onChange: i, d
|
|
|
2203
2203
|
}), g && /* @__PURE__ */ a(g, {
|
|
2204
2204
|
id: `${u}-binding`,
|
|
2205
2205
|
value: t.currentValue,
|
|
2206
|
-
onChange:
|
|
2206
|
+
onChange: N,
|
|
2207
2207
|
descriptor: c,
|
|
2208
2208
|
context: n,
|
|
2209
2209
|
disabled: v
|
|
@@ -3159,6 +3159,7 @@ var Oo = {
|
|
|
3159
3159
|
definedIn: (e) => `defined in ${e}`,
|
|
3160
3160
|
inheritedReadOnly: "inherited · read-only",
|
|
3161
3161
|
navigationItem: "Navigation item",
|
|
3162
|
+
hierarchy: "Where it appears",
|
|
3162
3163
|
label: "Label",
|
|
3163
3164
|
navigateTo: "Navigate to",
|
|
3164
3165
|
renderIntoSlot: "Render into slot",
|
|
@@ -3211,7 +3212,7 @@ var Oo = {
|
|
|
3211
3212
|
removed: (e) => `Removed ${e}`,
|
|
3212
3213
|
refused: (e) => `Not possible: ${e}`
|
|
3213
3214
|
}
|
|
3214
|
-
},
|
|
3215
|
+
}, $ = {
|
|
3215
3216
|
addItem: "addItem",
|
|
3216
3217
|
addButton: "addButton",
|
|
3217
3218
|
rename: "rename",
|
|
@@ -3244,17 +3245,17 @@ function Ft(e, t) {
|
|
|
3244
3245
|
enabled: !1
|
|
3245
3246
|
};
|
|
3246
3247
|
switch (e.id) {
|
|
3247
|
-
case
|
|
3248
|
+
case $.moveEarlier:
|
|
3248
3249
|
return {
|
|
3249
3250
|
visible: !0,
|
|
3250
3251
|
enabled: t.index > 0
|
|
3251
3252
|
};
|
|
3252
|
-
case
|
|
3253
|
+
case $.moveLater:
|
|
3253
3254
|
return {
|
|
3254
3255
|
visible: !0,
|
|
3255
3256
|
enabled: t.index < t.count - 1
|
|
3256
3257
|
};
|
|
3257
|
-
case
|
|
3258
|
+
case $.addSubItem:
|
|
3258
3259
|
return {
|
|
3259
3260
|
visible: !0,
|
|
3260
3261
|
enabled: t.parentId === void 0
|
|
@@ -3354,47 +3355,47 @@ function im(e, t) {
|
|
|
3354
3355
|
return [n.name, ...o].join(" › ");
|
|
3355
3356
|
}
|
|
3356
3357
|
function aa(e) {
|
|
3357
|
-
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = ur(i, o, n, t), d = nm(o, n, t), p = Ms(i, o, { slots: [...s] }), h = (x) => `${n ?? "application"}:${t}:${x}`, f = [], g = (x,
|
|
3358
|
+
const { region: t, module: n, navigation: o, structure: i, newId: r, slots: s, startingLabel: l, strings: c } = e, u = ur(i, o, n, t), d = nm(o, n, t), p = Ms(i, o, { slots: [...s] }), h = (x) => `${n ?? "application"}:${t}:${x}`, f = [], g = (x, S) => {
|
|
3358
3359
|
const k = x.filter((y) => !y.readOnly);
|
|
3359
3360
|
x.forEach((y) => {
|
|
3360
|
-
const
|
|
3361
|
+
const N = Qt(d, y.id)?.target ?? (y.target ? {
|
|
3361
3362
|
module: y.target.module,
|
|
3362
3363
|
...y.target.feature ? { feature: y.target.feature } : {}
|
|
3363
|
-
} : void 0),
|
|
3364
|
-
code:
|
|
3365
|
-
message:
|
|
3364
|
+
} : void 0), A = y.readOnly ? -1 : k.indexOf(y), T = im(i, N), C = p.filter((_) => _.entry === h(y.id)).map((_) => ({
|
|
3365
|
+
code: _.code,
|
|
3366
|
+
message: _.message
|
|
3366
3367
|
}));
|
|
3367
3368
|
f.push({
|
|
3368
3369
|
id: y.id,
|
|
3369
3370
|
label: y.title,
|
|
3370
|
-
index:
|
|
3371
|
+
index: A,
|
|
3371
3372
|
count: k.length,
|
|
3372
|
-
...
|
|
3373
|
+
...S ? { parentId: S } : {},
|
|
3373
3374
|
readOnly: y.readOnly,
|
|
3374
3375
|
...y.readOnly ? {
|
|
3375
3376
|
readOnlyReason: Do,
|
|
3376
3377
|
origin: c.application
|
|
3377
3378
|
} : {},
|
|
3378
3379
|
values: {
|
|
3379
|
-
target:
|
|
3380
|
+
target: N,
|
|
3380
3381
|
slot: y.slot,
|
|
3381
3382
|
icon: y.icon,
|
|
3382
3383
|
children: y.children?.length
|
|
3383
3384
|
},
|
|
3384
3385
|
chips: {
|
|
3385
|
-
target:
|
|
3386
|
+
target: T ?? "",
|
|
3386
3387
|
slot: y.slot === "content" || y.slot === "" ? c.mainArea : y.slot
|
|
3387
3388
|
},
|
|
3388
|
-
...
|
|
3389
|
-
unlinked:
|
|
3389
|
+
...C.length > 0 ? { problems: C } : {},
|
|
3390
|
+
unlinked: N === void 0 && !(y.children && y.children.length > 0)
|
|
3390
3391
|
}), y.children && g(y.children, y.id);
|
|
3391
3392
|
});
|
|
3392
3393
|
};
|
|
3393
3394
|
g(u.items);
|
|
3394
|
-
const m = t, v = (x,
|
|
3395
|
+
const m = t, v = (x, S, k, y = {}) => S.rejected ? { rejected: S.rejected } : {
|
|
3395
3396
|
label: x,
|
|
3396
3397
|
edits: [],
|
|
3397
|
-
navigationEdits:
|
|
3398
|
+
navigationEdits: S.edits,
|
|
3398
3399
|
...k ? { select: k } : {},
|
|
3399
3400
|
...y
|
|
3400
3401
|
}, w = (x) => ({ edits: [{
|
|
@@ -3403,11 +3404,11 @@ function aa(e) {
|
|
|
3403
3404
|
region: t,
|
|
3404
3405
|
items: x
|
|
3405
3406
|
}] }), P = (x) => {
|
|
3406
|
-
const
|
|
3407
|
-
id:
|
|
3407
|
+
const S = r(), k = Ps(o, n, t, {
|
|
3408
|
+
id: S,
|
|
3408
3409
|
title: l
|
|
3409
|
-
}, x), y = k.edits.some((
|
|
3410
|
-
return v("Add", k, { itemId:
|
|
3410
|
+
}, x), y = k.edits.some((N) => N.kind === Ko.SetRegionMode);
|
|
3411
|
+
return v("Add", k, { itemId: S }, {
|
|
3411
3412
|
renameNext: !0,
|
|
3412
3413
|
...y ? { notice: c.extendsNotice } : {}
|
|
3413
3414
|
});
|
|
@@ -3425,43 +3426,43 @@ function aa(e) {
|
|
|
3425
3426
|
...n !== void 0 ? { module: n } : {},
|
|
3426
3427
|
...u.mode ? { mode: om(u.mode) } : {}
|
|
3427
3428
|
},
|
|
3428
|
-
add: (x) => x ===
|
|
3429
|
-
act: (x,
|
|
3429
|
+
add: (x) => x === $.addItem ? P() : { rejected: x },
|
|
3430
|
+
act: (x, S) => {
|
|
3430
3431
|
switch (x) {
|
|
3431
|
-
case
|
|
3432
|
-
return
|
|
3433
|
-
case
|
|
3434
|
-
case
|
|
3435
|
-
const k =
|
|
3436
|
-
return !y || k < 0 || k >= y.length ? { rejected: "noWhere" } : v("Move", w(Xp(d,
|
|
3432
|
+
case $.addSubItem:
|
|
3433
|
+
return S.parentId !== void 0 ? { rejected: "subItemOfSubItem" } : P(S.id);
|
|
3434
|
+
case $.moveEarlier:
|
|
3435
|
+
case $.moveLater: {
|
|
3436
|
+
const k = S.index + (x === $.moveEarlier ? -1 : 1), y = Ct(d, S.id);
|
|
3437
|
+
return !y || k < 0 || k >= y.length ? { rejected: "noWhere" } : v("Move", w(Xp(d, S.id, k)), { itemId: S.id });
|
|
3437
3438
|
}
|
|
3438
|
-
case
|
|
3439
|
-
const k = Zp(d,
|
|
3439
|
+
case $.duplicate: {
|
|
3440
|
+
const k = Zp(d, S.id, r);
|
|
3440
3441
|
return k.copy ? v("Duplicate", w(k.items), { itemId: k.copy.id }) : { rejected: x };
|
|
3441
3442
|
}
|
|
3442
|
-
case
|
|
3443
|
-
const k = Ct(d,
|
|
3444
|
-
return v("Remove", w(Yp(d,
|
|
3443
|
+
case $.delete: {
|
|
3444
|
+
const k = Ct(d, S.id) ?? [], y = k.findIndex((A) => A.id === S.id), N = k[y + 1] ?? k[y - 1];
|
|
3445
|
+
return v("Remove", w(Yp(d, S.id)), { itemId: N?.id ?? null });
|
|
3445
3446
|
}
|
|
3446
3447
|
default:
|
|
3447
3448
|
return { rejected: x };
|
|
3448
3449
|
}
|
|
3449
3450
|
},
|
|
3450
|
-
rename: (x,
|
|
3451
|
-
choice: (x,
|
|
3452
|
-
const k = Qt(d,
|
|
3451
|
+
rename: (x, S) => v("Rename", w(Et(d, x.id, { title: S })), { itemId: x.id }),
|
|
3452
|
+
choice: (x, S) => {
|
|
3453
|
+
const k = Qt(d, S.id);
|
|
3453
3454
|
if (k) {
|
|
3454
|
-
if (x ===
|
|
3455
|
+
if (x === $.target) return {
|
|
3455
3456
|
property: Nn("target", "Navigate to", "navigationItemTarget", k.target),
|
|
3456
|
-
plan: (y) => v("Link", w(Et(d,
|
|
3457
|
+
plan: (y) => v("Link", w(Et(d, S.id, { target: rm(y) ? y : void 0 })), { itemId: S.id })
|
|
3457
3458
|
};
|
|
3458
|
-
if (x ===
|
|
3459
|
+
if (x === $.slot) return {
|
|
3459
3460
|
property: Nn("slot", "Render into slot", "renderingSlot", k.slot ?? "content"),
|
|
3460
|
-
plan: (y) => v("Change", w(Et(d,
|
|
3461
|
+
plan: (y) => v("Change", w(Et(d, S.id, { slot: typeof y == "string" && y !== "content" ? y : void 0 })), { itemId: S.id })
|
|
3461
3462
|
};
|
|
3462
3463
|
if (x === "icon") return {
|
|
3463
3464
|
property: Nn("icon", "Icon", "icon", k.icon),
|
|
3464
|
-
plan: (y) => v("Change", w(Et(d,
|
|
3465
|
+
plan: (y) => v("Change", w(Et(d, S.id, { icon: typeof y == "string" && y !== "" ? y : void 0 })), { itemId: S.id })
|
|
3465
3466
|
};
|
|
3466
3467
|
}
|
|
3467
3468
|
},
|
|
@@ -3518,7 +3519,7 @@ function am({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3518
3519
|
kind: on.Collection,
|
|
3519
3520
|
items: d,
|
|
3520
3521
|
add: (f) => {
|
|
3521
|
-
if (f !==
|
|
3522
|
+
if (f !== $.addItem) return { rejected: f };
|
|
3522
3523
|
const g = h(ke.Add);
|
|
3523
3524
|
if (g) return g;
|
|
3524
3525
|
const m = t.descriptor.item?.properties.some((w) => w.path === "destination" && w.constraints?.required === !0) === !0;
|
|
@@ -3544,11 +3545,11 @@ function am({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3544
3545
|
},
|
|
3545
3546
|
act: (f, g) => {
|
|
3546
3547
|
switch (f) {
|
|
3547
|
-
case
|
|
3548
|
-
case
|
|
3548
|
+
case $.moveEarlier:
|
|
3549
|
+
case $.moveLater: {
|
|
3549
3550
|
const m = h(ke.Reorder);
|
|
3550
3551
|
if (m) return m;
|
|
3551
|
-
const v = g.index + (f ===
|
|
3552
|
+
const v = g.index + (f === $.moveEarlier ? -1 : 1);
|
|
3552
3553
|
return v < 0 || v >= l.length ? { rejected: "noWhere" } : {
|
|
3553
3554
|
label: "Move",
|
|
3554
3555
|
edits: [{
|
|
@@ -3560,7 +3561,7 @@ function am({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3560
3561
|
select: { itemId: g.id }
|
|
3561
3562
|
};
|
|
3562
3563
|
}
|
|
3563
|
-
case
|
|
3564
|
+
case $.duplicate: {
|
|
3564
3565
|
const m = h(ke.Add);
|
|
3565
3566
|
if (m) return m;
|
|
3566
3567
|
const v = n(), w = s.find((P) => P.id === g.id);
|
|
@@ -3578,7 +3579,7 @@ function am({ componentId: e, property: t, newId: n, startingLabel: o, startingD
|
|
|
3578
3579
|
select: { itemId: v }
|
|
3579
3580
|
};
|
|
3580
3581
|
}
|
|
3581
|
-
case
|
|
3582
|
+
case $.delete: {
|
|
3582
3583
|
const m = h(ke.Remove);
|
|
3583
3584
|
if (m) return m;
|
|
3584
3585
|
const v = l[g.index + 1] ?? l[g.index - 1];
|
|
@@ -3698,7 +3699,7 @@ function Kn(e, t) {
|
|
|
3698
3699
|
typeof n.id == "string" && n.properties !== null && typeof n.properties == "object" && (n.id = t());
|
|
3699
3700
|
for (const [o, i] of Object.entries(n)) o !== "properties" && Kn(i, t);
|
|
3700
3701
|
}
|
|
3701
|
-
var Vn = (e) => typeof e == "string" ? e : "", rn = { [
|
|
3702
|
+
var Vn = (e) => typeof e == "string" ? e : "", rn = { [$.addButton]: {
|
|
3702
3703
|
slot: "items",
|
|
3703
3704
|
componentName: "core:toolbarItem",
|
|
3704
3705
|
labelProperty: "label",
|
|
@@ -3752,9 +3753,9 @@ function dm({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3752
3753
|
act: (h, f) => {
|
|
3753
3754
|
const g = c[f.index];
|
|
3754
3755
|
switch (h) {
|
|
3755
|
-
case
|
|
3756
|
-
case
|
|
3757
|
-
const m = f.index + (h ===
|
|
3756
|
+
case $.moveEarlier:
|
|
3757
|
+
case $.moveLater: {
|
|
3758
|
+
const m = f.index + (h === $.moveEarlier ? -1 : 1);
|
|
3758
3759
|
return m < 0 || m >= c.length ? { rejected: "noWhere" } : {
|
|
3759
3760
|
label: "Move",
|
|
3760
3761
|
edits: [{
|
|
@@ -3767,9 +3768,9 @@ function dm({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3767
3768
|
select: { elementId: f.id }
|
|
3768
3769
|
};
|
|
3769
3770
|
}
|
|
3770
|
-
case
|
|
3771
|
+
case $.duplicate:
|
|
3771
3772
|
return p(cm(g, i), f.index + 1, "Duplicate");
|
|
3772
|
-
case
|
|
3773
|
+
case $.delete: {
|
|
3773
3774
|
const m = c[f.index + 1] ?? c[f.index - 1];
|
|
3774
3775
|
return {
|
|
3775
3776
|
label: "Remove",
|
|
@@ -3793,7 +3794,7 @@ function dm({ component: e, addActionId: t, ownershipOf: n, inspect: o, newId: i
|
|
|
3793
3794
|
} : { rejected: "rename" };
|
|
3794
3795
|
},
|
|
3795
3796
|
choice: (h, f) => {
|
|
3796
|
-
const g = h ===
|
|
3797
|
+
const g = h === $.slice ? "slice" : h === $.emphasis ? "emphasis" : void 0, m = g ? o(f.id)?.properties.find((v) => v.descriptor.path === g) : void 0;
|
|
3797
3798
|
if (m)
|
|
3798
3799
|
return {
|
|
3799
3800
|
property: m,
|
|
@@ -3862,16 +3863,16 @@ function pm({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3862
3863
|
const [s, l] = j(0), [c, u] = j(""), [d, p] = j("");
|
|
3863
3864
|
ce(() => {
|
|
3864
3865
|
if (d === "") return;
|
|
3865
|
-
const
|
|
3866
|
-
return () => clearTimeout(
|
|
3866
|
+
const C = setTimeout(() => p(""), 4e3);
|
|
3867
|
+
return () => clearTimeout(C);
|
|
3867
3868
|
}, [d]);
|
|
3868
|
-
const { document: h, composition: f, context: g, selectedId: m, ownershipOf: v, selectedItemId: w, navigation: P, navigationModule: x, structure:
|
|
3869
|
-
const
|
|
3870
|
-
return
|
|
3871
|
-
region:
|
|
3869
|
+
const { document: h, composition: f, context: g, selectedId: m, ownershipOf: v, selectedItemId: w, navigation: P, navigationModule: x, structure: S } = e, k = t.navigation?.slots ?? t.propertyEditors?.slots ?? mm, y = z((C) => {
|
|
3870
|
+
const _ = an(C.componentName);
|
|
3871
|
+
return _ ? aa({
|
|
3872
|
+
region: _,
|
|
3872
3873
|
module: x,
|
|
3873
3874
|
navigation: P,
|
|
3874
|
-
structure:
|
|
3875
|
+
structure: S,
|
|
3875
3876
|
newId: Nt,
|
|
3876
3877
|
slots: k,
|
|
3877
3878
|
startingLabel: o.item,
|
|
@@ -3883,26 +3884,26 @@ function pm({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3883
3884
|
application: n.navigation.application,
|
|
3884
3885
|
mainArea: n.mainArea
|
|
3885
3886
|
}
|
|
3886
|
-
}) : r?.(
|
|
3887
|
+
}) : r?.(C, w);
|
|
3887
3888
|
}, [
|
|
3888
3889
|
x,
|
|
3889
3890
|
P,
|
|
3890
|
-
|
|
3891
|
+
S,
|
|
3891
3892
|
k,
|
|
3892
3893
|
o,
|
|
3893
3894
|
n,
|
|
3894
3895
|
r,
|
|
3895
3896
|
w
|
|
3896
|
-
]),
|
|
3897
|
+
]), N = U(() => um({
|
|
3897
3898
|
roots: f.roots,
|
|
3898
3899
|
catalog: g.catalog,
|
|
3899
3900
|
selectedId: m,
|
|
3900
3901
|
selectedItemId: w,
|
|
3901
3902
|
ownershipOf: v,
|
|
3902
3903
|
newId: Nt,
|
|
3903
|
-
inspect: (
|
|
3904
|
+
inspect: (C) => co(h, re(C), g),
|
|
3904
3905
|
startingLabels: o,
|
|
3905
|
-
structure:
|
|
3906
|
+
structure: S,
|
|
3906
3907
|
...i ? { startingDestination: i } : {},
|
|
3907
3908
|
otherSource: y
|
|
3908
3909
|
}), [
|
|
@@ -3914,64 +3915,64 @@ function pm({ controller: e, environment: t, strings: n, startingLabels: o, star
|
|
|
3914
3915
|
h,
|
|
3915
3916
|
o,
|
|
3916
3917
|
i,
|
|
3917
|
-
|
|
3918
|
+
S,
|
|
3918
3919
|
y
|
|
3919
|
-
]),
|
|
3920
|
-
if (ia(
|
|
3921
|
-
return u(n.announce.refused(
|
|
3922
|
-
if (
|
|
3920
|
+
]), A = e.selectItem, T = z((C, _) => {
|
|
3921
|
+
if (ia(C))
|
|
3922
|
+
return u(n.announce.refused(C.rejected)), !1;
|
|
3923
|
+
if (C.editAtApplication)
|
|
3923
3924
|
return e.setNavigationModule(void 0), e.selectItem(void 0, void 0), !0;
|
|
3924
|
-
const
|
|
3925
|
-
if (!
|
|
3926
|
-
return u(n.announce.refused("rejected" in
|
|
3927
|
-
const { select:
|
|
3928
|
-
return
|
|
3925
|
+
const L = C.navigationEdits ? e.applyNavigationEdits(C.navigationEdits, C.label) : e.applyAll(C.edits, C.label);
|
|
3926
|
+
if (!L.applied)
|
|
3927
|
+
return u(n.announce.refused("rejected" in L && L.rejected || "diagnostics" in L && L.diagnostics[0]?.message || C.label)), !1;
|
|
3928
|
+
const { select: D } = C;
|
|
3929
|
+
return D?.elementId !== void 0 && e.select(D.elementId), D?.itemId !== void 0 && e.selectItem(D.itemId === null ? void 0 : N?.componentId ?? m, D.itemId === null ? void 0 : D.itemId), C.notice && (u(C.notice), p(C.notice)), C.renameNext && l((I) => I + 1), _ && !C.notice && u(_(C)), !0;
|
|
3929
3930
|
}, [
|
|
3930
3931
|
e,
|
|
3931
3932
|
n,
|
|
3932
|
-
|
|
3933
|
+
N,
|
|
3933
3934
|
m
|
|
3934
3935
|
]);
|
|
3935
3936
|
return {
|
|
3936
|
-
subject:
|
|
3937
|
+
subject: N,
|
|
3937
3938
|
renameToken: s,
|
|
3938
3939
|
announcement: c,
|
|
3939
3940
|
notice: d,
|
|
3940
|
-
pointItem:
|
|
3941
|
-
perform:
|
|
3942
|
-
add: z((
|
|
3943
|
-
if (!
|
|
3944
|
-
const
|
|
3945
|
-
return
|
|
3941
|
+
pointItem: A,
|
|
3942
|
+
perform: T,
|
|
3943
|
+
add: z((C) => {
|
|
3944
|
+
if (!N) return !1;
|
|
3945
|
+
const _ = N.source.kind === on.Elements ? o.button : o.item;
|
|
3946
|
+
return T(N.source.add(C), () => n.announce.added(_));
|
|
3946
3947
|
}, [
|
|
3948
|
+
N,
|
|
3947
3949
|
T,
|
|
3948
|
-
I,
|
|
3949
3950
|
n,
|
|
3950
3951
|
o
|
|
3951
3952
|
]),
|
|
3952
|
-
act: z((
|
|
3953
|
-
if (!
|
|
3954
|
-
const
|
|
3955
|
-
return
|
|
3956
|
-
switch (
|
|
3957
|
-
case
|
|
3958
|
-
return n.announce.moved(
|
|
3959
|
-
case
|
|
3960
|
-
return n.announce.moved(
|
|
3961
|
-
case
|
|
3962
|
-
return n.announce.duplicated(
|
|
3963
|
-
case
|
|
3964
|
-
return n.announce.removed(
|
|
3953
|
+
act: z((C, _) => {
|
|
3954
|
+
if (!N) return !1;
|
|
3955
|
+
const L = _.label;
|
|
3956
|
+
return T(N.source.act(C, _), () => {
|
|
3957
|
+
switch (C) {
|
|
3958
|
+
case $.moveEarlier:
|
|
3959
|
+
return n.announce.moved(L, _.index, _.count);
|
|
3960
|
+
case $.moveLater:
|
|
3961
|
+
return n.announce.moved(L, _.index + 2, _.count);
|
|
3962
|
+
case $.duplicate:
|
|
3963
|
+
return n.announce.duplicated(L);
|
|
3964
|
+
case $.delete:
|
|
3965
|
+
return n.announce.removed(L);
|
|
3965
3966
|
default:
|
|
3966
3967
|
return "";
|
|
3967
3968
|
}
|
|
3968
3969
|
});
|
|
3969
3970
|
}, [
|
|
3971
|
+
N,
|
|
3970
3972
|
T,
|
|
3971
|
-
I,
|
|
3972
3973
|
n
|
|
3973
3974
|
]),
|
|
3974
|
-
rename: z((
|
|
3975
|
+
rename: z((C, _) => N ? T(N.source.rename(C, _)) : !1, [N, T]),
|
|
3975
3976
|
deselect: z(() => {
|
|
3976
3977
|
w !== void 0 ? e.selectItem(void 0, void 0) : e.select(void 0);
|
|
3977
3978
|
}, [w, e])
|
|
@@ -4021,7 +4022,7 @@ var da = (e) => ({
|
|
|
4021
4022
|
application: o.application,
|
|
4022
4023
|
mainArea: "Main area"
|
|
4023
4024
|
}
|
|
4024
|
-
}), m = l.modules.find((
|
|
4025
|
+
}), m = l.modules.find((I) => I.id === c)?.name ?? c, v = m ?? o.application, w = o.regionName[u], P = r ? g.items.find((I) => I.id === r) : void 0, x = t.propertyEditors?.registry ?? nn, S = Io({
|
|
4025
4026
|
controller: e,
|
|
4026
4027
|
environment: t,
|
|
4027
4028
|
strings: n,
|
|
@@ -4030,41 +4031,51 @@ var da = (e) => ({
|
|
|
4030
4031
|
inCanvas: !1,
|
|
4031
4032
|
bindingScope: h,
|
|
4032
4033
|
slotNames: da(o)
|
|
4033
|
-
}), k = g.region?.mode, y = (
|
|
4034
|
-
const
|
|
4035
|
-
|
|
4036
|
-
},
|
|
4037
|
-
if (
|
|
4038
|
-
if (k === De.Inherit &&
|
|
4034
|
+
}), k = g.region?.mode, y = (I, F = !1) => {
|
|
4035
|
+
const M = hr(s, c, u, I, { copy: F });
|
|
4036
|
+
M.rejected || M.edits.length === 0 || e.applyNavigationEdits(M.edits, "Region mode");
|
|
4037
|
+
}, N = (I) => {
|
|
4038
|
+
if (I !== k) {
|
|
4039
|
+
if (k === De.Inherit && I === De.Override) {
|
|
4039
4040
|
p(!0);
|
|
4040
4041
|
return;
|
|
4041
4042
|
}
|
|
4042
|
-
p(!1), y(
|
|
4043
|
+
p(!1), y(I);
|
|
4043
4044
|
}
|
|
4044
|
-
},
|
|
4045
|
-
!
|
|
4046
|
-
},
|
|
4045
|
+
}, A = P ? !P.readOnly : !1, T = (I) => {
|
|
4046
|
+
!I || "rejected" in I || I.navigationEdits && e.applyNavigationEdits(I.navigationEdits, I.label);
|
|
4047
|
+
}, C = (I, F) => {
|
|
4047
4048
|
if (P)
|
|
4048
|
-
switch (
|
|
4049
|
+
switch (I.descriptor.path) {
|
|
4049
4050
|
case "label":
|
|
4050
|
-
typeof
|
|
4051
|
+
typeof F == "string" && F !== "" && T(g.rename(P, F));
|
|
4051
4052
|
break;
|
|
4052
4053
|
case "target":
|
|
4053
|
-
|
|
4054
|
+
T(g.choice("target", P)?.plan(F));
|
|
4054
4055
|
break;
|
|
4055
4056
|
case "slot":
|
|
4056
|
-
|
|
4057
|
+
T(g.choice("slot", P)?.plan(F));
|
|
4057
4058
|
break;
|
|
4058
4059
|
case "icon":
|
|
4059
|
-
|
|
4060
|
+
T(g.choice("icon", P)?.plan(F));
|
|
4060
4061
|
}
|
|
4061
|
-
},
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4062
|
+
}, _ = (() => {
|
|
4063
|
+
if (!P) return [];
|
|
4064
|
+
const I = [];
|
|
4065
|
+
for (let F = P; ; ) {
|
|
4066
|
+
I.unshift(F.label);
|
|
4067
|
+
const M = F.parentId ? g.items.find((q) => q.id === F.parentId) : void 0;
|
|
4068
|
+
if (!M) break;
|
|
4069
|
+
F = M;
|
|
4070
|
+
}
|
|
4071
|
+
return [P.readOnly ? o.application : v, ...I];
|
|
4072
|
+
})(), L = s.application.logo, D = (I) => {
|
|
4073
|
+
const F = Gs(s, c, {
|
|
4074
|
+
image: L?.image ?? "",
|
|
4075
|
+
title: L?.title ?? "",
|
|
4076
|
+
...I
|
|
4066
4077
|
});
|
|
4067
|
-
|
|
4078
|
+
F.rejected || e.applyNavigationEdits(F.edits, "Logo");
|
|
4068
4079
|
};
|
|
4069
4080
|
return /* @__PURE__ */ a("section", {
|
|
4070
4081
|
className: "studio-editor-properties__navigation",
|
|
@@ -4090,24 +4101,33 @@ var da = (e) => ({
|
|
|
4090
4101
|
role: "note",
|
|
4091
4102
|
children: m ? o.inheritedNote(m) : o.inheritedFromApplication
|
|
4092
4103
|
}),
|
|
4093
|
-
|
|
4104
|
+
/* @__PURE__ */ b("p", {
|
|
4105
|
+
className: "studio-editor-properties__hint",
|
|
4106
|
+
"data-navigation-hierarchy": _.join(" › "),
|
|
4107
|
+
children: [
|
|
4108
|
+
/* @__PURE__ */ a("strong", { children: o.hierarchy }),
|
|
4109
|
+
" ",
|
|
4110
|
+
_.join(" › ")
|
|
4111
|
+
]
|
|
4112
|
+
}),
|
|
4113
|
+
P.problems?.map((I) => /* @__PURE__ */ a("p", {
|
|
4094
4114
|
className: "studio-editor-chip studio-editor-chip--error",
|
|
4095
4115
|
role: "alert",
|
|
4096
|
-
children: o.problems[
|
|
4097
|
-
},
|
|
4116
|
+
children: o.problems[I.code] ?? I.message
|
|
4117
|
+
}, I.code)),
|
|
4098
4118
|
[
|
|
4099
|
-
Mt("label", o.label, K.String, "text", P.label,
|
|
4100
|
-
Mt("target", o.navigateTo, K.String, "navigationItemTarget", P.values.target,
|
|
4101
|
-
Mt("slot", o.renderIntoSlot, K.String, "renderingSlot", P.values.slot,
|
|
4102
|
-
Mt("icon", o.icon, K.String, "icon", P.values.icon,
|
|
4103
|
-
].map((
|
|
4119
|
+
Mt("label", o.label, K.String, "text", P.label, A, o.inheritedFromApplication),
|
|
4120
|
+
Mt("target", o.navigateTo, K.String, "navigationItemTarget", P.values.target, A, o.inheritedFromApplication),
|
|
4121
|
+
Mt("slot", o.renderIntoSlot, K.String, "renderingSlot", P.values.slot, A, o.inheritedFromApplication),
|
|
4122
|
+
Mt("icon", o.icon, K.String, "icon", P.values.icon, A, o.inheritedFromApplication)
|
|
4123
|
+
].map((I) => /* @__PURE__ */ a(To, {
|
|
4104
4124
|
registry: x,
|
|
4105
|
-
property:
|
|
4106
|
-
context:
|
|
4125
|
+
property: I,
|
|
4126
|
+
context: S,
|
|
4107
4127
|
componentId: P.id,
|
|
4108
|
-
onChange:
|
|
4128
|
+
onChange: C,
|
|
4109
4129
|
diagnostics: []
|
|
4110
|
-
}, `${P.id}-${
|
|
4130
|
+
}, `${P.id}-${I.descriptor.path}`))
|
|
4111
4131
|
] }) : /* @__PURE__ */ b(le, { children: [
|
|
4112
4132
|
/* @__PURE__ */ a("header", {
|
|
4113
4133
|
className: "studio-editor-properties__header",
|
|
@@ -4126,15 +4146,15 @@ var da = (e) => ({
|
|
|
4126
4146
|
className: "studio-editor-mode-cards",
|
|
4127
4147
|
role: "radiogroup",
|
|
4128
4148
|
"aria-label": o.modeTitle(w, v),
|
|
4129
|
-
children: hm.map((
|
|
4149
|
+
children: hm.map((I) => /* @__PURE__ */ b("button", {
|
|
4130
4150
|
type: "button",
|
|
4131
4151
|
role: "radio",
|
|
4132
|
-
"aria-checked":
|
|
4133
|
-
"data-mode":
|
|
4134
|
-
className: `studio-editor-mode-card${
|
|
4135
|
-
onClick: () =>
|
|
4136
|
-
children: [/* @__PURE__ */ a("strong", { children: o.modes[
|
|
4137
|
-
},
|
|
4152
|
+
"aria-checked": I === k,
|
|
4153
|
+
"data-mode": I,
|
|
4154
|
+
className: `studio-editor-mode-card${I === k ? " studio-editor-mode-card--chosen" : ""}`,
|
|
4155
|
+
onClick: () => N(I),
|
|
4156
|
+
children: [/* @__PURE__ */ a("strong", { children: o.modes[I].title }), /* @__PURE__ */ a("span", { children: o.modes[I].description })]
|
|
4157
|
+
}, I))
|
|
4138
4158
|
}),
|
|
4139
4159
|
d && /* @__PURE__ */ b("div", {
|
|
4140
4160
|
className: "studio-editor-mode__prompt",
|
|
@@ -4169,15 +4189,15 @@ var da = (e) => ({
|
|
|
4169
4189
|
/* @__PURE__ */ a("legend", { children: o.logo }),
|
|
4170
4190
|
/* @__PURE__ */ b("label", { children: [o.logoTitle, /* @__PURE__ */ a("input", {
|
|
4171
4191
|
type: "text",
|
|
4172
|
-
value:
|
|
4192
|
+
value: L?.title ?? "",
|
|
4173
4193
|
disabled: c !== void 0,
|
|
4174
|
-
onChange: (
|
|
4194
|
+
onChange: (I) => D({ title: I.target.value })
|
|
4175
4195
|
})] }),
|
|
4176
4196
|
/* @__PURE__ */ b("label", { children: [o.logoImage, /* @__PURE__ */ a("input", {
|
|
4177
4197
|
type: "text",
|
|
4178
|
-
value:
|
|
4198
|
+
value: L?.image ?? "",
|
|
4179
4199
|
disabled: c !== void 0,
|
|
4180
|
-
onChange: (
|
|
4200
|
+
onChange: (I) => D({ image: I.target.value })
|
|
4181
4201
|
})] }),
|
|
4182
4202
|
c !== void 0 && /* @__PURE__ */ a("p", {
|
|
4183
4203
|
className: "studio-editor-properties__hint",
|
|
@@ -4332,7 +4352,7 @@ var gm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), vm = (e)
|
|
|
4332
4352
|
strings: n
|
|
4333
4353
|
})
|
|
4334
4354
|
});
|
|
4335
|
-
const p = Ya(e.composition.roots, s), h = wu(r.properties, p, l.properties), { runtime: f } = t, g = ym(e.context.catalog.components, r.typeId), m = g ? f.packageDescriptorOf(g) : void 0, v = (
|
|
4355
|
+
const p = Ya(e.composition.roots, s), h = wu(r.properties, p, l.properties), { runtime: f } = t, g = ym(e.context.catalog.components, r.typeId), m = g ? f.packageDescriptorOf(g) : void 0, v = (D) => !!m && f.designTime.propertyEditor(m, D.descriptor).contribution !== void 0, w = t.propertyEditors?.registry ?? nn, P = [...r.diagnostics, ...e.diagnostics], x = Nu(h, r.typeId, (D) => wm.has(D.descriptor.path) || v(D)), S = Tu(x), k = {
|
|
4336
4356
|
controller: e,
|
|
4337
4357
|
environment: t,
|
|
4338
4358
|
strings: n,
|
|
@@ -4341,7 +4361,7 @@ var gm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), vm = (e)
|
|
|
4341
4361
|
diagnostics: P,
|
|
4342
4362
|
inCanvas: p,
|
|
4343
4363
|
bindingScope: u
|
|
4344
|
-
}, y = Io(k),
|
|
4364
|
+
}, y = Io(k), N = r.typeId.endsWith("action"), A = r.typeId.endsWith("toolbarButton"), T = Jr(r.typeId), C = e.document.screens.find((D) => D.name === "Screen")?.forms ?? [], _ = o !== void 0 && o !== "local", L = l.properties;
|
|
4345
4365
|
return /* @__PURE__ */ b("div", {
|
|
4346
4366
|
className: "studio-editor-properties",
|
|
4347
4367
|
children: [
|
|
@@ -4406,62 +4426,62 @@ var gm = (e) => String(e.componentName ?? "").endsWith("toolbarItem"), vm = (e)
|
|
|
4406
4426
|
/* @__PURE__ */ a(Mu, {
|
|
4407
4427
|
component: l,
|
|
4408
4428
|
descriptor: g,
|
|
4409
|
-
properties: r.properties.filter((
|
|
4429
|
+
properties: r.properties.filter((D) => !Kr(r.typeId, D.descriptor.path)),
|
|
4410
4430
|
controller: e,
|
|
4411
4431
|
environment: t,
|
|
4412
4432
|
strings: n,
|
|
4413
4433
|
disabled: o !== void 0 && o !== "local"
|
|
4414
4434
|
})
|
|
4415
4435
|
] }),
|
|
4416
|
-
|
|
4436
|
+
S.length === 0 && r.properties.length === 0 && /* @__PURE__ */ a("p", {
|
|
4417
4437
|
className: "studio-editor-properties-empty",
|
|
4418
4438
|
children: c.noProperties
|
|
4419
4439
|
}),
|
|
4420
|
-
|
|
4440
|
+
S.map((D) => /* @__PURE__ */ b("section", {
|
|
4421
4441
|
className: "studio-editor-properties__group",
|
|
4422
|
-
"aria-label":
|
|
4442
|
+
"aria-label": D.name,
|
|
4423
4443
|
children: [/* @__PURE__ */ a("h4", {
|
|
4424
4444
|
className: "studio-editor-properties__group-title",
|
|
4425
|
-
children:
|
|
4426
|
-
}),
|
|
4445
|
+
children: D.name
|
|
4446
|
+
}), D.properties.map((I) => /* @__PURE__ */ a(To, {
|
|
4427
4447
|
registry: w,
|
|
4428
|
-
property:
|
|
4429
|
-
context: $p(y, k,
|
|
4448
|
+
property: I,
|
|
4449
|
+
context: $p(y, k, I),
|
|
4430
4450
|
componentId: s,
|
|
4431
4451
|
onChange: e.setProperty,
|
|
4432
4452
|
diagnostics: P
|
|
4433
|
-
}, `${s}:${
|
|
4434
|
-
},
|
|
4435
|
-
|
|
4436
|
-
action: na(
|
|
4453
|
+
}, `${s}:${I.descriptor.path}`))]
|
|
4454
|
+
}, D.name)),
|
|
4455
|
+
N && /* @__PURE__ */ a(Ou, {
|
|
4456
|
+
action: na(L, t.stateChangeSlices.find((D) => D.id === L?.command)?.name ?? ""),
|
|
4437
4457
|
slices: t.stateChangeSlices,
|
|
4438
4458
|
sources: Vr(Object.keys(t.availableSources), d.componentOutputs, s),
|
|
4439
4459
|
strings: n,
|
|
4440
4460
|
disabled: o !== void 0 && o !== "local",
|
|
4441
|
-
suggestSource: (
|
|
4442
|
-
onChange: (
|
|
4461
|
+
suggestSource: (D) => D === "id" || D.endsWith("Id") ? "row.id" : void 0,
|
|
4462
|
+
onChange: (D) => D && e.applyAll(Wp(s, D), n.properties.action.label)
|
|
4443
4463
|
}),
|
|
4444
|
-
|
|
4464
|
+
T && /* @__PURE__ */ a(ap, {
|
|
4445
4465
|
elementId: s,
|
|
4446
|
-
command: typeof
|
|
4466
|
+
command: typeof L?.command == "string" ? L.command : void 0,
|
|
4447
4467
|
slices: t.stateChangeSlices,
|
|
4448
|
-
forms:
|
|
4468
|
+
forms: C,
|
|
4449
4469
|
strings: n,
|
|
4450
|
-
disabled:
|
|
4451
|
-
onCommandChange: (
|
|
4452
|
-
e.applyAll([Lu(s,
|
|
4470
|
+
disabled: _,
|
|
4471
|
+
onCommandChange: (D) => {
|
|
4472
|
+
e.applyAll([Lu(s, D)], n.properties.commandForm.label).applied && D && !C.some((I) => I.forCommand === D.name) && e.setScreenForms([...C, zn(D)], n.properties.commandForm.createForm(D.name));
|
|
4453
4473
|
},
|
|
4454
|
-
onFormChange: (
|
|
4455
|
-
onFormCreate: (
|
|
4474
|
+
onFormChange: (D) => e.setScreenForms(C.map((I) => I.forCommand === D.forCommand ? D : I), n.properties.forms.label),
|
|
4475
|
+
onFormCreate: (D) => e.setScreenForms([...C, zn(D)], n.properties.commandForm.createForm(D.name))
|
|
4456
4476
|
}),
|
|
4457
|
-
|
|
4477
|
+
A && /* @__PURE__ */ a(Kp, {
|
|
4458
4478
|
behaviors: l.behaviors,
|
|
4459
4479
|
targets: ds(t, e.document),
|
|
4460
4480
|
destinations: t.destinations,
|
|
4461
4481
|
slices: t.stateChangeSlices,
|
|
4462
4482
|
strings: n.properties.toolbarButton,
|
|
4463
|
-
disabled:
|
|
4464
|
-
onChange: (
|
|
4483
|
+
disabled: _,
|
|
4484
|
+
onChange: (D) => e.setElementBehaviors(s, D, n.properties.toolbarButton.label)
|
|
4465
4485
|
}, s),
|
|
4466
4486
|
/* @__PURE__ */ a(Rp, {
|
|
4467
4487
|
inspection: r,
|
|
@@ -4745,31 +4765,31 @@ var Lm = (e) => e.dataTransfer.types.includes(Mo), Bm = {
|
|
|
4745
4765
|
l,
|
|
4746
4766
|
n.frequentlyUsed
|
|
4747
4767
|
]), g = r.trim().length > 0, m = z((y) => {
|
|
4748
|
-
g || c((
|
|
4749
|
-
const
|
|
4750
|
-
...
|
|
4768
|
+
g || c((N) => {
|
|
4769
|
+
const A = {
|
|
4770
|
+
...N,
|
|
4751
4771
|
[y.id]: !y.expanded
|
|
4752
4772
|
};
|
|
4753
|
-
return t.writeGroups(
|
|
4773
|
+
return t.writeGroups(A), A;
|
|
4754
4774
|
});
|
|
4755
|
-
}, [g, t]), v = () => [...d.current?.querySelectorAll("[data-picker-focus]") ?? []], w = (y,
|
|
4756
|
-
const
|
|
4757
|
-
|
|
4775
|
+
}, [g, t]), v = () => [...d.current?.querySelectorAll("[data-picker-focus]") ?? []], w = (y, N) => {
|
|
4776
|
+
const A = v(), T = y ? A.indexOf(y) : -1;
|
|
4777
|
+
A[Math.min(Math.max(T + N, 0), A.length - 1)]?.focus();
|
|
4758
4778
|
}, P = (y) => {
|
|
4759
|
-
const
|
|
4760
|
-
if (y.key === "/" && !
|
|
4779
|
+
const N = y.target, A = N === u.current;
|
|
4780
|
+
if (y.key === "/" && !A)
|
|
4761
4781
|
y.preventDefault(), u.current?.focus();
|
|
4762
4782
|
else if (y.key === "ArrowDown")
|
|
4763
|
-
y.preventDefault(), w(
|
|
4783
|
+
y.preventDefault(), w(A ? null : N, 1);
|
|
4764
4784
|
else if (y.key === "ArrowUp") {
|
|
4765
4785
|
y.preventDefault();
|
|
4766
|
-
const
|
|
4767
|
-
if (
|
|
4768
|
-
|
|
4769
|
-
} else y.key === "Escape" &&
|
|
4770
|
-
}, x = (y,
|
|
4771
|
-
Mm(
|
|
4772
|
-
},
|
|
4786
|
+
const T = v();
|
|
4787
|
+
if (A) return;
|
|
4788
|
+
T.indexOf(N) <= 0 ? u.current?.focus() : w(N, -1);
|
|
4789
|
+
} else y.key === "Escape" && A && r !== "" && (y.stopPropagation(), s(""));
|
|
4790
|
+
}, x = (y, N) => {
|
|
4791
|
+
Mm(N, y.payload, y.label), N.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.setAttribute("data-dragging", "");
|
|
4792
|
+
}, S = (y) => {
|
|
4773
4793
|
y.currentTarget.closest('[data-cratis-part="toolbar-folder-panel"]')?.removeAttribute("data-dragging");
|
|
4774
4794
|
}, k = Om(f);
|
|
4775
4795
|
return /* @__PURE__ */ b("div", {
|
|
@@ -4831,38 +4851,38 @@ var Lm = (e) => e.dataTransfer.types.includes(Mo), Bm = {
|
|
|
4831
4851
|
}), y.expanded && /* @__PURE__ */ a("ul", {
|
|
4832
4852
|
id: `${p}-${y.id}`,
|
|
4833
4853
|
className: "studio-component-picker__rows",
|
|
4834
|
-
children: y.rows.map(({ entry:
|
|
4854
|
+
children: y.rows.map(({ entry: N, match: A }) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ b("button", {
|
|
4835
4855
|
type: "button",
|
|
4836
4856
|
"data-picker-focus": !0,
|
|
4837
|
-
"data-component":
|
|
4857
|
+
"data-component": N.key,
|
|
4838
4858
|
draggable: !0,
|
|
4839
4859
|
className: "studio-component-picker__row",
|
|
4840
|
-
title: n.addLabel(
|
|
4841
|
-
onClick: () => o(
|
|
4842
|
-
onDragStart: (
|
|
4843
|
-
onDragEnd:
|
|
4860
|
+
title: n.addLabel(N.label),
|
|
4861
|
+
onClick: () => o(N),
|
|
4862
|
+
onDragStart: (T) => x(N, T),
|
|
4863
|
+
onDragEnd: S,
|
|
4844
4864
|
children: [
|
|
4845
4865
|
/* @__PURE__ */ a("span", {
|
|
4846
4866
|
className: "studio-component-picker__badge",
|
|
4847
4867
|
"aria-hidden": "true",
|
|
4848
|
-
children:
|
|
4868
|
+
children: N.badge
|
|
4849
4869
|
}),
|
|
4850
4870
|
/* @__PURE__ */ b("span", {
|
|
4851
4871
|
className: "studio-component-picker__label",
|
|
4852
4872
|
children: [/* @__PURE__ */ a("span", {
|
|
4853
4873
|
className: "studio-component-picker__name",
|
|
4854
|
-
children: Dm(
|
|
4855
|
-
}),
|
|
4874
|
+
children: Dm(N.label, A.ranges).map((T, C) => T.marked ? /* @__PURE__ */ a("mark", { children: T.text }, C) : /* @__PURE__ */ a("span", { children: T.text }, C))
|
|
4875
|
+
}), A.via === "keyword" && A.keyword && /* @__PURE__ */ a("span", {
|
|
4856
4876
|
className: "studio-component-picker__hint",
|
|
4857
|
-
children: n.viaKeyword(
|
|
4877
|
+
children: n.viaKeyword(N.badge, r.trim(), A.keyword)
|
|
4858
4878
|
})]
|
|
4859
4879
|
}),
|
|
4860
|
-
|
|
4880
|
+
N.packageTitle && /* @__PURE__ */ a("span", {
|
|
4861
4881
|
className: "studio-component-picker__package",
|
|
4862
|
-
children:
|
|
4882
|
+
children: N.packageTitle
|
|
4863
4883
|
})
|
|
4864
4884
|
]
|
|
4865
|
-
}) },
|
|
4885
|
+
}) }, N.key))
|
|
4866
4886
|
})]
|
|
4867
4887
|
}, y.id))
|
|
4868
4888
|
}),
|
|
@@ -5330,14 +5350,14 @@ function gh(e, t, n, o = vh) {
|
|
|
5330
5350
|
t,
|
|
5331
5351
|
l
|
|
5332
5352
|
]), w = z(() => {
|
|
5333
|
-
const
|
|
5334
|
-
p(
|
|
5353
|
+
const S = !m;
|
|
5354
|
+
p(S), f(void 0), o.write(u, S);
|
|
5335
5355
|
}, [
|
|
5336
5356
|
m,
|
|
5337
5357
|
u,
|
|
5338
5358
|
o
|
|
5339
|
-
]), P = z((
|
|
5340
|
-
sh(
|
|
5359
|
+
]), P = z((S) => {
|
|
5360
|
+
sh(S) && f(S);
|
|
5341
5361
|
}, []), x = z(() => f(void 0), []);
|
|
5342
5362
|
return {
|
|
5343
5363
|
available: g,
|
|
@@ -6216,34 +6236,34 @@ function zh(e, t, n) {
|
|
|
6216
6236
|
const h = z((k) => {
|
|
6217
6237
|
u.current = k, l(k);
|
|
6218
6238
|
}, []), f = (k) => {
|
|
6219
|
-
const y = u.current, { region:
|
|
6220
|
-
if (!y || !
|
|
6221
|
-
const
|
|
6222
|
-
return $h(n.composition.roots, n.adapter, y,
|
|
6239
|
+
const y = u.current, { region: N } = k.target;
|
|
6240
|
+
if (!y || !N.containerId) return;
|
|
6241
|
+
const A = N.kind === Te.Container ? g(N.containerId) : N.index;
|
|
6242
|
+
return $h(n.composition.roots, n.adapter, y, N.containerId, A);
|
|
6223
6243
|
}, g = (k) => {
|
|
6224
6244
|
const y = [...n.composition.roots];
|
|
6225
6245
|
for (; y.length > 0; ) {
|
|
6226
|
-
const
|
|
6227
|
-
if (n.adapter.idOf(
|
|
6228
|
-
y.push(...n.adapter.childrenOf(
|
|
6246
|
+
const N = y.pop();
|
|
6247
|
+
if (n.adapter.idOf(N) === k) return n.adapter.childrenOf(N).length;
|
|
6248
|
+
y.push(...n.adapter.childrenOf(N));
|
|
6229
6249
|
}
|
|
6230
6250
|
return 0;
|
|
6231
6251
|
}, m = (k) => {
|
|
6232
|
-
const y = e.current.getBoundingClientRect(),
|
|
6233
|
-
if (!
|
|
6252
|
+
const y = e.current.getBoundingClientRect(), N = jh(t(), k.clientX - y.left, k.clientY - y.top), A = k.target.closest("[data-scene-id], [data-studio-element]"), T = A?.dataset.sceneId ?? A?.dataset.studioElement, C = !!T && n.ownershipOf(T) !== ie.Local;
|
|
6253
|
+
if (!N || C) return { denied: !0 };
|
|
6234
6254
|
if (Jn(k)) {
|
|
6235
|
-
const
|
|
6236
|
-
if (
|
|
6255
|
+
const _ = f(N), L = _ ? n.validateMove(_) : oe.NodeNotFound;
|
|
6256
|
+
if (L && L !== oe.NoChange) return { denied: !0 };
|
|
6237
6257
|
}
|
|
6238
6258
|
return {
|
|
6239
|
-
drop:
|
|
6259
|
+
drop: N,
|
|
6240
6260
|
denied: !1
|
|
6241
6261
|
};
|
|
6242
6262
|
}, v = (k, y) => {
|
|
6243
|
-
const
|
|
6263
|
+
const N = e.current.getBoundingClientRect();
|
|
6244
6264
|
return {
|
|
6245
|
-
left: k.clientX -
|
|
6246
|
-
top: k.clientY -
|
|
6265
|
+
left: k.clientX - N.left - y.container.left,
|
|
6266
|
+
top: k.clientY - N.top - y.container.top
|
|
6247
6267
|
};
|
|
6248
6268
|
};
|
|
6249
6269
|
return {
|
|
@@ -6258,22 +6278,22 @@ function zh(e, t, n) {
|
|
|
6258
6278
|
onDragOver: (k) => {
|
|
6259
6279
|
if (!At(k) || (k.preventDefault(), p.current)) return;
|
|
6260
6280
|
const y = m(k);
|
|
6261
|
-
k.dataTransfer.dropEffect = y.denied ? "none" : Jn(k) ? "move" : "copy", i((
|
|
6281
|
+
k.dataTransfer.dropEffect = y.denied ? "none" : Jn(k) ? "move" : "copy", i((N) => Wh(N, y) ? N : y);
|
|
6262
6282
|
},
|
|
6263
6283
|
onDragLeave: (k) => {
|
|
6264
6284
|
At(k) && (c.current = Math.max(0, c.current - 1), c.current === 0 && i(void 0));
|
|
6265
6285
|
},
|
|
6266
6286
|
onDrop: (k) => {
|
|
6267
6287
|
if (!At(k)) return;
|
|
6268
|
-
const y = _m(k),
|
|
6269
|
-
if (k.preventDefault(), d(), p.current = !1,
|
|
6288
|
+
const y = _m(k), N = $m(k), { drop: A, denied: T } = m(k), C = A && y ? f(A) : void 0, _ = p.current;
|
|
6289
|
+
if (k.preventDefault(), d(), p.current = !1, _ || T || !A) return;
|
|
6270
6290
|
if (y) {
|
|
6271
|
-
|
|
6291
|
+
C && n.move(C, v(k, A));
|
|
6272
6292
|
return;
|
|
6273
6293
|
}
|
|
6274
|
-
if (!
|
|
6275
|
-
const { region:
|
|
6276
|
-
|
|
6294
|
+
if (!N) return;
|
|
6295
|
+
const { region: L } = A.target, D = L.containerId ?? void 0, I = L.kind === Te.Container ? void 0 : L.index, F = v(k, A);
|
|
6296
|
+
N.kind === "layout" ? n.insertLayout(N.item, D, I, F) : n.insertComponent(Ao(N.componentName, N.package), D, I, F);
|
|
6277
6297
|
}
|
|
6278
6298
|
}
|
|
6279
6299
|
};
|
|
@@ -6473,89 +6493,89 @@ function ef({ anchor: e, bounds: t, size: n, prefer: o, gap: i = 6 }) {
|
|
|
6473
6493
|
};
|
|
6474
6494
|
}
|
|
6475
6495
|
var Hi = [
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6496
|
+
$.target,
|
|
6497
|
+
$.slot,
|
|
6498
|
+
$.slice,
|
|
6499
|
+
$.emphasis
|
|
6480
6500
|
], tf = [
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
|
|
6501
|
+
$.moveEarlier,
|
|
6502
|
+
$.moveLater,
|
|
6503
|
+
$.addSubItem,
|
|
6504
|
+
$.duplicate,
|
|
6505
|
+
$.delete
|
|
6486
6506
|
], nf = {
|
|
6487
|
-
[
|
|
6488
|
-
[
|
|
6489
|
-
[
|
|
6507
|
+
[$.target]: /* @__PURE__ */ a(fc, { "aria-hidden": "true" }),
|
|
6508
|
+
[$.slot]: /* @__PURE__ */ a(gc, { "aria-hidden": "true" }),
|
|
6509
|
+
[$.slice]: /* @__PURE__ */ a(yc, { "aria-hidden": "true" })
|
|
6490
6510
|
}, of = {
|
|
6491
|
-
[
|
|
6492
|
-
[
|
|
6493
|
-
[
|
|
6494
|
-
[
|
|
6495
|
-
[
|
|
6511
|
+
[$.moveEarlier]: /* @__PURE__ */ a(uc, { "aria-hidden": "true" }),
|
|
6512
|
+
[$.moveLater]: /* @__PURE__ */ a(pc, { "aria-hidden": "true" }),
|
|
6513
|
+
[$.addSubItem]: /* @__PURE__ */ a(hc, { "aria-hidden": "true" }),
|
|
6514
|
+
[$.duplicate]: /* @__PURE__ */ a(mc, { "aria-hidden": "true" }),
|
|
6515
|
+
[$.delete]: /* @__PURE__ */ a(bc, { "aria-hidden": "true" })
|
|
6496
6516
|
}, rf = ({ subject: e, item: t, anchor: n, bounds: o, strings: i, renameToken: r, chipLabel: s, onRename: l, onAction: c, onChoice: u, readOnlyActions: d, onReadOnlyAction: p, onLeave: h }) => {
|
|
6497
6517
|
const f = V(null), g = V(null), [m, v] = j({
|
|
6498
6518
|
width: 380,
|
|
6499
6519
|
height: 100
|
|
6500
|
-
}), [w, P] = j(t.label), [x,
|
|
6520
|
+
}), [w, P] = j(t.label), [x, S] = j(0), k = e.mode.itemToolbar, y = k.some((R) => R.compact === !0), N = k.some((R) => Hi.includes(R.id)), A = k.find((R) => R.id === $.rename), T = A && Ft(A, t);
|
|
6501
6521
|
ce(() => {
|
|
6502
6522
|
P(t.label);
|
|
6503
6523
|
}, [t.id, t.label]), ce(() => {
|
|
6504
6524
|
r === 0 || !g.current || (g.current.focus({ preventScroll: !0 }), g.current.select());
|
|
6505
6525
|
}, [r, t.id]), Se(() => {
|
|
6506
|
-
const
|
|
6507
|
-
|
|
6508
|
-
width:
|
|
6509
|
-
height:
|
|
6526
|
+
const R = f.current?.getBoundingClientRect();
|
|
6527
|
+
R && (Math.round(R.width) !== Math.round(m.width) || Math.round(R.height) !== Math.round(m.height)) && v({
|
|
6528
|
+
width: R.width,
|
|
6529
|
+
height: R.height
|
|
6510
6530
|
});
|
|
6511
6531
|
});
|
|
6512
|
-
const
|
|
6532
|
+
const C = e.source.kind === "elements" ? "above" : "below", _ = ef({
|
|
6513
6533
|
anchor: n,
|
|
6514
6534
|
bounds: o,
|
|
6515
6535
|
size: m,
|
|
6516
|
-
prefer:
|
|
6517
|
-
}),
|
|
6518
|
-
const
|
|
6519
|
-
|
|
6520
|
-
},
|
|
6521
|
-
|
|
6522
|
-
},
|
|
6523
|
-
if (
|
|
6524
|
-
|
|
6536
|
+
prefer: C
|
|
6537
|
+
}), L = V(!1), D = () => {
|
|
6538
|
+
const R = w.trim();
|
|
6539
|
+
R !== "" && R !== t.label ? l(R) : P(t.label);
|
|
6540
|
+
}, I = (R) => {
|
|
6541
|
+
R.key === "Enter" && (R.preventDefault(), D(), L.current = !0, h()), R.key === "Escape" && (R.preventDefault(), R.stopPropagation(), P(t.label), L.current = !0, h());
|
|
6542
|
+
}, F = () => {
|
|
6543
|
+
if (L.current) {
|
|
6544
|
+
L.current = !1;
|
|
6525
6545
|
return;
|
|
6526
6546
|
}
|
|
6527
|
-
|
|
6528
|
-
},
|
|
6529
|
-
if (
|
|
6530
|
-
const ee =
|
|
6547
|
+
D();
|
|
6548
|
+
}, M = () => Array.from(f.current?.querySelectorAll("[data-roving]:not(:disabled)") ?? []), q = (R) => {
|
|
6549
|
+
if (R.target instanceof HTMLInputElement) return;
|
|
6550
|
+
const ee = M(), he = ee.indexOf(R.target);
|
|
6531
6551
|
if (he < 0) return;
|
|
6532
|
-
const J =
|
|
6533
|
-
if (J === void 0 ||
|
|
6534
|
-
|
|
6552
|
+
const J = R.key === "ArrowRight" || R.key === "ArrowDown" ? he + 1 : R.key === "ArrowLeft" || R.key === "ArrowUp" ? he - 1 : R.key === "Home" ? 0 : R.key === "End" ? ee.length - 1 : void 0;
|
|
6553
|
+
if (J === void 0 || R.altKey) return;
|
|
6554
|
+
R.preventDefault();
|
|
6535
6555
|
const ae = ee[(J + ee.length) % ee.length];
|
|
6536
|
-
|
|
6556
|
+
S(Number(ae.dataset.roving)), ae.focus();
|
|
6537
6557
|
}, ne = {
|
|
6538
6558
|
ref: f,
|
|
6539
6559
|
role: "toolbar",
|
|
6540
6560
|
"aria-label": i.toolbarLabel(t.label),
|
|
6541
6561
|
className: "studio-design-toolbar",
|
|
6542
|
-
"data-side":
|
|
6562
|
+
"data-side": _.side,
|
|
6543
6563
|
"data-compact": y ? "true" : void 0,
|
|
6544
6564
|
"data-kind": e.source.kind,
|
|
6545
6565
|
style: {
|
|
6546
|
-
left:
|
|
6547
|
-
top:
|
|
6566
|
+
left: _.left,
|
|
6567
|
+
top: _.top
|
|
6548
6568
|
},
|
|
6549
6569
|
onKeyDown: q
|
|
6550
6570
|
};
|
|
6551
6571
|
if (t.readOnly) {
|
|
6552
|
-
const
|
|
6572
|
+
const R = t.origin ? i.inheritedFrom(t.origin) : i.readOnlyReasons[t.readOnlyReason ?? ""] ?? t.readOnlyReason ?? "";
|
|
6553
6573
|
return /* @__PURE__ */ b("div", {
|
|
6554
6574
|
...ne,
|
|
6555
6575
|
"data-read-only": "true",
|
|
6556
6576
|
children: [/* @__PURE__ */ b("span", {
|
|
6557
6577
|
className: "studio-design-toolbar__reason",
|
|
6558
|
-
children: [/* @__PURE__ */ a(Er, { "aria-hidden": "true" }), /* @__PURE__ */ a("span", { children:
|
|
6578
|
+
children: [/* @__PURE__ */ a(Er, { "aria-hidden": "true" }), /* @__PURE__ */ a("span", { children: R })]
|
|
6559
6579
|
}), d.map((ee, he) => /* @__PURE__ */ a("button", {
|
|
6560
6580
|
type: "button",
|
|
6561
6581
|
className: "studio-design-toolbar__text-action",
|
|
@@ -6569,44 +6589,44 @@ var Hi = [
|
|
|
6569
6589
|
}
|
|
6570
6590
|
let ye = 0;
|
|
6571
6591
|
const me = () => {
|
|
6572
|
-
const
|
|
6592
|
+
const R = ye++;
|
|
6573
6593
|
return {
|
|
6574
|
-
"data-roving":
|
|
6575
|
-
tabIndex: x ===
|
|
6594
|
+
"data-roving": R,
|
|
6595
|
+
tabIndex: x === R ? 0 : -1
|
|
6576
6596
|
};
|
|
6577
|
-
}, ue = k.filter((
|
|
6597
|
+
}, ue = k.filter((R) => Hi.includes(R.id) && Ft(R, t).visible), Ie = tf.flatMap((R) => k.filter((ee) => ee.id === R)).filter((R) => Ft(R, t).visible);
|
|
6578
6598
|
return /* @__PURE__ */ b("div", {
|
|
6579
6599
|
...ne,
|
|
6580
6600
|
children: [
|
|
6581
|
-
|
|
6601
|
+
T?.visible && /* @__PURE__ */ a("input", {
|
|
6582
6602
|
ref: g,
|
|
6583
6603
|
type: "text",
|
|
6584
6604
|
className: "studio-design-toolbar__title",
|
|
6585
6605
|
value: w,
|
|
6586
6606
|
"aria-label": i.titleField,
|
|
6587
6607
|
"data-action": "rename",
|
|
6588
|
-
onChange: (
|
|
6589
|
-
onBlur:
|
|
6590
|
-
onKeyDown:
|
|
6591
|
-
onFocus: (
|
|
6608
|
+
onChange: (R) => P(R.target.value),
|
|
6609
|
+
onBlur: F,
|
|
6610
|
+
onKeyDown: I,
|
|
6611
|
+
onFocus: (R) => R.currentTarget.select()
|
|
6592
6612
|
}),
|
|
6593
|
-
|
|
6613
|
+
T?.visible && N && /* @__PURE__ */ a("span", {
|
|
6594
6614
|
className: "studio-design-toolbar__divider",
|
|
6595
6615
|
"aria-hidden": "true"
|
|
6596
6616
|
}),
|
|
6597
6617
|
ue.length > 0 && /* @__PURE__ */ a("div", {
|
|
6598
6618
|
className: "studio-design-toolbar__chips",
|
|
6599
|
-
children: ue.map((
|
|
6619
|
+
children: ue.map((R) => /* @__PURE__ */ b("button", {
|
|
6600
6620
|
type: "button",
|
|
6601
6621
|
className: "studio-design-toolbar__chip",
|
|
6602
|
-
"data-action":
|
|
6603
|
-
title:
|
|
6604
|
-
"data-unlinked":
|
|
6622
|
+
"data-action": R.id,
|
|
6623
|
+
title: R.title,
|
|
6624
|
+
"data-unlinked": R.id !== $.emphasis && t.unlinked && R.id !== $.slot ? "true" : void 0,
|
|
6605
6625
|
"aria-haspopup": "dialog",
|
|
6606
6626
|
...me(),
|
|
6607
|
-
onClick: (ee) => u(
|
|
6608
|
-
children: [nf[
|
|
6609
|
-
},
|
|
6627
|
+
onClick: (ee) => u(R.id, ee.currentTarget),
|
|
6628
|
+
children: [nf[R.id], /* @__PURE__ */ a("span", { children: s(R.id, t) })]
|
|
6629
|
+
}, R.id))
|
|
6610
6630
|
}),
|
|
6611
6631
|
ue.length > 0 && Ie.length > 0 && /* @__PURE__ */ a("span", {
|
|
6612
6632
|
className: "studio-design-toolbar__divider",
|
|
@@ -6614,19 +6634,19 @@ var Hi = [
|
|
|
6614
6634
|
}),
|
|
6615
6635
|
Ie.length > 0 && /* @__PURE__ */ a("div", {
|
|
6616
6636
|
className: "studio-design-toolbar__actions",
|
|
6617
|
-
children: Ie.map((
|
|
6618
|
-
const ee = Ft(
|
|
6637
|
+
children: Ie.map((R) => {
|
|
6638
|
+
const ee = Ft(R, t);
|
|
6619
6639
|
return /* @__PURE__ */ a("button", {
|
|
6620
6640
|
type: "button",
|
|
6621
6641
|
className: "studio-design-toolbar__button",
|
|
6622
|
-
"data-action":
|
|
6623
|
-
title:
|
|
6624
|
-
"aria-label":
|
|
6642
|
+
"data-action": R.id,
|
|
6643
|
+
title: R.title,
|
|
6644
|
+
"aria-label": R.title,
|
|
6625
6645
|
disabled: !ee.enabled,
|
|
6626
6646
|
...me(),
|
|
6627
|
-
onClick: () => c(
|
|
6628
|
-
children: of[
|
|
6629
|
-
},
|
|
6647
|
+
onClick: () => c(R.id),
|
|
6648
|
+
children: of[R.id]
|
|
6649
|
+
}, R.id);
|
|
6630
6650
|
})
|
|
6631
6651
|
})
|
|
6632
6652
|
]
|
|
@@ -6699,28 +6719,28 @@ function lf(e, t) {
|
|
|
6699
6719
|
}, [t]), sf);
|
|
6700
6720
|
}
|
|
6701
6721
|
var xn = 34, cf = ({ surface: e, state: t, controller: n, environment: o, editorStrings: i, strings: r }) => {
|
|
6702
|
-
const { subject: s } = t, l = lf(e, s), [c, u] = j(), d = o.propertyEditors?.registry ?? nn, p = U(() => So(o.availableSources), [o.availableSources]), h = z((
|
|
6703
|
-
if (typeof
|
|
6704
|
-
const
|
|
6705
|
-
return
|
|
6706
|
-
}, [o]), f = z((
|
|
6707
|
-
const
|
|
6708
|
-
if (
|
|
6709
|
-
switch (
|
|
6710
|
-
case
|
|
6711
|
-
return h(
|
|
6712
|
-
case
|
|
6713
|
-
return r.emphasis[String(
|
|
6714
|
-
case
|
|
6715
|
-
return typeof
|
|
6722
|
+
const { subject: s } = t, l = lf(e, s), [c, u] = j(), d = o.propertyEditors?.registry ?? nn, p = U(() => So(o.availableSources), [o.availableSources]), h = z((I) => {
|
|
6723
|
+
if (typeof I != "string" || I === "") return;
|
|
6724
|
+
const F = o.propertyEditors?.slices?.find((q) => q.id === I) ?? o.stateChangeSlices.find((q) => q.id === I), M = I.split(".");
|
|
6725
|
+
return F?.name ?? M[M.length - 1];
|
|
6726
|
+
}, [o]), f = z((I, F) => {
|
|
6727
|
+
const M = F.chips?.[I];
|
|
6728
|
+
if (M !== void 0 && M !== "") return M;
|
|
6729
|
+
switch (I) {
|
|
6730
|
+
case $.slice:
|
|
6731
|
+
return h(F.values.slice) ?? r.chooseSlice;
|
|
6732
|
+
case $.emphasis:
|
|
6733
|
+
return r.emphasis[String(F.values.emphasis ?? "secondary").toLowerCase()] ?? String(F.values.emphasis ?? "");
|
|
6734
|
+
case $.slot:
|
|
6735
|
+
return typeof F.values.slot == "string" && F.values.slot !== "" ? F.values.slot : r.mainArea;
|
|
6716
6736
|
default:
|
|
6717
6737
|
return r.notLinked;
|
|
6718
6738
|
}
|
|
6719
6739
|
}, [h, r]), g = s?.selected?.parentId !== void 0 && l !== void 0 && l.items[s.selected.id] === void 0, m = s?.selected?.parentId;
|
|
6720
6740
|
if (ce(() => {
|
|
6721
6741
|
if (!g || !m) return;
|
|
6722
|
-
const
|
|
6723
|
-
|
|
6742
|
+
const I = e.current?.querySelector(`[data-scene-nav-item="${CSS.escape(m)}"] > [data-scene-nav-link]`);
|
|
6743
|
+
I && (I.focus({ preventScroll: !0 }), I.dispatchEvent(new KeyboardEvent("keydown", {
|
|
6724
6744
|
key: "ArrowRight",
|
|
6725
6745
|
bubbles: !0,
|
|
6726
6746
|
cancelable: !0
|
|
@@ -6730,13 +6750,13 @@ var xn = 34, cf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6730
6750
|
m,
|
|
6731
6751
|
e
|
|
6732
6752
|
]), !s || !l) return null;
|
|
6733
|
-
const { selected: v, source: w } = s, P = s.mode.addActions[0], x = w.items.flatMap((
|
|
6734
|
-
left: (
|
|
6735
|
-
top: (
|
|
6753
|
+
const { selected: v, source: w } = s, P = s.mode.addActions[0], x = w.items.flatMap((I) => l.items[I.id] ? [l.items[I.id]] : []), S = x[x.length - 1], k = s.mode.itemToolbar.some((I) => I.compact === !0), y = S ?? l.component, N = y && P ? k || !S ? {
|
|
6754
|
+
left: (S ?? y).left,
|
|
6755
|
+
top: (S ? S.top + S.height : y.top) + 8
|
|
6736
6756
|
} : {
|
|
6737
|
-
left:
|
|
6738
|
-
top:
|
|
6739
|
-
} : void 0,
|
|
6757
|
+
left: S.left + S.width + 8,
|
|
6758
|
+
top: S.top + (S.height - xn) / 2
|
|
6759
|
+
} : void 0, A = v ? l.items[v.id] : void 0, T = c && v && c.itemId === v.id ? w.choice(c.actionId, v) : void 0, C = () => u(void 0), _ = () => Io({
|
|
6740
6760
|
controller: n,
|
|
6741
6761
|
environment: o,
|
|
6742
6762
|
strings: i,
|
|
@@ -6745,67 +6765,67 @@ var xn = 34, cf = ({ surface: e, state: t, controller: n, environment: o, editor
|
|
|
6745
6765
|
inCanvas: !1,
|
|
6746
6766
|
bindingScope: p,
|
|
6747
6767
|
slotNames: da(r.navigation)
|
|
6748
|
-
}),
|
|
6749
|
-
if (!
|
|
6750
|
-
const
|
|
6751
|
-
ia(
|
|
6752
|
-
},
|
|
6768
|
+
}), L = (I, F) => {
|
|
6769
|
+
if (!T) return;
|
|
6770
|
+
const M = T.plan(F);
|
|
6771
|
+
ia(M) || u(void 0), t.perform(M);
|
|
6772
|
+
}, D = A;
|
|
6753
6773
|
return /* @__PURE__ */ b(le, { children: [
|
|
6754
|
-
|
|
6774
|
+
N && P && /* @__PURE__ */ a("button", {
|
|
6755
6775
|
type: "button",
|
|
6756
6776
|
className: "studio-design-add",
|
|
6757
6777
|
"data-action": P.id,
|
|
6758
6778
|
"aria-label": P.label,
|
|
6759
6779
|
title: P.label,
|
|
6760
6780
|
style: {
|
|
6761
|
-
left:
|
|
6762
|
-
top:
|
|
6781
|
+
left: N.left,
|
|
6782
|
+
top: N.top,
|
|
6763
6783
|
width: xn,
|
|
6764
6784
|
height: xn
|
|
6765
6785
|
},
|
|
6766
6786
|
onClick: () => t.add(P.id),
|
|
6767
6787
|
children: /* @__PURE__ */ a(vc, { "aria-hidden": "true" })
|
|
6768
6788
|
}),
|
|
6769
|
-
v &&
|
|
6789
|
+
v && D && /* @__PURE__ */ a(rf, {
|
|
6770
6790
|
subject: s,
|
|
6771
6791
|
item: v,
|
|
6772
|
-
anchor:
|
|
6792
|
+
anchor: D,
|
|
6773
6793
|
bounds: l.surface,
|
|
6774
6794
|
strings: r,
|
|
6775
6795
|
renameToken: t.renameToken,
|
|
6776
6796
|
chipLabel: f,
|
|
6777
|
-
onRename: (
|
|
6778
|
-
onAction: (
|
|
6779
|
-
onChoice: (
|
|
6780
|
-
actionId:
|
|
6797
|
+
onRename: (I) => t.rename(v, I),
|
|
6798
|
+
onAction: (I) => t.act(I, v),
|
|
6799
|
+
onChoice: (I, F) => u((M) => M && M.actionId === I && M.itemId === v.id ? void 0 : {
|
|
6800
|
+
actionId: I,
|
|
6781
6801
|
itemId: v.id,
|
|
6782
|
-
opener:
|
|
6802
|
+
opener: F
|
|
6783
6803
|
}),
|
|
6784
6804
|
readOnlyActions: w.readOnlyActions(v),
|
|
6785
|
-
onReadOnlyAction: (
|
|
6805
|
+
onReadOnlyAction: (I) => t.perform(I.plan()),
|
|
6786
6806
|
onLeave: () => e.current?.focus({ preventScroll: !0 })
|
|
6787
6807
|
}, v.id),
|
|
6788
|
-
|
|
6808
|
+
T && c && D && /* @__PURE__ */ a(Zh, {
|
|
6789
6809
|
registry: d,
|
|
6790
|
-
property:
|
|
6791
|
-
context:
|
|
6810
|
+
property: T.property,
|
|
6811
|
+
context: _(),
|
|
6792
6812
|
componentId: v.id,
|
|
6793
6813
|
anchor: df(e, c.opener),
|
|
6794
6814
|
opener: c.opener,
|
|
6795
6815
|
bounds: l.surface,
|
|
6796
|
-
title: s.mode.itemToolbar.find((
|
|
6816
|
+
title: s.mode.itemToolbar.find((I) => I.id === c.actionId)?.title ?? c.actionId,
|
|
6797
6817
|
strings: r,
|
|
6798
|
-
onChange:
|
|
6799
|
-
onClose:
|
|
6818
|
+
onChange: L,
|
|
6819
|
+
onClose: C
|
|
6800
6820
|
}),
|
|
6801
|
-
v &&
|
|
6821
|
+
v && A && s.source.kind === "region" && /* @__PURE__ */ a("div", {
|
|
6802
6822
|
className: "studio-design-item-ring",
|
|
6803
6823
|
"data-item": v.id,
|
|
6804
6824
|
style: {
|
|
6805
|
-
left:
|
|
6806
|
-
top:
|
|
6807
|
-
width:
|
|
6808
|
-
height:
|
|
6825
|
+
left: A.left - 2,
|
|
6826
|
+
top: A.top - 2,
|
|
6827
|
+
width: A.width + 4,
|
|
6828
|
+
height: A.height + 4
|
|
6809
6829
|
}
|
|
6810
6830
|
}),
|
|
6811
6831
|
t.notice !== "" && /* @__PURE__ */ a("div", {
|
|
@@ -6964,9 +6984,9 @@ function bf(e, t, n) {
|
|
|
6964
6984
|
if (e.altKey && !e.ctrlKey && !e.metaKey) {
|
|
6965
6985
|
const l = e.key === "ArrowUp" || e.key === "ArrowLeft", c = e.key === "ArrowDown" || e.key === "ArrowRight";
|
|
6966
6986
|
if (l || c)
|
|
6967
|
-
return t.act(l ?
|
|
6987
|
+
return t.act(l ? $.moveEarlier : $.moveLater, s), r();
|
|
6968
6988
|
}
|
|
6969
|
-
return ko(e) ? (t.act(
|
|
6989
|
+
return ko(e) ? (t.act($.delete, s), r()) : !1;
|
|
6970
6990
|
}
|
|
6971
6991
|
function Ma(e, t, n) {
|
|
6972
6992
|
if (e.id === t) return n;
|
|
@@ -6987,55 +7007,55 @@ var yf = () => {
|
|
|
6987
7007
|
button: "Button",
|
|
6988
7008
|
item: "New item"
|
|
6989
7009
|
}, kf = ({ controller: e, environment: t, resolveBinding: n = yf, configuration: o, strings: i, editorStrings: r, viewportHeight: s, shell: l }) => {
|
|
6990
|
-
const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: h, measureNow: f } = Gh(c, d, p), { feedback: g, draggedId: m, startMoving: v, endMoving: w, handlers: P } = zh(c, f, e), [x,
|
|
7010
|
+
const c = V(null), { composition: u, dropRegions: d, selectedId: p } = e, { selectionRect: h, measureNow: f } = Gh(c, d, p), { feedback: g, draggedId: m, startMoving: v, endMoving: w, handlers: P } = zh(c, f, e), [x, S] = j(), k = _h(e, t), { document: y, context: N } = e, A = U(() => o ?? (y.instanceContributions.length > 0 ? mr(mo(y, N.scope), y.instanceContributions, N.catalog) : void 0), [
|
|
6991
7011
|
o,
|
|
6992
7012
|
y,
|
|
6993
|
-
|
|
6994
|
-
]),
|
|
7013
|
+
N
|
|
7014
|
+
]), T = r?.designMode ?? Oo, C = t.destinations[0], _ = U(() => C ? { screen: C.id } : void 0, [C]), L = pm({
|
|
6995
7015
|
controller: e,
|
|
6996
7016
|
environment: t,
|
|
6997
|
-
strings:
|
|
7017
|
+
strings: T,
|
|
6998
7018
|
startingLabels: wf,
|
|
6999
|
-
...
|
|
7019
|
+
..._ ? { startingDestination: _ } : {}
|
|
7000
7020
|
});
|
|
7001
7021
|
Se(() => {
|
|
7002
7022
|
const J = c.current?.closest("[data-studio-viewport]") ?? c.current?.parentElement;
|
|
7003
7023
|
if (s !== void 0 || !J || typeof ResizeObserver > "u") return;
|
|
7004
|
-
const ae = new ResizeObserver(() =>
|
|
7005
|
-
return
|
|
7024
|
+
const ae = new ResizeObserver(() => S(J.clientHeight));
|
|
7025
|
+
return S(J.clientHeight), ae.observe(J), () => ae.disconnect();
|
|
7006
7026
|
}, [s]);
|
|
7007
|
-
const
|
|
7027
|
+
const D = (J) => {
|
|
7008
7028
|
if (J.key === "Escape" && l?.peeking) {
|
|
7009
7029
|
J.preventDefault(), l.back();
|
|
7010
7030
|
return;
|
|
7011
7031
|
}
|
|
7012
|
-
bf(J,
|
|
7032
|
+
bf(J, L, () => {
|
|
7013
7033
|
const ae = c.current?.querySelector(".studio-design-toolbar__title");
|
|
7014
7034
|
return ae?.focus({ preventScroll: !0 }), !!ae;
|
|
7015
7035
|
}) || !ko(J) || !e.selectedId || !e.canRemove(e.selectedId) || (J.preventDefault(), e.remove(e.selectedId));
|
|
7016
|
-
},
|
|
7036
|
+
}, I = !!e.selectedId && e.ownershipOf(e.selectedId) === ie.Local && e.canRemove(e.selectedId), F = e.selection && (e.selection.name || e.selection.componentName) || "";
|
|
7017
7037
|
Xh(c, (J, ae) => {
|
|
7018
|
-
e.select(J),
|
|
7038
|
+
e.select(J), L.pointItem(J, ae);
|
|
7019
7039
|
}, l?.frame !== void 0);
|
|
7020
|
-
const { setMeasurer:
|
|
7021
|
-
ce(() => (
|
|
7040
|
+
const { setMeasurer: M } = e;
|
|
7041
|
+
ce(() => (M((J) => {
|
|
7022
7042
|
const ae = c.current;
|
|
7023
7043
|
if (!ae) return;
|
|
7024
|
-
const
|
|
7044
|
+
const E = ae.getBoundingClientRect(), W = ae.querySelector(`[data-studio-element="${CSS.escape(J)}"]`)?.closest("[data-scene-placement]")?.getBoundingClientRect();
|
|
7025
7045
|
if (W && W.width > 0 && W.height > 0) return {
|
|
7026
|
-
left: W.left -
|
|
7027
|
-
top: W.top -
|
|
7046
|
+
left: W.left - E.left,
|
|
7047
|
+
top: W.top - E.top,
|
|
7028
7048
|
width: W.width,
|
|
7029
7049
|
height: W.height
|
|
7030
7050
|
};
|
|
7031
|
-
const
|
|
7032
|
-
return
|
|
7033
|
-
left:
|
|
7034
|
-
top:
|
|
7035
|
-
width:
|
|
7036
|
-
height:
|
|
7051
|
+
const B = Le(ae, J, E);
|
|
7052
|
+
return B && {
|
|
7053
|
+
left: B.left,
|
|
7054
|
+
top: B.top,
|
|
7055
|
+
width: B.width,
|
|
7056
|
+
height: B.height
|
|
7037
7057
|
};
|
|
7038
|
-
}), () =>
|
|
7058
|
+
}), () => M(void 0)), [M]);
|
|
7039
7059
|
const q = U(() => go(u.element, t.runtime.compositionProfile, t.runtime.packages), [
|
|
7040
7060
|
u,
|
|
7041
7061
|
t.runtime.compositionProfile,
|
|
@@ -7048,7 +7068,7 @@ var yf = () => {
|
|
|
7048
7068
|
q,
|
|
7049
7069
|
ne,
|
|
7050
7070
|
ye
|
|
7051
|
-
]), ue = U(() => xh(t.runtime.registry, i), [t.runtime.registry, i]), Ie = U(() => jo(t.runtime), [t.runtime]),
|
|
7071
|
+
]), ue = U(() => xh(t.runtime.registry, i), [t.runtime.registry, i]), Ie = U(() => jo(t.runtime), [t.runtime]), R = U(() => /* @__PURE__ */ a(yr, {
|
|
7052
7072
|
registry: t.runtime.iconAdapters,
|
|
7053
7073
|
children: /* @__PURE__ */ a(fr, {
|
|
7054
7074
|
storage: null,
|
|
@@ -7056,14 +7076,14 @@ var yf = () => {
|
|
|
7056
7076
|
structure: e.structure,
|
|
7057
7077
|
navigation: e.navigation,
|
|
7058
7078
|
module: e.navigationModule,
|
|
7059
|
-
logoLockedReason:
|
|
7079
|
+
logoLockedReason: T.navigation.logoLocked,
|
|
7060
7080
|
onNavigate: l?.frame ? l.navigate : void 0,
|
|
7061
7081
|
peeking: ne ? l?.peekingName : void 0,
|
|
7062
7082
|
children: /* @__PURE__ */ a(vo, {
|
|
7063
7083
|
element: me,
|
|
7064
7084
|
registry: ue,
|
|
7065
7085
|
resolveBinding: n,
|
|
7066
|
-
configuration:
|
|
7086
|
+
configuration: A
|
|
7067
7087
|
})
|
|
7068
7088
|
})
|
|
7069
7089
|
})
|
|
@@ -7072,7 +7092,7 @@ var yf = () => {
|
|
|
7072
7092
|
ue,
|
|
7073
7093
|
t.runtime.iconAdapters,
|
|
7074
7094
|
n,
|
|
7075
|
-
|
|
7095
|
+
A,
|
|
7076
7096
|
e.structure,
|
|
7077
7097
|
e.navigation,
|
|
7078
7098
|
e.navigationModule,
|
|
@@ -7092,10 +7112,10 @@ var yf = () => {
|
|
|
7092
7112
|
className: "studio-screen-surface",
|
|
7093
7113
|
style: he,
|
|
7094
7114
|
"data-studio-dragging": g ? "true" : void 0,
|
|
7095
|
-
onKeyDown:
|
|
7115
|
+
onKeyDown: D,
|
|
7096
7116
|
tabIndex: -1,
|
|
7097
7117
|
...P,
|
|
7098
|
-
children: [
|
|
7118
|
+
children: [R, /* @__PURE__ */ b("div", {
|
|
7099
7119
|
className: "studio-screen-surface__chrome",
|
|
7100
7120
|
children: [
|
|
7101
7121
|
h && /* @__PURE__ */ a("div", {
|
|
@@ -7103,7 +7123,7 @@ var yf = () => {
|
|
|
7103
7123
|
"data-moving": m === e.selectedId ? "true" : void 0,
|
|
7104
7124
|
style: h
|
|
7105
7125
|
}),
|
|
7106
|
-
h &&
|
|
7126
|
+
h && I && /* @__PURE__ */ a("div", {
|
|
7107
7127
|
className: "studio-screen-surface__grip",
|
|
7108
7128
|
style: {
|
|
7109
7129
|
left: h.left,
|
|
@@ -7111,9 +7131,9 @@ var yf = () => {
|
|
|
7111
7131
|
},
|
|
7112
7132
|
draggable: !0,
|
|
7113
7133
|
"aria-hidden": "true",
|
|
7114
|
-
title: i.moveHandle(
|
|
7134
|
+
title: i.moveHandle(F),
|
|
7115
7135
|
onDragStart: (J) => {
|
|
7116
|
-
v(e.selectedId), Am(J, e.selectedId,
|
|
7136
|
+
v(e.selectedId), Am(J, e.selectedId, F);
|
|
7117
7137
|
},
|
|
7118
7138
|
onDragEnd: w,
|
|
7119
7139
|
children: /* @__PURE__ */ a(Al, { "aria-hidden": "true" })
|
|
@@ -7129,15 +7149,15 @@ var yf = () => {
|
|
|
7129
7149
|
/* @__PURE__ */ a(mf, {
|
|
7130
7150
|
surface: c,
|
|
7131
7151
|
controller: e,
|
|
7132
|
-
strings:
|
|
7152
|
+
strings: T
|
|
7133
7153
|
}),
|
|
7134
7154
|
r && /* @__PURE__ */ a(cf, {
|
|
7135
7155
|
surface: c,
|
|
7136
|
-
state:
|
|
7156
|
+
state: L,
|
|
7137
7157
|
controller: e,
|
|
7138
7158
|
environment: t,
|
|
7139
7159
|
editorStrings: r,
|
|
7140
|
-
strings:
|
|
7160
|
+
strings: T
|
|
7141
7161
|
}),
|
|
7142
7162
|
/* @__PURE__ */ a("span", {
|
|
7143
7163
|
className: "studio-screen-surface__announcement",
|
|
@@ -7653,14 +7673,14 @@ var Vf = { modules: [] }, Jf = (e, t) => oo(e, t)?.id;
|
|
|
7653
7673
|
function Ua(e, t, n, o) {
|
|
7654
7674
|
const [i, r] = j(() => Rf(e.document)), s = V(void 0);
|
|
7655
7675
|
s.current ??= new Df(i, r);
|
|
7656
|
-
const l = z((
|
|
7657
|
-
const
|
|
7658
|
-
return
|
|
7659
|
-
height:
|
|
7660
|
-
bottom:
|
|
7676
|
+
const l = z((E) => s.current.commit(E), []), [c, u] = j(), [d, p] = j(), [h, f] = j(n.navigation?.module), g = V(void 0), m = z((E, W) => {
|
|
7677
|
+
const B = g.current?.(E), G = g.current?.(W);
|
|
7678
|
+
return B && G ? {
|
|
7679
|
+
height: B.height,
|
|
7680
|
+
bottom: B.top + B.height - G.top
|
|
7661
7681
|
} : void 0;
|
|
7662
|
-
}, []), v = z((
|
|
7663
|
-
g.current =
|
|
7682
|
+
}, []), v = z((E) => {
|
|
7683
|
+
g.current = E;
|
|
7664
7684
|
}, []), w = Kf(n.runtime.icons), P = U(() => ({
|
|
7665
7685
|
catalog: n.runtime.catalog,
|
|
7666
7686
|
scope: $n(t, t !== void 0),
|
|
@@ -7670,87 +7690,87 @@ function Ua(e, t, n, o) {
|
|
|
7670
7690
|
n,
|
|
7671
7691
|
t,
|
|
7672
7692
|
w
|
|
7673
|
-
]), x = U(() => no(i.document, t), [i.document, t]),
|
|
7693
|
+
]), x = U(() => no(i.document, t), [i.document, t]), S = U(() => qf(i.document, x.roots, P), [
|
|
7674
7694
|
i.document,
|
|
7675
7695
|
x,
|
|
7676
7696
|
P
|
|
7677
|
-
]), k = U(() => Uf(
|
|
7697
|
+
]), k = U(() => Uf(S), [S]), y = ft(i.document, t), N = U(() => Of(x.roots, Wf(y), k).filter((E) => E.containerId !== null), [
|
|
7678
7698
|
x,
|
|
7679
7699
|
y,
|
|
7680
7700
|
k
|
|
7681
|
-
]),
|
|
7701
|
+
]), A = c ? ze(x.roots, c) : void 0, T = U(() => c ? co(i.document, re(c), P) : void 0, [
|
|
7682
7702
|
i.document,
|
|
7683
7703
|
c,
|
|
7684
7704
|
P
|
|
7685
|
-
]),
|
|
7686
|
-
const
|
|
7705
|
+
]), C = z((E, W) => {
|
|
7706
|
+
const B = s.current.current, G = l((te) => Ff(te, E, P, W));
|
|
7687
7707
|
return {
|
|
7688
|
-
applied: G.undoable.length >
|
|
7708
|
+
applied: G.undoable.length > B.undoable.length || G.document !== B.document,
|
|
7689
7709
|
diagnostics: G.diagnostics
|
|
7690
7710
|
};
|
|
7691
|
-
}, [l, P]),
|
|
7692
|
-
|
|
7693
|
-
}, [
|
|
7694
|
-
const
|
|
7711
|
+
}, [l, P]), _ = z((E, W) => {
|
|
7712
|
+
C(E, W);
|
|
7713
|
+
}, [C]), L = z((E, W) => {
|
|
7714
|
+
const B = s.current.current, G = l((te) => Ef(te, E, P, W));
|
|
7695
7715
|
return {
|
|
7696
|
-
applied: G.document !==
|
|
7716
|
+
applied: G.document !== B.document,
|
|
7697
7717
|
diagnostics: G.diagnostics
|
|
7698
7718
|
};
|
|
7699
|
-
}, [l, P]),
|
|
7700
|
-
const
|
|
7719
|
+
}, [l, P]), D = z((E, W) => {
|
|
7720
|
+
const B = E ?? y?.id, G = B ? ze(x.roots, B)?.children ?? [] : [];
|
|
7701
7721
|
return {
|
|
7702
|
-
parent:
|
|
7722
|
+
parent: B,
|
|
7703
7723
|
index: W ?? G.length
|
|
7704
7724
|
};
|
|
7705
|
-
}, [y, x]),
|
|
7706
|
-
|
|
7707
|
-
const
|
|
7708
|
-
const Be =
|
|
7725
|
+
}, [y, x]), I = V(o);
|
|
7726
|
+
I.current = o;
|
|
7727
|
+
const F = z((E, W, B, G, te, de) => {
|
|
7728
|
+
const Be = D(W, B);
|
|
7709
7729
|
if (!Be.parent) return;
|
|
7710
|
-
const Ye = ze(no(s.current.current.document, t).roots, Be.parent), Va = Ye && ut(Ye) ? $a(
|
|
7711
|
-
|
|
7730
|
+
const Ye = ze(no(s.current.current.document, t).roots, Be.parent), Va = Ye && ut(Ye) ? $a(E, te ?? _a(ja(Ye, m))) : E;
|
|
7731
|
+
C(Ba(Be.parent, Be.index, Va), G).applied && (u(E.id), de && I.current?.(de));
|
|
7712
7732
|
}, [
|
|
7713
|
-
|
|
7714
|
-
|
|
7733
|
+
C,
|
|
7734
|
+
D,
|
|
7715
7735
|
t,
|
|
7716
7736
|
m
|
|
7717
|
-
]),
|
|
7718
|
-
const
|
|
7719
|
-
if (G && !(G === oe.NoChange &&
|
|
7720
|
-
if (
|
|
7721
|
-
const te = Tf(
|
|
7722
|
-
return te ?
|
|
7737
|
+
]), M = z((E, W) => {
|
|
7738
|
+
const B = Pf(x.roots, E, W, m), G = Qi(x.roots, E, k);
|
|
7739
|
+
if (G && !(G === oe.NoChange && B && E.targetParentId === Jf(x.roots, E.nodeId))) return G;
|
|
7740
|
+
if (B) return L(B, "Move").applied ? void 0 : oe.NodeLocked;
|
|
7741
|
+
const te = Tf(E);
|
|
7742
|
+
return te ? C(te, "Move").applied ? void 0 : oe.NodeLocked : oe.TargetNotContainer;
|
|
7723
7743
|
}, [
|
|
7724
7744
|
x,
|
|
7725
7745
|
k,
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
]), q = z((
|
|
7729
|
-
l((
|
|
7730
|
-
const G =
|
|
7746
|
+
C,
|
|
7747
|
+
L
|
|
7748
|
+
]), q = z((E, W) => {
|
|
7749
|
+
l((B) => {
|
|
7750
|
+
const G = B.document.screens.map((te) => te.name === "Screen" ? {
|
|
7731
7751
|
...te,
|
|
7732
|
-
forms:
|
|
7752
|
+
forms: E
|
|
7733
7753
|
} : te);
|
|
7734
|
-
return Pe(
|
|
7735
|
-
...
|
|
7754
|
+
return Pe(B, {
|
|
7755
|
+
...B.document,
|
|
7736
7756
|
screens: G
|
|
7737
7757
|
}, W);
|
|
7738
7758
|
});
|
|
7739
|
-
}, [l]), ne = z((
|
|
7759
|
+
}, [l]), ne = z((E, W, B) => {
|
|
7740
7760
|
l((G) => {
|
|
7741
|
-
const te = G.document.screenTemplates.map((de) => de.name ===
|
|
7761
|
+
const te = G.document.screenTemplates.map((de) => de.name === E ? {
|
|
7742
7762
|
...de,
|
|
7743
7763
|
outlets: W
|
|
7744
7764
|
} : de);
|
|
7745
7765
|
return Pe(G, {
|
|
7746
7766
|
...G.document,
|
|
7747
7767
|
screenTemplates: te
|
|
7748
|
-
},
|
|
7768
|
+
}, B);
|
|
7749
7769
|
});
|
|
7750
|
-
}, [l]), ye = z((
|
|
7770
|
+
}, [l]), ye = z((E, W, B) => {
|
|
7751
7771
|
l((G) => {
|
|
7752
7772
|
const te = G.document.screenTemplates.map((de) => {
|
|
7753
|
-
if (de.name !==
|
|
7773
|
+
if (de.name !== E) return de;
|
|
7754
7774
|
const { metadata: Be, ...Ye } = de;
|
|
7755
7775
|
return W ? {
|
|
7756
7776
|
...Ye,
|
|
@@ -7760,31 +7780,31 @@ function Ua(e, t, n, o) {
|
|
|
7760
7780
|
return Pe(G, {
|
|
7761
7781
|
...G.document,
|
|
7762
7782
|
screenTemplates: te
|
|
7763
|
-
},
|
|
7783
|
+
}, B);
|
|
7764
7784
|
});
|
|
7765
|
-
}, [l]), me = z((
|
|
7766
|
-
l((
|
|
7767
|
-
...
|
|
7768
|
-
dialogTemplates:
|
|
7785
|
+
}, [l]), me = z((E, W) => {
|
|
7786
|
+
l((B) => Pe(B, {
|
|
7787
|
+
...B.document,
|
|
7788
|
+
dialogTemplates: E
|
|
7769
7789
|
}, W));
|
|
7770
|
-
}, [l]), ue = z((
|
|
7771
|
-
l((de) => Pe(de, Ji(de.document,
|
|
7772
|
-
}, [l]), Ie = z((
|
|
7773
|
-
const
|
|
7774
|
-
l((G) => Pe(G, Sf(G.document,
|
|
7775
|
-
}, [l, n.runtime.bundles]),
|
|
7776
|
-
l((G) => Pe(G, Ji(G.document,
|
|
7790
|
+
}, [l]), ue = z((E, W, B, G, te) => {
|
|
7791
|
+
l((de) => Pe(de, Ji(de.document, E, (Be) => Qf(Be, W, B, G)), te));
|
|
7792
|
+
}, [l]), Ie = z((E, W) => {
|
|
7793
|
+
const B = n.runtime.bundles.flatMap((G) => G.screenTemplates ?? []);
|
|
7794
|
+
l((G) => Pe(G, Sf(G.document, E, B), W));
|
|
7795
|
+
}, [l, n.runtime.bundles]), R = z((E, W, B) => {
|
|
7796
|
+
l((G) => Pe(G, Ji(G.document, E, (te) => {
|
|
7777
7797
|
W ? te.behaviors = W : delete te.behaviors;
|
|
7778
|
-
}),
|
|
7779
|
-
}, [l]), ee = U(() => Ti(i.document), [i.document]), he = n.navigation?.structure ?? Vf, J = z((
|
|
7780
|
-
const
|
|
7781
|
-
return
|
|
7798
|
+
}), B));
|
|
7799
|
+
}, [l]), ee = U(() => Ti(i.document), [i.document]), he = n.navigation?.structure ?? Vf, J = z((E, W) => {
|
|
7800
|
+
const B = Os(Ti(s.current.current.document), E);
|
|
7801
|
+
return B.applied ? (l((G) => Pe(G, tm(G.document, B.model), W)), { applied: !0 }) : {
|
|
7782
7802
|
applied: !1,
|
|
7783
|
-
rejected:
|
|
7803
|
+
rejected: B.rejected
|
|
7784
7804
|
};
|
|
7785
|
-
}, [l]), ae = z((
|
|
7786
|
-
p(
|
|
7787
|
-
componentId:
|
|
7805
|
+
}, [l]), ae = z((E, W) => {
|
|
7806
|
+
p(E && W ? {
|
|
7807
|
+
componentId: E,
|
|
7788
7808
|
itemId: W
|
|
7789
7809
|
} : void 0);
|
|
7790
7810
|
}, []);
|
|
@@ -7800,34 +7820,34 @@ function Ua(e, t, n, o) {
|
|
|
7800
7820
|
composition: x,
|
|
7801
7821
|
context: P,
|
|
7802
7822
|
selectedId: c,
|
|
7803
|
-
selection:
|
|
7804
|
-
inspection:
|
|
7823
|
+
selection: A,
|
|
7824
|
+
inspection: T,
|
|
7805
7825
|
diagnostics: i.diagnostics,
|
|
7806
7826
|
adapter: k,
|
|
7807
|
-
ownershipOf:
|
|
7808
|
-
dropRegions:
|
|
7827
|
+
ownershipOf: S,
|
|
7828
|
+
dropRegions: N,
|
|
7809
7829
|
select: u,
|
|
7810
7830
|
setMeasurer: v,
|
|
7811
|
-
apply:
|
|
7812
|
-
tryApply:
|
|
7813
|
-
applyAll:
|
|
7814
|
-
move:
|
|
7815
|
-
validateMove: (
|
|
7816
|
-
insertComponent: (
|
|
7817
|
-
insertLayout: (
|
|
7818
|
-
remove: (
|
|
7819
|
-
if (!jn(x.roots,
|
|
7820
|
-
const W = zr(x.roots,
|
|
7821
|
-
|
|
7831
|
+
apply: _,
|
|
7832
|
+
tryApply: C,
|
|
7833
|
+
applyAll: L,
|
|
7834
|
+
move: M,
|
|
7835
|
+
validateMove: (E) => Qi(x.roots, E, k),
|
|
7836
|
+
insertComponent: (E, W, B, G) => F(la(Nt(), E, E), W, B, "Add", G, E),
|
|
7837
|
+
insertLayout: (E, W, B, G) => F(Yt(E, Nt(), E), W, B, "Add layout", G, `layout:${E}`),
|
|
7838
|
+
remove: (E) => {
|
|
7839
|
+
if (!jn(x.roots, E, k)) return;
|
|
7840
|
+
const W = zr(x.roots, E, k);
|
|
7841
|
+
C(If(E), "Remove").applied && u((B) => B === E || B === void 0 ? W : B);
|
|
7822
7842
|
},
|
|
7823
|
-
canRemove: (
|
|
7824
|
-
setProperty: (
|
|
7843
|
+
canRemove: (E) => jn(x.roots, E, k),
|
|
7844
|
+
setProperty: (E, W) => c && _(qn(c, E, W), "Change"),
|
|
7825
7845
|
setScreenForms: q,
|
|
7826
7846
|
setScreenTemplateOutlets: ne,
|
|
7827
7847
|
setScreenTemplateMetadata: ye,
|
|
7828
7848
|
setDialogTemplates: me,
|
|
7829
7849
|
setCollectionItemDestination: ue,
|
|
7830
|
-
setElementBehaviors:
|
|
7850
|
+
setElementBehaviors: R,
|
|
7831
7851
|
setScreenTemplate: Ie,
|
|
7832
7852
|
markSaved: () => {
|
|
7833
7853
|
l(Lf);
|
|
@@ -7864,7 +7884,7 @@ function Wa(e) {
|
|
|
7864
7884
|
var Yi = () => ({
|
|
7865
7885
|
width: window.innerWidth - 64,
|
|
7866
7886
|
height: window.innerHeight - 64
|
|
7867
|
-
}),
|
|
7887
|
+
}), yy = (e) => /* @__PURE__ */ a(ya, {
|
|
7868
7888
|
strings: e.strings,
|
|
7869
7889
|
onClose: () => e.onDismiss?.(),
|
|
7870
7890
|
children: /* @__PURE__ */ a(Xf, { ...e })
|
|
@@ -7885,58 +7905,58 @@ var Yi = () => ({
|
|
|
7885
7905
|
})
|
|
7886
7906
|
});
|
|
7887
7907
|
}, Zf = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, sourceRect: s, initialSize: l, rememberWindowAs: c, windowMemory: u, centerOffsetX: d, renderPaletteHost: p, onClose: h, onBeforeClose: f, onPreview: g, opened: m }) => {
|
|
7888
|
-
const v = V(void 0), w = Ua(m, e.authoringTemplate, t, (
|
|
7908
|
+
const v = V(void 0), w = Ua(m, e.authoringTemplate, t, (F) => v.current?.(F)), P = U(() => u ?? Jm(), [u]), x = U(() => Xm({
|
|
7889
7909
|
remembered: c ? P.read(c) : void 0,
|
|
7890
7910
|
saved: l,
|
|
7891
7911
|
lastUsed: P.readLastUsed()
|
|
7892
|
-
}, Yi()), []),
|
|
7893
|
-
c && P.write(c,
|
|
7894
|
-
}, [P, c]), k = z((
|
|
7895
|
-
|
|
7896
|
-
const
|
|
7912
|
+
}, Yi()), []), S = z((F) => {
|
|
7913
|
+
c && P.write(c, F);
|
|
7914
|
+
}, [P, c]), k = z((F) => {
|
|
7915
|
+
S(F);
|
|
7916
|
+
const M = ft(w.document, e.authoringTemplate);
|
|
7897
7917
|
h({
|
|
7898
7918
|
document: w.document,
|
|
7899
|
-
legacyElements: zt(
|
|
7900
|
-
windowSize:
|
|
7901
|
-
layout: Gt(
|
|
7919
|
+
legacyElements: zt(M, t.runtime.legacyTypeOf),
|
|
7920
|
+
windowSize: F,
|
|
7921
|
+
layout: Gt(M),
|
|
7902
7922
|
changed: w.isDirty
|
|
7903
7923
|
});
|
|
7904
7924
|
}, [
|
|
7905
7925
|
w,
|
|
7906
7926
|
t.runtime.legacyTypeOf,
|
|
7907
7927
|
h,
|
|
7908
|
-
|
|
7928
|
+
S,
|
|
7909
7929
|
e.authoringTemplate
|
|
7910
|
-
]), [y,
|
|
7911
|
-
|
|
7912
|
-
const
|
|
7930
|
+
]), [y, N] = j(), A = z(async (F) => {
|
|
7931
|
+
S(F);
|
|
7932
|
+
const M = ft(w.document, e.authoringTemplate), q = {
|
|
7913
7933
|
document: w.document,
|
|
7914
|
-
legacyElements: zt(
|
|
7915
|
-
windowSize:
|
|
7916
|
-
layout: Gt(
|
|
7934
|
+
legacyElements: zt(M, t.runtime.legacyTypeOf),
|
|
7935
|
+
windowSize: F,
|
|
7936
|
+
layout: Gt(M),
|
|
7917
7937
|
changed: w.isDirty
|
|
7918
7938
|
}, ne = await f?.(q);
|
|
7919
|
-
return
|
|
7939
|
+
return N(ne), !ne;
|
|
7920
7940
|
}, [
|
|
7921
7941
|
w,
|
|
7922
7942
|
t.runtime.legacyTypeOf,
|
|
7923
7943
|
f,
|
|
7924
|
-
|
|
7944
|
+
S,
|
|
7925
7945
|
e.authoringTemplate
|
|
7926
|
-
]), [
|
|
7946
|
+
]), [T, C] = j(!1), _ = z(async (F) => {
|
|
7927
7947
|
if (!(!f || !w.isDirty)) {
|
|
7928
|
-
|
|
7948
|
+
C(!0);
|
|
7929
7949
|
try {
|
|
7930
|
-
const
|
|
7950
|
+
const M = ft(w.document, e.authoringTemplate), q = await f({
|
|
7931
7951
|
document: w.document,
|
|
7932
|
-
legacyElements: zt(
|
|
7933
|
-
windowSize:
|
|
7934
|
-
layout: Gt(
|
|
7952
|
+
legacyElements: zt(M, t.runtime.legacyTypeOf),
|
|
7953
|
+
windowSize: F,
|
|
7954
|
+
layout: Gt(M),
|
|
7935
7955
|
changed: !0
|
|
7936
7956
|
});
|
|
7937
|
-
|
|
7957
|
+
N(q), q || w.markSaved();
|
|
7938
7958
|
} finally {
|
|
7939
|
-
|
|
7959
|
+
C(!1);
|
|
7940
7960
|
}
|
|
7941
7961
|
}
|
|
7942
7962
|
}, [
|
|
@@ -7944,36 +7964,36 @@ var Yi = () => ({
|
|
|
7944
7964
|
t.runtime.legacyTypeOf,
|
|
7945
7965
|
f,
|
|
7946
7966
|
e.authoringTemplate
|
|
7947
|
-
]), { palette:
|
|
7967
|
+
]), { palette: L, recordInserted: D } = ga({
|
|
7948
7968
|
strings: n,
|
|
7949
7969
|
layoutLabels: o,
|
|
7950
7970
|
icons: i,
|
|
7951
7971
|
paletteSources: r,
|
|
7952
|
-
onAdd: (
|
|
7972
|
+
onAdd: (F) => I(F.payload)
|
|
7953
7973
|
});
|
|
7954
|
-
v.current =
|
|
7955
|
-
function
|
|
7956
|
-
if (!Eo(
|
|
7957
|
-
const
|
|
7958
|
-
|
|
7974
|
+
v.current = D;
|
|
7975
|
+
function I(F) {
|
|
7976
|
+
if (!Eo(F)) return;
|
|
7977
|
+
const M = w.selection && eg(w) ? w.selectedId : void 0;
|
|
7978
|
+
F.kind === "layout" ? w.insertLayout(F.item, M, void 0) : w.insertComponent(Ao(F.componentName, F.package), M, void 0);
|
|
7959
7979
|
}
|
|
7960
7980
|
return /* @__PURE__ */ b(Ca, {
|
|
7961
7981
|
environment: t,
|
|
7962
|
-
children: [p ? p(
|
|
7982
|
+
children: [p ? p(L) : /* @__PURE__ */ a(ba, {
|
|
7963
7983
|
placement: "floating",
|
|
7964
|
-
children:
|
|
7984
|
+
children: L
|
|
7965
7985
|
}), /* @__PURE__ */ a($r, {
|
|
7966
7986
|
sourceRect: s,
|
|
7967
7987
|
initialSize: x,
|
|
7968
7988
|
centerOffsetX: d,
|
|
7969
|
-
canClose:
|
|
7989
|
+
canClose: A,
|
|
7970
7990
|
onClosed: k,
|
|
7971
|
-
renderInspector: (
|
|
7991
|
+
renderInspector: (F) => /* @__PURE__ */ a(ua, {
|
|
7972
7992
|
strings: n,
|
|
7973
7993
|
controller: w,
|
|
7974
7994
|
environment: t,
|
|
7975
7995
|
authoringTemplate: e.authoringTemplate,
|
|
7976
|
-
onClose:
|
|
7996
|
+
onClose: F.toggleInspector,
|
|
7977
7997
|
structure: /* @__PURE__ */ a(qr, {
|
|
7978
7998
|
roots: w.composition.roots,
|
|
7979
7999
|
adapter: w.adapter,
|
|
@@ -7984,20 +8004,20 @@ var Yi = () => ({
|
|
|
7984
8004
|
onRemove: w.remove
|
|
7985
8005
|
})
|
|
7986
8006
|
}),
|
|
7987
|
-
children: (
|
|
8007
|
+
children: (F) => /* @__PURE__ */ a(Aa, {
|
|
7988
8008
|
controller: w,
|
|
7989
8009
|
environment: t,
|
|
7990
8010
|
strings: n,
|
|
7991
8011
|
window: {
|
|
7992
|
-
|
|
8012
|
+
...F,
|
|
7993
8013
|
available: Yi()
|
|
7994
8014
|
},
|
|
7995
8015
|
authoringTemplate: e.authoringTemplate,
|
|
7996
8016
|
saveFailure: y,
|
|
7997
8017
|
onSave: f ? () => {
|
|
7998
|
-
|
|
8018
|
+
_(F.size);
|
|
7999
8019
|
} : void 0,
|
|
8000
|
-
isSaving:
|
|
8020
|
+
isSaving: T,
|
|
8001
8021
|
onPreview: g
|
|
8002
8022
|
})
|
|
8003
8023
|
})]
|
|
@@ -8114,14 +8134,14 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8114
8134
|
"Tooltip.Root": O(jd),
|
|
8115
8135
|
"Tooltip.Popup": pe("p-tooltip"),
|
|
8116
8136
|
"Tree.Root": O(Ud)
|
|
8117
|
-
}, og = Yo.find((e) => e.name === "lara-light-blue") ?? Yo[0],
|
|
8137
|
+
}, og = Yo.find((e) => e.name === "lara-light-blue") ?? Yo[0], wy = ({ defaults: e, theme: t, ...n }) => {
|
|
8118
8138
|
const o = gl(og);
|
|
8119
8139
|
return /* @__PURE__ */ a(wc, {
|
|
8120
8140
|
...n,
|
|
8121
8141
|
theme: t ?? o?.theme,
|
|
8122
8142
|
defaults: tg(ng, e)
|
|
8123
8143
|
});
|
|
8124
|
-
},
|
|
8144
|
+
}, ky = (e) => /* @__PURE__ */ a(ya, {
|
|
8125
8145
|
strings: e.strings,
|
|
8126
8146
|
onClose: e.onDismiss,
|
|
8127
8147
|
children: /* @__PURE__ */ a(ig, { ...e })
|
|
@@ -8135,14 +8155,14 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8135
8155
|
strings: e.strings
|
|
8136
8156
|
});
|
|
8137
8157
|
}, rg = ({ subject: e, environment: t, strings: n, layoutLabels: o, icons: i, paletteSources: r, initialSize: s, onChange: l, renderPaletteHost: c, opened: u }) => {
|
|
8138
|
-
const d = V(void 0), p = Ua(u, e.authoringTemplate, t, (
|
|
8158
|
+
const d = V(void 0), p = Ua(u, e.authoringTemplate, t, (S) => d.current?.(S)), [h, f] = j(s ?? sn[Ke.Desktop]), [g, m] = j(!0), v = V(l);
|
|
8139
8159
|
v.current = l, ce(() => {
|
|
8140
|
-
const
|
|
8160
|
+
const S = ft(p.document, e.authoringTemplate);
|
|
8141
8161
|
v.current?.({
|
|
8142
8162
|
document: p.document,
|
|
8143
|
-
legacyElements: zt(
|
|
8163
|
+
legacyElements: zt(S, t.runtime.legacyTypeOf),
|
|
8144
8164
|
windowSize: h,
|
|
8145
|
-
layout: Gt(
|
|
8165
|
+
layout: Gt(S),
|
|
8146
8166
|
changed: p.isDirty
|
|
8147
8167
|
});
|
|
8148
8168
|
}, [
|
|
@@ -8152,16 +8172,16 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8152
8172
|
e.authoringTemplate,
|
|
8153
8173
|
t.runtime.legacyTypeOf
|
|
8154
8174
|
]);
|
|
8155
|
-
const w = z((
|
|
8156
|
-
if (!Eo(
|
|
8175
|
+
const w = z((S) => {
|
|
8176
|
+
if (!Eo(S)) return;
|
|
8157
8177
|
const k = p.selection, y = k && "children" in k ? p.selectedId : void 0;
|
|
8158
|
-
|
|
8178
|
+
S.kind === "layout" ? p.insertLayout(S.item, y, void 0) : p.insertComponent(Ao(S.componentName, S.package), y, void 0);
|
|
8159
8179
|
}, [p]), { palette: P, recordInserted: x } = ga({
|
|
8160
8180
|
strings: n,
|
|
8161
8181
|
layoutLabels: o,
|
|
8162
8182
|
icons: i,
|
|
8163
8183
|
paletteSources: r,
|
|
8164
|
-
onAdd: (
|
|
8184
|
+
onAdd: (S) => w(S.payload)
|
|
8165
8185
|
});
|
|
8166
8186
|
return d.current = x, /* @__PURE__ */ a(Ca, {
|
|
8167
8187
|
environment: t,
|
|
@@ -8182,7 +8202,7 @@ var it = "p-anchored-overlay", Bt = "p-collapsible", Dn = "p-overlay-mask", O =
|
|
|
8182
8202
|
size: h,
|
|
8183
8203
|
setSize: f,
|
|
8184
8204
|
isInspectorOpen: g,
|
|
8185
|
-
toggleInspector: () => m((
|
|
8205
|
+
toggleInspector: () => m((S) => !S),
|
|
8186
8206
|
available: {
|
|
8187
8207
|
width: 1600,
|
|
8188
8208
|
height: 1e3
|
|
@@ -8227,7 +8247,7 @@ var sg = new Set(Object.values(ws)), lg = new Set(Object.values(ys));
|
|
|
8227
8247
|
function cg(e) {
|
|
8228
8248
|
return e.filter((t) => sg.has(t.resultShape) && t.origin.every((n) => lg.has(n.kind))).map((t) => t);
|
|
8229
8249
|
}
|
|
8230
|
-
function
|
|
8250
|
+
function Sy(e) {
|
|
8231
8251
|
const t = cg(e.queryCandidates ?? []);
|
|
8232
8252
|
return {
|
|
8233
8253
|
runtime: e.runtime,
|
|
@@ -8246,7 +8266,7 @@ var dg = [.../* @__PURE__ */ new Set([...nn.ids, ...Object.values(X)])];
|
|
|
8246
8266
|
function ug(e, t) {
|
|
8247
8267
|
return ul({
|
|
8248
8268
|
bundles: e,
|
|
8249
|
-
profile: t,
|
|
8269
|
+
profile: pg(e, t),
|
|
8250
8270
|
policy: {
|
|
8251
8271
|
allowExecutableImports: !0,
|
|
8252
8272
|
allowNetworkAssets: !1,
|
|
@@ -8254,21 +8274,27 @@ function ug(e, t) {
|
|
|
8254
8274
|
}
|
|
8255
8275
|
}, { hostEditorKinds: [...dg] });
|
|
8256
8276
|
}
|
|
8257
|
-
function pg(e) {
|
|
8277
|
+
function pg(e, t) {
|
|
8278
|
+
return !t.layout || e.some((n) => (n.layouts ?? []).some((o) => o.name === t.layout)) ? t : {
|
|
8279
|
+
...t,
|
|
8280
|
+
layout: void 0
|
|
8281
|
+
};
|
|
8282
|
+
}
|
|
8283
|
+
function mg(e) {
|
|
8258
8284
|
return e.flatMap((t) => t.iconLibrary ? [t.iconLibrary.catalog] : []);
|
|
8259
8285
|
}
|
|
8260
|
-
function
|
|
8286
|
+
function hg(e, t) {
|
|
8261
8287
|
const n = Ws(e, t.map((o) => o.manifest));
|
|
8262
|
-
return new Ts(n,
|
|
8288
|
+
return new Ts(n, mg(t));
|
|
8263
8289
|
}
|
|
8264
|
-
function
|
|
8290
|
+
function fg(e) {
|
|
8265
8291
|
const t = ol([e]), n = t.packages.filter((o) => o !== "PrimeReact");
|
|
8266
8292
|
return n.splice(Math.max(n.indexOf(vr), 0), 0, "PrimeReact"), {
|
|
8267
8293
|
...t,
|
|
8268
8294
|
packages: n
|
|
8269
8295
|
};
|
|
8270
8296
|
}
|
|
8271
|
-
var
|
|
8297
|
+
var gg = [
|
|
8272
8298
|
"PrimeReact.Accordion",
|
|
8273
8299
|
"PrimeReact.AutoComplete",
|
|
8274
8300
|
"PrimeReact.Avatar",
|
|
@@ -8371,7 +8397,7 @@ var fg = [
|
|
|
8371
8397
|
"itemsControl",
|
|
8372
8398
|
"stackPanel",
|
|
8373
8399
|
"wrapPanel"
|
|
8374
|
-
],
|
|
8400
|
+
], vg = ["PrimeReact.Dialog"], bg = new Set(gg.filter((e) => !vg.includes(e))), yg = [
|
|
8375
8401
|
{
|
|
8376
8402
|
value: ve.None,
|
|
8377
8403
|
label: "Run directly"
|
|
@@ -8385,7 +8411,7 @@ var fg = [
|
|
|
8385
8411
|
label: "Ask in a drawer"
|
|
8386
8412
|
}
|
|
8387
8413
|
];
|
|
8388
|
-
function
|
|
8414
|
+
function wg(e) {
|
|
8389
8415
|
return !e.component.endsWith(":action") || e.properties.some((t) => t.path === "presentation") ? e : {
|
|
8390
8416
|
...e,
|
|
8391
8417
|
properties: [...e.properties, {
|
|
@@ -8394,13 +8420,13 @@ function yg(e) {
|
|
|
8394
8420
|
group: "Behavior",
|
|
8395
8421
|
valueType: K.Enum,
|
|
8396
8422
|
default: ve.None,
|
|
8397
|
-
choices:
|
|
8423
|
+
choices: yg,
|
|
8398
8424
|
description: "Whether the command runs straight away or first asks for its input in a dialog or a drawer."
|
|
8399
8425
|
}]
|
|
8400
8426
|
};
|
|
8401
8427
|
}
|
|
8402
|
-
var
|
|
8403
|
-
function Wo(e, t, n =
|
|
8428
|
+
var kg = (e) => e.replace(/([A-Z])/g, " $1").replace(/^./, (t) => t.toUpperCase()), Sg = (e) => /ies$/i.test(e) ? `${e.slice(0, -3)}y` : /(ss|us)$/i.test(e) || !/s$/i.test(e) ? e : e.slice(0, -1), za = (e) => e !== null && typeof e == "object" && !Array.isArray(e);
|
|
8429
|
+
function Wo(e, t, n = kg(e)) {
|
|
8404
8430
|
const o = {
|
|
8405
8431
|
path: e,
|
|
8406
8432
|
label: n,
|
|
@@ -8412,7 +8438,7 @@ function Wo(e, t, n = wg(e)) {
|
|
|
8412
8438
|
} : typeof t == "boolean" ? {
|
|
8413
8439
|
...o,
|
|
8414
8440
|
valueType: K.Boolean
|
|
8415
|
-
} : Array.isArray(t) ?
|
|
8441
|
+
} : Array.isArray(t) ? Ng(o, t) : za(t) ? {
|
|
8416
8442
|
...o,
|
|
8417
8443
|
valueType: K.Object,
|
|
8418
8444
|
properties: Ha(t),
|
|
@@ -8423,12 +8449,12 @@ function Wo(e, t, n = wg(e)) {
|
|
|
8423
8449
|
};
|
|
8424
8450
|
}
|
|
8425
8451
|
function Ha(e, t = []) {
|
|
8426
|
-
return Object.entries(e).filter(([n]) => !t.includes(n)).map(([n, o]) =>
|
|
8452
|
+
return Object.entries(e).filter(([n]) => !t.includes(n)).map(([n, o]) => Cg(n, o));
|
|
8427
8453
|
}
|
|
8428
|
-
function
|
|
8454
|
+
function Cg(e, t) {
|
|
8429
8455
|
return Wo(e, t);
|
|
8430
8456
|
}
|
|
8431
|
-
function
|
|
8457
|
+
function Ng(e, t) {
|
|
8432
8458
|
if (t.length > 0 && t.every((o) => typeof o == "string")) return {
|
|
8433
8459
|
...e,
|
|
8434
8460
|
valueType: K.Json,
|
|
@@ -8445,17 +8471,17 @@ function Cg(e, t) {
|
|
|
8445
8471
|
...e,
|
|
8446
8472
|
valueType: K.Collection,
|
|
8447
8473
|
item: {
|
|
8448
|
-
label:
|
|
8474
|
+
label: Sg(e.label),
|
|
8449
8475
|
properties: Ha(n, ["id"]),
|
|
8450
8476
|
open: !0
|
|
8451
8477
|
}
|
|
8452
8478
|
};
|
|
8453
8479
|
}
|
|
8454
|
-
var
|
|
8455
|
-
function
|
|
8480
|
+
var Tg = (e) => e.valueType === K.Json && e.editorKind === void 0;
|
|
8481
|
+
function Ig(e) {
|
|
8456
8482
|
const t = Uo(e.component, e.component.slice(e.component.lastIndexOf(":") + 1));
|
|
8457
8483
|
if (!t) return e;
|
|
8458
|
-
const n = new Set(e.properties.map((r) => r.path)), o = e.properties.map((r) =>
|
|
8484
|
+
const n = new Set(e.properties.map((r) => r.path)), o = e.properties.map((r) => Tg(r) && r.path in t ? Pg(r, t[r.path]) : r), i = Object.entries(t).filter(([r]) => !n.has(r)).map(([r, s]) => ({
|
|
8459
8485
|
...Wo(r, s),
|
|
8460
8486
|
description: "Shown as sample content on the design surface until you set it."
|
|
8461
8487
|
}));
|
|
@@ -8464,7 +8490,7 @@ function Tg(e) {
|
|
|
8464
8490
|
properties: [...o, ...i]
|
|
8465
8491
|
} : e;
|
|
8466
8492
|
}
|
|
8467
|
-
function
|
|
8493
|
+
function Pg(e, t) {
|
|
8468
8494
|
const { editorKind: n, item: o, properties: i, choices: r, ...s } = e, l = Wo(e.path, t);
|
|
8469
8495
|
return {
|
|
8470
8496
|
...l,
|
|
@@ -8472,7 +8498,7 @@ function Ig(e, t) {
|
|
|
8472
8498
|
valueType: l.valueType
|
|
8473
8499
|
};
|
|
8474
8500
|
}
|
|
8475
|
-
var Xi = "Placement",
|
|
8501
|
+
var Xi = "Placement", xg = [{
|
|
8476
8502
|
path: Je,
|
|
8477
8503
|
label: "Left",
|
|
8478
8504
|
group: Xi,
|
|
@@ -8483,31 +8509,31 @@ var Xi = "Placement", Pg = [{
|
|
|
8483
8509
|
group: Xi,
|
|
8484
8510
|
valueType: K.Number
|
|
8485
8511
|
}];
|
|
8486
|
-
function
|
|
8512
|
+
function Og(e) {
|
|
8487
8513
|
const t = new Set(e.properties.map((n) => n.path));
|
|
8488
8514
|
return {
|
|
8489
8515
|
...e,
|
|
8490
|
-
properties: [...e.properties, ...
|
|
8516
|
+
properties: [...e.properties, ...xg.filter((n) => !t.has(n.path))]
|
|
8491
8517
|
};
|
|
8492
8518
|
}
|
|
8493
|
-
var Zi = "PrimeReact",
|
|
8494
|
-
function
|
|
8519
|
+
var Zi = "PrimeReact", Dg = 1;
|
|
8520
|
+
function Rg(e, t, n) {
|
|
8495
8521
|
const o = en(e.map((p) => p.manifest)), i = e.flatMap((p) => p.descriptors ?? []), r = new Set(i.map((p) => p.component)), s = e.flatMap((p) => p.manifest.components.map((h) => ({
|
|
8496
8522
|
component: Fn(p.manifest.name, h),
|
|
8497
8523
|
displayName: h,
|
|
8498
8524
|
properties: []
|
|
8499
|
-
}))).filter((p) => !r.has(p.component)), l = [...i, ...s].map(
|
|
8525
|
+
}))).filter((p) => !r.has(p.component)), l = [...i, ...s].map(wg).map(Ig).map(Og), c = [...l, ...Fg(l, o, t)], u = new Set(Object.values(o).flat()), d = new Map(l.map((p) => [p.component, p]));
|
|
8500
8526
|
return {
|
|
8501
|
-
id:
|
|
8527
|
+
id: Dg++,
|
|
8502
8528
|
bundles: e,
|
|
8503
8529
|
registry: Sr(e),
|
|
8504
8530
|
packages: o,
|
|
8505
8531
|
descriptors: c,
|
|
8506
8532
|
catalog: Es(c),
|
|
8507
8533
|
profile: t,
|
|
8508
|
-
compositionProfile:
|
|
8534
|
+
compositionProfile: fg(t),
|
|
8509
8535
|
...n ? { appearance: n } : {},
|
|
8510
|
-
icons:
|
|
8536
|
+
icons: hg(t.packages, e),
|
|
8511
8537
|
iconAdapters: dl(e),
|
|
8512
8538
|
designTime: ug(e, t),
|
|
8513
8539
|
packageDescriptorOf: (p) => {
|
|
@@ -8518,11 +8544,11 @@ function Dg(e, t, n) {
|
|
|
8518
8544
|
isKnownComponent: (p) => u.has(p),
|
|
8519
8545
|
legacyTypeOf: (p) => {
|
|
8520
8546
|
const h = Gm(p, t, o), f = h?.package === Zi ? `${Zi}.${Br(h.name)}` : void 0;
|
|
8521
|
-
return f !== void 0 &&
|
|
8547
|
+
return f !== void 0 && bg.has(f) ? f : void 0;
|
|
8522
8548
|
}
|
|
8523
8549
|
};
|
|
8524
8550
|
}
|
|
8525
|
-
function
|
|
8551
|
+
function Fg(e, t, n) {
|
|
8526
8552
|
const o = [];
|
|
8527
8553
|
for (const i of new Set(Object.values(t).flat())) {
|
|
8528
8554
|
const r = Tt(i, n, t), s = r && e.find((l) => l.component === Fn(r.package, r.name));
|
|
@@ -8533,7 +8559,7 @@ function Rg(e, t, n) {
|
|
|
8533
8559
|
}
|
|
8534
8560
|
return o;
|
|
8535
8561
|
}
|
|
8536
|
-
var zo = "Cratis.Icons.Lucide",
|
|
8562
|
+
var zo = "Cratis.Icons.Lucide", Eg = {
|
|
8537
8563
|
name: zo,
|
|
8538
8564
|
version: "1.52.0",
|
|
8539
8565
|
kind: dt.IconLibrary,
|
|
@@ -8555,20 +8581,20 @@ var zo = "Cratis.Icons.Lucide", Fg = {
|
|
|
8555
8581
|
attributionUrl: "https://lucide.dev",
|
|
8556
8582
|
iconCount: 1858
|
|
8557
8583
|
}
|
|
8558
|
-
},
|
|
8584
|
+
}, Mg = {
|
|
8559
8585
|
library: zo,
|
|
8560
8586
|
loadEntries: async () => (await import("./catalog-CZx3FR-E.js")).default
|
|
8561
|
-
},
|
|
8587
|
+
}, Ag = qd, _g = {
|
|
8562
8588
|
library: zo,
|
|
8563
|
-
loadGlyph: async ({ key: e }) => (await
|
|
8564
|
-
},
|
|
8565
|
-
manifest:
|
|
8589
|
+
loadGlyph: async ({ key: e }) => (await Ag[e]?.())?.default
|
|
8590
|
+
}, $g = {
|
|
8591
|
+
manifest: Eg,
|
|
8566
8592
|
components: {},
|
|
8567
8593
|
iconLibrary: {
|
|
8568
|
-
catalog:
|
|
8569
|
-
adapter:
|
|
8594
|
+
catalog: Mg,
|
|
8595
|
+
adapter: _g
|
|
8570
8596
|
}
|
|
8571
|
-
},
|
|
8597
|
+
}, Lg = [
|
|
8572
8598
|
zd,
|
|
8573
8599
|
Hd,
|
|
8574
8600
|
Gd
|
|
@@ -8579,10 +8605,10 @@ var zo = "Cratis.Icons.Lucide", Fg = {
|
|
|
8579
8605
|
Mr,
|
|
8580
8606
|
gr,
|
|
8581
8607
|
_r,
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
],
|
|
8585
|
-
function
|
|
8608
|
+
...Lg,
|
|
8609
|
+
$g
|
|
8610
|
+
], Bg = Pt.map((e) => e.manifest), Cy = Sr(Pt), Ny = en(Bg), Ty = Pt.flatMap((e) => e.themes ?? []);
|
|
8611
|
+
function jg(e) {
|
|
8586
8612
|
const t = Ds(e).map((i) => i.name), n = Qo(e, dt.Styling).map((i) => i.name), o = Qo(e, dt.Blueprint)[0];
|
|
8587
8613
|
return o ? [
|
|
8588
8614
|
...t,
|
|
@@ -8595,16 +8621,16 @@ var Ga = (e) => e === void 0 || e.activePack === "" && e.mappings.length === 0 ?
|
|
|
8595
8621
|
mappings: e.mappings.map((t) => ({ ...t })),
|
|
8596
8622
|
bindings: []
|
|
8597
8623
|
};
|
|
8598
|
-
function
|
|
8624
|
+
function Ug(e, t) {
|
|
8599
8625
|
return t.filter((n) => $s(n, e));
|
|
8600
8626
|
}
|
|
8601
|
-
function
|
|
8627
|
+
function Wg(e, t) {
|
|
8602
8628
|
return [...new Set(Object.values(t).flat())].map((n) => Tt(n, e, t)).filter((n) => n !== void 0 && n.shadows.length > 0).sort((n, o) => n.name.localeCompare(o.name));
|
|
8603
8629
|
}
|
|
8604
8630
|
var Rn = /* @__PURE__ */ (function(e) {
|
|
8605
8631
|
return e.Fallback = "fallback", e.Explicit = "explicit", e.Automatic = "automatic", e;
|
|
8606
8632
|
})({});
|
|
8607
|
-
function
|
|
8633
|
+
function zg(e) {
|
|
8608
8634
|
const t = [
|
|
8609
8635
|
so,
|
|
8610
8636
|
...e.packages,
|
|
@@ -8614,17 +8640,17 @@ function Wg(e) {
|
|
|
8614
8640
|
];
|
|
8615
8641
|
return [...new Set(t.filter((n) => n.length > 0))];
|
|
8616
8642
|
}
|
|
8617
|
-
function
|
|
8643
|
+
function Hg(e, t) {
|
|
8618
8644
|
return e.find((n) => n.manifest.name === t)?.manifest.layouts[0] ?? "";
|
|
8619
8645
|
}
|
|
8620
|
-
function
|
|
8646
|
+
function Gg(e, t) {
|
|
8621
8647
|
const n = e.root?.template;
|
|
8622
8648
|
if (!(n?.source !== Ss.Blueprint || n.blueprint === void 0))
|
|
8623
8649
|
return t.find((o) => o.manifest.name === n.blueprint)?.manifest.layouts.includes(n.id) ? n.id : void 0;
|
|
8624
8650
|
}
|
|
8625
8651
|
var qa = "UI Profile";
|
|
8626
8652
|
function Ka(e, t) {
|
|
8627
|
-
const n = t.map((c) => c.manifest), o =
|
|
8653
|
+
const n = t.map((c) => c.manifest), o = zg(e), i = zs(o, n), r = Gg(e, t) ?? Hg(t, e.shell), s = {
|
|
8628
8654
|
name: qa,
|
|
8629
8655
|
targetPlatform: "web",
|
|
8630
8656
|
packages: i.packages,
|
|
@@ -8632,7 +8658,7 @@ function Ka(e, t) {
|
|
|
8632
8658
|
...e.root ? { root: e.root } : {},
|
|
8633
8659
|
theme: e.theme.length > 0 ? e.theme : void 0,
|
|
8634
8660
|
sampleData: Ga(e.sampleData),
|
|
8635
|
-
appearance:
|
|
8661
|
+
appearance: qg(e),
|
|
8636
8662
|
...e.identity === void 0 ? {} : { identity: e.identity }
|
|
8637
8663
|
}, l = new Set(o);
|
|
8638
8664
|
return {
|
|
@@ -8650,13 +8676,13 @@ function Ka(e, t) {
|
|
|
8650
8676
|
requiredBy: n.filter((d) => i.packages.includes(d.name) && d.dependencies.some((p) => p.name === c)).map((d) => d.name)
|
|
8651
8677
|
}] : [];
|
|
8652
8678
|
}),
|
|
8653
|
-
collisions:
|
|
8654
|
-
compatibleThemes:
|
|
8679
|
+
collisions: Wg(s, en(n)),
|
|
8680
|
+
compatibleThemes: Ug(s, t.flatMap((c) => c.themes ?? [])),
|
|
8655
8681
|
layout: r,
|
|
8656
8682
|
isValid: _s(i)
|
|
8657
8683
|
};
|
|
8658
8684
|
}
|
|
8659
|
-
function
|
|
8685
|
+
function qg(e) {
|
|
8660
8686
|
const t = {
|
|
8661
8687
|
...e.colorScheme === "dark" ? { colorScheme: hs.Dark } : {},
|
|
8662
8688
|
...e.accent.length > 0 ? { accent: e.accent } : {},
|
|
@@ -8665,8 +8691,8 @@ function Gg(e) {
|
|
|
8665
8691
|
};
|
|
8666
8692
|
return Object.keys(t).length === 0 ? void 0 : t;
|
|
8667
8693
|
}
|
|
8668
|
-
function
|
|
8669
|
-
const t = e.map((s) => s.manifest), n =
|
|
8694
|
+
function Kg(e) {
|
|
8695
|
+
const t = e.map((s) => s.manifest), n = jg(t), o = n.find((s) => t.find((l) => l.name === s)?.kind === dt.Blueprint) ?? "", i = {
|
|
8670
8696
|
packages: n.filter((s) => s !== o && s !== so),
|
|
8671
8697
|
shell: o,
|
|
8672
8698
|
templatePacks: [],
|
|
@@ -8681,7 +8707,7 @@ function qg(e) {
|
|
|
8681
8707
|
theme: r?.name ?? ""
|
|
8682
8708
|
};
|
|
8683
8709
|
}
|
|
8684
|
-
function
|
|
8710
|
+
function Vg(e, t) {
|
|
8685
8711
|
return {
|
|
8686
8712
|
name: qa,
|
|
8687
8713
|
targetPlatform: "web",
|
|
@@ -8691,11 +8717,11 @@ function Kg(e, t) {
|
|
|
8691
8717
|
sampleData: Ga(t)
|
|
8692
8718
|
};
|
|
8693
8719
|
}
|
|
8694
|
-
function
|
|
8695
|
-
const i = e ?
|
|
8696
|
-
return
|
|
8720
|
+
function Iy(e, t = Pt, n, o) {
|
|
8721
|
+
const i = e ? Vg(e, o) : Ka(Kg(t), t).profile;
|
|
8722
|
+
return Rg(t, i, n);
|
|
8697
8723
|
}
|
|
8698
|
-
function
|
|
8724
|
+
function Jg(e, t) {
|
|
8699
8725
|
const n = no(e), o = mo(e, {
|
|
8700
8726
|
kind: Vt.Screen,
|
|
8701
8727
|
name: be
|
|
@@ -8705,8 +8731,8 @@ function Vg(e, t) {
|
|
|
8705
8731
|
configuration: i
|
|
8706
8732
|
};
|
|
8707
8733
|
}
|
|
8708
|
-
var
|
|
8709
|
-
const { element: i, configuration: r } = U(() =>
|
|
8734
|
+
var Qg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry }) => {
|
|
8735
|
+
const { element: i, configuration: r } = U(() => Jg(e, t.catalog), [e, t.catalog]), s = U(() => go(i, t.compositionProfile, t.packages), [
|
|
8710
8736
|
i,
|
|
8711
8737
|
t.compositionProfile,
|
|
8712
8738
|
t.packages
|
|
@@ -8727,12 +8753,12 @@ var Jg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry
|
|
|
8727
8753
|
})
|
|
8728
8754
|
})
|
|
8729
8755
|
});
|
|
8730
|
-
},
|
|
8756
|
+
}, Yg = (e) => {
|
|
8731
8757
|
const t = bt(e);
|
|
8732
8758
|
return Pa.has(t) || t in Ta;
|
|
8733
|
-
},
|
|
8759
|
+
}, Xg = (e, t) => {
|
|
8734
8760
|
const n = (o) => {
|
|
8735
|
-
const i =
|
|
8761
|
+
const i = Yg(o.element.componentName), r = U(() => ({
|
|
8736
8762
|
...o.element,
|
|
8737
8763
|
properties: xa(e, o.element.componentName, o.element.properties)
|
|
8738
8764
|
}), [o.element]);
|
|
@@ -8746,11 +8772,11 @@ var Jg = ({ document: e, runtime: t, resolveBinding: n, registry: o = t.registry
|
|
|
8746
8772
|
};
|
|
8747
8773
|
return n.displayName = `Miniature(${t.displayName ?? t.name ?? "Component"})`, n;
|
|
8748
8774
|
};
|
|
8749
|
-
function
|
|
8750
|
-
return Object.fromEntries(Object.entries(e).map(([t, n]) => [t,
|
|
8775
|
+
function Zg(e) {
|
|
8776
|
+
return Object.fromEntries(Object.entries(e).map(([t, n]) => [t, Xg(t, n)]));
|
|
8751
8777
|
}
|
|
8752
|
-
var
|
|
8753
|
-
function
|
|
8778
|
+
var Py = 240, xy = 112;
|
|
8779
|
+
function ev(e, t = 240, n = Number.POSITIVE_INFINITY) {
|
|
8754
8780
|
const o = e && e.width > 0 && e.height > 0 ? e : Sa({
|
|
8755
8781
|
width: 1 / 0,
|
|
8756
8782
|
height: 1 / 0
|
|
@@ -8763,7 +8789,7 @@ function Zg(e, t = 240, n = Number.POSITIVE_INFINITY) {
|
|
|
8763
8789
|
scale: s
|
|
8764
8790
|
};
|
|
8765
8791
|
}
|
|
8766
|
-
function
|
|
8792
|
+
function tv(e, t = 240) {
|
|
8767
8793
|
const n = typeof IntersectionObserver < "u", [o, i] = j(!n);
|
|
8768
8794
|
return ce(() => {
|
|
8769
8795
|
const r = e.current;
|
|
@@ -8776,23 +8802,23 @@ function ev(e, t = 240) {
|
|
|
8776
8802
|
n
|
|
8777
8803
|
]), o;
|
|
8778
8804
|
}
|
|
8779
|
-
var
|
|
8805
|
+
var nv = [
|
|
8780
8806
|
"#f66",
|
|
8781
8807
|
"#fa0",
|
|
8782
8808
|
"#3c3"
|
|
8783
|
-
],
|
|
8784
|
-
}, er = 16,
|
|
8785
|
-
const c = V(null), u =
|
|
8809
|
+
], ov = () => {
|
|
8810
|
+
}, er = 16, Oy = ({ document: e, runtime: t, windowSize: n, width: o, title: i, openTitle: r, onClick: s, placeholder: l }) => {
|
|
8811
|
+
const c = V(null), u = tv(c), d = U(() => ev(n, o ?? 240, o === void 0 ? 112 : void 0), [
|
|
8786
8812
|
n?.width,
|
|
8787
8813
|
n?.height,
|
|
8788
8814
|
o
|
|
8789
|
-
]), p = U(() => jo(t), [t]), h = U(() =>
|
|
8815
|
+
]), p = U(() => jo(t), [t]), h = U(() => Zg(t.registry), [t.registry]), f = {
|
|
8790
8816
|
width: d.width,
|
|
8791
8817
|
height: er + d.bodyHeight
|
|
8792
8818
|
}, g = /* @__PURE__ */ b(le, { children: [/* @__PURE__ */ b("div", {
|
|
8793
8819
|
className: "screen-thumbnail__title-bar",
|
|
8794
8820
|
style: { height: er },
|
|
8795
|
-
children: [
|
|
8821
|
+
children: [nv.map((v) => /* @__PURE__ */ a("span", {
|
|
8796
8822
|
className: "screen-thumbnail__light",
|
|
8797
8823
|
style: { borderColor: v }
|
|
8798
8824
|
}, v)), i && /* @__PURE__ */ a("span", {
|
|
@@ -8812,10 +8838,10 @@ var tv = [
|
|
|
8812
8838
|
"--studio-surface-viewport-height": `${d.canvasHeight}px`
|
|
8813
8839
|
},
|
|
8814
8840
|
"data-studio-viewport": "",
|
|
8815
|
-
children: /* @__PURE__ */ a(
|
|
8841
|
+
children: /* @__PURE__ */ a(Qg, {
|
|
8816
8842
|
document: e,
|
|
8817
8843
|
runtime: t,
|
|
8818
|
-
resolveBinding:
|
|
8844
|
+
resolveBinding: ov,
|
|
8819
8845
|
registry: h
|
|
8820
8846
|
})
|
|
8821
8847
|
}) : l
|
|
@@ -8841,28 +8867,28 @@ var tv = [
|
|
|
8841
8867
|
"aria-label": i,
|
|
8842
8868
|
children: g
|
|
8843
8869
|
});
|
|
8844
|
-
}, rt = /* @__PURE__ */ new Map(),
|
|
8845
|
-
function
|
|
8870
|
+
}, rt = /* @__PURE__ */ new Map(), iv = 200;
|
|
8871
|
+
function Dy(e) {
|
|
8846
8872
|
if (!e) return;
|
|
8847
8873
|
if (rt.has(e)) return rt.get(e);
|
|
8848
8874
|
const t = ta(e), n = t.readable ? t.document : void 0;
|
|
8849
|
-
return rt.size >=
|
|
8875
|
+
return rt.size >= iv && rt.delete(rt.keys().next().value), rt.set(e, n), n;
|
|
8850
8876
|
}
|
|
8851
|
-
var
|
|
8877
|
+
var Ry = {
|
|
8852
8878
|
[H.Stack]: "Stack",
|
|
8853
8879
|
[H.Row]: "Row",
|
|
8854
8880
|
[H.Grid]: "Grid",
|
|
8855
8881
|
[H.Container]: "Container",
|
|
8856
8882
|
[H.Wrap]: "Wrap",
|
|
8857
8883
|
[H.Canvas]: "Canvas"
|
|
8858
|
-
},
|
|
8884
|
+
}, rv = {
|
|
8859
8885
|
[H.Stack]: st,
|
|
8860
8886
|
[H.Row]: Ml,
|
|
8861
8887
|
[H.Grid]: Rr,
|
|
8862
8888
|
[H.Container]: bo,
|
|
8863
8889
|
[H.Wrap]: yo,
|
|
8864
8890
|
[H.Canvas]: cc
|
|
8865
|
-
},
|
|
8891
|
+
}, av = {
|
|
8866
8892
|
text: vl,
|
|
8867
8893
|
button: Wt,
|
|
8868
8894
|
card: xl,
|
|
@@ -9003,7 +9029,7 @@ var Dy = {
|
|
|
9003
9029
|
themeSwitcher: vn,
|
|
9004
9030
|
layoutModeSwitcher: En,
|
|
9005
9031
|
arcPageHeader: Ut
|
|
9006
|
-
},
|
|
9032
|
+
}, sv = [
|
|
9007
9033
|
[/dialog/i, ht],
|
|
9008
9034
|
[/table|grid/i, mt],
|
|
9009
9035
|
[/menu|bar$/i, st],
|
|
@@ -9016,35 +9042,35 @@ var Dy = {
|
|
|
9016
9042
|
[/message|toast/i, Tr],
|
|
9017
9043
|
[/tree/i, _n],
|
|
9018
9044
|
[/page|screen/i, Mn]
|
|
9019
|
-
],
|
|
9045
|
+
], lv = (e) => av[e] ?? sv.find(([t]) => t.test(e))?.[1] ?? Or, cv = {
|
|
9020
9046
|
[kr.manifest.name]: Dr,
|
|
9021
9047
|
[Cr.manifest.name]: Fr,
|
|
9022
9048
|
[Mr.manifest.name]: Or,
|
|
9023
9049
|
[gr.manifest.name]: yo,
|
|
9024
9050
|
[_r.manifest.name]: Ut,
|
|
9025
9051
|
[Ar.manifest.name]: Gl
|
|
9026
|
-
},
|
|
9052
|
+
}, dv = Ol, Fy = {
|
|
9027
9053
|
layout: (e) => {
|
|
9028
|
-
const t =
|
|
9054
|
+
const t = rv[e];
|
|
9029
9055
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
9030
9056
|
},
|
|
9031
9057
|
component: (e) => {
|
|
9032
|
-
const t =
|
|
9058
|
+
const t = lv(e);
|
|
9033
9059
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
9034
9060
|
},
|
|
9035
9061
|
drawer: {
|
|
9036
9062
|
layout: /* @__PURE__ */ a(Rr, { "aria-hidden": "true" }),
|
|
9037
9063
|
package: (e) => {
|
|
9038
|
-
const t =
|
|
9064
|
+
const t = cv[e] ?? dv;
|
|
9039
9065
|
return /* @__PURE__ */ a(t, { "aria-hidden": "true" });
|
|
9040
9066
|
}
|
|
9041
9067
|
}
|
|
9042
|
-
},
|
|
9068
|
+
}, Ey = Pt.map((e) => ({
|
|
9043
9069
|
package: e.manifest.name,
|
|
9044
9070
|
components: e.manifest.components,
|
|
9045
9071
|
descriptors: e.descriptors ?? []
|
|
9046
9072
|
}));
|
|
9047
|
-
function
|
|
9073
|
+
function My(e, t, n) {
|
|
9048
9074
|
return e.map((o) => ({
|
|
9049
9075
|
type: o.type,
|
|
9050
9076
|
name: t[o.item],
|
|
@@ -9052,10 +9078,10 @@ function Ey(e, t, n) {
|
|
|
9052
9078
|
icon: n?.[o.item]
|
|
9053
9079
|
}));
|
|
9054
9080
|
}
|
|
9055
|
-
var
|
|
9081
|
+
var Ay = /* @__PURE__ */ (function(e) {
|
|
9056
9082
|
return e.Auto = "auto", e.Manual = "manual", e;
|
|
9057
9083
|
})({});
|
|
9058
|
-
function
|
|
9084
|
+
function _y(e) {
|
|
9059
9085
|
return [
|
|
9060
9086
|
{
|
|
9061
9087
|
kind: xt.DataContext,
|
|
@@ -9078,68 +9104,68 @@ function Ay(e) {
|
|
|
9078
9104
|
];
|
|
9079
9105
|
}
|
|
9080
9106
|
export {
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9107
|
+
Dv as BindingMode,
|
|
9108
|
+
Rv as BindingNullBehavior,
|
|
9109
|
+
Fv as BindingSourceKind,
|
|
9110
|
+
Ay as CommandFormMode,
|
|
9111
|
+
Ev as DestinationKind,
|
|
9086
9112
|
Q as LayoutArrangement,
|
|
9087
9113
|
H as LayoutItem,
|
|
9088
9114
|
ie as Ownership,
|
|
9089
|
-
|
|
9115
|
+
Qg as PlayScreenView,
|
|
9090
9116
|
Ae as SceneDocumentProblem,
|
|
9091
9117
|
Ca as ScreenEditorControlProviders,
|
|
9092
|
-
|
|
9093
|
-
|
|
9118
|
+
yy as ScreenEditorOverlay,
|
|
9119
|
+
wy as ScreenEditorPrimeReactProvider,
|
|
9094
9120
|
Aa as ScreenEditorWindow,
|
|
9095
|
-
|
|
9096
|
-
|
|
9121
|
+
ky as ScreenEditorWorkspace,
|
|
9122
|
+
Oy as ScreenThumbnail,
|
|
9097
9123
|
oe as StructureEditRejection,
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9124
|
+
Iv as StructuredValueEditor,
|
|
9125
|
+
wv as asList,
|
|
9126
|
+
_y as bindingSourceChoices,
|
|
9101
9127
|
Vm as browserWindowSizeStorage,
|
|
9102
9128
|
St as commandNameOf,
|
|
9103
|
-
|
|
9104
|
-
|
|
9129
|
+
Sy as createScreenEditorEnvironment,
|
|
9130
|
+
Rg as createScreenEditorRuntime,
|
|
9105
9131
|
Jm as createWindowSizeMemory,
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9109
|
-
|
|
9132
|
+
rv as defaultLayoutIcons,
|
|
9133
|
+
Ry as defaultLayoutLabels,
|
|
9134
|
+
Fy as defaultPaletteIcons,
|
|
9135
|
+
Ey as defaultPaletteSources,
|
|
9110
9136
|
Ap as defaultScreenEditorStrings,
|
|
9111
9137
|
nr as defaultStructuredEditorStrings,
|
|
9112
9138
|
Sa as defaultWindowSize,
|
|
9113
9139
|
Zm as fitWindowSize,
|
|
9114
|
-
|
|
9140
|
+
bv as identified,
|
|
9115
9141
|
ls as isCollectionOfRecords,
|
|
9116
9142
|
Ym as isLegacyDefaultWindow,
|
|
9117
9143
|
as as isObjectWithFields,
|
|
9118
|
-
|
|
9144
|
+
fv as isPrimitiveList,
|
|
9119
9145
|
ln as isRecord,
|
|
9120
|
-
|
|
9146
|
+
yv as isStringMap,
|
|
9121
9147
|
Ho as isStructured,
|
|
9122
|
-
|
|
9123
|
-
|
|
9148
|
+
vv as movedItem,
|
|
9149
|
+
kv as newItem,
|
|
9124
9150
|
ir as numberListEditorKind,
|
|
9125
9151
|
ta as readSceneDocument,
|
|
9126
|
-
|
|
9152
|
+
Dy as readThumbnailDocument,
|
|
9127
9153
|
Xm as resolveInitialWindowSize,
|
|
9128
9154
|
is as scalarEditorKind,
|
|
9129
9155
|
ng as screenEditorPrimeReactDefaults,
|
|
9130
|
-
|
|
9156
|
+
Iy as screenEditorRuntimeForProfile,
|
|
9131
9157
|
pt as sliceNamedBy,
|
|
9132
9158
|
rr as stringListEditorKind,
|
|
9133
9159
|
ss as stringMapEditorKind,
|
|
9134
9160
|
rs as stringOrListEditorKind,
|
|
9135
9161
|
Hn as structuredProblem,
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9162
|
+
ev as thumbnailGeometry,
|
|
9163
|
+
xy as thumbnailMaxBodyHeight,
|
|
9164
|
+
Py as thumbnailWidth,
|
|
9165
|
+
My as toLayoutContainerDescriptors,
|
|
9140
9166
|
cg as toSceneCandidates,
|
|
9141
|
-
|
|
9167
|
+
gv as withField,
|
|
9142
9168
|
os as withIdentities,
|
|
9143
|
-
|
|
9144
|
-
|
|
9169
|
+
Sv as withItem,
|
|
9170
|
+
Cv as withoutItem
|
|
9145
9171
|
};
|