@cratis/stage.runtime 4.190.3 → 4.190.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/index.js CHANGED
@@ -2,8 +2,8 @@ import "./app.css";
2
2
  import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
3
3
  import { ColorScheme as l, DestinationKind as u, FormGenerationMode as d, FormWidthUnit as f, InteractionTriggerKind as p, componentIconLibrary as m } from "@cratis/scene.model";
4
4
  import { ShellDiagnosticCode as h, ShellOrigin as g, createBindingResolver as _, resolveArgumentSource as v, resolveBehaviors as y, resolveStringsInElement as b, runBindings as x, validateBindingExpression as ee } from "@cratis/scene.engine";
5
- import { CoreSliceDialog as S, CoreToolbarItem as C, IconAdapterProvider as w, InteractionScope as te, SceneElementView as T, SceneNavigationContextInternal as ne, SliceCommandFieldsProvider as E, SliceDialogView as re, SliceInvokerProvider as D, attachmentFor as ie, coreComponents as O, createBrowserDispatcher as k, createHashSceneHistory as ae, createIconAdapterRegistry as oe, sliceDialogParameters as se, useInteractionScope as ce, useOptionalSceneNavigation as A, useSceneNavigation as le, useSceneOutlets as ue, useSceneTheme as j } from "@cratis/scene.react";
6
- import { ApplicationHost as de, ColorScheme as fe, ComponentName as M, LayoutThemeProvider as pe, SlotName as N, blueprintPackageCatalog as me, composeApplicationScreen as he, defaultBlueprintComponents as ge, defaultBlueprintName as _e, defaultBlueprintThemes as ve, effectiveShellOf as ye, externalComponent as P, galleryScreenTemplates as be, layoutModes as xe, menuThemes as Se, navigationElement as Ce, previewComponents as we, previewProfile as Te, useLayoutConfig as Ee } from "@cratis/scene.blueprint.default";
5
+ import { CoreSliceDialog as S, CoreToolbarItem as C, IconAdapterProvider as te, InteractionScope as ne, SceneElementView as w, SceneNavigationContextInternal as re, SliceCommandFieldsProvider as T, SliceDialogView as ie, SliceInvokerProvider as E, attachmentFor as ae, coreComponents as D, createBrowserDispatcher as O, createHashSceneHistory as oe, createIconAdapterRegistry as se, sliceDialogParameters as ce, useInteractionScope as le, useOptionalSceneNavigation as k, useSceneNavigation as ue, useSceneOutlets as de, useSceneTheme as A } from "@cratis/scene.react";
6
+ import { ApplicationHost as fe, ColorScheme as pe, ComponentName as j, LayoutThemeProvider as me, SlotName as M, blueprintPackageCatalog as he, composeApplicationScreen as ge, defaultBlueprintComponents as _e, defaultBlueprintName as ve, defaultBlueprintThemes as ye, effectiveShellOf as be, externalComponent as N, galleryScreenTemplates as P, layoutModes as xe, menuThemes as Se, navigationElement as Ce, previewComponents as we, previewProfile as Te, useLayoutConfig as Ee } from "@cratis/scene.blueprint.default";
7
7
  import "@cratis/scene.blueprint.default/styles.css";
8
8
  import { ArcContext as De } from "@cratis/arc.react";
9
9
  import { ObservableQueryFor as Oe, Paging as ke, QueryFor as Ae } from "@cratis/arc/queries";
@@ -255,7 +255,7 @@ var jt = "cratis.stage.data-changed", Mt = e({
255
255
  3e3
256
256
  ], Pt = {};
257
257
  function Ft({ routes: e, routesReady: t = !0, parameters: r = Pt, locale: a, locales: l, screen: u, children: d }) {
258
- let [f, p] = c({}), [m, h] = c(0), [g, y] = c({}), [b, x] = c(), [S, C] = c({}), [w, te] = c({}), [T, ne] = c({}), [E, re] = c({ version: 0 }), D = o(() => Vt(T), [T]), ie = n((e, t) => {
258
+ let [f, p] = c({}), [m, h] = c(0), [g, y] = c({}), [b, x] = c(), [S, C] = c({}), [te, ne] = c({}), [w, re] = c({}), [T, ie] = c({ version: 0 }), E = o(() => Vt(w), [w]), ae = n((e, t) => {
259
259
  p((n) => {
260
260
  if (!t) {
261
261
  let { [e]: t, ...r } = n;
@@ -266,138 +266,138 @@ function Ft({ routes: e, routesReady: t = !0, parameters: r = Pt, locale: a, loc
266
266
  [e]: t
267
267
  };
268
268
  });
269
- }, []), O = r, k = o(() => At(), [m]), ae = o(() => ({
269
+ }, []), D = r, O = o(() => At(), [m]), oe = o(() => ({
270
270
  name: u,
271
271
  keys: {
272
- ...k,
272
+ ...O,
273
273
  ...r
274
274
  }
275
275
  }), [
276
276
  r,
277
277
  u,
278
- k
279
- ]), oe = n((e, t) => {
278
+ O
279
+ ]), se = n((e, t) => {
280
280
  y((n) => ({
281
281
  ...n,
282
282
  [e]: t
283
283
  })), x(t ? e : (t) => t === e ? void 0 : t);
284
- }, []), se = n((e) => {
284
+ }, []), ce = n((e) => {
285
285
  y((t) => ({
286
286
  ...t,
287
287
  [e]: void 0
288
288
  })), x((t) => t === e ? void 0 : t);
289
- }, []), ce = n((e, t, n) => {
290
- te((r) => {
289
+ }, []), le = n((e, t, n) => {
290
+ ne((r) => {
291
291
  let i = U(r[e]) ? r[e] : {};
292
292
  return {
293
293
  ...r,
294
294
  [e]: Bt(i, t.split(".").filter(Boolean), n)
295
295
  };
296
296
  });
297
- }, []), A = n((e) => re((t) => ({
297
+ }, []), k = n((e) => ie((t) => ({
298
298
  query: e,
299
299
  version: t.version + 1
300
- })), []), le = s([]), ue = n(() => {
301
- h((e) => e + 1), A();
302
- for (let e of Nt) le.current.push(setTimeout(() => A(), e));
303
- }, [A]);
304
- i(() => () => le.current.forEach(clearTimeout), []), i(() => {
305
- let e = () => A(), t = (e) => A(e.detail?.query);
300
+ })), []), ue = s([]), de = n(() => {
301
+ h((e) => e + 1), k();
302
+ for (let e of Nt) ue.current.push(setTimeout(() => k(), e));
303
+ }, [k]);
304
+ i(() => () => ue.current.forEach(clearTimeout), []), i(() => {
305
+ let e = () => k(), t = (e) => k(e.detail?.query);
306
306
  return globalThis.addEventListener(jt, e), globalThis.addEventListener("cratis.scene.refresh", t), () => {
307
307
  globalThis.removeEventListener(jt, e), globalThis.removeEventListener("cratis.scene.refresh", t);
308
308
  };
309
- }, [A]);
310
- let j = b ? g[b] : void 0, de = n((e) => {
309
+ }, [k]);
310
+ let A = b ? g[b] : void 0, fe = n((e) => {
311
311
  if (e === void 0 || typeof e != "string" && e.path === "$guard") return;
312
- if (typeof e == "string") return Ht(e, j, g, f, S, O, ae, a, l);
313
- let t = Lt(j, f, S, {
314
- ...D,
315
- ...w
312
+ if (typeof e == "string") return Ht(e, A, g, f, S, D, oe, a, l);
313
+ let t = Lt(A, f, S, {
314
+ ...E,
315
+ ...te
316
316
  }, g);
317
317
  if (!e.kind && e.path.startsWith("component.")) return v(e.path, t);
318
- if (!e.kind) return Ht(e.path, j, g, f, S, O, ae, a, l);
318
+ if (!e.kind) return Ht(e.path, A, g, f, S, D, oe, a, l);
319
319
  let n = ee(e, t);
320
320
  return n.length > 0 && console.warn(`Scene binding could not be resolved: ${n.map((e) => `${e.code}:${e.message}`).join("; ")}`), _(t)(e);
321
321
  }, [
322
- w,
322
+ te,
323
323
  a,
324
324
  l,
325
325
  S,
326
- O,
327
326
  D,
327
+ E,
328
328
  f,
329
- ae,
330
- j,
329
+ oe,
330
+ A,
331
331
  g
332
- ]), fe = n((e) => e ? v(e, Lt(j, f, S, {
333
- ...D,
334
- ...w
332
+ ]), pe = n((e) => e ? v(e, Lt(A, f, S, {
333
+ ...E,
334
+ ...te
335
335
  }, g)) : void 0, [
336
- w,
336
+ te,
337
337
  S,
338
- D,
338
+ E,
339
339
  f,
340
- j,
340
+ A,
341
341
  g
342
- ]), M = n((e, t) => ne((n) => ({
342
+ ]), j = n((e, t) => re((n) => ({
343
343
  ...n,
344
344
  [e]: t
345
- })), []), pe = n((e) => ne((t) => {
345
+ })), []), me = n((e) => re((t) => {
346
346
  if (!Object.prototype.hasOwnProperty.call(t, e)) return t;
347
347
  let n = { ...t };
348
348
  return delete n[e], n;
349
- }), []), N = o(() => Lt(void 0, f, {}, {}, {}).queryResults, [f]), me = o(() => ({
349
+ }), []), M = o(() => Lt(void 0, f, {}, {}, {}).queryResults, [f]), he = o(() => ({
350
350
  locale: a,
351
351
  locales: l,
352
352
  screen: u,
353
353
  routes: e,
354
354
  routesReady: t,
355
- parameters: O,
356
- session: k,
355
+ parameters: D,
356
+ session: O,
357
357
  queries: f,
358
- selected: j,
358
+ selected: A,
359
359
  selections: g,
360
- selectRow: oe,
361
- clearSelection: se,
360
+ selectRow: se,
361
+ clearSelection: ce,
362
362
  setState: (e, t) => C((n) => Bt(n, e.split(".").filter(Boolean), t)),
363
- setComponentOutput: ce,
364
- publishComponentOutputs: M,
365
- withdrawComponentOutputs: pe,
366
- queryResults: N,
367
- refreshQuery: A,
368
- refreshAfterCommand: ue,
369
- resolveBinding: de,
370
- resolveArgument: fe,
371
- registerQueryResult: ie,
372
- refreshVersion: E.version,
373
- refreshQueryName: E.query
363
+ setComponentOutput: le,
364
+ publishComponentOutputs: j,
365
+ withdrawComponentOutputs: me,
366
+ queryResults: M,
367
+ refreshQuery: k,
368
+ refreshAfterCommand: de,
369
+ resolveBinding: fe,
370
+ resolveArgument: pe,
371
+ registerQueryResult: ae,
372
+ refreshVersion: T.version,
373
+ refreshQueryName: T.query
374
374
  }), [
375
- se,
375
+ ce,
376
376
  a,
377
377
  l,
378
378
  f,
379
- ue,
380
- A,
381
- E.query,
382
- E.version,
383
- ie,
379
+ de,
380
+ k,
381
+ T.query,
382
+ T.version,
383
+ ae,
384
+ j,
385
+ me,
384
386
  M,
385
387
  pe,
386
- N,
387
388
  fe,
388
- de,
389
389
  e,
390
390
  t,
391
+ D,
391
392
  O,
392
- k,
393
393
  u,
394
- oe,
395
- j,
394
+ se,
395
+ A,
396
396
  g,
397
- ce
397
+ le
398
398
  ]);
399
399
  return /* @__PURE__ */ F(Mt.Provider, {
400
- value: me,
400
+ value: he,
401
401
  children: d
402
402
  });
403
403
  }
@@ -1375,7 +1375,7 @@ function or({ element: e, interactions: t }) {
1375
1375
  });
1376
1376
  }
1377
1377
  function sr(e) {
1378
- let t = ce(), r = s(void 0), a = o(() => y(ie(e.id, e.behaviors), p.DoubleClick), [e.behaviors, e.id]);
1378
+ let t = le(), r = s(void 0), a = o(() => y(ae(e.id, e.behaviors), p.DoubleClick), [e.behaviors, e.id]);
1379
1379
  i(() => () => clearTimeout(r.current), []);
1380
1380
  let c = n((e) => {
1381
1381
  if (clearTimeout(r.current), r.current = void 0, !t) return;
@@ -1405,16 +1405,17 @@ function sr(e) {
1405
1405
  var cr = "Stage:confirmDialog", lr = "ConfirmDialog";
1406
1406
  function ur(e, t) {
1407
1407
  let n = new Set(t.map((e) => e.name));
1408
- return e.map((e) => {
1409
- if (e.screenTemplate !== lr || n.has(lr)) return e;
1410
- let t = dr(e), r = P(`confirm-dialog-${e.name}`, cr, {
1411
- title: e.name,
1412
- decisions: t
1408
+ return e.map((t) => {
1409
+ if (t.screenTemplate !== lr || n.has(lr)) return t;
1410
+ let r = dr(t), i = e.find((e) => e.name !== t.name)?.name, a = N(`confirm-dialog-${t.name}`, cr, {
1411
+ title: t.name,
1412
+ decisions: r,
1413
+ home: i
1413
1414
  });
1414
1415
  return {
1415
- ...e,
1416
+ ...t,
1416
1417
  screenTemplate: void 0,
1417
- slotContent: { content: [r] },
1418
+ slotContent: { content: [a] },
1418
1419
  forms: []
1419
1420
  };
1420
1421
  });
@@ -1446,7 +1447,7 @@ function pr(e) {
1446
1447
  //#endregion
1447
1448
  //#region src/StageConfirmDialog.tsx
1448
1449
  function mr({ element: e }) {
1449
- let { routes: t, parameters: n, selections: r } = B(), [a, o] = c(), l = s(null), u = typeof e.properties.title == "string" ? e.properties.title : "", d = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], f = d.find((e) => e.command === a), p = Object.values(r).filter((e) => e !== void 0);
1450
+ let { routes: t, parameters: n, selections: r } = B(), [a, o] = c(), l = s(null), u = typeof e.properties.title == "string" ? e.properties.title : "", d = Array.isArray(e.properties.decisions) ? e.properties.decisions : [], f = typeof e.properties.home == "string" ? e.properties.home : void 0, p = d.find((e) => e.command === a), m = Object.values(r).filter((e) => e !== void 0);
1450
1451
  return i(() => l.current?.focus(), []), /* @__PURE__ */ I("section", {
1451
1452
  className: "scene-slice-dialog stage-confirm-dialog",
1452
1453
  role: "dialog",
@@ -1465,39 +1466,54 @@ function mr({ element: e }) {
1465
1466
  children: d.map((e, t) => /* @__PURE__ */ F("button", {
1466
1467
  ref: t === 0 ? l : void 0,
1467
1468
  type: "button",
1469
+ className: t === 0 ? "scene-slice-dialog-submit stage-confirm-dialog__decision" : "scene-slice-dialog-cancel stage-confirm-dialog__decision",
1470
+ "data-emphasis": t === 0 ? "primary" : "secondary",
1468
1471
  "aria-pressed": e.command === a,
1469
1472
  onClick: () => o(e.command),
1470
- children: hr(e)
1473
+ children: gr(e)
1471
1474
  }, e.command))
1472
1475
  }),
1473
- f && /* @__PURE__ */ F(xn, { element: vr(f, t?.commandSchemas?.[f.command] ?? "", n, p) }, f.command)
1476
+ p && /* @__PURE__ */ F(xn, { element: yr(p, t?.commandSchemas?.[p.command] ?? "", n, m) }, p.command),
1477
+ /* @__PURE__ */ F("footer", {
1478
+ className: "scene-slice-dialog-footer",
1479
+ children: /* @__PURE__ */ F("button", {
1480
+ type: "button",
1481
+ className: "scene-slice-dialog-cancel stage-confirm-dialog__cancel",
1482
+ onClick: () => hr(d, f),
1483
+ children: "Cancel"
1484
+ })
1485
+ })
1474
1486
  ]
1475
1487
  });
1476
1488
  }
1477
- function hr(e) {
1489
+ function hr(e, t) {
1490
+ let n = new Set(e.map((e) => e.navigateToScreen).filter((e) => !!e)), r = n.size === 1 ? [...n][0] : t;
1491
+ r && G(r, {});
1492
+ }
1493
+ function gr(e) {
1478
1494
  return e.label ?? q(e.command);
1479
1495
  }
1480
- function gr(e, t, n) {
1496
+ function _r(e, t, n) {
1481
1497
  return !e.identifier || !e.required ? !1 : e.identity === !0 || !!t[e.name] || Nn(e, n) !== void 0;
1482
1498
  }
1483
- function _r(e, t, n, r) {
1499
+ function vr(e, t, n, r) {
1484
1500
  let i = e.form?.fields ?? [], a = i.length > 0 ? i : t.filter((e) => !e.unsupportedReason).map((e) => ({
1485
1501
  name: e.name,
1486
1502
  label: e.name
1487
- })), o = new Set(t.filter((e) => gr(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
1503
+ })), o = new Set(t.filter((e) => _r(e, n, r)).map((e) => e.name)), s = a.filter((e) => !o.has(e.sourceProperty ?? e.name)), c = new Set(s.map((e) => e.sourceProperty ?? e.name)), l = t.filter((e) => e.identifier && e.required && !o.has(e.name) && !c.has(e.name));
1488
1504
  return [...s, ...l.map((e) => ({
1489
1505
  name: e.name,
1490
1506
  label: q(e.name)
1491
1507
  }))];
1492
1508
  }
1493
- function vr(e, t, n, r) {
1494
- let i = _r(e, K(t), n, r);
1509
+ function yr(e, t, n, r) {
1510
+ let i = vr(e, K(t), n, r);
1495
1511
  return {
1496
1512
  id: `confirm-${e.command}`,
1497
1513
  componentName: cr,
1498
1514
  properties: {
1499
1515
  command: e.command,
1500
- label: hr(e),
1516
+ label: gr(e),
1501
1517
  submitLabel: "Confirm",
1502
1518
  typeName: e.typeName,
1503
1519
  route: e.route,
@@ -1513,8 +1529,8 @@ function vr(e, t, n, r) {
1513
1529
  }
1514
1530
  //#endregion
1515
1531
  //#region src/stageComponents.tsx
1516
- var yr = "Stage:commandForm";
1517
- function br(e, t, n = {}) {
1532
+ var br = "Stage:commandForm";
1533
+ function xr(e, t, n = {}) {
1518
1534
  return {
1519
1535
  id: e,
1520
1536
  componentName: "",
@@ -1526,15 +1542,15 @@ function Z(e, t, n = "") {
1526
1542
  let r = e.properties[t];
1527
1543
  return typeof r == "string" ? r : n;
1528
1544
  }
1529
- function xr(e, t) {
1545
+ function Sr(e, t) {
1530
1546
  let n = e.properties.queryArguments;
1531
- if (!Tr(n)) return {
1547
+ if (!Er(n)) return {
1532
1548
  values: {},
1533
1549
  ready: !0
1534
1550
  };
1535
1551
  let r = {}, i = !0;
1536
1552
  for (let [e, a] of Object.entries(n)) {
1537
- let n = wr(a) ? t.resolveBinding(a) : a;
1553
+ let n = Tr(a) ? t.resolveBinding(a) : a;
1538
1554
  r[e] = n, (n == null || n === "") && (i = !1);
1539
1555
  }
1540
1556
  return {
@@ -1542,7 +1558,7 @@ function xr(e, t) {
1542
1558
  ready: i
1543
1559
  };
1544
1560
  }
1545
- function Sr(e, t) {
1561
+ function Cr(e, t) {
1546
1562
  let n = (e.slots.columns ?? []).map((e) => {
1547
1563
  let t = e.properties;
1548
1564
  return {
@@ -1558,14 +1574,14 @@ function Sr(e, t) {
1558
1574
  function Q(e, t) {
1559
1575
  return e[t] ?? e.id ?? e.key;
1560
1576
  }
1561
- function Cr({ element: e, slots: t }) {
1562
- let n = B(), r = Z(e, "query", Z(e, "typeName", e.id)), a = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), s = o(() => xr(e, n), [n, e]), { rows: c, error: l, loading: u } = V({
1577
+ function wr({ element: e, slots: t }) {
1578
+ let n = B(), r = Z(e, "query", Z(e, "typeName", e.id)), a = (Z(e, "query") ? n.routes?.queries?.[Z(e, "query")] : void 0) ?? Z(e, "route"), s = o(() => Sr(e, n), [n, e]), { rows: c, error: l, loading: u } = V({
1563
1579
  scope: e.id,
1564
1580
  name: r,
1565
1581
  route: a || void 0,
1566
1582
  arguments: s.values,
1567
1583
  ready: s.ready
1568
- }), d = Sr(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = sr(e);
1584
+ }), d = Cr(e, c), f = Z(e, "navigateOnRowClickToScreen"), p = Z(e, "navigateOnRowClickByParameter"), m = Z(e, "dataKey") || p || "id", h = n.selections[e.id], g = p ? n.parameters[p] : void 0, _ = sr(e);
1569
1585
  i(() => {
1570
1586
  if (!h) return;
1571
1587
  let t = Q(h, m), r = t === void 0 ? void 0 : c.find((e) => Q(e, m) === t);
@@ -1627,14 +1643,14 @@ function Cr({ element: e, slots: t }) {
1627
1643
  "data-scene-id": e.id,
1628
1644
  children: [
1629
1645
  u && /* @__PURE__ */ F(Fe, {
1630
- element: br(`${e.id}-loading`, {
1646
+ element: xr(`${e.id}-loading`, {
1631
1647
  severity: "info",
1632
1648
  text: "Loading…"
1633
1649
  }),
1634
1650
  slots: {}
1635
1651
  }),
1636
1652
  l && /* @__PURE__ */ F(Fe, {
1637
- element: br(`${e.id}-error`, {
1653
+ element: xr(`${e.id}-error`, {
1638
1654
  severity: "error",
1639
1655
  text: l
1640
1656
  }),
@@ -1672,25 +1688,25 @@ function Cr({ element: e, slots: t }) {
1672
1688
  ]
1673
1689
  });
1674
1690
  }
1675
- function wr(e) {
1676
- return Tr(e) && (typeof e.path == "string" || typeof e.kind == "string");
1677
- }
1678
1691
  function Tr(e) {
1692
+ return Er(e) && (typeof e.path == "string" || typeof e.kind == "string");
1693
+ }
1694
+ function Er(e) {
1679
1695
  return typeof e == "object" && !!e && !Array.isArray(e);
1680
1696
  }
1681
- function Er({ element: e, interactions: t, slots: n }) {
1697
+ function Dr({ element: e, interactions: t, slots: n }) {
1682
1698
  return rr(e) ? /* @__PURE__ */ F(or, {
1683
1699
  element: e,
1684
1700
  interactions: t
1685
- }) : /* @__PURE__ */ F(Dr, {
1701
+ }) : /* @__PURE__ */ F(Or, {
1686
1702
  element: e,
1687
1703
  interactions: t,
1688
1704
  slots: n
1689
1705
  });
1690
1706
  }
1691
- function Dr({ element: e, interactions: t }) {
1707
+ function Or({ element: e, interactions: t }) {
1692
1708
  let n = Z(e, "label", Z(e, "command"));
1693
- return W(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ F(Or, {
1709
+ return W(Z(e, "command"), Z(e, "typeName"), Z(e, "route")) ? /* @__PURE__ */ F(kr, {
1694
1710
  element: e,
1695
1711
  label: n
1696
1712
  }) : /* @__PURE__ */ F(L, {
@@ -1702,7 +1718,7 @@ function Dr({ element: e, interactions: t }) {
1702
1718
  children: n
1703
1719
  });
1704
1720
  }
1705
- function Or({ element: e, label: t }) {
1721
+ function kr({ element: e, label: t }) {
1706
1722
  let [r, i] = c(0), a = n(() => i((e) => e + 1), []), o = /* @__PURE__ */ F(bn.Provider, {
1707
1723
  value: a,
1708
1724
  children: /* @__PURE__ */ F(xn, { element: e })
@@ -1711,7 +1727,7 @@ function Or({ element: e, label: t }) {
1711
1727
  className: "stage-action",
1712
1728
  "data-scene-id": e.id,
1713
1729
  children: /* @__PURE__ */ F(Pe, {
1714
- element: br(e.id, {
1730
+ element: xr(e.id, {
1715
1731
  visible: !1,
1716
1732
  header: t,
1717
1733
  triggerLabel: t
@@ -1720,13 +1736,13 @@ function Or({ element: e, label: t }) {
1720
1736
  }, r)
1721
1737
  });
1722
1738
  }
1723
- function kr(e) {
1724
- let t = e.element ?? br("slice-dialog", {}), r = A(), { routes: i, parameters: a } = B(), s = se(r?.currentDialogParameters), c = Z(t, "command") || s?.command || Z(t, "slice") || "", l = Z(t, "title") || s?.title || c, u = i?.commandSchemas?.[c], d = o(() => K(u ?? ""), [u]), f = n(() => r?.closeDialog(), [r]);
1739
+ function Ar(e) {
1740
+ let t = e.element ?? xr("slice-dialog", {}), r = k(), { routes: i, parameters: a } = B(), s = ce(r?.currentDialogParameters), c = Z(t, "command") || s?.command || Z(t, "slice") || "", l = Z(t, "title") || s?.title || c, u = i?.commandSchemas?.[c], d = o(() => K(u ?? ""), [u]), f = n(() => r?.closeDialog(), [r]);
1725
1741
  if (!u || !d.some((e) => e.options || e.members || e.item)) return e.element ? /* @__PURE__ */ F(S, {
1726
1742
  element: e.element,
1727
1743
  slots: e.slots ?? {}
1728
- }) : /* @__PURE__ */ F(re, {});
1729
- let p = d.filter((e) => !jn(e, a)), m = br(`slice-dialog-${c}`, {
1744
+ }) : /* @__PURE__ */ F(ie, {});
1745
+ let p = d.filter((e) => !jn(e, a)), m = xr(`slice-dialog-${c}`, {
1730
1746
  command: c,
1731
1747
  label: l,
1732
1748
  schema: u,
@@ -1764,11 +1780,11 @@ function kr(e) {
1764
1780
  ]
1765
1781
  });
1766
1782
  }
1767
- function Ar(e) {
1783
+ function jr(e) {
1768
1784
  let { element: t } = e;
1769
- return Z(t, "kind").toLowerCase() !== "action" || Z(t, "slice") !== "" ? /* @__PURE__ */ F(C, { ...e }) : /* @__PURE__ */ F(jr, { ...e });
1785
+ return Z(t, "kind").toLowerCase() !== "action" || Z(t, "slice") !== "" ? /* @__PURE__ */ F(C, { ...e }) : /* @__PURE__ */ F(Mr, { ...e });
1770
1786
  }
1771
- function jr(e) {
1787
+ function Mr(e) {
1772
1788
  let { element: t } = e, { routes: n, parameters: r, queries: i, selections: a } = B(), s = Z(t, "name", t.id), c = Z(t, "target"), l = Z(t, "label", s), u = n?.commandSchemas?.[c], d = o(() => K(u ?? ""), [u]), f = o(() => Fn(i), [i]), p = In(d, r, o(() => Object.values(a).filter((e) => e !== void 0), [a]), f), m = d.filter((e) => !jn(e, r) && !(e.identifier && e.required && Pn(e, f))), h = u ? {
1773
1789
  schema: u,
1774
1790
  fields: m.map((e) => ({
@@ -1796,25 +1812,25 @@ function jr(e) {
1796
1812
  title: "Select a row first",
1797
1813
  ...e.interactions,
1798
1814
  children: l
1799
- }) : /* @__PURE__ */ F(Er, {
1815
+ }) : /* @__PURE__ */ F(Dr, {
1800
1816
  element: g,
1801
1817
  interactions: e.interactions,
1802
1818
  slots: e.slots
1803
1819
  })
1804
1820
  });
1805
1821
  }
1806
- var Mr = {
1807
- ...O,
1808
- "core:table": Cr,
1809
- "core:action": Er,
1810
- "core:toolbarItem": Ar,
1811
- "core:sliceDialog": kr,
1812
- [yr]: xn,
1822
+ var Nr = {
1823
+ ...D,
1824
+ "core:table": wr,
1825
+ "core:action": Dr,
1826
+ "core:toolbarItem": jr,
1827
+ "core:sliceDialog": Ar,
1828
+ [br]: xn,
1813
1829
  [cr]: mr
1814
1830
  };
1815
1831
  //#endregion
1816
1832
  //#region src/useStrings.ts
1817
- function Nr() {
1833
+ function Pr() {
1818
1834
  let e = tt(), [t, n] = c([]), [r, a] = c(""), [o, s] = c({});
1819
1835
  return i(() => {
1820
1836
  let t = new AbortController();
@@ -1832,11 +1848,11 @@ function Nr() {
1832
1848
  dictionary: o
1833
1849
  };
1834
1850
  }
1835
- var Pr = /* @__PURE__ */ new Set(["core:table"]);
1836
- function Fr(e) {
1837
- return Ir(e, /* @__PURE__ */ new Map(), void 0);
1851
+ var Fr = /* @__PURE__ */ new Set(["core:table"]);
1852
+ function Ir(e) {
1853
+ return Lr(e, /* @__PURE__ */ new Map(), void 0);
1838
1854
  }
1839
- function Ir(e, t, n) {
1855
+ function Lr(e, t, n) {
1840
1856
  let r = e;
1841
1857
  if (!r.slots) return e;
1842
1858
  let i = !1, a = {};
@@ -1845,7 +1861,7 @@ function Ir(e, t, n) {
1845
1861
  a[e] = o.map((e) => {
1846
1862
  let t = e, n = $(t, "typeName");
1847
1863
  t.componentName === "core:data" && n && (r.set(n, t), s = t);
1848
- let a = Ir(Rr(Lr(t, r), s), r, s);
1864
+ let a = Lr(zr(Rr(t, r), s), r, s);
1849
1865
  return a !== e && (i = !0), a;
1850
1866
  });
1851
1867
  }
@@ -1854,8 +1870,8 @@ function Ir(e, t, n) {
1854
1870
  slots: a
1855
1871
  } : e;
1856
1872
  }
1857
- function Lr(e, t) {
1858
- if (!Pr.has(e.componentName)) return e;
1873
+ function Rr(e, t) {
1874
+ if (!Fr.has(e.componentName)) return e;
1859
1875
  let n = $(e, "typeName"), r = n ? t.get(n) : void 0;
1860
1876
  if (!r || e.properties.queryArguments !== void 0) return e;
1861
1877
  let i = $(r, "by"), a = { ...e.properties }, o = $(r, "query");
@@ -1864,7 +1880,7 @@ function Lr(e, t) {
1864
1880
  properties: a
1865
1881
  };
1866
1882
  }
1867
- function Rr(e, t) {
1883
+ function zr(e, t) {
1868
1884
  if (e.componentName !== "core:action" || !Array.isArray(e.properties?.alternatives) || !t || e.properties.itemQuery !== void 0) return e;
1869
1885
  let n = { ...e.properties };
1870
1886
  if (t.properties?.isCollection === !0) return n.itemSelection = !0, {
@@ -1883,7 +1899,7 @@ function $(e, t) {
1883
1899
  }
1884
1900
  //#endregion
1885
1901
  //#region src/stageQueryBindings.tsx
1886
- function zr(e) {
1902
+ function Br(e) {
1887
1903
  let t = /* @__PURE__ */ new Set(), n = (e) => {
1888
1904
  if (Array.isArray(e)) {
1889
1905
  e.forEach(n);
@@ -1903,7 +1919,7 @@ function zr(e) {
1903
1919
  };
1904
1920
  return r(e), [...t];
1905
1921
  }
1906
- function Br(e) {
1922
+ function Vr(e) {
1907
1923
  let t = /* @__PURE__ */ new Map(), n = (e, t) => {
1908
1924
  let n = e.properties?.[t];
1909
1925
  return typeof n == "string" && n.length > 0 ? n : void 0;
@@ -1922,7 +1938,7 @@ function Br(e) {
1922
1938
  };
1923
1939
  return r(e), [...t.values()];
1924
1940
  }
1925
- function Vr({ source: e }) {
1941
+ function Hr({ source: e }) {
1926
1942
  let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = e.by ? r[e.by] || i[e.by] : void 0, s = o(() => e.by ? a ? { [e.by]: a } : {} : {
1927
1943
  ...i,
1928
1944
  ...r
@@ -1942,7 +1958,7 @@ function Vr({ source: e }) {
1942
1958
  list: !0
1943
1959
  }), null;
1944
1960
  }
1945
- function Hr({ name: e }) {
1961
+ function Ur({ name: e }) {
1946
1962
  let { routes: t, routesReady: n, parameters: r, session: i } = B(), a = o(() => ({
1947
1963
  ...i,
1948
1964
  ...r
@@ -1956,11 +1972,11 @@ function Hr({ name: e }) {
1956
1972
  list: !0
1957
1973
  }), null;
1958
1974
  }
1959
- function Ur({ element: e }) {
1960
- let t = o(() => zr(e), [e]), n = o(() => Br(e), [e]);
1961
- return /* @__PURE__ */ I(Ne, { children: [t.map((e) => /* @__PURE__ */ F(Hr, { name: e }, e)), n.map((e) => /* @__PURE__ */ F(Vr, { source: e }, e.typeName))] });
1975
+ function Wr({ element: e }) {
1976
+ let t = o(() => Br(e), [e]), n = o(() => Vr(e), [e]);
1977
+ return /* @__PURE__ */ I(Ne, { children: [t.map((e) => /* @__PURE__ */ F(Ur, { name: e }, e)), n.map((e) => /* @__PURE__ */ F(Hr, { source: e }, e.typeName))] });
1962
1978
  }
1963
- function Wr(e) {
1979
+ function Gr(e) {
1964
1980
  let t = /* @__PURE__ */ new Set(), n = [];
1965
1981
  for (let r of e) for (let e of r.contributions ?? []) {
1966
1982
  if (e.contributionPointName !== "Navigation") continue;
@@ -1973,7 +1989,7 @@ function Wr(e) {
1973
1989
  ]);
1974
1990
  if (t.has(s)) continue;
1975
1991
  t.add(s);
1976
- let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = qr(r.destination) ? r.destination : void 0;
1992
+ let c = e.order ?? (typeof r.order == "number" ? r.order : void 0), l = Jr(r.destination) ? r.destination : void 0;
1977
1993
  n.push({
1978
1994
  label: i,
1979
1995
  targetScreen: a,
@@ -1981,7 +1997,7 @@ function Wr(e) {
1981
1997
  order: c,
1982
1998
  ...typeof r.icon == "string" ? { icon: r.icon } : {},
1983
1999
  ...typeof r.presentation == "string" ? { presentation: r.presentation } : {},
1984
- ...l && Jr(l) ? { destination: l } : {}
2000
+ ...l && Yr(l) ? { destination: l } : {}
1985
2001
  });
1986
2002
  }
1987
2003
  return n.map((e, t) => ({
@@ -1989,7 +2005,7 @@ function Wr(e) {
1989
2005
  index: t
1990
2006
  })).sort((e, t) => (e.entry.order ?? 2 ** 53 - 1) - (t.entry.order ?? 2 ** 53 - 1) || e.index - t.index).map(({ entry: e }) => e);
1991
2007
  }
1992
- function Gr(e) {
2008
+ function Kr(e) {
1993
2009
  let t = {
1994
2010
  label: "",
1995
2011
  children: []
@@ -2014,21 +2030,21 @@ function Gr(e) {
2014
2030
  }
2015
2031
  return t.children;
2016
2032
  }
2017
- function Kr(e, t) {
2033
+ function qr(e, t) {
2018
2034
  for (let n of e) {
2019
2035
  if (n.screen === t) return [n.label];
2020
- let e = Kr(n.children, t);
2036
+ let e = qr(n.children, t);
2021
2037
  if (e.length > 0) return [n.label, ...e];
2022
2038
  }
2023
2039
  return [];
2024
2040
  }
2025
- function qr(e) {
2041
+ function Jr(e) {
2026
2042
  return typeof e == "object" && !!e && !Array.isArray(e);
2027
2043
  }
2028
- function Jr(e) {
2044
+ function Yr(e) {
2029
2045
  return e.outlet !== void 0 || e.dialog !== void 0 || e.kind === "external" || e.kind === "dialog";
2030
2046
  }
2031
- function Yr(e, t, n) {
2047
+ function Xr(e, t, n) {
2032
2048
  return e.filter((e) => !t.has(e.name)).map((e) => ({
2033
2049
  label: e.name,
2034
2050
  targetScreen: e.name,
@@ -2037,77 +2053,77 @@ function Yr(e, t, n) {
2037
2053
  }
2038
2054
  //#endregion
2039
2055
  //#region src/blueprint.ts
2040
- var Xr = "Stage:locale";
2041
- function Zr(e) {
2056
+ var Zr = "Stage:locale";
2057
+ function Qr(e) {
2042
2058
  let t = Te(e), n = t.packages.filter((e) => e !== "PrimeReact");
2043
- return n.splice(Math.max(n.indexOf(_e), 0), 0, "PrimeReact"), {
2059
+ return n.splice(Math.max(n.indexOf(ve), 0), 0, "PrimeReact"), {
2044
2060
  ...t,
2045
2061
  name: e?.length ? t.name : "Stage",
2046
2062
  packages: n
2047
2063
  };
2048
2064
  }
2049
- var Qr = {
2050
- ...me,
2065
+ var $r = {
2066
+ ...he,
2051
2067
  PrimeReact: Le.components
2052
2068
  };
2053
- function $r(e) {
2069
+ function ei(e) {
2054
2070
  return {
2055
- ...O,
2071
+ ...D,
2056
2072
  ...Ie,
2057
- ...ge,
2073
+ ..._e,
2058
2074
  ...we,
2059
2075
  ...e
2060
2076
  };
2061
2077
  }
2062
- function ei(e) {
2078
+ function ti(e) {
2063
2079
  return e ? {
2064
2080
  ...e,
2065
- ...Qr
2066
- } : Qr;
2081
+ ...$r
2082
+ } : $r;
2067
2083
  }
2068
- var ti = "Stage:navigationTree";
2069
- function ni(e, t, n) {
2070
- return P(e, M.Logo, {
2084
+ var ni = "Stage:navigationTree";
2085
+ function ri(e, t, n) {
2086
+ return N(e, j.Logo, {
2071
2087
  label: t,
2072
2088
  initials: t.slice(0, 1).toUpperCase() || "S",
2073
2089
  targetScreen: "",
2074
2090
  ...n ? { lightImageUrl: n } : {}
2075
2091
  });
2076
2092
  }
2077
- function ri(e, t, n, r, i, a = !1, o = !0) {
2078
- let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = Wr(e), u = Yr(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = Gr([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => Ce({
2093
+ function ii(e, t, n, r, i, a = !1, o = !0) {
2094
+ let s = e[0]?.name ?? "", c = i?.title ?? "Cratis Stage", l = Gr(e), u = Xr(e, new Set(l.map((e) => e.targetScreen)), "Other screens"), d = Kr([...l, ...l.length > 0 ? u : []]), f = e.map((e, n) => Ce({
2079
2095
  label: e.name,
2080
2096
  targetScreen: e.name,
2081
2097
  icon: "pi pi-table",
2082
2098
  group: "Screens",
2083
2099
  order: n
2084
- }, t)), p = Kr(Gr(l), t), m = e.find((e) => e.name === t)?.path?.length ? Kr(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? P("menu-hierarchy", ti, {
2100
+ }, t)), p = qr(Kr(l), t), m = e.find((e) => e.name === t)?.path?.length ? qr(d, t) : [], h = p.length > 0 ? p : m, g = l.length > 0 ? N("menu-hierarchy", ni, {
2085
2101
  nodes: d,
2086
2102
  activeScreen: t
2087
- }) : P("menu-screens", M.Menu, {
2103
+ }) : N("menu-screens", j.Menu, {
2088
2104
  title: "Screens",
2089
2105
  label: "Screens"
2090
2106
  }, { items: f }), _ = [];
2091
- n.length > 1 && _.push(P("topbar-locale", Xr, {
2107
+ n.length > 1 && _.push(N("topbar-locale", Zr, {
2092
2108
  locales: n,
2093
2109
  locale: r
2094
- })), _.push(P("topbar-theme", M.ThemeSwitcher, { label: "Theme" }));
2110
+ })), _.push(N("topbar-theme", j.ThemeSwitcher, { label: "Theme" }));
2095
2111
  let v = { regionNavigation: a };
2096
2112
  return {
2097
- [N.Topbar]: [P("topbar", M.Topbar, v, {
2098
- logo: [ni("topbar-logo", c, i?.image)],
2113
+ [M.Topbar]: [N("topbar", j.Topbar, v, {
2114
+ logo: [ri("topbar-logo", c, i?.image)],
2099
2115
  end: _
2100
2116
  })],
2101
- [N.Sidebar]: [P("sidebar", M.Sidebar, v, { logo: [ni("sidebar-logo", c, i?.image)] })],
2102
- ...a ? {} : { [N.Menu]: [g] },
2103
- [N.Breadcrumb]: [P("breadcrumb", M.Breadcrumb, {
2117
+ [M.Sidebar]: [N("sidebar", j.Sidebar, v, { logo: [ri("sidebar-logo", c, i?.image)] })],
2118
+ ...a ? {} : { [M.Menu]: [g] },
2119
+ [M.Breadcrumb]: [N("breadcrumb", j.Breadcrumb, {
2104
2120
  homeTargetScreen: s,
2105
2121
  items: (h.length > 0 ? h : [t]).map((e) => ({ label: e }))
2106
2122
  })],
2107
- ...o ? { [N.Footer]: [P("footer", M.Footer, { text: `${c} · rendered from your model` })] } : {},
2108
- [N.ConfigPanel]: [P(M.ConfigPanel, M.ConfigPanel, {
2123
+ ...o ? { [M.Footer]: [N("footer", j.Footer, { text: `${c} · rendered from your model` })] } : {},
2124
+ [M.ConfigPanel]: [N(j.ConfigPanel, j.ConfigPanel, {
2109
2125
  title: "Settings",
2110
- themes: ve.map((e) => ({
2126
+ themes: ye.map((e) => ({
2111
2127
  name: e.name,
2112
2128
  label: e.name,
2113
2129
  isDark: e.isDark ?? !1
@@ -2115,26 +2131,26 @@ function ri(e, t, n, r, i, a = !1, o = !0) {
2115
2131
  })]
2116
2132
  };
2117
2133
  }
2118
- function ii(e) {
2134
+ function ai(e) {
2119
2135
  return `#/${encodeURIComponent(e)}`;
2120
2136
  }
2121
2137
  //#endregion
2122
2138
  //#region src/StageChrome.tsx
2123
- var ai = e({
2139
+ var oi = e({
2124
2140
  locales: [],
2125
2141
  locale: "",
2126
2142
  setLocale: () => void 0,
2127
2143
  activity: ""
2128
2144
  });
2129
- function oi({ state: e, children: t }) {
2130
- return /* @__PURE__ */ F(ai.Provider, {
2145
+ function si({ state: e, children: t }) {
2146
+ return /* @__PURE__ */ F(oi.Provider, {
2131
2147
  value: e,
2132
2148
  children: t
2133
2149
  });
2134
2150
  }
2135
- var si = "Stage:activity";
2136
- function ci() {
2137
- let { locales: e, locale: t, setLocale: n } = r(ai);
2151
+ var ci = "Stage:activity";
2152
+ function li() {
2153
+ let { locales: e, locale: t, setLocale: n } = r(oi);
2138
2154
  return e.length < 2 ? null : /* @__PURE__ */ F("select", {
2139
2155
  className: "stage-locale",
2140
2156
  "aria-label": "Locale",
@@ -2146,19 +2162,19 @@ function ci() {
2146
2162
  }, e))
2147
2163
  });
2148
2164
  }
2149
- function li({ element: e }) {
2165
+ function ui({ element: e }) {
2150
2166
  let t = e.properties ?? {};
2151
2167
  return /* @__PURE__ */ F("nav", {
2152
2168
  className: "stage-navigation-tree",
2153
2169
  "aria-label": "Navigation",
2154
2170
  "data-scene-id": e.id,
2155
- children: /* @__PURE__ */ F(ui, {
2171
+ children: /* @__PURE__ */ F(di, {
2156
2172
  nodes: t.nodes ?? [],
2157
2173
  activeScreen: t.activeScreen
2158
2174
  })
2159
2175
  });
2160
2176
  }
2161
- function ui({ nodes: e, activeScreen: t }) {
2177
+ function di({ nodes: e, activeScreen: t }) {
2162
2178
  return /* @__PURE__ */ F("ul", {
2163
2179
  role: "tree",
2164
2180
  children: e.map((e) => e.screen === void 0 ? /* @__PURE__ */ I("li", {
@@ -2167,13 +2183,13 @@ function ui({ nodes: e, activeScreen: t }) {
2167
2183
  children: [/* @__PURE__ */ F("span", {
2168
2184
  className: "stage-navigation-group",
2169
2185
  children: e.label
2170
- }), /* @__PURE__ */ F(ui, {
2186
+ }), /* @__PURE__ */ F(di, {
2171
2187
  nodes: e.children,
2172
2188
  activeScreen: t
2173
2189
  })]
2174
2190
  }, e.label) : /* @__PURE__ */ F("li", {
2175
2191
  role: "treeitem",
2176
- children: /* @__PURE__ */ F(di, {
2192
+ children: /* @__PURE__ */ F(fi, {
2177
2193
  node: e,
2178
2194
  screen: e.screen,
2179
2195
  activeScreen: t
@@ -2181,12 +2197,12 @@ function ui({ nodes: e, activeScreen: t }) {
2181
2197
  }, `${e.screen}:${e.label}`))
2182
2198
  });
2183
2199
  }
2184
- function di({ node: e, screen: t, activeScreen: n }) {
2185
- let i = r(ne), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && i && !s && Jr(o) ? (e) => {
2200
+ function fi({ node: e, screen: t, activeScreen: n }) {
2201
+ let i = r(re), a = e.presentation === "icon" || e.presentation === "text" ? e.presentation : "both", o = e.destination, s = o?.kind === "external" && o.route !== void 0, c = o && i && !s && Yr(o) ? (e) => {
2186
2202
  e.preventDefault(), i.navigate(o);
2187
2203
  } : void 0;
2188
2204
  return /* @__PURE__ */ I("a", {
2189
- href: s ? o.route : ii(t),
2205
+ href: s ? o.route : ai(t),
2190
2206
  rel: s ? "noreferrer" : void 0,
2191
2207
  "aria-current": t === n ? "page" : void 0,
2192
2208
  "aria-label": a === "icon" ? e.label : void 0,
@@ -2200,8 +2216,8 @@ function di({ node: e, screen: t, activeScreen: n }) {
2200
2216
  }), a !== "icon" && e.label]
2201
2217
  });
2202
2218
  }
2203
- function fi({ element: e }) {
2204
- let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(ne), i = ue(), a = B(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
2219
+ function pi({ element: e }) {
2220
+ let t = typeof e.properties.name == "string" ? e.properties.name : "", n = r(re), i = de(), a = B(), o = n?.outlets[t], s = o && i ? i.screens[o] : void 0, c = e.properties.closable === !0;
2205
2221
  return /* @__PURE__ */ I("div", {
2206
2222
  "data-scene-outlet": t,
2207
2223
  "data-scene-outlet-screen": o,
@@ -2214,23 +2230,23 @@ function fi({ element: e }) {
2214
2230
  onClick: () => n?.closeOutlet(t),
2215
2231
  children: "Close"
2216
2232
  })
2217
- }), s && i && /* @__PURE__ */ F(T, {
2233
+ }), s && i && /* @__PURE__ */ F(w, {
2218
2234
  element: s,
2219
2235
  registry: i.registry,
2220
2236
  resolveBinding: a.resolveBinding
2221
2237
  })]
2222
2238
  });
2223
2239
  }
2224
- function pi() {
2225
- let { activity: e } = r(ai);
2240
+ function mi() {
2241
+ let { activity: e } = r(oi);
2226
2242
  return e ? /* @__PURE__ */ F("p", {
2227
2243
  className: "stage-activity",
2228
2244
  role: "status",
2229
2245
  children: e
2230
2246
  }) : null;
2231
2247
  }
2232
- function mi() {
2233
- let e = j(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2248
+ function hi() {
2249
+ let e = A(), t = e?.tokens?.["surface.background"], n = e?.tokens?.["text.color"];
2234
2250
  return i(() => {
2235
2251
  let r = e?.isDark ? "dark" : "light";
2236
2252
  document.documentElement.setAttribute("data-scene-color-scheme", r), document.body.setAttribute("data-scene-color-scheme", r), document.body.style.backgroundColor = t ?? "", document.body.style.color = n ?? "";
@@ -2240,25 +2256,25 @@ function mi() {
2240
2256
  n
2241
2257
  ]), null;
2242
2258
  }
2243
- var hi = {
2244
- [Xr]: ci,
2245
- [ti]: li,
2246
- [si]: pi,
2247
- "core:outlet": fi
2248
- }, gi = [
2259
+ var gi = {
2260
+ [Zr]: li,
2261
+ [ni]: ui,
2262
+ [ci]: mi,
2263
+ "core:outlet": pi
2264
+ }, _i = [
2249
2265
  "navigationMode",
2250
2266
  "menuTheme",
2251
2267
  "showFooter"
2252
- ], _i = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2253
- function vi(e, t, n = !1) {
2268
+ ], vi = /^#(?:[0-9a-f]{3}|[0-9a-f]{6})$/i;
2269
+ function yi(e, t, n = !1) {
2254
2270
  let r = [], i = t.options ?? {}, a = {
2255
2271
  showFooter: !0,
2256
2272
  followsSystem: !1,
2257
2273
  problems: r
2258
2274
  };
2259
2275
  for (let [e, n] of Object.entries(i)) {
2260
- if (!gi.includes(e)) {
2261
- r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${gi.join(", ")}.`);
2276
+ if (!_i.includes(e)) {
2277
+ r.push(`The shell '${t.name}' has no option '${e}'; the options it understands are ${_i.join(", ")}.`);
2262
2278
  continue;
2263
2279
  }
2264
2280
  if (e === "navigationMode") {
@@ -2273,11 +2289,11 @@ function vi(e, t, n = !1) {
2273
2289
  if (o?.colorScheme !== void 0) {
2274
2290
  a.followsSystem = o.colorScheme === l.System;
2275
2291
  let e = a.followsSystem ? n : o.colorScheme === l.Dark;
2276
- a.colorScheme = e ? fe.Dark : fe.Light, a.themeName = ve.find((t) => (t.isDark ?? !1) === e)?.name;
2292
+ a.colorScheme = e ? pe.Dark : pe.Light, a.themeName = ye.find((t) => (t.isDark ?? !1) === e)?.name;
2277
2293
  }
2278
- return o?.accent !== void 0 && (_i.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2294
+ return o?.accent !== void 0 && (vi.test(o.accent) ? a.accent = o.accent : r.push(`The accent '${o.accent}' is not a colour written as #rgb or #rrggbb.`)), a;
2279
2295
  }
2280
- function yi(e, t) {
2296
+ function bi(e, t) {
2281
2297
  if (e?.root === void 0) return [];
2282
2298
  let n = /* @__PURE__ */ new Set([
2283
2299
  h.RootTemplateUnknown,
@@ -2289,7 +2305,7 @@ function yi(e, t) {
2289
2305
  ]), r = t.diagnostics.filter((e) => n.has(e.code)).map((e) => e.message);
2290
2306
  return r.length === 0 && t.origin !== g.Root && r.push(`The root template '${e.root.template.id}' did not resolve, so the application would not start in the shell it names.`), r;
2291
2307
  }
2292
- function bi(e) {
2308
+ function xi(e) {
2293
2309
  let t = e.length === 4 ? [...e.slice(1)].map((e) => e + e).join("") : e.slice(1), [n, r, i] = [
2294
2310
  0,
2295
2311
  2,
@@ -2297,7 +2313,7 @@ function bi(e) {
2297
2313
  ].map((e) => parseInt(t.slice(e, e + 2), 16));
2298
2314
  return (n * 299 + r * 587 + i * 114) / 1e3 >= 150 ? "#111827" : "#ffffff";
2299
2315
  }
2300
- function xi(e, t) {
2316
+ function Si(e, t) {
2301
2317
  if (t === void 0) return e;
2302
2318
  let n = t.length === 4 ? [...t.slice(1)].map((e) => e + e).join("") : t.slice(1), [r, i, a] = [
2303
2319
  0,
@@ -2309,18 +2325,18 @@ function xi(e, t) {
2309
2325
  tokens: {
2310
2326
  ...e.tokens,
2311
2327
  "primary.color": t,
2312
- "primary.contrastColor": bi(t),
2328
+ "primary.contrastColor": xi(t),
2313
2329
  "focus.ring": `0 0 0 2px rgb(${r} ${i} ${a} / 0.4)`
2314
2330
  }
2315
2331
  }));
2316
2332
  }
2317
2333
  //#endregion
2318
2334
  //#region src/StageShellSettings.tsx
2319
- var Si = "(prefers-color-scheme: dark)";
2320
- function Ci() {
2335
+ var Ci = "(prefers-color-scheme: dark)";
2336
+ function wi() {
2321
2337
  return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ?? !1;
2322
2338
  }
2323
- function wi({ settings: e, onSystemSchemeChange: t }) {
2339
+ function Ti({ settings: e, onSystemSchemeChange: t }) {
2324
2340
  let n = s(Ee());
2325
2341
  n.current = Ee();
2326
2342
  let { mode: r, menuTheme: a, colorScheme: o, themeName: c } = e;
@@ -2334,16 +2350,16 @@ function wi({ settings: e, onSystemSchemeChange: t }) {
2334
2350
  c
2335
2351
  ]), i(() => {
2336
2352
  if (!e.followsSystem || !globalThis.matchMedia || !t) return;
2337
- let n = globalThis.matchMedia(Si), r = (e) => t(e.matches);
2353
+ let n = globalThis.matchMedia(Ci), r = (e) => t(e.matches);
2338
2354
  return n.addEventListener("change", r), () => n.removeEventListener("change", r);
2339
2355
  }, [e.followsSystem, t]), null;
2340
2356
  }
2341
2357
  //#endregion
2342
2358
  //#region src/stageNavigationModel.ts
2343
- function Ti(e) {
2359
+ function Ei(e) {
2344
2360
  return (e?.application.regions.length ?? 0) > 0 || (e?.modules.length ?? 0) > 0;
2345
2361
  }
2346
- function Ei(e) {
2362
+ function Di(e) {
2347
2363
  let t = /* @__PURE__ */ new Map();
2348
2364
  for (let n of e) {
2349
2365
  let e = (n.path ?? []).join(".");
@@ -2356,35 +2372,35 @@ function Ei(e) {
2356
2372
  return t.get(r) ?? i ?? (e.some((e) => e.name === r) ? r : void 0);
2357
2373
  };
2358
2374
  }
2359
- function Di(e) {
2375
+ function Oi(e) {
2360
2376
  return (t) => e.find((e) => e.name === t)?.path?.[0];
2361
2377
  }
2362
- function Oi(e, t) {
2378
+ function ki(e, t) {
2363
2379
  return {
2364
2380
  structure: e.structure ?? { modules: [] },
2365
2381
  navigation: e.navigation ?? {
2366
2382
  application: { regions: [] },
2367
2383
  modules: []
2368
2384
  },
2369
- screenFor: Ei(e.screens),
2370
- moduleOf: Di(e.screens),
2385
+ screenFor: Di(e.screens),
2386
+ moduleOf: Oi(e.screens),
2371
2387
  ...t ? { isVisible: t } : {}
2372
2388
  };
2373
2389
  }
2374
2390
  //#endregion
2375
2391
  //#region src/stageSlices.ts
2376
- function ki(e) {
2392
+ function Ai(e) {
2377
2393
  return (t) => K(e?.[t] ?? "").filter((e) => e.unsupportedReason === void 0 && !e.members && !e.item).map((e) => ({
2378
2394
  name: e.name,
2379
2395
  type: e.type === "text" || e.type === void 0 ? "string" : e.type,
2380
- label: Ai(e.name),
2396
+ label: ji(e.name),
2381
2397
  required: e.required
2382
2398
  }));
2383
2399
  }
2384
- function Ai(e) {
2400
+ function ji(e) {
2385
2401
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/^./, (e) => e.toUpperCase());
2386
2402
  }
2387
- function ji(e, t, n) {
2403
+ function Mi(e, t, n) {
2388
2404
  return { invoke: async (r, i, a) => {
2389
2405
  let o = a ?? r.slice(r.lastIndexOf(".") + 1);
2390
2406
  if (!W(o)) return {
@@ -2404,8 +2420,20 @@ function ji(e, t, n) {
2404
2420
  } };
2405
2421
  }
2406
2422
  //#endregion
2423
+ //#region src/standaloneScreenTemplates.ts
2424
+ function Ni(e) {
2425
+ let t = new Set(e.map((e) => e.name));
2426
+ return e.map((e) => {
2427
+ let n = e.fitsSlot, r = n?.includes(".") ? n.slice(0, n.lastIndexOf(".")) : void 0;
2428
+ return r !== void 0 && r !== e.name && t.has(r) ? {
2429
+ ...e,
2430
+ fitsSlot: "content"
2431
+ } : e;
2432
+ });
2433
+ }
2434
+ //#endregion
2407
2435
  //#region src/withoutSeededSlots.ts
2408
- function Mi(e, t) {
2436
+ function Pi(e, t) {
2409
2437
  let n = /* @__PURE__ */ new Map();
2410
2438
  for (let e of t) n.has(e.name) || n.set(e.name, e.slots.map((e) => e.name));
2411
2439
  return e.map((e) => {
@@ -2423,7 +2451,7 @@ function Mi(e, t) {
2423
2451
  }
2424
2452
  //#endregion
2425
2453
  //#region src/stageIcons.ts
2426
- var Ni = /* @__PURE__ */ new Map([
2454
+ var Fi = /* @__PURE__ */ new Map([
2427
2455
  ["chart", "chart-column"],
2428
2456
  ["add", "plus"],
2429
2457
  ["dollar", "dollar-sign"],
@@ -2431,24 +2459,24 @@ var Ni = /* @__PURE__ */ new Map([
2431
2459
  ["refresh", "refresh-cw"],
2432
2460
  ["invoice", "receipt-text"],
2433
2461
  ["batch", "layers"]
2434
- ]), Pi = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Fi = oe([{
2462
+ ]), Ii = (e) => e.trim().replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([a-zA-Z])([0-9]+)/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), Li = se([{
2435
2463
  library: m,
2436
2464
  loadGlyph: async ({ key: e }) => {
2437
- let t = Pi(e), n = Ni.get(t) ?? t;
2465
+ let t = Ii(e), n = Fi.get(t) ?? t;
2438
2466
  if (Object.hasOwn(Ye, n)) return (await Ye[n]())?.default;
2439
2467
  }
2440
2468
  }]);
2441
2469
  //#endregion
2442
2470
  //#region src/App.tsx
2443
- function Ii(e = {}) {
2444
- return $r({
2471
+ function Ri(e = {}) {
2472
+ return ei({
2445
2473
  ...e,
2446
- ...Mr,
2447
- ...hi
2474
+ ...Nr,
2475
+ ...gi
2448
2476
  });
2449
2477
  }
2450
- function Li(e, t) {
2451
- return P(`form-${e}-${t.name}`, yr, {
2478
+ function zi(e, t) {
2479
+ return N(`form-${e}-${t.name}`, br, {
2452
2480
  command: t.forCommand,
2453
2481
  label: t.name,
2454
2482
  generationMode: t.generationMode,
@@ -2456,47 +2484,47 @@ function Li(e, t) {
2456
2484
  fields: t.fields
2457
2485
  });
2458
2486
  }
2459
- function Ri(e, t) {
2487
+ function Bi(e, t) {
2460
2488
  let n = e.screens[0];
2461
- return ye(e, n, {
2462
- profile: Zr(e.uiProfiles),
2463
- blueprintTemplates: t?.length ? [...be, ...t] : void 0
2489
+ return be(e, n, {
2490
+ profile: Qr(e.uiProfiles),
2491
+ blueprintTemplates: Ni(t?.length ? [...P, ...t] : P)
2464
2492
  });
2465
2493
  }
2466
- function zi(e, t, n, r, i, a, o = !0) {
2467
- let s = Ti(e.navigation), c = e.navigation?.application.logo ? {
2494
+ function Vi(e, t, n, r, i, a, o = !0) {
2495
+ let s = Ei(e.navigation), c = e.navigation?.application.logo ? {
2468
2496
  title: e.navigation.application.logo.title,
2469
2497
  image: e.navigation.application.logo.image || void 0
2470
2498
  } : void 0;
2471
2499
  return {
2472
- profile: Zr(e.uiProfiles),
2473
- catalog: ei(r),
2474
- blueprintTemplates: a?.length ? [...be, ...a] : void 0,
2475
- chrome: (r, i) => i === M.FullPageShell ? { [N.ConfigPanel]: ri(e.screens, r.name, t, n, c, s, o)[N.ConfigPanel] } : ri(e.screens, r.name, t, n, c, s, o),
2476
- form: Li,
2477
- trailing: [P("activity", si)],
2500
+ profile: Qr(e.uiProfiles),
2501
+ catalog: ti(r),
2502
+ blueprintTemplates: Ni(a?.length ? [...P, ...a] : P),
2503
+ chrome: (r, i) => i === j.FullPageShell ? { [M.ConfigPanel]: ii(e.screens, r.name, t, n, c, s, o)[M.ConfigPanel] } : ii(e.screens, r.name, t, n, c, s, o),
2504
+ form: zi,
2505
+ trailing: [N("activity", ci)],
2478
2506
  decorate: (e) => {
2479
- let t = Fr(e);
2507
+ let t = Ir(e);
2480
2508
  return i ? b(t, i) : t;
2481
2509
  }
2482
2510
  };
2483
2511
  }
2484
- function Bi(e, t, n, r, i, a) {
2485
- let [o] = ur([t], Vi(e));
2486
- return he(e, o, zi(e, n, r, i, void 0, a)).element;
2512
+ function Hi(e, t, n, r, i, a) {
2513
+ let [o] = ur([t], Ui(e));
2514
+ return ge(e, o, Vi(e, n, r, i, void 0, a)).element;
2487
2515
  }
2488
- function Vi(e) {
2516
+ function Ui(e) {
2489
2517
  return [...e.screenTemplates ?? [], ...e.dialogTemplates ?? []];
2490
2518
  }
2491
- function Hi() {
2519
+ function Wi() {
2492
2520
  try {
2493
2521
  return globalThis.localStorage ?? null;
2494
2522
  } catch {
2495
2523
  return null;
2496
2524
  }
2497
2525
  }
2498
- function Ui({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: a } = {}) {
2499
- let s = tt(), l = o(() => Ii(e), [e]), [u, d] = c(), [f, p] = c(""), m = nt(), h = Nr();
2526
+ function Gi({ components: e, packageCatalog: t, screenTemplates: n, dialogTemplates: r, isVisible: a } = {}) {
2527
+ let s = tt(), l = o(() => Ri(e), [e]), [u, d] = c(), [f, p] = c(""), m = nt(), h = Pr();
2500
2528
  return i(() => {
2501
2529
  let e = new AbortController();
2502
2530
  return s.scene(e.signal).then((e) => d(r?.length ? {
@@ -2508,7 +2536,7 @@ function Ui({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2508
2536
  }, [s, r]), f ? /* @__PURE__ */ I("main", {
2509
2537
  className: "stage-message",
2510
2538
  children: [/* @__PURE__ */ F("h1", { children: "Unable to render this Stage" }), /* @__PURE__ */ F("p", { children: f })]
2511
- }) : u ? /* @__PURE__ */ F(Wi, {
2539
+ }) : u ? /* @__PURE__ */ F(Ki, {
2512
2540
  scene: u,
2513
2541
  registry: l,
2514
2542
  routeState: m,
@@ -2521,16 +2549,16 @@ function Ui({ components: e, packageCatalog: t, screenTemplates: n, dialogTempla
2521
2549
  children: /* @__PURE__ */ F("h1", { children: "Preparing the Stage" })
2522
2550
  });
2523
2551
  }
2524
- function Wi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: a, screenTemplates: s, isVisible: l }) {
2525
- let u = o(() => ae(), []), [d, f] = c(Ci), p = e.screens[0]?.name ?? "", m = o(() => Zr(e.uiProfiles), [e]), h = o(() => p ? Ri(e, s) : void 0, [
2552
+ function Ki({ scene: e, registry: t, routeState: r, strings: i, packageCatalog: a, screenTemplates: s, isVisible: l }) {
2553
+ let u = o(() => oe(), []), [d, f] = c(wi), p = e.screens[0]?.name ?? "", m = o(() => Qr(e.uiProfiles), [e]), h = o(() => p ? Bi(e, s) : void 0, [
2526
2554
  e,
2527
2555
  s,
2528
2556
  p
2529
- ]), g = o(() => h ? yi(m, h) : [], [m, h]), _ = o(() => h ? vi(m, h, d) : void 0, [
2557
+ ]), g = o(() => h ? bi(m, h) : [], [m, h]), _ = o(() => h ? yi(m, h, d) : void 0, [
2530
2558
  m,
2531
2559
  h,
2532
2560
  d
2533
- ]), v = o(() => xi(ve, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = o(() => zi(e, i.locales, i.locale, a, i.dictionary, s, y), [
2561
+ ]), v = o(() => Si(ye, _?.accent), [_?.accent]), y = _?.showFooter ?? !0, b = o(() => Vi(e, i.locales, i.locale, a, i.dictionary, s, y), [
2534
2562
  e,
2535
2563
  i.locales,
2536
2564
  i.locale,
@@ -2538,14 +2566,14 @@ function Wi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2538
2566
  a,
2539
2567
  s,
2540
2568
  y
2541
- ]), x = n((e) => f(e), []), ee = o(() => Oi(e, l), [e, l]), S = o(() => ({
2569
+ ]), x = n((e) => f(e), []), ee = o(() => ki(e, l), [e, l]), S = o(() => ({
2542
2570
  ...e,
2543
- screens: ur(Mi(e.screens, [
2571
+ screens: ur(Pi(e.screens, [
2544
2572
  ...e.screenTemplates,
2545
2573
  ...e.dialogTemplates ?? [],
2546
- ...be,
2574
+ ...P,
2547
2575
  ...s ?? []
2548
- ]), Vi(e))
2576
+ ]), Ui(e))
2549
2577
  }), [e, s]);
2550
2578
  return p ? g.length > 0 ? /* @__PURE__ */ I("main", {
2551
2579
  className: "stage-message",
@@ -2556,15 +2584,15 @@ function Wi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2556
2584
  /* @__PURE__ */ F("p", { children: "The ui profile's root template cannot be the application's shell." }),
2557
2585
  /* @__PURE__ */ F("ul", { children: g.map((e) => /* @__PURE__ */ F("li", { children: e }, e)) })
2558
2586
  ]
2559
- }) : /* @__PURE__ */ F(de, {
2587
+ }) : /* @__PURE__ */ F(fe, {
2560
2588
  application: S,
2561
2589
  composition: b,
2562
2590
  navigationModel: ee,
2563
2591
  registry: t,
2564
2592
  initialScreen: p,
2565
2593
  history: u,
2566
- layoutConfigStorage: Hi(),
2567
- scope: (t, n) => /* @__PURE__ */ F(Gi, {
2594
+ layoutConfigStorage: Wi(),
2595
+ scope: (t, n) => /* @__PURE__ */ F(qi, {
2568
2596
  scene: e,
2569
2597
  routeState: r,
2570
2598
  strings: i,
@@ -2574,13 +2602,13 @@ function Wi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2574
2602
  onSystemSchemeChange: x,
2575
2603
  children: n
2576
2604
  }),
2577
- renderScreen: (e, n) => /* @__PURE__ */ F(qi, {
2605
+ renderScreen: (e, n) => /* @__PURE__ */ F(Yi, {
2578
2606
  element: e,
2579
2607
  configuration: n,
2580
2608
  registry: t
2581
2609
  }),
2582
- renderDialog: () => /* @__PURE__ */ F(kr, {}),
2583
- renderDialogTemplate: (e, n, r) => /* @__PURE__ */ F(Ji, {
2610
+ renderDialog: () => /* @__PURE__ */ F(Ar, {}),
2611
+ renderDialogTemplate: (e, n, r) => /* @__PURE__ */ F(Xi, {
2584
2612
  template: e,
2585
2613
  content: n,
2586
2614
  registry: t,
@@ -2592,7 +2620,7 @@ function Wi({ scene: e, registry: t, routeState: r, strings: i, packageCatalog:
2592
2620
  children: [/* @__PURE__ */ F("h1", { children: "Nothing to show yet" }), /* @__PURE__ */ F("p", { children: "This model has no slice carrying a command or a read model, so there is no screen to render." })]
2593
2621
  });
2594
2622
  }
2595
- function Gi({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: s, children: l }) {
2623
+ function qi({ scene: e, routeState: t, strings: n, navigation: r, themes: a, shellSettings: o, onSystemSchemeChange: s, children: l }) {
2596
2624
  let [d, f] = c(""), { navigate: p } = r;
2597
2625
  return i(() => f(""), [r.currentScreen, r.currentDialog]), i(() => {
2598
2626
  let e = (e) => {
@@ -2609,16 +2637,16 @@ function Gi({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
2609
2637
  r && (r.dialog === void 0 ? r.screen !== void 0 && !e.screens.some((e) => e.name === r.screen) ? f(`The modeled screen “${r.screen}” is not available.`) : p(r) : e.dialogTemplates?.some((e) => e.name === r.dialog) ? p(r) : f(`The modeled dialog “${r.dialog}” is not available in this Stage runtime.`));
2610
2638
  };
2611
2639
  return globalThis.addEventListener("cratis.scene.navigate", t), () => globalThis.removeEventListener("cratis.scene.navigate", t);
2612
- }, [p, e]), /* @__PURE__ */ F(w, {
2613
- registry: Fi,
2614
- children: /* @__PURE__ */ I(pe, {
2640
+ }, [p, e]), /* @__PURE__ */ F(te, {
2641
+ registry: Li,
2642
+ children: /* @__PURE__ */ I(me, {
2615
2643
  themes: a,
2616
2644
  children: [
2617
- o && /* @__PURE__ */ F(wi, {
2645
+ o && /* @__PURE__ */ F(Ti, {
2618
2646
  settings: o,
2619
2647
  onSystemSchemeChange: s
2620
2648
  }),
2621
- /* @__PURE__ */ F(mi, {}),
2649
+ /* @__PURE__ */ F(hi, {}),
2622
2650
  /* @__PURE__ */ F(Ft, {
2623
2651
  routes: t.routes,
2624
2652
  routesReady: t.ready,
@@ -2626,7 +2654,7 @@ function Gi({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
2626
2654
  locale: n.locale,
2627
2655
  locales: n.locales,
2628
2656
  screen: r.primaryScreen ?? e.screens[0]?.name ?? "",
2629
- children: /* @__PURE__ */ F(Ki, {
2657
+ children: /* @__PURE__ */ F(Ji, {
2630
2658
  activity: d,
2631
2659
  routesReady: t.ready,
2632
2660
  scene: e,
@@ -2639,12 +2667,12 @@ function Gi({ scene: e, routeState: t, strings: n, navigation: r, themes: a, she
2639
2667
  })
2640
2668
  });
2641
2669
  }
2642
- function Ki({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2643
- let s = B(), c = le(), l = Qt(), d = o(() => ji(l, t, s.refreshAfterCommand), [
2670
+ function Ji({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i, children: a }) {
2671
+ let s = B(), c = ue(), l = Qt(), d = o(() => Mi(l, t, s.refreshAfterCommand), [
2644
2672
  l,
2645
2673
  t,
2646
2674
  s.refreshAfterCommand
2647
- ]), f = o(() => ki(n.commandSchemas), [n.commandSchemas]), p = k({
2675
+ ]), f = o(() => Ai(n.commandSchemas), [n.commandSchemas]), p = O({
2648
2676
  executeCommand: async (e, n) => {
2649
2677
  let i = W(e);
2650
2678
  if (!i && !t) return r(`The modeled command “${e}” is waiting for Stage routes.`), {
@@ -2680,18 +2708,18 @@ function Ki({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2680
2708
  refreshQuery: async (e) => s.refreshQuery(e),
2681
2709
  raise: async (e) => r(`The modeled trigger “${e}” is not available in this Stage runtime.`)
2682
2710
  });
2683
- return /* @__PURE__ */ F(oi, {
2711
+ return /* @__PURE__ */ F(si, {
2684
2712
  state: {
2685
2713
  locales: i.locales,
2686
2714
  locale: i.locale,
2687
2715
  setLocale: i.setLocale,
2688
2716
  activity: e
2689
2717
  },
2690
- children: /* @__PURE__ */ F(D, {
2718
+ children: /* @__PURE__ */ F(E, {
2691
2719
  invoker: d,
2692
- children: /* @__PURE__ */ F(E, {
2720
+ children: /* @__PURE__ */ F(T, {
2693
2721
  fieldsFor: f,
2694
- children: /* @__PURE__ */ F(te, {
2722
+ children: /* @__PURE__ */ F(ne, {
2695
2723
  dispatcher: p,
2696
2724
  context: {
2697
2725
  resolve: s.resolveBinding,
@@ -2705,9 +2733,9 @@ function Ki({ activity: e, routesReady: t, scene: n, setActivity: r, strings: i,
2705
2733
  })
2706
2734
  });
2707
2735
  }
2708
- function qi({ element: e, configuration: t, registry: n }) {
2736
+ function Yi({ element: e, configuration: t, registry: n }) {
2709
2737
  let r = B(), i = qt();
2710
- return /* @__PURE__ */ I(Ne, { children: [/* @__PURE__ */ F(Ur, { element: e }), /* @__PURE__ */ F(T, {
2738
+ return /* @__PURE__ */ I(Ne, { children: [/* @__PURE__ */ F(Wr, { element: e }), /* @__PURE__ */ F(w, {
2711
2739
  element: e,
2712
2740
  registry: n,
2713
2741
  resolveBinding: r.resolveBinding,
@@ -2716,7 +2744,7 @@ function qi({ element: e, configuration: t, registry: n }) {
2716
2744
  configuration: t
2717
2745
  })] });
2718
2746
  }
2719
- function Ji({ template: e, content: t, registry: n, strings: r, close: a }) {
2747
+ function Xi({ template: e, content: t, registry: n, strings: r, close: a }) {
2720
2748
  let o = B(), s = qt(), c = b(t, r.dictionary);
2721
2749
  return i(() => {
2722
2750
  let e = (e) => {
@@ -2734,7 +2762,7 @@ function Ji({ template: e, content: t, registry: n, strings: r, close: a }) {
2734
2762
  type: "button",
2735
2763
  onClick: a,
2736
2764
  children: "Close"
2737
- }), /* @__PURE__ */ F(T, {
2765
+ }), /* @__PURE__ */ F(w, {
2738
2766
  element: c,
2739
2767
  registry: n,
2740
2768
  resolveBinding: o.resolveBinding,
@@ -2746,9 +2774,9 @@ function Ji({ template: e, content: t, registry: n, strings: r, close: a }) {
2746
2774
  }
2747
2775
  //#endregion
2748
2776
  //#region src/stageTheme.ts
2749
- var Yi = "[data-scene-color-scheme='dark']", Xi = {
2777
+ var Zi = "[data-scene-color-scheme='dark']", Qi = {
2750
2778
  preset: Xe,
2751
- options: { darkModeSelector: Yi }
2779
+ options: { darkModeSelector: Zi }
2752
2780
  };
2753
2781
  //#endregion
2754
- export { Ui as App, Ui as StageApplication, xn as StageCommandForm, Ft as StageDataProvider, or as StageGuardedAction, et as StageSourceProvider, Bi as composeStageScreen, ji as createStageSliceInvoker, It as dataChanged, Xt as executeRegisteredCommand, pt as performQuery, lt as registerQueryRouteResolver, W as registeredCommand, ut as registeredQuery, ki as sliceFieldsFrom, Ii as stageApplicationRegistry, zi as stageComposition, Yi as stageDarkSelector, Qe as stageEndpoints, Ri as stageShellOf, Xi as stageTheme, Ze as staticStageSource, mt as subscribeQuery, Qt as useStageCommandExecutor, B as useStageData, V as useStageQuery, tt as useStageSource };
2782
+ export { Gi as App, Gi as StageApplication, xn as StageCommandForm, Ft as StageDataProvider, or as StageGuardedAction, et as StageSourceProvider, Hi as composeStageScreen, Mi as createStageSliceInvoker, It as dataChanged, Xt as executeRegisteredCommand, ot as hostedBasePath, pt as performQuery, lt as registerQueryRouteResolver, W as registeredCommand, ut as registeredQuery, Ai as sliceFieldsFrom, Ri as stageApplicationRegistry, Vi as stageComposition, Zi as stageDarkSelector, Qe as stageEndpoints, Bi as stageShellOf, Qi as stageTheme, Ze as staticStageSource, mt as subscribeQuery, Qt as useStageCommandExecutor, B as useStageData, V as useStageQuery, tt as useStageSource };