@cratis/event-models 0.349.1 → 0.350.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.
Files changed (25) hide show
  1. package/dist/Board/BoardOverlay.d.ts +3 -1
  2. package/dist/Board/BoardToolbarFrame.d.ts +3 -1
  3. package/dist/Board/BoardToolbarPlacement.d.ts +1 -0
  4. package/dist/Board/EventModelBoard.d.ts +3 -1
  5. package/dist/Board/EventModelBoardHandle.d.ts +1 -0
  6. package/dist/Board/findFreePosition.d.ts +13 -0
  7. package/dist/Board/index.d.ts +2 -0
  8. package/dist/Collections/useCollectionsArea.d.ts +1 -1
  9. package/dist/Naming/defaultNames.d.ts +5 -0
  10. package/dist/Naming/index.d.ts +1 -0
  11. package/dist/event-models.css +1 -1
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.js +3148 -3080
  14. package/dist/index.js.map +1 -1
  15. package/dist/screen-editor/{DataBindingSections-BeQxUfQM.js → DataBindingSections-DAYezlvg.js} +39 -37
  16. package/dist/screen-editor/{QueryBindingPropertyEditor-XQDHU9xb.js → QueryBindingPropertyEditor-8eD_hPn0.js} +19 -19
  17. package/dist/screen-editor/ScreenEditor/DesignMode/Outlets/createOutletDesign.d.ts +1 -1
  18. package/dist/screen-editor/ScreenEditor/DesignMode/Outlets/screenOutlets.d.ts +1 -1
  19. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +1 -1
  20. package/dist/screen-editor/ScreenEditor/Play/composePlayScreen.d.ts +4 -3
  21. package/dist/screen-editor/ScreenEditor/Templates/nativeStandIns.d.ts +2 -1
  22. package/dist/screen-editor/index.js +2330 -2298
  23. package/package.json +3 -3
  24. /package/dist/screen-editor/ScreenEditor/{DesignMode/Outlets → Outlets}/outletDocument.d.ts +0 -0
  25. /package/dist/screen-editor/ScreenEditor/{DesignMode/Outlets → Outlets}/screenOutletChain.d.ts +0 -0
@@ -1862,58 +1862,60 @@ var Sr = (e, t) => ({
1862
1862
  });
1863
1863
  };
1864
1864
  export {
1865
- pe as $,
1866
- Y as A,
1867
- he as B,
1868
- mr as C,
1869
- Yt as D,
1870
- Jt as E,
1871
- _e as F,
1872
- Ft as G,
1873
- Rt as H,
1874
- c as I,
1875
- rr as J,
1876
- or as K,
1877
- Dt as L,
1878
- qe as M,
1879
- qt as N,
1880
- ur as O,
1881
- le as P,
1882
- nr as Q,
1883
- dr as R,
1884
- Ie as S,
1885
- Xt as T,
1886
- ar as U,
1887
- xt as V,
1888
- fe as W,
1889
- ir as X,
1890
- sr as Y,
1891
- E as Z,
1865
+ E as $,
1866
+ ur as A,
1867
+ dr as B,
1868
+ sn as C,
1869
+ Xt as D,
1870
+ ke as E,
1871
+ qt as F,
1872
+ ar as G,
1873
+ he as H,
1874
+ le as I,
1875
+ or as J,
1876
+ fe as K,
1877
+ _e as L,
1878
+ Y as M,
1879
+ Pt as N,
1880
+ Jt as O,
1881
+ qe as P,
1882
+ ir as Q,
1883
+ c as R,
1884
+ pr as S,
1885
+ mr as T,
1886
+ xt as U,
1887
+ lr as V,
1888
+ Rt as W,
1889
+ rr as X,
1890
+ H as Y,
1891
+ sr as Z,
1892
1892
  Sn as _,
1893
1893
  zn as a,
1894
- pr as b,
1894
+ fr as b,
1895
1895
  hr as c,
1896
1896
  gr as d,
1897
- tr as et,
1897
+ nr as et,
1898
1898
  Mn as f,
1899
1899
  En as g,
1900
1900
  br as h,
1901
1901
  ue as i,
1902
- Pt as j,
1903
- cr as k,
1902
+ cr as j,
1903
+ Yt as k,
1904
1904
  yr as l,
1905
1905
  Rn as m,
1906
1906
  Tr as n,
1907
+ tr as nt,
1907
1908
  Wn as o,
1908
1909
  vr as p,
1909
- H as q,
1910
+ Ft as q,
1910
1911
  Sr as r,
1911
1912
  Or as s,
1912
1913
  wr as t,
1914
+ pe as tt,
1913
1915
  xn as u,
1914
- on as v,
1915
- ke as w,
1916
- sn as x,
1917
- fr as y,
1918
- lr as z
1916
+ bn as v,
1917
+ Ie as w,
1918
+ rn as x,
1919
+ on as y,
1920
+ Dt as z
1919
1921
  };
@@ -1,29 +1,29 @@
1
- import { R as N, c as E, d as B, f as F, h as I, l as L, m as j, t as M, u as Q, z as R } from "./DataBindingSections-BeQxUfQM.js";
2
- import { useState as k } from "react";
1
+ import { B as N, V as E, c as B, d as F, f as I, h as L, l as j, m as M, t as k, u as Q } from "./DataBindingSections-DAYezlvg.js";
2
+ import { useState as R } from "react";
3
3
  import { Fragment as S, jsx as o, jsxs as d } from "react/jsx-runtime";
4
- import { validateBinding as D } from "@cratis/scene.engine";
4
+ import { validateBinding as V } from "@cratis/scene.engine";
5
5
  var c = /* @__PURE__ */ (function(r) {
6
6
  return r.NoQuery = "noQuery", r.MissingQuery = "missingQuery", r.Loading = "loading", r.Empty = "empty", r.Error = "error", r.Ready = "ready", r;
7
7
  })({});
8
- function O({ binding: r, candidate: i, isLoading: u, error: l, rowCount: s }) {
8
+ function D({ binding: r, candidate: i, isLoading: u, error: l, rowCount: s }) {
9
9
  return r ? i ? l != null ? c.Error : u ? c.Loading : s === 0 ? c.Empty : c.Ready : c.MissingQuery : c.NoQuery;
10
10
  }
11
11
  function b(r, i, u, l) {
12
- const s = D(r, i, u, l);
12
+ const s = V(r, i, u, l);
13
13
  return {
14
14
  diagnostics: s,
15
15
  isStorable: s.every((m) => m.severity !== "error")
16
16
  };
17
17
  }
18
- var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, candidates: i, scope: u, strings: l, disabled: s, onChange: m }) => {
19
- const t = l.properties.query, [g, y] = k(), h = Q(r.effectiveValue) ? r.effectiveValue : void 0, n = g ?? h, p = n ? i.find((e) => e.id === n.queryId) : void 0, _ = n ? b(r.descriptor, p, n, u).diagnostics : [], v = (e) => {
18
+ var O = (r) => r.origin.map((i) => i.name).join(" / "), T = ({ property: r, candidates: i, scope: u, strings: l, disabled: s, onChange: m }) => {
19
+ const t = l.properties.query, [g, y] = R(), h = Q(r.effectiveValue) ? r.effectiveValue : void 0, n = g ?? h, p = n ? i.find((e) => e.id === n.queryId) : void 0, _ = n ? b(r.descriptor, p, n, u).diagnostics : [], v = (e) => {
20
20
  if (!e) {
21
21
  y(void 0), m(void 0);
22
22
  return;
23
23
  }
24
24
  const a = b(r.descriptor, i.find((f) => f.id === e.queryId), e, u);
25
25
  y(a.isStorable ? void 0 : e), a.isStorable && m(e);
26
- }, q = O({
26
+ }, q = D({
27
27
  binding: n,
28
28
  candidate: p,
29
29
  isLoading: !1
@@ -37,7 +37,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
37
37
  value: n?.queryId ?? "",
38
38
  onChange: (e) => {
39
39
  const a = i.find((f) => f.id === e.target.value);
40
- v(a ? E(a) : void 0);
40
+ v(a ? B(a) : void 0);
41
41
  },
42
42
  children: [
43
43
  /* @__PURE__ */ o("option", {
@@ -53,7 +53,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
53
53
  children: [
54
54
  e.name,
55
55
  " - ",
56
- V(e)
56
+ O(e)
57
57
  ]
58
58
  }, e.id))
59
59
  ]
@@ -66,8 +66,8 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
66
66
  n && p && /* @__PURE__ */ d(S, { children: [p.parameters.length > 0 && /* @__PURE__ */ d("div", {
67
67
  className: "studio-editor-query__group",
68
68
  children: [/* @__PURE__ */ o("strong", { children: t.parameters }), p.parameters.map((e) => /* @__PURE__ */ d("label", { children: [/* @__PURE__ */ d("span", { children: [t.sourceFor(e.name), e.required ? " *" : ""] }), /* @__PURE__ */ d("select", {
69
- value: j(n, e),
70
- onChange: (a) => v(F(n, e.name, a.target.value)),
69
+ value: M(n, e),
70
+ onChange: (a) => v(I(n, e.name, a.target.value)),
71
71
  children: [/* @__PURE__ */ o("option", {
72
72
  value: "",
73
73
  children: t.noSource
@@ -82,8 +82,8 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
82
82
  className: "studio-editor-query__column",
83
83
  children: [/* @__PURE__ */ o("input", {
84
84
  type: "checkbox",
85
- checked: L(n, e),
86
- onChange: (a) => v(a.target.checked ? B(n, e.name) : I(n, e.name))
85
+ checked: j(n, e),
86
+ onChange: (a) => v(a.target.checked ? F(n, e.name) : L(n, e.name))
87
87
  }), /* @__PURE__ */ o("span", { children: t.showColumn(e.name) })]
88
88
  }, e.name))]
89
89
  })] }),
@@ -91,7 +91,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
91
91
  className: "studio-editor-query__preview",
92
92
  role: "status",
93
93
  "data-state": q,
94
- children: T(q, t.preview)
94
+ children: $(q, t.preview)
95
95
  }),
96
96
  /* @__PURE__ */ o(N, {
97
97
  diagnostics: _,
@@ -100,7 +100,7 @@ var V = (r) => r.origin.map((i) => i.name).join(" / "), z = ({ property: r, cand
100
100
  ]
101
101
  });
102
102
  };
103
- function T(r, i) {
103
+ function $(r, i) {
104
104
  switch (r) {
105
105
  case c.NoQuery:
106
106
  return i.noQuery;
@@ -120,14 +120,14 @@ var J = ({ value: r, onChange: i, context: u, disabled: l }) => {
120
120
  const { session: s } = u;
121
121
  if (!s) return null;
122
122
  const m = Q(r) ? r : void 0, t = m ? u.lookups.queryCandidates.find((g) => g.id === m.queryId) : void 0;
123
- return /* @__PURE__ */ d(S, { children: [/* @__PURE__ */ o(z, {
123
+ return /* @__PURE__ */ d(S, { children: [/* @__PURE__ */ o(T, {
124
124
  property: s.property,
125
125
  candidates: u.lookups.queryCandidates,
126
126
  scope: s.bindingScope,
127
127
  strings: s.screenStrings,
128
128
  disabled: l === !0,
129
129
  onChange: i
130
- }), m && t && /* @__PURE__ */ o(M, {
130
+ }), m && t && /* @__PURE__ */ o(k, {
131
131
  controller: s.controller,
132
132
  environment: s.environment,
133
133
  strings: s.screenStrings,
@@ -135,7 +135,7 @@ var J = ({ value: r, onChange: i, context: u, disabled: l }) => {
135
135
  candidate: t,
136
136
  disabled: l === !0,
137
137
  onChange: (g, y, h) => {
138
- const n = h === "" ? s.bindingScope : R({
138
+ const n = h === "" ? s.bindingScope : E({
139
139
  ...s.bindingScope.types,
140
140
  [h]: y.type
141
141
  });
@@ -2,7 +2,7 @@ import { OutletKind, type ComponentDesignModeDescriptor, type OutletItem, type O
2
2
  import { type EffectiveOutlet, type OutletChain } from '@cratis/scene.engine';
3
3
  import { type DesignModeItem, type DesignModeItemSource, type DesignModePlan, type DesignModeRejection } from '../designModeTypes';
4
4
  import { type OutletBindingContext } from './outletBindings';
5
- import { type OutletEditingLevel } from './outletDocument';
5
+ import { type OutletEditingLevel } from '../../Outlets/outletDocument';
6
6
  import type { OutletStrings } from './OutletStrings';
7
7
  export type OutletLevelMode = 'inherit' | 'extend' | 'override';
8
8
  export interface OutletDesignInputs {
@@ -5,7 +5,7 @@ import type { ScreenEditorEnvironment } from '../../Host/ScreenEditorHost';
5
5
  import type { StateChangeSlice } from '../../Actions/StateChangeSlice';
6
6
  import { type OutletDesign } from './createOutletDesign';
7
7
  import type { OutletBindingContext } from './outletBindings';
8
- import { type OutletEditingLevel } from './outletDocument';
8
+ import { type OutletEditingLevel } from '../../Outlets/outletDocument';
9
9
  import type { OutletStrings } from './OutletStrings';
10
10
  export interface ScreenOutlets {
11
11
  outlets: OutletChain;
@@ -12,7 +12,7 @@ import type { StructureTreeAdapter } from '../Structure/StructureTreeAdapter';
12
12
  import type { EditorComposition } from '../Templates/composeEditorScreen';
13
13
  import type { DropRegion } from '../DropRegions/DropRegion';
14
14
  import type { LayoutItem } from '../Layouts/LayoutItem';
15
- import type { OutletEditingLevel } from '../DesignMode/Outlets/outletDocument';
15
+ import type { OutletEditingLevel } from '../Outlets/outletDocument';
16
16
  import type { ScreenEditorButtonToAdd } from './ScreenEditorHost';
17
17
  export type ElementMeasurer = (elementId: string) => {
18
18
  left: number;
@@ -1,9 +1,10 @@
1
- import type { DialogTemplate, EffectiveConfiguration, SceneDocument, SceneElement } from '@cratis/scene.model';
2
- import { type DescriptorCatalog } from '@cratis/scene.engine';
1
+ import type { DialogTemplate, EffectiveConfiguration, Layout, SceneDocument, SceneElement, ScreenTemplate } from '@cratis/scene.model';
2
+ import { type DescriptorCatalog, type OutletChain } from '@cratis/scene.engine';
3
3
  import { type DialogFrameDescription } from '../Templates/dialogPresentation';
4
4
  export interface PlayScreen {
5
5
  element: SceneElement;
6
6
  configuration?: EffectiveConfiguration;
7
7
  dialog?: DialogFrameDescription;
8
+ outlets?: OutletChain;
8
9
  }
9
- export declare function composePlayScreen(document: SceneDocument, catalog: DescriptorCatalog, knownDialogTemplates?: readonly DialogTemplate[], pageTemplateNames?: readonly string[], opensOverPage?: boolean): PlayScreen;
10
+ export declare function composePlayScreen(document: SceneDocument, catalog: DescriptorCatalog, knownDialogTemplates?: readonly DialogTemplate[], pageTemplateNames?: readonly string[], opensOverPage?: boolean, screenTemplates?: readonly ScreenTemplate[], layouts?: readonly Layout[]): PlayScreen;
@@ -24,6 +24,7 @@ export interface FormStandInSource {
24
24
  *
25
25
  * @param forms The `forms` of the screen.
26
26
  * @param placed The commands a form element already placed on the canvas stands for, which are not drawn twice.
27
+ * @param sentByTheDialog Whether the screen is a dialog whose button row sends the command, so the form draws no button of its own.
27
28
  * @returns A read-only form for each command that is not placed.
28
29
  */
29
- export declare function formStandIns(forms: readonly FormStandInSource[] | undefined, placed?: ReadonlySet<string>): SceneElement[];
30
+ export declare function formStandIns(forms: readonly FormStandInSource[] | undefined, placed?: ReadonlySet<string>, sentByTheDialog?: boolean): SceneElement[];