@cratis/scene.components 4.15.0 → 4.16.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 (49) hide show
  1. package/cratisComponentsPackage.ts +9 -125
  2. package/cratisComponentsPackageManifest.ts +106 -0
  3. package/cratisComponentsRuntimePackage.ts +22 -0
  4. package/designTime/cratisComponentsDesignTime.ts +22 -0
  5. package/dist/cjs/cratisComponentsPackage.js +10 -144
  6. package/dist/cjs/cratisComponentsPackage.js.map +1 -1
  7. package/dist/cjs/cratisComponentsPackageManifest.js +126 -0
  8. package/dist/cjs/cratisComponentsPackageManifest.js.map +1 -0
  9. package/dist/cjs/cratisComponentsRuntimePackage.js +24 -0
  10. package/dist/cjs/cratisComponentsRuntimePackage.js.map +1 -0
  11. package/dist/cjs/designTime/cratisComponentsDesignTime.js +24 -0
  12. package/dist/cjs/designTime/cratisComponentsDesignTime.js.map +1 -0
  13. package/dist/cjs/forms/generateCommandFieldsAction.js +10 -1
  14. package/dist/cjs/forms/generateCommandFieldsAction.js.map +1 -1
  15. package/dist/cjs/index.js +6 -1
  16. package/dist/cjs/index.js.map +1 -1
  17. package/dist/cjs/runtime.js +15 -0
  18. package/dist/cjs/runtime.js.map +1 -0
  19. package/dist/esm/cratisComponentsPackage.d.ts +1 -2
  20. package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
  21. package/dist/esm/cratisComponentsPackage.js +10 -144
  22. package/dist/esm/cratisComponentsPackage.js.map +1 -1
  23. package/dist/esm/cratisComponentsPackageManifest.d.ts +3 -0
  24. package/dist/esm/cratisComponentsPackageManifest.d.ts.map +1 -0
  25. package/dist/esm/cratisComponentsPackageManifest.js +124 -0
  26. package/dist/esm/cratisComponentsPackageManifest.js.map +1 -0
  27. package/dist/esm/cratisComponentsRuntimePackage.d.ts +3 -0
  28. package/dist/esm/cratisComponentsRuntimePackage.d.ts.map +1 -0
  29. package/dist/esm/cratisComponentsRuntimePackage.js +22 -0
  30. package/dist/esm/cratisComponentsRuntimePackage.js.map +1 -0
  31. package/dist/esm/designTime/cratisComponentsDesignTime.d.ts +3 -0
  32. package/dist/esm/designTime/cratisComponentsDesignTime.d.ts.map +1 -0
  33. package/dist/esm/designTime/cratisComponentsDesignTime.js +22 -0
  34. package/dist/esm/designTime/cratisComponentsDesignTime.js.map +1 -0
  35. package/dist/esm/forms/generateCommandFieldsAction.js +10 -1
  36. package/dist/esm/forms/generateCommandFieldsAction.js.map +1 -1
  37. package/dist/esm/index.d.ts +2 -0
  38. package/dist/esm/index.d.ts.map +1 -1
  39. package/dist/esm/index.js +4 -1
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/runtime.d.ts +5 -0
  42. package/dist/esm/runtime.d.ts.map +1 -0
  43. package/dist/esm/runtime.js +5 -0
  44. package/dist/esm/runtime.js.map +1 -0
  45. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  46. package/forms/generateCommandFieldsAction.ts +5 -1
  47. package/index.ts +2 -0
  48. package/package.json +12 -7
  49. package/runtime.ts +9 -0
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var cratisComponents = require('./cratisComponents.js');
4
+ var cratisComponentsDescriptors = require('./cratisComponentsDescriptors.js');
5
+ var cratisComponentsPackageManifest = require('./cratisComponentsPackageManifest.js');
6
+
7
+ // Copyright (c) Cratis. All rights reserved.
8
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
9
+ /**
10
+ * The `Cratis.Components` package without design-time contributions: the manifest, the components and their
11
+ * descriptors. The manifest still names the design-time extensions - that is data a host reads without
12
+ * loading them - but no designer, editor or action module is reachable from this bundle, which is what a
13
+ * runtime host imports from `@cratis/scene.components/runtime`.
14
+ *
15
+ * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that
16
+ * declares none of them; `validatePackageBundle` is what proves the two halves agree.
17
+ */ const cratisComponentsRuntimePackage = {
18
+ manifest: cratisComponentsPackageManifest.cratisComponentsPackageManifest,
19
+ components: cratisComponents.cratisComponents,
20
+ descriptors: cratisComponentsDescriptors.cratisComponentsDescriptors
21
+ };
22
+
23
+ exports.cratisComponentsRuntimePackage = cratisComponentsRuntimePackage;
24
+ //# sourceMappingURL=cratisComponentsRuntimePackage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsRuntimePackage.js","sources":["../../cratisComponentsRuntimePackage.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 { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents } from './cratisComponents';\nimport { cratisComponentsDescriptors } from './cratisComponentsDescriptors';\nimport { cratisComponentsPackageManifest } from './cratisComponentsPackageManifest';\n\n/**\n * The `Cratis.Components` package without design-time contributions: the manifest, the components and their\n * descriptors. The manifest still names the design-time extensions - that is data a host reads without\n * loading them - but no designer, editor or action module is reachable from this bundle, which is what a\n * runtime host imports from `@cratis/scene.components/runtime`.\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 cratisComponentsRuntimePackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n descriptors: cratisComponentsDescriptors,\n};\n"],"names":["cratisComponentsRuntimePackage","manifest","cratisComponentsPackageManifest","components","cratisComponents","descriptors","cratisComponentsDescriptors"],"mappings":";;;;;;AAAA;AACA;AAOA;;;;;;;;UASaA,8BAAAA,GAAqD;IAC9DC,QAAAA,EAAUC,+DAAAA;IACVC,UAAAA,EAAYC,iCAAAA;IACZC,WAAAA,EAAaC;AACjB;;"}
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ var CommandFieldPropertyEditor = require('../forms/CommandFieldPropertyEditor.js');
4
+ var CommandFormDesigner = require('../forms/CommandFormDesigner.js');
5
+ var CommandFormLayoutEditor = require('../forms/CommandFormLayoutEditor.js');
6
+ var generateCommandFieldsAction = require('../forms/generateCommandFieldsAction.js');
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ /** Every design-time contribution of `Cratis.Components`, under the names its manifest declares. */ const cratisComponentsDesignTime = {
11
+ designers: {
12
+ commandFormDesigner: CommandFormDesigner.CommandFormDesigner
13
+ },
14
+ propertyEditors: {
15
+ commandBinding: CommandFieldPropertyEditor.CommandFieldPropertyEditor,
16
+ commandFormLayout: CommandFormLayoutEditor.CommandFormLayoutEditor
17
+ },
18
+ actions: {
19
+ [generateCommandFieldsAction.generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction.generateCommandFieldsAction
20
+ }
21
+ };
22
+
23
+ exports.cratisComponentsDesignTime = cratisComponentsDesignTime;
24
+ //# sourceMappingURL=cratisComponentsDesignTime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsDesignTime.js","sources":["../../../designTime/cratisComponentsDesignTime.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 { DesignTimeBundle } from '@cratis/scene.react';\nimport { CommandFieldPropertyEditor } from '../forms/CommandFieldPropertyEditor';\nimport { CommandFormDesigner } from '../forms/CommandFormDesigner';\nimport { CommandFormLayoutEditor } from '../forms/CommandFormLayoutEditor';\nimport { generateCommandFieldsAction } from '../forms/generateCommandFieldsAction';\n\n/** Every design-time contribution of `Cratis.Components`, under the names its manifest declares. */\nexport const cratisComponentsDesignTime: DesignTimeBundle = {\n designers: {\n commandFormDesigner: CommandFormDesigner,\n },\n propertyEditors: {\n commandBinding: CommandFieldPropertyEditor,\n commandFormLayout: CommandFormLayoutEditor,\n },\n actions: {\n [generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction,\n },\n};\n"],"names":["cratisComponentsDesignTime","designers","commandFormDesigner","CommandFormDesigner","propertyEditors","commandBinding","CommandFieldPropertyEditor","commandFormLayout","CommandFormLayoutEditor","actions","generateCommandFieldsAction","descriptor","id"],"mappings":";;;;;;;AAAA;AACA;AAQA,qGACO,MAAMA,0BAAAA,GAA+C;IACxDC,SAAAA,EAAW;QACPC,mBAAAA,EAAqBC;AACzB,KAAA;IACAC,eAAAA,EAAiB;QACbC,cAAAA,EAAgBC,qDAAAA;QAChBC,iBAAAA,EAAmBC;AACvB,KAAA;IACAC,OAAAA,EAAS;AACL,QAAA,CAACC,uDAAAA,CAA4BC,UAAU,CAACC,EAAE,GAAGF;AACjD;AACJ;;"}
@@ -13,7 +13,7 @@ const generateCommandFieldsAction = {
13
13
  description: 'Creates a deterministic editable field layout from the selected command metadata.'
14
14
  },
15
15
  isVisible: (context)=>context.element.componentName.endsWith(':commandForm'),
16
- isEnabled: (context)=>Array.isArray(context.commandMetadata?.properties) && !Array.isArray(context.element.properties.inputs),
16
+ isEnabled: (context)=>Array.isArray(context.commandMetadata?.properties) && context.element.properties.inputs === undefined,
17
17
  execute: (context)=>generateCommandFields(context)
18
18
  };
19
19
  function generateCommandFields(context) {
@@ -24,6 +24,7 @@ function generateCommandFields(context) {
24
24
  'No command metadata was supplied.'
25
25
  ]
26
26
  };
27
+ // Authored fields, or a binding that supplies them, are never overwritten.
27
28
  if (Array.isArray(context.element.properties.inputs)) {
28
29
  return {
29
30
  edits: [],
@@ -32,6 +33,14 @@ function generateCommandFields(context) {
32
33
  ]
33
34
  };
34
35
  }
36
+ if (context.element.properties.inputs !== undefined) {
37
+ return {
38
+ edits: [],
39
+ diagnostics: [
40
+ 'The form\'s fields come from a binding; Generate fields will not overwrite it.'
41
+ ]
42
+ };
43
+ }
35
44
  return {
36
45
  diagnostics: [],
37
46
  edits: [
@@ -1 +1 @@
1
- {"version":3,"file":"generateCommandFieldsAction.js","sources":["../../../forms/generateCommandFieldsAction.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 { DesignTimeAction, DesignTimeActionContext, DesignTimeActionResult } from '@cratis/scene.react';\nimport { DesignTimeActionPlacement, SceneEditKind } from '@cratis/scene.model';\n\nexport const generateCommandFieldsAction: DesignTimeAction = {\n descriptor: {\n id: 'Cratis.Components.commandForm.generateFields',\n label: 'Generate fields',\n placement: DesignTimeActionPlacement.Toolbar,\n availability: 'commandForm.canGenerateFields',\n description: 'Creates a deterministic editable field layout from the selected command metadata.',\n },\n isVisible: context => context.element.componentName.endsWith(':commandForm'),\n isEnabled: context => Array.isArray(context.commandMetadata?.properties) && !Array.isArray(context.element.properties.inputs),\n execute: context => generateCommandFields(context),\n};\n\nfunction generateCommandFields(context: DesignTimeActionContext): DesignTimeActionResult {\n const properties = context.commandMetadata?.properties ?? [];\n if (!properties.length) return { edits: [], diagnostics: ['No command metadata was supplied.'] };\n if (Array.isArray(context.element.properties.inputs)) {\n return { edits: [], diagnostics: ['The form already has authored fields; Generate fields will not overwrite them.'] };\n }\n\n return {\n diagnostics: [],\n edits: [{\n kind: SceneEditKind.SetProperty,\n nodeId: context.element.id,\n path: 'inputs',\n value: properties.map((property, index) => ({\n property: property.name,\n type: property.type === 'Guid' || property.type === 'guid' ? 'guid' : 'string',\n label: property.label ?? humanize(property.name),\n column: (index % 2) + 1,\n width: '1fr',\n })),\n }],\n };\n}\n\nfunction humanize(name: string): string {\n return name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/^./, value => value.toUpperCase());\n}\n"],"names":["generateCommandFieldsAction","descriptor","id","label","placement","DesignTimeActionPlacement","Toolbar","availability","description","isVisible","context","element","componentName","endsWith","isEnabled","Array","isArray","commandMetadata","properties","inputs","execute","generateCommandFields","length","edits","diagnostics","kind","SceneEditKind","SetProperty","nodeId","path","value","map","property","index","name","type","humanize","column","width","replace","toUpperCase"],"mappings":";;;;AAAA;AACA;MAKaA,2BAAAA,GAAgD;IACzDC,UAAAA,EAAY;QACRC,EAAAA,EAAI,8CAAA;QACJC,KAAAA,EAAO,iBAAA;AACPC,QAAAA,SAAAA,EAAWC,sCAA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I;wBACvBC,IAAAA,EAAMH,QAAAA,CAASG,IAAI,KAAK,MAAA,IAAUH,SAASG,IAAI,KAAK,SAAS,MAAA,GAAS,QAAA;AACtEhC,wBAAAA,KAAAA,EAAO6B,QAAAA,CAAS7B,KAAK,IAAIiC,QAAAA,CAASJ,SAASE,IAAI,CAAA;wBAC/CG,MAAAA,EAASJ,QAAQ,CAAA,GAAK,CAAA;wBACtBK,KAAAA,EAAO;qBACX,CAAA;AACJ;AAAE;AACN,KAAA;AACJ;AAEA,SAASF,SAASF,IAAY,EAAA;IAC1B,OAAOA,IAAAA,CAAKK,OAAO,CAAC,oBAAA,EAAsB,OAAA,CAAA,CAASA,OAAO,CAAC,IAAA,EAAMT,CAAAA,KAAAA,GAASA,KAAAA,CAAMU,WAAW,EAAA,CAAA;AAC/F;;"}
1
+ {"version":3,"file":"generateCommandFieldsAction.js","sources":["../../../forms/generateCommandFieldsAction.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 { DesignTimeAction, DesignTimeActionContext, DesignTimeActionResult } from '@cratis/scene.react';\nimport { DesignTimeActionPlacement, SceneEditKind } from '@cratis/scene.model';\n\nexport const generateCommandFieldsAction: DesignTimeAction = {\n descriptor: {\n id: 'Cratis.Components.commandForm.generateFields',\n label: 'Generate fields',\n placement: DesignTimeActionPlacement.Toolbar,\n availability: 'commandForm.canGenerateFields',\n description: 'Creates a deterministic editable field layout from the selected command metadata.',\n },\n isVisible: context => context.element.componentName.endsWith(':commandForm'),\n isEnabled: context => Array.isArray(context.commandMetadata?.properties) && context.element.properties.inputs === undefined,\n execute: context => generateCommandFields(context),\n};\n\nfunction generateCommandFields(context: DesignTimeActionContext): DesignTimeActionResult {\n const properties = context.commandMetadata?.properties ?? [];\n if (!properties.length) return { edits: [], diagnostics: ['No command metadata was supplied.'] };\n // Authored fields, or a binding that supplies them, are never overwritten.\n if (Array.isArray(context.element.properties.inputs)) {\n return { edits: [], diagnostics: ['The form already has authored fields; Generate fields will not overwrite them.'] };\n }\n if (context.element.properties.inputs !== undefined) {\n return { edits: [], diagnostics: ['The form\\'s fields come from a binding; Generate fields will not overwrite it.'] };\n }\n\n return {\n diagnostics: [],\n edits: [{\n kind: SceneEditKind.SetProperty,\n nodeId: context.element.id,\n path: 'inputs',\n value: properties.map((property, index) => ({\n property: property.name,\n type: property.type === 'Guid' || property.type === 'guid' ? 'guid' : 'string',\n label: property.label ?? humanize(property.name),\n column: (index % 2) + 1,\n width: '1fr',\n })),\n }],\n };\n}\n\nfunction humanize(name: string): string {\n return name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/^./, value => value.toUpperCase());\n}\n"],"names":["generateCommandFieldsAction","descriptor","id","label","placement","DesignTimeActionPlacement","Toolbar","availability","description","isVisible","context","element","componentName","endsWith","isEnabled","Array","isArray","commandMetadata","properties","inputs","undefined","execute","generateCommandFields","length","edits","diagnostics","kind","SceneEditKind","SetProperty","nodeId","path","value","map","property","index","name","type","humanize","column","width","replace","toUpperCase"],"mappings":";;;;AAAA;AACA;MAKaA,2BAAAA,GAAgD;IACzDC,UAAAA,EAAY;QACRC,EAAAA,EAAI,8CAAA;QACJC,KAAAA,EAAO,iBAAA;AACPC,QAAAA,SAAAA,EAAWC,sCAA0BC,OAAO;QAC5CC,YAAAA,EAAc,+BAAA;QACdC,WAAAA,EAAa;AACjB,KAAA;IACAC,SAAAA,EAAWC,CAAAA,UAAWA,OAAAA,CAAQC,OAAO,CAACC,aAAa,CAACC,QAAQ,CAAC,cAAA,CAAA;AAC7DC,IAAAA,SAAAA,EAAWJ,CAAAA,OAAAA,GAAWK,KAAAA,CAAMC,OAAO,CAACN,OAAAA,CAAQO,eAAe,EAAEC,UAAAA,CAAAA,IAAeR,QAAQC,OAAO,CAACO,UAAU,CAACC,MAAM,KAAKC,SAAAA;IAClHC,OAAAA,EAASX,CAAAA,UAAWY,qBAAAA,CAAsBZ,OAAAA;AAC9C;AAEA,SAASY,s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BACX,CAAA;AACJ;AAAE;AACN,KAAA;AACJ;AAEA,SAASF,SAASF,IAAY,EAAA;IAC1B,OAAOA,IAAAA,CAAKK,OAAO,CAAC,oBAAA,EAAsB,OAAA,CAAA,CAASA,OAAO,CAAC,IAAA,EAAMT,CAAAA,KAAAA,GAASA,KAAAA,CAAMU,WAAW,EAAA,CAAA;AAC/F;;"}
package/dist/cjs/index.js CHANGED
@@ -53,6 +53,9 @@ var SceneToolbarSeparator = require('./toolbar/SceneToolbarSeparator.js');
53
53
  var cratisComponents = require('./cratisComponents.js');
54
54
  var cratisComponentsDescriptors = require('./cratisComponentsDescriptors.js');
55
55
  var cratisComponentsPackage = require('./cratisComponentsPackage.js');
56
+ var cratisComponentsRuntimePackage = require('./cratisComponentsRuntimePackage.js');
57
+ var cratisComponentsDesignTime = require('./designTime/cratisComponentsDesignTime.js');
58
+ var cratisComponentsPackageManifest = require('./cratisComponentsPackageManifest.js');
56
59
 
57
60
 
58
61
 
@@ -129,5 +132,7 @@ exports.cratisComponents = cratisComponents.cratisComponents;
129
132
  exports.cratisComponentsPackageName = cratisComponents.cratisComponentsPackageName;
130
133
  exports.cratisComponentsDescriptors = cratisComponentsDescriptors.cratisComponentsDescriptors;
131
134
  exports.cratisComponentsPackage = cratisComponentsPackage.cratisComponentsPackage;
132
- exports.cratisComponentsPackageManifest = cratisComponentsPackage.cratisComponentsPackageManifest;
135
+ exports.cratisComponentsRuntimePackage = cratisComponentsRuntimePackage.cratisComponentsRuntimePackage;
136
+ exports.cratisComponentsDesignTime = cratisComponentsDesignTime.cratisComponentsDesignTime;
137
+ exports.cratisComponentsPackageManifest = cratisComponentsPackageManifest.cratisComponentsPackageManifest;
133
138
  //# 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var cratisComponents = require('./cratisComponents.js');
4
+ var cratisComponentsDescriptors = require('./cratisComponentsDescriptors.js');
5
+ var cratisComponentsPackageManifest = require('./cratisComponentsPackageManifest.js');
6
+ var cratisComponentsRuntimePackage = require('./cratisComponentsRuntimePackage.js');
7
+
8
+
9
+
10
+ exports.cratisComponents = cratisComponents.cratisComponents;
11
+ exports.cratisComponentsPackageName = cratisComponents.cratisComponentsPackageName;
12
+ exports.cratisComponentsDescriptors = cratisComponentsDescriptors.cratisComponentsDescriptors;
13
+ exports.cratisComponentsPackageManifest = cratisComponentsPackageManifest.cratisComponentsPackageManifest;
14
+ exports.cratisComponentsRuntimePackage = cratisComponentsRuntimePackage.cratisComponentsRuntimePackage;
15
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1,5 +1,4 @@
1
- import { ScenePackage } from '@cratis/scene.model';
2
1
  import { ScenePackageBundle } from '@cratis/scene.react';
3
- export declare const cratisComponentsPackageManifest: ScenePackage;
2
+ export { cratisComponentsPackageManifest } from './cratisComponentsPackageManifest';
4
3
  export declare const cratisComponentsPackage: ScenePackageBundle;
5
4
  //# sourceMappingURL=cratisComponentsPackage.d.ts.map
@@ -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;AA2BzD,eAAO,MAAM,+BAA+B,EAAE,YA+E7C,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,kBAgBrC,CAAC"}
1
+ {"version":3,"file":"cratisComponentsPackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAIzD,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AASpF,eAAO,MAAM,uBAAuB,EAAE,kBAGrC,CAAC"}
@@ -1,153 +1,19 @@
1
- import { PackageKind } from '@cratis/scene.model';
2
- import { cratisComponents, cratisComponentsPackageName } from './cratisComponents.js';
3
- import { cratisComponentsDescriptors } from './cratisComponentsDescriptors.js';
4
- import { CommandFieldPropertyEditor } from './forms/CommandFieldPropertyEditor.js';
5
- import { CommandFormDesigner } from './forms/CommandFormDesigner.js';
6
- import { CommandFormLayoutEditor } from './forms/CommandFormLayoutEditor.js';
7
- import { generateCommandFieldsAction } from './forms/generateCommandFieldsAction.js';
1
+ import { cratisComponentsDesignTime } from './designTime/cratisComponentsDesignTime.js';
2
+ import { cratisComponentsRuntimePackage } from './cratisComponentsRuntimePackage.js';
3
+ export { cratisComponentsPackageManifest } from './cratisComponentsPackageManifest.js';
8
4
 
9
5
  // Copyright (c) Cratis. All rights reserved.
10
6
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
11
7
  /**
12
- * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.
8
+ * The `Cratis.Components` package as a loadable bundle - the manifest, the React components behind the names
9
+ * it declares, and the design-time contributions a designer loads.
13
10
  *
14
- * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is
15
- * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own
16
- * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and
17
- * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact
18
- * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as
19
- * dependencies so a package picker can say so while the profile is being configured, instead of leaving
20
- * it to be discovered when the page opens.
21
- *
22
- * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0
23
- * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the
24
- * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`
25
- * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window
26
- * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of
27
- * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is
28
- * compiled against Tailwind 4.
29
- */ const cratisComponentsPackageManifest = {
30
- name: cratisComponentsPackageName,
31
- version: '3.0.0',
32
- kind: PackageKind.ComponentLibrary,
33
- dependencies: [
34
- {
35
- name: 'PrimeReact',
36
- versionRange: '>=11.0.0'
37
- },
38
- {
39
- name: 'Tailwind',
40
- versionRange: '^4.0.0'
41
- }
42
- ],
43
- components: [
44
- 'page',
45
- 'dataPage',
46
- 'formElement',
47
- 'singleResult',
48
- 'queryInputForm',
49
- 'dataTable',
50
- 'table',
51
- 'observableDataTable',
52
- 'commandForm',
53
- 'inputTextField',
54
- 'numberField',
55
- 'checkboxField',
56
- 'textAreaField',
57
- 'dropdownField',
58
- 'sliderField',
59
- 'calendarField',
60
- 'colorPickerField',
61
- 'multiSelectField',
62
- 'chipsField',
63
- 'radioButtonField',
64
- 'radioGroupField',
65
- 'dialog',
66
- 'confirmationDialog',
67
- 'busyIndicatorDialog',
68
- 'commandDialog',
69
- 'stepperCommandDialog',
70
- 'icon',
71
- 'tooltip',
72
- 'dropdown',
73
- 'errorBoundary',
74
- 'objectContentEditor',
75
- 'objectNavigationalBar',
76
- 'schemaEditor',
77
- 'timeMachine',
78
- 'filterPanel',
79
- 'toolbar',
80
- 'toolbarButton',
81
- 'toolbarGroup',
82
- 'toolbarSeparator'
83
- ],
84
- // A component library ships components, and nothing else. Layouts, screen templates and dialog
85
- // templates all belong to a Blueprint: they are decisions about what an application looks like as a
86
- // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a
87
- // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,
88
- // rather than shipping one opinionated data page nobody can rearrange.
89
- layouts: [],
90
- screenTemplates: [],
91
- dialogTemplates: [],
92
- // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads
93
- // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a
94
- // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.
95
- // Shipping a theme here would be this library asserting a look it was specifically built not to have.
96
- themes: [],
97
- displayName: 'Cratis Components',
98
- 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.",
99
- module: '@cratis/scene.components',
100
- license: 'MIT',
101
- licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
102
- designTime: {
103
- previews: [],
104
- designers: [
105
- 'commandFormDesigner'
106
- ],
107
- propertyEditors: [
108
- 'commandBinding',
109
- 'commandFields',
110
- 'fieldWidths',
111
- 'commandFormLayout'
112
- ],
113
- propertyDisplays: [],
114
- actions: [
115
- 'Cratis.Components.commandForm.generateFields'
116
- ]
117
- },
118
- assets: [
119
- '@cratis/components/styles',
120
- '@cratis/components/tokens'
121
- ],
122
- runtimeSingletons: [
123
- 'react',
124
- '@cratis/arc',
125
- '@cratis/components'
126
- ]
127
- };
128
- /**
129
- * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components
130
- * behind the names it declares.
131
- *
132
- * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that
133
- * declares none of them; `validatePackageBundle` is what proves the two halves agree.
11
+ * A runtime host that must not load design-time code imports `cratisComponentsRuntimePackage` from
12
+ * `@cratis/scene.components/runtime` instead; that entry reaches no designer, editor or action.
134
13
  */ const cratisComponentsPackage = {
135
- manifest: cratisComponentsPackageManifest,
136
- components: cratisComponents,
137
- descriptors: cratisComponentsDescriptors,
138
- designTime: {
139
- designers: {
140
- commandFormDesigner: CommandFormDesigner
141
- },
142
- propertyEditors: {
143
- commandBinding: CommandFieldPropertyEditor,
144
- commandFormLayout: CommandFormLayoutEditor
145
- },
146
- actions: {
147
- [generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction
148
- }
149
- }
14
+ ...cratisComponentsRuntimePackage,
15
+ designTime: cratisComponentsDesignTime
150
16
  };
151
17
 
152
- export { cratisComponentsPackage, cratisComponentsPackageManifest };
18
+ export { cratisComponentsPackage };
153
19
  //# sourceMappingURL=cratisComponentsPackage.js.map
@@ -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';\nimport { cratisComponentsDescriptors } from './cratisComponentsDescriptors';\nimport { CommandFieldPropertyEditor } from './forms/CommandFieldPropertyEditor';\nimport { CommandFormDesigner } from './forms/CommandFormDesigner';\nimport { CommandFormLayoutEditor } from './forms/CommandFormLayoutEditor';\nimport { generateCommandFieldsAction } from './forms/generateCommandFieldsAction';\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 designTime: {\n previews: [],\n designers: ['commandFormDesigner'],\n propertyEditors: ['commandBinding', 'commandFields', 'fieldWidths', 'commandFormLayout'],\n propertyDisplays: [],\n actions: ['Cratis.Components.commandForm.generateFields'],\n },\n assets: ['@cratis/components/styles', '@cratis/components/tokens'],\n runtimeSingletons: ['react', '@cratis/arc', '@cratis/components'],\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 designTime: {\n designers: {\n commandFormDesigner: CommandFormDesigner,\n },\n propertyEditors: {\n commandBinding: CommandFieldPropertyEditor,\n commandFormLayout: CommandFormLayoutEditor,\n },\n actions: {\n [generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction,\n },\n },\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","designTime","previews","designers","propertyEditors","propertyDisplays","actions","assets","runtimeSingletons","cratisComponentsPackage","manifest","cratisComponents","descriptors","cratisComponentsDescriptors","commandFormDesigner","CommandFormDesigner","commandBinding","CommandFieldPropertyEditor","commandFormLayout","CommandFormLayoutEditor","generateCommandFieldsAction","descriptor","id"],"mappings":";;;;;;;;AAAA;AACA;AAWA;;;;;;;;;;;;;;;;;;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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":["// 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 { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponentsDesignTime } from './designTime/cratisComponentsDesignTime';\nimport { cratisComponentsRuntimePackage } from './cratisComponentsRuntimePackage';\n\nexport { cratisComponentsPackageManifest } from './cratisComponentsPackageManifest';\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest, the React components behind the names\n * it declares, and the design-time contributions a designer loads.\n *\n * A runtime host that must not load design-time code imports `cratisComponentsRuntimePackage` from\n * `@cratis/scene.components/runtime` instead; that entry reaches no designer, editor or action.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n ...cratisComponentsRuntimePackage,\n designTime: cratisComponentsDesignTime,\n};\n"],"names":["cratisComponentsPackage","cratisComponentsRuntimePackage","designTime","cratisComponentsDesignTime"],"mappings":";;;;AAAA;AACA;AAQA;;;;;;UAOaA,uBAAAA,GAA8C;AACvD,IAAA,GAAGC,8BAA8B;IACjCC,UAAAA,EAAYC;AAChB;;"}
@@ -0,0 +1,3 @@
1
+ import { ScenePackage } from '@cratis/scene.model';
2
+ export declare const cratisComponentsPackageManifest: ScenePackage;
3
+ //# sourceMappingURL=cratisComponentsPackageManifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsPackageManifest.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackageManifest.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAsBhE,eAAO,MAAM,+BAA+B,EAAE,YAgF7C,CAAC"}
@@ -0,0 +1,124 @@
1
+ import { PackageKind } from '@cratis/scene.model';
2
+ import { cratisComponentsPackageName } from './cratisComponents.js';
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
+ /**
7
+ * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.
8
+ *
9
+ * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is
10
+ * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own
11
+ * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and
12
+ * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact
13
+ * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as
14
+ * dependencies so a package picker can say so while the profile is being configured, instead of leaving
15
+ * it to be discovered when the page opens.
16
+ *
17
+ * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0
18
+ * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the
19
+ * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`
20
+ * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window
21
+ * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of
22
+ * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is
23
+ * compiled against Tailwind 4.
24
+ */ const cratisComponentsPackageManifest = {
25
+ name: cratisComponentsPackageName,
26
+ version: '3.0.0',
27
+ kind: PackageKind.ComponentLibrary,
28
+ dependencies: [
29
+ {
30
+ name: 'PrimeReact',
31
+ versionRange: '>=11.0.0'
32
+ },
33
+ {
34
+ name: 'Tailwind',
35
+ versionRange: '^4.0.0'
36
+ }
37
+ ],
38
+ components: [
39
+ 'page',
40
+ 'dataPage',
41
+ 'formElement',
42
+ 'singleResult',
43
+ 'queryInputForm',
44
+ 'dataTable',
45
+ 'table',
46
+ 'observableDataTable',
47
+ 'commandForm',
48
+ 'inputTextField',
49
+ 'numberField',
50
+ 'checkboxField',
51
+ 'textAreaField',
52
+ 'dropdownField',
53
+ 'sliderField',
54
+ 'calendarField',
55
+ 'colorPickerField',
56
+ 'multiSelectField',
57
+ 'chipsField',
58
+ 'radioButtonField',
59
+ 'radioGroupField',
60
+ 'dialog',
61
+ 'confirmationDialog',
62
+ 'busyIndicatorDialog',
63
+ 'commandDialog',
64
+ 'stepperCommandDialog',
65
+ 'icon',
66
+ 'tooltip',
67
+ 'dropdown',
68
+ 'errorBoundary',
69
+ 'objectContentEditor',
70
+ 'objectNavigationalBar',
71
+ 'schemaEditor',
72
+ 'timeMachine',
73
+ 'filterPanel',
74
+ 'toolbar',
75
+ 'toolbarButton',
76
+ 'toolbarGroup',
77
+ 'toolbarSeparator'
78
+ ],
79
+ // A component library ships components, and nothing else. Layouts, screen templates and dialog
80
+ // templates all belong to a Blueprint: they are decisions about what an application looks like as a
81
+ // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a
82
+ // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,
83
+ // rather than shipping one opinionated data page nobody can rearrange.
84
+ layouts: [],
85
+ screenTemplates: [],
86
+ dialogTemplates: [],
87
+ // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads
88
+ // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a
89
+ // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.
90
+ // Shipping a theme here would be this library asserting a look it was specifically built not to have.
91
+ themes: [],
92
+ displayName: 'Cratis Components',
93
+ 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.",
94
+ module: '@cratis/scene.components',
95
+ license: 'MIT',
96
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
97
+ designTime: {
98
+ previews: [],
99
+ designers: [
100
+ 'commandFormDesigner'
101
+ ],
102
+ // `commandFields` and `fieldWidths` are host editor kinds (Studio implements them); the package does not ship them.
103
+ propertyEditors: [
104
+ 'commandBinding',
105
+ 'commandFormLayout'
106
+ ],
107
+ propertyDisplays: [],
108
+ actions: [
109
+ 'Cratis.Components.commandForm.generateFields'
110
+ ]
111
+ },
112
+ assets: [
113
+ '@cratis/components/styles',
114
+ '@cratis/components/tokens'
115
+ ],
116
+ runtimeSingletons: [
117
+ 'react',
118
+ '@cratis/arc',
119
+ '@cratis/components'
120
+ ]
121
+ };
122
+
123
+ export { cratisComponentsPackageManifest };
124
+ //# sourceMappingURL=cratisComponentsPackageManifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsPackageManifest.js","sources":["../../cratisComponentsPackageManifest.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 { 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 designTime: {\n previews: [],\n designers: ['commandFormDesigner'],\n // `commandFields` and `fieldWidths` are host editor kinds (Studio implements them); the package does not ship them.\n propertyEditors: ['commandBinding', 'commandFormLayout'],\n propertyDisplays: [],\n actions: ['Cratis.Components.commandForm.generateFields'],\n },\n assets: ['@cratis/components/styles', '@cratis/components/tokens'],\n runtimeSingletons: ['react', '@cratis/arc', '@cratis/components'],\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","designTime","previews","designers","propertyEditors","propertyDisplays","actions","assets","runtimeSingletons"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;;;;;;;;;;;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,mDAAA;IACZC,UAAAA,EAAY;AACRC,QAAAA,QAAAA,EAAU,EAAE;QACZC,SAAAA,EAAW;AAAC,YAAA;AAAsB,SAAA;;QAElCC,eAAAA,EAAiB;AAAC,YAAA,gBAAA;AAAkB,YAAA;AAAoB,SAAA;AACxDC,QAAAA,gBAAAA,EAAkB,EAAE;QACpBC,OAAAA,EAAS;AAAC,YAAA;AAA+C;AAC7D,KAAA;IACAC,MAAAA,EAAQ;AAAC,QAAA,2BAAA;AAA6B,QAAA;AAA4B,KAAA;IAClEC,iBAAAA,EAAmB;AAAC,QAAA,OAAA;AAAS,QAAA,aAAA;AAAe,QAAA;AAAqB;AACrE;;"}
@@ -0,0 +1,3 @@
1
+ import { ScenePackageBundle } from '@cratis/scene.react';
2
+ export declare const cratisComponentsRuntimePackage: ScenePackageBundle;
3
+ //# sourceMappingURL=cratisComponentsRuntimePackage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsRuntimePackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsRuntimePackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAczD,eAAO,MAAM,8BAA8B,EAAE,kBAI5C,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { cratisComponents } from './cratisComponents.js';
2
+ import { cratisComponentsDescriptors } from './cratisComponentsDescriptors.js';
3
+ import { cratisComponentsPackageManifest } from './cratisComponentsPackageManifest.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The `Cratis.Components` package without design-time contributions: the manifest, the components and their
9
+ * descriptors. The manifest still names the design-time extensions - that is data a host reads without
10
+ * loading them - but no designer, editor or action module is reachable from this bundle, which is what a
11
+ * runtime host imports from `@cratis/scene.components/runtime`.
12
+ *
13
+ * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that
14
+ * declares none of them; `validatePackageBundle` is what proves the two halves agree.
15
+ */ const cratisComponentsRuntimePackage = {
16
+ manifest: cratisComponentsPackageManifest,
17
+ components: cratisComponents,
18
+ descriptors: cratisComponentsDescriptors
19
+ };
20
+
21
+ export { cratisComponentsRuntimePackage };
22
+ //# sourceMappingURL=cratisComponentsRuntimePackage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsRuntimePackage.js","sources":["../../cratisComponentsRuntimePackage.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 { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents } from './cratisComponents';\nimport { cratisComponentsDescriptors } from './cratisComponentsDescriptors';\nimport { cratisComponentsPackageManifest } from './cratisComponentsPackageManifest';\n\n/**\n * The `Cratis.Components` package without design-time contributions: the manifest, the components and their\n * descriptors. The manifest still names the design-time extensions - that is data a host reads without\n * loading them - but no designer, editor or action module is reachable from this bundle, which is what a\n * runtime host imports from `@cratis/scene.components/runtime`.\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 cratisComponentsRuntimePackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n descriptors: cratisComponentsDescriptors,\n};\n"],"names":["cratisComponentsRuntimePackage","manifest","cratisComponentsPackageManifest","components","cratisComponents","descriptors","cratisComponentsDescriptors"],"mappings":";;;;AAAA;AACA;AAOA;;;;;;;;UASaA,8BAAAA,GAAqD;IAC9DC,QAAAA,EAAUC,+BAAAA;IACVC,UAAAA,EAAYC,gBAAAA;IACZC,WAAAA,EAAaC;AACjB;;"}
@@ -0,0 +1,3 @@
1
+ import { DesignTimeBundle } from '@cratis/scene.react';
2
+ export declare const cratisComponentsDesignTime: DesignTimeBundle;
3
+ //# sourceMappingURL=cratisComponentsDesignTime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsDesignTime.d.ts","sourceRoot":"","sources":["../../../designTime/cratisComponentsDesignTime.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAOvD,eAAO,MAAM,0BAA0B,EAAE,gBAWxC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { CommandFieldPropertyEditor } from '../forms/CommandFieldPropertyEditor.js';
2
+ import { CommandFormDesigner } from '../forms/CommandFormDesigner.js';
3
+ import { CommandFormLayoutEditor } from '../forms/CommandFormLayoutEditor.js';
4
+ import { generateCommandFieldsAction } from '../forms/generateCommandFieldsAction.js';
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
+ /** Every design-time contribution of `Cratis.Components`, under the names its manifest declares. */ const cratisComponentsDesignTime = {
9
+ designers: {
10
+ commandFormDesigner: CommandFormDesigner
11
+ },
12
+ propertyEditors: {
13
+ commandBinding: CommandFieldPropertyEditor,
14
+ commandFormLayout: CommandFormLayoutEditor
15
+ },
16
+ actions: {
17
+ [generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction
18
+ }
19
+ };
20
+
21
+ export { cratisComponentsDesignTime };
22
+ //# sourceMappingURL=cratisComponentsDesignTime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cratisComponentsDesignTime.js","sources":["../../../designTime/cratisComponentsDesignTime.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 { DesignTimeBundle } from '@cratis/scene.react';\nimport { CommandFieldPropertyEditor } from '../forms/CommandFieldPropertyEditor';\nimport { CommandFormDesigner } from '../forms/CommandFormDesigner';\nimport { CommandFormLayoutEditor } from '../forms/CommandFormLayoutEditor';\nimport { generateCommandFieldsAction } from '../forms/generateCommandFieldsAction';\n\n/** Every design-time contribution of `Cratis.Components`, under the names its manifest declares. */\nexport const cratisComponentsDesignTime: DesignTimeBundle = {\n designers: {\n commandFormDesigner: CommandFormDesigner,\n },\n propertyEditors: {\n commandBinding: CommandFieldPropertyEditor,\n commandFormLayout: CommandFormLayoutEditor,\n },\n actions: {\n [generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction,\n },\n};\n"],"names":["cratisComponentsDesignTime","designers","commandFormDesigner","CommandFormDesigner","propertyEditors","commandBinding","CommandFieldPropertyEditor","commandFormLayout","CommandFormLayoutEditor","actions","generateCommandFieldsAction","descriptor","id"],"mappings":";;;;;AAAA;AACA;AAQA,qGACO,MAAMA,0BAAAA,GAA+C;IACxDC,SAAAA,EAAW;QACPC,mBAAAA,EAAqBC;AACzB,KAAA;IACAC,eAAAA,EAAiB;QACbC,cAAAA,EAAgBC,0BAAAA;QAChBC,iBAAAA,EAAmBC;AACvB,KAAA;IACAC,OAAAA,EAAS;AACL,QAAA,CAACC,2BAAAA,CAA4BC,UAAU,CAACC,EAAE,GAAGF;AACjD;AACJ;;"}