@mintplayer/ng-bootstrap 21.30.0 → 21.31.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 (153) hide show
  1. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +455 -0
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -0
  3. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +8 -5
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  5. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +10 -4
  6. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  7. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +7 -4
  8. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +131 -3
  10. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +80 -48
  12. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  13. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +4 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  15. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +218 -14
  16. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  17. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +4 -3
  18. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  19. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -2
  20. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  21. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +294 -3
  22. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +163 -18
  24. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  25. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +179 -7
  26. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  27. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +14 -4
  28. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  29. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +14 -0
  30. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +1 -1
  31. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +2 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  33. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +7 -4
  34. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
  35. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +70 -6
  36. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  37. package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs +5 -4
  38. package/fesm2022/mintplayer-ng-bootstrap-multiselect.mjs.map +1 -1
  39. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +6 -6
  40. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  41. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +45 -13
  42. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  43. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +51 -5
  44. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  45. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +5 -3
  46. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  47. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +18 -4
  48. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  49. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +6 -6
  50. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
  51. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +61 -6
  52. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  53. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +19 -4
  54. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  55. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +8 -5
  56. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  57. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +4 -3
  58. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  59. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +34 -4
  60. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  61. package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs +59 -0
  62. package/fesm2022/mintplayer-ng-bootstrap-reduced-motion.mjs.map +1 -0
  63. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +91 -2
  64. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  65. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -5
  66. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  67. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +2 -2
  68. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  69. package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs +28 -5
  70. package/fesm2022/mintplayer-ng-bootstrap-searchbox.mjs.map +1 -1
  71. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +4 -3
  72. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  73. package/fesm2022/mintplayer-ng-bootstrap-select2.mjs +18 -4
  74. package/fesm2022/mintplayer-ng-bootstrap-select2.mjs.map +1 -1
  75. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +4 -3
  76. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  77. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +2 -2
  78. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  79. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +10 -3
  80. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  81. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +143 -29
  82. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  83. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -2
  84. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  85. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +7 -4
  86. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  87. package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs +42 -21
  88. package/fesm2022/mintplayer-ng-bootstrap-toggle-button.mjs.map +1 -1
  89. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +33 -4
  90. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  91. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +17 -7
  92. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  93. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +50 -8
  94. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  95. package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs +34 -12
  96. package/fesm2022/mintplayer-ng-bootstrap-virtual-datatable.mjs.map +1 -1
  97. package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs +74 -0
  98. package/fesm2022/mintplayer-ng-bootstrap-web-components-a11y.mjs.map +1 -0
  99. package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs +1476 -71
  100. package/fesm2022/mintplayer-ng-bootstrap-web-components-scheduler.mjs.map +1 -1
  101. package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs +194 -2
  102. package/fesm2022/mintplayer-ng-bootstrap-web-components-splitter.mjs.map +1 -1
  103. package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs +4 -0
  104. package/fesm2022/mintplayer-ng-bootstrap-web-components-tab-control.mjs.map +1 -1
  105. package/package.json +14 -2
  106. package/types/mintplayer-ng-bootstrap-a11y.d.ts +196 -0
  107. package/types/mintplayer-ng-bootstrap-accordion.d.ts +4 -2
  108. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +2 -1
  109. package/types/mintplayer-ng-bootstrap-button-group.d.ts +2 -1
  110. package/types/mintplayer-ng-bootstrap-calendar.d.ts +32 -0
  111. package/types/mintplayer-ng-bootstrap-carousel.d.ts +56 -3
  112. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +1 -0
  113. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +75 -4
  114. package/types/mintplayer-ng-bootstrap-datatable.d.ts +1 -1
  115. package/types/mintplayer-ng-bootstrap-dock.d.ts +51 -0
  116. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +54 -9
  117. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +57 -2
  118. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +4 -1
  119. package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +14 -0
  120. package/types/mintplayer-ng-bootstrap-marquee.d.ts +2 -1
  121. package/types/mintplayer-ng-bootstrap-modal.d.ts +25 -1
  122. package/types/mintplayer-ng-bootstrap-multiselect.d.ts +2 -1
  123. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +4 -2
  124. package/types/mintplayer-ng-bootstrap-navbar.d.ts +25 -1
  125. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +23 -1
  126. package/types/mintplayer-ng-bootstrap-pagination.d.ts +3 -1
  127. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +5 -1
  128. package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +4 -2
  129. package/types/mintplayer-ng-bootstrap-popover.d.ts +21 -1
  130. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +4 -1
  131. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +4 -2
  132. package/types/mintplayer-ng-bootstrap-range.d.ts +2 -1
  133. package/types/mintplayer-ng-bootstrap-rating.d.ts +3 -0
  134. package/types/mintplayer-ng-bootstrap-reduced-motion.d.ts +36 -0
  135. package/types/mintplayer-ng-bootstrap-resizable.d.ts +4 -0
  136. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +42 -9
  137. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +1 -1
  138. package/types/mintplayer-ng-bootstrap-searchbox.d.ts +8 -1
  139. package/types/mintplayer-ng-bootstrap-select.d.ts +2 -1
  140. package/types/mintplayer-ng-bootstrap-select2.d.ts +3 -0
  141. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +2 -1
  142. package/types/mintplayer-ng-bootstrap-table.d.ts +8 -1
  143. package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +21 -2
  144. package/types/mintplayer-ng-bootstrap-toast.d.ts +6 -1
  145. package/types/mintplayer-ng-bootstrap-toggle-button.d.ts +11 -0
  146. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +5 -0
  147. package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -1
  148. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +11 -3
  149. package/types/mintplayer-ng-bootstrap-virtual-datatable.d.ts +14 -1
  150. package/types/mintplayer-ng-bootstrap-web-components-a11y.d.ts +34 -0
  151. package/types/mintplayer-ng-bootstrap-web-components-scheduler-core.d.ts +35 -11
  152. package/types/mintplayer-ng-bootstrap-web-components-scheduler.d.ts +246 -0
  153. package/types/mintplayer-ng-bootstrap-web-components-splitter.d.ts +95 -37
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-tile-manager.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/components/tile.component.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/components/tile-manager.component.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/components/tile-header.component.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/types/grid-rect.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/utils/pack.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/web-components/mint-tile-manager.element.template.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/web-components/mint-tile-manager.element.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/mintplayer-ng-bootstrap-tile-manager.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { TilePosition } from '../types/tile-position';\n\n/**\n * One tile inside a `<bs-tile-manager>`.\n *\n * The component captures two `TemplateRef`s — one for the header (a child\n * `<bs-tile-header>`) and one for the body (everything else) — which the\n * manager projects into named slots on the underlying `<mp-tile-manager>`\n * web component (`${id}-header` and `${id}-content`).\n */\n@Component({\n selector: 'bs-tile',\n template: `\n <ng-template #headerTpl>\n <ng-content select=\"bs-tile-header\"></ng-content>\n </ng-template>\n <ng-template #contentTpl>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTileComponent {\n readonly id = input.required<string>();\n readonly position = input.required<TilePosition>();\n readonly disableMove = input<boolean>(false);\n readonly disableResize = input<boolean>(false);\n readonly label = input<string | null>(null);\n\n readonly positionChange = output<TilePosition>();\n\n readonly headerTpl = viewChild.required<TemplateRef<unknown>>('headerTpl');\n readonly contentTpl = viewChild.required<TemplateRef<unknown>>('contentTpl');\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n computed,\n contentChildren,\n effect,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsTileComponent } from './tile.component';\nimport {\n MintTile,\n MintTileManagerElement,\n TileDragMode,\n TileResizeMode,\n} from '../web-components/mint-tile-manager.element';\nimport { TileLayoutSnapshot, TileGestureBlocked } from '../types/tile-layout-snapshot';\nimport { TilePosition } from '../types/tile-position';\n\n@Component({\n selector: 'bs-tile-manager',\n template: `\n <mp-tile-manager\n #manager\n class=\"bs-tile-manager\"\n [attr.column-count]=\"columnCountAttr()\"\n [attr.min-column-width]=\"minColumnWidth()\"\n [attr.min-row-height]=\"minRowHeight()\"\n [attr.gap]=\"gap()\"\n [attr.drag-mode]=\"dragMode()\"\n [attr.resize-mode]=\"resizeMode()\"\n [attr.animate-reflow]=\"animateReflow() ? '' : null\"\n [attr.label]=\"label()\"\n (tilelayoutchange)=\"onLayoutChange($event)\"\n (tilepositionchange)=\"onPositionChange($event)\"\n (tilegestureblocked)=\"onGestureBlocked($event)\"\n >\n @for (tile of tiles(); track tile.id()) {\n <div [attr.slot]=\"tile.id() + '-header'\" class=\"bs-tile-slot\">\n <ng-container *ngTemplateOutlet=\"tile.headerTpl()\"></ng-container>\n </div>\n <div [attr.slot]=\"tile.id() + '-content'\" class=\"bs-tile-slot\">\n <ng-container *ngTemplateOutlet=\"tile.contentTpl()\"></ng-container>\n </div>\n }\n </mp-tile-manager>\n `,\n styles: [\n `\n :host {\n display: block;\n width: 100%;\n }\n .bs-tile-manager {\n display: block;\n width: 100%;\n }\n .bs-tile-slot {\n display: contents;\n }\n `,\n ],\n imports: [NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTileManagerComponent implements AfterViewInit {\n readonly columnCount = input<number | null>(null);\n readonly minColumnWidth = input<string>('200px');\n readonly minRowHeight = input<string>('8rem');\n readonly gap = input<string>('0.5rem');\n readonly dragMode = input<TileDragMode>('header');\n readonly resizeMode = input<TileResizeMode>('hover');\n readonly animateReflow = input<boolean>(true);\n readonly label = input<string | null>(null);\n\n readonly layoutChange = output<TileLayoutSnapshot>();\n readonly gestureBlocked = output<TileGestureBlocked>();\n\n readonly tiles = contentChildren(BsTileComponent);\n readonly managerRef = viewChild<ElementRef<MintTileManagerElement>>('manager');\n\n protected readonly columnCountAttr = computed(() => {\n const c = this.columnCount();\n return c && c > 0 ? String(c) : null;\n });\n\n // Snapshot of Angular tile state, derived from contentChildren signals.\n // Re-runs whenever any tile's id, position, disableMove, disableResize, or label changes.\n // contentChildren() can surface a child before Angular has finished binding its\n // required inputs; reading them then throws NG0950. flatMap-with-try lets us\n // skip the not-yet-bound entry — the effect re-runs once binding completes.\n private readonly tilesSnapshot = computed<MintTile[]>(() =>\n this.tiles().flatMap((t) => {\n try {\n return [{\n id: t.id(),\n position: t.position(),\n disableMove: t.disableMove(),\n disableResize: t.disableResize(),\n label: t.label(),\n }];\n } catch {\n return [];\n }\n }),\n );\n\n constructor() {\n effect(() => {\n const snapshot = this.tilesSnapshot();\n const ref = this.managerRef();\n if (!ref) return;\n ref.nativeElement.tiles = snapshot;\n });\n }\n\n ngAfterViewInit(): void {\n // First push happens via the constructor effect once the view is alive.\n }\n\n /** Returns the current layout. Mirrors `BsDockManagerComponent.captureLayout()`. */\n captureLayout(): TileLayoutSnapshot {\n const ref = this.managerRef();\n if (!ref) return [];\n return Array.from(ref.nativeElement.tiles ?? []).map((t) => ({\n id: t.id,\n position: { ...t.position },\n }));\n }\n\n protected onLayoutChange(event: Event): void {\n const detail = (event as CustomEvent<TileLayoutSnapshot>).detail;\n if (detail) this.layoutChange.emit(detail);\n }\n\n protected onPositionChange(event: Event): void {\n const detail = (event as CustomEvent<{ id: string; position: TilePosition }>).detail;\n if (!detail) return;\n const tile = this.tiles().find((t) => t.id() === detail.id);\n tile?.positionChange.emit(detail.position);\n }\n\n protected onGestureBlocked(event: Event): void {\n const detail = (event as CustomEvent<TileGestureBlocked>).detail;\n if (detail) this.gestureBlocked.emit(detail);\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'bs-tile-header',\n template: `<ng-content></ng-content>`,\n styles: [\n `:host {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--bs-body-color, inherit);\n background: linear-gradient(to bottom, rgba(var(--bs-primary-rgb, 13, 110, 253), 0.10), rgba(var(--bs-primary-rgb, 13, 110, 253), 0.04));\n border-bottom: 1px solid var(--bs-border-color, #dee2e6);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n -webkit-touch-callout: none;\n }`,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTileHeaderComponent {}\n","/**\n * Half-open rectangle in grid coordinates: `[colStart, colStart + colSpan) × [rowStart, rowStart + rowSpan)`.\n * Same shape as `TilePosition` but used internally for overlap math; kept\n * as its own type so call-sites read clearly.\n */\nexport interface GridRect {\n colStart: number;\n rowStart: number;\n colSpan: number;\n rowSpan: number;\n}\n\nexport function rectsOverlap(a: GridRect, b: GridRect): boolean {\n return (\n a.colStart < b.colStart + b.colSpan &&\n b.colStart < a.colStart + a.colSpan &&\n a.rowStart < b.rowStart + b.rowSpan &&\n b.rowStart < a.rowStart + a.rowSpan\n );\n}\n","import { TilePosition } from '../types/tile-position';\nimport { TileLayoutSnapshot } from '../types/tile-layout-snapshot';\nimport { GridRect, rectsOverlap } from '../types/grid-rect';\n\ninterface PackInputTile {\n id: string;\n position: TilePosition;\n locked: boolean;\n}\n\ninterface Placement {\n id: string;\n position: TilePosition;\n}\n\n/**\n * Vertical-compact packer. The pinned tile's rect is the user's gesture; all\n * other tiles flow around it (locked tiles stay put; movable tiles get pushed\n * out of the way and gravity-compacted upward).\n *\n * Returns `blocked: true` if the pinned rect overlaps a locked tile or no\n * valid layout exists; the caller should snap back and not commit.\n */\nexport function pack(\n tiles: ReadonlyArray<PackInputTile>,\n pinned: { id: string; rect: GridRect },\n columnCount: number,\n): { layout: TileLayoutSnapshot; blocked: boolean } {\n const pinnedTile = tiles.find((t) => t.id === pinned.id);\n if (!pinnedTile) {\n throw new Error(`pack: pinned tile \"${pinned.id}\" is not in the tiles array`);\n }\n\n const pinnedPlacement: Placement = { id: pinned.id, position: { ...pinned.rect } };\n\n const lockedPlacements: ReadonlyArray<Placement> = tiles\n .filter((t) => t.locked && t.id !== pinned.id)\n .map((t) => ({ id: t.id, position: { ...t.position } }));\n\n const lockedOverlap = lockedPlacements.some((l) =>\n rectsOverlap(l.position, pinnedPlacement.position),\n );\n if (lockedOverlap) {\n return { layout: snapshotFromInput(tiles), blocked: true };\n }\n\n const fixed: ReadonlyArray<Placement> = [pinnedPlacement, ...lockedPlacements];\n\n const movables = tiles\n .filter((t) => !t.locked && t.id !== pinned.id)\n .slice()\n .sort((a, b) => {\n const dRow = a.position.rowStart - b.position.rowStart;\n return dRow !== 0 ? dRow : a.position.colStart - b.position.colStart;\n });\n\n const placedMovables = movables.reduce<Placement[]>((acc, t) => {\n const all = [...fixed, ...acc];\n const placed = placeTile(t, all, columnCount);\n return placed ? [...acc, placed] : acc;\n }, []);\n\n if (placedMovables.length !== movables.length) {\n return { layout: snapshotFromInput(tiles), blocked: true };\n }\n\n const compacted = compactStable(placedMovables, fixed, columnCount);\n\n const placementById = new Map<string, TilePosition>(\n [pinnedPlacement, ...lockedPlacements, ...compacted].map((p) => [p.id, p.position]),\n );\n\n // Preserve the input tile order in the output snapshot — keeps layout\n // identity stable across pack() calls with the same input.\n const layout: TileLayoutSnapshot = tiles.map((t) => ({\n id: t.id,\n position: placementById.get(t.id) ?? { ...t.position },\n }));\n\n return { layout, blocked: false };\n}\n\nfunction snapshotFromInput(tiles: ReadonlyArray<PackInputTile>): TileLayoutSnapshot {\n return tiles.map((t) => ({ id: t.id, position: { ...t.position } }));\n}\n\nfunction placeTile(\n tile: PackInputTile,\n obstacles: ReadonlyArray<Placement>,\n columnCount: number,\n): Placement | null {\n const { colSpan, rowSpan } = tile.position;\n if (colSpan > columnCount) return null;\n\n const inPlaceFits = !obstacles.some((o) => rectsOverlap(tile.position, o.position));\n if (inPlaceFits) {\n return { id: tile.id, position: { ...tile.position } };\n }\n\n const candidate = firstFit({ colSpan, rowSpan }, obstacles, columnCount);\n return candidate ? { id: tile.id, position: candidate } : null;\n}\n\nfunction firstFit(\n size: { colSpan: number; rowSpan: number },\n obstacles: ReadonlyArray<Placement>,\n columnCount: number,\n): TilePosition | null {\n const lastRow = obstacles.reduce(\n (max, o) => Math.max(max, o.position.rowStart + o.position.rowSpan - 1),\n 0,\n );\n // Worst case: stack right after the bottommost obstacle.\n const rowsToTry = lastRow + size.rowSpan;\n const cols = columnCount - size.colSpan + 1;\n if (cols < 1) return null;\n\n // Imperative loops here are deliberate — this runs on every pointermove\n // during a drag (live reflow) and the array-allocation patterns previously\n // used here generated GC pressure visible as drag jank.\n for (let rowStart = 1; rowStart <= rowsToTry; rowStart++) {\n for (let c = 0; c < cols; c++) {\n const colStart = c + 1;\n let collides = false;\n for (let i = 0; i < obstacles.length; i++) {\n if (\n rectsOverlap(\n { rowStart, colStart, colSpan: size.colSpan, rowSpan: size.rowSpan },\n obstacles[i].position,\n )\n ) {\n collides = true;\n break;\n }\n }\n if (!collides) {\n return { rowStart, colStart, colSpan: size.colSpan, rowSpan: size.rowSpan };\n }\n }\n }\n return null;\n}\n\nfunction compactStable(\n placements: ReadonlyArray<Placement>,\n fixed: ReadonlyArray<Placement>,\n columnCount: number,\n): ReadonlyArray<Placement> {\n return iterate(placements, fixed, columnCount, 10);\n}\n\nfunction iterate(\n placements: ReadonlyArray<Placement>,\n fixed: ReadonlyArray<Placement>,\n columnCount: number,\n iterations: number,\n): ReadonlyArray<Placement> {\n if (iterations <= 0) return placements;\n const { result, changed } = compactOnce(placements, fixed, columnCount);\n return changed ? iterate(result, fixed, columnCount, iterations - 1) : result;\n}\n\nfunction compactOnce(\n placements: ReadonlyArray<Placement>,\n fixed: ReadonlyArray<Placement>,\n columnCount: number,\n): { result: ReadonlyArray<Placement>; changed: boolean } {\n // Process in current visual order: top-to-bottom, then left-to-right.\n const ordered = placements\n .slice()\n .sort((a, b) => {\n const dRow = a.position.rowStart - b.position.rowStart;\n return dRow !== 0 ? dRow : a.position.colStart - b.position.colStart;\n });\n\n return ordered.reduce<{ result: Placement[]; changed: boolean }>(\n (acc, p) => {\n const others = [...fixed, ...acc.result.filter((r) => r.id !== p.id)];\n const slid = slideUp(p.position, others);\n const changed = slid.rowStart !== p.position.rowStart;\n return {\n result: [...acc.result, { id: p.id, position: slid }],\n changed: acc.changed || changed,\n };\n },\n { result: [], changed: false },\n );\n}\n\nfunction slideUp(pos: TilePosition, others: ReadonlyArray<Placement>): TilePosition {\n if (pos.rowStart <= 1) return pos;\n // Same hot path as firstFit — keep imperative for GC-pressure reasons.\n for (let rowStart = 1; rowStart < pos.rowStart; rowStart++) {\n let collides = false;\n for (let i = 0; i < others.length; i++) {\n if (rectsOverlap({ ...pos, rowStart }, others[i].position)) {\n collides = true;\n break;\n }\n }\n if (!collides) return { ...pos, rowStart };\n }\n return pos;\n}\n","// AUTO-GENERATED — do not edit by hand.\n// Source: mint-tile-manager.element.html + mint-tile-manager.element.scss\n// Regenerate with the codegen-wc Nx target.\n\nimport { html, unsafeCSS } from 'lit';\n\nexport const template = html`<!-- Tile shells are rendered dynamically by render(). This file exists so the\n codegen-wc target produces a \\`styles\\` export from the sibling .scss; the\n \\`template\\` export it generates is intentionally unused. -->`;\nexport const styles = unsafeCSS(`:host {\n display: block;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n contain: layout paint style;\n --bs-tile-radius: 0.5rem;\n --bs-tile-bg: var(--bs-body-bg, #fff);\n --bs-tile-border: var(--bs-border-color, #dee2e6);\n --bs-tile-shadow: var(--bs-box-shadow-sm, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075));\n --bs-tile-handle-color: var(--bs-secondary, #6c757d);\n --bs-tile-blocked-color: var(--bs-danger, #dc3545);\n}\n\n.tile-grid {\n display: grid;\n grid-auto-rows: var(--mp-tile-row-height, 8rem);\n gap: var(--mp-tile-gap, 0.5rem);\n width: 100%;\n position: relative;\n}\n\n.tile {\n position: relative;\n display: flex;\n flex-direction: column;\n background: var(--bs-tile-bg);\n border: 1px solid var(--bs-tile-border);\n border-radius: var(--bs-tile-radius);\n box-shadow: var(--bs-tile-shadow);\n overflow: hidden;\n min-width: 0;\n min-height: 0;\n transition: transform 150ms cubic-bezier(0.2, 0, 0, 1);\n will-change: transform;\n}\n\n.tile[data-dragging=true] {\n z-index: 5;\n cursor: grabbing;\n box-shadow: var(--bs-box-shadow, 0 0.5rem 1rem rgba(0, 0, 0, 0.15));\n transition: none;\n}\n\n.tile[data-resizing=true] {\n z-index: 4;\n transition: none;\n}\n\n.tile[data-blocked=true] {\n outline: 2px solid var(--bs-tile-blocked-color);\n outline-offset: -2px;\n animation: tile-shake 200ms ease-in-out;\n}\n\n@keyframes tile-shake {\n 0%, 100% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n}\n.tile[data-pressing=true] {\n filter: brightness(0.96);\n transition: filter 100ms ease-out;\n}\n\n.tile__header-shell {\n flex: 0 0 auto;\n user-select: none;\n -webkit-user-select: none;\n -webkit-touch-callout: none;\n cursor: grab;\n}\n\n.tile[data-drag-mode=off] .tile__header-shell,\n.tile[data-locked-move=true] .tile__header-shell {\n cursor: default;\n}\n\n.tile__content-shell {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n overflow: auto;\n}\n\n.tile__resize-side,\n.tile__resize-bottom,\n.tile__resize-corner {\n position: absolute;\n z-index: 2;\n background: transparent;\n touch-action: none;\n -webkit-user-select: none;\n user-select: none;\n opacity: 0;\n transition: opacity 120ms ease-out;\n}\n\n.tile:hover .tile__resize-side,\n.tile:hover .tile__resize-bottom,\n.tile:hover .tile__resize-corner,\n:host([resize-mode=always]) .tile__resize-side,\n:host([resize-mode=always]) .tile__resize-bottom,\n:host([resize-mode=always]) .tile__resize-corner {\n opacity: 1;\n}\n\n@media (pointer: coarse) {\n .tile__resize-side,\n .tile__resize-bottom,\n .tile__resize-corner {\n opacity: 1;\n }\n}\n.tile__resize-side {\n right: -2px;\n top: 25%;\n bottom: 25%;\n width: 6px;\n cursor: ew-resize;\n}\n\n.tile__resize-bottom {\n left: 25%;\n right: 25%;\n bottom: -2px;\n height: 6px;\n cursor: ns-resize;\n}\n\n.tile__resize-corner {\n right: -2px;\n bottom: -2px;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n}\n\n.tile__resize-corner::before {\n content: \"\";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 8px;\n height: 8px;\n border-right: 2px solid var(--bs-tile-handle-color);\n border-bottom: 2px solid var(--bs-tile-handle-color);\n border-bottom-right-radius: 2px;\n}\n\n:host([resize-mode=off]) .tile__resize-side,\n:host([resize-mode=off]) .tile__resize-bottom,\n:host([resize-mode=off]) .tile__resize-corner {\n display: none;\n}\n\n.tile[data-locked-resize=true] .tile__resize-side,\n.tile[data-locked-resize=true] .tile__resize-bottom,\n.tile[data-locked-resize=true] .tile__resize-corner {\n display: none;\n}\n\n.tile-grid__live-region {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tile {\n transition: none !important;\n }\n .tile[data-blocked=true] {\n animation: none;\n }\n}\n:host(:focus-visible) {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: 2px;\n}\n\n.tile:focus-visible {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: -2px;\n}`);\n","import { LitElement, html, type TemplateResult, type PropertyValues, nothing } from 'lit';\nimport { TilePosition } from '../types/tile-position';\nimport { TileLayoutSnapshot, TileGestureBlocked } from '../types/tile-layout-snapshot';\nimport { GridRect } from '../types/grid-rect';\nimport { pack } from '../utils/pack';\nimport { styles } from './mint-tile-manager.element.template';\n\nexport interface MintTile {\n id: string;\n position: TilePosition;\n disableMove: boolean;\n disableResize: boolean;\n label: string | null;\n}\n\nexport type TileDragMode = 'tile' | 'header' | 'off';\nexport type TileResizeMode = 'hover' | 'always' | 'off';\n\ntype GestureState =\n | { kind: 'idle' }\n | {\n kind: 'arming-touch-drag';\n pointerId: number;\n tileId: string;\n startX: number;\n startY: number;\n timer: number | null;\n pressingTimer: number | null;\n }\n | {\n kind: 'drag';\n pointerId: number;\n tileId: string;\n pointerOffset: { dx: number; dy: number };\n currentRect: GridRect;\n blocked: boolean;\n }\n | {\n kind: 'resize';\n pointerId: number;\n tileId: string;\n mode: 'side' | 'bottom' | 'corner';\n startPointer: { x: number; y: number };\n startSpans: { colSpan: number; rowSpan: number };\n currentRect: GridRect;\n blocked: boolean;\n };\n\ntype KeyboardMode =\n | { kind: 'idle' }\n | { kind: 'move'; tileId: string }\n | { kind: 'resize'; tileId: string };\n\nconst TOUCH_LONG_PRESS_MS = 600;\nconst TOUCH_LONG_PRESS_SLOP_PX = 10;\nconst TOUCH_PRESS_FEEDBACK_DELAY_MS = 150;\nconst POINTER_DRAG_THRESHOLD_PX = 5;\n\nexport class MintTileManagerElement extends LitElement {\n static override styles = [styles];\n\n static override get observedAttributes(): string[] {\n return [\n ...(super.observedAttributes ?? []),\n 'column-count',\n 'min-column-width',\n 'min-row-height',\n 'gap',\n 'drag-mode',\n 'resize-mode',\n 'animate-reflow',\n 'label',\n ];\n }\n\n static override properties = {\n tiles: { attribute: false },\n columnCount: { attribute: 'column-count', type: Number },\n minColumnWidth: { attribute: 'min-column-width', type: String },\n minRowHeight: { attribute: 'min-row-height', type: String },\n gap: { attribute: 'gap', type: String },\n dragMode: { attribute: 'drag-mode', type: String, reflect: true },\n resizeMode: { attribute: 'resize-mode', type: String, reflect: true },\n animateReflow: { attribute: 'animate-reflow', type: Boolean },\n label: { attribute: 'label', type: String },\n previewLayout: { state: true },\n gestureKind: { state: true },\n blocked: { state: true },\n effectiveColumnCount: { state: true },\n keyboardMode: { state: true },\n liveRegionMessage: { state: true },\n };\n\n tiles: ReadonlyArray<MintTile> = [];\n columnCount: number | null = null;\n minColumnWidth = '200px';\n minRowHeight = '8rem';\n gap = '0.5rem';\n dragMode: TileDragMode = 'header';\n resizeMode: TileResizeMode = 'hover';\n animateReflow = true;\n label: string | null = null;\n\n private gestureState: GestureState = { kind: 'idle' };\n private keyboardState: KeyboardMode = { kind: 'idle' };\n\n // State-tracked redraw triggers (Lit re-renders when these change).\n protected previewLayout: TileLayoutSnapshot | null = null;\n protected gestureKind: GestureState['kind'] = 'idle';\n protected blocked = false;\n protected effectiveColumnCount = 1;\n protected liveRegionMessage = '';\n\n private hostResizeObserver: ResizeObserver | null = null;\n private flipPreviousRects: Map<string, DOMRect> = new Map();\n\n // Cached layout metrics. Refreshed lazily in updated()/firstUpdated() and on\n // ResizeObserver ticks — never from render(), so the per-tile pointer-move\n // path stays free of getComputedStyle / getBoundingClientRect calls.\n private cellMetrics = { width: 0, height: 0, gapX: 0, gapY: 0 };\n\n // Bound handlers — created once so add/remove pair correctly.\n private readonly onWindowPointerMove = (e: PointerEvent) => this.handlePointerMove(e);\n private readonly onWindowPointerUp = (e: PointerEvent) => this.handlePointerUp(e);\n private readonly onWindowPointerCancel = (e: PointerEvent) => this.handlePointerCancel(e);\n private readonly onWindowKeyDown = (e: KeyboardEvent) => this.handleEscapeKey(e);\n private readonly onVisibilityChange = () => {\n if (document.visibilityState === 'hidden') this.cancelGesture();\n };\n\n override render(): TemplateResult {\n const layoutSource = this.previewLayout ?? this.tiles.map((t) => ({ id: t.id, position: t.position }));\n const tileById = new Map(this.tiles.map((t) => [t.id, t]));\n\n const gridStyle = this.computeGridStyle();\n\n // ARIA grid hierarchy is grid > row > gridcell. A single role=\"row\"\n // wrapper with display: contents lets us satisfy that without disturbing\n // the CSS Grid placement of the gridcell children.\n return html`\n <div class=\"tile-grid\" role=\"grid\" aria-label=${this.label ?? nothing} style=${gridStyle}>\n <div role=\"row\" style=\"display: contents;\">\n ${layoutSource.map((entry) => {\n const tile = tileById.get(entry.id);\n if (!tile) return nothing;\n return this.renderTile(tile, entry.position);\n })}\n </div>\n </div>\n <div class=\"tile-grid__live-region\" aria-live=\"polite\" aria-atomic=\"true\">${this.liveRegionMessage}</div>\n `;\n }\n\n private renderTile(tile: MintTile, pos: TilePosition): TemplateResult {\n const isDragging = this.gestureKind === 'drag' && this.activeTileId() === tile.id;\n const isResizing = this.gestureKind === 'resize' && this.activeTileId() === tile.id;\n const isBlocked = (isDragging || isResizing) && this.blocked;\n const isPressing = this.gestureKind === 'arming-touch-drag' && this.activeTileId() === tile.id;\n const transform = this.computeActiveTransform(tile.id);\n\n const style = [\n `grid-column: ${pos.colStart} / span ${pos.colSpan}`,\n `grid-row: ${pos.rowStart} / span ${pos.rowSpan}`,\n transform ? `transform: ${transform}` : '',\n ]\n .filter(Boolean)\n .join('; ');\n\n return html`\n <div\n class=\"tile\"\n role=\"gridcell\"\n tabindex=\"0\"\n data-tile-id=${tile.id}\n data-dragging=${isDragging ? 'true' : 'false'}\n data-resizing=${isResizing ? 'true' : 'false'}\n data-blocked=${isBlocked ? 'true' : 'false'}\n data-pressing=${isPressing ? 'true' : 'false'}\n data-drag-mode=${this.dragMode}\n data-locked-move=${tile.disableMove ? 'true' : 'false'}\n data-locked-resize=${tile.disableResize ? 'true' : 'false'}\n aria-label=${tile.label ?? nothing}\n style=${style}\n @pointerdown=${(e: PointerEvent) => this.onTilePointerDown(e, tile)}\n @keydown=${(e: KeyboardEvent) => this.onTileKeyDown(e, tile)}\n >\n <div class=\"tile__header-shell\">\n <slot name=${`${tile.id}-header`}></slot>\n </div>\n <div class=\"tile__content-shell\">\n <slot name=${`${tile.id}-content`}></slot>\n </div>\n ${tile.disableResize || this.resizeMode === 'off'\n ? nothing\n : html`\n <div class=\"tile__resize-side\" data-resize=\"side\"\n @pointerdown=${(e: PointerEvent) => this.onResizeHandlePointerDown(e, tile, 'side')}></div>\n <div class=\"tile__resize-bottom\" data-resize=\"bottom\"\n @pointerdown=${(e: PointerEvent) => this.onResizeHandlePointerDown(e, tile, 'bottom')}></div>\n <div class=\"tile__resize-corner\" data-resize=\"corner\"\n @pointerdown=${(e: PointerEvent) => this.onResizeHandlePointerDown(e, tile, 'corner')}></div>\n `}\n </div>\n `;\n }\n\n private computeGridStyle(): string {\n const tracks =\n this.columnCount && this.columnCount > 0\n ? `repeat(${this.columnCount}, minmax(0, 1fr))`\n : `repeat(auto-fit, minmax(${this.minColumnWidth}, 1fr))`;\n return [\n `grid-template-columns: ${tracks}`,\n `--mp-tile-row-height: ${this.minRowHeight}`,\n `--mp-tile-gap: ${this.gap}`,\n ].join('; ');\n }\n\n /**\n * Refresh the cached layout metrics by reading layout / computed-style state\n * once. Called from firstUpdated, the ResizeObserver tick, and updated()\n * when an input that affects metrics changes — never from render().\n */\n private updateLayoutCache(): void {\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) {\n this.effectiveColumnCount =\n this.columnCount && this.columnCount > 0 ? this.columnCount : 1;\n return;\n }\n const cs = getComputedStyle(grid);\n if (this.columnCount && this.columnCount > 0) {\n this.effectiveColumnCount = this.columnCount;\n } else {\n const tracks = cs.gridTemplateColumns.split(/\\s+/).filter(Boolean);\n this.effectiveColumnCount = Math.max(1, tracks.length);\n }\n const rect = grid.getBoundingClientRect();\n const cols = this.effectiveColumnCount;\n const gapX = parseFloat(cs.columnGap) || 0;\n const gapY = parseFloat(cs.rowGap) || 0;\n const width = (rect.width - (cols - 1) * gapX) / cols;\n const height = parseFloat(cs.gridAutoRows) || rect.width / cols;\n this.cellMetrics = { width, height, gapX, gapY };\n }\n\n private computeActiveTransform(id: string): string | null {\n const g = this.gestureState;\n if (g.kind !== 'drag' || g.tileId !== id) return null;\n const pointer = this.lastPointerPosition;\n if (!pointer) return null;\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return null;\n // Cached cellMetrics is stale by at most one frame after a resize — fine\n // for the visual translate. gridRect read here is unavoidable: we need\n // the live grid origin to convert pointer (viewport coords) into\n // grid-relative space. One read per render, not one per tile.\n const gridRect = grid.getBoundingClientRect();\n const cell = this.cellMetrics;\n const snapped = g.currentRect;\n const desiredLeft = pointer.x - gridRect.left - g.pointerOffset.dx;\n const desiredTop = pointer.y - gridRect.top - g.pointerOffset.dy;\n const snappedLeft = (snapped.colStart - 1) * (cell.width + cell.gapX);\n const snappedTop = (snapped.rowStart - 1) * (cell.height + cell.gapY);\n return `translate(${Math.round(desiredLeft - snappedLeft)}px, ${Math.round(desiredTop - snappedTop)}px)`;\n }\n\n // ---------------- Lifecycle ----------------\n\n override connectedCallback(): void {\n super.connectedCallback();\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'application');\n }\n document.addEventListener('visibilitychange', this.onVisibilityChange);\n }\n\n override disconnectedCallback(): void {\n this.cancelGesture();\n this.detachWindowListeners();\n document.removeEventListener('visibilitychange', this.onVisibilityChange);\n this.hostResizeObserver?.disconnect();\n this.hostResizeObserver = null;\n super.disconnectedCallback();\n }\n\n protected override firstUpdated(): void {\n // Seed the layout cache once the shadow DOM is in place. Subsequent\n // refreshes happen on host resize and on relevant property changes.\n this.updateLayoutCache();\n let scheduled = false;\n this.hostResizeObserver = new ResizeObserver(() => {\n if (scheduled) return;\n scheduled = true;\n // Defer to the next frame so we never write reactive state from inside\n // the observer's callback — that path produces \"ResizeObserver loop\n // completed with undelivered notifications\" warnings.\n requestAnimationFrame(() => {\n scheduled = false;\n this.updateLayoutCache();\n });\n });\n this.hostResizeObserver.observe(this);\n }\n\n override attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === 'animate-reflow') {\n this.animateReflow = !(newValue === null || newValue === 'false' || newValue === '0');\n }\n }\n\n // ---------------- FLIP animator ----------------\n\n protected override willUpdate(_changed: PropertyValues): void {\n if (!this.shouldAnimate()) {\n this.flipPreviousRects.clear();\n return;\n }\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n this.flipPreviousRects.clear();\n grid.querySelectorAll<HTMLElement>('.tile').forEach((el) => {\n const id = el.dataset['tileId'];\n if (id) this.flipPreviousRects.set(id, el.getBoundingClientRect());\n });\n }\n\n protected override updated(changed: PropertyValues): void {\n // Refresh cached layout metrics when an input that determines them changes.\n // Reading layout in updated() is safe — the new style is already applied.\n if (\n changed.has('columnCount') ||\n changed.has('minColumnWidth') ||\n changed.has('minRowHeight') ||\n changed.has('gap')\n ) {\n this.updateLayoutCache();\n }\n if (!this.shouldAnimate() || this.flipPreviousRects.size === 0) return;\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n const activeId = this.activeTileId();\n grid.querySelectorAll<HTMLElement>('.tile').forEach((el) => {\n const id = el.dataset['tileId'];\n if (!id || id === activeId) return;\n const prev = this.flipPreviousRects.get(id);\n if (!prev) return;\n const next = el.getBoundingClientRect();\n const dx = prev.left - next.left;\n const dy = prev.top - next.top;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n // Invert: jump back to old position with no transition…\n const previous = el.style.transition;\n el.style.transition = 'none';\n el.style.transform = `translate(${dx}px, ${dy}px)`;\n // …then play forward on the next frame, restoring the transition.\n requestAnimationFrame(() => {\n el.style.transition = previous;\n el.style.transform = '';\n });\n });\n this.flipPreviousRects.clear();\n }\n\n private shouldAnimate(): boolean {\n if (!this.animateReflow) return false;\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n return !window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n\n // ---------------- Pointer entry points ----------------\n\n private lastPointerPosition: { x: number; y: number } | null = null;\n\n private onTilePointerDown(event: PointerEvent, tile: MintTile): void {\n if (event.button !== 0 && event.pointerType === 'mouse') return;\n if (this.gestureState.kind !== 'idle') return;\n if (this.dragMode === 'off' || tile.disableMove) return;\n\n // Resize handles consume their own pointerdown via stopPropagation; if we\n // got here it's a drag-surface candidate.\n if (this.dragMode === 'header' || event.pointerType === 'touch') {\n // Header-only: only proceed if the click originated inside the header\n // shell. The slotted (light-DOM) target won't find shadow-DOM ancestors\n // via closest(), so walk the composed path instead.\n const inHeader = event\n .composedPath()\n .some((node) => node instanceof HTMLElement && node.classList?.contains('tile__header-shell'));\n if (!inHeader) return;\n }\n\n if (event.pointerType === 'touch') {\n this.armTouchDrag(event, tile);\n } else {\n this.armPointerDrag(event, tile);\n }\n }\n\n private onResizeHandlePointerDown(\n event: PointerEvent,\n tile: MintTile,\n mode: 'side' | 'bottom' | 'corner',\n ): void {\n if (event.button !== 0 && event.pointerType === 'mouse') return;\n if (tile.disableResize || this.resizeMode === 'off') return;\n if (this.gestureState.kind !== 'idle') return;\n event.stopPropagation();\n event.preventDefault();\n this.beginResize(event, tile, mode);\n }\n\n // ---------------- Drag arming ----------------\n\n private armPointerDrag(event: PointerEvent, tile: MintTile): void {\n // Mouse / pen: arm immediately past the 5 px threshold. We track the\n // pointer ourselves and convert to a real drag when distance exceeds\n // POINTER_DRAG_THRESHOLD_PX.\n const startX = event.clientX;\n const startY = event.clientY;\n const onMove = (e: PointerEvent) => {\n if (e.pointerId !== event.pointerId) return;\n const dx = e.clientX - startX;\n const dy = e.clientY - startY;\n if (Math.hypot(dx, dy) >= POINTER_DRAG_THRESHOLD_PX) {\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n this.beginDrag(e, tile);\n }\n };\n const onCancel = (e: PointerEvent) => {\n if (e.pointerId !== event.pointerId) return;\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onCancel);\n window.addEventListener('pointercancel', onCancel);\n }\n\n private armTouchDrag(event: PointerEvent, tile: MintTile): void {\n const startX = event.clientX;\n const startY = event.clientY;\n const pointerId = event.pointerId;\n\n const pressingTimer = window.setTimeout(() => {\n // Visual feedback only — gesture not yet armed.\n if (this.gestureState.kind === 'arming-touch-drag' && this.gestureState.pointerId === pointerId) {\n // Force a re-render to flip data-pressing.\n this.requestUpdate();\n }\n }, TOUCH_PRESS_FEEDBACK_DELAY_MS);\n\n const armTimer = window.setTimeout(() => {\n if (this.gestureState.kind !== 'arming-touch-drag' || this.gestureState.pointerId !== pointerId) return;\n this.cleanupTouchArming();\n try {\n navigator.vibrate?.(10);\n } catch {\n // Silently ignore; vibrate isn't available everywhere.\n }\n this.beginDragFromTouchArm(tile, startX, startY, pointerId);\n }, TOUCH_LONG_PRESS_MS);\n\n this.gestureState = {\n kind: 'arming-touch-drag',\n pointerId,\n tileId: tile.id,\n startX,\n startY,\n timer: armTimer,\n pressingTimer,\n };\n this.gestureKind = 'arming-touch-drag';\n\n const onMove = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n if (this.gestureState.kind !== 'arming-touch-drag') return;\n const dx = e.clientX - startX;\n const dy = e.clientY - startY;\n if (Math.hypot(dx, dy) > TOUCH_LONG_PRESS_SLOP_PX) {\n this.cleanupTouchArming();\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n }\n };\n const onCancel = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n if (this.gestureState.kind === 'arming-touch-drag') {\n this.cleanupTouchArming();\n }\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onCancel);\n window.addEventListener('pointercancel', onCancel);\n }\n\n private cleanupTouchArming(): void {\n if (this.gestureState.kind !== 'arming-touch-drag') return;\n const { timer, pressingTimer } = this.gestureState;\n if (timer !== null) window.clearTimeout(timer);\n if (pressingTimer !== null) window.clearTimeout(pressingTimer);\n this.gestureState = { kind: 'idle' };\n this.gestureKind = 'idle';\n this.requestUpdate();\n }\n\n private beginDragFromTouchArm(tile: MintTile, startX: number, startY: number, pointerId: number): void {\n // Synthesize the same begin call as for mouse, with a fake pointer event.\n // Refresh the layout cache once at gesture start — guarantees fresh metrics\n // even if the grid has resized since the last cache tick.\n this.updateLayoutCache();\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n const cell = this.cellMetrics;\n const gridRect = grid.getBoundingClientRect();\n const tileLeft = gridRect.left + (tile.position.colStart - 1) * (cell.width + cell.gapX);\n const tileTop = gridRect.top + (tile.position.rowStart - 1) * (cell.height + cell.gapY);\n this.gestureState = {\n kind: 'drag',\n pointerId,\n tileId: tile.id,\n pointerOffset: { dx: startX - tileLeft, dy: startY - tileTop },\n currentRect: { ...tile.position },\n blocked: false,\n };\n this.gestureKind = 'drag';\n this.lastPointerPosition = { x: startX, y: startY };\n this.attachWindowListeners();\n this.requestUpdate();\n }\n\n private beginDrag(event: PointerEvent, tile: MintTile): void {\n this.updateLayoutCache();\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n const cell = this.cellMetrics;\n const gridRect = grid.getBoundingClientRect();\n const tileLeft = gridRect.left + (tile.position.colStart - 1) * (cell.width + cell.gapX);\n const tileTop = gridRect.top + (tile.position.rowStart - 1) * (cell.height + cell.gapY);\n this.gestureState = {\n kind: 'drag',\n pointerId: event.pointerId,\n tileId: tile.id,\n pointerOffset: { dx: event.clientX - tileLeft, dy: event.clientY - tileTop },\n currentRect: { ...tile.position },\n blocked: false,\n };\n this.gestureKind = 'drag';\n this.lastPointerPosition = { x: event.clientX, y: event.clientY };\n this.attachWindowListeners();\n this.runPackerForCurrentGesture();\n }\n\n private beginResize(event: PointerEvent, tile: MintTile, mode: 'side' | 'bottom' | 'corner'): void {\n this.gestureState = {\n kind: 'resize',\n pointerId: event.pointerId,\n tileId: tile.id,\n mode,\n startPointer: { x: event.clientX, y: event.clientY },\n startSpans: { colSpan: tile.position.colSpan, rowSpan: tile.position.rowSpan },\n currentRect: { ...tile.position },\n blocked: false,\n };\n this.gestureKind = 'resize';\n this.lastPointerPosition = { x: event.clientX, y: event.clientY };\n this.attachWindowListeners();\n this.runPackerForCurrentGesture();\n }\n\n private attachWindowListeners(): void {\n window.addEventListener('pointermove', this.onWindowPointerMove);\n window.addEventListener('pointerup', this.onWindowPointerUp);\n window.addEventListener('pointercancel', this.onWindowPointerCancel);\n window.addEventListener('keydown', this.onWindowKeyDown);\n }\n\n private detachWindowListeners(): void {\n window.removeEventListener('pointermove', this.onWindowPointerMove);\n window.removeEventListener('pointerup', this.onWindowPointerUp);\n window.removeEventListener('pointercancel', this.onWindowPointerCancel);\n window.removeEventListener('keydown', this.onWindowKeyDown);\n }\n\n private handleEscapeKey(e: KeyboardEvent): void {\n if (e.key === 'Escape' && this.gestureState.kind !== 'idle') {\n e.preventDefault();\n this.cancelGesture();\n }\n }\n\n // ---------------- Pointer move / up / cancel ----------------\n\n private handlePointerMove(event: PointerEvent): void {\n const g = this.gestureState;\n if (g.kind === 'idle' || g.kind === 'arming-touch-drag') return;\n if (event.pointerId !== g.pointerId) return;\n this.lastPointerPosition = { x: event.clientX, y: event.clientY };\n this.runPackerForCurrentGesture();\n }\n\n private handlePointerUp(event: PointerEvent): void {\n const g = this.gestureState;\n if (g.kind === 'idle' || g.kind === 'arming-touch-drag') return;\n if (event.pointerId !== g.pointerId) return;\n if (g.blocked) {\n this.cancelGesture('blocked');\n return;\n }\n this.commitGesture();\n }\n\n private handlePointerCancel(event: PointerEvent): void {\n const g = this.gestureState;\n if (g.kind === 'idle') return;\n if (g.kind !== 'arming-touch-drag' && event.pointerId !== g.pointerId) return;\n this.cancelGesture();\n }\n\n // ---------------- Packer integration ----------------\n\n private runPackerForCurrentGesture(): void {\n const g = this.gestureState;\n if (g.kind !== 'drag' && g.kind !== 'resize') return;\n const tile = this.tiles.find((t) => t.id === g.tileId);\n if (!tile) {\n this.cancelGesture();\n return;\n }\n const rect = g.kind === 'drag' ? this.computeDragRect(g, tile) : this.computeResizeRect(g, tile);\n if (!rect) return;\n g.currentRect = rect;\n\n const cols = this.effectiveColumnCount;\n const result = pack(\n this.tiles.map((t) => ({ id: t.id, position: t.position, locked: t.disableMove })),\n { id: tile.id, rect },\n cols,\n );\n this.previewLayout = result.layout;\n g.blocked = result.blocked;\n this.blocked = result.blocked;\n this.requestUpdate();\n }\n\n private computeDragRect(g: Extract<GestureState, { kind: 'drag' }>, tile: MintTile): GridRect | null {\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return null;\n const cell = this.cellMetrics;\n const cols = this.effectiveColumnCount;\n const pointer = this.lastPointerPosition;\n if (!pointer) return null;\n const gridRect = grid.getBoundingClientRect();\n // Pointer position relative to grid origin, minus the where-on-the-tile offset.\n const localX = pointer.x - gridRect.left - g.pointerOffset.dx;\n const localY = pointer.y - gridRect.top - g.pointerOffset.dy;\n const colStart = Math.round(localX / (cell.width + cell.gapX)) + 1;\n const rowStart = Math.round(localY / (cell.height + cell.gapY)) + 1;\n return {\n colStart: Math.max(1, Math.min(colStart, cols - tile.position.colSpan + 1)),\n rowStart: Math.max(1, rowStart),\n colSpan: tile.position.colSpan,\n rowSpan: tile.position.rowSpan,\n };\n }\n\n private computeResizeRect(\n g: Extract<GestureState, { kind: 'resize' }>,\n tile: MintTile,\n ): GridRect | null {\n const cell = this.cellMetrics;\n const cols = this.effectiveColumnCount;\n const pointer = this.lastPointerPosition;\n if (!pointer) return null;\n const dx = pointer.x - g.startPointer.x;\n const dy = pointer.y - g.startPointer.y;\n const colDelta = Math.round(dx / (cell.width + cell.gapX));\n const rowDelta = Math.round(dy / (cell.height + cell.gapY));\n const colSpan =\n g.mode === 'bottom'\n ? g.startSpans.colSpan\n : Math.max(1, Math.min(g.startSpans.colSpan + colDelta, cols - tile.position.colStart + 1));\n const rowSpan =\n g.mode === 'side' ? g.startSpans.rowSpan : Math.max(1, g.startSpans.rowSpan + rowDelta);\n return {\n colStart: tile.position.colStart,\n rowStart: tile.position.rowStart,\n colSpan,\n rowSpan,\n };\n }\n\n // ---------------- Commit / cancel ----------------\n\n private commitGesture(): void {\n const g = this.gestureState;\n if (g.kind !== 'drag' && g.kind !== 'resize') return;\n const finalLayout = this.previewLayout;\n if (!finalLayout) {\n this.cleanupGesture();\n return;\n }\n\n const previousById = new Map(this.tiles.map((t) => [t.id, t.position]));\n const newTiles: MintTile[] = this.tiles.map((t) => {\n const placed = finalLayout.find((p) => p.id === t.id);\n return placed ? { ...t, position: placed.position } : t;\n });\n\n this.tiles = newTiles;\n\n // Dispatch per-tile change events.\n finalLayout.forEach((entry) => {\n const prev = previousById.get(entry.id);\n if (!prev || !this.positionsEqual(prev, entry.position)) {\n this.dispatchEvent(\n new CustomEvent<{ id: string; position: TilePosition }>('tilepositionchange', {\n detail: { id: entry.id, position: entry.position },\n bubbles: false,\n composed: true,\n }),\n );\n }\n });\n this.dispatchEvent(\n new CustomEvent<TileLayoutSnapshot>('tilelayoutchange', {\n detail: this.cloneSnapshot(finalLayout),\n bubbles: false,\n composed: true,\n }),\n );\n\n const movedTile = finalLayout.find((p) => p.id === g.tileId);\n if (movedTile) {\n this.liveRegionMessage =\n g.kind === 'drag'\n ? `Tile moved to row ${movedTile.position.rowStart}, column ${movedTile.position.colStart}`\n : `Tile resized to ${movedTile.position.colSpan} columns by ${movedTile.position.rowSpan} rows`;\n }\n\n this.cleanupGesture();\n }\n\n private cancelGesture(reason: 'cancel' | 'blocked' = 'cancel'): void {\n const g = this.gestureState;\n if (reason === 'blocked' && (g.kind === 'drag' || g.kind === 'resize')) {\n this.dispatchEvent(\n new CustomEvent<TileGestureBlocked>('tilegestureblocked', {\n detail: { id: g.tileId, reason: 'locked-overlap' },\n bubbles: false,\n composed: true,\n }),\n );\n }\n this.cleanupGesture();\n }\n\n private cleanupGesture(): void {\n if (this.gestureState.kind === 'arming-touch-drag') this.cleanupTouchArming();\n this.detachWindowListeners();\n this.gestureState = { kind: 'idle' };\n this.gestureKind = 'idle';\n this.previewLayout = null;\n this.blocked = false;\n this.lastPointerPosition = null;\n this.requestUpdate();\n }\n\n private positionsEqual(a: TilePosition, b: TilePosition): boolean {\n return (\n a.colStart === b.colStart &&\n a.rowStart === b.rowStart &&\n a.colSpan === b.colSpan &&\n a.rowSpan === b.rowSpan\n );\n }\n\n private cloneSnapshot(s: TileLayoutSnapshot): TileLayoutSnapshot {\n return s.map((p) => ({ id: p.id, position: { ...p.position } }));\n }\n\n private activeTileId(): string | null {\n const g = this.gestureState;\n if (g.kind === 'drag' || g.kind === 'resize' || g.kind === 'arming-touch-drag') return g.tileId;\n return null;\n }\n\n // ---------------- Public API ----------------\n\n /** Read-only snapshot of the current layout. Mirrors `BsDockManagerComponent.captureLayout()`. */\n captureLayout(): TileLayoutSnapshot {\n return this.tiles.map((t) => ({ id: t.id, position: { ...t.position } }));\n }\n\n /**\n * True while a drag or resize is in flight. The Angular wrapper uses this to\n * avoid clobbering `tiles` mid-gesture. Touch long-press arming does NOT\n * count — the WC isn't yet owning the layout during the hold.\n */\n get isGestureActive(): boolean {\n return this.gestureState.kind === 'drag' || this.gestureState.kind === 'resize';\n }\n\n // ---------------- Keyboard ----------------\n\n private onTileKeyDown(event: KeyboardEvent, tile: MintTile): void {\n if (tile.disableMove && tile.disableResize) return;\n const km = this.keyboardState;\n\n if (km.kind === 'idle') {\n if (event.key === ' ' && !tile.disableMove) {\n event.preventDefault();\n this.keyboardState = { kind: 'move', tileId: tile.id };\n this.liveRegionMessage = 'Move mode enabled. Use arrow keys to move; Enter to commit, Escape to cancel.';\n return;\n }\n return;\n }\n\n if (km.tileId !== tile.id) return;\n\n if (event.key === 'Escape' || event.key === 'Enter') {\n event.preventDefault();\n this.keyboardState = { kind: 'idle' };\n this.liveRegionMessage = event.key === 'Enter' ? 'Move committed.' : 'Move cancelled.';\n return;\n }\n\n if (event.key.startsWith('Arrow')) {\n event.preventDefault();\n const isResize = event.shiftKey;\n this.applyKeyboardStep(tile, event.key as ArrowKey, isResize);\n }\n }\n\n private applyKeyboardStep(tile: MintTile, key: ArrowKey, isResize: boolean): void {\n const cols = this.effectiveColumnCount;\n const dx = key === 'ArrowLeft' ? -1 : key === 'ArrowRight' ? 1 : 0;\n const dy = key === 'ArrowUp' ? -1 : key === 'ArrowDown' ? 1 : 0;\n const newRect: GridRect = isResize\n ? {\n colStart: tile.position.colStart,\n rowStart: tile.position.rowStart,\n colSpan: Math.max(1, Math.min(tile.position.colSpan + dx, cols - tile.position.colStart + 1)),\n rowSpan: Math.max(1, tile.position.rowSpan + dy),\n }\n : {\n colStart: Math.max(1, Math.min(tile.position.colStart + dx, cols - tile.position.colSpan + 1)),\n rowStart: Math.max(1, tile.position.rowStart + dy),\n colSpan: tile.position.colSpan,\n rowSpan: tile.position.rowSpan,\n };\n\n const result = pack(\n this.tiles.map((t) => ({ id: t.id, position: t.position, locked: t.disableMove })),\n { id: tile.id, rect: newRect },\n cols,\n );\n if (result.blocked) {\n this.liveRegionMessage = 'Move blocked.';\n return;\n }\n const newTiles: MintTile[] = this.tiles.map((t) => {\n const placed = result.layout.find((p) => p.id === t.id);\n return placed ? { ...t, position: placed.position } : t;\n });\n this.tiles = newTiles;\n this.dispatchEvent(\n new CustomEvent<TileLayoutSnapshot>('tilelayoutchange', {\n detail: this.cloneSnapshot(result.layout),\n bubbles: false,\n composed: true,\n }),\n );\n result.layout.forEach((entry) => {\n this.dispatchEvent(\n new CustomEvent<{ id: string; position: TilePosition }>('tilepositionchange', {\n detail: { id: entry.id, position: entry.position },\n bubbles: false,\n composed: true,\n }),\n );\n });\n this.liveRegionMessage = isResize\n ? `Tile resized to ${newRect.colSpan} columns by ${newRect.rowSpan} rows`\n : `Tile moved to row ${newRect.rowStart}, column ${newRect.colStart}`;\n }\n}\n\ntype ArrowKey = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';\n\nif (typeof customElements !== 'undefined' && !customElements.get('mp-tile-manager')) {\n customElements.define('mp-tile-manager', MintTileManagerElement);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'mp-tile-manager': MintTileManagerElement;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAUA;;;;;;;AAOG;MAaU,eAAe,CAAA;AAZ5B,IAAA,WAAA,GAAA;AAaW,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,QAAQ,wEAAU;AAC7B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,8EAAgB;AACzC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK,kFAAC;AACnC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAU,KAAK,oFAAC;AACrC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;QAElC,IAAA,CAAA,cAAc,GAAG,MAAM,EAAgB;AAEvC,QAAA,IAAA,CAAA,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAuB,WAAW,CAAC;AACjE,QAAA,IAAA,CAAA,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAuB,YAAY,CAAC;AAC7E,IAAA;+GAXY,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MA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;;AAKF,IAAI,OAAO,cAAc,KAAK,WAAW,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;AACnF,IAAA,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AAClE;;ACp4BA;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-tile-manager.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/components/tile.component.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/components/tile-manager.component.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/components/tile-header.component.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/types/grid-rect.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/utils/pack.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/web-components/mint-tile-manager.element.template.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/src/lib/web-components/mint-tile-manager.element.ts","../../../../libs/mintplayer-ng-bootstrap/tile-manager/mintplayer-ng-bootstrap-tile-manager.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n TemplateRef,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { TilePosition } from '../types/tile-position';\n\n/**\n * One tile inside a `<bs-tile-manager>`.\n *\n * The component captures two `TemplateRef`s — one for the header (a child\n * `<bs-tile-header>`) and one for the body (everything else) — which the\n * manager projects into named slots on the underlying `<mp-tile-manager>`\n * web component (`${id}-header` and `${id}-content`).\n */\n@Component({\n selector: 'bs-tile',\n template: `\n <ng-template #headerTpl>\n <ng-content select=\"bs-tile-header\"></ng-content>\n </ng-template>\n <ng-template #contentTpl>\n <ng-content></ng-content>\n </ng-template>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTileComponent {\n readonly id = input.required<string>();\n readonly position = input.required<TilePosition>();\n readonly disableMove = input<boolean>(false);\n readonly disableResize = input<boolean>(false);\n readonly label = input<string | null>(null);\n\n readonly positionChange = output<TilePosition>();\n\n readonly headerTpl = viewChild.required<TemplateRef<unknown>>('headerTpl');\n readonly contentTpl = viewChild.required<TemplateRef<unknown>>('contentTpl');\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n ElementRef,\n computed,\n contentChildren,\n effect,\n input,\n output,\n viewChild,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { BsTileComponent } from './tile.component';\nimport {\n MintTile,\n MintTileManagerElement,\n TileDragMode,\n TileResizeMode,\n} from '../web-components/mint-tile-manager.element';\nimport { TileLayoutSnapshot, TileGestureBlocked } from '../types/tile-layout-snapshot';\nimport { TilePosition } from '../types/tile-position';\n\n@Component({\n selector: 'bs-tile-manager',\n template: `\n <mp-tile-manager\n #manager\n class=\"bs-tile-manager\"\n [attr.column-count]=\"columnCountAttr()\"\n [attr.min-column-width]=\"minColumnWidth()\"\n [attr.min-row-height]=\"minRowHeight()\"\n [attr.gap]=\"gap()\"\n [attr.drag-mode]=\"dragMode()\"\n [attr.resize-mode]=\"resizeMode()\"\n [attr.animate-reflow]=\"animateReflow() ? '' : null\"\n [attr.label]=\"label()\"\n (tilelayoutchange)=\"onLayoutChange($event)\"\n (tilepositionchange)=\"onPositionChange($event)\"\n (tilegestureblocked)=\"onGestureBlocked($event)\"\n >\n @for (tile of tiles(); track tile.id()) {\n <div [attr.slot]=\"tile.id() + '-header'\" class=\"bs-tile-slot\">\n <ng-container *ngTemplateOutlet=\"tile.headerTpl()\"></ng-container>\n </div>\n <div [attr.slot]=\"tile.id() + '-content'\" class=\"bs-tile-slot\">\n <ng-container *ngTemplateOutlet=\"tile.contentTpl()\"></ng-container>\n </div>\n }\n </mp-tile-manager>\n `,\n styles: [\n `\n :host {\n display: block;\n width: 100%;\n }\n .bs-tile-manager {\n display: block;\n width: 100%;\n }\n .bs-tile-slot {\n display: contents;\n }\n `,\n ],\n imports: [NgTemplateOutlet],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTileManagerComponent implements AfterViewInit {\n readonly columnCount = input<number | null>(null);\n readonly minColumnWidth = input<string>('200px');\n readonly minRowHeight = input<string>('8rem');\n readonly gap = input<string>('0.5rem');\n readonly dragMode = input<TileDragMode>('header');\n readonly resizeMode = input<TileResizeMode>('hover');\n readonly animateReflow = input<boolean>(true);\n readonly label = input<string | null>(null);\n\n readonly layoutChange = output<TileLayoutSnapshot>();\n readonly gestureBlocked = output<TileGestureBlocked>();\n\n readonly tiles = contentChildren(BsTileComponent);\n readonly managerRef = viewChild<ElementRef<MintTileManagerElement>>('manager');\n\n protected readonly columnCountAttr = computed(() => {\n const c = this.columnCount();\n return c && c > 0 ? String(c) : null;\n });\n\n // Snapshot of Angular tile state, derived from contentChildren signals.\n // Re-runs whenever any tile's id, position, disableMove, disableResize, or label changes.\n // contentChildren() can surface a child before Angular has finished binding its\n // required inputs; reading them then throws NG0950. flatMap-with-try lets us\n // skip the not-yet-bound entry — the effect re-runs once binding completes.\n private readonly tilesSnapshot = computed<MintTile[]>(() =>\n this.tiles().flatMap((t) => {\n try {\n return [{\n id: t.id(),\n position: t.position(),\n disableMove: t.disableMove(),\n disableResize: t.disableResize(),\n label: t.label(),\n }];\n } catch {\n return [];\n }\n }),\n );\n\n constructor() {\n effect(() => {\n const snapshot = this.tilesSnapshot();\n const ref = this.managerRef();\n if (!ref) return;\n ref.nativeElement.tiles = snapshot;\n });\n }\n\n ngAfterViewInit(): void {\n // First push happens via the constructor effect once the view is alive.\n }\n\n /** Returns the current layout. Mirrors `BsDockManagerComponent.captureLayout()`. */\n captureLayout(): TileLayoutSnapshot {\n const ref = this.managerRef();\n if (!ref) return [];\n return Array.from(ref.nativeElement.tiles ?? []).map((t) => ({\n id: t.id,\n position: { ...t.position },\n }));\n }\n\n protected onLayoutChange(event: Event): void {\n const detail = (event as CustomEvent<TileLayoutSnapshot>).detail;\n if (detail) this.layoutChange.emit(detail);\n }\n\n protected onPositionChange(event: Event): void {\n const detail = (event as CustomEvent<{ id: string; position: TilePosition }>).detail;\n if (!detail) return;\n const tile = this.tiles().find((t) => t.id() === detail.id);\n tile?.positionChange.emit(detail.position);\n }\n\n protected onGestureBlocked(event: Event): void {\n const detail = (event as CustomEvent<TileGestureBlocked>).detail;\n if (detail) this.gestureBlocked.emit(detail);\n }\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'bs-tile-header',\n template: `<ng-content></ng-content>`,\n styles: [\n `:host {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.5rem 0.75rem;\n font-size: 0.875rem;\n font-weight: 500;\n color: var(--bs-body-color, inherit);\n background: linear-gradient(to bottom, rgba(var(--bs-primary-rgb, 13, 110, 253), 0.10), rgba(var(--bs-primary-rgb, 13, 110, 253), 0.04));\n border-bottom: 1px solid var(--bs-border-color, #dee2e6);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n touch-action: none;\n user-select: none;\n -webkit-user-select: none;\n -webkit-touch-callout: none;\n }`,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTileHeaderComponent {}\n","/**\n * Half-open rectangle in grid coordinates: `[colStart, colStart + colSpan) × [rowStart, rowStart + rowSpan)`.\n * Same shape as `TilePosition` but used internally for overlap math; kept\n * as its own type so call-sites read clearly.\n */\nexport interface GridRect {\n colStart: number;\n rowStart: number;\n colSpan: number;\n rowSpan: number;\n}\n\nexport function rectsOverlap(a: GridRect, b: GridRect): boolean {\n return (\n a.colStart < b.colStart + b.colSpan &&\n b.colStart < a.colStart + a.colSpan &&\n a.rowStart < b.rowStart + b.rowSpan &&\n b.rowStart < a.rowStart + a.rowSpan\n );\n}\n","import { TilePosition } from '../types/tile-position';\nimport { TileLayoutSnapshot } from '../types/tile-layout-snapshot';\nimport { GridRect, rectsOverlap } from '../types/grid-rect';\n\ninterface PackInputTile {\n id: string;\n position: TilePosition;\n locked: boolean;\n}\n\ninterface Placement {\n id: string;\n position: TilePosition;\n}\n\n/**\n * Vertical-compact packer. The pinned tile's rect is the user's gesture; all\n * other tiles flow around it (locked tiles stay put; movable tiles get pushed\n * out of the way and gravity-compacted upward).\n *\n * Returns `blocked: true` if the pinned rect overlaps a locked tile or no\n * valid layout exists; the caller should snap back and not commit.\n */\nexport function pack(\n tiles: ReadonlyArray<PackInputTile>,\n pinned: { id: string; rect: GridRect },\n columnCount: number,\n): { layout: TileLayoutSnapshot; blocked: boolean } {\n const pinnedTile = tiles.find((t) => t.id === pinned.id);\n if (!pinnedTile) {\n throw new Error(`pack: pinned tile \"${pinned.id}\" is not in the tiles array`);\n }\n\n const pinnedPlacement: Placement = { id: pinned.id, position: { ...pinned.rect } };\n\n const lockedPlacements: ReadonlyArray<Placement> = tiles\n .filter((t) => t.locked && t.id !== pinned.id)\n .map((t) => ({ id: t.id, position: { ...t.position } }));\n\n const lockedOverlap = lockedPlacements.some((l) =>\n rectsOverlap(l.position, pinnedPlacement.position),\n );\n if (lockedOverlap) {\n return { layout: snapshotFromInput(tiles), blocked: true };\n }\n\n const fixed: ReadonlyArray<Placement> = [pinnedPlacement, ...lockedPlacements];\n\n const movables = tiles\n .filter((t) => !t.locked && t.id !== pinned.id)\n .slice()\n .sort((a, b) => {\n const dRow = a.position.rowStart - b.position.rowStart;\n return dRow !== 0 ? dRow : a.position.colStart - b.position.colStart;\n });\n\n const placedMovables = movables.reduce<Placement[]>((acc, t) => {\n const all = [...fixed, ...acc];\n const placed = placeTile(t, all, columnCount);\n return placed ? [...acc, placed] : acc;\n }, []);\n\n if (placedMovables.length !== movables.length) {\n return { layout: snapshotFromInput(tiles), blocked: true };\n }\n\n const compacted = compactStable(placedMovables, fixed, columnCount);\n\n const placementById = new Map<string, TilePosition>(\n [pinnedPlacement, ...lockedPlacements, ...compacted].map((p) => [p.id, p.position]),\n );\n\n // Preserve the input tile order in the output snapshot — keeps layout\n // identity stable across pack() calls with the same input.\n const layout: TileLayoutSnapshot = tiles.map((t) => ({\n id: t.id,\n position: placementById.get(t.id) ?? { ...t.position },\n }));\n\n return { layout, blocked: false };\n}\n\nfunction snapshotFromInput(tiles: ReadonlyArray<PackInputTile>): TileLayoutSnapshot {\n return tiles.map((t) => ({ id: t.id, position: { ...t.position } }));\n}\n\nfunction placeTile(\n tile: PackInputTile,\n obstacles: ReadonlyArray<Placement>,\n columnCount: number,\n): Placement | null {\n const { colSpan, rowSpan } = tile.position;\n if (colSpan > columnCount) return null;\n\n const inPlaceFits = !obstacles.some((o) => rectsOverlap(tile.position, o.position));\n if (inPlaceFits) {\n return { id: tile.id, position: { ...tile.position } };\n }\n\n const candidate = firstFit({ colSpan, rowSpan }, obstacles, columnCount);\n return candidate ? { id: tile.id, position: candidate } : null;\n}\n\nfunction firstFit(\n size: { colSpan: number; rowSpan: number },\n obstacles: ReadonlyArray<Placement>,\n columnCount: number,\n): TilePosition | null {\n const lastRow = obstacles.reduce(\n (max, o) => Math.max(max, o.position.rowStart + o.position.rowSpan - 1),\n 0,\n );\n // Worst case: stack right after the bottommost obstacle.\n const rowsToTry = lastRow + size.rowSpan;\n const cols = columnCount - size.colSpan + 1;\n if (cols < 1) return null;\n\n // Imperative loops here are deliberate — this runs on every pointermove\n // during a drag (live reflow) and the array-allocation patterns previously\n // used here generated GC pressure visible as drag jank.\n for (let rowStart = 1; rowStart <= rowsToTry; rowStart++) {\n for (let c = 0; c < cols; c++) {\n const colStart = c + 1;\n let collides = false;\n for (let i = 0; i < obstacles.length; i++) {\n if (\n rectsOverlap(\n { rowStart, colStart, colSpan: size.colSpan, rowSpan: size.rowSpan },\n obstacles[i].position,\n )\n ) {\n collides = true;\n break;\n }\n }\n if (!collides) {\n return { rowStart, colStart, colSpan: size.colSpan, rowSpan: size.rowSpan };\n }\n }\n }\n return null;\n}\n\nfunction compactStable(\n placements: ReadonlyArray<Placement>,\n fixed: ReadonlyArray<Placement>,\n columnCount: number,\n): ReadonlyArray<Placement> {\n return iterate(placements, fixed, columnCount, 10);\n}\n\nfunction iterate(\n placements: ReadonlyArray<Placement>,\n fixed: ReadonlyArray<Placement>,\n columnCount: number,\n iterations: number,\n): ReadonlyArray<Placement> {\n if (iterations <= 0) return placements;\n const { result, changed } = compactOnce(placements, fixed, columnCount);\n return changed ? iterate(result, fixed, columnCount, iterations - 1) : result;\n}\n\nfunction compactOnce(\n placements: ReadonlyArray<Placement>,\n fixed: ReadonlyArray<Placement>,\n columnCount: number,\n): { result: ReadonlyArray<Placement>; changed: boolean } {\n // Process in current visual order: top-to-bottom, then left-to-right.\n const ordered = placements\n .slice()\n .sort((a, b) => {\n const dRow = a.position.rowStart - b.position.rowStart;\n return dRow !== 0 ? dRow : a.position.colStart - b.position.colStart;\n });\n\n return ordered.reduce<{ result: Placement[]; changed: boolean }>(\n (acc, p) => {\n const others = [...fixed, ...acc.result.filter((r) => r.id !== p.id)];\n const slid = slideUp(p.position, others);\n const changed = slid.rowStart !== p.position.rowStart;\n return {\n result: [...acc.result, { id: p.id, position: slid }],\n changed: acc.changed || changed,\n };\n },\n { result: [], changed: false },\n );\n}\n\nfunction slideUp(pos: TilePosition, others: ReadonlyArray<Placement>): TilePosition {\n if (pos.rowStart <= 1) return pos;\n // Same hot path as firstFit — keep imperative for GC-pressure reasons.\n for (let rowStart = 1; rowStart < pos.rowStart; rowStart++) {\n let collides = false;\n for (let i = 0; i < others.length; i++) {\n if (rectsOverlap({ ...pos, rowStart }, others[i].position)) {\n collides = true;\n break;\n }\n }\n if (!collides) return { ...pos, rowStart };\n }\n return pos;\n}\n","// AUTO-GENERATED — do not edit by hand.\n// Source: mint-tile-manager.element.html + mint-tile-manager.element.scss\n// Regenerate with the codegen-wc Nx target.\n\nimport { html, unsafeCSS } from 'lit';\n\nexport const template = html`<!-- Tile shells are rendered dynamically by render(). This file exists so the\n codegen-wc target produces a \\`styles\\` export from the sibling .scss; the\n \\`template\\` export it generates is intentionally unused. -->`;\nexport const styles = unsafeCSS(`:host {\n display: block;\n position: relative;\n box-sizing: border-box;\n width: 100%;\n contain: layout paint style;\n --bs-tile-radius: 0.5rem;\n --bs-tile-bg: var(--bs-body-bg, #fff);\n --bs-tile-border: var(--bs-border-color, #dee2e6);\n --bs-tile-shadow: var(--bs-box-shadow-sm, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075));\n --bs-tile-handle-color: var(--bs-secondary, #6c757d);\n --bs-tile-blocked-color: var(--bs-danger, #dc3545);\n}\n\n.tile-grid {\n display: grid;\n grid-auto-rows: var(--mp-tile-row-height, 8rem);\n gap: var(--mp-tile-gap, 0.5rem);\n width: 100%;\n position: relative;\n}\n\n.tile {\n position: relative;\n display: flex;\n flex-direction: column;\n background: var(--bs-tile-bg);\n border: 1px solid var(--bs-tile-border);\n border-radius: var(--bs-tile-radius);\n box-shadow: var(--bs-tile-shadow);\n overflow: hidden;\n min-width: 0;\n min-height: 0;\n transition: transform 150ms cubic-bezier(0.2, 0, 0, 1);\n will-change: transform;\n}\n\n.tile[data-dragging=true] {\n z-index: 5;\n cursor: grabbing;\n box-shadow: var(--bs-box-shadow, 0 0.5rem 1rem rgba(0, 0, 0, 0.15));\n transition: none;\n}\n\n.tile[data-resizing=true] {\n z-index: 4;\n transition: width 150ms cubic-bezier(0.2, 0, 0, 1), height 150ms cubic-bezier(0.2, 0, 0, 1);\n}\n\n.tile[data-blocked=true] {\n outline: 2px solid var(--bs-tile-blocked-color);\n outline-offset: -2px;\n animation: tile-shake 200ms ease-in-out;\n}\n\n@keyframes tile-shake {\n 0%, 100% {\n transform: translateX(0);\n }\n 25% {\n transform: translateX(-3px);\n }\n 75% {\n transform: translateX(3px);\n }\n}\n.tile[data-pressing=true] {\n filter: brightness(0.96);\n transition: filter 100ms ease-out;\n}\n\n.tile__header-shell {\n flex: 0 0 auto;\n user-select: none;\n -webkit-user-select: none;\n -webkit-touch-callout: none;\n cursor: grab;\n}\n\n.tile[data-drag-mode=off] .tile__header-shell,\n.tile[data-locked-move=true] .tile__header-shell {\n cursor: default;\n}\n\n.tile__content-shell {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n overflow: auto;\n}\n\n.tile__resize-side,\n.tile__resize-bottom,\n.tile__resize-corner {\n position: absolute;\n z-index: 2;\n background: transparent;\n touch-action: none;\n -webkit-user-select: none;\n user-select: none;\n opacity: 0;\n transition: opacity 120ms ease-out;\n}\n\n.tile:hover .tile__resize-side,\n.tile:hover .tile__resize-bottom,\n.tile:hover .tile__resize-corner,\n:host([resize-mode=always]) .tile__resize-side,\n:host([resize-mode=always]) .tile__resize-bottom,\n:host([resize-mode=always]) .tile__resize-corner {\n opacity: 1;\n}\n\n@media (pointer: coarse) {\n .tile__resize-side,\n .tile__resize-bottom,\n .tile__resize-corner {\n opacity: 1;\n }\n}\n.tile__resize-side {\n right: -2px;\n top: 25%;\n bottom: 25%;\n width: 6px;\n cursor: ew-resize;\n}\n\n.tile__resize-bottom {\n left: 25%;\n right: 25%;\n bottom: -2px;\n height: 6px;\n cursor: ns-resize;\n}\n\n.tile__resize-corner {\n right: -2px;\n bottom: -2px;\n width: 14px;\n height: 14px;\n cursor: nwse-resize;\n}\n\n.tile__resize-corner::before {\n content: \"\";\n position: absolute;\n right: 3px;\n bottom: 3px;\n width: 8px;\n height: 8px;\n border-right: 2px solid var(--bs-tile-handle-color);\n border-bottom: 2px solid var(--bs-tile-handle-color);\n border-bottom-right-radius: 2px;\n}\n\n:host([resize-mode=off]) .tile__resize-side,\n:host([resize-mode=off]) .tile__resize-bottom,\n:host([resize-mode=off]) .tile__resize-corner {\n display: none;\n}\n\n.tile[data-locked-resize=true] .tile__resize-side,\n.tile[data-locked-resize=true] .tile__resize-bottom,\n.tile[data-locked-resize=true] .tile__resize-corner {\n display: none;\n}\n\n.tile-grid__live-region,\n.tile-grid__sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .tile {\n transition: none !important;\n }\n .tile[data-blocked=true] {\n animation: none;\n }\n}\n:host(:focus-visible) {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: 2px;\n}\n\n.tile:focus-visible {\n outline: 2px solid var(--bs-primary, #0d6efd);\n outline-offset: -2px;\n}`);\n","import { LitElement, html, type TemplateResult, type PropertyValues, nothing } from 'lit';\nimport { LiveAnnouncerController } from '@mintplayer/ng-bootstrap/web-components/a11y';\nimport { TilePosition } from '../types/tile-position';\nimport { TileLayoutSnapshot, TileGestureBlocked } from '../types/tile-layout-snapshot';\nimport { GridRect } from '../types/grid-rect';\nimport { pack } from '../utils/pack';\nimport { styles } from './mint-tile-manager.element.template';\n\nconst TILE_INSTRUCTIONS =\n 'Press M to enter move mode. In move mode, arrow keys move the tile, Shift with arrow keys resize it, Enter commits, Escape cancels.';\nlet tileManagerInstanceCounter = 0;\n\nexport interface MintTile {\n id: string;\n position: TilePosition;\n disableMove: boolean;\n disableResize: boolean;\n label: string | null;\n}\n\nexport type TileDragMode = 'tile' | 'header' | 'off';\nexport type TileResizeMode = 'hover' | 'always' | 'off';\n\ntype GestureState =\n | { kind: 'idle' }\n | {\n kind: 'arming-touch-drag';\n pointerId: number;\n tileId: string;\n startX: number;\n startY: number;\n timer: number | null;\n pressingTimer: number | null;\n }\n | {\n kind: 'drag';\n pointerId: number;\n tileId: string;\n pointerOffset: { dx: number; dy: number };\n currentRect: GridRect;\n blocked: boolean;\n }\n | {\n kind: 'resize';\n pointerId: number;\n tileId: string;\n mode: 'side' | 'bottom' | 'corner';\n startPointer: { x: number; y: number };\n startSpans: { colSpan: number; rowSpan: number };\n currentRect: GridRect;\n blocked: boolean;\n };\n\ntype KeyboardMode =\n | { kind: 'idle' }\n | { kind: 'move'; tileId: string }\n | { kind: 'resize'; tileId: string };\n\nconst TOUCH_LONG_PRESS_MS = 600;\nconst TOUCH_LONG_PRESS_SLOP_PX = 10;\nconst TOUCH_PRESS_FEEDBACK_DELAY_MS = 150;\nconst POINTER_DRAG_THRESHOLD_PX = 5;\n\nexport class MintTileManagerElement extends LitElement {\n static override styles = [styles];\n\n static override get observedAttributes(): string[] {\n return [\n ...(super.observedAttributes ?? []),\n 'column-count',\n 'min-column-width',\n 'min-row-height',\n 'gap',\n 'drag-mode',\n 'resize-mode',\n 'animate-reflow',\n 'label',\n ];\n }\n\n static override properties = {\n tiles: { attribute: false },\n columnCount: { attribute: 'column-count', type: Number },\n minColumnWidth: { attribute: 'min-column-width', type: String },\n minRowHeight: { attribute: 'min-row-height', type: String },\n gap: { attribute: 'gap', type: String },\n dragMode: { attribute: 'drag-mode', type: String, reflect: true },\n resizeMode: { attribute: 'resize-mode', type: String, reflect: true },\n animateReflow: { attribute: 'animate-reflow', type: Boolean },\n label: { attribute: 'label', type: String },\n previewLayout: { state: true },\n gestureKind: { state: true },\n blocked: { state: true },\n effectiveColumnCount: { state: true },\n keyboardMode: { state: true },\n focusedTileId: { state: true },\n };\n\n tiles: ReadonlyArray<MintTile> = [];\n columnCount: number | null = null;\n minColumnWidth = '200px';\n minRowHeight = '8rem';\n gap = '0.5rem';\n dragMode: TileDragMode = 'header';\n resizeMode: TileResizeMode = 'hover';\n animateReflow = true;\n label: string | null = null;\n\n private gestureState: GestureState = { kind: 'idle' };\n private keyboardState: KeyboardMode = { kind: 'idle' };\n\n // State-tracked redraw triggers (Lit re-renders when these change).\n protected previewLayout: TileLayoutSnapshot | null = null;\n protected gestureKind: GestureState['kind'] = 'idle';\n protected blocked = false;\n protected effectiveColumnCount = 1;\n protected focusedTileId: string | null = null;\n\n private readonly liveAnnouncer = new LiveAnnouncerController(this);\n private readonly instanceId = `mp-tile-manager-${++tileManagerInstanceCounter}`;\n private get instructionsId(): string {\n return `${this.instanceId}-instructions`;\n }\n\n private hostResizeObserver: ResizeObserver | null = null;\n private flipPreviousRects: Map<string, DOMRect> = new Map();\n\n // Cached layout metrics. Refreshed lazily in updated()/firstUpdated() and on\n // ResizeObserver ticks — never from render(), so the per-tile pointer-move\n // path stays free of getComputedStyle / getBoundingClientRect calls.\n private cellMetrics = { width: 0, height: 0, gapX: 0, gapY: 0 };\n\n // Bound handlers — created once so add/remove pair correctly.\n private readonly onWindowPointerMove = (e: PointerEvent) => this.handlePointerMove(e);\n private readonly onWindowPointerUp = (e: PointerEvent) => this.handlePointerUp(e);\n private readonly onWindowPointerCancel = (e: PointerEvent) => this.handlePointerCancel(e);\n private readonly onWindowKeyDown = (e: KeyboardEvent) => this.handleEscapeKey(e);\n private readonly onVisibilityChange = () => {\n if (document.visibilityState === 'hidden') this.cancelGesture();\n };\n\n override render(): TemplateResult {\n const layoutSource = this.previewLayout ?? this.tiles.map((t) => ({ id: t.id, position: t.position }));\n const tileById = new Map(this.tiles.map((t) => [t.id, t]));\n\n const gridStyle = this.computeGridStyle();\n\n // role=\"region\" + button-per-tile (PRD §10 Q1): a tile board's dimensions\n // change under user reflow, so the static grid contract (rowindex/colindex)\n // is a poor fit. Tiles are activatable buttons whose move/resize is\n // discoverable through aria-describedby's instructions string.\n return html`\n <div\n class=\"tile-grid\"\n role=\"region\"\n aria-label=${this.label ?? 'Tile board'}\n aria-describedby=${this.instructionsId}\n style=${gridStyle}\n >\n ${layoutSource.map((entry) => {\n const tile = tileById.get(entry.id);\n if (!tile) return nothing;\n return this.renderTile(tile, entry.position);\n })}\n </div>\n <div id=${this.instructionsId} class=\"tile-grid__sr-only\">${TILE_INSTRUCTIONS}</div>\n ${this.liveAnnouncer.template()}\n `;\n }\n\n private renderTile(tile: MintTile, pos: TilePosition): TemplateResult {\n const isDragging = this.gestureKind === 'drag' && this.activeTileId() === tile.id;\n const isResizing = this.gestureKind === 'resize' && this.activeTileId() === tile.id;\n const isBlocked = (isDragging || isResizing) && this.blocked;\n const isPressing = this.gestureKind === 'arming-touch-drag' && this.activeTileId() === tile.id;\n const transform = this.computeActiveTransform(tile.id);\n\n // Inline width/height during a pointer-resize gesture so the tile pixel\n // size can ride a CSS transition between span states. The grid still\n // allocates the new span area instantly; the active tile's visible size\n // lags 150ms behind. Without this, grid-column/grid-row span changes are\n // not animatable in CSS and the tile snaps. Reduced-motion is gated by\n // the global `@media (prefers-reduced-motion: reduce)` rule in SCSS.\n const cell = this.cellMetrics;\n const inlineSize = isResizing && cell.width > 0\n ? {\n width: pos.colSpan * cell.width + (pos.colSpan - 1) * cell.gapX,\n height: pos.rowSpan * cell.height + (pos.rowSpan - 1) * cell.gapY,\n }\n : null;\n\n const style = [\n `grid-column: ${pos.colStart} / span ${pos.colSpan}`,\n `grid-row: ${pos.rowStart} / span ${pos.rowSpan}`,\n transform ? `transform: ${transform}` : '',\n inlineSize ? `width: ${inlineSize.width}px` : '',\n inlineSize ? `height: ${inlineSize.height}px` : '',\n ]\n .filter(Boolean)\n .join('; ');\n\n const isFocusableStop = this.resolveFocusableTileId() === tile.id;\n return html`\n <div\n class=\"tile\"\n role=\"button\"\n tabindex=${isFocusableStop ? '0' : '-1'}\n data-tile-id=${tile.id}\n data-dragging=${isDragging ? 'true' : 'false'}\n data-resizing=${isResizing ? 'true' : 'false'}\n data-blocked=${isBlocked ? 'true' : 'false'}\n data-pressing=${isPressing ? 'true' : 'false'}\n data-drag-mode=${this.dragMode}\n data-locked-move=${tile.disableMove ? 'true' : 'false'}\n data-locked-resize=${tile.disableResize ? 'true' : 'false'}\n aria-label=${tile.label ?? nothing}\n style=${style}\n @pointerdown=${(e: PointerEvent) => this.onTilePointerDown(e, tile)}\n @keydown=${(e: KeyboardEvent) => this.onTileKeyDown(e, tile)}\n @focus=${() => this.onTileFocus(tile)}\n >\n <div class=\"tile__header-shell\">\n <slot name=${`${tile.id}-header`}></slot>\n </div>\n <div class=\"tile__content-shell\">\n <slot name=${`${tile.id}-content`}></slot>\n </div>\n ${tile.disableResize || this.resizeMode === 'off'\n ? nothing\n : html`\n <div class=\"tile__resize-side\" data-resize=\"side\"\n @pointerdown=${(e: PointerEvent) => this.onResizeHandlePointerDown(e, tile, 'side')}></div>\n <div class=\"tile__resize-bottom\" data-resize=\"bottom\"\n @pointerdown=${(e: PointerEvent) => this.onResizeHandlePointerDown(e, tile, 'bottom')}></div>\n <div class=\"tile__resize-corner\" data-resize=\"corner\"\n @pointerdown=${(e: PointerEvent) => this.onResizeHandlePointerDown(e, tile, 'corner')}></div>\n `}\n </div>\n `;\n }\n\n private computeGridStyle(): string {\n const tracks =\n this.columnCount && this.columnCount > 0\n ? `repeat(${this.columnCount}, minmax(0, 1fr))`\n : `repeat(auto-fit, minmax(${this.minColumnWidth}, 1fr))`;\n return [\n `grid-template-columns: ${tracks}`,\n `--mp-tile-row-height: ${this.minRowHeight}`,\n `--mp-tile-gap: ${this.gap}`,\n ].join('; ');\n }\n\n /**\n * Refresh the cached layout metrics by reading layout / computed-style state\n * once. Called from firstUpdated, the ResizeObserver tick, and updated()\n * when an input that affects metrics changes — never from render().\n */\n private updateLayoutCache(): void {\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) {\n this.effectiveColumnCount =\n this.columnCount && this.columnCount > 0 ? this.columnCount : 1;\n return;\n }\n const cs = getComputedStyle(grid);\n if (this.columnCount && this.columnCount > 0) {\n this.effectiveColumnCount = this.columnCount;\n } else {\n const tracks = cs.gridTemplateColumns.split(/\\s+/).filter(Boolean);\n this.effectiveColumnCount = Math.max(1, tracks.length);\n }\n const rect = grid.getBoundingClientRect();\n const cols = this.effectiveColumnCount;\n const gapX = parseFloat(cs.columnGap) || 0;\n const gapY = parseFloat(cs.rowGap) || 0;\n const width = (rect.width - (cols - 1) * gapX) / cols;\n const height = parseFloat(cs.gridAutoRows) || rect.width / cols;\n this.cellMetrics = { width, height, gapX, gapY };\n }\n\n private computeActiveTransform(id: string): string | null {\n const g = this.gestureState;\n if (g.kind !== 'drag' || g.tileId !== id) return null;\n const pointer = this.lastPointerPosition;\n if (!pointer) return null;\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return null;\n // Cached cellMetrics is stale by at most one frame after a resize — fine\n // for the visual translate. gridRect read here is unavoidable: we need\n // the live grid origin to convert pointer (viewport coords) into\n // grid-relative space. One read per render, not one per tile.\n const gridRect = grid.getBoundingClientRect();\n const cell = this.cellMetrics;\n const snapped = g.currentRect;\n const desiredLeft = pointer.x - gridRect.left - g.pointerOffset.dx;\n const desiredTop = pointer.y - gridRect.top - g.pointerOffset.dy;\n const snappedLeft = (snapped.colStart - 1) * (cell.width + cell.gapX);\n const snappedTop = (snapped.rowStart - 1) * (cell.height + cell.gapY);\n return `translate(${Math.round(desiredLeft - snappedLeft)}px, ${Math.round(desiredTop - snappedTop)}px)`;\n }\n\n // ---------------- Lifecycle ----------------\n\n override connectedCallback(): void {\n super.connectedCallback();\n document.addEventListener('visibilitychange', this.onVisibilityChange);\n }\n\n override disconnectedCallback(): void {\n this.cancelGesture();\n this.detachWindowListeners();\n document.removeEventListener('visibilitychange', this.onVisibilityChange);\n this.hostResizeObserver?.disconnect();\n this.hostResizeObserver = null;\n super.disconnectedCallback();\n }\n\n protected override firstUpdated(): void {\n // Seed the layout cache once the shadow DOM is in place. Subsequent\n // refreshes happen on host resize and on relevant property changes.\n this.updateLayoutCache();\n let scheduled = false;\n this.hostResizeObserver = new ResizeObserver(() => {\n if (scheduled) return;\n scheduled = true;\n // Defer to the next frame so we never write reactive state from inside\n // the observer's callback — that path produces \"ResizeObserver loop\n // completed with undelivered notifications\" warnings.\n requestAnimationFrame(() => {\n scheduled = false;\n this.updateLayoutCache();\n });\n });\n this.hostResizeObserver.observe(this);\n }\n\n override attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void {\n super.attributeChangedCallback(name, oldValue, newValue);\n if (name === 'animate-reflow') {\n this.animateReflow = !(newValue === null || newValue === 'false' || newValue === '0');\n }\n }\n\n // ---------------- FLIP animator ----------------\n\n protected override willUpdate(_changed: PropertyValues): void {\n if (!this.shouldAnimate()) {\n this.flipPreviousRects.clear();\n return;\n }\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n this.flipPreviousRects.clear();\n grid.querySelectorAll<HTMLElement>('.tile').forEach((el) => {\n const id = el.dataset['tileId'];\n if (id) this.flipPreviousRects.set(id, el.getBoundingClientRect());\n });\n }\n\n protected override updated(changed: PropertyValues): void {\n // Refresh cached layout metrics when an input that determines them changes.\n // Reading layout in updated() is safe — the new style is already applied.\n if (\n changed.has('columnCount') ||\n changed.has('minColumnWidth') ||\n changed.has('minRowHeight') ||\n changed.has('gap')\n ) {\n this.updateLayoutCache();\n }\n if (!this.shouldAnimate() || this.flipPreviousRects.size === 0) return;\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n const activeId = this.activeTileId();\n grid.querySelectorAll<HTMLElement>('.tile').forEach((el) => {\n const id = el.dataset['tileId'];\n if (!id || id === activeId) return;\n const prev = this.flipPreviousRects.get(id);\n if (!prev) return;\n const next = el.getBoundingClientRect();\n const dx = prev.left - next.left;\n const dy = prev.top - next.top;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n // Invert: jump back to old position with no transition…\n const previous = el.style.transition;\n el.style.transition = 'none';\n el.style.transform = `translate(${dx}px, ${dy}px)`;\n // …then play forward on the next frame, restoring the transition.\n requestAnimationFrame(() => {\n el.style.transition = previous;\n el.style.transform = '';\n });\n });\n this.flipPreviousRects.clear();\n }\n\n private shouldAnimate(): boolean {\n if (!this.animateReflow) return false;\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n return !window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n\n // ---------------- Pointer entry points ----------------\n\n private lastPointerPosition: { x: number; y: number } | null = null;\n\n private onTilePointerDown(event: PointerEvent, tile: MintTile): void {\n if (event.button !== 0 && event.pointerType === 'mouse') return;\n if (this.gestureState.kind !== 'idle') return;\n if (this.dragMode === 'off' || tile.disableMove) return;\n\n // Resize handles consume their own pointerdown via stopPropagation; if we\n // got here it's a drag-surface candidate.\n if (this.dragMode === 'header' || event.pointerType === 'touch') {\n // Header-only: only proceed if the click originated inside the header\n // shell. The slotted (light-DOM) target won't find shadow-DOM ancestors\n // via closest(), so walk the composed path instead.\n const inHeader = event\n .composedPath()\n .some((node) => node instanceof HTMLElement && node.classList?.contains('tile__header-shell'));\n if (!inHeader) return;\n }\n\n if (event.pointerType === 'touch') {\n this.armTouchDrag(event, tile);\n } else {\n this.armPointerDrag(event, tile);\n }\n }\n\n private onResizeHandlePointerDown(\n event: PointerEvent,\n tile: MintTile,\n mode: 'side' | 'bottom' | 'corner',\n ): void {\n if (event.button !== 0 && event.pointerType === 'mouse') return;\n if (tile.disableResize || this.resizeMode === 'off') return;\n if (this.gestureState.kind !== 'idle') return;\n event.stopPropagation();\n event.preventDefault();\n this.beginResize(event, tile, mode);\n }\n\n // ---------------- Drag arming ----------------\n\n private armPointerDrag(event: PointerEvent, tile: MintTile): void {\n // Mouse / pen: arm immediately past the 5 px threshold. We track the\n // pointer ourselves and convert to a real drag when distance exceeds\n // POINTER_DRAG_THRESHOLD_PX.\n const startX = event.clientX;\n const startY = event.clientY;\n const onMove = (e: PointerEvent) => {\n if (e.pointerId !== event.pointerId) return;\n const dx = e.clientX - startX;\n const dy = e.clientY - startY;\n if (Math.hypot(dx, dy) >= POINTER_DRAG_THRESHOLD_PX) {\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n this.beginDrag(e, tile);\n }\n };\n const onCancel = (e: PointerEvent) => {\n if (e.pointerId !== event.pointerId) return;\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onCancel);\n window.addEventListener('pointercancel', onCancel);\n }\n\n private armTouchDrag(event: PointerEvent, tile: MintTile): void {\n const startX = event.clientX;\n const startY = event.clientY;\n const pointerId = event.pointerId;\n\n const pressingTimer = window.setTimeout(() => {\n // Visual feedback only — gesture not yet armed.\n if (this.gestureState.kind === 'arming-touch-drag' && this.gestureState.pointerId === pointerId) {\n // Force a re-render to flip data-pressing.\n this.requestUpdate();\n }\n }, TOUCH_PRESS_FEEDBACK_DELAY_MS);\n\n const armTimer = window.setTimeout(() => {\n if (this.gestureState.kind !== 'arming-touch-drag' || this.gestureState.pointerId !== pointerId) return;\n this.cleanupTouchArming();\n try {\n navigator.vibrate?.(10);\n } catch {\n // Silently ignore; vibrate isn't available everywhere.\n }\n this.beginDragFromTouchArm(tile, startX, startY, pointerId);\n }, TOUCH_LONG_PRESS_MS);\n\n this.gestureState = {\n kind: 'arming-touch-drag',\n pointerId,\n tileId: tile.id,\n startX,\n startY,\n timer: armTimer,\n pressingTimer,\n };\n this.gestureKind = 'arming-touch-drag';\n\n const onMove = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n if (this.gestureState.kind !== 'arming-touch-drag') return;\n const dx = e.clientX - startX;\n const dy = e.clientY - startY;\n if (Math.hypot(dx, dy) > TOUCH_LONG_PRESS_SLOP_PX) {\n this.cleanupTouchArming();\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n }\n };\n const onCancel = (e: PointerEvent) => {\n if (e.pointerId !== pointerId) return;\n if (this.gestureState.kind === 'arming-touch-drag') {\n this.cleanupTouchArming();\n }\n window.removeEventListener('pointermove', onMove);\n window.removeEventListener('pointerup', onCancel);\n window.removeEventListener('pointercancel', onCancel);\n };\n window.addEventListener('pointermove', onMove);\n window.addEventListener('pointerup', onCancel);\n window.addEventListener('pointercancel', onCancel);\n }\n\n private cleanupTouchArming(): void {\n if (this.gestureState.kind !== 'arming-touch-drag') return;\n const { timer, pressingTimer } = this.gestureState;\n if (timer !== null) window.clearTimeout(timer);\n if (pressingTimer !== null) window.clearTimeout(pressingTimer);\n this.gestureState = { kind: 'idle' };\n this.gestureKind = 'idle';\n this.requestUpdate();\n }\n\n private beginDragFromTouchArm(tile: MintTile, startX: number, startY: number, pointerId: number): void {\n // Synthesize the same begin call as for mouse, with a fake pointer event.\n // Refresh the layout cache once at gesture start — guarantees fresh metrics\n // even if the grid has resized since the last cache tick.\n this.updateLayoutCache();\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n const cell = this.cellMetrics;\n const gridRect = grid.getBoundingClientRect();\n const tileLeft = gridRect.left + (tile.position.colStart - 1) * (cell.width + cell.gapX);\n const tileTop = gridRect.top + (tile.position.rowStart - 1) * (cell.height + cell.gapY);\n this.gestureState = {\n kind: 'drag',\n pointerId,\n tileId: tile.id,\n pointerOffset: { dx: startX - tileLeft, dy: startY - tileTop },\n currentRect: { ...tile.position },\n blocked: false,\n };\n this.gestureKind = 'drag';\n this.lastPointerPosition = { x: startX, y: startY };\n this.attachWindowListeners();\n this.announceDragBegin(tile);\n this.requestUpdate();\n }\n\n private beginDrag(event: PointerEvent, tile: MintTile): void {\n this.updateLayoutCache();\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return;\n const cell = this.cellMetrics;\n const gridRect = grid.getBoundingClientRect();\n const tileLeft = gridRect.left + (tile.position.colStart - 1) * (cell.width + cell.gapX);\n const tileTop = gridRect.top + (tile.position.rowStart - 1) * (cell.height + cell.gapY);\n this.gestureState = {\n kind: 'drag',\n pointerId: event.pointerId,\n tileId: tile.id,\n pointerOffset: { dx: event.clientX - tileLeft, dy: event.clientY - tileTop },\n currentRect: { ...tile.position },\n blocked: false,\n };\n this.gestureKind = 'drag';\n this.lastPointerPosition = { x: event.clientX, y: event.clientY };\n this.attachWindowListeners();\n this.announceDragBegin(tile);\n this.runPackerForCurrentGesture();\n }\n\n private beginResize(event: PointerEvent, tile: MintTile, mode: 'side' | 'bottom' | 'corner'): void {\n this.gestureState = {\n kind: 'resize',\n pointerId: event.pointerId,\n tileId: tile.id,\n mode,\n startPointer: { x: event.clientX, y: event.clientY },\n startSpans: { colSpan: tile.position.colSpan, rowSpan: tile.position.rowSpan },\n currentRect: { ...tile.position },\n blocked: false,\n };\n this.gestureKind = 'resize';\n this.lastPointerPosition = { x: event.clientX, y: event.clientY };\n this.attachWindowListeners();\n this.announceResizeBegin(tile);\n this.runPackerForCurrentGesture();\n }\n\n private announceDragBegin(tile: MintTile): void {\n const label = tile.label ?? `tile at row ${tile.position.rowStart}, column ${tile.position.colStart}`;\n this.liveAnnouncer.announce(`Dragging ${label}.`);\n }\n\n private announceResizeBegin(tile: MintTile): void {\n const label = tile.label ?? `tile at row ${tile.position.rowStart}, column ${tile.position.colStart}`;\n this.liveAnnouncer.announce(`Resizing ${label}.`);\n }\n\n private attachWindowListeners(): void {\n window.addEventListener('pointermove', this.onWindowPointerMove);\n window.addEventListener('pointerup', this.onWindowPointerUp);\n window.addEventListener('pointercancel', this.onWindowPointerCancel);\n window.addEventListener('keydown', this.onWindowKeyDown);\n }\n\n private detachWindowListeners(): void {\n window.removeEventListener('pointermove', this.onWindowPointerMove);\n window.removeEventListener('pointerup', this.onWindowPointerUp);\n window.removeEventListener('pointercancel', this.onWindowPointerCancel);\n window.removeEventListener('keydown', this.onWindowKeyDown);\n }\n\n private handleEscapeKey(e: KeyboardEvent): void {\n if (e.key === 'Escape' && this.gestureState.kind !== 'idle') {\n e.preventDefault();\n this.cancelGesture();\n }\n }\n\n // ---------------- Pointer move / up / cancel ----------------\n\n private handlePointerMove(event: PointerEvent): void {\n const g = this.gestureState;\n if (g.kind === 'idle' || g.kind === 'arming-touch-drag') return;\n if (event.pointerId !== g.pointerId) return;\n this.lastPointerPosition = { x: event.clientX, y: event.clientY };\n this.runPackerForCurrentGesture();\n }\n\n private handlePointerUp(event: PointerEvent): void {\n const g = this.gestureState;\n if (g.kind === 'idle' || g.kind === 'arming-touch-drag') return;\n if (event.pointerId !== g.pointerId) return;\n if (g.blocked) {\n this.cancelGesture('blocked');\n return;\n }\n this.commitGesture();\n }\n\n private handlePointerCancel(event: PointerEvent): void {\n const g = this.gestureState;\n if (g.kind === 'idle') return;\n if (g.kind !== 'arming-touch-drag' && event.pointerId !== g.pointerId) return;\n this.cancelGesture();\n }\n\n // ---------------- Packer integration ----------------\n\n private runPackerForCurrentGesture(): void {\n const g = this.gestureState;\n if (g.kind !== 'drag' && g.kind !== 'resize') return;\n const tile = this.tiles.find((t) => t.id === g.tileId);\n if (!tile) {\n this.cancelGesture();\n return;\n }\n const rect = g.kind === 'drag' ? this.computeDragRect(g, tile) : this.computeResizeRect(g, tile);\n if (!rect) return;\n g.currentRect = rect;\n\n const cols = this.effectiveColumnCount;\n const result = pack(\n this.tiles.map((t) => ({ id: t.id, position: t.position, locked: t.disableMove })),\n { id: tile.id, rect },\n cols,\n );\n this.previewLayout = result.layout;\n const wasBlocked = g.blocked;\n g.blocked = result.blocked;\n if (result.blocked && !wasBlocked) {\n this.liveAnnouncer.announce('Move blocked by a locked tile.');\n }\n this.blocked = result.blocked;\n this.requestUpdate();\n }\n\n private computeDragRect(g: Extract<GestureState, { kind: 'drag' }>, tile: MintTile): GridRect | null {\n const grid = this.shadowRoot?.querySelector<HTMLElement>('.tile-grid');\n if (!grid) return null;\n const cell = this.cellMetrics;\n const cols = this.effectiveColumnCount;\n const pointer = this.lastPointerPosition;\n if (!pointer) return null;\n const gridRect = grid.getBoundingClientRect();\n // Pointer position relative to grid origin, minus the where-on-the-tile offset.\n const localX = pointer.x - gridRect.left - g.pointerOffset.dx;\n const localY = pointer.y - gridRect.top - g.pointerOffset.dy;\n const colStart = Math.round(localX / (cell.width + cell.gapX)) + 1;\n const rowStart = Math.round(localY / (cell.height + cell.gapY)) + 1;\n return {\n colStart: Math.max(1, Math.min(colStart, cols - tile.position.colSpan + 1)),\n rowStart: Math.max(1, rowStart),\n colSpan: tile.position.colSpan,\n rowSpan: tile.position.rowSpan,\n };\n }\n\n private computeResizeRect(\n g: Extract<GestureState, { kind: 'resize' }>,\n tile: MintTile,\n ): GridRect | null {\n const cell = this.cellMetrics;\n const cols = this.effectiveColumnCount;\n const pointer = this.lastPointerPosition;\n if (!pointer) return null;\n const dx = pointer.x - g.startPointer.x;\n const dy = pointer.y - g.startPointer.y;\n const colDelta = Math.round(dx / (cell.width + cell.gapX));\n const rowDelta = Math.round(dy / (cell.height + cell.gapY));\n const colSpan =\n g.mode === 'bottom'\n ? g.startSpans.colSpan\n : Math.max(1, Math.min(g.startSpans.colSpan + colDelta, cols - tile.position.colStart + 1));\n const rowSpan =\n g.mode === 'side' ? g.startSpans.rowSpan : Math.max(1, g.startSpans.rowSpan + rowDelta);\n return {\n colStart: tile.position.colStart,\n rowStart: tile.position.rowStart,\n colSpan,\n rowSpan,\n };\n }\n\n // ---------------- Commit / cancel ----------------\n\n private commitGesture(): void {\n const g = this.gestureState;\n if (g.kind !== 'drag' && g.kind !== 'resize') return;\n const finalLayout = this.previewLayout;\n if (!finalLayout) {\n this.cleanupGesture();\n return;\n }\n\n const previousById = new Map(this.tiles.map((t) => [t.id, t.position]));\n const newTiles: MintTile[] = this.tiles.map((t) => {\n const placed = finalLayout.find((p) => p.id === t.id);\n return placed ? { ...t, position: placed.position } : t;\n });\n\n this.tiles = newTiles;\n\n // Dispatch per-tile change events.\n finalLayout.forEach((entry) => {\n const prev = previousById.get(entry.id);\n if (!prev || !this.positionsEqual(prev, entry.position)) {\n this.dispatchEvent(\n new CustomEvent<{ id: string; position: TilePosition }>('tilepositionchange', {\n detail: { id: entry.id, position: entry.position },\n bubbles: false,\n composed: true,\n }),\n );\n }\n });\n this.dispatchEvent(\n new CustomEvent<TileLayoutSnapshot>('tilelayoutchange', {\n detail: this.cloneSnapshot(finalLayout),\n bubbles: false,\n composed: true,\n }),\n );\n\n const movedTile = finalLayout.find((p) => p.id === g.tileId);\n if (movedTile) {\n this.liveAnnouncer.announce(\n g.kind === 'drag'\n ? `Tile moved to row ${movedTile.position.rowStart}, column ${movedTile.position.colStart}`\n : `Tile resized to ${movedTile.position.colSpan} columns by ${movedTile.position.rowSpan} rows`,\n );\n }\n\n this.cleanupGesture();\n }\n\n private cancelGesture(reason: 'cancel' | 'blocked' = 'cancel'): void {\n const g = this.gestureState;\n if (reason === 'blocked' && (g.kind === 'drag' || g.kind === 'resize')) {\n this.dispatchEvent(\n new CustomEvent<TileGestureBlocked>('tilegestureblocked', {\n detail: { id: g.tileId, reason: 'locked-overlap' },\n bubbles: false,\n composed: true,\n }),\n );\n }\n this.cleanupGesture();\n }\n\n private cleanupGesture(): void {\n if (this.gestureState.kind === 'arming-touch-drag') this.cleanupTouchArming();\n this.detachWindowListeners();\n this.gestureState = { kind: 'idle' };\n this.gestureKind = 'idle';\n this.previewLayout = null;\n this.blocked = false;\n this.lastPointerPosition = null;\n this.requestUpdate();\n }\n\n private positionsEqual(a: TilePosition, b: TilePosition): boolean {\n return (\n a.colStart === b.colStart &&\n a.rowStart === b.rowStart &&\n a.colSpan === b.colSpan &&\n a.rowSpan === b.rowSpan\n );\n }\n\n private cloneSnapshot(s: TileLayoutSnapshot): TileLayoutSnapshot {\n return s.map((p) => ({ id: p.id, position: { ...p.position } }));\n }\n\n private activeTileId(): string | null {\n const g = this.gestureState;\n if (g.kind === 'drag' || g.kind === 'resize' || g.kind === 'arming-touch-drag') return g.tileId;\n return null;\n }\n\n // ---------------- Public API ----------------\n\n /** Read-only snapshot of the current layout. Mirrors `BsDockManagerComponent.captureLayout()`. */\n captureLayout(): TileLayoutSnapshot {\n return this.tiles.map((t) => ({ id: t.id, position: { ...t.position } }));\n }\n\n /**\n * True while a drag or resize is in flight. The Angular wrapper uses this to\n * avoid clobbering `tiles` mid-gesture. Touch long-press arming does NOT\n * count — the WC isn't yet owning the layout during the hold.\n */\n get isGestureActive(): boolean {\n return this.gestureState.kind === 'drag' || this.gestureState.kind === 'resize';\n }\n\n // ---------------- Keyboard ----------------\n\n private onTileKeyDown(event: KeyboardEvent, tile: MintTile): void {\n const km = this.keyboardState;\n\n if (km.kind === 'idle') {\n // Outside move mode: arrow keys traverse focus between tiles, Home/End\n // jump to first/last, M enters move mode if the tile allows it.\n if (event.key === 'm' || event.key === 'M') {\n if (tile.disableMove && tile.disableResize) return;\n event.preventDefault();\n this.keyboardState = { kind: 'move', tileId: tile.id };\n this.liveAnnouncer.announce(\n 'Move mode enabled. Use arrow keys to move, Shift with arrow keys to resize, Enter to commit, Escape to cancel.',\n );\n return;\n }\n if (this.handleFocusNavigation(event, tile)) return;\n return;\n }\n\n if (km.tileId !== tile.id) return;\n\n if (event.key === 'Escape' || event.key === 'Enter') {\n event.preventDefault();\n this.keyboardState = { kind: 'idle' };\n this.liveAnnouncer.announce(event.key === 'Enter' ? 'Move committed.' : 'Move cancelled.');\n return;\n }\n\n if (event.key.startsWith('Arrow')) {\n event.preventDefault();\n const isResize = event.shiftKey;\n this.applyKeyboardStep(tile, event.key as ArrowKey, isResize);\n }\n }\n\n /**\n * Outside move mode, arrow keys move *focus* between tiles (row-major\n * order — top-to-bottom, left-to-right by gridcell position). Home/End\n * jump to first/last enabled tile. Returns true if the event was handled.\n */\n private handleFocusNavigation(event: KeyboardEvent, current: MintTile): boolean {\n const navKey =\n event.key === 'ArrowUp' || event.key === 'ArrowDown' ||\n event.key === 'ArrowLeft' || event.key === 'ArrowRight' ||\n event.key === 'Home' || event.key === 'End';\n if (!navKey) return false;\n if (this.tiles.length <= 1) return false;\n\n const ordered = [...this.tiles].sort((a, b) => {\n if (a.position.rowStart !== b.position.rowStart) return a.position.rowStart - b.position.rowStart;\n return a.position.colStart - b.position.colStart;\n });\n const idx = ordered.findIndex((t) => t.id === current.id);\n if (idx < 0) return false;\n\n let nextIdx = idx;\n if (event.key === 'Home') nextIdx = 0;\n else if (event.key === 'End') nextIdx = ordered.length - 1;\n else if (event.key === 'ArrowRight' || event.key === 'ArrowDown') nextIdx = (idx + 1) % ordered.length;\n else nextIdx = (idx - 1 + ordered.length) % ordered.length;\n\n if (nextIdx === idx) return true;\n event.preventDefault();\n const target = ordered[nextIdx];\n this.focusedTileId = target.id;\n this.requestUpdate();\n queueMicrotask(() => {\n const el = this.shadowRoot?.querySelector<HTMLElement>(`.tile[data-tile-id=\"${target.id}\"]`);\n el?.focus();\n });\n return true;\n }\n\n private onTileFocus(tile: MintTile): void {\n if (this.focusedTileId !== tile.id) {\n this.focusedTileId = tile.id;\n this.requestUpdate();\n }\n }\n\n /**\n * The single tile that should carry `tabindex=\"0\"` to act as the board's\n * tab stop. Defaults to the previously-focused tile, then the first tile in\n * row-major order. All other tiles render with `tabindex=\"-1\"` so Tab from\n * outside the board lands on exactly one tile.\n */\n private resolveFocusableTileId(): string | null {\n if (this.tiles.length === 0) return null;\n if (this.focusedTileId && this.tiles.some((t) => t.id === this.focusedTileId)) {\n return this.focusedTileId;\n }\n const ordered = [...this.tiles].sort((a, b) => {\n if (a.position.rowStart !== b.position.rowStart) return a.position.rowStart - b.position.rowStart;\n return a.position.colStart - b.position.colStart;\n });\n return ordered[0]?.id ?? null;\n }\n\n private applyKeyboardStep(tile: MintTile, key: ArrowKey, isResize: boolean): void {\n const cols = this.effectiveColumnCount;\n const dx = key === 'ArrowLeft' ? -1 : key === 'ArrowRight' ? 1 : 0;\n const dy = key === 'ArrowUp' ? -1 : key === 'ArrowDown' ? 1 : 0;\n const newRect: GridRect = isResize\n ? {\n colStart: tile.position.colStart,\n rowStart: tile.position.rowStart,\n colSpan: Math.max(1, Math.min(tile.position.colSpan + dx, cols - tile.position.colStart + 1)),\n rowSpan: Math.max(1, tile.position.rowSpan + dy),\n }\n : {\n colStart: Math.max(1, Math.min(tile.position.colStart + dx, cols - tile.position.colSpan + 1)),\n rowStart: Math.max(1, tile.position.rowStart + dy),\n colSpan: tile.position.colSpan,\n rowSpan: tile.position.rowSpan,\n };\n\n const result = pack(\n this.tiles.map((t) => ({ id: t.id, position: t.position, locked: t.disableMove })),\n { id: tile.id, rect: newRect },\n cols,\n );\n if (result.blocked) {\n this.liveAnnouncer.announce('Move blocked.');\n return;\n }\n const newTiles: MintTile[] = this.tiles.map((t) => {\n const placed = result.layout.find((p) => p.id === t.id);\n return placed ? { ...t, position: placed.position } : t;\n });\n this.tiles = newTiles;\n this.dispatchEvent(\n new CustomEvent<TileLayoutSnapshot>('tilelayoutchange', {\n detail: this.cloneSnapshot(result.layout),\n bubbles: false,\n composed: true,\n }),\n );\n result.layout.forEach((entry) => {\n this.dispatchEvent(\n new CustomEvent<{ id: string; position: TilePosition }>('tilepositionchange', {\n detail: { id: entry.id, position: entry.position },\n bubbles: false,\n composed: true,\n }),\n );\n });\n this.liveAnnouncer.announce(\n isResize\n ? `Tile resized to ${newRect.colSpan} columns by ${newRect.rowSpan} rows`\n : `Tile moved to row ${newRect.rowStart}, column ${newRect.colStart}`,\n );\n }\n}\n\ntype ArrowKey = 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight';\n\nif (typeof customElements !== 'undefined' && !customElements.get('mp-tile-manager')) {\n customElements.define('mp-tile-manager', MintTileManagerElement);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'mp-tile-manager': MintTileManagerElement;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAUA;;;;;;;AAOG;MAaU,eAAe,CAAA;AAZ5B,IAAA,WAAA,GAAA;AAaW,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,QAAQ,wEAAU;AAC7B,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,QAAQ,8EAAgB;AACzC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAU,KAAK,kFAAC;AACnC,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAU,KAAK,oFAAC;AACrC,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;QAElC,IAAA,CAAA,cAAc,GAAG,MAAM,EAAgB;AAEvC,QAAA,IAAA,CAAA,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAuB,WAAW,CAAC;AACjE,QAAA,IAAA,CAAA,UAAU,GAAG,SAAS,CAAC,QAAQ,CAAu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,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;AAClD,gBAAA,OAAO,EAAE,KAAK;AACd,gBAAA,QAAQ,EAAE,IAAI;AACf,aAAA,CAAC,CACH;AACH,QAAA,CAAC,CAAC;AACF,QAAA,IAAI,CAAC,aAAa,CAAC,QAAQ,CACzB;cACI,mBAAmB,OAAO,CAAC,OAAO,CAAA,YAAA,EAAe,OAAO,CAAC,OAAO,CAAA,KAAA;cAChE,CAAA,kBAAA,EAAqB,OAAO,CAAC,QAAQ,CAAA,SAAA,EAAY,OAAO,CAAC,QAAQ,CAAA,CAAE,CACxE;IACH;;AAKF,IAAI,OAAO,cAAc,KAAK,WAAW,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;AACnF,IAAA,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;AAClE;;AC5/BA;;AAEG;;;;"}
@@ -89,11 +89,11 @@ class BsTimepickerComponent {
89
89
  return (time1.getHours() === time2.getHours()) && (time1.getMinutes() === time2.getMinutes());
90
90
  }
91
91
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsTimepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
92
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsTimepickerComponent, isStandalone: true, selector: "bs-timepicker", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, selectedTime: { classPropertyName: "selectedTime", publicName: "selectedTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", selectedTime: "selectedTimeChange" }, ngImport: i0, template: "<!-- <bs-dropdown [(isOpen)]=\"isOpen\" [sameDropdownWidth]=\"true\"></bs-dropdown> -->\n<div bsDropdown [(isOpen)]=\"isOpen\" [sameDropdownWidth]=\"true\">\n <bs-form>\n <bs-input-group>\n <span class=\"form-control d-flex\" [class.focus]=\"isFocused()\">\n <div class=\"flex-grow-1\">\n <input type=\"number\" [min]=\"0\" [max]=\"23\" (input)=\"setNumber($event, 23, minuteBox)\" bsEnhancedPaste [ngModel]=\"hours | number: '2.0'\" (ngModelChange)=\"hours = $event\" (focus)=\"selectAll(hourBox)\" (blur)=\"isFocused.set(false)\" #hourBox class=\"w-100 border-0 bg-transparent text-end no-form-control\">\n </div>\n <span class=\"px-1\">:</span>\n <div class=\"flex-grow-1\">\n <input type=\"number\" [min]=\"0\" [max]=\"59\" (input)=\"setNumber($event, 59, null)\" bsEnhancedPaste [ngModel]=\"minutes | number: '2.0'\" (ngModelChange)=\"minutes = $event\" (focus)=\"selectAll(minuteBox)\" (blur)=\"isFocused.set(false)\" #minuteBox class=\"w-100 border-0 bg-transparent no-form-control\">\n </div>\n </span>\n <button [color]=\"colors.secondary\" (click)=\"isOpen.set(!isOpen())\">\n <span [innerHTML]=\"clock()\"></span>\n </button>\n </bs-input-group>\n </bs-form>\n <bs-has-overlay></bs-has-overlay>\n <bs-dropdown-menu class=\"overflow-auto\" *bsDropdownMenu>\n @for (timestamp of presetTimestamps(); track timestamp) {\n <bs-dropdown-item [isSelected]=\"timesEqual(selectedTime(), timestamp)\" (click)=\"setTime(timestamp)\">\n {{ timestamp | date: 'HH:mm' }}\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>", styles: [":host{display:inline-block}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;outline:0px!important}.form-control{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}bs-dropdown-menu{max-height:250px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: EnhancedPasteDirective, selector: "input[type=\"number\"][bsEnhancedPaste]", outputs: ["numberOverflow"] }, { kind: "component", type: BsFormComponent, selector: "bs-form", inputs: ["action", "method"], outputs: ["submitted"] }, { kind: "directive", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "sameDropdownWidth", "isOpen"], outputs: ["isOpenChange"] }, { kind: "directive", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { kind: "component", type: BsDropdownMenuComponent, selector: "bs-dropdown-menu", inputs: ["maxHeight"] }, { kind: "component", type: BsDropdownItemComponent, selector: "bs-dropdown-item", inputs: ["isSelected", "disabled"] }, { kind: "component", type: BsInputGroupComponent, selector: "bs-input-group" }, { kind: "directive", type: BsButtonTypeDirective, selector: "button[color],input[type=\"button\"][color],input[type=\"submit\"][color],a[color]", inputs: ["color"] }, { kind: "component", type: BsHasOverlayComponent, selector: "bs-has-overlay" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
92
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.11", type: BsTimepickerComponent, isStandalone: true, selector: "bs-timepicker", inputs: { isOpen: { classPropertyName: "isOpen", publicName: "isOpen", isSignal: true, isRequired: false, transformFunction: null }, selectedTime: { classPropertyName: "selectedTime", publicName: "selectedTime", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isOpen: "isOpenChange", selectedTime: "selectedTimeChange" }, ngImport: i0, template: "<div bsDropdown popupRole=\"listbox\" [(isOpen)]=\"isOpen\" [sameDropdownWidth]=\"true\">\n <bs-form>\n <bs-input-group>\n <span class=\"form-control d-flex\" [class.focus]=\"isFocused()\">\n <div class=\"flex-grow-1\">\n <input type=\"number\" aria-label=\"Hours\" [min]=\"0\" [max]=\"23\" (input)=\"setNumber($event, 23, minuteBox)\" bsEnhancedPaste [ngModel]=\"hours | number: '2.0'\" (ngModelChange)=\"hours = $event\" (focus)=\"selectAll(hourBox)\" (blur)=\"isFocused.set(false)\" #hourBox class=\"w-100 border-0 bg-transparent text-end no-form-control\">\n </div>\n <span class=\"px-1\" aria-hidden=\"true\">:</span>\n <div class=\"flex-grow-1\">\n <input type=\"number\" aria-label=\"Minutes\" [min]=\"0\" [max]=\"59\" (input)=\"setNumber($event, 59, null)\" bsEnhancedPaste [ngModel]=\"minutes | number: '2.0'\" (ngModelChange)=\"minutes = $event\" (focus)=\"selectAll(minuteBox)\" (blur)=\"isFocused.set(false)\" #minuteBox class=\"w-100 border-0 bg-transparent no-form-control\">\n </div>\n </span>\n <button [color]=\"colors.secondary\" aria-label=\"Open time presets\" (click)=\"isOpen.set(!isOpen())\">\n <span [innerHTML]=\"clock()\" aria-hidden=\"true\"></span>\n </button>\n </bs-input-group>\n </bs-form>\n <bs-has-overlay></bs-has-overlay>\n <bs-dropdown-menu class=\"overflow-auto\" *bsDropdownMenu>\n @for (timestamp of presetTimestamps(); track timestamp) {\n <bs-dropdown-item [isSelected]=\"timesEqual(selectedTime(), timestamp)\" (click)=\"setTime(timestamp)\">\n {{ timestamp | date: 'HH:mm' }}\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>\n", styles: [":host{display:inline-block}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;outline:0px!important}.form-control{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}bs-dropdown-menu{max-height:250px}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i1.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: EnhancedPasteDirective, selector: "input[type=\"number\"][bsEnhancedPaste]", outputs: ["numberOverflow"] }, { kind: "component", type: BsFormComponent, selector: "bs-form", inputs: ["action", "method"], outputs: ["submitted"] }, { kind: "directive", type: BsDropdownDirective, selector: "[bsDropdown]", inputs: ["hasBackdrop", "sameWidth", "closeOnClickOutside", "sameDropdownWidth", "isOpen", "popupRole"], outputs: ["isOpenChange"], exportAs: ["bsDropdown"] }, { kind: "directive", type: BsDropdownMenuDirective, selector: "[bsDropdownMenu]" }, { kind: "component", type: BsDropdownMenuComponent, selector: "bs-dropdown-menu", inputs: ["maxHeight"] }, { kind: "component", type: BsDropdownItemComponent, selector: "bs-dropdown-item", inputs: ["isSelected", "disabled"] }, { kind: "component", type: BsInputGroupComponent, selector: "bs-input-group" }, { kind: "directive", type: BsButtonTypeDirective, selector: "button[color],input[type=\"button\"][color],input[type=\"submit\"][color],a[color]", inputs: ["color"] }, { kind: "component", type: BsHasOverlayComponent, selector: "bs-has-overlay" }, { kind: "pipe", type: DatePipe, name: "date" }, { kind: "pipe", type: DecimalPipe, name: "number" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
93
93
  }
94
94
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.11", ngImport: i0, type: BsTimepickerComponent, decorators: [{
95
95
  type: Component,
96
- args: [{ selector: 'bs-timepicker', imports: [DatePipe, DecimalPipe, FormsModule, EnhancedPasteDirective, BsFormComponent, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownMenuComponent, BsDropdownItemComponent, BsInputGroupComponent, BsButtonTypeDirective, BsHasOverlayComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- <bs-dropdown [(isOpen)]=\"isOpen\" [sameDropdownWidth]=\"true\"></bs-dropdown> -->\n<div bsDropdown [(isOpen)]=\"isOpen\" [sameDropdownWidth]=\"true\">\n <bs-form>\n <bs-input-group>\n <span class=\"form-control d-flex\" [class.focus]=\"isFocused()\">\n <div class=\"flex-grow-1\">\n <input type=\"number\" [min]=\"0\" [max]=\"23\" (input)=\"setNumber($event, 23, minuteBox)\" bsEnhancedPaste [ngModel]=\"hours | number: '2.0'\" (ngModelChange)=\"hours = $event\" (focus)=\"selectAll(hourBox)\" (blur)=\"isFocused.set(false)\" #hourBox class=\"w-100 border-0 bg-transparent text-end no-form-control\">\n </div>\n <span class=\"px-1\">:</span>\n <div class=\"flex-grow-1\">\n <input type=\"number\" [min]=\"0\" [max]=\"59\" (input)=\"setNumber($event, 59, null)\" bsEnhancedPaste [ngModel]=\"minutes | number: '2.0'\" (ngModelChange)=\"minutes = $event\" (focus)=\"selectAll(minuteBox)\" (blur)=\"isFocused.set(false)\" #minuteBox class=\"w-100 border-0 bg-transparent no-form-control\">\n </div>\n </span>\n <button [color]=\"colors.secondary\" (click)=\"isOpen.set(!isOpen())\">\n <span [innerHTML]=\"clock()\"></span>\n </button>\n </bs-input-group>\n </bs-form>\n <bs-has-overlay></bs-has-overlay>\n <bs-dropdown-menu class=\"overflow-auto\" *bsDropdownMenu>\n @for (timestamp of presetTimestamps(); track timestamp) {\n <bs-dropdown-item [isSelected]=\"timesEqual(selectedTime(), timestamp)\" (click)=\"setTime(timestamp)\">\n {{ timestamp | date: 'HH:mm' }}\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>", styles: [":host{display:inline-block}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;outline:0px!important}.form-control{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}bs-dropdown-menu{max-height:250px}\n"] }]
96
+ args: [{ selector: 'bs-timepicker', imports: [DatePipe, DecimalPipe, FormsModule, EnhancedPasteDirective, BsFormComponent, BsDropdownDirective, BsDropdownMenuDirective, BsDropdownMenuComponent, BsDropdownItemComponent, BsInputGroupComponent, BsButtonTypeDirective, BsHasOverlayComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div bsDropdown popupRole=\"listbox\" [(isOpen)]=\"isOpen\" [sameDropdownWidth]=\"true\">\n <bs-form>\n <bs-input-group>\n <span class=\"form-control d-flex\" [class.focus]=\"isFocused()\">\n <div class=\"flex-grow-1\">\n <input type=\"number\" aria-label=\"Hours\" [min]=\"0\" [max]=\"23\" (input)=\"setNumber($event, 23, minuteBox)\" bsEnhancedPaste [ngModel]=\"hours | number: '2.0'\" (ngModelChange)=\"hours = $event\" (focus)=\"selectAll(hourBox)\" (blur)=\"isFocused.set(false)\" #hourBox class=\"w-100 border-0 bg-transparent text-end no-form-control\">\n </div>\n <span class=\"px-1\" aria-hidden=\"true\">:</span>\n <div class=\"flex-grow-1\">\n <input type=\"number\" aria-label=\"Minutes\" [min]=\"0\" [max]=\"59\" (input)=\"setNumber($event, 59, null)\" bsEnhancedPaste [ngModel]=\"minutes | number: '2.0'\" (ngModelChange)=\"minutes = $event\" (focus)=\"selectAll(minuteBox)\" (blur)=\"isFocused.set(false)\" #minuteBox class=\"w-100 border-0 bg-transparent no-form-control\">\n </div>\n </span>\n <button [color]=\"colors.secondary\" aria-label=\"Open time presets\" (click)=\"isOpen.set(!isOpen())\">\n <span [innerHTML]=\"clock()\" aria-hidden=\"true\"></span>\n </button>\n </bs-input-group>\n </bs-form>\n <bs-has-overlay></bs-has-overlay>\n <bs-dropdown-menu class=\"overflow-auto\" *bsDropdownMenu>\n @for (timestamp of presetTimestamps(); track timestamp) {\n <bs-dropdown-item [isSelected]=\"timesEqual(selectedTime(), timestamp)\" (click)=\"setTime(timestamp)\">\n {{ timestamp | date: 'HH:mm' }}\n </bs-dropdown-item>\n }\n </bs-dropdown-menu>\n</div>\n", styles: [":host{display:inline-block}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield;outline:0px!important}.form-control{transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control.focus{color:#495057;background-color:#fff;border-color:#80bdff!important;outline:0;box-shadow:0 0 0 .2rem #007bff40}bs-dropdown-menu{max-height:250px}\n"] }]
97
97
  }], ctorParameters: () => [], propDecorators: { isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], selectedTime: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedTime", required: false }] }, { type: i0.Output, args: ["selectedTimeChange"] }] } });
98
98
 
99
99
  /**