@ojiepermana/angular 22.1.10 → 22.1.12
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/README.md +32 -26
- 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 +137 -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 +147 -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 +25 -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/ojiepermana-angular-chart-area.mjs +289 -3
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
- package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
- package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
- package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
- package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
- package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
- package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
- package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
- package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
- package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
- package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
- package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
- package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
- package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
- package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
- package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
- package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
- package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
- package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
- package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
- package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
- package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
- package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
- package/fesm2022/ojiepermana-angular-component.mjs +4 -4
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
- package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
- package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
- package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
- package/fesm2022/ojiepermana-angular.mjs +6 -11
- package/navigation/README.md +374 -0
- package/package.json +81 -20
- 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 +126 -0
- package/theme/component/settings/README.md +135 -0
- package/theme/layout/README.md +539 -0
- package/theme/page/README.md +453 -0
- package/theme/shell/README.md +340 -0
- package/theme/styles/README.md +178 -0
- package/theme/styles/css/base/components.css +553 -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 +165 -0
- package/theme/styles/css/base/theme.css +373 -0
- package/theme/styles/css/base/tokens.css +361 -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/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/ojiepermana-angular-chart-area.d.ts +76 -1
- package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
- package/types/ojiepermana-angular-chart-core.d.ts +811 -1
- package/types/ojiepermana-angular-chart-line.d.ts +75 -1
- package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
- package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
- package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
- package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
- package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
- package/types/ojiepermana-angular-chart.d.ts +2 -1
- package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
- package/types/ojiepermana-angular-component-alert.d.ts +42 -1
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
- package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
- package/types/ojiepermana-angular-component-badge.d.ts +24 -1
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
- package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
- package/types/ojiepermana-angular-component-button.d.ts +27 -1
- package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
- package/types/ojiepermana-angular-component-card.d.ts +69 -1
- package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
- package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
- package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
- package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
- package/types/ojiepermana-angular-component-command.d.ts +130 -1
- package/types/ojiepermana-angular-component-composer.d.ts +90 -1
- package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
- package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
- package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
- package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
- package/types/ojiepermana-angular-component-editor.d.ts +135 -1
- package/types/ojiepermana-angular-component-empty.d.ts +50 -1
- package/types/ojiepermana-angular-component-form.d.ts +159 -1
- package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
- package/types/ojiepermana-angular-component-icon.d.ts +89 -1
- package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
- package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
- package/types/ojiepermana-angular-component-input.d.ts +21 -1
- package/types/ojiepermana-angular-component-item.d.ts +93 -1
- package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
- package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
- package/types/ojiepermana-angular-component-label.d.ts +11 -1
- package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
- package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
- package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
- package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
- package/types/ojiepermana-angular-component-popover.d.ts +66 -1
- package/types/ojiepermana-angular-component-progress.d.ts +17 -1
- package/types/ojiepermana-angular-component-radio.d.ts +60 -1
- package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
- package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
- package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
- package/types/ojiepermana-angular-component-select.d.ts +122 -1
- package/types/ojiepermana-angular-component-separator.d.ts +14 -1
- package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
- package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
- package/types/ojiepermana-angular-component-slider.d.ts +83 -1
- package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
- package/types/ojiepermana-angular-component-switch.d.ts +44 -1
- package/types/ojiepermana-angular-component-table.d.ts +57 -1
- package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
- package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
- package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
- package/types/ojiepermana-angular-component-toast.d.ts +64 -1
- package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
- package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
- package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
- package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
- package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
- package/types/ojiepermana-angular-component-utils.d.ts +2 -1
- package/types/ojiepermana-angular-component.d.ts +2 -1
- package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
- package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
- package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
- package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
- package/types/ojiepermana-angular-navigation.d.ts +507 -1
- package/types/ojiepermana-angular-sdk.d.ts +89 -1
- package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
- package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
- package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
- package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
- package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
- package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
- package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
- package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
- package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
- package/types/ojiepermana-angular-theme-page.d.ts +5 -1
- package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
- package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
- package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
- package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
- package/types/ojiepermana-angular-theme.d.ts +2 -1
- package/types/ojiepermana-angular.d.ts +5 -5
|
@@ -1 +1,319 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Signal, WritableSignal, InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One place for the "a preference that lives in localStorage and shows up as an
|
|
6
|
+
* attribute on `<html>`" pattern that every theme axis needs.
|
|
7
|
+
*
|
|
8
|
+
* Each axis service used to hand-roll the same four private methods (`storage`,
|
|
9
|
+
* `readStorage`, `persist`, plus an effect writing the attribute) around a
|
|
10
|
+
* `signal`. That is the whole body of the simpler services, so a fix to any of
|
|
11
|
+
* it had to be made five times.
|
|
12
|
+
*
|
|
13
|
+
* The storage half itself lives in `@ojiepermana/angular/component/utils/core`,
|
|
14
|
+
* because `navigation` needs it too and navigation must not depend on this
|
|
15
|
+
* package.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* A persisted value, without the DOM half.
|
|
19
|
+
*
|
|
20
|
+
* Useful on its own for a preference that is not an attribute: the brand axis
|
|
21
|
+
* stores an object and paints custom properties instead.
|
|
22
|
+
*
|
|
23
|
+
* Two timing details the theme services depend on:
|
|
24
|
+
*
|
|
25
|
+
* - the stored value is read SYNCHRONOUSLY here, not in an effect, because
|
|
26
|
+
* every service exposes its state to consumers that read it during the same
|
|
27
|
+
* change detection pass;
|
|
28
|
+
* - the effect writes on its FIRST run, so storage holds the resolved default
|
|
29
|
+
* immediately after construction even when nothing was stored.
|
|
30
|
+
*/
|
|
31
|
+
declare function persistedSignal<T>(options: {
|
|
32
|
+
readonly key: string;
|
|
33
|
+
/** Turn the raw stored string (or `null`) into a value. Must always succeed. */
|
|
34
|
+
readonly parse: (raw: string | null) => T;
|
|
35
|
+
/** Serialize for storage. Returning `null` REMOVES the key. */
|
|
36
|
+
readonly serialize: (value: T) => string | null;
|
|
37
|
+
/** Defaults to `inject(DOCUMENT, { optional: true })`. */
|
|
38
|
+
readonly documentRef?: Document | null;
|
|
39
|
+
}): WritableSignal<T>;
|
|
40
|
+
/**
|
|
41
|
+
* Mirror a reactive string onto one or more `<html>` attributes. A `null` value
|
|
42
|
+
* removes them.
|
|
43
|
+
*/
|
|
44
|
+
declare function htmlAttributeEffect(options: {
|
|
45
|
+
readonly attribute: string | readonly string[];
|
|
46
|
+
readonly source: () => string | null;
|
|
47
|
+
readonly documentRef?: Document | null;
|
|
48
|
+
}): void;
|
|
49
|
+
/** Mirror reactive inline custom properties onto `<html>`. A `null` value removes one. */
|
|
50
|
+
declare function htmlStylePropertyEffect(options: {
|
|
51
|
+
readonly source: () => Readonly<Record<string, string | null>>;
|
|
52
|
+
readonly documentRef?: Document | null;
|
|
53
|
+
}): void;
|
|
54
|
+
interface PersistedHtmlAttribute<T extends string> {
|
|
55
|
+
/** The persisted value. Correct immediately, before any effect has run. */
|
|
56
|
+
readonly value: Signal<T>;
|
|
57
|
+
/** What actually reaches the DOM. Same as {@link value} unless `resolveAttributeValue` is given. */
|
|
58
|
+
readonly attributeValue: Signal<string>;
|
|
59
|
+
set(next: T): void;
|
|
60
|
+
}
|
|
61
|
+
interface PersistedHtmlAttributeOptions<T extends string> {
|
|
62
|
+
/** localStorage key. */
|
|
63
|
+
readonly key: string;
|
|
64
|
+
/** The `<html>` attribute, or several when one value drives more than one. */
|
|
65
|
+
readonly attribute: string | readonly string[];
|
|
66
|
+
/**
|
|
67
|
+
* Union guard plus fallback. Applied to the stored string AND to `initial`,
|
|
68
|
+
* which is what the services do today: a junk stored value and a junk
|
|
69
|
+
* configured default both land on the same known-good value.
|
|
70
|
+
*/
|
|
71
|
+
readonly normalize: (value: string | null | undefined) => T;
|
|
72
|
+
/**
|
|
73
|
+
* The configured default, already resolved by the caller. It is a caller
|
|
74
|
+
* concern because one axis derives it from another option, and this helper
|
|
75
|
+
* must not know that.
|
|
76
|
+
*/
|
|
77
|
+
readonly initial?: string | null | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* What to WRITE when it differs from what is PERSISTED. Called inside the
|
|
80
|
+
* effect, so reading a signal here is tracked: that is how a `'system'` mode
|
|
81
|
+
* keeps following the operating system while still persisting `'system'`.
|
|
82
|
+
*/
|
|
83
|
+
readonly resolveAttributeValue?: (value: T) => string;
|
|
84
|
+
readonly documentRef?: Document | null;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A persisted preference that also shows up as an attribute on `<html>`.
|
|
88
|
+
*
|
|
89
|
+
* The stored value wins over the configured default, which is the rule every
|
|
90
|
+
* axis already followed.
|
|
91
|
+
*/
|
|
92
|
+
declare function persistedHtmlAttributeSignal<T extends string>(options: PersistedHtmlAttributeOptions<T>): PersistedHtmlAttribute<T>;
|
|
93
|
+
/**
|
|
94
|
+
* `(prefers-color-scheme: dark)` as a signal, torn down with the injection
|
|
95
|
+
* context that created it.
|
|
96
|
+
*
|
|
97
|
+
* Lives here because it is the other half of the same story: an axis whose
|
|
98
|
+
* PERSISTED value is `'system'` still has to write a concrete `light` or `dark`
|
|
99
|
+
* to the DOM, and this is what makes that reactive.
|
|
100
|
+
*/
|
|
101
|
+
declare function prefersDarkSignal(documentRef?: Document | null): Signal<boolean>;
|
|
102
|
+
|
|
103
|
+
/** Resolved brand color. Both fields are HSL triplets `H S% L%`. */
|
|
104
|
+
interface ThemeBrand {
|
|
105
|
+
readonly color: string;
|
|
106
|
+
readonly foreground: string;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Consumer-configurable brand color. Writes `--brand`, `--brand-foreground`, the
|
|
110
|
+
* derived `--brand-pattern-hs` hue/saturation source, and a `--brand-ring-light`
|
|
111
|
+
* / `--brand-ring-dark` pair as inline custom properties on `<html>` so solid
|
|
112
|
+
* brand utilities, the focus ring, and the soft Layout pattern tiers can resolve
|
|
113
|
+
* without CSS relative-color syntax.
|
|
114
|
+
*
|
|
115
|
+
* Default comes from `provideUiTheme({ brand })`; `setBrand()` overrides at
|
|
116
|
+
* runtime and persists. When unset, `--brand` falls back to `var(--primary)`.
|
|
117
|
+
*/
|
|
118
|
+
declare class ThemeBrandService {
|
|
119
|
+
private readonly options;
|
|
120
|
+
/**
|
|
121
|
+
* Storage half shared with the other axes; the DOM half is custom, because the
|
|
122
|
+
* brand paints a set of inline custom properties rather than setting an
|
|
123
|
+
* attribute. `serialize` returning `null` is what clears the stored key.
|
|
124
|
+
*/
|
|
125
|
+
private readonly brandState;
|
|
126
|
+
readonly brand: i0.Signal<ThemeBrand | null>;
|
|
127
|
+
constructor();
|
|
128
|
+
/**
|
|
129
|
+
* Set the brand color. `color`/`foreground` are HSL triplets (e.g.
|
|
130
|
+
* `'221 83% 53%'`); a hex color is converted, since that is what a native
|
|
131
|
+
* picker hands back. The fill is kept exactly as chosen — `--brand-foreground`
|
|
132
|
+
* is moved until text on it clears 4.5 to 1, and the focus ring is solved
|
|
133
|
+
* separately per mode, so a pale brand can never leave the ring invisible.
|
|
134
|
+
*/
|
|
135
|
+
setBrand(color: string, foreground?: string): void;
|
|
136
|
+
/** Clear the consumer brand → `--brand` falls back to `var(--primary)`. */
|
|
137
|
+
clearBrand(): void;
|
|
138
|
+
private normalizeOption;
|
|
139
|
+
/** The custom properties the brand paints. `null` removes one. */
|
|
140
|
+
private brandProperties;
|
|
141
|
+
/** Stored brands are JSON. Anything unparsable reads as "no stored brand". */
|
|
142
|
+
private parseStored;
|
|
143
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeBrandService, never>;
|
|
144
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeBrandService>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare const THEME_MODES: readonly ["light", "dark", "system"];
|
|
148
|
+
declare const RESOLVED_THEME_MODES: readonly ["light", "dark"];
|
|
149
|
+
/**
|
|
150
|
+
* FluxUI-style accent palettes (axis `theme-color`). `base` = core theme (no
|
|
151
|
+
* override); `brand` = the consumer's `--brand` color. Others re-tint the full
|
|
152
|
+
* palette. Order mirrors the FluxUI accent picker (base…rose) + `brand`.
|
|
153
|
+
*/
|
|
154
|
+
declare const THEME_COLORS: readonly ["base", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "brand"];
|
|
155
|
+
/**
|
|
156
|
+
* Neutral families (axis `theme-neutral`). `base` = core theme neutrals and lets
|
|
157
|
+
* Layout patterns follow the accent. Non-base values override both the gray
|
|
158
|
+
* family and Layout's decorative pattern hue, while composing with any accent.
|
|
159
|
+
*/
|
|
160
|
+
declare const THEME_NEUTRALS: readonly ["base", "slate", "gray", "zinc", "neutral", "stone", "mauve", "olive", "mist", "taupe"];
|
|
161
|
+
/**
|
|
162
|
+
* Corner radius presets (axis `theme-radius`). Each drives the single
|
|
163
|
+
* `--radius-base` knob; the whole `--radius-*` scale + `rounded-*` utilities
|
|
164
|
+
* follow. Every preset takes Tailwind's stock value for that name — `none` 0,
|
|
165
|
+
* `xs` 0.125rem, `sm` 0.25rem, `md` 0.375rem (the default), `xl` 0.75rem — and
|
|
166
|
+
* `full` is the pill extreme.
|
|
167
|
+
*/
|
|
168
|
+
declare const THEME_RADII: readonly ["none", "xs", "sm", "md", "xl", "full"];
|
|
169
|
+
/**
|
|
170
|
+
* Spacing density presets (axis `theme-space`). Each drives the single
|
|
171
|
+
* `--spacing-base` knob; every `p-*`/`m-*`/`gap-*`/`w-*`/`h-*` utility follows.
|
|
172
|
+
* `normal` = the 0.25rem default (no-op baseline).
|
|
173
|
+
*/
|
|
174
|
+
declare const THEME_SPACES: readonly ["compact", "normal"];
|
|
175
|
+
type ThemeMode = (typeof THEME_MODES)[number];
|
|
176
|
+
type ResolvedThemeMode = (typeof RESOLVED_THEME_MODES)[number];
|
|
177
|
+
type ThemeColor = (typeof THEME_COLORS)[number];
|
|
178
|
+
type ThemeNeutral = (typeof THEME_NEUTRALS)[number];
|
|
179
|
+
type ThemeRadius = (typeof THEME_RADII)[number];
|
|
180
|
+
type ThemeSpace = (typeof THEME_SPACES)[number];
|
|
181
|
+
declare const DEFAULT_THEME_MODE: ThemeMode;
|
|
182
|
+
declare const DEFAULT_THEME_COLOR: ThemeColor;
|
|
183
|
+
declare const DEFAULT_THEME_NEUTRAL: ThemeNeutral;
|
|
184
|
+
declare const DEFAULT_THEME_RADIUS: ThemeRadius;
|
|
185
|
+
declare const DEFAULT_THEME_SPACE: ThemeSpace;
|
|
186
|
+
declare const THEME_MODE_STORAGE_KEY = "theme-mode";
|
|
187
|
+
declare const THEME_COLOR_STORAGE_KEY = "theme-color";
|
|
188
|
+
declare const THEME_NEUTRAL_STORAGE_KEY = "theme-neutral";
|
|
189
|
+
declare const THEME_BRAND_STORAGE_KEY = "theme-brand";
|
|
190
|
+
declare const THEME_RADIUS_STORAGE_KEY = "theme-radius";
|
|
191
|
+
declare const THEME_SPACE_STORAGE_KEY = "theme-space";
|
|
192
|
+
declare function isThemeMode(value: string | null | undefined): value is ThemeMode;
|
|
193
|
+
declare function isResolvedThemeMode(value: string | null | undefined): value is ResolvedThemeMode;
|
|
194
|
+
declare function isThemeColor(value: string | null | undefined): value is ThemeColor;
|
|
195
|
+
declare function isThemeNeutral(value: string | null | undefined): value is ThemeNeutral;
|
|
196
|
+
declare function isThemeRadius(value: string | null | undefined): value is ThemeRadius;
|
|
197
|
+
declare function isThemeSpace(value: string | null | undefined): value is ThemeSpace;
|
|
198
|
+
declare function normalizeThemeMode(value: string | null | undefined): ThemeMode;
|
|
199
|
+
declare function normalizeThemeColor(value: string | null | undefined): ThemeColor;
|
|
200
|
+
declare function normalizeThemeNeutral(value: string | null | undefined): ThemeNeutral;
|
|
201
|
+
declare function normalizeThemeRadius(value: string | null | undefined): ThemeRadius;
|
|
202
|
+
declare function normalizeThemeSpace(value: string | null | undefined): ThemeSpace;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Drives the two FluxUI-style color axes:
|
|
206
|
+
* - accent → `<html theme-color>` (full tinted palette per color)
|
|
207
|
+
* - neutral → `<html theme-neutral>` (gray family + Layout pattern hue)
|
|
208
|
+
*
|
|
209
|
+
* Both persist to localStorage and seed from `provideUiTheme({ color, neutral })`
|
|
210
|
+
* (a persisted choice wins over the configured default). `base` on either axis
|
|
211
|
+
* means "no override" — the core base theme applies.
|
|
212
|
+
*/
|
|
213
|
+
declare class ThemeColorService {
|
|
214
|
+
private readonly options;
|
|
215
|
+
private readonly colorAxis;
|
|
216
|
+
private readonly neutralAxis;
|
|
217
|
+
readonly color: i0.Signal<"red" | "green" | "blue" | "base" | "orange" | "amber" | "yellow" | "lime" | "emerald" | "teal" | "cyan" | "sky" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "brand">;
|
|
218
|
+
readonly neutral: i0.Signal<"base" | "slate" | "gray" | "zinc" | "neutral" | "stone" | "mauve" | "olive" | "mist" | "taupe">;
|
|
219
|
+
setColor(color: ThemeColor): void;
|
|
220
|
+
setNeutral(neutral: ThemeNeutral): void;
|
|
221
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeColorService, never>;
|
|
222
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeColorService>;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Color mode axis. Writes both `<html theme-mode>` and `<html data-mode>`.
|
|
227
|
+
*
|
|
228
|
+
* The persisted value and the written value differ here, which is the whole
|
|
229
|
+
* point of the axis: `'system'` is what gets stored, while `light` or `dark` is
|
|
230
|
+
* what reaches the DOM, and it keeps following the operating system live.
|
|
231
|
+
*/
|
|
232
|
+
declare class ThemeModeService {
|
|
233
|
+
private readonly options;
|
|
234
|
+
private readonly systemPrefersDark;
|
|
235
|
+
private readonly axis;
|
|
236
|
+
readonly mode: i0.Signal<"light" | "dark" | "system">;
|
|
237
|
+
readonly resolvedMode: i0.Signal<"light" | "dark">;
|
|
238
|
+
readonly isDark: i0.Signal<boolean>;
|
|
239
|
+
setMode(mode: ThemeMode): void;
|
|
240
|
+
toggle(): void;
|
|
241
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeModeService, never>;
|
|
242
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeModeService>;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Corner radius axis. Writes `<html theme-radius>`; each preset CSS sets the
|
|
247
|
+
* single `--radius-base` knob so the whole `--radius-*` scale + `rounded-*`
|
|
248
|
+
* utilities rescale. Persists to localStorage and seeds from
|
|
249
|
+
* `provideUiTheme({ radius })` (a persisted choice wins over the default).
|
|
250
|
+
*/
|
|
251
|
+
declare class ThemeRadiusService {
|
|
252
|
+
private readonly options;
|
|
253
|
+
private readonly axis;
|
|
254
|
+
readonly radius: i0.Signal<"none" | "xs" | "sm" | "md" | "xl" | "full">;
|
|
255
|
+
/** Active preset in px @ 16px root. */
|
|
256
|
+
readonly radiusPx: i0.Signal<number>;
|
|
257
|
+
setRadius(radius: ThemeRadius): void;
|
|
258
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeRadiusService, never>;
|
|
259
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeRadiusService>;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Spacing density axis. Writes `<html theme-space>`; each preset CSS sets the
|
|
264
|
+
* single `--spacing-base` knob, which Tailwind's `--spacing` derives from, so
|
|
265
|
+
* every `p-*`/`m-*`/`gap-*`/`w-*`/`h-*` utility rescales. Persists to
|
|
266
|
+
* localStorage and seeds from `provideUiTheme({ space })` (a persisted choice
|
|
267
|
+
* wins over the default).
|
|
268
|
+
*/
|
|
269
|
+
declare class ThemeSpaceService {
|
|
270
|
+
private readonly options;
|
|
271
|
+
private readonly axis;
|
|
272
|
+
readonly space: i0.Signal<"compact" | "normal">;
|
|
273
|
+
setSpace(space: ThemeSpace): void;
|
|
274
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeSpaceService, never>;
|
|
275
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ThemeSpaceService>;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
interface ThemeIconOptions {
|
|
279
|
+
/**
|
|
280
|
+
* Load the Material Symbols icon font from Google Fonts at startup.
|
|
281
|
+
*
|
|
282
|
+
* Default: `false` (opt-in). Left off, `provideUiTheme()` makes no external
|
|
283
|
+
* network request — better for privacy, offline, and strict CSP. Set to
|
|
284
|
+
* `true` to fetch `https://fonts.googleapis.com/css2`, or self-host the font
|
|
285
|
+
* and import it in your own stylesheet instead.
|
|
286
|
+
*/
|
|
287
|
+
readonly materialSymbols?: boolean;
|
|
288
|
+
}
|
|
289
|
+
/** Consumer brand color. HSL triplets `H S% L%` consumed by `hsl(var(--brand))`. */
|
|
290
|
+
interface ThemeBrandOptions {
|
|
291
|
+
/** Brand color, e.g. `'221 83% 53%'`. */
|
|
292
|
+
readonly color: string;
|
|
293
|
+
/** Foreground on solid brand fills. Defaults to white. */
|
|
294
|
+
readonly foreground?: string;
|
|
295
|
+
}
|
|
296
|
+
interface ThemeOptions {
|
|
297
|
+
readonly mode?: ThemeMode;
|
|
298
|
+
/** Initial accent palette (`theme-color`). Persisted choice wins over this. */
|
|
299
|
+
readonly color?: ThemeColor;
|
|
300
|
+
/** Initial neutral family (`theme-neutral`). Persisted choice wins over this. */
|
|
301
|
+
readonly neutral?: ThemeNeutral;
|
|
302
|
+
/** Initial corner radius preset (`theme-radius`). Persisted choice wins over this. */
|
|
303
|
+
readonly radius?: ThemeRadius;
|
|
304
|
+
/** Initial spacing density preset (`theme-space`). Persisted choice wins over this. */
|
|
305
|
+
readonly space?: ThemeSpace;
|
|
306
|
+
/**
|
|
307
|
+
* Consumer brand color → `--brand` / `bg-brand`, and the `brand` accent preset.
|
|
308
|
+
* Pass an HSL triplet string, or `{ color, foreground }`. Persisted/runtime
|
|
309
|
+
* changes (ThemeBrandService.setBrand) win over this default.
|
|
310
|
+
*/
|
|
311
|
+
readonly brand?: string | ThemeBrandOptions;
|
|
312
|
+
readonly icons?: ThemeIconOptions;
|
|
313
|
+
}
|
|
314
|
+
declare const THEME_OPTIONS: InjectionToken<Readonly<ThemeOptions>>;
|
|
315
|
+
|
|
316
|
+
declare function provideUiTheme(options?: ThemeOptions): EnvironmentProviders;
|
|
317
|
+
|
|
318
|
+
export { DEFAULT_THEME_COLOR, DEFAULT_THEME_MODE, DEFAULT_THEME_NEUTRAL, DEFAULT_THEME_RADIUS, DEFAULT_THEME_SPACE, RESOLVED_THEME_MODES, THEME_BRAND_STORAGE_KEY, THEME_COLORS, THEME_COLOR_STORAGE_KEY, THEME_MODES, THEME_MODE_STORAGE_KEY, THEME_NEUTRALS, THEME_NEUTRAL_STORAGE_KEY, THEME_OPTIONS, THEME_RADII, THEME_RADIUS_STORAGE_KEY, THEME_SPACES, THEME_SPACE_STORAGE_KEY, ThemeBrandService, ThemeColorService, ThemeModeService, ThemeRadiusService, ThemeSpaceService, htmlAttributeEffect, htmlStylePropertyEffect, isResolvedThemeMode, isThemeColor, isThemeMode, isThemeNeutral, isThemeRadius, isThemeSpace, normalizeThemeColor, normalizeThemeMode, normalizeThemeNeutral, normalizeThemeRadius, normalizeThemeSpace, persistedHtmlAttributeSignal, persistedSignal, prefersDarkSignal, provideUiTheme };
|
|
319
|
+
export type { PersistedHtmlAttribute, PersistedHtmlAttributeOptions, ResolvedThemeMode, ThemeBrand, ThemeBrandOptions, ThemeColor, ThemeIconOptions, ThemeMode, ThemeNeutral, ThemeOptions, ThemeRadius, ThemeSpace };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
export { };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from '@ojiepermana/angular
|
|
2
|
-
export * from '@ojiepermana/angular
|
|
3
|
-
export * from '@ojiepermana/angular
|
|
4
|
-
export * from '@ojiepermana/angular
|
|
5
|
-
export * from '@ojiepermana/angular
|
|
1
|
+
export * from '@ojiepermana/angular/chart';
|
|
2
|
+
export * from '@ojiepermana/angular/component';
|
|
3
|
+
export * from '@ojiepermana/angular/navigation';
|
|
4
|
+
export * from '@ojiepermana/angular/sdk';
|
|
5
|
+
export * from '@ojiepermana/angular/theme';
|