@ojiepermana/angular 22.1.11 → 22.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/README.md +32 -26
  2. package/chart/README.md +272 -0
  3. package/component/README.md +89 -0
  4. package/component/accordion/README.md +195 -0
  5. package/component/alert/README.md +184 -0
  6. package/component/alert-dialog/README.md +255 -0
  7. package/component/aspect-ratio/README.md +116 -0
  8. package/component/avatar/README.md +182 -0
  9. package/component/badge/README.md +143 -0
  10. package/component/breadcrumb/README.md +223 -0
  11. package/component/button/README.md +141 -0
  12. package/component/button-group/README.md +214 -0
  13. package/component/calendar/README.md +137 -0
  14. package/component/card/README.md +232 -0
  15. package/component/carousel/README.md +276 -0
  16. package/component/checkbox/README.md +153 -0
  17. package/component/collapsible/README.md +216 -0
  18. package/component/combobox/README.md +202 -0
  19. package/component/command/README.md +287 -0
  20. package/component/composer/README.md +241 -0
  21. package/component/context-menu/README.md +268 -0
  22. package/component/date-picker/README.md +202 -0
  23. package/component/dialog/README.md +276 -0
  24. package/component/drawer/README.md +147 -0
  25. package/component/dropdown-menu/README.md +336 -0
  26. package/component/editor/README.md +152 -0
  27. package/component/empty/README.md +193 -0
  28. package/component/form/README.md +216 -0
  29. package/component/hover-card/README.md +150 -0
  30. package/component/icon/README.md +25 -0
  31. package/component/input/README.md +160 -0
  32. package/component/input-group/README.md +245 -0
  33. package/component/input-otp/README.md +331 -0
  34. package/component/item/README.md +254 -0
  35. package/component/kanban/README.md +81 -0
  36. package/component/kbd/README.md +141 -0
  37. package/component/label/README.md +137 -0
  38. package/component/menubar/README.md +270 -0
  39. package/component/native-select/README.md +176 -0
  40. package/component/navigation-menu/README.md +165 -0
  41. package/component/pagination/README.md +151 -0
  42. package/component/pillbox/README.md +68 -0
  43. package/component/popover/README.md +54 -0
  44. package/component/progress/README.md +160 -0
  45. package/component/radio/README.md +212 -0
  46. package/component/resizable/README.md +178 -0
  47. package/component/scroll-area/README.md +150 -0
  48. package/component/select/README.md +228 -0
  49. package/component/separator/README.md +175 -0
  50. package/component/sheet/README.md +190 -0
  51. package/component/skeleton/README.md +158 -0
  52. package/component/slider/README.md +207 -0
  53. package/component/spinner/README.md +160 -0
  54. package/component/switch/README.md +170 -0
  55. package/component/table/README.md +292 -0
  56. package/component/tabs/README.md +220 -0
  57. package/component/textarea/README.md +169 -0
  58. package/component/timeline/README.md +94 -0
  59. package/component/toast/README.md +173 -0
  60. package/component/toggle/README.md +133 -0
  61. package/component/toggle-group/README.md +234 -0
  62. package/component/tooltip/README.md +230 -0
  63. package/fesm2022/ojiepermana-angular-chart-area.mjs +289 -3
  64. package/fesm2022/ojiepermana-angular-chart-bar.mjs +722 -3
  65. package/fesm2022/ojiepermana-angular-chart-core.mjs +1482 -3
  66. package/fesm2022/ojiepermana-angular-chart-line.mjs +294 -3
  67. package/fesm2022/ojiepermana-angular-chart-pie.mjs +291 -3
  68. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1301 -3
  69. package/fesm2022/ojiepermana-angular-chart-radar.mjs +421 -3
  70. package/fesm2022/ojiepermana-angular-chart-radial.mjs +295 -3
  71. package/fesm2022/ojiepermana-angular-chart-scatter.mjs +306 -3
  72. package/fesm2022/ojiepermana-angular-chart.mjs +12 -3
  73. package/fesm2022/ojiepermana-angular-component-accordion.mjs +267 -3
  74. package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +359 -3
  75. package/fesm2022/ojiepermana-angular-component-alert.mjs +101 -3
  76. package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +31 -3
  77. package/fesm2022/ojiepermana-angular-component-avatar.mjs +139 -3
  78. package/fesm2022/ojiepermana-angular-component-badge.mjs +57 -3
  79. package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +192 -3
  80. package/fesm2022/ojiepermana-angular-component-button-group.mjs +95 -3
  81. package/fesm2022/ojiepermana-angular-component-button.mjs +73 -3
  82. package/fesm2022/ojiepermana-angular-component-calendar.mjs +718 -3
  83. package/fesm2022/ojiepermana-angular-component-card.mjs +167 -3
  84. package/fesm2022/ojiepermana-angular-component-carousel.mjs +326 -3
  85. package/fesm2022/ojiepermana-angular-component-checkbox.mjs +190 -3
  86. package/fesm2022/ojiepermana-angular-component-collapsible.mjs +117 -3
  87. package/fesm2022/ojiepermana-angular-component-combobox.mjs +327 -3
  88. package/fesm2022/ojiepermana-angular-component-command.mjs +351 -3
  89. package/fesm2022/ojiepermana-angular-component-composer.mjs +359 -3
  90. package/fesm2022/ojiepermana-angular-component-context-menu.mjs +158 -3
  91. package/fesm2022/ojiepermana-angular-component-date-picker.mjs +482 -3
  92. package/fesm2022/ojiepermana-angular-component-dialog.mjs +400 -3
  93. package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -3
  94. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +689 -3
  95. package/fesm2022/ojiepermana-angular-component-editor.mjs +511 -3
  96. package/fesm2022/ojiepermana-angular-component-empty.mjs +134 -3
  97. package/fesm2022/ojiepermana-angular-component-form.mjs +438 -3
  98. package/fesm2022/ojiepermana-angular-component-hover-card.mjs +273 -3
  99. package/fesm2022/ojiepermana-angular-component-icon.mjs +139 -3
  100. package/fesm2022/ojiepermana-angular-component-input-group.mjs +176 -3
  101. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +550 -3
  102. package/fesm2022/ojiepermana-angular-component-input.mjs +52 -3
  103. package/fesm2022/ojiepermana-angular-component-item.mjs +264 -3
  104. package/fesm2022/ojiepermana-angular-component-kanban.mjs +310 -3
  105. package/fesm2022/ojiepermana-angular-component-kbd.mjs +48 -3
  106. package/fesm2022/ojiepermana-angular-component-label.mjs +27 -3
  107. package/fesm2022/ojiepermana-angular-component-menubar.mjs +327 -3
  108. package/fesm2022/ojiepermana-angular-component-native-select.mjs +62 -3
  109. package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +378 -3
  110. package/fesm2022/ojiepermana-angular-component-pagination.mjs +238 -3
  111. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +999 -3
  112. package/fesm2022/ojiepermana-angular-component-popover.mjs +201 -3
  113. package/fesm2022/ojiepermana-angular-component-progress.mjs +57 -3
  114. package/fesm2022/ojiepermana-angular-component-radio.mjs +180 -3
  115. package/fesm2022/ojiepermana-angular-component-resizable.mjs +493 -3
  116. package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +51 -3
  117. package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +227 -3
  118. package/fesm2022/ojiepermana-angular-component-select.mjs +609 -3
  119. package/fesm2022/ojiepermana-angular-component-separator.mjs +31 -3
  120. package/fesm2022/ojiepermana-angular-component-sheet.mjs +407 -3
  121. package/fesm2022/ojiepermana-angular-component-skeleton.mjs +25 -3
  122. package/fesm2022/ojiepermana-angular-component-slider.mjs +456 -3
  123. package/fesm2022/ojiepermana-angular-component-spinner.mjs +56 -3
  124. package/fesm2022/ojiepermana-angular-component-switch.mjs +145 -3
  125. package/fesm2022/ojiepermana-angular-component-table.mjs +155 -3
  126. package/fesm2022/ojiepermana-angular-component-tabs.mjs +315 -3
  127. package/fesm2022/ojiepermana-angular-component-textarea.mjs +46 -3
  128. package/fesm2022/ojiepermana-angular-component-timeline.mjs +237 -3
  129. package/fesm2022/ojiepermana-angular-component-toast.mjs +241 -3
  130. package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +290 -3
  131. package/fesm2022/ojiepermana-angular-component-toggle.mjs +76 -3
  132. package/fesm2022/ojiepermana-angular-component-tooltip.mjs +519 -3
  133. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +310 -3
  134. package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +62 -3
  135. package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +34 -3
  136. package/fesm2022/ojiepermana-angular-component-utils.mjs +3 -2
  137. package/fesm2022/ojiepermana-angular-component.mjs +4 -4
  138. package/fesm2022/ojiepermana-angular-navigation-core.mjs +21 -3
  139. package/fesm2022/ojiepermana-angular-navigation-icon.mjs +20 -3
  140. package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-CDBxQ8rk.mjs +91 -0
  141. package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-DBQHdvGa.mjs +512 -0
  142. package/fesm2022/ojiepermana-angular-navigation-navigation-entry-grid.component-Cd-jh6tg.mjs +623 -0
  143. package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-BCGvhoYj.mjs +404 -0
  144. package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-Dk_03e-6.mjs +466 -0
  145. package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-DNKU6viC.mjs +2642 -0
  146. package/fesm2022/ojiepermana-angular-navigation-service.mjs +725 -3
  147. package/fesm2022/ojiepermana-angular-navigation-types.mjs +65 -4
  148. package/fesm2022/ojiepermana-angular-navigation.mjs +4 -10
  149. package/fesm2022/ojiepermana-angular-sdk.mjs +204 -4
  150. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1387 -3
  151. package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +331 -3
  152. package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +45 -4
  153. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1044 -3
  154. package/fesm2022/ojiepermana-angular-theme-layout.mjs +729 -3
  155. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +381 -3
  156. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +267 -3
  157. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +361 -3
  158. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +198 -3
  159. package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +110 -3
  160. package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -2
  161. package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +338 -3
  162. package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +160 -4
  163. package/fesm2022/ojiepermana-angular-theme-shell.mjs +811 -3
  164. package/fesm2022/ojiepermana-angular-theme-styles.mjs +783 -3
  165. package/fesm2022/ojiepermana-angular-theme.mjs +4 -4
  166. package/fesm2022/ojiepermana-angular.mjs +6 -11
  167. package/navigation/README.md +374 -0
  168. package/package.json +81 -20
  169. package/sdk/README.md +212 -0
  170. package/sdk/schematics/collection.json +20 -0
  171. package/sdk/schematics/init/index.js +83 -0
  172. package/sdk/schematics/init/schema.json +19 -0
  173. package/sdk/schematics/ng-add/index.js +147 -0
  174. package/sdk/schematics/ng-add/schema.json +14 -0
  175. package/sdk/schematics/package.json +3 -0
  176. package/sdk/schematics/sdk/index.js +175 -0
  177. package/sdk/schematics/sdk/schema.json +19 -0
  178. package/sdk/sdk.config.example.json +24 -0
  179. package/sdk/src/config/loader.js +43 -0
  180. package/sdk/src/config/schema.js +59 -0
  181. package/sdk/src/emit/client.js +251 -0
  182. package/sdk/src/emit/metadata.js +310 -0
  183. package/sdk/src/emit/models.js +104 -0
  184. package/sdk/src/emit/navigation.js +56 -0
  185. package/sdk/src/emit/operations.js +118 -0
  186. package/sdk/src/emit/public-api.js +54 -0
  187. package/sdk/src/emit/services.js +110 -0
  188. package/sdk/src/engine.js +67 -0
  189. package/sdk/src/layout/per-domain.js +360 -0
  190. package/sdk/src/package.json +3 -0
  191. package/sdk/src/parser/bundle.js +25 -0
  192. package/sdk/src/parser/ir.js +429 -0
  193. package/sdk/src/parser/types.js +7 -0
  194. package/sdk/src/render/template.js +152 -0
  195. package/sdk/src/writer/index.js +286 -0
  196. package/theme/README.md +126 -0
  197. package/theme/component/settings/README.md +135 -0
  198. package/theme/layout/README.md +539 -0
  199. package/theme/page/README.md +453 -0
  200. package/theme/shell/README.md +340 -0
  201. package/theme/styles/README.md +178 -0
  202. package/theme/styles/css/base/components.css +553 -0
  203. package/theme/styles/css/base/index.css +14 -0
  204. package/theme/styles/css/base/package.css +9 -0
  205. package/theme/styles/css/base/prefers-dark.css +86 -0
  206. package/theme/styles/css/base/print.css +62 -0
  207. package/theme/styles/css/base/status.css +38 -0
  208. package/theme/styles/css/base/tailwind.css +165 -0
  209. package/theme/styles/css/base/theme.css +373 -0
  210. package/theme/styles/css/base/tokens.css +361 -0
  211. package/theme/styles/css/color/amber.css +72 -0
  212. package/theme/styles/css/color/blue.css +72 -0
  213. package/theme/styles/css/color/brand.css +38 -0
  214. package/theme/styles/css/color/cyan.css +72 -0
  215. package/theme/styles/css/color/emerald.css +72 -0
  216. package/theme/styles/css/color/fuchsia.css +72 -0
  217. package/theme/styles/css/color/green.css +72 -0
  218. package/theme/styles/css/color/index.css +19 -0
  219. package/theme/styles/css/color/indigo.css +72 -0
  220. package/theme/styles/css/color/lime.css +72 -0
  221. package/theme/styles/css/color/orange.css +72 -0
  222. package/theme/styles/css/color/pink.css +72 -0
  223. package/theme/styles/css/color/purple.css +72 -0
  224. package/theme/styles/css/color/red.css +72 -0
  225. package/theme/styles/css/color/rose.css +72 -0
  226. package/theme/styles/css/color/sky.css +72 -0
  227. package/theme/styles/css/color/teal.css +72 -0
  228. package/theme/styles/css/color/violet.css +72 -0
  229. package/theme/styles/css/color/yellow.css +72 -0
  230. package/theme/styles/css/index.css +18 -0
  231. package/theme/styles/css/neutral/gray.css +63 -0
  232. package/theme/styles/css/neutral/index.css +11 -0
  233. package/theme/styles/css/neutral/mauve.css +63 -0
  234. package/theme/styles/css/neutral/mist.css +63 -0
  235. package/theme/styles/css/neutral/neutral.css +63 -0
  236. package/theme/styles/css/neutral/olive.css +63 -0
  237. package/theme/styles/css/neutral/slate.css +63 -0
  238. package/theme/styles/css/neutral/stone.css +63 -0
  239. package/theme/styles/css/neutral/taupe.css +63 -0
  240. package/theme/styles/css/neutral/zinc.css +63 -0
  241. package/theme/styles/css/radius/index.css +30 -0
  242. package/theme/styles/css/space/index.css +20 -0
  243. package/types/ojiepermana-angular-chart-area.d.ts +76 -1
  244. package/types/ojiepermana-angular-chart-bar.d.ts +201 -1
  245. package/types/ojiepermana-angular-chart-core.d.ts +811 -1
  246. package/types/ojiepermana-angular-chart-line.d.ts +75 -1
  247. package/types/ojiepermana-angular-chart-pie.d.ts +131 -1
  248. package/types/ojiepermana-angular-chart-primitives.d.ts +291 -1
  249. package/types/ojiepermana-angular-chart-radar.d.ts +116 -1
  250. package/types/ojiepermana-angular-chart-radial.d.ts +116 -1
  251. package/types/ojiepermana-angular-chart-scatter.d.ts +125 -1
  252. package/types/ojiepermana-angular-chart.d.ts +2 -1
  253. package/types/ojiepermana-angular-component-accordion.d.ts +85 -1
  254. package/types/ojiepermana-angular-component-alert-dialog.d.ts +140 -1
  255. package/types/ojiepermana-angular-component-alert.d.ts +42 -1
  256. package/types/ojiepermana-angular-component-aspect-ratio.d.ts +12 -1
  257. package/types/ojiepermana-angular-component-avatar.d.ts +56 -1
  258. package/types/ojiepermana-angular-component-badge.d.ts +24 -1
  259. package/types/ojiepermana-angular-component-breadcrumb.d.ts +46 -1
  260. package/types/ojiepermana-angular-component-button-group.d.ts +26 -1
  261. package/types/ojiepermana-angular-component-button.d.ts +27 -1
  262. package/types/ojiepermana-angular-component-calendar.d.ts +111 -1
  263. package/types/ojiepermana-angular-component-card.d.ts +69 -1
  264. package/types/ojiepermana-angular-component-carousel.d.ts +86 -1
  265. package/types/ojiepermana-angular-component-checkbox.d.ts +42 -1
  266. package/types/ojiepermana-angular-component-collapsible.d.ts +42 -1
  267. package/types/ojiepermana-angular-component-combobox.d.ts +60 -1
  268. package/types/ojiepermana-angular-component-command.d.ts +130 -1
  269. package/types/ojiepermana-angular-component-composer.d.ts +90 -1
  270. package/types/ojiepermana-angular-component-context-menu.d.ts +54 -1
  271. package/types/ojiepermana-angular-component-date-picker.d.ts +109 -1
  272. package/types/ojiepermana-angular-component-dialog.d.ts +136 -1
  273. package/types/ojiepermana-angular-component-drawer.d.ts +1 -1
  274. package/types/ojiepermana-angular-component-dropdown-menu.d.ts +248 -1
  275. package/types/ojiepermana-angular-component-editor.d.ts +135 -1
  276. package/types/ojiepermana-angular-component-empty.d.ts +50 -1
  277. package/types/ojiepermana-angular-component-form.d.ts +159 -1
  278. package/types/ojiepermana-angular-component-hover-card.d.ts +75 -1
  279. package/types/ojiepermana-angular-component-icon.d.ts +89 -1
  280. package/types/ojiepermana-angular-component-input-group.d.ts +51 -1
  281. package/types/ojiepermana-angular-component-input-otp.d.ts +155 -1
  282. package/types/ojiepermana-angular-component-input.d.ts +21 -1
  283. package/types/ojiepermana-angular-component-item.d.ts +93 -1
  284. package/types/ojiepermana-angular-component-kanban.d.ts +70 -1
  285. package/types/ojiepermana-angular-component-kbd.d.ts +16 -1
  286. package/types/ojiepermana-angular-component-label.d.ts +11 -1
  287. package/types/ojiepermana-angular-component-menubar.d.ts +93 -1
  288. package/types/ojiepermana-angular-component-native-select.d.ts +26 -1
  289. package/types/ojiepermana-angular-component-navigation-menu.d.ts +104 -1
  290. package/types/ojiepermana-angular-component-pagination.d.ts +33 -1
  291. package/types/ojiepermana-angular-component-pillbox.d.ts +222 -1
  292. package/types/ojiepermana-angular-component-popover.d.ts +66 -1
  293. package/types/ojiepermana-angular-component-progress.d.ts +17 -1
  294. package/types/ojiepermana-angular-component-radio.d.ts +60 -1
  295. package/types/ojiepermana-angular-component-resizable.d.ts +117 -1
  296. package/types/ojiepermana-angular-component-scroll-area.d.ts +19 -1
  297. package/types/ojiepermana-angular-component-segmented-control.d.ts +58 -1
  298. package/types/ojiepermana-angular-component-select.d.ts +122 -1
  299. package/types/ojiepermana-angular-component-separator.d.ts +14 -1
  300. package/types/ojiepermana-angular-component-sheet.d.ts +130 -1
  301. package/types/ojiepermana-angular-component-skeleton.d.ts +10 -1
  302. package/types/ojiepermana-angular-component-slider.d.ts +83 -1
  303. package/types/ojiepermana-angular-component-spinner.d.ts +13 -1
  304. package/types/ojiepermana-angular-component-switch.d.ts +44 -1
  305. package/types/ojiepermana-angular-component-table.d.ts +57 -1
  306. package/types/ojiepermana-angular-component-tabs.d.ts +124 -1
  307. package/types/ojiepermana-angular-component-textarea.d.ts +17 -1
  308. package/types/ojiepermana-angular-component-timeline.d.ts +64 -1
  309. package/types/ojiepermana-angular-component-toast.d.ts +64 -1
  310. package/types/ojiepermana-angular-component-toggle-group.d.ts +90 -1
  311. package/types/ojiepermana-angular-component-toggle.d.ts +25 -1
  312. package/types/ojiepermana-angular-component-tooltip.d.ts +143 -1
  313. package/types/ojiepermana-angular-component-utils-core.d.ts +184 -1
  314. package/types/ojiepermana-angular-component-utils-overlay.d.ts +21 -1
  315. package/types/ojiepermana-angular-component-utils-scale.d.ts +19 -1
  316. package/types/ojiepermana-angular-component-utils.d.ts +2 -1
  317. package/types/ojiepermana-angular-component.d.ts +2 -1
  318. package/types/ojiepermana-angular-navigation-core.d.ts +59 -1
  319. package/types/ojiepermana-angular-navigation-icon.d.ts +12 -1
  320. package/types/ojiepermana-angular-navigation-service.d.ts +116 -1
  321. package/types/ojiepermana-angular-navigation-types.d.ts +144 -1
  322. package/types/ojiepermana-angular-navigation.d.ts +507 -1
  323. package/types/ojiepermana-angular-sdk.d.ts +89 -1
  324. package/types/ojiepermana-angular-theme-component-settings.d.ts +154 -1
  325. package/types/ojiepermana-angular-theme-layout-services.d.ts +147 -1
  326. package/types/ojiepermana-angular-theme-layout-types.d.ts +40 -1
  327. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +299 -1
  328. package/types/ojiepermana-angular-theme-layout.d.ts +129 -1
  329. package/types/ojiepermana-angular-theme-page-core.d.ts +157 -1
  330. package/types/ojiepermana-angular-theme-page-filter.d.ts +77 -1
  331. package/types/ojiepermana-angular-theme-page-root.d.ts +88 -1
  332. package/types/ojiepermana-angular-theme-page-side.d.ts +50 -1
  333. package/types/ojiepermana-angular-theme-page-slots.d.ts +40 -1
  334. package/types/ojiepermana-angular-theme-page.d.ts +5 -1
  335. package/types/ojiepermana-angular-theme-shell-services.d.ts +193 -1
  336. package/types/ojiepermana-angular-theme-shell-types.d.ts +105 -1
  337. package/types/ojiepermana-angular-theme-shell.d.ts +100 -1
  338. package/types/ojiepermana-angular-theme-styles.d.ts +319 -1
  339. package/types/ojiepermana-angular-theme.d.ts +2 -1
  340. package/types/ojiepermana-angular.d.ts +5 -5
@@ -1,7 +1,114 @@
1
- export * from '@ojiepermana/angular-theme/page/slots';
1
+ import * as i0 from '@angular/core';
2
+ import { inject, input, computed, Component } from '@angular/core';
3
+ import { cn } from '@ojiepermana/angular/component/utils/core';
4
+ import { PageStateService, PAGE_DEFAULT_HEIGHT, PAGE_DEFAULT_SCROLL } from '@ojiepermana/angular/theme/page/core';
2
5
 
3
- // Generated by scripts/gen-umbrella-entrypoints.mjs — do not edit by hand.
6
+ function buildPageBodyClasses(scroll, customClass) {
7
+ return cn('block min-w-0', scroll === 'content' && 'h-full min-h-0 overflow-auto', scroll === 'page' && 'overflow-visible', customClass);
8
+ }
9
+ class PageHeaderComponent {
10
+ page = inject(PageStateService, { optional: true });
11
+ class = input('', /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
13
+ resolvedHeight = computed(() => this.page?.height() ?? PAGE_DEFAULT_HEIGHT, /* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "resolvedHeight" }] : /* istanbul ignore next */ []));
15
+ /** Saat tombol apps mengambang di atas header, sisakan ruang kanan agar isi header tidak tertimpa. */
16
+ reservesAppsLauncher = computed(() => this.page?.appsLauncherReserve() ?? false, /* @ts-ignore */
17
+ ...(ngDevMode ? [{ debugName: "reservesAppsLauncher" }] : /* istanbul ignore next */ []));
18
+ /** Lebar tombol apps (h-9 w-9 = 36px) + offset kanan (right-2 = 8px) + jarak aman; `null` = tak memesan. */
19
+ appsLauncherReservePadding = computed(() => this.reservesAppsLauncher() ? '3.5rem' : null, /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "appsLauncherReservePadding" }] : /* istanbul ignore next */ []));
21
+ classes = computed(() => cn('block shrink-0 border-b border-[hsl(var(--border)/var(--section-border-opacity))] bg-background', this.class(), this.resolvedHeight() === 'fix' && 'h-12 overflow-hidden'), /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
23
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
24
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: PageHeaderComponent, isStandalone: true, selector: "PageHeader", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-page-slot": "header" }, properties: { "class": "classes()", "style.padding-right": "appsLauncherReservePadding()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
25
+ }
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageHeaderComponent, decorators: [{
27
+ type: Component,
28
+ args: [{
29
+ selector: 'PageHeader',
30
+ host: {
31
+ '[class]': 'classes()',
32
+ // Inline style menang atas utility responsif konsumen (mis. `md:px-6`), jadi ruang
33
+ // untuk tombol apps yang mengambang tetap terjamin di semua breakpoint.
34
+ '[style.padding-right]': 'appsLauncherReservePadding()',
35
+ 'data-page-slot': 'header',
36
+ },
37
+ template: `<ng-content />`,
38
+ }]
39
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
40
+ class PageContentComponent {
41
+ page = inject(PageStateService, { optional: true });
42
+ class = input('', /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
44
+ resolvedScroll = computed(() => this.page?.scroll() ?? PAGE_DEFAULT_SCROLL, /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "resolvedScroll" }] : /* istanbul ignore next */ []));
46
+ classes = computed(() => buildPageBodyClasses(this.resolvedScroll(), this.class()), /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
48
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
49
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: PageContentComponent, isStandalone: true, selector: "PageContent", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-page-slot": "content" }, properties: { "class": "classes()", "attr.tabindex": "resolvedScroll() === \"content\" ? \"0\" : null" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
50
+ }
51
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageContentComponent, decorators: [{
52
+ type: Component,
53
+ args: [{
54
+ selector: 'PageContent',
55
+ host: {
56
+ '[class]': 'classes()',
57
+ // When this region scrolls its own content, make it keyboard-focusable so it
58
+ // can be scrolled without a mouse (axe scrollable-region-focusable).
59
+ '[attr.tabindex]': 'resolvedScroll() === "content" ? "0" : null',
60
+ 'data-page-slot': 'content',
61
+ },
62
+ template: `<ng-content />`,
63
+ }]
64
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
65
+ class PageDashboardComponent {
66
+ page = inject(PageStateService, { optional: true });
67
+ class = input('', /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
69
+ resolvedScroll = computed(() => this.page?.scroll() ?? PAGE_DEFAULT_SCROLL, /* @ts-ignore */
70
+ ...(ngDevMode ? [{ debugName: "resolvedScroll" }] : /* istanbul ignore next */ []));
71
+ classes = computed(() => buildPageBodyClasses(this.resolvedScroll(), this.class()), /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
73
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageDashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
74
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: PageDashboardComponent, isStandalone: true, selector: "PageDashboard", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-page-slot": "dashboard" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
75
+ }
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageDashboardComponent, decorators: [{
77
+ type: Component,
78
+ args: [{
79
+ selector: 'PageDashboard',
80
+ host: {
81
+ '[class]': 'classes()',
82
+ 'data-page-slot': 'dashboard',
83
+ },
84
+ template: `<ng-content />`,
85
+ }]
86
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
87
+ class PageFooterComponent {
88
+ page = inject(PageStateService, { optional: true });
89
+ class = input('', /* @ts-ignore */
90
+ ...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
91
+ resolvedHeight = computed(() => this.page?.height() ?? PAGE_DEFAULT_HEIGHT, /* @ts-ignore */
92
+ ...(ngDevMode ? [{ debugName: "resolvedHeight" }] : /* istanbul ignore next */ []));
93
+ classes = computed(() => cn('block shrink-0 border-t border-[hsl(var(--border)/var(--section-border-opacity))] bg-background', this.class(), this.resolvedHeight() === 'fix' && 'h-12 overflow-hidden'), /* @ts-ignore */
94
+ ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
95
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageFooterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
96
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.4", type: PageFooterComponent, isStandalone: true, selector: "PageFooter", inputs: { class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-page-slot": "footer" }, properties: { "class": "classes()" } }, ngImport: i0, template: `<ng-content />`, isInline: true });
97
+ }
98
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: PageFooterComponent, decorators: [{
99
+ type: Component,
100
+ args: [{
101
+ selector: 'PageFooter',
102
+ host: {
103
+ '[class]': 'classes()',
104
+ 'data-page-slot': 'footer',
105
+ },
106
+ template: `<ng-content />`,
107
+ }]
108
+ }], propDecorators: { class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
4
109
 
5
110
  /**
6
111
  * Generated bundle index. Do not edit.
7
- */
112
+ */
113
+
114
+ export { PageContentComponent, PageDashboardComponent, PageFooterComponent, PageHeaderComponent };
@@ -1,6 +1,11 @@
1
- export * from '@ojiepermana/angular-theme/page';
1
+ export { PAGE_APPEARANCES, PAGE_DEFAULT_APPEARANCE, PAGE_DEFAULT_FILTER_MODE, PAGE_DEFAULT_FILTER_PLACEMENT, PAGE_DEFAULT_FILTER_POSITION, PAGE_DEFAULT_FILTER_WIDTH, PAGE_DEFAULT_HEIGHT, PAGE_DEFAULT_SCROLL, PAGE_DEFAULT_SIDE_MODE, PAGE_DEFAULT_SIDE_POSITION, PAGE_DEFAULT_SIDE_WIDTH, PAGE_DEFAULT_VARIANT, PAGE_FILTER_PLACEMENTS, PAGE_HEIGHT_VALUES, PAGE_SCROLL_VALUES, PAGE_SIDE_MODES, PAGE_SIDE_POSITIONS, PAGE_VARIANTS, isUiPageAppearance, isUiPageFilterPlacement, isUiPageHeight, isUiPageScroll, isUiPageSideMode, isUiPageSidePosition, isUiPageVariant } from '@ojiepermana/angular/theme/page/core';
2
+ export { PageFilterComponent, PageFilterToggleComponent } from '@ojiepermana/angular/theme/page/filter';
3
+ export { PageComponent } from '@ojiepermana/angular/theme/page/root';
4
+ export { PageSideComponent, PageSideToggleComponent } from '@ojiepermana/angular/theme/page/side';
5
+ export { PageContentComponent, PageDashboardComponent, PageFooterComponent, PageHeaderComponent } from '@ojiepermana/angular/theme/page/slots';
2
6
 
3
- // Generated by scripts/gen-umbrella-entrypoints.mjs — do not edit by hand.
7
+ // Explicit named forwarding keeps the compatibility barrel inspectable by declaration/API tools
8
+ // while each implementation remains owned by its focused secondary entry point.
4
9
 
5
10
  /**
6
11
  * Generated bundle index. Do not edit.
@@ -1,7 +1,342 @@
1
- export * from '@ojiepermana/angular-theme/shell/services';
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, makeEnvironmentProviders, inject, PLATFORM_ID, DestroyRef, signal, computed, Service } from '@angular/core';
3
+ import { SHELL_DEFAULT_WINDOW_STATE, normalizeShellDevice, defaultShellDeviceForMode, SHELL_MODE_STORAGE_KEY, SHELL_DEVICE_STORAGE_KEY, SHELL_COLOR_STORAGE_KEY, SHELL_FRAME_STORAGE_KEY, isShellMode, isShellDevice, isShellColor, isShellFrame, SHELL_DEFAULT_MODE, SHELL_DEFAULT_COLOR, SHELL_DEFAULT_FRAME } from '@ojiepermana/angular/theme/shell/types';
4
+ import { isPlatformBrowser } from '@angular/common';
5
+ import { globalLocalStorage } from '@ojiepermana/angular/component/utils/core';
2
6
 
3
- // Generated by scripts/gen-umbrella-entrypoints.mjs — do not edit by hand.
7
+ const SHELL_WINDOW_BRIDGE = new InjectionToken('SHELL_WINDOW_BRIDGE');
8
+ /**
9
+ * Browser fallback used when no bridge is provided: a page has no window to
10
+ * drive, so it reports the web platform, no device opinion, and every command is
11
+ * a no-op. This is what keeps `<Shell>` renderable (and testable) outside a
12
+ * desktop runtime.
13
+ */
14
+ const WEB_SHELL_WINDOW_BRIDGE = {
15
+ platform: 'web',
16
+ device: () => null,
17
+ snapshot: () => ({ state: SHELL_DEFAULT_WINDOW_STATE, focused: true }),
18
+ minimize: () => undefined,
19
+ toggleMaximize: () => undefined,
20
+ close: () => undefined,
21
+ };
22
+ /**
23
+ * Register the bridge `ShellService` drives. Pass a factory to defer any runtime
24
+ * probing until the injector is created.
25
+ */
26
+ function provideShellWindowBridge(bridge) {
27
+ return makeEnvironmentProviders([
28
+ typeof bridge === 'function'
29
+ ? { provide: SHELL_WINDOW_BRIDGE, useFactory: bridge }
30
+ : { provide: SHELL_WINDOW_BRIDGE, useValue: bridge },
31
+ ]);
32
+ }
33
+
34
+ /** `true` when the page is running inside a Tauri webview. */
35
+ function isTauriRuntime() {
36
+ const scope = globalThis;
37
+ return scope.__TAURI__ !== undefined || scope.__TAURI_INTERNALS__ !== undefined;
38
+ }
39
+ /**
40
+ * Adapter from a Tauri window onto {@link ShellWindowBridge}.
41
+ *
42
+ * Every call resolves the window lazily and tolerates its absence, so the same
43
+ * bridge can be registered unconditionally: run the app in a browser and the
44
+ * commands become no-ops rather than errors.
45
+ */
46
+ function createTauriShellWindowBridge(options = {}) {
47
+ const resolveWindow = options.currentWindow ?? defaultCurrentWindow;
48
+ const resolvePlatform = options.platform ?? defaultPlatform;
49
+ const withWindow = async (command) => {
50
+ const handle = await resolveWindow();
51
+ if (handle) {
52
+ await command(handle);
53
+ }
54
+ };
55
+ return {
56
+ platform: 'tauri',
57
+ async device() {
58
+ try {
59
+ return normalizeShellDevice(await resolvePlatform());
60
+ }
61
+ catch {
62
+ return null;
63
+ }
64
+ },
65
+ async snapshot() {
66
+ const handle = await resolveWindow();
67
+ if (!handle) {
68
+ return { state: 'normal', focused: true };
69
+ }
70
+ // Fullscreen wins: a fullscreen window also reports itself maximized on
71
+ // some platforms, and the shell chrome differs for the two.
72
+ const [fullscreen, maximized, focused] = await Promise.all([
73
+ handle.isFullscreen(),
74
+ handle.isMaximized(),
75
+ handle.isFocused?.() ?? Promise.resolve(true),
76
+ ]);
77
+ return {
78
+ state: fullscreen ? 'fullscreen' : maximized ? 'maximized' : 'normal',
79
+ focused,
80
+ };
81
+ },
82
+ minimize: () => withWindow((handle) => handle.minimize()),
83
+ toggleMaximize: () => withWindow((handle) => handle.toggleMaximize()),
84
+ close: () => withWindow((handle) => handle.close()),
85
+ startDragging: () => withWindow((handle) => handle.startDragging()),
86
+ async watch(onChange) {
87
+ const handle = await resolveWindow();
88
+ if (!handle) {
89
+ return () => undefined;
90
+ }
91
+ const unsubscribes = await Promise.all([
92
+ handle.onResized?.(onChange) ?? Promise.resolve(undefined),
93
+ handle.onFocusChanged?.(onChange) ?? Promise.resolve(undefined),
94
+ ]);
95
+ return () => {
96
+ for (const unsubscribe of unsubscribes) {
97
+ unsubscribe?.();
98
+ }
99
+ };
100
+ },
101
+ };
102
+ }
103
+ /**
104
+ * Register the Tauri window bridge for `ShellService`. Safe to call in a build
105
+ * that also ships to the browser — outside a Tauri webview the bridge resolves
106
+ * no window and the shell falls back to inert commands.
107
+ */
108
+ function provideTauriShellWindowBridge(options = {}) {
109
+ return provideShellWindowBridge(() => createTauriShellWindowBridge(options));
110
+ }
111
+ function tauriGlobal() {
112
+ return globalThis.__TAURI__ ?? null;
113
+ }
114
+ function defaultCurrentWindow() {
115
+ return tauriGlobal()?.window?.getCurrentWindow?.() ?? null;
116
+ }
117
+ function defaultPlatform() {
118
+ const fromPlugin = tauriGlobal()?.os?.platform?.();
119
+ if (fromPlugin !== undefined) {
120
+ return fromPlugin;
121
+ }
122
+ const navigatorRef = globalThis
123
+ .navigator;
124
+ return navigatorRef?.userAgent ?? navigatorRef?.platform ?? '';
125
+ }
126
+
127
+ /**
128
+ * State behind `<Shell>`: the persisted `mode` / `device` / `color` / `frame`
129
+ * axes, plus
130
+ * live window state read from whichever {@link ShellWindowBridge} the app
131
+ * registered.
132
+ *
133
+ * Every axis resolves through a fallback chain, so an app can declare as much or
134
+ * as little as it knows — and each is readable *and* writable through
135
+ * localStorage, so a target can be flipped without a rebuild:
136
+ *
137
+ * - `mode` — stored `shell-mode`, else `desktop` when a desktop runtime is
138
+ * registered (a Tauri window *is* a desktop shell), else `web`.
139
+ * - `device` — stored `shell-device`, else whatever the bridge reports, else the
140
+ * mode's default device.
141
+ * - `color` — stored `shell-color`, else `sync`.
142
+ * - `frame` — stored `shell-frame`, else `classic`.
143
+ *
144
+ * `<Shell>`'s own inputs sit in front of all of them, and `<Shell>` is also where
145
+ * the pairs are forced to stay coherent (device with mode, frame with mode) — the values here are preferences,
146
+ * so a stored `macos` survives a temporary switch to `mode='web'` instead of being
147
+ * erased.
148
+ *
149
+ * With no bridge registered this resolves to the inert web bridge, so the same
150
+ * component tree renders in a browser tab, in a unit test, and under SSR.
151
+ */
152
+ class ShellService {
153
+ platformId = inject(PLATFORM_ID);
154
+ storage = globalLocalStorage(isPlatformBrowser(this.platformId));
155
+ destroyRef = inject(DestroyRef);
156
+ bridge = inject(SHELL_WINDOW_BRIDGE, { optional: true }) ?? WEB_SHELL_WINDOW_BRIDGE;
157
+ /** Runtime hosting the shell; `web` whenever no bridge is registered. */
158
+ platform = this.bridge.platform;
159
+ /** `true` for any non-browser runtime — i.e. there is a real OS window to drive. */
160
+ isDesktopRuntime = this.bridge.platform !== 'web';
161
+ modeState = signal(this.storedMode(), /* @ts-ignore */
162
+ ...(ngDevMode ? [{ debugName: "modeState" }] : /* istanbul ignore next */ []));
163
+ deviceState = signal(this.storedDevice(), /* @ts-ignore */
164
+ ...(ngDevMode ? [{ debugName: "deviceState" }] : /* istanbul ignore next */ []));
165
+ colorState = signal(this.storedColor(), /* @ts-ignore */
166
+ ...(ngDevMode ? [{ debugName: "colorState" }] : /* istanbul ignore next */ []));
167
+ frameState = signal(this.storedFrame(), /* @ts-ignore */
168
+ ...(ngDevMode ? [{ debugName: "frameState" }] : /* istanbul ignore next */ []));
169
+ reportedDeviceState = signal(null, /* @ts-ignore */
170
+ ...(ngDevMode ? [{ debugName: "reportedDeviceState" }] : /* istanbul ignore next */ []));
171
+ windowStateState = signal(SHELL_DEFAULT_WINDOW_STATE, /* @ts-ignore */
172
+ ...(ngDevMode ? [{ debugName: "windowStateState" }] : /* istanbul ignore next */ []));
173
+ focusedState = signal(true, /* @ts-ignore */
174
+ ...(ngDevMode ? [{ debugName: "focusedState" }] : /* istanbul ignore next */ []));
175
+ mode = this.modeState.asReadonly();
176
+ /**
177
+ * Preferred device: the stored choice, else what the runtime reports, else the
178
+ * current mode's default. Not forced to match `mode()` — see the class note.
179
+ */
180
+ device = computed(() => this.deviceState() ??
181
+ this.reportedDeviceState() ??
182
+ defaultShellDeviceForMode(this.modeState()), /* @ts-ignore */
183
+ ...(ngDevMode ? [{ debugName: "device" }] : /* istanbul ignore next */ []));
184
+ /** Where the shell's chrome takes its colors from: the design system, or the device's native look. */
185
+ color = this.colorState.asReadonly();
186
+ /** How the app sits in its window: flush (`classic`) or inset as a panel (`modern`). */
187
+ frame = this.frameState.asReadonly();
188
+ windowState = this.windowStateState.asReadonly();
189
+ focused = this.focusedState.asReadonly();
190
+ isMaximized = computed(() => this.windowStateState() === 'maximized', /* @ts-ignore */
191
+ ...(ngDevMode ? [{ debugName: "isMaximized" }] : /* istanbul ignore next */ []));
192
+ isFullscreen = computed(() => this.windowStateState() === 'fullscreen', /* @ts-ignore */
193
+ ...(ngDevMode ? [{ debugName: "isFullscreen" }] : /* istanbul ignore next */ []));
194
+ constructor() {
195
+ // Nothing to probe on the server, and the bridge would have no window yet.
196
+ if (!isPlatformBrowser(this.platformId)) {
197
+ return;
198
+ }
199
+ void this.sync();
200
+ void this.watchWindow();
201
+ }
202
+ setMode(mode, options = {}) {
203
+ this.modeState.set(mode);
204
+ if (options.persist !== false) {
205
+ this.storage.write(SHELL_MODE_STORAGE_KEY, mode);
206
+ }
207
+ }
208
+ setDevice(device, options = {}) {
209
+ this.deviceState.set(device);
210
+ if (options.persist !== false) {
211
+ this.storage.write(SHELL_DEVICE_STORAGE_KEY, device);
212
+ }
213
+ }
214
+ setColor(color, options = {}) {
215
+ this.colorState.set(color);
216
+ if (options.persist !== false) {
217
+ this.storage.write(SHELL_COLOR_STORAGE_KEY, color);
218
+ }
219
+ }
220
+ setFrame(frame, options = {}) {
221
+ this.frameState.set(frame);
222
+ if (options.persist !== false) {
223
+ this.storage.write(SHELL_FRAME_STORAGE_KEY, frame);
224
+ }
225
+ }
226
+ /** Adopt `mode` as the default, unless a choice is already stored. */
227
+ registerMode(mode) {
228
+ if (!isShellMode(this.storage.read(SHELL_MODE_STORAGE_KEY))) {
229
+ this.setMode(mode, { persist: false });
230
+ }
231
+ }
232
+ /** Adopt `device` as the default, unless a choice is already stored. */
233
+ registerDevice(device) {
234
+ if (!isShellDevice(this.storage.read(SHELL_DEVICE_STORAGE_KEY))) {
235
+ this.setDevice(device, { persist: false });
236
+ }
237
+ }
238
+ /** Adopt `color` as the default, unless a choice is already stored. */
239
+ registerColor(color) {
240
+ if (!isShellColor(this.storage.read(SHELL_COLOR_STORAGE_KEY))) {
241
+ this.setColor(color, { persist: false });
242
+ }
243
+ }
244
+ /** Adopt `frame` as the default, unless a choice is already stored. */
245
+ registerFrame(frame) {
246
+ if (!isShellFrame(this.storage.read(SHELL_FRAME_STORAGE_KEY))) {
247
+ this.setFrame(frame, { persist: false });
248
+ }
249
+ }
250
+ /** Re-read the device and window state from the bridge. */
251
+ async sync() {
252
+ try {
253
+ const [device, snapshot] = await Promise.all([this.bridge.device(), this.bridge.snapshot()]);
254
+ this.reportedDeviceState.set(device);
255
+ this.windowStateState.set(snapshot.state);
256
+ this.focusedState.set(snapshot.focused);
257
+ }
258
+ catch {
259
+ // A runtime can vanish mid-session (a window closing tears down its IPC).
260
+ // Keep the last known state rather than failing the render.
261
+ }
262
+ }
263
+ async minimize() {
264
+ await this.command(() => this.bridge.minimize());
265
+ }
266
+ async toggleMaximize() {
267
+ await this.command(() => this.bridge.toggleMaximize());
268
+ }
269
+ async close() {
270
+ // No resync: the window is going away, and the bridge's IPC with it.
271
+ await this.command(() => this.bridge.close(), { resync: false });
272
+ }
273
+ /** Start a pointer-driven window move, for runtimes that need an explicit call. */
274
+ async startDragging() {
275
+ await this.command(() => this.bridge.startDragging?.(), { resync: false });
276
+ }
277
+ async command(run, options = {}) {
278
+ try {
279
+ await run();
280
+ }
281
+ catch {
282
+ return;
283
+ }
284
+ if (options.resync !== false) {
285
+ await this.sync();
286
+ }
287
+ }
288
+ async watchWindow() {
289
+ const watch = this.bridge.watch;
290
+ if (!watch) {
291
+ return;
292
+ }
293
+ let unsubscribe;
294
+ let destroyed = false;
295
+ this.destroyRef.onDestroy(() => {
296
+ destroyed = true;
297
+ unsubscribe?.();
298
+ });
299
+ try {
300
+ unsubscribe = await watch.call(this.bridge, () => void this.sync());
301
+ }
302
+ catch {
303
+ return;
304
+ }
305
+ // The service may have been torn down while the subscription was in flight.
306
+ if (destroyed) {
307
+ unsubscribe();
308
+ }
309
+ }
310
+ storedMode() {
311
+ const stored = this.storage.read(SHELL_MODE_STORAGE_KEY);
312
+ if (isShellMode(stored)) {
313
+ return stored;
314
+ }
315
+ // A registered desktop runtime is itself the declaration: a Tauri or Electron
316
+ // window is a desktop shell whether or not the app spelled it out.
317
+ return this.isDesktopRuntime ? 'desktop' : SHELL_DEFAULT_MODE;
318
+ }
319
+ storedDevice() {
320
+ const stored = this.storage.read(SHELL_DEVICE_STORAGE_KEY);
321
+ return isShellDevice(stored) ? stored : null;
322
+ }
323
+ storedColor() {
324
+ const stored = this.storage.read(SHELL_COLOR_STORAGE_KEY);
325
+ return isShellColor(stored) ? stored : SHELL_DEFAULT_COLOR;
326
+ }
327
+ storedFrame() {
328
+ const stored = this.storage.read(SHELL_FRAME_STORAGE_KEY);
329
+ return isShellFrame(stored) ? stored : SHELL_DEFAULT_FRAME;
330
+ }
331
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ShellService, deps: [], target: i0.ɵɵFactoryTarget.Service });
332
+ static ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: ShellService });
333
+ }
334
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ShellService, decorators: [{
335
+ type: Service
336
+ }], ctorParameters: () => [] });
4
337
 
5
338
  /**
6
339
  * Generated bundle index. Do not edit.
7
- */
340
+ */
341
+
342
+ export { SHELL_WINDOW_BRIDGE, ShellService, WEB_SHELL_WINDOW_BRIDGE, createTauriShellWindowBridge, isTauriRuntime, provideShellWindowBridge, provideTauriShellWindowBridge };
@@ -1,7 +1,163 @@
1
- export * from '@ojiepermana/angular-theme/shell/types';
2
-
3
- // Generated by scripts/gen-umbrella-entrypoints.mjs — do not edit by hand.
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
+ const SHELL_MODES = ['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
+ const SHELL_DEVICES = [
17
+ 'browser',
18
+ 'macos',
19
+ 'windows',
20
+ 'linux',
21
+ 'ipad',
22
+ 'android',
23
+ 'ios',
24
+ ];
25
+ /**
26
+ * Where the shell's own chrome takes its colors from. `sync` keeps the titlebar
27
+ * inside the design system, so it recolors with `theme-color` / `theme-neutral`
28
+ * and `data-mode` like everything else. `default` paints the native look of the
29
+ * active `device` instead, for an app that wants to disappear into its OS.
30
+ *
31
+ * Persisted under {@link SHELL_COLOR_STORAGE_KEY}.
32
+ */
33
+ const SHELL_COLORS = ['sync', 'default'];
34
+ /**
35
+ * How the app sits inside its window.
36
+ *
37
+ * `classic` is the traditional desktop frame: the app is flush to the window edge
38
+ * and a bordered titlebar sits on top of it.
39
+ *
40
+ * `modern` insets the app instead, so it floats as a panel inside the window with
41
+ * the chrome showing around it. The titlebar drops its border and takes the same
42
+ * colour as that surround, so the two read as one continuous frame rather than a
43
+ * bar stacked on a body.
44
+ *
45
+ * Only a desktop window has a frame to shape, so this is coerced to `classic` on
46
+ * every other mode — see {@link resolveShellFrameForMode}.
47
+ *
48
+ * Persisted under {@link SHELL_FRAME_STORAGE_KEY}.
49
+ */
50
+ const SHELL_FRAMES = ['classic', 'modern'];
51
+ /**
52
+ * Runtime hosting the shell — distinct from `device`, which is the OS. `web`
53
+ * means no bridge is registered, so there is no window to drive.
54
+ */
55
+ const SHELL_PLATFORMS = ['web', 'tauri', 'electron', 'custom'];
56
+ const SHELL_WINDOW_STATES = ['normal', 'maximized', 'fullscreen'];
57
+ const SHELL_DEFAULT_MODE = 'web';
58
+ const SHELL_DEFAULT_DEVICE = 'browser';
59
+ const SHELL_DEFAULT_COLOR = 'sync';
60
+ const SHELL_DEFAULT_FRAME = 'classic';
61
+ const SHELL_DEFAULT_PLATFORM = 'web';
62
+ const SHELL_DEFAULT_WINDOW_STATE = 'normal';
63
+ const SHELL_MODE_STORAGE_KEY = 'shell-mode';
64
+ const SHELL_DEVICE_STORAGE_KEY = 'shell-device';
65
+ const SHELL_COLOR_STORAGE_KEY = 'shell-color';
66
+ const SHELL_FRAME_STORAGE_KEY = 'shell-frame';
67
+ /**
68
+ * Which devices each mode can run on. The first entry is the mode's default, used
69
+ * when nothing else resolves — and to correct a device that cannot belong to the
70
+ * active mode (`mode='desktop' device='ipad'` has no meaning).
71
+ */
72
+ const SHELL_MODE_DEVICES = {
73
+ web: ['browser'],
74
+ desktop: ['macos', 'windows', 'linux'],
75
+ tablet: ['ipad', 'android'],
76
+ mobile: ['ios', 'android'],
77
+ };
78
+ function isShellMode(value) {
79
+ return typeof value === 'string' && SHELL_MODES.includes(value);
80
+ }
81
+ function isShellDevice(value) {
82
+ return typeof value === 'string' && SHELL_DEVICES.includes(value);
83
+ }
84
+ function isShellColor(value) {
85
+ return typeof value === 'string' && SHELL_COLORS.includes(value);
86
+ }
87
+ function isShellFrame(value) {
88
+ return typeof value === 'string' && SHELL_FRAMES.includes(value);
89
+ }
90
+ function isShellPlatform(value) {
91
+ return typeof value === 'string' && SHELL_PLATFORMS.includes(value);
92
+ }
93
+ function isShellWindowState(value) {
94
+ return typeof value === 'string' && SHELL_WINDOW_STATES.includes(value);
95
+ }
96
+ function normalizeShellMode(value) {
97
+ return isShellMode(value) ? value : SHELL_DEFAULT_MODE;
98
+ }
99
+ function normalizeShellColor(value) {
100
+ return isShellColor(value) ? value : SHELL_DEFAULT_COLOR;
101
+ }
102
+ function normalizeShellFrame(value) {
103
+ return isShellFrame(value) ? value : SHELL_DEFAULT_FRAME;
104
+ }
105
+ /**
106
+ * Resolve a frame that is coherent with `mode`. Only a desktop window has a frame
107
+ * to shape — the other modes have no titlebar to fuse with a surround — so
108
+ * `modern` collapses to `classic` there rather than insetting an app for no reason.
109
+ */
110
+ function resolveShellFrameForMode(mode, frame) {
111
+ return mode === 'desktop' ? normalizeShellFrame(frame) : SHELL_DEFAULT_FRAME;
112
+ }
113
+ /** Devices the mode can run on; the first is its default. */
114
+ function shellDevicesForMode(mode) {
115
+ return SHELL_MODE_DEVICES[mode];
116
+ }
117
+ function defaultShellDeviceForMode(mode) {
118
+ return SHELL_MODE_DEVICES[mode][0];
119
+ }
120
+ function isShellDeviceForMode(mode, device) {
121
+ return SHELL_MODE_DEVICES[mode].includes(device);
122
+ }
123
+ /**
124
+ * Resolve a device that is coherent with `mode`. An unknown device, or one that
125
+ * belongs to a different form factor, falls back to the mode's default rather
126
+ * than leaving the pair in a state no styling can describe.
127
+ */
128
+ function resolveShellDeviceForMode(mode, device) {
129
+ return isShellDevice(device) && isShellDeviceForMode(mode, device)
130
+ ? device
131
+ : defaultShellDeviceForMode(mode);
132
+ }
133
+ /**
134
+ * Map a raw platform identifier onto the device axis — a Tauri `platform()`
135
+ * result, an Electron `process.platform`, or a `navigator.platform`/user-agent
136
+ * string. Order matters: iPadOS reports itself as a Mac, and Android tablets and
137
+ * phones share a token, so the narrower match has to win first.
138
+ */
139
+ function normalizeShellDevice(value) {
140
+ if (!value) {
141
+ return null;
142
+ }
143
+ const token = value.toLowerCase();
144
+ if (token.includes('ipad'))
145
+ return 'ipad';
146
+ if (token.includes('iphone') || token.includes('ipod') || token === 'ios')
147
+ return 'ios';
148
+ if (token.includes('android'))
149
+ return 'android';
150
+ if (token.includes('mac') || token === 'darwin')
151
+ return 'macos';
152
+ if (token.includes('win'))
153
+ return 'windows';
154
+ if (token.includes('linux') || token.includes('x11'))
155
+ return 'linux';
156
+ return null;
157
+ }
4
158
 
5
159
  /**
6
160
  * Generated bundle index. Do not edit.
7
- */
161
+ */
162
+
163
+ 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 };