@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.
- package/.storybook/main.ts +32 -0
- package/.storybook/preview.ts +20 -0
- package/ComponentName.ts +60 -0
- package/README.md +204 -0
- package/configuration/ColorScheme.ts +17 -0
- package/configuration/LayoutConfigProvider.tsx +182 -0
- package/configuration/LayoutConfigState.ts +46 -0
- package/configuration/LayoutMode.ts +50 -0
- package/configuration/MenuTheme.ts +24 -0
- package/configuration/index.ts +11 -0
- package/configuration/layoutConfigStorage.ts +102 -0
- package/configuration/layoutConfigTransitions.ts +150 -0
- package/configuration/layoutWrapperClasses.ts +68 -0
- package/defaultBlueprint.ts +66 -0
- package/defaultBlueprintComponents.ts +51 -0
- package/dist/cjs/ComponentName.js +33 -0
- package/dist/cjs/ComponentName.js.map +1 -0
- package/dist/cjs/configuration/ColorScheme.js +23 -0
- package/dist/cjs/configuration/ColorScheme.js.map +1 -0
- package/dist/cjs/configuration/LayoutConfigProvider.js +96 -0
- package/dist/cjs/configuration/LayoutConfigProvider.js.map +1 -0
- package/dist/cjs/configuration/LayoutMode.js +38 -0
- package/dist/cjs/configuration/LayoutMode.js.map +1 -0
- package/dist/cjs/configuration/MenuTheme.js +26 -0
- package/dist/cjs/configuration/MenuTheme.js.map +1 -0
- package/dist/cjs/configuration/layoutConfigStorage.js +85 -0
- package/dist/cjs/configuration/layoutConfigStorage.js.map +1 -0
- package/dist/cjs/configuration/layoutConfigTransitions.js +158 -0
- package/dist/cjs/configuration/layoutConfigTransitions.js.map +1 -0
- package/dist/cjs/configuration/layoutWrapperClasses.js +62 -0
- package/dist/cjs/configuration/layoutWrapperClasses.js.map +1 -0
- package/dist/cjs/defaultBlueprint.js +92 -0
- package/dist/cjs/defaultBlueprint.js.map +1 -0
- package/dist/cjs/defaultBlueprintComponents.js +54 -0
- package/dist/cjs/defaultBlueprintComponents.js.map +1 -0
- package/dist/cjs/gallery/GalleryScreenPreview.js +63 -0
- package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -0
- package/dist/cjs/gallery/TemplateSlotName.js +25 -0
- package/dist/cjs/gallery/TemplateSlotName.js.map +1 -0
- package/dist/cjs/gallery/applicationChrome.js +134 -0
- package/dist/cjs/gallery/applicationChrome.js.map +1 -0
- package/dist/cjs/gallery/authTemplates.js +234 -0
- package/dist/cjs/gallery/authTemplates.js.map +1 -0
- package/dist/cjs/gallery/componentNames.js +53 -0
- package/dist/cjs/gallery/componentNames.js.map +1 -0
- package/dist/cjs/gallery/composeScreen.js +99 -0
- package/dist/cjs/gallery/composeScreen.js.map +1 -0
- package/dist/cjs/gallery/dependencyComponentNames.js +72 -0
- package/dist/cjs/gallery/dependencyComponentNames.js.map +1 -0
- package/dist/cjs/gallery/dialogTemplates.js +161 -0
- package/dist/cjs/gallery/dialogTemplates.js.map +1 -0
- package/dist/cjs/gallery/elements.js +80 -0
- package/dist/cjs/gallery/elements.js.map +1 -0
- package/dist/cjs/gallery/navigation.js +129 -0
- package/dist/cjs/gallery/navigation.js.map +1 -0
- package/dist/cjs/gallery/nesting.js +129 -0
- package/dist/cjs/gallery/nesting.js.map +1 -0
- package/dist/cjs/gallery/previewProfile.js +68 -0
- package/dist/cjs/gallery/previewProfile.js.map +1 -0
- package/dist/cjs/gallery/resolveElementNames.js +63 -0
- package/dist/cjs/gallery/resolveElementNames.js.map +1 -0
- package/dist/cjs/gallery/screens.js +222 -0
- package/dist/cjs/gallery/screens.js.map +1 -0
- package/dist/cjs/gallery/statusTemplates.js +190 -0
- package/dist/cjs/gallery/statusTemplates.js.map +1 -0
- package/dist/cjs/gallery/supportTemplates.js +319 -0
- package/dist/cjs/gallery/supportTemplates.js.map +1 -0
- package/dist/cjs/gallery/widgets.js +94 -0
- package/dist/cjs/gallery/widgets.js.map +1 -0
- package/dist/cjs/gallery/workspaceTemplates.js +395 -0
- package/dist/cjs/gallery/workspaceTemplates.js.map +1 -0
- package/dist/cjs/index.js +220 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/layouts/LayoutName.js +19 -0
- package/dist/cjs/layouts/LayoutName.js.map +1 -0
- package/dist/cjs/layouts/SlotName.js +31 -0
- package/dist/cjs/layouts/SlotName.js.map +1 -0
- package/dist/cjs/layouts/appShell.js +160 -0
- package/dist/cjs/layouts/appShell.js.map +1 -0
- package/dist/cjs/layouts/defaultLayouts.js +20 -0
- package/dist/cjs/layouts/defaultLayouts.js.map +1 -0
- package/dist/cjs/layouts/flowBuilders.js +66 -0
- package/dist/cjs/layouts/flowBuilders.js.map +1 -0
- package/dist/cjs/layouts/fullPage.js +78 -0
- package/dist/cjs/layouts/fullPage.js.map +1 -0
- package/dist/cjs/layouts/shellComponents.js +29 -0
- package/dist/cjs/layouts/shellComponents.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/packageName.js +15 -0
- package/dist/cjs/packageName.js.map +1 -0
- package/dist/cjs/shell/AppShell.js +88 -0
- package/dist/cjs/shell/AppShell.js.map +1 -0
- package/dist/cjs/shell/Breadcrumb.js +33 -0
- package/dist/cjs/shell/Breadcrumb.js.map +1 -0
- package/dist/cjs/shell/ConfigPanel.js +128 -0
- package/dist/cjs/shell/ConfigPanel.js.map +1 -0
- package/dist/cjs/shell/Footer.js +28 -0
- package/dist/cjs/shell/Footer.js.map +1 -0
- package/dist/cjs/shell/FullPageShell.js +53 -0
- package/dist/cjs/shell/FullPageShell.js.map +1 -0
- package/dist/cjs/shell/LayoutModeSwitcher.js +58 -0
- package/dist/cjs/shell/LayoutModeSwitcher.js.map +1 -0
- package/dist/cjs/shell/Logo.js +44 -0
- package/dist/cjs/shell/Logo.js.map +1 -0
- package/dist/cjs/shell/Mask.js +34 -0
- package/dist/cjs/shell/Mask.js.map +1 -0
- package/dist/cjs/shell/Menu.js +36 -0
- package/dist/cjs/shell/Menu.js.map +1 -0
- package/dist/cjs/shell/MenuItem.js +65 -0
- package/dist/cjs/shell/MenuItem.js.map +1 -0
- package/dist/cjs/shell/PageHeader.js +43 -0
- package/dist/cjs/shell/PageHeader.js.map +1 -0
- package/dist/cjs/shell/RightPanel.js +30 -0
- package/dist/cjs/shell/RightPanel.js.map +1 -0
- package/dist/cjs/shell/Sidebar.js +51 -0
- package/dist/cjs/shell/Sidebar.js.map +1 -0
- package/dist/cjs/shell/ThemeOption.js +42 -0
- package/dist/cjs/shell/ThemeOption.js.map +1 -0
- package/dist/cjs/shell/ThemeSwitcher.js +50 -0
- package/dist/cjs/shell/ThemeSwitcher.js.map +1 -0
- package/dist/cjs/shell/Topbar.js +54 -0
- package/dist/cjs/shell/Topbar.js.map +1 -0
- package/dist/cjs/shell/UserMenu.js +68 -0
- package/dist/cjs/shell/UserMenu.js.map +1 -0
- package/dist/cjs/shell/elementProperties.js +56 -0
- package/dist/cjs/shell/elementProperties.js.map +1 -0
- package/dist/cjs/themes/LayoutThemeProvider.js +33 -0
- package/dist/cjs/themes/LayoutThemeProvider.js.map +1 -0
- package/dist/cjs/themes/blueprintThemeCompatibility.js +28 -0
- package/dist/cjs/themes/blueprintThemeCompatibility.js.map +1 -0
- package/dist/cjs/themes/dark.js +40 -0
- package/dist/cjs/themes/dark.js.map +1 -0
- package/dist/cjs/themes/defaultBlueprintThemes.js +19 -0
- package/dist/cjs/themes/defaultBlueprintThemes.js.map +1 -0
- package/dist/cjs/themes/light.js +43 -0
- package/dist/cjs/themes/light.js.map +1 -0
- package/dist/esm/ComponentName.d.ts +19 -0
- package/dist/esm/ComponentName.d.ts.map +1 -0
- package/dist/esm/ComponentName.js +31 -0
- package/dist/esm/ComponentName.js.map +1 -0
- package/dist/esm/configuration/ColorScheme.d.ts +6 -0
- package/dist/esm/configuration/ColorScheme.d.ts.map +1 -0
- package/dist/esm/configuration/ColorScheme.js +20 -0
- package/dist/esm/configuration/ColorScheme.js.map +1 -0
- package/dist/esm/configuration/LayoutConfigProvider.d.ts +29 -0
- package/dist/esm/configuration/LayoutConfigProvider.d.ts.map +1 -0
- package/dist/esm/configuration/LayoutConfigProvider.js +92 -0
- package/dist/esm/configuration/LayoutConfigProvider.js.map +1 -0
- package/dist/esm/configuration/LayoutConfigState.d.ts +14 -0
- package/dist/esm/configuration/LayoutConfigState.d.ts.map +1 -0
- package/dist/esm/configuration/LayoutConfigState.js +2 -0
- package/dist/esm/configuration/LayoutConfigState.js.map +1 -0
- package/dist/esm/configuration/LayoutMode.d.ts +12 -0
- package/dist/esm/configuration/LayoutMode.d.ts.map +1 -0
- package/dist/esm/configuration/LayoutMode.js +35 -0
- package/dist/esm/configuration/LayoutMode.js.map +1 -0
- package/dist/esm/configuration/MenuTheme.d.ts +7 -0
- package/dist/esm/configuration/MenuTheme.d.ts.map +1 -0
- package/dist/esm/configuration/MenuTheme.js +23 -0
- package/dist/esm/configuration/MenuTheme.js.map +1 -0
- package/dist/esm/configuration/index.d.ts +9 -0
- package/dist/esm/configuration/index.d.ts.map +1 -0
- package/dist/esm/configuration/index.js +9 -0
- package/dist/esm/configuration/index.js.map +1 -0
- package/dist/esm/configuration/layoutConfigStorage.d.ts +6 -0
- package/dist/esm/configuration/layoutConfigStorage.d.ts.map +1 -0
- package/dist/esm/configuration/layoutConfigStorage.js +81 -0
- package/dist/esm/configuration/layoutConfigStorage.js.map +1 -0
- package/dist/esm/configuration/layoutConfigTransitions.d.ts +22 -0
- package/dist/esm/configuration/layoutConfigTransitions.d.ts.map +1 -0
- package/dist/esm/configuration/layoutConfigTransitions.js +140 -0
- package/dist/esm/configuration/layoutConfigTransitions.js.map +1 -0
- package/dist/esm/configuration/layoutWrapperClasses.d.ts +4 -0
- package/dist/esm/configuration/layoutWrapperClasses.d.ts.map +1 -0
- package/dist/esm/configuration/layoutWrapperClasses.js +59 -0
- package/dist/esm/configuration/layoutWrapperClasses.js.map +1 -0
- package/dist/esm/defaultBlueprint.d.ts +5 -0
- package/dist/esm/defaultBlueprint.d.ts.map +1 -0
- package/dist/esm/defaultBlueprint.js +89 -0
- package/dist/esm/defaultBlueprint.js.map +1 -0
- package/dist/esm/defaultBlueprintComponents.d.ts +3 -0
- package/dist/esm/defaultBlueprintComponents.d.ts.map +1 -0
- package/dist/esm/defaultBlueprintComponents.js +52 -0
- package/dist/esm/defaultBlueprintComponents.js.map +1 -0
- package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.d.ts +2 -0
- package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.d.ts.map +1 -0
- package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.js +60 -0
- package/dist/esm/for_AppShell/when_rendering_a_gallery_screen.js.map +1 -0
- package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.d.ts +2 -0
- package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.d.ts.map +1 -0
- package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.js +60 -0
- package/dist/esm/for_LayoutConfigProvider/when_switching_mode_and_reloading.js.map +1 -0
- package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts +2 -0
- package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts.map +1 -0
- package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.js +26 -0
- package/dist/esm/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.js.map +1 -0
- package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.d.ts +2 -0
- package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.d.ts.map +1 -0
- package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.js +32 -0
- package/dist/esm/for_defaultBlueprint/when_validating_the_bundle.js.map +1 -0
- package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.d.ts +2 -0
- package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.d.ts.map +1 -0
- package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.js +40 -0
- package/dist/esm/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.js.map +1 -0
- package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts +2 -0
- package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.d.ts.map +1 -0
- package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.js +27 -0
- package/dist/esm/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.js.map +1 -0
- package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts +2 -0
- package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.d.ts.map +1 -0
- package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js +41 -0
- package/dist/esm/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.js.map +1 -0
- package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.d.ts +2 -0
- package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.d.ts.map +1 -0
- package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.js +31 -0
- package/dist/esm/for_galleryScreenTemplates/when_following_the_nesting_chain.js.map +1 -0
- package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts +2 -0
- package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.d.ts.map +1 -0
- package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.js +33 -0
- package/dist/esm/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.js.map +1 -0
- package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.d.ts +2 -0
- package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.d.ts.map +1 -0
- package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.js +44 -0
- package/dist/esm/for_galleryScreens/when_resolving_the_component_names_they_reference.js.map +1 -0
- package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.d.ts +2 -0
- package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.d.ts.map +1 -0
- package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.js +60 -0
- package/dist/esm/for_layoutConfigStorage/when_restoring_a_persisted_configuration.js.map +1 -0
- package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.d.ts +2 -0
- package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.d.ts.map +1 -0
- package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.js +28 -0
- package/dist/esm/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.js.map +1 -0
- package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.d.ts +2 -0
- package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.d.ts.map +1 -0
- package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.js +38 -0
- package/dist/esm/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.js.map +1 -0
- package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.d.ts +2 -0
- package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.d.ts.map +1 -0
- package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.js +39 -0
- package/dist/esm/for_layoutWrapperClasses/when_rendering_each_mode.js.map +1 -0
- package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.d.ts +2 -0
- package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.d.ts.map +1 -0
- package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.js +37 -0
- package/dist/esm/for_navigation/when_aggregating_the_navigation_contributions.js.map +1 -0
- package/dist/esm/gallery/ApplicationScreens.stories.d.ts +31 -0
- package/dist/esm/gallery/ApplicationScreens.stories.d.ts.map +1 -0
- package/dist/esm/gallery/ApplicationScreens.stories.js +29 -0
- package/dist/esm/gallery/ApplicationScreens.stories.js.map +1 -0
- package/dist/esm/gallery/FullPageScreens.stories.d.ts +28 -0
- package/dist/esm/gallery/FullPageScreens.stories.d.ts.map +1 -0
- package/dist/esm/gallery/FullPageScreens.stories.js +26 -0
- package/dist/esm/gallery/FullPageScreens.stories.js.map +1 -0
- package/dist/esm/gallery/GalleryScreenPreview.d.ts +12 -0
- package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -0
- package/dist/esm/gallery/GalleryScreenPreview.js +60 -0
- package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -0
- package/dist/esm/gallery/NavigationEntry.d.ts +8 -0
- package/dist/esm/gallery/NavigationEntry.d.ts.map +1 -0
- package/dist/esm/gallery/NavigationEntry.js +2 -0
- package/dist/esm/gallery/NavigationEntry.js.map +1 -0
- package/dist/esm/gallery/TemplateSlotName.d.ts +11 -0
- package/dist/esm/gallery/TemplateSlotName.d.ts.map +1 -0
- package/dist/esm/gallery/TemplateSlotName.js +23 -0
- package/dist/esm/gallery/TemplateSlotName.js.map +1 -0
- package/dist/esm/gallery/applicationChrome.d.ts +8 -0
- package/dist/esm/gallery/applicationChrome.d.ts.map +1 -0
- package/dist/esm/gallery/applicationChrome.js +131 -0
- package/dist/esm/gallery/applicationChrome.js.map +1 -0
- package/dist/esm/gallery/authTemplates.d.ts +9 -0
- package/dist/esm/gallery/authTemplates.d.ts.map +1 -0
- package/dist/esm/gallery/authTemplates.js +226 -0
- package/dist/esm/gallery/authTemplates.js.map +1 -0
- package/dist/esm/gallery/componentNames.d.ts +4 -0
- package/dist/esm/gallery/componentNames.d.ts.map +1 -0
- package/dist/esm/gallery/componentNames.js +50 -0
- package/dist/esm/gallery/componentNames.js.map +1 -0
- package/dist/esm/gallery/composeScreen.d.ts +5 -0
- package/dist/esm/gallery/composeScreen.d.ts.map +1 -0
- package/dist/esm/gallery/composeScreen.js +95 -0
- package/dist/esm/gallery/composeScreen.js.map +1 -0
- package/dist/esm/gallery/dependencyComponentNames.d.ts +4 -0
- package/dist/esm/gallery/dependencyComponentNames.d.ts.map +1 -0
- package/dist/esm/gallery/dependencyComponentNames.js +68 -0
- package/dist/esm/gallery/dependencyComponentNames.js.map +1 -0
- package/dist/esm/gallery/dialogTemplates.d.ts +6 -0
- package/dist/esm/gallery/dialogTemplates.d.ts.map +1 -0
- package/dist/esm/gallery/dialogTemplates.js +156 -0
- package/dist/esm/gallery/dialogTemplates.js.map +1 -0
- package/dist/esm/gallery/elements.d.ts +7 -0
- package/dist/esm/gallery/elements.d.ts.map +1 -0
- package/dist/esm/gallery/elements.js +74 -0
- package/dist/esm/gallery/elements.js.map +1 -0
- package/dist/esm/gallery/index.d.ts +20 -0
- package/dist/esm/gallery/index.d.ts.map +1 -0
- package/dist/esm/gallery/index.js +20 -0
- package/dist/esm/gallery/index.js.map +1 -0
- package/dist/esm/gallery/navigation.d.ts +9 -0
- package/dist/esm/gallery/navigation.d.ts.map +1 -0
- package/dist/esm/gallery/navigation.js +122 -0
- package/dist/esm/gallery/navigation.js.map +1 -0
- package/dist/esm/gallery/nesting.d.ts +6 -0
- package/dist/esm/gallery/nesting.d.ts.map +1 -0
- package/dist/esm/gallery/nesting.js +124 -0
- package/dist/esm/gallery/nesting.js.map +1 -0
- package/dist/esm/gallery/previewProfile.d.ts +6 -0
- package/dist/esm/gallery/previewProfile.d.ts.map +1 -0
- package/dist/esm/gallery/previewProfile.js +64 -0
- package/dist/esm/gallery/previewProfile.js.map +1 -0
- package/dist/esm/gallery/resolveElementNames.d.ts +4 -0
- package/dist/esm/gallery/resolveElementNames.d.ts.map +1 -0
- package/dist/esm/gallery/resolveElementNames.js +61 -0
- package/dist/esm/gallery/resolveElementNames.js.map +1 -0
- package/dist/esm/gallery/screens.d.ts +5 -0
- package/dist/esm/gallery/screens.d.ts.map +1 -0
- package/dist/esm/gallery/screens.js +218 -0
- package/dist/esm/gallery/screens.js.map +1 -0
- package/dist/esm/gallery/statusTemplates.d.ts +7 -0
- package/dist/esm/gallery/statusTemplates.d.ts.map +1 -0
- package/dist/esm/gallery/statusTemplates.js +184 -0
- package/dist/esm/gallery/statusTemplates.js.map +1 -0
- package/dist/esm/gallery/supportTemplates.d.ts +8 -0
- package/dist/esm/gallery/supportTemplates.d.ts.map +1 -0
- package/dist/esm/gallery/supportTemplates.js +312 -0
- package/dist/esm/gallery/supportTemplates.js.map +1 -0
- package/dist/esm/gallery/widgets.d.ts +12 -0
- package/dist/esm/gallery/widgets.d.ts.map +1 -0
- package/dist/esm/gallery/widgets.js +86 -0
- package/dist/esm/gallery/widgets.js.map +1 -0
- package/dist/esm/gallery/workspaceTemplates.d.ts +8 -0
- package/dist/esm/gallery/workspaceTemplates.d.ts.map +1 -0
- package/dist/esm/gallery/workspaceTemplates.js +388 -0
- package/dist/esm/gallery/workspaceTemplates.js.map +1 -0
- package/dist/esm/index.d.ts +10 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +60 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/layouts/LayoutName.d.ts +5 -0
- package/dist/esm/layouts/LayoutName.d.ts.map +1 -0
- package/dist/esm/layouts/LayoutName.js +17 -0
- package/dist/esm/layouts/LayoutName.js.map +1 -0
- package/dist/esm/layouts/SlotName.d.ts +12 -0
- package/dist/esm/layouts/SlotName.d.ts.map +1 -0
- package/dist/esm/layouts/SlotName.js +29 -0
- package/dist/esm/layouts/SlotName.js.map +1 -0
- package/dist/esm/layouts/appShell.d.ts +8 -0
- package/dist/esm/layouts/appShell.d.ts.map +1 -0
- package/dist/esm/layouts/appShell.js +153 -0
- package/dist/esm/layouts/appShell.js.map +1 -0
- package/dist/esm/layouts/defaultLayouts.d.ts +3 -0
- package/dist/esm/layouts/defaultLayouts.d.ts.map +1 -0
- package/dist/esm/layouts/defaultLayouts.js +18 -0
- package/dist/esm/layouts/defaultLayouts.js.map +1 -0
- package/dist/esm/layouts/flowBuilders.d.ts +6 -0
- package/dist/esm/layouts/flowBuilders.d.ts.map +1 -0
- package/dist/esm/layouts/flowBuilders.js +61 -0
- package/dist/esm/layouts/flowBuilders.js.map +1 -0
- package/dist/esm/layouts/fullPage.d.ts +6 -0
- package/dist/esm/layouts/fullPage.d.ts.map +1 -0
- package/dist/esm/layouts/fullPage.js +73 -0
- package/dist/esm/layouts/fullPage.js.map +1 -0
- package/dist/esm/layouts/index.d.ts +8 -0
- package/dist/esm/layouts/index.d.ts.map +1 -0
- package/dist/esm/layouts/index.js +8 -0
- package/dist/esm/layouts/index.js.map +1 -0
- package/dist/esm/layouts/shellComponents.d.ts +3 -0
- package/dist/esm/layouts/shellComponents.d.ts.map +1 -0
- package/dist/esm/layouts/shellComponents.js +27 -0
- package/dist/esm/layouts/shellComponents.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/packageName.d.ts +2 -0
- package/dist/esm/packageName.d.ts.map +1 -0
- package/dist/esm/packageName.js +13 -0
- package/dist/esm/packageName.js.map +1 -0
- package/dist/esm/shell/AppShell.d.ts +3 -0
- package/dist/esm/shell/AppShell.d.ts.map +1 -0
- package/dist/esm/shell/AppShell.js +86 -0
- package/dist/esm/shell/AppShell.js.map +1 -0
- package/dist/esm/shell/Breadcrumb.d.ts +3 -0
- package/dist/esm/shell/Breadcrumb.d.ts.map +1 -0
- package/dist/esm/shell/Breadcrumb.js +31 -0
- package/dist/esm/shell/Breadcrumb.js.map +1 -0
- package/dist/esm/shell/ConfigPanel.d.ts +3 -0
- package/dist/esm/shell/ConfigPanel.d.ts.map +1 -0
- package/dist/esm/shell/ConfigPanel.js +126 -0
- package/dist/esm/shell/ConfigPanel.js.map +1 -0
- package/dist/esm/shell/Footer.d.ts +3 -0
- package/dist/esm/shell/Footer.d.ts.map +1 -0
- package/dist/esm/shell/Footer.js +26 -0
- package/dist/esm/shell/Footer.js.map +1 -0
- package/dist/esm/shell/FullPageShell.d.ts +3 -0
- package/dist/esm/shell/FullPageShell.d.ts.map +1 -0
- package/dist/esm/shell/FullPageShell.js +51 -0
- package/dist/esm/shell/FullPageShell.js.map +1 -0
- package/dist/esm/shell/LayoutModeSwitcher.d.ts +3 -0
- package/dist/esm/shell/LayoutModeSwitcher.d.ts.map +1 -0
- package/dist/esm/shell/LayoutModeSwitcher.js +56 -0
- package/dist/esm/shell/LayoutModeSwitcher.js.map +1 -0
- package/dist/esm/shell/LayoutModes.stories.d.ts +29 -0
- package/dist/esm/shell/LayoutModes.stories.d.ts.map +1 -0
- package/dist/esm/shell/LayoutModes.stories.js +43 -0
- package/dist/esm/shell/LayoutModes.stories.js.map +1 -0
- package/dist/esm/shell/Logo.d.ts +3 -0
- package/dist/esm/shell/Logo.d.ts.map +1 -0
- package/dist/esm/shell/Logo.js +42 -0
- package/dist/esm/shell/Logo.js.map +1 -0
- package/dist/esm/shell/Mask.d.ts +3 -0
- package/dist/esm/shell/Mask.d.ts.map +1 -0
- package/dist/esm/shell/Mask.js +31 -0
- package/dist/esm/shell/Mask.js.map +1 -0
- package/dist/esm/shell/Menu.d.ts +3 -0
- package/dist/esm/shell/Menu.d.ts.map +1 -0
- package/dist/esm/shell/Menu.js +34 -0
- package/dist/esm/shell/Menu.js.map +1 -0
- package/dist/esm/shell/MenuItem.d.ts +3 -0
- package/dist/esm/shell/MenuItem.d.ts.map +1 -0
- package/dist/esm/shell/MenuItem.js +63 -0
- package/dist/esm/shell/MenuItem.js.map +1 -0
- package/dist/esm/shell/PageHeader.d.ts +3 -0
- package/dist/esm/shell/PageHeader.d.ts.map +1 -0
- package/dist/esm/shell/PageHeader.js +41 -0
- package/dist/esm/shell/PageHeader.js.map +1 -0
- package/dist/esm/shell/RightPanel.d.ts +3 -0
- package/dist/esm/shell/RightPanel.d.ts.map +1 -0
- package/dist/esm/shell/RightPanel.js +28 -0
- package/dist/esm/shell/RightPanel.js.map +1 -0
- package/dist/esm/shell/Sidebar.d.ts +3 -0
- package/dist/esm/shell/Sidebar.d.ts.map +1 -0
- package/dist/esm/shell/Sidebar.js +49 -0
- package/dist/esm/shell/Sidebar.js.map +1 -0
- package/dist/esm/shell/ThemeOption.d.ts +10 -0
- package/dist/esm/shell/ThemeOption.d.ts.map +1 -0
- package/dist/esm/shell/ThemeOption.js +39 -0
- package/dist/esm/shell/ThemeOption.js.map +1 -0
- package/dist/esm/shell/ThemeSwitcher.d.ts +3 -0
- package/dist/esm/shell/ThemeSwitcher.d.ts.map +1 -0
- package/dist/esm/shell/ThemeSwitcher.js +48 -0
- package/dist/esm/shell/ThemeSwitcher.js.map +1 -0
- package/dist/esm/shell/Topbar.d.ts +3 -0
- package/dist/esm/shell/Topbar.d.ts.map +1 -0
- package/dist/esm/shell/Topbar.js +52 -0
- package/dist/esm/shell/Topbar.js.map +1 -0
- package/dist/esm/shell/UserMenu.d.ts +3 -0
- package/dist/esm/shell/UserMenu.d.ts.map +1 -0
- package/dist/esm/shell/UserMenu.js +66 -0
- package/dist/esm/shell/UserMenu.js.map +1 -0
- package/dist/esm/shell/elementProperties.d.ts +9 -0
- package/dist/esm/shell/elementProperties.d.ts.map +1 -0
- package/dist/esm/shell/elementProperties.js +48 -0
- package/dist/esm/shell/elementProperties.js.map +1 -0
- package/dist/esm/shell/index.d.ts +19 -0
- package/dist/esm/shell/index.d.ts.map +1 -0
- package/dist/esm/shell/index.js +19 -0
- package/dist/esm/shell/index.js.map +1 -0
- package/dist/esm/themes/LayoutThemeProvider.d.ts +9 -0
- package/dist/esm/themes/LayoutThemeProvider.d.ts.map +1 -0
- package/dist/esm/themes/LayoutThemeProvider.js +31 -0
- package/dist/esm/themes/LayoutThemeProvider.js.map +1 -0
- package/dist/esm/themes/Theming.stories.d.ts +21 -0
- package/dist/esm/themes/Theming.stories.d.ts.map +1 -0
- package/dist/esm/themes/Theming.stories.js +54 -0
- package/dist/esm/themes/Theming.stories.js.map +1 -0
- package/dist/esm/themes/blueprintThemeCompatibility.d.ts +2 -0
- package/dist/esm/themes/blueprintThemeCompatibility.d.ts.map +1 -0
- package/dist/esm/themes/blueprintThemeCompatibility.js +26 -0
- package/dist/esm/themes/blueprintThemeCompatibility.js.map +1 -0
- package/dist/esm/themes/dark.d.ts +3 -0
- package/dist/esm/themes/dark.d.ts.map +1 -0
- package/dist/esm/themes/dark.js +38 -0
- package/dist/esm/themes/dark.js.map +1 -0
- package/dist/esm/themes/defaultBlueprintThemes.d.ts +3 -0
- package/dist/esm/themes/defaultBlueprintThemes.d.ts.map +1 -0
- package/dist/esm/themes/defaultBlueprintThemes.js +17 -0
- package/dist/esm/themes/defaultBlueprintThemes.js.map +1 -0
- package/dist/esm/themes/index.d.ts +6 -0
- package/dist/esm/themes/index.d.ts.map +1 -0
- package/dist/esm/themes/index.js +6 -0
- package/dist/esm/themes/index.js.map +1 -0
- package/dist/esm/themes/light.d.ts +3 -0
- package/dist/esm/themes/light.d.ts.map +1 -0
- package/dist/esm/themes/light.js +41 -0
- package/dist/esm/themes/light.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/for_AppShell/when_rendering_a_gallery_screen.tsx +76 -0
- package/for_LayoutConfigProvider/when_switching_mode_and_reloading.tsx +77 -0
- package/for_appShellLayout/when_evaluating_the_arrangement_at_each_size_class.ts +42 -0
- package/for_defaultBlueprint/when_validating_the_bundle.ts +43 -0
- package/for_defaultBlueprintThemes/when_checking_attribution_and_tokens.ts +50 -0
- package/for_fullPageLayout/when_evaluating_the_arrangement_at_each_size_class.ts +36 -0
- package/for_galleryScreenTemplates/when_checking_that_arrangements_reference_declared_slots.ts +53 -0
- package/for_galleryScreenTemplates/when_following_the_nesting_chain.ts +41 -0
- package/for_galleryScreens/when_checking_the_layouts_and_slots_they_fill.ts +44 -0
- package/for_galleryScreens/when_resolving_the_component_names_they_reference.ts +60 -0
- package/for_layoutConfigStorage/when_restoring_a_persisted_configuration.ts +76 -0
- package/for_layoutConfigTransitions/when_anchoring_a_reveal_sidebar.ts +44 -0
- package/for_layoutConfigTransitions/when_the_viewport_crosses_the_mobile_breakpoint.ts +61 -0
- package/for_layoutWrapperClasses/when_rendering_each_mode.ts +63 -0
- package/for_navigation/when_aggregating_the_navigation_contributions.ts +50 -0
- package/gallery/ApplicationScreens.stories.tsx +70 -0
- package/gallery/FullPageScreens.stories.tsx +60 -0
- package/gallery/GalleryScreenPreview.tsx +68 -0
- package/gallery/NavigationEntry.ts +27 -0
- package/gallery/TemplateSlotName.ts +36 -0
- package/gallery/applicationChrome.ts +110 -0
- package/gallery/authTemplates.ts +161 -0
- package/gallery/componentNames.ts +55 -0
- package/gallery/composeScreen.ts +95 -0
- package/gallery/dependencyComponentNames.ts +64 -0
- package/gallery/dialogTemplates.ts +79 -0
- package/gallery/elements.ts +65 -0
- package/gallery/index.ts +22 -0
- package/gallery/navigation.ts +71 -0
- package/gallery/nesting.ts +82 -0
- package/gallery/previewProfile.ts +59 -0
- package/gallery/resolveElementNames.ts +55 -0
- package/gallery/screens.ts +111 -0
- package/gallery/statusTemplates.ts +118 -0
- package/gallery/supportTemplates.ts +164 -0
- package/gallery/widgets.ts +63 -0
- package/gallery/workspaceTemplates.ts +198 -0
- package/index.ts +12 -0
- package/layouts/LayoutName.ts +18 -0
- package/layouts/SlotName.ts +44 -0
- package/layouts/appShell.ts +106 -0
- package/layouts/defaultLayouts.ts +15 -0
- package/layouts/flowBuilders.ts +49 -0
- package/layouts/fullPage.ts +48 -0
- package/layouts/index.ts +10 -0
- package/layouts/shellComponents.ts +28 -0
- package/package.json +68 -0
- package/packageName.ts +12 -0
- package/shell/AppShell.tsx +66 -0
- package/shell/Breadcrumb.tsx +31 -0
- package/shell/ConfigPanel.tsx +105 -0
- package/shell/Footer.tsx +23 -0
- package/shell/FullPageShell.tsx +41 -0
- package/shell/LayoutModeSwitcher.tsx +50 -0
- package/shell/LayoutModes.stories.tsx +83 -0
- package/shell/Logo.tsx +30 -0
- package/shell/Mask.tsx +29 -0
- package/shell/Menu.tsx +26 -0
- package/shell/MenuItem.tsx +39 -0
- package/shell/PageHeader.tsx +28 -0
- package/shell/RightPanel.tsx +23 -0
- package/shell/Sidebar.tsx +45 -0
- package/shell/ThemeOption.ts +60 -0
- package/shell/ThemeSwitcher.tsx +42 -0
- package/shell/Topbar.tsx +49 -0
- package/shell/UserMenu.tsx +53 -0
- package/shell/elementProperties.ts +64 -0
- package/shell/index.ts +21 -0
- package/shell/layout.css +821 -0
- package/themes/LayoutThemeProvider.tsx +41 -0
- package/themes/Theming.stories.tsx +89 -0
- package/themes/blueprintThemeCompatibility.ts +19 -0
- package/themes/dark.ts +38 -0
- package/themes/defaultBlueprintThemes.ts +14 -0
- package/themes/index.ts +8 -0
- package/themes/light.ts +41 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ColorScheme } from './ColorScheme';
|
|
5
|
+
import { LayoutConfigState } from './LayoutConfigState';
|
|
6
|
+
import { LayoutMode } from './LayoutMode';
|
|
7
|
+
import { MenuTheme } from './MenuTheme';
|
|
8
|
+
import { defaultLayoutConfigState } from './layoutConfigTransitions';
|
|
9
|
+
|
|
10
|
+
/** The `localStorage` key the shell persists its configuration under. */
|
|
11
|
+
export const layoutConfigStorageKey = 'cratis.scene.blueprint.default';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The parts of {@link LayoutConfigState} worth surviving a reload.
|
|
15
|
+
*
|
|
16
|
+
* Deliberately not the whole record: whether the sidebar happened to be open, whether the pointer was
|
|
17
|
+
* over it, and whether the viewport was narrow are all facts about the moment rather than preferences, and
|
|
18
|
+
* restoring them produces a shell that opens in a state the user never chose. The pin *is* a preference,
|
|
19
|
+
* so it stays.
|
|
20
|
+
*/
|
|
21
|
+
export type PersistedLayoutConfig = Pick<LayoutConfigState, 'mode' | 'menuTheme' | 'colorScheme' | 'themeName' | 'isSidebarAnchored'>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Reads the persisted configuration back, falling back to {@link defaultLayoutConfigState} for anything
|
|
25
|
+
* missing or unrecognized.
|
|
26
|
+
*
|
|
27
|
+
* Everything is validated against the enums rather than trusted, because `localStorage` is shared with
|
|
28
|
+
* every other script on the origin and outlives the version of this package that wrote it. An unknown
|
|
29
|
+
* mode left in place would put a class on the wrapper that no stylesheet rule matches - a shell with no
|
|
30
|
+
* sidebar at all, and no error to explain it.
|
|
31
|
+
*
|
|
32
|
+
* @param storage The storage to read from, or `undefined` when there is none (server-side rendering).
|
|
33
|
+
* @returns The restored state, with defaults filled in.
|
|
34
|
+
*/
|
|
35
|
+
export function readPersistedLayoutConfig(storage?: Storage): LayoutConfigState {
|
|
36
|
+
const defaults = defaultLayoutConfigState();
|
|
37
|
+
const stored = readRecord(storage);
|
|
38
|
+
if (!stored) {
|
|
39
|
+
return defaults;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return {
|
|
43
|
+
...defaults,
|
|
44
|
+
mode: enumValue(Object.values(LayoutMode), stored.mode) ?? defaults.mode,
|
|
45
|
+
menuTheme: enumValue(Object.values(MenuTheme), stored.menuTheme) ?? defaults.menuTheme,
|
|
46
|
+
colorScheme: enumValue(Object.values(ColorScheme), stored.colorScheme) ?? defaults.colorScheme,
|
|
47
|
+
themeName: typeof stored.themeName === 'string' ? stored.themeName : defaults.themeName,
|
|
48
|
+
isSidebarAnchored: typeof stored.isSidebarAnchored === 'boolean' ? stored.isSidebarAnchored : defaults.isSidebarAnchored,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Writes the durable parts of the configuration.
|
|
54
|
+
*
|
|
55
|
+
* Storage can throw - Safari's private mode and a full quota both do - and a shell that cannot remember a
|
|
56
|
+
* preference is a far smaller problem than one that crashes on a mode switch, so a failure here is
|
|
57
|
+
* swallowed rather than propagated.
|
|
58
|
+
*
|
|
59
|
+
* @param state The state to persist.
|
|
60
|
+
* @param storage The storage to write to, or `undefined` when there is none.
|
|
61
|
+
*/
|
|
62
|
+
export function persistLayoutConfig(state: LayoutConfigState, storage?: Storage): void {
|
|
63
|
+
if (!storage) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const persisted: PersistedLayoutConfig = {
|
|
68
|
+
mode: state.mode,
|
|
69
|
+
menuTheme: state.menuTheme,
|
|
70
|
+
colorScheme: state.colorScheme,
|
|
71
|
+
themeName: state.themeName,
|
|
72
|
+
isSidebarAnchored: state.isSidebarAnchored,
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
try {
|
|
76
|
+
storage.setItem(layoutConfigStorageKey, JSON.stringify(persisted));
|
|
77
|
+
} catch {
|
|
78
|
+
// A browser that refuses to store a preference still has to render the shell.
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function readRecord(storage?: Storage): Record<string, unknown> | undefined {
|
|
83
|
+
if (!storage) {
|
|
84
|
+
return undefined;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
try {
|
|
88
|
+
const raw = storage.getItem(layoutConfigStorageKey);
|
|
89
|
+
if (!raw) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
const parsed = JSON.parse(raw) as unknown;
|
|
94
|
+
return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed) ? (parsed as Record<string, unknown>) : undefined;
|
|
95
|
+
} catch {
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function enumValue<TValue extends string>(values: TValue[], candidate: unknown): TValue | undefined {
|
|
101
|
+
return typeof candidate === 'string' && values.includes(candidate as TValue) ? (candidate as TValue) : undefined;
|
|
102
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ColorScheme } from './ColorScheme';
|
|
5
|
+
import { LayoutConfigState } from './LayoutConfigState';
|
|
6
|
+
import { LayoutMode } from './LayoutMode';
|
|
7
|
+
import { MenuTheme } from './MenuTheme';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The viewport width, in CSS pixels, below which the shell stops honoring the chosen {@link LayoutMode}
|
|
11
|
+
* and forces the off-canvas one. 991 is the breakpoint the PrimeTek template line uses throughout; the
|
|
12
|
+
* value is exported rather than buried in a media query so the resize listener and the stylesheet cannot
|
|
13
|
+
* disagree about where the boundary is.
|
|
14
|
+
*/
|
|
15
|
+
export const mobileBreakpoint = 991;
|
|
16
|
+
|
|
17
|
+
/** The media query the shell watches to know whether it is in the mobile regime. */
|
|
18
|
+
export const mobileMediaQuery = `(max-width: ${mobileBreakpoint}px)`;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Whether a viewport width falls in the mobile regime. Inclusive of the breakpoint itself, so this and
|
|
22
|
+
* {@link mobileMediaQuery}'s `max-width` agree on the boundary rather than disagreeing by one pixel.
|
|
23
|
+
*/
|
|
24
|
+
export function isMobileWidth(width: number): boolean {
|
|
25
|
+
return width <= mobileBreakpoint;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The state a shell starts in when nothing has been persisted: the docked sidebar every application
|
|
30
|
+
* template defaults to, on a light scheme, with the theme this package ships as its light one.
|
|
31
|
+
*/
|
|
32
|
+
export function defaultLayoutConfigState(): LayoutConfigState {
|
|
33
|
+
return {
|
|
34
|
+
mode: LayoutMode.Static,
|
|
35
|
+
menuTheme: MenuTheme.Light,
|
|
36
|
+
colorScheme: ColorScheme.Light,
|
|
37
|
+
themeName: 'Scene Default Light',
|
|
38
|
+
isSidebarOpen: true,
|
|
39
|
+
isSidebarAnchored: false,
|
|
40
|
+
isSidebarRevealed: false,
|
|
41
|
+
isMobile: false,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The mode the shell actually renders, as opposed to the one the user picked.
|
|
47
|
+
*
|
|
48
|
+
* Below the mobile breakpoint every mode collapses to {@link LayoutMode.Overlay}: a docked 18rem sidebar,
|
|
49
|
+
* an icon rail or a horizontal menu strip are all unusable on a phone, so the template line forces
|
|
50
|
+
* off-canvas there and hides the mode picker. Deriving it rather than overwriting `mode` is what lets the
|
|
51
|
+
* chosen mode come back untouched when the viewport grows again.
|
|
52
|
+
*/
|
|
53
|
+
export function effectiveLayoutMode(state: LayoutConfigState): LayoutMode {
|
|
54
|
+
return state.isMobile ? LayoutMode.Overlay : state.mode;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** Whether the mode keeps the sidebar off-canvas until something opens it. */
|
|
58
|
+
export function isOffCanvasMode(mode: LayoutMode): boolean {
|
|
59
|
+
return mode === LayoutMode.Overlay;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/** Whether the mode is one of the two that react to the pointer - `reveal` slides in, `drawer` grows. */
|
|
63
|
+
export function isPointerRevealMode(mode: LayoutMode): boolean {
|
|
64
|
+
return mode === LayoutMode.Reveal || mode === LayoutMode.Drawer;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Chooses a different mode.
|
|
69
|
+
*
|
|
70
|
+
* Switching also resets the sidebar's transient state, because "open" means something different in each
|
|
71
|
+
* mode: a static sidebar starts docked, every other mode starts closed, and a reveal/drawer panel that
|
|
72
|
+
* was hovered out must not stay out under a mode that has no hover behavior. The pin survives, since it
|
|
73
|
+
* is a preference rather than transient state.
|
|
74
|
+
*/
|
|
75
|
+
export function withMode(state: LayoutConfigState, mode: LayoutMode): LayoutConfigState {
|
|
76
|
+
return { ...state, mode, isSidebarOpen: mode === LayoutMode.Static, isSidebarRevealed: false };
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Records that the viewport crossed the mobile breakpoint.
|
|
81
|
+
*
|
|
82
|
+
* Entering the mobile regime closes the sidebar so the page is not covered on arrival; leaving it
|
|
83
|
+
* restores whatever the chosen mode considers its resting state. Both directions are recomputed rather
|
|
84
|
+
* than remembered, so a mode switch made while mobile still lands correctly on the way back out.
|
|
85
|
+
*/
|
|
86
|
+
export function withMobile(state: LayoutConfigState, isMobile: boolean): LayoutConfigState {
|
|
87
|
+
if (state.isMobile === isMobile) {
|
|
88
|
+
return state;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
return {
|
|
92
|
+
...state,
|
|
93
|
+
isMobile,
|
|
94
|
+
isSidebarOpen: isMobile ? false : state.mode === LayoutMode.Static,
|
|
95
|
+
isSidebarRevealed: false,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/** Opens or closes the sidebar. */
|
|
100
|
+
export function withSidebarOpen(state: LayoutConfigState, isSidebarOpen: boolean): LayoutConfigState {
|
|
101
|
+
return { ...state, isSidebarOpen };
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/** Flips the sidebar between open and closed - what the topbar's menu button does in every mode. */
|
|
105
|
+
export function toggleSidebar(state: LayoutConfigState): LayoutConfigState {
|
|
106
|
+
return withSidebarOpen(state, !state.isSidebarOpen);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Holds a `reveal`/`drawer` sidebar out, or lets it fall back.
|
|
111
|
+
*
|
|
112
|
+
* An anchored sidebar ignores the pointer entirely - that is the whole point of pinning it - so this is a
|
|
113
|
+
* no-op while {@link LayoutConfigState.isSidebarAnchored} is set rather than something the pointer can
|
|
114
|
+
* fight with.
|
|
115
|
+
*/
|
|
116
|
+
export function withSidebarRevealed(state: LayoutConfigState, isSidebarRevealed: boolean): LayoutConfigState {
|
|
117
|
+
if (state.isSidebarAnchored) {
|
|
118
|
+
return state;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return { ...state, isSidebarRevealed };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Pins or unpins a `reveal`/`drawer` sidebar. Pinning implies revealed, so the panel does not snap shut
|
|
126
|
+
* the moment the pointer leaves the pin button that just pinned it.
|
|
127
|
+
*/
|
|
128
|
+
export function withSidebarAnchored(state: LayoutConfigState, isSidebarAnchored: boolean): LayoutConfigState {
|
|
129
|
+
return { ...state, isSidebarAnchored, isSidebarRevealed: isSidebarAnchored };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** Flips the pin - what the sidebar's anchor button does. */
|
|
133
|
+
export function toggleSidebarAnchor(state: LayoutConfigState): LayoutConfigState {
|
|
134
|
+
return withSidebarAnchored(state, !state.isSidebarAnchored);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** Chooses the light/dark axis. */
|
|
138
|
+
export function withColorScheme(state: LayoutConfigState, colorScheme: ColorScheme): LayoutConfigState {
|
|
139
|
+
return { ...state, colorScheme };
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/** Chooses how the sidebar surface is tinted. */
|
|
143
|
+
export function withMenuTheme(state: LayoutConfigState, menuTheme: MenuTheme): LayoutConfigState {
|
|
144
|
+
return { ...state, menuTheme };
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** Records which {@link Theme} is applied, so a theme switcher reflects the truth after a host-driven change. */
|
|
148
|
+
export function withThemeName(state: LayoutConfigState, themeName: string): LayoutConfigState {
|
|
149
|
+
return { ...state, themeName };
|
|
150
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { LayoutConfigState } from './LayoutConfigState';
|
|
5
|
+
import { LayoutMode } from './LayoutMode';
|
|
6
|
+
import { effectiveLayoutMode, isPointerRevealMode } from './layoutConfigTransitions';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Turns the shell's state into the wrapper class list its stylesheet keys off - the single seam between
|
|
10
|
+
* the state machine and the CSS.
|
|
11
|
+
*
|
|
12
|
+
* Every class name here is the one the PrimeTek template line already uses (`layout-static`,
|
|
13
|
+
* `layout-overlay-active`, `layout-sidebar-anchored`, `layout-mobile-active`, ...), so a stylesheet
|
|
14
|
+
* written against those templates keeps working and anyone who has themed one can read this shell's DOM
|
|
15
|
+
* without a translation table.
|
|
16
|
+
*
|
|
17
|
+
* The mode class reflects the *effective* mode, so the off-canvas rules a phone needs come from the same
|
|
18
|
+
* `layout-overlay` block a desktop overlay uses instead of a parallel mobile-only ruleset. The chosen mode
|
|
19
|
+
* is still emitted separately as `data-layout-mode`, so a configurator can show what the user picked even
|
|
20
|
+
* while the viewport overrides it.
|
|
21
|
+
*
|
|
22
|
+
* @param state The current shell state.
|
|
23
|
+
* @returns The classes to put on the shell's wrapper element, always starting with `layout-wrapper`.
|
|
24
|
+
*/
|
|
25
|
+
export function layoutWrapperClasses(state: LayoutConfigState): string[] {
|
|
26
|
+
const mode = effectiveLayoutMode(state);
|
|
27
|
+
const classes = [
|
|
28
|
+
'layout-wrapper',
|
|
29
|
+
`layout-${mode}`,
|
|
30
|
+
`layout-menu-${state.menuTheme}`,
|
|
31
|
+
`layout-color-scheme-${state.colorScheme}`,
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
if (mode === LayoutMode.Static && !state.isSidebarOpen) {
|
|
35
|
+
classes.push('layout-static-inactive');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (mode === LayoutMode.Overlay && state.isSidebarOpen && !state.isMobile) {
|
|
39
|
+
classes.push('layout-overlay-active');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
if (isPointerRevealMode(mode) && state.isSidebarRevealed) {
|
|
43
|
+
classes.push('layout-sidebar-active');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (isPointerRevealMode(mode) && state.isSidebarAnchored) {
|
|
47
|
+
classes.push('layout-sidebar-anchored');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
if (state.isMobile) {
|
|
51
|
+
classes.push('layout-mobile');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (state.isMobile && state.isSidebarOpen) {
|
|
55
|
+
classes.push('layout-mobile-active');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return classes;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Whether the scrim that dims the content behind a floating sidebar should be showing. Overlay and mobile
|
|
63
|
+
* both cover the page, and both need the click-anywhere-to-close the mask provides; a docked or rail
|
|
64
|
+
* sidebar covers nothing and must not dim anything.
|
|
65
|
+
*/
|
|
66
|
+
export function isLayoutMaskVisible(state: LayoutConfigState): boolean {
|
|
67
|
+
return effectiveLayoutMode(state) === LayoutMode.Overlay && state.isSidebarOpen;
|
|
68
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { PackageKind, ScenePackage } from '@cratis/scene.model';
|
|
5
|
+
import { ScenePackageBundle } from '@cratis/scene.react';
|
|
6
|
+
import { ComponentName } from './ComponentName';
|
|
7
|
+
import { defaultBlueprintComponents } from './defaultBlueprintComponents';
|
|
8
|
+
import { galleryDialogTemplates, galleryScreenTemplates, galleryScreens } from './gallery';
|
|
9
|
+
import { LayoutName, defaultLayouts } from './layouts';
|
|
10
|
+
import { defaultBlueprintName } from './packageName';
|
|
11
|
+
import { defaultBlueprintThemes } from './themes';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The default blueprint's declaration.
|
|
15
|
+
*
|
|
16
|
+
* A blueprint is the package an application picks once to get a coherent shape: the {@link Layout}s that
|
|
17
|
+
* are its base navigational look, the {@link ScreenTemplate}s and {@link DialogTemplate}s that go inside
|
|
18
|
+
* them, the components that fill their slots, and the themes that color all of it. Picking the parts
|
|
19
|
+
* separately is how an application ends up with a sidebar from one design language and a form from
|
|
20
|
+
* another.
|
|
21
|
+
*
|
|
22
|
+
* The dependency list is what makes a blueprint honest about what it is built from. This one declares
|
|
23
|
+
* PrimeReact - the shell's buttons, breadcrumb, overlay menu and drawer are PrimeReact 10 components - and
|
|
24
|
+
* Cratis Components, which its screen templates fill their content with. A profile that activated this
|
|
25
|
+
* blueprint without them would render a shell whose every control was a dashed red placeholder, and
|
|
26
|
+
* `resolvePackageDependencies` exists to catch that when the profile is configured rather than when
|
|
27
|
+
* someone opens the page.
|
|
28
|
+
*
|
|
29
|
+
* `layouts` lists only true application shells. A dashboard, a CRUD list or a sign-in screen is a screen
|
|
30
|
+
* template, not a layout, and is listed as one.
|
|
31
|
+
*/
|
|
32
|
+
export const defaultBlueprintManifest: ScenePackage = {
|
|
33
|
+
name: defaultBlueprintName,
|
|
34
|
+
version: '1.0.0',
|
|
35
|
+
kind: PackageKind.Blueprint,
|
|
36
|
+
dependencies: [{ name: 'PrimeReact' }, { name: 'Cratis.Components' }],
|
|
37
|
+
components: Object.values(ComponentName),
|
|
38
|
+
layouts: Object.values(LayoutName),
|
|
39
|
+
screenTemplates: galleryScreenTemplates.map(template => template.name),
|
|
40
|
+
dialogTemplates: galleryDialogTemplates.map(template => template.name),
|
|
41
|
+
themes: defaultBlueprintThemes.map(theme => theme.name),
|
|
42
|
+
displayName: 'Cratis Default Blueprint',
|
|
43
|
+
description: 'Application shells with eight menu modes, the components that fill their slots, and a full screen and dialog template set.',
|
|
44
|
+
module: '@cratis/scene.blueprint.default',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* The default blueprint as a loadable bundle.
|
|
49
|
+
*
|
|
50
|
+
* The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and
|
|
51
|
+
* this package's specs run it - a manifest promising a component the bundle never registered renders as a
|
|
52
|
+
* dashed red placeholder somewhere deep inside a screen, a long way from the declaration that caused it.
|
|
53
|
+
*
|
|
54
|
+
* The screens are the gallery: real {@link Screen} instances naming a layout, a screen template and the
|
|
55
|
+
* content that fills it, so a preview boots them through the real engine as a working miniature
|
|
56
|
+
* application rather than a set of pictures.
|
|
57
|
+
*/
|
|
58
|
+
export const defaultBlueprint: ScenePackageBundle = {
|
|
59
|
+
manifest: defaultBlueprintManifest,
|
|
60
|
+
components: defaultBlueprintComponents,
|
|
61
|
+
layouts: defaultLayouts,
|
|
62
|
+
screenTemplates: galleryScreenTemplates,
|
|
63
|
+
dialogTemplates: galleryDialogTemplates,
|
|
64
|
+
screens: galleryScreens,
|
|
65
|
+
themes: defaultBlueprintThemes,
|
|
66
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';
|
|
5
|
+
import { ComponentName } from './ComponentName';
|
|
6
|
+
import { defaultBlueprintName } from './packageName';
|
|
7
|
+
import {
|
|
8
|
+
AppShell,
|
|
9
|
+
Breadcrumb,
|
|
10
|
+
ConfigPanel,
|
|
11
|
+
Footer,
|
|
12
|
+
FullPageShell,
|
|
13
|
+
LayoutModeSwitcher,
|
|
14
|
+
Logo,
|
|
15
|
+
Mask,
|
|
16
|
+
Menu,
|
|
17
|
+
MenuItem,
|
|
18
|
+
PageHeader,
|
|
19
|
+
RightPanel,
|
|
20
|
+
Sidebar,
|
|
21
|
+
ThemeSwitcher,
|
|
22
|
+
Topbar,
|
|
23
|
+
UserMenu,
|
|
24
|
+
} from './shell';
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The components this package registers, keyed the way the renderer looks them up.
|
|
28
|
+
*
|
|
29
|
+
* Every key is built with `componentRegistryKey` rather than written out, because the separator between
|
|
30
|
+
* package and component name is the registry's own business - it is deliberately not the `.` a screen uses
|
|
31
|
+
* to qualify a name, so that a package name containing dots stays unambiguous. Building a key by hand is
|
|
32
|
+
* how a component ends up registered under something no lookup will ever produce.
|
|
33
|
+
*/
|
|
34
|
+
export const defaultBlueprintComponents: ComponentRegistry = {
|
|
35
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.AppShell)]: AppShell,
|
|
36
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.FullPageShell)]: FullPageShell,
|
|
37
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.Topbar)]: Topbar,
|
|
38
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.Sidebar)]: Sidebar,
|
|
39
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.Menu)]: Menu,
|
|
40
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.MenuItem)]: MenuItem,
|
|
41
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.Breadcrumb)]: Breadcrumb,
|
|
42
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.Footer)]: Footer,
|
|
43
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.RightPanel)]: RightPanel,
|
|
44
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.ConfigPanel)]: ConfigPanel,
|
|
45
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.PageHeader)]: PageHeader,
|
|
46
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.Mask)]: Mask,
|
|
47
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.Logo)]: Logo,
|
|
48
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.UserMenu)]: UserMenu,
|
|
49
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.ThemeSwitcher)]: ThemeSwitcher,
|
|
50
|
+
[componentRegistryKey(defaultBlueprintName, ComponentName.LayoutModeSwitcher)]: LayoutModeSwitcher,
|
|
51
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* The bare names this package declares components under.
|
|
7
|
+
*
|
|
8
|
+
* A page template writes a bare name and `resolveComponentName` decides which active package wins it, so
|
|
9
|
+
* these names are public API: renaming one breaks every template that referenced it, in this package and
|
|
10
|
+
* in anyone else's. Keeping them in one enum means the manifest, the registry and every template
|
|
11
|
+
* reference the same symbol, and the specs can prove all three agree rather than hoping they do.
|
|
12
|
+
*/ var ComponentName = /*#__PURE__*/ function(ComponentName) {
|
|
13
|
+
/** The application shell - topbar, sidebar, breadcrumb, content, footer and an optional right panel. */ ComponentName["AppShell"] = "appShell";
|
|
14
|
+
/** The chrome-less shell - content, an optional branding aside, and the configurator. */ ComponentName["FullPageShell"] = "fullPageShell";
|
|
15
|
+
/** The fixed strip across the top of the application shell. */ ComponentName["Topbar"] = "topbar";
|
|
16
|
+
/** The sidebar's own chrome, inside the shell-positioned panel. */ ComponentName["Sidebar"] = "sidebar";
|
|
17
|
+
/** A navigation list. */ ComponentName["Menu"] = "menu";
|
|
18
|
+
/** One entry in a navigation list, optionally with a submenu. */ ComponentName["MenuItem"] = "menuItem";
|
|
19
|
+
/** The trail above the content. */ ComponentName["Breadcrumb"] = "breadcrumb";
|
|
20
|
+
/** The strip below the content. */ ComponentName["Footer"] = "footer";
|
|
21
|
+
/** The inspector panel down the right-hand edge. */ ComponentName["RightPanel"] = "rightPanel";
|
|
22
|
+
/** The floating configurator: color scheme, layout mode, menu theme and theme. */ ComponentName["ConfigPanel"] = "configPanel";
|
|
23
|
+
/** A screen's title, subtitle and actions. */ ComponentName["PageHeader"] = "pageHeader";
|
|
24
|
+
/** The scrim behind a floating sidebar, which also closes it. */ ComponentName["Mask"] = "mask";
|
|
25
|
+
/** The brand mark. */ ComponentName["Logo"] = "logo";
|
|
26
|
+
/** The signed-in user's avatar and menu. */ ComponentName["UserMenu"] = "userMenu";
|
|
27
|
+
/** Switches between the themes a host offers. */ ComponentName["ThemeSwitcher"] = "themeSwitcher";
|
|
28
|
+
/** Switches between the layout modes. */ ComponentName["LayoutModeSwitcher"] = "layoutModeSwitcher";
|
|
29
|
+
return ComponentName;
|
|
30
|
+
}({});
|
|
31
|
+
|
|
32
|
+
exports.ComponentName = ComponentName;
|
|
33
|
+
//# 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,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* The light/dark axis of the configurator.
|
|
7
|
+
*
|
|
8
|
+
* The shell never paints a color for a scheme itself - it only records which one is chosen, so the host
|
|
9
|
+
* can hand {@link SceneThemeProvider} a matching {@link Theme}. Keeping the choice and the palette apart
|
|
10
|
+
* is what lets a third-party theme participate in the same switch as the two this package ships.
|
|
11
|
+
*/ var ColorScheme = /*#__PURE__*/ function(ColorScheme) {
|
|
12
|
+
ColorScheme["Light"] = "light";
|
|
13
|
+
ColorScheme["Dark"] = "dark";
|
|
14
|
+
return ColorScheme;
|
|
15
|
+
}({});
|
|
16
|
+
/** Every {@link ColorScheme}, in the order a configurator should offer them. */ const colorSchemes = [
|
|
17
|
+
"light",
|
|
18
|
+
"dark"
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
exports.ColorScheme = ColorScheme;
|
|
22
|
+
exports.colorSchemes = colorSchemes;
|
|
23
|
+
//# 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,96 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var layoutConfigStorage = require('./layoutConfigStorage.js');
|
|
6
|
+
var layoutWrapperClasses = require('./layoutWrapperClasses.js');
|
|
7
|
+
var layoutConfigTransitions = require('./layoutConfigTransitions.js');
|
|
8
|
+
|
|
9
|
+
const LayoutConfigContext = /*#__PURE__*/ react.createContext(undefined);
|
|
10
|
+
/**
|
|
11
|
+
* Owns the shell's configuration and keeps it in step with the viewport and with `localStorage`.
|
|
12
|
+
*
|
|
13
|
+
* One provider rather than state per shell component is what makes the modes work at all: the topbar's
|
|
14
|
+
* toggle, the sidebar's pin, the mask's click-to-close and the configurator's mode picker are four
|
|
15
|
+
* different components acting on one machine. It is also what makes a chosen mode survive a reload, which
|
|
16
|
+
* is the whole reason a mode picker is worth having.
|
|
17
|
+
*/ function LayoutConfigProvider({ initialConfig, storage, viewportWidth, children }) {
|
|
18
|
+
const resolvedStorage = react.useMemo(()=>storage !== undefined ? storage ?? undefined : defaultStorage(), [
|
|
19
|
+
storage
|
|
20
|
+
]);
|
|
21
|
+
const [config, setConfig] = react.useState(()=>({
|
|
22
|
+
...layoutConfigStorage.readPersistedLayoutConfig(resolvedStorage),
|
|
23
|
+
...initialConfig
|
|
24
|
+
}));
|
|
25
|
+
react.useEffect(()=>{
|
|
26
|
+
layoutConfigStorage.persistLayoutConfig(config, resolvedStorage);
|
|
27
|
+
}, [
|
|
28
|
+
config,
|
|
29
|
+
resolvedStorage
|
|
30
|
+
]);
|
|
31
|
+
const isReportedMobile = viewportWidth === undefined ? undefined : layoutConfigTransitions.isMobileWidth(viewportWidth);
|
|
32
|
+
react.useEffect(()=>{
|
|
33
|
+
if (isReportedMobile !== undefined) {
|
|
34
|
+
setConfig((current)=>layoutConfigTransitions.withMobile(current, isReportedMobile));
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const query = window.matchMedia(layoutConfigTransitions.mobileMediaQuery);
|
|
41
|
+
setConfig((current)=>layoutConfigTransitions.withMobile(current, query.matches));
|
|
42
|
+
const listener = (event)=>setConfig((current)=>layoutConfigTransitions.withMobile(current, event.matches));
|
|
43
|
+
query.addEventListener('change', listener);
|
|
44
|
+
return ()=>query.removeEventListener('change', listener);
|
|
45
|
+
}, [
|
|
46
|
+
isReportedMobile
|
|
47
|
+
]);
|
|
48
|
+
const value = react.useMemo(()=>({
|
|
49
|
+
config,
|
|
50
|
+
effectiveMode: layoutConfigTransitions.effectiveLayoutMode(config),
|
|
51
|
+
wrapperClasses: layoutWrapperClasses.layoutWrapperClasses(config),
|
|
52
|
+
isMaskVisible: layoutWrapperClasses.isLayoutMaskVisible(config),
|
|
53
|
+
setMode: (mode)=>setConfig((current)=>layoutConfigTransitions.withMode(current, mode)),
|
|
54
|
+
setMenuTheme: (menuTheme)=>setConfig((current)=>layoutConfigTransitions.withMenuTheme(current, menuTheme)),
|
|
55
|
+
setColorScheme: (colorScheme)=>setConfig((current)=>layoutConfigTransitions.withColorScheme(current, colorScheme)),
|
|
56
|
+
setThemeName: (themeName)=>setConfig((current)=>layoutConfigTransitions.withThemeName(current, themeName)),
|
|
57
|
+
setSidebarOpen: (isOpen)=>setConfig((current)=>layoutConfigTransitions.withSidebarOpen(current, isOpen)),
|
|
58
|
+
toggleSidebar: ()=>setConfig(layoutConfigTransitions.toggleSidebar),
|
|
59
|
+
setSidebarRevealed: (isRevealed)=>setConfig((current)=>layoutConfigTransitions.withSidebarRevealed(current, isRevealed)),
|
|
60
|
+
toggleSidebarAnchor: ()=>setConfig(layoutConfigTransitions.toggleSidebarAnchor)
|
|
61
|
+
}), [
|
|
62
|
+
config
|
|
63
|
+
]);
|
|
64
|
+
return /*#__PURE__*/ jsxRuntime.jsx(LayoutConfigContext.Provider, {
|
|
65
|
+
value: value,
|
|
66
|
+
children: children
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The shell configuration, or `undefined` when there is no {@link LayoutConfigProvider} above.
|
|
71
|
+
*
|
|
72
|
+
* This is what lets the shell components put a provider around themselves when a host has not - a gallery
|
|
73
|
+
* preview drops a single `appShell` element into a renderer with no wrapper of its own, and it still has
|
|
74
|
+
* to work.
|
|
75
|
+
*/ function useOptionalLayoutConfig() {
|
|
76
|
+
return react.useContext(LayoutConfigContext);
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The shell configuration. Throws when there is no {@link LayoutConfigProvider} above, because every
|
|
80
|
+
* alternative - a silent default, a no-op setter - produces a shell whose buttons do nothing and says
|
|
81
|
+
* nothing about why.
|
|
82
|
+
*/ function useLayoutConfig() {
|
|
83
|
+
const value = useOptionalLayoutConfig();
|
|
84
|
+
if (!value) {
|
|
85
|
+
throw new Error('useLayoutConfig() requires a <LayoutConfigProvider> above it.');
|
|
86
|
+
}
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
function defaultStorage() {
|
|
90
|
+
return typeof window !== 'undefined' ? window.localStorage : undefined;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
exports.LayoutConfigProvider = LayoutConfigProvider;
|
|
94
|
+
exports.useLayoutConfig = useLayoutConfig;
|
|
95
|
+
exports.useOptionalLayoutConfig = useOptionalLayoutConfig;
|
|
96
|
+
//# 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,mBAAAA,CAAoDC,SAAAA,CAAAA;AAwBhF;;;;;;;IAQO,SAASC,oBAAAA,CAAqB,EAAEC,aAAa,EAAEC,OAAO,EAAEC,aAAa,EAAEC,QAAQ,EAA6B,EAAA;AAC/G,IAAA,MAAMC,kBAAkBC,aAAAA,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,cAAAA,CAA4B,KAAO;AAC3D,YAAA,GAAGC,8CAA0BN,eAAAA,CAAgB;AAC7C,YAAA,GAAGJ;SACP,CAAA,CAAA;IAEAW,eAAAA,CAAU,IAAA;AACNC,QAAAA,uCAAAA,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,qCAAAA,CAAcZ,aAAAA,CAAAA;IACjFS,eAAAA,CAAU,IAAA;AACN,QAAA,IAAIE,qBAAqBf,SAAAA,EAAW;YAChCU,SAAAA,CAAUO,CAAAA,OAAAA,GAAWC,kCAAAA,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,wCAAAA,CAAAA;AAChCZ,QAAAA,SAAAA,CAAUO,CAAAA,OAAAA,GAAWC,kCAAAA,CAAWD,OAAAA,EAASI,MAAME,OAAO,CAAA,CAAA;QAEtD,MAAMC,QAAAA,GAAW,CAACC,KAAAA,GAA+Bf,SAAAA,CAAUO,CAAAA,OAAAA,GAAWC,kCAAAA,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,aAAAA,CACV,KAAO;AACHE,YAAAA,MAAAA;AACAoB,YAAAA,aAAAA,EAAeC,2CAAAA,CAAoBrB,MAAAA,CAAAA;AACnCsB,YAAAA,cAAAA,EAAgBC,yCAAAA,CAAqBvB,MAAAA,CAAAA;AACrCwB,YAAAA,aAAAA,EAAeC,wCAAAA,CAAoBzB,MAAAA,CAAAA;AACnC0B,YAAAA,OAAAA,EAASC,CAAAA,IAAAA,GAAQ1B,SAAAA,CAAUO,CAAAA,OAAAA,GAAWoB,iCAASpB,OAAAA,EAASmB,IAAAA,CAAAA,CAAAA;AACxDE,YAAAA,YAAAA,EAAcC,CAAAA,SAAAA,GAAa7B,SAAAA,CAAUO,CAAAA,OAAAA,GAAWuB,sCAAcvB,OAAAA,EAASsB,SAAAA,CAAAA,CAAAA;AACvEE,YAAAA,cAAAA,EAAgBC,CAAAA,WAAAA,GAAehC,SAAAA,CAAUO,CAAAA,OAAAA,GAAW0B,wCAAgB1B,OAAAA,EAASyB,WAAAA,CAAAA,CAAAA;AAC7EE,YAAAA,YAAAA,EAAcC,CAAAA,SAAAA,GAAanC,SAAAA,CAAUO,CAAAA,OAAAA,GAAW6B,sCAAc7B,OAAAA,EAAS4B,SAAAA,CAAAA,CAAAA;AACvEE,YAAAA,cAAAA,EAAgBC,CAAAA,MAAAA,GAAUtC,SAAAA,CAAUO,CAAAA,OAAAA,GAAWgC,wCAAgBhC,OAAAA,EAAS+B,MAAAA,CAAAA,CAAAA;AACxEE,YAAAA,aAAAA,EAAe,IAAMxC,SAAAA,CAAUwC,qCAAAA,CAAAA;AAC/BC,YAAAA,kBAAAA,EAAoBC,CAAAA,UAAAA,GAAc1C,SAAAA,CAAUO,CAAAA,OAAAA,GAAWoC,4CAAoBpC,OAAAA,EAASmC,UAAAA,CAAAA,CAAAA;AACpFE,YAAAA,mBAAAA,EAAqB,IAAM5C,SAAAA,CAAU4C,2CAAAA;AACzC,SAAA,CAAA,EACA;AAAC7C,QAAAA;AAAO,KAAA,CAAA;IAGZ,qBAAO8C,cAAA,CAACzD,oBAAoB0D,QAAQ,EAAA;QAAC5B,KAAAA,EAAOA,KAAAA;AAAQvB,QAAAA,QAAAA,EAAAA;;AACxD;AAEA;;;;;;AAMC,IACM,SAASoD,uBAAAA,GAAAA;AACZ,IAAA,OAAOC,gBAAAA,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;;;;;;"}
|