@cratis/scene.blueprint.components 2.0.0 → 3.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.
@@ -2,20 +2,16 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import type { Preview } from '@storybook/react';
5
+ import { PrimeReactProvider } from '@primereact/core';
5
6
  import { CratisComponentsProvider } from '@cratis/components/Common';
6
7
 
7
- // The stylesheet layers a page in this blueprint needs, in the order they resolve. PrimeReact 11 ships
8
- // zero CSS - `primereact/resources/themes/*` does not exist any more - and `@cratis/components` 3.0.0 took
9
- // its own CSS out of the JavaScript module graph, so every sheet below is an explicit import rather than
10
- // something a bundler injects behind an `import './Foo.css'`.
8
+ // The stylesheet layers a page in this blueprint needs, in the order they resolve. Components 4 owns its
9
+ // own CSS outright and keeps it out of the JavaScript module graph, so every sheet below is an explicit
10
+ // import rather than something a bundler injects behind an `import './Foo.css'`.
11
11
  //
12
12
  // `tokens` defines the `--cratis-*` layer, `styles` is every component stylesheet plus the Tailwind
13
13
  // utilities that consume it, and `theme` is the Cratis-authored MIT baseline that assigns those tokens
14
- // actual values. That order matters: the last two both read the first. `theme` is what gives this preview
15
- // a look at all, because with no `@primeuix/themes` preset there are no `--p-*` values for the tokens to
16
- // resolve to - which also means the raw PrimeReact widgets the default blueprint's shell renders come out
17
- // structural rather than styled. That is the honest picture of an unstyled-first host, and this package
18
- // takes no dependency on a preset to paper over it.
14
+ // actual values. That order matters: the last two both read the first.
19
15
  //
20
16
  // The Scene package's bridge puts Scene's `--scene-*` tokens in front of that, and the default blueprint's
21
17
  // `layout.css` draws the shell every one of these pages sits inside - which is the sheet this package does
@@ -31,24 +27,31 @@ import 'primeicons/primeicons.css';
31
27
  import '../../components/theme/sceneTokenBridge.css';
32
28
  import '../../blueprint.default/shell/layout.css';
33
29
 
30
+ // The baseline theme is scoped to a `cratis-theme` ancestor rather than to `:root`, so something has to
31
+ // carry the class, and overlays portal to the body rather than into the story's subtree.
32
+ document.body.classList.add('cratis-theme');
33
+
34
34
  /**
35
- * Every story renders inside `CratisComponentsProvider`, the library's own configuration provider over
36
- * PrimeReact's. Without it the wrapped components fall back to PrimeReact's defaults rather than Cratis',
37
- * so a story would show something subtly different from what an application renders - which defeats the
38
- * point of having stories at all.
35
+ * Two providers, because these pages are two things at once.
36
+ *
37
+ * The page bodies are Components 4, which owns its own markup and configuration and no longer sits on
38
+ * PrimeReact at all - `CratisComponentsProvider` now carries only what the library itself owns.
39
39
  *
40
- * On PrimeReact 11 it is also load-bearing rather than merely advisable: every v11 component resolves its
41
- * configuration, theme and z-index registry through `PrimeReactProvider`, which this wraps, and throws
42
- * outright without one. These pages sit inside the default blueprint's shell, which reaches for PrimeReact
43
- * directly in five places, so removing this decorator would not degrade the stories - it would stop them
44
- * rendering.
40
+ * The shell they sit inside is the default blueprint's, and that reaches for PrimeReact directly in five
41
+ * places (`Topbar`, `Sidebar`, `Breadcrumb`, `UserMenu`, `ConfigPanel`). Every PrimeReact 11 component
42
+ * resolves its configuration, theme and z-index registry through `PrimeReactProvider` and throws without
43
+ * one. Until Components 3 that provider came for free, because `CratisComponentsProvider` wrapped it;
44
+ * under Components 4 it does not, so this preview supplies it explicitly. Dropping it would not degrade
45
+ * these stories - it would stop them rendering.
45
46
  */
46
47
  const preview: Preview = {
47
48
  decorators: [
48
49
  Story => (
49
- <CratisComponentsProvider>
50
- <Story />
51
- </CratisComponentsProvider>
50
+ <PrimeReactProvider>
51
+ <CratisComponentsProvider value={{ locale: 'en-US' }}>
52
+ <Story />
53
+ </CratisComponentsProvider>
54
+ </PrimeReactProvider>
52
55
  ),
53
56
  ],
54
57
  parameters: {
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Scene
2
2
 
3
+ **Describing a user interface without describing a platform** — Scene is the UI model of the Cratis
4
+ model-first layer (experimental).
5
+
3
6
  The object model and runtime for Screenplay-based UIs: `Scene.Model` (platform-agnostic screens, layouts,
4
7
  forms, contribution points, ui profiles and themes), `Scene.Engine` (binding/resolution runtime), and
5
8
  `Scene.React` (the React renderer).
@@ -18,8 +21,13 @@ forms, contribution points, ui profiles and themes), `Scene.Engine` (binding/res
18
21
 
19
22
  ## Description
20
23
 
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
24
+ Scene owns the *object model and runtime* half of the Screenplay stack. In the model-first pipeline,
25
+ [Screenplay](https://github.com/Cratis/Screenplay) describes an event-sourced, CQRS system,
26
+ [Stage](https://github.com/Cratis/Stage) renders it into a running application, and Scene is how that
27
+ application's user interface is described — independently of any rendering platform.
28
+
29
+ `Scene.Model` is the platform-agnostic
30
+ C# object model that [Stage](https://github.com/Cratis/Stage) translates Screenplay's parsed language constructs into, and that [Studio](https://github.com/Cratis/Studio)'s
23
31
  design-time tooling reads and writes. `Scene.Engine` walks that graph, resolves bindings (data, action, form,
24
32
  navigation contribution) and drives whichever renderer is plugged in — it does not know React exists.
25
33
  `Scene.React` is one renderer implementing the abstract vocabulary against real React/DOM; sibling positions
@@ -38,3 +46,22 @@ Cratis is an open community, and we are glad to help users, teams evaluating the
38
46
  | Discord | Join the community on [Discord](https://discord.gg/kt4AMpV8WV) for questions and discussions |
39
47
  | GitHub Issues | [Report bugs or request features](https://github.com/Cratis/Scene/issues) |
40
48
  | Documentation | Read the docs at [cratis.io](https://cratis.io) |
49
+
50
+ ## The Cratis ecosystem
51
+
52
+ This project is part of [Cratis](https://www.cratis.io) — free, MIT-licensed tools for building event-sourced and CQRS applications.
53
+
54
+ - **[Chronicle](https://github.com/Cratis/Chronicle)** — event-sourcing database and runtime. Orleans-based kernel, pluggable storage (MongoDB default; PostgreSQL, SQL Server, SQLite, in-memory), language-agnostic gRPC contracts. [Docs](https://www.cratis.io/chronicle/)
55
+ - **Chronicle clients** — first-class [.NET SDK](https://github.com/Cratis/Chronicle), plus [TypeScript](https://github.com/Cratis/Chronicle.TypeScript), [Kotlin/Java](https://github.com/Cratis/Chronicle.Kotlin), and [Elixir](https://github.com/Cratis/Chronicle.Elixir); [Python](https://github.com/Cratis/Chronicle.Python) coming soon (pre-alpha). AI agents connect through the [Chronicle MCP server](https://github.com/Cratis/Chronicle.Mcp).
56
+ - **[Arc](https://github.com/Cratis/Arc)** — opinionated CQRS framework for ASP.NET Core with commands, queries, validation, authorization, and TypeScript proxy generation. Works without event sourcing. [Docs](https://www.cratis.io/arc/)
57
+ - **[Components](https://github.com/Cratis/Components)** — React components aligned with Arc patterns. [Docs](https://www.cratis.io/components/)
58
+ - **[CLI](https://github.com/Cratis/cli) + Workbench** — inspect and diagnose Chronicle from the terminal or the browser. [Docs](https://www.cratis.io/cli/)
59
+ - **Model-first layer (experimental)** — [Studio](https://github.com/Cratis/Studio), [Screenplay](https://github.com/Cratis/Screenplay), [Stage](https://github.com/Cratis/Stage), Scene (this repository), [Prologue](https://github.com/Cratis/Prologue)
60
+ - **Supporting** — [Fundamentals](https://github.com/Cratis/Fundamentals), [Specifications](https://github.com/Cratis/Specifications), [Synopsis](https://github.com/Cratis/Synopsis), [Lens](https://github.com/Cratis/Lens), [Narrator](https://github.com/Cratis/Narrator), and free [AI tooling](https://github.com/Cratis/AI) (preview); [Ensemble](https://github.com/Cratis/Ensemble) coming soon (pre-release)
61
+ - **[Samples](https://github.com/Cratis/Samples)** — runnable event sourcing and CQRS samples for the whole stack
62
+
63
+ Everything Cratis publishes today is MIT licensed and free to use.
64
+
65
+ ---
66
+
67
+ Part of the [Cratis](https://www.cratis.io) platform · [MIT](./LICENSE)
@@ -49,6 +49,8 @@ export const componentsBlueprintManifest: ScenePackage = {
49
49
  displayName: 'Cratis Components Blueprint',
50
50
  description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',
51
51
  module: '@cratis/scene.blueprint.components',
52
+ license: 'MIT',
53
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
52
54
  };
53
55
 
54
56
  /**
@@ -67,7 +67,9 @@ var packageName = require('./packageName.js');
67
67
  themes: [],
68
68
  displayName: 'Cratis Components Blueprint',
69
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'
70
+ module: '@cratis/scene.blueprint.components',
71
+ license: 'MIT',
72
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
71
73
  };
72
74
  /**
73
75
  * This blueprint as a loadable bundle.
@@ -1 +1 @@
1
- {"version":3,"file":"componentsBlueprint.js","sources":["../../componentsBlueprint.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 { ComponentName } from './ComponentName';\nimport { componentsBlueprintComponents } from './componentsBlueprintComponents';\nimport { componentsGalleryScreens } from './gallery';\nimport { componentsBlueprintName } from './packageName';\nimport { componentsDialogTemplates, componentsScreenTemplates } from './templates';\n\n/**\n * This blueprint's declaration.\n *\n * Where the default blueprint answers \"what does an application look like\", this one answers \"what does a\n * *page* look like once it is bound to Arc\". Its templates are whole pages already wired to the composites\n * in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key\n * and filter fields all decided, under a header that says what it is bound to. An application picks the\n * template and supplies a query name.\n *\n * `layouts` is empty, and that is the most important line in this file.\n *\n * A layout is an application's base navigational shell, and an application has exactly one. This package\n * deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,\n * its slot vocabulary, its shell components and its themes. That is what the dependency on another\n * blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth\n * stating plainly rather than leaving to be inferred from an empty array.\n *\n * The alternative would have been to ship a second application shell. It would have looked like value and\n * been the opposite: an application can activate only one shell, so the two blueprints would have become\n * mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the\n * themes and the navigation that the default blueprint already does well. Layering means both can be\n * active at once, which is the only arrangement in which either is worth having.\n *\n * `themes` is empty for the same reason at a smaller scale: the shell being themed is the default\n * blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting\n * a look for a shell it does not own.\n */\nexport const componentsBlueprintManifest: ScenePackage = {\n name: componentsBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: [],\n screenTemplates: componentsScreenTemplates.map(template => template.name),\n dialogTemplates: componentsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Cratis Components Blueprint',\n description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',\n module: '@cratis/scene.blueprint.components',\n};\n\n/**\n * This blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a template the bundle never provided is a failure that\n * only shows up when someone picks that template and gets nothing.\n *\n * The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its\n * chrome and one of these templates, so a preview boots them through the real engine as a working\n * miniature application rather than a set of pictures. They render with unregistered bindings, which is the\n * normal design-time state - the placeholders naming each wanted binding are exactly what should be there.\n */\nexport const componentsBlueprint: ScenePackageBundle = {\n manifest: componentsBlueprintManifest,\n components: componentsBlueprintComponents,\n screenTemplates: componentsScreenTemplates,\n dialogTemplates: componentsDialogTemplates,\n screens: componentsGalleryScreens,\n};\n"],"names":["componentsBlueprintManifest","name","componentsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","components","Object","values","ComponentName","layouts","screenTemplates","componentsScreenTemplates","map","template","dialogTemplates","componentsDialogTemplates","themes","displayName","description","module","componentsBlueprint","manifest","componentsBlueprintComponents","screens","componentsGalleryScreens"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BaA,2BAAAA,GAA4C;IACrDC,IAAAA,EAAMC,mCAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM;AAA2B,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAoB;AAAE,KAAA;IACnFO,UAAAA,EAAYC,MAAAA,CAAOC,MAAM,CAACC,2BAAAA,CAAAA;AAC1BC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,0CAA0BC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEgB,IAAAA,eAAAA,EAAiBC,0CAA0BH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEkB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,6BAAA;IACbC,WAAAA,EAAa,kIAAA;IACbC,MAAAA,EAAQ;AACZ;AAEA;;;;;;;;;;;UAYaC,mBAAAA,GAA0C;IACnDC,QAAAA,EAAUxB,2BAAAA;IACVQ,UAAAA,EAAYiB,2DAAAA;IACZZ,eAAAA,EAAiBC,yCAAAA;IACjBG,eAAAA,EAAiBC,yCAAAA;IACjBQ,OAAAA,EAASC;AACb;;;;;"}
1
+ {"version":3,"file":"componentsBlueprint.js","sources":["../../componentsBlueprint.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 { ComponentName } from './ComponentName';\nimport { componentsBlueprintComponents } from './componentsBlueprintComponents';\nimport { componentsGalleryScreens } from './gallery';\nimport { componentsBlueprintName } from './packageName';\nimport { componentsDialogTemplates, componentsScreenTemplates } from './templates';\n\n/**\n * This blueprint's declaration.\n *\n * Where the default blueprint answers \"what does an application look like\", this one answers \"what does a\n * *page* look like once it is bound to Arc\". Its templates are whole pages already wired to the composites\n * in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key\n * and filter fields all decided, under a header that says what it is bound to. An application picks the\n * template and supplies a query name.\n *\n * `layouts` is empty, and that is the most important line in this file.\n *\n * A layout is an application's base navigational shell, and an application has exactly one. This package\n * deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,\n * its slot vocabulary, its shell components and its themes. That is what the dependency on another\n * blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth\n * stating plainly rather than leaving to be inferred from an empty array.\n *\n * The alternative would have been to ship a second application shell. It would have looked like value and\n * been the opposite: an application can activate only one shell, so the two blueprints would have become\n * mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the\n * themes and the navigation that the default blueprint already does well. Layering means both can be\n * active at once, which is the only arrangement in which either is worth having.\n *\n * `themes` is empty for the same reason at a smaller scale: the shell being themed is the default\n * blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting\n * a look for a shell it does not own.\n */\nexport const componentsBlueprintManifest: ScenePackage = {\n name: componentsBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: [],\n screenTemplates: componentsScreenTemplates.map(template => template.name),\n dialogTemplates: componentsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Cratis Components Blueprint',\n description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',\n module: '@cratis/scene.blueprint.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * This blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a template the bundle never provided is a failure that\n * only shows up when someone picks that template and gets nothing.\n *\n * The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its\n * chrome and one of these templates, so a preview boots them through the real engine as a working\n * miniature application rather than a set of pictures. They render with unregistered bindings, which is the\n * normal design-time state - the placeholders naming each wanted binding are exactly what should be there.\n */\nexport const componentsBlueprint: ScenePackageBundle = {\n manifest: componentsBlueprintManifest,\n components: componentsBlueprintComponents,\n screenTemplates: componentsScreenTemplates,\n dialogTemplates: componentsDialogTemplates,\n screens: componentsGalleryScreens,\n};\n"],"names":["componentsBlueprintManifest","name","componentsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","components","Object","values","ComponentName","layouts","screenTemplates","componentsScreenTemplates","map","template","dialogTemplates","componentsDialogTemplates","themes","displayName","description","module","license","licenseUrl","componentsBlueprint","manifest","componentsBlueprintComponents","screens","componentsGalleryScreens"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BaA,2BAAAA,GAA4C;IACrDC,IAAAA,EAAMC,mCAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM;AAA2B,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAoB;AAAE,KAAA;IACnFO,UAAAA,EAAYC,MAAAA,CAAOC,MAAM,CAACC,2BAAAA,CAAAA;AAC1BC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,0CAA0BC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEgB,IAAAA,eAAAA,EAAiBC,0CAA0BH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEkB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,6BAAA;IACbC,WAAAA,EAAa,kIAAA;IACbC,MAAAA,EAAQ,oCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;;;;;;UAYaC,mBAAAA,GAA0C;IACnDC,QAAAA,EAAU1B,2BAAAA;IACVQ,UAAAA,EAAYmB,2DAAAA;IACZd,eAAAA,EAAiBC,yCAAAA;IACjBG,eAAAA,EAAiBC,yCAAAA;IACjBU,OAAAA,EAASC;AACb;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"componentsBlueprint.d.ts","sourceRoot":"","sources":["../../componentsBlueprint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAkCzD,eAAO,MAAM,2BAA2B,EAAE,YAazC,CAAC;AAcF,eAAO,MAAM,mBAAmB,EAAE,kBAMjC,CAAC"}
1
+ {"version":3,"file":"componentsBlueprint.d.ts","sourceRoot":"","sources":["../../componentsBlueprint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAkCzD,eAAO,MAAM,2BAA2B,EAAE,YAezC,CAAC;AAcF,eAAO,MAAM,mBAAmB,EAAE,kBAMjC,CAAC"}
@@ -65,7 +65,9 @@ import { componentsBlueprintName } from './packageName.js';
65
65
  themes: [],
66
66
  displayName: 'Cratis Components Blueprint',
67
67
  description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',
68
- module: '@cratis/scene.blueprint.components'
68
+ module: '@cratis/scene.blueprint.components',
69
+ license: 'MIT',
70
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
69
71
  };
70
72
  /**
71
73
  * This blueprint as a loadable bundle.
@@ -1 +1 @@
1
- {"version":3,"file":"componentsBlueprint.js","sources":["../../componentsBlueprint.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 { ComponentName } from './ComponentName';\nimport { componentsBlueprintComponents } from './componentsBlueprintComponents';\nimport { componentsGalleryScreens } from './gallery';\nimport { componentsBlueprintName } from './packageName';\nimport { componentsDialogTemplates, componentsScreenTemplates } from './templates';\n\n/**\n * This blueprint's declaration.\n *\n * Where the default blueprint answers \"what does an application look like\", this one answers \"what does a\n * *page* look like once it is bound to Arc\". Its templates are whole pages already wired to the composites\n * in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key\n * and filter fields all decided, under a header that says what it is bound to. An application picks the\n * template and supplies a query name.\n *\n * `layouts` is empty, and that is the most important line in this file.\n *\n * A layout is an application's base navigational shell, and an application has exactly one. This package\n * deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,\n * its slot vocabulary, its shell components and its themes. That is what the dependency on another\n * blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth\n * stating plainly rather than leaving to be inferred from an empty array.\n *\n * The alternative would have been to ship a second application shell. It would have looked like value and\n * been the opposite: an application can activate only one shell, so the two blueprints would have become\n * mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the\n * themes and the navigation that the default blueprint already does well. Layering means both can be\n * active at once, which is the only arrangement in which either is worth having.\n *\n * `themes` is empty for the same reason at a smaller scale: the shell being themed is the default\n * blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting\n * a look for a shell it does not own.\n */\nexport const componentsBlueprintManifest: ScenePackage = {\n name: componentsBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: [],\n screenTemplates: componentsScreenTemplates.map(template => template.name),\n dialogTemplates: componentsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Cratis Components Blueprint',\n description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',\n module: '@cratis/scene.blueprint.components',\n};\n\n/**\n * This blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a template the bundle never provided is a failure that\n * only shows up when someone picks that template and gets nothing.\n *\n * The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its\n * chrome and one of these templates, so a preview boots them through the real engine as a working\n * miniature application rather than a set of pictures. They render with unregistered bindings, which is the\n * normal design-time state - the placeholders naming each wanted binding are exactly what should be there.\n */\nexport const componentsBlueprint: ScenePackageBundle = {\n manifest: componentsBlueprintManifest,\n components: componentsBlueprintComponents,\n screenTemplates: componentsScreenTemplates,\n dialogTemplates: componentsDialogTemplates,\n screens: componentsGalleryScreens,\n};\n"],"names":["componentsBlueprintManifest","name","componentsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","components","Object","values","ComponentName","layouts","screenTemplates","componentsScreenTemplates","map","template","dialogTemplates","componentsDialogTemplates","themes","displayName","description","module","componentsBlueprint","manifest","componentsBlueprintComponents","screens","componentsGalleryScreens"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BaA,2BAAAA,GAA4C;IACrDC,IAAAA,EAAMC,uBAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM;AAA2B,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAoB;AAAE,KAAA;IACnFO,UAAAA,EAAYC,MAAAA,CAAOC,MAAM,CAACC,aAAAA,CAAAA;AAC1BC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,0BAA0BC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEgB,IAAAA,eAAAA,EAAiBC,0BAA0BH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEkB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,6BAAA;IACbC,WAAAA,EAAa,kIAAA;IACbC,MAAAA,EAAQ;AACZ;AAEA;;;;;;;;;;;UAYaC,mBAAAA,GAA0C;IACnDC,QAAAA,EAAUxB,2BAAAA;IACVQ,UAAAA,EAAYiB,6BAAAA;IACZZ,eAAAA,EAAiBC,yBAAAA;IACjBG,eAAAA,EAAiBC,yBAAAA;IACjBQ,OAAAA,EAASC;AACb;;;;"}
1
+ {"version":3,"file":"componentsBlueprint.js","sources":["../../componentsBlueprint.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 { ComponentName } from './ComponentName';\nimport { componentsBlueprintComponents } from './componentsBlueprintComponents';\nimport { componentsGalleryScreens } from './gallery';\nimport { componentsBlueprintName } from './packageName';\nimport { componentsDialogTemplates, componentsScreenTemplates } from './templates';\n\n/**\n * This blueprint's declaration.\n *\n * Where the default blueprint answers \"what does an application look like\", this one answers \"what does a\n * *page* look like once it is bound to Arc\". Its templates are whole pages already wired to the composites\n * in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key\n * and filter fields all decided, under a header that says what it is bound to. An application picks the\n * template and supplies a query name.\n *\n * `layouts` is empty, and that is the most important line in this file.\n *\n * A layout is an application's base navigational shell, and an application has exactly one. This package\n * deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,\n * its slot vocabulary, its shell components and its themes. That is what the dependency on another\n * blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth\n * stating plainly rather than leaving to be inferred from an empty array.\n *\n * The alternative would have been to ship a second application shell. It would have looked like value and\n * been the opposite: an application can activate only one shell, so the two blueprints would have become\n * mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the\n * themes and the navigation that the default blueprint already does well. Layering means both can be\n * active at once, which is the only arrangement in which either is worth having.\n *\n * `themes` is empty for the same reason at a smaller scale: the shell being themed is the default\n * blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting\n * a look for a shell it does not own.\n */\nexport const componentsBlueprintManifest: ScenePackage = {\n name: componentsBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: [],\n screenTemplates: componentsScreenTemplates.map(template => template.name),\n dialogTemplates: componentsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Cratis Components Blueprint',\n description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',\n module: '@cratis/scene.blueprint.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * This blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a template the bundle never provided is a failure that\n * only shows up when someone picks that template and gets nothing.\n *\n * The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its\n * chrome and one of these templates, so a preview boots them through the real engine as a working\n * miniature application rather than a set of pictures. They render with unregistered bindings, which is the\n * normal design-time state - the placeholders naming each wanted binding are exactly what should be there.\n */\nexport const componentsBlueprint: ScenePackageBundle = {\n manifest: componentsBlueprintManifest,\n components: componentsBlueprintComponents,\n screenTemplates: componentsScreenTemplates,\n dialogTemplates: componentsDialogTemplates,\n screens: componentsGalleryScreens,\n};\n"],"names":["componentsBlueprintManifest","name","componentsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","components","Object","values","ComponentName","layouts","screenTemplates","componentsScreenTemplates","map","template","dialogTemplates","componentsDialogTemplates","themes","displayName","description","module","license","licenseUrl","componentsBlueprint","manifest","componentsBlueprintComponents","screens","componentsGalleryScreens"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BaA,2BAAAA,GAA4C;IACrDC,IAAAA,EAAMC,uBAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM;AAA2B,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAoB;AAAE,KAAA;IACnFO,UAAAA,EAAYC,MAAAA,CAAOC,MAAM,CAACC,aAAAA,CAAAA;AAC1BC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,0BAA0BC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEgB,IAAAA,eAAAA,EAAiBC,0BAA0BH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEkB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,6BAAA;IACbC,WAAAA,EAAa,kIAAA;IACbC,MAAAA,EAAQ,oCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;;;;;;UAYaC,mBAAAA,GAA0C;IACnDC,QAAAA,EAAU1B,2BAAAA;IACVQ,UAAAA,EAAYmB,6BAAAA;IACZd,eAAAA,EAAiBC,yBAAAA;IACjBG,eAAAA,EAAiBC,yBAAAA;IACjBU,OAAAA,EAASC;AACb;;;;"}