@ojiepermana/angular 22.1.11 → 22.1.13
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 +374 -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,193 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, EnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { ShellPlatform, ShellDevice, ShellWindowState, ShellMode, ShellColor, ShellFrame } from '@ojiepermana/angular/theme/shell/types';
|
|
4
|
+
|
|
5
|
+
/** What the shell needs to know about the host window right now. */
|
|
6
|
+
interface ShellWindowSnapshot {
|
|
7
|
+
readonly state: ShellWindowState;
|
|
8
|
+
readonly focused: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The seam between the shell and a desktop runtime.
|
|
12
|
+
*
|
|
13
|
+
* The theme package never imports a desktop SDK: Tauri, Electron, or anything
|
|
14
|
+
* else is reached through this interface, so an app that ships to the browser
|
|
15
|
+
* pays nothing and an app that ships to a native window provides one adapter.
|
|
16
|
+
* Commands may be sync or async — the shell always awaits them.
|
|
17
|
+
*/
|
|
18
|
+
interface ShellWindowBridge {
|
|
19
|
+
readonly platform: ShellPlatform;
|
|
20
|
+
/**
|
|
21
|
+
* Host OS, when the runtime can report it. `null` means "cannot tell" — the
|
|
22
|
+
* shell then falls back to its `device` input, storage, or the mode's default,
|
|
23
|
+
* rather than guessing.
|
|
24
|
+
*/
|
|
25
|
+
device(): ShellDevice | null | Promise<ShellDevice | null>;
|
|
26
|
+
snapshot(): ShellWindowSnapshot | Promise<ShellWindowSnapshot>;
|
|
27
|
+
minimize(): void | Promise<void>;
|
|
28
|
+
toggleMaximize(): void | Promise<void>;
|
|
29
|
+
close(): void | Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Move the window with the pointer. Tauri and Electron both mark their drag
|
|
32
|
+
* surface declaratively (`data-tauri-drag-region` / `-webkit-app-region`, both
|
|
33
|
+
* stamped on the titlebar), so this is only needed by runtimes that require an
|
|
34
|
+
* explicit call.
|
|
35
|
+
*/
|
|
36
|
+
startDragging?(): void | Promise<void>;
|
|
37
|
+
/** Observe window resize/move/focus changes; resolves to the unsubscribe. */
|
|
38
|
+
watch?(onChange: () => void): (() => void) | Promise<() => void>;
|
|
39
|
+
}
|
|
40
|
+
declare const SHELL_WINDOW_BRIDGE: InjectionToken<ShellWindowBridge>;
|
|
41
|
+
/**
|
|
42
|
+
* Browser fallback used when no bridge is provided: a page has no window to
|
|
43
|
+
* drive, so it reports the web platform, no device opinion, and every command is
|
|
44
|
+
* a no-op. This is what keeps `<Shell>` renderable (and testable) outside a
|
|
45
|
+
* desktop runtime.
|
|
46
|
+
*/
|
|
47
|
+
declare const WEB_SHELL_WINDOW_BRIDGE: ShellWindowBridge;
|
|
48
|
+
/**
|
|
49
|
+
* Register the bridge `ShellService` drives. Pass a factory to defer any runtime
|
|
50
|
+
* probing until the injector is created.
|
|
51
|
+
*/
|
|
52
|
+
declare function provideShellWindowBridge(bridge: ShellWindowBridge | (() => ShellWindowBridge)): EnvironmentProviders;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The slice of a Tauri `Window` the shell drives, declared structurally so the
|
|
56
|
+
* theme package never has to depend on `@tauri-apps/api`. Any object with these
|
|
57
|
+
* methods works, which is also what makes the bridge testable with a fake.
|
|
58
|
+
*/
|
|
59
|
+
interface TauriWindowHandle {
|
|
60
|
+
minimize(): Promise<void>;
|
|
61
|
+
toggleMaximize(): Promise<void>;
|
|
62
|
+
close(): Promise<void>;
|
|
63
|
+
isMaximized(): Promise<boolean>;
|
|
64
|
+
isFullscreen(): Promise<boolean>;
|
|
65
|
+
startDragging(): Promise<void>;
|
|
66
|
+
isFocused?(): Promise<boolean>;
|
|
67
|
+
onResized?(handler: () => void): Promise<() => void>;
|
|
68
|
+
onFocusChanged?(handler: () => void): Promise<() => void>;
|
|
69
|
+
}
|
|
70
|
+
interface TauriShellBridgeOptions {
|
|
71
|
+
/**
|
|
72
|
+
* Resolve the window to drive. Defaults to the `withGlobalTauri` global
|
|
73
|
+
* (`window.__TAURI__.window.getCurrentWindow()`). Apps that keep the global
|
|
74
|
+
* off pass the module instead:
|
|
75
|
+
* `{ currentWindow: () => import('@tauri-apps/api/window').then((m) => m.getCurrentWindow()) }`.
|
|
76
|
+
*/
|
|
77
|
+
readonly currentWindow?: () => TauriWindowHandle | null | Promise<TauriWindowHandle | null>;
|
|
78
|
+
/**
|
|
79
|
+
* Resolve the host OS, mapped onto the shell's `device` axis. Defaults to the
|
|
80
|
+
* `withGlobalTauri` os plugin, then the browser platform string. Apps without
|
|
81
|
+
* the global pass
|
|
82
|
+
* `{ platform: () => import('@tauri-apps/plugin-os').then((m) => m.platform()) }`.
|
|
83
|
+
*/
|
|
84
|
+
readonly platform?: () => string | Promise<string>;
|
|
85
|
+
}
|
|
86
|
+
/** `true` when the page is running inside a Tauri webview. */
|
|
87
|
+
declare function isTauriRuntime(): boolean;
|
|
88
|
+
/**
|
|
89
|
+
* Adapter from a Tauri window onto {@link ShellWindowBridge}.
|
|
90
|
+
*
|
|
91
|
+
* Every call resolves the window lazily and tolerates its absence, so the same
|
|
92
|
+
* bridge can be registered unconditionally: run the app in a browser and the
|
|
93
|
+
* commands become no-ops rather than errors.
|
|
94
|
+
*/
|
|
95
|
+
declare function createTauriShellWindowBridge(options?: TauriShellBridgeOptions): ShellWindowBridge;
|
|
96
|
+
/**
|
|
97
|
+
* Register the Tauri window bridge for `ShellService`. Safe to call in a build
|
|
98
|
+
* that also ships to the browser — outside a Tauri webview the bridge resolves
|
|
99
|
+
* no window and the shell falls back to inert commands.
|
|
100
|
+
*/
|
|
101
|
+
declare function provideTauriShellWindowBridge(options?: TauriShellBridgeOptions): EnvironmentProviders;
|
|
102
|
+
|
|
103
|
+
interface ShellMutationOptions {
|
|
104
|
+
/** `false` keeps the change out of localStorage (a host-driven override, not a user choice). */
|
|
105
|
+
persist?: boolean;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* State behind `<Shell>`: the persisted `mode` / `device` / `color` / `frame`
|
|
109
|
+
* axes, plus
|
|
110
|
+
* live window state read from whichever {@link ShellWindowBridge} the app
|
|
111
|
+
* registered.
|
|
112
|
+
*
|
|
113
|
+
* Every axis resolves through a fallback chain, so an app can declare as much or
|
|
114
|
+
* as little as it knows — and each is readable *and* writable through
|
|
115
|
+
* localStorage, so a target can be flipped without a rebuild:
|
|
116
|
+
*
|
|
117
|
+
* - `mode` — stored `shell-mode`, else `desktop` when a desktop runtime is
|
|
118
|
+
* registered (a Tauri window *is* a desktop shell), else `web`.
|
|
119
|
+
* - `device` — stored `shell-device`, else whatever the bridge reports, else the
|
|
120
|
+
* mode's default device.
|
|
121
|
+
* - `color` — stored `shell-color`, else `sync`.
|
|
122
|
+
* - `frame` — stored `shell-frame`, else `classic`.
|
|
123
|
+
*
|
|
124
|
+
* `<Shell>`'s own inputs sit in front of all of them, and `<Shell>` is also where
|
|
125
|
+
* the pairs are forced to stay coherent (device with mode, frame with mode) — the values here are preferences,
|
|
126
|
+
* so a stored `macos` survives a temporary switch to `mode='web'` instead of being
|
|
127
|
+
* erased.
|
|
128
|
+
*
|
|
129
|
+
* With no bridge registered this resolves to the inert web bridge, so the same
|
|
130
|
+
* component tree renders in a browser tab, in a unit test, and under SSR.
|
|
131
|
+
*/
|
|
132
|
+
declare class ShellService {
|
|
133
|
+
private readonly platformId;
|
|
134
|
+
private readonly storage;
|
|
135
|
+
private readonly destroyRef;
|
|
136
|
+
private readonly bridge;
|
|
137
|
+
/** Runtime hosting the shell; `web` whenever no bridge is registered. */
|
|
138
|
+
readonly platform: ShellPlatform;
|
|
139
|
+
/** `true` for any non-browser runtime — i.e. there is a real OS window to drive. */
|
|
140
|
+
readonly isDesktopRuntime: boolean;
|
|
141
|
+
private readonly modeState;
|
|
142
|
+
private readonly deviceState;
|
|
143
|
+
private readonly colorState;
|
|
144
|
+
private readonly frameState;
|
|
145
|
+
private readonly reportedDeviceState;
|
|
146
|
+
private readonly windowStateState;
|
|
147
|
+
private readonly focusedState;
|
|
148
|
+
readonly mode: _angular_core.Signal<"web" | "desktop" | "tablet" | "mobile">;
|
|
149
|
+
/**
|
|
150
|
+
* Preferred device: the stored choice, else what the runtime reports, else the
|
|
151
|
+
* current mode's default. Not forced to match `mode()` — see the class note.
|
|
152
|
+
*/
|
|
153
|
+
readonly device: _angular_core.Signal<"browser" | "macos" | "windows" | "linux" | "ipad" | "android" | "ios">;
|
|
154
|
+
/** Where the shell's chrome takes its colors from: the design system, or the device's native look. */
|
|
155
|
+
readonly color: _angular_core.Signal<"sync" | "default">;
|
|
156
|
+
/** How the app sits in its window: flush (`classic`) or inset as a panel (`modern`). */
|
|
157
|
+
readonly frame: _angular_core.Signal<"classic" | "modern">;
|
|
158
|
+
readonly windowState: _angular_core.Signal<"normal" | "maximized" | "fullscreen">;
|
|
159
|
+
readonly focused: _angular_core.Signal<boolean>;
|
|
160
|
+
readonly isMaximized: _angular_core.Signal<boolean>;
|
|
161
|
+
readonly isFullscreen: _angular_core.Signal<boolean>;
|
|
162
|
+
constructor();
|
|
163
|
+
setMode(mode: ShellMode, options?: ShellMutationOptions): void;
|
|
164
|
+
setDevice(device: ShellDevice, options?: ShellMutationOptions): void;
|
|
165
|
+
setColor(color: ShellColor, options?: ShellMutationOptions): void;
|
|
166
|
+
setFrame(frame: ShellFrame, options?: ShellMutationOptions): void;
|
|
167
|
+
/** Adopt `mode` as the default, unless a choice is already stored. */
|
|
168
|
+
registerMode(mode: ShellMode): void;
|
|
169
|
+
/** Adopt `device` as the default, unless a choice is already stored. */
|
|
170
|
+
registerDevice(device: ShellDevice): void;
|
|
171
|
+
/** Adopt `color` as the default, unless a choice is already stored. */
|
|
172
|
+
registerColor(color: ShellColor): void;
|
|
173
|
+
/** Adopt `frame` as the default, unless a choice is already stored. */
|
|
174
|
+
registerFrame(frame: ShellFrame): void;
|
|
175
|
+
/** Re-read the device and window state from the bridge. */
|
|
176
|
+
sync(): Promise<void>;
|
|
177
|
+
minimize(): Promise<void>;
|
|
178
|
+
toggleMaximize(): Promise<void>;
|
|
179
|
+
close(): Promise<void>;
|
|
180
|
+
/** Start a pointer-driven window move, for runtimes that need an explicit call. */
|
|
181
|
+
startDragging(): Promise<void>;
|
|
182
|
+
private command;
|
|
183
|
+
private watchWindow;
|
|
184
|
+
private storedMode;
|
|
185
|
+
private storedDevice;
|
|
186
|
+
private storedColor;
|
|
187
|
+
private storedFrame;
|
|
188
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShellService, never>;
|
|
189
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ShellService>;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export { SHELL_WINDOW_BRIDGE, ShellService, WEB_SHELL_WINDOW_BRIDGE, createTauriShellWindowBridge, isTauriRuntime, provideShellWindowBridge, provideTauriShellWindowBridge };
|
|
193
|
+
export type { ShellWindowBridge, ShellWindowSnapshot, TauriShellBridgeOptions, TauriWindowHandle };
|
|
@@ -1 +1,105 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Delivery target the shell is rendering for. `web` is a page in a browser tab;
|
|
3
|
+
* the rest are app targets where the shell owns the whole surface. Only
|
|
4
|
+
* `desktop` has window chrome to draw, which is what gates `<ShellBar>`.
|
|
5
|
+
*
|
|
6
|
+
* Persisted under {@link SHELL_MODE_STORAGE_KEY}.
|
|
7
|
+
*/
|
|
8
|
+
declare const SHELL_MODES: readonly ["web", "desktop", "tablet", "mobile"];
|
|
9
|
+
/**
|
|
10
|
+
* Concrete host the shell is running on. Each mode owns a set of these (see
|
|
11
|
+
* {@link SHELL_MODE_DEVICES}) — `android` deliberately belongs to both `tablet`
|
|
12
|
+
* and `mobile`, because the same OS ships on both form factors.
|
|
13
|
+
*
|
|
14
|
+
* Persisted under {@link SHELL_DEVICE_STORAGE_KEY}.
|
|
15
|
+
*/
|
|
16
|
+
declare const SHELL_DEVICES: readonly ["browser", "macos", "windows", "linux", "ipad", "android", "ios"];
|
|
17
|
+
/**
|
|
18
|
+
* Where the shell's own chrome takes its colors from. `sync` keeps the titlebar
|
|
19
|
+
* inside the design system, so it recolors with `theme-color` / `theme-neutral`
|
|
20
|
+
* and `data-mode` like everything else. `default` paints the native look of the
|
|
21
|
+
* active `device` instead, for an app that wants to disappear into its OS.
|
|
22
|
+
*
|
|
23
|
+
* Persisted under {@link SHELL_COLOR_STORAGE_KEY}.
|
|
24
|
+
*/
|
|
25
|
+
declare const SHELL_COLORS: readonly ["sync", "default"];
|
|
26
|
+
/**
|
|
27
|
+
* How the app sits inside its window.
|
|
28
|
+
*
|
|
29
|
+
* `classic` is the traditional desktop frame: the app is flush to the window edge
|
|
30
|
+
* and a bordered titlebar sits on top of it.
|
|
31
|
+
*
|
|
32
|
+
* `modern` insets the app instead, so it floats as a panel inside the window with
|
|
33
|
+
* the chrome showing around it. The titlebar drops its border and takes the same
|
|
34
|
+
* colour as that surround, so the two read as one continuous frame rather than a
|
|
35
|
+
* bar stacked on a body.
|
|
36
|
+
*
|
|
37
|
+
* Only a desktop window has a frame to shape, so this is coerced to `classic` on
|
|
38
|
+
* every other mode — see {@link resolveShellFrameForMode}.
|
|
39
|
+
*
|
|
40
|
+
* Persisted under {@link SHELL_FRAME_STORAGE_KEY}.
|
|
41
|
+
*/
|
|
42
|
+
declare const SHELL_FRAMES: readonly ["classic", "modern"];
|
|
43
|
+
/**
|
|
44
|
+
* Runtime hosting the shell — distinct from `device`, which is the OS. `web`
|
|
45
|
+
* means no bridge is registered, so there is no window to drive.
|
|
46
|
+
*/
|
|
47
|
+
declare const SHELL_PLATFORMS: readonly ["web", "tauri", "electron", "custom"];
|
|
48
|
+
declare const SHELL_WINDOW_STATES: readonly ["normal", "maximized", "fullscreen"];
|
|
49
|
+
type ShellMode = (typeof SHELL_MODES)[number];
|
|
50
|
+
type ShellDevice = (typeof SHELL_DEVICES)[number];
|
|
51
|
+
type ShellColor = (typeof SHELL_COLORS)[number];
|
|
52
|
+
type ShellFrame = (typeof SHELL_FRAMES)[number];
|
|
53
|
+
type ShellPlatform = (typeof SHELL_PLATFORMS)[number];
|
|
54
|
+
type ShellWindowState = (typeof SHELL_WINDOW_STATES)[number];
|
|
55
|
+
declare const SHELL_DEFAULT_MODE: ShellMode;
|
|
56
|
+
declare const SHELL_DEFAULT_DEVICE: ShellDevice;
|
|
57
|
+
declare const SHELL_DEFAULT_COLOR: ShellColor;
|
|
58
|
+
declare const SHELL_DEFAULT_FRAME: ShellFrame;
|
|
59
|
+
declare const SHELL_DEFAULT_PLATFORM: ShellPlatform;
|
|
60
|
+
declare const SHELL_DEFAULT_WINDOW_STATE: ShellWindowState;
|
|
61
|
+
declare const SHELL_MODE_STORAGE_KEY = "shell-mode";
|
|
62
|
+
declare const SHELL_DEVICE_STORAGE_KEY = "shell-device";
|
|
63
|
+
declare const SHELL_COLOR_STORAGE_KEY = "shell-color";
|
|
64
|
+
declare const SHELL_FRAME_STORAGE_KEY = "shell-frame";
|
|
65
|
+
/**
|
|
66
|
+
* Which devices each mode can run on. The first entry is the mode's default, used
|
|
67
|
+
* when nothing else resolves — and to correct a device that cannot belong to the
|
|
68
|
+
* active mode (`mode='desktop' device='ipad'` has no meaning).
|
|
69
|
+
*/
|
|
70
|
+
declare const SHELL_MODE_DEVICES: Readonly<Record<ShellMode, readonly ShellDevice[]>>;
|
|
71
|
+
declare function isShellMode(value: string | null | undefined): value is ShellMode;
|
|
72
|
+
declare function isShellDevice(value: string | null | undefined): value is ShellDevice;
|
|
73
|
+
declare function isShellColor(value: string | null | undefined): value is ShellColor;
|
|
74
|
+
declare function isShellFrame(value: string | null | undefined): value is ShellFrame;
|
|
75
|
+
declare function isShellPlatform(value: string | null | undefined): value is ShellPlatform;
|
|
76
|
+
declare function isShellWindowState(value: string | null | undefined): value is ShellWindowState;
|
|
77
|
+
declare function normalizeShellMode(value: string | null | undefined): ShellMode;
|
|
78
|
+
declare function normalizeShellColor(value: string | null | undefined): ShellColor;
|
|
79
|
+
declare function normalizeShellFrame(value: string | null | undefined): ShellFrame;
|
|
80
|
+
/**
|
|
81
|
+
* Resolve a frame that is coherent with `mode`. Only a desktop window has a frame
|
|
82
|
+
* to shape — the other modes have no titlebar to fuse with a surround — so
|
|
83
|
+
* `modern` collapses to `classic` there rather than insetting an app for no reason.
|
|
84
|
+
*/
|
|
85
|
+
declare function resolveShellFrameForMode(mode: ShellMode, frame: string | null | undefined): ShellFrame;
|
|
86
|
+
/** Devices the mode can run on; the first is its default. */
|
|
87
|
+
declare function shellDevicesForMode(mode: ShellMode): readonly ShellDevice[];
|
|
88
|
+
declare function defaultShellDeviceForMode(mode: ShellMode): ShellDevice;
|
|
89
|
+
declare function isShellDeviceForMode(mode: ShellMode, device: ShellDevice): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Resolve a device that is coherent with `mode`. An unknown device, or one that
|
|
92
|
+
* belongs to a different form factor, falls back to the mode's default rather
|
|
93
|
+
* than leaving the pair in a state no styling can describe.
|
|
94
|
+
*/
|
|
95
|
+
declare function resolveShellDeviceForMode(mode: ShellMode, device: string | null | undefined): ShellDevice;
|
|
96
|
+
/**
|
|
97
|
+
* Map a raw platform identifier onto the device axis — a Tauri `platform()`
|
|
98
|
+
* result, an Electron `process.platform`, or a `navigator.platform`/user-agent
|
|
99
|
+
* string. Order matters: iPadOS reports itself as a Mac, and Android tablets and
|
|
100
|
+
* phones share a token, so the narrower match has to win first.
|
|
101
|
+
*/
|
|
102
|
+
declare function normalizeShellDevice(value: string | null | undefined): ShellDevice | null;
|
|
103
|
+
|
|
104
|
+
export { SHELL_COLORS, SHELL_COLOR_STORAGE_KEY, SHELL_DEFAULT_COLOR, SHELL_DEFAULT_DEVICE, SHELL_DEFAULT_FRAME, SHELL_DEFAULT_MODE, SHELL_DEFAULT_PLATFORM, SHELL_DEFAULT_WINDOW_STATE, SHELL_DEVICES, SHELL_DEVICE_STORAGE_KEY, SHELL_FRAMES, SHELL_FRAME_STORAGE_KEY, SHELL_MODES, SHELL_MODE_DEVICES, SHELL_MODE_STORAGE_KEY, SHELL_PLATFORMS, SHELL_WINDOW_STATES, defaultShellDeviceForMode, isShellColor, isShellDevice, isShellDeviceForMode, isShellFrame, isShellMode, isShellPlatform, isShellWindowState, normalizeShellColor, normalizeShellDevice, normalizeShellFrame, normalizeShellMode, resolveShellDeviceForMode, resolveShellFrameForMode, shellDevicesForMode };
|
|
105
|
+
export type { ShellColor, ShellDevice, ShellFrame, ShellMode, ShellPlatform, ShellWindowState };
|
|
@@ -1 +1,100 @@
|
|
|
1
|
-
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ShellService } from '@ojiepermana/angular/theme/shell/services';
|
|
3
|
+
export { SHELL_WINDOW_BRIDGE, ShellService, ShellWindowBridge, ShellWindowSnapshot, TauriShellBridgeOptions, TauriWindowHandle, WEB_SHELL_WINDOW_BRIDGE, createTauriShellWindowBridge, isTauriRuntime, provideShellWindowBridge, provideTauriShellWindowBridge } from '@ojiepermana/angular/theme/shell/services';
|
|
4
|
+
export { SHELL_COLORS, SHELL_COLOR_STORAGE_KEY, SHELL_DEFAULT_COLOR, SHELL_DEFAULT_DEVICE, SHELL_DEFAULT_FRAME, SHELL_DEFAULT_MODE, SHELL_DEFAULT_PLATFORM, SHELL_DEFAULT_WINDOW_STATE, SHELL_DEVICES, SHELL_DEVICE_STORAGE_KEY, SHELL_FRAMES, SHELL_FRAME_STORAGE_KEY, SHELL_MODES, SHELL_MODE_DEVICES, SHELL_MODE_STORAGE_KEY, SHELL_PLATFORMS, SHELL_WINDOW_STATES, ShellColor, ShellDevice, ShellFrame, ShellMode, ShellPlatform, ShellWindowState, defaultShellDeviceForMode, isShellColor, isShellDevice, isShellDeviceForMode, isShellFrame, isShellMode, isShellPlatform, isShellWindowState, normalizeShellColor, normalizeShellDevice, normalizeShellFrame, normalizeShellMode, resolveShellDeviceForMode, resolveShellFrameForMode, shellDevicesForMode } from '@ojiepermana/angular/theme/shell/types';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Root of an application shell: the element that owns the whole surface, whether
|
|
8
|
+
* that is a browser tab, an OS window, a tablet, or a phone.
|
|
9
|
+
*
|
|
10
|
+
* A `<Shell>` holds the app directly — normally a `<Layout>` — plus, on
|
|
11
|
+
* `mode='desktop'`, a titlebar it renders itself:
|
|
12
|
+
*
|
|
13
|
+
* ```html
|
|
14
|
+
* <Shell mode="desktop" device="macos">
|
|
15
|
+
* <span shellBarTitle>Acme Studio</span>
|
|
16
|
+
*
|
|
17
|
+
* <Layout>
|
|
18
|
+
* <LayoutVertical>…</LayoutVertical>
|
|
19
|
+
* </Layout>
|
|
20
|
+
* </Shell>
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* ## Fallback chain
|
|
24
|
+
*
|
|
25
|
+
* Every axis is optional, and each falls back rather than demanding a value:
|
|
26
|
+
*
|
|
27
|
+
* - `mode` — this input, else the stored `shell-mode`, else `desktop` when a
|
|
28
|
+
* desktop runtime is registered, else `web`.
|
|
29
|
+
* - `device` — this input, else the stored `shell-device`, else whatever the
|
|
30
|
+
* window bridge reports, else the mode's default device.
|
|
31
|
+
* - `color` — this input, else the stored `shell-color`, else `sync`.
|
|
32
|
+
* - `frame` — this input, else the stored `shell-frame`, else `classic`; only
|
|
33
|
+
* `desktop` can be `modern`.
|
|
34
|
+
*
|
|
35
|
+
* `mode` and `device` are always resolved as a coherent pair: a device that
|
|
36
|
+
* belongs to another form factor (`mode='desktop' device='ipad'`) is corrected to
|
|
37
|
+
* the mode's default, so `data-shell-device` never describes something the mode
|
|
38
|
+
* cannot be.
|
|
39
|
+
*
|
|
40
|
+
* Inputs are host declarations, not user preferences, so setting them never
|
|
41
|
+
* writes to storage — use `ShellService.setMode()` / `setDevice()` for a choice
|
|
42
|
+
* that should persist.
|
|
43
|
+
*/
|
|
44
|
+
declare class ShellComponent {
|
|
45
|
+
protected readonly shell: ShellService;
|
|
46
|
+
/** Delivery target. `null` follows the stored/derived mode — see the class note. */
|
|
47
|
+
readonly mode: _angular_core.InputSignal<"web" | "desktop" | "tablet" | "mobile" | null>;
|
|
48
|
+
/** Host OS. `null` follows the stored/reported device, corrected to fit `mode`. */
|
|
49
|
+
readonly device: _angular_core.InputSignal<"browser" | "macos" | "windows" | "linux" | "ipad" | "android" | "ios" | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Where the shell's own chrome takes its colors from. `sync` keeps the titlebar
|
|
52
|
+
* inside the design system; `default` paints the native look of the active
|
|
53
|
+
* device.
|
|
54
|
+
*/
|
|
55
|
+
readonly color: _angular_core.InputSignal<"sync" | "default" | null>;
|
|
56
|
+
/**
|
|
57
|
+
* How the app sits in its window. `classic` keeps it flush to the window edge
|
|
58
|
+
* under a bordered titlebar; `modern` insets it as a panel and fuses the titlebar
|
|
59
|
+
* with the surround into one continuous frame. Only meaningful on
|
|
60
|
+
* `mode='desktop'` — anything else resolves to `classic`.
|
|
61
|
+
*/
|
|
62
|
+
readonly frame: _angular_core.InputSignal<"classic" | "modern" | null>;
|
|
63
|
+
/**
|
|
64
|
+
* `true` when the runtime still draws its own window buttons, so the shell must
|
|
65
|
+
* not draw them: on macOS the titlebar reserves the leading run for the OS
|
|
66
|
+
* traffic lights (Tauri's `titleBarStyle: 'Overlay'`), and Windows / Linux draw
|
|
67
|
+
* nothing. Leave `false` for a `decorations: false` window, where the app owns
|
|
68
|
+
* the buttons — otherwise there would be no way to close it.
|
|
69
|
+
*/
|
|
70
|
+
readonly nativeWindowControls: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
71
|
+
/** Mark the exposed desktop frame and titlebar as drag surfaces below interactive content. */
|
|
72
|
+
readonly drag: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
73
|
+
/** Expose the titlebar as the `banner` landmark. Turn off for a nested preview. */
|
|
74
|
+
readonly landmark: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
75
|
+
readonly barAriaLabel: _angular_core.InputSignal<string>;
|
|
76
|
+
readonly minimizeLabel: _angular_core.InputSignal<string>;
|
|
77
|
+
readonly maximizeLabel: _angular_core.InputSignal<string>;
|
|
78
|
+
readonly restoreLabel: _angular_core.InputSignal<string>;
|
|
79
|
+
readonly closeLabel: _angular_core.InputSignal<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Automatically surface the desktop layout's primary navigation as an icon
|
|
82
|
+
* flyout in the titlebar. macOS places it at the trailing edge; Windows and
|
|
83
|
+
* Linux place it at the leading edge.
|
|
84
|
+
*/
|
|
85
|
+
readonly navigationFlyout: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
86
|
+
readonly navigationFlyoutIcon: _angular_core.InputSignal<string>;
|
|
87
|
+
readonly navigationFlyoutLabel: _angular_core.InputSignal<string>;
|
|
88
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
89
|
+
readonly resolvedMode: _angular_core.Signal<"web" | "desktop" | "tablet" | "mobile">;
|
|
90
|
+
readonly resolvedDevice: _angular_core.Signal<"browser" | "macos" | "windows" | "linux" | "ipad" | "android" | "ios">;
|
|
91
|
+
readonly resolvedColor: _angular_core.Signal<"sync" | "default">;
|
|
92
|
+
readonly resolvedFrame: _angular_core.Signal<"classic" | "modern">;
|
|
93
|
+
/** Only a desktop window has chrome of its own to draw. */
|
|
94
|
+
protected readonly showsBar: _angular_core.Signal<boolean>;
|
|
95
|
+
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
96
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ShellComponent, never>;
|
|
97
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ShellComponent, "Shell", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "device": { "alias": "device"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "frame": { "alias": "frame"; "required": false; "isSignal": true; }; "nativeWindowControls": { "alias": "nativeWindowControls"; "required": false; "isSignal": true; }; "drag": { "alias": "drag"; "required": false; "isSignal": true; }; "landmark": { "alias": "landmark"; "required": false; "isSignal": true; }; "barAriaLabel": { "alias": "barAriaLabel"; "required": false; "isSignal": true; }; "minimizeLabel": { "alias": "minimizeLabel"; "required": false; "isSignal": true; }; "maximizeLabel": { "alias": "maximizeLabel"; "required": false; "isSignal": true; }; "restoreLabel": { "alias": "restoreLabel"; "required": false; "isSignal": true; }; "closeLabel": { "alias": "closeLabel"; "required": false; "isSignal": true; }; "navigationFlyout": { "alias": "navigationFlyout"; "required": false; "isSignal": true; }; "navigationFlyoutIcon": { "alias": "navigationFlyoutIcon"; "required": false; "isSignal": true; }; "navigationFlyoutLabel": { "alias": "navigationFlyoutLabel"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, ["[shellBarStart]", "[shellBarTitle]", "[shellBarEnd]", "*"], true, never>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export { ShellComponent };
|