@edsis/angular 22.1.3 → 22.2.8
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/LICENSE +21 -0
- package/README.md +87 -399
- package/SECURITY.md +18 -0
- package/SUPPORT.md +15 -0
- package/chart/README.md +272 -0
- package/component/README.md +89 -0
- package/component/accordion/README.md +195 -0
- package/component/alert/README.md +184 -0
- package/component/alert-dialog/README.md +255 -0
- package/component/aspect-ratio/README.md +116 -0
- package/component/avatar/README.md +182 -0
- package/component/badge/README.md +143 -0
- package/component/breadcrumb/README.md +223 -0
- package/component/button/README.md +141 -0
- package/component/button-group/README.md +214 -0
- package/component/calendar/README.md +125 -0
- package/component/card/README.md +232 -0
- package/component/carousel/README.md +276 -0
- package/component/checkbox/README.md +153 -0
- package/component/collapsible/README.md +216 -0
- package/component/combobox/README.md +202 -0
- package/component/command/README.md +287 -0
- package/component/composer/README.md +241 -0
- package/component/context-menu/README.md +268 -0
- package/component/date-picker/README.md +202 -0
- package/component/dialog/README.md +276 -0
- package/component/drawer/README.md +146 -0
- package/component/dropdown-menu/README.md +336 -0
- package/component/editor/README.md +152 -0
- package/component/empty/README.md +193 -0
- package/component/form/README.md +216 -0
- package/component/hover-card/README.md +150 -0
- package/component/icon/README.md +52 -0
- package/component/input/README.md +160 -0
- package/component/input-group/README.md +245 -0
- package/component/input-otp/README.md +331 -0
- package/component/item/README.md +254 -0
- package/component/kanban/README.md +81 -0
- package/component/kbd/README.md +141 -0
- package/component/label/README.md +137 -0
- package/component/menubar/README.md +270 -0
- package/component/native-select/README.md +176 -0
- package/component/navigation-menu/README.md +165 -0
- package/component/pagination/README.md +151 -0
- package/component/pillbox/README.md +68 -0
- package/component/popover/README.md +54 -0
- package/component/progress/README.md +160 -0
- package/component/radio/README.md +212 -0
- package/component/resizable/README.md +178 -0
- package/component/scroll-area/README.md +150 -0
- package/component/select/README.md +228 -0
- package/component/separator/README.md +175 -0
- package/component/sheet/README.md +190 -0
- package/component/skeleton/README.md +158 -0
- package/component/slider/README.md +207 -0
- package/component/spinner/README.md +160 -0
- package/component/switch/README.md +170 -0
- package/component/table/README.md +292 -0
- package/component/tabs/README.md +220 -0
- package/component/textarea/README.md +169 -0
- package/component/timeline/README.md +94 -0
- package/component/toast/README.md +173 -0
- package/component/toggle/README.md +133 -0
- package/component/toggle-group/README.md +234 -0
- package/component/tooltip/README.md +230 -0
- package/fesm2022/edsis-angular-chart-area.mjs +508 -0
- package/fesm2022/edsis-angular-chart-bar.mjs +946 -0
- package/fesm2022/edsis-angular-chart-core.mjs +1282 -0
- package/fesm2022/edsis-angular-chart-line.mjs +544 -0
- package/fesm2022/edsis-angular-chart-pie.mjs +524 -0
- package/fesm2022/edsis-angular-chart-primitives.mjs +1647 -0
- package/fesm2022/edsis-angular-chart-radar.mjs +693 -0
- package/fesm2022/edsis-angular-chart-radial.mjs +542 -0
- package/fesm2022/edsis-angular-chart-scatter.mjs +486 -0
- package/fesm2022/edsis-angular-chart.mjs +3 -0
- package/fesm2022/edsis-angular-component-accordion.mjs +513 -0
- package/fesm2022/edsis-angular-component-alert-dialog.mjs +1001 -0
- package/fesm2022/edsis-angular-component-alert.mjs +268 -0
- package/fesm2022/edsis-angular-component-aspect-ratio.mjs +80 -0
- package/fesm2022/edsis-angular-component-avatar.mjs +410 -0
- package/fesm2022/edsis-angular-component-badge.mjs +111 -0
- package/fesm2022/edsis-angular-component-breadcrumb.mjs +464 -0
- package/fesm2022/edsis-angular-component-button-group.mjs +252 -0
- package/fesm2022/edsis-angular-component-button.mjs +155 -0
- package/fesm2022/edsis-angular-component-calendar.mjs +835 -0
- package/fesm2022/edsis-angular-component-card.mjs +460 -0
- package/fesm2022/edsis-angular-component-carousel.mjs +700 -0
- package/fesm2022/edsis-angular-component-checkbox.mjs +398 -0
- package/fesm2022/edsis-angular-component-collapsible.mjs +305 -0
- package/fesm2022/edsis-angular-component-combobox.mjs +544 -0
- package/fesm2022/edsis-angular-component-command.mjs +815 -0
- package/fesm2022/edsis-angular-component-composer.mjs +840 -0
- package/fesm2022/edsis-angular-component-context-menu.mjs +197 -0
- package/fesm2022/edsis-angular-component-date-picker.mjs +798 -0
- package/fesm2022/edsis-angular-component-dialog.mjs +798 -0
- package/fesm2022/edsis-angular-component-drawer.mjs +2 -0
- package/fesm2022/edsis-angular-component-dropdown-menu.mjs +1259 -0
- package/fesm2022/edsis-angular-component-editor.mjs +1000 -0
- package/fesm2022/edsis-angular-component-empty.mjs +351 -0
- package/fesm2022/edsis-angular-component-form.mjs +821 -0
- package/fesm2022/edsis-angular-component-hover-card.mjs +486 -0
- package/fesm2022/edsis-angular-component-icon.mjs +253 -0
- package/fesm2022/edsis-angular-component-input-group.mjs +453 -0
- package/fesm2022/edsis-angular-component-input-otp.mjs +957 -0
- package/fesm2022/edsis-angular-component-input.mjs +87 -0
- package/fesm2022/edsis-angular-component-item.mjs +720 -0
- package/fesm2022/edsis-angular-component-kanban.mjs +812 -0
- package/fesm2022/edsis-angular-component-kbd.mjs +124 -0
- package/fesm2022/edsis-angular-component-label.mjs +82 -0
- package/fesm2022/edsis-angular-component-menubar.mjs +481 -0
- package/fesm2022/edsis-angular-component-native-select.mjs +168 -0
- package/fesm2022/edsis-angular-component-navigation-menu.mjs +685 -0
- package/fesm2022/edsis-angular-component-pagination.mjs +425 -0
- package/fesm2022/edsis-angular-component-pillbox.mjs +1679 -0
- package/fesm2022/edsis-angular-component-popover.mjs +292 -0
- package/fesm2022/edsis-angular-component-progress.mjs +184 -0
- package/fesm2022/edsis-angular-component-radio.mjs +491 -0
- package/fesm2022/edsis-angular-component-resizable.mjs +703 -0
- package/fesm2022/edsis-angular-component-scroll-area.mjs +133 -0
- package/fesm2022/edsis-angular-component-segmented-control.mjs +408 -0
- package/fesm2022/edsis-angular-component-select.mjs +743 -0
- package/fesm2022/edsis-angular-component-separator.mjs +102 -0
- package/fesm2022/edsis-angular-component-sheet.mjs +874 -0
- package/fesm2022/edsis-angular-component-skeleton.mjs +62 -0
- package/fesm2022/edsis-angular-component-slider.mjs +676 -0
- package/fesm2022/edsis-angular-component-spinner.mjs +157 -0
- package/fesm2022/edsis-angular-component-switch.mjs +361 -0
- package/fesm2022/edsis-angular-component-table.mjs +446 -0
- package/fesm2022/edsis-angular-component-tabs.mjs +592 -0
- package/fesm2022/edsis-angular-component-textarea.mjs +85 -0
- package/fesm2022/edsis-angular-component-timeline.mjs +619 -0
- package/fesm2022/edsis-angular-component-toast.mjs +231 -0
- package/fesm2022/edsis-angular-component-toggle-group.mjs +579 -0
- package/fesm2022/edsis-angular-component-toggle.mjs +189 -0
- package/fesm2022/edsis-angular-component-tooltip.mjs +804 -0
- package/fesm2022/edsis-angular-component-utils-core.mjs +181 -0
- package/fesm2022/edsis-angular-component-utils-overlay.mjs +54 -0
- package/fesm2022/edsis-angular-component-utils-scale.mjs +76 -0
- package/fesm2022/edsis-angular-component-utils.mjs +2 -0
- package/fesm2022/edsis-angular-component.mjs +0 -0
- package/fesm2022/edsis-angular-navigation-core.mjs +15 -0
- package/fesm2022/edsis-angular-navigation-icon.mjs +35 -0
- package/fesm2022/edsis-angular-navigation-navigation-badge-count.component-BWWWaUgy.mjs +234 -0
- package/fesm2022/edsis-angular-navigation-navigation-dockbar-menu.component-Bx2bxTID.mjs +834 -0
- package/fesm2022/edsis-angular-navigation-navigation-entry-grid.component-Duzt1ffz.mjs +823 -0
- package/fesm2022/edsis-angular-navigation-navigation-flyout-menu.component-cJ8Q1vM6.mjs +670 -0
- package/fesm2022/edsis-angular-navigation-navigation-horizontal.component-CDQ1wt2_.mjs +689 -0
- package/fesm2022/edsis-angular-navigation-navigation-item.component-C1VzerJp.mjs +1522 -0
- package/fesm2022/edsis-angular-navigation-navigation-list.component-BPYLfrID.mjs +346 -0
- package/fesm2022/edsis-angular-navigation-service.mjs +558 -0
- package/fesm2022/edsis-angular-navigation-types.mjs +151 -0
- package/fesm2022/edsis-angular-navigation.mjs +3338 -0
- package/fesm2022/edsis-angular-sdk.mjs +100 -0
- package/fesm2022/edsis-angular-theme-component-settings.mjs +1877 -0
- package/fesm2022/edsis-angular-theme-layout-services.mjs +252 -0
- package/fesm2022/edsis-angular-theme-layout-types.mjs +45 -0
- package/fesm2022/edsis-angular-theme-layout-wrapper.mjs +2568 -0
- package/fesm2022/edsis-angular-theme-layout.mjs +1089 -0
- package/fesm2022/edsis-angular-theme-page-core.mjs +315 -0
- package/fesm2022/edsis-angular-theme-page-filter.mjs +409 -0
- package/fesm2022/edsis-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/edsis-angular-theme-page-root.mjs +693 -0
- package/fesm2022/edsis-angular-theme-page-side.mjs +342 -0
- package/fesm2022/edsis-angular-theme-page-slots.mjs +258 -0
- package/fesm2022/edsis-angular-theme-page.mjs +7 -0
- package/fesm2022/edsis-angular-theme-shell-services.mjs +231 -0
- package/fesm2022/edsis-angular-theme-shell-types.mjs +102 -0
- package/fesm2022/edsis-angular-theme-shell.mjs +1352 -0
- package/fesm2022/edsis-angular-theme-styles.mjs +572 -0
- package/fesm2022/edsis-angular-theme.mjs +0 -0
- package/fesm2022/edsis-angular.mjs +5 -8
- package/navigation/README.md +576 -0
- package/package.json +477 -52
- package/sdk/README.md +212 -0
- package/sdk/schematics/collection.json +20 -0
- package/sdk/schematics/init/index.js +83 -0
- package/sdk/schematics/init/schema.json +19 -0
- package/sdk/schematics/ng-add/index.js +147 -0
- package/sdk/schematics/ng-add/schema.json +14 -0
- package/sdk/schematics/package.json +3 -0
- package/sdk/schematics/sdk/index.js +175 -0
- package/sdk/schematics/sdk/schema.json +19 -0
- package/sdk/sdk.config.example.json +24 -0
- package/sdk/src/config/loader.js +43 -0
- package/sdk/src/config/schema.js +59 -0
- package/sdk/src/emit/client.js +251 -0
- package/sdk/src/emit/metadata.js +310 -0
- package/sdk/src/emit/models.js +104 -0
- package/sdk/src/emit/navigation.js +56 -0
- package/sdk/src/emit/operations.js +118 -0
- package/sdk/src/emit/public-api.js +54 -0
- package/sdk/src/emit/services.js +110 -0
- package/sdk/src/engine.js +67 -0
- package/sdk/src/layout/per-domain.js +360 -0
- package/sdk/src/package.json +3 -0
- package/sdk/src/parser/bundle.js +25 -0
- package/sdk/src/parser/ir.js +429 -0
- package/sdk/src/parser/types.js +7 -0
- package/sdk/src/render/template.js +152 -0
- package/sdk/src/writer/index.js +286 -0
- package/theme/README.md +120 -0
- package/theme/component/settings/README.md +154 -0
- package/theme/layout/README.md +604 -0
- package/theme/page/README.md +505 -0
- package/theme/shell/README.md +344 -0
- package/theme/styles/README.md +202 -0
- package/theme/styles/css/base/components.css +577 -0
- package/theme/styles/css/base/index.css +14 -0
- package/theme/styles/css/base/package.css +9 -0
- package/theme/styles/css/base/prefers-dark.css +86 -0
- package/theme/styles/css/base/print.css +62 -0
- package/theme/styles/css/base/status.css +38 -0
- package/theme/styles/css/base/tailwind.css +208 -0
- package/theme/styles/css/base/theme.css +353 -0
- package/theme/styles/css/base/tokens.css +388 -0
- package/theme/styles/css/color/amber.css +72 -0
- package/theme/styles/css/color/blue.css +72 -0
- package/theme/styles/css/color/brand.css +38 -0
- package/theme/styles/css/color/cyan.css +72 -0
- package/theme/styles/css/color/emerald.css +72 -0
- package/theme/styles/css/color/fuchsia.css +72 -0
- package/theme/styles/css/color/green.css +72 -0
- package/theme/styles/css/color/index.css +19 -0
- package/theme/styles/css/color/indigo.css +72 -0
- package/theme/styles/css/color/lime.css +72 -0
- package/theme/styles/css/color/orange.css +72 -0
- package/theme/styles/css/color/pink.css +72 -0
- package/theme/styles/css/color/purple.css +72 -0
- package/theme/styles/css/color/red.css +72 -0
- package/theme/styles/css/color/rose.css +72 -0
- package/theme/styles/css/color/sky.css +72 -0
- package/theme/styles/css/color/teal.css +72 -0
- package/theme/styles/css/color/violet.css +72 -0
- package/theme/styles/css/color/yellow.css +72 -0
- package/theme/styles/css/fonts.css +85 -0
- package/theme/styles/css/index.css +18 -0
- package/theme/styles/css/neutral/gray.css +63 -0
- package/theme/styles/css/neutral/index.css +11 -0
- package/theme/styles/css/neutral/mauve.css +63 -0
- package/theme/styles/css/neutral/mist.css +63 -0
- package/theme/styles/css/neutral/neutral.css +63 -0
- package/theme/styles/css/neutral/olive.css +63 -0
- package/theme/styles/css/neutral/slate.css +63 -0
- package/theme/styles/css/neutral/stone.css +63 -0
- package/theme/styles/css/neutral/taupe.css +63 -0
- package/theme/styles/css/neutral/zinc.css +63 -0
- package/theme/styles/css/radius/index.css +30 -0
- package/theme/styles/css/space/index.css +20 -0
- package/types/edsis-angular-chart-area.d.ts +139 -0
- package/types/edsis-angular-chart-bar.d.ts +291 -0
- package/types/edsis-angular-chart-core.d.ts +822 -0
- package/types/edsis-angular-chart-line.d.ts +148 -0
- package/types/edsis-angular-chart-pie.d.ts +202 -0
- package/types/edsis-angular-chart-primitives.d.ts +360 -0
- package/types/edsis-angular-chart-radar.d.ts +198 -0
- package/types/edsis-angular-chart-radial.d.ts +187 -0
- package/types/edsis-angular-chart-scatter.d.ts +181 -0
- package/types/edsis-angular-chart.d.ts +3 -0
- package/types/edsis-angular-component-accordion.d.ts +139 -0
- package/types/edsis-angular-component-alert-dialog.d.ts +288 -0
- package/types/edsis-angular-component-alert.d.ts +72 -0
- package/types/edsis-angular-component-aspect-ratio.d.ts +20 -0
- package/types/edsis-angular-component-avatar.d.ts +111 -0
- package/types/edsis-angular-component-badge.d.ts +36 -0
- package/types/edsis-angular-component-breadcrumb.d.ts +85 -0
- package/types/edsis-angular-component-button-group.d.ts +50 -0
- package/types/edsis-angular-component-button.d.ts +44 -0
- package/types/edsis-angular-component-calendar.d.ts +150 -0
- package/types/edsis-angular-component-card.d.ts +123 -0
- package/types/edsis-angular-component-carousel.d.ts +155 -0
- package/types/edsis-angular-component-checkbox.d.ts +100 -0
- package/types/edsis-angular-component-collapsible.d.ts +68 -0
- package/types/edsis-angular-component-combobox.d.ts +105 -0
- package/types/edsis-angular-component-command.d.ts +215 -0
- package/types/edsis-angular-component-composer.d.ts +190 -0
- package/types/edsis-angular-component-context-menu.d.ts +64 -0
- package/types/edsis-angular-component-date-picker.d.ts +199 -0
- package/types/edsis-angular-component-dialog.d.ts +231 -0
- package/types/edsis-angular-component-drawer.d.ts +2 -0
- package/types/edsis-angular-component-dropdown-menu.d.ts +370 -0
- package/types/edsis-angular-component-editor.d.ts +234 -0
- package/types/edsis-angular-component-empty.d.ts +85 -0
- package/types/edsis-angular-component-form.d.ts +223 -0
- package/types/edsis-angular-component-hover-card.d.ts +133 -0
- package/types/edsis-angular-component-icon.d.ts +90 -0
- package/types/edsis-angular-component-input-group.d.ts +98 -0
- package/types/edsis-angular-component-input-otp.d.ts +249 -0
- package/types/edsis-angular-component-input.d.ts +31 -0
- package/types/edsis-angular-component-item.d.ts +169 -0
- package/types/edsis-angular-component-kanban.d.ts +165 -0
- package/types/edsis-angular-component-kbd.d.ts +25 -0
- package/types/edsis-angular-component-label.d.ts +19 -0
- package/types/edsis-angular-component-menubar.d.ts +123 -0
- package/types/edsis-angular-component-native-select.d.ts +39 -0
- package/types/edsis-angular-component-navigation-menu.d.ts +163 -0
- package/types/edsis-angular-component-pagination.d.ts +83 -0
- package/types/edsis-angular-component-pillbox.d.ts +380 -0
- package/types/edsis-angular-component-popover.d.ts +96 -0
- package/types/edsis-angular-component-progress.d.ts +45 -0
- package/types/edsis-angular-component-radio.d.ts +137 -0
- package/types/edsis-angular-component-resizable.d.ts +166 -0
- package/types/edsis-angular-component-scroll-area.d.ts +37 -0
- package/types/edsis-angular-component-segmented-control.d.ts +102 -0
- package/types/edsis-angular-component-select.d.ts +138 -0
- package/types/edsis-angular-component-separator.d.ts +26 -0
- package/types/edsis-angular-component-sheet.d.ts +240 -0
- package/types/edsis-angular-component-skeleton.d.ts +13 -0
- package/types/edsis-angular-component-slider.d.ts +148 -0
- package/types/edsis-angular-component-spinner.d.ts +31 -0
- package/types/edsis-angular-component-switch.d.ts +101 -0
- package/types/edsis-angular-component-table.d.ts +109 -0
- package/types/edsis-angular-component-tabs.d.ts +183 -0
- package/types/edsis-angular-component-textarea.d.ts +27 -0
- package/types/edsis-angular-component-timeline.d.ts +146 -0
- package/types/edsis-angular-component-toast.d.ts +60 -0
- package/types/edsis-angular-component-toggle-group.d.ts +161 -0
- package/types/edsis-angular-component-toggle.d.ts +47 -0
- package/types/edsis-angular-component-tooltip.d.ts +233 -0
- package/types/edsis-angular-component-utils-core.d.ts +175 -0
- package/types/edsis-angular-component-utils-overlay.d.ts +17 -0
- package/types/edsis-angular-component-utils-scale.d.ts +27 -0
- package/types/edsis-angular-component-utils.d.ts +2 -0
- package/types/edsis-angular-component.d.ts +1 -0
- package/types/edsis-angular-navigation-core.d.ts +55 -0
- package/types/edsis-angular-navigation-icon.d.ts +9 -0
- package/types/edsis-angular-navigation-service.d.ts +121 -0
- package/types/edsis-angular-navigation-types.d.ts +185 -0
- package/types/edsis-angular-navigation.d.ts +862 -0
- package/types/edsis-angular-sdk.d.ts +87 -0
- package/types/edsis-angular-theme-component-settings.d.ts +205 -0
- package/types/edsis-angular-theme-layout-services.d.ts +143 -0
- package/types/edsis-angular-theme-layout-types.d.ts +36 -0
- package/types/edsis-angular-theme-layout-wrapper.d.ts +670 -0
- package/types/edsis-angular-theme-layout.d.ts +218 -0
- package/types/edsis-angular-theme-page-core.d.ts +151 -0
- package/types/edsis-angular-theme-page-filter.d.ts +127 -0
- package/types/edsis-angular-theme-page-overview.d.ts +28 -0
- package/types/edsis-angular-theme-page-root.d.ts +172 -0
- package/types/edsis-angular-theme-page-side.d.ts +90 -0
- package/types/edsis-angular-theme-page-slots.d.ts +61 -0
- package/types/edsis-angular-theme-page.d.ts +7 -0
- package/types/edsis-angular-theme-shell-services.d.ts +188 -0
- package/types/edsis-angular-theme-shell-types.d.ts +102 -0
- package/types/edsis-angular-theme-shell.d.ts +178 -0
- package/types/edsis-angular-theme-styles.d.ts +295 -0
- package/types/edsis-angular-theme.d.ts +1 -0
- package/types/edsis-angular.d.ts +5 -2
- package/fesm2022/edsis-angular-block-shell.mjs +0 -1329
- package/fesm2022/edsis-angular-block-shell.mjs.map +0 -1
- package/fesm2022/edsis-angular-block-themes.mjs +0 -1007
- package/fesm2022/edsis-angular-block-themes.mjs.map +0 -1
- package/fesm2022/edsis-angular-module-auth.mjs +0 -2582
- package/fesm2022/edsis-angular-module-auth.mjs.map +0 -1
- package/fesm2022/edsis-angular-platform-mfe.mjs +0 -329
- package/fesm2022/edsis-angular-platform-mfe.mjs.map +0 -1
- package/fesm2022/edsis-angular-services-runtime.mjs +0 -385
- package/fesm2022/edsis-angular-services-runtime.mjs.map +0 -1
- package/fesm2022/edsis-angular.mjs.map +0 -1
- package/types/edsis-angular-block-shell.d.ts +0 -190
- package/types/edsis-angular-block-themes.d.ts +0 -94
- package/types/edsis-angular-module-auth.d.ts +0 -533
- package/types/edsis-angular-platform-mfe.d.ts +0 -126
- package/types/edsis-angular-services-runtime.d.ts +0 -118
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { SHELL_WINDOW_BRIDGE, ShellService, ShellService as ShellService$1, ShellWindowBridge, ShellWindowSnapshot, TauriShellBridgeOptions, TauriWindowHandle, WEB_SHELL_WINDOW_BRIDGE, createTauriShellWindowBridge, isTauriRuntime, provideShellWindowBridge, provideTauriShellWindowBridge } from "@edsis/angular/theme/shell/services";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { SHELL_COLORS, SHELL_COLOR_STORAGE_KEY, SHELL_DEFAULT_COLOR, SHELL_DEFAULT_DEVICE, SHELL_DEFAULT_FRAME, SHELL_DEFAULT_MODE, SHELL_DEFAULT_PLATFORM, SHELL_DEFAULT_WINDOW_STATE, SHELL_DEVICES, SHELL_DEVICE_STORAGE_KEY, SHELL_FRAMES, SHELL_FRAME_STORAGE_KEY, SHELL_MODES, SHELL_MODE_DEVICES, SHELL_MODE_STORAGE_KEY, SHELL_PLATFORMS, SHELL_WINDOW_STATES, ShellColor, ShellDevice, ShellFrame, ShellMode, ShellPlatform, ShellWindowState, defaultShellDeviceForMode, isShellColor, isShellDevice, isShellDeviceForMode, isShellFrame, isShellMode, isShellPlatform, isShellWindowState, normalizeShellColor, normalizeShellDevice, normalizeShellFrame, normalizeShellMode, resolveShellDeviceForMode, resolveShellFrameForMode, shellDevicesForMode } from "@edsis/angular/theme/shell/types";
|
|
4
|
+
/**
|
|
5
|
+
* Root of an application shell: the element that owns the whole surface, whether
|
|
6
|
+
* that is a browser tab, an OS window, a tablet, or a phone.
|
|
7
|
+
*
|
|
8
|
+
* A `<Shell>` holds the app directly — normally a `<Layout>` — plus, on
|
|
9
|
+
* `mode='desktop'`, a titlebar it renders itself:
|
|
10
|
+
*
|
|
11
|
+
* ```html
|
|
12
|
+
* <Shell mode="desktop" device="macos">
|
|
13
|
+
* <span shellBarTitle>Acme Studio</span>
|
|
14
|
+
*
|
|
15
|
+
* <Layout>
|
|
16
|
+
* <LayoutVertical>…</LayoutVertical>
|
|
17
|
+
* </Layout>
|
|
18
|
+
* </Shell>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* ## Fallback chain
|
|
22
|
+
*
|
|
23
|
+
* Every axis is optional, and each falls back rather than demanding a value:
|
|
24
|
+
*
|
|
25
|
+
* - `mode` — this input, else the stored `shell-mode`, else `desktop` when a
|
|
26
|
+
* desktop runtime is registered, else `web`.
|
|
27
|
+
* - `device` — this input, else the stored `shell-device`, else whatever the
|
|
28
|
+
* window bridge reports, else the mode's default device.
|
|
29
|
+
* - `color` — this input, else the stored `shell-color`, else `sync`.
|
|
30
|
+
* - `frame` — this input, else the stored `shell-frame`, else `classic`; only
|
|
31
|
+
* `desktop` can be `modern`.
|
|
32
|
+
*
|
|
33
|
+
* `mode` and `device` are always resolved as a coherent pair: a device that
|
|
34
|
+
* belongs to another form factor (`mode='desktop' device='ipad'`) is corrected to
|
|
35
|
+
* the mode's default, so `data-shell-device` never describes something the mode
|
|
36
|
+
* cannot be.
|
|
37
|
+
*
|
|
38
|
+
* Inputs are host declarations, not user preferences, so setting them never
|
|
39
|
+
* writes to storage — use `ShellService.setMode()` / `setDevice()` for a choice
|
|
40
|
+
* that should persist.
|
|
41
|
+
*/
|
|
42
|
+
export declare class ShellComponent {
|
|
43
|
+
protected readonly shell: ShellService$1;
|
|
44
|
+
/** Delivery target. `null` follows the stored/derived mode — see the class note. */
|
|
45
|
+
readonly mode: import("@angular/core").InputSignal<"web" | "desktop" | "tablet" | "mobile" | null>;
|
|
46
|
+
/** Host OS. `null` follows the stored/reported device, corrected to fit `mode`. */
|
|
47
|
+
readonly device: import("@angular/core").InputSignal<"browser" | "macos" | "windows" | "linux" | "ipad" | "android" | "ios" | null>;
|
|
48
|
+
/**
|
|
49
|
+
* Where the shell's own chrome takes its colors from. `sync` keeps the titlebar
|
|
50
|
+
* inside the design system; `default` paints the native look of the active
|
|
51
|
+
* device.
|
|
52
|
+
*/
|
|
53
|
+
readonly color: import("@angular/core").InputSignal<"sync" | "default" | null>;
|
|
54
|
+
/**
|
|
55
|
+
* How the app sits in its window. `classic` keeps it flush to the window edge
|
|
56
|
+
* under a bordered titlebar; `modern` insets it as a panel and fuses the titlebar
|
|
57
|
+
* with the surround into one continuous frame. Only meaningful on
|
|
58
|
+
* `mode='desktop'` — anything else resolves to `classic`.
|
|
59
|
+
*/
|
|
60
|
+
readonly frame: import("@angular/core").InputSignal<"classic" | "modern" | null>;
|
|
61
|
+
/**
|
|
62
|
+
* `true` when the runtime still draws its own window buttons, so the shell must
|
|
63
|
+
* not draw them: on macOS the titlebar reserves the leading run for the OS
|
|
64
|
+
* traffic lights (Tauri's `titleBarStyle: 'Overlay'`), and Windows / Linux draw
|
|
65
|
+
* nothing. Leave `false` for a `decorations: false` window, where the app owns
|
|
66
|
+
* the buttons — otherwise there would be no way to close it.
|
|
67
|
+
*/
|
|
68
|
+
readonly nativeWindowControls: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
69
|
+
/** Mark the exposed desktop frame and titlebar as drag surfaces below interactive content. */
|
|
70
|
+
readonly drag: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
71
|
+
/** Expose the titlebar as the `banner` landmark. Turn off for a nested preview. */
|
|
72
|
+
readonly landmark: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
73
|
+
readonly barAriaLabel: import("@angular/core").InputSignal<string>;
|
|
74
|
+
readonly minimizeLabel: import("@angular/core").InputSignal<string>;
|
|
75
|
+
readonly maximizeLabel: import("@angular/core").InputSignal<string>;
|
|
76
|
+
readonly restoreLabel: import("@angular/core").InputSignal<string>;
|
|
77
|
+
readonly closeLabel: import("@angular/core").InputSignal<string>;
|
|
78
|
+
/**
|
|
79
|
+
* Automatically surface the desktop layout's primary navigation as an icon
|
|
80
|
+
* flyout in the titlebar. macOS places it at the trailing edge; Windows and
|
|
81
|
+
* Linux place it at the leading edge.
|
|
82
|
+
*/
|
|
83
|
+
readonly navigationFlyout: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
84
|
+
readonly navigationFlyoutIcon: import("@angular/core").InputSignal<string>;
|
|
85
|
+
readonly navigationFlyoutLabel: import("@angular/core").InputSignal<string>;
|
|
86
|
+
readonly class: import("@angular/core").InputSignal<string>;
|
|
87
|
+
readonly resolvedMode: import("@angular/core").Signal<"web" | "desktop" | "tablet" | "mobile">;
|
|
88
|
+
readonly resolvedDevice: import("@angular/core").Signal<"browser" | "macos" | "windows" | "linux" | "ipad" | "android" | "ios">;
|
|
89
|
+
readonly resolvedColor: import("@angular/core").Signal<"sync" | "default">;
|
|
90
|
+
readonly resolvedFrame: import("@angular/core").Signal<"classic" | "modern">;
|
|
91
|
+
/** Only a desktop window has chrome of its own to draw. */
|
|
92
|
+
protected readonly showsBar: import("@angular/core").Signal<boolean>;
|
|
93
|
+
protected readonly hostClasses: import("@angular/core").Signal<string>;
|
|
94
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ShellComponent, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ShellComponent, "Shell", never, {
|
|
96
|
+
"mode": {
|
|
97
|
+
"alias": "mode";
|
|
98
|
+
"required": false;
|
|
99
|
+
"isSignal": true;
|
|
100
|
+
};
|
|
101
|
+
"device": {
|
|
102
|
+
"alias": "device";
|
|
103
|
+
"required": false;
|
|
104
|
+
"isSignal": true;
|
|
105
|
+
};
|
|
106
|
+
"color": {
|
|
107
|
+
"alias": "color";
|
|
108
|
+
"required": false;
|
|
109
|
+
"isSignal": true;
|
|
110
|
+
};
|
|
111
|
+
"frame": {
|
|
112
|
+
"alias": "frame";
|
|
113
|
+
"required": false;
|
|
114
|
+
"isSignal": true;
|
|
115
|
+
};
|
|
116
|
+
"nativeWindowControls": {
|
|
117
|
+
"alias": "nativeWindowControls";
|
|
118
|
+
"required": false;
|
|
119
|
+
"isSignal": true;
|
|
120
|
+
};
|
|
121
|
+
"drag": {
|
|
122
|
+
"alias": "drag";
|
|
123
|
+
"required": false;
|
|
124
|
+
"isSignal": true;
|
|
125
|
+
};
|
|
126
|
+
"landmark": {
|
|
127
|
+
"alias": "landmark";
|
|
128
|
+
"required": false;
|
|
129
|
+
"isSignal": true;
|
|
130
|
+
};
|
|
131
|
+
"barAriaLabel": {
|
|
132
|
+
"alias": "barAriaLabel";
|
|
133
|
+
"required": false;
|
|
134
|
+
"isSignal": true;
|
|
135
|
+
};
|
|
136
|
+
"minimizeLabel": {
|
|
137
|
+
"alias": "minimizeLabel";
|
|
138
|
+
"required": false;
|
|
139
|
+
"isSignal": true;
|
|
140
|
+
};
|
|
141
|
+
"maximizeLabel": {
|
|
142
|
+
"alias": "maximizeLabel";
|
|
143
|
+
"required": false;
|
|
144
|
+
"isSignal": true;
|
|
145
|
+
};
|
|
146
|
+
"restoreLabel": {
|
|
147
|
+
"alias": "restoreLabel";
|
|
148
|
+
"required": false;
|
|
149
|
+
"isSignal": true;
|
|
150
|
+
};
|
|
151
|
+
"closeLabel": {
|
|
152
|
+
"alias": "closeLabel";
|
|
153
|
+
"required": false;
|
|
154
|
+
"isSignal": true;
|
|
155
|
+
};
|
|
156
|
+
"navigationFlyout": {
|
|
157
|
+
"alias": "navigationFlyout";
|
|
158
|
+
"required": false;
|
|
159
|
+
"isSignal": true;
|
|
160
|
+
};
|
|
161
|
+
"navigationFlyoutIcon": {
|
|
162
|
+
"alias": "navigationFlyoutIcon";
|
|
163
|
+
"required": false;
|
|
164
|
+
"isSignal": true;
|
|
165
|
+
};
|
|
166
|
+
"navigationFlyoutLabel": {
|
|
167
|
+
"alias": "navigationFlyoutLabel";
|
|
168
|
+
"required": false;
|
|
169
|
+
"isSignal": true;
|
|
170
|
+
};
|
|
171
|
+
"class": {
|
|
172
|
+
"alias": "class";
|
|
173
|
+
"required": false;
|
|
174
|
+
"isSignal": true;
|
|
175
|
+
};
|
|
176
|
+
}, {}, never, ["[shellBarStart]", "[shellBarTitle]", "[shellBarEnd]", "*"], true, never>;
|
|
177
|
+
}
|
|
178
|
+
export { SHELL_COLORS, SHELL_COLOR_STORAGE_KEY, SHELL_DEFAULT_COLOR, SHELL_DEFAULT_DEVICE, SHELL_DEFAULT_FRAME, SHELL_DEFAULT_MODE, SHELL_DEFAULT_PLATFORM, SHELL_DEFAULT_WINDOW_STATE, SHELL_DEVICES, SHELL_DEVICE_STORAGE_KEY, SHELL_FRAMES, SHELL_FRAME_STORAGE_KEY, SHELL_MODES, SHELL_MODE_DEVICES, SHELL_MODE_STORAGE_KEY, SHELL_PLATFORMS, SHELL_WINDOW_BRIDGE, SHELL_WINDOW_STATES, type ShellColor, type ShellDevice, type ShellFrame, type ShellMode, type ShellPlatform, ShellService, type ShellWindowBridge, type ShellWindowSnapshot, type ShellWindowState, type TauriShellBridgeOptions, type TauriWindowHandle, WEB_SHELL_WINDOW_BRIDGE, createTauriShellWindowBridge, defaultShellDeviceForMode, isShellColor, isShellDevice, isShellDeviceForMode, isShellFrame, isShellMode, isShellPlatform, isShellWindowState, isTauriRuntime, normalizeShellColor, normalizeShellDevice, normalizeShellFrame, normalizeShellMode, provideShellWindowBridge, provideTauriShellWindowBridge, resolveShellDeviceForMode, resolveShellFrameForMode, shellDevicesForMode };
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, InjectionToken, Signal, WritableSignal } from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* One place for the "a preference that lives in localStorage and shows up as an
|
|
5
|
+
* attribute on `<html>`" pattern that every theme axis needs.
|
|
6
|
+
*
|
|
7
|
+
* Each axis service used to hand-roll the same four private methods (`storage`,
|
|
8
|
+
* `readStorage`, `persist`, plus an effect writing the attribute) around a
|
|
9
|
+
* `signal`. That is the whole body of the simpler services, so a fix to any of
|
|
10
|
+
* it had to be made five times.
|
|
11
|
+
*
|
|
12
|
+
* The storage half itself lives in `@edsis/angular/component/utils/core`,
|
|
13
|
+
* because `navigation` needs it too and navigation must not depend on this
|
|
14
|
+
* package.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* A persisted value, without the DOM half.
|
|
18
|
+
*
|
|
19
|
+
* Useful on its own for a preference that is not an attribute: the brand axis
|
|
20
|
+
* stores an object and paints custom properties instead.
|
|
21
|
+
*
|
|
22
|
+
* Two timing details the theme services depend on:
|
|
23
|
+
*
|
|
24
|
+
* - the stored value is read SYNCHRONOUSLY here, not in an effect, because
|
|
25
|
+
* every service exposes its state to consumers that read it during the same
|
|
26
|
+
* change detection pass;
|
|
27
|
+
* - the effect writes on its FIRST run, so storage holds the resolved default
|
|
28
|
+
* immediately after construction even when nothing was stored.
|
|
29
|
+
*/
|
|
30
|
+
export declare function persistedSignal<T>(options: {
|
|
31
|
+
readonly key: string;
|
|
32
|
+
/** Turn the raw stored string (or `null`) into a value. Must always succeed. */
|
|
33
|
+
readonly parse: (raw: string | null) => T;
|
|
34
|
+
/** Serialize for storage. Returning `null` REMOVES the key. */
|
|
35
|
+
readonly serialize: (value: T) => string | null;
|
|
36
|
+
/** Defaults to `inject(DOCUMENT, { optional: true })`. */
|
|
37
|
+
readonly documentRef?: Document | null;
|
|
38
|
+
}): WritableSignal<T>;
|
|
39
|
+
/**
|
|
40
|
+
* Mirror a reactive string onto one or more `<html>` attributes. A `null` value
|
|
41
|
+
* removes them.
|
|
42
|
+
*/
|
|
43
|
+
export declare function htmlAttributeEffect(options: {
|
|
44
|
+
readonly attribute: string | readonly string[];
|
|
45
|
+
readonly source: () => string | null;
|
|
46
|
+
readonly documentRef?: Document | null;
|
|
47
|
+
}): void;
|
|
48
|
+
/** Mirror reactive inline custom properties onto `<html>`. A `null` value removes one. */
|
|
49
|
+
export declare function htmlStylePropertyEffect(options: {
|
|
50
|
+
readonly source: () => Readonly<Record<string, string | null>>;
|
|
51
|
+
readonly documentRef?: Document | null;
|
|
52
|
+
}): void;
|
|
53
|
+
export interface PersistedHtmlAttribute<T extends string> {
|
|
54
|
+
/** The persisted value. Correct immediately, before any effect has run. */
|
|
55
|
+
readonly value: Signal<T>;
|
|
56
|
+
/** What actually reaches the DOM. Same as {@link value} unless `resolveAttributeValue` is given. */
|
|
57
|
+
readonly attributeValue: Signal<string>;
|
|
58
|
+
set(next: T): void;
|
|
59
|
+
}
|
|
60
|
+
export interface PersistedHtmlAttributeOptions<T extends string> {
|
|
61
|
+
/** localStorage key. */
|
|
62
|
+
readonly key: string;
|
|
63
|
+
/** The `<html>` attribute, or several when one value drives more than one. */
|
|
64
|
+
readonly attribute: string | readonly string[];
|
|
65
|
+
/**
|
|
66
|
+
* Union guard plus fallback. Applied to the stored string AND to `initial`,
|
|
67
|
+
* which is what the services do today: a junk stored value and a junk
|
|
68
|
+
* configured default both land on the same known-good value.
|
|
69
|
+
*/
|
|
70
|
+
readonly normalize: (value: string | null | undefined) => T;
|
|
71
|
+
/**
|
|
72
|
+
* The configured default, already resolved by the caller. It is a caller
|
|
73
|
+
* concern because one axis derives it from another option, and this helper
|
|
74
|
+
* must not know that.
|
|
75
|
+
*/
|
|
76
|
+
readonly initial?: string | null | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* What to WRITE when it differs from what is PERSISTED. Called inside the
|
|
79
|
+
* effect, so reading a signal here is tracked: that is how a `'system'` mode
|
|
80
|
+
* keeps following the operating system while still persisting `'system'`.
|
|
81
|
+
*/
|
|
82
|
+
readonly resolveAttributeValue?: (value: T) => string;
|
|
83
|
+
readonly documentRef?: Document | null;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* A persisted preference that also shows up as an attribute on `<html>`.
|
|
87
|
+
*
|
|
88
|
+
* The stored value wins over the configured default, which is the rule every
|
|
89
|
+
* axis already followed.
|
|
90
|
+
*/
|
|
91
|
+
export declare function persistedHtmlAttributeSignal<T extends string>(options: PersistedHtmlAttributeOptions<T>): PersistedHtmlAttribute<T>;
|
|
92
|
+
/**
|
|
93
|
+
* `(prefers-color-scheme: dark)` as a signal, torn down with the injection
|
|
94
|
+
* context that created it.
|
|
95
|
+
*
|
|
96
|
+
* Lives here because it is the other half of the same story: an axis whose
|
|
97
|
+
* PERSISTED value is `'system'` still has to write a concrete `light` or `dark`
|
|
98
|
+
* to the DOM, and this is what makes that reactive.
|
|
99
|
+
*/
|
|
100
|
+
export declare function prefersDarkSignal(documentRef?: Document | null): Signal<boolean>;
|
|
101
|
+
/** Resolved brand color. Both fields are HSL triplets `H S% L%`. */
|
|
102
|
+
export interface ThemeBrand {
|
|
103
|
+
readonly color: string;
|
|
104
|
+
readonly foreground: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Consumer-configurable brand color. Writes `--brand`, `--brand-foreground`, the
|
|
108
|
+
* derived `--brand-pattern-hs` hue/saturation source, and a `--brand-ring-light`
|
|
109
|
+
* / `--brand-ring-dark` pair as inline custom properties on `<html>` so solid
|
|
110
|
+
* brand utilities, the focus ring, and the soft Layout pattern tiers can resolve
|
|
111
|
+
* without CSS relative-color syntax.
|
|
112
|
+
*
|
|
113
|
+
* Default comes from `provideUiTheme({ brand })`; `setBrand()` overrides at
|
|
114
|
+
* runtime and persists. When unset, `--brand` falls back to `var(--primary)`.
|
|
115
|
+
*/
|
|
116
|
+
export declare class ThemeBrandService {
|
|
117
|
+
private readonly options;
|
|
118
|
+
/**
|
|
119
|
+
* Storage half shared with the other axes; the DOM half is custom, because the
|
|
120
|
+
* brand paints a set of inline custom properties rather than setting an
|
|
121
|
+
* attribute. `serialize` returning `null` is what clears the stored key.
|
|
122
|
+
*/
|
|
123
|
+
private readonly brandState;
|
|
124
|
+
readonly brand: import("@angular/core").Signal<ThemeBrand | null>;
|
|
125
|
+
constructor();
|
|
126
|
+
/**
|
|
127
|
+
* Set the brand color. `color`/`foreground` are HSL triplets (e.g.
|
|
128
|
+
* `'221 83% 53%'`); a hex color is converted, since that is what a native
|
|
129
|
+
* picker hands back. The fill is kept exactly as chosen — `--brand-foreground`
|
|
130
|
+
* is moved until text on it clears 4.5 to 1, and the focus ring is solved
|
|
131
|
+
* separately per mode, so a pale brand can never leave the ring invisible.
|
|
132
|
+
*/
|
|
133
|
+
setBrand(color: string, foreground?: string): void;
|
|
134
|
+
/** Clear the consumer brand → `--brand` falls back to `var(--primary)`. */
|
|
135
|
+
clearBrand(): void;
|
|
136
|
+
private normalizeOption;
|
|
137
|
+
/** The custom properties the brand paints. `null` removes one. */
|
|
138
|
+
private brandProperties;
|
|
139
|
+
/** Stored brands are JSON. Anything unparsable reads as "no stored brand". */
|
|
140
|
+
private parseStored;
|
|
141
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeBrandService, never>;
|
|
142
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
143
|
+
}
|
|
144
|
+
export declare const THEME_MODES: readonly ["light", "dark", "system"];
|
|
145
|
+
export declare const RESOLVED_THEME_MODES: readonly ["light", "dark"];
|
|
146
|
+
/**
|
|
147
|
+
* FluxUI-style accent palettes (axis `theme-color`). `base` = core theme (no
|
|
148
|
+
* override); `brand` = the consumer's `--brand` color. Others re-tint the full
|
|
149
|
+
* palette. Order mirrors the FluxUI accent picker (base…rose) + `brand`.
|
|
150
|
+
*/
|
|
151
|
+
export declare const THEME_COLORS: readonly ["base", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "brand"];
|
|
152
|
+
/**
|
|
153
|
+
* Neutral families (axis `theme-neutral`). `base` = core theme neutrals and lets
|
|
154
|
+
* Layout patterns follow the accent. Non-base values override both the gray
|
|
155
|
+
* family and Layout's decorative pattern hue, while composing with any accent.
|
|
156
|
+
*/
|
|
157
|
+
export declare const THEME_NEUTRALS: readonly ["base", "slate", "gray", "zinc", "neutral", "stone", "mauve", "olive", "mist", "taupe"];
|
|
158
|
+
/**
|
|
159
|
+
* Corner radius presets (axis `theme-radius`). Each drives the single
|
|
160
|
+
* `--radius-base` knob; the whole `--radius-*` scale + `rounded-*` utilities
|
|
161
|
+
* follow. Every preset takes Tailwind's stock value for that name — `none` 0,
|
|
162
|
+
* `xs` 0.125rem, `sm` 0.25rem, `md` 0.375rem (the default), `xl` 0.75rem — and
|
|
163
|
+
* `full` is the pill extreme.
|
|
164
|
+
*/
|
|
165
|
+
export declare const THEME_RADII: readonly ["none", "xs", "sm", "md", "xl", "full"];
|
|
166
|
+
/**
|
|
167
|
+
* Spacing density presets (axis `theme-space`). Each drives the single
|
|
168
|
+
* `--spacing-base` knob; every `p-*`/`m-*`/`gap-*`/`w-*`/`h-*` utility follows.
|
|
169
|
+
* `normal` = the 0.25rem default (no-op baseline).
|
|
170
|
+
*/
|
|
171
|
+
export declare const THEME_SPACES: readonly ["compact", "normal"];
|
|
172
|
+
export type ThemeMode = (typeof THEME_MODES)[number];
|
|
173
|
+
export type ResolvedThemeMode = (typeof RESOLVED_THEME_MODES)[number];
|
|
174
|
+
export type ThemeColor = (typeof THEME_COLORS)[number];
|
|
175
|
+
export type ThemeNeutral = (typeof THEME_NEUTRALS)[number];
|
|
176
|
+
export type ThemeRadius = (typeof THEME_RADII)[number];
|
|
177
|
+
export type ThemeSpace = (typeof THEME_SPACES)[number];
|
|
178
|
+
export declare const DEFAULT_THEME_MODE: ThemeMode;
|
|
179
|
+
export declare const DEFAULT_THEME_COLOR: ThemeColor;
|
|
180
|
+
export declare const DEFAULT_THEME_NEUTRAL: ThemeNeutral;
|
|
181
|
+
export declare const DEFAULT_THEME_RADIUS: ThemeRadius;
|
|
182
|
+
export declare const DEFAULT_THEME_SPACE: ThemeSpace;
|
|
183
|
+
export declare const THEME_MODE_STORAGE_KEY = "theme-mode";
|
|
184
|
+
export declare const THEME_COLOR_STORAGE_KEY = "theme-color";
|
|
185
|
+
export declare const THEME_NEUTRAL_STORAGE_KEY = "theme-neutral";
|
|
186
|
+
export declare const THEME_BRAND_STORAGE_KEY = "theme-brand";
|
|
187
|
+
export declare const THEME_RADIUS_STORAGE_KEY = "theme-radius";
|
|
188
|
+
export declare const THEME_SPACE_STORAGE_KEY = "theme-space";
|
|
189
|
+
export declare function isThemeMode(value: string | null | undefined): value is ThemeMode;
|
|
190
|
+
export declare function isResolvedThemeMode(value: string | null | undefined): value is ResolvedThemeMode;
|
|
191
|
+
export declare function isThemeColor(value: string | null | undefined): value is ThemeColor;
|
|
192
|
+
export declare function isThemeNeutral(value: string | null | undefined): value is ThemeNeutral;
|
|
193
|
+
export declare function isThemeRadius(value: string | null | undefined): value is ThemeRadius;
|
|
194
|
+
export declare function isThemeSpace(value: string | null | undefined): value is ThemeSpace;
|
|
195
|
+
export declare function normalizeThemeMode(value: string | null | undefined): ThemeMode;
|
|
196
|
+
export declare function normalizeThemeColor(value: string | null | undefined): ThemeColor;
|
|
197
|
+
export declare function normalizeThemeNeutral(value: string | null | undefined): ThemeNeutral;
|
|
198
|
+
export declare function normalizeThemeRadius(value: string | null | undefined): ThemeRadius;
|
|
199
|
+
export declare function normalizeThemeSpace(value: string | null | undefined): ThemeSpace;
|
|
200
|
+
/**
|
|
201
|
+
* Drives the two FluxUI-style color axes:
|
|
202
|
+
* - accent → `<html theme-color>` (full tinted palette per color)
|
|
203
|
+
* - neutral → `<html theme-neutral>` (gray family + Layout pattern hue)
|
|
204
|
+
*
|
|
205
|
+
* Both persist to localStorage and seed from `provideUiTheme({ color, neutral })`
|
|
206
|
+
* (a persisted choice wins over the configured default). `base` on either axis
|
|
207
|
+
* means "no override" — the core base theme applies.
|
|
208
|
+
*/
|
|
209
|
+
export declare class ThemeColorService {
|
|
210
|
+
private readonly options;
|
|
211
|
+
private readonly colorAxis;
|
|
212
|
+
private readonly neutralAxis;
|
|
213
|
+
readonly color: import("@angular/core").Signal<"red" | "green" | "blue" | "base" | "orange" | "amber" | "yellow" | "lime" | "emerald" | "teal" | "cyan" | "sky" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "brand">;
|
|
214
|
+
readonly neutral: import("@angular/core").Signal<"base" | "slate" | "gray" | "zinc" | "neutral" | "stone" | "mauve" | "olive" | "mist" | "taupe">;
|
|
215
|
+
setColor(color: ThemeColor): void;
|
|
216
|
+
setNeutral(neutral: ThemeNeutral): void;
|
|
217
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeColorService, never>;
|
|
218
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* Color mode axis. Writes both `<html theme-mode>` and `<html data-mode>`.
|
|
222
|
+
*
|
|
223
|
+
* The persisted value and the written value differ here, which is the whole
|
|
224
|
+
* point of the axis: `'system'` is what gets stored, while `light` or `dark` is
|
|
225
|
+
* what reaches the DOM, and it keeps following the operating system live.
|
|
226
|
+
*/
|
|
227
|
+
export declare class ThemeModeService {
|
|
228
|
+
private readonly options;
|
|
229
|
+
private readonly systemPrefersDark;
|
|
230
|
+
private readonly axis;
|
|
231
|
+
readonly mode: import("@angular/core").Signal<"light" | "dark" | "system">;
|
|
232
|
+
readonly resolvedMode: import("@angular/core").Signal<"light" | "dark">;
|
|
233
|
+
readonly isDark: import("@angular/core").Signal<boolean>;
|
|
234
|
+
setMode(mode: ThemeMode): void;
|
|
235
|
+
toggle(): void;
|
|
236
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeModeService, never>;
|
|
237
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Corner radius axis. Writes `<html theme-radius>`; each preset CSS sets the
|
|
241
|
+
* single `--radius-base` knob so the whole `--radius-*` scale + `rounded-*`
|
|
242
|
+
* utilities rescale. Persists to localStorage and seeds from
|
|
243
|
+
* `provideUiTheme({ radius })` (a persisted choice wins over the default).
|
|
244
|
+
*/
|
|
245
|
+
export declare class ThemeRadiusService {
|
|
246
|
+
private readonly options;
|
|
247
|
+
private readonly axis;
|
|
248
|
+
readonly radius: import("@angular/core").Signal<"none" | "xs" | "sm" | "md" | "xl" | "full">;
|
|
249
|
+
/** Active preset in px @ 16px root. */
|
|
250
|
+
readonly radiusPx: import("@angular/core").Signal<number>;
|
|
251
|
+
setRadius(radius: ThemeRadius): void;
|
|
252
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeRadiusService, never>;
|
|
253
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Spacing density axis. Writes `<html theme-space>`; each preset CSS sets the
|
|
257
|
+
* single `--spacing-base` knob, which Tailwind's `--spacing` derives from, so
|
|
258
|
+
* every `p-*`/`m-*`/`gap-*`/`w-*`/`h-*` utility rescales. Persists to
|
|
259
|
+
* localStorage and seeds from `provideUiTheme({ space })` (a persisted choice
|
|
260
|
+
* wins over the default).
|
|
261
|
+
*/
|
|
262
|
+
export declare class ThemeSpaceService {
|
|
263
|
+
private readonly options;
|
|
264
|
+
private readonly axis;
|
|
265
|
+
readonly space: import("@angular/core").Signal<"compact" | "normal">;
|
|
266
|
+
setSpace(space: ThemeSpace): void;
|
|
267
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeSpaceService, never>;
|
|
268
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
269
|
+
}
|
|
270
|
+
/** Consumer brand color. HSL triplets `H S% L%` consumed by `hsl(var(--brand))`. */
|
|
271
|
+
export interface ThemeBrandOptions {
|
|
272
|
+
/** Brand color, e.g. `'221 83% 53%'`. */
|
|
273
|
+
readonly color: string;
|
|
274
|
+
/** Foreground on solid brand fills. Defaults to white. */
|
|
275
|
+
readonly foreground?: string;
|
|
276
|
+
}
|
|
277
|
+
export interface ThemeOptions {
|
|
278
|
+
readonly mode?: ThemeMode;
|
|
279
|
+
/** Initial accent palette (`theme-color`). Persisted choice wins over this. */
|
|
280
|
+
readonly color?: ThemeColor;
|
|
281
|
+
/** Initial neutral family (`theme-neutral`). Persisted choice wins over this. */
|
|
282
|
+
readonly neutral?: ThemeNeutral;
|
|
283
|
+
/** Initial corner radius preset (`theme-radius`). Persisted choice wins over this. */
|
|
284
|
+
readonly radius?: ThemeRadius;
|
|
285
|
+
/** Initial spacing density preset (`theme-space`). Persisted choice wins over this. */
|
|
286
|
+
readonly space?: ThemeSpace;
|
|
287
|
+
/**
|
|
288
|
+
* Consumer brand color → `--brand` / `bg-brand`, and the `brand` accent preset.
|
|
289
|
+
* Pass an HSL triplet string, or `{ color, foreground }`. Persisted/runtime
|
|
290
|
+
* changes (ThemeBrandService.setBrand) win over this default.
|
|
291
|
+
*/
|
|
292
|
+
readonly brand?: string | ThemeBrandOptions;
|
|
293
|
+
}
|
|
294
|
+
export declare const THEME_OPTIONS: InjectionToken<Readonly<ThemeOptions>>;
|
|
295
|
+
export declare function provideUiTheme(options?: ThemeOptions): EnvironmentProviders;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
package/types/edsis-angular.d.ts
CHANGED