@cratis/scene.react 4.2.1 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/SceneElementView.tsx +13 -4
  2. package/core/CoreNavigationBar.tsx +53 -0
  3. package/core/coreComponents.ts +2 -0
  4. package/core/coreDescriptors.ts +75 -0
  5. package/core/corePackage.ts +3 -0
  6. package/core/index.ts +2 -0
  7. package/dist/cjs/SceneElementView.js +6 -2
  8. package/dist/cjs/SceneElementView.js.map +1 -1
  9. package/dist/cjs/core/CoreNavigationBar.js +49 -0
  10. package/dist/cjs/core/CoreNavigationBar.js.map +1 -0
  11. package/dist/cjs/core/coreComponents.js +3 -1
  12. package/dist/cjs/core/coreComponents.js.map +1 -1
  13. package/dist/cjs/core/coreDescriptors.js +162 -0
  14. package/dist/cjs/core/coreDescriptors.js.map +1 -0
  15. package/dist/cjs/core/corePackage.js +5 -2
  16. package/dist/cjs/core/corePackage.js.map +1 -1
  17. package/dist/cjs/index.js +4 -0
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/packages/ScenePackageBundle.js +33 -1
  20. package/dist/cjs/packages/ScenePackageBundle.js.map +1 -1
  21. package/dist/esm/SceneElementView.d.ts +3 -2
  22. package/dist/esm/SceneElementView.d.ts.map +1 -1
  23. package/dist/esm/SceneElementView.js +7 -3
  24. package/dist/esm/SceneElementView.js.map +1 -1
  25. package/dist/esm/core/CoreNavigationBar.d.ts +3 -0
  26. package/dist/esm/core/CoreNavigationBar.d.ts.map +1 -0
  27. package/dist/esm/core/CoreNavigationBar.js +47 -0
  28. package/dist/esm/core/CoreNavigationBar.js.map +1 -0
  29. package/dist/esm/core/coreComponents.d.ts.map +1 -1
  30. package/dist/esm/core/coreComponents.js +3 -1
  31. package/dist/esm/core/coreComponents.js.map +1 -1
  32. package/dist/esm/core/coreDescriptors.d.ts +3 -0
  33. package/dist/esm/core/coreDescriptors.d.ts.map +1 -0
  34. package/dist/esm/core/coreDescriptors.js +160 -0
  35. package/dist/esm/core/coreDescriptors.js.map +1 -0
  36. package/dist/esm/core/corePackage.d.ts.map +1 -1
  37. package/dist/esm/core/corePackage.js +5 -2
  38. package/dist/esm/core/corePackage.js.map +1 -1
  39. package/dist/esm/core/index.d.ts +2 -0
  40. package/dist/esm/core/index.d.ts.map +1 -1
  41. package/dist/esm/core/index.js +2 -0
  42. package/dist/esm/core/index.js.map +1 -1
  43. package/dist/esm/index.js +2 -0
  44. package/dist/esm/index.js.map +1 -1
  45. package/dist/esm/packages/ScenePackageBundle.d.ts +2 -1
  46. package/dist/esm/packages/ScenePackageBundle.d.ts.map +1 -1
  47. package/dist/esm/packages/ScenePackageBundle.js +33 -1
  48. package/dist/esm/packages/ScenePackageBundle.js.map +1 -1
  49. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  50. package/package.json +5 -5
  51. package/packages/ScenePackageBundle.ts +49 -2
@@ -2,21 +2,30 @@
2
2
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
 
4
4
  import { useMemo } from 'react';
5
- import { renderElement, BindingResolver } from '@cratis/scene.engine';
6
- import { SceneElement } from '@cratis/scene.model';
5
+ import { applyEffectiveConfiguration, renderElement, BindingResolver } from '@cratis/scene.engine';
6
+ import { EffectiveConfiguration, SceneElement } from '@cratis/scene.model';
7
7
  import { ComponentRegistry, createReactRenderer } from './renderer';
8
8
 
9
9
  export interface SceneElementViewProps {
10
10
  element: SceneElement;
11
11
  registry: ComponentRegistry;
12
12
  resolveBinding: BindingResolver;
13
+
14
+ /**
15
+ * The resolved configuration of the template chain the element sits in, from `resolveEffectiveConfiguration`.
16
+ * When given, each configurable component renders with its resolved properties - what a screen's own values add
17
+ * to an inherited template. It is the same data the editor shows, and the same code path whether the screen is
18
+ * being edited or played: there is no design-time mode.
19
+ */
20
+ configuration?: EffectiveConfiguration;
13
21
  }
14
22
 
15
23
  /**
16
24
  * Renders a Scene element tree with the real `Scene.React` renderer - the WYSIWYG building block Studio's
17
25
  * preview surface and Stage's shipped web bundle both consume unmodified.
18
26
  */
19
- export function SceneElementView({ element, registry, resolveBinding }: SceneElementViewProps) {
27
+ export function SceneElementView({ element, registry, resolveBinding, configuration }: SceneElementViewProps) {
20
28
  const renderer = useMemo(() => createReactRenderer(registry), [registry]);
21
- return <>{renderElement(element, renderer, resolveBinding)}</>;
29
+ const configured = useMemo(() => configuration ? applyEffectiveConfiguration(element, configuration) : element, [element, configuration]);
30
+ return <>{renderElement(configured, renderer, resolveBinding)}</>;
22
31
  }
@@ -0,0 +1,53 @@
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 { RegisteredComponentProps } from '../renderer';
5
+
6
+ interface NavigationBarItem {
7
+ id: string;
8
+ label: string;
9
+ icon?: { library: string; key: string; variant?: string };
10
+ destination?: { screen: string };
11
+ }
12
+
13
+ function isNavigationBarItem(value: unknown): value is NavigationBarItem {
14
+ const candidate = value as Partial<NavigationBarItem> | null;
15
+ return candidate !== null && typeof candidate === 'object' && typeof candidate.id === 'string' && typeof candidate.label === 'string';
16
+ }
17
+
18
+ /**
19
+ * The `core:navigationBar` component: a list of navigation items, the first of which a template author normally
20
+ * fixes as Home and the rest of which consumers of the template can add to.
21
+ *
22
+ * It reads `items` from the property bag it is given and nothing else, so it renders the same whether a screen is
23
+ * being played or edited - configuration is resolved into the bag before it gets here. An item names its destination
24
+ * as a screen, and activating it emits a host-neutral navigation event, the same as `core:navigate`. An item's icon
25
+ * is carried on the node as data attributes for a host to render; icon catalogs are not this component's business.
26
+ */
27
+ export function CoreNavigationBar({ element }: RegisteredComponentProps) {
28
+ const items = Array.isArray(element.properties.items) ? element.properties.items.filter(isNavigationBarItem) : [];
29
+ const title = typeof element.properties.title === 'string' ? element.properties.title : undefined;
30
+
31
+ return (
32
+ <nav data-scene-id={element.id} aria-label={title}>
33
+ {items.map(item => {
34
+ const targetScreen = item.destination?.screen ?? '';
35
+ const navigate = () => globalThis.dispatchEvent(new CustomEvent('cratis.scene.navigate', { detail: { targetScreen, element, item } }));
36
+ return (
37
+ <button
38
+ key={item.id}
39
+ type='button'
40
+ data-scene-item={item.id}
41
+ data-scene-icon-library={item.icon?.library}
42
+ data-scene-icon-key={item.icon?.key}
43
+ data-scene-icon-variant={item.icon?.variant}
44
+ disabled={targetScreen === ''}
45
+ onClick={navigate}
46
+ >
47
+ {item.label}
48
+ </button>
49
+ );
50
+ })}
51
+ </nav>
52
+ );
53
+ }
@@ -6,6 +6,7 @@ import { componentRegistryKey } from '../packages';
6
6
  import { CoreText } from './CoreText';
7
7
  import { CoreButton } from './CoreButton';
8
8
  import { CoreCard } from './CoreCard';
9
+ import { CoreNavigationBar } from './CoreNavigationBar';
9
10
  import {
10
11
  CoreAction,
11
12
  CoreCode,
@@ -39,4 +40,5 @@ export const coreComponents: ComponentRegistry = {
39
40
  [componentRegistryKey('core', 'field')]: CoreField,
40
41
  [componentRegistryKey('core', 'code')]: CoreCode,
41
42
  [componentRegistryKey('core', 'file')]: CoreFile,
43
+ [componentRegistryKey('core', 'navigationBar')]: CoreNavigationBar,
42
44
  };
@@ -0,0 +1,75 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { ComponentDescriptor, PropertyValueType } from '@cratis/scene.model';
5
+ import { componentRegistryKey } from '../packages';
6
+
7
+ const key = (name: string) => componentRegistryKey('core', name);
8
+
9
+ /**
10
+ * What can be edited on the `core` package's components.
11
+ *
12
+ * Only the components an author configures by hand are described: a button's label, an action's command and its
13
+ * argument mapping, a column's heading, and the navigation bar. The Screenplay structural components - `data`,
14
+ * `section`, `summary` - have nothing to edit that is not already a node in the tree.
15
+ */
16
+ export const coreDescriptors: ComponentDescriptor[] = [
17
+ {
18
+ component: key('button'),
19
+ displayName: 'Button',
20
+ properties: [
21
+ { path: 'label', label: 'Label', group: 'Content', valueType: PropertyValueType.String, default: '' },
22
+ ],
23
+ },
24
+ {
25
+ component: key('action'),
26
+ displayName: 'Command action',
27
+ description: 'Invokes a modeled command. The command and its argument mapping are stored on the element; the host that handles the command event reads them.',
28
+ properties: [
29
+ { path: 'label', label: 'Label', group: 'Content', valueType: PropertyValueType.String },
30
+ {
31
+ path: 'command', label: 'Command', group: 'Behavior', valueType: PropertyValueType.String,
32
+ editorKind: 'stateChangeReference', constraints: { required: true },
33
+ description: 'The state change this action submits.',
34
+ },
35
+ {
36
+ path: 'arguments', label: 'Argument mapping', group: 'Behavior', valueType: PropertyValueType.Collection,
37
+ description: 'Where each command argument comes from.',
38
+ item: {
39
+ label: 'Argument',
40
+ properties: [
41
+ { path: 'name', label: 'Argument', group: 'Behavior', valueType: PropertyValueType.String, constraints: { required: true } },
42
+ { path: 'source', label: 'Source', group: 'Behavior', valueType: PropertyValueType.String, editorKind: 'bindingPath', constraints: { required: true } },
43
+ ],
44
+ },
45
+ },
46
+ ],
47
+ },
48
+ {
49
+ component: key('column'),
50
+ displayName: 'Table column',
51
+ properties: [
52
+ { path: 'property', label: 'Result field', group: 'Data', valueType: PropertyValueType.String, editorKind: 'resultField', constraints: { required: true } },
53
+ { path: 'label', label: 'Heading', group: 'Content', valueType: PropertyValueType.String },
54
+ ],
55
+ },
56
+ {
57
+ component: key('navigationBar'),
58
+ displayName: 'Navigation bar',
59
+ description: 'A list of navigation items. A template author fixes the first item (Home) and can expose the list so that screens add their own.',
60
+ properties: [
61
+ { path: 'title', label: 'Title', group: 'Content', valueType: PropertyValueType.String, default: 'Navigation' },
62
+ {
63
+ path: 'items', label: 'Items', group: 'Content', valueType: PropertyValueType.Collection, default: [],
64
+ item: {
65
+ label: 'Navigation item',
66
+ properties: [
67
+ { path: 'label', label: 'Label', group: 'Content', valueType: PropertyValueType.String, constraints: { required: true, minimumLength: 1 } },
68
+ { path: 'icon', label: 'Icon', group: 'Content', valueType: PropertyValueType.Icon, editorKind: 'iconPicker' },
69
+ { path: 'destination', label: 'Destination', group: 'Content', valueType: PropertyValueType.Destination, editorKind: 'screenPicker', constraints: { required: true } },
70
+ ],
71
+ },
72
+ },
73
+ ],
74
+ },
75
+ ];
@@ -4,6 +4,7 @@
4
4
  import { PackageKind, ScenePackage } from '@cratis/scene.model';
5
5
  import { ScenePackageBundle } from '../packages';
6
6
  import { coreComponents } from './coreComponents';
7
+ import { coreDescriptors } from './coreDescriptors';
7
8
 
8
9
  /**
9
10
  * The `core` package's declaration. Every other package is loaded by a host that reads its manifest;
@@ -32,6 +33,7 @@ export const corePackageManifest: ScenePackage = {
32
33
  'field',
33
34
  'code',
34
35
  'file',
36
+ 'navigationBar',
35
37
  ],
36
38
  layouts: [],
37
39
  screenTemplates: [],
@@ -50,4 +52,5 @@ export const corePackageManifest: ScenePackage = {
50
52
  export const corePackage: ScenePackageBundle = {
51
53
  manifest: corePackageManifest,
52
54
  components: coreComponents,
55
+ descriptors: coreDescriptors,
53
56
  };
package/core/index.ts CHANGED
@@ -4,6 +4,8 @@
4
4
  export * from './CoreText';
5
5
  export * from './CoreButton';
6
6
  export * from './CoreCard';
7
+ export * from './CoreNavigationBar';
8
+ export * from './coreDescriptors';
7
9
  export * from './ScreenplayCoreComponents';
8
10
  export * from './coreComponents';
9
11
  export * from './corePackage';
@@ -10,12 +10,16 @@ require('./interactions/NotificationHost.js');
10
10
  /**
11
11
  * Renders a Scene element tree with the real `Scene.React` renderer - the WYSIWYG building block Studio's
12
12
  * preview surface and Stage's shipped web bundle both consume unmodified.
13
- */ function SceneElementView({ element, registry, resolveBinding }) {
13
+ */ function SceneElementView({ element, registry, resolveBinding, configuration }) {
14
14
  const renderer = react.useMemo(()=>createReactRenderer.createReactRenderer(registry), [
15
15
  registry
16
16
  ]);
17
+ const configured = react.useMemo(()=>configuration ? scene_engine.applyEffectiveConfiguration(element, configuration) : element, [
18
+ element,
19
+ configuration
20
+ ]);
17
21
  return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
18
- children: scene_engine.renderElement(element, renderer, resolveBinding)
22
+ children: scene_engine.renderElement(configured, renderer, resolveBinding)
19
23
  });
20
24
  }
21
25
 
@@ -1 +1 @@
1
- {"version":3,"file":"SceneElementView.js","sources":["../../SceneElementView.tsx"],"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 { useMemo } from 'react';\nimport { renderElement, BindingResolver } from '@cratis/scene.engine';\nimport { SceneElement } from '@cratis/scene.model';\nimport { ComponentRegistry, createReactRenderer } from './renderer';\n\nexport interface SceneElementViewProps {\n element: SceneElement;\n registry: ComponentRegistry;\n resolveBinding: BindingResolver;\n}\n\n/**\n * Renders a Scene element tree with the real `Scene.React` renderer - the WYSIWYG building block Studio's\n * preview surface and Stage's shipped web bundle both consume unmodified.\n */\nexport function SceneElementView({ element, registry, resolveBinding }: SceneElementViewProps) {\n const renderer = useMemo(() => createReactRenderer(registry), [registry]);\n return <>{renderElement(element, renderer, resolveBinding)}</>;\n}\n"],"names":["SceneElementView","element","registry","resolveBinding","renderer","useMemo","createReactRenderer","_jsx","_Fragment","renderElement"],"mappings":";;;;;;;;;AAcA;;;IAIO,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,cAAc,EAAyB,EAAA;AACzF,IAAA,MAAMC,QAAAA,GAAWC,aAAAA,CAAQ,IAAMC,uCAAAA,CAAoBJ,QAAAA,CAAAA,EAAW;AAACA,QAAAA;AAAS,KAAA,CAAA;IACxE,qBAAOK,cAAA,CAAAC,mBAAA,EAAA;AAAGC,QAAAA,QAAAA,EAAAA,0BAAAA,CAAcR,SAASG,QAAAA,EAAUD,cAAAA;;AAC/C;;"}
1
+ {"version":3,"file":"SceneElementView.js","sources":["../../SceneElementView.tsx"],"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 { useMemo } from 'react';\nimport { applyEffectiveConfiguration, renderElement, BindingResolver } from '@cratis/scene.engine';\nimport { EffectiveConfiguration, SceneElement } from '@cratis/scene.model';\nimport { ComponentRegistry, createReactRenderer } from './renderer';\n\nexport interface SceneElementViewProps {\n element: SceneElement;\n registry: ComponentRegistry;\n resolveBinding: BindingResolver;\n\n /**\n * The resolved configuration of the template chain the element sits in, from `resolveEffectiveConfiguration`.\n * When given, each configurable component renders with its resolved properties - what a screen's own values add\n * to an inherited template. It is the same data the editor shows, and the same code path whether the screen is\n * being edited or played: there is no design-time mode.\n */\n configuration?: EffectiveConfiguration;\n}\n\n/**\n * Renders a Scene element tree with the real `Scene.React` renderer - the WYSIWYG building block Studio's\n * preview surface and Stage's shipped web bundle both consume unmodified.\n */\nexport function SceneElementView({ element, registry, resolveBinding, configuration }: SceneElementViewProps) {\n const renderer = useMemo(() => createReactRenderer(registry), [registry]);\n const configured = useMemo(() => configuration ? applyEffectiveConfiguration(element, configuration) : element, [element, configuration]);\n return <>{renderElement(configured, renderer, resolveBinding)}</>;\n}\n"],"names":["SceneElementView","element","registry","resolveBinding","configuration","renderer","useMemo","createReactRenderer","configured","applyEffectiveConfiguration","_jsx","_Fragment","renderElement"],"mappings":";;;;;;;;;AAsBA;;;IAIO,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,cAAc,EAAEC,aAAa,EAAyB,EAAA;AACxG,IAAA,MAAMC,QAAAA,GAAWC,aAAAA,CAAQ,IAAMC,uCAAAA,CAAoBL,QAAAA,CAAAA,EAAW;AAACA,QAAAA;AAAS,KAAA,CAAA;AACxE,IAAA,MAAMM,aAAaF,aAAAA,CAAQ,IAAMF,gBAAgBK,wCAAAA,CAA4BR,OAAAA,EAASG,iBAAiBH,OAAAA,EAAS;AAACA,QAAAA,OAAAA;AAASG,QAAAA;AAAc,KAAA,CAAA;IACxI,qBAAOM,cAAA,CAAAC,mBAAA,EAAA;AAAGC,QAAAA,QAAAA,EAAAA,0BAAAA,CAAcJ,YAAYH,QAAAA,EAAUF,cAAAA;;AAClD;;"}
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ function isNavigationBarItem(value) {
8
+ const candidate = value;
9
+ return candidate !== null && typeof candidate === 'object' && typeof candidate.id === 'string' && typeof candidate.label === 'string';
10
+ }
11
+ /**
12
+ * The `core:navigationBar` component: a list of navigation items, the first of which a template author normally
13
+ * fixes as Home and the rest of which consumers of the template can add to.
14
+ *
15
+ * It reads `items` from the property bag it is given and nothing else, so it renders the same whether a screen is
16
+ * being played or edited - configuration is resolved into the bag before it gets here. An item names its destination
17
+ * as a screen, and activating it emits a host-neutral navigation event, the same as `core:navigate`. An item's icon
18
+ * is carried on the node as data attributes for a host to render; icon catalogs are not this component's business.
19
+ */ function CoreNavigationBar({ element }) {
20
+ const items = Array.isArray(element.properties.items) ? element.properties.items.filter(isNavigationBarItem) : [];
21
+ const title = typeof element.properties.title === 'string' ? element.properties.title : undefined;
22
+ return /*#__PURE__*/ jsxRuntime.jsx("nav", {
23
+ "data-scene-id": element.id,
24
+ "aria-label": title,
25
+ children: items.map((item)=>{
26
+ const targetScreen = item.destination?.screen ?? '';
27
+ const navigate = ()=>globalThis.dispatchEvent(new CustomEvent('cratis.scene.navigate', {
28
+ detail: {
29
+ targetScreen,
30
+ element,
31
+ item
32
+ }
33
+ }));
34
+ return /*#__PURE__*/ jsxRuntime.jsx("button", {
35
+ type: "button",
36
+ "data-scene-item": item.id,
37
+ "data-scene-icon-library": item.icon?.library,
38
+ "data-scene-icon-key": item.icon?.key,
39
+ "data-scene-icon-variant": item.icon?.variant,
40
+ disabled: targetScreen === '',
41
+ onClick: navigate,
42
+ children: item.label
43
+ }, item.id);
44
+ })
45
+ });
46
+ }
47
+
48
+ exports.CoreNavigationBar = CoreNavigationBar;
49
+ //# sourceMappingURL=CoreNavigationBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CoreNavigationBar.js","sources":["../../../core/CoreNavigationBar.tsx"],"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 { RegisteredComponentProps } from '../renderer';\n\ninterface NavigationBarItem {\n id: string;\n label: string;\n icon?: { library: string; key: string; variant?: string };\n destination?: { screen: string };\n}\n\nfunction isNavigationBarItem(value: unknown): value is NavigationBarItem {\n const candidate = value as Partial<NavigationBarItem> | null;\n return candidate !== null && typeof candidate === 'object' && typeof candidate.id === 'string' && typeof candidate.label === 'string';\n}\n\n/**\n * The `core:navigationBar` component: a list of navigation items, the first of which a template author normally\n * fixes as Home and the rest of which consumers of the template can add to.\n *\n * It reads `items` from the property bag it is given and nothing else, so it renders the same whether a screen is\n * being played or edited - configuration is resolved into the bag before it gets here. An item names its destination\n * as a screen, and activating it emits a host-neutral navigation event, the same as `core:navigate`. An item's icon\n * is carried on the node as data attributes for a host to render; icon catalogs are not this component's business.\n */\nexport function CoreNavigationBar({ element }: RegisteredComponentProps) {\n const items = Array.isArray(element.properties.items) ? element.properties.items.filter(isNavigationBarItem) : [];\n const title = typeof element.properties.title === 'string' ? element.properties.title : undefined;\n\n return (\n <nav data-scene-id={element.id} aria-label={title}>\n {items.map(item => {\n const targetScreen = item.destination?.screen ?? '';\n const navigate = () => globalThis.dispatchEvent(new CustomEvent('cratis.scene.navigate', { detail: { targetScreen, element, item } }));\n return (\n <button\n key={item.id}\n type='button'\n data-scene-item={item.id}\n data-scene-icon-library={item.icon?.library}\n data-scene-icon-key={item.icon?.key}\n data-scene-icon-variant={item.icon?.variant}\n disabled={targetScreen === ''}\n onClick={navigate}\n >\n {item.label}\n </button>\n );\n })}\n </nav>\n );\n}\n"],"names":["isNavigationBarItem","value","candidate","id","label","CoreNavigationBar","element","items","Array","isArray","properties","filter","title","undefined","_jsx","nav","data-scene-id","aria-label","map","item","targetScreen","destination","screen","navigate","globalThis","dispatchEvent","CustomEvent","detail","button","type","data-scene-item","data-scene-icon-library","icon","library","data-scene-icon-key","key","data-scene-icon-variant","variant","disabled","onClick"],"mappings":";;;;AAAA;AACA;AAWA,SAASA,oBAAoBC,KAAc,EAAA;AACvC,IAAA,MAAMC,SAAAA,GAAYD,KAAAA;AAClB,IAAA,OAAOC,SAAAA,KAAc,IAAA,IAAQ,OAAOA,SAAAA,KAAc,QAAA,IAAY,OAAOA,SAAAA,CAAUC,EAAE,KAAK,QAAA,IAAY,OAAOD,SAAAA,CAAUE,KAAK,KAAK,QAAA;AACjI;AAEA;;;;;;;;AAQC,IACM,SAASC,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;AACnE,IAAA,MAAMC,QAAQC,KAAAA,CAAMC,OAAO,CAACH,OAAAA,CAAQI,UAAU,CAACH,KAAK,CAAA,GAAID,OAAAA,CAAQI,UAAU,CAACH,KAAK,CAACI,MAAM,CAACX,uBAAuB,EAAE;AACjH,IAAA,MAAMY,KAAAA,GAAQ,OAAON,OAAAA,CAAQI,UAAU,CAACE,KAAK,KAAK,QAAA,GAAWN,OAAAA,CAAQI,UAAU,CAACE,KAAK,GAAGC,SAAAA;AAExF,IAAA,qBACIC,cAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeV,QAAQH,EAAE;QAAEc,YAAAA,EAAYL,KAAAA;kBACvCL,KAAAA,CAAMW,GAAG,CAACC,CAAAA,IAAAA,GAAAA;AACP,YAAA,MAAMC,YAAAA,GAAeD,IAAAA,CAAKE,WAAW,EAAEC,MAAAA,IAAU,EAAA;AACjD,YAAA,MAAMC,WAAW,IAAMC,UAAAA,CAAWC,aAAa,CAAC,IAAIC,YAAY,uBAAA,EAAyB;oBAAEC,MAAAA,EAAQ;AAAEP,wBAAAA,YAAAA;AAAcd,wBAAAA,OAAAA;AAASa,wBAAAA;AAAK;AAAE,iBAAA,CAAA,CAAA;AACnI,YAAA,qBACIL,cAAA,CAACc,QAAAA,EAAAA;gBAEGC,IAAAA,EAAK,QAAA;AACLC,gBAAAA,iBAAAA,EAAiBX,KAAKhB,EAAE;gBACxB4B,yBAAAA,EAAyBZ,IAAAA,CAAKa,IAAI,EAAEC,OAAAA;gBACpCC,qBAAAA,EAAqBf,IAAAA,CAAKa,IAAI,EAAEG,GAAAA;gBAChCC,yBAAAA,EAAyBjB,IAAAA,CAAKa,IAAI,EAAEK,OAAAA;AACpCC,gBAAAA,QAAAA,EAAUlB,YAAAA,KAAiB,EAAA;gBAC3BmB,OAAAA,EAAShB,QAAAA;AAERJ,gBAAAA,QAAAA,EAAAA,IAAAA,CAAKf;AATDe,aAAAA,EAAAA,IAAAA,CAAKhB,EAAE,CAAA;AAYxB,QAAA,CAAA;;AAGZ;;"}
@@ -4,6 +4,7 @@ var ScenePackageBundle = require('../packages/ScenePackageBundle.js');
4
4
  var CoreText = require('./CoreText.js');
5
5
  var CoreButton = require('./CoreButton.js');
6
6
  var CoreCard = require('./CoreCard.js');
7
+ var CoreNavigationBar = require('./CoreNavigationBar.js');
7
8
  var ScreenplayCoreComponents = require('./ScreenplayCoreComponents.js');
8
9
 
9
10
  // Copyright (c) Cratis. All rights reserved.
@@ -25,7 +26,8 @@ var ScreenplayCoreComponents = require('./ScreenplayCoreComponents.js');
25
26
  [ScenePackageBundle.componentRegistryKey('core', 'summary')]: ScreenplayCoreComponents.CoreSummary,
26
27
  [ScenePackageBundle.componentRegistryKey('core', 'field')]: ScreenplayCoreComponents.CoreField,
27
28
  [ScenePackageBundle.componentRegistryKey('core', 'code')]: ScreenplayCoreComponents.CoreCode,
28
- [ScenePackageBundle.componentRegistryKey('core', 'file')]: ScreenplayCoreComponents.CoreFile
29
+ [ScenePackageBundle.componentRegistryKey('core', 'file')]: ScreenplayCoreComponents.CoreFile,
30
+ [ScenePackageBundle.componentRegistryKey('core', 'navigationBar')]: CoreNavigationBar.CoreNavigationBar
29
31
  };
30
32
 
31
33
  exports.coreComponents = coreComponents;
@@ -1 +1 @@
1
- {"version":3,"file":"coreComponents.js","sources":["../../../core/coreComponents.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 { ComponentRegistry } from '../renderer';\nimport { componentRegistryKey } from '../packages';\nimport { CoreText } from './CoreText';\nimport { CoreButton } from './CoreButton';\nimport { CoreCard } from './CoreCard';\nimport {\n CoreAction,\n CoreCode,\n CoreColumn,\n CoreData,\n CoreField,\n CoreFile,\n CoreNavigate,\n CoreSection,\n CoreSummary,\n CoreTable,\n CoreTitle,\n} from './ScreenplayCoreComponents';\n\n/**\n * The `core` package's component registry - the final fallback every `ui profile` resolves against\n * regardless of which other packages it lists (Scene#3).\n */\nexport const coreComponents: ComponentRegistry = {\n [componentRegistryKey('core', 'text')]: CoreText,\n [componentRegistryKey('core', 'button')]: CoreButton,\n [componentRegistryKey('core', 'card')]: CoreCard,\n [componentRegistryKey('core', 'data')]: CoreData,\n [componentRegistryKey('core', 'action')]: CoreAction,\n [componentRegistryKey('core', 'section')]: CoreSection,\n [componentRegistryKey('core', 'navigate')]: CoreNavigate,\n [componentRegistryKey('core', 'title')]: CoreTitle,\n [componentRegistryKey('core', 'table')]: CoreTable,\n [componentRegistryKey('core', 'column')]: CoreColumn,\n [componentRegistryKey('core', 'summary')]: CoreSummary,\n [componentRegistryKey('core', 'field')]: CoreField,\n [componentRegistryKey('core', 'code')]: CoreCode,\n [componentRegistryKey('core', 'file')]: CoreFile,\n};\n"],"names":["coreComponents","componentRegistryKey","CoreText","CoreButton","CoreCard","CoreData","CoreAction","CoreSection","CoreNavigate","CoreTitle","CoreTable","CoreColumn","CoreSummary","CoreField","CoreCode","CoreFile"],"mappings":";;;;;;;;AAAA;AACA;AAqBA;;;UAIaA,cAAAA,GAAoC;IAC7C,CAACC,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUC,iBAAAA;IACxC,CAACD,uCAAAA,CAAqB,MAAA,EAAQ,QAAA,CAAA,GAAYE,qBAAAA;IAC1C,CAACF,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUG,iBAAAA;IACxC,CAACH,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUI,iCAAAA;IACxC,CAACJ,uCAAAA,CAAqB,MAAA,EAAQ,QAAA,CAAA,GAAYK,mCAAAA;IAC1C,CAACL,uCAAAA,CAAqB,MAAA,EAAQ,SAAA,CAAA,GAAaM,oCAAAA;IAC3C,CAACN,uCAAAA,CAAqB,MAAA,EAAQ,UAAA,CAAA,GAAcO,qCAAAA;IAC5C,CAACP,uCAAAA,CAAqB,MAAA,EAAQ,OAAA,CAAA,GAAWQ,kCAAAA;IACzC,CAACR,uCAAAA,CAAqB,MAAA,EAAQ,OAAA,CAAA,GAAWS,kCAAAA;IACzC,CAACT,uCAAAA,CAAqB,MAAA,EAAQ,QAAA,CAAA,GAAYU,mCAAAA;IAC1C,CAACV,uCAAAA,CAAqB,MAAA,EAAQ,SAAA,CAAA,GAAaW,oCAAAA;IAC3C,CAACX,uCAAAA,CAAqB,MAAA,EAAQ,OAAA,CAAA,GAAWY,kCAAAA;IACzC,CAACZ,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUa,iCAAAA;IACxC,CAACb,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUc;AAC5C;;"}
1
+ {"version":3,"file":"coreComponents.js","sources":["../../../core/coreComponents.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 { ComponentRegistry } from '../renderer';\nimport { componentRegistryKey } from '../packages';\nimport { CoreText } from './CoreText';\nimport { CoreButton } from './CoreButton';\nimport { CoreCard } from './CoreCard';\nimport { CoreNavigationBar } from './CoreNavigationBar';\nimport {\n CoreAction,\n CoreCode,\n CoreColumn,\n CoreData,\n CoreField,\n CoreFile,\n CoreNavigate,\n CoreSection,\n CoreSummary,\n CoreTable,\n CoreTitle,\n} from './ScreenplayCoreComponents';\n\n/**\n * The `core` package's component registry - the final fallback every `ui profile` resolves against\n * regardless of which other packages it lists (Scene#3).\n */\nexport const coreComponents: ComponentRegistry = {\n [componentRegistryKey('core', 'text')]: CoreText,\n [componentRegistryKey('core', 'button')]: CoreButton,\n [componentRegistryKey('core', 'card')]: CoreCard,\n [componentRegistryKey('core', 'data')]: CoreData,\n [componentRegistryKey('core', 'action')]: CoreAction,\n [componentRegistryKey('core', 'section')]: CoreSection,\n [componentRegistryKey('core', 'navigate')]: CoreNavigate,\n [componentRegistryKey('core', 'title')]: CoreTitle,\n [componentRegistryKey('core', 'table')]: CoreTable,\n [componentRegistryKey('core', 'column')]: CoreColumn,\n [componentRegistryKey('core', 'summary')]: CoreSummary,\n [componentRegistryKey('core', 'field')]: CoreField,\n [componentRegistryKey('core', 'code')]: CoreCode,\n [componentRegistryKey('core', 'file')]: CoreFile,\n [componentRegistryKey('core', 'navigationBar')]: CoreNavigationBar,\n};\n"],"names":["coreComponents","componentRegistryKey","CoreText","CoreButton","CoreCard","CoreData","CoreAction","CoreSection","CoreNavigate","CoreTitle","CoreTable","CoreColumn","CoreSummary","CoreField","CoreCode","CoreFile","CoreNavigationBar"],"mappings":";;;;;;;;;AAAA;AACA;AAsBA;;;UAIaA,cAAAA,GAAoC;IAC7C,CAACC,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUC,iBAAAA;IACxC,CAACD,uCAAAA,CAAqB,MAAA,EAAQ,QAAA,CAAA,GAAYE,qBAAAA;IAC1C,CAACF,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUG,iBAAAA;IACxC,CAACH,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUI,iCAAAA;IACxC,CAACJ,uCAAAA,CAAqB,MAAA,EAAQ,QAAA,CAAA,GAAYK,mCAAAA;IAC1C,CAACL,uCAAAA,CAAqB,MAAA,EAAQ,SAAA,CAAA,GAAaM,oCAAAA;IAC3C,CAACN,uCAAAA,CAAqB,MAAA,EAAQ,UAAA,CAAA,GAAcO,qCAAAA;IAC5C,CAACP,uCAAAA,CAAqB,MAAA,EAAQ,OAAA,CAAA,GAAWQ,kCAAAA;IACzC,CAACR,uCAAAA,CAAqB,MAAA,EAAQ,OAAA,CAAA,GAAWS,kCAAAA;IACzC,CAACT,uCAAAA,CAAqB,MAAA,EAAQ,QAAA,CAAA,GAAYU,mCAAAA;IAC1C,CAACV,uCAAAA,CAAqB,MAAA,EAAQ,SAAA,CAAA,GAAaW,oCAAAA;IAC3C,CAACX,uCAAAA,CAAqB,MAAA,EAAQ,OAAA,CAAA,GAAWY,kCAAAA;IACzC,CAACZ,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUa,iCAAAA;IACxC,CAACb,uCAAAA,CAAqB,MAAA,EAAQ,MAAA,CAAA,GAAUc,iCAAAA;IACxC,CAACd,uCAAAA,CAAqB,MAAA,EAAQ,eAAA,CAAA,GAAmBe;AACrD;;"}
@@ -0,0 +1,162 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var ScenePackageBundle = require('../packages/ScenePackageBundle.js');
5
+
6
+ // Copyright (c) Cratis. All rights reserved.
7
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
+ const key = (name)=>ScenePackageBundle.componentRegistryKey('core', name);
9
+ /**
10
+ * What can be edited on the `core` package's components.
11
+ *
12
+ * Only the components an author configures by hand are described: a button's label, an action's command and its
13
+ * argument mapping, a column's heading, and the navigation bar. The Screenplay structural components - `data`,
14
+ * `section`, `summary` - have nothing to edit that is not already a node in the tree.
15
+ */ const coreDescriptors = [
16
+ {
17
+ component: key('button'),
18
+ displayName: 'Button',
19
+ properties: [
20
+ {
21
+ path: 'label',
22
+ label: 'Label',
23
+ group: 'Content',
24
+ valueType: scene_model.PropertyValueType.String,
25
+ default: ''
26
+ }
27
+ ]
28
+ },
29
+ {
30
+ component: key('action'),
31
+ displayName: 'Command action',
32
+ description: 'Invokes a modeled command. The command and its argument mapping are stored on the element; the host that handles the command event reads them.',
33
+ properties: [
34
+ {
35
+ path: 'label',
36
+ label: 'Label',
37
+ group: 'Content',
38
+ valueType: scene_model.PropertyValueType.String
39
+ },
40
+ {
41
+ path: 'command',
42
+ label: 'Command',
43
+ group: 'Behavior',
44
+ valueType: scene_model.PropertyValueType.String,
45
+ editorKind: 'stateChangeReference',
46
+ constraints: {
47
+ required: true
48
+ },
49
+ description: 'The state change this action submits.'
50
+ },
51
+ {
52
+ path: 'arguments',
53
+ label: 'Argument mapping',
54
+ group: 'Behavior',
55
+ valueType: scene_model.PropertyValueType.Collection,
56
+ description: 'Where each command argument comes from.',
57
+ item: {
58
+ label: 'Argument',
59
+ properties: [
60
+ {
61
+ path: 'name',
62
+ label: 'Argument',
63
+ group: 'Behavior',
64
+ valueType: scene_model.PropertyValueType.String,
65
+ constraints: {
66
+ required: true
67
+ }
68
+ },
69
+ {
70
+ path: 'source',
71
+ label: 'Source',
72
+ group: 'Behavior',
73
+ valueType: scene_model.PropertyValueType.String,
74
+ editorKind: 'bindingPath',
75
+ constraints: {
76
+ required: true
77
+ }
78
+ }
79
+ ]
80
+ }
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ component: key('column'),
86
+ displayName: 'Table column',
87
+ properties: [
88
+ {
89
+ path: 'property',
90
+ label: 'Result field',
91
+ group: 'Data',
92
+ valueType: scene_model.PropertyValueType.String,
93
+ editorKind: 'resultField',
94
+ constraints: {
95
+ required: true
96
+ }
97
+ },
98
+ {
99
+ path: 'label',
100
+ label: 'Heading',
101
+ group: 'Content',
102
+ valueType: scene_model.PropertyValueType.String
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ component: key('navigationBar'),
108
+ displayName: 'Navigation bar',
109
+ description: 'A list of navigation items. A template author fixes the first item (Home) and can expose the list so that screens add their own.',
110
+ properties: [
111
+ {
112
+ path: 'title',
113
+ label: 'Title',
114
+ group: 'Content',
115
+ valueType: scene_model.PropertyValueType.String,
116
+ default: 'Navigation'
117
+ },
118
+ {
119
+ path: 'items',
120
+ label: 'Items',
121
+ group: 'Content',
122
+ valueType: scene_model.PropertyValueType.Collection,
123
+ default: [],
124
+ item: {
125
+ label: 'Navigation item',
126
+ properties: [
127
+ {
128
+ path: 'label',
129
+ label: 'Label',
130
+ group: 'Content',
131
+ valueType: scene_model.PropertyValueType.String,
132
+ constraints: {
133
+ required: true,
134
+ minimumLength: 1
135
+ }
136
+ },
137
+ {
138
+ path: 'icon',
139
+ label: 'Icon',
140
+ group: 'Content',
141
+ valueType: scene_model.PropertyValueType.Icon,
142
+ editorKind: 'iconPicker'
143
+ },
144
+ {
145
+ path: 'destination',
146
+ label: 'Destination',
147
+ group: 'Content',
148
+ valueType: scene_model.PropertyValueType.Destination,
149
+ editorKind: 'screenPicker',
150
+ constraints: {
151
+ required: true
152
+ }
153
+ }
154
+ ]
155
+ }
156
+ }
157
+ ]
158
+ }
159
+ ];
160
+
161
+ exports.coreDescriptors = coreDescriptors;
162
+ //# sourceMappingURL=coreDescriptors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coreDescriptors.js","sources":["../../../core/coreDescriptors.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ComponentDescriptor, PropertyValueType } from '@cratis/scene.model';\nimport { componentRegistryKey } from '../packages';\n\nconst key = (name: string) => componentRegistryKey('core', name);\n\n/**\n * What can be edited on the `core` package's components.\n *\n * Only the components an author configures by hand are described: a button's label, an action's command and its\n * argument mapping, a column's heading, and the navigation bar. The Screenplay structural components - `data`,\n * `section`, `summary` - have nothing to edit that is not already a node in the tree.\n */\nexport const coreDescriptors: ComponentDescriptor[] = [\n {\n component: key('button'),\n displayName: 'Button',\n properties: [\n { path: 'label', label: 'Label', group: 'Content', valueType: PropertyValueType.String, default: '' },\n ],\n },\n {\n component: key('action'),\n displayName: 'Command action',\n description: 'Invokes a modeled command. The command and its argument mapping are stored on the element; the host that handles the command event reads them.',\n properties: [\n { path: 'label', label: 'Label', group: 'Content', valueType: PropertyValueType.String },\n {\n path: 'command', label: 'Command', group: 'Behavior', valueType: PropertyValueType.String,\n editorKind: 'stateChangeReference', constraints: { required: true },\n description: 'The state change this action submits.',\n },\n {\n path: 'arguments', label: 'Argument mapping', group: 'Behavior', valueType: PropertyValueType.Collection,\n description: 'Where each command argument comes from.',\n item: {\n label: 'Argument',\n properties: [\n { path: 'name', label: 'Argument', group: 'Behavior', valueType: PropertyValueType.String, constraints: { required: true } },\n { path: 'source', label: 'Source', group: 'Behavior', valueType: PropertyValueType.String, editorKind: 'bindingPath', constraints: { required: true } },\n ],\n },\n },\n ],\n },\n {\n component: key('column'),\n displayName: 'Table column',\n properties: [\n { path: 'property', label: 'Result field', group: 'Data', valueType: PropertyValueType.String, editorKind: 'resultField', constraints: { required: true } },\n { path: 'label', label: 'Heading', group: 'Content', valueType: PropertyValueType.String },\n ],\n },\n {\n component: key('navigationBar'),\n displayName: 'Navigation bar',\n description: 'A list of navigation items. A template author fixes the first item (Home) and can expose the list so that screens add their own.',\n properties: [\n { path: 'title', label: 'Title', group: 'Content', valueType: PropertyValueType.String, default: 'Navigation' },\n {\n path: 'items', label: 'Items', group: 'Content', valueType: PropertyValueType.Collection, default: [],\n item: {\n label: 'Navigation item',\n properties: [\n { path: 'label', label: 'Label', group: 'Content', valueType: PropertyValueType.String, constraints: { required: true, minimumLength: 1 } },\n { path: 'icon', label: 'Icon', group: 'Content', valueType: PropertyValueType.Icon, editorKind: 'iconPicker' },\n { path: 'destination', label: 'Destination', group: 'Content', valueType: PropertyValueType.Destination, editorKind: 'screenPicker', constraints: { required: true } },\n ],\n },\n },\n ],\n },\n];\n"],"names":["key","name","componentRegistryKey","coreDescriptors","component","displayName","properties","path","label","group","valueType","PropertyValueType","String","default","description","editorKind","constraints","required","Collection","item","minimumLength","Icon","Destination"],"mappings":"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"}
@@ -2,6 +2,7 @@
2
2
 
3
3
  var scene_model = require('@cratis/scene.model');
4
4
  var coreComponents = require('./coreComponents.js');
5
+ var coreDescriptors = require('./coreDescriptors.js');
5
6
 
6
7
  // Copyright (c) Cratis. All rights reserved.
7
8
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -30,7 +31,8 @@ var coreComponents = require('./coreComponents.js');
30
31
  'summary',
31
32
  'field',
32
33
  'code',
33
- 'file'
34
+ 'file',
35
+ 'navigationBar'
34
36
  ],
35
37
  layouts: [],
36
38
  screenTemplates: [],
@@ -46,7 +48,8 @@ var coreComponents = require('./coreComponents.js');
46
48
  * The `core` package as a loadable bundle.
47
49
  */ const corePackage = {
48
50
  manifest: corePackageManifest,
49
- components: coreComponents.coreComponents
51
+ components: coreComponents.coreComponents,
52
+ descriptors: coreDescriptors.coreDescriptors
50
53
  };
51
54
 
52
55
  exports.corePackage = corePackage;
@@ -1 +1 @@
1
- {"version":3,"file":"corePackage.js","sources":["../../../core/corePackage.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 '../packages';\nimport { coreComponents } from './coreComponents';\n\n/**\n * The `core` package's declaration. Every other package is loaded by a host that reads its manifest;\n * `core` ships inside the renderer itself, because Scene#3 guarantees a bare name always has somewhere to\n * resolve regardless of which packages a profile lists. It is still declared the same way as any other -\n * a package picker should be able to show it, and the dependency resolver should be able to reason about\n * it, without a special case.\n */\nexport const corePackageManifest: ScenePackage = {\n name: 'core',\n version: '1.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [],\n components: [\n 'text',\n 'button',\n 'card',\n 'data',\n 'action',\n 'section',\n 'navigate',\n 'title',\n 'table',\n 'column',\n 'summary',\n 'field',\n 'code',\n 'file',\n ],\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n themes: [],\n displayName: 'Core',\n description: 'The built-in fallback vocabulary every ui profile resolves against.',\n module: '@cratis/scene.react',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `core` package as a loadable bundle.\n */\nexport const corePackage: ScenePackageBundle = {\n manifest: corePackageManifest,\n components: coreComponents,\n};\n"],"names":["corePackageManifest","name","version","kind","PackageKind","ComponentLibrary","dependencies","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","corePackage","manifest","coreComponents"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;UAOaA,mBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,MAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,gBAAgB;AAClCC,IAAAA,YAAAA,EAAc,EAAE;IAChBC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,QAAA;AACA,QAAA,MAAA;AACA,QAAA,MAAA;AACA,QAAA,QAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,OAAA;AACA,QAAA,OAAA;AACA,QAAA,QAAA;AACA,QAAA,SAAA;AACA,QAAA,OAAA;AACA,QAAA,MAAA;AACA,QAAA;AACH,KAAA;AACDC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa,qEAAA;IACbC,MAAAA,EAAQ,qBAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;UAGaC,WAAAA,GAAkC;IAC3CC,QAAAA,EAAUlB,mBAAAA;IACVO,UAAAA,EAAYY;AAChB;;;"}
1
+ {"version":3,"file":"corePackage.js","sources":["../../../core/corePackage.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 '../packages';\nimport { coreComponents } from './coreComponents';\nimport { coreDescriptors } from './coreDescriptors';\n\n/**\n * The `core` package's declaration. Every other package is loaded by a host that reads its manifest;\n * `core` ships inside the renderer itself, because Scene#3 guarantees a bare name always has somewhere to\n * resolve regardless of which packages a profile lists. It is still declared the same way as any other -\n * a package picker should be able to show it, and the dependency resolver should be able to reason about\n * it, without a special case.\n */\nexport const corePackageManifest: ScenePackage = {\n name: 'core',\n version: '1.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [],\n components: [\n 'text',\n 'button',\n 'card',\n 'data',\n 'action',\n 'section',\n 'navigate',\n 'title',\n 'table',\n 'column',\n 'summary',\n 'field',\n 'code',\n 'file',\n 'navigationBar',\n ],\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n themes: [],\n displayName: 'Core',\n description: 'The built-in fallback vocabulary every ui profile resolves against.',\n module: '@cratis/scene.react',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `core` package as a loadable bundle.\n */\nexport const corePackage: ScenePackageBundle = {\n manifest: corePackageManifest,\n components: coreComponents,\n descriptors: coreDescriptors,\n};\n"],"names":["corePackageManifest","name","version","kind","PackageKind","ComponentLibrary","dependencies","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","corePackage","manifest","coreComponents","descriptors","coreDescriptors"],"mappings":";;;;;;AAAA;AACA;AAOA;;;;;;UAOaA,mBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,MAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,gBAAgB;AAClCC,IAAAA,YAAAA,EAAc,EAAE;IAChBC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,QAAA;AACA,QAAA,MAAA;AACA,QAAA,MAAA;AACA,QAAA,QAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,OAAA;AACA,QAAA,OAAA;AACA,QAAA,QAAA;AACA,QAAA,SAAA;AACA,QAAA,OAAA;AACA,QAAA,MAAA;AACA,QAAA,MAAA;AACA,QAAA;AACH,KAAA;AACDC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa,qEAAA;IACbC,MAAAA,EAAQ,qBAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;UAGaC,WAAAA,GAAkC;IAC3CC,QAAAA,EAAUlB,mBAAAA;IACVO,UAAAA,EAAYY,6BAAAA;IACZC,WAAAA,EAAaC;AACjB;;;"}
package/dist/cjs/index.js CHANGED
@@ -7,6 +7,8 @@ var InteractiveComponent = require('./renderer/InteractiveComponent.js');
7
7
  var CoreText = require('./core/CoreText.js');
8
8
  var CoreButton = require('./core/CoreButton.js');
9
9
  var CoreCard = require('./core/CoreCard.js');
10
+ var CoreNavigationBar = require('./core/CoreNavigationBar.js');
11
+ var coreDescriptors = require('./core/coreDescriptors.js');
10
12
  var ScreenplayCoreComponents = require('./core/ScreenplayCoreComponents.js');
11
13
  var coreComponents = require('./core/coreComponents.js');
12
14
  var corePackage = require('./core/corePackage.js');
@@ -32,6 +34,8 @@ exports.InteractiveComponent = InteractiveComponent.InteractiveComponent;
32
34
  exports.CoreText = CoreText.CoreText;
33
35
  exports.CoreButton = CoreButton.CoreButton;
34
36
  exports.CoreCard = CoreCard.CoreCard;
37
+ exports.CoreNavigationBar = CoreNavigationBar.CoreNavigationBar;
38
+ exports.coreDescriptors = coreDescriptors.coreDescriptors;
35
39
  exports.CoreAction = ScreenplayCoreComponents.CoreAction;
36
40
  exports.CoreCode = ScreenplayCoreComponents.CoreCode;
37
41
  exports.CoreColumn = ScreenplayCoreComponents.CoreColumn;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}