@ojiepermana/angular 21.3.0 → 21.3.4
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 +76 -12
- package/component/accordion/package.json +4 -0
- package/component/alert/package.json +4 -0
- package/component/alert-dialog/package.json +4 -0
- package/component/aspect-ratio/package.json +4 -0
- package/component/avatar/package.json +4 -0
- package/component/badge/package.json +4 -0
- package/component/breadcrumb/package.json +4 -0
- package/component/button/package.json +4 -0
- package/component/button-group/package.json +4 -0
- package/component/calendar/package.json +4 -0
- package/component/card/package.json +4 -0
- package/component/carousel/package.json +4 -0
- package/component/chart/area/package.json +4 -0
- package/component/chart/bar/package.json +4 -0
- package/component/chart/line/package.json +4 -0
- package/component/chart/package.json +4 -0
- package/component/chart/pie/package.json +4 -0
- package/component/chart/radar/package.json +4 -0
- package/component/chart/radial/package.json +4 -0
- package/component/chart/scatter/package.json +4 -0
- package/component/checkbox/package.json +4 -0
- package/component/collapsible/package.json +4 -0
- package/component/combobox/package.json +4 -0
- package/component/command/package.json +4 -0
- package/component/context-menu/package.json +4 -0
- package/component/date-picker/package.json +4 -0
- package/component/dialog/package.json +4 -0
- package/component/drawer/package.json +4 -0
- package/component/dropdown-menu/package.json +4 -0
- package/component/form/package.json +4 -0
- package/component/input/package.json +4 -0
- package/component/input-group/package.json +4 -0
- package/component/item/package.json +4 -0
- package/component/label/package.json +4 -0
- package/component/pagination/package.json +4 -0
- package/component/popover/package.json +4 -0
- package/component/progress/package.json +4 -0
- package/component/radio/package.json +4 -0
- package/component/scroll-area/package.json +4 -0
- package/component/select/package.json +4 -0
- package/component/separator/package.json +4 -0
- package/component/sheet/package.json +4 -0
- package/component/skeleton/package.json +4 -0
- package/component/slider/package.json +4 -0
- package/component/switch/package.json +4 -0
- package/component/table/package.json +4 -0
- package/component/tabs/package.json +4 -0
- package/component/textarea/package.json +4 -0
- package/component/toast/package.json +4 -0
- package/component/tooltip/package.json +4 -0
- package/component/utils/package.json +4 -0
- package/fesm2022/{ojiepermana-angular-ui-component-accordion.mjs → ojiepermana-angular-component-accordion.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-accordion.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-alert-dialog.mjs → ojiepermana-angular-component-alert-dialog.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-alert.mjs → ojiepermana-angular-component-alert.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-alert.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-aspect-ratio.mjs → ojiepermana-angular-component-aspect-ratio.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-avatar.mjs → ojiepermana-angular-component-avatar.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-avatar.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-badge.mjs → ojiepermana-angular-component-badge.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-badge.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-breadcrumb.mjs → ojiepermana-angular-component-breadcrumb.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-button-group.mjs → ojiepermana-angular-component-button-group.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-button-group.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-button.mjs → ojiepermana-angular-component-button.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-button.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-calendar.mjs → ojiepermana-angular-component-calendar.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-calendar.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-card.mjs → ojiepermana-angular-component-card.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-card.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-carousel.mjs → ojiepermana-angular-component-carousel.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-carousel.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart-area.mjs → ojiepermana-angular-component-chart-area.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart-area.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart-bar.mjs → ojiepermana-angular-component-chart-bar.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart-bar.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart-line.mjs → ojiepermana-angular-component-chart-line.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart-line.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart-pie.mjs → ojiepermana-angular-component-chart-pie.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart-pie.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart-radar.mjs → ojiepermana-angular-component-chart-radar.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart-radar.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart-radial.mjs → ojiepermana-angular-component-chart-radial.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart-radial.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart-scatter.mjs → ojiepermana-angular-component-chart-scatter.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart-scatter.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-chart.mjs → ojiepermana-angular-component-chart.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-chart.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-checkbox.mjs → ojiepermana-angular-component-checkbox.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-collapsible.mjs → ojiepermana-angular-component-collapsible.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-combobox.mjs → ojiepermana-angular-component-combobox.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-combobox.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-command.mjs → ojiepermana-angular-component-command.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-command.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-context-menu.mjs → ojiepermana-angular-component-context-menu.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-date-picker.mjs → ojiepermana-angular-component-date-picker.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-dialog.mjs → ojiepermana-angular-component-dialog.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-dialog.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-drawer.mjs → ojiepermana-angular-component-drawer.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-drawer.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-dropdown-menu.mjs → ojiepermana-angular-component-dropdown-menu.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-form.mjs → ojiepermana-angular-component-form.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-form.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-input-group.mjs → ojiepermana-angular-component-input-group.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-input-group.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-input.mjs → ojiepermana-angular-component-input.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-input.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-item.mjs → ojiepermana-angular-component-item.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-item.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-label.mjs → ojiepermana-angular-component-label.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-label.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-pagination.mjs → ojiepermana-angular-component-pagination.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-pagination.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-popover.mjs → ojiepermana-angular-component-popover.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-popover.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-progress.mjs → ojiepermana-angular-component-progress.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-progress.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-radio.mjs → ojiepermana-angular-component-radio.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-radio.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-scroll-area.mjs → ojiepermana-angular-component-scroll-area.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-select.mjs → ojiepermana-angular-component-select.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-select.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-separator.mjs → ojiepermana-angular-component-separator.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-separator.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-sheet.mjs → ojiepermana-angular-component-sheet.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-sheet.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-skeleton.mjs → ojiepermana-angular-component-skeleton.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-slider.mjs → ojiepermana-angular-component-slider.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-slider.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-switch.mjs → ojiepermana-angular-component-switch.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-switch.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-table.mjs → ojiepermana-angular-component-table.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-table.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-tabs.mjs → ojiepermana-angular-component-tabs.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-tabs.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-textarea.mjs → ojiepermana-angular-component-textarea.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-textarea.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-toast.mjs → ojiepermana-angular-component-toast.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-toast.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-tooltip.mjs → ojiepermana-angular-component-tooltip.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs.map +1 -0
- package/fesm2022/{ojiepermana-angular-ui-component-utils.mjs → ojiepermana-angular-component-utils.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-component-utils.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-generator-api.mjs +2 -1
- package/fesm2022/ojiepermana-angular-generator-api.mjs.map +1 -1
- package/fesm2022/{ojiepermana-angular-layout-theme.mjs → ojiepermana-angular-layout-component.mjs} +1 -1
- package/fesm2022/ojiepermana-angular-layout-component.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-empty.mjs +49 -0
- package/fesm2022/ojiepermana-angular-layout-empty.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-horizontal.mjs +119 -0
- package/fesm2022/ojiepermana-angular-layout-horizontal.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-provider.mjs +21 -0
- package/fesm2022/ojiepermana-angular-layout-provider.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-services.mjs +114 -0
- package/fesm2022/ojiepermana-angular-layout-services.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-shell.mjs +48 -0
- package/fesm2022/ojiepermana-angular-layout-shell.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs +27 -0
- package/fesm2022/ojiepermana-angular-layout-token-directive.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-token.mjs +33 -0
- package/fesm2022/ojiepermana-angular-layout-token.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout-vertical.mjs +113 -0
- package/fesm2022/ojiepermana-angular-layout-vertical.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-layout.mjs +140 -137
- package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs +334 -0
- package/fesm2022/ojiepermana-angular-navigation-demo-data.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular-navigation-item.mjs +548 -0
- package/fesm2022/ojiepermana-angular-navigation-item.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +204 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs +373 -0
- package/fesm2022/ojiepermana-angular-navigation-sidebar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs +433 -0
- package/fesm2022/ojiepermana-angular-navigation-topbar.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +4 -0
- package/fesm2022/ojiepermana-angular-navigation-types.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme-provider.mjs +35 -0
- package/fesm2022/ojiepermana-angular-theme-provider.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme-services.mjs +286 -0
- package/fesm2022/ojiepermana-angular-theme-services.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme-token.mjs +56 -0
- package/fesm2022/ojiepermana-angular-theme-token.mjs.map +1 -0
- package/fesm2022/ojiepermana-angular-theme.mjs +31 -56
- package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
- package/fesm2022/ojiepermana-angular.mjs +3 -4
- package/fesm2022/ojiepermana-angular.mjs.map +1 -1
- package/generator/api/README.md +25 -19
- package/generator/api/bin/schematics/init/index.js +4 -2
- package/generator/api/bin/src/config/schema.js +2 -1
- package/generator/api/bin/src/emit/navigation.js +1 -1
- package/generator/api/bin/src/layout/per-domain.js +7 -3
- package/generator/api/bin/src/writer/index.js +45 -3
- package/generator/api/sdk.config.example.json +4 -2
- package/layout/component/package.json +4 -0
- package/layout/empty/package.json +4 -0
- package/layout/horizontal/package.json +4 -0
- package/layout/provider/package.json +4 -0
- package/layout/services/package.json +4 -0
- package/layout/shell/package.json +4 -0
- package/layout/token/directive/package.json +4 -0
- package/layout/token/package.json +4 -0
- package/layout/vertical/package.json +4 -0
- package/navigation/demo-data/package.json +4 -0
- package/navigation/icon/package.json +4 -0
- package/navigation/item/package.json +4 -0
- package/navigation/service/package.json +4 -0
- package/navigation/sidebar/package.json +4 -0
- package/navigation/topbar/package.json +4 -0
- package/navigation/types/package.json +4 -0
- package/package.json +196 -128
- package/theme/README.md +67 -0
- package/theme/provider/package.json +4 -0
- package/theme/services/package.json +4 -0
- package/theme/styles/index.css +12 -7
- package/theme/token/package.json +4 -0
- package/types/{ojiepermana-angular-ui-component-chart.d.ts → ojiepermana-angular-component-chart.d.ts} +15 -15
- package/types/ojiepermana-angular-generator-api.d.ts +2 -1
- package/types/ojiepermana-angular-layout-empty.d.ts +22 -0
- package/types/ojiepermana-angular-layout-horizontal.d.ts +36 -0
- package/types/ojiepermana-angular-layout-provider.d.ts +6 -0
- package/types/ojiepermana-angular-layout-services.d.ts +25 -0
- package/types/ojiepermana-angular-layout-shell.d.ts +8 -0
- package/types/ojiepermana-angular-layout-token-directive.d.ts +13 -0
- package/types/ojiepermana-angular-layout-token.d.ts +36 -0
- package/types/ojiepermana-angular-layout-vertical.d.ts +38 -0
- package/types/ojiepermana-angular-layout.d.ts +26 -25
- package/types/ojiepermana-angular-navigation-demo-data.d.ts +5 -0
- package/types/ojiepermana-angular-navigation-item.d.ts +54 -0
- package/types/ojiepermana-angular-navigation-service.d.ts +77 -0
- package/types/ojiepermana-angular-navigation-sidebar.d.ts +75 -0
- package/types/ojiepermana-angular-navigation-topbar.d.ts +54 -0
- package/types/ojiepermana-angular-navigation-types.d.ts +129 -0
- package/types/ojiepermana-angular-theme-provider.d.ts +11 -0
- package/types/ojiepermana-angular-theme-services.d.ts +55 -0
- package/types/ojiepermana-angular-theme-token.d.ts +57 -0
- package/types/ojiepermana-angular-theme.d.ts +11 -66
- package/fesm2022/ojiepermana-angular-layout-theme.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-navigation.mjs +0 -2317
- package/fesm2022/ojiepermana-angular-navigation.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-accordion.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-alert-dialog.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-alert.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-aspect-ratio.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-avatar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-badge.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-breadcrumb.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-button-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-button.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-calendar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-card.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-carousel.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart-area.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart-bar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart-line.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart-pie.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart-radar.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart-radial.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart-scatter.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-chart.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-checkbox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-collapsible.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-combobox.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-command.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-context-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-date-picker.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-dialog.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-drawer.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-dropdown-menu.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-form.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-input-group.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-input.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-item.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-label.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-pagination.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-popover.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-progress.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-radio.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-scroll-area.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-select.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-separator.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-sheet.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-skeleton.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-slider.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-switch.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-table.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-tabs.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-textarea.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-toast.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-tooltip.mjs.map +0 -1
- package/fesm2022/ojiepermana-angular-ui-component-utils.mjs.map +0 -1
- package/layout/theme/package.json +0 -4
- package/navigation/package.json +0 -4
- package/navigation-icon/package.json +0 -4
- package/types/ojiepermana-angular-navigation.d.ts +0 -375
- package/ui/component/accordion/package.json +0 -4
- package/ui/component/alert/package.json +0 -4
- package/ui/component/alert-dialog/package.json +0 -4
- package/ui/component/aspect-ratio/package.json +0 -4
- package/ui/component/avatar/package.json +0 -4
- package/ui/component/badge/package.json +0 -4
- package/ui/component/breadcrumb/package.json +0 -4
- package/ui/component/button/package.json +0 -4
- package/ui/component/button-group/package.json +0 -4
- package/ui/component/calendar/package.json +0 -4
- package/ui/component/card/package.json +0 -4
- package/ui/component/carousel/package.json +0 -4
- package/ui/component/chart/area/package.json +0 -4
- package/ui/component/chart/bar/package.json +0 -4
- package/ui/component/chart/line/package.json +0 -4
- package/ui/component/chart/package.json +0 -4
- package/ui/component/chart/pie/package.json +0 -4
- package/ui/component/chart/radar/package.json +0 -4
- package/ui/component/chart/radial/package.json +0 -4
- package/ui/component/chart/scatter/package.json +0 -4
- package/ui/component/checkbox/package.json +0 -4
- package/ui/component/collapsible/package.json +0 -4
- package/ui/component/combobox/package.json +0 -4
- package/ui/component/command/package.json +0 -4
- package/ui/component/context-menu/package.json +0 -4
- package/ui/component/date-picker/package.json +0 -4
- package/ui/component/dialog/package.json +0 -4
- package/ui/component/drawer/package.json +0 -4
- package/ui/component/dropdown-menu/package.json +0 -4
- package/ui/component/form/package.json +0 -4
- package/ui/component/input/package.json +0 -4
- package/ui/component/input-group/package.json +0 -4
- package/ui/component/item/package.json +0 -4
- package/ui/component/label/package.json +0 -4
- package/ui/component/pagination/package.json +0 -4
- package/ui/component/popover/package.json +0 -4
- package/ui/component/progress/package.json +0 -4
- package/ui/component/radio/package.json +0 -4
- package/ui/component/scroll-area/package.json +0 -4
- package/ui/component/select/package.json +0 -4
- package/ui/component/separator/package.json +0 -4
- package/ui/component/sheet/package.json +0 -4
- package/ui/component/skeleton/package.json +0 -4
- package/ui/component/slider/package.json +0 -4
- package/ui/component/switch/package.json +0 -4
- package/ui/component/table/package.json +0 -4
- package/ui/component/tabs/package.json +0 -4
- package/ui/component/textarea/package.json +0 -4
- package/ui/component/toast/package.json +0 -4
- package/ui/component/tooltip/package.json +0 -4
- package/ui/component/utils/package.json +0 -4
- /package/{ui/component → component}/chart/README.md +0 -0
- /package/theme/styles/{themes/library/_components.css → foundation/components.css} +0 -0
- /package/theme/styles/{themes/library/_layers.css → foundation/layers.css} +0 -0
- /package/theme/styles/{themes/library/_tokens.css → foundation/tokens.css} +0 -0
- /package/theme/styles/{themes/library/_material-overrides.css → integrations/material.css} +0 -0
- /package/theme/styles/{themes → integrations}/tailwind.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/amber.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/base.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/blue.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/cyan.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/emerald.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/fuchsia.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/green.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/index.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/indigo.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/lime.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/orange.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/pink.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/purple.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/red.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/rose.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/sky.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/teal.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/violet.css +0 -0
- /package/theme/styles/{themes/library → variants}/color/yellow.css +0 -0
- /package/theme/styles/{themes → variants}/mode/dark.css +0 -0
- /package/theme/styles/{themes → variants}/mode/index.css +0 -0
- /package/theme/styles/{themes → variants}/mode/light.css +0 -0
- /package/theme/styles/{themes/library → variants}/style/brutal.css +0 -0
- /package/theme/styles/{themes/library → variants}/style/default.css +0 -0
- /package/theme/styles/{themes/library → variants}/style/index.css +0 -0
- /package/theme/styles/{themes/library → variants}/style/sharp.css +0 -0
- /package/theme/styles/{themes/library → variants}/style/soft.css +0 -0
- /package/types/{ojiepermana-angular-ui-component-accordion.d.ts → ojiepermana-angular-component-accordion.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-alert-dialog.d.ts → ojiepermana-angular-component-alert-dialog.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-alert.d.ts → ojiepermana-angular-component-alert.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-aspect-ratio.d.ts → ojiepermana-angular-component-aspect-ratio.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-avatar.d.ts → ojiepermana-angular-component-avatar.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-badge.d.ts → ojiepermana-angular-component-badge.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-breadcrumb.d.ts → ojiepermana-angular-component-breadcrumb.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-button-group.d.ts → ojiepermana-angular-component-button-group.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-button.d.ts → ojiepermana-angular-component-button.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-calendar.d.ts → ojiepermana-angular-component-calendar.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-card.d.ts → ojiepermana-angular-component-card.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-carousel.d.ts → ojiepermana-angular-component-carousel.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-chart-area.d.ts → ojiepermana-angular-component-chart-area.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-chart-bar.d.ts → ojiepermana-angular-component-chart-bar.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-chart-line.d.ts → ojiepermana-angular-component-chart-line.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-chart-pie.d.ts → ojiepermana-angular-component-chart-pie.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-chart-radar.d.ts → ojiepermana-angular-component-chart-radar.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-chart-radial.d.ts → ojiepermana-angular-component-chart-radial.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-chart-scatter.d.ts → ojiepermana-angular-component-chart-scatter.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-checkbox.d.ts → ojiepermana-angular-component-checkbox.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-collapsible.d.ts → ojiepermana-angular-component-collapsible.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-combobox.d.ts → ojiepermana-angular-component-combobox.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-command.d.ts → ojiepermana-angular-component-command.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-context-menu.d.ts → ojiepermana-angular-component-context-menu.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-date-picker.d.ts → ojiepermana-angular-component-date-picker.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-dialog.d.ts → ojiepermana-angular-component-dialog.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-drawer.d.ts → ojiepermana-angular-component-drawer.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-dropdown-menu.d.ts → ojiepermana-angular-component-dropdown-menu.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-form.d.ts → ojiepermana-angular-component-form.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-input-group.d.ts → ojiepermana-angular-component-input-group.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-input.d.ts → ojiepermana-angular-component-input.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-item.d.ts → ojiepermana-angular-component-item.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-label.d.ts → ojiepermana-angular-component-label.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-pagination.d.ts → ojiepermana-angular-component-pagination.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-popover.d.ts → ojiepermana-angular-component-popover.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-progress.d.ts → ojiepermana-angular-component-progress.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-radio.d.ts → ojiepermana-angular-component-radio.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-scroll-area.d.ts → ojiepermana-angular-component-scroll-area.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-select.d.ts → ojiepermana-angular-component-select.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-separator.d.ts → ojiepermana-angular-component-separator.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-sheet.d.ts → ojiepermana-angular-component-sheet.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-skeleton.d.ts → ojiepermana-angular-component-skeleton.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-slider.d.ts → ojiepermana-angular-component-slider.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-switch.d.ts → ojiepermana-angular-component-switch.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-table.d.ts → ojiepermana-angular-component-table.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-tabs.d.ts → ojiepermana-angular-component-tabs.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-textarea.d.ts → ojiepermana-angular-component-textarea.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-toast.d.ts → ojiepermana-angular-component-toast.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-tooltip.d.ts → ojiepermana-angular-component-tooltip.d.ts} +0 -0
- /package/types/{ojiepermana-angular-ui-component-utils.d.ts → ojiepermana-angular-component-utils.d.ts} +0 -0
- /package/types/{ojiepermana-angular-layout-theme.d.ts → ojiepermana-angular-layout-component.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ojiepermana-angular-theme.mjs","sources":["../../../projects/angular/theme/src/lib/core/theme.tokens.ts","../../../projects/angular/theme/src/lib/core/theme.service.ts","../../../projects/angular/theme/src/lib/core/theme.provider.ts","../../../projects/angular/theme/public-api.ts","../../../projects/angular/theme/ojiepermana-angular-theme.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const MODES = ['light', 'dark'] as const;\n\nexport type ThemeMode = (typeof MODES)[number];\n\nexport const COLOR_SCHEMES = ['light', 'dark', 'system'] as const;\n\nexport type ColorScheme = (typeof COLOR_SCHEMES)[number];\n\nexport const COLORS = [\n 'base',\n 'red',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'green',\n 'emerald',\n 'teal',\n 'cyan',\n 'sky',\n 'blue',\n 'indigo',\n 'violet',\n 'purple',\n 'fuchsia',\n 'pink',\n 'rose',\n] as const;\n\nexport type ThemeColor = (typeof COLORS)[number];\n\nexport const STYLES = ['default', 'sharp', 'brutal', 'soft'] as const;\n\nexport type ThemeStyle = (typeof STYLES)[number];\n\nexport const BRANDS = ['etos'] as const;\n\nexport type ThemeBrand = (typeof BRANDS)[number];\n\nexport interface ThemeConfig {\n readonly mode: ThemeMode;\n readonly brand: ThemeBrand | null;\n readonly color: ThemeColor;\n readonly style: ThemeStyle;\n}\n\nexport interface MaterialThemeConfig {\n /** Initial mode preference. Supports `system` for first-visit OS detection. */\n readonly mode?: ColorScheme;\n /** Initial brand bundle. When set, it replaces the explicit color and style layers. */\n readonly brand?: ThemeBrand | null;\n /** Alias for `brand` to match the persisted `theme-brand` setting. */\n readonly 'theme-brand'?: ThemeBrand | null;\n /** Initial brand color layer. */\n readonly color?: ThemeColor;\n /** Initial style personality layer. */\n readonly style?: ThemeStyle;\n /** @deprecated Use `mode` instead. */\n readonly defaultMode?: ColorScheme;\n /** Default brand bundle. When set, it replaces the explicit color and style layers. */\n readonly defaultBrand?: ThemeBrand | null;\n /** @deprecated Use `color` instead. */\n readonly defaultColor?: ThemeColor;\n /** @deprecated Use `style` instead. */\n readonly defaultStyle?: ThemeStyle;\n /** @deprecated Use `defaultMode` instead. */\n readonly defaultScheme?: ColorScheme;\n /** @deprecated Use `defaultColor` instead. */\n readonly defaultTheme?: ThemeColor | string;\n /** @deprecated Use `modeStorageKey` instead. */\n readonly storageKey?: string | null;\n /** @deprecated Use `modeStorageKey` instead. */\n readonly schemeStorageKey?: string | null;\n /** @deprecated Use `colorStorageKey` instead. */\n readonly themeStorageKey?: string | null;\n /** localStorage key used to persist the mode preference. Set to `null` to disable persistence. */\n readonly modeStorageKey?: string | null;\n /** localStorage key used to persist the brand bundle. Set to `null` to disable persistence. */\n readonly brandStorageKey?: string | null;\n /** localStorage key used to persist the color layer. Set to `null` to disable persistence. */\n readonly colorStorageKey?: string | null;\n /** localStorage key used to persist the style layer. Set to `null` to disable persistence. */\n readonly styleStorageKey?: string | null;\n}\n\nexport interface ResolvedMaterialThemeConfig {\n readonly defaultMode: ColorScheme;\n readonly defaultBrand: ThemeBrand | null;\n readonly defaultColor: ThemeColor;\n readonly defaultStyle: ThemeStyle;\n readonly modeStorageKey: string | null;\n readonly brandStorageKey: string | null;\n readonly colorStorageKey: string | null;\n readonly styleStorageKey: string | null;\n}\n\nexport const MATERIAL_THEME_CONFIG = new InjectionToken<MaterialThemeConfig>('MATERIAL_THEME_CONFIG');\n\nexport const DEFAULT_MATERIAL_THEME_CONFIG: ResolvedMaterialThemeConfig = {\n defaultMode: 'light',\n defaultBrand: null,\n defaultColor: 'base',\n defaultStyle: 'default',\n modeStorageKey: 'theme-mode',\n brandStorageKey: 'theme-brand',\n colorStorageKey: 'theme-color',\n styleStorageKey: 'theme-style',\n};\n\nexport function isColorScheme(value: string | null | undefined): value is ColorScheme {\n return COLOR_SCHEMES.some((scheme) => scheme === value);\n}\n\nexport function isThemeColor(value: string | null | undefined): value is ThemeColor {\n return COLORS.some((color) => color === value);\n}\n\nexport function isThemeStyle(value: string | null | undefined): value is ThemeStyle {\n return STYLES.some((style) => style === value);\n}\n\nexport function isThemeBrand(value: string | null | undefined): value is ThemeBrand {\n return BRANDS.some((brand) => brand === value);\n}\n","import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Injectable, computed, effect, inject, signal } from '@angular/core';\nimport {\n COLOR_SCHEMES,\n DEFAULT_MATERIAL_THEME_CONFIG,\n MATERIAL_THEME_CONFIG,\n type ColorScheme,\n type ResolvedMaterialThemeConfig,\n type ThemeBrand,\n type ThemeColor,\n type ThemeConfig,\n type ThemeMode,\n type ThemeStyle,\n isThemeBrand,\n isColorScheme,\n isThemeColor,\n isThemeStyle,\n} from './theme.tokens';\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly config = this.resolveConfig();\n private readonly initialBrand = this.readPersistedBrand() ?? this.config.defaultBrand;\n\n private readonly _modePreference = signal<ColorScheme>(this.readPersistedMode() ?? this.config.defaultMode);\n private readonly _brand = signal<ThemeBrand | null>(this.initialBrand);\n private readonly _color = signal<ThemeColor>(\n this.initialBrand ? this.config.defaultColor : (this.readPersistedColor() ?? this.config.defaultColor),\n );\n private readonly _style = signal<ThemeStyle>(\n this.initialBrand ? this.config.defaultStyle : (this.readPersistedStyle() ?? this.config.defaultStyle),\n );\n private readonly _systemPrefersDark = signal<boolean>(this.prefersDark());\n\n readonly scheme = this._modePreference.asReadonly();\n readonly brand = this._brand.asReadonly();\n readonly color = this._color.asReadonly();\n readonly theme = this._color.asReadonly();\n readonly style = this._style.asReadonly();\n readonly mode = computed<ThemeMode>(() => this.resolveMode(this._modePreference()));\n readonly snapshot = computed<ThemeConfig>(() => ({\n mode: this.mode(),\n brand: this._brand(),\n color: this._color(),\n style: this._style(),\n }));\n\n readonly isDark = computed(() => this.mode() === 'dark');\n\n constructor() {\n this.watchSystemScheme();\n\n effect(() => {\n const root = this.document.documentElement;\n const mode = this.mode();\n const brand = this._brand();\n const color = this._color();\n const style = this._style();\n\n root.dataset['mode'] = mode;\n root.dataset['theme'] = brand ?? color;\n root.classList.toggle('dark', mode === 'dark');\n\n this.persistMode(this._modePreference());\n\n if (brand) {\n root.setAttribute('theme-brand', brand);\n root.removeAttribute('theme-color');\n root.removeAttribute('theme-style');\n delete root.dataset['color'];\n delete root.dataset['style'];\n\n this.persistBrand(brand);\n this.clearPersistedColor();\n this.clearPersistedStyle();\n return;\n }\n\n root.removeAttribute('theme-brand');\n root.setAttribute('theme-color', color);\n root.setAttribute('theme-style', style);\n root.dataset['color'] = color;\n root.dataset['style'] = style;\n\n this.clearPersistedBrand();\n this.persistColor(color);\n this.persistStyle(style);\n });\n }\n\n setMode(mode: ThemeMode): void {\n this._modePreference.set(mode);\n }\n\n setScheme(scheme: ColorScheme): void {\n this._modePreference.set(scheme);\n }\n\n setBrand(brand: ThemeBrand | null): void {\n this._brand.set(brand);\n this._color.set(this.config.defaultColor);\n this._style.set(this.config.defaultStyle);\n }\n\n setColor(color: ThemeColor): void {\n if (this._brand()) {\n this._brand.set(null);\n }\n this._color.set(color);\n }\n\n setTheme(theme: ThemeColor | string): void {\n if (isThemeColor(theme)) {\n this.setColor(theme);\n }\n }\n\n setStyle(style: ThemeStyle): void {\n if (this._brand()) {\n this._brand.set(null);\n }\n this._style.set(style);\n }\n\n setAll(config: Partial<ThemeConfig> & { readonly scheme?: ColorScheme }): void {\n if (config.scheme) {\n this.setScheme(config.scheme);\n }\n if (config.mode) {\n this.setMode(config.mode);\n }\n if (config.brand !== undefined) {\n this.setBrand(config.brand);\n }\n if (config.brand === undefined || config.brand === null) {\n if (config.color) {\n this.setColor(config.color);\n }\n if (config.style) {\n this.setStyle(config.style);\n }\n }\n }\n\n toggleScheme(): void {\n this.toggleMode();\n }\n\n toggleMode(): void {\n this.setMode(this.mode() === 'dark' ? 'light' : 'dark');\n }\n\n reset(): void {\n this._modePreference.set(this.config.defaultMode);\n this._brand.set(this.config.defaultBrand);\n this._color.set(this.config.defaultColor);\n this._style.set(this.config.defaultStyle);\n }\n\n private resolveConfig(): ResolvedMaterialThemeConfig {\n const config = inject(MATERIAL_THEME_CONFIG, { optional: true }) ?? {};\n const configuredMode = config.mode ?? config.defaultMode ?? config.defaultScheme;\n const configuredBrand = config.brand ?? config['theme-brand'] ?? config.defaultBrand;\n const configuredColor = config.color ?? config.defaultColor ?? config.defaultTheme;\n const configuredStyle = config.style ?? config.defaultStyle;\n\n const defaultMode = isColorScheme(configuredMode) ? configuredMode : DEFAULT_MATERIAL_THEME_CONFIG.defaultMode;\n const defaultBrand = isThemeBrand(configuredBrand) ? configuredBrand : DEFAULT_MATERIAL_THEME_CONFIG.defaultBrand;\n const defaultColor = isThemeColor(configuredColor) ? configuredColor : DEFAULT_MATERIAL_THEME_CONFIG.defaultColor;\n const defaultStyle = isThemeStyle(configuredStyle) ? configuredStyle : DEFAULT_MATERIAL_THEME_CONFIG.defaultStyle;\n\n return {\n defaultMode,\n defaultBrand,\n defaultColor,\n defaultStyle,\n modeStorageKey:\n config.modeStorageKey ??\n config.schemeStorageKey ??\n config.storageKey ??\n DEFAULT_MATERIAL_THEME_CONFIG.modeStorageKey,\n brandStorageKey: config.brandStorageKey ?? DEFAULT_MATERIAL_THEME_CONFIG.brandStorageKey,\n colorStorageKey:\n config.colorStorageKey ?? config.themeStorageKey ?? DEFAULT_MATERIAL_THEME_CONFIG.colorStorageKey,\n styleStorageKey: config.styleStorageKey ?? DEFAULT_MATERIAL_THEME_CONFIG.styleStorageKey,\n };\n }\n\n private resolveMode(mode: ColorScheme): ThemeMode {\n return mode === 'system' ? (this._systemPrefersDark() ? 'dark' : 'light') : mode;\n }\n\n private prefersDark(): boolean {\n const mql = this.document.defaultView?.matchMedia?.('(prefers-color-scheme: dark)');\n return !!mql?.matches;\n }\n\n private watchSystemScheme(): void {\n const mql = this.document.defaultView?.matchMedia?.('(prefers-color-scheme: dark)');\n if (!mql) return;\n\n const listener = (event: MediaQueryListEvent): void => {\n this._systemPrefersDark.set(event.matches);\n };\n mql.addEventListener('change', listener);\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', listener));\n }\n\n private readPersistedMode(): ColorScheme | null {\n const key = this.config.modeStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isColorScheme(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private readPersistedBrand(): ThemeBrand | null {\n const key = this.config.brandStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isThemeBrand(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private readPersistedColor(): ThemeColor | null {\n const key = this.config.colorStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isThemeColor(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private readPersistedStyle(): ThemeStyle | null {\n const key = this.config.styleStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isThemeStyle(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private persistMode(mode: ColorScheme): void {\n const key = this.config.modeStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, mode);\n } catch {\n /* ignore */\n }\n }\n\n private persistBrand(brand: ThemeBrand): void {\n const key = this.config.brandStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, brand);\n } catch {\n /* ignore */\n }\n }\n\n private persistColor(color: ThemeColor): void {\n const key = this.config.colorStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, color);\n } catch {\n /* ignore */\n }\n }\n\n private persistStyle(style: ThemeStyle): void {\n const key = this.config.styleStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, style);\n } catch {\n /* ignore */\n }\n }\n\n private clearPersistedBrand(): void {\n this.clearPersistedItem(this.config.brandStorageKey);\n }\n\n private clearPersistedColor(): void {\n this.clearPersistedItem(this.config.colorStorageKey);\n }\n\n private clearPersistedStyle(): void {\n this.clearPersistedItem(this.config.styleStorageKey);\n }\n\n private clearPersistedItem(key: string | null): void {\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.removeItem(key);\n } catch {\n /* ignore */\n }\n }\n}\n","import {\n inject,\n type EnvironmentProviders,\n type Provider,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { THEME_PANEL_THEME_PORT } from '@ojiepermana/angular/layout/theme';\nimport { MAT_RIPPLE_GLOBAL_OPTIONS } from '@angular/material/core';\nimport { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';\nimport { ThemeService } from './theme.service';\nimport { MATERIAL_THEME_CONFIG, type MaterialThemeConfig } from './theme.tokens';\n\n/**\n * Opaque feature unit consumed by {@link provideMaterialTheme}. Mirrors\n * Angular's router/http feature pattern so add-ons can be composed without\n * widening the primary provider signature.\n */\nexport interface MaterialThemeFeature {\n readonly providers: Provider[];\n}\n\n/**\n * Bootstrap the shared theme for any `@ojiepermana/angular/*` entry point.\n *\n * By default wires up the theme config token and eagerly initializes `ThemeService`\n * so root theme attributes are applied during bootstrap. Opt in\n * to Angular Material defaults (ripple / form-field) via\n * {@link withMaterialDefaults}.\n * Supports shorthand `mode`, `color`, and `style` config keys.\n *\n * @example\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideAnimations(),\n * provideMaterialTheme(\n * {\n * mode: 'system',\n * color: 'base',\n * style: 'soft',\n * },\n * withMaterialDefaults(),\n * ),\n * ],\n * };\n */\nexport function provideMaterialTheme(\n config: MaterialThemeConfig = {},\n ...features: MaterialThemeFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: MATERIAL_THEME_CONFIG, useValue: config },\n { provide: THEME_PANEL_THEME_PORT, useExisting: ThemeService },\n provideEnvironmentInitializer(() => {\n inject(ThemeService);\n }),\n ...features.flatMap((f) => f.providers),\n ]);\n}\n\n/**\n * Opt-in Angular Material defaults tuned for the shared theme layer:\n *\n * - Disables the global Material ripple.\n * - Forces `appearance: 'outline'` + `subscriptSizing: 'dynamic'` on every\n * `mat-form-field`.\n *\n * Only apply when your app actually renders Angular Material components.\n */\nexport function withMaterialDefaults(): MaterialThemeFeature {\n return {\n providers: [\n { provide: MAT_RIPPLE_GLOBAL_OPTIONS, useValue: { disabled: true } },\n {\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n useValue: { appearance: 'outline', subscriptSizing: 'dynamic' },\n },\n ],\n };\n}\n","/*\n * Public API Surface of @ojiepermana/angular/theme\n *\n * The single source of truth for 3-layer design tokens, CSS variables,\n * and the `ThemeService` shared by every `@ojiepermana/angular/*` subpath\n * (shadcn, layout, navigation, ...).\n *\n * Usage:\n * // app.config.ts\n * import { provideMaterialTheme } from '@ojiepermana/angular/theme';\n *\n * // styles.css\n * @import '@ojiepermana/angular/theme/styles';\n * @import 'tailwindcss';\n */\n\nexport * from './src/lib/core/theme.tokens';\nexport * from './src/lib/core/theme.service';\nexport * from './src/lib/core/theme.provider';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAEa,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM;AAI9B,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ;AAIhD,MAAM,MAAM,GAAG;IACpB,MAAM;IACN,KAAK;IACL,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;IACN,MAAM;;AAKD,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM;AAIpD,MAAM,MAAM,GAAG,CAAC,MAAM;MA6DhB,qBAAqB,GAAG,IAAI,cAAc,CAAsB,uBAAuB;AAE7F,MAAM,6BAA6B,GAAgC;AACxE,IAAA,WAAW,EAAE,OAAO;AACpB,IAAA,YAAY,EAAE,IAAI;AAClB,IAAA,YAAY,EAAE,MAAM;AACpB,IAAA,YAAY,EAAE,SAAS;AACvB,IAAA,cAAc,EAAE,YAAY;AAC5B,IAAA,eAAe,EAAE,aAAa;AAC9B,IAAA,eAAe,EAAE,aAAa;AAC9B,IAAA,eAAe,EAAE,aAAa;;AAG1B,SAAU,aAAa,CAAC,KAAgC,EAAA;AAC5D,IAAA,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,MAAM,KAAK,KAAK,CAAC;AACzD;AAEM,SAAU,YAAY,CAAC,KAAgC,EAAA;AAC3D,IAAA,OAAO,MAAM,CAA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,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,cADC,MAAM,EAAA,CAAA;;4FACnB,YAAY,EAAA,UAAA,EAAA,CAAA;kBADxB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACGlC;;;;;;;;;;;;;;;;;;;;;;;AAuBG;SACa,oBAAoB,CAClC,SAA8B,EAAE,EAChC,GAAG,QAAgC,EAAA;AAEnC,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,EAAE;AACpD,QAAA,EAAE,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,YAAY,EAAE;QAC9D,6BAA6B,CAAC,MAAK;YACjC,MAAM,CAAC,YAAY,CAAC;AACtB,QAAA,CAAC,CAAC;AACF,QAAA,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC;AACxC,KAAA,CAAC;AACJ;AAEA;;;;;;;;AAQG;SACa,oBAAoB,GAAA;IAClC,OAAO;AACL,QAAA,SAAS,EAAE;YACT,EAAE,OAAO,EAAE,yBAAyB,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;AACpE,YAAA;AACE,gBAAA,OAAO,EAAE,8BAA8B;gBACvC,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE;AAChE,aAAA;AACF,SAAA;KACF;AACH;;AC/EA;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular-theme.mjs","sources":["../../../projects/angular/theme/token/src/lib/theme.tokens.ts","../../../projects/angular/theme/services/src/lib/theme.service.ts","../../../projects/angular/theme/provider/src/lib/theme.provider.ts","../../../projects/angular/theme/public-api.ts","../../../projects/angular/theme/ojiepermana-angular-theme.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const MODES = ['light', 'dark'] as const;\n\nexport type ThemeMode = (typeof MODES)[number];\n\nexport const COLOR_SCHEMES = ['light', 'dark', 'system'] as const;\n\nexport type ColorScheme = (typeof COLOR_SCHEMES)[number];\n\nexport const COLORS = [\n 'base',\n 'red',\n 'orange',\n 'amber',\n 'yellow',\n 'lime',\n 'green',\n 'emerald',\n 'teal',\n 'cyan',\n 'sky',\n 'blue',\n 'indigo',\n 'violet',\n 'purple',\n 'fuchsia',\n 'pink',\n 'rose',\n] as const;\n\nexport type ThemeColor = (typeof COLORS)[number];\n\nexport const STYLES = ['default', 'sharp', 'brutal', 'soft'] as const;\n\nexport type ThemeStyle = (typeof STYLES)[number];\n\nexport const BRANDS = ['etos'] as const;\n\nexport type ThemeBrand = (typeof BRANDS)[number];\n\nexport interface ThemeConfig {\n readonly mode: ThemeMode;\n readonly brand: ThemeBrand | null;\n readonly color: ThemeColor;\n readonly style: ThemeStyle;\n}\n\nexport interface MaterialThemeConfig {\n readonly mode?: ColorScheme;\n readonly brand?: ThemeBrand | null;\n readonly 'theme-brand'?: ThemeBrand | null;\n readonly color?: ThemeColor;\n readonly style?: ThemeStyle;\n readonly defaultMode?: ColorScheme;\n readonly defaultBrand?: ThemeBrand | null;\n readonly defaultColor?: ThemeColor;\n readonly defaultStyle?: ThemeStyle;\n readonly defaultScheme?: ColorScheme;\n readonly defaultTheme?: ThemeColor | string;\n readonly storageKey?: string | null;\n readonly schemeStorageKey?: string | null;\n readonly themeStorageKey?: string | null;\n readonly modeStorageKey?: string | null;\n readonly brandStorageKey?: string | null;\n readonly colorStorageKey?: string | null;\n readonly styleStorageKey?: string | null;\n}\n\nexport interface ResolvedMaterialThemeConfig {\n readonly defaultMode: ColorScheme;\n readonly defaultBrand: ThemeBrand | null;\n readonly defaultColor: ThemeColor;\n readonly defaultStyle: ThemeStyle;\n readonly modeStorageKey: string | null;\n readonly brandStorageKey: string | null;\n readonly colorStorageKey: string | null;\n readonly styleStorageKey: string | null;\n}\n\nexport const MATERIAL_THEME_CONFIG = new InjectionToken<MaterialThemeConfig>('MATERIAL_THEME_CONFIG');\n\nexport const DEFAULT_MATERIAL_THEME_CONFIG: ResolvedMaterialThemeConfig = {\n defaultMode: 'light',\n defaultBrand: null,\n defaultColor: 'base',\n defaultStyle: 'default',\n modeStorageKey: 'theme-mode',\n brandStorageKey: 'theme-brand',\n colorStorageKey: 'theme-color',\n styleStorageKey: 'theme-style',\n};\n\nexport function isColorScheme(value: string | null | undefined): value is ColorScheme {\n return COLOR_SCHEMES.some((scheme) => scheme === value);\n}\n\nexport function isThemeColor(value: string | null | undefined): value is ThemeColor {\n return COLORS.some((color) => color === value);\n}\n\nexport function isThemeStyle(value: string | null | undefined): value is ThemeStyle {\n return STYLES.some((style) => style === value);\n}\n\nexport function isThemeBrand(value: string | null | undefined): value is ThemeBrand {\n return BRANDS.some((brand) => brand === value);\n}\n","import { DOCUMENT } from '@angular/common';\nimport { DestroyRef, Injectable, computed, effect, inject, signal } from '@angular/core';\nimport {\n DEFAULT_MATERIAL_THEME_CONFIG,\n MATERIAL_THEME_CONFIG,\n type ColorScheme,\n type ResolvedMaterialThemeConfig,\n type ThemeBrand,\n type ThemeColor,\n type ThemeConfig,\n type ThemeMode,\n type ThemeStyle,\n isColorScheme,\n isThemeBrand,\n isThemeColor,\n isThemeStyle,\n} from '@ojiepermana/angular/theme/token';\n\n@Injectable({ providedIn: 'root' })\nexport class ThemeService {\n private readonly document = inject(DOCUMENT);\n private readonly destroyRef = inject(DestroyRef);\n private readonly config = this.resolveConfig();\n private readonly initialBrand = this.readPersistedBrand() ?? this.config.defaultBrand;\n\n private readonly _modePreference = signal<ColorScheme>(this.readPersistedMode() ?? this.config.defaultMode);\n private readonly _brand = signal<ThemeBrand | null>(this.initialBrand);\n private readonly _color = signal<ThemeColor>(\n this.initialBrand ? this.config.defaultColor : (this.readPersistedColor() ?? this.config.defaultColor),\n );\n private readonly _style = signal<ThemeStyle>(\n this.initialBrand ? this.config.defaultStyle : (this.readPersistedStyle() ?? this.config.defaultStyle),\n );\n private readonly _systemPrefersDark = signal<boolean>(this.prefersDark());\n\n readonly scheme = this._modePreference.asReadonly();\n readonly brand = this._brand.asReadonly();\n readonly color = this._color.asReadonly();\n readonly theme = this._color.asReadonly();\n readonly style = this._style.asReadonly();\n readonly mode = computed<ThemeMode>(() => this.resolveMode(this._modePreference()));\n readonly snapshot = computed<ThemeConfig>(() => ({\n mode: this.mode(),\n brand: this._brand(),\n color: this._color(),\n style: this._style(),\n }));\n\n readonly isDark = computed(() => this.mode() === 'dark');\n\n constructor() {\n this.watchSystemScheme();\n\n effect(() => {\n const root = this.document.documentElement;\n const mode = this.mode();\n const brand = this._brand();\n const color = this._color();\n const style = this._style();\n\n root.dataset['mode'] = mode;\n root.dataset['theme'] = brand ?? color;\n root.classList.toggle('dark', mode === 'dark');\n\n this.persistMode(this._modePreference());\n\n if (brand) {\n root.setAttribute('theme-brand', brand);\n root.removeAttribute('theme-color');\n root.removeAttribute('theme-style');\n delete root.dataset['color'];\n delete root.dataset['style'];\n\n this.persistBrand(brand);\n this.clearPersistedColor();\n this.clearPersistedStyle();\n return;\n }\n\n root.removeAttribute('theme-brand');\n root.setAttribute('theme-color', color);\n root.setAttribute('theme-style', style);\n root.dataset['color'] = color;\n root.dataset['style'] = style;\n\n this.clearPersistedBrand();\n this.persistColor(color);\n this.persistStyle(style);\n });\n }\n\n setMode(mode: ThemeMode): void {\n this._modePreference.set(mode);\n }\n\n setScheme(scheme: ColorScheme): void {\n this._modePreference.set(scheme);\n }\n\n setBrand(brand: ThemeBrand | null): void {\n this._brand.set(brand);\n this._color.set(this.config.defaultColor);\n this._style.set(this.config.defaultStyle);\n }\n\n setColor(color: ThemeColor): void {\n if (this._brand()) {\n this._brand.set(null);\n }\n this._color.set(color);\n }\n\n setTheme(theme: ThemeColor | string): void {\n if (isThemeColor(theme)) {\n this.setColor(theme);\n }\n }\n\n setStyle(style: ThemeStyle): void {\n if (this._brand()) {\n this._brand.set(null);\n }\n this._style.set(style);\n }\n\n setAll(config: Partial<ThemeConfig> & { readonly scheme?: ColorScheme }): void {\n if (config.scheme) {\n this.setScheme(config.scheme);\n }\n if (config.mode) {\n this.setMode(config.mode);\n }\n if (config.brand !== undefined) {\n this.setBrand(config.brand);\n }\n if (config.brand === undefined || config.brand === null) {\n if (config.color) {\n this.setColor(config.color);\n }\n if (config.style) {\n this.setStyle(config.style);\n }\n }\n }\n\n toggleScheme(): void {\n this.toggleMode();\n }\n\n toggleMode(): void {\n this.setMode(this.mode() === 'dark' ? 'light' : 'dark');\n }\n\n reset(): void {\n this._modePreference.set(this.config.defaultMode);\n this._brand.set(this.config.defaultBrand);\n this._color.set(this.config.defaultColor);\n this._style.set(this.config.defaultStyle);\n }\n\n private resolveConfig(): ResolvedMaterialThemeConfig {\n const config = inject(MATERIAL_THEME_CONFIG, { optional: true }) ?? {};\n const configuredMode = config.mode ?? config.defaultMode ?? config.defaultScheme;\n const configuredBrand = config.brand ?? config['theme-brand'] ?? config.defaultBrand;\n const configuredColor = config.color ?? config.defaultColor ?? config.defaultTheme;\n const configuredStyle = config.style ?? config.defaultStyle;\n\n const defaultMode = isColorScheme(configuredMode) ? configuredMode : DEFAULT_MATERIAL_THEME_CONFIG.defaultMode;\n const defaultBrand = isThemeBrand(configuredBrand) ? configuredBrand : DEFAULT_MATERIAL_THEME_CONFIG.defaultBrand;\n const defaultColor = isThemeColor(configuredColor) ? configuredColor : DEFAULT_MATERIAL_THEME_CONFIG.defaultColor;\n const defaultStyle = isThemeStyle(configuredStyle) ? configuredStyle : DEFAULT_MATERIAL_THEME_CONFIG.defaultStyle;\n\n return {\n defaultMode,\n defaultBrand,\n defaultColor,\n defaultStyle,\n modeStorageKey:\n config.modeStorageKey ??\n config.schemeStorageKey ??\n config.storageKey ??\n DEFAULT_MATERIAL_THEME_CONFIG.modeStorageKey,\n brandStorageKey: config.brandStorageKey ?? DEFAULT_MATERIAL_THEME_CONFIG.brandStorageKey,\n colorStorageKey:\n config.colorStorageKey ?? config.themeStorageKey ?? DEFAULT_MATERIAL_THEME_CONFIG.colorStorageKey,\n styleStorageKey: config.styleStorageKey ?? DEFAULT_MATERIAL_THEME_CONFIG.styleStorageKey,\n };\n }\n\n private resolveMode(mode: ColorScheme): ThemeMode {\n return mode === 'system' ? (this._systemPrefersDark() ? 'dark' : 'light') : mode;\n }\n\n private prefersDark(): boolean {\n const mql = this.document.defaultView?.matchMedia?.('(prefers-color-scheme: dark)');\n return !!mql?.matches;\n }\n\n private watchSystemScheme(): void {\n const mql = this.document.defaultView?.matchMedia?.('(prefers-color-scheme: dark)');\n if (!mql) return;\n\n const listener = (event: MediaQueryListEvent): void => {\n this._systemPrefersDark.set(event.matches);\n };\n mql.addEventListener('change', listener);\n this.destroyRef.onDestroy(() => mql.removeEventListener('change', listener));\n }\n\n private readPersistedMode(): ColorScheme | null {\n const key = this.config.modeStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isColorScheme(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private readPersistedBrand(): ThemeBrand | null {\n const key = this.config.brandStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isThemeBrand(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private readPersistedColor(): ThemeColor | null {\n const key = this.config.colorStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isThemeColor(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private readPersistedStyle(): ThemeStyle | null {\n const key = this.config.styleStorageKey;\n if (!key) return null;\n try {\n const value = this.document.defaultView?.localStorage?.getItem(key);\n return isThemeStyle(value) ? value : null;\n } catch {\n return null;\n }\n }\n\n private persistMode(mode: ColorScheme): void {\n const key = this.config.modeStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, mode);\n } catch {\n /* ignore */\n }\n }\n\n private persistBrand(brand: ThemeBrand): void {\n const key = this.config.brandStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, brand);\n } catch {\n /* ignore */\n }\n }\n\n private persistColor(color: ThemeColor): void {\n const key = this.config.colorStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, color);\n } catch {\n /* ignore */\n }\n }\n\n private persistStyle(style: ThemeStyle): void {\n const key = this.config.styleStorageKey;\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.setItem(key, style);\n } catch {\n /* ignore */\n }\n }\n\n private clearPersistedBrand(): void {\n this.clearPersistedItem(this.config.brandStorageKey);\n }\n\n private clearPersistedColor(): void {\n this.clearPersistedItem(this.config.colorStorageKey);\n }\n\n private clearPersistedStyle(): void {\n this.clearPersistedItem(this.config.styleStorageKey);\n }\n\n private clearPersistedItem(key: string | null): void {\n if (!key) return;\n try {\n this.document.defaultView?.localStorage?.removeItem(key);\n } catch {\n /* ignore */\n }\n }\n}\n","import {\n inject,\n type EnvironmentProviders,\n type Provider,\n makeEnvironmentProviders,\n provideEnvironmentInitializer,\n} from '@angular/core';\nimport { THEME_PANEL_THEME_PORT } from '@ojiepermana/angular/layout/component';\nimport { ThemeService } from '@ojiepermana/angular/theme/services';\nimport { MATERIAL_THEME_CONFIG, type MaterialThemeConfig } from '@ojiepermana/angular/theme/token';\nimport { MAT_RIPPLE_GLOBAL_OPTIONS } from '@angular/material/core';\nimport { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field';\n\nexport interface MaterialThemeFeature {\n readonly providers: Provider[];\n}\n\nexport function provideMaterialTheme(\n config: MaterialThemeConfig = {},\n ...features: MaterialThemeFeature[]\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n { provide: MATERIAL_THEME_CONFIG, useValue: config },\n { provide: THEME_PANEL_THEME_PORT, useExisting: ThemeService },\n provideEnvironmentInitializer(() => {\n inject(ThemeService);\n }),\n ...features.flatMap((feature) => feature.providers),\n ]);\n}\n\nexport function withMaterialDefaults(): MaterialThemeFeature {\n return {\n providers: [\n { provide: MAT_RIPPLE_GLOBAL_OPTIONS, useValue: { disabled: true } },\n {\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n useValue: { appearance: 'outline', subscriptSizing: 'dynamic' },\n },\n ],\n };\n}\n","/*\n * Public API Surface of @ojiepermana/angular/theme\n *\n * Aggregate barrel for the shared theme runtime plus the stable CSS asset\n * surface used by every `@ojiepermana/angular/*` subpath.\n *\n * Runtime usage:\n * // app.config.ts\n * import { provideMaterialTheme } from '@ojiepermana/angular/theme';\n *\n * Deep runtime imports:\n * import { ThemeService } from '@ojiepermana/angular/theme/services';\n * import { provideMaterialTheme } from '@ojiepermana/angular/theme/provider';\n * import { MATERIAL_THEME_CONFIG } from '@ojiepermana/angular/theme/token';\n *\n * CSS usage:\n * // styles.css\n * @import '@ojiepermana/angular/theme/styles';\n * @import 'tailwindcss';\n * @import '@ojiepermana/angular/theme/tailwind/theme.css';\n */\n\nexport * from './token/public-api';\nexport * from './services/public-api';\nexport * from './provider/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["isThemeColor","MATERIAL_THEME_CONFIG","isColorScheme","DEFAULT_MATERIAL_THEME_CONFIG","isThemeBrand","isThemeStyle","ThemeService"],"mappings":";;;;;;;;;MAEa,KAAK,GAAG,CAAC,OAAO,EAAE,MAAM;AAI9B,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ;AAIhD,MAAM,MAAM,GAAG;IACpB,MAAM;IACN,KAAK;IACL,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,MAAM;IACN,OAAO;IACP,SAAS;IACT,MAAM;IACN,MAAM;IACN,KAAK;IACL,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,MAAM;IACN,MAAM;;AAKD,MAAM,MAAM,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAA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ACL,QAAA,SAAS,EAAE;YACT,EAAE,OAAO,EAAE,yBAAyB,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE;AACpE,YAAA;AACE,gBAAA,OAAO,EAAE,8BAA8B;gBACvC,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE;AAChE,aAAA;AACF,SAAA;KACF;AACH;;ACzCA;;;;;;;;;;;;;;;;;;;;AAoBG;;ACpBH;;AAEG;;;;"}
|
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
* Public API Surface of @ojiepermana/angular (primary entry)
|
|
3
3
|
*
|
|
4
4
|
* Components and utilities are shipped via subpath entries:
|
|
5
|
-
* - `@ojiepermana/angular/theme`
|
|
5
|
+
* - `@ojiepermana/angular/theme` and `@ojiepermana/angular/theme/{services,provider,token}` — theme runtime, design tokens, and provider helpers
|
|
6
6
|
* - `@ojiepermana/angular/component/<slug>` — shadcn/ui primitives and utilities shipped only as granular entrypoints
|
|
7
|
-
* - `@ojiepermana/angular/layout`
|
|
8
|
-
* - `@ojiepermana/angular/navigation
|
|
9
|
-
* - `@ojiepermana/angular/navigation/icon` — standalone icon entrypoint for bundle-sensitive consumers
|
|
7
|
+
* - `@ojiepermana/angular/layout` and `@ojiepermana/angular/layout/<part>` — layout primitives, state, and shells
|
|
8
|
+
* - `@ojiepermana/angular/navigation/<part>` — granular navigation primitives such as `types`, `service`, `sidebar`, `topbar`, `item`, `icon`, and `demo-data`
|
|
10
9
|
* - `@ojiepermana/angular/component/chart` — shared chart primitives
|
|
11
10
|
* - `@ojiepermana/angular/component/chart/<type>` — chart implementations
|
|
12
11
|
* - `@ojiepermana/angular/generator/api` — OpenAPI → Angular SDK generator (schematics + config types)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ojiepermana-angular.mjs","sources":["../../../projects/angular/public-api.ts","../../../projects/angular/ojiepermana-angular.ts"],"sourcesContent":["/*\n * Public API Surface of @ojiepermana/angular (primary entry)\n *\n * Components and utilities are shipped via subpath entries:\n * - `@ojiepermana/angular/theme`
|
|
1
|
+
{"version":3,"file":"ojiepermana-angular.mjs","sources":["../../../projects/angular/public-api.ts","../../../projects/angular/ojiepermana-angular.ts"],"sourcesContent":["/*\n * Public API Surface of @ojiepermana/angular (primary entry)\n *\n * Components and utilities are shipped via subpath entries:\n * - `@ojiepermana/angular/theme` and `@ojiepermana/angular/theme/{services,provider,token}` — theme runtime, design tokens, and provider helpers\n * - `@ojiepermana/angular/component/<slug>` — shadcn/ui primitives and utilities shipped only as granular entrypoints\n * - `@ojiepermana/angular/layout` and `@ojiepermana/angular/layout/<part>` — layout primitives, state, and shells\n * - `@ojiepermana/angular/navigation/<part>` — granular navigation primitives such as `types`, `service`, `sidebar`, `topbar`, `item`, `icon`, and `demo-data`\n * - `@ojiepermana/angular/component/chart` — shared chart primitives\n * - `@ojiepermana/angular/component/chart/<type>` — chart implementations\n * - `@ojiepermana/angular/generator/api` — OpenAPI → Angular SDK generator (schematics + config types)\n *\n * Consumers should import from the smallest subpath that fits their use case.\n */\n\nexport const MATERIAL_VERSION = '0.0.1';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;AAaG;AAEI,MAAM,gBAAgB,GAAG;;ACfhC;;AAEG;;;;"}
|
package/generator/api/README.md
CHANGED
|
@@ -96,12 +96,12 @@ ng generate @ojiepermana/angular:sdk [--dry-run] [--config=sdk.config.json]
|
|
|
96
96
|
{
|
|
97
97
|
"input": "./openapi.yaml",
|
|
98
98
|
"output": "./sdk",
|
|
99
|
-
"mode": "
|
|
99
|
+
"mode": "library", // "standalone" | "library" | "secondary-entrypoint"
|
|
100
100
|
"clientName": "Api",
|
|
101
|
-
"packageName": "@my-scope/sdk", //
|
|
102
|
-
"packageVersion": "0.0.1", //
|
|
101
|
+
"packageName": "@my-scope/sdk", // used in "library" mode
|
|
102
|
+
"packageVersion": "0.0.1", // used in "library" mode
|
|
103
103
|
"rootUrl": "", // optional; empty string means same-origin requests
|
|
104
|
-
"splitByDomain":
|
|
104
|
+
"splitByDomain": true, // optional; defaults true for "library", false otherwise
|
|
105
105
|
"splitDepth": "service", // "service" (default) | "tag"
|
|
106
106
|
"features": {
|
|
107
107
|
"models": true,
|
|
@@ -155,10 +155,12 @@ package path.
|
|
|
155
155
|
|
|
156
156
|
## Per-domain layout
|
|
157
157
|
|
|
158
|
-
By default
|
|
159
|
-
all at the output root).
|
|
160
|
-
|
|
161
|
-
|
|
158
|
+
By default, standalone and secondary-entrypoint targets emit a flat layout
|
|
159
|
+
(`models/`, `fn/`, `services/`, … all at the output root). `mode: "library"`
|
|
160
|
+
defaults to `splitByDomain: true` so the generated package is split into
|
|
161
|
+
secondary entrypoints immediately. You can still set `splitByDomain: false` if
|
|
162
|
+
you need the older flat library shape. Cross-domain models and client primitives
|
|
163
|
+
land in `shared/`.
|
|
162
164
|
|
|
163
165
|
```jsonc
|
|
164
166
|
{
|
|
@@ -176,12 +178,13 @@ client primitives land in `shared/`.
|
|
|
176
178
|
| `tag` | One folder per **leaf** tag, nested under the parent chain. Keeps fine-grained separation while staying grouped. | `access/role/`, `access/permission/`, `access/role-permission/`, `storage/gcs/`, `storage/s3/`, `auth/`, `shared/`, root `public-api.ts` |
|
|
177
179
|
|
|
178
180
|
Every domain folder contains `services/`, `fn/`, `models/`, `permissions/`,
|
|
179
|
-
and its own `public-api.ts
|
|
180
|
-
convenience). The root still owns the aggregate metadata barrel:
|
|
181
|
+
and its own `public-api.ts`. The root still owns the aggregate metadata barrel:
|
|
181
182
|
`metadata.ts`, `openapi-helpers.ts`, and `permissions/index.ts` stay at the SDK
|
|
182
|
-
root so `shared/` never depends on sibling domains.
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
root so `shared/` never depends on sibling domains. In standalone and
|
|
184
|
+
secondary-entrypoint modes, the root `public-api.ts` aggregates `shared`, root
|
|
185
|
+
metadata helpers, and every domain for convenience. In library mode, domain
|
|
186
|
+
exports stay in their secondary entrypoints so consumers deep import the domain
|
|
187
|
+
they need.
|
|
185
188
|
|
|
186
189
|
Model ownership rule (per-domain mode):
|
|
187
190
|
|
|
@@ -193,7 +196,7 @@ Model ownership rule (per-domain mode):
|
|
|
193
196
|
- Aggregate metadata helpers (`metadata.ts`, `openapi-helpers.ts`) and the
|
|
194
197
|
top-level `permissions/index.ts` stay at the SDK root.
|
|
195
198
|
|
|
196
|
-
Example consumption when using `mode: 'library'
|
|
199
|
+
Example consumption when using `mode: 'library'`:
|
|
197
200
|
|
|
198
201
|
```ts
|
|
199
202
|
import { RoleService } from '@my-scope/sdk/access';
|
|
@@ -204,11 +207,14 @@ import { GCSService } from '@my-scope/sdk/storage/gcs'; // splitDepth: 'tag'
|
|
|
204
207
|
|
|
205
208
|
## Output modes
|
|
206
209
|
|
|
207
|
-
| Mode | What it emits
|
|
208
|
-
| ---------------------- |
|
|
209
|
-
| `standalone` | A plain folder (no `ng-package.json`).
|
|
210
|
-
| `library` |
|
|
211
|
-
| `secondary-entrypoint` | Standalone output **plus** a minimal `ng-package.json` pointing at `public-api.ts`, plus nested `ng-package.json` files for split-by-domain secondary entrypoints.
|
|
210
|
+
| Mode | What it emits | Use when… |
|
|
211
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
|
212
|
+
| `standalone` | A plain folder (no `ng-package.json`). | You consume the SDK via path alias / `tsconfig.paths` inside the same app. |
|
|
213
|
+
| `library` | Split-by-domain output plus package metadata and nested `ng-package.json` manifests for secondary entrypoints. | You want a buildable/publishable Angular package with efficient deep imports. |
|
|
214
|
+
| `secondary-entrypoint` | Standalone output **plus** a minimal `ng-package.json` pointing at `public-api.ts`, plus nested `ng-package.json` files for split-by-domain secondary entrypoints. | You drop the folder inside an existing library so ng-packagr picks it up as a subpath. |
|
|
215
|
+
|
|
216
|
+
In `library` mode, output also includes `tsconfig.lib.json` and `tsconfig.lib.prod.json`.
|
|
217
|
+
`ng-package.dest` defaults to `dist/<output-folder-name>`.
|
|
212
218
|
|
|
213
219
|
## Feature flags
|
|
214
220
|
|
|
@@ -14,10 +14,12 @@ const FALLBACK_TEMPLATE = {
|
|
|
14
14
|
{
|
|
15
15
|
input: './openapi.yaml',
|
|
16
16
|
output: './sdk',
|
|
17
|
-
mode: '
|
|
17
|
+
mode: 'library',
|
|
18
18
|
clientName: 'Api',
|
|
19
|
+
packageName: '@my-scope/sdk',
|
|
20
|
+
packageVersion: '0.0.1',
|
|
19
21
|
rootUrl: '',
|
|
20
|
-
splitByDomain:
|
|
22
|
+
splitByDomain: true,
|
|
21
23
|
splitDepth: 'service',
|
|
22
24
|
features: {
|
|
23
25
|
models: true,
|
|
@@ -30,6 +30,7 @@ function resolveTarget(raw) {
|
|
|
30
30
|
if (!['standalone', 'library', 'secondary-entrypoint'].includes(mode)) {
|
|
31
31
|
throw new Error(`Invalid target mode: ${mode}`);
|
|
32
32
|
}
|
|
33
|
+
const splitByDomain = raw.splitByDomain ?? mode === 'library';
|
|
33
34
|
return {
|
|
34
35
|
input: raw.input,
|
|
35
36
|
output: raw.output,
|
|
@@ -39,7 +40,7 @@ function resolveTarget(raw) {
|
|
|
39
40
|
packageVersion: raw.packageVersion ?? '0.0.1',
|
|
40
41
|
rootUrl: raw.rootUrl,
|
|
41
42
|
features: { ...DEFAULT_FEATURES, ...(raw.features ?? {}) },
|
|
42
|
-
splitByDomain
|
|
43
|
+
splitByDomain,
|
|
43
44
|
splitDepth: raw.splitDepth === 'tag' ? 'tag' : 'service',
|
|
44
45
|
banner: raw.banner ?? DEFAULT_BANNER,
|
|
45
46
|
};
|
|
@@ -18,7 +18,7 @@ function emitNavigation(ir, target) {
|
|
|
18
18
|
function renderNavigation(nodes, target) {
|
|
19
19
|
return `${target.banner}
|
|
20
20
|
|
|
21
|
-
import type { NavigationItem } from '@ojiepermana/angular/navigation';
|
|
21
|
+
import type { NavigationItem } from '@ojiepermana/angular/navigation/types';
|
|
22
22
|
|
|
23
23
|
export const ApiNavigation: NavigationItem[] = ${stringifyNodes(nodes, 0, [])};
|
|
24
24
|
`;
|
|
@@ -340,15 +340,19 @@ function emitPublicApis(ir, target, mapping) {
|
|
|
340
340
|
}
|
|
341
341
|
out.push({ path: `${domain}/public-api.ts`, content: (0, template_1.finalize)(lines.join('\n')) });
|
|
342
342
|
}
|
|
343
|
-
// Root public-api.ts aggregates everything.
|
|
343
|
+
// Root public-api.ts aggregates everything for non-library consumers. In
|
|
344
|
+
// library mode, domain folders are real secondary entrypoints, so the root
|
|
345
|
+
// stays focused on shared/global exports and consumers deep import domains.
|
|
344
346
|
const rootLines = [target.banner, ''];
|
|
345
347
|
rootLines.push(`export * from './${SHARED}/public-api';`);
|
|
346
348
|
if (target.features.metadata) {
|
|
347
349
|
rootLines.push(`export * from './metadata';`);
|
|
348
350
|
rootLines.push(`export * from './openapi-helpers';`);
|
|
349
351
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
+
if (target.mode !== 'library') {
|
|
353
|
+
for (const domain of mapping.domains) {
|
|
354
|
+
rootLines.push(`export * from './${domain}/public-api';`);
|
|
355
|
+
}
|
|
352
356
|
}
|
|
353
357
|
out.push({ path: 'public-api.ts', content: (0, template_1.finalize)(rootLines.join('\n')) });
|
|
354
358
|
return out;
|
|
@@ -24,7 +24,7 @@ function writeLibrary(files, ir, target, workspaceRoot, outputDir) {
|
|
|
24
24
|
const normalizedFiles = rewriteCrossEntrypointImports(files, target, workspaceRoot, outputDir);
|
|
25
25
|
const ngPackage = {
|
|
26
26
|
$schema: toPosixPath((0, node_path_1.relative)(outputDir, (0, node_path_1.resolve)(workspaceRoot, 'node_modules/ng-packagr/ng-package.schema.json'))),
|
|
27
|
-
dest:
|
|
27
|
+
dest: resolveLibraryDestPath(workspaceRoot, outputDir),
|
|
28
28
|
lib: { entryFile: 'public-api.ts' },
|
|
29
29
|
};
|
|
30
30
|
const pkg = {
|
|
@@ -46,6 +46,7 @@ function writeLibrary(files, ir, target, workspaceRoot, outputDir) {
|
|
|
46
46
|
path: 'package.json',
|
|
47
47
|
content: (0, template_1.finalize)(JSON.stringify(pkg, null, 2)),
|
|
48
48
|
},
|
|
49
|
+
...createLibraryTsConfigFiles(workspaceRoot, outputDir),
|
|
49
50
|
{
|
|
50
51
|
path: 'README.md',
|
|
51
52
|
content: (0, template_1.finalize)(`# ${target.packageName}\n\nGenerated SDK for **${ir.title}** v${ir.version}.\n\nThis folder was generated by the local SDK generator. Do not edit by hand.\n`),
|
|
@@ -222,8 +223,49 @@ function collectSecondaryEntrypointDirs(files) {
|
|
|
222
223
|
}
|
|
223
224
|
return [...dirs].sort();
|
|
224
225
|
}
|
|
225
|
-
function
|
|
226
|
-
|
|
226
|
+
function resolveLibraryDestPath(workspaceRoot, outputDir) {
|
|
227
|
+
const outputFolderName = (0, node_path_1.basename)(outputDir) || 'sdk';
|
|
228
|
+
return toPosixPath((0, node_path_1.relative)(outputDir, (0, node_path_1.resolve)(workspaceRoot, 'dist', outputFolderName)));
|
|
229
|
+
}
|
|
230
|
+
function createLibraryTsConfigFiles(workspaceRoot, outputDir) {
|
|
231
|
+
const rootTsConfig = toPosixPath((0, node_path_1.relative)(outputDir, (0, node_path_1.resolve)(workspaceRoot, 'tsconfig.json')));
|
|
232
|
+
const outDir = toPosixPath((0, node_path_1.relative)(outputDir, (0, node_path_1.resolve)(workspaceRoot, 'out-tsc/lib')));
|
|
233
|
+
const distDir = toRecursiveGlob((0, node_path_1.relative)(outputDir, (0, node_path_1.resolve)(workspaceRoot, 'dist')));
|
|
234
|
+
const nodeModulesDir = toRecursiveGlob((0, node_path_1.relative)(outputDir, (0, node_path_1.resolve)(workspaceRoot, 'node_modules')));
|
|
235
|
+
const tsconfigLib = {
|
|
236
|
+
extends: rootTsConfig,
|
|
237
|
+
compilerOptions: {
|
|
238
|
+
outDir,
|
|
239
|
+
declaration: true,
|
|
240
|
+
declarationMap: true,
|
|
241
|
+
types: [],
|
|
242
|
+
},
|
|
243
|
+
include: ['public-api.ts', '**/public-api.ts'],
|
|
244
|
+
exclude: ['**/*.spec.ts', distDir, nodeModulesDir],
|
|
245
|
+
};
|
|
246
|
+
const tsconfigLibProd = {
|
|
247
|
+
extends: './tsconfig.lib.json',
|
|
248
|
+
compilerOptions: {
|
|
249
|
+
declarationMap: false,
|
|
250
|
+
},
|
|
251
|
+
angularCompilerOptions: {
|
|
252
|
+
compilationMode: 'partial',
|
|
253
|
+
},
|
|
254
|
+
};
|
|
255
|
+
return [
|
|
256
|
+
{
|
|
257
|
+
path: 'tsconfig.lib.json',
|
|
258
|
+
content: (0, template_1.finalize)(JSON.stringify(tsconfigLib, null, 2)),
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
path: 'tsconfig.lib.prod.json',
|
|
262
|
+
content: (0, template_1.finalize)(JSON.stringify(tsconfigLibProd, null, 2)),
|
|
263
|
+
},
|
|
264
|
+
];
|
|
265
|
+
}
|
|
266
|
+
function toRecursiveGlob(value) {
|
|
267
|
+
const normalized = toPosixPath(value).replace(/\/+$/, '');
|
|
268
|
+
return normalized === '.' ? './**' : `${normalized}/**`;
|
|
227
269
|
}
|
|
228
270
|
function toPosixPath(value) {
|
|
229
271
|
return value.split('\\').join('/');
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
{
|
|
5
5
|
"input": "./openapi.yaml",
|
|
6
6
|
"output": "./sdk",
|
|
7
|
-
"mode": "
|
|
7
|
+
"mode": "library",
|
|
8
8
|
"clientName": "Api",
|
|
9
|
+
"packageName": "@my-scope/sdk",
|
|
10
|
+
"packageVersion": "0.0.1",
|
|
9
11
|
"rootUrl": "",
|
|
10
|
-
"splitByDomain":
|
|
12
|
+
"splitByDomain": true,
|
|
11
13
|
"splitDepth": "service",
|
|
12
14
|
"features": {
|
|
13
15
|
"models": true,
|