@cratis/scene.blueprint.default 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (558) hide show
  1. package/.storybook/main.ts +32 -0
  2. package/.storybook/preview.ts +20 -0
  3. package/ComponentName.ts +60 -0
  4. package/README.md +204 -0
  5. package/configuration/ColorScheme.ts +17 -0
  6. package/configuration/LayoutConfigProvider.tsx +182 -0
  7. package/configuration/LayoutConfigState.ts +46 -0
  8. package/configuration/LayoutMode.ts +50 -0
  9. package/configuration/MenuTheme.ts +24 -0
  10. package/configuration/index.ts +11 -0
  11. package/configuration/layoutConfigStorage.ts +102 -0
  12. package/configuration/layoutConfigTransitions.ts +150 -0
  13. package/configuration/layoutWrapperClasses.ts +68 -0
  14. package/defaultBlueprint.ts +66 -0
  15. package/defaultBlueprintComponents.ts +51 -0
  16. package/dist/cjs/ComponentName.js +33 -0
  17. package/dist/cjs/ComponentName.js.map +1 -0
  18. package/dist/cjs/configuration/ColorScheme.js +23 -0
  19. package/dist/cjs/configuration/ColorScheme.js.map +1 -0
  20. package/dist/cjs/configuration/LayoutConfigProvider.js +96 -0
  21. package/dist/cjs/configuration/LayoutConfigProvider.js.map +1 -0
  22. package/dist/cjs/configuration/LayoutMode.js +38 -0
  23. package/dist/cjs/configuration/LayoutMode.js.map +1 -0
  24. package/dist/cjs/configuration/MenuTheme.js +26 -0
  25. package/dist/cjs/configuration/MenuTheme.js.map +1 -0
  26. package/dist/cjs/configuration/layoutConfigStorage.js +85 -0
  27. package/dist/cjs/configuration/layoutConfigStorage.js.map +1 -0
  28. package/dist/cjs/configuration/layoutConfigTransitions.js +158 -0
  29. package/dist/cjs/configuration/layoutConfigTransitions.js.map +1 -0
  30. package/dist/cjs/configuration/layoutWrapperClasses.js +62 -0
  31. package/dist/cjs/configuration/layoutWrapperClasses.js.map +1 -0
  32. package/dist/cjs/defaultBlueprint.js +92 -0
  33. package/dist/cjs/defaultBlueprint.js.map +1 -0
  34. package/dist/cjs/defaultBlueprintComponents.js +54 -0
  35. package/dist/cjs/defaultBlueprintComponents.js.map +1 -0
  36. package/dist/cjs/gallery/GalleryScreenPreview.js +63 -0
  37. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -0
  38. package/dist/cjs/gallery/TemplateSlotName.js +25 -0
  39. package/dist/cjs/gallery/TemplateSlotName.js.map +1 -0
  40. package/dist/cjs/gallery/applicationChrome.js +134 -0
  41. package/dist/cjs/gallery/applicationChrome.js.map +1 -0
  42. package/dist/cjs/gallery/authTemplates.js +234 -0
  43. package/dist/cjs/gallery/authTemplates.js.map +1 -0
  44. package/dist/cjs/gallery/componentNames.js +53 -0
  45. package/dist/cjs/gallery/componentNames.js.map +1 -0
  46. package/dist/cjs/gallery/composeScreen.js +99 -0
  47. package/dist/cjs/gallery/composeScreen.js.map +1 -0
  48. package/dist/cjs/gallery/dependencyComponentNames.js +72 -0
  49. package/dist/cjs/gallery/dependencyComponentNames.js.map +1 -0
  50. package/dist/cjs/gallery/dialogTemplates.js +161 -0
  51. package/dist/cjs/gallery/dialogTemplates.js.map +1 -0
  52. package/dist/cjs/gallery/elements.js +80 -0
  53. package/dist/cjs/gallery/elements.js.map +1 -0
  54. package/dist/cjs/gallery/navigation.js +129 -0
  55. package/dist/cjs/gallery/navigation.js.map +1 -0
  56. package/dist/cjs/gallery/nesting.js +129 -0
  57. package/dist/cjs/gallery/nesting.js.map +1 -0
  58. package/dist/cjs/gallery/previewProfile.js +68 -0
  59. package/dist/cjs/gallery/previewProfile.js.map +1 -0
  60. package/dist/cjs/gallery/resolveElementNames.js +63 -0
  61. package/dist/cjs/gallery/resolveElementNames.js.map +1 -0
  62. package/dist/cjs/gallery/screens.js +222 -0
  63. package/dist/cjs/gallery/screens.js.map +1 -0
  64. package/dist/cjs/gallery/statusTemplates.js +190 -0
  65. package/dist/cjs/gallery/statusTemplates.js.map +1 -0
  66. package/dist/cjs/gallery/supportTemplates.js +319 -0
  67. package/dist/cjs/gallery/supportTemplates.js.map +1 -0
  68. package/dist/cjs/gallery/widgets.js +94 -0
  69. package/dist/cjs/gallery/widgets.js.map +1 -0
  70. package/dist/cjs/gallery/workspaceTemplates.js +395 -0
  71. package/dist/cjs/gallery/workspaceTemplates.js.map +1 -0
  72. package/dist/cjs/index.js +220 -0
  73. package/dist/cjs/index.js.map +1 -0
  74. package/dist/cjs/layouts/LayoutName.js +19 -0
  75. package/dist/cjs/layouts/LayoutName.js.map +1 -0
  76. package/dist/cjs/layouts/SlotName.js +31 -0
  77. package/dist/cjs/layouts/SlotName.js.map +1 -0
  78. package/dist/cjs/layouts/appShell.js +160 -0
  79. package/dist/cjs/layouts/appShell.js.map +1 -0
  80. package/dist/cjs/layouts/defaultLayouts.js +20 -0
  81. package/dist/cjs/layouts/defaultLayouts.js.map +1 -0
  82. package/dist/cjs/layouts/flowBuilders.js +66 -0
  83. package/dist/cjs/layouts/flowBuilders.js.map +1 -0
  84. package/dist/cjs/layouts/fullPage.js +78 -0
  85. package/dist/cjs/layouts/fullPage.js.map +1 -0
  86. package/dist/cjs/layouts/shellComponents.js +29 -0
  87. package/dist/cjs/layouts/shellComponents.js.map +1 -0
  88. package/dist/cjs/package.json +3 -0
  89. package/dist/cjs/packageName.js +15 -0
  90. package/dist/cjs/packageName.js.map +1 -0
  91. package/dist/cjs/shell/AppShell.js +88 -0
  92. package/dist/cjs/shell/AppShell.js.map +1 -0
  93. package/dist/cjs/shell/Breadcrumb.js +33 -0
  94. package/dist/cjs/shell/Breadcrumb.js.map +1 -0
  95. package/dist/cjs/shell/ConfigPanel.js +128 -0
  96. package/dist/cjs/shell/ConfigPanel.js.map +1 -0
  97. package/dist/cjs/shell/Footer.js +28 -0
  98. package/dist/cjs/shell/Footer.js.map +1 -0
  99. package/dist/cjs/shell/FullPageShell.js +53 -0
  100. package/dist/cjs/shell/FullPageShell.js.map +1 -0
  101. package/dist/cjs/shell/LayoutModeSwitcher.js +58 -0
  102. package/dist/cjs/shell/LayoutModeSwitcher.js.map +1 -0
  103. package/dist/cjs/shell/Logo.js +44 -0
  104. package/dist/cjs/shell/Logo.js.map +1 -0
  105. package/dist/cjs/shell/Mask.js +34 -0
  106. package/dist/cjs/shell/Mask.js.map +1 -0
  107. package/dist/cjs/shell/Menu.js +36 -0
  108. package/dist/cjs/shell/Menu.js.map +1 -0
  109. package/dist/cjs/shell/MenuItem.js +65 -0
  110. package/dist/cjs/shell/MenuItem.js.map +1 -0
  111. package/dist/cjs/shell/PageHeader.js +43 -0
  112. package/dist/cjs/shell/PageHeader.js.map +1 -0
  113. package/dist/cjs/shell/RightPanel.js +30 -0
  114. package/dist/cjs/shell/RightPanel.js.map +1 -0
  115. package/dist/cjs/shell/Sidebar.js +51 -0
  116. package/dist/cjs/shell/Sidebar.js.map +1 -0
  117. package/dist/cjs/shell/ThemeOption.js +42 -0
  118. package/dist/cjs/shell/ThemeOption.js.map +1 -0
  119. package/dist/cjs/shell/ThemeSwitcher.js +50 -0
  120. package/dist/cjs/shell/ThemeSwitcher.js.map +1 -0
  121. package/dist/cjs/shell/Topbar.js +54 -0
  122. package/dist/cjs/shell/Topbar.js.map +1 -0
  123. package/dist/cjs/shell/UserMenu.js +68 -0
  124. package/dist/cjs/shell/UserMenu.js.map +1 -0
  125. package/dist/cjs/shell/elementProperties.js +56 -0
  126. package/dist/cjs/shell/elementProperties.js.map +1 -0
  127. package/dist/cjs/themes/LayoutThemeProvider.js +33 -0
  128. package/dist/cjs/themes/LayoutThemeProvider.js.map +1 -0
  129. package/dist/cjs/themes/blueprintThemeCompatibility.js +28 -0
  130. package/dist/cjs/themes/blueprintThemeCompatibility.js.map +1 -0
  131. package/dist/cjs/themes/dark.js +40 -0
  132. package/dist/cjs/themes/dark.js.map +1 -0
  133. package/dist/cjs/themes/defaultBlueprintThemes.js +19 -0
  134. package/dist/cjs/themes/defaultBlueprintThemes.js.map +1 -0
  135. package/dist/cjs/themes/light.js +43 -0
  136. package/dist/cjs/themes/light.js.map +1 -0
  137. package/dist/esm/ComponentName.d.ts +19 -0
  138. package/dist/esm/ComponentName.d.ts.map +1 -0
  139. package/dist/esm/ComponentName.js +31 -0
  140. package/dist/esm/ComponentName.js.map +1 -0
  141. package/dist/esm/configuration/ColorScheme.d.ts +6 -0
  142. package/dist/esm/configuration/ColorScheme.d.ts.map +1 -0
  143. package/dist/esm/configuration/ColorScheme.js +20 -0
  144. package/dist/esm/configuration/ColorScheme.js.map +1 -0
  145. package/dist/esm/configuration/LayoutConfigProvider.d.ts +29 -0
  146. package/dist/esm/configuration/LayoutConfigProvider.d.ts.map +1 -0
  147. package/dist/esm/configuration/LayoutConfigProvider.js +92 -0
  148. package/dist/esm/configuration/LayoutConfigProvider.js.map +1 -0
  149. package/dist/esm/configuration/LayoutConfigState.d.ts +14 -0
  150. package/dist/esm/configuration/LayoutConfigState.d.ts.map +1 -0
  151. package/dist/esm/configuration/LayoutConfigState.js +2 -0
  152. package/dist/esm/configuration/LayoutConfigState.js.map +1 -0
  153. package/dist/esm/configuration/LayoutMode.d.ts +12 -0
  154. package/dist/esm/configuration/LayoutMode.d.ts.map +1 -0
  155. package/dist/esm/configuration/LayoutMode.js +35 -0
  156. package/dist/esm/configuration/LayoutMode.js.map +1 -0
  157. package/dist/esm/configuration/MenuTheme.d.ts +7 -0
  158. package/dist/esm/configuration/MenuTheme.d.ts.map +1 -0
  159. package/dist/esm/configuration/MenuTheme.js +23 -0
  160. package/dist/esm/configuration/MenuTheme.js.map +1 -0
  161. package/dist/esm/configuration/index.d.ts +9 -0
  162. package/dist/esm/configuration/index.d.ts.map +1 -0
  163. package/dist/esm/configuration/index.js +9 -0
  164. package/dist/esm/configuration/index.js.map +1 -0
  165. package/dist/esm/configuration/layoutConfigStorage.d.ts +6 -0
  166. package/dist/esm/configuration/layoutConfigStorage.d.ts.map +1 -0
  167. package/dist/esm/configuration/layoutConfigStorage.js +81 -0
  168. package/dist/esm/configuration/layoutConfigStorage.js.map +1 -0
  169. package/dist/esm/configuration/layoutConfigTransitions.d.ts +22 -0
  170. package/dist/esm/configuration/layoutConfigTransitions.d.ts.map +1 -0
  171. package/dist/esm/configuration/layoutConfigTransitions.js +140 -0
  172. package/dist/esm/configuration/layoutConfigTransitions.js.map +1 -0
  173. package/dist/esm/configuration/layoutWrapperClasses.d.ts +4 -0
  174. package/dist/esm/configuration/layoutWrapperClasses.d.ts.map +1 -0
  175. package/dist/esm/configuration/layoutWrapperClasses.js +59 -0
  176. package/dist/esm/configuration/layoutWrapperClasses.js.map +1 -0
  177. package/dist/esm/defaultBlueprint.d.ts +5 -0
  178. package/dist/esm/defaultBlueprint.d.ts.map +1 -0
  179. package/dist/esm/defaultBlueprint.js +89 -0
  180. package/dist/esm/defaultBlueprint.js.map +1 -0
  181. package/dist/esm/defaultBlueprintComponents.d.ts +3 -0
  182. package/dist/esm/defaultBlueprintComponents.d.ts.map +1 -0
  183. package/dist/esm/defaultBlueprintComponents.js +52 -0
  184. package/dist/esm/defaultBlueprintComponents.js.map +1 -0
  185. package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.d.ts +2 -0
  186. package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.d.ts.map +1 -0
  187. package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.js +60 -0
  188. package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.js.map +1 -0
  189. package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.d.ts +2 -0
  190. package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.d.ts.map +1 -0
  191. package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.js +60 -0
  192. package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.js.map +1 -0
  193. package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts +2 -0
  194. package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts.map +1 -0
  195. package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.js +26 -0
  196. package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.js.map +1 -0
  197. package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.d.ts +2 -0
  198. package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.d.ts.map +1 -0
  199. package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.js +32 -0
  200. package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.js.map +1 -0
  201. package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.d.ts +2 -0
  202. package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.d.ts.map +1 -0
  203. package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.js +40 -0
  204. package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.js.map +1 -0
  205. package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts +2 -0
  206. package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts.map +1 -0
  207. package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.js +27 -0
  208. package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.js.map +1 -0
  209. package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts +2 -0
  210. package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts.map +1 -0
  211. package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js +41 -0
  212. package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js.map +1 -0
  213. package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.d.ts +2 -0
  214. package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.d.ts.map +1 -0
  215. package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.js +31 -0
  216. package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.js.map +1 -0
  217. package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts +2 -0
  218. package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts.map +1 -0
  219. package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.js +33 -0
  220. package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.js.map +1 -0
  221. package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.d.ts +2 -0
  222. package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.d.ts.map +1 -0
  223. package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.js +44 -0
  224. package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.js.map +1 -0
  225. package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.d.ts +2 -0
  226. package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.d.ts.map +1 -0
  227. package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.js +60 -0
  228. package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.js.map +1 -0
  229. package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.d.ts +2 -0
  230. package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.d.ts.map +1 -0
  231. package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.js +28 -0
  232. package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.js.map +1 -0
  233. package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.d.ts +2 -0
  234. package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.d.ts.map +1 -0
  235. package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.js +38 -0
  236. package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.js.map +1 -0
  237. package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.d.ts +2 -0
  238. package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.d.ts.map +1 -0
  239. package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.js +39 -0
  240. package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.js.map +1 -0
  241. package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.d.ts +2 -0
  242. package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.d.ts.map +1 -0
  243. package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.js +37 -0
  244. package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.js.map +1 -0
  245. package/dist/esm/gallery/ApplicationScreens.stories.d.ts +31 -0
  246. package/dist/esm/gallery/ApplicationScreens.stories.d.ts.map +1 -0
  247. package/dist/esm/gallery/ApplicationScreens.stories.js +29 -0
  248. package/dist/esm/gallery/ApplicationScreens.stories.js.map +1 -0
  249. package/dist/esm/gallery/FullPageScreens.stories.d.ts +28 -0
  250. package/dist/esm/gallery/FullPageScreens.stories.d.ts.map +1 -0
  251. package/dist/esm/gallery/FullPageScreens.stories.js +26 -0
  252. package/dist/esm/gallery/FullPageScreens.stories.js.map +1 -0
  253. package/dist/esm/gallery/GalleryScreenPreview.d.ts +12 -0
  254. package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -0
  255. package/dist/esm/gallery/GalleryScreenPreview.js +60 -0
  256. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -0
  257. package/dist/esm/gallery/NavigationEntry.d.ts +8 -0
  258. package/dist/esm/gallery/NavigationEntry.d.ts.map +1 -0
  259. package/dist/esm/gallery/NavigationEntry.js +2 -0
  260. package/dist/esm/gallery/NavigationEntry.js.map +1 -0
  261. package/dist/esm/gallery/TemplateSlotName.d.ts +11 -0
  262. package/dist/esm/gallery/TemplateSlotName.d.ts.map +1 -0
  263. package/dist/esm/gallery/TemplateSlotName.js +23 -0
  264. package/dist/esm/gallery/TemplateSlotName.js.map +1 -0
  265. package/dist/esm/gallery/applicationChrome.d.ts +8 -0
  266. package/dist/esm/gallery/applicationChrome.d.ts.map +1 -0
  267. package/dist/esm/gallery/applicationChrome.js +131 -0
  268. package/dist/esm/gallery/applicationChrome.js.map +1 -0
  269. package/dist/esm/gallery/authTemplates.d.ts +9 -0
  270. package/dist/esm/gallery/authTemplates.d.ts.map +1 -0
  271. package/dist/esm/gallery/authTemplates.js +226 -0
  272. package/dist/esm/gallery/authTemplates.js.map +1 -0
  273. package/dist/esm/gallery/componentNames.d.ts +4 -0
  274. package/dist/esm/gallery/componentNames.d.ts.map +1 -0
  275. package/dist/esm/gallery/componentNames.js +50 -0
  276. package/dist/esm/gallery/componentNames.js.map +1 -0
  277. package/dist/esm/gallery/composeScreen.d.ts +5 -0
  278. package/dist/esm/gallery/composeScreen.d.ts.map +1 -0
  279. package/dist/esm/gallery/composeScreen.js +95 -0
  280. package/dist/esm/gallery/composeScreen.js.map +1 -0
  281. package/dist/esm/gallery/dependencyComponentNames.d.ts +4 -0
  282. package/dist/esm/gallery/dependencyComponentNames.d.ts.map +1 -0
  283. package/dist/esm/gallery/dependencyComponentNames.js +68 -0
  284. package/dist/esm/gallery/dependencyComponentNames.js.map +1 -0
  285. package/dist/esm/gallery/dialogTemplates.d.ts +6 -0
  286. package/dist/esm/gallery/dialogTemplates.d.ts.map +1 -0
  287. package/dist/esm/gallery/dialogTemplates.js +156 -0
  288. package/dist/esm/gallery/dialogTemplates.js.map +1 -0
  289. package/dist/esm/gallery/elements.d.ts +7 -0
  290. package/dist/esm/gallery/elements.d.ts.map +1 -0
  291. package/dist/esm/gallery/elements.js +74 -0
  292. package/dist/esm/gallery/elements.js.map +1 -0
  293. package/dist/esm/gallery/index.d.ts +20 -0
  294. package/dist/esm/gallery/index.d.ts.map +1 -0
  295. package/dist/esm/gallery/index.js +20 -0
  296. package/dist/esm/gallery/index.js.map +1 -0
  297. package/dist/esm/gallery/navigation.d.ts +9 -0
  298. package/dist/esm/gallery/navigation.d.ts.map +1 -0
  299. package/dist/esm/gallery/navigation.js +122 -0
  300. package/dist/esm/gallery/navigation.js.map +1 -0
  301. package/dist/esm/gallery/nesting.d.ts +6 -0
  302. package/dist/esm/gallery/nesting.d.ts.map +1 -0
  303. package/dist/esm/gallery/nesting.js +124 -0
  304. package/dist/esm/gallery/nesting.js.map +1 -0
  305. package/dist/esm/gallery/previewProfile.d.ts +6 -0
  306. package/dist/esm/gallery/previewProfile.d.ts.map +1 -0
  307. package/dist/esm/gallery/previewProfile.js +64 -0
  308. package/dist/esm/gallery/previewProfile.js.map +1 -0
  309. package/dist/esm/gallery/resolveElementNames.d.ts +4 -0
  310. package/dist/esm/gallery/resolveElementNames.d.ts.map +1 -0
  311. package/dist/esm/gallery/resolveElementNames.js +61 -0
  312. package/dist/esm/gallery/resolveElementNames.js.map +1 -0
  313. package/dist/esm/gallery/screens.d.ts +5 -0
  314. package/dist/esm/gallery/screens.d.ts.map +1 -0
  315. package/dist/esm/gallery/screens.js +218 -0
  316. package/dist/esm/gallery/screens.js.map +1 -0
  317. package/dist/esm/gallery/statusTemplates.d.ts +7 -0
  318. package/dist/esm/gallery/statusTemplates.d.ts.map +1 -0
  319. package/dist/esm/gallery/statusTemplates.js +184 -0
  320. package/dist/esm/gallery/statusTemplates.js.map +1 -0
  321. package/dist/esm/gallery/supportTemplates.d.ts +8 -0
  322. package/dist/esm/gallery/supportTemplates.d.ts.map +1 -0
  323. package/dist/esm/gallery/supportTemplates.js +312 -0
  324. package/dist/esm/gallery/supportTemplates.js.map +1 -0
  325. package/dist/esm/gallery/widgets.d.ts +12 -0
  326. package/dist/esm/gallery/widgets.d.ts.map +1 -0
  327. package/dist/esm/gallery/widgets.js +86 -0
  328. package/dist/esm/gallery/widgets.js.map +1 -0
  329. package/dist/esm/gallery/workspaceTemplates.d.ts +8 -0
  330. package/dist/esm/gallery/workspaceTemplates.d.ts.map +1 -0
  331. package/dist/esm/gallery/workspaceTemplates.js +388 -0
  332. package/dist/esm/gallery/workspaceTemplates.js.map +1 -0
  333. package/dist/esm/index.d.ts +10 -0
  334. package/dist/esm/index.d.ts.map +1 -0
  335. package/dist/esm/index.js +60 -0
  336. package/dist/esm/index.js.map +1 -0
  337. package/dist/esm/layouts/LayoutName.d.ts +5 -0
  338. package/dist/esm/layouts/LayoutName.d.ts.map +1 -0
  339. package/dist/esm/layouts/LayoutName.js +17 -0
  340. package/dist/esm/layouts/LayoutName.js.map +1 -0
  341. package/dist/esm/layouts/SlotName.d.ts +12 -0
  342. package/dist/esm/layouts/SlotName.d.ts.map +1 -0
  343. package/dist/esm/layouts/SlotName.js +29 -0
  344. package/dist/esm/layouts/SlotName.js.map +1 -0
  345. package/dist/esm/layouts/appShell.d.ts +8 -0
  346. package/dist/esm/layouts/appShell.d.ts.map +1 -0
  347. package/dist/esm/layouts/appShell.js +153 -0
  348. package/dist/esm/layouts/appShell.js.map +1 -0
  349. package/dist/esm/layouts/defaultLayouts.d.ts +3 -0
  350. package/dist/esm/layouts/defaultLayouts.d.ts.map +1 -0
  351. package/dist/esm/layouts/defaultLayouts.js +18 -0
  352. package/dist/esm/layouts/defaultLayouts.js.map +1 -0
  353. package/dist/esm/layouts/flowBuilders.d.ts +6 -0
  354. package/dist/esm/layouts/flowBuilders.d.ts.map +1 -0
  355. package/dist/esm/layouts/flowBuilders.js +61 -0
  356. package/dist/esm/layouts/flowBuilders.js.map +1 -0
  357. package/dist/esm/layouts/fullPage.d.ts +6 -0
  358. package/dist/esm/layouts/fullPage.d.ts.map +1 -0
  359. package/dist/esm/layouts/fullPage.js +73 -0
  360. package/dist/esm/layouts/fullPage.js.map +1 -0
  361. package/dist/esm/layouts/index.d.ts +8 -0
  362. package/dist/esm/layouts/index.d.ts.map +1 -0
  363. package/dist/esm/layouts/index.js +8 -0
  364. package/dist/esm/layouts/index.js.map +1 -0
  365. package/dist/esm/layouts/shellComponents.d.ts +3 -0
  366. package/dist/esm/layouts/shellComponents.d.ts.map +1 -0
  367. package/dist/esm/layouts/shellComponents.js +27 -0
  368. package/dist/esm/layouts/shellComponents.js.map +1 -0
  369. package/dist/esm/package.json +3 -0
  370. package/dist/esm/packageName.d.ts +2 -0
  371. package/dist/esm/packageName.d.ts.map +1 -0
  372. package/dist/esm/packageName.js +13 -0
  373. package/dist/esm/packageName.js.map +1 -0
  374. package/dist/esm/shell/AppShell.d.ts +3 -0
  375. package/dist/esm/shell/AppShell.d.ts.map +1 -0
  376. package/dist/esm/shell/AppShell.js +86 -0
  377. package/dist/esm/shell/AppShell.js.map +1 -0
  378. package/dist/esm/shell/Breadcrumb.d.ts +3 -0
  379. package/dist/esm/shell/Breadcrumb.d.ts.map +1 -0
  380. package/dist/esm/shell/Breadcrumb.js +31 -0
  381. package/dist/esm/shell/Breadcrumb.js.map +1 -0
  382. package/dist/esm/shell/ConfigPanel.d.ts +3 -0
  383. package/dist/esm/shell/ConfigPanel.d.ts.map +1 -0
  384. package/dist/esm/shell/ConfigPanel.js +126 -0
  385. package/dist/esm/shell/ConfigPanel.js.map +1 -0
  386. package/dist/esm/shell/Footer.d.ts +3 -0
  387. package/dist/esm/shell/Footer.d.ts.map +1 -0
  388. package/dist/esm/shell/Footer.js +26 -0
  389. package/dist/esm/shell/Footer.js.map +1 -0
  390. package/dist/esm/shell/FullPageShell.d.ts +3 -0
  391. package/dist/esm/shell/FullPageShell.d.ts.map +1 -0
  392. package/dist/esm/shell/FullPageShell.js +51 -0
  393. package/dist/esm/shell/FullPageShell.js.map +1 -0
  394. package/dist/esm/shell/LayoutModeSwitcher.d.ts +3 -0
  395. package/dist/esm/shell/LayoutModeSwitcher.d.ts.map +1 -0
  396. package/dist/esm/shell/LayoutModeSwitcher.js +56 -0
  397. package/dist/esm/shell/LayoutModeSwitcher.js.map +1 -0
  398. package/dist/esm/shell/LayoutModes.stories.d.ts +29 -0
  399. package/dist/esm/shell/LayoutModes.stories.d.ts.map +1 -0
  400. package/dist/esm/shell/LayoutModes.stories.js +43 -0
  401. package/dist/esm/shell/LayoutModes.stories.js.map +1 -0
  402. package/dist/esm/shell/Logo.d.ts +3 -0
  403. package/dist/esm/shell/Logo.d.ts.map +1 -0
  404. package/dist/esm/shell/Logo.js +42 -0
  405. package/dist/esm/shell/Logo.js.map +1 -0
  406. package/dist/esm/shell/Mask.d.ts +3 -0
  407. package/dist/esm/shell/Mask.d.ts.map +1 -0
  408. package/dist/esm/shell/Mask.js +31 -0
  409. package/dist/esm/shell/Mask.js.map +1 -0
  410. package/dist/esm/shell/Menu.d.ts +3 -0
  411. package/dist/esm/shell/Menu.d.ts.map +1 -0
  412. package/dist/esm/shell/Menu.js +34 -0
  413. package/dist/esm/shell/Menu.js.map +1 -0
  414. package/dist/esm/shell/MenuItem.d.ts +3 -0
  415. package/dist/esm/shell/MenuItem.d.ts.map +1 -0
  416. package/dist/esm/shell/MenuItem.js +63 -0
  417. package/dist/esm/shell/MenuItem.js.map +1 -0
  418. package/dist/esm/shell/PageHeader.d.ts +3 -0
  419. package/dist/esm/shell/PageHeader.d.ts.map +1 -0
  420. package/dist/esm/shell/PageHeader.js +41 -0
  421. package/dist/esm/shell/PageHeader.js.map +1 -0
  422. package/dist/esm/shell/RightPanel.d.ts +3 -0
  423. package/dist/esm/shell/RightPanel.d.ts.map +1 -0
  424. package/dist/esm/shell/RightPanel.js +28 -0
  425. package/dist/esm/shell/RightPanel.js.map +1 -0
  426. package/dist/esm/shell/Sidebar.d.ts +3 -0
  427. package/dist/esm/shell/Sidebar.d.ts.map +1 -0
  428. package/dist/esm/shell/Sidebar.js +49 -0
  429. package/dist/esm/shell/Sidebar.js.map +1 -0
  430. package/dist/esm/shell/ThemeOption.d.ts +10 -0
  431. package/dist/esm/shell/ThemeOption.d.ts.map +1 -0
  432. package/dist/esm/shell/ThemeOption.js +39 -0
  433. package/dist/esm/shell/ThemeOption.js.map +1 -0
  434. package/dist/esm/shell/ThemeSwitcher.d.ts +3 -0
  435. package/dist/esm/shell/ThemeSwitcher.d.ts.map +1 -0
  436. package/dist/esm/shell/ThemeSwitcher.js +48 -0
  437. package/dist/esm/shell/ThemeSwitcher.js.map +1 -0
  438. package/dist/esm/shell/Topbar.d.ts +3 -0
  439. package/dist/esm/shell/Topbar.d.ts.map +1 -0
  440. package/dist/esm/shell/Topbar.js +52 -0
  441. package/dist/esm/shell/Topbar.js.map +1 -0
  442. package/dist/esm/shell/UserMenu.d.ts +3 -0
  443. package/dist/esm/shell/UserMenu.d.ts.map +1 -0
  444. package/dist/esm/shell/UserMenu.js +66 -0
  445. package/dist/esm/shell/UserMenu.js.map +1 -0
  446. package/dist/esm/shell/elementProperties.d.ts +9 -0
  447. package/dist/esm/shell/elementProperties.d.ts.map +1 -0
  448. package/dist/esm/shell/elementProperties.js +48 -0
  449. package/dist/esm/shell/elementProperties.js.map +1 -0
  450. package/dist/esm/shell/index.d.ts +19 -0
  451. package/dist/esm/shell/index.d.ts.map +1 -0
  452. package/dist/esm/shell/index.js +19 -0
  453. package/dist/esm/shell/index.js.map +1 -0
  454. package/dist/esm/themes/LayoutThemeProvider.d.ts +9 -0
  455. package/dist/esm/themes/LayoutThemeProvider.d.ts.map +1 -0
  456. package/dist/esm/themes/LayoutThemeProvider.js +31 -0
  457. package/dist/esm/themes/LayoutThemeProvider.js.map +1 -0
  458. package/dist/esm/themes/Theming.stories.d.ts +21 -0
  459. package/dist/esm/themes/Theming.stories.d.ts.map +1 -0
  460. package/dist/esm/themes/Theming.stories.js +54 -0
  461. package/dist/esm/themes/Theming.stories.js.map +1 -0
  462. package/dist/esm/themes/blueprintThemeCompatibility.d.ts +2 -0
  463. package/dist/esm/themes/blueprintThemeCompatibility.d.ts.map +1 -0
  464. package/dist/esm/themes/blueprintThemeCompatibility.js +26 -0
  465. package/dist/esm/themes/blueprintThemeCompatibility.js.map +1 -0
  466. package/dist/esm/themes/dark.d.ts +3 -0
  467. package/dist/esm/themes/dark.d.ts.map +1 -0
  468. package/dist/esm/themes/dark.js +38 -0
  469. package/dist/esm/themes/dark.js.map +1 -0
  470. package/dist/esm/themes/defaultBlueprintThemes.d.ts +3 -0
  471. package/dist/esm/themes/defaultBlueprintThemes.d.ts.map +1 -0
  472. package/dist/esm/themes/defaultBlueprintThemes.js +17 -0
  473. package/dist/esm/themes/defaultBlueprintThemes.js.map +1 -0
  474. package/dist/esm/themes/index.d.ts +6 -0
  475. package/dist/esm/themes/index.d.ts.map +1 -0
  476. package/dist/esm/themes/index.js +6 -0
  477. package/dist/esm/themes/index.js.map +1 -0
  478. package/dist/esm/themes/light.d.ts +3 -0
  479. package/dist/esm/themes/light.d.ts.map +1 -0
  480. package/dist/esm/themes/light.js +41 -0
  481. package/dist/esm/themes/light.js.map +1 -0
  482. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  483. package/for_AppShell/when_rendering_a_gallery_screen.tsx +76 -0
  484. package/for_LayoutConfigProvider/when_switching_mode_and_reloading.tsx +77 -0
  485. package/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.ts +42 -0
  486. package/for_defaultBlueprint/when_validating_the_bundle.ts +43 -0
  487. package/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.ts +50 -0
  488. package/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.ts +36 -0
  489. package/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.ts +53 -0
  490. package/for_galleryScreenTemplates/when_following_the_nesting_chain.ts +41 -0
  491. package/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.ts +44 -0
  492. package/for_galleryScreens/when_resolving_the_component_names_they_reference.ts +60 -0
  493. package/for_layoutConfigStorage/when_restoring_a_persisted_configuration.ts +76 -0
  494. package/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.ts +44 -0
  495. package/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.ts +61 -0
  496. package/for_layoutWrapperClasses/when_rendering_each_mode.ts +63 -0
  497. package/for_navigation/when_aggregating_the_navigation_contributions.ts +50 -0
  498. package/gallery/ApplicationScreens.stories.tsx +70 -0
  499. package/gallery/FullPageScreens.stories.tsx +60 -0
  500. package/gallery/GalleryScreenPreview.tsx +68 -0
  501. package/gallery/NavigationEntry.ts +27 -0
  502. package/gallery/TemplateSlotName.ts +36 -0
  503. package/gallery/applicationChrome.ts +110 -0
  504. package/gallery/authTemplates.ts +161 -0
  505. package/gallery/componentNames.ts +55 -0
  506. package/gallery/composeScreen.ts +95 -0
  507. package/gallery/dependencyComponentNames.ts +64 -0
  508. package/gallery/dialogTemplates.ts +79 -0
  509. package/gallery/elements.ts +65 -0
  510. package/gallery/index.ts +22 -0
  511. package/gallery/navigation.ts +71 -0
  512. package/gallery/nesting.ts +82 -0
  513. package/gallery/previewProfile.ts +59 -0
  514. package/gallery/resolveElementNames.ts +55 -0
  515. package/gallery/screens.ts +111 -0
  516. package/gallery/statusTemplates.ts +118 -0
  517. package/gallery/supportTemplates.ts +164 -0
  518. package/gallery/widgets.ts +63 -0
  519. package/gallery/workspaceTemplates.ts +198 -0
  520. package/index.ts +12 -0
  521. package/layouts/LayoutName.ts +18 -0
  522. package/layouts/SlotName.ts +44 -0
  523. package/layouts/appShell.ts +106 -0
  524. package/layouts/defaultLayouts.ts +15 -0
  525. package/layouts/flowBuilders.ts +49 -0
  526. package/layouts/fullPage.ts +48 -0
  527. package/layouts/index.ts +10 -0
  528. package/layouts/shellComponents.ts +28 -0
  529. package/package.json +68 -0
  530. package/packageName.ts +12 -0
  531. package/shell/AppShell.tsx +66 -0
  532. package/shell/Breadcrumb.tsx +31 -0
  533. package/shell/ConfigPanel.tsx +105 -0
  534. package/shell/Footer.tsx +23 -0
  535. package/shell/FullPageShell.tsx +41 -0
  536. package/shell/LayoutModeSwitcher.tsx +50 -0
  537. package/shell/LayoutModes.stories.tsx +83 -0
  538. package/shell/Logo.tsx +30 -0
  539. package/shell/Mask.tsx +29 -0
  540. package/shell/Menu.tsx +26 -0
  541. package/shell/MenuItem.tsx +39 -0
  542. package/shell/PageHeader.tsx +28 -0
  543. package/shell/RightPanel.tsx +23 -0
  544. package/shell/Sidebar.tsx +45 -0
  545. package/shell/ThemeOption.ts +60 -0
  546. package/shell/ThemeSwitcher.tsx +42 -0
  547. package/shell/Topbar.tsx +49 -0
  548. package/shell/UserMenu.tsx +53 -0
  549. package/shell/elementProperties.ts +64 -0
  550. package/shell/index.ts +21 -0
  551. package/shell/layout.css +821 -0
  552. package/themes/LayoutThemeProvider.tsx +41 -0
  553. package/themes/Theming.stories.tsx +89 -0
  554. package/themes/blueprintThemeCompatibility.ts +19 -0
  555. package/themes/dark.ts +38 -0
  556. package/themes/defaultBlueprintThemes.ts +14 -0
  557. package/themes/index.ts +8 -0
  558. package/themes/light.ts +41 -0
@@ -0,0 +1,32 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import type { StorybookConfig } from "@storybook/react-vite";
5
+ import { dirname, join, resolve } from "path";
6
+ import { fileURLToPath } from "url";
7
+ import type { InlineConfig } from 'vite';
8
+
9
+ const __dirname = dirname(fileURLToPath(import.meta.url));
10
+
11
+ const config: StorybookConfig = {
12
+ // Scoped away from `dist/` so a story is never indexed twice - once as source and once as the
13
+ // tsc-emitted copy beside it.
14
+ stories: ["../*.stories.@(js|jsx|mjs|ts|tsx)", "../!(dist|node_modules)/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
15
+ addons: [getAbsolutePath("@storybook/addon-links")],
16
+ framework: { name: getAbsolutePath("@storybook/react-vite"), options: {} },
17
+ async viteFinal(config: InlineConfig) {
18
+ config.resolve = config.resolve || {};
19
+ config.resolve.alias = {
20
+ ...config.resolve.alias,
21
+ '@cratis/scene.engine': resolve(__dirname, '../../engine/index.ts'),
22
+ '@cratis/scene.model': resolve(__dirname, '../../model/index.ts'),
23
+ '@cratis/scene.react': resolve(__dirname, '../../react/index.ts'),
24
+ };
25
+ return config;
26
+ },
27
+ };
28
+ export default config;
29
+
30
+ function getAbsolutePath(value: string): string {
31
+ return dirname(fileURLToPath(import.meta.resolve(join(value, "package.json"))));
32
+ }
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import type { Preview } from '@storybook/react';
5
+
6
+ // PrimeReact 10 ships its base styles and one theme per file, and the shell's own stylesheet layers on
7
+ // top of them. Loading them here rather than from a story keeps every story looking the same and matches
8
+ // what a host does once, at its entry point.
9
+ import 'primereact/resources/primereact.min.css';
10
+ import 'primereact/resources/themes/lara-light-indigo/theme.css';
11
+ import 'primeicons/primeicons.css';
12
+ import '../shell/layout.css';
13
+
14
+ const preview: Preview = {
15
+ parameters: {
16
+ controls: { matchers: { color: /(background|color)$/i, date: /Date$/i } },
17
+ },
18
+ };
19
+
20
+ export default preview;
@@ -0,0 +1,60 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ /**
5
+ * The bare names this package declares components under.
6
+ *
7
+ * A page template writes a bare name and `resolveComponentName` decides which active package wins it, so
8
+ * these names are public API: renaming one breaks every template that referenced it, in this package and
9
+ * in anyone else's. Keeping them in one enum means the manifest, the registry and every template
10
+ * reference the same symbol, and the specs can prove all three agree rather than hoping they do.
11
+ */
12
+ export enum ComponentName {
13
+ /** The application shell - topbar, sidebar, breadcrumb, content, footer and an optional right panel. */
14
+ AppShell = 'appShell',
15
+
16
+ /** The chrome-less shell - content, an optional branding aside, and the configurator. */
17
+ FullPageShell = 'fullPageShell',
18
+
19
+ /** The fixed strip across the top of the application shell. */
20
+ Topbar = 'topbar',
21
+
22
+ /** The sidebar's own chrome, inside the shell-positioned panel. */
23
+ Sidebar = 'sidebar',
24
+
25
+ /** A navigation list. */
26
+ Menu = 'menu',
27
+
28
+ /** One entry in a navigation list, optionally with a submenu. */
29
+ MenuItem = 'menuItem',
30
+
31
+ /** The trail above the content. */
32
+ Breadcrumb = 'breadcrumb',
33
+
34
+ /** The strip below the content. */
35
+ Footer = 'footer',
36
+
37
+ /** The inspector panel down the right-hand edge. */
38
+ RightPanel = 'rightPanel',
39
+
40
+ /** The floating configurator: color scheme, layout mode, menu theme and theme. */
41
+ ConfigPanel = 'configPanel',
42
+
43
+ /** A screen's title, subtitle and actions. */
44
+ PageHeader = 'pageHeader',
45
+
46
+ /** The scrim behind a floating sidebar, which also closes it. */
47
+ Mask = 'mask',
48
+
49
+ /** The brand mark. */
50
+ Logo = 'logo',
51
+
52
+ /** The signed-in user's avatar and menu. */
53
+ UserMenu = 'userMenu',
54
+
55
+ /** Switches between the themes a host offers. */
56
+ ThemeSwitcher = 'themeSwitcher',
57
+
58
+ /** Switches between the layout modes. */
59
+ LayoutModeSwitcher = 'layoutModeSwitcher',
60
+ }
package/README.md ADDED
@@ -0,0 +1,204 @@
1
+ # @cratis/scene.blueprint.default
2
+
3
+ The default **blueprint** for Scene: the application shells an application picks once, the screen and
4
+ dialog templates that go inside them, the components that fill their slots, and two themes.
5
+
6
+ User-facing documentation lives in [`Documentation/blueprints/`](../../../Documentation/blueprints/index.md).
7
+ This file is the contributor's note: the conventions the source follows and the reasoning behind them.
8
+
9
+ ## Layout
10
+
11
+ ```text
12
+ blueprint.default/
13
+ ├── defaultBlueprint.ts the ScenePackage manifest + the ScenePackageBundle
14
+ ├── defaultBlueprintComponents.ts the ComponentRegistry - every bare name to its shell component
15
+ ├── ComponentName.ts the bare names this blueprint declares
16
+ ├── packageName.ts the name a ui profile lists it under
17
+ ├── configuration/ the layout-mode state machine, its React provider and persistence
18
+ ├── layouts/ the two Layout definitions and the flow builders behind them
19
+ ├── shell/ the sixteen shell components, and layout.css
20
+ ├── gallery/ the screen and dialog templates, the screens, and preview helpers
21
+ ├── themes/ the two themes and the provider that applies them
22
+ └── for_*/ BDD specs beside the code they specify
23
+ ```
24
+
25
+ ## The four things this ships, and why they are four
26
+
27
+ | Concept | What it is | How many |
28
+ | --- | --- | --- |
29
+ | **Layout** | the application's base navigational look | one per application, chosen from two |
30
+ | **Screen template** | a reusable shape *inside* a layout, at module / feature / slice level | twenty-three |
31
+ | **Dialog template** | the same, for overlays - no `fitsSlot`, because a dialog occupies no parent slot | three |
32
+ | **Screen** | an instance: names its layout and template, and provides the content | twenty-three |
33
+
34
+ A screen template states where it belongs, in `fitsSlot`, rather than being told by whatever hosts it.
35
+ That one rule composes at every depth: a module's template fits the layout's `content`, a feature's fits a
36
+ slot the module declares, a slice's fits one the feature declares. `nestScreenTemplates` folds a chain from
37
+ the inside out, and `ModuleWorkspace` → `FeatureSection` → `SliceSection` exists to be asserted rather than
38
+ only described.
39
+
40
+ ## Regions (slots)
41
+
42
+ `topbar`, `sidebar`, `menu`, `breadcrumb`, `content`, `footer`, `rightPanel`, `configPanel`, `aside`.
43
+
44
+ Sakai establishes topbar/sidebar/menu/content/footer; the premium PrimeTek templates add the breadcrumb
45
+ and the right panel; `aside` is the branding half of a full-page screen's split. All of them are here,
46
+ because a blueprint covering only the free template's regions forces a fork on anyone wanting the others.
47
+
48
+ `SlotName` is one enum used by the layouts, the templates and the shell components, because a slot filled
49
+ under a name the shell never reads renders nothing and reports nothing.
50
+
51
+ ## Layout modes
52
+
53
+ Eight, plus a mobile regime nobody selects. The class vocabulary is PrimeTek's, unchanged.
54
+
55
+ | Mode | Wrapper class | What it does |
56
+ | --- | --- | --- |
57
+ | Static | `layout-static` | Sidebar docked at 18rem; content pushed by a matching margin, never covered |
58
+ | Overlay | `layout-overlay` | Sidebar parked off-canvas; opening floats it over the content behind a mask |
59
+ | Slim | `layout-slim` | 5rem icon-only rail, circular buttons; submenus pop out at the rail's width |
60
+ | Slim+ | `layout-slim-plus` | 7rem rail with each label stacked under its icon |
61
+ | Compact | `layout-compact` | The 5rem rail with square buttons; the topbar shifts by the rail width too |
62
+ | Horizontal | `layout-horizontal` | Sidebar goes `position: static` into the topbar as a nowrap row; submenus drop down |
63
+ | Reveal | `layout-reveal` | Full panel translated off-left behind a 4.25rem icon strip; hover slides it in over the content; a pin pushes the content out instead |
64
+ | Drawer | `layout-drawer` | A 5.25rem rail that *animates its width* to full on hover - reveal slides, drawer grows - and pins the same way |
65
+
66
+ State classes: `layout-static-inactive`, `layout-overlay-active`, `layout-sidebar-active`,
67
+ `layout-sidebar-anchored`, `layout-mobile`, `layout-mobile-active`. Menu tint:
68
+ `layout-menu-light|dark|primary`. Color scheme: `layout-color-scheme-light|dark`.
69
+
70
+ **Mobile is not a mode.** At or below 991px `effectiveLayoutMode` returns `overlay` regardless of what was
71
+ chosen, the mode picker disables itself and says why, and the choice is kept so it comes back when the
72
+ window grows. The breakpoint is exported as `mobileBreakpoint` so the resize listener and the media query
73
+ cannot disagree.
74
+
75
+ ## Where the state lives
76
+
77
+ One `LayoutConfigState`, one `LayoutConfigProvider`, one `useLayoutConfig`. Every transition is a pure
78
+ function over the record (`layoutConfigTransitions.ts`), so the whole state machine is testable without
79
+ React, and exactly one function turns state into CSS (`layoutWrapperClasses`).
80
+
81
+ Preferences persist to `localStorage` under `cratis.scene.blueprint.default`: mode, menu theme, color
82
+ scheme, theme name and the pin. Deliberately *not* whether the sidebar happened to be open, whether the
83
+ pointer was over it, or whether the viewport was narrow - restoring those produces a shell that opens in a
84
+ state nobody chose. Everything read back is validated against the enums, because storage outlives the
85
+ version of the package that wrote it and an unknown mode puts a class on the wrapper that no rule matches.
86
+
87
+ ## Token vocabulary
88
+
89
+ Thirteen tokens, matching `@cratis/scene.primereact`'s table exactly. A vocabulary that grows per package
90
+ is one no package can rely on.
91
+
92
+ `primary.color`, `primary.contrastColor`, `surface.background`, `surface.card`, `surface.border`,
93
+ `surface.hover`, `surface.overlay`, `text.color`, `text.mutedColor`, `highlight.background`,
94
+ `highlight.color`, `content.borderRadius`, `focus.ring`.
95
+
96
+ `layout.css` aliases the `--scene-*` custom properties into `--layout-*` locals once, at the top, and no
97
+ rule below references a `--scene-*` name - the same bridge pattern `@cratis/components` uses for its
98
+ `--cratis-*` layer. Overriding the look means overriding tokens, never editing a rule.
99
+
100
+ The stylesheet is a plain `.css` file rather than an import from TypeScript, because this repo's rollup
101
+ config has no CSS plugin and adding one is not this package's call. A host imports
102
+ `@cratis/scene.blueprint.default/styles` once; Storybook does it in `.storybook/preview.ts`.
103
+
104
+ ## Theme attribution
105
+
106
+ | Theme | Author | Link | License |
107
+ | --- | --- | --- | --- |
108
+ | Scene Default Light | Cratis | <https://cratis.io> | MIT |
109
+ | Scene Default Dark | Cratis | <https://cratis.io> | MIT |
110
+
111
+ Both palettes are original to Cratis - a neutral grey ramp with an indigo accent - not adopted from any
112
+ existing preset, which is why `author` says so rather than being left blank. A theme with empty
113
+ attribution reads as "nobody has checked", and once a palette is lifted without its credit nobody can tell
114
+ afterwards which of the two it was. Anything adopted later must fill `author`, `authorUrl` and `license`
115
+ from the source package's own LICENSE file, verified rather than assumed.
116
+
117
+ Both themes declare `compatibleWith: ['core', 'Cratis.Blueprint.Default', 'PrimeReact',
118
+ 'Cratis.Components', 'Tailwind']`. `core` is on the list on purpose: `incompatiblePackages` has no implicit
119
+ exemption for it, so a theme omitting it is reported incompatible for `core` with every profile that lists
120
+ it - which is every profile.
121
+
122
+ ## Component names borrowed from elsewhere
123
+
124
+ A screen template names components by their **bare** name, so `resolveComponentName` picks the package and
125
+ the template stays portable. `gallery/dependencyComponentNames.ts` lists every name the gallery borrows;
126
+ each was checked against the owning package's own manifest (`primeReactPackage.ts`,
127
+ `cratisComponentsPackage.ts`) rather than assumed, and a spec resolves all of them.
128
+
129
+ Two names a dashboard obviously wants - `chart` and `fileUpload` - are declared by *neither* package, so
130
+ the templates use what does exist (a table of monthly figures; an image beside a "Change photo" button)
131
+ rather than referencing something that would render as a red placeholder.
132
+
133
+ `menu`, `breadcrumb` and `sidebar` are declared by both PrimeReact and this blueprint. That is override
134
+ priority working as designed: this blueprint sits last in the profile's ascending-priority list, so its
135
+ shell versions win the bare names while PrimeReact's stay reachable as `PrimeReact.menu`.
136
+
137
+ ## Previewing
138
+
139
+ `GalleryScreenPreview` boots one gallery screen through the real path - real `Screen`, real
140
+ `resolveComponentName`, real `SceneElementView`, real registry. Nothing in it is a preview-only code path.
141
+
142
+ It resolves against `galleryPreviewProfile` rather than `galleryProfile`. Same four packages, different
143
+ order: this package takes no npm dependency on PrimeReact's or Cratis Components' *bundles* (a blueprint
144
+ declares its dependencies in its manifest, not in its bundler graph), so a preview run from here has only
145
+ `core` and this blueprint implemented. Ranking `core` above the two libraries means `text`, `button` and
146
+ `card` resolve to something that exists. Names only the libraries declare still resolve to them, find no
147
+ implementation, and render as `UnresolvedComponent`'s dashed box - which is the honest outcome, not a
148
+ papered-over one. A host with all four bundles uses `galleryProfile` and sees the real widgets.
149
+
150
+ ## PrimeReact 11
151
+
152
+ This shell is deliberately hand-rolled CSS **today**, because PrimeReact 10 has no app-shell primitive:
153
+ its `Sidebar` is an overlay drawer (v11 renames it `Drawer` for exactly that reason), and the docked, rail,
154
+ reveal and drawer behaviors have nowhere to come from but a stylesheet.
155
+
156
+ PrimeReact 11 introduces a first-class `Sidebar` for the app-shell role, with `variant`, `collapsible`,
157
+ `side`, `overlay` and `openOnHover` props and a `Sidebar.Layout` registry. A v11 port would collapse:
158
+
159
+ - the docked/off-canvas rules (`layout-static*`, `layout-overlay*`) into `variant` + `overlay`;
160
+ - the reveal and drawer hover machinery, and most of `isSidebarRevealed`, into `openOnHover`;
161
+ - the rail widths (`slim`, `slim-plus`, `compact`) into `collapsible` plus a width token;
162
+ - the wrapper-class plumbing in `layoutWrapperClasses` into `Sidebar.Layout`.
163
+
164
+ What would **not** collapse, and would stay this package's own: the mobile forcing at 991px, the
165
+ persistence, the menu-theme axis, and `horizontal` (a sidebar that stops being a sidebar is not a sidebar
166
+ variant). Studio pins `primereact` to `10.9.8` and `@cratis/components` hard-depends on it, so the port is
167
+ blocked on that pin, not on this package.
168
+
169
+ ## Deliberately not built
170
+
171
+ - **No router.** `menuItem` and `breadcrumb` render hash routes (`#/Dashboard`) against a screen name. A
172
+ host with a real router wraps the shell and rewrites them; hashes keep the gallery navigable with no
173
+ router at all, which is what a preview needs.
174
+ - **No widget adapters.** Every widget a template places comes from PrimeReact or Cratis Components. A
175
+ blueprint that shipped its own table would be a component library wearing a blueprint's manifest.
176
+ - **No layout-arrangement renderer.** The layouts' `FlowArrangement`s are evaluated by the real
177
+ `evaluateFlowArrangement` in specs, but the shell positions its regions with CSS. Rendering an
178
+ arrangement generically is Scene#4's job, layered on top rather than folded in here.
179
+ - **No `FreeformSlotArrangement`.** Both layouts reflow; neither has a fixed-position variant worth
180
+ expressing as absolute placements.
181
+
182
+ ## Known gaps outside this package
183
+
184
+ - **`yarn install` has not been run since the folder was renamed** from `layout.default`, so Yarn's
185
+ workspace state still names the old path and `yarn build` / `yarn test` fail with
186
+ `Package for @cratis/scene.blueprint.default@workspace:... not found in the project`. Run `yarn install`
187
+ once; until then the gates run through `npx tsc -b`, `npx rollup -c ./rollup.config.mjs`, `npx vitest run`,
188
+ `npx eslint --cache --quiet .` and `npx storybook build`, which are what the `g:*` scripts invoke.
189
+ - `Source/JavaScript/blueprint.default` is not in the root `tsconfig.json` `references` (which now lists
190
+ `tailwind`, `primereact` and `components`), so a root `npx tsc -b` does not build it.
191
+ - `FlowRow`, `FlowColumn` and a `FlowGrid` with no `columns` are structurally identical in `Scene.Model`,
192
+ so a consumer cannot tell a row from a column by value. The builders in `layouts/flowBuilders.ts` keep
193
+ the *intent* legible at the declaration site, and `grid()` always sets `columns`, but the model gap is
194
+ real.
195
+
196
+ ## Gates
197
+
198
+ ```bash
199
+ npx tsc -b # from the repository root
200
+ yarn build # from this package
201
+ yarn test
202
+ yarn lint:ci
203
+ yarn build-storybook
204
+ ```
@@ -0,0 +1,17 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ /**
5
+ * The light/dark axis of the configurator.
6
+ *
7
+ * The shell never paints a color for a scheme itself - it only records which one is chosen, so the host
8
+ * can hand {@link SceneThemeProvider} a matching {@link Theme}. Keeping the choice and the palette apart
9
+ * is what lets a third-party theme participate in the same switch as the two this package ships.
10
+ */
11
+ export enum ColorScheme {
12
+ Light = 'light',
13
+ Dark = 'dark',
14
+ }
15
+
16
+ /** Every {@link ColorScheme}, in the order a configurator should offer them. */
17
+ export const colorSchemes: ColorScheme[] = [ColorScheme.Light, ColorScheme.Dark];
@@ -0,0 +1,182 @@
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 { ReactNode, createContext, useContext, useEffect, useMemo, useState } from 'react';
5
+ import { ColorScheme } from './ColorScheme';
6
+ import { LayoutConfigState } from './LayoutConfigState';
7
+ import { LayoutMode } from './LayoutMode';
8
+ import { MenuTheme } from './MenuTheme';
9
+ import { persistLayoutConfig, readPersistedLayoutConfig } from './layoutConfigStorage';
10
+ import { isLayoutMaskVisible, layoutWrapperClasses } from './layoutWrapperClasses';
11
+ import {
12
+ effectiveLayoutMode,
13
+ isMobileWidth,
14
+ mobileMediaQuery,
15
+ toggleSidebar,
16
+ toggleSidebarAnchor,
17
+ withColorScheme,
18
+ withMenuTheme,
19
+ withMobile,
20
+ withMode,
21
+ withSidebarOpen,
22
+ withSidebarRevealed,
23
+ withThemeName,
24
+ } from './layoutConfigTransitions';
25
+
26
+ /**
27
+ * What {@link useLayoutConfig} hands a shell component: the current state, the values every part of the
28
+ * shell derives from it, and one function per transition.
29
+ *
30
+ * The derived values live here rather than being recomputed per component so that the topbar, the
31
+ * sidebar and the mask cannot end up disagreeing about which mode is in force - the exact class of bug a
32
+ * shell with per-component state produces.
33
+ */
34
+ export interface LayoutConfigContextValue {
35
+ /** The current state. */
36
+ config: LayoutConfigState;
37
+
38
+ /** The mode actually in force, with the mobile override applied. */
39
+ effectiveMode: LayoutMode;
40
+
41
+ /** The classes for the shell's wrapper element. */
42
+ wrapperClasses: string[];
43
+
44
+ /** Whether the scrim behind a floating sidebar should be showing. */
45
+ isMaskVisible: boolean;
46
+
47
+ /** Chooses a different mode. Below the mobile breakpoint the choice is still recorded, but the shell keeps rendering off-canvas. */
48
+ setMode(mode: LayoutMode): void;
49
+
50
+ /** Chooses how the sidebar surface is tinted. */
51
+ setMenuTheme(menuTheme: MenuTheme): void;
52
+
53
+ /** Chooses the light/dark axis. */
54
+ setColorScheme(colorScheme: ColorScheme): void;
55
+
56
+ /** Records which theme is applied. */
57
+ setThemeName(themeName: string): void;
58
+
59
+ /** Opens or closes the sidebar. */
60
+ setSidebarOpen(isOpen: boolean): void;
61
+
62
+ /** Flips the sidebar between open and closed. */
63
+ toggleSidebar(): void;
64
+
65
+ /** Holds a `reveal`/`drawer` sidebar out, or lets it fall back. */
66
+ setSidebarRevealed(isRevealed: boolean): void;
67
+
68
+ /** Pins or unpins a `reveal`/`drawer` sidebar. */
69
+ toggleSidebarAnchor(): void;
70
+ }
71
+
72
+ const LayoutConfigContext = createContext<LayoutConfigContextValue | undefined>(undefined);
73
+
74
+ export interface LayoutConfigProviderProps {
75
+ /** Values to start from, overriding both the defaults and anything persisted - a story or a spec pinning a mode. */
76
+ initialConfig?: Partial<LayoutConfigState>;
77
+
78
+ /**
79
+ * Where preferences are read from and written to. Defaults to `window.localStorage` when there is a
80
+ * window; pass a fake in a spec, or `null` to opt out of persistence entirely.
81
+ */
82
+ storage?: Storage | null;
83
+
84
+ /**
85
+ * The width the shell should consider its viewport, for a host that renders it into a sized element
86
+ * rather than the window - Studio's preview surface, where the device frame is a few hundred pixels
87
+ * wide while the real window is a desktop one. When given, this replaces the `matchMedia` listener
88
+ * entirely rather than competing with it.
89
+ */
90
+ viewportWidth?: number;
91
+
92
+ /** The shell this configuration applies to. */
93
+ children?: ReactNode;
94
+ }
95
+
96
+ /**
97
+ * Owns the shell's configuration and keeps it in step with the viewport and with `localStorage`.
98
+ *
99
+ * One provider rather than state per shell component is what makes the modes work at all: the topbar's
100
+ * toggle, the sidebar's pin, the mask's click-to-close and the configurator's mode picker are four
101
+ * different components acting on one machine. It is also what makes a chosen mode survive a reload, which
102
+ * is the whole reason a mode picker is worth having.
103
+ */
104
+ export function LayoutConfigProvider({ initialConfig, storage, viewportWidth, children }: LayoutConfigProviderProps) {
105
+ const resolvedStorage = useMemo(() => (storage !== undefined ? storage ?? undefined : defaultStorage()), [storage]);
106
+ const [config, setConfig] = useState<LayoutConfigState>(() => ({
107
+ ...readPersistedLayoutConfig(resolvedStorage),
108
+ ...initialConfig,
109
+ }));
110
+
111
+ useEffect(() => {
112
+ persistLayoutConfig(config, resolvedStorage);
113
+ }, [config, resolvedStorage]);
114
+
115
+ const isReportedMobile = viewportWidth === undefined ? undefined : isMobileWidth(viewportWidth);
116
+ useEffect(() => {
117
+ if (isReportedMobile !== undefined) {
118
+ setConfig(current => withMobile(current, isReportedMobile));
119
+ return;
120
+ }
121
+
122
+ if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
123
+ return;
124
+ }
125
+
126
+ const query = window.matchMedia(mobileMediaQuery);
127
+ setConfig(current => withMobile(current, query.matches));
128
+
129
+ const listener = (event: MediaQueryListEvent) => setConfig(current => withMobile(current, event.matches));
130
+ query.addEventListener('change', listener);
131
+ return () => query.removeEventListener('change', listener);
132
+ }, [isReportedMobile]);
133
+
134
+ const value = useMemo<LayoutConfigContextValue>(
135
+ () => ({
136
+ config,
137
+ effectiveMode: effectiveLayoutMode(config),
138
+ wrapperClasses: layoutWrapperClasses(config),
139
+ isMaskVisible: isLayoutMaskVisible(config),
140
+ setMode: mode => setConfig(current => withMode(current, mode)),
141
+ setMenuTheme: menuTheme => setConfig(current => withMenuTheme(current, menuTheme)),
142
+ setColorScheme: colorScheme => setConfig(current => withColorScheme(current, colorScheme)),
143
+ setThemeName: themeName => setConfig(current => withThemeName(current, themeName)),
144
+ setSidebarOpen: isOpen => setConfig(current => withSidebarOpen(current, isOpen)),
145
+ toggleSidebar: () => setConfig(toggleSidebar),
146
+ setSidebarRevealed: isRevealed => setConfig(current => withSidebarRevealed(current, isRevealed)),
147
+ toggleSidebarAnchor: () => setConfig(toggleSidebarAnchor),
148
+ }),
149
+ [config],
150
+ );
151
+
152
+ return <LayoutConfigContext.Provider value={value}>{children}</LayoutConfigContext.Provider>;
153
+ }
154
+
155
+ /**
156
+ * The shell configuration, or `undefined` when there is no {@link LayoutConfigProvider} above.
157
+ *
158
+ * This is what lets the shell components put a provider around themselves when a host has not - a gallery
159
+ * preview drops a single `appShell` element into a renderer with no wrapper of its own, and it still has
160
+ * to work.
161
+ */
162
+ export function useOptionalLayoutConfig(): LayoutConfigContextValue | undefined {
163
+ return useContext(LayoutConfigContext);
164
+ }
165
+
166
+ /**
167
+ * The shell configuration. Throws when there is no {@link LayoutConfigProvider} above, because every
168
+ * alternative - a silent default, a no-op setter - produces a shell whose buttons do nothing and says
169
+ * nothing about why.
170
+ */
171
+ export function useLayoutConfig(): LayoutConfigContextValue {
172
+ const value = useOptionalLayoutConfig();
173
+ if (!value) {
174
+ throw new Error('useLayoutConfig() requires a <LayoutConfigProvider> above it.');
175
+ }
176
+
177
+ return value;
178
+ }
179
+
180
+ function defaultStorage(): Storage | undefined {
181
+ return typeof window !== 'undefined' ? window.localStorage : undefined;
182
+ }
@@ -0,0 +1,46 @@
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 { ColorScheme } from './ColorScheme';
5
+ import { LayoutMode } from './LayoutMode';
6
+ import { MenuTheme } from './MenuTheme';
7
+
8
+ /**
9
+ * Everything the shell needs to know about itself, in one place.
10
+ *
11
+ * The shell has a lot of visual state - eight modes, a sidebar that can be open, hovered or pinned, a
12
+ * mobile breakpoint that overrides the chosen mode, two color axes - and every one of those was, in the
13
+ * template line this follows, a separate boolean scattered across components. Holding it as one plain
14
+ * value instead means the whole state machine is pure functions over this record
15
+ * (`layoutConfigTransitions.ts`), testable without React, and rendered by exactly one function
16
+ * ({@link layoutWrapperClasses}).
17
+ */
18
+ export interface LayoutConfigState {
19
+ /** The mode the user chose. Below the mobile breakpoint the shell renders a different one - see {@link effectiveLayoutMode}. */
20
+ mode: LayoutMode;
21
+
22
+ /** How the sidebar surface is tinted. */
23
+ menuTheme: MenuTheme;
24
+
25
+ /** The light/dark axis. The host maps this onto a {@link Theme}; the shell only records it. */
26
+ colorScheme: ColorScheme;
27
+
28
+ /** The name of the {@link Theme} currently applied, so a theme switcher has something to reflect. */
29
+ themeName: string;
30
+
31
+ /**
32
+ * Whether the sidebar currently occupies space (`static`) or floats over the content
33
+ * (`overlay`, mobile). One flag rather than the separate desktop/mobile/overlay booleans the
34
+ * template line uses - the mode already says how "open" should look.
35
+ */
36
+ isSidebarOpen: boolean;
37
+
38
+ /** Whether a `reveal`/`drawer` sidebar is pinned open, so it stays out when the pointer leaves. */
39
+ isSidebarAnchored: boolean;
40
+
41
+ /** Whether a `reveal`/`drawer` sidebar is currently held out by the pointer. */
42
+ isSidebarRevealed: boolean;
43
+
44
+ /** Whether the viewport is below the mobile breakpoint. Never set by a user action - only by the viewport. */
45
+ isMobile: boolean;
46
+ }
@@ -0,0 +1,50 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ /**
5
+ * How the application shell arranges its sidebar against its content.
6
+ *
7
+ * The vocabulary - and the `layout-<mode>` wrapper class each value maps to - is deliberately the one
8
+ * PrimeTek's template line has used unchanged across Sakai, Diamond, Atlantis, Freya, Apollo, Ultima,
9
+ * Avalon and Verona. Anyone who has themed a PrimeReact application recognizes it, and a shell that
10
+ * invents its own names forces them to learn a second one for no gain.
11
+ *
12
+ * Every value here is user-selectable. Mobile deliberately is not - see {@link effectiveLayoutMode}.
13
+ */
14
+ export enum LayoutMode {
15
+ /** Sidebar permanently docked; content is pushed by a matching margin, never covered. */
16
+ Static = 'static',
17
+
18
+ /** Sidebar parked off-canvas; opening floats it over the content behind a mask. */
19
+ Overlay = 'overlay',
20
+
21
+ /** Icon-only rail with circular buttons; submenus pop out as a floating panel. */
22
+ Slim = 'slim',
23
+
24
+ /** Wider rail with each icon's label stacked directly beneath it. */
25
+ SlimPlus = 'slim-plus',
26
+
27
+ /** The icon-only rail again, with square buttons, and the topbar shifted by the rail width. */
28
+ Compact = 'compact',
29
+
30
+ /** Sidebar flows into the topbar strip as a horizontal row; submenus drop down. */
31
+ Horizontal = 'horizontal',
32
+
33
+ /** Full panel translated off-left leaving a strip of icons; hovering slides it in over the content. */
34
+ Reveal = 'reveal',
35
+
36
+ /** Collapsed rail that animates its width to full on hover - it grows where reveal slides. */
37
+ Drawer = 'drawer',
38
+ }
39
+
40
+ /** Every {@link LayoutMode}, in the order a configurator should offer them. */
41
+ export const layoutModes: LayoutMode[] = [
42
+ LayoutMode.Static,
43
+ LayoutMode.Overlay,
44
+ LayoutMode.Slim,
45
+ LayoutMode.SlimPlus,
46
+ LayoutMode.Compact,
47
+ LayoutMode.Horizontal,
48
+ LayoutMode.Reveal,
49
+ LayoutMode.Drawer,
50
+ ];
@@ -0,0 +1,24 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ /**
5
+ * How the sidebar surface is tinted, independently of the overall {@link ColorScheme}.
6
+ *
7
+ * A dark sidebar against a light page is the single most common brand customization in the PrimeTek
8
+ * template line, which is why menu theme is its own configurator axis rather than something implied by
9
+ * the color scheme. The shell resolves each value from the active theme's tokens, so a menu theme never
10
+ * introduces a color of its own.
11
+ */
12
+ export enum MenuTheme {
13
+ /** The sidebar uses the theme's ordinary card surface. */
14
+ Light = 'light',
15
+
16
+ /** The sidebar uses an inverted surface, regardless of the page's color scheme. */
17
+ Dark = 'dark',
18
+
19
+ /** The sidebar uses the theme's primary color as its surface. */
20
+ Primary = 'primary',
21
+ }
22
+
23
+ /** Every {@link MenuTheme}, in the order a configurator should offer them. */
24
+ export const menuThemes: MenuTheme[] = [MenuTheme.Light, MenuTheme.Dark, MenuTheme.Primary];
@@ -0,0 +1,11 @@
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
+ export * from './LayoutMode';
5
+ export * from './ColorScheme';
6
+ export * from './MenuTheme';
7
+ export * from './LayoutConfigState';
8
+ export * from './layoutConfigTransitions';
9
+ export * from './layoutWrapperClasses';
10
+ export * from './layoutConfigStorage';
11
+ export * from './LayoutConfigProvider';