@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,33 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var react = require('react');
5
+ var scene_react = require('@cratis/scene.react');
6
+ var LayoutConfigProvider = require('../configuration/LayoutConfigProvider.js');
7
+ var defaultBlueprintThemes = require('./defaultBlueprintThemes.js');
8
+
9
+ /**
10
+ * Applies whichever theme the shell's configuration currently names.
11
+ *
12
+ * This is the seam between the configurator and `SceneThemeProvider`: the configurator only ever records
13
+ * a name, and this resolves that name against the theme set a host offers. Keeping the shell's state
14
+ * free of the theme object itself is what lets a host swap in an entirely different theme set - its own
15
+ * brand palettes - without the configurator or any shell component changing.
16
+ *
17
+ * Switching is live re-resolution, not a reload: `SceneThemeProvider` writes the new tokens onto the same
18
+ * element, so nothing below it remounts and no state is lost.
19
+ */ function LayoutThemeProvider({ themes = defaultBlueprintThemes.defaultBlueprintThemes, children, className }) {
20
+ const { config } = LayoutConfigProvider.useLayoutConfig();
21
+ const theme = react.useMemo(()=>themes.find((candidate)=>candidate.name === config.themeName) ?? themes[0], [
22
+ themes,
23
+ config.themeName
24
+ ]);
25
+ return /*#__PURE__*/ jsxRuntime.jsx(scene_react.SceneThemeProvider, {
26
+ theme: theme,
27
+ className: className,
28
+ children: children
29
+ });
30
+ }
31
+
32
+ exports.LayoutThemeProvider = LayoutThemeProvider;
33
+ //# sourceMappingURL=LayoutThemeProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutThemeProvider.js","sources":["../../../themes/LayoutThemeProvider.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, useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { SceneThemeProvider } from '@cratis/scene.react';\nimport { useLayoutConfig } from '../configuration';\nimport { defaultBlueprintThemes } from './defaultBlueprintThemes';\n\nexport interface LayoutThemeProviderProps {\n /** The themes to choose between. Defaults to the two this package ships. */\n themes?: Theme[];\n\n /** The shell the chosen theme applies to. */\n children?: ReactNode;\n\n /** A class name for the element the tokens land on. */\n className?: string;\n}\n\n/**\n * Applies whichever theme the shell's configuration currently names.\n *\n * This is the seam between the configurator and `SceneThemeProvider`: the configurator only ever records\n * a name, and this resolves that name against the theme set a host offers. Keeping the shell's state\n * free of the theme object itself is what lets a host swap in an entirely different theme set - its own\n * brand palettes - without the configurator or any shell component changing.\n *\n * Switching is live re-resolution, not a reload: `SceneThemeProvider` writes the new tokens onto the same\n * element, so nothing below it remounts and no state is lost.\n */\nexport function LayoutThemeProvider({ themes = defaultBlueprintThemes, children, className }: LayoutThemeProviderProps) {\n const { config } = useLayoutConfig();\n const theme = useMemo(() => themes.find(candidate => candidate.name === config.themeName) ?? themes[0], [themes, config.themeName]);\n\n return (\n <SceneThemeProvider theme={theme} className={className}>\n {children}\n </SceneThemeProvider>\n );\n}\n"],"names":["LayoutThemeProvider","themes","defaultBlueprintThemes","children","className","config","useLayoutConfig","theme","useMemo","find","candidate","name","themeName","_jsx","SceneThemeProvider"],"mappings":";;;;;;;;AAoBA;;;;;;;;;;IAWO,SAASA,mBAAAA,CAAoB,EAAEC,MAAAA,GAASC,6CAAsB,EAAEC,QAAQ,EAAEC,SAAS,EAA4B,EAAA;IAClH,MAAM,EAAEC,MAAM,EAAE,GAAGC,oCAAAA,EAAAA;AACnB,IAAA,MAAMC,QAAQC,aAAAA,CAAQ,IAAMP,MAAAA,CAAOQ,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUC,IAAI,KAAKN,MAAAA,CAAOO,SAAS,KAAKX,MAAM,CAAC,EAAE,EAAE;AAACA,QAAAA,MAAAA;AAAQI,QAAAA,MAAAA,CAAOO;AAAU,KAAA,CAAA;AAElI,IAAA,qBACIC,cAAA,CAACC,8BAAAA,EAAAA;QAAmBP,KAAAA,EAAOA,KAAAA;QAAOH,SAAAA,EAAWA,SAAAA;AACxCD,QAAAA,QAAAA,EAAAA;;AAGb;;;;"}
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var packageName = require('../packageName.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 packages this blueprint's themes declare compatibility with.
9
+ *
10
+ * `core` is on the list on purpose. `incompatiblePackages` has no implicit exemption for it - a theme
11
+ * that omits it is reported incompatible for `core` with every profile that lists it, which is every
12
+ * profile, since `core` is the fallback vocabulary. The exemption was left out of the engine deliberately
13
+ * so that "compatible with everything active" has to be stated rather than assumed, and a theme shipped by
14
+ * a blueprint is exactly where stating it matters.
15
+ *
16
+ * The rest is the stack the shell is actually built on: this blueprint's own components, the PrimeReact
17
+ * primitives it uses, the Cratis Components library its screen templates draw from, and the styling
18
+ * package those are written against.
19
+ */ const blueprintThemeCompatibility = [
20
+ 'core',
21
+ packageName.defaultBlueprintName,
22
+ 'PrimeReact',
23
+ 'Cratis.Components',
24
+ 'Tailwind'
25
+ ];
26
+
27
+ exports.blueprintThemeCompatibility = blueprintThemeCompatibility;
28
+ //# sourceMappingURL=blueprintThemeCompatibility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprintThemeCompatibility.js","sources":["../../../themes/blueprintThemeCompatibility.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 { defaultBlueprintName } from '../packageName';\n\n/**\n * The packages this blueprint's themes declare compatibility with.\n *\n * `core` is on the list on purpose. `incompatiblePackages` has no implicit exemption for it - a theme\n * that omits it is reported incompatible for `core` with every profile that lists it, which is every\n * profile, since `core` is the fallback vocabulary. The exemption was left out of the engine deliberately\n * so that \"compatible with everything active\" has to be stated rather than assumed, and a theme shipped by\n * a blueprint is exactly where stating it matters.\n *\n * The rest is the stack the shell is actually built on: this blueprint's own components, the PrimeReact\n * primitives it uses, the Cratis Components library its screen templates draw from, and the styling\n * package those are written against.\n */\nexport const blueprintThemeCompatibility: string[] = ['core', defaultBlueprintName, 'PrimeReact', 'Cratis.Components', 'Tailwind'];\n"],"names":["blueprintThemeCompatibility","defaultBlueprintName"],"mappings":";;;;AAAA;AACA;AAIA;;;;;;;;;;;;UAaaA,2BAAAA,GAAwC;AAAC,IAAA,MAAA;AAAQC,IAAAA,gCAAAA;AAAsB,IAAA,YAAA;AAAc,IAAA,mBAAA;AAAqB,IAAA;;;;;"}
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var blueprintThemeCompatibility = require('./blueprintThemeCompatibility.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 dark theme the shell ships with.
9
+ *
10
+ * Deliberately the same ten token names as the light theme and nothing more. A dark theme that introduced
11
+ * extra tokens would work only for the parts of the shell written after it existed - the token set is the
12
+ * contract, and both themes filling it identically is what makes switching between them a swap rather than
13
+ * a re-render with holes in it.
14
+ */ const darkTheme = {
15
+ name: 'Scene Default Dark',
16
+ compatibleWith: blueprintThemeCompatibility.blueprintThemeCompatibility,
17
+ isDark: true,
18
+ author: 'Cratis',
19
+ authorUrl: 'https://cratis.io',
20
+ license: 'MIT',
21
+ description: 'The default dark palette: a deep slate ramp with a lifted indigo accent.',
22
+ tokens: {
23
+ 'primary.color': '#818cf8',
24
+ 'primary.contrastColor': '#10131f',
25
+ 'surface.background': '#0f1117',
26
+ 'surface.card': '#171a23',
27
+ 'surface.border': '#262a36',
28
+ 'surface.hover': '#1f2431',
29
+ 'surface.overlay': '#1c2030',
30
+ 'text.color': '#e6e8ef',
31
+ 'text.mutedColor': '#9aa1b1',
32
+ 'highlight.background': '#232a45',
33
+ 'highlight.color': '#c7ccff',
34
+ 'content.borderRadius': '0.5rem',
35
+ 'focus.ring': '0 0 0 2px rgb(129 140 248 / 0.45)'
36
+ }
37
+ };
38
+
39
+ exports.darkTheme = darkTheme;
40
+ //# sourceMappingURL=dark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dark.js","sources":["../../../themes/dark.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 { Theme } from '@cratis/scene.model';\nimport { blueprintThemeCompatibility } from './blueprintThemeCompatibility';\n\n/**\n * The dark theme the shell ships with.\n *\n * Deliberately the same ten token names as the light theme and nothing more. A dark theme that introduced\n * extra tokens would work only for the parts of the shell written after it existed - the token set is the\n * contract, and both themes filling it identically is what makes switching between them a swap rather than\n * a re-render with holes in it.\n */\nexport const darkTheme: Theme = {\n name: 'Scene Default Dark',\n compatibleWith: blueprintThemeCompatibility,\n isDark: true,\n author: 'Cratis',\n authorUrl: 'https://cratis.io',\n license: 'MIT',\n description: 'The default dark palette: a deep slate ramp with a lifted indigo accent.',\n tokens: {\n 'primary.color': '#818cf8',\n 'primary.contrastColor': '#10131f',\n 'surface.background': '#0f1117',\n 'surface.card': '#171a23',\n 'surface.border': '#262a36',\n 'surface.hover': '#1f2431',\n 'surface.overlay': '#1c2030',\n 'text.color': '#e6e8ef',\n 'text.mutedColor': '#9aa1b1',\n 'highlight.background': '#232a45',\n 'highlight.color': '#c7ccff',\n 'content.borderRadius': '0.5rem',\n 'focus.ring': '0 0 0 2px rgb(129 140 248 / 0.45)',\n },\n};\n"],"names":["darkTheme","name","compatibleWith","blueprintThemeCompatibility","isDark","author","authorUrl","license","description","tokens"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;UAQaA,SAAAA,GAAmB;IAC5BC,IAAAA,EAAM,oBAAA;IACNC,cAAAA,EAAgBC,uDAAAA;IAChBC,MAAAA,EAAQ,IAAA;IACRC,MAAAA,EAAQ,QAAA;IACRC,SAAAA,EAAW,mBAAA;IACXC,OAAAA,EAAS,KAAA;IACTC,WAAAA,EAAa,0EAAA;IACbC,MAAAA,EAAQ;QACJ,eAAA,EAAiB,SAAA;QACjB,uBAAA,EAAyB,SAAA;QACzB,oBAAA,EAAsB,SAAA;QACtB,cAAA,EAAgB,SAAA;QAChB,gBAAA,EAAkB,SAAA;QAClB,eAAA,EAAiB,SAAA;QACjB,iBAAA,EAAmB,SAAA;QACnB,YAAA,EAAc,SAAA;QACd,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,SAAA;QACxB,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,QAAA;QACxB,YAAA,EAAc;AAClB;AACJ;;;;"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ var dark = require('./dark.js');
4
+ var light = require('./light.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
+ * The themes this blueprint ships, in the order a picker should offer them.
10
+ *
11
+ * The list is what the manifest's `themes` names and what the bundle provides, so it is the one place the
12
+ * two can be kept in step - `validatePackageBundle` proves they are.
13
+ */ const defaultBlueprintThemes = [
14
+ light.lightTheme,
15
+ dark.darkTheme
16
+ ];
17
+
18
+ exports.defaultBlueprintThemes = defaultBlueprintThemes;
19
+ //# sourceMappingURL=defaultBlueprintThemes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaultBlueprintThemes.js","sources":["../../../themes/defaultBlueprintThemes.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 { Theme } from '@cratis/scene.model';\nimport { darkTheme } from './dark';\nimport { lightTheme } from './light';\n\n/**\n * The themes this blueprint ships, in the order a picker should offer them.\n *\n * The list is what the manifest's `themes` names and what the bundle provides, so it is the one place the\n * two can be kept in step - `validatePackageBundle` proves they are.\n */\nexport const defaultBlueprintThemes: Theme[] = [lightTheme, darkTheme];\n"],"names":["defaultBlueprintThemes","lightTheme","darkTheme"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;UAMaA,sBAAAA,GAAkC;AAACC,IAAAA,gBAAAA;AAAYC,IAAAA;;;;;"}
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ var blueprintThemeCompatibility = require('./blueprintThemeCompatibility.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 light theme the shell ships with.
9
+ *
10
+ * The palette is original to Cratis - a neutral grey ramp with an indigo accent - rather than adopted from
11
+ * any existing preset, which is why `author` says so rather than being left blank. A theme with empty
12
+ * attribution reads as "nobody has checked", and once a palette is lifted from somewhere else without its
13
+ * credit, nobody can tell afterwards which of the two it was.
14
+ *
15
+ * The token set is the shell's whole styling contract: every rule in `layout.css` resolves back to one of
16
+ * these ten names. A theme that defines them defines the entire shell.
17
+ */ const lightTheme = {
18
+ name: 'Scene Default Light',
19
+ compatibleWith: blueprintThemeCompatibility.blueprintThemeCompatibility,
20
+ isDark: false,
21
+ author: 'Cratis',
22
+ authorUrl: 'https://cratis.io',
23
+ license: 'MIT',
24
+ description: 'The default light palette: a neutral grey ramp with an indigo accent.',
25
+ tokens: {
26
+ 'primary.color': '#4f46e5',
27
+ 'primary.contrastColor': '#ffffff',
28
+ 'surface.background': '#f4f5f7',
29
+ 'surface.card': '#ffffff',
30
+ 'surface.border': '#e2e5e9',
31
+ 'surface.hover': '#eceef1',
32
+ 'surface.overlay': '#ffffff',
33
+ 'text.color': '#1f2430',
34
+ 'text.mutedColor': '#6b7280',
35
+ 'highlight.background': '#eef2ff',
36
+ 'highlight.color': '#3730a3',
37
+ 'content.borderRadius': '0.5rem',
38
+ 'focus.ring': '0 0 0 2px rgb(79 70 229 / 0.4)'
39
+ }
40
+ };
41
+
42
+ exports.lightTheme = lightTheme;
43
+ //# sourceMappingURL=light.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"light.js","sources":["../../../themes/light.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 { Theme } from '@cratis/scene.model';\nimport { blueprintThemeCompatibility } from './blueprintThemeCompatibility';\n\n/**\n * The light theme the shell ships with.\n *\n * The palette is original to Cratis - a neutral grey ramp with an indigo accent - rather than adopted from\n * any existing preset, which is why `author` says so rather than being left blank. A theme with empty\n * attribution reads as \"nobody has checked\", and once a palette is lifted from somewhere else without its\n * credit, nobody can tell afterwards which of the two it was.\n *\n * The token set is the shell's whole styling contract: every rule in `layout.css` resolves back to one of\n * these ten names. A theme that defines them defines the entire shell.\n */\nexport const lightTheme: Theme = {\n name: 'Scene Default Light',\n compatibleWith: blueprintThemeCompatibility,\n isDark: false,\n author: 'Cratis',\n authorUrl: 'https://cratis.io',\n license: 'MIT',\n description: 'The default light palette: a neutral grey ramp with an indigo accent.',\n tokens: {\n 'primary.color': '#4f46e5',\n 'primary.contrastColor': '#ffffff',\n 'surface.background': '#f4f5f7',\n 'surface.card': '#ffffff',\n 'surface.border': '#e2e5e9',\n 'surface.hover': '#eceef1',\n 'surface.overlay': '#ffffff',\n 'text.color': '#1f2430',\n 'text.mutedColor': '#6b7280',\n 'highlight.background': '#eef2ff',\n 'highlight.color': '#3730a3',\n 'content.borderRadius': '0.5rem',\n 'focus.ring': '0 0 0 2px rgb(79 70 229 / 0.4)',\n },\n};\n"],"names":["lightTheme","name","compatibleWith","blueprintThemeCompatibility","isDark","author","authorUrl","license","description","tokens"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;UAWaA,UAAAA,GAAoB;IAC7BC,IAAAA,EAAM,qBAAA;IACNC,cAAAA,EAAgBC,uDAAAA;IAChBC,MAAAA,EAAQ,KAAA;IACRC,MAAAA,EAAQ,QAAA;IACRC,SAAAA,EAAW,mBAAA;IACXC,OAAAA,EAAS,KAAA;IACTC,WAAAA,EAAa,uEAAA;IACbC,MAAAA,EAAQ;QACJ,eAAA,EAAiB,SAAA;QACjB,uBAAA,EAAyB,SAAA;QACzB,oBAAA,EAAsB,SAAA;QACtB,cAAA,EAAgB,SAAA;QAChB,gBAAA,EAAkB,SAAA;QAClB,eAAA,EAAiB,SAAA;QACjB,iBAAA,EAAmB,SAAA;QACnB,YAAA,EAAc,SAAA;QACd,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,SAAA;QACxB,iBAAA,EAAmB,SAAA;QACnB,sBAAA,EAAwB,QAAA;QACxB,YAAA,EAAc;AAClB;AACJ;;;;"}
@@ -0,0 +1,19 @@
1
+ export declare enum ComponentName {
2
+ AppShell = "appShell",
3
+ FullPageShell = "fullPageShell",
4
+ Topbar = "topbar",
5
+ Sidebar = "sidebar",
6
+ Menu = "menu",
7
+ MenuItem = "menuItem",
8
+ Breadcrumb = "breadcrumb",
9
+ Footer = "footer",
10
+ RightPanel = "rightPanel",
11
+ ConfigPanel = "configPanel",
12
+ PageHeader = "pageHeader",
13
+ Mask = "mask",
14
+ Logo = "logo",
15
+ UserMenu = "userMenu",
16
+ ThemeSwitcher = "themeSwitcher",
17
+ LayoutModeSwitcher = "layoutModeSwitcher"
18
+ }
19
+ //# sourceMappingURL=ComponentName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentName.d.ts","sourceRoot":"","sources":["../../ComponentName.ts"],"names":[],"mappings":"AAWA,oBAAY,aAAa;IAErB,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,MAAM,WAAW;IAGjB,OAAO,YAAY;IAGnB,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,UAAU,eAAe;IAGzB,MAAM,WAAW;IAGjB,UAAU,eAAe;IAGzB,WAAW,gBAAgB;IAG3B,UAAU,eAAe;IAGzB,IAAI,SAAS;IAGb,IAAI,SAAS;IAGb,QAAQ,aAAa;IAGrB,aAAa,kBAAkB;IAG/B,kBAAkB,uBAAuB;CAC5C"}
@@ -0,0 +1,31 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * The bare names this package declares components under.
5
+ *
6
+ * A page template writes a bare name and `resolveComponentName` decides which active package wins it, so
7
+ * these names are public API: renaming one breaks every template that referenced it, in this package and
8
+ * in anyone else's. Keeping them in one enum means the manifest, the registry and every template
9
+ * reference the same symbol, and the specs can prove all three agree rather than hoping they do.
10
+ */ var ComponentName = /*#__PURE__*/ function(ComponentName) {
11
+ /** The application shell - topbar, sidebar, breadcrumb, content, footer and an optional right panel. */ ComponentName["AppShell"] = "appShell";
12
+ /** The chrome-less shell - content, an optional branding aside, and the configurator. */ ComponentName["FullPageShell"] = "fullPageShell";
13
+ /** The fixed strip across the top of the application shell. */ ComponentName["Topbar"] = "topbar";
14
+ /** The sidebar's own chrome, inside the shell-positioned panel. */ ComponentName["Sidebar"] = "sidebar";
15
+ /** A navigation list. */ ComponentName["Menu"] = "menu";
16
+ /** One entry in a navigation list, optionally with a submenu. */ ComponentName["MenuItem"] = "menuItem";
17
+ /** The trail above the content. */ ComponentName["Breadcrumb"] = "breadcrumb";
18
+ /** The strip below the content. */ ComponentName["Footer"] = "footer";
19
+ /** The inspector panel down the right-hand edge. */ ComponentName["RightPanel"] = "rightPanel";
20
+ /** The floating configurator: color scheme, layout mode, menu theme and theme. */ ComponentName["ConfigPanel"] = "configPanel";
21
+ /** A screen's title, subtitle and actions. */ ComponentName["PageHeader"] = "pageHeader";
22
+ /** The scrim behind a floating sidebar, which also closes it. */ ComponentName["Mask"] = "mask";
23
+ /** The brand mark. */ ComponentName["Logo"] = "logo";
24
+ /** The signed-in user's avatar and menu. */ ComponentName["UserMenu"] = "userMenu";
25
+ /** Switches between the themes a host offers. */ ComponentName["ThemeSwitcher"] = "themeSwitcher";
26
+ /** Switches between the layout modes. */ ComponentName["LayoutModeSwitcher"] = "layoutModeSwitcher";
27
+ return ComponentName;
28
+ }({});
29
+
30
+ export { ComponentName };
31
+ //# sourceMappingURL=ComponentName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentName.js","sources":["../../ComponentName.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\n/**\n * The bare names this package declares components under.\n *\n * A page template writes a bare name and `resolveComponentName` decides which active package wins it, so\n * these names are public API: renaming one breaks every template that referenced it, in this package and\n * in anyone else's. Keeping them in one enum means the manifest, the registry and every template\n * reference the same symbol, and the specs can prove all three agree rather than hoping they do.\n */\nexport enum ComponentName {\n /** The application shell - topbar, sidebar, breadcrumb, content, footer and an optional right panel. */\n AppShell = 'appShell',\n\n /** The chrome-less shell - content, an optional branding aside, and the configurator. */\n FullPageShell = 'fullPageShell',\n\n /** The fixed strip across the top of the application shell. */\n Topbar = 'topbar',\n\n /** The sidebar's own chrome, inside the shell-positioned panel. */\n Sidebar = 'sidebar',\n\n /** A navigation list. */\n Menu = 'menu',\n\n /** One entry in a navigation list, optionally with a submenu. */\n MenuItem = 'menuItem',\n\n /** The trail above the content. */\n Breadcrumb = 'breadcrumb',\n\n /** The strip below the content. */\n Footer = 'footer',\n\n /** The inspector panel down the right-hand edge. */\n RightPanel = 'rightPanel',\n\n /** The floating configurator: color scheme, layout mode, menu theme and theme. */\n ConfigPanel = 'configPanel',\n\n /** A screen's title, subtitle and actions. */\n PageHeader = 'pageHeader',\n\n /** The scrim behind a floating sidebar, which also closes it. */\n Mask = 'mask',\n\n /** The brand mark. */\n Logo = 'logo',\n\n /** The signed-in user's avatar and menu. */\n UserMenu = 'userMenu',\n\n /** Switches between the themes a host offers. */\n ThemeSwitcher = 'themeSwitcher',\n\n /** Switches between the layout modes. */\n LayoutModeSwitcher = 'layoutModeSwitcher',\n}\n"],"names":["ComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;6GAC8F,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;8FAGf,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;oEAG1B,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;wEAGI,aAAA,CAAA,SAAA,CAAA,GAAA,SAAA;8BAG1C,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;sEAGwC,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;wCAG9B,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;wCAGA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;yDAGiB,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;uFAG8B,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;mDAGpC,aAAA,CAAA,YAAA,CAAA,GAAA,YAAA;sEAGmB,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;2BAG3C,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;iDAGsB,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;sDAGK,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;8CAGR,aAAA,CAAA,oBAAA,CAAA,GAAA,oBAAA;AA9C/BA,IAAAA,OAAAA,aAAAA;AAgDX,CAAA,CAAA,EAAA;;;;"}
@@ -0,0 +1,6 @@
1
+ export declare enum ColorScheme {
2
+ Light = "light",
3
+ Dark = "dark"
4
+ }
5
+ export declare const colorSchemes: ColorScheme[];
6
+ //# sourceMappingURL=ColorScheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorScheme.d.ts","sourceRoot":"","sources":["../../../configuration/ColorScheme.ts"],"names":[],"mappings":"AAUA,oBAAY,WAAW;IACnB,KAAK,UAAU;IACf,IAAI,SAAS;CAChB;AAGD,eAAO,MAAM,YAAY,EAAE,WAAW,EAA0C,CAAC"}
@@ -0,0 +1,20 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * The light/dark axis of the configurator.
5
+ *
6
+ * The shell never paints a color for a scheme itself - it only records which one is chosen, so the host
7
+ * can hand {@link SceneThemeProvider} a matching {@link Theme}. Keeping the choice and the palette apart
8
+ * is what lets a third-party theme participate in the same switch as the two this package ships.
9
+ */ var ColorScheme = /*#__PURE__*/ function(ColorScheme) {
10
+ ColorScheme["Light"] = "light";
11
+ ColorScheme["Dark"] = "dark";
12
+ return ColorScheme;
13
+ }({});
14
+ /** Every {@link ColorScheme}, in the order a configurator should offer them. */ const colorSchemes = [
15
+ "light",
16
+ "dark"
17
+ ];
18
+
19
+ export { ColorScheme, colorSchemes };
20
+ //# sourceMappingURL=ColorScheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorScheme.js","sources":["../../../configuration/ColorScheme.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\n/**\n * The light/dark axis of the configurator.\n *\n * The shell never paints a color for a scheme itself - it only records which one is chosen, so the host\n * can hand {@link SceneThemeProvider} a matching {@link Theme}. Keeping the choice and the palette apart\n * is what lets a third-party theme participate in the same switch as the two this package ships.\n */\nexport enum ColorScheme {\n Light = 'light',\n Dark = 'dark',\n}\n\n/** Every {@link ColorScheme}, in the order a configurator should offer them. */\nexport const colorSchemes: ColorScheme[] = [ColorScheme.Light, ColorScheme.Dark];\n"],"names":["ColorScheme","colorSchemes"],"mappings":"AAAA;AACA;AAEA;;;;;;IAOO,IAAKA,WAAAA,iBAAAA,SAAAA,WAAAA,EAAAA;;;AAAAA,IAAAA,OAAAA,WAAAA;AAGX,CAAA,CAAA,EAAA;AAED,iFACO,MAAMC,YAAAA,GAA8B;;;;;;;"}
@@ -0,0 +1,29 @@
1
+ import { ReactNode } from 'react';
2
+ import { ColorScheme } from './ColorScheme';
3
+ import { LayoutConfigState } from './LayoutConfigState';
4
+ import { LayoutMode } from './LayoutMode';
5
+ import { MenuTheme } from './MenuTheme';
6
+ export interface LayoutConfigContextValue {
7
+ config: LayoutConfigState;
8
+ effectiveMode: LayoutMode;
9
+ wrapperClasses: string[];
10
+ isMaskVisible: boolean;
11
+ setMode(mode: LayoutMode): void;
12
+ setMenuTheme(menuTheme: MenuTheme): void;
13
+ setColorScheme(colorScheme: ColorScheme): void;
14
+ setThemeName(themeName: string): void;
15
+ setSidebarOpen(isOpen: boolean): void;
16
+ toggleSidebar(): void;
17
+ setSidebarRevealed(isRevealed: boolean): void;
18
+ toggleSidebarAnchor(): void;
19
+ }
20
+ export interface LayoutConfigProviderProps {
21
+ initialConfig?: Partial<LayoutConfigState>;
22
+ storage?: Storage | null;
23
+ viewportWidth?: number;
24
+ children?: ReactNode;
25
+ }
26
+ export declare function LayoutConfigProvider({ initialConfig, storage, viewportWidth, children }: LayoutConfigProviderProps): import("react").JSX.Element;
27
+ export declare function useOptionalLayoutConfig(): LayoutConfigContextValue | undefined;
28
+ export declare function useLayoutConfig(): LayoutConfigContextValue;
29
+ //# sourceMappingURL=LayoutConfigProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutConfigProvider.d.ts","sourceRoot":"","sources":["../../../configuration/LayoutConfigProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAA2D,MAAM,OAAO,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AA0BxC,MAAM,WAAW,wBAAwB;IAErC,MAAM,EAAE,iBAAiB,CAAC;IAG1B,aAAa,EAAE,UAAU,CAAC;IAG1B,cAAc,EAAE,MAAM,EAAE,CAAC;IAGzB,aAAa,EAAE,OAAO,CAAC;IAGvB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAGhC,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAGzC,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAG/C,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAGtC,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI,CAAC;IAGtC,aAAa,IAAI,IAAI,CAAC;IAGtB,kBAAkB,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAG9C,mBAAmB,IAAI,IAAI,CAAC;CAC/B;AAID,MAAM,WAAW,yBAAyB;IAEtC,aAAa,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAM3C,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAQzB,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAUD,wBAAgB,oBAAoB,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,EAAE,yBAAyB,+BAiDlH;AASD,wBAAgB,uBAAuB,IAAI,wBAAwB,GAAG,SAAS,CAE9E;AAOD,wBAAgB,eAAe,IAAI,wBAAwB,CAO1D"}
@@ -0,0 +1,92 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useContext, useMemo, useState, useEffect, createContext } from 'react';
3
+ import { readPersistedLayoutConfig, persistLayoutConfig } from './layoutConfigStorage.js';
4
+ import { isLayoutMaskVisible, layoutWrapperClasses } from './layoutWrapperClasses.js';
5
+ import { withMobile, mobileMediaQuery, toggleSidebarAnchor, withSidebarRevealed, toggleSidebar, withSidebarOpen, withThemeName, withColorScheme, withMenuTheme, withMode, effectiveLayoutMode, isMobileWidth } from './layoutConfigTransitions.js';
6
+
7
+ const LayoutConfigContext = /*#__PURE__*/ createContext(undefined);
8
+ /**
9
+ * Owns the shell's configuration and keeps it in step with the viewport and with `localStorage`.
10
+ *
11
+ * One provider rather than state per shell component is what makes the modes work at all: the topbar's
12
+ * toggle, the sidebar's pin, the mask's click-to-close and the configurator's mode picker are four
13
+ * different components acting on one machine. It is also what makes a chosen mode survive a reload, which
14
+ * is the whole reason a mode picker is worth having.
15
+ */ function LayoutConfigProvider({ initialConfig, storage, viewportWidth, children }) {
16
+ const resolvedStorage = useMemo(()=>storage !== undefined ? storage ?? undefined : defaultStorage(), [
17
+ storage
18
+ ]);
19
+ const [config, setConfig] = useState(()=>({
20
+ ...readPersistedLayoutConfig(resolvedStorage),
21
+ ...initialConfig
22
+ }));
23
+ useEffect(()=>{
24
+ persistLayoutConfig(config, resolvedStorage);
25
+ }, [
26
+ config,
27
+ resolvedStorage
28
+ ]);
29
+ const isReportedMobile = viewportWidth === undefined ? undefined : isMobileWidth(viewportWidth);
30
+ useEffect(()=>{
31
+ if (isReportedMobile !== undefined) {
32
+ setConfig((current)=>withMobile(current, isReportedMobile));
33
+ return;
34
+ }
35
+ if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
36
+ return;
37
+ }
38
+ const query = window.matchMedia(mobileMediaQuery);
39
+ setConfig((current)=>withMobile(current, query.matches));
40
+ const listener = (event)=>setConfig((current)=>withMobile(current, event.matches));
41
+ query.addEventListener('change', listener);
42
+ return ()=>query.removeEventListener('change', listener);
43
+ }, [
44
+ isReportedMobile
45
+ ]);
46
+ const value = useMemo(()=>({
47
+ config,
48
+ effectiveMode: effectiveLayoutMode(config),
49
+ wrapperClasses: layoutWrapperClasses(config),
50
+ isMaskVisible: isLayoutMaskVisible(config),
51
+ setMode: (mode)=>setConfig((current)=>withMode(current, mode)),
52
+ setMenuTheme: (menuTheme)=>setConfig((current)=>withMenuTheme(current, menuTheme)),
53
+ setColorScheme: (colorScheme)=>setConfig((current)=>withColorScheme(current, colorScheme)),
54
+ setThemeName: (themeName)=>setConfig((current)=>withThemeName(current, themeName)),
55
+ setSidebarOpen: (isOpen)=>setConfig((current)=>withSidebarOpen(current, isOpen)),
56
+ toggleSidebar: ()=>setConfig(toggleSidebar),
57
+ setSidebarRevealed: (isRevealed)=>setConfig((current)=>withSidebarRevealed(current, isRevealed)),
58
+ toggleSidebarAnchor: ()=>setConfig(toggleSidebarAnchor)
59
+ }), [
60
+ config
61
+ ]);
62
+ return /*#__PURE__*/ jsx(LayoutConfigContext.Provider, {
63
+ value: value,
64
+ children: children
65
+ });
66
+ }
67
+ /**
68
+ * The shell configuration, or `undefined` when there is no {@link LayoutConfigProvider} above.
69
+ *
70
+ * This is what lets the shell components put a provider around themselves when a host has not - a gallery
71
+ * preview drops a single `appShell` element into a renderer with no wrapper of its own, and it still has
72
+ * to work.
73
+ */ function useOptionalLayoutConfig() {
74
+ return useContext(LayoutConfigContext);
75
+ }
76
+ /**
77
+ * The shell configuration. Throws when there is no {@link LayoutConfigProvider} above, because every
78
+ * alternative - a silent default, a no-op setter - produces a shell whose buttons do nothing and says
79
+ * nothing about why.
80
+ */ function useLayoutConfig() {
81
+ const value = useOptionalLayoutConfig();
82
+ if (!value) {
83
+ throw new Error('useLayoutConfig() requires a <LayoutConfigProvider> above it.');
84
+ }
85
+ return value;
86
+ }
87
+ function defaultStorage() {
88
+ return typeof window !== 'undefined' ? window.localStorage : undefined;
89
+ }
90
+
91
+ export { LayoutConfigProvider, useLayoutConfig, useOptionalLayoutConfig };
92
+ //# sourceMappingURL=LayoutConfigProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutConfigProvider.js","sources":["../../../configuration/LayoutConfigProvider.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, createContext, useContext, useEffect, useMemo, useState } from 'react';\nimport { ColorScheme } from './ColorScheme';\nimport { LayoutConfigState } from './LayoutConfigState';\nimport { LayoutMode } from './LayoutMode';\nimport { MenuTheme } from './MenuTheme';\nimport { persistLayoutConfig, readPersistedLayoutConfig } from './layoutConfigStorage';\nimport { isLayoutMaskVisible, layoutWrapperClasses } from './layoutWrapperClasses';\nimport {\n effectiveLayoutMode,\n isMobileWidth,\n mobileMediaQuery,\n toggleSidebar,\n toggleSidebarAnchor,\n withColorScheme,\n withMenuTheme,\n withMobile,\n withMode,\n withSidebarOpen,\n withSidebarRevealed,\n withThemeName,\n} from './layoutConfigTransitions';\n\n/**\n * What {@link useLayoutConfig} hands a shell component: the current state, the values every part of the\n * shell derives from it, and one function per transition.\n *\n * The derived values live here rather than being recomputed per component so that the topbar, the\n * sidebar and the mask cannot end up disagreeing about which mode is in force - the exact class of bug a\n * shell with per-component state produces.\n */\nexport interface LayoutConfigContextValue {\n /** The current state. */\n config: LayoutConfigState;\n\n /** The mode actually in force, with the mobile override applied. */\n effectiveMode: LayoutMode;\n\n /** The classes for the shell's wrapper element. */\n wrapperClasses: string[];\n\n /** Whether the scrim behind a floating sidebar should be showing. */\n isMaskVisible: boolean;\n\n /** Chooses a different mode. Below the mobile breakpoint the choice is still recorded, but the shell keeps rendering off-canvas. */\n setMode(mode: LayoutMode): void;\n\n /** Chooses how the sidebar surface is tinted. */\n setMenuTheme(menuTheme: MenuTheme): void;\n\n /** Chooses the light/dark axis. */\n setColorScheme(colorScheme: ColorScheme): void;\n\n /** Records which theme is applied. */\n setThemeName(themeName: string): void;\n\n /** Opens or closes the sidebar. */\n setSidebarOpen(isOpen: boolean): void;\n\n /** Flips the sidebar between open and closed. */\n toggleSidebar(): void;\n\n /** Holds a `reveal`/`drawer` sidebar out, or lets it fall back. */\n setSidebarRevealed(isRevealed: boolean): void;\n\n /** Pins or unpins a `reveal`/`drawer` sidebar. */\n toggleSidebarAnchor(): void;\n}\n\nconst LayoutConfigContext = createContext<LayoutConfigContextValue | undefined>(undefined);\n\nexport interface LayoutConfigProviderProps {\n /** Values to start from, overriding both the defaults and anything persisted - a story or a spec pinning a mode. */\n initialConfig?: Partial<LayoutConfigState>;\n\n /**\n * Where preferences are read from and written to. Defaults to `window.localStorage` when there is a\n * window; pass a fake in a spec, or `null` to opt out of persistence entirely.\n */\n storage?: Storage | null;\n\n /**\n * The width the shell should consider its viewport, for a host that renders it into a sized element\n * rather than the window - Studio's preview surface, where the device frame is a few hundred pixels\n * wide while the real window is a desktop one. When given, this replaces the `matchMedia` listener\n * entirely rather than competing with it.\n */\n viewportWidth?: number;\n\n /** The shell this configuration applies to. */\n children?: ReactNode;\n}\n\n/**\n * Owns the shell's configuration and keeps it in step with the viewport and with `localStorage`.\n *\n * One provider rather than state per shell component is what makes the modes work at all: the topbar's\n * toggle, the sidebar's pin, the mask's click-to-close and the configurator's mode picker are four\n * different components acting on one machine. It is also what makes a chosen mode survive a reload, which\n * is the whole reason a mode picker is worth having.\n */\nexport function LayoutConfigProvider({ initialConfig, storage, viewportWidth, children }: LayoutConfigProviderProps) {\n const resolvedStorage = useMemo(() => (storage !== undefined ? storage ?? undefined : defaultStorage()), [storage]);\n const [config, setConfig] = useState<LayoutConfigState>(() => ({\n ...readPersistedLayoutConfig(resolvedStorage),\n ...initialConfig,\n }));\n\n useEffect(() => {\n persistLayoutConfig(config, resolvedStorage);\n }, [config, resolvedStorage]);\n\n const isReportedMobile = viewportWidth === undefined ? undefined : isMobileWidth(viewportWidth);\n useEffect(() => {\n if (isReportedMobile !== undefined) {\n setConfig(current => withMobile(current, isReportedMobile));\n return;\n }\n\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {\n return;\n }\n\n const query = window.matchMedia(mobileMediaQuery);\n setConfig(current => withMobile(current, query.matches));\n\n const listener = (event: MediaQueryListEvent) => setConfig(current => withMobile(current, event.matches));\n query.addEventListener('change', listener);\n return () => query.removeEventListener('change', listener);\n }, [isReportedMobile]);\n\n const value = useMemo<LayoutConfigContextValue>(\n () => ({\n config,\n effectiveMode: effectiveLayoutMode(config),\n wrapperClasses: layoutWrapperClasses(config),\n isMaskVisible: isLayoutMaskVisible(config),\n setMode: mode => setConfig(current => withMode(current, mode)),\n setMenuTheme: menuTheme => setConfig(current => withMenuTheme(current, menuTheme)),\n setColorScheme: colorScheme => setConfig(current => withColorScheme(current, colorScheme)),\n setThemeName: themeName => setConfig(current => withThemeName(current, themeName)),\n setSidebarOpen: isOpen => setConfig(current => withSidebarOpen(current, isOpen)),\n toggleSidebar: () => setConfig(toggleSidebar),\n setSidebarRevealed: isRevealed => setConfig(current => withSidebarRevealed(current, isRevealed)),\n toggleSidebarAnchor: () => setConfig(toggleSidebarAnchor),\n }),\n [config],\n );\n\n return <LayoutConfigContext.Provider value={value}>{children}</LayoutConfigContext.Provider>;\n}\n\n/**\n * The shell configuration, or `undefined` when there is no {@link LayoutConfigProvider} above.\n *\n * This is what lets the shell components put a provider around themselves when a host has not - a gallery\n * preview drops a single `appShell` element into a renderer with no wrapper of its own, and it still has\n * to work.\n */\nexport function useOptionalLayoutConfig(): LayoutConfigContextValue | undefined {\n return useContext(LayoutConfigContext);\n}\n\n/**\n * The shell configuration. Throws when there is no {@link LayoutConfigProvider} above, because every\n * alternative - a silent default, a no-op setter - produces a shell whose buttons do nothing and says\n * nothing about why.\n */\nexport function useLayoutConfig(): LayoutConfigContextValue {\n const value = useOptionalLayoutConfig();\n if (!value) {\n throw new Error('useLayoutConfig() requires a <LayoutConfigProvider> above it.');\n }\n\n return value;\n}\n\nfunction defaultStorage(): Storage | undefined {\n return typeof window !== 'undefined' ? window.localStorage : undefined;\n}\n"],"names":["LayoutConfigContext","createContext","undefined","LayoutConfigProvider","initialConfig","storage","viewportWidth","children","resolvedStorage","useMemo","defaultStorage","config","setConfig","useState","readPersistedLayoutConfig","useEffect","persistLayoutConfig","isReportedMobile","isMobileWidth","current","withMobile","window","matchMedia","query","mobileMediaQuery","matches","listener","event","addEventListener","removeEventListener","value","effectiveMode","effectiveLayoutMode","wrapperClasses","layoutWrapperClasses","isMaskVisible","isLayoutMaskVisible","setMode","mode","withMode","setMenuTheme","menuTheme","withMenuTheme","setColorScheme","colorScheme","withColorScheme","setThemeName","themeName","withThemeName","setSidebarOpen","isOpen","withSidebarOpen","toggleSidebar","setSidebarRevealed","isRevealed","withSidebarRevealed","toggleSidebarAnchor","_jsx","Provider","useOptionalLayoutConfig","useContext","useLayoutConfig","Error","localStorage"],"mappings":";;;;;;AAuEA,MAAMA,oCAAsBC,aAAAA,CAAoDC,SAAAA,CAAAA;AAwBhF;;;;;;;IAQO,SAASC,oBAAAA,CAAqB,EAAEC,aAAa,EAAEC,OAAO,EAAEC,aAAa,EAAEC,QAAQ,EAA6B,EAAA;AAC/G,IAAA,MAAMC,kBAAkBC,OAAAA,CAAQ,IAAOJ,YAAYH,SAAAA,GAAYG,OAAAA,IAAWH,YAAYQ,cAAAA,EAAAA,EAAmB;AAACL,QAAAA;AAAQ,KAAA,CAAA;AAClH,IAAA,MAAM,CAACM,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,QAAAA,CAA4B,KAAO;AAC3D,YAAA,GAAGC,0BAA0BN,eAAAA,CAAgB;AAC7C,YAAA,GAAGJ;SACP,CAAA,CAAA;IAEAW,SAAAA,CAAU,IAAA;AACNC,QAAAA,mBAAAA,CAAoBL,MAAAA,EAAQH,eAAAA,CAAAA;IAChC,CAAA,EAAG;AAACG,QAAAA,MAAAA;AAAQH,QAAAA;AAAgB,KAAA,CAAA;AAE5B,IAAA,MAAMS,gBAAAA,GAAmBX,aAAAA,KAAkBJ,SAAAA,GAAYA,SAAAA,GAAYgB,aAAAA,CAAcZ,aAAAA,CAAAA;IACjFS,SAAAA,CAAU,IAAA;AACN,QAAA,IAAIE,qBAAqBf,SAAAA,EAAW;YAChCU,SAAAA,CAAUO,CAAAA,OAAAA,GAAWC,UAAAA,CAAWD,OAAAA,EAASF,gBAAAA,CAAAA,CAAAA;AACzC,YAAA;AACJ,QAAA;AAEA,QAAA,IAAI,OAAOI,MAAAA,KAAW,WAAA,IAAe,OAAOA,MAAAA,CAAOC,UAAU,KAAK,UAAA,EAAY;AAC1E,YAAA;AACJ,QAAA;QAEA,MAAMC,KAAAA,GAAQF,MAAAA,CAAOC,UAAU,CAACE,gBAAAA,CAAAA;AAChCZ,QAAAA,SAAAA,CAAUO,CAAAA,OAAAA,GAAWC,UAAAA,CAAWD,OAAAA,EAASI,MAAME,OAAO,CAAA,CAAA;QAEtD,MAAMC,QAAAA,GAAW,CAACC,KAAAA,GAA+Bf,SAAAA,CAAUO,CAAAA,OAAAA,GAAWC,UAAAA,CAAWD,OAAAA,EAASQ,KAAAA,CAAMF,OAAO,CAAA,CAAA;QACvGF,KAAAA,CAAMK,gBAAgB,CAAC,QAAA,EAAUF,QAAAA,CAAAA;AACjC,QAAA,OAAO,IAAMH,KAAAA,CAAMM,mBAAmB,CAAC,QAAA,EAAUH,QAAAA,CAAAA;IACrD,CAAA,EAAG;AAACT,QAAAA;AAAiB,KAAA,CAAA;IAErB,MAAMa,KAAAA,GAAQrB,OAAAA,CACV,KAAO;AACHE,YAAAA,MAAAA;AACAoB,YAAAA,aAAAA,EAAeC,mBAAAA,CAAoBrB,MAAAA,CAAAA;AACnCsB,YAAAA,cAAAA,EAAgBC,oBAAAA,CAAqBvB,MAAAA,CAAAA;AACrCwB,YAAAA,aAAAA,EAAeC,mBAAAA,CAAoBzB,MAAAA,CAAAA;AACnC0B,YAAAA,OAAAA,EAASC,CAAAA,IAAAA,GAAQ1B,SAAAA,CAAUO,CAAAA,OAAAA,GAAWoB,SAASpB,OAAAA,EAASmB,IAAAA,CAAAA,CAAAA;AACxDE,YAAAA,YAAAA,EAAcC,CAAAA,SAAAA,GAAa7B,SAAAA,CAAUO,CAAAA,OAAAA,GAAWuB,cAAcvB,OAAAA,EAASsB,SAAAA,CAAAA,CAAAA;AACvEE,YAAAA,cAAAA,EAAgBC,CAAAA,WAAAA,GAAehC,SAAAA,CAAUO,CAAAA,OAAAA,GAAW0B,gBAAgB1B,OAAAA,EAASyB,WAAAA,CAAAA,CAAAA;AAC7EE,YAAAA,YAAAA,EAAcC,CAAAA,SAAAA,GAAanC,SAAAA,CAAUO,CAAAA,OAAAA,GAAW6B,cAAc7B,OAAAA,EAAS4B,SAAAA,CAAAA,CAAAA;AACvEE,YAAAA,cAAAA,EAAgBC,CAAAA,MAAAA,GAAUtC,SAAAA,CAAUO,CAAAA,OAAAA,GAAWgC,gBAAgBhC,OAAAA,EAAS+B,MAAAA,CAAAA,CAAAA;AACxEE,YAAAA,aAAAA,EAAe,IAAMxC,SAAAA,CAAUwC,aAAAA,CAAAA;AAC/BC,YAAAA,kBAAAA,EAAoBC,CAAAA,UAAAA,GAAc1C,SAAAA,CAAUO,CAAAA,OAAAA,GAAWoC,oBAAoBpC,OAAAA,EAASmC,UAAAA,CAAAA,CAAAA;AACpFE,YAAAA,mBAAAA,EAAqB,IAAM5C,SAAAA,CAAU4C,mBAAAA;AACzC,SAAA,CAAA,EACA;AAAC7C,QAAAA;AAAO,KAAA,CAAA;IAGZ,qBAAO8C,GAAA,CAACzD,oBAAoB0D,QAAQ,EAAA;QAAC5B,KAAAA,EAAOA,KAAAA;AAAQvB,QAAAA,QAAAA,EAAAA;;AACxD;AAEA;;;;;;AAMC,IACM,SAASoD,uBAAAA,GAAAA;AACZ,IAAA,OAAOC,UAAAA,CAAW5D,mBAAAA,CAAAA;AACtB;AAEA;;;;AAIC,IACM,SAAS6D,eAAAA,GAAAA;AACZ,IAAA,MAAM/B,KAAAA,GAAQ6B,uBAAAA,EAAAA;AACd,IAAA,IAAI,CAAC7B,KAAAA,EAAO;AACR,QAAA,MAAM,IAAIgC,KAAAA,CAAM,+DAAA,CAAA;AACpB,IAAA;IAEA,OAAOhC,KAAAA;AACX;AAEA,SAASpB,cAAAA,GAAAA;AACL,IAAA,OAAO,OAAOW,MAAAA,KAAW,WAAA,GAAcA,MAAAA,CAAO0C,YAAY,GAAG7D,SAAAA;AACjE;;;;"}
@@ -0,0 +1,14 @@
1
+ import { ColorScheme } from './ColorScheme';
2
+ import { LayoutMode } from './LayoutMode';
3
+ import { MenuTheme } from './MenuTheme';
4
+ export interface LayoutConfigState {
5
+ mode: LayoutMode;
6
+ menuTheme: MenuTheme;
7
+ colorScheme: ColorScheme;
8
+ themeName: string;
9
+ isSidebarOpen: boolean;
10
+ isSidebarAnchored: boolean;
11
+ isSidebarRevealed: boolean;
12
+ isMobile: boolean;
13
+ }
14
+ //# sourceMappingURL=LayoutConfigState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutConfigState.d.ts","sourceRoot":"","sources":["../../../configuration/LayoutConfigState.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAYxC,MAAM,WAAW,iBAAiB;IAE9B,IAAI,EAAE,UAAU,CAAC;IAGjB,SAAS,EAAE,SAAS,CAAC;IAGrB,WAAW,EAAE,WAAW,CAAC;IAGzB,SAAS,EAAE,MAAM,CAAC;IAOlB,aAAa,EAAE,OAAO,CAAC;IAGvB,iBAAiB,EAAE,OAAO,CAAC;IAG3B,iBAAiB,EAAE,OAAO,CAAC;IAG3B,QAAQ,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=LayoutConfigState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutConfigState.js","sourceRoot":"","sources":["../../../configuration/LayoutConfigState.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ export declare enum LayoutMode {
2
+ Static = "static",
3
+ Overlay = "overlay",
4
+ Slim = "slim",
5
+ SlimPlus = "slim-plus",
6
+ Compact = "compact",
7
+ Horizontal = "horizontal",
8
+ Reveal = "reveal",
9
+ Drawer = "drawer"
10
+ }
11
+ export declare const layoutModes: LayoutMode[];
12
+ //# sourceMappingURL=LayoutMode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutMode.d.ts","sourceRoot":"","sources":["../../../configuration/LayoutMode.ts"],"names":[],"mappings":"AAaA,oBAAY,UAAU;IAElB,MAAM,WAAW;IAGjB,OAAO,YAAY;IAGnB,IAAI,SAAS;IAGb,QAAQ,cAAc;IAGtB,OAAO,YAAY;IAGnB,UAAU,eAAe;IAGzB,MAAM,WAAW;IAGjB,MAAM,WAAW;CACpB;AAGD,eAAO,MAAM,WAAW,EAAE,UAAU,EASnC,CAAC"}
@@ -0,0 +1,35 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * How the application shell arranges its sidebar against its content.
5
+ *
6
+ * The vocabulary - and the `layout-<mode>` wrapper class each value maps to - is deliberately the one
7
+ * PrimeTek's template line has used unchanged across Sakai, Diamond, Atlantis, Freya, Apollo, Ultima,
8
+ * Avalon and Verona. Anyone who has themed a PrimeReact application recognizes it, and a shell that
9
+ * invents its own names forces them to learn a second one for no gain.
10
+ *
11
+ * Every value here is user-selectable. Mobile deliberately is not - see {@link effectiveLayoutMode}.
12
+ */ var LayoutMode = /*#__PURE__*/ function(LayoutMode) {
13
+ /** Sidebar permanently docked; content is pushed by a matching margin, never covered. */ LayoutMode["Static"] = "static";
14
+ /** Sidebar parked off-canvas; opening floats it over the content behind a mask. */ LayoutMode["Overlay"] = "overlay";
15
+ /** Icon-only rail with circular buttons; submenus pop out as a floating panel. */ LayoutMode["Slim"] = "slim";
16
+ /** Wider rail with each icon's label stacked directly beneath it. */ LayoutMode["SlimPlus"] = "slim-plus";
17
+ /** The icon-only rail again, with square buttons, and the topbar shifted by the rail width. */ LayoutMode["Compact"] = "compact";
18
+ /** Sidebar flows into the topbar strip as a horizontal row; submenus drop down. */ LayoutMode["Horizontal"] = "horizontal";
19
+ /** Full panel translated off-left leaving a strip of icons; hovering slides it in over the content. */ LayoutMode["Reveal"] = "reveal";
20
+ /** Collapsed rail that animates its width to full on hover - it grows where reveal slides. */ LayoutMode["Drawer"] = "drawer";
21
+ return LayoutMode;
22
+ }({});
23
+ /** Every {@link LayoutMode}, in the order a configurator should offer them. */ const layoutModes = [
24
+ "static",
25
+ "overlay",
26
+ "slim",
27
+ "slim-plus",
28
+ "compact",
29
+ "horizontal",
30
+ "reveal",
31
+ "drawer"
32
+ ];
33
+
34
+ export { LayoutMode, layoutModes };
35
+ //# sourceMappingURL=LayoutMode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutMode.js","sources":["../../../configuration/LayoutMode.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\n/**\n * How the application shell arranges its sidebar against its content.\n *\n * The vocabulary - and the `layout-<mode>` wrapper class each value maps to - is deliberately the one\n * PrimeTek's template line has used unchanged across Sakai, Diamond, Atlantis, Freya, Apollo, Ultima,\n * Avalon and Verona. Anyone who has themed a PrimeReact application recognizes it, and a shell that\n * invents its own names forces them to learn a second one for no gain.\n *\n * Every value here is user-selectable. Mobile deliberately is not - see {@link effectiveLayoutMode}.\n */\nexport enum LayoutMode {\n /** Sidebar permanently docked; content is pushed by a matching margin, never covered. */\n Static = 'static',\n\n /** Sidebar parked off-canvas; opening floats it over the content behind a mask. */\n Overlay = 'overlay',\n\n /** Icon-only rail with circular buttons; submenus pop out as a floating panel. */\n Slim = 'slim',\n\n /** Wider rail with each icon's label stacked directly beneath it. */\n SlimPlus = 'slim-plus',\n\n /** The icon-only rail again, with square buttons, and the topbar shifted by the rail width. */\n Compact = 'compact',\n\n /** Sidebar flows into the topbar strip as a horizontal row; submenus drop down. */\n Horizontal = 'horizontal',\n\n /** Full panel translated off-left leaving a strip of icons; hovering slides it in over the content. */\n Reveal = 'reveal',\n\n /** Collapsed rail that animates its width to full on hover - it grows where reveal slides. */\n Drawer = 'drawer',\n}\n\n/** Every {@link LayoutMode}, in the order a configurator should offer them. */\nexport const layoutModes: LayoutMode[] = [\n LayoutMode.Static,\n LayoutMode.Overlay,\n LayoutMode.Slim,\n LayoutMode.SlimPlus,\n LayoutMode.Compact,\n LayoutMode.Horizontal,\n LayoutMode.Reveal,\n LayoutMode.Drawer,\n];\n"],"names":["LayoutMode","layoutModes"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;IAUO,IAAKA,UAAAA,iBAAAA,SAAAA,UAAAA,EAAAA;8FAC+E,UAAA,CAAA,QAAA,CAAA,GAAA,QAAA;wFAGN,UAAA,CAAA,SAAA,CAAA,GAAA,SAAA;uFAGD,UAAA,CAAA,MAAA,CAAA,GAAA,MAAA;0EAGb,UAAA,CAAA,UAAA,CAAA,GAAA,WAAA;oGAG0B,UAAA,CAAA,SAAA,CAAA,GAAA,SAAA;wFAGZ,UAAA,CAAA,YAAA,CAAA,GAAA,YAAA;4GAGoB,UAAA,CAAA,QAAA,CAAA,GAAA,QAAA;mGAGT,UAAA,CAAA,QAAA,CAAA,GAAA,QAAA;AAtBpFA,IAAAA,OAAAA,UAAAA;AAwBX,CAAA,CAAA,EAAA;AAED,gFACO,MAAMC,WAAAA,GAA4B;;;;;;;;;;;;;"}
@@ -0,0 +1,7 @@
1
+ export declare enum MenuTheme {
2
+ Light = "light",
3
+ Dark = "dark",
4
+ Primary = "primary"
5
+ }
6
+ export declare const menuThemes: MenuTheme[];
7
+ //# sourceMappingURL=MenuTheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuTheme.d.ts","sourceRoot":"","sources":["../../../configuration/MenuTheme.ts"],"names":[],"mappings":"AAWA,oBAAY,SAAS;IAEjB,KAAK,UAAU;IAGf,IAAI,SAAS;IAGb,OAAO,YAAY;CACtB;AAGD,eAAO,MAAM,UAAU,EAAE,SAAS,EAAyD,CAAC"}
@@ -0,0 +1,23 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * How the sidebar surface is tinted, independently of the overall {@link ColorScheme}.
5
+ *
6
+ * A dark sidebar against a light page is the single most common brand customization in the PrimeTek
7
+ * template line, which is why menu theme is its own configurator axis rather than something implied by
8
+ * the color scheme. The shell resolves each value from the active theme's tokens, so a menu theme never
9
+ * introduces a color of its own.
10
+ */ var MenuTheme = /*#__PURE__*/ function(MenuTheme) {
11
+ /** The sidebar uses the theme's ordinary card surface. */ MenuTheme["Light"] = "light";
12
+ /** The sidebar uses an inverted surface, regardless of the page's color scheme. */ MenuTheme["Dark"] = "dark";
13
+ /** The sidebar uses the theme's primary color as its surface. */ MenuTheme["Primary"] = "primary";
14
+ return MenuTheme;
15
+ }({});
16
+ /** Every {@link MenuTheme}, in the order a configurator should offer them. */ const menuThemes = [
17
+ "light",
18
+ "dark",
19
+ "primary"
20
+ ];
21
+
22
+ export { MenuTheme, menuThemes };
23
+ //# sourceMappingURL=MenuTheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MenuTheme.js","sources":["../../../configuration/MenuTheme.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\n/**\n * How the sidebar surface is tinted, independently of the overall {@link ColorScheme}.\n *\n * A dark sidebar against a light page is the single most common brand customization in the PrimeTek\n * template line, which is why menu theme is its own configurator axis rather than something implied by\n * the color scheme. The shell resolves each value from the active theme's tokens, so a menu theme never\n * introduces a color of its own.\n */\nexport enum MenuTheme {\n /** The sidebar uses the theme's ordinary card surface. */\n Light = 'light',\n\n /** The sidebar uses an inverted surface, regardless of the page's color scheme. */\n Dark = 'dark',\n\n /** The sidebar uses the theme's primary color as its surface. */\n Primary = 'primary',\n}\n\n/** Every {@link MenuTheme}, in the order a configurator should offer them. */\nexport const menuThemes: MenuTheme[] = [MenuTheme.Light, MenuTheme.Dark, MenuTheme.Primary];\n"],"names":["MenuTheme","menuThemes"],"mappings":"AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,SAAAA,iBAAAA,SAAAA,SAAAA,EAAAA;+DACgD,SAAA,CAAA,OAAA,CAAA,GAAA,OAAA;wFAGyB,SAAA,CAAA,MAAA,CAAA,GAAA,MAAA;sEAGlB,SAAA,CAAA,SAAA,CAAA,GAAA,SAAA;AAPvDA,IAAAA,OAAAA,SAAAA;AASX,CAAA,CAAA,EAAA;AAED,+EACO,MAAMC,UAAAA,GAA0B;;;;;;;;"}
@@ -0,0 +1,9 @@
1
+ export * from './LayoutMode';
2
+ export * from './ColorScheme';
3
+ export * from './MenuTheme';
4
+ export * from './LayoutConfigState';
5
+ export * from './layoutConfigTransitions';
6
+ export * from './layoutWrapperClasses';
7
+ export * from './layoutConfigStorage';
8
+ export * from './LayoutConfigProvider';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../configuration/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC"}