@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,42 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useSceneTheme } from '@cratis/scene.react';
3
+ import { readString, readOptionalString } from './elementProperties.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The brand mark.
9
+ *
10
+ * This is the one place in the shell that reads the active theme directly rather than through a token,
11
+ * because picking between a light-background and a dark-background logo asset is a decision no CSS custom
12
+ * property can express - the two are different files. `useSceneTheme` exists for exactly this case.
13
+ */ function Logo({ element }) {
14
+ const theme = useSceneTheme();
15
+ const label = readString(element, 'label', 'Cratis');
16
+ const initials = readString(element, 'initials', label.slice(0, 1).toUpperCase());
17
+ const lightSource = readOptionalString(element, 'lightImageUrl');
18
+ const darkSource = readOptionalString(element, 'darkImageUrl');
19
+ const source = theme?.isDark ? darkSource ?? lightSource : lightSource ?? darkSource;
20
+ const targetScreen = readString(element, 'targetScreen', 'Dashboard');
21
+ return /*#__PURE__*/ jsxs("a", {
22
+ className: "layout-logo",
23
+ href: `#/${targetScreen}`,
24
+ "data-scene-id": element.id,
25
+ children: [
26
+ source ? /*#__PURE__*/ jsx("img", {
27
+ src: source,
28
+ alt: label,
29
+ height: 28
30
+ }) : /*#__PURE__*/ jsx("span", {
31
+ className: "layout-logo-mark",
32
+ children: initials
33
+ }),
34
+ /*#__PURE__*/ jsx("span", {
35
+ children: label
36
+ })
37
+ ]
38
+ });
39
+ }
40
+
41
+ export { Logo };
42
+ //# sourceMappingURL=Logo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo.js","sources":["../../../shell/Logo.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 { useSceneTheme } from '@cratis/scene.react';\nimport { readOptionalString, readString } from './elementProperties';\n\n/**\n * The brand mark.\n *\n * This is the one place in the shell that reads the active theme directly rather than through a token,\n * because picking between a light-background and a dark-background logo asset is a decision no CSS custom\n * property can express - the two are different files. `useSceneTheme` exists for exactly this case.\n */\nexport function Logo({ element }: RegisteredComponentProps) {\n const theme = useSceneTheme();\n const label = readString(element, 'label', 'Cratis');\n const initials = readString(element, 'initials', label.slice(0, 1).toUpperCase());\n const lightSource = readOptionalString(element, 'lightImageUrl');\n const darkSource = readOptionalString(element, 'darkImageUrl');\n const source = theme?.isDark ? darkSource ?? lightSource : lightSource ?? darkSource;\n const targetScreen = readString(element, 'targetScreen', 'Dashboard');\n\n return (\n <a className='layout-logo' href={`#/${targetScreen}`} data-scene-id={element.id}>\n {source ? <img src={source} alt={label} height={28} /> : <span className='layout-logo-mark'>{initials}</span>}\n <span>{label}</span>\n </a>\n );\n}\n"],"names":["Logo","element","theme","useSceneTheme","label","readString","initials","slice","toUpperCase","lightSource","readOptionalString","darkSource","source","isDark","targetScreen","_jsxs","a","className","href","data-scene-id","id","_jsx","img","src","alt","height","span"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;AAMC,IACM,SAASA,IAAAA,CAAK,EAAEC,OAAO,EAA4B,EAAA;AACtD,IAAA,MAAMC,KAAAA,GAAQC,aAAAA,EAAAA;IACd,MAAMC,KAAAA,GAAQC,UAAAA,CAAWJ,OAAAA,EAAS,OAAA,EAAS,QAAA,CAAA;IAC3C,MAAMK,QAAAA,GAAWD,WAAWJ,OAAAA,EAAS,UAAA,EAAYG,MAAMG,KAAK,CAAC,CAAA,EAAG,CAAA,CAAA,CAAGC,WAAW,EAAA,CAAA;IAC9E,MAAMC,WAAAA,GAAcC,mBAAmBT,OAAAA,EAAS,eAAA,CAAA;IAChD,MAAMU,UAAAA,GAAaD,mBAAmBT,OAAAA,EAAS,cAAA,CAAA;AAC/C,IAAA,MAAMW,MAAAA,GAASV,KAAAA,EAAOW,MAAAA,GAASF,UAAAA,IAAcF,cAAcA,WAAAA,IAAeE,UAAAA;IAC1E,MAAMG,YAAAA,GAAeT,UAAAA,CAAWJ,OAAAA,EAAS,cAAA,EAAgB,WAAA,CAAA;AAEzD,IAAA,qBACIc,IAAA,CAACC,GAAAA,EAAAA;QAAEC,SAAAA,EAAU,aAAA;QAAcC,IAAAA,EAAM,CAAC,EAAE,EAAEJ,YAAAA,CAAAA,CAAc;AAAEK,QAAAA,eAAAA,EAAelB,QAAQmB,EAAE;;AAC1ER,YAAAA,MAAAA,iBAASS,GAAA,CAACC,KAAAA,EAAAA;gBAAIC,GAAAA,EAAKX,MAAAA;gBAAQY,GAAAA,EAAKpB,KAAAA;gBAAOqB,MAAAA,EAAQ;+BAASJ,GAAA,CAACK,MAAAA,EAAAA;gBAAKT,SAAAA,EAAU,kBAAA;AAAoBX,gBAAAA,QAAAA,EAAAA;;0BAC7Fe,GAAA,CAACK,MAAAA,EAAAA;AAAMtB,gBAAAA,QAAAA,EAAAA;;;;AAGnB;;;;"}
@@ -0,0 +1,3 @@
1
+ export declare function LayoutMask(): import("react").JSX.Element | undefined;
2
+ export declare function Mask(): import("react").JSX.Element;
3
+ //# sourceMappingURL=Mask.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mask.d.ts","sourceRoot":"","sources":["../../../shell/Mask.tsx"],"names":[],"mappings":"AAaA,wBAAgB,UAAU,4CAOzB;AAMD,wBAAgB,IAAI,gCAEnB"}
@@ -0,0 +1,31 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useLayoutConfig } from '../configuration/LayoutConfigProvider.js';
3
+
4
+ /**
5
+ * The scrim behind a floating sidebar.
6
+ *
7
+ * It is a `button` rather than a `div` because its only job is to close the sidebar, and a click target
8
+ * that is not focusable or reachable from the keyboard traps anyone not using a mouse behind an open
9
+ * overlay with no way out. It renders nothing at all when no sidebar is floating, so it never sits
10
+ * invisibly over the page swallowing clicks.
11
+ */ function LayoutMask() {
12
+ const { isMaskVisible, setSidebarOpen } = useLayoutConfig();
13
+ if (!isMaskVisible) {
14
+ return undefined;
15
+ }
16
+ return /*#__PURE__*/ jsx("button", {
17
+ type: "button",
18
+ className: "layout-mask",
19
+ "aria-label": "Close the menu",
20
+ onClick: ()=>setSidebarOpen(false)
21
+ });
22
+ }
23
+ /**
24
+ * The `mask` component, for a template that wants to place the scrim itself rather than let
25
+ * {@link AppShell} do it.
26
+ */ function Mask() {
27
+ return /*#__PURE__*/ jsx(LayoutMask, {});
28
+ }
29
+
30
+ export { LayoutMask, Mask };
31
+ //# sourceMappingURL=Mask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Mask.js","sources":["../../../shell/Mask.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 { useLayoutConfig } from '../configuration';\n\n/**\n * The scrim behind a floating sidebar.\n *\n * It is a `button` rather than a `div` because its only job is to close the sidebar, and a click target\n * that is not focusable or reachable from the keyboard traps anyone not using a mouse behind an open\n * overlay with no way out. It renders nothing at all when no sidebar is floating, so it never sits\n * invisibly over the page swallowing clicks.\n */\nexport function LayoutMask() {\n const { isMaskVisible, setSidebarOpen } = useLayoutConfig();\n if (!isMaskVisible) {\n return undefined;\n }\n\n return <button type='button' className='layout-mask' aria-label='Close the menu' onClick={() => setSidebarOpen(false)} />;\n}\n\n/**\n * The `mask` component, for a template that wants to place the scrim itself rather than let\n * {@link AppShell} do it.\n */\nexport function Mask() {\n return <LayoutMask />;\n}\n"],"names":["LayoutMask","isMaskVisible","setSidebarOpen","useLayoutConfig","undefined","_jsx","button","type","className","aria-label","onClick","Mask"],"mappings":";;;AAKA;;;;;;;AAOC,IACM,SAASA,UAAAA,GAAAA;AACZ,IAAA,MAAM,EAAEC,aAAa,EAAEC,cAAc,EAAE,GAAGC,eAAAA,EAAAA;AAC1C,IAAA,IAAI,CAACF,aAAAA,EAAe;QAChB,OAAOG,SAAAA;AACX,IAAA;AAEA,IAAA,qBAAOC,GAAA,CAACC,QAAAA,EAAAA;QAAOC,IAAAA,EAAK,QAAA;QAASC,SAAAA,EAAU,aAAA;QAAcC,YAAAA,EAAW,gBAAA;AAAiBC,QAAAA,OAAAA,EAAS,IAAMR,cAAAA,CAAe,KAAA;;AACnH;AAEA;;;AAGC,IACM,SAASS,IAAAA,GAAAA;AACZ,IAAA,qBAAON,GAAA,CAACL,UAAAA,EAAAA,EAAAA,CAAAA;AACZ;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function Menu({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=Menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.d.ts","sourceRoot":"","sources":["../../../shell/Menu.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAY/D,wBAAgB,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAUhE"}
@@ -0,0 +1,34 @@
1
+ import { jsxs, 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
+ * A navigation list.
8
+ *
9
+ * One markup shape - a `nav` around a `ul` of {@link MenuItem}s - serves every mode; the difference
10
+ * between a docked list, a circular icon rail, a stacked label rail and a horizontal strip with drop-down
11
+ * submenus is entirely in the stylesheet. That is the point of the mode class vocabulary: the menu does
12
+ * not know which mode it is in, so a screen's navigation cannot be written for one mode and broken in
13
+ * another.
14
+ */ function Menu({ element, slots }) {
15
+ const title = readString(element, 'title');
16
+ const label = readString(element, 'label', 'Main');
17
+ return /*#__PURE__*/ jsxs("nav", {
18
+ "data-scene-id": element.id,
19
+ "aria-label": label,
20
+ children: [
21
+ title && /*#__PURE__*/ jsx("div", {
22
+ className: "layout-menu-section-title",
23
+ children: title
24
+ }),
25
+ /*#__PURE__*/ jsx("ul", {
26
+ className: "layout-menu",
27
+ children: slots.items
28
+ })
29
+ ]
30
+ });
31
+ }
32
+
33
+ export { Menu };
34
+ //# sourceMappingURL=Menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.js","sources":["../../../shell/Menu.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 * A navigation list.\n *\n * One markup shape - a `nav` around a `ul` of {@link MenuItem}s - serves every mode; the difference\n * between a docked list, a circular icon rail, a stacked label rail and a horizontal strip with drop-down\n * submenus is entirely in the stylesheet. That is the point of the mode class vocabulary: the menu does\n * not know which mode it is in, so a screen's navigation cannot be written for one mode and broken in\n * another.\n */\nexport function Menu({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n const label = readString(element, 'label', 'Main');\n\n return (\n <nav data-scene-id={element.id} aria-label={label}>\n {title && <div className='layout-menu-section-title'>{title}</div>}\n <ul className='layout-menu'>{slots.items}</ul>\n </nav>\n );\n}\n"],"names":["Menu","element","slots","title","readString","label","_jsxs","nav","data-scene-id","id","aria-label","_jsx","div","className","ul","items"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;AAQC,IACM,SAASA,IAAAA,CAAK,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC7D,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,KAAAA,GAAQD,UAAAA,CAAWH,OAAAA,EAAS,OAAA,EAAS,MAAA,CAAA;AAE3C,IAAA,qBACIK,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeP,QAAQQ,EAAE;QAAEC,YAAAA,EAAYL,KAAAA;;AACvCF,YAAAA,KAAAA,kBAASQ,GAAA,CAACC,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,2BAAA;AAA6BV,gBAAAA,QAAAA,EAAAA;;0BACtDQ,GAAA,CAACG,IAAAA,EAAAA;gBAAGD,SAAAA,EAAU,aAAA;AAAeX,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMa;;;;AAG/C;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function MenuItem({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=MenuItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.d.ts","sourceRoot":"","sources":["../../../shell/MenuItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAgB/D,wBAAgB,QAAQ,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAmBpE"}
@@ -0,0 +1,63 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { readString, readOptionalString, readBoolean } 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
+ * One entry in a navigation list, optionally with a submenu.
8
+ *
9
+ * Its properties are deliberately the {@link NavigationItem} contract - `label`, `targetScreen`,
10
+ * `routeParameterBindings`, `order`, `group` - so the very same element can be handed to the
11
+ * `Navigation` contribution point and read back by `extractNavigationItem`. A screen therefore declares
12
+ * its navigation once and gets both the sidebar entry and the aggregated navigation for free, instead of
13
+ * maintaining a menu and a contribution that drift apart.
14
+ *
15
+ * The route is rendered as a hash route against the target screen's name. A host with a real router
16
+ * renders the shell inside it and rewrites these; hashes keep the gallery navigable with no router at all,
17
+ * which is what a preview needs.
18
+ */ function MenuItem({ element, slots }) {
19
+ const label = readString(element, 'label');
20
+ const icon = readOptionalString(element, 'icon');
21
+ const badge = readOptionalString(element, 'badge');
22
+ const targetScreen = readOptionalString(element, 'targetScreen');
23
+ const isActive = readBoolean(element, 'isActive');
24
+ const hasSubmenu = (slots.items?.length ?? 0) > 0;
25
+ return /*#__PURE__*/ jsxs("li", {
26
+ className: "layout-menu-item",
27
+ "data-scene-id": element.id,
28
+ "data-active": isActive,
29
+ "data-target-screen": targetScreen,
30
+ children: [
31
+ /*#__PURE__*/ jsxs("a", {
32
+ className: "layout-menu-link",
33
+ href: targetScreen ? `#/${targetScreen}` : undefined,
34
+ "aria-current": isActive ? 'page' : undefined,
35
+ children: [
36
+ icon && /*#__PURE__*/ jsx("i", {
37
+ className: `layout-menu-icon ${icon}`,
38
+ "aria-hidden": "true"
39
+ }),
40
+ /*#__PURE__*/ jsx("span", {
41
+ className: "layout-menu-label",
42
+ children: label
43
+ }),
44
+ badge && /*#__PURE__*/ jsx("span", {
45
+ className: "layout-menu-badge",
46
+ children: badge
47
+ }),
48
+ hasSubmenu && /*#__PURE__*/ jsx("i", {
49
+ className: "pi pi-angle-down",
50
+ "aria-hidden": "true"
51
+ })
52
+ ]
53
+ }),
54
+ hasSubmenu && /*#__PURE__*/ jsx("ul", {
55
+ className: "layout-submenu",
56
+ children: slots.items
57
+ })
58
+ ]
59
+ });
60
+ }
61
+
62
+ export { MenuItem };
63
+ //# sourceMappingURL=MenuItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuItem.js","sources":["../../../shell/MenuItem.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 { readBoolean, readOptionalString, readString } from './elementProperties';\n\n/**\n * One entry in a navigation list, optionally with a submenu.\n *\n * Its properties are deliberately the {@link NavigationItem} contract - `label`, `targetScreen`,\n * `routeParameterBindings`, `order`, `group` - so the very same element can be handed to the\n * `Navigation` contribution point and read back by `extractNavigationItem`. A screen therefore declares\n * its navigation once and gets both the sidebar entry and the aggregated navigation for free, instead of\n * maintaining a menu and a contribution that drift apart.\n *\n * The route is rendered as a hash route against the target screen's name. A host with a real router\n * renders the shell inside it and rewrites these; hashes keep the gallery navigable with no router at all,\n * which is what a preview needs.\n */\nexport function MenuItem({ element, slots }: RegisteredComponentProps) {\n const label = readString(element, 'label');\n const icon = readOptionalString(element, 'icon');\n const badge = readOptionalString(element, 'badge');\n const targetScreen = readOptionalString(element, 'targetScreen');\n const isActive = readBoolean(element, 'isActive');\n const hasSubmenu = (slots.items?.length ?? 0) > 0;\n\n return (\n <li className='layout-menu-item' data-scene-id={element.id} data-active={isActive} data-target-screen={targetScreen}>\n <a className='layout-menu-link' href={targetScreen ? `#/${targetScreen}` : undefined} aria-current={isActive ? 'page' : undefined}>\n {icon && <i className={`layout-menu-icon ${icon}`} aria-hidden='true' />}\n <span className='layout-menu-label'>{label}</span>\n {badge && <span className='layout-menu-badge'>{badge}</span>}\n {hasSubmenu && <i className='pi pi-angle-down' aria-hidden='true' />}\n </a>\n {hasSubmenu && <ul className='layout-submenu'>{slots.items}</ul>}\n </li>\n );\n}\n"],"names":["MenuItem","element","slots","label","readString","icon","readOptionalString","badge","targetScreen","isActive","readBoolean","hasSubmenu","items","length","_jsxs","li","className","data-scene-id","id","data-active","data-target-screen","a","href","undefined","aria-current","_jsx","i","aria-hidden","span","ul"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;;;;;;AAYC,IACM,SAASA,QAAAA,CAAS,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,IAAAA,GAAOC,mBAAmBL,OAAAA,EAAS,MAAA,CAAA;IACzC,MAAMM,KAAAA,GAAQD,mBAAmBL,OAAAA,EAAS,OAAA,CAAA;IAC1C,MAAMO,YAAAA,GAAeF,mBAAmBL,OAAAA,EAAS,cAAA,CAAA;IACjD,MAAMQ,QAAAA,GAAWC,YAAYT,OAAAA,EAAS,UAAA,CAAA;IACtC,MAAMU,UAAAA,GAAa,CAACT,KAAAA,CAAMU,KAAK,EAAEC,MAAAA,IAAU,CAAA,IAAK,CAAA;AAEhD,IAAA,qBACIC,IAAA,CAACC,IAAAA,EAAAA;QAAGC,SAAAA,EAAU,kBAAA;AAAmBC,QAAAA,eAAAA,EAAehB,QAAQiB,EAAE;QAAEC,aAAAA,EAAaV,QAAAA;QAAUW,oBAAAA,EAAoBZ,YAAAA;;0BACnGM,IAAA,CAACO,GAAAA,EAAAA;gBAAEL,SAAAA,EAAU,kBAAA;AAAmBM,gBAAAA,IAAAA,EAAMd,YAAAA,GAAe,CAAC,EAAE,EAAEA,cAAc,GAAGe,SAAAA;AAAWC,gBAAAA,cAAAA,EAAcf,WAAW,MAAA,GAASc,SAAAA;;AACnHlB,oBAAAA,IAAAA,kBAAQoB,GAAA,CAACC,GAAAA,EAAAA;wBAAEV,SAAAA,EAAW,CAAC,iBAAiB,EAAEX,IAAAA,CAAAA,CAAM;wBAAEsB,aAAAA,EAAY;;kCAC/DF,GAAA,CAACG,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,mBAAA;AAAqBb,wBAAAA,QAAAA,EAAAA;;AACpCI,oBAAAA,KAAAA,kBAASkB,GAAA,CAACG,MAAAA,EAAAA;wBAAKZ,SAAAA,EAAU,mBAAA;AAAqBT,wBAAAA,QAAAA,EAAAA;;AAC9CI,oBAAAA,UAAAA,kBAAcc,GAAA,CAACC,GAAAA,EAAAA;wBAAEV,SAAAA,EAAU,kBAAA;wBAAmBW,aAAAA,EAAY;;;;AAE9DhB,YAAAA,UAAAA,kBAAcc,GAAA,CAACI,IAAAA,EAAAA;gBAAGb,SAAAA,EAAU,gBAAA;AAAkBd,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMU;;;;AAGjE;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function PageHeader({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=PageHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../shell/PageHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAW/D,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAatE"}
@@ -0,0 +1,41 @@
1
+ import { jsxs, 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
+ * A screen's title, subtitle and actions.
8
+ *
9
+ * This belongs to the layout package rather than to each screen because it is the one piece of page
10
+ * furniture every page template repeats. Centralizing it means the title/actions relationship is spaced
11
+ * and aligned identically across the whole page set, which is most of what makes a template set look like
12
+ * one product rather than twenty pages.
13
+ */ function PageHeader({ element, slots }) {
14
+ const title = readString(element, 'title');
15
+ const subtitle = readString(element, 'subtitle');
16
+ return /*#__PURE__*/ jsxs("div", {
17
+ className: "layout-page-header",
18
+ "data-scene-id": element.id,
19
+ children: [
20
+ /*#__PURE__*/ jsxs("div", {
21
+ children: [
22
+ /*#__PURE__*/ jsx("h1", {
23
+ className: "layout-page-header-title",
24
+ children: title
25
+ }),
26
+ subtitle && /*#__PURE__*/ jsx("p", {
27
+ className: "layout-page-header-subtitle",
28
+ children: subtitle
29
+ })
30
+ ]
31
+ }),
32
+ (slots.actions?.length ?? 0) > 0 && /*#__PURE__*/ jsx("div", {
33
+ className: "layout-page-header-actions",
34
+ children: slots.actions
35
+ })
36
+ ]
37
+ });
38
+ }
39
+
40
+ export { PageHeader };
41
+ //# sourceMappingURL=PageHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageHeader.js","sources":["../../../shell/PageHeader.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 * A screen's title, subtitle and actions.\n *\n * This belongs to the layout package rather than to each screen because it is the one piece of page\n * furniture every page template repeats. Centralizing it means the title/actions relationship is spaced\n * and aligned identically across the whole page set, which is most of what makes a template set look like\n * one product rather than twenty pages.\n */\nexport function PageHeader({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n const subtitle = readString(element, 'subtitle');\n\n return (\n <div className='layout-page-header' data-scene-id={element.id}>\n <div>\n <h1 className='layout-page-header-title'>{title}</h1>\n {subtitle && <p className='layout-page-header-subtitle'>{subtitle}</p>}\n </div>\n {(slots.actions?.length ?? 0) > 0 && <div className='layout-page-header-actions'>{slots.actions}</div>}\n </div>\n );\n}\n"],"names":["PageHeader","element","slots","title","readString","subtitle","_jsxs","div","className","data-scene-id","id","_jsx","h1","p","actions","length"],"mappings":";;;AAAA;AACA;AAKA;;;;;;;AAOC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACnE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;IAClC,MAAMI,QAAAA,GAAWD,WAAWH,OAAAA,EAAS,UAAA,CAAA;AAErC,IAAA,qBACIK,IAAA,CAACC,KAAAA,EAAAA;QAAIC,SAAAA,EAAU,oBAAA;AAAqBC,QAAAA,eAAAA,EAAeR,QAAQS,EAAE;;0BACzDJ,IAAA,CAACC,KAAAA,EAAAA;;kCACGI,GAAA,CAACC,IAAAA,EAAAA;wBAAGJ,SAAAA,EAAU,0BAAA;AAA4BL,wBAAAA,QAAAA,EAAAA;;AACzCE,oBAAAA,QAAAA,kBAAYM,GAAA,CAACE,GAAAA,EAAAA;wBAAEL,SAAAA,EAAU,6BAAA;AAA+BH,wBAAAA,QAAAA,EAAAA;;;;AAE3DH,YAAAA,CAAAA,MAAMY,OAAO,EAAEC,UAAU,CAAA,IAAK,mBAAKJ,GAAA,CAACJ,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,4BAAA;AAA8BN,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMY;;;;AAGpG;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function RightPanel({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=RightPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RightPanel.d.ts","sourceRoot":"","sources":["../../../shell/RightPanel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAU/D,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAStE"}
@@ -0,0 +1,28 @@
1
+ import { jsxs, 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 inspector panel down the right-hand edge.
8
+ *
9
+ * Sakai has no right panel; the premium PrimeTek templates all do, and it is where activity feeds, recent
10
+ * items and inline help live. It is exposed as a slot the shell simply does not render when nothing fills
11
+ * it, so a screen pays nothing for a region it does not use.
12
+ */ function RightPanel({ element, slots }) {
13
+ const title = readString(element, 'title');
14
+ return /*#__PURE__*/ jsxs("section", {
15
+ "data-scene-id": element.id,
16
+ "aria-label": title || 'Panel',
17
+ children: [
18
+ title && /*#__PURE__*/ jsx("h2", {
19
+ className: "layout-page-header-title",
20
+ children: title
21
+ }),
22
+ slots.content
23
+ ]
24
+ });
25
+ }
26
+
27
+ export { RightPanel };
28
+ //# sourceMappingURL=RightPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RightPanel.js","sources":["../../../shell/RightPanel.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 inspector panel down the right-hand edge.\n *\n * Sakai has no right panel; the premium PrimeTek templates all do, and it is where activity feeds, recent\n * items and inline help live. It is exposed as a slot the shell simply does not render when nothing fills\n * it, so a screen pays nothing for a region it does not use.\n */\nexport function RightPanel({ element, slots }: RegisteredComponentProps) {\n const title = readString(element, 'title');\n\n return (\n <section data-scene-id={element.id} aria-label={title || 'Panel'}>\n {title && <h2 className='layout-page-header-title'>{title}</h2>}\n {slots.content}\n </section>\n );\n}\n"],"names":["RightPanel","element","slots","title","readString","_jsxs","section","data-scene-id","id","aria-label","_jsx","h2","className","content"],"mappings":";;;AAAA;AACA;AAKA;;;;;;AAMC,IACM,SAASA,UAAAA,CAAW,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACnE,MAAMC,KAAAA,GAAQC,WAAWH,OAAAA,EAAS,OAAA,CAAA;AAElC,IAAA,qBACII,IAAA,CAACC,SAAAA,EAAAA;AAAQC,QAAAA,eAAAA,EAAeN,QAAQO,EAAE;AAAEC,QAAAA,YAAAA,EAAYN,KAAAA,IAAS,OAAA;;AACpDA,YAAAA,KAAAA,kBAASO,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,0BAAA;AAA4BT,gBAAAA,QAAAA,EAAAA;;AACnDD,YAAAA,KAAAA,CAAMW;;;AAGnB;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function Sidebar({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=Sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../shell/Sidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAe/D,wBAAgB,OAAO,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAyBnE"}
@@ -0,0 +1,49 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { Button } from 'primereact/button';
3
+ import { isPointerRevealMode } from '../configuration/layoutConfigTransitions.js';
4
+ import { useLayoutConfig } from '../configuration/LayoutConfigProvider.js';
5
+ import { readString } from './elementProperties.js';
6
+
7
+ /**
8
+ * The sidebar's own chrome, inside the panel {@link AppShell} positions.
9
+ *
10
+ * The panel and its contents are deliberately different components. Everything about *where* the sidebar
11
+ * is - translated off-canvas, collapsed to a rail, growing on hover - belongs to the mode and therefore to
12
+ * the shell; everything about *what is in it* belongs to the screen. A template can replace this header
13
+ * wholesale without any of the mode CSS noticing.
14
+ *
15
+ * The pin button only appears in `reveal` and `drawer`, the two modes where the sidebar answers to the
16
+ * pointer and therefore needs a way to be made to stay.
17
+ */ function Sidebar({ element, slots }) {
18
+ const { effectiveMode, config, toggleSidebarAnchor } = useLayoutConfig();
19
+ const title = readString(element, 'title');
20
+ const isPinnable = isPointerRevealMode(effectiveMode);
21
+ return /*#__PURE__*/ jsxs(Fragment, {
22
+ children: [
23
+ /*#__PURE__*/ jsxs("div", {
24
+ className: "layout-sidebar-header",
25
+ "data-scene-id": element.id,
26
+ children: [
27
+ slots.logo,
28
+ title && /*#__PURE__*/ jsx("span", {
29
+ className: "layout-sidebar-title",
30
+ children: title
31
+ }),
32
+ isPinnable && /*#__PURE__*/ jsx(Button, {
33
+ type: "button",
34
+ text: true,
35
+ rounded: true,
36
+ icon: config.isSidebarAnchored ? 'pi pi-lock' : 'pi pi-lock-open',
37
+ "aria-label": config.isSidebarAnchored ? 'Unpin the menu' : 'Pin the menu open',
38
+ "aria-pressed": config.isSidebarAnchored,
39
+ onClick: toggleSidebarAnchor
40
+ })
41
+ ]
42
+ }),
43
+ slots.content
44
+ ]
45
+ });
46
+ }
47
+
48
+ export { Sidebar };
49
+ //# sourceMappingURL=Sidebar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sidebar.js","sources":["../../../shell/Sidebar.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 { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { isPointerRevealMode, useLayoutConfig } from '../configuration';\nimport { readString } from './elementProperties';\n\n/**\n * The sidebar's own chrome, inside the panel {@link AppShell} positions.\n *\n * The panel and its contents are deliberately different components. Everything about *where* the sidebar\n * is - translated off-canvas, collapsed to a rail, growing on hover - belongs to the mode and therefore to\n * the shell; everything about *what is in it* belongs to the screen. A template can replace this header\n * wholesale without any of the mode CSS noticing.\n *\n * The pin button only appears in `reveal` and `drawer`, the two modes where the sidebar answers to the\n * pointer and therefore needs a way to be made to stay.\n */\nexport function Sidebar({ element, slots }: RegisteredComponentProps) {\n const { effectiveMode, config, toggleSidebarAnchor } = useLayoutConfig();\n const title = readString(element, 'title');\n const isPinnable = isPointerRevealMode(effectiveMode);\n\n return (\n <>\n <div className='layout-sidebar-header' data-scene-id={element.id}>\n {slots.logo}\n {title && <span className='layout-sidebar-title'>{title}</span>}\n {isPinnable && (\n <Button\n type='button'\n text\n rounded\n icon={config.isSidebarAnchored ? 'pi pi-lock' : 'pi pi-lock-open'}\n aria-label={config.isSidebarAnchored ? 'Unpin the menu' : 'Pin the menu open'}\n aria-pressed={config.isSidebarAnchored}\n onClick={toggleSidebarAnchor}\n />\n )}\n </div>\n {slots.content}\n </>\n );\n}\n"],"names":["Sidebar","element","slots","effectiveMode","config","toggleSidebarAnchor","useLayoutConfig","title","readString","isPinnable","isPointerRevealMode","_jsxs","_Fragment","div","className","data-scene-id","id","logo","_jsx","span","Button","type","text","rounded","icon","isSidebarAnchored","aria-label","aria-pressed","onClick","content"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,OAAAA,CAAQ,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAChE,IAAA,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,mBAAmB,EAAE,GAAGC,eAAAA,EAAAA;IACvD,MAAMC,KAAAA,GAAQC,WAAWP,OAAAA,EAAS,OAAA,CAAA;AAClC,IAAA,MAAMQ,aAAaC,mBAAAA,CAAoBP,aAAAA,CAAAA;IAEvC,qBACIQ,IAAA,CAAAC,QAAA,EAAA;;0BACID,IAAA,CAACE,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,uBAAA;AAAwBC,gBAAAA,eAAAA,EAAed,QAAQe,EAAE;;AAC3Dd,oBAAAA,KAAAA,CAAMe,IAAI;AACVV,oBAAAA,KAAAA,kBAASW,GAAA,CAACC,MAAAA,EAAAA;wBAAKL,SAAAA,EAAU,sBAAA;AAAwBP,wBAAAA,QAAAA,EAAAA;;AACjDE,oBAAAA,UAAAA,kBACGS,GAAA,CAACE,MAAAA,EAAAA;wBACGC,IAAAA,EAAK,QAAA;wBACLC,IAAI,EAAA,IAAA;wBACJC,OAAO,EAAA,IAAA;wBACPC,IAAAA,EAAMpB,MAAAA,CAAOqB,iBAAiB,GAAG,YAAA,GAAe,iBAAA;wBAChDC,YAAAA,EAAYtB,MAAAA,CAAOqB,iBAAiB,GAAG,gBAAA,GAAmB,mBAAA;AAC1DE,wBAAAA,cAAAA,EAAcvB,OAAOqB,iBAAiB;wBACtCG,OAAAA,EAASvB;;;;AAIpBH,YAAAA,KAAAA,CAAM2B;;;AAGnB;;;;"}
@@ -0,0 +1,10 @@
1
+ import { ExternalComponent, Theme } from '@cratis/scene.model';
2
+ import { ColorScheme } from '../configuration';
3
+ export interface ThemeOption {
4
+ name: string;
5
+ label: string;
6
+ colorScheme: ColorScheme;
7
+ }
8
+ export declare function readThemeOptions(element: ExternalComponent, fallback: ThemeOption[]): ThemeOption[];
9
+ export declare function themeOptionsFor(themes: Theme[]): ThemeOption[];
10
+ //# sourceMappingURL=ThemeOption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeOption.d.ts","sourceRoot":"","sources":["../../../shell/ThemeOption.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAU/C,MAAM,WAAW,WAAW;IAExB,IAAI,EAAE,MAAM,CAAC;IAGb,KAAK,EAAE,MAAM,CAAC;IAGd,WAAW,EAAE,WAAW,CAAC;CAC5B;AAaD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,WAAW,EAAE,CAWnG;AAMD,wBAAgB,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,CAM9D"}
@@ -0,0 +1,39 @@
1
+ import { ColorScheme } from '../configuration/ColorScheme.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
4
+ import { readRecords, recordString } 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
+ /**
9
+ * Reads the themes a switcher should offer out of an element's properties, falling back to the ones
10
+ * supplied by the host.
11
+ *
12
+ * A template says which themes it wants offered; a host that renders the shell with a different theme set
13
+ * passes those as the fallback. Neither has to know the other's list.
14
+ *
15
+ * @param element The element carrying an optional `themes` property - an array of `{ name, label, isDark }`.
16
+ * @param fallback The options to offer when the element names none.
17
+ * @returns The options to render.
18
+ */ function readThemeOptions(element, fallback) {
19
+ const declared = readRecords(element, 'themes').map((record)=>({
20
+ name: recordString(record, 'name'),
21
+ label: recordString(record, 'label') || recordString(record, 'name'),
22
+ colorScheme: record.isDark === true ? ColorScheme.Dark : ColorScheme.Light
23
+ }));
24
+ const named = declared.filter((option)=>option.name.length > 0);
25
+ return named.length > 0 ? named : fallback;
26
+ }
27
+ /**
28
+ * Turns the {@link Theme}s a package ships into switcher options, so a host offering its own themes and a
29
+ * host offering this package's use the same code path.
30
+ */ function themeOptionsFor(themes) {
31
+ return themes.map((theme)=>({
32
+ name: theme.name,
33
+ label: theme.name,
34
+ colorScheme: theme.isDark ? ColorScheme.Dark : ColorScheme.Light
35
+ }));
36
+ }
37
+
38
+ export { readThemeOptions, themeOptionsFor };
39
+ //# sourceMappingURL=ThemeOption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeOption.js","sources":["../../../shell/ThemeOption.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ExternalComponent, Theme } from '@cratis/scene.model';\nimport { ColorScheme } from '../configuration';\nimport { readRecords, recordString } from './elementProperties';\n\n/**\n * One entry a theme switcher offers.\n *\n * A switcher needs a name to record and a color scheme to record alongside it, but must not need the\n * theme's tokens - the tokens belong to whoever applies the theme, and a switcher that carried them would\n * force every page template to inline a full palette just to offer a choice.\n */\nexport interface ThemeOption {\n /** The {@link Theme.name} to record when this option is chosen. */\n name: string;\n\n /** What to show on the button. */\n label: string;\n\n /** Which side of the light/dark axis choosing this option puts the shell on. */\n colorScheme: ColorScheme;\n}\n\n/**\n * Reads the themes a switcher should offer out of an element's properties, falling back to the ones\n * supplied by the host.\n *\n * A template says which themes it wants offered; a host that renders the shell with a different theme set\n * passes those as the fallback. Neither has to know the other's list.\n *\n * @param element The element carrying an optional `themes` property - an array of `{ name, label, isDark }`.\n * @param fallback The options to offer when the element names none.\n * @returns The options to render.\n */\nexport function readThemeOptions(element: ExternalComponent, fallback: ThemeOption[]): ThemeOption[] {\n const declared = readRecords(element, 'themes').map(\n (record): ThemeOption => ({\n name: recordString(record, 'name'),\n label: recordString(record, 'label') || recordString(record, 'name'),\n colorScheme: record.isDark === true ? ColorScheme.Dark : ColorScheme.Light,\n }),\n );\n\n const named = declared.filter(option => option.name.length > 0);\n return named.length > 0 ? named : fallback;\n}\n\n/**\n * Turns the {@link Theme}s a package ships into switcher options, so a host offering its own themes and a\n * host offering this package's use the same code path.\n */\nexport function themeOptionsFor(themes: Theme[]): ThemeOption[] {\n return themes.map(theme => ({\n name: theme.name,\n label: theme.name,\n colorScheme: theme.isDark ? ColorScheme.Dark : ColorScheme.Light,\n }));\n}\n"],"names":["readThemeOptions","element","fallback","declared","readRecords","map","record","name","recordString","label","colorScheme","isDark","ColorScheme","Dark","Light","named","filter","option","length","themeOptionsFor","themes","theme"],"mappings":";;;;;AAAA;AACA;AAwBA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiBC,OAA0B,EAAEC,QAAuB,EAAA;IAChF,MAAMC,QAAAA,GAAWC,YAAYH,OAAAA,EAAS,QAAA,CAAA,CAAUI,GAAG,CAC/C,CAACC,UAAyB;AACtBC,YAAAA,IAAAA,EAAMC,aAAaF,MAAAA,EAAQ,MAAA,CAAA;AAC3BG,YAAAA,KAAAA,EAAOD,YAAAA,CAAaF,MAAAA,EAAQ,OAAA,CAAA,IAAYE,YAAAA,CAAaF,MAAAA,EAAQ,MAAA,CAAA;YAC7DI,WAAAA,EAAaJ,MAAAA,CAAOK,MAAM,KAAK,IAAA,GAAOC,YAAYC,IAAI,GAAGD,YAAYE;SACzE,CAAA,CAAA;IAGJ,MAAMC,KAAAA,GAAQZ,QAAAA,CAASa,MAAM,CAACC,CAAAA,SAAUA,MAAAA,CAAOV,IAAI,CAACW,MAAM,GAAG,CAAA,CAAA;AAC7D,IAAA,OAAOH,KAAAA,CAAMG,MAAM,GAAG,CAAA,GAAIH,KAAAA,GAAQb,QAAAA;AACtC;AAEA;;;IAIO,SAASiB,eAAAA,CAAgBC,MAAe,EAAA;AAC3C,IAAA,OAAOA,MAAAA,CAAOf,GAAG,CAACgB,CAAAA,SAAU;AACxBd,YAAAA,IAAAA,EAAMc,MAAMd,IAAI;AAChBE,YAAAA,KAAAA,EAAOY,MAAMd,IAAI;AACjBG,YAAAA,WAAAA,EAAaW,MAAMV,MAAM,GAAGC,YAAYC,IAAI,GAAGD,YAAYE;SAC/D,CAAA,CAAA;AACJ;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function ThemeSwitcher({ element }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=ThemeSwitcher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeSwitcher.d.ts","sourceRoot":"","sources":["../../../shell/ThemeSwitcher.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAa/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAyBlE"}
@@ -0,0 +1,48 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useLayoutConfig } from '../configuration/LayoutConfigProvider.js';
3
+ import { defaultBlueprintThemes } from '../themes/defaultBlueprintThemes.js';
4
+ import 'react';
5
+ import '@cratis/scene.react';
6
+ import { readString } from './elementProperties.js';
7
+ import { readThemeOptions, themeOptionsFor } from './ThemeOption.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
+ * Switches between the themes a host offers.
13
+ *
14
+ * It records a name and a color scheme and nothing else - {@link LayoutThemeProvider} resolves the name
15
+ * against the real theme set. That split is what makes switching live: the tokens are rewritten on the
16
+ * element that already exists, so nothing below remounts and no form loses what was typed into it.
17
+ */ function ThemeSwitcher({ element }) {
18
+ const { config, setThemeName, setColorScheme } = useLayoutConfig();
19
+ const label = readString(element, 'label', 'Theme');
20
+ const options = readThemeOptions(element, themeOptionsFor(defaultBlueprintThemes));
21
+ return /*#__PURE__*/ jsxs("div", {
22
+ "data-scene-id": element.id,
23
+ children: [
24
+ /*#__PURE__*/ jsx("h3", {
25
+ className: "layout-config-section-title",
26
+ children: label
27
+ }),
28
+ /*#__PURE__*/ jsx("div", {
29
+ className: "layout-config-options",
30
+ role: "group",
31
+ "aria-label": label,
32
+ children: options.map((option)=>/*#__PURE__*/ jsx("button", {
33
+ type: "button",
34
+ className: "layout-config-option",
35
+ "aria-pressed": config.themeName === option.name,
36
+ onClick: ()=>{
37
+ setThemeName(option.name);
38
+ setColorScheme(option.colorScheme);
39
+ },
40
+ children: option.label
41
+ }, option.name))
42
+ })
43
+ ]
44
+ });
45
+ }
46
+
47
+ export { ThemeSwitcher };
48
+ //# sourceMappingURL=ThemeSwitcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeSwitcher.js","sources":["../../../shell/ThemeSwitcher.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 { useLayoutConfig } from '../configuration';\nimport { defaultBlueprintThemes } from '../themes';\nimport { readString } from './elementProperties';\nimport { readThemeOptions, themeOptionsFor } from './ThemeOption';\n\n/**\n * Switches between the themes a host offers.\n *\n * It records a name and a color scheme and nothing else - {@link LayoutThemeProvider} resolves the name\n * against the real theme set. That split is what makes switching live: the tokens are rewritten on the\n * element that already exists, so nothing below remounts and no form loses what was typed into it.\n */\nexport function ThemeSwitcher({ element }: RegisteredComponentProps) {\n const { config, setThemeName, setColorScheme } = useLayoutConfig();\n const label = readString(element, 'label', 'Theme');\n const options = readThemeOptions(element, themeOptionsFor(defaultBlueprintThemes));\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 {options.map(option => (\n <button\n key={option.name}\n type='button'\n className='layout-config-option'\n aria-pressed={config.themeName === option.name}\n onClick={() => {\n setThemeName(option.name);\n setColorScheme(option.colorScheme);\n }}>\n {option.label}\n </button>\n ))}\n </div>\n </div>\n );\n}\n"],"names":["ThemeSwitcher","element","config","setThemeName","setColorScheme","useLayoutConfig","label","readString","options","readThemeOptions","themeOptionsFor","defaultBlueprintThemes","_jsxs","div","data-scene-id","id","_jsx","h3","className","role","aria-label","map","option","button","type","aria-pressed","themeName","name","onClick","colorScheme"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;;AAMC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,MAAM,EAAEC,MAAM,EAAEC,YAAY,EAAEC,cAAc,EAAE,GAAGC,eAAAA,EAAAA;IACjD,MAAMC,KAAAA,GAAQC,UAAAA,CAAWN,OAAAA,EAAS,OAAA,EAAS,OAAA,CAAA;IAC3C,MAAMO,OAAAA,GAAUC,gBAAAA,CAAiBR,OAAAA,EAASS,eAAAA,CAAgBC,sBAAAA,CAAAA,CAAAA;AAE1D,IAAA,qBACIC,IAAA,CAACC,KAAAA,EAAAA;AAAIC,QAAAA,eAAAA,EAAeb,QAAQc,EAAE;;0BAC1BC,GAAA,CAACC,IAAAA,EAAAA;gBAAGC,SAAAA,EAAU,6BAAA;AAA+BZ,gBAAAA,QAAAA,EAAAA;;0BAC7CU,GAAA,CAACH,KAAAA,EAAAA;gBAAIK,SAAAA,EAAU,uBAAA;gBAAwBC,IAAAA,EAAK,OAAA;gBAAQC,YAAAA,EAAYd,KAAAA;AAC3DE,gBAAAA,QAAAA,EAAAA,OAAAA,CAAQa,GAAG,CAACC,CAAAA,MAAAA,iBACTN,GAAA,CAACO,QAAAA,EAAAA;wBAEGC,IAAAA,EAAK,QAAA;wBACLN,SAAAA,EAAU,sBAAA;AACVO,wBAAAA,cAAAA,EAAcvB,MAAAA,CAAOwB,SAAS,KAAKJ,MAAAA,CAAOK,IAAI;wBAC9CC,OAAAA,EAAS,IAAA;AACLzB,4BAAAA,YAAAA,CAAamB,OAAOK,IAAI,CAAA;AACxBvB,4BAAAA,cAAAA,CAAekB,OAAOO,WAAW,CAAA;AACrC,wBAAA,CAAA;AACCP,wBAAAA,QAAAA,EAAAA,MAAAA,CAAOhB;AARHgB,qBAAAA,EAAAA,MAAAA,CAAOK,IAAI,CAAA;;;;AAcxC;;;;"}
@@ -0,0 +1,3 @@
1
+ import { RegisteredComponentProps } from '@cratis/scene.react';
2
+ export declare function Topbar({ element, slots }: RegisteredComponentProps): import("react").JSX.Element;
3
+ //# sourceMappingURL=Topbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Topbar.d.ts","sourceRoot":"","sources":["../../../shell/Topbar.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAe/D,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAyBlE"}
@@ -0,0 +1,52 @@
1
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
+ import { Button } from 'primereact/button';
3
+ import { LayoutMode } from '../configuration/LayoutMode.js';
4
+ import { useLayoutConfig } from '../configuration/LayoutConfigProvider.js';
5
+ import { readBoolean } from './elementProperties.js';
6
+
7
+ /**
8
+ * The fixed strip across the top of the application shell.
9
+ *
10
+ * It owns the one control every mode needs: the sidebar toggle. In `horizontal` mode it also hosts the
11
+ * menu itself, which is why the menu arrives here as a slot rather than being hard-wired into the
12
+ * sidebar - the same navigation markup has to be able to render in two places.
13
+ *
14
+ * The toggle hides itself in the rail modes, where there is nothing to toggle: `slim`, `slim-plus` and
15
+ * `compact` are always showing, `reveal` and `drawer` answer to the pointer and the pin, and `horizontal`
16
+ * has no sidebar at all. A button that does nothing is worse than no button.
17
+ */ function Topbar({ element, slots }) {
18
+ const { effectiveMode, config, toggleSidebar } = useLayoutConfig();
19
+ const showsToggle = readBoolean(element, 'showToggle', true) && togglesSidebar(effectiveMode);
20
+ return /*#__PURE__*/ jsxs(Fragment, {
21
+ children: [
22
+ /*#__PURE__*/ jsxs("div", {
23
+ className: "layout-topbar-start",
24
+ "data-scene-id": element.id,
25
+ children: [
26
+ showsToggle && /*#__PURE__*/ jsx(Button, {
27
+ type: "button",
28
+ text: true,
29
+ rounded: true,
30
+ icon: "pi pi-bars",
31
+ "aria-label": config.isSidebarOpen ? 'Close the menu' : 'Open the menu',
32
+ "aria-expanded": config.isSidebarOpen,
33
+ onClick: toggleSidebar
34
+ }),
35
+ slots.logo,
36
+ slots.start
37
+ ]
38
+ }),
39
+ slots.menu,
40
+ /*#__PURE__*/ jsx("div", {
41
+ className: "layout-topbar-end",
42
+ children: slots.end
43
+ })
44
+ ]
45
+ });
46
+ }
47
+ function togglesSidebar(mode) {
48
+ return mode === LayoutMode.Static || mode === LayoutMode.Overlay;
49
+ }
50
+
51
+ export { Topbar };
52
+ //# sourceMappingURL=Topbar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Topbar.js","sources":["../../../shell/Topbar.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 { Button } from 'primereact/button';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { LayoutMode, useLayoutConfig } from '../configuration';\nimport { readBoolean } from './elementProperties';\n\n/**\n * The fixed strip across the top of the application shell.\n *\n * It owns the one control every mode needs: the sidebar toggle. In `horizontal` mode it also hosts the\n * menu itself, which is why the menu arrives here as a slot rather than being hard-wired into the\n * sidebar - the same navigation markup has to be able to render in two places.\n *\n * The toggle hides itself in the rail modes, where there is nothing to toggle: `slim`, `slim-plus` and\n * `compact` are always showing, `reveal` and `drawer` answer to the pointer and the pin, and `horizontal`\n * has no sidebar at all. A button that does nothing is worse than no button.\n */\nexport function Topbar({ element, slots }: RegisteredComponentProps) {\n const { effectiveMode, config, toggleSidebar } = useLayoutConfig();\n const showsToggle = readBoolean(element, 'showToggle', true) && togglesSidebar(effectiveMode);\n\n return (\n <>\n <div className='layout-topbar-start' data-scene-id={element.id}>\n {showsToggle && (\n <Button\n type='button'\n text\n rounded\n icon='pi pi-bars'\n aria-label={config.isSidebarOpen ? 'Close the menu' : 'Open the menu'}\n aria-expanded={config.isSidebarOpen}\n onClick={toggleSidebar}\n />\n )}\n {slots.logo}\n {slots.start}\n </div>\n {slots.menu}\n <div className='layout-topbar-end'>{slots.end}</div>\n </>\n );\n}\n\nfunction togglesSidebar(mode: LayoutMode): boolean {\n return mode === LayoutMode.Static || mode === LayoutMode.Overlay;\n}\n"],"names":["Topbar","element","slots","effectiveMode","config","toggleSidebar","useLayoutConfig","showsToggle","readBoolean","togglesSidebar","_jsxs","_Fragment","div","className","data-scene-id","id","_jsx","Button","type","text","rounded","icon","aria-label","isSidebarOpen","aria-expanded","onClick","logo","start","menu","end","mode","LayoutMode","Static","Overlay"],"mappings":";;;;;;AAQA;;;;;;;;;;AAUC,IACM,SAASA,MAAAA,CAAO,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAC/D,IAAA,MAAM,EAAEC,aAAa,EAAEC,MAAM,EAAEC,aAAa,EAAE,GAAGC,eAAAA,EAAAA;AACjD,IAAA,MAAMC,WAAAA,GAAcC,WAAAA,CAAYP,OAAAA,EAAS,YAAA,EAAc,SAASQ,cAAAA,CAAeN,aAAAA,CAAAA;IAE/E,qBACIO,IAAA,CAAAC,QAAA,EAAA;;0BACID,IAAA,CAACE,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,qBAAA;AAAsBC,gBAAAA,eAAAA,EAAeb,QAAQc,EAAE;;AACzDR,oBAAAA,WAAAA,kBACGS,GAAA,CAACC,MAAAA,EAAAA;wBACGC,IAAAA,EAAK,QAAA;wBACLC,IAAI,EAAA,IAAA;wBACJC,OAAO,EAAA,IAAA;wBACPC,IAAAA,EAAK,YAAA;wBACLC,YAAAA,EAAYlB,MAAAA,CAAOmB,aAAa,GAAG,gBAAA,GAAmB,eAAA;AACtDC,wBAAAA,eAAAA,EAAepB,OAAOmB,aAAa;wBACnCE,OAAAA,EAASpB;;AAGhBH,oBAAAA,KAAAA,CAAMwB,IAAI;AACVxB,oBAAAA,KAAAA,CAAMyB;;;AAEVzB,YAAAA,KAAAA,CAAM0B,IAAI;0BACXZ,GAAA,CAACJ,KAAAA,EAAAA;gBAAIC,SAAAA,EAAU,mBAAA;AAAqBX,gBAAAA,QAAAA,EAAAA,KAAAA,CAAM2B;;;;AAGtD;AAEA,SAASpB,eAAeqB,IAAgB,EAAA;AACpC,IAAA,OAAOA,SAASC,UAAAA,CAAWC,MAAM,IAAIF,IAAAA,KAASC,WAAWE,OAAO;AACpE;;;;"}