@mintplayer/ng-bootstrap 22.32.0 → 22.34.0

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 (230) hide show
  1. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +3 -166
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  3. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -140
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  5. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +33 -63
  6. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  7. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +23 -30
  8. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +37 -22
  10. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +25 -9
  12. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  13. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +5 -9
  14. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  15. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +157 -219
  16. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  17. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +7 -9
  18. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  19. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +12 -14
  20. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  21. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
  22. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +8 -8
  24. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  25. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +313 -212
  26. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  27. package/fesm2022/mintplayer-ng-bootstrap-close.mjs +25 -15
  28. package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
  29. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +7 -7
  30. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  31. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
  32. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  33. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
  34. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
  35. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +15 -27
  36. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  37. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +6 -10
  38. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  39. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +7 -9
  40. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  41. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
  42. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  43. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
  44. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  45. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +9 -19
  46. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  47. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
  48. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  49. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +18 -32
  50. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  51. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +52 -38
  52. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  53. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +64 -119
  54. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
  55. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -38
  56. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  57. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +44 -44
  58. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  59. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +201 -18
  60. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  61. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
  62. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
  63. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -261
  64. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  65. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +13 -15
  66. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  67. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +3 -4
  68. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -1
  69. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +30 -18
  70. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  71. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +20 -90
  72. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  73. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +52 -401
  74. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  75. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +7 -7
  76. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  77. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +27 -50
  78. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  79. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
  80. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
  81. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -10
  82. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  83. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +26 -54
  84. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  85. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
  86. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
  87. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +56 -267
  88. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  89. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
  90. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  91. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +47 -63
  92. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  93. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +8 -16
  94. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  95. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +232 -169
  96. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  97. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +85 -47
  98. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  99. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
  100. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  101. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
  102. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  103. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +49 -65
  104. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  105. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -24
  106. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  107. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -181
  108. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  109. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -9
  110. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  111. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
  112. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  113. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +7 -9
  114. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  115. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +7 -7
  116. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  117. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +35 -40
  118. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
  119. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -101
  120. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  121. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +29 -23
  122. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  123. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
  124. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  125. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
  126. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  127. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
  128. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  129. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +13 -17
  130. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  131. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +103 -152
  132. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  133. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +50 -157
  134. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  135. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +10 -12
  136. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  137. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
  138. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  139. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +159 -234
  140. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  141. package/package.json +2 -22
  142. package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -81
  143. package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
  144. package/types/mintplayer-ng-bootstrap-alert.d.ts +20 -28
  145. package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -12
  146. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +29 -8
  147. package/types/mintplayer-ng-bootstrap-button-group.d.ts +14 -4
  148. package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
  149. package/types/mintplayer-ng-bootstrap-card.d.ts +93 -78
  150. package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
  151. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
  152. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
  153. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
  154. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +143 -91
  155. package/types/mintplayer-ng-bootstrap-close.d.ts +16 -5
  156. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
  157. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
  158. package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
  159. package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
  160. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +2 -6
  161. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +2 -4
  162. package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
  163. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
  164. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
  165. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
  166. package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
  167. package/types/mintplayer-ng-bootstrap-form.d.ts +32 -11
  168. package/types/mintplayer-ng-bootstrap-grid.d.ts +38 -31
  169. package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
  170. package/types/mintplayer-ng-bootstrap-list-group.d.ts +28 -14
  171. package/types/mintplayer-ng-bootstrap-machine.d.ts +101 -4
  172. package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
  173. package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -86
  174. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
  175. package/types/mintplayer-ng-bootstrap-nav.d.ts +3 -3
  176. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +21 -6
  177. package/types/mintplayer-ng-bootstrap-navbar.d.ts +15 -42
  178. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
  179. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +4 -3
  180. package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -35
  181. package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
  182. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +5 -6
  183. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +17 -16
  184. package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
  185. package/types/mintplayer-ng-bootstrap-popover.d.ts +35 -61
  186. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
  187. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +34 -19
  188. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
  189. package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
  190. package/types/mintplayer-ng-bootstrap-range.d.ts +35 -13
  191. package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
  192. package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
  193. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
  194. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
  195. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -51
  196. package/types/mintplayer-ng-bootstrap-select.d.ts +8 -7
  197. package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
  198. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +4 -6
  199. package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
  200. package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -19
  201. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
  202. package/types/mintplayer-ng-bootstrap-table.d.ts +21 -12
  203. package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
  204. package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
  205. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -7
  206. package/types/mintplayer-ng-bootstrap-toast.d.ts +92 -55
  207. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
  208. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
  209. package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
  210. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
  211. package/calendar-month/package.json +0 -4
  212. package/dropdown-divider/package.json +0 -4
  213. package/dropdown-menu/package.json +0 -4
  214. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
  215. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
  216. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -30
  217. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
  218. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -169
  219. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
  220. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
  221. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
  222. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
  223. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
  224. package/has-overlay/package.json +0 -4
  225. package/no-noscript/package.json +0 -4
  226. package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
  227. package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -9
  228. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
  229. package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
  230. package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-theming.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/theming/src/lib/service/bs-theme.service.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/lib/provide-bs-theme.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/theme-toggle.angular.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/generated/theme-toggle.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/generated/theme-toggle.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/theming/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/theming/mintplayer-ng-bootstrap-theming.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport {\n DestroyRef,\n inject,\n Injectable,\n PLATFORM_ID,\n REQUEST,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n getBsThemeStore,\n readDefaultModeMeta,\n resolveServerTheme,\n type BsEffectiveThemeMode,\n type BsThemeMode,\n} from '@mintplayer/ui-core/theming';\n\n/**\n * Angular's view of the document's Bootstrap colour mode (PRD dark-mode D4).\n *\n * - `mode` is the *authored* value (`'auto' | 'light' | 'dark' | custom`).\n * - `effectiveMode` is the value on `<html data-bs-theme>`: `'auto'` resolved\n * against `prefers-color-scheme`, everything else passed through.\n * - `setMode()` changes it. Both signals are read-only views.\n *\n * **This service is a pure mirror of the framework-neutral store.** In the\n * browser it holds no state of its own: `mode`/`effectiveMode` are refreshed\n * from `getBsThemeStore().subscribe()`, and `setMode()` forwards to the store's\n * `setMode()` (libs/mintplayer-ui-core/theming/src/store.ts), which owns\n * validation, the `bs-theme-mode` cookie, the `data-bs-theme` write, the\n * `prefers-color-scheme` listener and cross-tab sync. So a change made anywhere\n * else (`<bs-theme-toggle>`, another tab, the OS) reaches these signals, and a\n * copy here could never drift. Any behaviour added to the store's `setMode()`\n * must be reflected here, and vice versa; the mirror tests in\n * bs-theme.service.spec.ts pin it.\n *\n * **Server:** Angular SSR creates a root injector per request, which is the one\n * thing the store cannot do (it is a document singleton and never exists on a\n * server). The service resolves the request's `bs-theme-mode` cookie against the\n * page's `<meta name=\"bs-theme-default-mode\">` with `resolveServerTheme()`,\n * seeds the signals and, for an explicit mode, writes `data-bs-theme` on the\n * server `<html>` synchronously in the constructor, so the first byte of HTML is\n * already themed. Hydration never touches `<html>`, and the browser branch never\n * writes anything itself, so the server's attribute survives client boot.\n * `REQUEST` is `null` during prerender and route extraction: that is treated as\n * \"no cookie\", and the pre-boot script themes those pages on the client.\n *\n * Usage:\n * ```ts\n * const theme = inject(BsThemeService);\n * theme.setMode('dark'); // explicit\n * theme.setMode('auto'); // follow the OS\n * theme.setMode('sepia'); // custom variant: ship a matching [data-bs-theme=sepia] block\n * theme.mode(); // 'sepia'\n * theme.effectiveMode(); // 'sepia' (auto would resolve to 'light' | 'dark')\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class BsThemeService {\n private readonly platformId = inject(PLATFORM_ID);\n\n private readonly _mode = signal<BsThemeMode>('auto');\n private readonly _effectiveMode = signal<BsEffectiveThemeMode>('light');\n\n /** The mode the user picked. Use `setMode()` to change it. */\n readonly mode: Signal<BsThemeMode> = this._mode.asReadonly();\n\n /** The mode applied to `<html data-bs-theme>`. */\n readonly effectiveMode: Signal<BsEffectiveThemeMode> = this._effectiveMode.asReadonly();\n\n constructor() {\n // REQUEST, DOCUMENT and DestroyRef are injected INSIDE the platform checks,\n // never at field level: pulling them for every platform meant the SSR\n // injector resolved tokens whose destroy-time callbacks fire during\n // ApplicationRef teardown and surface as NG0953 (\"Unexpected emit for\n // destroyed OutputRef\") on the dev server.\n if (isPlatformServer(this.platformId)) {\n const request = inject(REQUEST);\n const document = inject(DOCUMENT);\n const resolved = resolveServerTheme(request?.headers.get('cookie') ?? null, {\n defaultMode: readDefaultModeMeta(document),\n });\n if (resolved !== null) {\n this._mode.set(resolved);\n this._effectiveMode.set(resolved);\n // resolveServerTheme only returns values that pass isValidThemeMode.\n document.documentElement.setAttribute('data-bs-theme', resolved);\n }\n return;\n }\n\n if (isPlatformBrowser(this.platformId)) {\n const destroyRef = inject(DestroyRef);\n const store = getBsThemeStore();\n const sync = () => {\n this._mode.set(store.getMode());\n this._effectiveMode.set(store.effectiveMode());\n };\n sync();\n destroyRef.onDestroy(store.subscribe(sync));\n }\n }\n\n /**\n * Set the user's mode. Forwards to the store's `setMode()`\n * (libs/mintplayer-ui-core/theming/src/store.ts): an invalid mode is a\n * no-op with a warning, a valid one is persisted to the cookie and applied to\n * `<html>`, and the signals update through the store subscription. Custom\n * variants need a matching `[data-bs-theme=\"<value>\"] { ... }` rule.\n * A no-op on the server, where a mode comes only from the request cookie.\n */\n setMode(mode: BsThemeMode): void {\n if (!isPlatformBrowser(this.platformId)) return;\n getBsThemeStore().setMode(mode);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n inject,\n makeEnvironmentProviders,\n PLATFORM_ID,\n provideEnvironmentInitializer,\n type EnvironmentProviders,\n} from '@angular/core';\nimport { configureBsTheme, type BsThemeConfig } from '@mintplayer/ui-core/theming';\nimport { BsThemeService } from './service/bs-theme.service';\n\n/**\n * Configure the document's theme store (PRD dark-mode D4). The only option is\n * `cookieDomain`, passed through verbatim as the `bs-theme-mode` cookie's\n * `Domain=`, so a theme picked on `www.example.com` also applies on\n * `app.example.com`. The store is configured in the browser only; on a server\n * there is no store to configure.\n *\n * It also constructs `BsThemeService` eagerly on every platform. That is what\n * makes SSR render `<html data-bs-theme>` from the request cookie: the service\n * does that in its constructor, and nothing else is guaranteed to inject it\n * (`<bs-theme-toggle>` talks to the store directly).\n *\n * `defaultMode` is deliberately not an option. It is declared once, in the HTML\n * (`<meta name=\"bs-theme-default-mode\" content=\"dark\">`), because the pre-boot\n * script has to read it before Angular loads.\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [provideBsTheme({ cookieDomain: '.example.com' })],\n * });\n * ```\n */\nexport function provideBsTheme(config: BsThemeConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n if (isPlatformBrowser(inject(PLATFORM_ID))) configureBsTheme(config);\n inject(BsThemeService);\n }),\n ]);\n}\n","import { inject } from '@angular/core';\nimport type { ThemeToggleInputs } from '@mintplayer/ui-core/theming';\nimport { BsThemeService } from './lib/service/bs-theme.service';\n\n/*\n * The Angular extension of the generated `bs-theme-toggle` (PRD #437 D10\n * escape hatch). It changes no input: it constructs `BsThemeService`, which the\n * toggle never calls. On the server that constructor is what renders\n * `<html data-bs-theme>` from the request cookie, so an app that renders only a\n * toggle still gets the theme in its SSR output.\n */\nexport function extendInputs(inputs: () => ThemeToggleInputs): () => ThemeToggleInputs {\n inject(BsThemeService);\n return inputs;\n}\n","// GENERATED from the theming manifest (theme-toggle) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { themeToggleCore, type ThemeToggleInputs, themeToggleScopedStyles } from '@mintplayer/ui-core/theming';\nimport { extendInputs as ext_extendInputs } from '../theme-toggle.angular';\n\n/**\n * A button that cycles the document colour mode through `modes` (dark-mode D7, #437).\n *\n * Its name is the next mode (the action), its description the current one. The mode lives in the\n * theme store, so a framework service or another tab re-renders it. A toggle cannot work without\n * JavaScript, so the button is disabled until it hydrates.\n */\n@Component({\n selector: 'bs-theme-toggle',\n templateUrl: './theme-toggle.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsThemeToggleComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly modes = input<ThemeToggleInputs['modes']>(null);\n\n readonly #core = useCore(themeToggleCore, { inputs: ext_extendInputs(() => ({ modes: this.modes() })), idPrefix: 'bs-theme-toggle', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'theme-toggle' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('theme-toggle', themeToggleScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/theming/src/templates/theme-toggle.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<button data-mps=\"theme-toggle\" [mpProps]=\"p_view.button\">\n <svg data-mps=\"theme-toggle\" [mpProps]=\"p_view.icon\">\n <path data-mps=\"theme-toggle\" [mpProps]=\"p_view.path\"></path>\n </svg>\n</button>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.description\">\n {{ p_view.descriptionText }}\n</span>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.live\">\n {{ p_view.liveText }}\n</span>\n","// GENERATED from the theming manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsThemeToggleComponent } from './theme-toggle.component.generated';\n","// The framework-neutral core, re-exported BY NAME so Angular consumers need one\n// import without inheriting store internals. Deliberately not re-exported:\n// getBsThemeStore / configureBsTheme (browser-only; use BsThemeService and\n// provideBsTheme, which are SSR-safe), writeThemeCookie (the store owns writes),\n// and __resetBsThemeStoreForTests.\nexport {\n BS_THEME_COOKIE_NAME,\n BS_THEME_DEFAULT_MODE_META,\n BS_THEME_DEFAULT_MODES,\n injectThemeAttribute,\n isValidThemeMode,\n readDefaultModeMeta,\n readThemeCookie,\n resolveMode,\n resolveServerTheme,\n} from '@mintplayer/ui-core/theming';\nexport type {\n BsEffectiveThemeMode,\n BsThemeConfig,\n BsThemeMode,\n BsThemeToggleMode,\n ResolveServerThemeOptions,\n} from '@mintplayer/ui-core/theming';\nexport * from './lib/service/bs-theme.service';\nexport * from './lib/provide-bs-theme';\nexport * from './generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs"],"mappings":";;;;;;;AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCG;MAEU,cAAc,CAAA;AAYzB,IAAA,WAAA,GAAA;AAXiB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAEhC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAc,MAAM;kFAAC;QACnC,IAAA,CAAA,cAAc,GAAG,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M,EAAA,QAAA,EAAA,klBAAA,EAAA;;;AEjBjD;;ACAA;AACA;AACA;AACA;AACA;;ACJA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-theming.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/theming/src/lib/service/bs-theme.service.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/lib/provide-bs-theme.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/theme-toggle.angular.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/generated/theme-toggle.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/generated/theme-toggle.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/theming/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/theming/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/theming/mintplayer-ng-bootstrap-theming.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser, isPlatformServer } from '@angular/common';\nimport {\n DestroyRef,\n inject,\n Injectable,\n PLATFORM_ID,\n REQUEST,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n getBsThemeStore,\n readDefaultModeMeta,\n resolveServerTheme,\n type BsEffectiveThemeMode,\n type BsThemeMode,\n} from '@mintplayer/ui-core/theming';\n\n/**\n * Angular's view of the document's Bootstrap colour mode (PRD dark-mode D4).\n *\n * - `mode` is the *authored* value (`'auto' | 'light' | 'dark' | custom`).\n * - `effectiveMode` is the value on `<html data-bs-theme>`: `'auto'` resolved\n * against `prefers-color-scheme`, everything else passed through.\n * - `setMode()` changes it. Both signals are read-only views.\n *\n * **This service is a pure mirror of the framework-neutral store.** In the\n * browser it holds no state of its own: `mode`/`effectiveMode` are refreshed\n * from `getBsThemeStore().subscribe()`, and `setMode()` forwards to the store's\n * `setMode()` (libs/mintplayer-ui-core/theming/src/store.ts), which owns\n * validation, the `bs-theme-mode` cookie, the `data-bs-theme` write, the\n * `prefers-color-scheme` listener and cross-tab sync. So a change made anywhere\n * else (`<bs-theme-toggle>`, another tab, the OS) reaches these signals, and a\n * copy here could never drift. Any behaviour added to the store's `setMode()`\n * must be reflected here, and vice versa; the mirror tests in\n * bs-theme.service.spec.ts pin it.\n *\n * **Server:** Angular SSR creates a root injector per request, which is the one\n * thing the store cannot do (it is a document singleton and never exists on a\n * server). The service resolves the request's `bs-theme-mode` cookie against the\n * page's `<meta name=\"bs-theme-default-mode\">` with `resolveServerTheme()`,\n * seeds the signals and, for an explicit mode, writes `data-bs-theme` on the\n * server `<html>` synchronously in the constructor, so the first byte of HTML is\n * already themed. Hydration never touches `<html>`, and the browser branch never\n * writes anything itself, so the server's attribute survives client boot.\n * `REQUEST` is `null` during prerender and route extraction: that is treated as\n * \"no cookie\", and the pre-boot script themes those pages on the client.\n *\n * Usage:\n * ```ts\n * const theme = inject(BsThemeService);\n * theme.setMode('dark'); // explicit\n * theme.setMode('auto'); // follow the OS\n * theme.setMode('sepia'); // custom variant: ship a matching [data-bs-theme=sepia] block\n * theme.mode(); // 'sepia'\n * theme.effectiveMode(); // 'sepia' (auto would resolve to 'light' | 'dark')\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class BsThemeService {\n private readonly platformId = inject(PLATFORM_ID);\n\n private readonly _mode = signal<BsThemeMode>('auto');\n private readonly _effectiveMode = signal<BsEffectiveThemeMode>('light');\n\n /** The mode the user picked. Use `setMode()` to change it. */\n readonly mode: Signal<BsThemeMode> = this._mode.asReadonly();\n\n /** The mode applied to `<html data-bs-theme>`. */\n readonly effectiveMode: Signal<BsEffectiveThemeMode> = this._effectiveMode.asReadonly();\n\n constructor() {\n // REQUEST, DOCUMENT and DestroyRef are injected INSIDE the platform checks,\n // never at field level: pulling them for every platform meant the SSR\n // injector resolved tokens whose destroy-time callbacks fire during\n // ApplicationRef teardown and surface as NG0953 (\"Unexpected emit for\n // destroyed OutputRef\") on the dev server.\n if (isPlatformServer(this.platformId)) {\n const request = inject(REQUEST);\n const document = inject(DOCUMENT);\n const resolved = resolveServerTheme(request?.headers.get('cookie') ?? null, {\n defaultMode: readDefaultModeMeta(document),\n });\n if (resolved !== null) {\n this._mode.set(resolved);\n this._effectiveMode.set(resolved);\n // resolveServerTheme only returns values that pass isValidThemeMode.\n document.documentElement.setAttribute('data-bs-theme', resolved);\n }\n return;\n }\n\n if (isPlatformBrowser(this.platformId)) {\n const destroyRef = inject(DestroyRef);\n const store = getBsThemeStore();\n const sync = () => {\n this._mode.set(store.getMode());\n this._effectiveMode.set(store.effectiveMode());\n };\n sync();\n destroyRef.onDestroy(store.subscribe(sync));\n }\n }\n\n /**\n * Set the user's mode. Forwards to the store's `setMode()`\n * (libs/mintplayer-ui-core/theming/src/store.ts): an invalid mode is a\n * no-op with a warning, a valid one is persisted to the cookie and applied to\n * `<html>`, and the signals update through the store subscription. Custom\n * variants need a matching `[data-bs-theme=\"<value>\"] { ... }` rule.\n * A no-op on the server, where a mode comes only from the request cookie.\n */\n setMode(mode: BsThemeMode): void {\n if (!isPlatformBrowser(this.platformId)) return;\n getBsThemeStore().setMode(mode);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n inject,\n makeEnvironmentProviders,\n PLATFORM_ID,\n provideEnvironmentInitializer,\n type EnvironmentProviders,\n} from '@angular/core';\nimport { configureBsTheme, type BsThemeConfig } from '@mintplayer/ui-core/theming';\nimport { BsThemeService } from './service/bs-theme.service';\n\n/**\n * Configure the document's theme store (PRD dark-mode D4). The only option is\n * `cookieDomain`, passed through verbatim as the `bs-theme-mode` cookie's\n * `Domain=`, so a theme picked on `www.example.com` also applies on\n * `app.example.com`. The store is configured in the browser only; on a server\n * there is no store to configure.\n *\n * It also constructs `BsThemeService` eagerly on every platform. That is what\n * makes SSR render `<html data-bs-theme>` from the request cookie: the service\n * does that in its constructor, and nothing else is guaranteed to inject it\n * (`<bs-theme-toggle>` talks to the store directly).\n *\n * `defaultMode` is deliberately not an option. It is declared once, in the HTML\n * (`<meta name=\"bs-theme-default-mode\" content=\"dark\">`), because the pre-boot\n * script has to read it before Angular loads.\n *\n * ```ts\n * bootstrapApplication(App, {\n * providers: [provideBsTheme({ cookieDomain: '.example.com' })],\n * });\n * ```\n */\nexport function provideBsTheme(config: BsThemeConfig = {}): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideEnvironmentInitializer(() => {\n if (isPlatformBrowser(inject(PLATFORM_ID))) configureBsTheme(config);\n inject(BsThemeService);\n }),\n ]);\n}\n","import { inject } from '@angular/core';\nimport type { ThemeToggleInputs } from '@mintplayer/ui-core/theming';\nimport { BsThemeService } from './lib/service/bs-theme.service';\n\n/*\n * The Angular extension of the generated `bs-theme-toggle` (PRD #437 D10\n * escape hatch). It changes no input: it constructs `BsThemeService`, which the\n * toggle never calls. On the server that constructor is what renders\n * `<html data-bs-theme>` from the request cookie, so an app that renders only a\n * toggle still gets the theme in its SSR output.\n */\nexport function extendInputs(inputs: () => ThemeToggleInputs): () => ThemeToggleInputs {\n inject(BsThemeService);\n return inputs;\n}\n","// GENERATED from the theming manifest (theme-toggle) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, ElementRef, inject, input } from '@angular/core';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { themeToggleCore, type ThemeToggleInputs, themeToggleScopedStyles } from '@mintplayer/ui-core/theming';\nimport { extendInputs as ext_extendInputs } from '../theme-toggle.angular';\n\n/**\n * A button that cycles the document colour mode through `modes` (dark-mode D7, #437).\n *\n * Its name is the next mode (the action), its description the current one. The mode lives in the\n * theme store, so a framework service or another tab re-renders it. A toggle cannot work without\n * JavaScript, so the button is disabled until it hydrates.\n */\n@Component({\n selector: 'bs-theme-toggle',\n templateUrl: './theme-toggle.view.generated.html',\n imports: [MpPropsDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsThemeToggleComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly modes = input<ThemeToggleInputs['modes']>(null);\n\n readonly #core = useCore(themeToggleCore, { inputs: ext_extendInputs(() => ({ modes: this.modes() })), idPrefix: 'bs-theme-toggle', hostBag: (props) => ({ ...props.view.root, 'data-mps': 'theme-toggle' }) });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('theme-toggle', themeToggleScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/theming/src/templates/theme-toggle.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<button data-mps=\"theme-toggle\" [mpProps]=\"p_view.button\">\n <svg data-mps=\"theme-toggle\" [mpProps]=\"p_view.icon\">\n <path data-mps=\"theme-toggle\" [mpProps]=\"p_view.path\"></path>\n </svg>\n</button>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.description\">\n {{ p_view.descriptionText }}\n</span>\n<span data-mps=\"theme-toggle\" [mpProps]=\"p_view.live\">\n {{ p_view.liveText }}\n</span>\n","// GENERATED from the theming manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsThemeToggleComponent } from './theme-toggle.component.generated';\n","// The framework-neutral core, re-exported BY NAME so Angular consumers need one\n// import without inheriting store internals. Deliberately not re-exported:\n// getBsThemeStore / configureBsTheme (browser-only; use BsThemeService and\n// provideBsTheme, which are SSR-safe), writeThemeCookie (the store owns writes),\n// and __resetBsThemeStoreForTests.\nexport {\n BS_THEME_COOKIE_NAME,\n BS_THEME_DEFAULT_MODE_META,\n BS_THEME_DEFAULT_MODES,\n injectThemeAttribute,\n isValidThemeMode,\n readDefaultModeMeta,\n readThemeCookie,\n resolveMode,\n resolveServerTheme,\n} from '@mintplayer/ui-core/theming';\nexport type {\n BsEffectiveThemeMode,\n BsThemeConfig,\n BsThemeMode,\n BsThemeToggleMode,\n ResolveServerThemeOptions,\n} from '@mintplayer/ui-core/theming';\nexport * from './lib/service/bs-theme.service';\nexport * from './lib/provide-bs-theme';\nexport * from './generated';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names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,MAAA,EAAA,CAAA,SAAA,EAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGf,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBANlC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,WAElB,CAAC,gBAAgB,CAAC,EAAA,eAAA,EACV,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,klBAAA,EAAA;;;AEjBjD;;ACAA;AACA;AACA;AACA;AACA;;ACJA;;AAEG;;;;"}
@@ -1,362 +1,123 @@
1
- import { isPlatformServer, DOCUMENT, NgTemplateOutlet } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { Injector, inject, TemplateRef, input, Directive, DestroyRef, contentChild, computed, model, output, linkedSignal, viewChild, ElementRef, effect, untracked, PLATFORM_ID, afterNextRender, ChangeDetectionStrategy, Component, HostAttributeToken } from '@angular/core';
4
- import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
5
- import { machineSignal, useScopedStyles, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
6
- import { writeScopedStyleTag } from '@mintplayer/ui-core/scoped-styles';
7
- import { DEFAULT_MIN_COLUMN_WIDTH, DEFAULT_GAP, TileManagerMachine, connect, TileFlip, TILE_MANAGER_SCOPE, tileManagerScopedStyles, breakpointCss, gridPointer, readCellMetrics } from '@mintplayer/ui-core/tile-manager';
2
+ import { inject, TemplateRef, Directive, ElementRef, input, model, numberAttribute, booleanAttribute, output, contentChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { NgTemplateOutlet } from '@angular/common';
4
+ import { useCore, useScopedStyles, MpInstanceStyleDirective, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
5
+ import { tileManagerCore, tileManagerScopedStyles } from '@mintplayer/ui-core/tile-manager';
8
6
  export { withoutNarrowerLayouts } from '@mintplayer/ui-core/tile-manager';
9
7
 
10
- /**
11
- * One tile's slots. The manager stamps the `*bsTile` template once per tile with an injector
12
- * providing that tile's `BsTileSlots`; `*bsTileHeader` / `*bsTileContent` inside it register
13
- * their template here, and the manager renders them into the tile's header and body. Kept per
14
- * tile id, so a new tile object (a locked panel, say) updates the view instead of rebuilding it.
15
- */
16
- class BsTileSlots {
17
- constructor(parent) {
18
- this.header = null;
19
- this.content = null;
20
- this.injector = Injector.create({ providers: [{ provide: BsTileSlots, useValue: this }], parent });
21
- }
22
- }
23
- /**
24
- * Declares the markup of every tile, once, inside `<bs-tile-manager>`. The header and body are
25
- * its direct `*bsTileHeader` / `*bsTileContent` children, and both see the tile variable.
26
- *
27
- * ```html
28
- * <bs-tile-manager [(layouts)]="layouts">
29
- * <ng-container *bsTile="let tile of tiles()">
30
- * <span *bsTileHeader>{{ tile.title }}</span>
31
- * <div *bsTileContent>{{ tile.body }}</div>
32
- * </ng-container>
33
- * </bs-tile-manager>
34
- * ```
35
- *
36
- * `of` is the manager's tile list, like `ngFor`'s: the manager reads it from here.
37
- */
38
- class BsTileDirective {
8
+ // GENERATED from the tile-manager manifest (tile-manager) by @mintplayer/nx-component-compiler. Do not edit.
9
+ /** The `header` slot of `<bs-tile-manager>`: `<ng-template bsTileManagerHeader>` or `*bsTileManagerHeader`. */
10
+ class BsTileManagerHeaderDirective {
39
11
  constructor() {
40
12
  this.templateRef = inject(TemplateRef);
41
- /** The visible tiles, in DOM order. */
42
- this.bsTileOf = input(undefined, /* @ts-ignore */
43
- ...(ngDevMode ? [{ debugName: "bsTileOf" }] : /* istanbul ignore next */ []));
44
13
  }
45
14
  static ngTemplateContextGuard(_dir, ctx) {
46
15
  return true;
47
16
  }
48
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
49
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.8", type: BsTileDirective, isStandalone: true, selector: "[bsTile]", inputs: { bsTileOf: { classPropertyName: "bsTileOf", publicName: "bsTileOf", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTileManagerHeaderDirective, isStandalone: true, selector: "[bsTileManagerHeader]", ngImport: i0 }); }
50
19
  }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileDirective, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerHeaderDirective, decorators: [{
52
21
  type: Directive,
53
- args: [{ selector: '[bsTile]' }]
54
- }], propDecorators: { bsTileOf: [{ type: i0.Input, args: [{ isSignal: true, alias: "bsTileOf", required: false }] }] } });
55
- /** A tile's header: the drag handle in `dragMode="header"`. Only valid inside `*bsTile`. */
56
- class BsTileHeaderDirective {
22
+ args: [{ selector: '[bsTileManagerHeader]' }]
23
+ }] });
24
+ /** The `content` slot of `<bs-tile-manager>`: `<ng-template bsTileManagerContent>` or `*bsTileManagerContent`. */
25
+ class BsTileManagerContentDirective {
57
26
  constructor() {
58
- register('header');
27
+ this.templateRef = inject(TemplateRef);
59
28
  }
60
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
61
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTileHeaderDirective, isStandalone: true, selector: "[bsTileHeader]", ngImport: i0 }); }
62
- }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileHeaderDirective, decorators: [{
64
- type: Directive,
65
- args: [{ selector: '[bsTileHeader]' }]
66
- }], ctorParameters: () => [] });
67
- /** A tile's body. Only valid inside `*bsTile`. */
68
- class BsTileContentDirective {
69
- constructor() {
70
- register('content');
29
+ static ngTemplateContextGuard(_dir, ctx) {
30
+ return true;
71
31
  }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
73
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTileContentDirective, isStandalone: true, selector: "[bsTileContent]", ngImport: i0 }); }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
33
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTileManagerContentDirective, isStandalone: true, selector: "[bsTileManagerContent]", ngImport: i0 }); }
74
34
  }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileContentDirective, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerContentDirective, decorators: [{
76
36
  type: Directive,
77
- args: [{ selector: '[bsTileContent]' }]
78
- }], ctorParameters: () => [] });
79
- function register(slot) {
80
- const slots = inject(BsTileSlots);
81
- const template = inject(TemplateRef);
82
- slots[slot] = template;
83
- inject(DestroyRef).onDestroy(() => {
84
- if (slots[slot] === template)
85
- slots[slot] = null;
86
- });
87
- }
88
-
37
+ args: [{ selector: '[bsTileManagerContent]' }]
38
+ }] });
89
39
  /**
90
- * Tile manager: a dashboard grid whose tiles the user moves and resizes, with one layout per
91
- * column count (#440).
40
+ * A dashboard of tiles that reflow with the board width (#440): one layout per column count,
41
+ * drag to move, grips to resize, and the keyboard for both (M to move, R to resize, arrows, Enter
42
+ * or Escape). `layouts` is two-way: a commit writes the full next record. The `header` and
43
+ * `content` slots render each tile; they receive the tile.
92
44
  *
93
- * The Angular front of `TileManagerMachine` (`@mintplayer/ui-core/tile-manager`). Every decision
94
- * (layout per column count, gestures, keyboard, ARIA) is the machine's; this component renders
95
- * its own template from `connect()`'s bags with `[mpProps]`, measures the grid, owns pointer
96
- * capture and the FLIP animation, and turns the machine's events into outputs. Tile header and
97
- * body come from the `*bsTileHeader` / `*bsTileContent` templates inside one `*bsTile` block.
98
- *
99
- * SSR: the whole tree is rendered, plus a `<style>` in `<head>` holding the `@container` rules
100
- * that place every tile at every column count (D14), so the server HTML paints the right layout
101
- * with no JS. No-JS tier 2: before the first measure the tiles are named groups with no tab stop
102
- * or grips.
45
+ * The server-rendered page places every tile at every width through container queries, with
46
+ * JavaScript off; editing starts once the board has measured itself.
103
47
  */
104
48
  class BsTileManagerComponent {
49
+ #core;
105
50
  constructor() {
106
- /** The `*bsTile` block: the tile markup, and through its `of` the tiles themselves. */
107
- this.tileTemplate = contentChild(BsTileDirective, /* @ts-ignore */
108
- ...(ngDevMode ? [{ debugName: "tileTemplate" }] : /* istanbul ignore next */ []));
109
- /**
110
- * The visible tiles, in DOM order: `*bsTile="let tile of tiles()"`. Read from the directive
111
- * rather than pushed by it: its input is not set yet when its constructor runs, and a signal
112
- * write while the view renders is NG0600.
113
- */
114
- this.tiles = computed(() => this.tileTemplate()?.bsTileOf() ?? [], /* @ts-ignore */
51
+ /** The host element. */
52
+ this.elementRef = inject(ElementRef);
53
+ this.tiles = input([], /* @ts-ignore */
115
54
  ...(ngDevMode ? [{ debugName: "tiles" }] : /* istanbul ignore next */ []));
116
- /** One layout per column count. Two-way: a commit writes the full next record. */
117
55
  this.layouts = model({}, /* @ts-ignore */
118
56
  ...(ngDevMode ? [{ debugName: "layouts" }] : /* istanbul ignore next */ []));
119
- /** Explicit `{ minWidth, columns }` map. Wins over `stackBelow` and the generated map. */
120
57
  this.breakpoints = input(null, /* @ts-ignore */
121
58
  ...(ngDevMode ? [{ debugName: "breakpoints" }] : /* istanbul ignore next */ []));
122
- /** px. Below this width the tiles stack in one column. */
123
- this.stackBelow = input(null, /* @ts-ignore */
124
- ...(ngDevMode ? [{ debugName: "stackBelow" }] : /* istanbul ignore next */ []));
125
- /** Upper bound of the generated map when `layouts` is empty. */
126
- this.maxColumns = input(6, /* @ts-ignore */
127
- ...(ngDevMode ? [{ debugName: "maxColumns" }] : /* istanbul ignore next */ []));
128
- /** px. No column is narrower than this, except at one column. */
129
- this.minColumnWidth = input(DEFAULT_MIN_COLUMN_WIDTH, /* @ts-ignore */
130
- ...(ngDevMode ? [{ debugName: "minColumnWidth" }] : /* istanbul ignore next */ []));
131
- /** CSS length of one grid row. */
59
+ this.stackBelow = input(null, { ...(ngDevMode ? { debugName: "stackBelow" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? null : numberAttribute(v)) });
60
+ this.maxColumns = input(6, { ...(ngDevMode ? { debugName: "maxColumns" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 6 : numberAttribute(v)) });
61
+ this.minColumnWidth = input(200, { ...(ngDevMode ? { debugName: "minColumnWidth" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 200 : numberAttribute(v)) });
132
62
  this.minRowHeight = input('8rem', /* @ts-ignore */
133
63
  ...(ngDevMode ? [{ debugName: "minRowHeight" }] : /* istanbul ignore next */ []));
134
- /** px between tiles. */
135
- this.gap = input(DEFAULT_GAP, /* @ts-ignore */
136
- ...(ngDevMode ? [{ debugName: "gap" }] : /* istanbul ignore next */ []));
64
+ this.gap = input(8, { ...(ngDevMode ? { debugName: "gap" } : /* istanbul ignore next */ {}), transform: (v) => (v == null || v === '' ? 8 : numberAttribute(v)) });
137
65
  this.dragMode = input('header', /* @ts-ignore */
138
66
  ...(ngDevMode ? [{ debugName: "dragMode" }] : /* istanbul ignore next */ []));
139
67
  this.resizeMode = input('hover', /* @ts-ignore */
140
68
  ...(ngDevMode ? [{ debugName: "resizeMode" }] : /* istanbul ignore next */ []));
141
- /** Animate tiles to their new place when the layout reflows. Off under reduced motion. */
142
- this.animateReflow = input(true, /* @ts-ignore */
143
- ...(ngDevMode ? [{ debugName: "animateReflow" }] : /* istanbul ignore next */ []));
144
- /** Accessible name of the board. A host `aria-label` / `aria-labelledby` wins. */
69
+ this.animateReflow = input(true, { ...(ngDevMode ? { debugName: "animateReflow" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
145
70
  this.label = input(null, /* @ts-ignore */
146
71
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
147
- /** Localized strings for the board's descriptions and announcements. */
148
72
  this.messages = input({}, /* @ts-ignore */
149
73
  ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
150
74
  /** Each step of a gesture or keyboard move: the layout as it would be committed. */
151
75
  this.layoutPreview = output();
152
- /** A commit, with the full layouts record and the stale narrower counts (D15). */
76
+ /** A commit: the full layouts record and the stale narrower counts. */
153
77
  this.layoutChange = output();
78
+ /** The resolved column count changed. */
154
79
  this.columnCountChange = output();
80
+ /** A move or resize was refused (no room, or the tile is locked). */
155
81
  this.gestureBlocked = output();
156
- this.id = inject(BsIdService).next('bs-tile-manager');
157
- this.machine = new TileManagerMachine({ vibrate: (ms) => navigator.vibrate?.(ms) });
158
- this.state = machineSignal(this.machine);
159
- /** Host transparency: a consumer's aria-* on `<bs-tile-manager>` lands on the region. */
160
- this.hostAria = takeHostAria();
161
- this.api = computed(() => {
162
- this.state();
163
- const api = connect(this.machine, this.id);
164
- const describedBy = [api.board.attrs['aria-describedby'], this.hostAria['aria-describedby']].filter(Boolean).join(' ') || null;
165
- return { ...api, board: { ...api.board, attrs: { ...api.board.attrs, ...this.hostAria, 'aria-describedby': describedBy } } };
166
- }, /* @ts-ignore */
167
- ...(ngDevMode ? [{ debugName: "api" }] : /* istanbul ignore next */ []));
168
- /** The `*bsTile` context per tile id, stable across change detection. */
169
- this.tileContext = computed(() => new Map(this.tiles().map((t) => [t.id, { $implicit: t }])), /* @ts-ignore */
170
- ...(ngDevMode ? [{ debugName: "tileContext" }] : /* istanbul ignore next */ []));
171
- /** Slots per tile id, kept while the id stays so the tile's view is reused, not rebuilt. */
172
- this.tileSlots = linkedSignal({ ...(ngDevMode ? { debugName: "tileSlots" } : /* istanbul ignore next */ {}), source: this.tiles,
173
- computation: (tiles, previous) => new Map(tiles.map((t) => [t.id, previous?.value.get(t.id) ?? new BsTileSlots(this.injector)])) });
174
- // Not `.required`: the machine notifies (onChange) while effects configure it, before the view exists.
175
- this.grid = viewChild('grid', /* @ts-ignore */
176
- ...(ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []));
177
- this.host = inject(ElementRef).nativeElement;
178
- this.injector = inject(Injector);
179
- this.flip = new TileFlip();
180
- this.lastRendered = null;
181
- this.focusSeq = 0;
182
- this.resizeObserver = null;
183
- this.measureFrame = 0;
184
- this.width = 0;
185
- useScopedStyles(TILE_MANAGER_SCOPE, tileManagerScopedStyles);
186
- // Inputs → machine. One effect per input, so an unrelated input change never re-pushes a
187
- // stale controlled `layouts` over the layout the machine just committed (S3).
188
- const forward = (key, read) => effect(() => {
189
- const value = read();
190
- untracked(() => this.machine.setInputs({ [key]: value }));
191
- });
192
- forward('tiles', this.tiles);
193
- forward('breakpoints', this.breakpoints);
194
- forward('stackBelow', this.stackBelow);
195
- forward('maxColumns', this.maxColumns);
196
- forward('minColumnWidth', this.minColumnWidth);
197
- forward('minRowHeight', this.minRowHeight);
198
- forward('gap', this.gap);
199
- forward('dragMode', this.dragMode);
200
- forward('resizeMode', this.resizeMode);
201
- forward('label', this.label);
202
- forward('messages', this.messages);
203
- // A consumer write to [(layouts)], not the echo of our own commit.
204
- effect(() => {
205
- const layouts = this.layouts();
206
- if (layouts !== untracked(() => this.machine.snapshot.layouts))
207
- untracked(() => this.machine.setInputs({ layouts }));
208
- });
209
- const offEvents = this.machine.onEvent((e) => {
210
- switch (e.type) {
211
- case 'layoutchange': {
212
- const { type: _, ...change } = e;
213
- this.layouts.set(change.layouts);
214
- this.layoutChange.emit(change);
215
- break;
216
- }
217
- case 'layoutpreview': {
218
- const { type: _, ...change } = e;
219
- this.layoutPreview.emit(change);
220
- break;
221
- }
222
- case 'columncountchange':
223
- this.columnCountChange.emit({ columnCount: e.columnCount, previous: e.previous });
224
- break;
225
- case 'gestureblocked': {
226
- const { type: _, ...blocked } = e;
227
- this.gestureBlocked.emit(blocked);
228
- break;
229
- }
230
- }
231
- });
232
- if (isPlatformServer(inject(PLATFORM_ID))) {
233
- // D14: Angular strips <style> from templates, so the container rules go into <head>.
234
- const doc = inject(DOCUMENT);
235
- effect(() => {
236
- const css = breakpointCss(this.layouts(), this.tiles(), { breakpoints: this.breakpoints(), stackBelow: this.stackBelow(), minColumnWidth: this.minColumnWidth(), gap: this.gap(), maxColumns: this.maxColumns(), layouts: this.layouts() }, this.id);
237
- writeScopedStyleTag(doc, `${TILE_MANAGER_SCOPE}-layout-${this.id}`, css);
238
- });
239
- }
240
- // FLIP "first" runs in the store notification, before change detection writes the new positions.
241
- const unsubscribe = this.machine.subscribe(() => this.onChange());
242
- const onVisibilityChange = () => {
243
- if (document.visibilityState === 'hidden')
244
- this.machine.cancelGesture();
245
- };
246
- afterNextRender(() => {
247
- document.addEventListener('visibilitychange', onVisibilityChange);
248
- this.observe();
249
- });
250
- inject(DestroyRef).onDestroy(() => {
251
- unsubscribe();
252
- offEvents();
253
- this.resizeObserver?.disconnect();
254
- if (typeof cancelAnimationFrame === 'function')
255
- cancelAnimationFrame(this.measureFrame);
256
- if (typeof document !== 'undefined')
257
- document.removeEventListener('visibilitychange', onVisibilityChange);
258
- this.machine.destroy();
259
- });
82
+ this.headerSlot = contentChild(BsTileManagerHeaderDirective, /* @ts-ignore */
83
+ ...(ngDevMode ? [{ debugName: "headerSlot" }] : /* istanbul ignore next */ []));
84
+ this.contentSlot = contentChild(BsTileManagerContentDirective, /* @ts-ignore */
85
+ ...(ngDevMode ? [{ debugName: "contentSlot" }] : /* istanbul ignore next */ []));
86
+ /** The template's named slots. */
87
+ this.slots = computed(() => ({ header: this.headerSlot()?.templateRef, content: this.contentSlot()?.templateRef }), /* @ts-ignore */
88
+ ...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
89
+ this.#core = useCore(tileManagerCore, { inputs: () => ({ tiles: this.tiles(), layouts: this.layouts(), breakpoints: this.breakpoints(), stackBelow: this.stackBelow(), maxColumns: this.maxColumns(), minColumnWidth: this.minColumnWidth(), minRowHeight: this.minRowHeight(), gap: this.gap(), dragMode: this.dragMode(), resizeMode: this.resizeMode(), animateReflow: this.animateReflow(), label: this.label(), messages: this.messages() }), idPrefix: 'bs-tile-manager', outputs: { layoutPreview: this.layoutPreview, layoutChange: this.layoutChange, columnCountChange: this.columnCountChange, gestureBlocked: this.gestureBlocked }, hostBag: (props) => ({ ...props.view.board, 'data-mps': 'tile-manager' }), models: { layouts: this.layouts } });
90
+ /** The template's props. */
91
+ this.props = this.#core.props;
92
+ useScopedStyles('tile-manager', tileManagerScopedStyles);
260
93
  }
261
- /** What is rendered: the resolved column count and its layout (the preview while editing). */
262
- captureLayout() {
263
- return { columnCount: this.machine.snapshot.columnCount, layout: this.machine.rendered.map((p) => ({ id: p.id, position: { ...p.position } })) };
94
+ /** The rendered column count and its layout (the preview while editing). */
95
+ captureLayout(...args) {
96
+ return this.#core.call('captureLayout', args);
264
97
  }
265
- /** Drops `layouts[count]` and commits, so that count derives again (D15). */
266
- resetLayout(count) {
267
- this.machine.resetLayout(count);
98
+ /** Drop the stored layout of a column count, so it derives again. */
99
+ resetLayout(...args) {
100
+ return this.#core.call('resetLayout', args);
268
101
  }
269
102
  /** True while a pointer drag or resize is in flight. */
270
- get isGestureActive() {
271
- const kind = this.machine.snapshot.gesture.kind;
272
- return kind === 'drag' || kind === 'resize';
273
- }
274
- // ---- template handlers --------------------------------------------------
275
- down(e, id, part) {
276
- const grid = this.grid()?.nativeElement;
277
- if (!grid)
278
- return;
279
- const verdict = this.machine.pointerDown(id, part, gridPointer(e, grid), readCellMetrics(grid, this.machine.snapshot.columnCount));
280
- if (verdict === 'capture') {
281
- e.preventDefault();
282
- e.currentTarget.closest('[data-tile-id]')?.setPointerCapture(e.pointerId);
283
- }
284
- }
285
- move(e) {
286
- const grid = this.grid()?.nativeElement;
287
- if (grid && this.machine.pointerMove(gridPointer(e, grid)) === 'capture')
288
- e.currentTarget.setPointerCapture(e.pointerId);
289
- }
290
- key(e, id) {
291
- if (this.machine.keydown(id, e.key, { shift: e.shiftKey }))
292
- e.preventDefault();
293
- }
294
- // ---- internals ----------------------------------------------------------
295
- // One observer on the grid; `measure` runs in the next frame, never inside the callback (S2).
296
- observe() {
297
- const grid = this.grid()?.nativeElement;
298
- if (!grid || this.resizeObserver || typeof ResizeObserver === 'undefined')
299
- return;
300
- this.resizeObserver = new ResizeObserver((entries) => {
301
- const entry = entries[entries.length - 1];
302
- this.width = entry.contentBoxSize?.[0]?.inlineSize ?? entry.contentRect.width;
303
- if (this.measureFrame)
304
- return;
305
- this.measureFrame = requestAnimationFrame(() => {
306
- this.measureFrame = 0;
307
- this.machine.measure(this.width);
308
- });
309
- });
310
- this.resizeObserver.observe(grid);
311
- }
312
- onChange() {
313
- const s = this.machine.snapshot;
314
- const rendered = this.machine.rendered;
315
- const grid = this.grid()?.nativeElement;
316
- const reflow = rendered !== this.lastRendered && !!grid && untracked(this.animateReflow) && s.measured;
317
- this.lastRendered = rendered;
318
- if (reflow && grid)
319
- this.flip.first(grid);
320
- const wantsFocus = !!s.focusRequest && s.focusRequest.seq !== this.focusSeq;
321
- if (!reflow && !wantsFocus)
322
- return;
323
- afterNextRender(() => {
324
- const now = this.machine.snapshot;
325
- if (reflow && grid)
326
- this.flip.play(grid, now.gesture.kind === 'drag' ? now.gesture.tileId : null);
327
- if (now.focusRequest && now.focusRequest.seq !== this.focusSeq) {
328
- this.focusSeq = now.focusRequest.seq;
329
- const tileId = now.focusRequest.tileId;
330
- Array.from(this.host.querySelectorAll('[data-tile-id]')).find((el) => el.dataset['tileId'] === tileId)?.focus();
331
- }
332
- }, { injector: this.injector });
103
+ isGestureActive(...args) {
104
+ return this.#core.call('isGestureActive', args);
333
105
  }
334
106
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
335
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTileManagerComponent, isStandalone: true, selector: "bs-tile-manager", inputs: { layouts: { classPropertyName: "layouts", publicName: "layouts", isSignal: true, isRequired: false, transformFunction: null }, breakpoints: { classPropertyName: "breakpoints", publicName: "breakpoints", isSignal: true, isRequired: false, transformFunction: null }, stackBelow: { classPropertyName: "stackBelow", publicName: "stackBelow", isSignal: true, isRequired: false, transformFunction: null }, maxColumns: { classPropertyName: "maxColumns", publicName: "maxColumns", isSignal: true, isRequired: false, transformFunction: null }, minColumnWidth: { classPropertyName: "minColumnWidth", publicName: "minColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, minRowHeight: { classPropertyName: "minRowHeight", publicName: "minRowHeight", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, dragMode: { classPropertyName: "dragMode", publicName: "dragMode", isSignal: true, isRequired: false, transformFunction: null }, resizeMode: { classPropertyName: "resizeMode", publicName: "resizeMode", isSignal: true, isRequired: false, transformFunction: null }, animateReflow: { classPropertyName: "animateReflow", publicName: "animateReflow", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layouts: "layoutsChange", layoutPreview: "layoutPreview", layoutChange: "layoutChange", columnCountChange: "columnCountChange", gestureBlocked: "gestureBlocked" }, host: { classAttribute: "d-block" }, queries: [{ propertyName: "tileTemplate", first: true, predicate: BsTileDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "grid", first: true, predicate: ["grid"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"mp-tile-manager\" [mpProps]=\"api().board.attrs\" [style]=\"api().board.style\">\n <div class=\"tile-container\" [mpProps]=\"api().container\">\n <div #grid class=\"tile-grid\" [mpProps]=\"api().grid.attrs\" [style]=\"api().grid.style\">\n <!-- A press on the header or a grip bubbles to the tile's body handler; the machine\n ignores that second pointerdown for the same pointer, so the innermost part decides. -->\n @for (t of api().tiles; track t.id) {\n @let slots = tileSlots().get(t.id);\n <div class=\"tile\" [mpProps]=\"t.attrs\" [style]=\"t.style\"\n (pointerdown)=\"down($event, t.id, 'body')\"\n (pointermove)=\"move($event)\"\n (pointerup)=\"machine.pointerUp($event)\"\n (pointercancel)=\"machine.pointerCancel($event)\"\n (lostpointercapture)=\"machine.pointerCancel($event)\"\n (keydown)=\"key($event, t.id)\"\n (focus)=\"machine.focus(t.id)\"\n (blur)=\"machine.blur(t.id)\">\n <!-- Stamps the consumer's *bsTile block first: its *bsTileHeader / *bsTileContent\n register into this tile's slots before the outlets below read them. Not inside an\n @if: an @if body refreshes after this view's own bindings, so the reads would run\n first and the server would render empty headers. -->\n <ng-container [ngTemplateOutlet]=\"tileTemplate()?.templateRef ?? null\" [ngTemplateOutletContext]=\"tileContext().get(t.id)\" [ngTemplateOutletInjector]=\"slots?.injector\"></ng-container>\n <div class=\"tile-header\" [mpProps]=\"t.header\" (pointerdown)=\"down($event, t.id, 'header')\">\n @if (slots?.header; as header) {\n <ng-container [ngTemplateOutlet]=\"header\"></ng-container>\n }\n </div>\n <div class=\"tile-content\" [mpProps]=\"t.content\">\n @if (slots?.content; as content) {\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n }\n </div>\n @for (g of t.grips; track g.handle) {\n <span class=\"tile-grip\" [mpProps]=\"g.attrs\" (pointerdown)=\"down($event, t.id, g.handle)\"></span>\n }\n </div>\n }\n </div>\n </div>\n @for (n of api().descriptions; track n.key) {\n <div class=\"tile-sr-only\" [mpProps]=\"n.attrs\">{{ n.text }}</div>\n }\n <span class=\"tile-sr-only\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n</div>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
107
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTileManagerComponent, isStandalone: true, selector: "bs-tile-manager", inputs: { tiles: { classPropertyName: "tiles", publicName: "tiles", isSignal: true, isRequired: false, transformFunction: null }, layouts: { classPropertyName: "layouts", publicName: "layouts", isSignal: true, isRequired: false, transformFunction: null }, breakpoints: { classPropertyName: "breakpoints", publicName: "breakpoints", isSignal: true, isRequired: false, transformFunction: null }, stackBelow: { classPropertyName: "stackBelow", publicName: "stackBelow", isSignal: true, isRequired: false, transformFunction: null }, maxColumns: { classPropertyName: "maxColumns", publicName: "maxColumns", isSignal: true, isRequired: false, transformFunction: null }, minColumnWidth: { classPropertyName: "minColumnWidth", publicName: "minColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, minRowHeight: { classPropertyName: "minRowHeight", publicName: "minRowHeight", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, dragMode: { classPropertyName: "dragMode", publicName: "dragMode", isSignal: true, isRequired: false, transformFunction: null }, resizeMode: { classPropertyName: "resizeMode", publicName: "resizeMode", isSignal: true, isRequired: false, transformFunction: null }, animateReflow: { classPropertyName: "animateReflow", publicName: "animateReflow", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, messages: { classPropertyName: "messages", publicName: "messages", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { layouts: "layoutsChange", layoutPreview: "layoutPreview", layoutChange: "layoutChange", columnCountChange: "columnCountChange", gestureBlocked: "gestureBlocked" }, queries: [{ propertyName: "headerSlot", first: true, predicate: BsTileManagerHeaderDirective, descendants: true, isSignal: true }, { propertyName: "contentSlot", first: true, predicate: BsTileManagerContentDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/tile-manager/src/templates/tile-manager.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<ng-container [mpInstanceStyle]=\"p_view.layoutCss\" [mpInstanceStyleName]=\"p_view.layoutCssName\" />\n<div data-mps=\"tile-manager\" [mpProps]=\"p_view.container\" [style]=\"p_view.containerStyle\">\n <div data-mps=\"tile-manager\" [mpProps]=\"p_view.grid\" [style]=\"p_view.gridStyle\">\n @for (t of p_view.tiles; track t.id) {\n <div data-mps=\"tile-manager\" [mpProps]=\"t.attrs\" [style]=\"t.style\">\n <div data-mps=\"tile-manager\" [mpProps]=\"t.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n <div data-mps=\"tile-manager\" [mpProps]=\"t.content\">\n @if (slots().content; as slot_content) {\n <ng-container [ngTemplateOutlet]=\"slot_content\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n @for (g of t.grips; track g.handle) {\n <span data-mps=\"tile-manager\" [mpProps]=\"g.attrs\"></span>\n }\n </div>\n }\n </div>\n</div>\n@for (n of p_view.descriptions; track n.key) {\n <div data-mps=\"tile-manager\" [mpProps]=\"n.attrs\">\n {{ n.text }}\n </div>\n}\n<span data-mps=\"tile-manager\" [mpProps]=\"p_view.live.attrs\">\n {{ p_view.live.text }}\n</span>\n", dependencies: [{ kind: "directive", type: MpInstanceStyleDirective, selector: "ng-container[mpInstanceStyle]", inputs: ["mpInstanceStyle", "mpInstanceStyleName"] }, { kind: "directive", type: MpPropsDirective, selector: "[mpProps],[mpHostAttrs]", inputs: ["mpProps", "mpHostAttrs"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
336
108
  }
337
109
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTileManagerComponent, decorators: [{
338
110
  type: Component,
339
- args: [{ selector: 'bs-tile-manager', imports: [NgTemplateOutlet, MpPropsDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'd-block' }, template: "<div class=\"mp-tile-manager\" [mpProps]=\"api().board.attrs\" [style]=\"api().board.style\">\n <div class=\"tile-container\" [mpProps]=\"api().container\">\n <div #grid class=\"tile-grid\" [mpProps]=\"api().grid.attrs\" [style]=\"api().grid.style\">\n <!-- A press on the header or a grip bubbles to the tile's body handler; the machine\n ignores that second pointerdown for the same pointer, so the innermost part decides. -->\n @for (t of api().tiles; track t.id) {\n @let slots = tileSlots().get(t.id);\n <div class=\"tile\" [mpProps]=\"t.attrs\" [style]=\"t.style\"\n (pointerdown)=\"down($event, t.id, 'body')\"\n (pointermove)=\"move($event)\"\n (pointerup)=\"machine.pointerUp($event)\"\n (pointercancel)=\"machine.pointerCancel($event)\"\n (lostpointercapture)=\"machine.pointerCancel($event)\"\n (keydown)=\"key($event, t.id)\"\n (focus)=\"machine.focus(t.id)\"\n (blur)=\"machine.blur(t.id)\">\n <!-- Stamps the consumer's *bsTile block first: its *bsTileHeader / *bsTileContent\n register into this tile's slots before the outlets below read them. Not inside an\n @if: an @if body refreshes after this view's own bindings, so the reads would run\n first and the server would render empty headers. -->\n <ng-container [ngTemplateOutlet]=\"tileTemplate()?.templateRef ?? null\" [ngTemplateOutletContext]=\"tileContext().get(t.id)\" [ngTemplateOutletInjector]=\"slots?.injector\"></ng-container>\n <div class=\"tile-header\" [mpProps]=\"t.header\" (pointerdown)=\"down($event, t.id, 'header')\">\n @if (slots?.header; as header) {\n <ng-container [ngTemplateOutlet]=\"header\"></ng-container>\n }\n </div>\n <div class=\"tile-content\" [mpProps]=\"t.content\">\n @if (slots?.content; as content) {\n <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n }\n </div>\n @for (g of t.grips; track g.handle) {\n <span class=\"tile-grip\" [mpProps]=\"g.attrs\" (pointerdown)=\"down($event, t.id, g.handle)\"></span>\n }\n </div>\n }\n </div>\n </div>\n @for (n of api().descriptions; track n.key) {\n <div class=\"tile-sr-only\" [mpProps]=\"n.attrs\">{{ n.text }}</div>\n }\n <span class=\"tile-sr-only\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n</div>\n" }]
340
- }], ctorParameters: () => [], propDecorators: { tileTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTileDirective), { isSignal: true }] }], layouts: [{ type: i0.Input, args: [{ isSignal: true, alias: "layouts", required: false }] }, { type: i0.Output, args: ["layoutsChange"] }], breakpoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoints", required: false }] }], stackBelow: [{ type: i0.Input, args: [{ isSignal: true, alias: "stackBelow", required: false }] }], maxColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxColumns", required: false }] }], minColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minColumnWidth", required: false }] }], minRowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRowHeight", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], dragMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragMode", required: false }] }], resizeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMode", required: false }] }], animateReflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateReflow", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], layoutPreview: [{ type: i0.Output, args: ["layoutPreview"] }], layoutChange: [{ type: i0.Output, args: ["layoutChange"] }], columnCountChange: [{ type: i0.Output, args: ["columnCountChange"] }], gestureBlocked: [{ type: i0.Output, args: ["gestureBlocked"] }], grid: [{ type: i0.ViewChild, args: ['grid', { isSignal: true }] }] } });
341
- const HOST_ARIA = ['aria-label', 'aria-labelledby', 'aria-describedby'];
342
- /**
343
- * A consumer's static `aria-label` / `-labelledby` / `-describedby` on `<bs-tile-manager>`. Read
344
- * from the template (HostAttributeToken), not the DOM, so server and hydrated client agree; the
345
- * copy on the roleless host is removed so nothing is announced twice.
346
- */
347
- function takeHostAria() {
348
- const host = inject(ElementRef).nativeElement;
349
- const bag = Object.fromEntries(HOST_ARIA.flatMap((name) => {
350
- const value = inject(new HostAttributeToken(name), { optional: true });
351
- return value === null ? [] : [[name, value]];
352
- }));
353
- Object.keys(bag).forEach((name) => host.removeAttribute(name));
354
- return bag;
355
- }
111
+ args: [{ selector: 'bs-tile-manager', imports: [MpInstanceStyleDirective, MpPropsDirective, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/tile-manager/src/templates/tile-manager.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<ng-container [mpInstanceStyle]=\"p_view.layoutCss\" [mpInstanceStyleName]=\"p_view.layoutCssName\" />\n<div data-mps=\"tile-manager\" [mpProps]=\"p_view.container\" [style]=\"p_view.containerStyle\">\n <div data-mps=\"tile-manager\" [mpProps]=\"p_view.grid\" [style]=\"p_view.gridStyle\">\n @for (t of p_view.tiles; track t.id) {\n <div data-mps=\"tile-manager\" [mpProps]=\"t.attrs\" [style]=\"t.style\">\n <div data-mps=\"tile-manager\" [mpProps]=\"t.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n <div data-mps=\"tile-manager\" [mpProps]=\"t.content\">\n @if (slots().content; as slot_content) {\n <ng-container [ngTemplateOutlet]=\"slot_content\" [ngTemplateOutletContext]=\"{ $implicit: t.tile, tile: t.tile }\" />\n }\n </div>\n @for (g of t.grips; track g.handle) {\n <span data-mps=\"tile-manager\" [mpProps]=\"g.attrs\"></span>\n }\n </div>\n }\n </div>\n</div>\n@for (n of p_view.descriptions; track n.key) {\n <div data-mps=\"tile-manager\" [mpProps]=\"n.attrs\">\n {{ n.text }}\n </div>\n}\n<span data-mps=\"tile-manager\" [mpProps]=\"p_view.live.attrs\">\n {{ p_view.live.text }}\n</span>\n" }]
112
+ }], ctorParameters: () => [], propDecorators: { tiles: [{ type: i0.Input, args: [{ isSignal: true, alias: "tiles", required: false }] }], layouts: [{ type: i0.Input, args: [{ isSignal: true, alias: "layouts", required: false }] }, { type: i0.Output, args: ["layoutsChange"] }], breakpoints: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoints", required: false }] }], stackBelow: [{ type: i0.Input, args: [{ isSignal: true, alias: "stackBelow", required: false }] }], maxColumns: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxColumns", required: false }] }], minColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "minColumnWidth", required: false }] }], minRowHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "minRowHeight", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], dragMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "dragMode", required: false }] }], resizeMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "resizeMode", required: false }] }], animateReflow: [{ type: i0.Input, args: [{ isSignal: true, alias: "animateReflow", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], messages: [{ type: i0.Input, args: [{ isSignal: true, alias: "messages", required: false }] }], layoutPreview: [{ type: i0.Output, args: ["layoutPreview"] }], layoutChange: [{ type: i0.Output, args: ["layoutChange"] }], columnCountChange: [{ type: i0.Output, args: ["columnCountChange"] }], gestureBlocked: [{ type: i0.Output, args: ["gestureBlocked"] }], headerSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTileManagerHeaderDirective), { isSignal: true }] }], contentSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTileManagerContentDirective), { isSignal: true }] }] } });
113
+
114
+ // GENERATED from the tile-manager manifest by @mintplayer/nx-component-compiler. Do not edit.
115
+
116
+ // Generated from @mintplayer/ui-core/tile-manager (#458 M4, D10).
356
117
 
357
118
  /**
358
119
  * Generated bundle index. Do not edit.
359
120
  */
360
121
 
361
- export { BsTileContentDirective, BsTileDirective, BsTileHeaderDirective, BsTileManagerComponent, BsTileSlots };
122
+ export { BsTileManagerComponent, BsTileManagerContentDirective, BsTileManagerHeaderDirective };
362
123
  //# sourceMappingURL=mintplayer-ng-bootstrap-tile-manager.mjs.map