@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,86 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { isPointerRevealMode } from '../configuration/layoutConfigTransitions.js';
3
+ import { useOptionalLayoutConfig, LayoutConfigProvider, useLayoutConfig } from '../configuration/LayoutConfigProvider.js';
4
+ import { SlotName } from '../layouts/SlotName.js';
5
+ import '@cratis/scene.model';
6
+ import '../layouts/shellComponents.js';
7
+ import '../layouts/appShell.js';
8
+ import '../layouts/fullPage.js';
9
+ import { LayoutMask } from './Mask.js';
10
+
11
+ // Copyright (c) Cratis. All rights reserved.
12
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
13
+ /**
14
+ * The application shell: the `AppShell` layout's slots, positioned.
15
+ *
16
+ * This owns the positioned boxes - the fixed topbar, the sliding sidebar panel, the pushed main column -
17
+ * while the components filling the slots own what goes inside them. Splitting it there is what lets a
18
+ * screen replace the entire menu without knowing anything about how `reveal` mode translates the panel it
19
+ * lives in.
20
+ *
21
+ * It puts a {@link LayoutConfigProvider} around itself when a host has not, because a gallery preview
22
+ * hands the renderer one `appShell` element and nothing else, and the shell still has to be able to
23
+ * switch modes.
24
+ */ function AppShell({ element, slots }) {
25
+ const surface = /*#__PURE__*/ jsx(AppShellSurface, {
26
+ elementId: element.id,
27
+ slots: slots
28
+ });
29
+ return useOptionalLayoutConfig() ? surface : /*#__PURE__*/ jsx(LayoutConfigProvider, {
30
+ children: surface
31
+ });
32
+ }
33
+ function AppShellSurface({ elementId, slots }) {
34
+ const { config, effectiveMode, wrapperClasses, setSidebarRevealed } = useLayoutConfig();
35
+ const revealsOnPointer = isPointerRevealMode(effectiveMode);
36
+ const hasSidebar = filled(slots, SlotName.Sidebar) || filled(slots, SlotName.Menu);
37
+ return /*#__PURE__*/ jsxs("div", {
38
+ className: wrapperClasses.join(' '),
39
+ "data-scene-id": elementId,
40
+ "data-layout-mode": config.mode,
41
+ children: [
42
+ filled(slots, SlotName.Topbar) && /*#__PURE__*/ jsx("header", {
43
+ className: "layout-topbar",
44
+ children: slots[SlotName.Topbar]
45
+ }),
46
+ hasSidebar && /*#__PURE__*/ jsxs("aside", {
47
+ className: "layout-sidebar",
48
+ onMouseEnter: revealsOnPointer ? ()=>setSidebarRevealed(true) : undefined,
49
+ onMouseLeave: revealsOnPointer ? ()=>setSidebarRevealed(false) : undefined,
50
+ children: [
51
+ slots[SlotName.Sidebar],
52
+ slots[SlotName.Menu]
53
+ ]
54
+ }),
55
+ /*#__PURE__*/ jsxs("div", {
56
+ className: "layout-main",
57
+ children: [
58
+ filled(slots, SlotName.Breadcrumb) && /*#__PURE__*/ jsx("div", {
59
+ className: "layout-breadcrumb",
60
+ children: slots[SlotName.Breadcrumb]
61
+ }),
62
+ /*#__PURE__*/ jsx("main", {
63
+ className: "layout-content",
64
+ children: slots[SlotName.Content]
65
+ }),
66
+ filled(slots, SlotName.Footer) && /*#__PURE__*/ jsx("footer", {
67
+ className: "layout-footer",
68
+ children: slots[SlotName.Footer]
69
+ })
70
+ ]
71
+ }),
72
+ filled(slots, SlotName.RightPanel) && /*#__PURE__*/ jsx("aside", {
73
+ className: "layout-right-panel",
74
+ children: slots[SlotName.RightPanel]
75
+ }),
76
+ slots[SlotName.ConfigPanel],
77
+ /*#__PURE__*/ jsx(LayoutMask, {})
78
+ ]
79
+ });
80
+ }
81
+ function filled(slots, name) {
82
+ return (slots[name]?.length ?? 0) > 0;
83
+ }
84
+
85
+ export { AppShell };
86
+ //# sourceMappingURL=AppShell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppShell.js","sources":["../../../shell/AppShell.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutConfigProvider, isPointerRevealMode, useLayoutConfig, useOptionalLayoutConfig } from '../configuration';\nimport { SlotName } from '../layouts';\nimport { LayoutMask } from './Mask';\n\n/**\n * The application shell: the `AppShell` layout's slots, positioned.\n *\n * This owns the positioned boxes - the fixed topbar, the sliding sidebar panel, the pushed main column -\n * while the components filling the slots own what goes inside them. Splitting it there is what lets a\n * screen replace the entire menu without knowing anything about how `reveal` mode translates the panel it\n * lives in.\n *\n * It puts a {@link LayoutConfigProvider} around itself when a host has not, because a gallery preview\n * hands the renderer one `appShell` element and nothing else, and the shell still has to be able to\n * switch modes.\n */\nexport function AppShell({ element, slots }: RegisteredComponentProps) {\n const surface = <AppShellSurface elementId={element.id} slots={slots} />;\n return useOptionalLayoutConfig() ? surface : <LayoutConfigProvider>{surface}</LayoutConfigProvider>;\n}\n\ninterface AppShellSurfaceProps {\n elementId: string;\n slots: Record<string, ReactNode[]>;\n}\n\nfunction AppShellSurface({ elementId, slots }: AppShellSurfaceProps) {\n const { config, effectiveMode, wrapperClasses, setSidebarRevealed } = useLayoutConfig();\n const revealsOnPointer = isPointerRevealMode(effectiveMode);\n const hasSidebar = filled(slots, SlotName.Sidebar) || filled(slots, SlotName.Menu);\n\n return (\n <div className={wrapperClasses.join(' ')} data-scene-id={elementId} data-layout-mode={config.mode}>\n {filled(slots, SlotName.Topbar) && <header className='layout-topbar'>{slots[SlotName.Topbar]}</header>}\n\n {hasSidebar && (\n <aside\n className='layout-sidebar'\n onMouseEnter={revealsOnPointer ? () => setSidebarRevealed(true) : undefined}\n onMouseLeave={revealsOnPointer ? () => setSidebarRevealed(false) : undefined}>\n {slots[SlotName.Sidebar]}\n {slots[SlotName.Menu]}\n </aside>\n )}\n\n <div className='layout-main'>\n {filled(slots, SlotName.Breadcrumb) && <div className='layout-breadcrumb'>{slots[SlotName.Breadcrumb]}</div>}\n <main className='layout-content'>{slots[SlotName.Content]}</main>\n {filled(slots, SlotName.Footer) && <footer className='layout-footer'>{slots[SlotName.Footer]}</footer>}\n </div>\n\n {filled(slots, SlotName.RightPanel) && <aside className='layout-right-panel'>{slots[SlotName.RightPanel]}</aside>}\n {slots[SlotName.ConfigPanel]}\n <LayoutMask />\n </div>\n );\n}\n\nfunction filled(slots: Record<string, ReactNode[]>, name: SlotName): boolean {\n return (slots[name]?.length ?? 0) > 0;\n}\n"],"names":["AppShell","element","slots","surface","_jsx","AppShellSurface","elementId","id","useOptionalLayoutConfig","LayoutConfigProvider","config","effectiveMode","wrapperClasses","setSidebarRevealed","useLayoutConfig","revealsOnPointer","isPointerRevealMode","hasSidebar","filled","SlotName","Sidebar","Menu","_jsxs","div","className","join","data-scene-id","data-layout-mode","mode","Topbar","header","aside","onMouseEnter","undefined","onMouseLeave","Breadcrumb","main","Content","Footer","footer","RightPanel","ConfigPanel","LayoutMask","name","length"],"mappings":";;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;AAWC,IACM,SAASA,QAAAA,CAAS,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACjE,IAAA,MAAMC,wBAAUC,GAAA,CAACC,eAAAA,EAAAA;AAAgBC,QAAAA,SAAAA,EAAWL,QAAQM,EAAE;QAAEL,KAAAA,EAAOA;;IAC/D,OAAOM,uBAAAA,EAAAA,GAA4BL,wBAAUC,GAAA,CAACK,oBAAAA,EAAAA;AAAsBN,QAAAA,QAAAA,EAAAA;;AACxE;AAOA,SAASE,eAAAA,CAAgB,EAAEC,SAAS,EAAEJ,KAAK,EAAwB,EAAA;IAC/D,MAAM,EAAEQ,M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AAA,CAASgB,UAAU;;kCACpG/B,GAAA,CAACgC,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,gBAAA;kCAAkBtB,KAAK,CAACiB,QAAAA,CAASkB,OAAO;;AACvDnB,oBAAAA,MAAAA,CAAOhB,KAAAA,EAAOiB,QAAAA,CAASmB,MAAM,CAAA,kBAAKlC,GAAA,CAACmC,QAAAA,EAAAA;wBAAOf,SAAAA,EAAU,eAAA;kCAAiBtB,KAAK,CAACiB,QAAAA,CAASmB,MAAM;;;;AAG9FpB,YAAAA,MAAAA,CAAOhB,KAAAA,EAAOiB,QAAAA,CAASqB,UAAU,CAAA,kBAAKpC,GAAA,CAAC2B,OAAAA,EAAAA;gBAAMP,SAAAA,EAAU,oBAAA;0BAAsBtB,KAAK,CAACiB,QAAAA,CAASqB,UAAU;;YACtGtC,KAAK,CAACiB,QAAAA,CAASsB,WAAW,CAAC;0BAC5BrC,GAAA,CAACsC,UAAAA,EAAAA,EAAAA;;;AAGb;AAEA,SAASxB,MAAAA,CAAOhB,KAAkC,EAAEyC,IAAc,EAAA;IAC9D,OAAQzC,CAAAA,KAAK,CAACyC,KAAK,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AACxC;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function Breadcrumb({ element }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=Breadcrumb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.d.ts","sourceRoot":"","sources":["../../../shell/Breadcrumb.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAW/D,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAc/D"}
@@ -0,0 +1,31 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { BreadCrumb } from 'primereact/breadcrumb';
3
+ import { readOptionalString, readRecords, recordString } from './elementProperties.js';
4
+
5
+ /**
6
+ * The trail above the content.
7
+ *
8
+ * PrimeReact's own `BreadCrumb` does the rendering rather than hand-written markup, because a breadcrumb
9
+ * is an ordinary component with no layout-mode behavior at all - it looks the same in every one of the
10
+ * eight modes. The shell only writes CSS where PrimeReact 10 genuinely has no answer, and this is not one
11
+ * of those places.
12
+ */ function Breadcrumb({ element }) {
13
+ const home = readOptionalString(element, 'homeTargetScreen');
14
+ const model = readRecords(element, 'items').map((item)=>({
15
+ label: recordString(item, 'label'),
16
+ url: recordString(item, 'targetScreen') ? `#/${recordString(item, 'targetScreen')}` : undefined
17
+ }));
18
+ return /*#__PURE__*/ jsx("div", {
19
+ "data-scene-id": element.id,
20
+ children: /*#__PURE__*/ jsx(BreadCrumb, {
21
+ model: model,
22
+ home: home ? {
23
+ icon: 'pi pi-home',
24
+ url: `#/${home}`
25
+ } : undefined
26
+ })
27
+ });
28
+ }
29
+
30
+ export { Breadcrumb };
31
+ //# sourceMappingURL=Breadcrumb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Breadcrumb.js","sources":["../../../shell/Breadcrumb.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BreadCrumb } from 'primereact/breadcrumb';\nimport { MenuItem as PrimeMenuItem } from 'primereact/menuitem';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { readOptionalString, readRecords, recordString } from './elementProperties';\n\n/**\n * The trail above the content.\n *\n * PrimeReact's own `BreadCrumb` does the rendering rather than hand-written markup, because a breadcrumb\n * is an ordinary component with no layout-mode behavior at all - it looks the same in every one of the\n * eight modes. The shell only writes CSS where PrimeReact 10 genuinely has no answer, and this is not one\n * of those places.\n */\nexport function Breadcrumb({ element }: RegisteredComponentProps) {\n const home = readOptionalString(element, 'homeTargetScreen');\n const model = readRecords(element, 'items').map(\n (item): PrimeMenuItem => ({\n label: recordString(item, 'label'),\n url: recordString(item, 'targetScreen') ? `#/${recordString(item, 'targetScreen')}` : undefined,\n }),\n );\n\n return (\n <div data-scene-id={element.id}>\n <BreadCrumb model={model} home={home ? { icon: 'pi pi-home', url: `#/${home}` } : undefined} />\n </div>\n );\n}\n"],"names":["Breadcrumb","element","home","readOptionalString","model","readRecords","map","item","label","recordString","url","undefined","_jsx","div","data-scene-id","id","BreadCrumb","icon"],"mappings":";;;;AAQA;;;;;;;AAOC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAA4B,EAAA;IAC5D,MAAMC,IAAAA,GAAOC,mBAAmBF,OAAAA,EAAS,kBAAA,CAAA;IACzC,MAAMG,KAAAA,GAAQC,YAAYJ,OAAAA,EAAS,OAAA,CAAA,CAASK,GAAG,CAC3C,CAACC,QAAyB;AACtBC,YAAAA,KAAAA,EAAOC,aAAaF,IAAAA,EAAM,OAAA,CAAA;YAC1BG,GAAAA,EAAKD,YAAAA,CAAaF,MAAM,cAAA,CAAA,GAAkB,CAAC,EAAE,EAAEE,YAAAA,CAAaF,IAAAA,EAAM,cAAA,CAAA,CAAA,CAAiB,GAAGI;SAC1F,CAAA,CAAA;AAGJ,IAAA,qBACIC,GAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeb,QAAQc,EAAE;AAC1B,QAAA,QAAA,gBAAAH,GAAA,CAACI,UAAAA,EAAAA;YAAWZ,KAAAA,EAAOA,KAAAA;AAAOF,YAAAA,IAAAA,EAAMA,IAAAA,GAAO;gBAAEe,IAAAA,EAAM,YAAA;gBAAcP,GAAAA,EAAK,CAAC,EAAE,EAAER,IAAAA,CAAAA;aAAO,GAAIS;;;AAG9F;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function ConfigPanel({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=ConfigPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigPanel.d.ts","sourceRoot":"","sources":["../../../shell/ConfigPanel.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AA8B/D,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAoEvE"}
@@ -0,0 +1,126 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { useState } from 'react';
3
+ import { Button } from 'primereact/button';
4
+ import { Sidebar } from 'primereact/sidebar';
5
+ import { colorSchemes, ColorScheme } from '../configuration/ColorScheme.js';
6
+ import { menuThemes, MenuTheme } from '../configuration/MenuTheme.js';
7
+ import { useLayoutConfig } from '../configuration/LayoutConfigProvider.js';
8
+ import { LayoutModeSwitcher } from './LayoutModeSwitcher.js';
9
+ import { ThemeSwitcher } from './ThemeSwitcher.js';
10
+ import { readString, readBoolean } from './elementProperties.js';
11
+
12
+ /** What each color scheme is called in the configurator. */ const colorSchemeLabels = {
13
+ [ColorScheme.Light]: 'Light',
14
+ [ColorScheme.Dark]: 'Dark'
15
+ };
16
+ /** What each menu theme is called in the configurator. */ const menuThemeLabels = {
17
+ [MenuTheme.Light]: 'Light',
18
+ [MenuTheme.Dark]: 'Dark',
19
+ [MenuTheme.Primary]: 'Primary'
20
+ };
21
+ /**
22
+ * The floating configurator.
23
+ *
24
+ * The axes are the ones the modern PrimeTek templates expose - color scheme, menu mode, menu theme and
25
+ * theme - because those are the four choices that actually change how an application feels, and a
26
+ * configurator with more knobs than that becomes a settings screen nobody finishes reading.
27
+ *
28
+ * The panel itself is PrimeReact 10's `Sidebar`, which is an overlay drawer rather than an app-shell
29
+ * sidebar - this is the one use it was designed for. (v11 renames it `Drawer` precisely to stop the
30
+ * confusion, and gives the app-shell role to a new `Sidebar`.)
31
+ */ function ConfigPanel({ element, slots }) {
32
+ const [isVisible, setIsVisible] = useState(false);
33
+ const { config, setColorScheme, setMenuTheme } = useLayoutConfig();
34
+ const title = readString(element, 'title', 'Settings');
35
+ const showsMenuTheme = readBoolean(element, 'showMenuTheme', true);
36
+ const showsMode = readBoolean(element, 'showLayoutMode', true);
37
+ return /*#__PURE__*/ jsxs(Fragment, {
38
+ children: [
39
+ /*#__PURE__*/ jsx(Button, {
40
+ type: "button",
41
+ rounded: true,
42
+ icon: "pi pi-cog",
43
+ className: "layout-config-button",
44
+ "aria-label": title,
45
+ "data-scene-id": element.id,
46
+ onClick: ()=>setIsVisible(true)
47
+ }),
48
+ /*#__PURE__*/ jsx(Sidebar, {
49
+ visible: isVisible,
50
+ position: "right",
51
+ header: title,
52
+ onHide: ()=>setIsVisible(false),
53
+ children: /*#__PURE__*/ jsxs("div", {
54
+ className: "layout-config-panel",
55
+ children: [
56
+ /*#__PURE__*/ jsxs("div", {
57
+ children: [
58
+ /*#__PURE__*/ jsx("h3", {
59
+ className: "layout-config-section-title",
60
+ children: "Color scheme"
61
+ }),
62
+ /*#__PURE__*/ jsx("div", {
63
+ className: "layout-config-options",
64
+ role: "group",
65
+ "aria-label": "Color scheme",
66
+ children: colorSchemes.map((scheme)=>/*#__PURE__*/ jsx("button", {
67
+ type: "button",
68
+ className: "layout-config-option",
69
+ "aria-pressed": config.colorScheme === scheme,
70
+ onClick: ()=>setColorScheme(scheme),
71
+ children: colorSchemeLabels[scheme]
72
+ }, scheme))
73
+ })
74
+ ]
75
+ }),
76
+ /*#__PURE__*/ jsx(ThemeSwitcher, {
77
+ element: {
78
+ ...element,
79
+ id: `${element.id}-theme`,
80
+ properties: {
81
+ ...element.properties,
82
+ label: 'Theme'
83
+ }
84
+ },
85
+ slots: {}
86
+ }),
87
+ showsMode && /*#__PURE__*/ jsx(LayoutModeSwitcher, {
88
+ element: {
89
+ ...element,
90
+ id: `${element.id}-mode`,
91
+ properties: {
92
+ label: 'Menu mode'
93
+ }
94
+ },
95
+ slots: {}
96
+ }),
97
+ showsMenuTheme && /*#__PURE__*/ jsxs("div", {
98
+ children: [
99
+ /*#__PURE__*/ jsx("h3", {
100
+ className: "layout-config-section-title",
101
+ children: "Menu theme"
102
+ }),
103
+ /*#__PURE__*/ jsx("div", {
104
+ className: "layout-config-options",
105
+ role: "group",
106
+ "aria-label": "Menu theme",
107
+ children: menuThemes.map((menuTheme)=>/*#__PURE__*/ jsx("button", {
108
+ type: "button",
109
+ className: "layout-config-option",
110
+ "aria-pressed": config.menuTheme === menuTheme,
111
+ onClick: ()=>setMenuTheme(menuTheme),
112
+ children: menuThemeLabels[menuTheme]
113
+ }, menuTheme))
114
+ })
115
+ ]
116
+ }),
117
+ slots.content
118
+ ]
119
+ })
120
+ })
121
+ ]
122
+ });
123
+ }
124
+
125
+ export { ConfigPanel };
126
+ //# sourceMappingURL=ConfigPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfigPanel.js","sources":["../../../shell/ConfigPanel.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { useState } from 'react';\nimport { Button } from 'primereact/button';\nimport { Sidebar } from 'primereact/sidebar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ColorScheme, MenuTheme, colorSchemes, menuThemes, useLayoutConfig } from '../configuration';\nimport { LayoutModeSwitcher } from './LayoutModeSwitcher';\nimport { ThemeSwitcher } from './ThemeSwitcher';\nimport { readBoolean, readString } from './elementProperties';\n\n/** What each color scheme is called in the configurator. */\nconst colorSchemeLabels: Record<ColorScheme, string> = {\n [ColorScheme.Light]: 'Light',\n [ColorScheme.Dark]: 'Dark',\n};\n\n/** What each menu theme is called in the configurator. */\nconst menuThemeLabels: Record<MenuTheme, string> = {\n [MenuTheme.Light]: 'Light',\n [MenuTheme.Dark]: 'Dark',\n [MenuTheme.Primary]: 'Primary',\n};\n\n/**\n * The floating configurator.\n *\n * The axes are the ones the modern PrimeTek templates expose - color scheme, menu mode, menu theme and\n * theme - because those are the four choices that actually change how an application feels, and a\n * configurator with more knobs than that becomes a settings screen nobody finishes reading.\n *\n * The panel itself is PrimeReact 10's `Sidebar`, which is an overlay drawer rather than an app-shell\n * sidebar - this is the one use it was designed for. (v11 renames it `Drawer` precisely to stop the\n * confusion, and gives the app-shell role to a new `Sidebar`.)\n */\nexport function ConfigPanel({ element, slots }: RegisteredComponentProps) {\n const [isVisible, setIsVisible] = useState(false);\n const { config, setColorScheme, setMenuTheme } = useLayoutConfig();\n const title = readString(element, 'title', 'Settings');\n const showsMenuTheme = readBoolean(element, 'showMenuTheme', true);\n const showsMode = readBoolean(element, 'showLayoutMode', true);\n\n return (\n <>\n <Button\n type='button'\n rounded\n icon='pi pi-cog'\n className='layout-config-button'\n aria-label={title}\n data-scene-id={element.id}\n onClick={() => setIsVisible(true)}\n />\n <Sidebar visible={isVisible} position='right' header={title} onHide={() => setIsVisible(false)}>\n <div className='layout-config-panel'>\n <div>\n <h3 className='layout-config-section-title'>Color scheme</h3>\n <div className='layout-config-options' role='group' aria-label='Color scheme'>\n {colorSchemes.map(scheme => (\n <button\n key={scheme}\n type='button'\n className='layout-config-option'\n aria-pressed={config.colorScheme === scheme}\n onClick={() => setColorScheme(scheme)}>\n {colorSchemeLabels[scheme]}\n </button>\n ))}\n </div>\n </div>\n\n <ThemeSwitcher\n element={{ ...element, id: `${element.id}-theme`, properties: { ...element.properties, label: 'Theme' } }}\n slots={{}}\n />\n\n {showsMode && (\n <LayoutModeSwitcher element={{ ...element, id: `${element.id}-mode`, properties: { label: 'Menu mode' } }} slots={{}} />\n )}\n\n {showsMenuTheme && (\n <div>\n <h3 className='layout-config-section-title'>Menu theme</h3>\n <div className='layout-config-options' role='group' aria-label='Menu theme'>\n {menuThemes.map(menuTheme => (\n <button\n key={menuTheme}\n type='button'\n className='layout-config-option'\n aria-pressed={config.menuTheme === menuTheme}\n onClick={() => setMenuTheme(menuTheme)}>\n {menuThemeLabels[menuTheme]}\n </button>\n ))}\n </div>\n </div>\n )}\n\n {slots.content}\n </div>\n </Sidebar>\n </>\n );\n}\n"],"names":["colorSchemeLabels","ColorScheme","Light","Dark","menuThemeLabels","MenuTheme","Primary","ConfigPanel","element","slots","isVisible","setIsVisible","useState","config","setColorScheme","setMenuTheme","useLayoutConfig","title","readString","showsMenuTheme","readBoolean","showsMode","_jsxs","_Fragment","_jsx","Button","type","rounded","icon","className","aria-label","data-scene-id","id","onClick","Sidebar","visible","position","header","onHide","div","h3","role","colorSchemes","map","scheme","button","aria-pressed","colorScheme","ThemeSwitcher","properties","label","LayoutModeSwitcher","menuThemes","menuTheme","content"],"mappings":";;;;;;;;;;;AAYA,6DACA,MAAMA,iBAAAA,GAAiD;IACnD,CAACC,WAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,WAAAA,CAAYE,IAAI,GAAG;AACxB,CAAA;AAEA,2DACA,MAAMC,eAAAA,GAA6C;IAC/C,CAACC,SAAAA,CAAUH,KAAK,GAAG,OAAA;IACnB,CAACG,SAAAA,CAAUF,IAAI,GAAG,MAAA;IAClB,CAACE,SAAAA,CAAUC,OAAO,GAAG;AACzB,CAAA;AAEA;;;;;;;;;;AAUC,IACM,SAASC,WAAAA,CAAY,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACpE,IAAA,MAAM,CAACC,SAAAA,EAAWC,YAAAA,CAAa,GAAGC,QAAAA,CAAS,KAAA,CAAA;AAC3C,IAAA,MAAM,EAAEC,MAAM,EAAEC,cAAc,EAAEC,YAAY,EAAE,GAAGC,eAAAA,EAAAA;IACjD,MAAMC,KAAAA,GAAQC,UAAAA,CAAWV,OAAAA,EAAS,OAAA,EAAS,UAAA,CAAA;IAC3C,MAAMW,cAAAA,GAAiBC,WAAAA,CAAYZ,OAAAA,EAAS,eAAA,EAAiB,IAAA,CAAA;IAC7D,MAAMa,SAAAA,GAAYD,WAAAA,CAAYZ,OAAAA,EAAS,gBAAA,EAAkB,IAAA,CAAA;IAEzD,qBACIc,IAAA,CAAAC,QAAA,EAAA;;0BACIC,GAAA,CAACC,MAAAA,EAAAA;gBACGC,IAAAA,EAAK,QAAA;gB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ps } from '@cratis/scene.react';
2
+ export declare function Footer({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=Footer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.d.ts","sourceRoot":"","sources":["../../../shell/Footer.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAU/D,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BASlE"}
@@ -0,0 +1,26 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { readString } from './elementProperties.js';
3
+
4
+ // Copyright (c) Cratis. All rights reserved.
5
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
6
+ /**
7
+ * The strip below the content.
8
+ *
9
+ * Kept as its own slot rather than folded into the content because it is application chrome, not part of
10
+ * a screen: the same footer is on every page, and a screen that had to render it would have to remember
11
+ * to.
12
+ */ function Footer({ element, slots }) {
13
+ const text = readString(element, 'text');
14
+ return /*#__PURE__*/ jsxs(Fragment, {
15
+ children: [
16
+ /*#__PURE__*/ jsx("span", {
17
+ "data-scene-id": element.id,
18
+ children: text
19
+ }),
20
+ slots.content
21
+ ]
22
+ });
23
+ }
24
+
25
+ export { Footer };
26
+ //# sourceMappingURL=Footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Footer.js","sources":["../../../shell/Footer.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { readString } from './elementProperties';\n\n/**\n * The strip below the content.\n *\n * Kept as its own slot rather than folded into the content because it is application chrome, not part of\n * a screen: the same footer is on every page, and a screen that had to render it would have to remember\n * to.\n */\nexport function Footer({ element, slots }: RegisteredComponentProps) {\n const text = readString(element, 'text');\n\n return (\n <>\n <span data-scene-id={element.id}>{text}</span>\n {slots.content}\n </>\n );\n}\n"],"names":["Footer","element","slots","text","readString","_jsxs","_Fragment","_jsx","span","data-scene-id","id","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,MAAAA,CAAO,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC/D,MAAMC,IAAAA,GAAOC,WAAWH,OAAAA,EAAS,MAAA,CAAA;IAEjC,qBACII,IAAA,CAAAC,QAAA,EAAA;;0BACIC,GAAA,CAACC,MAAAA,EAAAA;AAAKC,gBAAAA,eAAAA,EAAeR,QAAQS,EAAE;AAAGP,gBAAAA,QAAAA,EAAAA;;AACjCD,YAAAA,KAAAA,CAAMS;;;AAGnB;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function FullPageShell({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=FullPageShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullPageShell.d.ts","sourceRoot":"","sources":["../../../shell/FullPageShell.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAgB/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAGzE"}
@@ -0,0 +1,51 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useOptionalLayoutConfig, LayoutConfigProvider } from '../configuration/LayoutConfigProvider.js';
3
+ import { SlotName } from '../layouts/SlotName.js';
4
+ import '@cratis/scene.model';
5
+ import '../layouts/shellComponents.js';
6
+ import '../layouts/appShell.js';
7
+ import '../layouts/fullPage.js';
8
+
9
+ // Copyright (c) Cratis. All rights reserved.
10
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
11
+ /**
12
+ * The chrome-less shell: content, an optional branding aside, and the configurator.
13
+ *
14
+ * Login, register, password reset, verification, lock, error, access-denied, not-found and landing screens
15
+ * all render here rather than in a stripped-down application shell. That split is structural in every
16
+ * PrimeTek template, and for a good reason: those screens have no navigation state to hold, no sidebar to
17
+ * remember, and no breadcrumb to place, so hanging them off the application shell means every one of the
18
+ * eight modes has to have an answer for a page that has no menu.
19
+ *
20
+ * The configurator stays, because a sign-in page still has to honor the chosen theme - it is very often
21
+ * the first page anyone sees.
22
+ */ function FullPageShell({ element, slots }) {
23
+ const surface = /*#__PURE__*/ jsx(FullPageSurface, {
24
+ elementId: element.id,
25
+ slots: slots
26
+ });
27
+ return useOptionalLayoutConfig() ? surface : /*#__PURE__*/ jsx(LayoutConfigProvider, {
28
+ children: surface
29
+ });
30
+ }
31
+ function FullPageSurface({ elementId, slots }) {
32
+ const hasAside = (slots[SlotName.Aside]?.length ?? 0) > 0;
33
+ return /*#__PURE__*/ jsxs("div", {
34
+ className: "layout-full-page",
35
+ "data-scene-id": elementId,
36
+ children: [
37
+ hasAside && /*#__PURE__*/ jsx("aside", {
38
+ className: "layout-full-page-aside",
39
+ children: slots[SlotName.Aside]
40
+ }),
41
+ /*#__PURE__*/ jsx("main", {
42
+ className: "layout-full-page-content",
43
+ children: slots[SlotName.Content]
44
+ }),
45
+ slots[SlotName.ConfigPanel]
46
+ ]
47
+ });
48
+ }
49
+
50
+ export { FullPageShell };
51
+ //# sourceMappingURL=FullPageShell.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullPageShell.js","sources":["../../../shell/FullPageShell.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ReactNode } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutConfigProvider, useOptionalLayoutConfig } from '../configuration';\nimport { SlotName } from '../layouts';\n\n/**\n * The chrome-less shell: content, an optional branding aside, and the configurator.\n *\n * Login, register, password reset, verification, lock, error, access-denied, not-found and landing screens\n * all render here rather than in a stripped-down application shell. That split is structural in every\n * PrimeTek template, and for a good reason: those screens have no navigation state to hold, no sidebar to\n * remember, and no breadcrumb to place, so hanging them off the application shell means every one of the\n * eight modes has to have an answer for a page that has no menu.\n *\n * The configurator stays, because a sign-in page still has to honor the chosen theme - it is very often\n * the first page anyone sees.\n */\nexport function FullPageShell({ element, slots }: RegisteredComponentProps) {\n const surface = <FullPageSurface elementId={element.id} slots={slots} />;\n return useOptionalLayoutConfig() ? surface : <LayoutConfigProvider>{surface}</LayoutConfigProvider>;\n}\n\ninterface FullPageSurfaceProps {\n elementId: string;\n slots: Record<string, ReactNode[]>;\n}\n\nfunction FullPageSurface({ elementId, slots }: FullPageSurfaceProps) {\n const hasAside = (slots[SlotName.Aside]?.length ?? 0) > 0;\n\n return (\n <div className='layout-full-page' data-scene-id={elementId}>\n {hasAside && <aside className='layout-full-page-aside'>{slots[SlotName.Aside]}</aside>}\n <main className='layout-full-page-content'>{slots[SlotName.Content]}</main>\n {slots[SlotName.ConfigPanel]}\n </div>\n );\n}\n"],"names":["FullPageShell","element","slots","surface","_jsx","FullPageSurface","elementId","id","useOptionalLayoutConfig","LayoutConfigProvider","hasAside","SlotName","Aside","length","_jsxs","div","className","data-scene-id","aside","main","Content","ConfigPanel"],"mappings":";;;;;;;;AAAA;AACA;AAOA;;;;;;;;;;;AAWC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACtE,IAAA,MAAMC,wBAAUC,GAAA,CAACC,eAAAA,EAAAA;AAAgBC,QAAAA,SAAAA,EAAWL,QAAQM,EAAE;QAAEL,KAAAA,EAAOA;;IAC/D,OAAOM,uBAAAA,EAAAA,GAA4BL,wBAAUC,GAAA,CAACK,oBAAAA,EAAAA;AAAsBN,QAAAA,QAAAA,EAAAA;;AACxE;AAOA,SAASE,eAAAA,CAAgB,EAAEC,SAAS,EAAEJ,KAAK,EAAwB,EAAA;IAC/D,MAAMQ,QAAAA,GAAW,CAACR,KAAK,CAACS,QAAAA,CAASC,KAAK,CAAC,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AAExD,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,kBAAA;QAAmBC,eAAAA,EAAeX,SAAAA;;AAC5CI,YAAAA,QAAAA,kBAAYN,GAAA,CAACc,OAAAA,EAAAA;gBAAMF,SAAAA,EAAU,wBAAA;0BAA0Bd,KAAK,CAACS,QAAAA,CAASC,KAAK;;0BAC5ER,GAAA,CAACe,MAAAA,EAAAA;gBAAKH,SAAAA,EAAU,0BAAA;0BAA4Bd,KAAK,CAACS,QAAAA,CAASS,OAAO;;YACjElB,KAAK,CAACS,QAAAA,CAASU,WAAW;;;AAGvC;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function LayoutModeSwitcher({ element }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=LayoutModeSwitcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutModeSwitcher.d.ts","sourceRoot":"","sources":["../../../shell/LayoutModeSwitcher.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAuB/D,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAuBvE"}
@@ -0,0 +1,56 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { layoutModes, LayoutMode } from '../configuration/LayoutMode.js';
3
+ import { useLayoutConfig } from '../configuration/LayoutConfigProvider.js';
4
+ import { readString } from './elementProperties.js';
5
+
6
+ // Copyright (c) Cratis. All rights reserved.
7
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
+ /** What each mode is called in the configurator - the same names the PrimeTek template line uses. */ const modeLabels = {
9
+ [LayoutMode.Static]: 'Static',
10
+ [LayoutMode.Overlay]: 'Overlay',
11
+ [LayoutMode.Slim]: 'Slim',
12
+ [LayoutMode.SlimPlus]: 'Slim+',
13
+ [LayoutMode.Compact]: 'Compact',
14
+ [LayoutMode.Horizontal]: 'Horizontal',
15
+ [LayoutMode.Reveal]: 'Reveal',
16
+ [LayoutMode.Drawer]: 'Drawer'
17
+ };
18
+ /**
19
+ * Switches between the layout modes.
20
+ *
21
+ * Below the mobile breakpoint every button is disabled and the panel says why, rather than the picker
22
+ * disappearing. A control that vanishes reads as a bug; a disabled control with a sentence next to it
23
+ * reads as a decision - and the choice is still recorded and still there when the window grows again.
24
+ */ function LayoutModeSwitcher({ element }) {
25
+ const { config, setMode } = useLayoutConfig();
26
+ const label = readString(element, 'label', 'Menu mode');
27
+ return /*#__PURE__*/ jsxs("div", {
28
+ "data-scene-id": element.id,
29
+ children: [
30
+ /*#__PURE__*/ jsx("h3", {
31
+ className: "layout-config-section-title",
32
+ children: label
33
+ }),
34
+ /*#__PURE__*/ jsx("div", {
35
+ className: "layout-config-options",
36
+ role: "group",
37
+ "aria-label": label,
38
+ children: layoutModes.map((mode)=>/*#__PURE__*/ jsx("button", {
39
+ type: "button",
40
+ className: "layout-config-option",
41
+ disabled: config.isMobile,
42
+ "aria-pressed": config.mode === mode,
43
+ onClick: ()=>setMode(mode),
44
+ children: modeLabels[mode]
45
+ }, mode))
46
+ }),
47
+ config.isMobile && /*#__PURE__*/ jsx("p", {
48
+ className: "layout-config-note",
49
+ children: "Below 991px every mode renders off-canvas, so the choice is kept but not applied."
50
+ })
51
+ ]
52
+ });
53
+ }
54
+
55
+ export { LayoutModeSwitcher };
56
+ //# sourceMappingURL=LayoutModeSwitcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutModeSwitcher.js","sources":["../../../shell/LayoutModeSwitcher.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutMode, layoutModes, useLayoutConfig } from '../configuration';\nimport { readString } from './elementProperties';\n\n/** What each mode is called in the configurator - the same names the PrimeTek template line uses. */\nconst modeLabels: Record<LayoutMode, string> = {\n [LayoutMode.Static]: 'Static',\n [LayoutMode.Overlay]: 'Overlay',\n [LayoutMode.Slim]: 'Slim',\n [LayoutMode.SlimPlus]: 'Slim+',\n [LayoutMode.Compact]: 'Compact',\n [LayoutMode.Horizontal]: 'Horizontal',\n [LayoutMode.Reveal]: 'Reveal',\n [LayoutMode.Drawer]: 'Drawer',\n};\n\n/**\n * Switches between the layout modes.\n *\n * Below the mobile breakpoint every button is disabled and the panel says why, rather than the picker\n * disappearing. A control that vanishes reads as a bug; a disabled control with a sentence next to it\n * reads as a decision - and the choice is still recorded and still there when the window grows again.\n */\nexport function LayoutModeSwitcher({ element }: RegisteredComponentProps) {\n const { config, setMode } = useLayoutConfig();\n const label = readString(element, 'label', 'Menu mode');\n\n return (\n <div data-scene-id={element.id}>\n <h3 className='layout-config-section-title'>{label}</h3>\n <div className='layout-config-options' role='group' aria-label={label}>\n {layoutModes.map(mode => (\n <button\n key={mode}\n type='button'\n className='layout-config-option'\n disabled={config.isMobile}\n aria-pressed={config.mode === mode}\n onClick={() => setMode(mode)}>\n {modeLabels[mode]}\n </button>\n ))}\n </div>\n {config.isMobile && <p className='layout-config-note'>Below 991px every mode renders off-canvas, so the choice is kept but not applied.</p>}\n </div>\n );\n}\n"],"names":["modeLabels","LayoutMode","Static","Overlay","Slim","SlimPlus","Compact","Horizontal","Reveal","Drawer","LayoutModeSwitcher","element","config","setMode","useLayoutConfig","label","readString","_jsxs","div","data-scene-id","id","_jsx","h3","className","role","aria-label","layoutModes","map","mode","button","type","disabled","isMobile","aria-pressed","onClick","p"],"mappings":";;;;;AAAA;AACA;AAMA,sGACA,MAAMA,UAAAA,GAAyC;IAC3C,CAACC,UAAAA,CAAWC,MAAM,GAAG,QAAA;IACrB,CAACD,UAAAA,CAAWE,OAAO,GAAG,SAAA;IACtB,CAACF,UAAAA,CAAWG,IAAI,GAAG,MAAA;IACnB,CAACH,UAAAA,CAAWI,QAAQ,GAAG,OA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AAA,EAAU,oBAAA;AAAqB,gBAAA,QAAA,EAAA;;;;AAGlE;;;;"}
@@ -0,0 +1,29 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { GalleryScreenPreview } from '../gallery';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof GalleryScreenPreview;
6
+ parameters: {
7
+ layout: string;
8
+ docs: {
9
+ description: {
10
+ component: string;
11
+ };
12
+ };
13
+ };
14
+ tags: string[];
15
+ };
16
+ export default meta;
17
+ type Story = StoryObj<typeof meta>;
18
+ export declare const Static: Story;
19
+ export declare const Overlay: Story;
20
+ export declare const Slim: Story;
21
+ export declare const SlimPlus: Story;
22
+ export declare const Compact: Story;
23
+ export declare const Horizontal: Story;
24
+ export declare const Reveal: Story;
25
+ export declare const Drawer: Story;
26
+ export declare const DrawerAnchored: Story;
27
+ export declare const DarkMenu: Story;
28
+ export declare const Interactive: Story;
29
+ //# sourceMappingURL=LayoutModes.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutModes.stories.d.ts","sourceRoot":"","sources":["../../../shell/LayoutModes.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AASlD,QAAA,MAAM,IAAI;;;;QAIF,MAAM;QACN,IAAI;YACA,WAAW;gBACP,SAAS;;;;;CAMoB,CAAC;eAE/B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAOnC,eAAO,MAAM,MAAM,EAAE,KAA2C,CAAC;AAGjE,eAAO,MAAM,OAAO,EAAE,KAA4C,CAAC;AAGnE,eAAO,MAAM,IAAI,EAAE,KAAyC,CAAC;AAG7D,eAAO,MAAM,QAAQ,EAAE,KAA6C,CAAC;AAGrE,eAAO,MAAM,OAAO,EAAE,KAA4C,CAAC;AAGnE,eAAO,MAAM,UAAU,EAAE,KAA+C,CAAC;AAGzE,eAAO,MAAM,MAAM,EAAE,KAA2C,CAAC;AAGjE,eAAO,MAAM,MAAM,EAAE,KAA2C,CAAC;AAGjE,eAAO,MAAM,cAAc,EAAE,KAAiG,CAAC;AAG/H,eAAO,MAAM,QAAQ,EAAE,KAA0E,CAAC;AAGlG,eAAO,MAAM,WAAW,EAAE,KAazB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { expect, userEvent, within } from 'storybook/test';
2
+ import { LayoutMode, MenuTheme } from '../configuration';
3
+ import { GalleryScreenPreview } from '../gallery';
4
+ const meta = {
5
+ title: 'Blueprint/Layout modes',
6
+ component: GalleryScreenPreview,
7
+ parameters: {
8
+ layout: 'fullscreen',
9
+ docs: {
10
+ description: {
11
+ component: 'The eight menu modes, each rendering the same dashboard. Below 991px every one of them is forced off-canvas - resize the preview to see it.',
12
+ },
13
+ },
14
+ },
15
+ tags: ['autodocs'],
16
+ };
17
+ export default meta;
18
+ function inMode(mode, extra = {}) {
19
+ return { screenName: 'Dashboard', initialConfig: { mode, ...extra } };
20
+ }
21
+ export const Static = { args: inMode(LayoutMode.Static) };
22
+ export const Overlay = { args: inMode(LayoutMode.Overlay) };
23
+ export const Slim = { args: inMode(LayoutMode.Slim) };
24
+ export const SlimPlus = { args: inMode(LayoutMode.SlimPlus) };
25
+ export const Compact = { args: inMode(LayoutMode.Compact) };
26
+ export const Horizontal = { args: inMode(LayoutMode.Horizontal) };
27
+ export const Reveal = { args: inMode(LayoutMode.Reveal) };
28
+ export const Drawer = { args: inMode(LayoutMode.Drawer) };
29
+ export const DrawerAnchored = { args: inMode(LayoutMode.Drawer, { isSidebarAnchored: true, isSidebarRevealed: true }) };
30
+ export const DarkMenu = { args: inMode(LayoutMode.Static, { menuTheme: MenuTheme.Dark }) };
31
+ export const Interactive = {
32
+ args: inMode(LayoutMode.Static),
33
+ play: async ({ canvasElement }) => {
34
+ const canvas = within(canvasElement);
35
+ const wrapper = canvasElement.querySelector('.layout-wrapper');
36
+ await expect(wrapper.className).not.toContain('layout-static-inactive');
37
+ await userEvent.click(canvas.getByRole('button', { name: 'Close the menu' }));
38
+ await expect(canvasElement.querySelector('.layout-wrapper').className).toContain('layout-static-inactive');
39
+ await userEvent.click(canvas.getByRole('button', { name: 'Open the menu' }));
40
+ await expect(canvasElement.querySelector('.layout-wrapper').className).not.toContain('layout-static-inactive');
41
+ },
42
+ };
43
+ //# sourceMappingURL=LayoutModes.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutModes.stories.js","sourceRoot":"","sources":["../../../shell/LayoutModes.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AASlD,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,wBAAwB;IAC/B,SAAS,EAAE,oBAAoB;IAC/B,UAAU,EAAE;QACR,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE;YACF,WAAW,EAAE;gBACT,SAAS,EACL,6IAA6I;aACpJ;SACJ;KACJ;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;CACuB,CAAC;AAE9C,eAAe,IAAI,CAAC;AAIpB,SAAS,MAAM,CAAC,IAAgB,EAAE,KAAK,GAA4B,EAAE;IACjE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,CAAC;AAC1E,CAAC;AAGD,MAAM,CAAC,MAAM,MAAM,GAAU,EAAE,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;AAGjE,MAAM,CAAC,MAAM,OAAO,GAAU,EAAE,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;AAGnE,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,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QAExE,MAAM,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;QAC9E,MAAM,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,iBAAiB,CAAE,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;QAE5G,MAAM,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;QAC7E,MAAM,MAAM,CAAC,aAAa,CAAC,aAAa,CAAC,iBAAiB,CAAE,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IACpH,CAAC;CACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function Logo({ element }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=Logo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../shell/Logo.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAW/D,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAezD"}