@cratis/scene.components 4.2.1 → 4.3.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.
@@ -17,6 +17,22 @@ const bindingPropertyNames: Record<BindingKind, string> = {
17
17
  [BindingKind.Command]: 'command',
18
18
  };
19
19
 
20
+ /**
21
+ * Reads a binding name from a property that holds either the name itself or a `QueryBinding`, which is what an
22
+ * editor stores when a query is bound to a host-supplied candidate. Both resolve through the registry by name.
23
+ */
24
+ function bindingName(properties: Record<string, unknown>, property: string): string | undefined {
25
+ const direct = stringProperty(properties, property);
26
+ if (direct !== undefined) return direct;
27
+
28
+ const binding = properties[property];
29
+ if (binding !== null && typeof binding === 'object' && !Array.isArray(binding)) {
30
+ return stringProperty(binding as Record<string, unknown>, 'query');
31
+ }
32
+
33
+ return undefined;
34
+ }
35
+
20
36
  /**
21
37
  * Reads the binding name an element carries for the given kind and looks it up in the binding registry.
22
38
  *
@@ -26,7 +42,7 @@ const bindingPropertyNames: Record<BindingKind, string> = {
26
42
  * turns into a visible placeholder.
27
43
  */
28
44
  export function resolveElementBinding(element: ExternalComponent, kind: BindingKind): ElementBinding {
29
- const name = stringProperty(element.properties, bindingPropertyNames[kind]);
45
+ const name = bindingName(element.properties, bindingPropertyNames[kind]);
30
46
  if (name === undefined) return {};
31
47
 
32
48
  return { name, target: kind === BindingKind.Query ? resolveQuery(name) : resolveCommand(name) };
@@ -0,0 +1,48 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { ComponentDescriptor, PropertyDescriptor, PropertyValueType, QueryResultShape } from '@cratis/scene.model';
5
+ import { componentRegistryKey } from '@cratis/scene.react';
6
+
7
+ // The package name, spelled out so describing components does not pull every adapter (and its UI dependencies) in
8
+ // with it; the bundle's validation checks each key against the manifest.
9
+ const key = (name: string) => componentRegistryKey('Cratis.Components', name);
10
+
11
+ /**
12
+ * The properties every query-bound data table shares: which query feeds it, and the few settings that shape how
13
+ * it shows the result.
14
+ *
15
+ * `query` is a `QueryReference`, so an editor binds it to a host-supplied query candidate and validates the
16
+ * arguments against it. What is stored is a `QueryBinding`; a plain query name - what screens carried before
17
+ * bindings existed - is still read, as a binding with no explicit connections. The columns are not properties:
18
+ * they are the `content` slot's children, edited as nodes.
19
+ */
20
+ const dataTableProperties: PropertyDescriptor[] = [
21
+ {
22
+ path: 'query', label: 'Query', group: 'Data', valueType: PropertyValueType.QueryReference, editorKind: 'queryBinding',
23
+ description: 'The collection query that feeds the table.',
24
+ constraints: { required: true, resultShapes: [QueryResultShape.Collection] },
25
+ },
26
+ { path: 'emptyMessage', label: 'Empty message', group: 'Content', valueType: PropertyValueType.String, default: '' },
27
+ {
28
+ path: 'dataKey', label: 'Row identity', group: 'Data', valueType: PropertyValueType.String, editorKind: 'resultField',
29
+ description: 'The result field that identifies a row.',
30
+ },
31
+ {
32
+ path: 'globalFilterFields', label: 'Searchable fields', group: 'Data', valueType: PropertyValueType.Object, editorKind: 'resultFieldList',
33
+ description: 'The result fields the table\'s search box looks in.',
34
+ },
35
+ ];
36
+
37
+ /**
38
+ * What can be edited on the `Cratis.Components` package's components.
39
+ *
40
+ * Only the query-bound tables are described so far; the form, dialog and editor composites carry
41
+ * Arc proxy classes by name and are configured through their own tooling. A package adds a descriptor here the
42
+ * same way it adds a component to the manifest.
43
+ */
44
+ export const cratisComponentsDescriptors: ComponentDescriptor[] = [
45
+ { component: key('dataTable'), displayName: 'Data table', properties: dataTableProperties },
46
+ { component: key('table'), displayName: 'Table', properties: dataTableProperties },
47
+ { component: key('observableDataTable'), displayName: 'Live data table', properties: dataTableProperties },
48
+ ];
@@ -4,6 +4,7 @@
4
4
  import { PackageKind, ScenePackage } from '@cratis/scene.model';
5
5
  import { ScenePackageBundle } from '@cratis/scene.react';
6
6
  import { cratisComponents, cratisComponentsPackageName } from './cratisComponents';
7
+ import { cratisComponentsDescriptors } from './cratisComponentsDescriptors';
7
8
 
8
9
  /**
9
10
  * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.
@@ -106,4 +107,5 @@ export const cratisComponentsPackageManifest: ScenePackage = {
106
107
  export const cratisComponentsPackage: ScenePackageBundle = {
107
108
  manifest: cratisComponentsPackageManifest,
108
109
  components: cratisComponents,
110
+ descriptors: cratisComponentsDescriptors,
109
111
  };
@@ -14,6 +14,18 @@ var bindingRegistry = require('./bindingRegistry.js');
14
14
  [BindingKind.BindingKind.Query]: 'query',
15
15
  [BindingKind.BindingKind.Command]: 'command'
16
16
  };
17
+ /**
18
+ * Reads a binding name from a property that holds either the name itself or a `QueryBinding`, which is what an
19
+ * editor stores when a query is bound to a host-supplied candidate. Both resolve through the registry by name.
20
+ */ function bindingName(properties$1, property) {
21
+ const direct = properties.stringProperty(properties$1, property);
22
+ if (direct !== undefined) return direct;
23
+ const binding = properties$1[property];
24
+ if (binding !== null && typeof binding === 'object' && !Array.isArray(binding)) {
25
+ return properties.stringProperty(binding, 'query');
26
+ }
27
+ return undefined;
28
+ }
17
29
  /**
18
30
  * Reads the binding name an element carries for the given kind and looks it up in the binding registry.
19
31
  *
@@ -22,7 +34,7 @@ var bindingRegistry = require('./bindingRegistry.js');
22
34
  * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter
23
35
  * turns into a visible placeholder.
24
36
  */ function resolveElementBinding(element, kind) {
25
- const name = properties.stringProperty(element.properties, bindingPropertyNames[kind]);
37
+ const name = bindingName(element.properties, bindingPropertyNames[kind]);
26
38
  if (name === undefined) return {};
27
39
  return {
28
40
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"resolveElementBinding.js","sources":["../../../bindings/resolveElementBinding.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ExternalComponent } from '@cratis/scene.model';\nimport { stringProperty } from '../properties';\nimport { BindingKind } from './BindingKind';\nimport { ElementBinding } from './ElementBinding';\nimport { resolveCommand, resolveQuery } from './bindingRegistry';\n\n/**\n * The property an element carries its binding name in, per kind. Queries and commands use different\n * property names so a single element could in principle carry both - a command dialog launched from a\n * data page, say - without the two names colliding.\n */\nconst bindingPropertyNames: Record<BindingKind, string> = {\n [BindingKind.Query]: 'query',\n [BindingKind.Command]: 'command',\n};\n\n/**\n * Reads the binding name an element carries for the given kind and looks it up in the binding registry.\n *\n * Every Arc-bound adapter starts here, so the \"name in, class out\" step happens in exactly one place and\n * every adapter reports a missing binding the same way. Nothing throws: an absent property and an\n * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter\n * turns into a visible placeholder.\n */\nexport function resolveElementBinding(element: ExternalComponent, kind: BindingKind): ElementBinding {\n const name = stringProperty(element.properties, bindingPropertyNames[kind]);\n if (name === undefined) return {};\n\n return { name, target: kind === BindingKind.Query ? resolveQuery(name) : resolveCommand(name) };\n}\n"],"names":["bindingPropertyNames","BindingKind","Query","Command","resolveElementBinding","element","kind","name","stringProperty","properties","undefined","target","resolveQuery","resolveCommand"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;AAIC,IACD,MAAMA,oBAAAA,GAAoD;IACtD,CAACC,uBAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,uBAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOC,yBAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAET,oBAAoB,CAACM,IAAAA,CAAK,CAAA;IAC1E,IAAIC,IAAAA,KAASG,SAAAA,EAAW,OAAO,EAAC;IAEhC,OAAO;AAAEH,QAAAA,IAAAA;AAAMI,QAAAA,MAAAA,EAAQL,SAASL,uBAAAA,CAAYC,KAAK,GAAGU,4BAAAA,CAAaL,QAAQM,8BAAAA,CAAeN,IAAAA;AAAM,KAAA;AAClG;;"}
1
+ {"version":3,"file":"resolveElementBinding.js","sources":["../../../bindings/resolveElementBinding.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ExternalComponent } from '@cratis/scene.model';\nimport { stringProperty } from '../properties';\nimport { BindingKind } from './BindingKind';\nimport { ElementBinding } from './ElementBinding';\nimport { resolveCommand, resolveQuery } from './bindingRegistry';\n\n/**\n * The property an element carries its binding name in, per kind. Queries and commands use different\n * property names so a single element could in principle carry both - a command dialog launched from a\n * data page, say - without the two names colliding.\n */\nconst bindingPropertyNames: Record<BindingKind, string> = {\n [BindingKind.Query]: 'query',\n [BindingKind.Command]: 'command',\n};\n\n/**\n * Reads a binding name from a property that holds either the name itself or a `QueryBinding`, which is what an\n * editor stores when a query is bound to a host-supplied candidate. Both resolve through the registry by name.\n */\nfunction bindingName(properties: Record<string, unknown>, property: string): string | undefined {\n const direct = stringProperty(properties, property);\n if (direct !== undefined) return direct;\n\n const binding = properties[property];\n if (binding !== null && typeof binding === 'object' && !Array.isArray(binding)) {\n return stringProperty(binding as Record<string, unknown>, 'query');\n }\n\n return undefined;\n}\n\n/**\n * Reads the binding name an element carries for the given kind and looks it up in the binding registry.\n *\n * Every Arc-bound adapter starts here, so the \"name in, class out\" step happens in exactly one place and\n * every adapter reports a missing binding the same way. Nothing throws: an absent property and an\n * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter\n * turns into a visible placeholder.\n */\nexport function resolveElementBinding(element: ExternalComponent, kind: BindingKind): ElementBinding {\n const name = bindingName(element.properties, bindingPropertyNames[kind]);\n if (name === undefined) return {};\n\n return { name, target: kind === BindingKind.Query ? resolveQuery(name) : resolveCommand(name) };\n}\n"],"names":["bindingPropertyNames","BindingKind","Query","Command","bindingName","properties","property","direct","stringProperty","undefined","binding","Array","isArray","resolveElementBinding","element","kind","name","target","resolveQuery","resolveCommand"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;AAIC,IACD,MAAMA,oBAAAA,GAAoD;IACtD,CAACC,uBAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,uBAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;AAGC,IACD,SAASC,WAAAA,CAAYC,YAAmC,EAAEC,QAAgB,EAAA;IACtE,MAAMC,MAAAA,GAASC,0BAAeH,YAAAA,EAAYC,QAAAA,CAAAA;IAC1C,IAAIC,MAAAA,KAAWE,WAAW,OAAOF,MAAAA;IAEjC,MAAMG,OAAAA,GAAUL,YAAU,CAACC,QAAAA,CAAS;IACpC,IAAII,OAAAA,KAAY,QAAQ,OAAOA,OAAAA,KAAY,YAAY,CAACC,KAAAA,CAAMC,OAAO,CAACF,OAAAA,CAAAA,EAAU;AAC5E,QAAA,OAAOF,0BAAeE,OAAAA,EAAoC,OAAA,CAAA;AAC9D,IAAA;IAEA,OAAOD,SAAAA;AACX;AAEA;;;;;;;AAOC,IACM,SAASI,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOZ,WAAAA,CAAYU,OAAAA,CAAQT,UAAU,EAAEL,oBAAoB,CAACe,IAAAA,CAAK,CAAA;IACvE,IAAIC,IAAAA,KAASP,SAAAA,EAAW,OAAO,EAAC;IAEhC,OAAO;AAAEO,QAAAA,IAAAA;AAAMC,QAAAA,MAAAA,EAAQF,SAASd,uBAAAA,CAAYC,KAAK,GAAGgB,4BAAAA,CAAaF,QAAQG,8BAAAA,CAAeH,IAAAA;AAAM,KAAA;AAClG;;"}
@@ -0,0 +1,83 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_react = require('@cratis/scene.react');
5
+
6
+ // Copyright (c) Cratis. All rights reserved.
7
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
+ // The package name, spelled out so describing components does not pull every adapter (and its UI dependencies) in
9
+ // with it; the bundle's validation checks each key against the manifest.
10
+ const key = (name)=>scene_react.componentRegistryKey('Cratis.Components', name);
11
+ /**
12
+ * The properties every query-bound data table shares: which query feeds it, and the few settings that shape how
13
+ * it shows the result.
14
+ *
15
+ * `query` is a `QueryReference`, so an editor binds it to a host-supplied query candidate and validates the
16
+ * arguments against it. What is stored is a `QueryBinding`; a plain query name - what screens carried before
17
+ * bindings existed - is still read, as a binding with no explicit connections. The columns are not properties:
18
+ * they are the `content` slot's children, edited as nodes.
19
+ */ const dataTableProperties = [
20
+ {
21
+ path: 'query',
22
+ label: 'Query',
23
+ group: 'Data',
24
+ valueType: scene_model.PropertyValueType.QueryReference,
25
+ editorKind: 'queryBinding',
26
+ description: 'The collection query that feeds the table.',
27
+ constraints: {
28
+ required: true,
29
+ resultShapes: [
30
+ scene_model.QueryResultShape.Collection
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ path: 'emptyMessage',
36
+ label: 'Empty message',
37
+ group: 'Content',
38
+ valueType: scene_model.PropertyValueType.String,
39
+ default: ''
40
+ },
41
+ {
42
+ path: 'dataKey',
43
+ label: 'Row identity',
44
+ group: 'Data',
45
+ valueType: scene_model.PropertyValueType.String,
46
+ editorKind: 'resultField',
47
+ description: 'The result field that identifies a row.'
48
+ },
49
+ {
50
+ path: 'globalFilterFields',
51
+ label: 'Searchable fields',
52
+ group: 'Data',
53
+ valueType: scene_model.PropertyValueType.Object,
54
+ editorKind: 'resultFieldList',
55
+ description: 'The result fields the table\'s search box looks in.'
56
+ }
57
+ ];
58
+ /**
59
+ * What can be edited on the `Cratis.Components` package's components.
60
+ *
61
+ * Only the query-bound tables are described so far; the form, dialog and editor composites carry
62
+ * Arc proxy classes by name and are configured through their own tooling. A package adds a descriptor here the
63
+ * same way it adds a component to the manifest.
64
+ */ const cratisComponentsDescriptors = [
65
+ {
66
+ component: key('dataTable'),
67
+ displayName: 'Data table',
68
+ properties: dataTableProperties
69
+ },
70
+ {
71
+ component: key('table'),
72
+ displayName: 'Table',
73
+ properties: dataTableProperties
74
+ },
75
+ {
76
+ component: key('observableDataTable'),
77
+ displayName: 'Live data table',
78
+ properties: dataTableProperties
79
+ }
80
+ ];
81
+
82
+ exports.cratisComponentsDescriptors = cratisComponentsDescriptors;
83
+ //# sourceMappingURL=cratisComponentsDescriptors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsDescriptors.js","sources":["../../cratisComponentsDescriptors.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ComponentDescriptor, PropertyDescriptor, PropertyValueType, QueryResultShape } from '@cratis/scene.model';\nimport { componentRegistryKey } from '@cratis/scene.react';\n\n// The package name, spelled out so describing components does not pull every adapter (and its UI dependencies) in\n// with it; the bundle's validation checks each key against the manifest.\nconst key = (name: string) => componentRegistryKey('Cratis.Components', name);\n\n/**\n * The properties every query-bound data table shares: which query feeds it, and the few settings that shape how\n * it shows the result.\n *\n * `query` is a `QueryReference`, so an editor binds it to a host-supplied query candidate and validates the\n * arguments against it. What is stored is a `QueryBinding`; a plain query name - what screens carried before\n * bindings existed - is still read, as a binding with no explicit connections. The columns are not properties:\n * they are the `content` slot's children, edited as nodes.\n */\nconst dataTableProperties: PropertyDescriptor[] = [\n {\n path: 'query', label: 'Query', group: 'Data', valueType: PropertyValueType.QueryReference, editorKind: 'queryBinding',\n description: 'The collection query that feeds the table.',\n constraints: { required: true, resultShapes: [QueryResultShape.Collection] },\n },\n { path: 'emptyMessage', label: 'Empty message', group: 'Content', valueType: PropertyValueType.String, default: '' },\n {\n path: 'dataKey', label: 'Row identity', group: 'Data', valueType: PropertyValueType.String, editorKind: 'resultField',\n description: 'The result field that identifies a row.',\n },\n {\n path: 'globalFilterFields', label: 'Searchable fields', group: 'Data', valueType: PropertyValueType.Object, editorKind: 'resultFieldList',\n description: 'The result fields the table\\'s search box looks in.',\n },\n];\n\n/**\n * What can be edited on the `Cratis.Components` package's components.\n *\n * Only the query-bound tables are described so far; the form, dialog and editor composites carry\n * Arc proxy classes by name and are configured through their own tooling. A package adds a descriptor here the\n * same way it adds a component to the manifest.\n */\nexport const cratisComponentsDescriptors: ComponentDescriptor[] = [\n { component: key('dataTable'), displayName: 'Data table', properties: dataTableProperties },\n { component: key('table'), displayName: 'Table', properties: dataTableProperties },\n { component: key('observableDataTable'), displayName: 'Live data table', properties: dataTableProperties },\n];\n"],"names":["key","name","componentRegistryKey","dataTableProperties","path","label","group","valueType","PropertyValueType","QueryReference","editorKind","description","constraints","required","resultShapes","QueryResultShape","Collection","String","default","Object","cratisComponentsDescriptors","component","displayName","properties"],"mappings":";;;;;AAAA;AACA;AAKA;AACA;AACA,MAAMA,GAAAA,GAAM,CAACC,IAAAA,GAAiBC,gCAAAA,CAAqB,mBAAA,EAAqBD,IAAAA,CAAAA;AAExE;;;;;;;;AAQC,IACD,MAAME,mBAAAA,GAA4C;AAC9C,IAAA;QACIC,IAAAA,EAAM,OAAA;QAASC,KAAAA,EAAO,OAAA;QAASC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,8BAAkBC,cAAc;QAAEC,UAAAA,EAAY,cAAA;QACvGC,WAAAA,EAAa,4CAAA;QACbC,WAAAA,EAAa;YAAEC,QAAAA,EAAU,IAAA;YAAMC,YAAAA,EAAc;AAACC,gBAAAA,4BAAAA,CAAiBC;AAAW;AAAC;AAC/E,KAAA;AACA,IAAA;QAAEZ,IAAAA,EAAM,cAAA;QAAgBC,KAAAA,EAAO,eAAA;QAAiBC,KAAAA,EAAO,SAAA;AAAWC,QAAAA,SAAAA,EAAWC,8BAAkBS,MAAM;QAAEC,OAAAA,EAAS;AAAG,KAAA;AACnH,IAAA;QACId,IAAAA,EAAM,SAAA;QAAWC,KAAAA,EAAO,cAAA;QAAgBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,8BAAkBS,MAAM;QAAEP,UAAAA,EAAY,aAAA;QACxGC,WAAAA,EAAa;AACjB,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,mBAAA;QAAqBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,8BAAkBW,MAAM;QAAET,UAAAA,EAAY,iBAAA;QACxHC,WAAAA,EAAa;AACjB;AACH,CAAA;AAED;;;;;;UAOaS,2BAAAA,GAAqD;AAC9D,IAAA;AAAEC,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,WAAA,CAAA;QAAcsB,WAAAA,EAAa,YAAA;QAAcC,UAAAA,EAAYpB;AAAoB,KAAA;AAC1F,IAAA;AAAEkB,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,OAAA,CAAA;QAAUsB,WAAAA,EAAa,OAAA;QAASC,UAAAA,EAAYpB;AAAoB,KAAA;AACjF,IAAA;AAAEkB,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,qBAAA,CAAA;QAAwBsB,WAAAA,EAAa,iBAAA;QAAmBC,UAAAA,EAAYpB;AAAoB;;;"}
@@ -2,6 +2,7 @@
2
2
 
3
3
  var scene_model = require('@cratis/scene.model');
4
4
  var cratisComponents = require('./cratisComponents.js');
5
+ var cratisComponentsDescriptors = require('./cratisComponentsDescriptors.js');
5
6
 
6
7
  // Copyright (c) Cratis. All rights reserved.
7
8
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -105,7 +106,8 @@ var cratisComponents = require('./cratisComponents.js');
105
106
  * declares none of them; `validatePackageBundle` is what proves the two halves agree.
106
107
  */ const cratisComponentsPackage = {
107
108
  manifest: cratisComponentsPackageManifest,
108
- components: cratisComponents.cratisComponents
109
+ components: cratisComponents.cratisComponents,
110
+ descriptors: cratisComponentsDescriptors.cratisComponentsDescriptors
109
111
  };
110
112
 
111
113
  exports.cratisComponentsPackage = cratisComponentsPackage;
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'queryInputForm',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,gBAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,6bAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY;AAChB;;;"}
1
+ {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\nimport { cratisComponentsDescriptors } from './cratisComponentsDescriptors';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'queryInputForm',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n descriptors: cratisComponentsDescriptors,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents","descriptors","cratisComponentsDescriptors"],"mappings":";;;;;;AAAA;AACA;AAOA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,gBAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,6bAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY,iCAAAA;IACZC,WAAAA,EAAaC;AACjB;;;"}
package/dist/cjs/index.js CHANGED
@@ -51,6 +51,7 @@ var SceneToolbarButton = require('./toolbar/SceneToolbarButton.js');
51
51
  var SceneToolbarGroup = require('./toolbar/SceneToolbarGroup.js');
52
52
  var SceneToolbarSeparator = require('./toolbar/SceneToolbarSeparator.js');
53
53
  var cratisComponents = require('./cratisComponents.js');
54
+ var cratisComponentsDescriptors = require('./cratisComponentsDescriptors.js');
54
55
  var cratisComponentsPackage = require('./cratisComponentsPackage.js');
55
56
 
56
57
 
@@ -126,6 +127,7 @@ exports.SceneToolbarGroup = SceneToolbarGroup.SceneToolbarGroup;
126
127
  exports.SceneToolbarSeparator = SceneToolbarSeparator.SceneToolbarSeparator;
127
128
  exports.cratisComponents = cratisComponents.cratisComponents;
128
129
  exports.cratisComponentsPackageName = cratisComponents.cratisComponentsPackageName;
130
+ exports.cratisComponentsDescriptors = cratisComponentsDescriptors.cratisComponentsDescriptors;
129
131
  exports.cratisComponentsPackage = cratisComponentsPackage.cratisComponentsPackage;
130
132
  exports.cratisComponentsPackageManifest = cratisComponentsPackage.cratisComponentsPackageManifest;
131
133
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveElementBinding.d.ts","sourceRoot":"","sources":["../../../bindings/resolveElementBinding.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqBlD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,WAAW,GAAG,cAAc,CAKnG"}
1
+ {"version":3,"file":"resolveElementBinding.d.ts","sourceRoot":"","sources":["../../../bindings/resolveElementBinding.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAqClD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,WAAW,GAAG,cAAc,CAKnG"}
@@ -12,6 +12,18 @@ import { resolveQuery, resolveCommand } from './bindingRegistry.js';
12
12
  [BindingKind.Query]: 'query',
13
13
  [BindingKind.Command]: 'command'
14
14
  };
15
+ /**
16
+ * Reads a binding name from a property that holds either the name itself or a `QueryBinding`, which is what an
17
+ * editor stores when a query is bound to a host-supplied candidate. Both resolve through the registry by name.
18
+ */ function bindingName(properties, property) {
19
+ const direct = stringProperty(properties, property);
20
+ if (direct !== undefined) return direct;
21
+ const binding = properties[property];
22
+ if (binding !== null && typeof binding === 'object' && !Array.isArray(binding)) {
23
+ return stringProperty(binding, 'query');
24
+ }
25
+ return undefined;
26
+ }
15
27
  /**
16
28
  * Reads the binding name an element carries for the given kind and looks it up in the binding registry.
17
29
  *
@@ -20,7 +32,7 @@ import { resolveQuery, resolveCommand } from './bindingRegistry.js';
20
32
  * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter
21
33
  * turns into a visible placeholder.
22
34
  */ function resolveElementBinding(element, kind) {
23
- const name = stringProperty(element.properties, bindingPropertyNames[kind]);
35
+ const name = bindingName(element.properties, bindingPropertyNames[kind]);
24
36
  if (name === undefined) return {};
25
37
  return {
26
38
  name,
@@ -1 +1 @@
1
- {"version":3,"file":"resolveElementBinding.js","sources":["../../../bindings/resolveElementBinding.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ExternalComponent } from '@cratis/scene.model';\nimport { stringProperty } from '../properties';\nimport { BindingKind } from './BindingKind';\nimport { ElementBinding } from './ElementBinding';\nimport { resolveCommand, resolveQuery } from './bindingRegistry';\n\n/**\n * The property an element carries its binding name in, per kind. Queries and commands use different\n * property names so a single element could in principle carry both - a command dialog launched from a\n * data page, say - without the two names colliding.\n */\nconst bindingPropertyNames: Record<BindingKind, string> = {\n [BindingKind.Query]: 'query',\n [BindingKind.Command]: 'command',\n};\n\n/**\n * Reads the binding name an element carries for the given kind and looks it up in the binding registry.\n *\n * Every Arc-bound adapter starts here, so the \"name in, class out\" step happens in exactly one place and\n * every adapter reports a missing binding the same way. Nothing throws: an absent property and an\n * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter\n * turns into a visible placeholder.\n */\nexport function resolveElementBinding(element: ExternalComponent, kind: BindingKind): ElementBinding {\n const name = stringProperty(element.properties, bindingPropertyNames[kind]);\n if (name === undefined) return {};\n\n return { name, target: kind === BindingKind.Query ? resolveQuery(name) : resolveCommand(name) };\n}\n"],"names":["bindingPropertyNames","BindingKind","Query","Command","resolveElementBinding","element","kind","name","stringProperty","properties","undefined","target","resolveQuery","resolveCommand"],"mappings":";;;;AAAA;AACA;AAQA;;;;AAIC,IACD,MAAMA,oBAAAA,GAAoD;IACtD,CAACC,WAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,WAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOC,cAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAET,oBAAoB,CAACM,IAAAA,CAAK,CAAA;IAC1E,IAAIC,IAAAA,KAASG,SAAAA,EAAW,OAAO,EAAC;IAEhC,OAAO;AAAEH,QAAAA,IAAAA;AAAMI,QAAAA,MAAAA,EAAQL,SAASL,WAAAA,CAAYC,KAAK,GAAGU,YAAAA,CAAaL,QAAQM,cAAAA,CAAeN,IAAAA;AAAM,KAAA;AAClG;;"}
1
+ {"version":3,"file":"resolveElementBinding.js","sources":["../../../bindings/resolveElementBinding.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ExternalComponent } from '@cratis/scene.model';\nimport { stringProperty } from '../properties';\nimport { BindingKind } from './BindingKind';\nimport { ElementBinding } from './ElementBinding';\nimport { resolveCommand, resolveQuery } from './bindingRegistry';\n\n/**\n * The property an element carries its binding name in, per kind. Queries and commands use different\n * property names so a single element could in principle carry both - a command dialog launched from a\n * data page, say - without the two names colliding.\n */\nconst bindingPropertyNames: Record<BindingKind, string> = {\n [BindingKind.Query]: 'query',\n [BindingKind.Command]: 'command',\n};\n\n/**\n * Reads a binding name from a property that holds either the name itself or a `QueryBinding`, which is what an\n * editor stores when a query is bound to a host-supplied candidate. Both resolve through the registry by name.\n */\nfunction bindingName(properties: Record<string, unknown>, property: string): string | undefined {\n const direct = stringProperty(properties, property);\n if (direct !== undefined) return direct;\n\n const binding = properties[property];\n if (binding !== null && typeof binding === 'object' && !Array.isArray(binding)) {\n return stringProperty(binding as Record<string, unknown>, 'query');\n }\n\n return undefined;\n}\n\n/**\n * Reads the binding name an element carries for the given kind and looks it up in the binding registry.\n *\n * Every Arc-bound adapter starts here, so the \"name in, class out\" step happens in exactly one place and\n * every adapter reports a missing binding the same way. Nothing throws: an absent property and an\n * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter\n * turns into a visible placeholder.\n */\nexport function resolveElementBinding(element: ExternalComponent, kind: BindingKind): ElementBinding {\n const name = bindingName(element.properties, bindingPropertyNames[kind]);\n if (name === undefined) return {};\n\n return { name, target: kind === BindingKind.Query ? resolveQuery(name) : resolveCommand(name) };\n}\n"],"names":["bindingPropertyNames","BindingKind","Query","Command","bindingName","properties","property","direct","stringProperty","undefined","binding","Array","isArray","resolveElementBinding","element","kind","name","target","resolveQuery","resolveCommand"],"mappings":";;;;AAAA;AACA;AAQA;;;;AAIC,IACD,MAAMA,oBAAAA,GAAoD;IACtD,CAACC,WAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,WAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;AAGC,IACD,SAASC,WAAAA,CAAYC,UAAmC,EAAEC,QAAgB,EAAA;IACtE,MAAMC,MAAAA,GAASC,eAAeH,UAAAA,EAAYC,QAAAA,CAAAA;IAC1C,IAAIC,MAAAA,KAAWE,WAAW,OAAOF,MAAAA;IAEjC,MAAMG,OAAAA,GAAUL,UAAU,CAACC,QAAAA,CAAS;IACpC,IAAII,OAAAA,KAAY,QAAQ,OAAOA,OAAAA,KAAY,YAAY,CAACC,KAAAA,CAAMC,OAAO,CAACF,OAAAA,CAAAA,EAAU;AAC5E,QAAA,OAAOF,eAAeE,OAAAA,EAAoC,OAAA,CAAA;AAC9D,IAAA;IAEA,OAAOD,SAAAA;AACX;AAEA;;;;;;;AAOC,IACM,SAASI,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOZ,WAAAA,CAAYU,OAAAA,CAAQT,UAAU,EAAEL,oBAAoB,CAACe,IAAAA,CAAK,CAAA;IACvE,IAAIC,IAAAA,KAASP,SAAAA,EAAW,OAAO,EAAC;IAEhC,OAAO;AAAEO,QAAAA,IAAAA;AAAMC,QAAAA,MAAAA,EAAQF,SAASd,WAAAA,CAAYC,KAAK,GAAGgB,YAAAA,CAAaF,QAAQG,cAAAA,CAAeH,IAAAA;AAAM,KAAA;AAClG;;"}
@@ -0,0 +1,3 @@
1
+ import { ComponentDescriptor } from '@cratis/scene.model';
2
+ export declare const cratisComponentsDescriptors: ComponentDescriptor[];
3
+ //# sourceMappingURL=cratisComponentsDescriptors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsDescriptors.d.ts","sourceRoot":"","sources":["../../cratisComponentsDescriptors.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAA2D,MAAM,qBAAqB,CAAC;AAwCnH,eAAO,MAAM,2BAA2B,EAAE,mBAAmB,EAI5D,CAAC"}
@@ -0,0 +1,81 @@
1
+ import { QueryResultShape, PropertyValueType } from '@cratis/scene.model';
2
+ import { componentRegistryKey } from '@cratis/scene.react';
3
+
4
+ // Copyright (c) Cratis. All rights reserved.
5
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
6
+ // The package name, spelled out so describing components does not pull every adapter (and its UI dependencies) in
7
+ // with it; the bundle's validation checks each key against the manifest.
8
+ const key = (name)=>componentRegistryKey('Cratis.Components', name);
9
+ /**
10
+ * The properties every query-bound data table shares: which query feeds it, and the few settings that shape how
11
+ * it shows the result.
12
+ *
13
+ * `query` is a `QueryReference`, so an editor binds it to a host-supplied query candidate and validates the
14
+ * arguments against it. What is stored is a `QueryBinding`; a plain query name - what screens carried before
15
+ * bindings existed - is still read, as a binding with no explicit connections. The columns are not properties:
16
+ * they are the `content` slot's children, edited as nodes.
17
+ */ const dataTableProperties = [
18
+ {
19
+ path: 'query',
20
+ label: 'Query',
21
+ group: 'Data',
22
+ valueType: PropertyValueType.QueryReference,
23
+ editorKind: 'queryBinding',
24
+ description: 'The collection query that feeds the table.',
25
+ constraints: {
26
+ required: true,
27
+ resultShapes: [
28
+ QueryResultShape.Collection
29
+ ]
30
+ }
31
+ },
32
+ {
33
+ path: 'emptyMessage',
34
+ label: 'Empty message',
35
+ group: 'Content',
36
+ valueType: PropertyValueType.String,
37
+ default: ''
38
+ },
39
+ {
40
+ path: 'dataKey',
41
+ label: 'Row identity',
42
+ group: 'Data',
43
+ valueType: PropertyValueType.String,
44
+ editorKind: 'resultField',
45
+ description: 'The result field that identifies a row.'
46
+ },
47
+ {
48
+ path: 'globalFilterFields',
49
+ label: 'Searchable fields',
50
+ group: 'Data',
51
+ valueType: PropertyValueType.Object,
52
+ editorKind: 'resultFieldList',
53
+ description: 'The result fields the table\'s search box looks in.'
54
+ }
55
+ ];
56
+ /**
57
+ * What can be edited on the `Cratis.Components` package's components.
58
+ *
59
+ * Only the query-bound tables are described so far; the form, dialog and editor composites carry
60
+ * Arc proxy classes by name and are configured through their own tooling. A package adds a descriptor here the
61
+ * same way it adds a component to the manifest.
62
+ */ const cratisComponentsDescriptors = [
63
+ {
64
+ component: key('dataTable'),
65
+ displayName: 'Data table',
66
+ properties: dataTableProperties
67
+ },
68
+ {
69
+ component: key('table'),
70
+ displayName: 'Table',
71
+ properties: dataTableProperties
72
+ },
73
+ {
74
+ component: key('observableDataTable'),
75
+ displayName: 'Live data table',
76
+ properties: dataTableProperties
77
+ }
78
+ ];
79
+
80
+ export { cratisComponentsDescriptors };
81
+ //# sourceMappingURL=cratisComponentsDescriptors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsDescriptors.js","sources":["../../cratisComponentsDescriptors.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ComponentDescriptor, PropertyDescriptor, PropertyValueType, QueryResultShape } from '@cratis/scene.model';\nimport { componentRegistryKey } from '@cratis/scene.react';\n\n// The package name, spelled out so describing components does not pull every adapter (and its UI dependencies) in\n// with it; the bundle's validation checks each key against the manifest.\nconst key = (name: string) => componentRegistryKey('Cratis.Components', name);\n\n/**\n * The properties every query-bound data table shares: which query feeds it, and the few settings that shape how\n * it shows the result.\n *\n * `query` is a `QueryReference`, so an editor binds it to a host-supplied query candidate and validates the\n * arguments against it. What is stored is a `QueryBinding`; a plain query name - what screens carried before\n * bindings existed - is still read, as a binding with no explicit connections. The columns are not properties:\n * they are the `content` slot's children, edited as nodes.\n */\nconst dataTableProperties: PropertyDescriptor[] = [\n {\n path: 'query', label: 'Query', group: 'Data', valueType: PropertyValueType.QueryReference, editorKind: 'queryBinding',\n description: 'The collection query that feeds the table.',\n constraints: { required: true, resultShapes: [QueryResultShape.Collection] },\n },\n { path: 'emptyMessage', label: 'Empty message', group: 'Content', valueType: PropertyValueType.String, default: '' },\n {\n path: 'dataKey', label: 'Row identity', group: 'Data', valueType: PropertyValueType.String, editorKind: 'resultField',\n description: 'The result field that identifies a row.',\n },\n {\n path: 'globalFilterFields', label: 'Searchable fields', group: 'Data', valueType: PropertyValueType.Object, editorKind: 'resultFieldList',\n description: 'The result fields the table\\'s search box looks in.',\n },\n];\n\n/**\n * What can be edited on the `Cratis.Components` package's components.\n *\n * Only the query-bound tables are described so far; the form, dialog and editor composites carry\n * Arc proxy classes by name and are configured through their own tooling. A package adds a descriptor here the\n * same way it adds a component to the manifest.\n */\nexport const cratisComponentsDescriptors: ComponentDescriptor[] = [\n { component: key('dataTable'), displayName: 'Data table', properties: dataTableProperties },\n { component: key('table'), displayName: 'Table', properties: dataTableProperties },\n { component: key('observableDataTable'), displayName: 'Live data table', properties: dataTableProperties },\n];\n"],"names":["key","name","componentRegistryKey","dataTableProperties","path","label","group","valueType","PropertyValueType","QueryReference","editorKind","description","constraints","required","resultShapes","QueryResultShape","Collection","String","default","Object","cratisComponentsDescriptors","component","displayName","properties"],"mappings":";;;AAAA;AACA;AAKA;AACA;AACA,MAAMA,GAAAA,GAAM,CAACC,IAAAA,GAAiBC,oBAAAA,CAAqB,mBAAA,EAAqBD,IAAAA,CAAAA;AAExE;;;;;;;;AAQC,IACD,MAAME,mBAAAA,GAA4C;AAC9C,IAAA;QACIC,IAAAA,EAAM,OAAA;QAASC,KAAAA,EAAO,OAAA;QAASC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBC,cAAc;QAAEC,UAAAA,EAAY,cAAA;QACvGC,WAAAA,EAAa,4CAAA;QACbC,WAAAA,EAAa;YAAEC,QAAAA,EAAU,IAAA;YAAMC,YAAAA,EAAc;AAACC,gBAAAA,gBAAAA,CAAiBC;AAAW;AAAC;AAC/E,KAAA;AACA,IAAA;QAAEZ,IAAAA,EAAM,cAAA;QAAgBC,KAAAA,EAAO,eAAA;QAAiBC,KAAAA,EAAO,SAAA;AAAWC,QAAAA,SAAAA,EAAWC,kBAAkBS,MAAM;QAAEC,OAAAA,EAAS;AAAG,KAAA;AACnH,IAAA;QACId,IAAAA,EAAM,SAAA;QAAWC,KAAAA,EAAO,cAAA;QAAgBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBS,MAAM;QAAEP,UAAAA,EAAY,aAAA;QACxGC,WAAAA,EAAa;AACjB,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,mBAAA;QAAqBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBW,MAAM;QAAET,UAAAA,EAAY,iBAAA;QACxHC,WAAAA,EAAa;AACjB;AACH,CAAA;AAED;;;;;;UAOaS,2BAAAA,GAAqD;AAC9D,IAAA;AAAEC,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,WAAA,CAAA;QAAcsB,WAAAA,EAAa,YAAA;QAAcC,UAAAA,EAAYpB;AAAoB,KAAA;AAC1F,IAAA;AAAEkB,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,OAAA,CAAA;QAAUsB,WAAAA,EAAa,OAAA;QAASC,UAAAA,EAAYpB;AAAoB,KAAA;AACjF,IAAA;AAAEkB,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,qBAAA,CAAA;QAAwBsB,WAAAA,EAAa,iBAAA;QAAmBC,UAAAA,EAAYpB;AAAoB;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAsBzD,eAAO,MAAM,+BAA+B,EAAE,YAsE7C,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,kBAGrC,CAAC"}
1
+ {"version":3,"file":"cratisComponentsPackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAuBzD,eAAO,MAAM,+BAA+B,EAAE,YAsE7C,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,kBAIrC,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { PackageKind } from '@cratis/scene.model';
2
2
  import { cratisComponents, cratisComponentsPackageName } from './cratisComponents.js';
3
+ import { cratisComponentsDescriptors } from './cratisComponentsDescriptors.js';
3
4
 
4
5
  // Copyright (c) Cratis. All rights reserved.
5
6
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -103,7 +104,8 @@ import { cratisComponents, cratisComponentsPackageName } from './cratisComponent
103
104
  * declares none of them; `validatePackageBundle` is what proves the two halves agree.
104
105
  */ const cratisComponentsPackage = {
105
106
  manifest: cratisComponentsPackageManifest,
106
- components: cratisComponents
107
+ components: cratisComponents,
108
+ descriptors: cratisComponentsDescriptors
107
109
  };
108
110
 
109
111
  export { cratisComponentsPackage, cratisComponentsPackageManifest };
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'queryInputForm',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,2BAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,gBAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,6bAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY;AAChB;;"}
1
+ {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\nimport { cratisComponentsDescriptors } from './cratisComponentsDescriptors';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'queryInputForm',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n descriptors: cratisComponentsDescriptors,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents","descriptors","cratisComponentsDescriptors"],"mappings":";;;;AAAA;AACA;AAOA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,2BAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,gBAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,6bAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY,gBAAAA;IACZC,WAAAA,EAAaC;AACjB;;"}
@@ -8,5 +8,6 @@ export * from './common';
8
8
  export * from './editors';
9
9
  export * from './toolbar';
10
10
  export * from './cratisComponents';
11
+ export * from './cratisComponentsDescriptors';
11
12
  export * from './cratisComponentsPackage';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC"}
package/dist/esm/index.js CHANGED
@@ -49,5 +49,6 @@ export { SceneToolbarButton } from './toolbar/SceneToolbarButton.js';
49
49
  export { SceneToolbarGroup } from './toolbar/SceneToolbarGroup.js';
50
50
  export { SceneToolbarSeparator } from './toolbar/SceneToolbarSeparator.js';
51
51
  export { cratisComponents, cratisComponentsPackageName } from './cratisComponents.js';
52
+ export { cratisComponentsDescriptors } from './cratisComponentsDescriptors.js';
52
53
  export { cratisComponentsPackage, cratisComponentsPackageManifest } from './cratisComponentsPackage.js';
53
54
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}