@cratis/scene.blueprint.default 4.39.0 → 4.41.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 (281) hide show
  1. package/ComponentName.ts +27 -0
  2. package/defaultBlueprint.ts +1 -0
  3. package/defaultBlueprintComponents.ts +10 -1
  4. package/dist/cjs/ComponentName.js +9 -0
  5. package/dist/cjs/ComponentName.js.map +1 -1
  6. package/dist/cjs/defaultBlueprint.js +18 -1
  7. package/dist/cjs/defaultBlueprint.js.map +1 -1
  8. package/dist/cjs/defaultBlueprintComponentMetadata.js +9 -0
  9. package/dist/cjs/defaultBlueprintComponentMetadata.js.map +1 -1
  10. package/dist/cjs/defaultBlueprintComponents.js +28 -1
  11. package/dist/cjs/defaultBlueprintComponents.js.map +1 -1
  12. package/dist/cjs/foundation/BulkBar.js +62 -0
  13. package/dist/cjs/foundation/BulkBar.js.map +1 -0
  14. package/dist/cjs/foundation/DataList.js +436 -0
  15. package/dist/cjs/foundation/DataList.js.map +1 -0
  16. package/dist/cjs/foundation/FormScreenBody.js +447 -0
  17. package/dist/cjs/foundation/FormScreenBody.js.map +1 -0
  18. package/dist/cjs/foundation/FoundationStates.js +2 -1
  19. package/dist/cjs/foundation/FoundationStates.js.map +1 -1
  20. package/dist/cjs/foundation/GlobalSearch.js +54 -0
  21. package/dist/cjs/foundation/GlobalSearch.js.map +1 -0
  22. package/dist/cjs/foundation/KanbanBoard.js +222 -0
  23. package/dist/cjs/foundation/KanbanBoard.js.map +1 -0
  24. package/dist/cjs/foundation/NotificationsButton.js +45 -0
  25. package/dist/cjs/foundation/NotificationsButton.js.map +1 -0
  26. package/dist/cjs/foundation/SubNavigation.js +72 -0
  27. package/dist/cjs/foundation/SubNavigation.js.map +1 -0
  28. package/dist/cjs/foundation/TabSet.js +101 -0
  29. package/dist/cjs/foundation/TabSet.js.map +1 -0
  30. package/dist/cjs/foundation/WizardProgress.js +185 -0
  31. package/dist/cjs/foundation/WizardProgress.js.map +1 -0
  32. package/dist/cjs/foundation/boardModel.js +67 -0
  33. package/dist/cjs/foundation/boardModel.js.map +1 -0
  34. package/dist/cjs/foundation/formModel.js +158 -0
  35. package/dist/cjs/foundation/formModel.js.map +1 -0
  36. package/dist/cjs/foundation/foundationComponentMetadata.js +54 -0
  37. package/dist/cjs/foundation/foundationComponentMetadata.js.map +1 -1
  38. package/dist/cjs/foundation/foundationDescriptors.js +400 -0
  39. package/dist/cjs/foundation/foundationDescriptors.js.map +1 -1
  40. package/dist/cjs/foundation/foundationSamples.js +303 -0
  41. package/dist/cjs/foundation/foundationSamples.js.map +1 -1
  42. package/dist/cjs/foundation/foundationStrings.js +72 -0
  43. package/dist/cjs/foundation/foundationStrings.js.map +1 -1
  44. package/dist/cjs/foundation/listModel.js +200 -0
  45. package/dist/cjs/foundation/listModel.js.map +1 -0
  46. package/dist/cjs/foundation/tabModel.js +41 -0
  47. package/dist/cjs/foundation/tabModel.js.map +1 -0
  48. package/dist/cjs/foundation/templates/boardScreenTemplate.js +76 -0
  49. package/dist/cjs/foundation/templates/boardScreenTemplate.js.map +1 -0
  50. package/dist/cjs/foundation/templates/dashboardScreenTemplate.js +128 -0
  51. package/dist/cjs/foundation/templates/dashboardScreenTemplate.js.map +1 -0
  52. package/dist/cjs/foundation/templates/formScreenTemplate.js +71 -0
  53. package/dist/cjs/foundation/templates/formScreenTemplate.js.map +1 -0
  54. package/dist/cjs/foundation/templates/index.js +39 -0
  55. package/dist/cjs/foundation/templates/index.js.map +1 -0
  56. package/dist/cjs/foundation/templates/listScreenTemplate.js +124 -0
  57. package/dist/cjs/foundation/templates/listScreenTemplate.js.map +1 -0
  58. package/dist/cjs/foundation/templates/masterDetailScreenTemplate.js +79 -0
  59. package/dist/cjs/foundation/templates/masterDetailScreenTemplate.js.map +1 -0
  60. package/dist/cjs/foundation/templates/recordPageTemplate.js +137 -0
  61. package/dist/cjs/foundation/templates/recordPageTemplate.js.map +1 -0
  62. package/dist/cjs/foundation/templates/templateParts.js +38 -0
  63. package/dist/cjs/foundation/templates/templateParts.js.map +1 -0
  64. package/dist/cjs/foundation/templates/wizardScreenTemplate.js +95 -0
  65. package/dist/cjs/foundation/templates/wizardScreenTemplate.js.map +1 -0
  66. package/dist/cjs/foundation/templates/workspaceScreenTemplate.js +62 -0
  67. package/dist/cjs/foundation/templates/workspaceScreenTemplate.js.map +1 -0
  68. package/dist/cjs/foundation/urlState.js +57 -0
  69. package/dist/cjs/foundation/urlState.js.map +1 -0
  70. package/dist/cjs/foundation/useCompactWidth.js +23 -0
  71. package/dist/cjs/foundation/useCompactWidth.js.map +1 -0
  72. package/dist/cjs/foundation/wizardModel.js +50 -0
  73. package/dist/cjs/foundation/wizardModel.js.map +1 -0
  74. package/dist/cjs/gallery/GalleryScreenPreview.js +76 -4
  75. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
  76. package/dist/cjs/gallery/applicationChrome.js +18 -1
  77. package/dist/cjs/gallery/applicationChrome.js.map +1 -1
  78. package/dist/cjs/gallery/composeScreen.js +5 -3
  79. package/dist/cjs/gallery/composeScreen.js.map +1 -1
  80. package/dist/cjs/gallery/screens.js +83 -2
  81. package/dist/cjs/gallery/screens.js.map +1 -1
  82. package/dist/cjs/index.js +96 -0
  83. package/dist/cjs/index.js.map +1 -1
  84. package/dist/esm/ComponentName.d.ts +10 -1
  85. package/dist/esm/ComponentName.d.ts.map +1 -1
  86. package/dist/esm/ComponentName.js +9 -0
  87. package/dist/esm/ComponentName.js.map +1 -1
  88. package/dist/esm/defaultBlueprint.d.ts.map +1 -1
  89. package/dist/esm/defaultBlueprint.js +18 -1
  90. package/dist/esm/defaultBlueprint.js.map +1 -1
  91. package/dist/esm/defaultBlueprintComponentMetadata.js +9 -0
  92. package/dist/esm/defaultBlueprintComponentMetadata.js.map +1 -1
  93. package/dist/esm/defaultBlueprintComponents.d.ts.map +1 -1
  94. package/dist/esm/defaultBlueprintComponents.js +28 -1
  95. package/dist/esm/defaultBlueprintComponents.js.map +1 -1
  96. package/dist/esm/foundation/BulkBar.d.ts +4 -0
  97. package/dist/esm/foundation/BulkBar.d.ts.map +1 -0
  98. package/dist/esm/foundation/BulkBar.js +59 -0
  99. package/dist/esm/foundation/BulkBar.js.map +1 -0
  100. package/dist/esm/foundation/DataList.d.ts +3 -0
  101. package/dist/esm/foundation/DataList.d.ts.map +1 -0
  102. package/dist/esm/foundation/DataList.js +434 -0
  103. package/dist/esm/foundation/DataList.js.map +1 -0
  104. package/dist/esm/foundation/FormScreenBody.d.ts +3 -0
  105. package/dist/esm/foundation/FormScreenBody.d.ts.map +1 -0
  106. package/dist/esm/foundation/FormScreenBody.js +445 -0
  107. package/dist/esm/foundation/FormScreenBody.js.map +1 -0
  108. package/dist/esm/foundation/FoundationStates.js +2 -1
  109. package/dist/esm/foundation/FoundationStates.js.map +1 -1
  110. package/dist/esm/foundation/GlobalSearch.d.ts +3 -0
  111. package/dist/esm/foundation/GlobalSearch.d.ts.map +1 -0
  112. package/dist/esm/foundation/GlobalSearch.js +52 -0
  113. package/dist/esm/foundation/GlobalSearch.js.map +1 -0
  114. package/dist/esm/foundation/KanbanBoard.d.ts +3 -0
  115. package/dist/esm/foundation/KanbanBoard.d.ts.map +1 -0
  116. package/dist/esm/foundation/KanbanBoard.js +220 -0
  117. package/dist/esm/foundation/KanbanBoard.js.map +1 -0
  118. package/dist/esm/foundation/NotificationsButton.d.ts +3 -0
  119. package/dist/esm/foundation/NotificationsButton.d.ts.map +1 -0
  120. package/dist/esm/foundation/NotificationsButton.js +43 -0
  121. package/dist/esm/foundation/NotificationsButton.js.map +1 -0
  122. package/dist/esm/foundation/SubNavigation.d.ts +3 -0
  123. package/dist/esm/foundation/SubNavigation.d.ts.map +1 -0
  124. package/dist/esm/foundation/SubNavigation.js +70 -0
  125. package/dist/esm/foundation/SubNavigation.js.map +1 -0
  126. package/dist/esm/foundation/TabSet.d.ts +3 -0
  127. package/dist/esm/foundation/TabSet.d.ts.map +1 -0
  128. package/dist/esm/foundation/TabSet.js +99 -0
  129. package/dist/esm/foundation/TabSet.js.map +1 -0
  130. package/dist/esm/foundation/WizardProgress.d.ts +3 -0
  131. package/dist/esm/foundation/WizardProgress.d.ts.map +1 -0
  132. package/dist/esm/foundation/WizardProgress.js +183 -0
  133. package/dist/esm/foundation/WizardProgress.js.map +1 -0
  134. package/dist/esm/foundation/boardModel.d.ts +22 -0
  135. package/dist/esm/foundation/boardModel.d.ts.map +1 -0
  136. package/dist/esm/foundation/boardModel.js +61 -0
  137. package/dist/esm/foundation/boardModel.js.map +1 -0
  138. package/dist/esm/foundation/formModel.d.ts +48 -0
  139. package/dist/esm/foundation/formModel.d.ts.map +1 -0
  140. package/dist/esm/foundation/formModel.js +147 -0
  141. package/dist/esm/foundation/formModel.js.map +1 -0
  142. package/dist/esm/foundation/foundationComponentMetadata.d.ts.map +1 -1
  143. package/dist/esm/foundation/foundationComponentMetadata.js +54 -0
  144. package/dist/esm/foundation/foundationComponentMetadata.js.map +1 -1
  145. package/dist/esm/foundation/foundationDescriptors.d.ts.map +1 -1
  146. package/dist/esm/foundation/foundationDescriptors.js +400 -0
  147. package/dist/esm/foundation/foundationDescriptors.js.map +1 -1
  148. package/dist/esm/foundation/foundationSamples.d.ts.map +1 -1
  149. package/dist/esm/foundation/foundationSamples.js +303 -0
  150. package/dist/esm/foundation/foundationSamples.js.map +1 -1
  151. package/dist/esm/foundation/foundationStrings.d.ts +72 -0
  152. package/dist/esm/foundation/foundationStrings.d.ts.map +1 -1
  153. package/dist/esm/foundation/foundationStrings.js +72 -0
  154. package/dist/esm/foundation/foundationStrings.js.map +1 -1
  155. package/dist/esm/foundation/index.d.ts +17 -0
  156. package/dist/esm/foundation/index.d.ts.map +1 -1
  157. package/dist/esm/foundation/index.js +17 -0
  158. package/dist/esm/foundation/index.js.map +1 -1
  159. package/dist/esm/foundation/listModel.d.ts +49 -0
  160. package/dist/esm/foundation/listModel.d.ts.map +1 -0
  161. package/dist/esm/foundation/listModel.js +183 -0
  162. package/dist/esm/foundation/listModel.js.map +1 -0
  163. package/dist/esm/foundation/tabModel.d.ts +10 -0
  164. package/dist/esm/foundation/tabModel.d.ts.map +1 -0
  165. package/dist/esm/foundation/tabModel.js +37 -0
  166. package/dist/esm/foundation/tabModel.js.map +1 -0
  167. package/dist/esm/foundation/templates/boardScreenTemplate.d.ts +3 -0
  168. package/dist/esm/foundation/templates/boardScreenTemplate.d.ts.map +1 -0
  169. package/dist/esm/foundation/templates/boardScreenTemplate.js +74 -0
  170. package/dist/esm/foundation/templates/boardScreenTemplate.js.map +1 -0
  171. package/dist/esm/foundation/templates/dashboardScreenTemplate.d.ts +3 -0
  172. package/dist/esm/foundation/templates/dashboardScreenTemplate.d.ts.map +1 -0
  173. package/dist/esm/foundation/templates/dashboardScreenTemplate.js +126 -0
  174. package/dist/esm/foundation/templates/dashboardScreenTemplate.js.map +1 -0
  175. package/dist/esm/foundation/templates/formScreenTemplate.d.ts +3 -0
  176. package/dist/esm/foundation/templates/formScreenTemplate.d.ts.map +1 -0
  177. package/dist/esm/foundation/templates/formScreenTemplate.js +69 -0
  178. package/dist/esm/foundation/templates/formScreenTemplate.js.map +1 -0
  179. package/dist/esm/foundation/templates/index.d.ts +11 -0
  180. package/dist/esm/foundation/templates/index.d.ts.map +1 -0
  181. package/dist/esm/foundation/templates/index.js +25 -0
  182. package/dist/esm/foundation/templates/index.js.map +1 -0
  183. package/dist/esm/foundation/templates/listScreenTemplate.d.ts +3 -0
  184. package/dist/esm/foundation/templates/listScreenTemplate.d.ts.map +1 -0
  185. package/dist/esm/foundation/templates/listScreenTemplate.js +122 -0
  186. package/dist/esm/foundation/templates/listScreenTemplate.js.map +1 -0
  187. package/dist/esm/foundation/templates/masterDetailScreenTemplate.d.ts +3 -0
  188. package/dist/esm/foundation/templates/masterDetailScreenTemplate.d.ts.map +1 -0
  189. package/dist/esm/foundation/templates/masterDetailScreenTemplate.js +77 -0
  190. package/dist/esm/foundation/templates/masterDetailScreenTemplate.js.map +1 -0
  191. package/dist/esm/foundation/templates/recordPageTemplate.d.ts +3 -0
  192. package/dist/esm/foundation/templates/recordPageTemplate.d.ts.map +1 -0
  193. package/dist/esm/foundation/templates/recordPageTemplate.js +135 -0
  194. package/dist/esm/foundation/templates/recordPageTemplate.js.map +1 -0
  195. package/dist/esm/foundation/templates/templateParts.d.ts +6 -0
  196. package/dist/esm/foundation/templates/templateParts.d.ts.map +1 -0
  197. package/dist/esm/foundation/templates/templateParts.js +33 -0
  198. package/dist/esm/foundation/templates/templateParts.js.map +1 -0
  199. package/dist/esm/foundation/templates/wizardScreenTemplate.d.ts +3 -0
  200. package/dist/esm/foundation/templates/wizardScreenTemplate.d.ts.map +1 -0
  201. package/dist/esm/foundation/templates/wizardScreenTemplate.js +93 -0
  202. package/dist/esm/foundation/templates/wizardScreenTemplate.js.map +1 -0
  203. package/dist/esm/foundation/templates/workspaceScreenTemplate.d.ts +3 -0
  204. package/dist/esm/foundation/templates/workspaceScreenTemplate.d.ts.map +1 -0
  205. package/dist/esm/foundation/templates/workspaceScreenTemplate.js +60 -0
  206. package/dist/esm/foundation/templates/workspaceScreenTemplate.js.map +1 -0
  207. package/dist/esm/foundation/urlState.d.ts +4 -0
  208. package/dist/esm/foundation/urlState.d.ts.map +1 -0
  209. package/dist/esm/foundation/urlState.js +53 -0
  210. package/dist/esm/foundation/urlState.js.map +1 -0
  211. package/dist/esm/foundation/useCompactWidth.d.ts +3 -0
  212. package/dist/esm/foundation/useCompactWidth.d.ts.map +1 -0
  213. package/dist/esm/foundation/useCompactWidth.js +20 -0
  214. package/dist/esm/foundation/useCompactWidth.js.map +1 -0
  215. package/dist/esm/foundation/wizardModel.d.ts +16 -0
  216. package/dist/esm/foundation/wizardModel.d.ts.map +1 -0
  217. package/dist/esm/foundation/wizardModel.js +43 -0
  218. package/dist/esm/foundation/wizardModel.js.map +1 -0
  219. package/dist/esm/gallery/GalleryScreenPreview.d.ts +13 -2
  220. package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -1
  221. package/dist/esm/gallery/GalleryScreenPreview.js +75 -5
  222. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
  223. package/dist/esm/gallery/applicationChrome.d.ts.map +1 -1
  224. package/dist/esm/gallery/applicationChrome.js +18 -1
  225. package/dist/esm/gallery/applicationChrome.js.map +1 -1
  226. package/dist/esm/gallery/composeScreen.d.ts.map +1 -1
  227. package/dist/esm/gallery/composeScreen.js +5 -3
  228. package/dist/esm/gallery/composeScreen.js.map +1 -1
  229. package/dist/esm/gallery/screens.d.ts.map +1 -1
  230. package/dist/esm/gallery/screens.js +83 -2
  231. package/dist/esm/gallery/screens.js.map +1 -1
  232. package/dist/esm/index.js +27 -1
  233. package/dist/esm/index.js.map +1 -1
  234. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  235. package/foundation/BulkBar.tsx +38 -0
  236. package/foundation/DataList.tsx +208 -0
  237. package/foundation/FormScreenBody.tsx +196 -0
  238. package/foundation/FoundationStates.tsx +1 -1
  239. package/foundation/GlobalSearch.tsx +33 -0
  240. package/foundation/KanbanBoard.tsx +97 -0
  241. package/foundation/NotificationsButton.tsx +28 -0
  242. package/foundation/SubNavigation.tsx +49 -0
  243. package/foundation/TabSet.tsx +65 -0
  244. package/foundation/WizardProgress.tsx +109 -0
  245. package/foundation/boardModel.ts +64 -0
  246. package/foundation/formModel.ts +146 -0
  247. package/foundation/foundationComponentMetadata.ts +9 -0
  248. package/foundation/foundationDescriptors.ts +195 -0
  249. package/foundation/foundationSamples.ts +56 -0
  250. package/foundation/foundationStrings.ts +72 -0
  251. package/foundation/index.ts +17 -0
  252. package/foundation/listModel.ts +190 -0
  253. package/foundation/tabModel.ts +41 -0
  254. package/foundation/templates/boardScreenTemplate.ts +28 -0
  255. package/foundation/templates/dashboardScreenTemplate.ts +37 -0
  256. package/foundation/templates/formScreenTemplate.ts +28 -0
  257. package/foundation/templates/index.ts +26 -0
  258. package/foundation/templates/listScreenTemplate.ts +37 -0
  259. package/foundation/templates/masterDetailScreenTemplate.ts +28 -0
  260. package/foundation/templates/recordPageTemplate.ts +36 -0
  261. package/foundation/templates/templateParts.ts +30 -0
  262. package/foundation/templates/wizardScreenTemplate.ts +33 -0
  263. package/foundation/templates/workspaceScreenTemplate.ts +27 -0
  264. package/foundation/urlState.ts +52 -0
  265. package/foundation/useCompactWidth.ts +23 -0
  266. package/foundation/wizardModel.ts +54 -0
  267. package/gallery/GalleryScreenPreview.tsx +64 -5
  268. package/gallery/applicationChrome.ts +6 -1
  269. package/gallery/composeScreen.ts +4 -2
  270. package/gallery/screens.ts +16 -1
  271. package/package.json +10 -8
  272. package/sampleData/foundation-en.json +512 -0
  273. package/shell/layout.css +513 -0
  274. package/thumbnails/BoardScreen.svg +15 -0
  275. package/thumbnails/DashboardScreen.svg +18 -0
  276. package/thumbnails/FormScreen.svg +14 -0
  277. package/thumbnails/ListScreen.svg +16 -0
  278. package/thumbnails/MasterDetailScreen.svg +22 -0
  279. package/thumbnails/RecordPage.svg +17 -0
  280. package/thumbnails/WizardScreen.svg +16 -0
  281. package/thumbnails/WorkspaceScreen.svg +12 -0
@@ -1 +1 @@
1
- {"version":3,"file":"composeScreen.js","sources":["../../../gallery/composeScreen.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 { ExternalComponent, Layout, SceneElement, Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { shellComponentForLayout } from '../layouts';\nimport { externalComponent } from './elements';\n\n/**\n * Turns a {@link ScreenTemplate}'s content into slot content on the {@link Layout} that contains it.\n *\n * The rule has two halves, and both matter. Content filed under a slot the *layout* also declares stays\n * under that name - which is how a sign-in template's branding half reaches the full-page layout's `aside`\n * region rather than being buried inside the form column. Everything else flows into the slot the\n * template's `fitsSlot` names, because that is what `fitsSlot` means: this template occupies that region.\n *\n * @param template The template to place.\n * @param layout The layout it is placed into.\n * @returns Slot content keyed by the layout's own slot names.\n */\nexport function templateContentInLayout(template: ScreenTemplate, layout: Layout): Record<string, SceneElement[]> {\n const layoutSlots = new Set(layout.slots.map(slot => slot.name));\n const placed: Record<string, SceneElement[]> = {};\n const ownSlotOrder = template.slots.map(slot => slot.name);\n const content = template.content ?? {};\n\n for (const slotName of ownSlotOrder) {\n const elements = content[slotName];\n if (!elements || elements.length === 0) {\n continue;\n }\n\n const target = layoutSlots.has(slotName) ? slotName : template.fitsSlot;\n if (!target) {\n continue;\n }\n\n placed[target] = [...(placed[target] ?? []), ...elements];\n }\n\n return placed;\n}\n\n/**\n * Folds a containment chain of screen templates into the outermost one.\n *\n * This is `fitsSlot` doing its job, applied repeatedly. A slice's template fits a slot on the feature's\n * template, which fits a slot on the module's, which fits a slot on the application layout - so the way to\n * place the slice is to place it in the feature, place *that* result in the module, and hand the module to\n * the layout. Folding from the inside out means the rule is written once and the chain can be any depth.\n *\n * The alternative - filing a nested template's content under its own `fitsSlot` at the top level - looks\n * right and is not: the layout has no `body` slot, so the content lands in a region nothing renders and\n * the screen comes up empty with nothing to explain it.\n *\n * @param chain The templates from outermost to innermost. A chain of one is returned unchanged.\n * @returns A template with the same slots and `fitsSlot` as the outermost, carrying the whole chain's content.\n */\nexport function nestScreenTemplates(chain: ScreenTemplate[]): ScreenTemplate {\n return chain.reduceRight((inner, outer) => (inner === outer ? outer : placeInside(outer, inner)));\n}\n\nfunction placeInside(outer: ScreenTemplate, inner: ScreenTemplate): ScreenTemplate {\n if (!inner.fitsSlot) {\n return outer;\n }\n\n const innerContent = inner.slots.flatMap(slot => inner.content?.[slot.name] ?? []);\n return {\n ...outer,\n content: {\n ...outer.content,\n [inner.fitsSlot]: [...(outer.content?.[inner.fitsSlot] ?? []), ...innerContent],\n },\n };\n}\n\n/**\n * Builds the element tree that renders a {@link Screen}.\n *\n * The screen's slot content becomes the shell component's slots one-for-one, which is the whole trick: a\n * layout's slots and a shell component's slots are the same vocabulary, so nothing has to translate\n * between them and a slot filled under a name the shell does not read is a spec failure rather than a\n * silently missing region.\n *\n * @param screen The screen to render.\n * @returns The shell element, ready for `SceneElementView`.\n */\nexport function composeScreenElement(screen: Screen): ExternalComponent {\n const shell = shellComponentForLayout(screen.layout);\n if (!shell) {\n throw new Error(`Screen '${screen.name}' names the layout '${screen.layout}', which this blueprint does not provide.`);\n }\n\n return externalComponent(`screen-${screen.name}`, shell, { screenName: screen.name }, screen.slotContent);\n}\n"],"names":["templateContentInLayout","template","layout","layoutSlots","Set","slots","map","slot","name","placed","ownSlotOrder","content","slotName","elements","length","target","has","fitsSlot","nestScreenTemplates","chain","reduceRight","inner","outer","placeInside","innerContent","flatMap","composeScreenElement","screen","shell","shellComponentForLayout","Error","externalComponent","screenName","slotContent"],"mappings":";;;;;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,IACM,SAASA,uBAAAA,CAAwBC,QAAwB,EAAEC,MAAc,EAAA;IAC5E,MAAMC,WAAAA,GAAc,IAAIC,GAAAA,CAAIF,MAAAA,CAAOG,KAAK,CAACC,GAAG,CAACC,CAAAA,IAAAA,GAAQA,IAAAA,CAAKC,IAAI,CAAA,CAAA;AAC9D,IAAA,MAAMC,SAAyC,EAAC;IAChD,MAAMC,YAAAA,GAAeT,SAASI,KAAK,CAACC,GAAG,CAACC,CAAAA,IAAAA,GAAQA,IAAAA,CAAKC,IAAI,CAAA;AACzD,IAAA,MAAMG,OAAAA,GAAUV,QAAAA,CAASU,OAAO,IAAI,EAAC;IAErC,KAAK,MAAMC,YAAYF,YAAAA,CAAc;QACjC,MAAMG,QAAAA,GAAWF,OAAO,CAACC,QAAAA,CAAS;AAClC,QAAA,IAAI,CAACC,QAAAA,IAAYA,QAAAA,CAASC,MAAM,KAAK,CAAA,EAAG;AACpC,YAAA;AACJ,QAAA;AAEA,QAAA,MAAMC,SAASZ,WAAAA,CAAYa,GAAG,CAACJ,QAAAA,CAAAA,GAAYA,QAAAA,GAAWX,SAASgB,QAAQ;AACvE,QAAA,IAAI,CAACF,MAAAA,EAAQ;AACT,YAAA;AACJ,QAAA;QAEAN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AC,yCAAyC,CAAC,CAAA;AACzH,IAAA;IAEA,OAAO6B,iBAAAA,CAAkB,CAAC,OAAO,EAAEJ,OAAOnB,IAAI,CAAA,CAAE,EAAEoB,KAAAA,EAAO;AAAEI,QAAAA,UAAAA,EAAYL,OAAOnB;AAAK,KAAA,EAAGmB,OAAOM,WAAW,CAAA;AAC5G;;"}
1
+ {"version":3,"file":"composeScreen.js","sources":["../../../gallery/composeScreen.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 { ExternalComponent, Layout, SceneElement, Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { shellComponentForLayout } from '../layouts';\nimport { externalComponent } from './elements';\n\n/**\n * Turns a {@link ScreenTemplate}'s content into slot content on the {@link Layout} that contains it.\n *\n * The rule has two halves, and both matter. Content filed under a slot the *layout* also declares stays\n * under that name - which is how a sign-in template's branding half reaches the full-page layout's `aside`\n * region rather than being buried inside the form column. Everything else flows into the slot the\n * template's `fitsSlot` names, because that is what `fitsSlot` means: this template occupies that region.\n *\n * @param template The template to place.\n * @param layout The layout it is placed into.\n * @returns Slot content keyed by the layout's own slot names.\n */\nexport function templateContentInLayout(template: ScreenTemplate, layout: Layout): Record<string, SceneElement[]> {\n const layoutSlots = new Set(layout.slots.map(slot => slot.name));\n const placed: Record<string, SceneElement[]> = {};\n const ownSlotOrder = template.slots.map(slot => slot.name);\n const content = template.content ?? {};\n\n for (const slotName of ownSlotOrder) {\n const elements = content[slotName];\n if (!elements || elements.length === 0) {\n continue;\n }\n\n const target = layoutSlots.has(slotName) ? slotName : template.fitsSlot;\n if (!target) {\n continue;\n }\n\n placed[target] = [...(placed[target] ?? []), ...elements];\n }\n\n return placed;\n}\n\n/**\n * Folds a containment chain of screen templates into the outermost one.\n *\n * This is `fitsSlot` doing its job, applied repeatedly. A slice's template fits a slot on the feature's\n * template, which fits a slot on the module's, which fits a slot on the application layout - so the way to\n * place the slice is to place it in the feature, place *that* result in the module, and hand the module to\n * the layout. Folding from the inside out means the rule is written once and the chain can be any depth.\n *\n * The alternative - filing a nested template's content under its own `fitsSlot` at the top level - looks\n * right and is not: the layout has no `body` slot, so the content lands in a region nothing renders and\n * the screen comes up empty with nothing to explain it.\n *\n * @param chain The templates from outermost to innermost. A chain of one is returned unchanged.\n * @returns A template with the same slots and `fitsSlot` as the outermost, carrying the whole chain's content.\n */\nexport function nestScreenTemplates(chain: ScreenTemplate[]): ScreenTemplate {\n return chain.reduceRight((inner, outer) => (inner === outer ? outer : placeInside(outer, inner)));\n}\n\nfunction placeInside(outer: ScreenTemplate, inner: ScreenTemplate): ScreenTemplate {\n if (!inner.fitsSlot) {\n return outer;\n }\n\n // A container-qualified name (`WorkspaceScreen.moduleContent`) says which container; the slot's own name is what the container's content is keyed by.\n const slot = inner.fitsSlot.substring(inner.fitsSlot.lastIndexOf('.') + 1);\n const innerContent = inner.slots.flatMap(innerSlot => inner.content?.[innerSlot.name] ?? []);\n return {\n ...outer,\n content: {\n ...outer.content,\n [slot]: [...(outer.content?.[slot] ?? []), ...innerContent],\n },\n };\n}\n\n/**\n * Builds the element tree that renders a {@link Screen}.\n *\n * The screen's slot content becomes the shell component's slots one-for-one, which is the whole trick: a\n * layout's slots and a shell component's slots are the same vocabulary, so nothing has to translate\n * between them and a slot filled under a name the shell does not read is a spec failure rather than a\n * silently missing region.\n *\n * @param screen The screen to render.\n * @returns The shell element, ready for `SceneElementView`.\n */\nexport function composeScreenElement(screen: Screen): ExternalComponent {\n const shell = shellComponentForLayout(screen.layout);\n if (!shell) {\n throw new Error(`Screen '${screen.name}' names the layout '${screen.layout}', which this blueprint does not provide.`);\n }\n\n return externalComponent(`screen-${screen.name}`, shell, { screenName: screen.name }, screen.slotContent);\n}\n"],"names":["templateContentInLayout","template","layout","layoutSlots","Set","slots","map","slot","name","placed","ownSlotOrder","content","slotName","elements","length","target","has","fitsSlot","nestScreenTemplates","chain","reduceRight","inner","outer","placeInside","substring","lastIndexOf","innerContent","flatMap","innerSlot","composeScreenElement","screen","shell","shellComponentForLayout","Error","externalComponent","screenName","slotContent"],"mappings":";;;;;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,IACM,SAASA,uBAAAA,CAAwBC,QAAwB,EAAEC,MAAc,EAAA;IAC5E,MAAMC,WAAAA,GAAc,IAAIC,GAAAA,CAAIF,MAAAA,CAAOG,KAAK,CAACC,GAAG,CAACC,CAAAA,IAAAA,GAAQA,IAAAA,CAAKC,IAAI,CAAA,CAAA;AAC9D,IAAA,MAAMC,SAAyC,EAAC;IAChD,MAAMC,YAAAA,GAAeT,SAASI,KAAK,CAACC,GAAG,CAACC,CAAAA,IAAAA,GAAQA,IAAAA,CAAKC,IAAI,CAAA;AACzD,IAAA,MAAMG,OAAAA,GAAUV,QAAAA,CAASU,OAAO,IAAI,EAAC;IAErC,KAAK,MAAMC,YAAYF,YAAAA,CAAc;QACjC,MAAMG,QAAAA,GAAWF,OAAO,CAACC,QAAAA,CAAS;AAClC,QAAA,IAAI,CAACC,QAAAA,IAAYA,QAAAA,CAASC,MAAM,KAAK,CAAA,EAAG;AACpC,YAAA;AACJ,QAAA;AAEA,QAAA,MAAMC,SAASZ,WAAAA,CAAYa,GAAG,CAACJ,QAAAA,CAAAA,GAAYA,QAAAA,GAAWX,SAASgB,QAAQ;AACvE,QAAA,IAAI,CAACF,MAAAA,EAAQ;AACT,YAAA;AACJ,QAAA;QAEAN,MAAM,CAACM,OAAO,GAAG;eAAKN,MAAM,CAACM,MAAAA,CAAO,IAAI,EAAE;AAAMF,YAAAA,GAAAA;AAAS,SAAA;AAC7D,IAAA;IAEA,OAAOJ,MAAAA;AACX;AAEA;;;;;;;;;;;;;;IAeO,SAASS,mBAAAA,CAAoBC,KAAuB,EAAA;IACvD,OAAOA,KAAAA,CAAMC,WAAW,CAAC,CAACC,KAAAA,EAAOC,QAAWD,KAAAA,KAAUC,KAAAA,GAAQA,KAAAA,GAAQC,WAAAA,CAAYD,KAAAA,EAAOD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}
@@ -1 +1 @@
1
- {"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../gallery/screens.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAkBrE,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAMlD,CAAC;AA+EF,eAAO,MAAM,cAAc,EAAE,MAAM,EAA0C,CAAC;AAG9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9D"}
1
+ {"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../gallery/screens.ts"],"names":[],"mappings":"AAGA,OAAO,EAAU,MAAM,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAmBrE,eAAO,MAAM,sBAAsB,EAAE,cAAc,EAOlD,CAAC;AA4FF,eAAO,MAAM,cAAc,EAAE,MAAM,EAA0C,CAAC;AAG9E,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE9D"}
@@ -1,3 +1,4 @@
1
+ import { foundationScreenTemplates } from '../foundation/templates/index.js';
1
2
  import { LayoutName } from '../layouts/LayoutName.js';
2
3
  import '@cratis/scene.model';
3
4
  import '../layouts/shellComponents.js';
@@ -21,6 +22,7 @@ import { workspaceTemplates } from './workspaceTemplates.js';
21
22
  * chain that demonstrates how `fitsSlot` composes. The list is what the manifest's `screenTemplates` names
22
23
  * and what the bundle provides; `validatePackageBundle` proves the two agree.
23
24
  */ const galleryScreenTemplates = [
25
+ ...foundationScreenTemplates,
24
26
  ...workspaceTemplates,
25
27
  ...supportTemplates,
26
28
  ...authTemplates,
@@ -135,6 +137,78 @@ import { workspaceTemplates } from './workspaceTemplates.js';
135
137
  label: 'Help'
136
138
  }
137
139
  ],
140
+ DashboardScreen: [
141
+ {
142
+ label: 'Dashboard'
143
+ }
144
+ ],
145
+ ListScreen: [
146
+ {
147
+ label: 'Sales',
148
+ targetScreen: 'DashboardScreen'
149
+ },
150
+ {
151
+ label: 'Deals'
152
+ }
153
+ ],
154
+ BoardScreen: [
155
+ {
156
+ label: 'Sales',
157
+ targetScreen: 'DashboardScreen'
158
+ },
159
+ {
160
+ label: 'Pipeline'
161
+ }
162
+ ],
163
+ WorkspaceScreen: [
164
+ {
165
+ label: 'Sales'
166
+ }
167
+ ],
168
+ MasterDetailScreen: [
169
+ {
170
+ label: 'Sales',
171
+ targetScreen: 'WorkspaceScreen'
172
+ },
173
+ {
174
+ label: 'Accounts'
175
+ }
176
+ ],
177
+ RecordPage: [
178
+ {
179
+ label: 'Sales',
180
+ targetScreen: 'DashboardScreen'
181
+ },
182
+ {
183
+ label: 'Accounts',
184
+ targetScreen: 'ListScreen'
185
+ },
186
+ {
187
+ label: 'Account'
188
+ }
189
+ ],
190
+ FormScreen: [
191
+ {
192
+ label: 'Sales',
193
+ targetScreen: 'DashboardScreen'
194
+ },
195
+ {
196
+ label: 'Accounts',
197
+ targetScreen: 'ListScreen'
198
+ },
199
+ {
200
+ label: 'New account'
201
+ }
202
+ ],
203
+ WizardScreen: [
204
+ {
205
+ label: 'Sales',
206
+ targetScreen: 'DashboardScreen'
207
+ },
208
+ {
209
+ label: 'New account'
210
+ }
211
+ ],
138
212
  ModuleWorkspace: [
139
213
  {
140
214
  label: 'Operations'
@@ -196,9 +270,16 @@ import { workspaceTemplates } from './workspaceTemplates.js';
196
270
  * that do not.
197
271
  */ function containmentChainFor(template) {
198
272
  const depth = nestingChainTemplates.findIndex((candidate)=>candidate.name === template.name);
199
- return depth < 0 ? [
273
+ if (depth >= 0) return nestingChainTemplates.slice(0, depth + 1);
274
+ // A template that fits a container-qualified slot (`WorkspaceScreen.moduleContent`) renders inside that container, which is what the qualifier is for.
275
+ const [container] = (template.fitsSlot ?? '').split('.');
276
+ const outer = container ? foundationScreenTemplates.find((candidate)=>candidate.name === container) : undefined;
277
+ return outer ? [
278
+ outer,
279
+ template
280
+ ] : [
200
281
  template
201
- ] : nestingChainTemplates.slice(0, depth + 1);
282
+ ];
202
283
  }
203
284
  function mergeSlotContent(chrome, content) {
204
285
  const merged = {
@@ -1 +1 @@
1
- {"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Layout, Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { LayoutName, appShellLayout, fullPageLayout } from '../layouts';\nimport { BreadcrumbEntry, applicationChrome, fullPageChrome } from './applicationChrome';\nimport { nestScreenTemplates, templateContentInLayout } from './composeScreen';\nimport { authTemplates } from './authTemplates';\nimport { navigationContributions } from './navigation';\nimport { nestingChainTemplates } from './nesting';\nimport { statusTemplates } from './statusTemplates';\nimport { supportTemplates } from './supportTemplates';\nimport { workspaceTemplates } from './workspaceTemplates';\n\n/**\n * The screen templates this blueprint provides.\n *\n * Eleven shapes for inside the application shell, ten for the full-page shell, and the three-level nesting\n * chain that demonstrates how `fitsSlot` composes. The list is what the manifest's `screenTemplates` names\n * and what the bundle provides; `validatePackageBundle` proves the two agree.\n */\nexport const galleryScreenTemplates: ScreenTemplate[] = [\n ...workspaceTemplates,\n ...supportTemplates,\n ...authTemplates,\n ...statusTemplates,\n ...nestingChainTemplates,\n];\n\n/** Which layout each template renders inside - the application shell unless it is one of the chrome-less screens. */\nconst fullPageTemplateNames = new Set([...authTemplates, ...statusTemplates].map(template => template.name));\n\n/** The trail shown above each application-shell screen. */\nconst breadcrumbs: Record<string, BreadcrumbEntry[]> = {\n Dashboard: [{ label: 'Dashboard' }],\n CrudList: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n MasterDetail: [{ label: 'Sales', targetScreen: 'Dashboard' }, { label: 'Customers' }],\n DetailView: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'Bamboo Watch' }],\n FormPage: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'New product' }],\n Empty: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n Documentation: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Documentation' }],\n ProfileSettings: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Your profile' }],\n UserManagement: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Users' }],\n Invoice: [{ label: 'Billing', targetScreen: 'Dashboard' }, { label: 'INV-2043' }],\n Help: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Help' }],\n ModuleWorkspace: [{ label: 'Operations' }],\n FeatureSection: [{ label: 'Operations', targetScreen: 'ModuleWorkspace' }, { label: 'Adjustments' }],\n SliceSection: [\n { label: 'Operations', targetScreen: 'ModuleWorkspace' },\n { label: 'Adjustments', targetScreen: 'FeatureSection' },\n { label: 'Record an adjustment' },\n ],\n};\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const isFullPage = fullPageTemplateNames.has(template.name);\n const layout: Layout = isFullPage ? fullPageLayout : appShellLayout;\n const chrome = isFullPage ? fullPageChrome() : applicationChrome(template.name, breadcrumbs[template.name] ?? [{ label: template.displayName ?? template.name }]);\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: isFullPage ? LayoutName.FullPage : LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(chrome, templateContentInLayout(placeable, layout)),\n forms: [],\n contributions: isFullPage ? [] : navigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * Almost every template fits the layout's own `content` slot, so its chain is just itself. The three\n * nesting-chain templates are the exception, and the only ones that need the walk - which is the honest\n * version of the story: nesting exists for the applications that need it, and costs nothing for the ones\n * that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n return depth < 0 ? [template] : nestingChainTemplates.slice(0, depth + 1);\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/**\n * The gallery: one screen per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n */\nexport const galleryScreens: Screen[] = galleryScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function galleryScreen(name: string): Screen | undefined {\n return galleryScreens.find(screen => screen.name === name);\n}\n"],"names":["galleryScreenTemplates","workspaceTemplates","supportTemplates","authTemplates","statusTemplates","nestingChainTemplates","fullPageTemplateNames","Set","map","template","name","breadcrumbs","Dashboard","label","CrudList","targetScreen","MasterDetail","DetailView","FormPage","Empty","Documentation","ProfileSettings","UserManagement","Invoice","Help","ModuleWorkspace","FeatureSection","SliceSection","screenFor","isFullPage","has","layout","fullPageLayout","appShellLayout","chrome","fullPageChrome","applicationChrome","displayName","placeable","nestScreenTemplates","containmentChainFor","LayoutName","FullPage","AppShell","screenTemplate","slotContent","mergeSlotContent","templateContentInLayout","forms","contributions","navigationContributions","depth","findIndex","candidate","slice","content","merged","slotName","elements","Object","entries","galleryScreens","galleryScreen","find","screen"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AAaA;;;;;;UAOaA,sBAAAA,GAA2C;AACjDC,IAAAA,GAAAA,kBAAAA;AACAC,IAAAA,GAAAA,gBAAAA;AACAC,IAAAA,GAAAA,aAAAA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MC,MAAAA,GAAgC;AAAE,QAAA,GAAGtB;AAAO,KAAA;IAClD,KAAK,MAAM,CAACuB,QAAAA,EAAUC,QAAAA,CAAS,IAAIC,MAAAA,CAAOC,OAAO,CAACL,OAAAA,CAAAA,CAAU;QACxDC,MAAM,CAACC,SAAS,GAAG;eAAKD,MAAM,CAACC,QAAAA,CAAS,IAAI,EAAE;AAAMC,YAAAA,GAAAA;AAAS,SAAA;AACjE,IAAA;IAEA,OAAOF,MAAAA;AACX;AAEA;;;;;;AAMC,IACM,MAAMK,cAAAA,GAA2B7D,sBAAAA,CAAuBQ,GAAG,CAACoB,SAAAA;AAEnE,oFACO,SAASkC,aAAAA,CAAcpD,IAAY,EAAA;AACtC,IAAA,OAAOmD,eAAeE,IAAI,CAACC,CAAAA,MAAAA,GAAUA,MAAAA,CAAOtD,IAAI,KAAKA,IAAAA,CAAAA;AACzD;;"}
1
+ {"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Layout, Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { foundationScreenTemplates } from '../foundation/templates';\nimport { LayoutName, appShellLayout, fullPageLayout } from '../layouts';\nimport { BreadcrumbEntry, applicationChrome, fullPageChrome } from './applicationChrome';\nimport { nestScreenTemplates, templateContentInLayout } from './composeScreen';\nimport { authTemplates } from './authTemplates';\nimport { navigationContributions } from './navigation';\nimport { nestingChainTemplates } from './nesting';\nimport { statusTemplates } from './statusTemplates';\nimport { supportTemplates } from './supportTemplates';\nimport { workspaceTemplates } from './workspaceTemplates';\n\n/**\n * The screen templates this blueprint provides.\n *\n * Eleven shapes for inside the application shell, ten for the full-page shell, and the three-level nesting\n * chain that demonstrates how `fitsSlot` composes. The list is what the manifest's `screenTemplates` names\n * and what the bundle provides; `validatePackageBundle` proves the two agree.\n */\nexport const galleryScreenTemplates: ScreenTemplate[] = [\n ...foundationScreenTemplates,\n ...workspaceTemplates,\n ...supportTemplates,\n ...authTemplates,\n ...statusTemplates,\n ...nestingChainTemplates,\n];\n\n/** Which layout each template renders inside - the application shell unless it is one of the chrome-less screens. */\nconst fullPageTemplateNames = new Set([...authTemplates, ...statusTemplates].map(template => template.name));\n\n/** The trail shown above each application-shell screen. */\nconst breadcrumbs: Record<string, BreadcrumbEntry[]> = {\n Dashboard: [{ label: 'Dashboard' }],\n CrudList: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n MasterDetail: [{ label: 'Sales', targetScreen: 'Dashboard' }, { label: 'Customers' }],\n DetailView: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'Bamboo Watch' }],\n FormPage: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'New product' }],\n Empty: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n Documentation: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Documentation' }],\n ProfileSettings: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Your profile' }],\n UserManagement: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Users' }],\n Invoice: [{ label: 'Billing', targetScreen: 'Dashboard' }, { label: 'INV-2043' }],\n Help: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Help' }],\n DashboardScreen: [{ label: 'Dashboard' }],\n ListScreen: [{ label: 'Sales', targetScreen: 'DashboardScreen' }, { label: 'Deals' }],\n BoardScreen: [{ label: 'Sales', targetScreen: 'DashboardScreen' }, { label: 'Pipeline' }],\n WorkspaceScreen: [{ label: 'Sales' }],\n MasterDetailScreen: [{ label: 'Sales', targetScreen: 'WorkspaceScreen' }, { label: 'Accounts' }],\n RecordPage: [{ label: 'Sales', targetScreen: 'DashboardScreen' }, { label: 'Accounts', targetScreen: 'ListScreen' }, { label: 'Account' }],\n FormScreen: [{ label: 'Sales', targetScreen: 'DashboardScreen' }, { label: 'Accounts', targetScreen: 'ListScreen' }, { label: 'New account' }],\n WizardScreen: [{ label: 'Sales', targetScreen: 'DashboardScreen' }, { label: 'New account' }],\n ModuleWorkspace: [{ label: 'Operations' }],\n FeatureSection: [{ label: 'Operations', targetScreen: 'ModuleWorkspace' }, { label: 'Adjustments' }],\n SliceSection: [\n { label: 'Operations', targetScreen: 'ModuleWorkspace' },\n { label: 'Adjustments', targetScreen: 'FeatureSection' },\n { label: 'Record an adjustment' },\n ],\n};\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const isFullPage = fullPageTemplateNames.has(template.name);\n const layout: Layout = isFullPage ? fullPageLayout : appShellLayout;\n const chrome = isFullPage ? fullPageChrome() : applicationChrome(template.name, breadcrumbs[template.name] ?? [{ label: template.displayName ?? template.name }]);\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: isFullPage ? LayoutName.FullPage : LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(chrome, templateContentInLayout(placeable, layout)),\n forms: [],\n contributions: isFullPage ? [] : navigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * Almost every template fits the layout's own `content` slot, so its chain is just itself. The three\n * nesting-chain templates are the exception, and the only ones that need the walk - which is the honest\n * version of the story: nesting exists for the applications that need it, and costs nothing for the ones\n * that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n if (depth >= 0) return nestingChainTemplates.slice(0, depth + 1);\n\n // A template that fits a container-qualified slot (`WorkspaceScreen.moduleContent`) renders inside that container, which is what the qualifier is for.\n const [container] = (template.fitsSlot ?? '').split('.');\n const outer = container ? foundationScreenTemplates.find(candidate => candidate.name === container) : undefined;\n return outer ? [outer, template] : [template];\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/**\n * The gallery: one screen per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n */\nexport const galleryScreens: Screen[] = galleryScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function galleryScreen(name: string): Screen | undefined {\n return galleryScreens.find(screen => screen.name === name);\n}\n"],"names":["galleryScreenTemplates","foundationScreenTemplates","workspaceTemplates","supportTemplates","authTemplates","statusTemplates","nestingChainTemplates","fullPageTemplateNames","Set","map","template","name","breadcrumbs","Dashboard","label","CrudList","targetScreen","MasterDetail","DetailView","FormPage","Empty","Documentation","ProfileSettings","UserManagement","Invoice","Help","DashboardScreen","ListScreen","BoardScreen","WorkspaceScreen","MasterDetailScreen","RecordPage","FormScreen","WizardScreen","ModuleWorkspace","FeatureSection","SliceSection","screenFor","isFullPage","has","layout","fullPageLayout","appShellLayout","chrome","fullPageChrome","applicationChrome","displayName","placeable","nestScreenTemplates","containmentChainFor","LayoutName","FullPage","AppShell","screenTemplate","slotContent","mergeSlotContent","templateContentInLayout","forms","contributions","navigationContributions","depth","findIndex","candidate","slice","container","fitsSlot","split","outer","find","undefined","content","merged","slotName","elements","Object","entries","galleryScreens","galleryScreen","screen"],"mappings":";;;;;;;;;;;;;;;AAAA;AACA;AAcA;;;;;;UAOaA,sBAAAA,GAA2C;AACjDC,IAAAA,GAAAA,yBAAAA;AACAC,IAAAA,GAAAA,kBAAAA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SAAAA,GAAY/D,yBAAAA,CAA0BmE,IAAI,CAACN,CAAAA,SAAAA,GAAaA,SAAAA,CAAUnD,IAAI,KAAKqD,SAAAA,CAAAA,GAAaK,SAAAA;AACtG,IAAA,OAAOF,KAAAA,GAAQ;AAACA,QAAAA,KAAAA;AAAOzD,QAAAA;KAAS,GAAG;AAACA,QAAAA;AAAS,KAAA;AACjD;AAEA,SAAS6C,gBAAAA,CAAiBZ,MAAqD,EAAE2B,OAAsD,EAAA;AACnI,IAAA,MAAMC,MAAAA,GAAgC;AAAE,QAAA,GAAG5B;AAAO,KAAA;IAClD,KAAK,MAAM,CAAC6B,QAAAA,EAAUC,QAAAA,CAAS,IAAIC,MAAAA,CAAOC,OAAO,CAACL,OAAAA,CAAAA,CAAU;QACxDC,MAAM,CAACC,SAAS,GAAG;eAAKD,MAAM,CAACC,QAAAA,CAAS,IAAI,EAAE;AAAMC,YAAAA,GAAAA;AAAS,SAAA;AACjE,IAAA;IAEA,OAAOF,MAAAA;AACX;AAEA;;;;;;AAMC,IACM,MAAMK,cAAAA,GAA2B5E,sBAAAA,CAAuBS,GAAG,CAAC4B,SAAAA;AAEnE,oFACO,SAASwC,aAAAA,CAAclE,IAAY,EAAA;AACtC,IAAA,OAAOiE,eAAeR,IAAI,CAACU,CAAAA,MAAAA,GAAUA,MAAAA,CAAOnE,IAAI,KAAKA,IAAAA,CAAAA;AACzD;;"}
package/dist/esm/index.js CHANGED
@@ -31,7 +31,7 @@ export { coreComponentNames, cratisComponentsNames, primeReactComponentNames } f
31
31
  export { componentNamesIn, distinctComponentNames } from './gallery/componentNames.js';
32
32
  export { galleryComponentCatalog, galleryPreviewProfile, galleryProfile } from './gallery/previewProfile.js';
33
33
  export { resolveElementComponentNames } from './gallery/resolveElementNames.js';
34
- export { GalleryScreenPreview, galleryPreviewRegistry } from './gallery/GalleryScreenPreview.js';
34
+ export { GalleryScreenPreview, forceComponentState, galleryPreviewRegistry, queryResultsOf } from './gallery/GalleryScreenPreview.js';
35
35
  export { TemplatePreviewState } from './gallery/TemplatePreviewState.js';
36
36
  export { applyTemplatePreviewState, hasPreviewData, previewErrorMessage } from './gallery/applyTemplatePreviewState.js';
37
37
  export { readBoolean, readNumber, readOptionalString, readRecords, readString, readStrings, recordString } from './shell/elementProperties.js';
@@ -87,10 +87,27 @@ export { buildOrgTree, descendantCount, expandedToDepth, placements, readOrgNode
87
87
  export { OrgTree } from './foundation/OrgTree.js';
88
88
  export { isGranted, readGrants, readPermissions, readRoles, sectionsOf, setGrant } from './foundation/permissionModel.js';
89
89
  export { PermissionMatrix } from './foundation/PermissionMatrix.js';
90
+ export { readUrlParameter, useUrlState, writeUrlParameter } from './foundation/urlState.js';
91
+ export { compactQuery, useCompactWidth } from './foundation/useCompactWidth.js';
92
+ export { CellKind, ListVariant, filterRows, formatSort, groupRows, nextSort, paginate, parseSelection, parseSort, readListColumns, readListVariant, rowId, searchRows, sortRows, textOf, toggleSelection } from './foundation/listModel.js';
93
+ export { DataList } from './foundation/DataList.js';
94
+ export { activeTab, readTabs, stepTab } from './foundation/tabModel.js';
95
+ export { TabSet } from './foundation/TabSet.js';
96
+ export { SubNavigation } from './foundation/SubNavigation.js';
97
+ export { BulkBar, selectionCount } from './foundation/BulkBar.js';
98
+ export { GlobalSearch } from './foundation/GlobalSearch.js';
99
+ export { NotificationsButton } from './foundation/NotificationsButton.js';
100
+ export { cardsOf, moveCard, overLimit, readCards, readColumnsOfBoard } from './foundation/boardModel.js';
101
+ export { KanbanBoard } from './foundation/KanbanBoard.js';
102
+ export { StepStatus, canOpen, neighbour, reachableStep, readWizardSteps, statusOf } from './foundation/wizardModel.js';
103
+ export { WizardProgress } from './foundation/WizardProgress.js';
104
+ export { FormFieldType, FormMode, addressLines, isFilled, mapServerErrors, problemOf, readFormMode, readFormSections, sameValues, validate } from './foundation/formModel.js';
105
+ export { FormScreenBody } from './foundation/FormScreenBody.js';
90
106
  export { bindable, foundationDescriptors, list, standardStateProperties } from './foundation/foundationDescriptors.js';
91
107
  export { foundationComponentMetadata } from './foundation/foundationComponentMetadata.js';
92
108
  export { foundationElement, foundationSamples } from './foundation/foundationSamples.js';
93
109
  export { FoundationStates } from './foundation/FoundationStates.js';
110
+ export { foundationScreenTemplates } from './foundation/templates/index.js';
94
111
  export { blueprintThemeCompatibility } from './themes/blueprintThemeCompatibility.js';
95
112
  export { lightTheme } from './themes/light.js';
96
113
  export { darkTheme } from './themes/dark.js';
@@ -116,4 +133,13 @@ export { PreviewToast } from './preview-host/PreviewToast.js';
116
133
  export { PreviewProblemsView } from './preview-host/PreviewProblemsView.js';
117
134
  export { ApplicationHost } from './preview-host/ApplicationHost.js';
118
135
  export { ScenePreviewHost } from './preview-host/ScenePreviewHost.js';
136
+ export { boardScreenTemplate } from './foundation/templates/boardScreenTemplate.js';
137
+ export { component, foundationTemplateProvenance, fromQuery, thumbnailOf } from './foundation/templates/templateParts.js';
138
+ export { dashboardScreenTemplate } from './foundation/templates/dashboardScreenTemplate.js';
139
+ export { formScreenTemplate } from './foundation/templates/formScreenTemplate.js';
140
+ export { listScreenTemplate } from './foundation/templates/listScreenTemplate.js';
141
+ export { masterDetailScreenTemplate } from './foundation/templates/masterDetailScreenTemplate.js';
142
+ export { recordPageTemplate } from './foundation/templates/recordPageTemplate.js';
143
+ export { wizardScreenTemplate } from './foundation/templates/wizardScreenTemplate.js';
144
+ export { workspaceScreenTemplate } from './foundation/templates/workspaceScreenTemplate.js';
119
145
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}