@cratis/scene.react 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.
- package/SceneElementView.tsx +13 -4
- package/core/CoreNavigationBar.tsx +53 -0
- package/core/coreComponents.ts +2 -0
- package/core/coreDescriptors.ts +75 -0
- package/core/corePackage.ts +3 -0
- package/core/index.ts +2 -0
- package/dist/cjs/SceneElementView.js +6 -2
- package/dist/cjs/SceneElementView.js.map +1 -1
- package/dist/cjs/core/CoreNavigationBar.js +49 -0
- package/dist/cjs/core/CoreNavigationBar.js.map +1 -0
- package/dist/cjs/core/coreComponents.js +3 -1
- package/dist/cjs/core/coreComponents.js.map +1 -1
- package/dist/cjs/core/coreDescriptors.js +162 -0
- package/dist/cjs/core/coreDescriptors.js.map +1 -0
- package/dist/cjs/core/corePackage.js +5 -2
- package/dist/cjs/core/corePackage.js.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/packages/ScenePackageBundle.js +33 -1
- package/dist/cjs/packages/ScenePackageBundle.js.map +1 -1
- package/dist/esm/SceneElementView.d.ts +3 -2
- package/dist/esm/SceneElementView.d.ts.map +1 -1
- package/dist/esm/SceneElementView.js +7 -3
- package/dist/esm/SceneElementView.js.map +1 -1
- package/dist/esm/core/CoreNavigationBar.d.ts +3 -0
- package/dist/esm/core/CoreNavigationBar.d.ts.map +1 -0
- package/dist/esm/core/CoreNavigationBar.js +47 -0
- package/dist/esm/core/CoreNavigationBar.js.map +1 -0
- package/dist/esm/core/coreComponents.d.ts.map +1 -1
- package/dist/esm/core/coreComponents.js +3 -1
- package/dist/esm/core/coreComponents.js.map +1 -1
- package/dist/esm/core/coreDescriptors.d.ts +3 -0
- package/dist/esm/core/coreDescriptors.d.ts.map +1 -0
- package/dist/esm/core/coreDescriptors.js +160 -0
- package/dist/esm/core/coreDescriptors.js.map +1 -0
- package/dist/esm/core/corePackage.d.ts.map +1 -1
- package/dist/esm/core/corePackage.js +5 -2
- package/dist/esm/core/corePackage.js.map +1 -1
- package/dist/esm/core/index.d.ts +2 -0
- package/dist/esm/core/index.d.ts.map +1 -1
- package/dist/esm/core/index.js +2 -0
- package/dist/esm/core/index.js.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/packages/ScenePackageBundle.d.ts +2 -1
- package/dist/esm/packages/ScenePackageBundle.d.ts.map +1 -1
- package/dist/esm/packages/ScenePackageBundle.js +33 -1
- package/dist/esm/packages/ScenePackageBundle.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/packages/ScenePackageBundle.ts +49 -2
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { PropertyValueType } from '@cratis/scene.model';
|
|
2
|
+
|
|
1
3
|
// Copyright (c) Cratis. All rights reserved.
|
|
2
4
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
5
|
/**
|
|
@@ -13,7 +15,8 @@
|
|
|
13
15
|
return `${packageName}:${componentName}`;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
|
-
* Checks that a bundle provides everything its manifest declares, and declares everything it provides
|
|
18
|
+
* Checks that a bundle provides everything its manifest declares, and declares everything it provides, and that
|
|
19
|
+
* every descriptor it ships is for a component it declares and is well formed.
|
|
17
20
|
*
|
|
18
21
|
* A manifest that promises a component the bundle does not register renders as `UnresolvedComponent` at
|
|
19
22
|
* runtime — a blank box, far from where the mistake was made. A component registered but not declared is
|
|
@@ -57,6 +60,35 @@
|
|
|
57
60
|
problems.push(`declares the theme '${name}' but provides no definition for it`);
|
|
58
61
|
}
|
|
59
62
|
}
|
|
63
|
+
problems.push(...validateDescriptors(bundle));
|
|
64
|
+
return problems;
|
|
65
|
+
}
|
|
66
|
+
function validateDescriptors(bundle) {
|
|
67
|
+
const problems = [];
|
|
68
|
+
const declared = new Set(bundle.manifest.components.map((name)=>componentRegistryKey(bundle.manifest.name, name)));
|
|
69
|
+
const described = new Set();
|
|
70
|
+
for (const descriptor of bundle.descriptors ?? []){
|
|
71
|
+
if (!declared.has(descriptor.component)) {
|
|
72
|
+
problems.push(`describes '${descriptor.component}', which the manifest does not declare as a component`);
|
|
73
|
+
}
|
|
74
|
+
if (described.has(descriptor.component)) {
|
|
75
|
+
problems.push(`describes '${descriptor.component}' more than once`);
|
|
76
|
+
}
|
|
77
|
+
described.add(descriptor.component);
|
|
78
|
+
const paths = new Set();
|
|
79
|
+
for (const property of descriptor.properties){
|
|
80
|
+
if (paths.has(property.path)) {
|
|
81
|
+
problems.push(`'${descriptor.component}' describes the property '${property.path}' more than once`);
|
|
82
|
+
}
|
|
83
|
+
paths.add(property.path);
|
|
84
|
+
if (property.valueType === PropertyValueType.Collection && property.item === undefined) {
|
|
85
|
+
problems.push(`'${descriptor.component}' describes the collection '${property.path}' without describing its items`);
|
|
86
|
+
}
|
|
87
|
+
if (property.valueType === PropertyValueType.Enum && (property.choices ?? []).length === 0) {
|
|
88
|
+
problems.push(`'${descriptor.component}' describes the enum '${property.path}' without choices`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
60
92
|
return problems;
|
|
61
93
|
}
|
|
62
94
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScenePackageBundle.js","sources":["../../../packages/ScenePackageBundle.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 { DialogTemplate, Layout, ScenePackage, Screen, ScreenTemplate, Theme } from '@cratis/scene.model';\nimport { ComponentRegistry } from '../renderer';\n\n/**\n * What a package actually ships to a React renderer, as opposed to what it *declares*.\n *\n * `ScenePackage` is the declaration — a name, a kind, dependencies, and the names of what it\n * contributes. It is deliberately platform-agnostic and lives in `Scene.Model`, because Stage's build and\n * Studio's design-time queries both read it without ever loading a component. A bundle is the other half:\n * the real React components, layouts, screens and themes behind those names, which only a renderer needs.\n *\n * A package publishes exactly one bundle, as a named export following its own name —\n * `primeReactPackage`, `cratisComponentsPackage`, `corePackage`. A host loads it from the module the\n * declaration's `ScenePackage.module` names.\n */\nexport interface ScenePackageBundle {\n /**\n * The package's own declaration. Its `components`, `layouts` and `themes` name lists must agree with\n * what this bundle actually provides — {@link validatePackageBundle} is what proves they do.\n */\n manifest: ScenePackage;\n\n /**\n * The components this package provides, keyed by {@link componentRegistryKey}.\n */\n components: ComponentRegistry;\n\n /**\n * The application shells this package provides, if any. Only a blueprint has these.\n */\n layouts?: Layout[];\n\n /**\n * The screen templates this package provides — the shapes that go inside a layout, each declaring\n * which of its parent's slots it fills.\n */\n screenTemplates?: ScreenTemplate[];\n\n /**\n * The dialog templates this package provides.\n */\n dialogTemplates?: DialogTemplate[];\n\n /**\n * Sample screens this package ships — a layout package's gallery, so a preview has real content to\n * put through the real engine rather than a mockup.\n */\n screens?: Screen[];\n\n /**\n * The themes this package ships, if any.\n */\n themes?: Theme[];\n}\n\n/**\n * The key a component is registered and looked up under: the package that provides it, then the bare name\n * a screen refers to it by.\n *\n * A screen writes a bare name (`button`) or a package-qualified one (`PrimeReact.button`);\n * `resolveComponentName` turns either into a `{ name, package }` pair, and this turns that pair into the\n * registry key. Nothing should build this string by hand — the separator is an implementation detail of\n * the registry, deliberately not the `.` used for qualification in a screen, so a package name containing\n * dots stays unambiguous.\n */\nexport function componentRegistryKey(packageName: string, componentName: string): string {\n return `${packageName}:${componentName}`;\n}\n\n/**\n * Checks that a bundle provides everything its manifest declares, and declares everything it provides.\n *\n * A manifest that promises a component the bundle does not register renders as `UnresolvedComponent` at\n * runtime — a blank box, far from where the mistake was made. A component registered but not declared is\n * invisible to `resolveComponentName`, so a screen can never name it. Both are silent failures, which is\n * why every package's specs run this.\n */\nexport function validatePackageBundle(bundle: ScenePackageBundle): string[] {\n const problems: string[] = [];\n const { manifest } = bundle;\n\n for (const name of manifest.components) {\n if (!(componentRegistryKey(manifest.name, name) in bundle.components)) {\n problems.push(`declares the component '${name}' but registers no implementation for it`);\n }\n }\n\n const declared = new Set(manifest.components.map((name) => componentRegistryKey(manifest.name, name)));\n for (const key of Object.keys(bundle.components)) {\n if (!declared.has(key)) {\n problems.push(`registers '${key}', which the manifest does not declare`);\n }\n }\n\n const providedLayouts = new Set((bundle.layouts ?? []).map((layout) => layout.name));\n for (const name of manifest.layouts) {\n if (!providedLayouts.has(name)) {\n problems.push(`declares the layout '${name}' but provides no definition for it`);\n }\n }\n\n const providedScreenTemplates = new Set((bundle.screenTemplates ?? []).map((template) => template.name));\n for (const name of manifest.screenTemplates) {\n if (!providedScreenTemplates.has(name)) {\n problems.push(`declares the screen template '${name}' but provides no definition for it`);\n }\n }\n\n const providedDialogTemplates = new Set((bundle.dialogTemplates ?? []).map((template) => template.name));\n for (const name of manifest.dialogTemplates) {\n if (!providedDialogTemplates.has(name)) {\n problems.push(`declares the dialog template '${name}' but provides no definition for it`);\n }\n }\n\n const providedThemes = new Set((bundle.themes ?? []).map((theme) => theme.name));\n for (const name of manifest.themes) {\n if (!providedThemes.has(name)) {\n problems.push(`declares the theme '${name}' but provides no definition for it`);\n }\n }\n\n return problems;\n}\n\n/**\n * Merges the component registries of several bundles into the single registry a renderer consumes.\n *\n * Keys carry their package name, so nothing collides and merge order does not matter — which package wins\n * a *bare* name is decided earlier, by `resolveComponentName` walking the profile's priority order.\n */\nexport function mergePackageRegistries(bundles: ScenePackageBundle[]): ComponentRegistry {\n return Object.assign({}, ...bundles.map((bundle) => bundle.components)) as ComponentRegistry;\n}\n"],"names":["componentRegistryKey","packageName","componentName","validatePackageBundle","bundle","problems","manifest","name","components","push","declared","Set","map","key","Object","keys","has","providedLayouts","layouts","layout","providedScreenTemplates","screenTemplates","template","providedDialogTemplates","dialogTemplates","providedThemes","themes","theme","mergePackageRegistries","bundles","assign"],"mappings":"AAAA;AACA;AAyDA;;;;;;;;;AASC,IACM,SAASA,oBAAAA,CAAqBC,WAAmB,EAAEC,aAAqB,EAAA;AAC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,CAACT,IAAAA,CAAAA,EAAO;AAC3BF,YAAAA,QAAAA,CAASI,IAAI,CAAC,CAAC,oBAAoB,EAAEF,IAAAA,CAAK,mCAAmC,CAAC,CAAA;AAClF,QAAA;AACJ,IAAA;IAEA,OAAOF,QAAAA;AACX;AAEA;;;;;IAMO,SAASuB,sBAAAA,CAAuBC,OAA6B,EAAA;IAChE,OAAOf,MAAAA,CAAOgB,MAAM,CAAC,EAAC,EAAA,GAAMD,OAAAA,CAAQjB,GAAG,CAAC,CAACR,MAAAA,GAAWA,MAAAA,CAAOI,UAAU,CAAA,CAAA;AACzE;;"}
|
|
1
|
+
{"version":3,"file":"ScenePackageBundle.js","sources":["../../../packages/ScenePackageBundle.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, DialogTemplate, Layout, PropertyValueType, ScenePackage, Screen, ScreenTemplate, Theme } from '@cratis/scene.model';\nimport { ComponentRegistry } from '../renderer';\n\n/**\n * What a package actually ships to a React renderer, as opposed to what it *declares*.\n *\n * `ScenePackage` is the declaration — a name, a kind, dependencies, and the names of what it\n * contributes. It is deliberately platform-agnostic and lives in `Scene.Model`, because Stage's build and\n * Studio's design-time queries both read it without ever loading a component. A bundle is the other half:\n * the real React components, layouts, screens and themes behind those names, which only a renderer needs.\n *\n * A package publishes exactly one bundle, as a named export following its own name —\n * `primeReactPackage`, `cratisComponentsPackage`, `corePackage`. A host loads it from the module the\n * declaration's `ScenePackage.module` names.\n */\nexport interface ScenePackageBundle {\n /**\n * The package's own declaration. Its `components`, `layouts` and `themes` name lists must agree with\n * what this bundle actually provides — {@link validatePackageBundle} is what proves they do.\n */\n manifest: ScenePackage;\n\n /**\n * The components this package provides, keyed by {@link componentRegistryKey}.\n */\n components: ComponentRegistry;\n\n /**\n * The application shells this package provides, if any. Only a blueprint has these.\n */\n layouts?: Layout[];\n\n /**\n * The screen templates this package provides — the shapes that go inside a layout, each declaring\n * which of its parent's slots it fills.\n */\n screenTemplates?: ScreenTemplate[];\n\n /**\n * The dialog templates this package provides.\n */\n dialogTemplates?: DialogTemplate[];\n\n /**\n * Sample screens this package ships — a layout package's gallery, so a preview has real content to\n * put through the real engine rather than a mockup.\n */\n screens?: Screen[];\n\n /**\n * What can be edited on this package's components - one {@link ComponentDescriptor} per component that is\n * editable at design time. They are data, so Studio reads them without rendering anything, and they travel with\n * the components they describe rather than in a registry of their own. {@link validatePackageBundle} checks\n * that every descriptor names a component the manifest declares.\n */\n descriptors?: ComponentDescriptor[];\n\n /**\n * The themes this package ships, if any.\n */\n themes?: Theme[];\n}\n\n/**\n * The key a component is registered and looked up under: the package that provides it, then the bare name\n * a screen refers to it by.\n *\n * A screen writes a bare name (`button`) or a package-qualified one (`PrimeReact.button`);\n * `resolveComponentName` turns either into a `{ name, package }` pair, and this turns that pair into the\n * registry key. Nothing should build this string by hand — the separator is an implementation detail of\n * the registry, deliberately not the `.` used for qualification in a screen, so a package name containing\n * dots stays unambiguous.\n */\nexport function componentRegistryKey(packageName: string, componentName: string): string {\n return `${packageName}:${componentName}`;\n}\n\n/**\n * Checks that a bundle provides everything its manifest declares, and declares everything it provides, and that\n * every descriptor it ships is for a component it declares and is well formed.\n *\n * A manifest that promises a component the bundle does not register renders as `UnresolvedComponent` at\n * runtime — a blank box, far from where the mistake was made. A component registered but not declared is\n * invisible to `resolveComponentName`, so a screen can never name it. Both are silent failures, which is\n * why every package's specs run this.\n */\nexport function validatePackageBundle(bundle: ScenePackageBundle): string[] {\n const problems: string[] = [];\n const { manifest } = bundle;\n\n for (const name of manifest.components) {\n if (!(componentRegistryKey(manifest.name, name) in bundle.components)) {\n problems.push(`declares the component '${name}' but registers no implementation for it`);\n }\n }\n\n const declared = new Set(manifest.components.map((name) => componentRegistryKey(manifest.name, name)));\n for (const key of Object.keys(bundle.components)) {\n if (!declared.has(key)) {\n problems.push(`registers '${key}', which the manifest does not declare`);\n }\n }\n\n const providedLayouts = new Set((bundle.layouts ?? []).map((layout) => layout.name));\n for (const name of manifest.layouts) {\n if (!providedLayouts.has(name)) {\n problems.push(`declares the layout '${name}' but provides no definition for it`);\n }\n }\n\n const providedScreenTemplates = new Set((bundle.screenTemplates ?? []).map((template) => template.name));\n for (const name of manifest.screenTemplates) {\n if (!providedScreenTemplates.has(name)) {\n problems.push(`declares the screen template '${name}' but provides no definition for it`);\n }\n }\n\n const providedDialogTemplates = new Set((bundle.dialogTemplates ?? []).map((template) => template.name));\n for (const name of manifest.dialogTemplates) {\n if (!providedDialogTemplates.has(name)) {\n problems.push(`declares the dialog template '${name}' but provides no definition for it`);\n }\n }\n\n const providedThemes = new Set((bundle.themes ?? []).map((theme) => theme.name));\n for (const name of manifest.themes) {\n if (!providedThemes.has(name)) {\n problems.push(`declares the theme '${name}' but provides no definition for it`);\n }\n }\n\n problems.push(...validateDescriptors(bundle));\n return problems;\n}\n\nfunction validateDescriptors(bundle: ScenePackageBundle): string[] {\n const problems: string[] = [];\n const declared = new Set(bundle.manifest.components.map((name) => componentRegistryKey(bundle.manifest.name, name)));\n const described = new Set<string>();\n\n for (const descriptor of bundle.descriptors ?? []) {\n if (!declared.has(descriptor.component)) {\n problems.push(`describes '${descriptor.component}', which the manifest does not declare as a component`);\n }\n\n if (described.has(descriptor.component)) {\n problems.push(`describes '${descriptor.component}' more than once`);\n }\n\n described.add(descriptor.component);\n\n const paths = new Set<string>();\n for (const property of descriptor.properties) {\n if (paths.has(property.path)) {\n problems.push(`'${descriptor.component}' describes the property '${property.path}' more than once`);\n }\n\n paths.add(property.path);\n\n if (property.valueType === PropertyValueType.Collection && property.item === undefined) {\n problems.push(`'${descriptor.component}' describes the collection '${property.path}' without describing its items`);\n }\n\n if (property.valueType === PropertyValueType.Enum && (property.choices ?? []).length === 0) {\n problems.push(`'${descriptor.component}' describes the enum '${property.path}' without choices`);\n }\n }\n }\n\n return problems;\n}\n\n/**\n * Merges the component registries of several bundles into the single registry a renderer consumes.\n *\n * Keys carry their package name, so nothing collides and merge order does not matter — which package wins\n * a *bare* name is decided earlier, by `resolveComponentName` walking the profile's priority order.\n */\nexport function mergePackageRegistries(bundles: ScenePackageBundle[]): ComponentRegistry {\n return Object.assign({}, ...bundles.map((bundle) => bundle.components)) as ComponentRegistry;\n}\n"],"names":["componentRegistryKey","packageName","componentName","validatePackageBundle","bundle","problems","manifest","name","components","push","declared","Set","map","key","Object","keys","has","providedLayouts","layouts","layout","providedScreenTemplates","screenTemplates","template","providedDialogTemplates","dialogTemplates","providedThemes","themes","theme","validateDescriptors","described","descriptor","descriptors","component","add","paths","property","properties","path","valueType","PropertyValueType","Collection","item","undefined","Enum","choices","length","mergePackageRegistries","bundles","assign"],"mappings":";;AAAA;AACA;AAiEA;;;;;;;;;AASC,IACM,SAASA,oBAAAA,CAAqBC,WAAmB,EAAEC,aAAqB,EAAA;AAC3E,IAAA,OAAO,CAAA,EAAGD,WAAAA,CAAY,CAAC,EAAEC,aAAAA,CAAAA,CAAe;AAC5C;AAEA;;;;;;;;IASO,SAASC,qBAAAA,CAAsBC,MAA0B,EAAA;AAC5D,IAAA,MAAMC,WAAqB,EAAE;IAC7B,MAAM,EAAEC,QAAQ,EAAE,GAAGF,MAAAA;AAErB,IAAA,KAAK,MAAMG,IAAAA,IAAQD,QAAAA,CAASE,UAAU,CAAE;QACpC,IAAI,EAAER,oBAAAA,CAAqBM,QAAAA,CAASC,IAAI,EAAEA,IAAAA,CAAAA,IAASH,MAAAA,CAAOI,UAAS,CAAA,EAAI;AACnEH,YAAAA,QAAAA,CAASI,IAAI,CAAC,CAAC,wBAAwB,EAAEF,IAAAA,CAAK,wCAAwC,CAAC,CAAA;AAC3F,QAAA;AACJ,IAAA;AAEA,IAAA,MAAMG,QAAAA,GAAW,IAAIC,GAAAA,CAAIL,QAAAA,CAASE,UAAU,CAACI,GAAG,CAAC,CAACL,IAAAA,GAASP,oBAAAA,CAAqBM,QAAAA,CAASC,IAAI,EAAEA,IAAAA,CAAAA,CAAAA,CAAAA;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