@cratis/scene.blueprint.components 0.1.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/.storybook/main.ts +61 -0
- package/.storybook/preview.tsx +42 -0
- package/BorrowedComponentName.ts +22 -0
- package/ComponentName.ts +27 -0
- package/CompositeName.ts +97 -0
- package/README.md +40 -0
- package/componentsBlueprint.ts +72 -0
- package/componentsBlueprintComponents.ts +23 -0
- package/dist/cjs/BorrowedComponentName.js +25 -0
- package/dist/cjs/BorrowedComponentName.js.map +1 -0
- package/dist/cjs/ComponentName.js +30 -0
- package/dist/cjs/ComponentName.js.map +1 -0
- package/dist/cjs/CompositeName.js +52 -0
- package/dist/cjs/CompositeName.js.map +1 -0
- package/dist/cjs/componentsBlueprint.js +93 -0
- package/dist/cjs/componentsBlueprint.js.map +1 -0
- package/dist/cjs/componentsBlueprintComponents.js +27 -0
- package/dist/cjs/componentsBlueprintComponents.js.map +1 -0
- package/dist/cjs/gallery/DialogTemplatePreview.js +46 -0
- package/dist/cjs/gallery/DialogTemplatePreview.js.map +1 -0
- package/dist/cjs/gallery/GalleryScreenPreview.js +65 -0
- package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -0
- package/dist/cjs/gallery/applicationChrome.js +137 -0
- package/dist/cjs/gallery/applicationChrome.js.map +1 -0
- package/dist/cjs/gallery/navigation.js +128 -0
- package/dist/cjs/gallery/navigation.js.map +1 -0
- package/dist/cjs/gallery/previewProfile.js +87 -0
- package/dist/cjs/gallery/previewProfile.js.map +1 -0
- package/dist/cjs/gallery/screens.js +80 -0
- package/dist/cjs/gallery/screens.js.map +1 -0
- package/dist/cjs/header/ArcPageHeader.js +65 -0
- package/dist/cjs/header/ArcPageHeader.js.map +1 -0
- package/dist/cjs/header/deriveArcHeading.js +51 -0
- package/dist/cjs/header/deriveArcHeading.js.map +1 -0
- package/dist/cjs/header/humanizeBindingName.js +36 -0
- package/dist/cjs/header/humanizeBindingName.js.map +1 -0
- package/dist/cjs/index.js +119 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/packageName.js +15 -0
- package/dist/cjs/packageName.js.map +1 -0
- package/dist/cjs/templates/SampleBindingName.js +39 -0
- package/dist/cjs/templates/SampleBindingName.js.map +1 -0
- package/dist/cjs/templates/commandTemplates.js +82 -0
- package/dist/cjs/templates/commandTemplates.js.map +1 -0
- package/dist/cjs/templates/dataElements.js +131 -0
- package/dist/cjs/templates/dataElements.js.map +1 -0
- package/dist/cjs/templates/dialogElements.js +69 -0
- package/dist/cjs/templates/dialogElements.js.map +1 -0
- package/dist/cjs/templates/dialogTemplates.js +118 -0
- package/dist/cjs/templates/dialogTemplates.js.map +1 -0
- package/dist/cjs/templates/editorElements.js +81 -0
- package/dist/cjs/templates/editorElements.js.map +1 -0
- package/dist/cjs/templates/editorTemplates.js +172 -0
- package/dist/cjs/templates/editorTemplates.js.map +1 -0
- package/dist/cjs/templates/elements.js +101 -0
- package/dist/cjs/templates/elements.js.map +1 -0
- package/dist/cjs/templates/formElements.js +77 -0
- package/dist/cjs/templates/formElements.js.map +1 -0
- package/dist/cjs/templates/listTemplates.js +187 -0
- package/dist/cjs/templates/listTemplates.js.map +1 -0
- package/dist/cjs/templates/nesting.js +150 -0
- package/dist/cjs/templates/nesting.js.map +1 -0
- package/dist/cjs/templates/sampleData.js +141 -0
- package/dist/cjs/templates/sampleData.js.map +1 -0
- package/dist/cjs/templates/screenTemplates.js +41 -0
- package/dist/cjs/templates/screenTemplates.js.map +1 -0
- package/dist/cjs/templates/workspaceTemplates.js +212 -0
- package/dist/cjs/templates/workspaceTemplates.js.map +1 -0
- package/dist/esm/BorrowedComponentName.d.ts +4 -0
- package/dist/esm/BorrowedComponentName.d.ts.map +1 -0
- package/dist/esm/BorrowedComponentName.js +23 -0
- package/dist/esm/BorrowedComponentName.js.map +1 -0
- package/dist/esm/ComponentName.d.ts +4 -0
- package/dist/esm/ComponentName.d.ts.map +1 -0
- package/dist/esm/ComponentName.js +28 -0
- package/dist/esm/ComponentName.js.map +1 -0
- package/dist/esm/CompositeName.d.ts +28 -0
- package/dist/esm/CompositeName.d.ts.map +1 -0
- package/dist/esm/CompositeName.js +50 -0
- package/dist/esm/CompositeName.js.map +1 -0
- package/dist/esm/componentsBlueprint.d.ts +5 -0
- package/dist/esm/componentsBlueprint.d.ts.map +1 -0
- package/dist/esm/componentsBlueprint.js +90 -0
- package/dist/esm/componentsBlueprint.js.map +1 -0
- package/dist/esm/componentsBlueprintComponents.d.ts +3 -0
- package/dist/esm/componentsBlueprintComponents.d.ts.map +1 -0
- package/dist/esm/componentsBlueprintComponents.js +25 -0
- package/dist/esm/componentsBlueprintComponents.js.map +1 -0
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.d.ts +2 -0
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.d.ts.map +1 -0
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.js +57 -0
- package/dist/esm/for_ArcPageHeader/when_rendering_a_gallery_screen.js.map +1 -0
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.d.ts +2 -0
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.d.ts.map +1 -0
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.js +26 -0
- package/dist/esm/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.js.map +1 -0
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.d.ts +2 -0
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.d.ts.map +1 -0
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.js +65 -0
- package/dist/esm/for_componentsBlueprint/when_resolving_its_dependencies.js.map +1 -0
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.d.ts +2 -0
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.d.ts.map +1 -0
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.js +41 -0
- package/dist/esm/for_componentsBlueprint/when_validating_the_bundle.js.map +1 -0
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts +2 -0
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts.map +1 -0
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js +38 -0
- package/dist/esm/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.js.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts +2 -0
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js +47 -0
- package/dist/esm/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.d.ts +2 -0
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.d.ts.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.js +56 -0
- package/dist/esm/for_componentsScreenTemplates/when_following_the_nesting_chain.js.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.d.ts +2 -0
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.d.ts.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.js +31 -0
- package/dist/esm/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.js.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.d.ts +2 -0
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.d.ts.map +1 -0
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.js +54 -0
- package/dist/esm/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.js.map +1 -0
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.d.ts +2 -0
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.d.ts.map +1 -0
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.js +27 -0
- package/dist/esm/for_deriveArcHeading/when_no_binding_is_named.js.map +1 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.d.ts +2 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.d.ts.map +1 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.js +18 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_not_registered.js.map +1 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.d.ts +2 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.d.ts.map +1 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.js +26 -0
- package/dist/esm/for_deriveArcHeading/when_the_binding_is_registered.js.map +1 -0
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.d.ts +2 -0
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.d.ts.map +1 -0
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.js +25 -0
- package/dist/esm/for_humanizeBindingName/when_reading_a_proxy_name.js.map +1 -0
- package/dist/esm/gallery/ArcPages.stories.d.ts +30 -0
- package/dist/esm/gallery/ArcPages.stories.d.ts.map +1 -0
- package/dist/esm/gallery/ArcPages.stories.js +34 -0
- package/dist/esm/gallery/ArcPages.stories.js.map +1 -0
- package/dist/esm/gallery/Bindings.stories.d.ts +22 -0
- package/dist/esm/gallery/Bindings.stories.d.ts.map +1 -0
- package/dist/esm/gallery/Bindings.stories.js +78 -0
- package/dist/esm/gallery/Bindings.stories.js.map +1 -0
- package/dist/esm/gallery/DialogTemplatePreview.d.ts +7 -0
- package/dist/esm/gallery/DialogTemplatePreview.d.ts.map +1 -0
- package/dist/esm/gallery/DialogTemplatePreview.js +44 -0
- package/dist/esm/gallery/DialogTemplatePreview.js.map +1 -0
- package/dist/esm/gallery/DialogTemplates.stories.d.ts +21 -0
- package/dist/esm/gallery/DialogTemplates.stories.d.ts.map +1 -0
- package/dist/esm/gallery/DialogTemplates.stories.js +23 -0
- package/dist/esm/gallery/DialogTemplates.stories.js.map +1 -0
- package/dist/esm/gallery/GalleryScreenPreview.d.ts +10 -0
- package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -0
- package/dist/esm/gallery/GalleryScreenPreview.js +62 -0
- package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -0
- package/dist/esm/gallery/applicationChrome.d.ts +3 -0
- package/dist/esm/gallery/applicationChrome.d.ts.map +1 -0
- package/dist/esm/gallery/applicationChrome.js +135 -0
- package/dist/esm/gallery/applicationChrome.js.map +1 -0
- package/dist/esm/gallery/index.d.ts +7 -0
- package/dist/esm/gallery/index.d.ts.map +1 -0
- package/dist/esm/gallery/index.js +7 -0
- package/dist/esm/gallery/index.js.map +1 -0
- package/dist/esm/gallery/navigation.d.ts +9 -0
- package/dist/esm/gallery/navigation.d.ts.map +1 -0
- package/dist/esm/gallery/navigation.js +121 -0
- package/dist/esm/gallery/navigation.js.map +1 -0
- package/dist/esm/gallery/previewProfile.d.ts +6 -0
- package/dist/esm/gallery/previewProfile.d.ts.map +1 -0
- package/dist/esm/gallery/previewProfile.js +83 -0
- package/dist/esm/gallery/previewProfile.js.map +1 -0
- package/dist/esm/gallery/screens.d.ts +4 -0
- package/dist/esm/gallery/screens.d.ts.map +1 -0
- package/dist/esm/gallery/screens.js +77 -0
- package/dist/esm/gallery/screens.js.map +1 -0
- package/dist/esm/header/ArcHeading.d.ts +9 -0
- package/dist/esm/header/ArcHeading.d.ts.map +1 -0
- package/dist/esm/header/ArcHeading.js +2 -0
- package/dist/esm/header/ArcHeading.js.map +1 -0
- package/dist/esm/header/ArcPageHeader.d.ts +3 -0
- package/dist/esm/header/ArcPageHeader.d.ts.map +1 -0
- package/dist/esm/header/ArcPageHeader.js +63 -0
- package/dist/esm/header/ArcPageHeader.js.map +1 -0
- package/dist/esm/header/deriveArcHeading.d.ts +4 -0
- package/dist/esm/header/deriveArcHeading.d.ts.map +1 -0
- package/dist/esm/header/deriveArcHeading.js +49 -0
- package/dist/esm/header/deriveArcHeading.js.map +1 -0
- package/dist/esm/header/humanizeBindingName.d.ts +2 -0
- package/dist/esm/header/humanizeBindingName.d.ts.map +1 -0
- package/dist/esm/header/humanizeBindingName.js +34 -0
- package/dist/esm/header/humanizeBindingName.js.map +1 -0
- package/dist/esm/header/index.d.ts +5 -0
- package/dist/esm/header/index.d.ts.map +1 -0
- package/dist/esm/header/index.js +5 -0
- package/dist/esm/header/index.js.map +1 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +30 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/packageName.d.ts +2 -0
- package/dist/esm/packageName.d.ts.map +1 -0
- package/dist/esm/packageName.js +13 -0
- package/dist/esm/packageName.js.map +1 -0
- package/dist/esm/templates/ArcHeaderOptions.d.ts +8 -0
- package/dist/esm/templates/ArcHeaderOptions.d.ts.map +1 -0
- package/dist/esm/templates/ArcHeaderOptions.js +2 -0
- package/dist/esm/templates/ArcHeaderOptions.js.map +1 -0
- package/dist/esm/templates/ColumnDefinition.d.ts +5 -0
- package/dist/esm/templates/ColumnDefinition.d.ts.map +1 -0
- package/dist/esm/templates/ColumnDefinition.js +2 -0
- package/dist/esm/templates/ColumnDefinition.js.map +1 -0
- package/dist/esm/templates/SampleBindingName.d.ts +11 -0
- package/dist/esm/templates/SampleBindingName.d.ts.map +1 -0
- package/dist/esm/templates/SampleBindingName.js +37 -0
- package/dist/esm/templates/SampleBindingName.js.map +1 -0
- package/dist/esm/templates/TableOptions.d.ts +6 -0
- package/dist/esm/templates/TableOptions.d.ts.map +1 -0
- package/dist/esm/templates/TableOptions.js +2 -0
- package/dist/esm/templates/TableOptions.js.map +1 -0
- package/dist/esm/templates/commandTemplates.d.ts +4 -0
- package/dist/esm/templates/commandTemplates.d.ts.map +1 -0
- package/dist/esm/templates/commandTemplates.js +79 -0
- package/dist/esm/templates/commandTemplates.js.map +1 -0
- package/dist/esm/templates/dataElements.d.ts +11 -0
- package/dist/esm/templates/dataElements.d.ts.map +1 -0
- package/dist/esm/templates/dataElements.js +123 -0
- package/dist/esm/templates/dataElements.js.map +1 -0
- package/dist/esm/templates/dialogElements.d.ts +5 -0
- package/dist/esm/templates/dialogElements.d.ts.map +1 -0
- package/dist/esm/templates/dialogElements.js +65 -0
- package/dist/esm/templates/dialogElements.js.map +1 -0
- package/dist/esm/templates/dialogTemplates.d.ts +6 -0
- package/dist/esm/templates/dialogTemplates.d.ts.map +1 -0
- package/dist/esm/templates/dialogTemplates.js +113 -0
- package/dist/esm/templates/dialogTemplates.js.map +1 -0
- package/dist/esm/templates/editorElements.d.ts +11 -0
- package/dist/esm/templates/editorElements.d.ts.map +1 -0
- package/dist/esm/templates/editorElements.js +74 -0
- package/dist/esm/templates/editorElements.js.map +1 -0
- package/dist/esm/templates/editorTemplates.d.ts +5 -0
- package/dist/esm/templates/editorTemplates.d.ts.map +1 -0
- package/dist/esm/templates/editorTemplates.js +168 -0
- package/dist/esm/templates/editorTemplates.js.map +1 -0
- package/dist/esm/templates/elements.d.ts +11 -0
- package/dist/esm/templates/elements.d.ts.map +1 -0
- package/dist/esm/templates/elements.js +92 -0
- package/dist/esm/templates/elements.js.map +1 -0
- package/dist/esm/templates/formElements.d.ts +11 -0
- package/dist/esm/templates/formElements.d.ts.map +1 -0
- package/dist/esm/templates/formElements.js +70 -0
- package/dist/esm/templates/formElements.js.map +1 -0
- package/dist/esm/templates/index.d.ts +18 -0
- package/dist/esm/templates/index.d.ts.map +1 -0
- package/dist/esm/templates/index.js +18 -0
- package/dist/esm/templates/index.js.map +1 -0
- package/dist/esm/templates/listTemplates.d.ts +6 -0
- package/dist/esm/templates/listTemplates.d.ts.map +1 -0
- package/dist/esm/templates/listTemplates.js +182 -0
- package/dist/esm/templates/listTemplates.js.map +1 -0
- package/dist/esm/templates/nesting.d.ts +6 -0
- package/dist/esm/templates/nesting.d.ts.map +1 -0
- package/dist/esm/templates/nesting.js +145 -0
- package/dist/esm/templates/nesting.js.map +1 -0
- package/dist/esm/templates/sampleData.d.ts +10 -0
- package/dist/esm/templates/sampleData.d.ts.map +1 -0
- package/dist/esm/templates/sampleData.js +134 -0
- package/dist/esm/templates/sampleData.js.map +1 -0
- package/dist/esm/templates/screenTemplates.d.ts +4 -0
- package/dist/esm/templates/screenTemplates.d.ts.map +1 -0
- package/dist/esm/templates/screenTemplates.js +38 -0
- package/dist/esm/templates/screenTemplates.js.map +1 -0
- package/dist/esm/templates/workspaceTemplates.d.ts +5 -0
- package/dist/esm/templates/workspaceTemplates.d.ts.map +1 -0
- package/dist/esm/templates/workspaceTemplates.js +208 -0
- package/dist/esm/templates/workspaceTemplates.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/for_ArcPageHeader/when_rendering_a_gallery_screen.tsx +79 -0
- package/for_CompositeName/when_checking_the_names_against_the_packages_that_declare_them.ts +41 -0
- package/for_componentsBlueprint/when_resolving_its_dependencies.ts +85 -0
- package/for_componentsBlueprint/when_validating_the_bundle.ts +55 -0
- package/for_componentsGalleryScreens/when_checking_the_layouts_and_slots_they_fill.ts +56 -0
- package/for_componentsScreenTemplates/when_checking_that_arrangements_reference_declared_slots.ts +66 -0
- package/for_componentsScreenTemplates/when_following_the_nesting_chain.ts +83 -0
- package/for_componentsScreenTemplates/when_placing_them_in_the_default_blueprint_layout.ts +51 -0
- package/for_componentsScreenTemplates/when_resolving_the_component_names_they_reference.ts +72 -0
- package/for_deriveArcHeading/when_no_binding_is_named.ts +42 -0
- package/for_deriveArcHeading/when_the_binding_is_not_registered.ts +25 -0
- package/for_deriveArcHeading/when_the_binding_is_registered.ts +35 -0
- package/for_humanizeBindingName/when_reading_a_proxy_name.ts +34 -0
- package/gallery/ArcPages.stories.tsx +80 -0
- package/gallery/Bindings.stories.tsx +134 -0
- package/gallery/DialogTemplatePreview.tsx +49 -0
- package/gallery/DialogTemplates.stories.tsx +44 -0
- package/gallery/GalleryScreenPreview.tsx +70 -0
- package/gallery/applicationChrome.ts +108 -0
- package/gallery/index.ts +9 -0
- package/gallery/navigation.ts +63 -0
- package/gallery/previewProfile.ts +68 -0
- package/gallery/screens.ts +75 -0
- package/header/ArcHeading.ts +39 -0
- package/header/ArcPageHeader.tsx +44 -0
- package/header/deriveArcHeading.ts +47 -0
- package/header/humanizeBindingName.ts +36 -0
- package/header/index.ts +7 -0
- package/index.ts +12 -0
- package/package.json +71 -0
- package/packageName.ts +12 -0
- package/templates/ArcHeaderOptions.ts +27 -0
- package/templates/ColumnDefinition.ts +18 -0
- package/templates/SampleBindingName.ts +50 -0
- package/templates/TableOptions.ts +22 -0
- package/templates/commandTemplates.ts +59 -0
- package/templates/dataElements.ts +97 -0
- package/templates/dialogElements.ts +53 -0
- package/templates/dialogTemplates.ts +105 -0
- package/templates/editorElements.ts +69 -0
- package/templates/editorTemplates.ts +129 -0
- package/templates/elements.ts +81 -0
- package/templates/formElements.ts +61 -0
- package/templates/index.ts +20 -0
- package/templates/listTemplates.ts +142 -0
- package/templates/nesting.ts +118 -0
- package/templates/sampleData.ts +81 -0
- package/templates/screenTemplates.ts +35 -0
- package/templates/workspaceTemplates.ts +163 -0
|
@@ -0,0 +1,61 @@
|
|
|
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 type { StorybookConfig } from "@storybook/react-vite";
|
|
5
|
+
import { dirname, join, resolve } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
import type { InlineConfig } from 'vite';
|
|
8
|
+
|
|
9
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
|
|
11
|
+
const config: StorybookConfig = {
|
|
12
|
+
// Scoped away from `dist/` so a story is never indexed twice - once as source and once as the
|
|
13
|
+
// tsc-emitted copy beside it.
|
|
14
|
+
stories: ["../*.stories.@(js|jsx|mjs|ts|tsx)", "../!(dist|node_modules)/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
15
|
+
addons: [getAbsolutePath("@storybook/addon-links")],
|
|
16
|
+
framework: { name: getAbsolutePath("@storybook/react-vite"), options: {} },
|
|
17
|
+
async viteFinal(config: InlineConfig) {
|
|
18
|
+
config.resolve = config.resolve || {};
|
|
19
|
+
// The two packages this blueprint is built on are aliased alongside the three it shares with every
|
|
20
|
+
// other package here. Without that, `@cratis/scene.components` would come from its built `dist`
|
|
21
|
+
// while the engine and the React renderer came from source - and the binding registry is
|
|
22
|
+
// module-level state, so a story registering a fake through one copy would be invisible to the
|
|
23
|
+
// adapter reading the other.
|
|
24
|
+
config.resolve.alias = {
|
|
25
|
+
...config.resolve.alias,
|
|
26
|
+
'@cratis/scene.engine': resolve(__dirname, '../../engine/index.ts'),
|
|
27
|
+
'@cratis/scene.model': resolve(__dirname, '../../model/index.ts'),
|
|
28
|
+
'@cratis/scene.react': resolve(__dirname, '../../react/index.ts'),
|
|
29
|
+
'@cratis/scene.components': resolve(__dirname, '../../components/index.ts'),
|
|
30
|
+
'@cratis/scene.blueprint.default': resolve(__dirname, '../../blueprint.default/index.ts'),
|
|
31
|
+
};
|
|
32
|
+
// `@cratis/arc`, `@cratis/arc.react` and `@cratis/fundamentals` are peer dependencies of
|
|
33
|
+
// `@cratis/components` that the *host application* supplies. A Storybook preview is not a host: it
|
|
34
|
+
// has no Arc client and no backend, which is exactly the situation these templates are designed
|
|
35
|
+
// around, so they are not installed here.
|
|
36
|
+
//
|
|
37
|
+
// Every Arc-bound adapter reaches them through a dynamic `import()`, which puts that half of the
|
|
38
|
+
// library in its own chunk. Marking these external lets the chunk be emitted with its imports left
|
|
39
|
+
// bare instead of failing the build. A story that registers a binding will make the browser fail to
|
|
40
|
+
// load that chunk and the `ArcRuntimeBoundary` around it will say so - which is the same thing a
|
|
41
|
+
// real host without Arc installed sees, and is worth seeing rather than hiding.
|
|
42
|
+
config.build = config.build || {};
|
|
43
|
+
config.build.rollupOptions = {
|
|
44
|
+
...(config.build.rollupOptions ?? {}),
|
|
45
|
+
external: [/^@cratis\/arc/, '@cratis/fundamentals'],
|
|
46
|
+
};
|
|
47
|
+
// Vite 8 minifies CSS with lightningcss, which rejects the whole bundle over one invalid file:
|
|
48
|
+
// `@cratis/components` ships `dist/esm/TimeMachine/Properties.css` with `//` line comments, which
|
|
49
|
+
// are not CSS. esbuild's minifier tolerates them. This blueprint is the first package here to place
|
|
50
|
+
// a `timeMachine` on a page, so it is the first to pull that file in. The same workaround is in the
|
|
51
|
+
// Cratis Components package's own preview tooling, and both come out once that file ships with
|
|
52
|
+
// `/* */` comments.
|
|
53
|
+
config.build.cssMinify = 'esbuild';
|
|
54
|
+
return config;
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
export default config;
|
|
58
|
+
|
|
59
|
+
function getAbsolutePath(value: string): string {
|
|
60
|
+
return dirname(fileURLToPath(import.meta.resolve(join(value, "package.json"))));
|
|
61
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 type { Preview } from '@storybook/react';
|
|
5
|
+
import { CratisComponentsProvider } from '@cratis/components/Common';
|
|
6
|
+
|
|
7
|
+
// The stylesheet layers a page in this blueprint needs, in the order they resolve. PrimeReact 10 ships
|
|
8
|
+
// every widget's *structural* CSS inside its theme file, so without a theme the wrapped widgets render as
|
|
9
|
+
// bare HTML. `@cratis/components`' own sheet adds its Tailwind utilities and the `--cratis-*` token layer,
|
|
10
|
+
// the Scene package's bridge puts Scene's `--scene-*` tokens in front of that, and the default blueprint's
|
|
11
|
+
// `layout.css` draws the shell every one of these pages sits inside - which is the sheet this package does
|
|
12
|
+
// not have and does not want, because the shell is not its.
|
|
13
|
+
//
|
|
14
|
+
// The last two are reached by relative path rather than through their packages' `./styles` export,
|
|
15
|
+
// because `main.ts` aliases those package names to their sources and a Vite string alias matches by
|
|
16
|
+
// prefix - `@cratis/scene.components/styles` would be rewritten into a path inside `index.ts`.
|
|
17
|
+
import 'primereact/resources/themes/lara-light-blue/theme.css';
|
|
18
|
+
import 'primeicons/primeicons.css';
|
|
19
|
+
import '@cratis/components/styles';
|
|
20
|
+
import '../../components/theme/sceneTokenBridge.css';
|
|
21
|
+
import '../../blueprint.default/shell/layout.css';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Every story renders inside `CratisComponentsProvider`, the library's own configuration provider over
|
|
25
|
+
* PrimeReact's. Without it the wrapped components fall back to PrimeReact's defaults rather than Cratis',
|
|
26
|
+
* so a story would show something subtly different from what an application renders - which defeats the
|
|
27
|
+
* point of having stories at all.
|
|
28
|
+
*/
|
|
29
|
+
const preview: Preview = {
|
|
30
|
+
decorators: [
|
|
31
|
+
Story => (
|
|
32
|
+
<CratisComponentsProvider>
|
|
33
|
+
<Story />
|
|
34
|
+
</CratisComponentsProvider>
|
|
35
|
+
),
|
|
36
|
+
],
|
|
37
|
+
parameters: {
|
|
38
|
+
controls: { matchers: { color: /(background|color)$/i, date: /Date$/i } },
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default preview;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* Names this blueprint's templates reference that come from neither `Cratis.Components` nor itself.
|
|
6
|
+
*
|
|
7
|
+
* There is one, and it is worth stating why rather than leaving it as a bare string in a builder.
|
|
8
|
+
*
|
|
9
|
+
* `Cratis.Components`' data table and data page take their columns as children - the library's own
|
|
10
|
+
* documentation says the columns arrive in the `content` slot - but the library declares no `column` name
|
|
11
|
+
* of its own, because its tables are `DataTableForQuery` wrapping PrimeReact's `DataTable`, and a column
|
|
12
|
+
* is PrimeReact's `Column`. So a template that wants a table with real columns has to name PrimeReact's,
|
|
13
|
+
* and this blueprint's manifest declares PrimeReact as a dependency partly for that reason.
|
|
14
|
+
*
|
|
15
|
+
* It is checked the same way every other borrowed name in this repository is: against the owning
|
|
16
|
+
* package's own manifest, by a spec, rather than assumed. The default blueprint learned that the hard way
|
|
17
|
+
* when it referenced `chart` and `fileUpload`, which neither library declares.
|
|
18
|
+
*/
|
|
19
|
+
export enum BorrowedComponentName {
|
|
20
|
+
/** PrimeReact's `Column` - one column of a data table, given a `field` and a `header`. */
|
|
21
|
+
Column = 'column',
|
|
22
|
+
}
|
package/ComponentName.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* The bare names this package declares components under.
|
|
6
|
+
*
|
|
7
|
+
* There is exactly one, and that is the design rather than an unfinished list. This blueprint's value is
|
|
8
|
+
* in its **templates** - a `dataPage` already wired to a query, a `commandForm` page with its action bar -
|
|
9
|
+
* and a template is data a host can rearrange. A component is code it cannot. So the rule this package
|
|
10
|
+
* holds itself to is: register a component only when a template's content tree genuinely cannot express
|
|
11
|
+
* the composition, and reach for a template every other time. A blueprint whose value sat in its
|
|
12
|
+
* components rather than its templates would have misunderstood its job.
|
|
13
|
+
*
|
|
14
|
+
* {@link ArcPageHeader} is the one thing that clears that bar. Everything else in this package is a tree.
|
|
15
|
+
*/
|
|
16
|
+
export enum ComponentName {
|
|
17
|
+
/**
|
|
18
|
+
* A page header that derives its heading, its subtitle and its breadcrumb trail from **one** binding
|
|
19
|
+
* name, and reports whether that binding is registered.
|
|
20
|
+
*
|
|
21
|
+
* A content tree cannot do this. It can hold a title, a subtitle and a trail as three literals, but
|
|
22
|
+
* it cannot *derive* them from a single `query`/`command` property, and it certainly cannot look that
|
|
23
|
+
* name up in the binding registry to say whether a host has wired it. Both are behavior at render
|
|
24
|
+
* time, not structure - which is exactly the line this package uses to decide what earns a component.
|
|
25
|
+
*/
|
|
26
|
+
ArcPageHeader = 'arcPageHeader',
|
|
27
|
+
}
|
package/CompositeName.ts
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
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
|
+
/**
|
|
5
|
+
* The `Cratis.Components` names this blueprint's templates are built from.
|
|
6
|
+
*
|
|
7
|
+
* These are not this package's names - `Cratis.Components` declares every one of them, and this blueprint
|
|
8
|
+
* only writes them into its templates. They are collected here anyway, for two reasons.
|
|
9
|
+
*
|
|
10
|
+
* The first is the ordinary one: a bare name written inline is a magic string, and a typo in it renders as
|
|
11
|
+
* a dashed red box in the middle of a screen with nothing pointing back at the template that caused it.
|
|
12
|
+
*
|
|
13
|
+
* The second is what makes this worth an enum rather than a comment. A spec asserts that every member
|
|
14
|
+
* below appears in `cratisComponentsPackageManifest.components`, so this file is a standing check that
|
|
15
|
+
* this blueprint and the component library it is built from still agree. If a name is ever renamed
|
|
16
|
+
* upstream, that spec fails here rather than a screen failing silently in someone's application.
|
|
17
|
+
*
|
|
18
|
+
* A screen template writes bare names on purpose: `resolveComponentName` decides which active package
|
|
19
|
+
* wins each one against the profile's priority order, so a template that qualified its names would pin
|
|
20
|
+
* itself to one library and stop being a template.
|
|
21
|
+
*/
|
|
22
|
+
export enum CompositeName {
|
|
23
|
+
/** The library's page primitive - a full-height column whose optional panel chrome matches everything inside it. */
|
|
24
|
+
Page = 'page',
|
|
25
|
+
|
|
26
|
+
/** The whole list-screen composite: title bar, menubar, filterable table and optional details pane, all from one query. */
|
|
27
|
+
DataPage = 'dataPage',
|
|
28
|
+
|
|
29
|
+
/** A table that performs a query, pages against the server, and wires filtering and sorting back into it. */
|
|
30
|
+
DataTable = 'dataTable',
|
|
31
|
+
|
|
32
|
+
/** The live variant - an observable query, a WebSocket subscription, and a re-render when the read model changes. */
|
|
33
|
+
ObservableDataTable = 'observableDataTable',
|
|
34
|
+
|
|
35
|
+
/** A form generated from a command's own property descriptors, so it follows the command rather than going stale. */
|
|
36
|
+
CommandForm = 'commandForm',
|
|
37
|
+
|
|
38
|
+
/** A single-line text field bound to one command property. */
|
|
39
|
+
InputTextField = 'inputTextField',
|
|
40
|
+
|
|
41
|
+
/** A numeric field bound to one command property. */
|
|
42
|
+
NumberField = 'numberField',
|
|
43
|
+
|
|
44
|
+
/** A multi-line text field bound to one command property. */
|
|
45
|
+
TextAreaField = 'textAreaField',
|
|
46
|
+
|
|
47
|
+
/** A single-selection field over a list the screen carries inline. */
|
|
48
|
+
DropdownField = 'dropdownField',
|
|
49
|
+
|
|
50
|
+
/** A date field bound to one command property. */
|
|
51
|
+
CalendarField = 'calendarField',
|
|
52
|
+
|
|
53
|
+
/** The Arc-aware dialog, whose result resolves through Arc's dialog context rather than through `visible` state. */
|
|
54
|
+
Dialog = 'dialog',
|
|
55
|
+
|
|
56
|
+
/** A dialog whose confirm button *is* the command's execution - it submits, feeds validation back, and only closes on success. */
|
|
57
|
+
CommandDialog = 'commandDialog',
|
|
58
|
+
|
|
59
|
+
/** The blocking spinner shown while a long-running command is in flight. */
|
|
60
|
+
BusyIndicatorDialog = 'busyIndicatorDialog',
|
|
61
|
+
|
|
62
|
+
/** An icon, with the shorthand forms people actually write normalized into the class PrimeIcons expects. */
|
|
63
|
+
Icon = 'icon',
|
|
64
|
+
|
|
65
|
+
/** A standalone selection control, not bound to a command property. */
|
|
66
|
+
Dropdown = 'dropdown',
|
|
67
|
+
|
|
68
|
+
/** Scopes a failure to a region, so one broken widget does not take the screen with it. */
|
|
69
|
+
ErrorBoundary = 'errorBoundary',
|
|
70
|
+
|
|
71
|
+
/** Renders an arbitrary JSON document against its schema, with a control per declared type. */
|
|
72
|
+
ObjectContentEditor = 'objectContentEditor',
|
|
73
|
+
|
|
74
|
+
/** The trail that says where you are inside a nested document, and lets you climb back out. */
|
|
75
|
+
ObjectNavigationalBar = 'objectNavigationalBar',
|
|
76
|
+
|
|
77
|
+
/** Edits a JSON schema as a typed property tree rather than as text. */
|
|
78
|
+
SchemaEditor = 'schemaEditor',
|
|
79
|
+
|
|
80
|
+
/** Scrubs through successive versions of something on a timeline. */
|
|
81
|
+
TimeMachine = 'timeMachine',
|
|
82
|
+
|
|
83
|
+
/** The filter toggle and the panel it anchors, as one placeable element. */
|
|
84
|
+
FilterPanel = 'filterPanel',
|
|
85
|
+
|
|
86
|
+
/** The container for a tool palette, which also establishes the drag context its buttons read. */
|
|
87
|
+
Toolbar = 'toolbar',
|
|
88
|
+
|
|
89
|
+
/** One button in a tool palette. */
|
|
90
|
+
ToolbarButton = 'toolbarButton',
|
|
91
|
+
|
|
92
|
+
/** Related buttons kept together inside a toolbar. */
|
|
93
|
+
ToolbarGroup = 'toolbarGroup',
|
|
94
|
+
|
|
95
|
+
/** The divider between groups of tools. */
|
|
96
|
+
ToolbarSeparator = 'toolbarSeparator',
|
|
97
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Scene
|
|
2
|
+
|
|
3
|
+
The object model and runtime for Screenplay-based UIs: `Scene.Model` (platform-agnostic screens, layouts,
|
|
4
|
+
forms, contribution points, ui profiles and themes), `Scene.Engine` (binding/resolution runtime), and
|
|
5
|
+
`Scene.React` (the React renderer).
|
|
6
|
+
|
|
7
|
+
## Packages / Deployables
|
|
8
|
+
|
|
9
|
+
[](http://nuget.org/packages/Cratis.Scene.Model)
|
|
10
|
+
[](https://www.npmjs.com/package/@cratis/scene.model)
|
|
11
|
+
[](https://www.npmjs.com/package/@cratis/scene.engine)
|
|
12
|
+
[](https://www.npmjs.com/package/@cratis/scene.react)
|
|
13
|
+
|
|
14
|
+
## Builds
|
|
15
|
+
|
|
16
|
+
[](https://github.com/cratis/scene/actions/workflows/dotnet-build.yml)
|
|
17
|
+
[](https://github.com/cratis/scene/actions/workflows/javascript-build.yml)
|
|
18
|
+
|
|
19
|
+
## Description
|
|
20
|
+
|
|
21
|
+
Scene owns the *object model and runtime* half of the Screenplay stack. `Scene.Model` is the platform-agnostic
|
|
22
|
+
C# object model that Stage translates Screenplay's parsed language constructs into, and that Studio's
|
|
23
|
+
design-time tooling reads and writes. `Scene.Engine` walks that graph, resolves bindings (data, action, form,
|
|
24
|
+
navigation contribution) and drives whichever renderer is plugged in — it does not know React exists.
|
|
25
|
+
`Scene.React` is one renderer implementing the abstract vocabulary against real React/DOM; sibling positions
|
|
26
|
+
are reserved for future `Scene.Native` / `Scene.Desktop` renderers. Vendor and internal component packages
|
|
27
|
+
(PrimeReact, internal widget libraries) are adapters plugging into the renderer contract, not part of it.
|
|
28
|
+
|
|
29
|
+
The design-time editor built on top of this object model lives in Studio, not here — see
|
|
30
|
+
[StudioIssues#156](https://github.com/Cratis/StudioIssues/issues/156).
|
|
31
|
+
|
|
32
|
+
## Support
|
|
33
|
+
|
|
34
|
+
Cratis is an open community, and we are glad to help users, teams evaluating the stack, and contributors.
|
|
35
|
+
|
|
36
|
+
| Channel | Details |
|
|
37
|
+
|---|---|
|
|
38
|
+
| Discord | Join the community on [Discord](https://discord.gg/kt4AMpV8WV) for questions and discussions |
|
|
39
|
+
| GitHub Issues | [Report bugs or request features](https://github.com/Cratis/Scene/issues) |
|
|
40
|
+
| Documentation | Read the docs at [cratis.io](https://cratis.io) |
|
|
@@ -0,0 +1,72 @@
|
|
|
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 { PackageKind, ScenePackage } from '@cratis/scene.model';
|
|
5
|
+
import { ScenePackageBundle } from '@cratis/scene.react';
|
|
6
|
+
import { ComponentName } from './ComponentName';
|
|
7
|
+
import { componentsBlueprintComponents } from './componentsBlueprintComponents';
|
|
8
|
+
import { componentsGalleryScreens } from './gallery';
|
|
9
|
+
import { componentsBlueprintName } from './packageName';
|
|
10
|
+
import { componentsDialogTemplates, componentsScreenTemplates } from './templates';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* This blueprint's declaration.
|
|
14
|
+
*
|
|
15
|
+
* Where the default blueprint answers "what does an application look like", this one answers "what does a
|
|
16
|
+
* *page* look like once it is bound to Arc". Its templates are whole pages already wired to the composites
|
|
17
|
+
* in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key
|
|
18
|
+
* and filter fields all decided, under a header that says what it is bound to. An application picks the
|
|
19
|
+
* template and supplies a query name.
|
|
20
|
+
*
|
|
21
|
+
* `layouts` is empty, and that is the most important line in this file.
|
|
22
|
+
*
|
|
23
|
+
* A layout is an application's base navigational shell, and an application has exactly one. This package
|
|
24
|
+
* deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,
|
|
25
|
+
* its slot vocabulary, its shell components and its themes. That is what the dependency on another
|
|
26
|
+
* blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth
|
|
27
|
+
* stating plainly rather than leaving to be inferred from an empty array.
|
|
28
|
+
*
|
|
29
|
+
* The alternative would have been to ship a second application shell. It would have looked like value and
|
|
30
|
+
* been the opposite: an application can activate only one shell, so the two blueprints would have become
|
|
31
|
+
* mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the
|
|
32
|
+
* themes and the navigation that the default blueprint already does well. Layering means both can be
|
|
33
|
+
* active at once, which is the only arrangement in which either is worth having.
|
|
34
|
+
*
|
|
35
|
+
* `themes` is empty for the same reason at a smaller scale: the shell being themed is the default
|
|
36
|
+
* blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting
|
|
37
|
+
* a look for a shell it does not own.
|
|
38
|
+
*/
|
|
39
|
+
export const componentsBlueprintManifest: ScenePackage = {
|
|
40
|
+
name: componentsBlueprintName,
|
|
41
|
+
version: '1.0.0',
|
|
42
|
+
kind: PackageKind.Blueprint,
|
|
43
|
+
dependencies: [{ name: 'Cratis.Blueprint.Default' }, { name: 'Cratis.Components' }],
|
|
44
|
+
components: Object.values(ComponentName),
|
|
45
|
+
layouts: [],
|
|
46
|
+
screenTemplates: componentsScreenTemplates.map(template => template.name),
|
|
47
|
+
dialogTemplates: componentsDialogTemplates.map(template => template.name),
|
|
48
|
+
themes: [],
|
|
49
|
+
displayName: 'Cratis Components Blueprint',
|
|
50
|
+
description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',
|
|
51
|
+
module: '@cratis/scene.blueprint.components',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* This blueprint as a loadable bundle.
|
|
56
|
+
*
|
|
57
|
+
* The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and
|
|
58
|
+
* this package's specs run it - a manifest promising a template the bundle never provided is a failure that
|
|
59
|
+
* only shows up when someone picks that template and gets nothing.
|
|
60
|
+
*
|
|
61
|
+
* The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its
|
|
62
|
+
* chrome and one of these templates, so a preview boots them through the real engine as a working
|
|
63
|
+
* miniature application rather than a set of pictures. They render with unregistered bindings, which is the
|
|
64
|
+
* normal design-time state - the placeholders naming each wanted binding are exactly what should be there.
|
|
65
|
+
*/
|
|
66
|
+
export const componentsBlueprint: ScenePackageBundle = {
|
|
67
|
+
manifest: componentsBlueprintManifest,
|
|
68
|
+
components: componentsBlueprintComponents,
|
|
69
|
+
screenTemplates: componentsScreenTemplates,
|
|
70
|
+
dialogTemplates: componentsDialogTemplates,
|
|
71
|
+
screens: componentsGalleryScreens,
|
|
72
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';
|
|
5
|
+
import { ComponentName } from './ComponentName';
|
|
6
|
+
import { componentsBlueprintName } from './packageName';
|
|
7
|
+
import { ArcPageHeader } from './header';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The components this package registers, keyed the way the renderer looks them up.
|
|
11
|
+
*
|
|
12
|
+
* Every key is built with `componentRegistryKey` rather than written out, because the separator between
|
|
13
|
+
* package and component name is the registry's own business - it is deliberately not the `.` a screen uses
|
|
14
|
+
* to qualify a name, so that a package name containing dots stays unambiguous. Building a key by hand is
|
|
15
|
+
* how a component ends up registered under something no lookup will ever produce.
|
|
16
|
+
*
|
|
17
|
+
* One entry, and a short registry is the healthy outcome here rather than a gap. What this blueprint
|
|
18
|
+
* contributes is templates; a component only appears when a template genuinely could not express the
|
|
19
|
+
* composition, and `validatePackageBundle` proves that whatever *is* here is also declared in the manifest.
|
|
20
|
+
*/
|
|
21
|
+
export const componentsBlueprintComponents: ComponentRegistry = {
|
|
22
|
+
[componentRegistryKey(componentsBlueprintName, ComponentName.ArcPageHeader)]: ArcPageHeader,
|
|
23
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Names this blueprint's templates reference that come from neither `Cratis.Components` nor itself.
|
|
7
|
+
*
|
|
8
|
+
* There is one, and it is worth stating why rather than leaving it as a bare string in a builder.
|
|
9
|
+
*
|
|
10
|
+
* `Cratis.Components`' data table and data page take their columns as children - the library's own
|
|
11
|
+
* documentation says the columns arrive in the `content` slot - but the library declares no `column` name
|
|
12
|
+
* of its own, because its tables are `DataTableForQuery` wrapping PrimeReact's `DataTable`, and a column
|
|
13
|
+
* is PrimeReact's `Column`. So a template that wants a table with real columns has to name PrimeReact's,
|
|
14
|
+
* and this blueprint's manifest declares PrimeReact as a dependency partly for that reason.
|
|
15
|
+
*
|
|
16
|
+
* It is checked the same way every other borrowed name in this repository is: against the owning
|
|
17
|
+
* package's own manifest, by a spec, rather than assumed. The default blueprint learned that the hard way
|
|
18
|
+
* when it referenced `chart` and `fileUpload`, which neither library declares.
|
|
19
|
+
*/ var BorrowedComponentName = /*#__PURE__*/ function(BorrowedComponentName) {
|
|
20
|
+
/** PrimeReact's `Column` - one column of a data table, given a `field` and a `header`. */ BorrowedComponentName["Column"] = "column";
|
|
21
|
+
return BorrowedComponentName;
|
|
22
|
+
}({});
|
|
23
|
+
|
|
24
|
+
exports.BorrowedComponentName = BorrowedComponentName;
|
|
25
|
+
//# sourceMappingURL=BorrowedComponentName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BorrowedComponentName.js","sources":["../../BorrowedComponentName.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\n/**\n * Names this blueprint's templates reference that come from neither `Cratis.Components` nor itself.\n *\n * There is one, and it is worth stating why rather than leaving it as a bare string in a builder.\n *\n * `Cratis.Components`' data table and data page take their columns as children - the library's own\n * documentation says the columns arrive in the `content` slot - but the library declares no `column` name\n * of its own, because its tables are `DataTableForQuery` wrapping PrimeReact's `DataTable`, and a column\n * is PrimeReact's `Column`. So a template that wants a table with real columns has to name PrimeReact's,\n * and this blueprint's manifest declares PrimeReact as a dependency partly for that reason.\n *\n * It is checked the same way every other borrowed name in this repository is: against the owning\n * package's own manifest, by a spec, rather than assumed. The default blueprint learned that the hard way\n * when it referenced `chart` and `fileUpload`, which neither library declares.\n */\nexport enum BorrowedComponentName {\n /** PrimeReact's `Column` - one column of a data table, given a `field` and a `header`. */\n Column = 'column',\n}\n"],"names":["BorrowedComponentName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;IAeO,IAAKA,qBAAAA,iBAAAA,SAAAA,qBAAAA,EAAAA;+FACgF,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAA;AADhFA,IAAAA,OAAAA,qBAAAA;AAGX,CAAA,CAAA,EAAA;;;;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* The bare names this package declares components under.
|
|
7
|
+
*
|
|
8
|
+
* There is exactly one, and that is the design rather than an unfinished list. This blueprint's value is
|
|
9
|
+
* in its **templates** - a `dataPage` already wired to a query, a `commandForm` page with its action bar -
|
|
10
|
+
* and a template is data a host can rearrange. A component is code it cannot. So the rule this package
|
|
11
|
+
* holds itself to is: register a component only when a template's content tree genuinely cannot express
|
|
12
|
+
* the composition, and reach for a template every other time. A blueprint whose value sat in its
|
|
13
|
+
* components rather than its templates would have misunderstood its job.
|
|
14
|
+
*
|
|
15
|
+
* {@link ArcPageHeader} is the one thing that clears that bar. Everything else in this package is a tree.
|
|
16
|
+
*/ var ComponentName = /*#__PURE__*/ function(ComponentName) {
|
|
17
|
+
/**
|
|
18
|
+
* A page header that derives its heading, its subtitle and its breadcrumb trail from **one** binding
|
|
19
|
+
* name, and reports whether that binding is registered.
|
|
20
|
+
*
|
|
21
|
+
* A content tree cannot do this. It can hold a title, a subtitle and a trail as three literals, but
|
|
22
|
+
* it cannot *derive* them from a single `query`/`command` property, and it certainly cannot look that
|
|
23
|
+
* name up in the binding registry to say whether a host has wired it. Both are behavior at render
|
|
24
|
+
* time, not structure - which is exactly the line this package uses to decide what earns a component.
|
|
25
|
+
*/ ComponentName["ArcPageHeader"] = "arcPageHeader";
|
|
26
|
+
return ComponentName;
|
|
27
|
+
}({});
|
|
28
|
+
|
|
29
|
+
exports.ComponentName = ComponentName;
|
|
30
|
+
//# sourceMappingURL=ComponentName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComponentName.js","sources":["../../ComponentName.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\n/**\n * The bare names this package declares components under.\n *\n * There is exactly one, and that is the design rather than an unfinished list. This blueprint's value is\n * in its **templates** - a `dataPage` already wired to a query, a `commandForm` page with its action bar -\n * and a template is data a host can rearrange. A component is code it cannot. So the rule this package\n * holds itself to is: register a component only when a template's content tree genuinely cannot express\n * the composition, and reach for a template every other time. A blueprint whose value sat in its\n * components rather than its templates would have misunderstood its job.\n *\n * {@link ArcPageHeader} is the one thing that clears that bar. Everything else in this package is a tree.\n */\nexport enum ComponentName {\n /**\n * A page header that derives its heading, its subtitle and its breadcrumb trail from **one** binding\n * name, and reports whether that binding is registered.\n *\n * A content tree cannot do this. It can hold a title, a subtitle and a trail as three literals, but\n * it cannot *derive* them from a single `query`/`command` property, and it certainly cannot look that\n * name up in the binding registry to say whether a host has wired it. Both are behavior at render\n * time, not structure - which is exactly the line this package uses to decide what earns a component.\n */\n ArcPageHeader = 'arcPageHeader',\n}\n"],"names":["ComponentName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;IAYO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;AACR;;;;;;;;AAQC,QAAA,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;AATOA,IAAAA,OAAAA,aAAAA;AAWX,CAAA,CAAA,EAAA;;;;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* The `Cratis.Components` names this blueprint's templates are built from.
|
|
7
|
+
*
|
|
8
|
+
* These are not this package's names - `Cratis.Components` declares every one of them, and this blueprint
|
|
9
|
+
* only writes them into its templates. They are collected here anyway, for two reasons.
|
|
10
|
+
*
|
|
11
|
+
* The first is the ordinary one: a bare name written inline is a magic string, and a typo in it renders as
|
|
12
|
+
* a dashed red box in the middle of a screen with nothing pointing back at the template that caused it.
|
|
13
|
+
*
|
|
14
|
+
* The second is what makes this worth an enum rather than a comment. A spec asserts that every member
|
|
15
|
+
* below appears in `cratisComponentsPackageManifest.components`, so this file is a standing check that
|
|
16
|
+
* this blueprint and the component library it is built from still agree. If a name is ever renamed
|
|
17
|
+
* upstream, that spec fails here rather than a screen failing silently in someone's application.
|
|
18
|
+
*
|
|
19
|
+
* A screen template writes bare names on purpose: `resolveComponentName` decides which active package
|
|
20
|
+
* wins each one against the profile's priority order, so a template that qualified its names would pin
|
|
21
|
+
* itself to one library and stop being a template.
|
|
22
|
+
*/ var CompositeName = /*#__PURE__*/ function(CompositeName) {
|
|
23
|
+
/** The library's page primitive - a full-height column whose optional panel chrome matches everything inside it. */ CompositeName["Page"] = "page";
|
|
24
|
+
/** The whole list-screen composite: title bar, menubar, filterable table and optional details pane, all from one query. */ CompositeName["DataPage"] = "dataPage";
|
|
25
|
+
/** A table that performs a query, pages against the server, and wires filtering and sorting back into it. */ CompositeName["DataTable"] = "dataTable";
|
|
26
|
+
/** The live variant - an observable query, a WebSocket subscription, and a re-render when the read model changes. */ CompositeName["ObservableDataTable"] = "observableDataTable";
|
|
27
|
+
/** A form generated from a command's own property descriptors, so it follows the command rather than going stale. */ CompositeName["CommandForm"] = "commandForm";
|
|
28
|
+
/** A single-line text field bound to one command property. */ CompositeName["InputTextField"] = "inputTextField";
|
|
29
|
+
/** A numeric field bound to one command property. */ CompositeName["NumberField"] = "numberField";
|
|
30
|
+
/** A multi-line text field bound to one command property. */ CompositeName["TextAreaField"] = "textAreaField";
|
|
31
|
+
/** A single-selection field over a list the screen carries inline. */ CompositeName["DropdownField"] = "dropdownField";
|
|
32
|
+
/** A date field bound to one command property. */ CompositeName["CalendarField"] = "calendarField";
|
|
33
|
+
/** The Arc-aware dialog, whose result resolves through Arc's dialog context rather than through `visible` state. */ CompositeName["Dialog"] = "dialog";
|
|
34
|
+
/** A dialog whose confirm button *is* the command's execution - it submits, feeds validation back, and only closes on success. */ CompositeName["CommandDialog"] = "commandDialog";
|
|
35
|
+
/** The blocking spinner shown while a long-running command is in flight. */ CompositeName["BusyIndicatorDialog"] = "busyIndicatorDialog";
|
|
36
|
+
/** An icon, with the shorthand forms people actually write normalized into the class PrimeIcons expects. */ CompositeName["Icon"] = "icon";
|
|
37
|
+
/** A standalone selection control, not bound to a command property. */ CompositeName["Dropdown"] = "dropdown";
|
|
38
|
+
/** Scopes a failure to a region, so one broken widget does not take the screen with it. */ CompositeName["ErrorBoundary"] = "errorBoundary";
|
|
39
|
+
/** Renders an arbitrary JSON document against its schema, with a control per declared type. */ CompositeName["ObjectContentEditor"] = "objectContentEditor";
|
|
40
|
+
/** The trail that says where you are inside a nested document, and lets you climb back out. */ CompositeName["ObjectNavigationalBar"] = "objectNavigationalBar";
|
|
41
|
+
/** Edits a JSON schema as a typed property tree rather than as text. */ CompositeName["SchemaEditor"] = "schemaEditor";
|
|
42
|
+
/** Scrubs through successive versions of something on a timeline. */ CompositeName["TimeMachine"] = "timeMachine";
|
|
43
|
+
/** The filter toggle and the panel it anchors, as one placeable element. */ CompositeName["FilterPanel"] = "filterPanel";
|
|
44
|
+
/** The container for a tool palette, which also establishes the drag context its buttons read. */ CompositeName["Toolbar"] = "toolbar";
|
|
45
|
+
/** One button in a tool palette. */ CompositeName["ToolbarButton"] = "toolbarButton";
|
|
46
|
+
/** Related buttons kept together inside a toolbar. */ CompositeName["ToolbarGroup"] = "toolbarGroup";
|
|
47
|
+
/** The divider between groups of tools. */ CompositeName["ToolbarSeparator"] = "toolbarSeparator";
|
|
48
|
+
return CompositeName;
|
|
49
|
+
}({});
|
|
50
|
+
|
|
51
|
+
exports.CompositeName = CompositeName;
|
|
52
|
+
//# sourceMappingURL=CompositeName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompositeName.js","sources":["../../CompositeName.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\n/**\n * The `Cratis.Components` names this blueprint's templates are built from.\n *\n * These are not this package's names - `Cratis.Components` declares every one of them, and this blueprint\n * only writes them into its templates. They are collected here anyway, for two reasons.\n *\n * The first is the ordinary one: a bare name written inline is a magic string, and a typo in it renders as\n * a dashed red box in the middle of a screen with nothing pointing back at the template that caused it.\n *\n * The second is what makes this worth an enum rather than a comment. A spec asserts that every member\n * below appears in `cratisComponentsPackageManifest.components`, so this file is a standing check that\n * this blueprint and the component library it is built from still agree. If a name is ever renamed\n * upstream, that spec fails here rather than a screen failing silently in someone's application.\n *\n * A screen template writes bare names on purpose: `resolveComponentName` decides which active package\n * wins each one against the profile's priority order, so a template that qualified its names would pin\n * itself to one library and stop being a template.\n */\nexport enum CompositeName {\n /** The library's page primitive - a full-height column whose optional panel chrome matches everything inside it. */\n Page = 'page',\n\n /** The whole list-screen composite: title bar, menubar, filterable table and optional details pane, all from one query. */\n DataPage = 'dataPage',\n\n /** A table that performs a query, pages against the server, and wires filtering and sorting back into it. */\n DataTable = 'dataTable',\n\n /** The live variant - an observable query, a WebSocket subscription, and a re-render when the read model changes. */\n ObservableDataTable = 'observableDataTable',\n\n /** A form generated from a command's own property descriptors, so it follows the command rather than going stale. */\n CommandForm = 'commandForm',\n\n /** A single-line text field bound to one command property. */\n InputTextField = 'inputTextField',\n\n /** A numeric field bound to one command property. */\n NumberField = 'numberField',\n\n /** A multi-line text field bound to one command property. */\n TextAreaField = 'textAreaField',\n\n /** A single-selection field over a list the screen carries inline. */\n DropdownField = 'dropdownField',\n\n /** A date field bound to one command property. */\n CalendarField = 'calendarField',\n\n /** The Arc-aware dialog, whose result resolves through Arc's dialog context rather than through `visible` state. */\n Dialog = 'dialog',\n\n /** A dialog whose confirm button *is* the command's execution - it submits, feeds validation back, and only closes on success. */\n CommandDialog = 'commandDialog',\n\n /** The blocking spinner shown while a long-running command is in flight. */\n BusyIndicatorDialog = 'busyIndicatorDialog',\n\n /** An icon, with the shorthand forms people actually write normalized into the class PrimeIcons expects. */\n Icon = 'icon',\n\n /** A standalone selection control, not bound to a command property. */\n Dropdown = 'dropdown',\n\n /** Scopes a failure to a region, so one broken widget does not take the screen with it. */\n ErrorBoundary = 'errorBoundary',\n\n /** Renders an arbitrary JSON document against its schema, with a control per declared type. */\n ObjectContentEditor = 'objectContentEditor',\n\n /** The trail that says where you are inside a nested document, and lets you climb back out. */\n ObjectNavigationalBar = 'objectNavigationalBar',\n\n /** Edits a JSON schema as a typed property tree rather than as text. */\n SchemaEditor = 'schemaEditor',\n\n /** Scrubs through successive versions of something on a timeline. */\n TimeMachine = 'timeMachine',\n\n /** The filter toggle and the panel it anchors, as one placeable element. */\n FilterPanel = 'filterPanel',\n\n /** The container for a tool palette, which also establishes the drag context its buttons read. */\n Toolbar = 'toolbar',\n\n /** One button in a tool palette. */\n ToolbarButton = 'toolbarButton',\n\n /** Related buttons kept together inside a toolbar. */\n ToolbarGroup = 'toolbarGroup',\n\n /** The divider between groups of tools. */\n ToolbarSeparator = 'toolbarSeparator',\n}\n"],"names":["CompositeName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;IAkBO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;yHAC0G,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;gIAGO,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;kHAGd,aAAA,CAAA,WAAA,CAAA,GAAA,WAAA;0HAGQ,aAAA,CAAA,qBAAA,CAAA,GAAA,qBAAA;0HAGA,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;mEAGvD,aAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;0DAGT,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;kEAGQ,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;2EAGS,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;uDAGpB,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;yHAGkE,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;uIAGc,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;iFAGtD,aAAA,CAAA,qBAAA,CAAA,GAAA,qBAAA;iHAGgC,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;4EAGrC,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;gGAGoB,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;oGAGI,aAAA,CAAA,qBAAA,CAAA,GAAA,qBAAA;oGAGA,aAAA,CAAA,uBAAA,CAAA,GAAA,uBAAA;6EAGvB,aAAA,CAAA,cAAA,CAAA,GAAA,cAAA;0EAGH,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;iFAGO,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;uGAGsB,aAAA,CAAA,SAAA,CAAA,GAAA,SAAA;yCAG9D,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;2DAGkB,aAAA,CAAA,cAAA,CAAA,GAAA,cAAA;gDAGX,aAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;AAzEjCA,IAAAA,OAAAA,aAAAA;AA2EX,CAAA,CAAA,EAAA;;;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
var ComponentName = require('./ComponentName.js');
|
|
5
|
+
var componentsBlueprintComponents = require('./componentsBlueprintComponents.js');
|
|
6
|
+
require('./gallery/navigation.js');
|
|
7
|
+
require('@cratis/scene.blueprint.default');
|
|
8
|
+
var screens = require('./gallery/screens.js');
|
|
9
|
+
require('./gallery/previewProfile.js');
|
|
10
|
+
require('./gallery/GalleryScreenPreview.js');
|
|
11
|
+
require('react/jsx-runtime');
|
|
12
|
+
require('react');
|
|
13
|
+
require('@cratis/scene.react');
|
|
14
|
+
require('./templates/listTemplates.js');
|
|
15
|
+
require('./templates/workspaceTemplates.js');
|
|
16
|
+
require('./templates/commandTemplates.js');
|
|
17
|
+
require('./templates/editorTemplates.js');
|
|
18
|
+
require('./templates/nesting.js');
|
|
19
|
+
var dialogTemplates = require('./templates/dialogTemplates.js');
|
|
20
|
+
var screenTemplates = require('./templates/screenTemplates.js');
|
|
21
|
+
var packageName = require('./packageName.js');
|
|
22
|
+
|
|
23
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
24
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
25
|
+
/**
|
|
26
|
+
* This blueprint's declaration.
|
|
27
|
+
*
|
|
28
|
+
* Where the default blueprint answers "what does an application look like", this one answers "what does a
|
|
29
|
+
* *page* look like once it is bound to Arc". Its templates are whole pages already wired to the composites
|
|
30
|
+
* in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key
|
|
31
|
+
* and filter fields all decided, under a header that says what it is bound to. An application picks the
|
|
32
|
+
* template and supplies a query name.
|
|
33
|
+
*
|
|
34
|
+
* `layouts` is empty, and that is the most important line in this file.
|
|
35
|
+
*
|
|
36
|
+
* A layout is an application's base navigational shell, and an application has exactly one. This package
|
|
37
|
+
* deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,
|
|
38
|
+
* its slot vocabulary, its shell components and its themes. That is what the dependency on another
|
|
39
|
+
* blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth
|
|
40
|
+
* stating plainly rather than leaving to be inferred from an empty array.
|
|
41
|
+
*
|
|
42
|
+
* The alternative would have been to ship a second application shell. It would have looked like value and
|
|
43
|
+
* been the opposite: an application can activate only one shell, so the two blueprints would have become
|
|
44
|
+
* mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the
|
|
45
|
+
* themes and the navigation that the default blueprint already does well. Layering means both can be
|
|
46
|
+
* active at once, which is the only arrangement in which either is worth having.
|
|
47
|
+
*
|
|
48
|
+
* `themes` is empty for the same reason at a smaller scale: the shell being themed is the default
|
|
49
|
+
* blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting
|
|
50
|
+
* a look for a shell it does not own.
|
|
51
|
+
*/ const componentsBlueprintManifest = {
|
|
52
|
+
name: packageName.componentsBlueprintName,
|
|
53
|
+
version: '1.0.0',
|
|
54
|
+
kind: scene_model.PackageKind.Blueprint,
|
|
55
|
+
dependencies: [
|
|
56
|
+
{
|
|
57
|
+
name: 'Cratis.Blueprint.Default'
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Cratis.Components'
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
components: Object.values(ComponentName.ComponentName),
|
|
64
|
+
layouts: [],
|
|
65
|
+
screenTemplates: screenTemplates.componentsScreenTemplates.map((template)=>template.name),
|
|
66
|
+
dialogTemplates: dialogTemplates.componentsDialogTemplates.map((template)=>template.name),
|
|
67
|
+
themes: [],
|
|
68
|
+
displayName: 'Cratis Components Blueprint',
|
|
69
|
+
description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',
|
|
70
|
+
module: '@cratis/scene.blueprint.components'
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* This blueprint as a loadable bundle.
|
|
74
|
+
*
|
|
75
|
+
* The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and
|
|
76
|
+
* this package's specs run it - a manifest promising a template the bundle never provided is a failure that
|
|
77
|
+
* only shows up when someone picks that template and gets nothing.
|
|
78
|
+
*
|
|
79
|
+
* The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its
|
|
80
|
+
* chrome and one of these templates, so a preview boots them through the real engine as a working
|
|
81
|
+
* miniature application rather than a set of pictures. They render with unregistered bindings, which is the
|
|
82
|
+
* normal design-time state - the placeholders naming each wanted binding are exactly what should be there.
|
|
83
|
+
*/ const componentsBlueprint = {
|
|
84
|
+
manifest: componentsBlueprintManifest,
|
|
85
|
+
components: componentsBlueprintComponents.componentsBlueprintComponents,
|
|
86
|
+
screenTemplates: screenTemplates.componentsScreenTemplates,
|
|
87
|
+
dialogTemplates: dialogTemplates.componentsDialogTemplates,
|
|
88
|
+
screens: screens.componentsGalleryScreens
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
exports.componentsBlueprint = componentsBlueprint;
|
|
92
|
+
exports.componentsBlueprintManifest = componentsBlueprintManifest;
|
|
93
|
+
//# sourceMappingURL=componentsBlueprint.js.map
|