@ember-joinery/primitives 0.0.0-stage → 1.1.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 (485) hide show
  1. package/CHANGELOG.md +480 -0
  2. package/LICENSE.md +9 -0
  3. package/NOTICE +532 -0
  4. package/README.md +11 -2
  5. package/addon-main.cjs +4 -0
  6. package/declarations/-private/combobox-list.d.ts +59 -0
  7. package/declarations/-private/combobox-list.d.ts.map +1 -0
  8. package/declarations/-private/command-score.d.ts +33 -0
  9. package/declarations/-private/command-score.d.ts.map +1 -0
  10. package/declarations/-private/delay-group.d.ts +47 -0
  11. package/declarations/-private/delay-group.d.ts.map +1 -0
  12. package/declarations/-private/dialog.d.ts +180 -0
  13. package/declarations/-private/dialog.d.ts.map +1 -0
  14. package/declarations/-private/form-control.d.ts +70 -0
  15. package/declarations/-private/form-control.d.ts.map +1 -0
  16. package/declarations/-private/form-data.d.ts +14 -0
  17. package/declarations/-private/form-data.d.ts.map +1 -0
  18. package/declarations/-private/hover-intent.d.ts +48 -0
  19. package/declarations/-private/hover-intent.d.ts.map +1 -0
  20. package/declarations/-private/image-loading.d.ts +77 -0
  21. package/declarations/-private/image-loading.d.ts.map +1 -0
  22. package/declarations/-private/indicator.d.ts +27 -0
  23. package/declarations/-private/indicator.d.ts.map +1 -0
  24. package/declarations/-private/instances.d.ts +11 -0
  25. package/declarations/-private/instances.d.ts.map +1 -0
  26. package/declarations/-private/layout-styles.d.ts +34 -0
  27. package/declarations/-private/layout-styles.d.ts.map +1 -0
  28. package/declarations/-private/menu.d.ts +616 -0
  29. package/declarations/-private/menu.d.ts.map +1 -0
  30. package/declarations/-private/observers.d.ts +35 -0
  31. package/declarations/-private/observers.d.ts.map +1 -0
  32. package/declarations/-private/popper.d.ts +149 -0
  33. package/declarations/-private/popper.d.ts.map +1 -0
  34. package/declarations/-private/presence-chart.d.ts +39 -0
  35. package/declarations/-private/presence-chart.d.ts.map +1 -0
  36. package/declarations/-private/promise-state.d.ts +41 -0
  37. package/declarations/-private/promise-state.d.ts.map +1 -0
  38. package/declarations/-private/scroll-end.d.ts +16 -0
  39. package/declarations/-private/scroll-end.d.ts.map +1 -0
  40. package/declarations/-private/scroll-visibility.d.ts +68 -0
  41. package/declarations/-private/scroll-visibility.d.ts.map +1 -0
  42. package/declarations/-private/toast.d.ts +119 -0
  43. package/declarations/-private/toast.d.ts.map +1 -0
  44. package/declarations/-private/typeahead-search.d.ts +29 -0
  45. package/declarations/-private/typeahead-search.d.ts.map +1 -0
  46. package/declarations/accordion.d.ts +284 -0
  47. package/declarations/accordion.d.ts.map +1 -0
  48. package/declarations/alert-dialog.d.ts +80 -0
  49. package/declarations/alert-dialog.d.ts.map +1 -0
  50. package/declarations/anchor/component.d.ts +63 -0
  51. package/declarations/anchor/component.d.ts.map +1 -0
  52. package/declarations/anchor/index.d.ts +7 -0
  53. package/declarations/anchor/index.d.ts.map +1 -0
  54. package/declarations/anchor/middleware.d.ts +46 -0
  55. package/declarations/anchor/middleware.d.ts.map +1 -0
  56. package/declarations/anchor/modifier.d.ts +34 -0
  57. package/declarations/anchor/modifier.d.ts.map +1 -0
  58. package/declarations/anchor/options.d.ts +112 -0
  59. package/declarations/anchor/options.d.ts.map +1 -0
  60. package/declarations/anchor/position.d.ts +36 -0
  61. package/declarations/anchor/position.d.ts.map +1 -0
  62. package/declarations/anchor.d.ts +2 -0
  63. package/declarations/as.d.ts +33 -0
  64. package/declarations/as.d.ts.map +1 -0
  65. package/declarations/aspect-ratio.d.ts +34 -0
  66. package/declarations/aspect-ratio.d.ts.map +1 -0
  67. package/declarations/avatar.d.ts +178 -0
  68. package/declarations/avatar.d.ts.map +1 -0
  69. package/declarations/body-class.d.ts +30 -0
  70. package/declarations/body-class.d.ts.map +1 -0
  71. package/declarations/breadcrumb.d.ts +64 -0
  72. package/declarations/breadcrumb.d.ts.map +1 -0
  73. package/declarations/calendar/dates.d.ts +142 -0
  74. package/declarations/calendar/dates.d.ts.map +1 -0
  75. package/declarations/calendar/index.d.ts +59 -0
  76. package/declarations/calendar/index.d.ts.map +1 -0
  77. package/declarations/calendar/state.d.ts +415 -0
  78. package/declarations/calendar/state.d.ts.map +1 -0
  79. package/declarations/calendar.d.ts +3 -0
  80. package/declarations/checkbox.d.ts +71 -0
  81. package/declarations/checkbox.d.ts.map +1 -0
  82. package/declarations/collapsible.d.ts +216 -0
  83. package/declarations/collapsible.d.ts.map +1 -0
  84. package/declarations/color-scheme.d.ts +115 -0
  85. package/declarations/color-scheme.d.ts.map +1 -0
  86. package/declarations/combobox.d.ts +569 -0
  87. package/declarations/combobox.d.ts.map +1 -0
  88. package/declarations/command.d.ts +410 -0
  89. package/declarations/command.d.ts.map +1 -0
  90. package/declarations/context-menu.d.ts +155 -0
  91. package/declarations/context-menu.d.ts.map +1 -0
  92. package/declarations/controllable-state.d.ts +85 -0
  93. package/declarations/controllable-state.d.ts.map +1 -0
  94. package/declarations/dialog.d.ts +80 -0
  95. package/declarations/dialog.d.ts.map +1 -0
  96. package/declarations/direction.d.ts +55 -0
  97. package/declarations/direction.d.ts.map +1 -0
  98. package/declarations/dismiss.d.ts +111 -0
  99. package/declarations/dismiss.d.ts.map +1 -0
  100. package/declarations/dom-context.d.ts +74 -0
  101. package/declarations/dom-context.d.ts.map +1 -0
  102. package/declarations/drawer/controller.d.ts +174 -0
  103. package/declarations/drawer/controller.d.ts.map +1 -0
  104. package/declarations/drawer/index.d.ts +105 -0
  105. package/declarations/drawer/index.d.ts.map +1 -0
  106. package/declarations/drawer/machine.d.ts +139 -0
  107. package/declarations/drawer/machine.d.ts.map +1 -0
  108. package/declarations/drawer/parts.d.ts +85 -0
  109. package/declarations/drawer/parts.d.ts.map +1 -0
  110. package/declarations/drawer.d.ts +2 -0
  111. package/declarations/dropdown-menu.d.ts +169 -0
  112. package/declarations/dropdown-menu.d.ts.map +1 -0
  113. package/declarations/external-link.d.ts +26 -0
  114. package/declarations/external-link.d.ts.map +1 -0
  115. package/declarations/file-drop.d.ts +119 -0
  116. package/declarations/file-drop.d.ts.map +1 -0
  117. package/declarations/focus-scope.d.ts +105 -0
  118. package/declarations/focus-scope.d.ts.map +1 -0
  119. package/declarations/focus.d.ts +114 -0
  120. package/declarations/focus.d.ts.map +1 -0
  121. package/declarations/head.d.ts +20 -0
  122. package/declarations/head.d.ts.map +1 -0
  123. package/declarations/heading.d.ts +59 -0
  124. package/declarations/heading.d.ts.map +1 -0
  125. package/declarations/hero.d.ts +32 -0
  126. package/declarations/hero.d.ts.map +1 -0
  127. package/declarations/hide-others.d.ts +35 -0
  128. package/declarations/hide-others.d.ts.map +1 -0
  129. package/declarations/hover-card.d.ts +148 -0
  130. package/declarations/hover-card.d.ts.map +1 -0
  131. package/declarations/i18n.d.ts +47 -0
  132. package/declarations/i18n.d.ts.map +1 -0
  133. package/declarations/id.d.ts +15 -0
  134. package/declarations/id.d.ts.map +1 -0
  135. package/declarations/iframe.d.ts +12 -0
  136. package/declarations/iframe.d.ts.map +1 -0
  137. package/declarations/incremental-each.d.ts +81 -0
  138. package/declarations/incremental-each.d.ts.map +1 -0
  139. package/declarations/index.d.ts +108 -0
  140. package/declarations/index.d.ts.map +1 -0
  141. package/declarations/input-otp.d.ts +201 -0
  142. package/declarations/input-otp.d.ts.map +1 -0
  143. package/declarations/keys.d.ts +50 -0
  144. package/declarations/keys.d.ts.map +1 -0
  145. package/declarations/label.d.ts +36 -0
  146. package/declarations/label.d.ts.map +1 -0
  147. package/declarations/layer.d.ts +56 -0
  148. package/declarations/layer.d.ts.map +1 -0
  149. package/declarations/link-helper.d.ts +73 -0
  150. package/declarations/link-helper.d.ts.map +1 -0
  151. package/declarations/link.d.ts +60 -0
  152. package/declarations/link.d.ts.map +1 -0
  153. package/declarations/load.d.ts +47 -0
  154. package/declarations/load.d.ts.map +1 -0
  155. package/declarations/menubar.d.ts +231 -0
  156. package/declarations/menubar.d.ts.map +1 -0
  157. package/declarations/message-scroller/components.d.ts +229 -0
  158. package/declarations/message-scroller/components.d.ts.map +1 -0
  159. package/declarations/message-scroller/geometry.d.ts +95 -0
  160. package/declarations/message-scroller/geometry.d.ts.map +1 -0
  161. package/declarations/message-scroller/index.d.ts +4 -0
  162. package/declarations/message-scroller/index.d.ts.map +1 -0
  163. package/declarations/message-scroller/state.d.ts +124 -0
  164. package/declarations/message-scroller/state.d.ts.map +1 -0
  165. package/declarations/message-scroller.d.ts +2 -0
  166. package/declarations/messages.d.ts +166 -0
  167. package/declarations/messages.d.ts.map +1 -0
  168. package/declarations/narrowing.d.ts +24 -0
  169. package/declarations/narrowing.d.ts.map +1 -0
  170. package/declarations/native-form.d.ts +56 -0
  171. package/declarations/native-form.d.ts.map +1 -0
  172. package/declarations/native-value.d.ts +47 -0
  173. package/declarations/native-value.d.ts.map +1 -0
  174. package/declarations/navigation-menu.d.ts +406 -0
  175. package/declarations/navigation-menu.d.ts.map +1 -0
  176. package/declarations/on-resize.d.ts +32 -0
  177. package/declarations/on-resize.d.ts.map +1 -0
  178. package/declarations/part.d.ts +99 -0
  179. package/declarations/part.d.ts.map +1 -0
  180. package/declarations/popover.d.ts +236 -0
  181. package/declarations/popover.d.ts.map +1 -0
  182. package/declarations/portal/index.d.ts +3 -0
  183. package/declarations/portal/index.d.ts.map +1 -0
  184. package/declarations/portal/portal.d.ts +46 -0
  185. package/declarations/portal/portal.d.ts.map +1 -0
  186. package/declarations/portal/targets.d.ts +40 -0
  187. package/declarations/portal/targets.d.ts.map +1 -0
  188. package/declarations/portal.d.ts +2 -0
  189. package/declarations/presence.d.ts +80 -0
  190. package/declarations/presence.d.ts.map +1 -0
  191. package/declarations/progress.d.ts +98 -0
  192. package/declarations/progress.d.ts.map +1 -0
  193. package/declarations/proper-links.d.ts +69 -0
  194. package/declarations/proper-links.d.ts.map +1 -0
  195. package/declarations/qp.d.ts +55 -0
  196. package/declarations/qp.d.ts.map +1 -0
  197. package/declarations/questionnaire/components.d.ts +348 -0
  198. package/declarations/questionnaire/components.d.ts.map +1 -0
  199. package/declarations/questionnaire/index.d.ts +4 -0
  200. package/declarations/questionnaire/index.d.ts.map +1 -0
  201. package/declarations/questionnaire/state.d.ts +400 -0
  202. package/declarations/questionnaire/state.d.ts.map +1 -0
  203. package/declarations/questionnaire/utils.d.ts +65 -0
  204. package/declarations/questionnaire/utils.d.ts.map +1 -0
  205. package/declarations/questionnaire.d.ts +2 -0
  206. package/declarations/radio-group.d.ts +115 -0
  207. package/declarations/radio-group.d.ts.map +1 -0
  208. package/declarations/rating.d.ts +214 -0
  209. package/declarations/rating.d.ts.map +1 -0
  210. package/declarations/resizable/components.d.ts +107 -0
  211. package/declarations/resizable/components.d.ts.map +1 -0
  212. package/declarations/resizable/index.d.ts +4 -0
  213. package/declarations/resizable/index.d.ts.map +1 -0
  214. package/declarations/resizable/layout.d.ts +93 -0
  215. package/declarations/resizable/layout.d.ts.map +1 -0
  216. package/declarations/resizable/state.d.ts +211 -0
  217. package/declarations/resizable/state.d.ts.map +1 -0
  218. package/declarations/resizable.d.ts +2 -0
  219. package/declarations/resize-observer.d.ts +40 -0
  220. package/declarations/resize-observer.d.ts.map +1 -0
  221. package/declarations/roving-focus.d.ts +204 -0
  222. package/declarations/roving-focus.d.ts.map +1 -0
  223. package/declarations/scroll-area/components.d.ts +125 -0
  224. package/declarations/scroll-area/components.d.ts.map +1 -0
  225. package/declarations/scroll-area/index.d.ts +3 -0
  226. package/declarations/scroll-area/index.d.ts.map +1 -0
  227. package/declarations/scroll-area/state.d.ts +147 -0
  228. package/declarations/scroll-area/state.d.ts.map +1 -0
  229. package/declarations/scroll-area.d.ts +2 -0
  230. package/declarations/scroll-lock.d.ts +69 -0
  231. package/declarations/scroll-lock.d.ts.map +1 -0
  232. package/declarations/scroller.d.ts +71 -0
  233. package/declarations/scroller.d.ts.map +1 -0
  234. package/declarations/select.d.ts +459 -0
  235. package/declarations/select.d.ts.map +1 -0
  236. package/declarations/separator.d.ts +71 -0
  237. package/declarations/separator.d.ts.map +1 -0
  238. package/declarations/service.d.ts +83 -0
  239. package/declarations/service.d.ts.map +1 -0
  240. package/declarations/shadowed.d.ts +63 -0
  241. package/declarations/shadowed.d.ts.map +1 -0
  242. package/declarations/slider.d.ts +283 -0
  243. package/declarations/slider.d.ts.map +1 -0
  244. package/declarations/sticky-footer.d.ts +43 -0
  245. package/declarations/sticky-footer.d.ts.map +1 -0
  246. package/declarations/store.d.ts +47 -0
  247. package/declarations/store.d.ts.map +1 -0
  248. package/declarations/switch.d.ts +76 -0
  249. package/declarations/switch.d.ts.map +1 -0
  250. package/declarations/tabs.d.ts +250 -0
  251. package/declarations/tabs.d.ts.map +1 -0
  252. package/declarations/toast/icons.d.ts +29 -0
  253. package/declarations/toast/icons.d.ts.map +1 -0
  254. package/declarations/toast/index.d.ts +4 -0
  255. package/declarations/toast/index.d.ts.map +1 -0
  256. package/declarations/toast/item.d.ts +162 -0
  257. package/declarations/toast/item.d.ts.map +1 -0
  258. package/declarations/toast/state.d.ts +276 -0
  259. package/declarations/toast/state.d.ts.map +1 -0
  260. package/declarations/toast/styles.d.ts +20 -0
  261. package/declarations/toast/styles.d.ts.map +1 -0
  262. package/declarations/toast/toaster.d.ts +173 -0
  263. package/declarations/toast/toaster.d.ts.map +1 -0
  264. package/declarations/toast.d.ts +2 -0
  265. package/declarations/toggle-group.d.ts +161 -0
  266. package/declarations/toggle-group.d.ts.map +1 -0
  267. package/declarations/toggle.d.ts +70 -0
  268. package/declarations/toggle.d.ts.map +1 -0
  269. package/declarations/tooltip.d.ts +227 -0
  270. package/declarations/tooltip.d.ts.map +1 -0
  271. package/declarations/typeahead.d.ts +97 -0
  272. package/declarations/typeahead.d.ts.map +1 -0
  273. package/declarations/viewport.d.ts +109 -0
  274. package/declarations/viewport.d.ts.map +1 -0
  275. package/declarations/visually-hidden.d.ts +42 -0
  276. package/declarations/visually-hidden.d.ts.map +1 -0
  277. package/declarations/zoetrope.d.ts +120 -0
  278. package/declarations/zoetrope.d.ts.map +1 -0
  279. package/dist/accordion.js +367 -0
  280. package/dist/accordion.js.map +1 -0
  281. package/dist/alert-dialog.js +122 -0
  282. package/dist/alert-dialog.js.map +1 -0
  283. package/dist/anchor.js +2 -0
  284. package/dist/anchor.js.map +1 -0
  285. package/dist/as.js +60 -0
  286. package/dist/as.js.map +1 -0
  287. package/dist/aspect-ratio.js +59 -0
  288. package/dist/aspect-ratio.js.map +1 -0
  289. package/dist/avatar.js +464 -0
  290. package/dist/avatar.js.map +1 -0
  291. package/dist/body-class.js +57 -0
  292. package/dist/body-class.js.map +1 -0
  293. package/dist/breadcrumb.js +59 -0
  294. package/dist/breadcrumb.js.map +1 -0
  295. package/dist/calendar.js +1494 -0
  296. package/dist/calendar.js.map +1 -0
  297. package/dist/checkbox.js +81 -0
  298. package/dist/checkbox.js.map +1 -0
  299. package/dist/collapsible.js +255 -0
  300. package/dist/collapsible.js.map +1 -0
  301. package/dist/color-scheme.js +306 -0
  302. package/dist/color-scheme.js.map +1 -0
  303. package/dist/combobox.js +1413 -0
  304. package/dist/combobox.js.map +1 -0
  305. package/dist/command.js +1054 -0
  306. package/dist/command.js.map +1 -0
  307. package/dist/component-DqLt83fo.js +886 -0
  308. package/dist/component-DqLt83fo.js.map +1 -0
  309. package/dist/components-CWfg0cFs.js +1745 -0
  310. package/dist/components-CWfg0cFs.js.map +1 -0
  311. package/dist/components-DBWszEI3.js +1285 -0
  312. package/dist/components-DBWszEI3.js.map +1 -0
  313. package/dist/components-DI8Azu05.js +1542 -0
  314. package/dist/components-DI8Azu05.js.map +1 -0
  315. package/dist/components-F0Ini448.js +875 -0
  316. package/dist/components-F0Ini448.js.map +1 -0
  317. package/dist/context-menu.js +207 -0
  318. package/dist/context-menu.js.map +1 -0
  319. package/dist/controllable-state.js +134 -0
  320. package/dist/controllable-state.js.map +1 -0
  321. package/dist/delay-group-B1K03gBL.js +75 -0
  322. package/dist/delay-group-B1K03gBL.js.map +1 -0
  323. package/dist/dialog-3gfz_8NA.js +349 -0
  324. package/dist/dialog-3gfz_8NA.js.map +1 -0
  325. package/dist/dialog.js +57 -0
  326. package/dist/dialog.js.map +1 -0
  327. package/dist/direction.js +75 -0
  328. package/dist/direction.js.map +1 -0
  329. package/dist/dismiss.js +329 -0
  330. package/dist/dismiss.js.map +1 -0
  331. package/dist/dom-context.js +104 -0
  332. package/dist/dom-context.js.map +1 -0
  333. package/dist/drawer.js +1456 -0
  334. package/dist/drawer.js.map +1 -0
  335. package/dist/dropdown-menu.js +201 -0
  336. package/dist/dropdown-menu.js.map +1 -0
  337. package/dist/external-link.js +21 -0
  338. package/dist/external-link.js.map +1 -0
  339. package/dist/file-drop.js +183 -0
  340. package/dist/file-drop.js.map +1 -0
  341. package/dist/focus-scope.js +292 -0
  342. package/dist/focus-scope.js.map +1 -0
  343. package/dist/focus.js +311 -0
  344. package/dist/focus.js.map +1 -0
  345. package/dist/form-control-Ca_KHSKK.js +177 -0
  346. package/dist/form-control-Ca_KHSKK.js.map +1 -0
  347. package/dist/head.js +25 -0
  348. package/dist/head.js.map +1 -0
  349. package/dist/heading.js +152 -0
  350. package/dist/heading.js.map +1 -0
  351. package/dist/hero.js +36 -0
  352. package/dist/hero.js.map +1 -0
  353. package/dist/hide-others.js +108 -0
  354. package/dist/hide-others.js.map +1 -0
  355. package/dist/hover-card.js +246 -0
  356. package/dist/hover-card.js.map +1 -0
  357. package/dist/hover-intent-Bxb83fgX.js +92 -0
  358. package/dist/hover-intent-Bxb83fgX.js.map +1 -0
  359. package/dist/i18n.js +72 -0
  360. package/dist/i18n.js.map +1 -0
  361. package/dist/id.js +24 -0
  362. package/dist/id.js.map +1 -0
  363. package/dist/iframe.js +19 -0
  364. package/dist/iframe.js.map +1 -0
  365. package/dist/incremental-each.js +181 -0
  366. package/dist/incremental-each.js.map +1 -0
  367. package/dist/index.js +87 -0
  368. package/dist/index.js.map +1 -0
  369. package/dist/indicator-sYuRuFJA.js +26 -0
  370. package/dist/indicator-sYuRuFJA.js.map +1 -0
  371. package/dist/input-otp.js +611 -0
  372. package/dist/input-otp.js.map +1 -0
  373. package/dist/keys.js +65 -0
  374. package/dist/keys.js.map +1 -0
  375. package/dist/label.js +41 -0
  376. package/dist/label.js.map +1 -0
  377. package/dist/layer.js +157 -0
  378. package/dist/layer.js.map +1 -0
  379. package/dist/layout-styles-DY86so8a.js +81 -0
  380. package/dist/layout-styles-DY86so8a.js.map +1 -0
  381. package/dist/link-helper.js +122 -0
  382. package/dist/link-helper.js.map +1 -0
  383. package/dist/link.js +39 -0
  384. package/dist/link.js.map +1 -0
  385. package/dist/load.js +54 -0
  386. package/dist/load.js.map +1 -0
  387. package/dist/menu-Da1LFCet.js +1109 -0
  388. package/dist/menu-Da1LFCet.js.map +1 -0
  389. package/dist/menubar.js +357 -0
  390. package/dist/menubar.js.map +1 -0
  391. package/dist/message-scroller.js +2 -0
  392. package/dist/message-scroller.js.map +1 -0
  393. package/dist/messages.js +168 -0
  394. package/dist/messages.js.map +1 -0
  395. package/dist/narrowing.js +29 -0
  396. package/dist/narrowing.js.map +1 -0
  397. package/dist/native-form.js +134 -0
  398. package/dist/native-form.js.map +1 -0
  399. package/dist/native-value.js +125 -0
  400. package/dist/native-value.js.map +1 -0
  401. package/dist/navigation-menu.js +872 -0
  402. package/dist/navigation-menu.js.map +1 -0
  403. package/dist/observers-aItWe029.js +113 -0
  404. package/dist/observers-aItWe029.js.map +1 -0
  405. package/dist/on-resize.js +47 -0
  406. package/dist/on-resize.js.map +1 -0
  407. package/dist/part.js +291 -0
  408. package/dist/part.js.map +1 -0
  409. package/dist/popover.js +419 -0
  410. package/dist/popover.js.map +1 -0
  411. package/dist/popper-BbTzV8dP.js +323 -0
  412. package/dist/popper-BbTzV8dP.js.map +1 -0
  413. package/dist/portal-U554WDI9.js +214 -0
  414. package/dist/portal-U554WDI9.js.map +1 -0
  415. package/dist/portal.js +2 -0
  416. package/dist/portal.js.map +1 -0
  417. package/dist/presence.js +243 -0
  418. package/dist/presence.js.map +1 -0
  419. package/dist/progress.js +106 -0
  420. package/dist/progress.js.map +1 -0
  421. package/dist/promise-state-BMi2zVoT.js +91 -0
  422. package/dist/promise-state-BMi2zVoT.js.map +1 -0
  423. package/dist/proper-links.js +136 -0
  424. package/dist/proper-links.js.map +1 -0
  425. package/dist/qp.js +77 -0
  426. package/dist/qp.js.map +1 -0
  427. package/dist/questionnaire.js +2 -0
  428. package/dist/questionnaire.js.map +1 -0
  429. package/dist/radio-group.js +149 -0
  430. package/dist/radio-group.js.map +1 -0
  431. package/dist/rating.js +261 -0
  432. package/dist/rating.js.map +1 -0
  433. package/dist/resizable.js +2 -0
  434. package/dist/resizable.js.map +1 -0
  435. package/dist/resize-observer.js +85 -0
  436. package/dist/resize-observer.js.map +1 -0
  437. package/dist/roving-focus.js +355 -0
  438. package/dist/roving-focus.js.map +1 -0
  439. package/dist/scroll-area.js +2 -0
  440. package/dist/scroll-area.js.map +1 -0
  441. package/dist/scroll-end-Cer8JSIB.js +87 -0
  442. package/dist/scroll-end-Cer8JSIB.js.map +1 -0
  443. package/dist/scroll-lock.js +267 -0
  444. package/dist/scroll-lock.js.map +1 -0
  445. package/dist/scroller.js +117 -0
  446. package/dist/scroller.js.map +1 -0
  447. package/dist/select.js +1223 -0
  448. package/dist/select.js.map +1 -0
  449. package/dist/separator.js +80 -0
  450. package/dist/separator.js.map +1 -0
  451. package/dist/service.js +160 -0
  452. package/dist/service.js.map +1 -0
  453. package/dist/shadowed.js +70 -0
  454. package/dist/shadowed.js.map +1 -0
  455. package/dist/slider.js +586 -0
  456. package/dist/slider.js.map +1 -0
  457. package/dist/sticky-footer.js +40 -0
  458. package/dist/sticky-footer.js.map +1 -0
  459. package/dist/store-BjiAd-KP.js +93 -0
  460. package/dist/store-BjiAd-KP.js.map +1 -0
  461. package/dist/store.js +4 -0
  462. package/dist/store.js.map +1 -0
  463. package/dist/switch.js +58 -0
  464. package/dist/switch.js.map +1 -0
  465. package/dist/tabs.js +458 -0
  466. package/dist/tabs.js.map +1 -0
  467. package/dist/toast.js +2 -0
  468. package/dist/toast.js.map +1 -0
  469. package/dist/toaster-DwprFZ1J.js +1518 -0
  470. package/dist/toaster-DwprFZ1J.js.map +1 -0
  471. package/dist/toggle-group.js +221 -0
  472. package/dist/toggle-group.js.map +1 -0
  473. package/dist/toggle.js +78 -0
  474. package/dist/toggle.js.map +1 -0
  475. package/dist/tooltip.js +422 -0
  476. package/dist/tooltip.js.map +1 -0
  477. package/dist/typeahead.js +233 -0
  478. package/dist/typeahead.js.map +1 -0
  479. package/dist/viewport.js +138 -0
  480. package/dist/viewport.js.map +1 -0
  481. package/dist/visually-hidden.js +49 -0
  482. package/dist/visually-hidden.js.map +1 -0
  483. package/dist/zoetrope.js +336 -0
  484. package/dist/zoetrope.js.map +1 -0
  485. package/package.json +101 -3
@@ -0,0 +1,214 @@
1
+ import Component from '@glimmer/component';
2
+ import type { TOC } from '@ember/component/template-only';
3
+ import type { ComponentLike, WithBoundArgs } from '@glint/template';
4
+ import { ControllableState } from './controllable-state.ts';
5
+ /** What a component given as a rating's `@icon` receives, for each item. */
6
+ export interface RatingIconSignature {
7
+ Element: HTMLElement;
8
+ Args: {
9
+ /** Whether the rating reaches this item. */
10
+ isSelected: boolean;
11
+ /** The item's value: 1, 2, 3… (or 0.5, 1, 1.5… with `@step={{0.5}}`). */
12
+ value: number;
13
+ /** How much of the item the rating fills, from 0 to 100. */
14
+ percentSelected: number;
15
+ /** Whether the rating can't be changed. */
16
+ readonly: boolean;
17
+ };
18
+ }
19
+ /** An item's icon: a string (default `★`), or a component that draws it. */
20
+ export type RatingIcon = string | ComponentLike<RatingIconSignature>;
21
+ /** What a rating's `<:label>` block, and its summary, are given. */
22
+ export interface RatingSummary {
23
+ /** The current rating. */
24
+ value: number;
25
+ /** How many items it has. */
26
+ total: number;
27
+ }
28
+ /** The value each item stands for: `step`, `2 × step`… up to `max`. */
29
+ export declare function ratingValues(max: number, step: number): number[];
30
+ /** How much of the item that stands for `item` a rating of `value` fills, from 0 to 100. */
31
+ export declare function ratingPercent(item: number, value: number, step: number): number;
32
+ /** The English default for an item's name: `1 star`, `2 stars`, `2.5 stars`. */
33
+ export declare function defaultRatingItemLabel(value: number): string;
34
+ /** The English default for a display-only rating's summary: `Rated 3 out of 5`. */
35
+ export declare function defaultRatingSummary({ value, total }: RatingSummary): string;
36
+ interface RatingItemSignature {
37
+ Args: {
38
+ /** The value choosing this item sets the rating to. */
39
+ value: number;
40
+ /** @internal Bound by the rating. */
41
+ rating: Rating;
42
+ };
43
+ Blocks: {
44
+ /** What the item shows, hidden from assistive technology: its icon. */
45
+ default: [item: {
46
+ isSelected: boolean;
47
+ percentSelected: number;
48
+ value: number;
49
+ }];
50
+ };
51
+ Element: HTMLSpanElement;
52
+ }
53
+ /**
54
+ * One item of a rating, yielded as `rating.Item`: a `<span>` holding a `<label>` (its name for
55
+ * assistive technology, and what the block draws) and the native radio it labels.
56
+ */
57
+ declare class RatingItem extends Component<RatingItemSignature> {
58
+ get id(): string;
59
+ get isSelected(): boolean;
60
+ get isChecked(): boolean;
61
+ get percentSelected(): number;
62
+ get label(): string;
63
+ }
64
+ interface RatingStarsSignature {
65
+ Args: {
66
+ /** What each item shows. Default: the rating's `@icon`. */
67
+ icon?: RatingIcon;
68
+ /** @internal Bound by the rating. */
69
+ rating: Rating;
70
+ };
71
+ Element: HTMLDivElement;
72
+ }
73
+ /** Every item of a rating, each with its icon, in a `<div>`: yielded as `rating.Stars`. */
74
+ declare class RatingStars extends Component<RatingStarsSignature> {
75
+ get icon(): RatingIcon;
76
+ /** The icon, when it is a string. */
77
+ get text(): string | undefined;
78
+ /** The icon, when it is a component. */
79
+ get Icon(): ComponentLike<RatingIconSignature> | undefined;
80
+ }
81
+ interface RatingRangeSignature {
82
+ Args: {
83
+ /** @internal Bound by the rating. */
84
+ rating: Rating;
85
+ };
86
+ Element: HTMLInputElement;
87
+ }
88
+ /**
89
+ * A range input for the same rating, yielded as `rating.Range`: the way to pick a value
90
+ * between the items' (a `step` of its own, such as `0.25`). Name it with `aria-label`.
91
+ */
92
+ declare const RatingRange: TOC<RatingRangeSignature>;
93
+ export interface RatingSignature {
94
+ Args: {
95
+ /** The controlled rating. `0` is none. */
96
+ value?: number;
97
+ /** The first rating, when uncontrolled. Default `0`. */
98
+ defaultValue?: number;
99
+ /**
100
+ * Called with each rating the user picks: the item's value, or `0` when they pick the
101
+ * one already picked, which clears it.
102
+ */
103
+ onValueChange?: (value: number) => void;
104
+ /** The highest rating. Default `5`. */
105
+ max?: number;
106
+ /**
107
+ * What each item adds to the rating. Default `1`; `0.5` makes an item of each half, for
108
+ * half ratings.
109
+ */
110
+ step?: number;
111
+ /** Whether the rating shows but can't be changed (`aria-readonly`). */
112
+ readonly?: boolean;
113
+ /**
114
+ * Whether it is a control at all. Default `true`. With `false` it only shows `@value`,
115
+ * which it summarises for assistive technology: "Rated 3 out of 5".
116
+ */
117
+ interactive?: boolean;
118
+ /** Whether it is disabled: a `<fieldset disabled>`, which disables every item. */
119
+ disabled?: boolean;
120
+ /** What each item shows: a string (default `★`), or a component given `RatingIconSignature`. */
121
+ icon?: RatingIcon;
122
+ /** Each item's name for assistive technology. Default `1 star`, `2 stars`… */
123
+ itemLabel?: (value: number) => string;
124
+ /** What a display-only rating says. Default `Rated 3 out of 5`. */
125
+ summary?: (state: RatingSummary) => string;
126
+ /** The form field the rating submits as, in a form: the radios' `name`. Default: one of its own. */
127
+ formName?: string;
128
+ /** Its name, for `RatingHarness` (`data-test-jn-name`). Its form field is `@formName`. */
129
+ name?: string;
130
+ };
131
+ Blocks: {
132
+ /**
133
+ * Lay it out yourself. Without a block, it renders its `<:label>` (as a `<legend>`), or its
134
+ * summary, then its items.
135
+ */
136
+ default: [
137
+ rating: {
138
+ /** The current rating. */
139
+ value: number;
140
+ /** The highest rating. */
141
+ max: number;
142
+ /** How many items it has. */
143
+ total: number;
144
+ /** Each item's value. */
145
+ values: number[];
146
+ /** The radios' `name`. */
147
+ name: string;
148
+ /** Whether it can't be changed: `@readonly`, or not `@interactive`. */
149
+ isReadonly: boolean;
150
+ /** Whether it can be changed. */
151
+ isChangeable: boolean;
152
+ /** Whether it is display-only, so it should say its rating for assistive technology. */
153
+ needsSummary: boolean;
154
+ /** Its summary, as `@summary` words it. */
155
+ summary: string;
156
+ /** Every item with its icon: `<rating.Stars @icon={{MyStar}} />`. */
157
+ Stars: WithBoundArgs<typeof RatingStars, 'rating'>;
158
+ /** One item: `<rating.Item @value={{2}} as |item|>…</rating.Item>`. */
159
+ Item: WithBoundArgs<typeof RatingItem, 'rating'>;
160
+ /** A range input for finer values: `<rating.Range step="0.25" aria-label="Rating" />`. */
161
+ Range: WithBoundArgs<typeof RatingRange, 'rating'>;
162
+ }
163
+ ];
164
+ /** Its label: a `<legend>` that names the group, or, display-only, its visible summary. */
165
+ label: [state: RatingSummary];
166
+ };
167
+ /** A `<fieldset role="radiogroup">`: the items are native radios. */
168
+ Element: HTMLFieldSetElement;
169
+ }
170
+ /**
171
+ * A rating, such as stars out of five: ember-primitives' Rating, headless. It is a
172
+ * `<fieldset role="radiogroup">` of native radios, one per item, so the keyboard works as in any
173
+ * radio group: Tab reaches it, the arrow keys move and pick, and Space picks. Picking the item
174
+ * already picked clears the rating. `@step={{0.5}}` gives an item to each half, for half
175
+ * ratings. Its value is controlled or not, as Radix's are:
176
+ *
177
+ * <Rating @defaultValue={{3}} @onValueChange={{this.rate}}>
178
+ * <:label>Rate this recipe</:label>
179
+ * </Rating>
180
+ *
181
+ * It has no styles: style it through its data attributes (`data-selected` on each item), or use
182
+ * `@ember-joinery/ember`'s Rating.
183
+ */
184
+ export declare class Rating extends Component<RatingSignature> {
185
+ #private;
186
+ selection: ControllableState<number>;
187
+ get value(): number;
188
+ get step(): number;
189
+ get max(): number;
190
+ get values(): number[];
191
+ get total(): number;
192
+ get name(): string;
193
+ get icon(): RatingIcon;
194
+ get isInteractive(): boolean;
195
+ get isChangeable(): boolean;
196
+ get isReadonly(): boolean;
197
+ get needsSummary(): boolean;
198
+ get state(): RatingSummary;
199
+ get summary(): string;
200
+ /** @internal Picks `value`, or clears the rating when it is the one already picked. */
201
+ pick(value: number): void;
202
+ /** @internal Reads a picked value, ignoring what isn't a number. */
203
+ pickFrom(text: string): void;
204
+ /**
205
+ * One listener on the group hears every radio's click (keyboard picks fire one too). A click
206
+ * on another input inside it, such as `rating.Range`, is left alone. Readonly, the click is
207
+ * cancelled, which puts the browser's checked radio back.
208
+ */
209
+ handleClick: (event: Event) => void;
210
+ /** The range input's change: range inputs fire no click from the keyboard. */
211
+ handleChange: (event: Event) => void;
212
+ }
213
+ export default Rating;
214
+ //# sourceMappingURL=rating.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rating.d.ts","sourceRoot":"","sources":["../src/rating.gts"],"names":[],"mappings":"AA2dA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAA;AAIzD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAO3D,4EAA4E;AAC5E,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAA;IACpB,IAAI,EAAE;QACJ,4CAA4C;QAC5C,UAAU,EAAE,OAAO,CAAA;QACnB,yEAAyE;QACzE,KAAK,EAAE,MAAM,CAAA;QACb,4DAA4D;QAC5D,eAAe,EAAE,MAAM,CAAA;QACvB,2CAA2C;QAC3C,QAAQ,EAAE,OAAO,CAAA;KAClB,CAAA;CACF;AAED,4EAA4E;AAC5E,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,aAAa,CAAC,mBAAmB,CAAC,CAAA;AAEpE,oEAAoE;AACpE,MAAM,WAAW,aAAa;IAC5B,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;CACd;AAOD,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,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ED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,IAAI,KAAK,IAAI,aAAa,CAEzB;IAED,IAAI,OAAO,IAAI,MAAM,CAIpB;IAED,uFAAuF;IACvF,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKzB,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAkB5B;;;;OAIG;IACH,WAAW,GAAI,OAAO,KAAK,KAAG,IAAI,CAUjC;IAED,8EAA8E;IAC9E,YAAY,GAAI,OAAO,KAAK,KAAG,IAAI,CAOlC;CAgGF;AAED,eAAe,MAAM,CAAA"}
@@ -0,0 +1,107 @@
1
+ import Component from '@glimmer/component';
2
+ import type { TOC } from '@ember/component/template-only';
3
+ import { type TagName } from '../as';
4
+ import type { Direction } from '../direction';
5
+ import { ResizableGroup, ResizablePanelApi, type ResizableHandleOptions, type ResizableLayoutMap, type ResizableLayoutMeta, type ResizableOrientation, type ResizablePanelOptions, type ResizablePanelSize } from './state.ts';
6
+ import type { PanelSize } from './layout.ts';
7
+ export interface ResizablePanelSignature {
8
+ Args: Omit<ResizablePanelOptions, 'api'> & {
9
+ /** The tag to render. Default `div`. */
10
+ as?: TagName;
11
+ };
12
+ Blocks: {
13
+ /** The content, given the panel's size and API (`panel.size`, `panel.collapse()`). */
14
+ default: [panel: ResizablePanelApi];
15
+ };
16
+ Element: HTMLElement;
17
+ }
18
+ /**
19
+ * A panel of a `<Resizable>` group (react-resizable-panels' `Panel`): give it its sizes in
20
+ * percent (`@defaultSize="30%"`) or with a unit (`"200px"`, `"10rem"`). It must be a child of
21
+ * the group's element, and it finds its group there. It yields its size and its API:
22
+ *
23
+ * <ResizablePanel @defaultSize="25%" @collapsible={{true}} @minSize="15%" as |panel|>
24
+ * <button type="button" {{on "click" panel.collapse}}>Hide</button>
25
+ * </ResizablePanel>
26
+ */
27
+ export declare class ResizablePanel extends Component<ResizablePanelSignature> {
28
+ api: ResizablePanelApi;
29
+ }
30
+ export interface ResizableHandleSignature {
31
+ Args: ResizableHandleOptions & {
32
+ /** The tag to render. Default `div`. */
33
+ as?: TagName;
34
+ };
35
+ Blocks: {
36
+ default: [];
37
+ };
38
+ Element: HTMLElement;
39
+ }
40
+ /**
41
+ * The handle between two panels of a `<Resizable>` group (react-resizable-panels'
42
+ * `Separator`): a `role="separator"` that a pointer drags and the arrow keys move, as in APG's
43
+ * window splitter. It resizes the panels either side of it. Name it for what it resizes
44
+ * (`aria-label="Resize the sidebar"`).
45
+ */
46
+ export declare const ResizableHandle: TOC<ResizableHandleSignature>;
47
+ /** What `<Resizable>` yields. */
48
+ export interface ResizableYield {
49
+ /** A panel: `<r.Panel @defaultSize="30%">`, the same as `<ResizablePanel>`. */
50
+ Panel: typeof ResizablePanel;
51
+ /** A handle: `<r.Handle />`, the same as `<ResizableHandle>`. */
52
+ Handle: typeof ResizableHandle;
53
+ /** A panel, as a modifier on your own element: `<section {{r.panel defaultSize="30%"}}>`. */
54
+ panel: ResizableGroup['panel'];
55
+ /** A handle, as a modifier on your own element: `<div {{r.handle}}>`. */
56
+ handle: ResizableGroup['handle'];
57
+ /** The panels' sizes in percent, in order. */
58
+ layout: readonly number[];
59
+ /** The sizes by panel id. */
60
+ getLayout: () => ResizableLayoutMap;
61
+ /** Sets the sizes, in order or by panel id; constraints still apply. */
62
+ setLayout: (layout: readonly number[] | ResizableLayoutMap) => ResizableLayoutMap;
63
+ }
64
+ export interface ResizableSignature {
65
+ Args: {
66
+ /** Panels side by side (`horizontal`, the default) or stacked (`vertical`). */
67
+ orientation?: ResizableOrientation;
68
+ /** The text direction; by default the document's, from the nearest `dir`. */
69
+ dir?: Direction;
70
+ /** Whether nothing in the group can be resized. */
71
+ disabled?: boolean;
72
+ /** Whether to leave the cursor alone, instead of showing a resize cursor. */
73
+ disableCursor?: boolean;
74
+ /** The first sizes in percent: one per panel in order, or by panel `@id`. For a saved layout. */
75
+ defaultLayout?: readonly number[] | ResizableLayoutMap;
76
+ /** Called while the layout changes (on every pointer move), with the sizes in order and by id. */
77
+ onLayoutChange?: (sizes: number[], layout: ResizableLayoutMap) => void;
78
+ /** Called once a change is over (the pointer released), with the sizes as above. To save them. */
79
+ onLayoutChanged?: (sizes: number[], layout: ResizableLayoutMap, meta: ResizableLayoutMeta) => void;
80
+ /** The tag to render. Default `div`. */
81
+ as?: TagName;
82
+ /** Its name, for `ResizableHarness` (`data-test-jn-name`). */
83
+ name?: string;
84
+ };
85
+ Blocks: {
86
+ default: [group: ResizableYield];
87
+ };
88
+ Element: HTMLElement;
89
+ }
90
+ /**
91
+ * A group of resizable panels with handles between them, as react-resizable-panels' `Group`
92
+ * and ember-primitives' `Resizable`. Panels and handles are its children; a panel can hold
93
+ * another group, for a nested layout.
94
+ *
95
+ * <Resizable @orientation="horizontal" as |r|>
96
+ * <r.Panel @defaultSize="25%" @minSize="15%">Sidebar</r.Panel>
97
+ * <r.Handle aria-label="Resize the sidebar" />
98
+ * <r.Panel>Content</r.Panel>
99
+ * </Resizable>
100
+ *
101
+ * `ResizablePanel` and `ResizableHandle` are the same components, to import on their own.
102
+ */
103
+ export declare class Resizable extends Component<ResizableSignature> {
104
+ group: ResizableGroup;
105
+ }
106
+ export type { PanelSize, ResizablePanelSize };
107
+ //# sourceMappingURL=components.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../../src/resizable/components.gts"],"names":[],"mappings":"AA2NA,OAAO,SAAS,MAAM,oBAAoB,CAAA;AAC1C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAA;AAGzD,OAAO,EAAM,KAAK,OAAO,EAAE,MAAM,WAAW,CAAA;AAC5C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK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AAA;IACnC,wEAAwE;IACxE,SAAS,EAAE,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,kBAAkB,KAAK,kBAAkB,CAAA;CAClF;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE;QACJ,+EAA+E;QAC/E,WAAW,CAAC,EAAE,oBAAoB,CAAA;QAClC,6EAA6E;QAC7E,GAAG,CAAC,EAAE,SAAS,CAAA;QACf,mDAAmD;QACnD,QAAQ,CAAC,EAAE,OAAO,CAAA;QAClB,6EAA6E;QAC7E,aAAa,CAAC,EAAE,OAAO,CAAA;QACvB,iGAAiG;QACjG,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,kBAAkB,CAAA;QACtD,kGAAkG;QAClG,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;QACtE,kGAAkG;QAClG,eAAe,CAAC,EAAE,CAChB,KAAK,EAAE,MAAM,EAAE,EACf,MAAM,EAAE,kBAAkB,EAC1B,IAAI,EAAE,mBAAmB,KACtB,IAAI,CAAA;QACT,wCAAwC;QACxC,EAAE,CAAC,EAAE,OAAO,CAAA;QACZ,8DAA8D;QAC9D,IAAI,CAAC,EAAE,MAAM,CAAA;KACd,CAAA;IACD,MAAM,EAAE;QAAE,OAAO,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,CAAA;KAAE,CAAA;IAC5C,OAAO,EAAE,WAAW,CAAA;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,qBAAa,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAC1D,KAAK,iBAQH;CA6CH;AAED,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { Resizable, ResizableHandle, ResizablePanel, type ResizableHandleSignature, type ResizablePanelSignature, type ResizableSignature, type ResizableYield, } from './components';
2
+ export { ResizableGroup, ResizablePanelApi, type ResizableGroupOptions, type ResizableHandleOptions, type ResizableHandleState, type ResizableLayoutMap, type ResizableLayoutMeta, type ResizableOrientation, type ResizablePanelOptions, type ResizablePanelSize, } from './state.ts';
3
+ export { adjustLayout, constrain, defaultLayout, parseSize, toPercent, validateLayout, type AdjustOptions, type PanelConstraints, type PanelSize, type ResizeTrigger, type SizeUnit, } from './layout.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resizable/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,SAAS,EACT,eAAe,EACf,cAAc,EACd,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,SAAS,EACT,SAAS,EACT,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,QAAQ,GACd,MAAM,aAAa,CAAA"}
@@ -0,0 +1,93 @@
1
+ /** A size as a panel's arguments give it: a number of pixels, or a string with a unit. */
2
+ export type PanelSize = number | string;
3
+ /** The units a size can be in. A string without a unit is a percentage. */
4
+ export type SizeUnit = '%' | 'px' | 'rem' | 'em' | 'vh' | 'vw';
5
+ /** One panel's constraints, in percent of the group. */
6
+ export interface PanelConstraints {
7
+ /** Default 0. */
8
+ minSize: number;
9
+ /** Default 100. */
10
+ maxSize: number;
11
+ /** Whether it can collapse to `collapsedSize`. */
12
+ collapsible: boolean;
13
+ /** Its size when collapsed. Default 0. */
14
+ collapsedSize: number;
15
+ /** How far past `minSize` (or `collapsedSize`) it must go to collapse (or expand). */
16
+ collapsedThreshold?: number;
17
+ /** Its first size, if it asks for one. */
18
+ defaultSize?: number;
19
+ /** A disabled panel isn't resized, by its own handles or by another's. */
20
+ disabled: boolean;
21
+ }
22
+ /** What caused a change: it decides how collapsible panels snap. */
23
+ export type ResizeTrigger = 'keyboard' | 'pointer' | 'imperative';
24
+ /** Sizes are rounded to three decimals, as react-resizable-panels' are, so float dust is equal. */
25
+ export declare function round(value: number): number;
26
+ /** Whether two sizes are the same, within `tolerance` after rounding. */
27
+ export declare function same(a: number, b: number, tolerance?: number): boolean;
28
+ /** -1, 0 or 1, comparing two sizes as `same()` does. */
29
+ export declare function compare(a: number, b: number): -1 | 0 | 1;
30
+ /** Whether two layouts have the same sizes. */
31
+ export declare function sameLayout(a: readonly number[], b: readonly number[]): boolean;
32
+ /**
33
+ * A size argument's number and unit: a number is pixels, and a string is a percentage unless it
34
+ * ends in `%`, `px`, `rem`, `em`, `vh` or `vw`.
35
+ */
36
+ export declare function parseSize(size: PanelSize): [value: number, unit: SizeUnit];
37
+ /**
38
+ * A size in pixels: a percentage of `axisSize`, or pixels, `em` (the element's font size),
39
+ * `rem` (the root's), `vh` or `vw`.
40
+ */
41
+ export declare function toPixels(size: PanelSize, axisSize: number, element: Element): number;
42
+ /** A size in percent of `axisSize`, rounded. A percentage needs no `axisSize`. */
43
+ export declare function toPercent(size: PanelSize, axisSize: number, element: Element): number;
44
+ /** Whether a size depends on the group's size: anything but a percentage. */
45
+ export declare function isAbsolute(size: PanelSize | undefined): boolean;
46
+ /**
47
+ * The size a panel can take when asked for `size`: its minimum, or its collapsed size past the
48
+ * threshold, when below the minimum, and no more than its maximum. A disabled panel keeps
49
+ * `previous` unless `override` (an imperative resize, or validating a layout).
50
+ */
51
+ export declare function constrain(constraints: PanelConstraints, previous: number, size: number, override?: boolean): number;
52
+ /**
53
+ * The first layout: each panel's `defaultSize`, and the space left shared equally by the panels
54
+ * that don't ask for one. Not yet validated.
55
+ */
56
+ export declare function defaultLayout(constraints: readonly PanelConstraints[]): number[];
57
+ /**
58
+ * A layout every panel's constraints accept, adding up to 100: scaled to 100 first, then each
59
+ * size constrained, and what that leaves over (or short) given to the first panels that can
60
+ * take it.
61
+ */
62
+ export declare function validateLayout(layout: readonly number[], constraints: readonly PanelConstraints[]): number[];
63
+ export interface AdjustOptions {
64
+ /** How far to move the boundary, in percent: positive grows the panels before it. */
65
+ delta: number;
66
+ /** The layout when the move started (the drag's first, or the current). */
67
+ initial: readonly number[];
68
+ /** The layout now, returned unchanged when the move can't happen. */
69
+ previous: readonly number[];
70
+ constraints: readonly PanelConstraints[];
71
+ /** The panels either side of the boundary: `[before, after]`, as indices. */
72
+ pivot: readonly [number, number];
73
+ trigger: ResizeTrigger;
74
+ }
75
+ /**
76
+ * Moves the boundary between two panels by `delta` percent, as react-resizable-panels'
77
+ * `adjustLayoutByDelta` does: the panel on the growing side grows, and the panels on the
78
+ * shrinking side give up the space, the nearest first, each down to its minimum (or collapsed,
79
+ * past its threshold). Constraints bound the move on both sides, so a drag past a limit stops
80
+ * there. Returns `previous` when nothing can change.
81
+ */
82
+ export declare function adjustLayout({ delta, initial, previous, constraints, pivot: [before, after], trigger, }: AdjustOptions): readonly number[];
83
+ /**
84
+ * The ARIA values of the handle after panel `index`: the panel's size now, and the smallest
85
+ * and largest it can reach by moving that handle (collapsed, or its minimum, to its maximum),
86
+ * given its neighbours' constraints.
87
+ */
88
+ export declare function handleRange(layout: readonly number[], constraints: readonly PanelConstraints[], index: number): {
89
+ now: number;
90
+ min: number;
91
+ max: number;
92
+ };
93
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../src/resizable/layout.ts"],"names":[],"mappings":"AAKA,0FAA0F;AAC1F,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAA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W,CACzB,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,WAAW,EAAE,SAAS,gBAAgB,EAAE,EACxC,KAAK,EAAE,MAAM,GACZ;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAqB3C"}
@@ -0,0 +1,211 @@
1
+ import Modifier from 'ember-modifier';
2
+ import { type Direction } from '../direction';
3
+ import { type PanelSize } from './layout.ts';
4
+ /** Which way the panels run: side by side (`horizontal`), or stacked (`vertical`). */
5
+ export type ResizableOrientation = 'horizontal' | 'vertical';
6
+ /** A layout by panel id, as react-resizable-panels' `Layout` is: `{ sidebar: 25, main: 75 }`. */
7
+ export type ResizableLayoutMap = Record<string, number>;
8
+ /** A panel's size: in percent of the group, and in pixels. */
9
+ export interface ResizablePanelSize {
10
+ asPercentage: number;
11
+ inPixels: number;
12
+ }
13
+ /** What `@onLayoutChanged` is told about a change. */
14
+ export interface ResizableLayoutMeta {
15
+ /** Whether a pointer or a key made it, rather than the first layout or a call. */
16
+ isUserInteraction: boolean;
17
+ }
18
+ /** What a resizable group takes. Each is a function, so the group reads it live. */
19
+ export interface ResizableGroupOptions {
20
+ /** Default `horizontal`. */
21
+ orientation?: () => ResizableOrientation | undefined;
22
+ /** The text direction, when the document's shouldn't decide. */
23
+ dir?: () => Direction | undefined;
24
+ /** Whether nothing in the group can be resized. */
25
+ disabled?: () => boolean | undefined;
26
+ /** Whether to leave the cursor alone (no resize cursor over a handle, or while dragging). */
27
+ disableCursor?: () => boolean | undefined;
28
+ /** The first layout, in percent: one size per panel in order, or sizes by panel `@id`. */
29
+ defaultLayout?: () => readonly number[] | ResizableLayoutMap | undefined;
30
+ /** Called while the layout changes (on every pointer move), with the sizes in order and by id. */
31
+ onLayoutChange?: () => ((sizes: number[], layout: ResizableLayoutMap) => void) | undefined;
32
+ /** Called once a change is over (when the pointer is released), with the sizes as above. */
33
+ onLayoutChanged?: () => ((sizes: number[], layout: ResizableLayoutMap, meta: ResizableLayoutMeta) => void) | undefined;
34
+ }
35
+ /** What a panel takes, as `<ResizablePanel>` or the `panel` modifier. */
36
+ export interface ResizablePanelOptions {
37
+ /** Its id: the key of its size in a layout, and its element's `id`. Default: one made for it. */
38
+ id?: string;
39
+ /**
40
+ * Its first size. A string is a percentage (`"50%"`, or `"50"`) unless it has a unit (`"200px"`,
41
+ * `"10rem"`, `"2em"`, `"50vh"`, `"50vw"`); a number is pixels. Without one, the panels that
42
+ * don't ask for a size share what is left.
43
+ */
44
+ defaultSize?: PanelSize;
45
+ /** The smallest it can be, as `defaultSize`. Default `0%`. */
46
+ minSize?: PanelSize;
47
+ /** The largest it can be, as `defaultSize`. Default `100%`. */
48
+ maxSize?: PanelSize;
49
+ /** Whether it collapses when resized below its minimum. */
50
+ collapsible?: boolean;
51
+ /** Its size when collapsed, as `defaultSize`. Default `0%`. */
52
+ collapsedSize?: PanelSize;
53
+ /**
54
+ * How far past its minimum it must go to collapse, or past its collapsed size to expand.
55
+ * Default: half the distance between the two.
56
+ */
57
+ collapsedThreshold?: PanelSize;
58
+ /** Whether it can't be resized, by its own handles or by another panel's. */
59
+ disabled?: boolean;
60
+ /**
61
+ * When the group changes size: keep its share (`preserve-relative-size`, the default) or its
62
+ * size in pixels (`preserve-pixel-size`). A group needs at least one panel that keeps its share.
63
+ */
64
+ groupResizeBehavior?: 'preserve-relative-size' | 'preserve-pixel-size';
65
+ /** Called when its size changes, with the size before (none the first time). */
66
+ onResize?: (size: ResizablePanelSize, id: string, previous: ResizablePanelSize | undefined) => void;
67
+ /** @internal The panel's API to bind, from `<ResizablePanel>`. */
68
+ api?: ResizablePanelApi;
69
+ }
70
+ /** What a handle takes, as `<ResizableHandle>` or the `handle` modifier. */
71
+ export interface ResizableHandleOptions {
72
+ /** Whether it can't be moved. Its panels can still change size through other handles. */
73
+ disabled?: boolean;
74
+ /** Whether double-clicking it leaves its panel's size alone, instead of restoring its default. */
75
+ disableDoubleClick?: boolean;
76
+ }
77
+ /** A handle's state, as `data-separator` (react-resizable-panels' attribute) shows it. */
78
+ export type ResizableHandleState = 'inactive' | 'hover' | 'focus' | 'active' | 'disabled';
79
+ interface PanelMember {
80
+ readonly kind: 'panel';
81
+ readonly element: HTMLElement;
82
+ options: ResizablePanelOptions;
83
+ /** The size it had before it last collapsed, to expand back to. */
84
+ expandedSize?: number;
85
+ /** The size `onResize` was last told. */
86
+ reported?: ResizablePanelSize;
87
+ }
88
+ interface HandleMember {
89
+ readonly kind: 'handle';
90
+ readonly element: HTMLElement;
91
+ options: ResizableHandleOptions;
92
+ hovered: boolean;
93
+ focused: boolean;
94
+ /** Stops its listeners, once it listens. */
95
+ unlisten?: () => void;
96
+ }
97
+ type Member = PanelMember | HandleMember;
98
+ /**
99
+ * The engine of a resizable group, as react-resizable-panels' `Group` (and ember-primitives'
100
+ * `Resizable`): panels side by side or stacked, sized in percent of the space they share, with
101
+ * a handle between each two that a pointer drags and the keyboard moves, as in APG's window
102
+ * splitter pattern.
103
+ *
104
+ * A component makes one and puts its modifiers on its elements: `group` on the group's,
105
+ * `panel` on each panel's and `handle` on each handle's. Panels and handles are the group
106
+ * element's children, in order: the handle between two panels resizes them. The group writes
107
+ * the panels' sizes into their style (`flex-grow`, so the handles keep their own size), and the
108
+ * handles' ARIA (`aria-valuenow` is the size of the panel before it, which it `aria-controls`).
109
+ *
110
+ * class Layout extends Component {
111
+ * group = new ResizableGroup({ orientation: () => this.args.orientation })
112
+ * <template>
113
+ * <div {{this.group.group}}>
114
+ * <div {{this.group.panel defaultSize="30%" minSize="20%"}}>…</div>
115
+ * <div {{this.group.handle}} aria-label="Resize the sidebar"></div>
116
+ * <div {{this.group.panel}}>…</div>
117
+ * </div>
118
+ * </template>
119
+ * }
120
+ */
121
+ export declare class ResizableGroup {
122
+ #private;
123
+ /** The sizes, in order, as last laid out. */
124
+ private snapshot;
125
+ constructor(options?: ResizableGroupOptions);
126
+ /** `horizontal` or `vertical`. */
127
+ get orientation(): ResizableOrientation;
128
+ /** Whether the group can't be resized. */
129
+ get disabled(): boolean;
130
+ /** The panels' sizes in percent, in order. Tracked. */
131
+ get layout(): readonly number[];
132
+ /** The panels' sizes by id, as react-resizable-panels' `getLayout()`. */
133
+ getLayout: () => ResizableLayoutMap;
134
+ /**
135
+ * Sets the sizes (in percent): one per panel in order, or by panel id. Constraints still
136
+ * apply, so the layout may differ; it returns the layout it set.
137
+ */
138
+ setLayout: (layout: readonly number[] | ResizableLayoutMap) => ResizableLayoutMap;
139
+ /** The size of `panel` in percent, or `undefined` before the group lays it out. Tracked. */
140
+ sizeOf(panel: PanelMember): number | undefined;
141
+ /** The group's element. Takes the arguments it reacts to, so it updates when they change. */
142
+ group: typeof Modifier<{
143
+ Element: HTMLElement;
144
+ Args: {
145
+ Named: {
146
+ orientation?: ResizableOrientation;
147
+ disabled?: boolean;
148
+ };
149
+ };
150
+ }>;
151
+ /** A panel: `<div {{group.panel defaultSize="30%"}}>`. */
152
+ panel: typeof Modifier<{
153
+ Element: HTMLElement;
154
+ Args: {
155
+ Named: ResizablePanelOptions;
156
+ };
157
+ }>;
158
+ /** A handle between two panels: `<div {{group.handle}}>`. */
159
+ handle: typeof Modifier<{
160
+ Element: HTMLElement;
161
+ Args: {
162
+ Named: ResizableHandleOptions;
163
+ };
164
+ }>;
165
+ /** @internal */
166
+ attach(element: HTMLElement): () => void;
167
+ /** @internal */
168
+ register(member: Member): () => void;
169
+ /** @internal Something changed that the layout depends on: lay it out again after the render. */
170
+ changed(): void;
171
+ /** @internal Resizes a panel, as its API's `resize()`. */
172
+ resizePanel(panel: PanelMember, size: PanelSize): void;
173
+ /** @internal */
174
+ isCollapsed(panel: PanelMember): boolean;
175
+ /** @internal */
176
+ collapse(panel: PanelMember): void;
177
+ /** @internal */
178
+ expand(panel: PanelMember): void;
179
+ /** @internal */
180
+ pixelsOf(panel: PanelMember): number;
181
+ /** @internal A member's arguments changed. */
182
+ update(member: Member): void;
183
+ /** @internal */
184
+ refresh(): void;
185
+ }
186
+ /**
187
+ * A panel's size and its imperative API, as react-resizable-panels' `panelRef` gives:
188
+ * `<ResizablePanel as |panel|>` yields one.
189
+ */
190
+ export declare class ResizablePanelApi {
191
+ #private;
192
+ private bound;
193
+ /** @internal */
194
+ bind(group: ResizableGroup, member: PanelMember): void;
195
+ /** @internal */
196
+ unbind(member: PanelMember): void;
197
+ /** Its size in percent of the group, or `undefined` before the group lays it out. Tracked. */
198
+ get size(): number | undefined;
199
+ /** Whether it is collapsed now. Tracked. */
200
+ get isCollapsed(): boolean;
201
+ /** Its size in percent and in pixels. */
202
+ getSize: () => ResizablePanelSize;
203
+ /** Resizes it, as its arguments take sizes: `resize("40%")`, `resize(200)` (pixels). */
204
+ resize: (size: PanelSize) => void;
205
+ /** Collapses it to its collapsed size, if it is collapsible. */
206
+ collapse: () => void;
207
+ /** Expands it back to the size it had, or its minimum. */
208
+ expand: () => void;
209
+ }
210
+ export type { PanelSize, PanelConstraints } from './layout.ts';
211
+ //# sourceMappingURL=state.d.ts.map