forty-cdk 0.2.0 → 0.3.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 (220) hide show
  1. package/accordion/README.md +122 -0
  2. package/aspect-ratio/README.md +76 -0
  3. package/avatar/README.md +100 -0
  4. package/breadcrumbs/README.md +49 -0
  5. package/breakpoints/README.md +81 -0
  6. package/button/README.md +49 -0
  7. package/calendar/README.md +458 -0
  8. package/carousel/README.md +358 -0
  9. package/checkbox/README.md +146 -0
  10. package/combobox/README.md +535 -0
  11. package/context-menu/README.md +139 -0
  12. package/date-field/README.md +184 -0
  13. package/date-picker/README.md +338 -0
  14. package/dialog/README.md +388 -0
  15. package/disclosure/README.md +114 -0
  16. package/drag-drop/README.md +359 -0
  17. package/drawer/README.md +560 -0
  18. package/dropdown-menu/README.md +176 -0
  19. package/fesm2022/forty-cdk-accordion.mjs +348 -0
  20. package/fesm2022/forty-cdk-accordion.mjs.map +1 -0
  21. package/fesm2022/forty-cdk-aspect-ratio.mjs +74 -0
  22. package/fesm2022/forty-cdk-aspect-ratio.mjs.map +1 -0
  23. package/fesm2022/forty-cdk-avatar.mjs +308 -0
  24. package/fesm2022/forty-cdk-avatar.mjs.map +1 -0
  25. package/fesm2022/forty-cdk-breadcrumbs.mjs +125 -0
  26. package/fesm2022/forty-cdk-breadcrumbs.mjs.map +1 -0
  27. package/fesm2022/forty-cdk-breakpoints.mjs +117 -0
  28. package/fesm2022/forty-cdk-breakpoints.mjs.map +1 -0
  29. package/fesm2022/forty-cdk-button.mjs +134 -0
  30. package/fesm2022/forty-cdk-button.mjs.map +1 -0
  31. package/fesm2022/forty-cdk-calendar.mjs +2034 -0
  32. package/fesm2022/forty-cdk-calendar.mjs.map +1 -0
  33. package/fesm2022/forty-cdk-carousel.mjs +968 -0
  34. package/fesm2022/forty-cdk-carousel.mjs.map +1 -0
  35. package/fesm2022/forty-cdk-checkbox.mjs +226 -0
  36. package/fesm2022/forty-cdk-checkbox.mjs.map +1 -0
  37. package/fesm2022/forty-cdk-combobox.mjs +2596 -0
  38. package/fesm2022/forty-cdk-combobox.mjs.map +1 -0
  39. package/fesm2022/forty-cdk-context-menu.mjs +413 -0
  40. package/fesm2022/forty-cdk-context-menu.mjs.map +1 -0
  41. package/fesm2022/forty-cdk-core.mjs +9022 -0
  42. package/fesm2022/forty-cdk-core.mjs.map +1 -0
  43. package/fesm2022/forty-cdk-date-field.mjs +744 -0
  44. package/fesm2022/forty-cdk-date-field.mjs.map +1 -0
  45. package/fesm2022/forty-cdk-date-picker.mjs +1011 -0
  46. package/fesm2022/forty-cdk-date-picker.mjs.map +1 -0
  47. package/fesm2022/forty-cdk-dialog.mjs +707 -0
  48. package/fesm2022/forty-cdk-dialog.mjs.map +1 -0
  49. package/fesm2022/forty-cdk-disclosure.mjs +190 -0
  50. package/fesm2022/forty-cdk-disclosure.mjs.map +1 -0
  51. package/fesm2022/forty-cdk-drag-drop.mjs +1180 -0
  52. package/fesm2022/forty-cdk-drag-drop.mjs.map +1 -0
  53. package/fesm2022/forty-cdk-drawer.mjs +1641 -0
  54. package/fesm2022/forty-cdk-drawer.mjs.map +1 -0
  55. package/fesm2022/forty-cdk-dropdown-menu.mjs +350 -0
  56. package/fesm2022/forty-cdk-dropdown-menu.mjs.map +1 -0
  57. package/fesm2022/forty-cdk-field.mjs +425 -0
  58. package/fesm2022/forty-cdk-field.mjs.map +1 -0
  59. package/fesm2022/forty-cdk-fieldset.mjs +164 -0
  60. package/fesm2022/forty-cdk-fieldset.mjs.map +1 -0
  61. package/fesm2022/forty-cdk-file-upload.mjs +221 -0
  62. package/fesm2022/forty-cdk-file-upload.mjs.map +1 -0
  63. package/fesm2022/forty-cdk-hover-card.mjs +496 -0
  64. package/fesm2022/forty-cdk-hover-card.mjs.map +1 -0
  65. package/fesm2022/forty-cdk-input.mjs +274 -0
  66. package/fesm2022/forty-cdk-input.mjs.map +1 -0
  67. package/fesm2022/forty-cdk-internationalized-date.mjs +1 -1
  68. package/fesm2022/forty-cdk-internationalized-date.mjs.map +1 -1
  69. package/fesm2022/forty-cdk-listbox.mjs +1279 -0
  70. package/fesm2022/forty-cdk-listbox.mjs.map +1 -0
  71. package/fesm2022/forty-cdk-menu.mjs +1439 -0
  72. package/fesm2022/forty-cdk-menu.mjs.map +1 -0
  73. package/fesm2022/forty-cdk-menubar.mjs +787 -0
  74. package/fesm2022/forty-cdk-menubar.mjs.map +1 -0
  75. package/fesm2022/forty-cdk-meter.mjs +211 -0
  76. package/fesm2022/forty-cdk-meter.mjs.map +1 -0
  77. package/fesm2022/forty-cdk-navigation-menu.mjs +1145 -0
  78. package/fesm2022/forty-cdk-navigation-menu.mjs.map +1 -0
  79. package/fesm2022/forty-cdk-number-input.mjs +559 -0
  80. package/fesm2022/forty-cdk-number-input.mjs.map +1 -0
  81. package/fesm2022/forty-cdk-otp-input.mjs +527 -0
  82. package/fesm2022/forty-cdk-otp-input.mjs.map +1 -0
  83. package/fesm2022/forty-cdk-pagination.mjs +323 -0
  84. package/fesm2022/forty-cdk-pagination.mjs.map +1 -0
  85. package/fesm2022/forty-cdk-pane-resizer.mjs +297 -0
  86. package/fesm2022/forty-cdk-pane-resizer.mjs.map +1 -0
  87. package/fesm2022/forty-cdk-popover.mjs +698 -0
  88. package/fesm2022/forty-cdk-popover.mjs.map +1 -0
  89. package/fesm2022/forty-cdk-progress.mjs +226 -0
  90. package/fesm2022/forty-cdk-progress.mjs.map +1 -0
  91. package/fesm2022/forty-cdk-radio-group.mjs +378 -0
  92. package/fesm2022/forty-cdk-radio-group.mjs.map +1 -0
  93. package/fesm2022/forty-cdk-scroll-area.mjs +640 -0
  94. package/fesm2022/forty-cdk-scroll-area.mjs.map +1 -0
  95. package/fesm2022/forty-cdk-search.mjs +205 -0
  96. package/fesm2022/forty-cdk-search.mjs.map +1 -0
  97. package/fesm2022/forty-cdk-select.mjs +1661 -0
  98. package/fesm2022/forty-cdk-select.mjs.map +1 -0
  99. package/fesm2022/forty-cdk-separator.mjs +82 -0
  100. package/fesm2022/forty-cdk-separator.mjs.map +1 -0
  101. package/fesm2022/forty-cdk-signal-forms.mjs +97 -0
  102. package/fesm2022/forty-cdk-signal-forms.mjs.map +1 -0
  103. package/fesm2022/forty-cdk-slider.mjs +803 -0
  104. package/fesm2022/forty-cdk-slider.mjs.map +1 -0
  105. package/fesm2022/forty-cdk-stepper.mjs +886 -0
  106. package/fesm2022/forty-cdk-stepper.mjs.map +1 -0
  107. package/fesm2022/forty-cdk-switch.mjs +137 -0
  108. package/fesm2022/forty-cdk-switch.mjs.map +1 -0
  109. package/fesm2022/forty-cdk-table.mjs +1518 -0
  110. package/fesm2022/forty-cdk-table.mjs.map +1 -0
  111. package/fesm2022/forty-cdk-tabs.mjs +400 -0
  112. package/fesm2022/forty-cdk-tabs.mjs.map +1 -0
  113. package/fesm2022/forty-cdk-time-field.mjs +593 -0
  114. package/fesm2022/forty-cdk-time-field.mjs.map +1 -0
  115. package/fesm2022/forty-cdk-time-picker.mjs +1013 -0
  116. package/fesm2022/forty-cdk-time-picker.mjs.map +1 -0
  117. package/fesm2022/forty-cdk-toast.mjs +1153 -0
  118. package/fesm2022/forty-cdk-toast.mjs.map +1 -0
  119. package/fesm2022/forty-cdk-toggle.mjs +516 -0
  120. package/fesm2022/forty-cdk-toggle.mjs.map +1 -0
  121. package/fesm2022/forty-cdk-toolbar.mjs +374 -0
  122. package/fesm2022/forty-cdk-toolbar.mjs.map +1 -0
  123. package/fesm2022/forty-cdk-tooltip.mjs +672 -0
  124. package/fesm2022/forty-cdk-tooltip.mjs.map +1 -0
  125. package/fesm2022/forty-cdk-tree.mjs +2007 -0
  126. package/fesm2022/forty-cdk-tree.mjs.map +1 -0
  127. package/fesm2022/forty-cdk-virtualization.mjs +1 -1
  128. package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
  129. package/fesm2022/forty-cdk.mjs +0 -43310
  130. package/fesm2022/forty-cdk.mjs.map +1 -1
  131. package/field/README.md +97 -0
  132. package/fieldset/README.md +86 -0
  133. package/file-upload/README.md +73 -0
  134. package/hover-card/README.md +171 -0
  135. package/input/README.md +156 -0
  136. package/listbox/README.md +424 -0
  137. package/menu/README.md +181 -0
  138. package/menubar/README.md +140 -0
  139. package/meter/README.md +128 -0
  140. package/navigation-menu/README.md +253 -0
  141. package/number-input/README.md +171 -0
  142. package/otp-input/README.md +198 -0
  143. package/package.json +213 -1
  144. package/pagination/README.md +61 -0
  145. package/pane-resizer/README.md +136 -0
  146. package/popover/README.md +262 -0
  147. package/progress/README.md +115 -0
  148. package/radio-group/README.md +129 -0
  149. package/scroll-area/README.md +184 -0
  150. package/search/README.md +42 -0
  151. package/select/README.md +488 -0
  152. package/separator/README.md +84 -0
  153. package/signal-forms/README.md +72 -0
  154. package/slider/README.md +152 -0
  155. package/stepper/README.md +292 -0
  156. package/switch/README.md +116 -0
  157. package/table/README.md +769 -0
  158. package/tabs/README.md +130 -0
  159. package/time-field/README.md +157 -0
  160. package/time-picker/README.md +172 -0
  161. package/toast/README.md +398 -0
  162. package/toggle/README.md +224 -0
  163. package/toolbar/README.md +109 -0
  164. package/tooltip/README.md +274 -0
  165. package/tree/README.md +708 -0
  166. package/types/forty-cdk-accordion.d.ts +242 -0
  167. package/types/forty-cdk-aspect-ratio.d.ts +59 -0
  168. package/types/forty-cdk-avatar.d.ts +133 -0
  169. package/types/forty-cdk-breadcrumbs.d.ts +92 -0
  170. package/types/forty-cdk-breakpoints.d.ts +141 -0
  171. package/types/forty-cdk-button.d.ts +80 -0
  172. package/types/forty-cdk-calendar.d.ts +914 -0
  173. package/types/forty-cdk-carousel.d.ts +530 -0
  174. package/types/forty-cdk-checkbox.d.ts +141 -0
  175. package/types/forty-cdk-combobox.d.ts +1259 -0
  176. package/types/forty-cdk-context-menu.d.ts +313 -0
  177. package/types/forty-cdk-core.d.ts +5774 -0
  178. package/types/forty-cdk-date-field.d.ts +307 -0
  179. package/types/forty-cdk-date-picker.d.ts +622 -0
  180. package/types/forty-cdk-dialog.d.ts +546 -0
  181. package/types/forty-cdk-disclosure.d.ts +127 -0
  182. package/types/forty-cdk-drag-drop.d.ts +456 -0
  183. package/types/forty-cdk-drawer.d.ts +871 -0
  184. package/types/forty-cdk-dropdown-menu.d.ts +242 -0
  185. package/types/forty-cdk-field.d.ts +236 -0
  186. package/types/forty-cdk-fieldset.d.ts +119 -0
  187. package/types/forty-cdk-file-upload.d.ts +124 -0
  188. package/types/forty-cdk-hover-card.d.ts +320 -0
  189. package/types/forty-cdk-input.d.ts +169 -0
  190. package/types/forty-cdk-internationalized-date.d.ts +1 -1
  191. package/types/forty-cdk-listbox.d.ts +513 -0
  192. package/types/forty-cdk-menu.d.ts +629 -0
  193. package/types/forty-cdk-menubar.d.ts +451 -0
  194. package/types/forty-cdk-meter.d.ts +122 -0
  195. package/types/forty-cdk-navigation-menu.d.ts +514 -0
  196. package/types/forty-cdk-number-input.d.ts +319 -0
  197. package/types/forty-cdk-otp-input.d.ts +248 -0
  198. package/types/forty-cdk-pagination.d.ts +214 -0
  199. package/types/forty-cdk-pane-resizer.d.ts +145 -0
  200. package/types/forty-cdk-popover.d.ts +509 -0
  201. package/types/forty-cdk-progress.d.ts +143 -0
  202. package/types/forty-cdk-radio-group.d.ts +222 -0
  203. package/types/forty-cdk-scroll-area.d.ts +258 -0
  204. package/types/forty-cdk-search.d.ts +142 -0
  205. package/types/forty-cdk-select.d.ts +899 -0
  206. package/types/forty-cdk-separator.d.ts +59 -0
  207. package/types/forty-cdk-signal-forms.d.ts +58 -0
  208. package/types/forty-cdk-slider.d.ts +379 -0
  209. package/types/forty-cdk-stepper.d.ts +650 -0
  210. package/types/forty-cdk-switch.d.ts +87 -0
  211. package/types/forty-cdk-table.d.ts +723 -0
  212. package/types/forty-cdk-tabs.d.ts +235 -0
  213. package/types/forty-cdk-time-field.d.ts +307 -0
  214. package/types/forty-cdk-time-picker.d.ts +578 -0
  215. package/types/forty-cdk-toast.d.ts +598 -0
  216. package/types/forty-cdk-toggle.d.ts +310 -0
  217. package/types/forty-cdk-toolbar.d.ts +217 -0
  218. package/types/forty-cdk-tooltip.d.ts +436 -0
  219. package/types/forty-cdk-tree.d.ts +688 -0
  220. package/types/forty-cdk.d.ts +1 -19743
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forty-cdk-drawer.mjs","sources":["../../../projects/forty-cdk/drawer/src/drawer-context.ts","../../../projects/forty-cdk/drawer/src/drawer-defaults.ts","../../../projects/forty-cdk/drawer/src/snap-points.ts","../../../projects/forty-cdk/drawer/src/drawer-drag.ts","../../../projects/forty-cdk/drawer/src/drawer.ts","../../../projects/forty-cdk/drawer/src/drawer-trigger.ts","../../../projects/forty-cdk/drawer/src/drawer-backdrop.ts","../../../projects/forty-cdk/drawer/src/drawer-handle.ts","../../../projects/forty-cdk/drawer/src/drawer-title.ts","../../../projects/forty-cdk/drawer/src/drawer-description.ts","../../../projects/forty-cdk/drawer/src/drawer-close.ts","../../../projects/forty-cdk/drawer/src/drawer-wrapper.ts","../../../projects/forty-cdk/drawer/src/drawer-ref.ts","../../../projects/forty-cdk/drawer/src/drawer-outlet.ts","../../../projects/forty-cdk/drawer/src/drawer-manager.ts","../../../projects/forty-cdk/drawer/src/forty-cdk-drawer.ts"],"sourcesContent":["import { inject, InjectionToken, type Signal } from '@angular/core';\n\nimport { type ForDrawerSide } from 'forty-cdk/core';\n\nexport { type ForDrawerSide };\n\n/**\n * A snap point. Three accepted shapes:\n *\n * - `number ∈ [0, 1]` — fraction of the dimension along the dismissal axis.\n * - `'NN%'` — equivalent to a fraction, e.g. `'50%' === 0.5`.\n * - `'NNpx'` — absolute pixel size measured from the anchored edge.\n */\nexport type ForDrawerSnapPoint = number | `${number}%` | `${number}px`;\n\n/**\n * Reasons emitted via the `(dismiss)` output. A single drawer instance can\n * cycle through any of these — the consumer typically just flips its\n * `@if`-gating signal off, but may choose to skip the unmount on specific\n * reasons (e.g. ignore `'pointerDownOutside'` for a sticky drawer).\n */\nexport type ForDrawerCloseReason =\n | 'escape'\n | 'backdrop'\n | 'pointerDownOutside'\n | 'focusOutside'\n | 'closeButton'\n | 'swipe'\n | 'programmatic';\n\n/**\n * Coordination contract owned by `ForDrawer` (declarative) or by the\n * `ForDrawerManager.open()` machinery (programmatic). Title / Description\n * register their generated ids so the drawer wires `aria-labelledby` /\n * `aria-describedby` reactively. Backdrop, Close button and Handle hook\n * into the same surface to request close / register themselves.\n *\n * The drawer's \"openness\" isn't part of this contract: the directive is\n * mounted iff the drawer is open, so descendants don't need an open\n * signal to coordinate.\n */\nexport interface ForDrawerContext {\n readonly dismissible: Signal<boolean>;\n readonly modal: Signal<boolean>;\n readonly alert: Signal<boolean>;\n readonly side: Signal<ForDrawerSide>;\n readonly activeSnapPoint: Signal<ForDrawerSnapPoint | null>;\n /**\n * Whether the backdrop should reflect `data-fade-from-active`. True\n * when `fadeFromIndex` is set and the active snap point is at or past\n * that index. Computed by the root.\n */\n readonly fadeFromActive: Signal<boolean>;\n /**\n * `true` while a pointer drag gesture is in flight. Mirrors the host's\n * `data-dragging` attribute so pieces portaled away from the surface\n * (the backdrop) can suppress their own transitions during the gesture.\n */\n readonly dragging: Signal<boolean>;\n /**\n * Progress of the current drag *toward the anchored edge* (dismiss\n * direction), as a fraction `∈ [0, 1]` of the drawer's dimension along\n * the dismissal axis. `0` at rest and while growing away from the edge\n * (with snap points). The backdrop publishes this as the\n * `--for-drawer-drag-progress` custom property so consumers can fade it\n * out as the surface is dragged off-screen — `opacity: calc(1 - var(--for-drawer-drag-progress))`.\n */\n readonly dragProgress: Signal<number>;\n readonly labelledBy: Signal<string | null>;\n readonly describedBy: Signal<string | null>;\n /**\n * Portal target shared with the backdrop so both resolve the same\n * container. `null` ⇒ `document.body`. Set via the drawer's `container`\n * input; read once per mount.\n */\n readonly container: Signal<HTMLElement | null>;\n\n /**\n * Host element of the drawer surface. Exposed so a nested child can\n * register its parent topology with `ForDrawerStack` without piercing\n * Angular DI to fetch the parent's `ElementRef`. Read-only — pieces\n * never mutate the host directly.\n */\n readonly hostElement: HTMLElement;\n\n registerLabel(id: string): void;\n unregisterLabel(id: string): void;\n registerDescription(id: string): void;\n unregisterDescription(id: string): void;\n\n /**\n * Register the visual handle element so that `handleOnly === true`\n * gates the swipe gesture to gestures starting on this element. Pass\n * `null` to unregister.\n */\n registerHandle(el: HTMLElement | null): void;\n\n /**\n * Register the backdrop element so the dismissable layer treats it as\n * part of the drawer surface (`exemptElements`) — without this, a\n * `pointerdown` on the portaled backdrop would fire `pointerDownOutside`\n * before the backdrop's `click` handler runs, so the consumer would see\n * close-reason `'pointerDownOutside'` instead of `'backdrop'` (WebKit\n * was the first to surface this; Chromium happened to dispatch the\n * events in an order that masked it). Pass `null` to unregister.\n */\n registerBackdrop(el: HTMLElement | null): void;\n\n /**\n * Request that the drawer close. Reasons:\n * - `'escape'` / `'backdrop'` / `'pointerDownOutside'` / `'focusOutside'` /\n * `'swipe'`: honored only when `dismissible()` is true.\n * - `'closeButton'`: always honored.\n * - `'programmatic'`: always honored, used by `ForDrawerManager.open()`\n * consumers that drive close imperatively from a child component.\n *\n * `value` is the close result, propagated to `ForDrawerRef.close(value)`\n * in programmatic mode. Ignored in declarative mode.\n */\n requestClose(reason: ForDrawerCloseReason, value?: unknown): void;\n}\n\nexport const FOR_DRAWER_CONTEXT = new InjectionToken<ForDrawerContext>('FOR_DRAWER_CONTEXT');\n\n/**\n * @internal Per-instance drawer id, provided by `ForDrawerManager` into the\n * opened component's injector so the portaled `[forDrawerBackdrop]` can\n * reflect `data-for-drawer-id` and be paired with its drawer for the\n * manager's exit-animation orchestration. Absent in the declarative path,\n * where the backdrop's own `animate.leave` runs normally.\n */\nexport const FOR_DRAWER_INSTANCE_ID = new InjectionToken<string>('FOR_DRAWER_INSTANCE_ID');\n\nexport function injectDrawerContext(piece: string): ForDrawerContext {\n const ctx = inject(FOR_DRAWER_CONTEXT, { optional: true });\n if (!ctx) {\n throw new Error(`[forty-cdk/drawer] ${piece} must be used inside a [forDrawer] element.`);\n }\n return ctx;\n}\n\n/**\n * Drag/release event payloads. Surfaced through `(dragMove)` / `(release)`\n * so consumers can drive bespoke visualizations (e.g. a separate \"scaled\n * background\" effect, a debug HUD); the directive itself owns transform\n * application and snap resolution.\n */\nexport interface ForDrawerDragEvent {\n readonly percentageDragged: number;\n readonly originalEvent: PointerEvent;\n}\n\nexport interface ForDrawerReleaseEvent {\n readonly willClose: boolean;\n readonly nextSnapPoint: ForDrawerSnapPoint | null;\n readonly originalEvent: PointerEvent;\n}\n","import { type Provider } from '@angular/core';\n\nimport { createDefaults } from 'forty-cdk/core';\nimport { type ForDrawerSide } from './drawer-context';\n\n/**\n * Defaults inherited by descendant drawers in the surrounding injector\n * scope. Configure with `provideForDrawerDefaults`. Keys map 1:1 to the\n * directive inputs of the same name; the directive picks\n * `consumerInput ?? defaults[key] ?? hardcoded fallback` per key.\n */\nexport interface ForDrawerDefaults {\n /** Default `'bottom'`. */\n side?: ForDrawerSide;\n /** Default `true`. Modal locks scroll, traps focus, applies `aria-modal`. */\n modal?: boolean;\n /** Default `true`. Whether dismiss interactions (Escape, backdrop, swipe) close. */\n dismissible?: boolean;\n /** Default `true`. Pointer drag gesture toward the anchored edge dismisses. */\n swipeToDismiss?: boolean;\n /**\n * Default `0.25`. Fraction past which a release dismisses instead of\n * snapping back: of the full dimension without snap points, of the lowest\n * snap's extent with them (see\n * `_internal/snap-points/resolveSnapTarget`).\n */\n closeThreshold?: number;\n /** Default `'first'`. Where to send focus on mount. */\n initialFocus?: 'first' | 'container';\n /** Default `true`. Restore focus to the previously focused element on close. */\n returnFocus?: boolean;\n /**\n * Default `false`. When `true` the swipe gesture only arms on the\n * registered `[forDrawerHandle]` element instead of the whole surface.\n */\n handleOnly?: boolean;\n /**\n * Default `false`. When `true`, an open drawer asks\n * `[forDrawerWrapper]` to scale + translate behind it (the \"scale\n * background\" effect). Suppressed under\n * `prefers-reduced-motion: reduce`.\n */\n scaleBackground?: boolean;\n /**\n * Default `true`. When `scaleBackground` is active, paints the body\n * with `scaleBackgroundColor` so the sliver of viewport between the\n * scaled wrapper and the screen edge does not show through.\n */\n setBackgroundColorOnScale?: boolean;\n /** Default `0.95`. Scale factor applied to the wrapper. */\n scaleAmount?: number;\n /**\n * Default `14`. Vertical translation (in CSS pixels) added to\n * `env(safe-area-inset-top)` while the wrapper is scaled.\n */\n scaleTranslateYpx?: number;\n /** Default `8`. Border radius applied to the wrapper while scaled. */\n scaleBorderRadiusPx?: number;\n /**\n * Default `'black'`. Body background colour applied while\n * `setBackgroundColorOnScale` is active.\n */\n scaleBackgroundColor?: string;\n /**\n * Default `0.93`. Scale factor applied to a parent drawer while a\n * nested child drawer is active. Composes with the wrapper-level\n * `scaleBackground` effect when both opt in. Suppressed under\n * `prefers-reduced-motion: reduce`.\n */\n nestedScaleAmount?: number;\n /**\n * Default `8`. Pixels of additional translation applied to a parent\n * drawer while a nested child is active, in the direction *away* from\n * the parent's anchored edge (so a `bottom` drawer slides up by this\n * amount when its child opens).\n */\n nestedTranslateYpx?: number;\n /**\n * CSS class applied (via `animate.enter`) to the programmatic overlay host\n * when it mounts, so it plays an enter animation. The class lands on the\n * `[forDrawer]` host that also carries the consumer `class`. No default.\n */\n animateEnter?: string;\n /**\n * CSS class applied to the programmatic overlay host when `close()` is\n * called, kept on the still-mounted host until its CSS animations finish so\n * an exit transition plays before teardown. No default (close is immediate).\n */\n animateLeave?: string;\n /**\n * CSS class applied to the portaled `[forDrawerBackdrop]` when `close()` is\n * called, so the backdrop plays an exit animation in lockstep with the\n * host. Needed because a backdrop declared inside the opened component plays\n * its `animate.enter` on mount but cannot run its template `animate.leave` —\n * Angular does not process leave animations across the `ngComponentOutlet`\n * boundary the manager mounts the component through. No default.\n */\n backdropAnimateLeave?: string;\n}\n\nconst FALLBACK: ForDrawerDefaults = {\n side: 'bottom',\n modal: true,\n dismissible: true,\n swipeToDismiss: true,\n closeThreshold: 0.25,\n initialFocus: 'first',\n returnFocus: true,\n handleOnly: false,\n scaleBackground: false,\n setBackgroundColorOnScale: true,\n scaleAmount: 0.95,\n scaleTranslateYpx: 14,\n scaleBorderRadiusPx: 8,\n scaleBackgroundColor: 'black',\n nestedScaleAmount: 0.93,\n nestedTranslateYpx: 8,\n};\n\nconst { token, provideDefaults } = createDefaults<ForDrawerDefaults>(\n 'FOR_DRAWER_DEFAULTS',\n FALLBACK,\n);\n\n/** Token holding the resolved drawer defaults for the current scope. */\nexport const FOR_DRAWER_DEFAULTS = token;\n\n/**\n * Configures forty-cdk drawer defaults for this injector scope. Partial\n * overrides inherit unspecified keys from the parent scope (or library\n * defaults at the root).\n */\nexport function provideForDrawerDefaults(defaults: Partial<ForDrawerDefaults> = {}): Provider[] {\n return provideDefaults(defaults);\n}\n","/**\n * Snap-point parsing, position computation, and validation for `[forDrawer]`.\n *\n * Two-phase validation:\n *\n * - {@link validateSnapPointsShape} runs at mount. Per-point sanity checks\n * (rejects `NaN`, malformed strings, non-numbers) and strict-monotonic\n * enforcement when the array is **homogeneous** — pure-fraction (numbers\n * and `'NN%'` strings) or pure-`'NNpx'`. Mixed-mode arrays cannot be\n * ordered without knowing the live dimension and are deferred.\n *\n * - {@link validateSnapPositions} runs once the surface has been measured\n * (in `afterNextRender` or `#onSwipeStart`). Compares the resolved px\n * positions and throws with a grep-friendly error that names both the\n * offending point and its non-monotonic neighbour, plus the live\n * dimension.\n *\n * {@link computeSnapPositions} is the pure conversion function paired with\n * the two checks. It does **not** validate; the caller controls when /\n * whether to throw on monotonicity.\n *\n * Internal to the drawer primitive — not re-exported through `index.ts` /\n * `public-api.ts`.\n */\nimport type { ForDrawerSnapPoint } from './drawer-context';\n\nconst SNAP_POINT_PERCENT_RE = /^(-?\\d+(?:\\.\\d+)?)%$/;\nconst SNAP_POINT_PX_RE = /^(-?\\d+(?:\\.\\d+)?)px$/;\n\n/** Per-point classification used by the shape check. */\ntype SnapPointKind = 'fraction' | 'px';\n\nfunction classifySnapPoint(p: ForDrawerSnapPoint): SnapPointKind {\n // Numbers and `NN%` strings both resolve as fractions of the dimension —\n // their cross-comparison is dimension-independent. `NNpx` strings only\n // become comparable once we know the dimension.\n if (typeof p === 'number') {\n return 'fraction';\n }\n return SNAP_POINT_PX_RE.test(p) ? 'px' : 'fraction';\n}\n\n/**\n * Convert a snap point to its fractional position along the dismissal axis.\n * Returns `[0, 1]` (or beyond, for fractional values > 1, allowed\n * as overshoot). Throws on malformed strings or values that aren't finite.\n */\nexport function snapPointToFraction(p: ForDrawerSnapPoint, dimension: number): number {\n if (typeof p === 'number') {\n if (!Number.isFinite(p)) {\n throw new Error(`[forty-cdk/drawer] Snap point must be a finite number, got ${p}.`);\n }\n return p;\n }\n const pctMatch = SNAP_POINT_PERCENT_RE.exec(p);\n if (pctMatch) {\n const n = Number.parseFloat(pctMatch[1]!);\n return n / 100;\n }\n const pxMatch = SNAP_POINT_PX_RE.exec(p);\n if (pxMatch) {\n const n = Number.parseFloat(pxMatch[1]!);\n return dimension === 0 ? 0 : n / dimension;\n }\n throw new Error(\n `[forty-cdk/drawer] Snap point must be a number, \"NN%\", or \"NNpx\" string. Got: ${String(p)}.`,\n );\n}\n\n/**\n * Mount-time **shape** check. Validates each snap point in isolation\n * (rejects `NaN`, malformed strings, non-numbers) and only enforces strict\n * monotonicity when every point shares the same unit family — pure\n * numbers/percent strings are dimension-independent and can be compared\n * directly, as can pure-px arrays. Mixed `'NNpx'` + fraction inputs are\n * deferred to {@link validateSnapPositions}, which runs once the live\n * dimension is known.\n *\n * Throws an `Error` with a `[forty-cdk/drawer]` prefix on the first failure.\n */\nexport function validateSnapPointsShape(snapPoints: ReadonlyArray<ForDrawerSnapPoint>): void {\n // Sanity-check every entry; `snapPointToFraction` throws on NaN /\n // malformed strings. Use `1` as a placeholder dimension — the px branch\n // would otherwise return `0` which is a valid fraction. Discard the\n // result; we only care about the throw.\n for (const p of snapPoints) {\n snapPointToFraction(p, 1);\n }\n // Monotonicity is dimension-independent only when every entry classifies\n // the same way. Pure-fraction (numbers + percent strings) sorts directly;\n // pure-px sorts by raw px value. A mixed array (e.g. `['200px', 0.5]`)\n // cannot be checked here because the cross-comparison depends on the\n // actual surface size — that runs in `validateSnapPositions` on first\n // measurement.\n const kind = classifySnapPoint(snapPoints[0]!);\n const homogeneous = snapPoints.every((p) => classifySnapPoint(p) === kind);\n if (!homogeneous) {\n return;\n }\n const positions = snapPoints.map((p) => {\n if (kind === 'fraction') {\n return snapPointToFraction(p, 1);\n }\n return Number.parseFloat(SNAP_POINT_PX_RE.exec(p as string)![1]!);\n });\n for (let i = 1; i < positions.length; i++) {\n if (positions[i]! <= positions[i - 1]!) {\n throw new Error(\n '[forty-cdk/drawer] snapPoints must be strictly increasing (closest-to-edge first).',\n );\n }\n }\n}\n\n/**\n * Returns the position of each snap point along the dismissal axis (in CSS\n * pixels measured from the anchored edge). **Does not validate** — pair with\n * {@link validateSnapPositions} when you need the strict-increase guarantee\n * against a live dimension.\n */\nexport function computeSnapPositions(\n snapPoints: ReadonlyArray<ForDrawerSnapPoint>,\n dimension: number,\n): number[] {\n return snapPoints.map((p) => snapPointToFraction(p, dimension) * dimension);\n}\n\n/**\n * First-measurement **monotonicity** check. Compares the resolved px\n * positions against the live drawer dimension. Mixed `'NNpx'` + fraction\n * inputs that look monotonic at one dimension and non-monotonic at another\n * fail here — the error message names the offending point so the consumer\n * doesn't have to manually back-out the conversion.\n */\nexport function validateSnapPositions(\n snapPoints: ReadonlyArray<ForDrawerSnapPoint>,\n positions: ReadonlyArray<number>,\n dimension: number,\n): void {\n for (let i = 1; i < positions.length; i++) {\n const cur = positions[i]!;\n const prev = positions[i - 1]!;\n if (cur <= prev) {\n const curConfig = JSON.stringify(snapPoints[i]);\n const prevConfig = JSON.stringify(snapPoints[i - 1]);\n throw new Error(\n `[forty-cdk/drawer] snap point ${curConfig} at index ${i} resolves to ${cur}px which is <= snap point ${prevConfig} at ${prev}px (drawer dimension ${dimension}px).`,\n );\n }\n }\n}\n","import {\n computed,\n DestroyRef,\n effect,\n ElementRef,\n ErrorHandler,\n inject,\n type ModelSignal,\n type Signal,\n signal,\n} from '@angular/core';\n\nimport {\n injectPrefersReducedMotion,\n attachSwipeDismiss,\n type SwipeDirection,\n type SwipeEventDetail,\n isScrollableAtEdge,\n resolveSnapTarget,\n} from 'forty-cdk/core';\nimport {\n type ForDrawerDragEvent,\n type ForDrawerReleaseEvent,\n type ForDrawerSide,\n type ForDrawerSnapPoint,\n} from './drawer-context';\nimport {\n computeSnapPositions,\n validateSnapPointsShape,\n validateSnapPositions,\n} from './snap-points';\n\nfunction sideToDirections(side: ForDrawerSide): readonly SwipeDirection[] {\n switch (side) {\n case 'bottom':\n return ['down'];\n case 'top':\n return ['up'];\n case 'right':\n return ['right'];\n case 'left':\n return ['left'];\n }\n}\n\n/** Axis on which the drawer's dimension lives. */\nfunction sideAxis(side: ForDrawerSide): 'x' | 'y' {\n return side === 'left' || side === 'right' ? 'x' : 'y';\n}\n\n/** Sign of a positive (toward-edge) drag offset along the host's axis. */\nfunction sideSign(side: ForDrawerSide): 1 | -1 {\n return side === 'bottom' || side === 'right' ? 1 : -1;\n}\n\n/**\n * Allowed swipe directions for the drag gesture. Without snap points the\n * drawer only drags *toward* its anchored edge (dismiss). With snap points\n * the surface must also grow on a drag *away* from the edge to reach a\n * larger snap, so both directions along the dismissal axis arm the gesture.\n */\nfunction dragDirections(side: ForDrawerSide, hasSnapPoints: boolean): readonly SwipeDirection[] {\n if (!hasSnapPoints) {\n return sideToDirections(side);\n }\n return sideAxis(side) === 'y' ? ['down', 'up'] : ['right', 'left'];\n}\n\n/**\n * Reactive inputs the drag engine reads from the host `[forDrawer]`\n * directive. Each is a `Signal` (the directive's `input()` / `model()`\n * accessors) so a runtime rebind — a `[swipeToDismiss]` flip, a new\n * `[snapPoints]` array, a programmatic `[(activeSnapPoint)]` write — flows\n * through without re-wiring.\n */\nexport interface DrawerDragConfig {\n /** Edge the drawer is anchored to; drives axis, sign, and swipe directions. */\n readonly side: Signal<ForDrawerSide>;\n /** Snap points (Vaul semantics) or `undefined` for a plain dismiss-only drawer. */\n readonly snapPoints: Signal<ReadonlyArray<ForDrawerSnapPoint> | undefined>;\n /** Fraction of the dimension past which a release dismisses instead of snapping back. */\n readonly closeThreshold: Signal<number>;\n /** When `true`, the gesture only arms on a pointerdown that started on the handle. */\n readonly handleOnly: Signal<boolean>;\n /** When `true`, swipe toward the anchored edge dismisses past `closeThreshold`. */\n readonly swipeToDismiss: Signal<boolean>;\n /** First index of `snapPoints` for the backdrop fade; validated for range. */\n readonly fadeFromIndex: Signal<number | undefined>;\n /** Two-way active snap point. The engine seeds it on mount and writes it on release. */\n readonly activeSnapPoint: ModelSignal<ForDrawerSnapPoint | null>;\n /** Registered `[forDrawerHandle]` element, or `null` when none is mounted. */\n readonly handleEl: Signal<HTMLElement | null>;\n /** Emits the live drag stream so consumers can drive bespoke visualisations. */\n readonly emitDrag: (event: ForDrawerDragEvent) => void;\n /** Emits the release decision (already applied to `activeSnapPoint` / close). */\n readonly emitRelease: (event: ForDrawerReleaseEvent) => void;\n /** Requests a `'swipe'` close when the release crosses the dismiss threshold. */\n readonly requestClose: (reason: 'swipe') => void;\n}\n\n/**\n * Imperative handle returned by {@link injectDrawerDrag}. Exposes the three\n * reactive signals the directive host-binds plus two lifecycle hooks the\n * directive calls from its own `afterNextRender`s so the gesture engine's\n * side effects keep `[forDrawer]`'s historical ordering relative to the\n * modal shell.\n */\nexport interface DrawerDragHandle {\n /** `true` while a pointer drag gesture is in flight. Host-bound as `data-dragging`. */\n readonly dragging: Signal<boolean>;\n /** Progress of the current drag toward the anchored edge, `∈ [0, 1]`. */\n readonly dragProgress: Signal<number>;\n /** Live drag displacement as a CSS `translate` value (`\"<x> <y>\"`). */\n readonly dragTranslate: Signal<string>;\n /**\n * Run the mount-time snap-point validation + first live-dimension\n * measurement and seed the `activeSnapPoint` default. Throws (with a\n * `[forty-cdk/drawer]`-prefixed message) on a bad `snapPoints` /\n * `fadeFromIndex` config. The directive calls this from its pre-shell\n * `afterNextRender`, after the drawer-stack push and the `closeThreshold`\n * check, so the validation runs at the same point in the mount sequence it\n * always has. After it returns, the runtime-rebind effect is unblocked.\n */\n readonly validateOnMount: () => void;\n /**\n * Arm the swipe gate now that the surface is fully wired by the shell.\n * Idempotent; flips an internal signal that the attach/detach effect\n * watches. Called from the directive's post-shell `afterNextRender`.\n */\n readonly arm: () => void;\n}\n\n/**\n * Pointer / swipe / snap gesture engine for `[forDrawer]`, extracted from the\n * directive so the velocity tracking, per-gesture offset bounds,\n * dimension-keyed snap-position cache, and runtime monotonicity re-validation\n * live in one unit-testable collaborator. The directive keeps its inputs /\n * outputs, label / description registration, drawer-stack + scale-coordinator\n * registration, and `injectModalShell`.\n *\n * Must be called from an injection context (the directive constructor). It\n * registers the drag-translate publisher, the runtime snap-rebind validator,\n * and the swipe-gate effect immediately, but defers the two ordering-sensitive\n * steps to handle methods the directive drives from its own `afterNextRender`s:\n * {@link DrawerDragHandle.validateOnMount} (mount-time snap validation, called\n * after the drawer-stack push so it lands at the original point in the mount\n * sequence) and {@link DrawerDragHandle.arm} (wires the pointer listeners onto\n * a host already portaled to `document.body` by the shell).\n *\n * Forwards the host's `ElementRef` and the injected `ErrorHandler` — the\n * caller never has to touch them. Pointer listeners are detached on destroy\n * via the engine's own `DestroyRef.onDestroy` hook.\n */\nexport function injectDrawerDrag(config: DrawerDragConfig): DrawerDragHandle {\n const host = inject<ElementRef<HTMLElement>>(ElementRef);\n const errorHandler = inject(ErrorHandler);\n const prefersReducedMotion = injectPrefersReducedMotion();\n\n const side = config.side;\n const snapPoints = config.snapPoints;\n const closeThreshold = config.closeThreshold;\n const fadeFromIndex = config.fadeFromIndex;\n const activeSnapPoint = config.activeSnapPoint;\n\n const dragOffset = signal(0); // px translated along the dismissal axis (positive = away from edge)\n const dragging = signal(false);\n const dragProgress = signal(0); // [0, 1] progress toward the anchored edge (dismiss direction)\n\n const dragTranslate = computed<string>(() => {\n const offset = dragOffset();\n if (offset === 0) {\n return '0px 0px';\n }\n const px = sideSign(side()) * offset;\n return sideAxis(side()) === 'y' ? `0px ${px}px` : `${px}px 0px`;\n });\n\n // Pointer state for velocity tracking.\n let pointerStartTime = 0;\n let pointerLastY = 0;\n let pointerLastX = 0;\n let pointerLastTime = 0;\n let pointerVelocity = 0;\n let dimensionAtStart = 0;\n\n // Per-gesture lower bound for the drag offset (px toward the edge),\n // resolved on `onSwipeStart`. A positive offset moves the surface toward\n // the edge (shrink / dismiss) and is never capped — dragging past the edge\n // is how a dismiss arms. A negative offset moves it away from the edge to\n // grow. Without snap points the floor stays 0 (the surface can only shrink\n // toward the edge); with snap points the floor reaches the largest snap so\n // an upward drag can expand the surface.\n let dragMinOffset = 0;\n\n // Snap positions cache, keyed by BOTH the dimension they were resolved\n // against AND the `snapPoints` array identity. First-measurement validation\n // populates this; `onSwipeStart` refreshes it when the surface has resized\n // between gestures, and a runtime `[snapPoints]` rebind (same dimension, new\n // array reference) is a cache miss so positions are recomputed and\n // re-validated. Always pre-validated, so `onSwipeRelease` can read it\n // without re-running monotonicity checks.\n let snapPositionsCache: {\n dimension: number;\n snapPoints: ReadonlyArray<ForDrawerSnapPoint>;\n positions: number[];\n } | null = null;\n\n // Flipped true once the mount-time `afterNextRender` has validated the\n // initial snap config. Gates the runtime-rebind effect so its first\n // (pre-render) run is a no-op and only genuine post-mount changes\n // re-validate.\n let snapConfigMounted = false;\n\n // Signal flipped true by `arm()` in the directive's post-shell\n // `afterNextRender`. Gates the swipe gate effect so the gesture arms on a\n // host already wired by the shell; being a signal, flipping it re-runs the\n // effect for the first real attach.\n const swipeReady = signal(false);\n\n let swipeCleanup: (() => void) | null = null;\n\n /**\n * Dimension-independent snap-point validation: the per-point shape /\n * strict-increase check (`validateSnapPointsShape`) plus the\n * `fadeFromIndex` range check. Throws with a `[forty-cdk/drawer]`-prefixed\n * message on the first failure. A `null` / empty array is a valid \"no snap\n * points\" config and skips both checks. Shared by the mount-time\n * `afterNextRender` and the runtime-rebind effect so the two paths stay in\n * lockstep.\n */\n function validateSnapPointConfig(points: ReadonlyArray<ForDrawerSnapPoint> | undefined): void {\n if (!points || points.length === 0) {\n return;\n }\n validateSnapPointsShape(points);\n const idx = fadeFromIndex();\n if (idx !== undefined && (idx < 0 || idx >= points.length)) {\n throw new Error(\n `[forty-cdk/drawer] fadeFromIndex (${idx}) is out of range for snapPoints (length ${points.length}).`,\n );\n }\n }\n\n /**\n * Resolve and validate snap positions against the host's current\n * dimension. No-op if the cached positions already match BOTH the live\n * dimension and the current `snapPoints` array. Throws (with the\n * offending-point error message) when the live dimension flips a mixed\n * `'NNpx'` + fraction array out of monotonic order.\n *\n * Called from `afterNextRender` (first measurement), from `onSwipeStart`\n * (resize between gestures, or a runtime `[snapPoints]` rebind), and from\n * the runtime-rebind effect. Never from `onSwipeRelease` — by the time\n * release fires, the cache is already populated for this gesture's\n * dimension and array.\n */\n function refreshSnapPositions(points: ReadonlyArray<ForDrawerSnapPoint>): void {\n const rect = host.nativeElement.getBoundingClientRect();\n const dim = sideAxis(side()) === 'y' ? rect.height : rect.width;\n if (dim <= 0) {\n // No layout yet (jsdom, or display: none). Defer; the next call with\n // a real dimension will do the work.\n return;\n }\n const cached = snapPositionsCache;\n if (cached && cached.dimension === dim && cached.snapPoints === points) {\n return;\n }\n const positions = computeSnapPositions(points, dim);\n validateSnapPositions(points, positions, dim);\n snapPositionsCache = { dimension: dim, snapPoints: points, positions };\n }\n\n /**\n * Pixel position (from the anchored edge) of the currently-active snap\n * point within `snapPositions`. Falls back to the closest-to-edge entry\n * when the active point is unset or not found in `snapPoints`.\n */\n function activeSnapPositionPx(\n points: ReadonlyArray<ForDrawerSnapPoint>,\n snapPositions: ReadonlyArray<number>,\n ): number {\n const active = activeSnapPoint();\n if (active == null) {\n return snapPositions[0]!;\n }\n const idx = points.indexOf(active);\n return idx >= 0 ? snapPositions[idx]! : snapPositions[0]!;\n }\n\n function onSwipeStart(detail: SwipeEventDetail): void {\n // Bail out conditions that the swipe-dismiss helper can't know about:\n // (a) `handleOnly` and the gesture didn't start on the registered handle,\n // (b) the gesture started inside a scrollable element that hasn't reached\n // its edge along the dismissal direction (don't steal scroll).\n const target = detail.originalEvent.target as Element | null;\n const handle = config.handleEl();\n if (config.handleOnly() && (!handle || !target || !handle.contains(target))) {\n dragging.set(false);\n return;\n }\n if (target && isScrollableAtEdge(target, detail.direction, host.nativeElement)) {\n dragging.set(false);\n return;\n }\n\n dragging.set(true);\n dragProgress.set(0);\n pointerStartTime = detail.originalEvent.timeStamp || performance.now();\n pointerLastTime = pointerStartTime;\n pointerLastX = detail.originalEvent.clientX;\n pointerLastY = detail.originalEvent.clientY;\n pointerVelocity = 0;\n const rect = host.nativeElement.getBoundingClientRect();\n dimensionAtStart = sideAxis(side()) === 'y' ? rect.height : rect.width;\n\n // Refresh & validate snap positions for this gesture's dimension. If\n // mount-time first-measurement saw a non-zero dimension equal to the\n // current one, this is a cache hit and no work runs. Validation throws\n // here (pre-drag) rather than from the release handler.\n const points = snapPoints();\n if (points && points.length > 0) {\n refreshSnapPositions(points);\n const cached = snapPositionsCache;\n const positions =\n cached && cached.snapPoints === points\n ? cached.positions\n : computeSnapPositions(points, dimensionAtStart);\n const activePos = activeSnapPositionPx(points, positions);\n const highestPos = positions[positions.length - 1] ?? activePos;\n dragMinOffset = activePos - highestPos;\n } else {\n dragMinOffset = 0;\n }\n\n config.emitDrag({ percentageDragged: 0, originalEvent: detail.originalEvent });\n }\n\n function onSwipeMove(detail: SwipeEventDetail): void {\n if (!dragging()) {\n return;\n }\n const event = detail.originalEvent;\n const now = event.timeStamp || performance.now();\n const dx = event.clientX - pointerLastX;\n const dy = event.clientY - pointerLastY;\n const dt = Math.max(1, now - pointerLastTime);\n\n // Magnitude moved toward the anchored edge (positive = move toward edge).\n const moveTowardEdge = (() => {\n switch (side()) {\n case 'bottom':\n return dy; // pointer moves down → toward bottom edge → positive\n case 'top':\n return -dy;\n case 'right':\n return dx;\n case 'left':\n return -dx;\n }\n })();\n pointerVelocity = moveTowardEdge / dt; // px per ms toward edge\n pointerLastX = event.clientX;\n pointerLastY = event.clientY;\n pointerLastTime = now;\n\n // Integrate the per-event pointer delta into the cumulative drag offset,\n // clamped to this gesture's bounds. Without snap points the lower bound\n // is 0 (the surface only moves toward the edge to dismiss); with snap\n // points it goes negative so a drag away from the edge grows the surface\n // toward a larger snap. The host's `[style.translate]` binding reflects\n // the offset reactively — no imperative DOM write here.\n const nextOffset = Math.max(dragMinOffset, dragOffset() + moveTowardEdge);\n dragOffset.set(nextOffset);\n\n const dim = dimensionAtStart || 1;\n // `percentageDragged` tracks progress toward dismiss, so growth (a\n // negative offset) reads as 0 rather than a negative number.\n const percentageDragged = Math.min(1, Math.max(0, nextOffset / dim));\n dragProgress.set(percentageDragged);\n config.emitDrag({ percentageDragged, originalEvent: event });\n }\n\n function onSwipeRelease(detail: SwipeEventDetail): void {\n if (!dragging()) {\n return;\n }\n const event = detail.originalEvent;\n const offset = dragOffset();\n const dim = dimensionAtStart || 1;\n const threshold = closeThreshold();\n const points = snapPoints();\n\n let willClose = false;\n let nextSnap: ForDrawerSnapPoint | null = null;\n\n if (points && points.length > 0) {\n // `position` is the surface position along the dismissal axis from the\n // anchored edge. With `offset` representing how far the surface has\n // been pulled toward the edge (positive), the effective position from\n // the edge is `currentSnapPosition - offset`.\n //\n // Read snap positions from the pre-validated cache populated by\n // `refreshSnapPositions` at mount and on `onSwipeStart`. The release\n // path is throw-free by construction: any input that would fail\n // monotonicity at the live dimension has already failed before we get\n // here.\n const cached = snapPositionsCache;\n const snapPositions =\n cached && cached.dimension === dim && cached.snapPoints === points\n ? cached.positions\n : computeSnapPositions(points, dim);\n const position = activeSnapPositionPx(points, snapPositions) - offset;\n const resolved = resolveSnapTarget<ForDrawerSnapPoint>({\n snapPoints: points,\n snapPositions,\n activeSnapPoint: activeSnapPoint(),\n position,\n velocity: -pointerVelocity, // helper sema: positive = away from edge\n closeThreshold: threshold,\n });\n willClose = resolved.willClose;\n nextSnap = resolved.nextSnapPoint;\n } else {\n // No snap points: dismiss when dragged past closeThreshold OR fast\n // flick toward edge.\n willClose = offset >= dim * threshold || pointerVelocity >= 0.4;\n }\n\n config.emitRelease({ willClose, nextSnapPoint: nextSnap, originalEvent: event });\n\n // Zero the offset and flip `dragging` off together. Both writes (plus the\n // `activeSnapPoint` change below) flush in one change-detection pass, so\n // the host applies the `data-dragging` removal, the new\n // `data-active-snap-point`, and the `translate` reset to zero in a single\n // style recalc — the consumer's `transition: translate` then animates the\n // drag delta away in lockstep with the snap-position transition, with no\n // intermediate jump to the previous rest position.\n dragOffset.set(0);\n dragProgress.set(0);\n dragging.set(false);\n\n if (willClose) {\n config.requestClose('swipe');\n return;\n }\n\n if (nextSnap !== null && nextSnap !== activeSnapPoint()) {\n activeSnapPoint.set(nextSnap);\n }\n }\n\n function attachSwipe(): () => void {\n const el = host.nativeElement;\n return attachSwipeDismiss({\n element: el,\n getDirections: () => dragDirections(side(), !!snapPoints()?.length),\n // Always arm on a tiny gesture and let the move handler decide; we\n // resolve the actual close threshold on release via resolveSnapTarget.\n getThreshold: () => 1,\n onSwipeStart: (detail) => onSwipeStart(detail),\n onSwipeMove: (detail) => onSwipeMove(detail),\n onSwipeEnd: (detail) => onSwipeRelease(detail),\n onSwipeCancel: (detail) => onSwipeRelease(detail),\n });\n }\n\n // ---- Drag-translate side effect. Publishes the drag delta as the\n // `--for-drawer-translate` custom property (see `dragTranslate` for why a\n // custom property rather than a directly-written `translate`/`transform`).\n // Runs in the same change-detection flush as the host's attribute\n // bindings, so the release path's `data-dragging` removal,\n // `data-active-snap-point` change, and translate reset to \"0px 0px\" all\n // land in one style recalc and transition together.\n effect(() => {\n host.nativeElement.style.setProperty('--for-drawer-translate', dragTranslate());\n });\n\n // ---- Mount-time snap validation. Invoked by the directive's pre-shell\n // `afterNextRender` (via the returned `validateOnMount`), after the\n // drawer-stack push and the `closeThreshold` check, so it lands at the same\n // point in the mount sequence it always has — before the shell's\n // dismissable / focus / scroll-lock wiring. A consumer passing a bad\n // snapPoints array gets a clear error before the shell tries to focus an\n // element that may not exist. The mount-time `activeSnapPoint` default is\n // seeded here too. Subsequent runtime `[snapPoints]` rebinds are handled by\n // the effect below, which re-runs the same validation and invalidates the\n // position cache.\n function validateOnMount(): void {\n const points = snapPoints();\n if (points && points.length > 0 && activeSnapPoint() === null) {\n activeSnapPoint.set(points[0]!);\n }\n validateSnapPointConfig(points);\n // Try first measurement. In real browsers `getBoundingClientRect`\n // returns the laid-out dimension here (we're inside `afterNextRender`,\n // post-layout). In jsdom layout doesn't run, so dimension is 0 — defer\n // to `onSwipeStart`'s rect read, which is also pre-gesture.\n if (points && points.length > 0) {\n refreshSnapPositions(points);\n }\n snapConfigMounted = true;\n }\n\n // ---- Runtime `[snapPoints]` / `[fadeFromIndex]` rebind. `validateOnMount`\n // validates the INITIAL config once; this effect\n // re-validates whenever the consumer swaps the array (or fadeFromIndex)\n // at runtime. Without it a new array that is non-monotonic — or a\n // fadeFromIndex that no longer fits — would slip through, and the\n // position cache (keyed on array identity) would lazily recompute on the\n // next gesture against the new array but never re-run the shape /\n // range checks. Guarded by `snapConfigMounted` so the effect's first\n // run (which fires before `validateOnMount`) doesn't duplicate the\n // mount-time validation or race the layout measurement. Validation +\n // cache invalidation are genuine side effects (route an error / clear a\n // field), not reactive-state propagation, so an `effect` is the right\n // tool here. Validation failures are funnelled through the injected\n // `ErrorHandler` so they reach the consumer's handler exactly like the\n // mount-time `afterNextRender` throw, instead of tearing down the effect.\n effect(() => {\n const points = snapPoints();\n // Track fadeFromIndex too so a runtime range violation is caught.\n fadeFromIndex();\n if (!snapConfigMounted) {\n return;\n }\n // A new array reference invalidates the position cache so the next\n // gesture (and `refreshSnapPositions`) resolves against fresh geometry\n // instead of the previous array's cached positions.\n if (snapPositionsCache && snapPositionsCache.snapPoints !== points) {\n snapPositionsCache = null;\n }\n try {\n validateSnapPointConfig(points);\n if (points && points.length > 0) {\n refreshSnapPositions(points);\n }\n } catch (error) {\n errorHandler.handleError(error);\n }\n });\n\n // ---- Swipe-to-dismiss gate. Arms the pointer listeners only when\n // `swipeToDismiss` is on AND the user hasn't asked for reduced motion\n // (drag animations are vestibular-hostile). Both inputs are read\n // reactively so a runtime flip of either — a `[swipeToDismiss]` rebind or\n // a live `prefers-reduced-motion` change — arms or disarms the gesture,\n // mirroring how `ForDrawerScaleCoordinator` already reacts to the\n // preference. Attaching/detaching listeners is a DOM side effect, so an\n // `effect` is the right tool; `swipeReady` gates the pre-render run so the\n // gesture arms on a host already attached via the shell's portal.\n effect(() => {\n const shouldArm = config.swipeToDismiss() && !prefersReducedMotion();\n if (!swipeReady()) {\n return;\n }\n if (shouldArm && swipeCleanup === null) {\n swipeCleanup = attachSwipe();\n } else if (!shouldArm && swipeCleanup !== null) {\n swipeCleanup();\n swipeCleanup = null;\n }\n });\n\n inject(DestroyRef).onDestroy(() => {\n swipeCleanup?.();\n swipeCleanup = null;\n });\n\n return {\n dragging: dragging.asReadonly(),\n dragProgress: dragProgress.asReadonly(),\n dragTranslate,\n validateOnMount,\n arm: () => swipeReady.set(true),\n };\n}\n","import {\n afterNextRender,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\n\nimport {\n ForDrawerScaleCoordinator,\n ForDrawerStack,\n injectModalShell,\n type VetoableEvent,\n type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport {\n FOR_DRAWER_CONTEXT,\n type ForDrawerCloseReason,\n type ForDrawerContext,\n type ForDrawerDragEvent,\n type ForDrawerReleaseEvent,\n type ForDrawerSide,\n type ForDrawerSnapPoint,\n} from './drawer-context';\nimport { FOR_DRAWER_DEFAULTS } from './drawer-defaults';\nimport { injectDrawerDrag } from './drawer-drag';\n\n/**\n * Headless implementation of the [WAI-ARIA Modal Dialog pattern](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/),\n * specialised as a side / bottom-sheet drawer with optional swipe-to-dismiss\n * and snap points.\n *\n * Apply `[forDrawer]` on the drawer surface itself — not on a wrapper. The\n * directive moves the host to `document.body` (portal), traps focus, locks\n * body scroll, listens for Escape, and (when `swipeToDismiss` is on) attaches\n * pointer-based swipe handlers that translate the surface and resolve to the\n * nearest snap point or a dismiss on release. `aria-labelledby` and\n * `aria-describedby` wire automatically via `[forDrawerTitle]` /\n * `[forDrawerDescription]`; pass `ariaLabel` instead if you don't render\n * a visible title.\n *\n * Mount/unmount is the consumer's responsibility — the directive does not\n * manage `[hidden]`. Wrap with `@if (open())` and let `animate.enter` /\n * `animate.leave` handle transitions.\n *\n * For programmatic use (open arbitrary components imperatively, manage\n * lifecycle externally), see `ForDrawerManager.open()`.\n */\n@Directive({\n selector: '[forDrawer]',\n exportAs: 'forDrawer',\n host: {\n '[attr.role]': 'alert() ? \"alertdialog\" : \"dialog\"',\n '[attr.aria-modal]': 'modal() ? \"true\" : null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.aria-describedby]': 'describedBy()',\n '[attr.data-side]': 'side()',\n '[attr.data-active-snap-point]': 'activeSnapPointAttr()',\n '[attr.data-dragging]': 'dragging() ? \"\" : null',\n '[attr.data-scale-background]': 'scaleBackgroundActive() ? \"\" : null',\n '[attr.data-depth]': 'depthAttr()',\n '[attr.data-state-nested]': 'hasChild() ? \"true\" : null',\n 'data-state': 'open',\n tabindex: '-1',\n },\n providers: [{ provide: FOR_DRAWER_CONTEXT, useExisting: ForDrawer }],\n})\nexport class ForDrawer implements ForDrawerContext {\n readonly #defaults = inject(FOR_DRAWER_DEFAULTS);\n\n /**\n * Edge the drawer is anchored to. Default `'bottom'` — the most common\n * mobile-first pattern. The keyboard navigation axis (for swipe direction)\n * derives from this, as does the `data-side` attribute on the host.\n */\n readonly side = input<ForDrawerSide>(this.#defaults.side ?? 'bottom');\n\n /**\n * When true (default), Escape, backdrop click, pointer-down outside,\n * focus outside, and a swipe past the close threshold all emit `(dismiss)`.\n * Disable for confirm flows that must be answered explicitly.\n */\n readonly dismissible = input(this.#defaults.dismissible ?? true, {\n transform: booleanAttribute,\n });\n\n /**\n * When true (default), sets `aria-modal=\"true\"`, locks body scroll, traps\n * focus, and inerts body siblings. Set to `false` for a non-modal\n * navigation drawer that coexists with the rest of the page.\n */\n readonly modal = input(this.#defaults.modal ?? true, { transform: booleanAttribute });\n\n /** When true, role becomes `alertdialog` (interrupts assistive tech). */\n readonly alert = input(false, { transform: booleanAttribute });\n\n /** When true (default), focus returns to the previously focused element on close. */\n readonly returnFocus = input(this.#defaults.returnFocus ?? true, {\n transform: booleanAttribute,\n });\n\n /**\n * Where to send focus on mount. `'first'` (default) finds the first\n * focusable descendant; `'container'` focuses the drawer surface itself\n * (useful when there's nothing focusable inside).\n */\n readonly initialFocus = input<'first' | 'container'>(this.#defaults.initialFocus ?? 'first');\n\n /** Manual `aria-label`. Use this when no visible title element exists. */\n readonly ariaLabel = input<string | null>(null);\n\n /**\n * Portal target for the surface. Defaults to `document.body`. Pass a\n * positioned (`position: relative`) container — paired with\n * `[modal]=\"false\"` — for a drawer scoped to a region instead of the\n * viewport. Read once at mount (the portal moves the host once); changing\n * it after open has no effect. The backdrop portals to the same container.\n */\n readonly container = input<HTMLElement | null>(null);\n\n /**\n * Callback invoked just before focus moves into the drawer on mount.\n * `event.preventDefault()` skips the imperative move (Tab cycling and\n * return-focus capture still wire up). See Dialog for the same shape and\n * the rationale for `input<>` rather than `output<>` on free-floating\n * overlays.\n */\n readonly autoFocusOnOpen = input<((event: VetoableEvent) => void) | undefined>(undefined);\n\n /**\n * Callback invoked just before focus returns to the previously focused\n * element on unmount. `event.preventDefault()` skips the return-focus.\n */\n readonly autoFocusOnClose = input<((event: VetoableEvent) => void) | undefined>(undefined);\n\n /** When true (default), swipe toward the anchored edge dismisses past `closeThreshold`. */\n readonly swipeToDismiss = input(this.#defaults.swipeToDismiss ?? true, {\n transform: booleanAttribute,\n });\n\n /**\n * Fraction past which a release dismisses instead of snapping back.\n * Default `0.25`. Without `snapPoints` it is a fraction of the\n * full drawer dimension along the dismissal axis (dragged > 25% of the\n * surface size toward the edge dismisses); with `snapPoints` it is a\n * fraction of the **lowest snap's** extent, so a small \"peek\" snap stays\n * dismissable without dragging it entirely off-screen.\n */\n readonly closeThreshold = input(this.#defaults.closeThreshold ?? 0.25);\n\n /**\n * When true, the swipe gesture only arms on a pointerdown that started on\n * the registered `[forDrawerHandle]` element. Useful when the surface\n * contains scrollable content that should keep its scroll gesture.\n */\n readonly handleOnly = input(this.#defaults.handleOnly ?? false, { transform: booleanAttribute });\n\n /**\n * When true, asks the registered `[forDrawerWrapper]` to scale and\n * translate behind this drawer (the \"scale background\" effect). No\n * effect under `prefers-reduced-motion: reduce`, and a no-op if no\n * wrapper is mounted. Default `false` so existing consumers are\n * untouched.\n */\n readonly scaleBackground = input(this.#defaults.scaleBackground ?? false, {\n transform: booleanAttribute,\n });\n\n /**\n * When true (default) and `scaleBackground` is active, paints\n * `<body>` with `scaleBackgroundColor` so the gap between the scaled\n * wrapper and the viewport edge does not show through. Only applies\n * when `scaleBackground` is `true`.\n */\n readonly setBackgroundColorOnScale = input(this.#defaults.setBackgroundColorOnScale ?? true, {\n transform: booleanAttribute,\n });\n\n /**\n * Snap points: each entry is a `number ∈ [0, 1]`,\n * a `'NN%'` string, or a `'NNpx'` string. Strictly increasing\n * (closest-to-edge first). The surface settles at the nearest snap on\n * release; dragging past the lowest snap by `closeThreshold` of that\n * snap's own extent dismisses.\n */\n readonly snapPoints = input<ReadonlyArray<ForDrawerSnapPoint> | undefined>(undefined);\n\n /**\n * Active snap point. Two-way bindable: write via `[(activeSnapPoint)]`\n * to drive the surface programmatically, or just read for analytics.\n * Initialised to `snapPoints?.[0]` on mount when the consumer left it\n * `null`. The implicit `(activeSnapPointChange)` emitter fires on\n * internal transitions (mount-time default and drag release), and\n * stays silent on consumer writes through `[(activeSnapPoint)]`.\n */\n readonly activeSnapPoint = model<ForDrawerSnapPoint | null>(null);\n\n /**\n * First index of `snapPoints` from which the backdrop should reflect\n * `data-fade-from-active`. Consumers tie a CSS opacity transition to\n * that attribute. Out-of-range values throw on mount.\n */\n readonly fadeFromIndex = input<number | undefined>(undefined);\n\n /**\n * Emitted when the drawer wants to close. Consumer wires this to flip\n * the signal that gates the surrounding `@if`.\n */\n readonly dismiss = output<ForDrawerCloseReason>();\n\n /** Vetoable Escape. `preventDefault()` suppresses the auto `(dismiss)`. */\n readonly escapeKeyDown = output<VetoableNativeEvent<KeyboardEvent>>();\n\n /** Vetoable pointer-down outside. `preventDefault()` suppresses the auto `(dismiss)`. */\n readonly pointerDownOutside = output<VetoableNativeEvent<PointerEvent>>();\n\n /** Vetoable focus-outside. `preventDefault()` suppresses the auto `(dismiss)`. */\n readonly focusOutside = output<VetoableNativeEvent<FocusEvent>>();\n\n /**\n * Composite event: fires alongside `pointerDownOutside` and `focusOutside`\n * and shares their veto state — `preventDefault()` on either suppresses\n * the auto `(dismiss)`.\n */\n readonly interactOutside = output<VetoableNativeEvent<PointerEvent | FocusEvent>>();\n\n /** Drag stream. `percentageDragged` ∈ `[0, 1]`. */\n readonly dragMove = output<ForDrawerDragEvent>();\n\n /** Release event. The directive has already updated `activeSnapPoint` / requested close. */\n readonly release = output<ForDrawerReleaseEvent>();\n\n // ---- Internal reactive state ----\n readonly #labelIds = signal<readonly string[]>([]);\n readonly #describedByIds = signal<readonly string[]>([]);\n readonly #handleEl = signal<HTMLElement | null>(null);\n readonly #backdropEl = signal<HTMLElement | null>(null);\n // Captures the `value` argument from the most recent `requestClose(reason, value)`\n // call. Read by `ForDrawerManager` to bridge `[forDrawerClose] [closeWith]`\n // into `ForDrawerRef.close(value)`. Plain in declarative usage (no consumer\n // ever reads it), so the API surface is unchanged.\n readonly #lastCloseValue = signal<unknown>(undefined);\n\n readonly labelledBy = computed<string | null>(() => {\n const ids = this.#labelIds();\n return ids.length === 0 ? null : ids.join(' ');\n });\n readonly describedBy = computed<string | null>(() => {\n const ids = this.#describedByIds();\n return ids.length === 0 ? null : ids.join(' ');\n });\n readonly activeSnapPointAttr = computed<string | null>(() => {\n const v = this.activeSnapPoint();\n return v == null ? null : String(v);\n });\n readonly fadeFromActive = computed<boolean>(() => {\n const idx = this.fadeFromIndex();\n const points = this.snapPoints();\n const active = this.activeSnapPoint();\n if (idx === undefined || !points || active == null) {\n return false;\n }\n const activeIdx = points.indexOf(active);\n return activeIdx >= 0 && activeIdx >= idx;\n });\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n readonly #scaleCoordinator = inject(ForDrawerScaleCoordinator);\n readonly #drawerStack = inject(ForDrawerStack);\n readonly #parentDrawer = inject(FOR_DRAWER_CONTEXT, { skipSelf: true, optional: true });\n\n // Pointer / swipe / snap gesture engine. Owns the velocity tracking,\n // per-gesture offset bounds, the dimension-keyed snap-position cache, and\n // the runtime snap re-validation; the directive host-binds the three signals\n // it returns (`dragging`, `dragProgress`, `dragTranslate`) and drives its\n // `validateOnMount()` / `arm()` hooks from its own `afterNextRender`s so the\n // engine's side effects keep `[forDrawer]`'s original ordering relative to\n // the modal shell.\n readonly #drag = injectDrawerDrag({\n side: this.side,\n snapPoints: this.snapPoints,\n closeThreshold: this.closeThreshold,\n handleOnly: this.handleOnly,\n swipeToDismiss: this.swipeToDismiss,\n fadeFromIndex: this.fadeFromIndex,\n activeSnapPoint: this.activeSnapPoint,\n handleEl: this.#handleEl.asReadonly(),\n emitDrag: (event) => this.dragMove.emit(event),\n emitRelease: (event) => this.release.emit(event),\n requestClose: (reason) => this.requestClose(reason),\n });\n\n /**\n * `true` while a pointer drag gesture is in flight. Mirrors the host's\n * `data-dragging` attribute; surfaced through `ForDrawerContext` so pieces\n * portaled away from the surface (the backdrop) can suppress their own\n * transitions during the gesture.\n */\n readonly dragging = this.#drag.dragging;\n\n /**\n * Progress of the current drag toward the anchored edge, `∈ [0, 1]`.\n * Surfaced through `ForDrawerContext` so the backdrop can publish it as the\n * `--for-drawer-drag-progress` custom property.\n */\n readonly dragProgress = this.#drag.dragProgress;\n\n /**\n * Live drag displacement as a CSS `translate` value (`\"<x> <y>\"`),\n * published on the host as the `--for-drawer-translate` custom property by\n * the gesture engine. The consumer composes it on the surface with\n * `translate: var(--for-drawer-translate, 0px 0px)`.\n *\n * A **custom property** is used (rather than writing `translate` /\n * `transform` directly) because `transform` is reserved for\n * `ForDrawerScaleCoordinator` and a directly-written inline `translate` is\n * dropped by Angular when the consumer also binds a template `[style.*]` on\n * the same host. `\"0px 0px\"` at rest; the write rides the same change-\n * detection pass as the `data-dragging` / `data-active-snap-point` changes\n * on release so the consumer's `transition: translate` animates back in\n * lockstep with the snap transition rather than jumping to the old rest\n * position first.\n */\n readonly dragTranslate = this.#drag.dragTranslate;\n\n /** Host element of this drawer surface — exposed via `ForDrawerContext`. */\n get hostElement(): HTMLElement {\n return this.#host.nativeElement;\n }\n\n /** Depth of this drawer in the nesting stack (0 root, 1 first child, …). */\n readonly #depth = signal<number>(0);\n readonly depthAttr = computed<string>(() => String(this.#depth()));\n\n /**\n * `true` while at least one descendant `[forDrawer]` is registered with\n * `ForDrawerStack` underneath this one — reflected as\n * `data-state-nested=\"true\"`. The actual nested-visual transform\n * (`scale + translate3d`) on the parent surface is owned by\n * `ForDrawerScaleCoordinator`, which subscribes to the same stack\n * signal and applies the inline `style.transform` once per affected\n * host. The check is one-level (direct child) because the visual\n * contract only cares about whether *some* child is currently covering\n * this drawer; deeper descendants cascade naturally through their own\n * ancestor chain.\n */\n readonly hasChild = computed<boolean>(() => {\n const stack = this.#drawerStack.stack();\n const me = this.#host.nativeElement;\n return stack.some((n) => n.parent === me);\n });\n\n /**\n * Reflected as `data-scale-background` on the host: `true` when the\n * directive opted into the effect AND the coordinator is currently\n * applying it (wrapper registered, not under reduced-motion). Lets\n * consumers style the drawer differently in scale mode (e.g. larger\n * corner radii) without polling the coordinator.\n */\n readonly scaleBackgroundActive = computed<boolean>(\n () => this.scaleBackground() && this.#scaleCoordinator.active(),\n );\n\n // Cleanup refs for drawer-specific side effects (the modal-shell owns its\n // portal / dismissable / focus-trap / scroll-lock / inert-siblings teardown;\n // the gesture engine owns its own swipe-listener teardown). They are layered\n // around the shell on SETUP — the drawer-stack push runs BEFORE the shell's\n // afterNextRender so descendants see consistent topology, scale runs AFTER so\n // the coordinator composes on a fully-wired surface — and both are torn down\n // from a single `DestroyRef.onDestroy` (see the constructor).\n #scaleCleanup: (() => void) | null = null;\n #stackCleanup: (() => void) | null = null;\n\n constructor() {\n // ---- Pre-shell setup. Runs in its own afterNextRender registered BEFORE\n // injectModalShell so the drawer-stack push, closeThreshold validation, and\n // snap-point validation precede the shell's dismissable / focus /\n // scroll-lock wiring. Descendants observing `hasChild` / depth see\n // consistent topology throughout their mount sequence; consumers passing bad\n // closeThreshold / snapPoints get a clear error before the shell focuses.\n afterNextRender(() => {\n // 1. Drawer-stack push. The `dragging` signal + resolved\n // nested-transform tunables ride along so `ForDrawerScaleCoordinator`\n // owns the `style.transform` write for the parent surface (issue #180)\n // and reads scope-local defaults through this node.\n const handle = this.#drawerStack.push({\n host: this.#host.nativeElement,\n side: this.side(),\n scaleBackground: this.scaleBackground(),\n parent: this.#parentDrawer?.hostElement ?? null,\n dragging: this.dragging,\n nestedScaleAmount: this.#defaults.nestedScaleAmount ?? 0.93,\n nestedTranslateYpx: this.#defaults.nestedTranslateYpx ?? 8,\n });\n this.#depth.set(handle.depth);\n this.#stackCleanup = handle.cleanup;\n\n // 2. closeThreshold validation. Throws here so consumers get a clear\n // mount-time error instead of a silently-broken dismissal.\n const ct = this.closeThreshold();\n if (!Number.isFinite(ct) || ct < 0 || ct > 1) {\n throw new Error(`[forty-cdk/drawer] closeThreshold must be in [0, 1], got ${ct}.`);\n }\n\n // 3. Snap-point validation (shape + fadeFromIndex range + first\n // live-dimension measurement) and mount-time `activeSnapPoint`\n // default, owned by the gesture engine. Runs here — after the stack\n // push and closeThreshold check — so the mount sequence matches what\n // it was before the engine was extracted. Runtime `[snapPoints]`\n // rebinds are re-validated by the engine's own effect.\n this.#drag.validateOnMount();\n });\n\n // ---- The shared modal-shell. Owns: synchronous return-focus capture\n // (WebKit #136), portal, dismissable layer (triple-veto + composite\n // `interactOutside`), modal vs non-modal branching (focus trap + scroll\n // lock + inert siblings), and the `autoFocusOnOpen` / `autoFocusOnClose`\n // veto hooks. Anything drawer-specific (drag gesture, snap points, scale\n // coordinator, drawer-stack registration, backdrop exemption) stays in\n // this directive / the gesture engine.\n injectModalShell({\n modal: this.modal,\n returnFocus: this.returnFocus,\n initialFocus: this.initialFocus,\n container: this.container,\n autoFocusOnOpen: () => this.autoFocusOnOpen(),\n autoFocusOnClose: () => this.autoFocusOnClose(),\n dismiss: {\n dismissible: this.dismissible,\n requestClose: (reason) => this.requestClose(reason),\n emitEscapeKeyDown: (veto) => this.escapeKeyDown.emit(veto),\n emitPointerDownOutside: (veto) => this.pointerDownOutside.emit(veto),\n emitFocusOutside: (veto) => this.focusOutside.emit(veto),\n emitInteractOutside: (veto) => this.interactOutside.emit(veto),\n // The backdrop is portaled to body (sibling of the drawer host), so\n // without exemption a pointer-down on it fires `pointerDownOutside`\n // BEFORE the backdrop's click handler runs — the drawer would close\n // with the wrong reason. Marking it exempt routes the gesture\n // through the backdrop's own click → `requestClose('backdrop')`\n // path instead. The handle is a child of the host so it is already\n // covered by `host.contains(target)`.\n exemptElements: () => {\n const backdrop = this.#backdropEl();\n return backdrop ? [backdrop] : [];\n },\n },\n });\n\n // ---- Post-shell setup. Runs in its own afterNextRender registered\n // AFTER injectModalShell so swipe-dismiss arms on a host already attached\n // to body via the shell's portal, and the scale coordinator composes on\n // top of a fully-wired surface.\n afterNextRender(() => {\n // Register with the scale coordinator last so the wrapper transition\n // composes after every other side effect has stabilised. The coordinator\n // enforces the reduced-motion + wrapper-presence gates.\n if (this.scaleBackground()) {\n this.#scaleCleanup = this.#scaleCoordinator.registerDrawer({\n setBackgroundColorOnScale: this.setBackgroundColorOnScale(),\n scaleAmount: this.#defaults.scaleAmount ?? 0.95,\n scaleTranslateYpx: this.#defaults.scaleTranslateYpx ?? 14,\n scaleBorderRadiusPx: this.#defaults.scaleBorderRadiusPx ?? 8,\n scaleBackgroundColor: this.#defaults.scaleBackgroundColor ?? 'black',\n });\n }\n\n // Arm the swipe gate now that the surface is fully wired. The gesture\n // engine's effect owns the actual attach/detach; arming unblocks it.\n this.#drag.arm();\n });\n\n // ---- Drawer-owned teardown, in one hook. Neither step depends on\n // running before or after the shell's dismissable / focus-trap /\n // scroll-lock teardown: the scale handle is self-contained (pops the scale\n // stack), the swipe listeners are detached by the gesture engine's own\n // destroy hook, and the drawer-stack pop only requires that descendant\n // *drawers* are already popped — which Angular guarantees by destroying\n // child components before their parents. Scale cleanup runs first, then the\n // drawer-stack pop (so any sibling reads of the stack during scale cleanup\n // still see this node; `ForDrawerStack.cleanup` throws if a descendant is\n // still registered, surfacing consumer template bugs). The portal's own\n // destroy hook still removes the host from the DOM after this runs, so\n // return-focus is unaffected.\n inject(DestroyRef).onDestroy(() => {\n this.#scaleCleanup?.();\n this.#scaleCleanup = null;\n this.#stackCleanup?.();\n this.#stackCleanup = null;\n });\n }\n\n // ---- Context implementation ----\n\n registerLabel(id: string): void {\n this.#labelIds.update((arr) => (arr.includes(id) ? arr : [...arr, id]));\n }\n unregisterLabel(id: string): void {\n this.#labelIds.update((arr) => arr.filter((x) => x !== id));\n }\n registerDescription(id: string): void {\n this.#describedByIds.update((arr) => (arr.includes(id) ? arr : [...arr, id]));\n }\n unregisterDescription(id: string): void {\n this.#describedByIds.update((arr) => arr.filter((x) => x !== id));\n }\n registerHandle(el: HTMLElement | null): void {\n const current = this.#handleEl();\n if (el !== null && current !== null && current !== el) {\n throw new Error(\n '[forty-cdk/drawer] Multiple [forDrawerHandle] inside the same [forDrawer]; only one is allowed.',\n );\n }\n this.#handleEl.set(el);\n }\n registerBackdrop(el: HTMLElement | null): void {\n const current = this.#backdropEl();\n if (el !== null && current !== null && current !== el) {\n throw new Error(\n '[forty-cdk/drawer] Multiple [forDrawerBackdrop] inside the same [forDrawer]; only one is allowed.',\n );\n }\n this.#backdropEl.set(el);\n }\n\n requestClose(reason: ForDrawerCloseReason, value?: unknown): void {\n if (reason !== 'closeButton' && reason !== 'programmatic' && !this.dismissible()) {\n return;\n }\n this.#lastCloseValue.set(value);\n this.dismiss.emit(reason);\n }\n\n /**\n * The `value` argument from the most recent `requestClose(reason, value)`\n * call. Read by `ForDrawerManager` to bridge `[forDrawerClose] [closeWith]`\n * into `ForDrawerRef.close(value)`. Declarative consumers never need this —\n * it is plumbing for the imperative bootstrap path.\n *\n * @internal\n */\n readonly lastCloseValue = this.#lastCloseValue.asReadonly();\n}\n","import { booleanAttribute, Directive, ElementRef, inject, input, model } from '@angular/core';\n\nimport { reflectDisabled } from 'forty-cdk/core';\n\n/**\n * Button that toggles the drawer when clicked. Apply on a focusable element —\n * preferably a `<button>` — so keyboard users can reach it.\n *\n * Wires `aria-haspopup=\"dialog\"`, `aria-expanded`, `aria-controls`, and\n * `data-state` on the host. Two-way bind `[(open)]` to the same signal that\n * gates the surrounding `@if` around `[forDrawer]`. Focus return is owned\n * by `[forDrawer]` (modal mode captures the previously-focused element on\n * mount and restores it on destroy).\n *\n * ```html\n * <button forDrawerTrigger [(open)]=\"drawerOpen\" controls=\"my-drawer\">Open</button>\n * @if (drawerOpen()) {\n * <div forDrawer id=\"my-drawer\" (dismiss)=\"drawerOpen.set(false)\">…</div>\n * }\n * ```\n */\n@Directive({\n selector: '[forDrawerTrigger]',\n exportAs: 'forDrawerTrigger',\n host: {\n type: 'button',\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.aria-controls]': 'open() ? controls() : null',\n '[attr.data-state]': 'open() ? \"open\" : \"closed\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : null',\n '[attr.aria-disabled]': 'disabled() ? \"true\" : null',\n '(click)': 'onClick()',\n },\n})\nexport class ForDrawerTrigger {\n /**\n * Two-way bindable. Bind to the same signal that gates the surrounding\n * `@if` around `[forDrawer]`. The `model()` change emitter\n * (`(openChange)`) fires only on internal transitions (trigger click).\n */\n readonly open = model<boolean>(false);\n\n /**\n * Id of the controlled drawer surface. Mirrored to `aria-controls` while\n * the drawer is open. The consumer is responsible for setting the same\n * `id` on `[forDrawer]`.\n */\n readonly controls = input<string | null>(null);\n\n /**\n * When true, click is ignored and the host reflects `data-disabled=\"\"`,\n * `aria-disabled=\"true\"`, and the native `disabled` attribute so the\n * trigger is announced as disabled by assistive tech and dropped from\n * the tab order.\n */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n reflectDisabled(this.disabled);\n }\n\n protected onClick(): void {\n if (this.disabled()) {\n return;\n }\n // Same WebKit return-focus quirk as ForDialogTrigger (#136): force focus\n // back onto the trigger before opening so the drawer captures it as the\n // return target.\n this.#host.nativeElement.focus();\n this.open.update((v) => !v);\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\n\nimport { injectPortal } from 'forty-cdk/core';\nimport { FOR_DRAWER_INSTANCE_ID, injectDrawerContext } from './drawer-context';\n\n/**\n * Optional backdrop overlay. Portaled to `document.body` so it sits\n * underneath the drawer regardless of where it's declared. While mounted\n * the backdrop is visible; mount/unmount it alongside the drawer with the\n * same `@if` so `animate.enter` / `animate.leave` works on both.\n *\n * Reflects `data-fade-from-active` when `fadeFromIndex` on the drawer root\n * is set and the active snap point is at or past that index — consumers\n * tie this to a CSS opacity transition for the \"backdrop fades\n * in once you snap up past N\" effect.\n *\n * Publishes the live drag progress toward the anchored edge as the\n * `--for-drawer-drag-progress` custom property (`0` at rest → `1` fully\n * dragged off-screen) and mirrors the surface's `data-dragging` attribute.\n * Together these drive the \"backdrop fades out as you swipe to\n * dismiss\" effect with pure CSS:\n *\n * ```css\n * [forDrawerBackdrop] {\n * opacity: calc(1 - var(--for-drawer-drag-progress, 0));\n * transition: opacity 0.3s ease;\n * }\n * [forDrawerBackdrop][data-dragging] {\n * transition: none; \\/* track the pointer 1:1 *\\/\n * }\n * ```\n *\n * The directive applies no visual styles itself.\n */\n@Directive({\n selector: '[forDrawerBackdrop]',\n exportAs: 'forDrawerBackdrop',\n host: {\n 'data-for-drawer-backdrop': '',\n // Marker the inert-siblings utility looks for so the backdrop, which is\n // portaled to body alongside the drawer, is not inerted alongside the\n // rest of the document.\n 'data-for-modal-peer': '',\n 'data-state': 'open',\n '[attr.data-for-drawer-id]': 'instanceId',\n '[attr.data-fade-from-active]': 'ctx.fadeFromActive() ? \"\" : null',\n '[attr.data-dragging]': 'ctx.dragging() ? \"\" : null',\n '[style.--for-drawer-drag-progress]': 'ctx.dragProgress()',\n '(click)': 'onClick($event)',\n },\n})\nexport class ForDrawerBackdrop {\n protected readonly ctx = injectDrawerContext('ForDrawerBackdrop');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Per-instance drawer id when opened through `ForDrawerManager` (reflected\n * as `data-for-drawer-id` so the manager can pair this portaled backdrop\n * with its drawer and drive its exit animation). `null` in the declarative\n * path, where the host binding emits no attribute.\n */\n protected readonly instanceId = inject(FOR_DRAWER_INSTANCE_ID, { optional: true });\n\n constructor() {\n injectPortal({ target: this.ctx.container });\n // Register so the drawer's dismissable layer treats pointer-down on the\n // backdrop as \"inside\" — see ForDrawerContext#registerBackdrop.\n this.ctx.registerBackdrop(this.#host.nativeElement);\n inject(DestroyRef).onDestroy(() => this.ctx.registerBackdrop(null));\n }\n\n protected onClick(event: MouseEvent): void {\n // Only close on direct backdrop click, not events bubbled from a child.\n if (event.target === event.currentTarget) {\n this.ctx.requestClose('backdrop');\n }\n }\n}\n","import { DestroyRef, Directive, ElementRef, inject } from '@angular/core';\n\nimport { injectDrawerContext } from './drawer-context';\n\n/**\n * Visual swipe handle (the \"grabber\" pill at the top of a bottom sheet).\n * Registers itself with the drawer so that `[handleOnly]=\"true\"` can scope\n * the swipe gesture to gestures starting on this element. Reflects\n * `aria-hidden=\"true\"` because the handle is a decorative styling target —\n * keyboard users dismiss via Escape / a `[forDrawerClose]` button.\n *\n * Apply on the visual handle element. Applies no styles itself; the\n * consumer is responsible for sizing, positioning, and color.\n */\n@Directive({\n selector: '[forDrawerHandle]',\n exportAs: 'forDrawerHandle',\n host: {\n 'aria-hidden': 'true',\n 'data-for-drawer-handle': '',\n },\n})\nexport class ForDrawerHandle {\n readonly #ctx = injectDrawerContext('ForDrawerHandle');\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n constructor() {\n this.#ctx.registerHandle(this.#host.nativeElement);\n inject(DestroyRef).onDestroy(() => this.#ctx.registerHandle(null));\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { registerA11yName } from 'forty-cdk/core';\nimport { injectDrawerContext } from './drawer-context';\n\n/**\n * Convenience: gives the host element a stable id and registers it as the\n * drawer's accessible name (`aria-labelledby`). Apply on a heading element\n * (`<h2>`, `<h3>`...) inside `[forDrawer]`.\n *\n * If you don't render visible title text, omit this and pass `ariaLabel`\n * on the drawer root instead.\n */\n@Directive({\n selector: '[forDrawerTitle]',\n exportAs: 'forDrawerTitle',\n host: {\n '[id]': 'id()',\n },\n})\nexport class ForDrawerTitle {\n protected readonly id = registerA11yName(\n injectDrawerContext('ForDrawerTitle'),\n 'for-drawer-title',\n );\n}\n","import { Directive } from '@angular/core';\n\nimport { registerA11yDescription } from 'forty-cdk/core';\nimport { injectDrawerContext } from './drawer-context';\n\n/**\n * Convenience: gives the host element a stable id and registers it as the\n * drawer's accessible description (`aria-describedby`). Apply on a `<p>` or\n * other element inside `[forDrawer]`. Optional — only use when there's\n * non-title supporting copy.\n */\n@Directive({\n selector: '[forDrawerDescription]',\n exportAs: 'forDrawerDescription',\n host: {\n '[id]': 'id()',\n },\n})\nexport class ForDrawerDescription {\n protected readonly id = registerA11yDescription(\n injectDrawerContext('ForDrawerDescription'),\n 'for-drawer-description',\n );\n}\n","import { Directive, input } from '@angular/core';\n\nimport { injectDrawerContext } from './drawer-context';\n\n/**\n * Button that closes the surrounding drawer when clicked. Apply on a\n * `<button>` inside `[forDrawer]`. Pass `[closeWith]` to propagate a return\n * value to `ForDrawerRef.close()` in programmatic usage; ignored in\n * declarative usage.\n */\n@Directive({\n selector: '[forDrawerClose]',\n exportAs: 'forDrawerClose',\n host: {\n type: 'button',\n 'data-state': 'open',\n '(click)': 'onClick()',\n },\n})\nexport class ForDrawerClose {\n readonly #ctx = injectDrawerContext('ForDrawerClose');\n\n /** Optional value passed to `ForDrawerRef.close()` (programmatic mode). */\n readonly closeWith = input<unknown>(undefined);\n\n protected onClick(): void {\n this.#ctx.requestClose('closeButton', this.closeWith());\n }\n}\n","import { computed, DestroyRef, Directive, ElementRef, inject } from '@angular/core';\n\nimport { ForDrawerScaleCoordinator } from 'forty-cdk/core';\n\n/**\n * Marks the consumer's app-shell wrapper so {@link ForDrawer}'s\n * `scaleBackground` effect can transform the rest of the page when a\n * drawer opens — applied through Angular DI rather than a global selector.\n *\n * Apply on the element that contains everything the drawer should appear\n * to recede behind (typically the root shell). Reflects\n * `data-state=\"scaled\"` while the effect is active and `\"idle\"` at rest\n * — useful for layering CSS styling without re-querying the coordinator.\n *\n * Only one wrapper may be registered at a time; mounting a second\n * `[forDrawerWrapper]` while another is alive throws. Drawers that opt\n * into `scaleBackground` without a registered wrapper are a no-op (no\n * effect applied) so test composition and partial consumer adoption\n * remain safe.\n */\n@Directive({\n selector: '[forDrawerWrapper]',\n exportAs: 'forDrawerWrapper',\n host: {\n '[attr.data-state]': 'state()',\n },\n})\nexport class ForDrawerWrapper {\n readonly #coordinator = inject(ForDrawerScaleCoordinator);\n readonly #host = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /** `'scaled'` while the coordinator is applying the effect, otherwise `'idle'`. */\n readonly state = computed<'scaled' | 'idle'>(() =>\n this.#coordinator.active() ? 'scaled' : 'idle',\n );\n\n constructor() {\n const cleanup = this.#coordinator.registerWrapper(this.#host.nativeElement);\n inject(DestroyRef).onDestroy(cleanup);\n }\n}\n","import { OverlayRef } from 'forty-cdk/core';\n\n/**\n * Handle returned by `ForDrawerManager.open()`. Inject inside the opened\n * component to drive close imperatively. Both reactive (`isClosed`, `result`)\n * and awaitable (`closed`) APIs are exposed — pick what fits the call site.\n *\n * `R` is the close-result type. Default `unknown`; specify it on\n * `manager.open<C, R>(...)` to get type safety.\n */\nexport class ForDrawerRef<R = unknown> extends OverlayRef<R> {}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n inject,\n type Injector,\n type Type,\n} from '@angular/core';\nimport { NgComponentOutlet } from '@angular/common';\n\nimport {\n OverlayContextInjector,\n type OverlayManagerEntry,\n type OverlayManagerOutlet,\n type OverlayManagerOutletHost,\n type VetoableEvent,\n type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport { ForDrawer } from './drawer';\nimport type {\n ForDrawerDragEvent,\n ForDrawerReleaseEvent,\n ForDrawerSide,\n ForDrawerSnapPoint,\n} from './drawer-context';\n\n/**\n * @internal Minimal surface the outlet needs from `ForDrawerManager` — avoids\n * a circular import between the outlet file and the manager file.\n */\nexport type ForDrawerOutletHost = OverlayManagerOutletHost<ForDrawerEntry>;\n\n/**\n * Shape of a single open drawer entry stored in the manager.\n *\n * Internal — not re-exported from `public-api.ts`.\n */\nexport interface ForDrawerEntry extends OverlayManagerEntry {\n readonly component: Type<unknown>;\n readonly hostClass: string;\n readonly side: ForDrawerSide | undefined;\n readonly dismissible: boolean | undefined;\n readonly modal: boolean | undefined;\n readonly alert: boolean | undefined;\n readonly returnFocus: boolean | undefined;\n readonly initialFocus: 'first' | 'container' | undefined;\n readonly ariaLabel: string | undefined;\n readonly container: HTMLElement | null | undefined;\n readonly animateEnter: string | undefined;\n readonly autoFocusOnOpen: ((e: VetoableEvent) => void) | undefined;\n readonly autoFocusOnClose: ((e: VetoableEvent) => void) | undefined;\n readonly swipeToDismiss: boolean | undefined;\n readonly closeThreshold: number | undefined;\n readonly handleOnly: boolean | undefined;\n readonly scaleBackground: boolean | undefined;\n readonly setBackgroundColorOnScale: boolean | undefined;\n readonly snapPoints: ReadonlyArray<ForDrawerSnapPoint> | undefined;\n readonly activeSnapPoint: ForDrawerSnapPoint | undefined;\n readonly fadeFromIndex: number | undefined;\n readonly escapeKeyDown: ((e: VetoableNativeEvent<KeyboardEvent>) => void) | undefined;\n readonly pointerDownOutside: ((e: VetoableNativeEvent<PointerEvent>) => void) | undefined;\n readonly focusOutside: ((e: VetoableNativeEvent<FocusEvent>) => void) | undefined;\n readonly interactOutside:\n | ((e: VetoableNativeEvent<PointerEvent | FocusEvent>) => void)\n | undefined;\n readonly onDrag: ((e: ForDrawerDragEvent) => void) | undefined;\n readonly onRelease: ((e: ForDrawerReleaseEvent) => void) | undefined;\n readonly onActiveSnapPointChange: ((snap: ForDrawerSnapPoint | null) => void) | undefined;\n handleClose(value: unknown): void;\n injectorFor(parent: Injector): Injector;\n}\n\n/**\n * @internal Exposes the element injector at a child of the row's `[forDrawer]`\n * element so the user component rendered via `NgComponentOutlet` resolves\n * `FOR_DRAWER_CONTEXT` from the enclosing `[forDrawer]` host. The shared body\n * lives in `OverlayContextInjector`; this only carries the drawer selector.\n */\n@Directive({\n selector: '[forDrawerContextInjector]',\n exportAs: 'forDrawerContextInjector',\n})\nexport class ForDrawerContextInjector extends OverlayContextInjector {}\n\n/**\n * @internal Outlet component created once by `ForDrawerManager` on the first\n * `open()` call. Renders every live entry from the manager's entries signal\n * with `@for`, so Angular's control-flow unmount triggers `animate.leave` on\n * close — identical to the declarative `@if (open()) { <div forDrawer …> }` path.\n *\n * Constructed exclusively by `ForDrawerManager`. Not exported from\n * `public-api.ts`.\n */\n@Component({\n selector: 'for-drawer-outlet',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [ForDrawer, NgComponentOutlet, ForDrawerContextInjector],\n template: `\n @for (entry of entries(); track entry.id) {\n <div\n forDrawer\n [attr.data-for-drawer-id]=\"entry.id\"\n [animate.enter]=\"entry.animateEnter ?? ''\"\n [class]=\"entry.hostClass\"\n [side]=\"entry.side ?? 'bottom'\"\n [dismissible]=\"entry.dismissible ?? true\"\n [modal]=\"entry.modal ?? true\"\n [alert]=\"entry.alert ?? false\"\n [returnFocus]=\"entry.returnFocus ?? true\"\n [initialFocus]=\"entry.initialFocus ?? 'first'\"\n [ariaLabel]=\"entry.ariaLabel ?? null\"\n [container]=\"entry.container ?? null\"\n [autoFocusOnOpen]=\"entry.autoFocusOnOpen\"\n [autoFocusOnClose]=\"entry.autoFocusOnClose\"\n [swipeToDismiss]=\"entry.swipeToDismiss ?? true\"\n [closeThreshold]=\"entry.closeThreshold ?? 0.25\"\n [handleOnly]=\"entry.handleOnly ?? false\"\n [scaleBackground]=\"entry.scaleBackground ?? false\"\n [setBackgroundColorOnScale]=\"entry.setBackgroundColorOnScale ?? true\"\n [snapPoints]=\"entry.snapPoints\"\n [activeSnapPoint]=\"entry.activeSnapPoint ?? null\"\n [fadeFromIndex]=\"entry.fadeFromIndex\"\n (dismiss)=\"entry.handleClose(fd.lastCloseValue())\"\n (escapeKeyDown)=\"entry.escapeKeyDown?.($event)\"\n (pointerDownOutside)=\"entry.pointerDownOutside?.($event)\"\n (focusOutside)=\"entry.focusOutside?.($event)\"\n (interactOutside)=\"entry.interactOutside?.($event)\"\n (dragMove)=\"entry.onDrag?.($event)\"\n (release)=\"entry.onRelease?.($event)\"\n (activeSnapPointChange)=\"entry.onActiveSnapPointChange?.($event)\"\n #fd=\"forDrawer\"\n >\n <ng-container forDrawerContextInjector #ctx=\"forDrawerContextInjector\">\n <ng-container\n [ngComponentOutlet]=\"entry.component\"\n [ngComponentOutletInjector]=\"entry.injectorFor(ctx.injector)\"\n />\n </ng-container>\n </div>\n }\n `,\n})\nexport class ForDrawerOutlet implements OverlayManagerOutlet<ForDrawerEntry> {\n readonly #destroyRef = inject(DestroyRef);\n #host: ForDrawerOutletHost | null = null;\n\n /**\n * @internal Called once by `ForDrawerManager` right after creating this\n * outlet to wire the reactive entries accessor and the destroy hook.\n */\n init(host: ForDrawerOutletHost): void {\n this.#host = host;\n this.#destroyRef.onDestroy(() => host.closeAllForDestroy());\n }\n\n entries(): readonly ForDrawerEntry[] {\n return this.#host?.entries() ?? [];\n }\n}\n","import {\n createComponent,\n inject,\n Injectable,\n InjectionToken,\n type Provider,\n type Type,\n} from '@angular/core';\n\nimport {\n resolveConfigClass,\n OverlayManagerCore,\n type VetoableEvent,\n type VetoableNativeEvent,\n} from 'forty-cdk/core';\nimport {\n FOR_DRAWER_INSTANCE_ID,\n type ForDrawerDragEvent,\n type ForDrawerReleaseEvent,\n type ForDrawerSide,\n type ForDrawerSnapPoint,\n} from './drawer-context';\nimport { FOR_DRAWER_DEFAULTS } from './drawer-defaults';\nimport type { ForDrawerEntry } from './drawer-outlet';\nimport { ForDrawerOutlet } from './drawer-outlet';\nimport { ForDrawerRef } from './drawer-ref';\n\n/**\n * Injection token for the `data` payload passed to `ForDrawerManager.open(component, { data })`.\n * Inject inside the opened component:\n *\n * ```ts\n * readonly data = inject(FOR_DRAWER_DATA) as MyShape;\n * ```\n *\n * Prefer `injectDrawerData<T>()` for typed access without manual casts.\n */\nexport const FOR_DRAWER_DATA = new InjectionToken<unknown>('FOR_DRAWER_DATA');\n\n/** Typed accessor for the `data` payload. Equivalent to `inject(FOR_DRAWER_DATA) as T`. */\nexport function injectDrawerData<T = unknown>(): T {\n return inject(FOR_DRAWER_DATA) as T;\n}\n\nexport interface ForDrawerOpenConfig<D = unknown> {\n /** Payload available inside the drawer component via `injectDrawerData<T>()`. */\n data?: D;\n\n /** Edge the drawer is anchored to. Default `'bottom'`. */\n side?: ForDrawerSide;\n\n /** When true (default), Escape / backdrop / pointer-down outside / swipe close the drawer. */\n dismissible?: boolean;\n\n /** When true (default), set `aria-modal`, lock body scroll, trap focus. */\n modal?: boolean;\n\n /** When true, role becomes `alertdialog` instead of `dialog`. Default `false`. */\n alert?: boolean;\n\n /** When true (default), focus returns to the previously focused element on close. */\n returnFocus?: boolean;\n\n /** Where to send focus on open. Default `'first'`. */\n initialFocus?: 'first' | 'container';\n\n /** Manual `aria-label`. Use when no visible title element is rendered. */\n ariaLabel?: string;\n\n /**\n * Portal target for the surface + backdrop. Defaults to `document.body`.\n * Pair with `modal: false` for a drawer scoped to a positioned region\n * instead of the viewport.\n */\n container?: HTMLElement | null;\n\n /**\n * CSS class applied (via `animate.enter`) to the overlay root the moment it\n * mounts, so a programmatic drawer plays an enter animation just like a\n * declarative `<div forDrawer animate.enter=\"…\">`. The class lands on the\n * same `[forDrawer]` host as {@link class}. Falls back to\n * `provideForDrawerDefaults({ animateEnter })`.\n */\n animateEnter?: string;\n\n /**\n * CSS class applied to the overlay root when `close()` is called. The manager\n * keeps the host mounted with this class until its CSS animations /\n * transitions finish, then tears the drawer down — so a programmatic drawer\n * plays an exit animation. `close()` still resolves its promise and flips\n * `isClosed()` immediately; only the visual teardown waits. With no class (or\n * no animation, or under `prefers-reduced-motion`), close is immediate. Falls\n * back to `provideForDrawerDefaults({ animateLeave })`.\n */\n animateLeave?: string;\n\n /**\n * Exit-animation class for the portaled `[forDrawerBackdrop]`: the manager\n * adds it when `close()` is called and keeps the backdrop mounted until the\n * animation finishes, so the backdrop fades out in lockstep with the host.\n *\n * The split with the enter animation is intentional, not an oversight.\n * Declare the backdrop's **enter** with `animate.enter=\"…\"` on the element\n * itself — it fires on mount, which Angular runs normally even inside the\n * manager's `ngComponentOutlet` — and declare only its **leave** here. A\n * template `animate.leave` on the backdrop never fires under the manager:\n * Angular does not run leave animations across the `ngComponentOutlet` the\n * opened component is mounted through. (The host sheet is symmetric — both\n * `animateEnter` and `animateLeave` are config, since the manager owns that\n * element.) Falls back to `provideForDrawerDefaults({ backdropAnimateLeave })`.\n */\n backdropAnimateLeave?: string;\n\n /** When true (default), pointer drag past `closeThreshold` dismisses. */\n swipeToDismiss?: boolean;\n\n /** Fraction of dimension past which a release dismisses. Default `0.25`. */\n closeThreshold?: number;\n\n /** When true, swipe only arms on a registered handle element. Default `false`. */\n handleOnly?: boolean;\n\n /**\n * When true, asks the registered `[forDrawerWrapper]` to scale and translate\n * behind this drawer (the \"scale background\" effect). No effect under\n * `prefers-reduced-motion: reduce`, and a no-op if no wrapper is mounted.\n */\n scaleBackground?: boolean;\n\n /**\n * When true (default) and `scaleBackground` is active, paints `<body>` with\n * `scaleBackgroundColor` so the gap between the scaled wrapper and the\n * viewport edge does not show through.\n */\n setBackgroundColorOnScale?: boolean;\n\n /** Snap points. Optional. */\n snapPoints?: ReadonlyArray<ForDrawerSnapPoint>;\n\n /** Initial snap point at open time. Defaults to `snapPoints?.[0]`. */\n defaultSnapPoint?: ForDrawerSnapPoint;\n\n /** First snap-point index from which the backdrop reflects `data-fade-from-active`. */\n fadeFromIndex?: number;\n\n /**\n * Consumer CSS class(es) applied to the overlay root (the `[forDrawer]`\n * host). Pass a single class (`'my-drawer'`) or a space-separated string.\n * Merged with the directive's own host attributes — it never clobbers\n * `data-side` / `data-state` / the `--for-drawer-translate` custom property.\n *\n * Use this to carry design-system classes onto a programmatic drawer,\n * including positioning CSS keyed on `data-side` (e.g.\n * `.my-drawer[data-side='bottom']`). It replaces the\n * `inject(FOR_DRAWER_CONTEXT).hostElement.classList.add(...)` workaround.\n * For multiple classes as an array, prefer {@link classList}.\n */\n class?: string;\n /**\n * Consumer CSS class(es) applied to the overlay root, as an array\n * (`['my-drawer', 'my-drawer--lg']`) or a space-separated string. Merged\n * with {@link class} and with the directive's own host attributes.\n */\n classList?: string | readonly string[];\n\n /** Extra providers for the opened component's injector. */\n providers?: Provider[];\n\n /**\n * Fires just before the drawer moves focus into itself on mount.\n * Call `event.preventDefault()` to skip the imperative focus move.\n */\n autoFocusOnOpen?: (event: VetoableEvent) => void;\n\n /**\n * Fires just before focus returns to the previously focused element\n * on unmount. Call `event.preventDefault()` to skip the return-focus.\n */\n autoFocusOnClose?: (event: VetoableEvent) => void;\n\n /**\n * Per-channel dismiss hook mirroring the declarative `(escapeKeyDown)`\n * output. Fires when Escape is pressed while this drawer is the topmost\n * dismissable layer. Call `event.preventDefault()` on the veto to suppress\n * the implicit close while keeping the other dismiss channels live. The\n * original `KeyboardEvent` is on `.event`.\n */\n escapeKeyDown?: (event: VetoableNativeEvent<KeyboardEvent>) => void;\n\n /**\n * Per-channel dismiss hook mirroring the declarative `(pointerDownOutside)`\n * output. Fires when a pointer goes down outside the drawer. Call\n * `event.preventDefault()` on the veto to suppress the implicit close. The\n * native `PointerEvent` is on `.event`.\n */\n pointerDownOutside?: (event: VetoableNativeEvent<PointerEvent>) => void;\n\n /**\n * Per-channel dismiss hook mirroring the declarative `(focusOutside)`\n * output. Fires when focus moves outside the drawer. Call\n * `event.preventDefault()` on the veto to suppress the implicit close. The\n * native `FocusEvent` is on `.event`.\n */\n focusOutside?: (event: VetoableNativeEvent<FocusEvent>) => void;\n\n /**\n * Composite dismiss hook mirroring the declarative `(interactOutside)`\n * output. Fires alongside `pointerDownOutside` / `focusOutside` and shares\n * their veto state — `event.preventDefault()` on either suppresses the\n * implicit close. Use this to keep a programmatic floater open on outside\n * interaction while leaving Escape live (set `dismissible: true` and veto\n * here). The native `PointerEvent | FocusEvent` is on `.event`.\n */\n interactOutside?: (event: VetoableNativeEvent<PointerEvent | FocusEvent>) => void;\n\n /**\n * Mirrors the declarative `(dragMove)` output: invoked on every pointer-move\n * frame of a swipe gesture with `percentageDragged` ∈ `[0, 1]`. Lets a\n * programmatic consumer drive bespoke drag visualizations the way the\n * directive consumer can.\n */\n onDrag?: (event: ForDrawerDragEvent) => void;\n\n /**\n * Mirrors the declarative `(release)` output: invoked once the pointer is\n * released, after the directive has resolved the next snap point / close\n * decision. Read `willClose` and `nextSnapPoint` from the payload.\n */\n onRelease?: (event: ForDrawerReleaseEvent) => void;\n\n /**\n * Mirrors the declarative `(activeSnapPointChange)` output: invoked with\n * the landed snap point whenever the drawer transitions internally\n * (mount-time default and drag release). Use this to read back the active\n * snap that the declarative API exposes via `[(activeSnapPoint)]`.\n */\n onActiveSnapPointChange?: (snapPoint: ForDrawerSnapPoint | null) => void;\n}\n\ninterface InternalDrawerEntry extends ForDrawerEntry {\n readonly ref: ForDrawerRef<unknown>;\n}\n\n/**\n * Programmatic drawer opener — symmetric with `ForDialogManager`. Inject\n * anywhere, call `open(MyComponent, { data, side, ... })` and get a\n * `ForDrawerRef<R>` back. Internally the manager renders the user component\n * inside a manager-owned `@for` outlet, so Angular's control-flow unmount\n * fires `animate.leave` before the node leaves the DOM — identical to the\n * declarative `@if (open()) { <div forDrawer animate.leave=\"…\"> }` path.\n *\n * Inside the opened component the usual drawer pieces work without any extra\n * wiring: `[forDrawerTitle]`, `[forDrawerDescription]`, `[forDrawerBackdrop]`,\n * `[forDrawerHandle]`, `[forDrawerClose]`. `[forDrawerClose] [closeWith]`\n * propagates through to `ForDrawerRef.close(value)`.\n *\n * Inject `ForDrawerRef` to drive close imperatively and `FOR_DRAWER_DATA` (or\n * `injectDrawerData<T>()`) for the payload.\n */\n@Injectable({ providedIn: 'root' })\nexport class ForDrawerManager extends OverlayManagerCore<ForDrawerEntry> {\n readonly #defaults = inject(FOR_DRAWER_DEFAULTS);\n\n constructor() {\n super({\n idPrefix: 'for-drawer-instance',\n idAttribute: 'data-for-drawer-id',\n backdropAttribute: 'data-for-drawer-backdrop',\n createOutlet: (environmentInjector) =>\n createComponent(ForDrawerOutlet, { environmentInjector }),\n });\n }\n\n open<C, R = unknown, D = unknown>(\n component: Type<C>,\n config: ForDrawerOpenConfig<D> = {},\n ): ForDrawerRef<R> {\n if (config.closeThreshold !== undefined) {\n const ct = config.closeThreshold;\n if (!Number.isFinite(ct) || ct < 0 || ct > 1) {\n throw new Error(`[forty-cdk/drawer] closeThreshold must be in [0, 1], got ${ct}.`);\n }\n }\n\n const { id, remove } = this.nextId();\n\n const animateEnter = config.animateEnter ?? this.#defaults.animateEnter;\n const animateLeave = config.animateLeave ?? this.#defaults.animateLeave;\n const backdropAnimateLeave = config.backdropAnimateLeave ?? this.#defaults.backdropAnimateLeave;\n\n const ref = new ForDrawerRef<R>(() =>\n this.beginLeave(id, animateLeave, backdropAnimateLeave, remove),\n );\n\n const hostClass = resolveConfigClass(config) ?? '';\n const data = config.data ?? null;\n\n const entry: InternalDrawerEntry = {\n id,\n component: component as Type<unknown>,\n hostClass,\n side: config.side ?? this.#defaults.side,\n dismissible: config.dismissible ?? this.#defaults.dismissible,\n modal: config.modal ?? this.#defaults.modal,\n alert: config.alert,\n returnFocus: config.returnFocus ?? this.#defaults.returnFocus,\n initialFocus: config.initialFocus ?? this.#defaults.initialFocus,\n ariaLabel: config.ariaLabel,\n container: config.container,\n animateEnter,\n autoFocusOnOpen: config.autoFocusOnOpen,\n autoFocusOnClose: config.autoFocusOnClose,\n swipeToDismiss: config.swipeToDismiss ?? this.#defaults.swipeToDismiss,\n closeThreshold: config.closeThreshold ?? this.#defaults.closeThreshold,\n handleOnly: config.handleOnly ?? this.#defaults.handleOnly,\n scaleBackground: config.scaleBackground ?? this.#defaults.scaleBackground,\n setBackgroundColorOnScale:\n config.setBackgroundColorOnScale ?? this.#defaults.setBackgroundColorOnScale,\n snapPoints: config.snapPoints,\n activeSnapPoint: config.defaultSnapPoint,\n fadeFromIndex: config.fadeFromIndex,\n escapeKeyDown: config.escapeKeyDown,\n pointerDownOutside: config.pointerDownOutside,\n focusOutside: config.focusOutside,\n interactOutside: config.interactOutside,\n onDrag: config.onDrag,\n onRelease: config.onRelease,\n onActiveSnapPointChange: config.onActiveSnapPointChange,\n ref: ref as ForDrawerRef<unknown>,\n handleClose(value: unknown): void {\n ref.close(value as R);\n },\n injectorFor: this.createInjectorFactory([\n { provide: FOR_DRAWER_DATA, useValue: data },\n { provide: FOR_DRAWER_INSTANCE_ID, useValue: id },\n { provide: ForDrawerRef, useValue: ref },\n ...(config.providers ?? []),\n ]),\n };\n\n this.register(entry);\n\n return ref;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MA0Ha,kBAAkB,GAAG,IAAI,cAAc,CAAmB,oBAAoB;AAE3F;;;;;;AAMG;AACI,MAAM,sBAAsB,GAAG,IAAI,cAAc,CA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