ng-primitives 0.89.0 → 0.91.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 (389) hide show
  1. package/a11y/index.d.ts +98 -3
  2. package/accordion/index.d.ts +361 -7
  3. package/ai/index.d.ts +238 -16
  4. package/autofill/index.d.ts +62 -1
  5. package/avatar/index.d.ts +155 -5
  6. package/breadcrumbs/index.d.ts +200 -7
  7. package/button/index.d.ts +39 -3
  8. package/checkbox/index.d.ts +137 -2
  9. package/combobox/index.d.ts +414 -8
  10. package/common/index.d.ts +31 -4
  11. package/date-picker/index.d.ts +714 -18
  12. package/date-time/index.d.ts +289 -3
  13. package/date-time-luxon/index.d.ts +31 -1
  14. package/dialog/index.d.ts +253 -9
  15. package/fesm2022/ng-primitives-a11y.mjs +42 -58
  16. package/fesm2022/ng-primitives-a11y.mjs.map +1 -1
  17. package/fesm2022/ng-primitives-accordion.mjs +249 -225
  18. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  19. package/fesm2022/ng-primitives-ai.mjs +61 -58
  20. package/fesm2022/ng-primitives-ai.mjs.map +1 -1
  21. package/fesm2022/ng-primitives-autofill.mjs +55 -38
  22. package/fesm2022/ng-primitives-autofill.mjs.map +1 -1
  23. package/fesm2022/ng-primitives-avatar.mjs +105 -145
  24. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  25. package/fesm2022/ng-primitives-breadcrumbs.mjs +106 -49
  26. package/fesm2022/ng-primitives-breadcrumbs.mjs.map +1 -1
  27. package/fesm2022/ng-primitives-button.mjs +20 -42
  28. package/fesm2022/ng-primitives-button.mjs.map +1 -1
  29. package/fesm2022/ng-primitives-checkbox.mjs +110 -84
  30. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  31. package/fesm2022/ng-primitives-combobox.mjs +82 -78
  32. package/fesm2022/ng-primitives-combobox.mjs.map +1 -1
  33. package/fesm2022/ng-primitives-common.mjs +5 -5
  34. package/fesm2022/ng-primitives-common.mjs.map +1 -1
  35. package/fesm2022/ng-primitives-date-picker.mjs +119 -112
  36. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  37. package/fesm2022/ng-primitives-dialog.mjs +48 -47
  38. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  39. package/fesm2022/ng-primitives-file-upload.mjs +56 -48
  40. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  41. package/fesm2022/ng-primitives-focus-trap.mjs +9 -8
  42. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  43. package/fesm2022/ng-primitives-form-field.mjs +97 -64
  44. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  45. package/fesm2022/ng-primitives-input-otp.mjs +44 -43
  46. package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
  47. package/fesm2022/ng-primitives-input.mjs +38 -54
  48. package/fesm2022/ng-primitives-input.mjs.map +1 -1
  49. package/fesm2022/ng-primitives-interactions.mjs +59 -54
  50. package/fesm2022/ng-primitives-interactions.mjs.map +1 -1
  51. package/fesm2022/ng-primitives-internal.mjs +14 -14
  52. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  53. package/fesm2022/ng-primitives-listbox.mjs +52 -50
  54. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  55. package/fesm2022/ng-primitives-menu.mjs +86 -72
  56. package/fesm2022/ng-primitives-menu.mjs.map +1 -1
  57. package/fesm2022/ng-primitives-meter.mjs +38 -35
  58. package/fesm2022/ng-primitives-meter.mjs.map +1 -1
  59. package/fesm2022/ng-primitives-pagination.mjs +83 -74
  60. package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
  61. package/fesm2022/ng-primitives-popover.mjs +67 -60
  62. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  63. package/fesm2022/ng-primitives-portal.mjs +11 -12
  64. package/fesm2022/ng-primitives-portal.mjs.map +1 -1
  65. package/fesm2022/ng-primitives-progress.mjs +43 -40
  66. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  67. package/fesm2022/ng-primitives-radio.mjs +35 -33
  68. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  69. package/fesm2022/ng-primitives-resize.mjs +4 -4
  70. package/fesm2022/ng-primitives-resize.mjs.map +1 -1
  71. package/fesm2022/ng-primitives-roving-focus.mjs +264 -237
  72. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  73. package/fesm2022/ng-primitives-search.mjs +9 -9
  74. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  75. package/fesm2022/ng-primitives-select.mjs +73 -69
  76. package/fesm2022/ng-primitives-select.mjs.map +1 -1
  77. package/fesm2022/ng-primitives-separator.mjs +7 -7
  78. package/fesm2022/ng-primitives-separator.mjs.map +1 -1
  79. package/fesm2022/ng-primitives-slider.mjs +287 -253
  80. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  81. package/fesm2022/ng-primitives-state.mjs +173 -3
  82. package/fesm2022/ng-primitives-state.mjs.map +1 -1
  83. package/fesm2022/ng-primitives-switch.mjs +105 -101
  84. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  85. package/fesm2022/ng-primitives-tabs.mjs +48 -43
  86. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  87. package/fesm2022/ng-primitives-textarea.mjs +33 -41
  88. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  89. package/fesm2022/ng-primitives-toast.mjs +19 -19
  90. package/fesm2022/ng-primitives-toast.mjs.map +1 -1
  91. package/fesm2022/ng-primitives-toggle-group.mjs +160 -159
  92. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
  93. package/fesm2022/ng-primitives-toggle.mjs +81 -68
  94. package/fesm2022/ng-primitives-toggle.mjs.map +1 -1
  95. package/fesm2022/ng-primitives-toolbar.mjs +31 -40
  96. package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
  97. package/fesm2022/ng-primitives-tooltip.mjs +68 -60
  98. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  99. package/fesm2022/ng-primitives-utils.mjs +50 -37
  100. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  101. package/file-upload/index.d.ts +148 -4
  102. package/focus-trap/index.d.ts +98 -2
  103. package/form-field/index.d.ts +266 -7
  104. package/index.d.ts +2 -2
  105. package/input/index.d.ts +84 -2
  106. package/input-otp/index.d.ts +247 -4
  107. package/interactions/index.d.ts +295 -16
  108. package/internal/index.d.ts +201 -10
  109. package/listbox/index.d.ts +209 -6
  110. package/menu/index.d.ts +297 -8
  111. package/meter/index.d.ts +67 -6
  112. package/package.json +28 -28
  113. package/pagination/index.d.ts +211 -7
  114. package/popover/index.d.ts +224 -5
  115. package/portal/index.d.ts +389 -6
  116. package/progress/index.d.ts +124 -6
  117. package/radio/index.d.ts +140 -5
  118. package/resize/index.d.ts +29 -1
  119. package/roving-focus/index.d.ts +154 -4
  120. package/schematics/ng-add/schema.d.ts +0 -1
  121. package/schematics/ng-generate/__snapshots__/index.spec.ts.snap +1 -1
  122. package/schematics/ng-generate/templates/checkbox/checkbox.__fileSuffix@dasherize__.ts.template +2 -2
  123. package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +6 -3
  124. package/schematics/ng-generate/templates/switch/switch.__fileSuffix@dasherize__.ts.template +2 -2
  125. package/schematics/ng-generate/templates/toggle/toggle.__fileSuffix@dasherize__.ts.template +2 -2
  126. package/schematics/ng-generate/templates/toggle-group/toggle-group.__fileSuffix@dasherize__.ts.template +2 -2
  127. package/schematics/ng-generate/templates/toolbar/toolbar.__fileSuffix@dasherize__.ts.template +1 -1
  128. package/search/index.d.ts +66 -3
  129. package/select/index.d.ts +341 -8
  130. package/separator/index.d.ts +30 -2
  131. package/slider/index.d.ts +471 -10
  132. package/state/index.d.ts +68 -11
  133. package/switch/index.d.ts +151 -3
  134. package/tabs/index.d.ts +222 -7
  135. package/textarea/index.d.ts +87 -2
  136. package/toast/index.d.ts +219 -4
  137. package/toggle/index.d.ts +98 -2
  138. package/toggle-group/index.d.ts +168 -5
  139. package/toolbar/index.d.ts +43 -2
  140. package/tooltip/index.d.ts +214 -5
  141. package/utils/index.d.ts +170 -9
  142. package/a11y/active-descendant/active-descendant.d.ts +0 -42
  143. package/a11y/visually-hidden/visually-hidden-state.d.ts +0 -17
  144. package/a11y/visually-hidden/visually-hidden.d.ts +0 -50
  145. package/accordion/accordion/accordion-state.d.ts +0 -17
  146. package/accordion/accordion/accordion.d.ts +0 -50
  147. package/accordion/accordion-content/accordion-content.d.ts +0 -40
  148. package/accordion/accordion-item/accordion-item-state.d.ts +0 -17
  149. package/accordion/accordion-item/accordion-item.d.ts +0 -50
  150. package/accordion/accordion-trigger/accordion-trigger.d.ts +0 -31
  151. package/accordion/config/accordion-config.d.ts +0 -32
  152. package/ai/prompt-composer/prompt-composer-state.d.ts +0 -17
  153. package/ai/prompt-composer/prompt-composer.d.ts +0 -23
  154. package/ai/prompt-composer-dictation/prompt-composer-dictation-state.d.ts +0 -17
  155. package/ai/prompt-composer-dictation/prompt-composer-dictation.d.ts +0 -29
  156. package/ai/prompt-composer-input/prompt-composer-input-state.d.ts +0 -17
  157. package/ai/prompt-composer-input/prompt-composer-input.d.ts +0 -16
  158. package/ai/prompt-composer-submit/prompt-composer-submit-state.d.ts +0 -17
  159. package/ai/prompt-composer-submit/prompt-composer-submit.d.ts +0 -15
  160. package/ai/thread/thread-state.d.ts +0 -17
  161. package/ai/thread/thread.d.ts +0 -23
  162. package/ai/thread-message/thread-message-state.d.ts +0 -17
  163. package/ai/thread-message/thread-message.d.ts +0 -11
  164. package/ai/thread-suggestion/thread-suggestion-state.d.ts +0 -17
  165. package/ai/thread-suggestion/thread-suggestion.d.ts +0 -14
  166. package/ai/thread-viewport/thread-viewport-state.d.ts +0 -17
  167. package/ai/thread-viewport/thread-viewport.d.ts +0 -34
  168. package/autofill/autofill/autofill.d.ts +0 -19
  169. package/avatar/avatar/avatar-state.d.ts +0 -17
  170. package/avatar/avatar/avatar.d.ts +0 -29
  171. package/avatar/avatar-fallback/avatar-fallback.d.ts +0 -37
  172. package/avatar/avatar-image/avatar-image.d.ts +0 -27
  173. package/avatar/config/avatar-config.d.ts +0 -21
  174. package/breadcrumbs/breadcrumb-ellipsis/breadcrumb-ellipsis.d.ts +0 -8
  175. package/breadcrumbs/breadcrumb-item/breadcrumb-item.d.ts +0 -8
  176. package/breadcrumbs/breadcrumb-link/breadcrumb-link.d.ts +0 -9
  177. package/breadcrumbs/breadcrumb-list/breadcrumb-list.d.ts +0 -8
  178. package/breadcrumbs/breadcrumb-page/breadcrumb-page.d.ts +0 -8
  179. package/breadcrumbs/breadcrumb-separator/breadcrumb-separator.d.ts +0 -8
  180. package/breadcrumbs/breadcrumbs/breadcrumbs.d.ts +0 -8
  181. package/button/button/button-state.d.ts +0 -17
  182. package/button/button/button.d.ts +0 -15
  183. package/button/button/setup-button.d.ts +0 -15
  184. package/checkbox/checkbox/checkbox-state.d.ts +0 -17
  185. package/checkbox/checkbox/checkbox.d.ts +0 -45
  186. package/combobox/combobox/combobox-state.d.ts +0 -17
  187. package/combobox/combobox/combobox.d.ts +0 -222
  188. package/combobox/combobox-button/combobox-button.d.ts +0 -18
  189. package/combobox/combobox-dropdown/combobox-dropdown.d.ts +0 -21
  190. package/combobox/combobox-input/combobox-input.d.ts +0 -36
  191. package/combobox/combobox-option/combobox-option.d.ts +0 -51
  192. package/combobox/combobox-portal/combobox-portal.d.ts +0 -37
  193. package/combobox/config/combobox-config.d.ts +0 -28
  194. package/combobox/utils.d.ts +0 -9
  195. package/common/header/header-token.d.ts +0 -10
  196. package/common/header/header.d.ts +0 -13
  197. package/common/types/orientation.d.ts +0 -1
  198. package/common/types/selection.d.ts +0 -1
  199. package/date-picker/config/date-picker-config.d.ts +0 -22
  200. package/date-picker/date-picker/date-picker-first-day-of-week.d.ts +0 -29
  201. package/date-picker/date-picker/date-picker-state.d.ts +0 -9
  202. package/date-picker/date-picker/date-picker.d.ts +0 -129
  203. package/date-picker/date-picker-cell/date-picker-cell.d.ts +0 -20
  204. package/date-picker/date-picker-cell-render/date-picker-cell-render-token.d.ts +0 -12
  205. package/date-picker/date-picker-cell-render/date-picker-cell-render.d.ts +0 -39
  206. package/date-picker/date-picker-date-button/date-picker-date-button-token.d.ts +0 -7
  207. package/date-picker/date-picker-date-button/date-picker-date-button.d.ts +0 -114
  208. package/date-picker/date-picker-grid/date-picker-grid.d.ts +0 -16
  209. package/date-picker/date-picker-label/date-picker-label-token.d.ts +0 -7
  210. package/date-picker/date-picker-label/date-picker-label.d.ts +0 -20
  211. package/date-picker/date-picker-next-month/date-picker-next-month.d.ts +0 -34
  212. package/date-picker/date-picker-previous-month/date-picker-previous-month.d.ts +0 -34
  213. package/date-picker/date-picker-row-render/date-picker-row-render-token.d.ts +0 -12
  214. package/date-picker/date-picker-row-render/date-picker-row-render.d.ts +0 -65
  215. package/date-picker/date-range-picker/date-range-picker-state.d.ts +0 -19
  216. package/date-picker/date-range-picker/date-range-picker.d.ts +0 -149
  217. package/date-time/date-adapter/date-adapter-token.d.ts +0 -11
  218. package/date-time/date-adapter/date-adapter.d.ts +0 -169
  219. package/date-time/native-date-adapter/native-date-adapter.d.ts +0 -106
  220. package/date-time-luxon/luxon-date-adapter/luxon-date-adapter.d.ts +0 -28
  221. package/dialog/config/dialog-config.d.ts +0 -41
  222. package/dialog/dialog/dialog-ref.d.ts +0 -45
  223. package/dialog/dialog/dialog-state.d.ts +0 -17
  224. package/dialog/dialog/dialog.d.ts +0 -37
  225. package/dialog/dialog/dialog.service.d.ts +0 -69
  226. package/dialog/dialog-description/dialog-description.d.ts +0 -12
  227. package/dialog/dialog-overlay/dialog-overlay.d.ts +0 -16
  228. package/dialog/dialog-title/dialog-title.d.ts +0 -12
  229. package/dialog/dialog-trigger/dialog-trigger.d.ts +0 -26
  230. package/file-upload/file-dropzone/file-drop-filter.d.ts +0 -2
  231. package/file-upload/file-dropzone/file-dropzone-state.d.ts +0 -17
  232. package/file-upload/file-dropzone/file-dropzone.d.ts +0 -55
  233. package/file-upload/file-upload/file-upload-state.d.ts +0 -17
  234. package/file-upload/file-upload/file-upload.d.ts +0 -72
  235. package/focus-trap/focus-trap/focus-trap-state.d.ts +0 -17
  236. package/focus-trap/focus-trap/focus-trap.d.ts +0 -85
  237. package/form-field/description/description.d.ts +0 -17
  238. package/form-field/error/error.d.ts +0 -32
  239. package/form-field/form-control/form-control-state.d.ts +0 -17
  240. package/form-field/form-control/form-control.d.ts +0 -44
  241. package/form-field/form-field/form-field-state.d.ts +0 -17
  242. package/form-field/form-field/form-field.d.ts +0 -119
  243. package/form-field/label/label.d.ts +0 -30
  244. package/input/input/input-state.d.ts +0 -17
  245. package/input/input/input.d.ts +0 -34
  246. package/input-otp/input-otp/input-otp-state.d.ts +0 -17
  247. package/input-otp/input-otp/input-otp.d.ts +0 -133
  248. package/input-otp/input-otp-input/input-otp-input.d.ts +0 -57
  249. package/input-otp/input-otp-slot/input-otp-slot.d.ts +0 -45
  250. package/interactions/config/interactions-config.d.ts +0 -30
  251. package/interactions/focus/focus-interaction.d.ts +0 -14
  252. package/interactions/focus/focus.d.ts +0 -19
  253. package/interactions/focus-visible/focus-visible-interaction.d.ts +0 -12
  254. package/interactions/focus-visible/focus-visible.d.ts +0 -19
  255. package/interactions/hover/hover-interaction.d.ts +0 -17
  256. package/interactions/hover/hover.d.ts +0 -31
  257. package/interactions/interactions/interactions.d.ts +0 -20
  258. package/interactions/move/move.d.ts +0 -114
  259. package/interactions/press/press-interaction.d.ts +0 -14
  260. package/interactions/press/press.d.ts +0 -26
  261. package/internal/exit-animation/exit-animation-manager.d.ts +0 -17
  262. package/internal/exit-animation/exit-animation.d.ts +0 -26
  263. package/internal/signals/explicit-effect.d.ts +0 -19
  264. package/internal/style-injector/style-injector.d.ts +0 -44
  265. package/internal/utilities/dom-removal.d.ts +0 -6
  266. package/internal/utilities/element-ref.d.ts +0 -6
  267. package/internal/utilities/mutation-observer.d.ts +0 -39
  268. package/internal/utilities/overflow.d.ts +0 -13
  269. package/internal/utilities/resize.d.ts +0 -31
  270. package/internal/utilities/scrolling.d.ts +0 -1
  271. package/listbox/listbox/listbox-state.d.ts +0 -17
  272. package/listbox/listbox/listbox.d.ts +0 -101
  273. package/listbox/listbox-header/listbox-header.d.ts +0 -9
  274. package/listbox/listbox-option/listbox-option.d.ts +0 -68
  275. package/listbox/listbox-section/listbox-section.d.ts +0 -9
  276. package/listbox/listbox-trigger/listbox-trigger.d.ts +0 -13
  277. package/menu/config/menu-config.d.ts +0 -44
  278. package/menu/menu/menu-token.d.ts +0 -11
  279. package/menu/menu/menu.d.ts +0 -22
  280. package/menu/menu-item/menu-item.d.ts +0 -30
  281. package/menu/menu-trigger/menu-trigger-state.d.ts +0 -17
  282. package/menu/menu-trigger/menu-trigger.d.ts +0 -98
  283. package/menu/submenu-trigger/submenu-trigger-state.d.ts +0 -17
  284. package/menu/submenu-trigger/submenu-trigger.d.ts +0 -88
  285. package/meter/meter/meter-state.d.ts +0 -17
  286. package/meter/meter/meter.d.ts +0 -27
  287. package/meter/meter-indicator/meter-indicator.d.ts +0 -7
  288. package/meter/meter-label/meter-label.d.ts +0 -10
  289. package/meter/meter-track/meter-track.d.ts +0 -5
  290. package/meter/meter-value/meter-value.d.ts +0 -5
  291. package/pagination/pagination/pagination-state.d.ts +0 -17
  292. package/pagination/pagination/pagination.d.ts +0 -45
  293. package/pagination/pagination-button/pagination-button.d.ts +0 -39
  294. package/pagination/pagination-first/pagination-first.d.ts +0 -28
  295. package/pagination/pagination-last/pagination-last.d.ts +0 -28
  296. package/pagination/pagination-next/pagination-next.d.ts +0 -31
  297. package/pagination/pagination-previous/pagination-previous.d.ts +0 -31
  298. package/popover/config/popover-config.d.ts +0 -64
  299. package/popover/popover/popover.d.ts +0 -18
  300. package/popover/popover-arrow/popover-arrow.d.ts +0 -6
  301. package/popover/popover-trigger/popover-trigger-state.d.ts +0 -19
  302. package/popover/popover-trigger/popover-trigger.d.ts +0 -128
  303. package/portal/offset.d.ts +0 -39
  304. package/portal/overlay-arrow.d.ts +0 -1
  305. package/portal/overlay-token.d.ts +0 -12
  306. package/portal/overlay.d.ts +0 -214
  307. package/portal/portal.d.ts +0 -94
  308. package/portal/scroll-strategy.d.ts +0 -23
  309. package/progress/progress/progress-state.d.ts +0 -17
  310. package/progress/progress/progress.d.ts +0 -61
  311. package/progress/progress-indicator/progress-indicator.d.ts +0 -17
  312. package/progress/progress-label/progress-label.d.ts +0 -14
  313. package/progress/progress-track/progress-track.d.ts +0 -9
  314. package/progress/progress-value/progress-value.d.ts +0 -9
  315. package/radio/radio-group/radio-group-state.d.ts +0 -18
  316. package/radio/radio-group/radio-group.d.ts +0 -54
  317. package/radio/radio-indicator/radio-indicator.d.ts +0 -21
  318. package/radio/radio-item/radio-item-state.d.ts +0 -18
  319. package/radio/radio-item/radio-item.d.ts +0 -45
  320. package/resize/resize/resize.d.ts +0 -26
  321. package/roving-focus/roving-focus-group/roving-focus-group-state.d.ts +0 -17
  322. package/roving-focus/roving-focus-group/roving-focus-group-token.d.ts +0 -21
  323. package/roving-focus/roving-focus-group/roving-focus-group.d.ts +0 -94
  324. package/roving-focus/roving-focus-item/roving-focus-item.d.ts +0 -53
  325. package/search/search/search-state.d.ts +0 -17
  326. package/search/search/search.d.ts +0 -36
  327. package/search/search-clear/search-clear.d.ts +0 -16
  328. package/select/config/select-config.d.ts +0 -28
  329. package/select/native-select/native-select-state.d.ts +0 -17
  330. package/select/native-select/native-select.d.ts +0 -22
  331. package/select/select/select-state.d.ts +0 -17
  332. package/select/select/select.d.ts +0 -172
  333. package/select/select-dropdown/select-dropdown.d.ts +0 -17
  334. package/select/select-option/select-option.d.ts +0 -51
  335. package/select/select-portal/select-portal.d.ts +0 -37
  336. package/separator/config/separator-config.d.ts +0 -22
  337. package/separator/separator/separator.d.ts +0 -11
  338. package/slider/range-slider/range-slider/range-slider-state.d.ts +0 -17
  339. package/slider/range-slider/range-slider/range-slider.d.ts +0 -115
  340. package/slider/range-slider/range-slider-range/range-slider-range.d.ts +0 -12
  341. package/slider/range-slider/range-slider-thumb/range-slider-thumb.d.ts +0 -44
  342. package/slider/range-slider/range-slider-track/range-slider-track.d.ts +0 -22
  343. package/slider/slider/slider-state.d.ts +0 -17
  344. package/slider/slider/slider.d.ts +0 -58
  345. package/slider/slider-range/slider-range.d.ts +0 -12
  346. package/slider/slider-thumb/slider-thumb.d.ts +0 -29
  347. package/slider/slider-track/slider-track.d.ts +0 -22
  348. package/switch/switch/switch-state.d.ts +0 -17
  349. package/switch/switch/switch.d.ts +0 -49
  350. package/switch/switch-thumb/switch-thumb.d.ts +0 -13
  351. package/tabs/config/tabs-config.d.ts +0 -32
  352. package/tabs/tab-button/tab-button.d.ts +0 -59
  353. package/tabs/tab-list/tab-list.d.ts +0 -12
  354. package/tabs/tab-panel/tab-panel-token.d.ts +0 -8
  355. package/tabs/tab-panel/tab-panel.d.ts +0 -38
  356. package/tabs/tabset/tabset-state.d.ts +0 -17
  357. package/tabs/tabset/tabset.d.ts +0 -71
  358. package/textarea/textarea/textarea-state.d.ts +0 -17
  359. package/textarea/textarea/textarea.d.ts +0 -19
  360. package/toast/config/toast-config.d.ts +0 -70
  361. package/toast/toast/toast-context.d.ts +0 -3
  362. package/toast/toast/toast-manager.d.ts +0 -49
  363. package/toast/toast/toast-options.d.ts +0 -34
  364. package/toast/toast/toast-timer.d.ts +0 -14
  365. package/toast/toast/toast.d.ts +0 -72
  366. package/toggle/toggle/toggle-state.d.ts +0 -17
  367. package/toggle/toggle/toggle.d.ts +0 -44
  368. package/toggle-group/config/toggle-group-config.d.ts +0 -32
  369. package/toggle-group/toggle-group/toggle-group-state.d.ts +0 -17
  370. package/toggle-group/toggle-group/toggle-group.d.ts +0 -64
  371. package/toggle-group/toggle-group-item/toggle-group-item-state.d.ts +0 -17
  372. package/toggle-group/toggle-group-item/toggle-group-item.d.ts +0 -34
  373. package/toolbar/toolbar/toolbar-state.d.ts +0 -17
  374. package/toolbar/toolbar/toolbar.d.ts +0 -20
  375. package/tooltip/config/tooltip-config.d.ts +0 -59
  376. package/tooltip/tooltip/tooltip.d.ts +0 -17
  377. package/tooltip/tooltip-arrow/tooltip-arrow.d.ts +0 -6
  378. package/tooltip/tooltip-text-content/tooltip-text-content.component.d.ts +0 -14
  379. package/tooltip/tooltip-trigger/tooltip-trigger-state.d.ts +0 -17
  380. package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +0 -126
  381. package/utils/forms/providers.d.ts +0 -6
  382. package/utils/forms/status.d.ts +0 -16
  383. package/utils/forms/types.d.ts +0 -8
  384. package/utils/helpers/attributes.d.ts +0 -2
  385. package/utils/helpers/disposables.d.ts +0 -40
  386. package/utils/helpers/unique-id.d.ts +0 -6
  387. package/utils/helpers/validators.d.ts +0 -51
  388. package/utils/observables/take-until-destroyed.d.ts +0 -10
  389. package/utils/signals/index.d.ts +0 -22
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-accordion.mjs","sources":["../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item-state.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger.ts","../../../../packages/ng-primitives/accordion/src/config/accordion-config.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion.ts","../../../../packages/ng-primitives/accordion/src/ng-primitives-accordion.ts"],"sourcesContent":["import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpAccordionItem } from './accordion-item';\n\n/**\n * The state token for the AccordionItem primitive.\n */\nexport const NgpAccordionItemStateToken =\n createStateToken<NgpAccordionItem<unknown>>('AccordionItem');\n\n/**\n * Provides the AccordionItem state.\n */\nexport const provideAccordionItemState = createStateProvider(NgpAccordionItemStateToken);\n\n/**\n * Injects the AccordionItem state.\n */\nexport const injectAccordionItemState = createStateInjector<NgpAccordionItem<unknown>>(\n NgpAccordionItemStateToken,\n);\n\n/**\n * The AccordionItem state registration function.\n */\nexport const accordionItemState = createState(NgpAccordionItemStateToken);\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpAccordion } from './accordion';\n\n/**\n * The state token for the Accordion primitive.\n */\nexport const NgpAccordionStateToken = createStateToken<NgpAccordion<unknown>>('Accordion');\n\n/**\n * Provides the Accordion state.\n */\nexport const provideAccordionState = createStateProvider(NgpAccordionStateToken);\n\n/**\n * Injects the Accordion state.\n */\nexport const injectAccordionState =\n createStateInjector<NgpAccordion<unknown>>(NgpAccordionStateToken);\n\n/**\n * The Accordion state registration function.\n */\nexport const accordionState = createState(NgpAccordionStateToken);\n","import { afterRenderEffect, computed, Directive, input } from '@angular/core';\nimport { fromMutationObserver, injectDimensions, injectElementRef } from 'ng-primitives/internal';\nimport { safeTakeUntilDestroyed, uniqueId } from 'ng-primitives/utils';\nimport { debounceTime } from 'rxjs/operators';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport type { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\n/**\n * Apply the `ngpAccordionContent` directive to an element that represents the content of an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionContent]',\n exportAs: 'ngpAccordionContent',\n host: {\n role: 'region',\n '[id]': 'id()',\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'accordionItem().open() ? \"\" : null',\n '[attr.data-closed]': 'accordionItem().open() ? null : \"\"',\n '[attr.aria-labelledby]': 'accordionItem().triggerId()',\n '(beforematch)': 'onBeforeMatch()',\n '[attr.hidden]': 'hidden()',\n },\n})\nexport class NgpAccordionContent<T> {\n /**\n * Access the accordion content element reference\n */\n private readonly elementRef = injectElementRef();\n\n /**\n * Access the accordion\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * Access the accordion item\n */\n protected readonly accordionItem = injectAccordionItemState();\n\n /**\n * The id of the content region\n */\n readonly id = input<string>(uniqueId('ngp-accordion-content'));\n\n /**\n * The dimensions of the content\n */\n private dimensions = injectDimensions();\n\n /**\n * The hidden until-found state of the content\n */\n protected readonly hidden = computed(() =>\n !this.accordionItem().open() && this.dimensions().height === 0 ? 'until-found' : null,\n );\n\n constructor() {\n this.accordionItem().content.set(this);\n\n // any time the open state of the accordion item changes, update the dimensions\n afterRenderEffect(() => this.updateDimensions());\n\n // update dimensions when the content changes\n fromMutationObserver(this.elementRef.nativeElement, {\n childList: true,\n subtree: true,\n disabled: computed(() => !this.accordionItem().open()),\n })\n .pipe(debounceTime(0), safeTakeUntilDestroyed())\n .subscribe(() => this.updateDimensions());\n }\n\n /**\n * Handle the beforematch event to automatically open the accordion item\n * when the browser's find-in-page functionality tries to reveal hidden content.\n */\n protected onBeforeMatch(): void {\n const isDisabled = this.accordion().disabled() || this.accordionItem().disabled();\n if (isDisabled) return;\n this.accordion().toggle(this.accordionItem().value() as T);\n }\n\n private updateDimensions(): void {\n if (this.accordionItem().open()) {\n // remove the inline styles to reset them\n this.elementRef.nativeElement.style.removeProperty('--ngp-accordion-content-width');\n this.elementRef.nativeElement.style.removeProperty('--ngp-accordion-content-height');\n // set the dimensions based on the content\n this.elementRef.nativeElement.style.setProperty(\n '--ngp-accordion-content-width',\n `${this.elementRef.nativeElement.scrollWidth}px`,\n );\n this.elementRef.nativeElement.style.setProperty(\n '--ngp-accordion-content-height',\n `${this.elementRef.nativeElement.scrollHeight}px`,\n );\n }\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input, signal } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpAccordionContent } from '../accordion-content/accordion-content';\nimport { NgpAccordionTrigger } from '../accordion-trigger/accordion-trigger';\nimport { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\nimport { accordionItemState, provideAccordionItemState } from './accordion-item-state';\n\n/**\n * Apply the `ngpAccordionItem` directive to an element that represents an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionItem]',\n exportAs: 'ngpAccordionItem',\n providers: [provideAccordionItemState()],\n host: {\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'state.open() ? \"\" : null',\n '[attr.data-disabled]': 'state.disabled() || accordion().disabled() ? \"\" : null',\n },\n})\nexport class NgpAccordionItem<T> {\n /**\n * Access the accordion.\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * The value of the accordion item.\n */\n readonly value = input<T>(uniqueId('ngp-accordion-item') as T, {\n alias: 'ngpAccordionItemValue',\n });\n\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Access the accordion trigger\n * @internal\n */\n readonly trigger = signal<NgpAccordionTrigger<T> | undefined>(undefined);\n\n /**\n * Access the accordion content\n * @internal\n */\n readonly content = signal<NgpAccordionContent<T> | undefined>(undefined);\n\n /**\n * Whether the accordion item is expanded.\n */\n readonly open = computed<boolean>(() => this.accordion().isOpen(this.state.value()!));\n\n /**\n * The trigger id.\n */\n readonly triggerId = computed(() => this.trigger()?.id());\n\n /**\n * The content id.\n */\n readonly contentId = computed(() => this.content()?.id());\n\n /**\n * The accordion item state.\n */\n private readonly state = accordionItemState<NgpAccordionItem<T>>(this);\n}\n","import { Directive, HOST_TAG_NAME, HostListener, inject, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { NgpAccordionItem } from '../accordion-item/accordion-item';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { NgpAccordion } from '../accordion/accordion';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\n/**\n * Apply the `ngpAccordionTrigger` directive to an element that represents the trigger for an accordion item, such as a button.\n */\n@Directive({\n selector: '[ngpAccordionTrigger]',\n exportAs: 'ngpAccordionTrigger',\n host: {\n '[id]': 'id()',\n '[attr.type]': 'tagName === \"button\" ? \"button\" : null',\n '[attr.data-orientation]': 'accordion().orientation()',\n '[attr.data-open]': 'accordionItem().open() ? \"\" : null',\n '[attr.data-disabled]': 'accordionItem().disabled() || accordion().disabled() ? \"\" : null',\n '[attr.aria-controls]': 'accordionItem().contentId()',\n '[attr.aria-expanded]': 'accordionItem().open()',\n },\n})\nexport class NgpAccordionTrigger<T> {\n /**\n * The tag name of the element.\n */\n protected readonly tagName = inject(HOST_TAG_NAME);\n\n /**\n * Access the parent accordion.\n */\n protected readonly accordion = injectAccordionState<NgpAccordion<T>>();\n\n /**\n * The item instance.\n */\n protected readonly accordionItem = injectAccordionItemState<NgpAccordionItem<T>>();\n\n /**\n * The id of the trigger.\n */\n readonly id = input<string>(uniqueId('ngp-accordion-trigger'));\n\n constructor() {\n this.accordionItem().trigger.set(this);\n }\n\n /**\n * Toggle the accordion item.\n */\n @HostListener('click')\n toggle(): void {\n if (this.accordionItem().disabled() || this.accordion().disabled()) {\n return;\n }\n\n this.accordion().toggle(this.accordionItem().value()!);\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport { NgpAccordionType } from '../accordion/accordion';\n\nexport interface NgpAccordionConfig {\n /**\n * The default type of the accordion\n * @default 'single'\n */\n type: NgpAccordionType;\n /**\n * Whether the accordion is collapsible\n * @default false\n */\n collapsible: boolean;\n /**\n * The default orientation of the accordion\n * @default 'vertical'\n */\n orientation: 'vertical' | 'horizontal';\n}\n\nexport const defaultAccordionConfig: NgpAccordionConfig = {\n type: 'single',\n collapsible: false,\n orientation: 'vertical',\n};\n\nexport const NgpAccordionConfigToken = new InjectionToken<NgpAccordionConfig>(\n 'NgpAccordionConfigToken',\n);\n\n/**\n * Provide the default Accordion configuration\n * @param config The Accordion configuration\n * @returns The provider\n */\nexport function provideAccordionConfig(config: Partial<NgpAccordionConfig>): Provider[] {\n return [\n {\n provide: NgpAccordionConfigToken,\n useValue: { ...defaultAccordionConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Accordion configuration\n * @returns The global Accordion configuration\n */\nexport function injectAccordionConfig(): NgpAccordionConfig {\n return inject(NgpAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectAccordionConfig } from '../config/accordion-config';\nimport { accordionState, provideAccordionState } from './accordion-state';\n\n/**\n * Apply the `ngpAccordion` directive to an element that represents the group of accordion items.\n */\n@Directive({\n selector: '[ngpAccordion]',\n exportAs: 'ngpAccordion',\n providers: [provideAccordionState()],\n host: {\n '[attr.data-orientation]': 'state.orientation()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n },\n})\nexport class NgpAccordion<T> {\n /**\n * Access the global accordion configuration.\n */\n private readonly config = injectAccordionConfig();\n\n /**\n * The type of the accordion.\n */\n readonly type = input<NgpAccordionType>(this.config.type, {\n alias: 'ngpAccordionType',\n });\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible = input<boolean, BooleanInput>(this.config.collapsible, {\n alias: 'ngpAccordionCollapsible',\n transform: booleanAttribute,\n });\n\n /**\n * The value of the accordion.\n */\n readonly value = input<T | T[] | null>(null, {\n alias: 'ngpAccordionValue',\n });\n\n /**\n * Event emitted when the accordion value changes.\n */\n readonly valueChange = output<T | T[] | null>({\n alias: 'ngpAccordionValueChange',\n });\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion orientation.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpAccordionOrientation',\n });\n\n /**\n * The accordion state.\n */\n private readonly state = accordionState<NgpAccordion<T>>(this);\n\n /**\n * @param value The value to check.\n * @returns Whether the value is open.\n * @internal\n */\n isOpen(value: T): boolean {\n if (this.state.type() === 'multiple') {\n return (this.state.value() as T[] | null)?.includes(value) ?? false;\n }\n\n return this.state.value() === value;\n }\n\n toggle(value: T): void {\n const isOpen = this.isOpen(value);\n\n // if we are in single mode and the value is already open and the accordion is not collapsible, do nothing\n if (this.state.type() === 'single' && isOpen && !this.state.collapsible()) {\n return;\n }\n\n // if we are in single mode then toggle the value\n if (this.state.type() === 'single') {\n const newValue = isOpen ? null : value;\n this.state.value.set(newValue);\n this.valueChange.emit(newValue);\n return;\n }\n\n // if we are in multiple mode then toggle the value\n let values = (this.state.value() as T[]) ?? [];\n\n if (isOpen) {\n values = values.filter(v => v !== value);\n } else {\n values = [...values, value];\n }\n this.state.value.set(values);\n this.valueChange.emit(values);\n }\n}\n\nexport type NgpAccordionType = 'single' | 'multiple';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAQA;;AAEG;AACI,MAAM,0BAA0B,GACrC,gBAAgB,CAA4B,eAAe,CAAC;AAE9D;;AAEG;MACU,yBAAyB,GAAG,mBAAmB,CAAC,0BAA0B;AAEvF;;AAEG;MACU,wBAAwB,GAAG,mBAAmB,CACzD,0BAA0B;AAG5B;;AAEG;AACI,MAAM,kBAAkB,GAAG,WAAW,CAAC,0BAA0B,CAAC;;ACrBzE;;AAEG;AACI,MAAM,sBAAsB,GAAG,gBAAgB,CAAwB,WAAW,CAAC;AAE1F;;AAEG;MACU,qBAAqB,GAAG,mBAAmB,CAAC,sBAAsB;AAE/E;;AAEG;MACU,oBAAoB,GAC/B,mBAAmB,CAAwB,sBAAsB;AAEnE;;AAEG;AACI,MAAM,cAAc,GAAG,WAAW,CAAC,sBAAsB,CAAC;;ACnBjE;;AAEG;MAeU,mBAAmB,CAAA;AAiC9B,IAAA,WAAA,GAAA;AAhCA;;AAEG;QACc,IAAA,CAAA,UAAU,GAAG,gBAAgB,EAAE;AAEhD;;AAEG;QACgB,IAAA,CAAA,SAAS,GAAG,oBAAoB,EAAmB;AAEtE;;AAEG;QAC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,oBAAA,EAAA,gCAAA,EAAA,EAAA,EAAA,SAAA,EANZ,CAAC,qBAAqB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAMzB,YAAY,EAAA,UAAA,EAAA,CAAA;kBATxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,SAAS,EAAE,CAAC,qBAAqB,EAAE,CAAC;AACpC,oBAAA,IAAI,EAAE;AACJ,wBAAA,yBAAyB,EAAE,qBAAqB;AAChD,wBAAA,sBAAsB,EAAE,8BAA8B;AACvD,qBAAA;AACF,iBAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-accordion.mjs","sources":["../../../../packages/ng-primitives/accordion/src/accordion/accordion-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-content/accordion-content.ts","../../../../packages/ng-primitives/accordion/src/accordion-item/accordion-item.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger-state.ts","../../../../packages/ng-primitives/accordion/src/accordion-trigger/accordion-trigger.ts","../../../../packages/ng-primitives/accordion/src/config/accordion-config.ts","../../../../packages/ng-primitives/accordion/src/accordion/accordion.ts","../../../../packages/ng-primitives/accordion/src/ng-primitives-accordion.ts"],"sourcesContent":["import { signal, Signal, WritableSignal } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, controlled, createPrimitive, deprecatedSetter } from 'ng-primitives/state';\n\n/**\n * The state interface for the Accordion pattern.\n */\nexport interface NgpAccordionState<T> {\n /**\n * The value of the accordion.\n */\n readonly value: WritableSignal<T | T[] | null>;\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled: WritableSignal<boolean>;\n /**\n * The accordion orientation.\n */\n readonly orientation: WritableSignal<NgpOrientation>;\n /**\n * Set the value of the accordion.\n */\n setValue(value: T | T[] | null): void;\n /**\n * Set the disabled state of the accordion.\n */\n setDisabled(value: boolean): void;\n /**\n * Set the orientation of the accordion.\n */\n setOrientation(value: NgpOrientation): void;\n /**\n * Whether the specified value is open.\n */\n isOpen(value: T): boolean;\n /**\n * Toggle the specified value.\n */\n toggle(value: T): void;\n}\n\n/**\n * The props interface for the Accordion pattern.\n */\nexport interface NgpAccordionProps<T> {\n /**\n * The type of the accordion.\n */\n readonly type: Signal<NgpAccordionType>;\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible: Signal<boolean>;\n\n /**\n * The value of the accordion.\n */\n readonly value: Signal<T | T[] | null>;\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled?: Signal<boolean>;\n\n /**\n * The accordion orientation.\n */\n readonly orientation: Signal<NgpOrientation>;\n\n /**\n * Callback fired when valueChange is emitted.\n */\n readonly onValueChange?: (value: T | T[] | null) => void;\n}\n\nexport const [NgpAccordionStateToken, ngpAccordion, _injectAccordionState, provideAccordionState] =\n createPrimitive(\n 'NgpAccordion',\n <T>({\n type,\n collapsible,\n value: _value = signal(null),\n disabled: _disabled = signal(false),\n orientation: _orientation = signal('vertical'),\n onValueChange,\n }: NgpAccordionProps<T>): NgpAccordionState<T> => {\n const element = injectElementRef();\n\n // Create controlled signals\n const value = controlled(_value);\n const disabled = controlled(_disabled);\n const orientation = controlled(_orientation);\n\n // Host bindings extracted from directive\n attrBinding(element, 'data-orientation', orientation);\n attrBinding(element, 'data-disabled', disabled);\n\n // Setter methods\n function setDisabled(value: boolean): void {\n disabled.set(value);\n }\n\n function setOrientation(value: NgpOrientation): void {\n orientation.set(value);\n }\n\n function setValue(newValue: T | T[] | null): void {\n value.set(newValue);\n }\n\n // Methods extracted from directive\n /**\n * @param value The value to check. @returns Whether the value is open. @internal\n */\n function isOpen(itemValue: T): boolean {\n if (type() === 'multiple') {\n return (value() as T[] | null)?.includes(itemValue) ?? false;\n }\n\n return value() === itemValue;\n }\n\n function toggle(itemValue: T): void {\n const open = isOpen(itemValue);\n\n // if we are in single mode and the itemValue is already open and the accordion is not collapsible, do nothing\n if (type() === 'single' && open && !collapsible()) {\n return;\n }\n\n // if we are in single mode then toggle the itemValue\n if (type() === 'single') {\n const newValue = open ? null : itemValue;\n value.set(newValue);\n onValueChange?.(newValue);\n return;\n }\n\n // if we are in multiple mode then toggle the itemValue\n let values = (value() as T[]) ?? [];\n\n if (open) {\n values = values.filter(v => v !== itemValue);\n } else {\n values = [...values, itemValue];\n }\n value.set(values);\n onValueChange?.(values);\n }\n\n return {\n value: deprecatedSetter(value, 'setValue'),\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n orientation: deprecatedSetter(orientation, 'setOrientation'),\n setDisabled,\n setOrientation,\n setValue,\n isOpen,\n toggle,\n };\n },\n );\n\nexport type NgpAccordionType = 'single' | 'multiple';\n\nexport function injectAccordionState<T>(): Signal<NgpAccordionState<T>> {\n return _injectAccordionState() as Signal<NgpAccordionState<T>>;\n}\n","import { computed, Signal, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { controlled, createPrimitive, dataBinding, deprecatedSetter } from 'ng-primitives/state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionItemState<T> {\n /**\n * The value of the accordion item.\n */\n readonly value: Signal<T>;\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled: Signal<boolean>;\n /**\n * Whether the accordion item is expanded.\n */\n readonly open: Signal<boolean>;\n /**\n * The trigger id.\n */\n readonly triggerId: Signal<string | undefined>;\n /**\n * The content id.\n */\n readonly contentId: Signal<string | undefined>;\n /**\n * Set the disabled state of the accordion item.\n */\n setDisabled(value: boolean): void;\n /**\n * Set the trigger of the accordion item.\n */\n setTrigger(id: string): void;\n /**\n * Set the content of the accordion item.\n */\n setContent(id: string): void;\n}\n\nexport interface NgpAccordionItemProps<T> {\n /**\n * The value of the accordion item.\n */\n readonly value: Signal<T>;\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled?: Signal<boolean>;\n}\n\nexport const [\n NgpAccordionItemStateToken,\n ngpAccordionItem,\n _injectAccordionItemState,\n provideAccordionItemState,\n] = createPrimitive(\n 'NgpAccordionItem',\n <T>({ value, disabled: _disabled = signal(false) }: NgpAccordionItemProps<T>) => {\n const accordion = injectAccordionState<T>();\n const element = injectElementRef();\n\n const disabled = controlled(_disabled);\n\n // Whether the accordion item is expanded.\n const open = computed<boolean>(() => accordion().isOpen(value()));\n\n const trigger = signal<string | undefined>(undefined);\n const content = signal<string | undefined>(undefined);\n\n // Setup host data bindings\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', open);\n dataBinding(element, 'data-disabled', () => disabled() || accordion().disabled());\n\n // Set the disabled state of the accordion item.\n function setDisabled(value: boolean) {\n disabled.set(value);\n }\n\n function setTrigger(id: string) {\n trigger.set(id);\n }\n\n function setContent(id: string) {\n content.set(id);\n }\n\n return {\n value,\n open,\n disabled: deprecatedSetter(disabled, 'setDisabled'),\n triggerId: deprecatedSetter(trigger, 'setTrigger'),\n contentId: deprecatedSetter(content, 'setContent'),\n setDisabled,\n setTrigger,\n setContent,\n };\n },\n);\n\nexport function injectAccordionItemState<T>(): Signal<NgpAccordionItemState<T>> {\n return _injectAccordionItemState() as Signal<NgpAccordionItemState<T>>;\n}\n","import { afterRenderEffect, computed, signal, Signal } from '@angular/core';\nimport { fromMutationObserver, injectDimensions, injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { safeTakeUntilDestroyed, uniqueId } from 'ng-primitives/utils';\nimport { debounceTime } from 'rxjs/operators';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionContentState {\n /**\n * The id of the content region\n */\n readonly id: Signal<string>;\n}\n\nexport interface NgpAccordionContentProps {\n /**\n * The id of the content region\n */\n readonly id?: Signal<string>;\n}\n\nexport const [\n NgpAccordionContentStateToken,\n ngpAccordionContent,\n injectAccordionContentState,\n provideAccordionContentState,\n] = createPrimitive(\n 'NgpAccordionContent',\n <T>({ id = signal(uniqueId('ngp-accordion-content')) }: NgpAccordionContentProps) => {\n const element = injectElementRef();\n const accordion = injectAccordionState<T>();\n const accordionItem = injectAccordionItemState<T>();\n const dimensions = injectDimensions();\n\n const hidden = computed(() =>\n !accordionItem().open() && dimensions().height === 0 ? 'until-found' : null,\n );\n\n // Host bindings\n attrBinding(element, 'role', 'region');\n attrBinding(element, 'id', id);\n attrBinding(element, 'aria-labelledby', accordionItem().triggerId);\n attrBinding(element, 'hidden', hidden);\n\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', accordionItem().open);\n dataBinding(element, 'data-closed', () => !accordionItem().open());\n\n listener(element, 'beforematch', onBeforeMatch);\n\n // Register the content with the accordion item state\n accordionItem().setContent(id());\n\n /**\n * Handle the beforematch event to automatically open the accordion item\n * when the browser's find-in-page functionality tries to reveal hidden content.\n */\n function onBeforeMatch(): void {\n const isDisabled = accordion().disabled() || accordionItem().disabled();\n if (isDisabled) {\n return;\n }\n accordion().toggle(accordionItem().value() as T);\n }\n\n function updateDimensions(): void {\n if (accordionItem().open()) {\n // remove the inline styles to reset them\n element.nativeElement.style.removeProperty('--ngp-accordion-content-width');\n element.nativeElement.style.removeProperty('--ngp-accordion-content-height');\n // set the dimensions based on the content\n element.nativeElement.style.setProperty(\n '--ngp-accordion-content-width',\n `${element.nativeElement.scrollWidth}px`,\n );\n element.nativeElement.style.setProperty(\n '--ngp-accordion-content-height',\n `${element.nativeElement.scrollHeight}px`,\n );\n }\n }\n\n // any time the open state of the accordion item changes, update the dimensions\n afterRenderEffect(() => updateDimensions());\n\n // update dimensions when the content changes\n fromMutationObserver(element.nativeElement, {\n childList: true,\n subtree: true,\n disabled: computed(() => !accordionItem().open()),\n })\n .pipe(debounceTime(0), safeTakeUntilDestroyed())\n .subscribe(() => updateDimensions());\n\n return {};\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpAccordionContent } from './accordion-content-state';\n\n/**\n * Apply the `ngpAccordionContent` directive to an element that represents the content of an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionContent]',\n exportAs: 'ngpAccordionContent',\n})\nexport class NgpAccordionContent<T> {\n /**\n * The id of the content region\n */\n readonly id = input<string>(uniqueId('ngp-accordion-content'));\n\n constructor() {\n ngpAccordionContent<T>({ id: this.id });\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectAccordionState } from '../accordion/accordion-state';\nimport { ngpAccordionItem, provideAccordionItemState } from './accordion-item-state';\n\n/**\n * Apply the `ngpAccordionItem` directive to an element that represents an accordion item.\n */\n@Directive({\n selector: '[ngpAccordionItem]',\n exportAs: 'ngpAccordionItem',\n providers: [provideAccordionItemState()],\n})\nexport class NgpAccordionItem<T> {\n /**\n * Access the accordion.\n */\n protected readonly accordion = injectAccordionState<T>();\n\n /**\n * The value of the accordion item.\n */\n readonly value = input<T>(uniqueId('ngp-accordion-item') as T, {\n alias: 'ngpAccordionItemValue',\n });\n\n /**\n * Whether the accordion item is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionItemDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion item state.\n */\n protected readonly state = ngpAccordionItem<T>({\n value: this.value,\n disabled: this.disabled,\n });\n\n /**\n * The open state of the accordion item.\n */\n readonly open = this.state.open;\n}\n","import { HOST_TAG_NAME, inject, signal, Signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectAccordionItemState } from '../accordion-item/accordion-item-state';\nimport { injectAccordionState } from '../accordion/accordion-state';\n\nexport interface NgpAccordionTriggerState {\n /**\n * The id of the trigger button\n */\n readonly id: Signal<string>;\n /**\n * Toggle the accordion item.\n */\n toggle(): void;\n}\n\nexport interface NgpAccordionTriggerProps {\n /**\n * The id of the trigger button\n */\n readonly id?: Signal<string>;\n}\n\nexport const [\n NgpAccordionTriggerStateToken,\n ngpAccordionTrigger,\n injectAccordionTriggerState,\n provideAccordionTriggerState,\n] = createPrimitive(\n 'NgpAccordionTrigger',\n <T>({ id = signal(uniqueId('ngp-accordion-trigger')) }: NgpAccordionTriggerProps) => {\n const element = injectElementRef();\n const tagName = inject(HOST_TAG_NAME);\n const accordion = injectAccordionState<T>();\n const accordionItem = injectAccordionItemState<T>();\n\n // Host bindings\n attrBinding(element, 'id', id);\n attrBinding(element, 'type', tagName === 'button' ? 'button' : null);\n attrBinding(element, 'aria-controls', accordionItem().contentId);\n attrBinding(element, 'aria-expanded', accordionItem().open);\n dataBinding(element, 'data-orientation', accordion().orientation);\n dataBinding(element, 'data-open', accordionItem().open);\n dataBinding(\n element,\n 'data-disabled',\n () => accordionItem().disabled() || accordion().disabled(),\n );\n\n // register the trigger with the accordion item\n accordionItem().setTrigger(id());\n\n // Methods\n function toggle(): void {\n if (accordionItem().disabled() || accordion().disabled()) {\n return;\n }\n\n accordion().toggle(accordionItem().value()!);\n }\n\n // Event listeners\n listener(element, 'click', toggle);\n\n return { id, toggle };\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { ngpAccordionTrigger } from './accordion-trigger-state';\n\n/**\n * Apply the `ngpAccordionTrigger` directive to an element that represents the trigger for an accordion item, such as a button.\n */\n@Directive({\n selector: '[ngpAccordionTrigger]',\n exportAs: 'ngpAccordionTrigger',\n})\nexport class NgpAccordionTrigger<T> {\n /**\n * The id of the trigger.\n */\n readonly id = input<string>(uniqueId('ngp-accordion-trigger'));\n\n private readonly state = ngpAccordionTrigger<T>({ id: this.id });\n\n /**\n * Toggle the accordion item.\n */\n toggle(): void {\n this.state.toggle();\n }\n}\n","import { InjectionToken, Provider, inject } from '@angular/core';\nimport type { NgpAccordionType } from '../accordion/accordion-state';\n\nexport interface NgpAccordionConfig {\n /**\n * The default type of the accordion\n * @default 'single'\n */\n type: NgpAccordionType;\n /**\n * Whether the accordion is collapsible\n * @default false\n */\n collapsible: boolean;\n /**\n * The default orientation of the accordion\n * @default 'vertical'\n */\n orientation: 'vertical' | 'horizontal';\n}\n\nexport const defaultAccordionConfig: NgpAccordionConfig = {\n type: 'single',\n collapsible: false,\n orientation: 'vertical',\n};\n\nexport const NgpAccordionConfigToken = new InjectionToken<NgpAccordionConfig>(\n 'NgpAccordionConfigToken',\n);\n\n/**\n * Provide the default Accordion configuration\n * @param config The Accordion configuration\n * @returns The provider\n */\nexport function provideAccordionConfig(config: Partial<NgpAccordionConfig>): Provider[] {\n return [\n {\n provide: NgpAccordionConfigToken,\n useValue: { ...defaultAccordionConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Accordion configuration\n * @returns The global Accordion configuration\n */\nexport function injectAccordionConfig(): NgpAccordionConfig {\n return inject(NgpAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, output } from '@angular/core';\nimport { NgpOrientation } from 'ng-primitives/common';\nimport { injectAccordionConfig } from '../config/accordion-config';\nimport { ngpAccordion, NgpAccordionType, provideAccordionState } from './accordion-state';\n\n/**\n * Apply the `ngpAccordion` directive to an element that represents the group of accordion items.\n */\n@Directive({\n selector: '[ngpAccordion]',\n exportAs: 'ngpAccordion',\n providers: [provideAccordionState()],\n})\nexport class NgpAccordion<T> {\n /**\n * Access the global accordion configuration.\n */\n private readonly config = injectAccordionConfig();\n\n /**\n * The type of the accordion.\n */\n readonly type = input<NgpAccordionType>(this.config.type, {\n alias: 'ngpAccordionType',\n });\n\n /**\n * Whether the accordion is collapsible.\n */\n readonly collapsible = input<boolean, BooleanInput>(this.config.collapsible, {\n alias: 'ngpAccordionCollapsible',\n transform: booleanAttribute,\n });\n\n /**\n * The value of the accordion.\n */\n readonly value = input<T | T[] | null>(null, {\n alias: 'ngpAccordionValue',\n });\n\n /**\n * Event emitted when the accordion value changes.\n */\n readonly valueChange = output<T | T[] | null>({\n alias: 'ngpAccordionValueChange',\n });\n\n /**\n * Whether the accordion is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpAccordionDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * The accordion orientation.\n */\n readonly orientation = input<NgpOrientation>(this.config.orientation, {\n alias: 'ngpAccordionOrientation',\n });\n\n /**\n * The accordion state.\n */\n protected readonly state = ngpAccordion<T>({\n type: this.type,\n collapsible: this.collapsible,\n value: this.value,\n disabled: this.disabled,\n orientation: this.orientation,\n onValueChange: value => this.valueChange.emit(value),\n });\n\n /**\n * @param value The value to check.\n * @returns Whether the value is open.\n * @internal\n */\n isOpen(value: T): boolean {\n return this.state.isOpen(value);\n }\n\n toggle(value: T): void {\n this.state.toggle(value);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA8EO,MAAM,CAAC,sBAAsB,EAAE,YAAY,EAAE,qBAAqB,EAAE,qBAAqB,CAAC,GAC/F,eAAe,CACb,cAAc,EACd,CAAI,EACF,IAAI,EACJ,WAAW,EACX,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,EAC5B,QAAQ,EAAE,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,EACnC,WAAW,EAAE,YAAY,GAAG,MAAM,CAAC,UAAU,CAAC,EAC9C,aAAa,GACQ,KAA0B;AAC/C,IAAA,MAAM,OAAO,GAAG,gBAAgB,EAAE;;AAGlC,IAAA,MAAM,KAAK,GAAG,UAAU,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{ fromEvent, Subject } from 'rxjs';
6
6
  import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
7
- import { setupButton } from 'ng-primitives/button';
7
+ import { ngpButton } from 'ng-primitives/button';
8
8
 
9
9
  /**
10
10
  * The state token for the PromptComposer primitive.
@@ -87,7 +87,7 @@ class NgpPromptComposerInput {
87
87
  * This directive automatically handles that behavior.
88
88
  */
89
89
  onEnterKey(event) {
90
- if (event.shiftKey) {
90
+ if (event instanceof KeyboardEvent === false || event.shiftKey) {
91
91
  return;
92
92
  }
93
93
  event.preventDefault();
@@ -97,10 +97,10 @@ class NgpPromptComposerInput {
97
97
  }
98
98
  this.composer().submitPrompt();
99
99
  }
100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
101
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpPromptComposerInput, isStandalone: true, selector: "input[ngpPromptComposerInput], textarea[ngpPromptComposerInput]", host: { listeners: { "keydown.enter": "onEnterKey($event)" } }, providers: [providePromptComposerInputState()], exportAs: ["ngpPromptComposerInput"], ngImport: i0 }); }
100
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposerInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
101
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpPromptComposerInput, isStandalone: true, selector: "input[ngpPromptComposerInput], textarea[ngpPromptComposerInput]", host: { listeners: { "keydown.enter": "onEnterKey($event)" } }, providers: [providePromptComposerInputState()], exportAs: ["ngpPromptComposerInput"], ngImport: i0 }); }
102
102
  }
103
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposerInput, decorators: [{
103
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposerInput, decorators: [{
104
104
  type: Directive,
105
105
  args: [{
106
106
  selector: 'input[ngpPromptComposerInput], textarea[ngpPromptComposerInput]',
@@ -133,24 +133,24 @@ class NgpPromptComposerSubmit {
133
133
  constructor() {
134
134
  this.composer = injectPromptComposerState();
135
135
  /** Whether the submit button should be disabled */
136
- this.disabled = input(false, {
137
- transform: booleanAttribute,
138
- });
136
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
137
+ transform: booleanAttribute,
138
+ }]));
139
139
  /** Whether dictation is currently active */
140
- this.isDictating = computed(() => this.composer().isDictating());
140
+ this.isDictating = computed(() => this.composer().isDictating(), ...(ngDevMode ? [{ debugName: "isDictating" }] : []));
141
141
  /** The state of the prompt composer submit. */
142
142
  this.state = promptComposerSubmitState(this);
143
- setupButton({
143
+ ngpButton({
144
144
  disabled: computed(() => this.state.disabled() || this.composer().hasPrompt() === false),
145
145
  });
146
146
  }
147
147
  onClick() {
148
148
  this.composer().submitPrompt();
149
149
  }
150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposerSubmit, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
151
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpPromptComposerSubmit, isStandalone: true, selector: "button[ngpPromptComposerSubmit]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "attr.data-prompt": "composer().hasPrompt() ? \"\" : null", "attr.data-dictating": "isDictating() ? \"\" : null", "attr.data-dictation-supported": "composer().dictationSupported ? \"\" : null" } }, providers: [providePromptComposerSubmitState()], exportAs: ["ngpPromptComposerSubmit"], ngImport: i0 }); }
150
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposerSubmit, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
151
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpPromptComposerSubmit, isStandalone: true, selector: "button[ngpPromptComposerSubmit]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()" }, properties: { "attr.data-prompt": "composer().hasPrompt() ? \"\" : null", "attr.data-dictating": "isDictating() ? \"\" : null", "attr.data-dictation-supported": "composer().dictationSupported ? \"\" : null" } }, providers: [providePromptComposerSubmitState()], exportAs: ["ngpPromptComposerSubmit"], ngImport: i0 }); }
152
152
  }
153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposerSubmit, decorators: [{
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposerSubmit, decorators: [{
154
154
  type: Directive,
155
155
  args: [{
156
156
  selector: 'button[ngpPromptComposerSubmit]',
@@ -163,7 +163,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
163
163
  '[attr.data-dictation-supported]': 'composer().dictationSupported ? "" : null',
164
164
  },
165
165
  }]
166
- }], ctorParameters: () => [], propDecorators: { onClick: [{
166
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onClick: [{
167
167
  type: HostListener,
168
168
  args: ['click']
169
169
  }] } });
@@ -174,11 +174,11 @@ class NgpPromptComposer {
174
174
  /** Emits whenever the user submits the prompt. */
175
175
  this.submit = output({ alias: 'ngpPromptComposerSubmit' });
176
176
  /** @internal Store the current prompt text. */
177
- this.prompt = signal('');
177
+ this.prompt = signal('', ...(ngDevMode ? [{ debugName: "prompt" }] : []));
178
178
  /** @internal Track whether the prompt is currently being dictated */
179
- this.isDictating = signal(false);
179
+ this.isDictating = signal(false, ...(ngDevMode ? [{ debugName: "isDictating" }] : []));
180
180
  /** @internal Determine whether the prompt input has content */
181
- this.hasPrompt = computed(() => this.prompt().trim().length > 0);
181
+ this.hasPrompt = computed(() => this.prompt().trim().length > 0, ...(ngDevMode ? [{ debugName: "hasPrompt" }] : []));
182
182
  /** Whether dictation is supported by the browser */
183
183
  this.dictationSupported = !!(globalThis.SpeechRecognition || globalThis.webkitSpeechRecognition);
184
184
  /** The state of the prompt composer. */
@@ -195,10 +195,10 @@ class NgpPromptComposer {
195
195
  this.thread().scrollToBottom('smooth');
196
196
  }
197
197
  }
198
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
199
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpPromptComposer, isStandalone: true, selector: "[ngpPromptComposer]", outputs: { submit: "ngpPromptComposerSubmit" }, host: { properties: { "attr.data-prompt": "hasPrompt() ? \"\" : null", "attr.data-dictating": "isDictating() ? \"\" : null", "attr.data-dictation-supported": "dictationSupported ? \"\" : null" } }, providers: [providePromptComposerState()], exportAs: ["ngpPromptComposer"], ngImport: i0 }); }
198
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposer, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
199
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpPromptComposer, isStandalone: true, selector: "[ngpPromptComposer]", outputs: { submit: "ngpPromptComposerSubmit" }, host: { properties: { "attr.data-prompt": "hasPrompt() ? \"\" : null", "attr.data-dictating": "isDictating() ? \"\" : null", "attr.data-dictation-supported": "dictationSupported ? \"\" : null" } }, providers: [providePromptComposerState()], exportAs: ["ngpPromptComposer"], ngImport: i0 }); }
200
200
  }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposer, decorators: [{
201
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposer, decorators: [{
202
202
  type: Directive,
203
203
  args: [{
204
204
  selector: '[ngpPromptComposer]',
@@ -210,7 +210,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
210
210
  '[attr.data-dictation-supported]': 'dictationSupported ? "" : null',
211
211
  },
212
212
  }]
213
- }] });
213
+ }], propDecorators: { submit: [{ type: i0.Output, args: ["ngpPromptComposerSubmit"] }] } });
214
214
 
215
215
  /**
216
216
  * The state token for the ThreadMessage primitive.
@@ -253,10 +253,10 @@ class NgpThreadMessage {
253
253
  this.thread().registerMessage(this);
254
254
  this.destroyRef.onDestroy(() => this.thread().unregisterMessage(this));
255
255
  }
256
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThreadMessage, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
257
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpThreadMessage, isStandalone: true, selector: "[ngpThreadMessage]", providers: [provideThreadMessageState()], exportAs: ["ngpThreadMessage"], ngImport: i0 }); }
256
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThreadMessage, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
257
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpThreadMessage, isStandalone: true, selector: "[ngpThreadMessage]", providers: [provideThreadMessageState()], exportAs: ["ngpThreadMessage"], ngImport: i0 }); }
258
258
  }
259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThreadMessage, decorators: [{
259
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThreadMessage, decorators: [{
260
260
  type: Directive,
261
261
  args: [{
262
262
  selector: '[ngpThreadMessage]',
@@ -294,10 +294,10 @@ class NgpThread {
294
294
  setPrompt(value) {
295
295
  this.requestPrompt.next(value);
296
296
  }
297
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThread, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
298
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.11", type: NgpThread, isStandalone: true, selector: "[ngpThread]", providers: [provideThreadState()], exportAs: ["ngpThread"], ngImport: i0 }); }
297
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThread, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
298
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.9", type: NgpThread, isStandalone: true, selector: "[ngpThread]", providers: [provideThreadState()], exportAs: ["ngpThread"], ngImport: i0 }); }
299
299
  }
300
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThread, decorators: [{
300
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThread, decorators: [{
301
301
  type: Directive,
302
302
  args: [{
303
303
  selector: '[ngpThread]',
@@ -327,16 +327,16 @@ class NgpPromptComposerDictation {
327
327
  constructor() {
328
328
  this.composer = injectPromptComposerState();
329
329
  this.recognition = null;
330
- this.basePrompt = signal(''); // Store the prompt before dictation started
330
+ this.basePrompt = signal('', ...(ngDevMode ? [{ debugName: "basePrompt" }] : [])); // Store the prompt before dictation started
331
331
  /** Whether the submit button should be disabled. */
332
- this.disabled = input(false, {
333
- transform: booleanAttribute,
334
- });
332
+ this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled", transform: booleanAttribute }] : [{
333
+ transform: booleanAttribute,
334
+ }]));
335
335
  /** Whether dictation is currently active */
336
- this.isDictating = computed(() => this.composer().isDictating());
336
+ this.isDictating = computed(() => this.composer().isDictating(), ...(ngDevMode ? [{ debugName: "isDictating" }] : []));
337
337
  /** The state of the prompt composer. */
338
338
  this.state = promptComposerDictationState(this);
339
- setupButton({
339
+ ngpButton({
340
340
  disabled: computed(() => this.state.disabled() || this.composer().dictationSupported === false),
341
341
  });
342
342
  this.initializeSpeechRecognition();
@@ -416,10 +416,10 @@ class NgpPromptComposerDictation {
416
416
  this.recognition.stop();
417
417
  }
418
418
  }
419
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposerDictation, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
420
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpPromptComposerDictation, isStandalone: true, selector: "button[ngpPromptComposerDictation]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()", "document:keydown": "onKeydown($event)" }, properties: { "attr.data-dictating": "isDictating() ? \"\" : null", "attr.data-dictation-supported": "composer().dictationSupported ? \"\" : null", "attr.data-prompt": "composer().hasPrompt() ? \"\" : null" } }, providers: [providePromptComposerDictationState()], exportAs: ["ngpPromptComposerDictation"], ngImport: i0 }); }
419
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposerDictation, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
420
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpPromptComposerDictation, isStandalone: true, selector: "button[ngpPromptComposerDictation]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "type": "button" }, listeners: { "click": "onClick()", "document:keydown": "onKeydown($event)" }, properties: { "attr.data-dictating": "isDictating() ? \"\" : null", "attr.data-dictation-supported": "composer().dictationSupported ? \"\" : null", "attr.data-prompt": "composer().hasPrompt() ? \"\" : null" } }, providers: [providePromptComposerDictationState()], exportAs: ["ngpPromptComposerDictation"], ngImport: i0 }); }
421
421
  }
422
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpPromptComposerDictation, decorators: [{
422
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpPromptComposerDictation, decorators: [{
423
423
  type: Directive,
424
424
  args: [{
425
425
  selector: 'button[ngpPromptComposerDictation]',
@@ -432,7 +432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImpo
432
432
  '[attr.data-prompt]': 'composer().hasPrompt() ? "" : null',
433
433
  },
434
434
  }]
435
- }], ctorParameters: () => [], propDecorators: { onClick: [{
435
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onClick: [{
436
436
  type: HostListener,
437
437
  args: ['click']
438
438
  }], onKeydown: [{
@@ -469,17 +469,19 @@ class NgpThreadViewport {
469
469
  *
470
470
  * @default 70
471
471
  */
472
- this.threshold = input(70, {
473
- alias: 'ngpThreadViewportThreshold',
474
- transform: numberAttribute,
475
- });
472
+ this.threshold = input(70, ...(ngDevMode ? [{ debugName: "threshold", alias: 'ngpThreadViewportThreshold',
473
+ transform: numberAttribute }] : [{
474
+ alias: 'ngpThreadViewportThreshold',
475
+ transform: numberAttribute,
476
+ }]));
476
477
  /**
477
478
  * Whether the thread should automatically scroll to the bottom when new content is added.
478
479
  */
479
- this.autoScroll = input(true, {
480
- alias: 'ngpThreadViewportAutoScroll',
481
- transform: booleanAttribute,
482
- });
480
+ this.autoScroll = input(true, ...(ngDevMode ? [{ debugName: "autoScroll", alias: 'ngpThreadViewportAutoScroll',
481
+ transform: booleanAttribute }] : [{
482
+ alias: 'ngpThreadViewportAutoScroll',
483
+ transform: booleanAttribute,
484
+ }]));
483
485
  /** Store the last known scroll position */
484
486
  this.lastScrollTop = 0;
485
487
  /** Determine if we are at the bottom of the scrollable container (within the threshold) */
@@ -520,17 +522,17 @@ class NgpThreadViewport {
520
522
  }
521
523
  this.lastScrollTop = element.scrollTop;
522
524
  }
523
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThreadViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
524
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpThreadViewport, isStandalone: true, selector: "[ngpThreadViewport]", inputs: { threshold: { classPropertyName: "threshold", publicName: "ngpThreadViewportThreshold", isSignal: true, isRequired: false, transformFunction: null }, autoScroll: { classPropertyName: "autoScroll", publicName: "ngpThreadViewportAutoScroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "scroll": "onScroll()" } }, providers: [provideThreadViewportState()], exportAs: ["ngpThreadViewport"], ngImport: i0 }); }
525
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThreadViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
526
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpThreadViewport, isStandalone: true, selector: "[ngpThreadViewport]", inputs: { threshold: { classPropertyName: "threshold", publicName: "ngpThreadViewportThreshold", isSignal: true, isRequired: false, transformFunction: null }, autoScroll: { classPropertyName: "autoScroll", publicName: "ngpThreadViewportAutoScroll", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "scroll": "onScroll()" } }, providers: [provideThreadViewportState()], exportAs: ["ngpThreadViewport"], ngImport: i0 }); }
525
527
  }
526
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThreadViewport, decorators: [{
528
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThreadViewport, decorators: [{
527
529
  type: Directive,
528
530
  args: [{
529
531
  selector: '[ngpThreadViewport]',
530
532
  exportAs: 'ngpThreadViewport',
531
533
  providers: [provideThreadViewportState()],
532
534
  }]
533
- }], ctorParameters: () => [], propDecorators: { onScroll: [{
535
+ }], ctorParameters: () => [], propDecorators: { threshold: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpThreadViewportThreshold", required: false }] }], autoScroll: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpThreadViewportAutoScroll", required: false }] }], onScroll: [{
534
536
  type: HostListener,
535
537
  args: ['scroll']
536
538
  }] } });
@@ -556,12 +558,13 @@ class NgpThreadSuggestion {
556
558
  constructor() {
557
559
  this.thread = injectThreadState();
558
560
  /** The suggested text to display in the input field. */
559
- this.suggestion = input('', { alias: 'ngpThreadSuggestion' });
561
+ this.suggestion = input('', ...(ngDevMode ? [{ debugName: "suggestion", alias: 'ngpThreadSuggestion' }] : [{ alias: 'ngpThreadSuggestion' }]));
560
562
  /** Whether the suggestion should populate the prompt when clicked. */
561
- this.setPromptOnClick = input(true, {
562
- alias: 'ngpThreadSuggestionSetPromptOnClick',
563
- transform: booleanAttribute,
564
- });
563
+ this.setPromptOnClick = input(true, ...(ngDevMode ? [{ debugName: "setPromptOnClick", alias: 'ngpThreadSuggestionSetPromptOnClick',
564
+ transform: booleanAttribute }] : [{
565
+ alias: 'ngpThreadSuggestionSetPromptOnClick',
566
+ transform: booleanAttribute,
567
+ }]));
565
568
  /** The state of the thread suggestion. */
566
569
  this.state = threadSuggestionState(this);
567
570
  }
@@ -570,17 +573,17 @@ class NgpThreadSuggestion {
570
573
  this.thread().setPrompt(this.state.suggestion());
571
574
  }
572
575
  }
573
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThreadSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
574
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.11", type: NgpThreadSuggestion, isStandalone: true, selector: "button[ngpThreadSuggestion]", inputs: { suggestion: { classPropertyName: "suggestion", publicName: "ngpThreadSuggestion", isSignal: true, isRequired: false, transformFunction: null }, setPromptOnClick: { classPropertyName: "setPromptOnClick", publicName: "ngpThreadSuggestionSetPromptOnClick", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "submitSuggestion()" } }, providers: [provideThreadSuggestionState()], exportAs: ["ngpThreadSuggestion"], ngImport: i0 }); }
576
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThreadSuggestion, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
577
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.9", type: NgpThreadSuggestion, isStandalone: true, selector: "button[ngpThreadSuggestion]", inputs: { suggestion: { classPropertyName: "suggestion", publicName: "ngpThreadSuggestion", isSignal: true, isRequired: false, transformFunction: null }, setPromptOnClick: { classPropertyName: "setPromptOnClick", publicName: "ngpThreadSuggestionSetPromptOnClick", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "submitSuggestion()" } }, providers: [provideThreadSuggestionState()], exportAs: ["ngpThreadSuggestion"], ngImport: i0 }); }
575
578
  }
576
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: NgpThreadSuggestion, decorators: [{
579
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NgpThreadSuggestion, decorators: [{
577
580
  type: Directive,
578
581
  args: [{
579
582
  selector: 'button[ngpThreadSuggestion]',
580
583
  exportAs: 'ngpThreadSuggestion',
581
584
  providers: [provideThreadSuggestionState()],
582
585
  }]
583
- }], propDecorators: { submitSuggestion: [{
586
+ }], propDecorators: { suggestion: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpThreadSuggestion", required: false }] }], setPromptOnClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpThreadSuggestionSetPromptOnClick", required: false }] }], submitSuggestion: [{
584
587
  type: HostListener,
585
588
  args: ['click']
586
589
  }] } });