@solid2-aria/stately 0.0.0-stage → 0.0.1

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 (477) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -2
  3. package/dist/LICENSES/Apache-2.0.txt +201 -0
  4. package/dist/LICENSES/react-spectrum-NOTICE.txt +242 -0
  5. package/dist/NOTICE.txt +636 -0
  6. package/dist/autocomplete/create-autocomplete-state.d.ts +46 -0
  7. package/dist/autocomplete/create-autocomplete-state.js +41 -0
  8. package/dist/autocomplete/create-autocomplete-state.js.map +1 -0
  9. package/dist/calendar/create-calendar-state.d.ts +62 -0
  10. package/dist/calendar/create-calendar-state.js +357 -0
  11. package/dist/calendar/create-calendar-state.js.map +1 -0
  12. package/dist/calendar/create-range-calendar-state.d.ts +63 -0
  13. package/dist/calendar/create-range-calendar-state.js +204 -0
  14. package/dist/calendar/create-range-calendar-state.js.map +1 -0
  15. package/dist/calendar/types.d.ts +222 -0
  16. package/dist/calendar/types.js +16 -0
  17. package/dist/calendar/utils.d.ts +27 -0
  18. package/dist/calendar/utils.js +81 -0
  19. package/dist/calendar/utils.js.map +1 -0
  20. package/dist/checkbox/create-checkbox-group-state.d.ts +60 -0
  21. package/dist/checkbox/create-checkbox-group-state.js +88 -0
  22. package/dist/checkbox/create-checkbox-group-state.js.map +1 -0
  23. package/dist/collections/collection-builder.d.ts +28 -0
  24. package/dist/collections/collection-builder.js +164 -0
  25. package/dist/collections/collection-builder.js.map +1 -0
  26. package/dist/collections/create-collection.d.ts +24 -0
  27. package/dist/collections/create-collection.js +35 -0
  28. package/dist/collections/create-collection.js.map +1 -0
  29. package/dist/collections/get-child-nodes.d.ts +25 -0
  30. package/dist/collections/get-child-nodes.js +67 -0
  31. package/dist/collections/get-child-nodes.js.map +1 -0
  32. package/dist/collections/get-item-count.d.ts +19 -0
  33. package/dist/collections/get-item-count.js +34 -0
  34. package/dist/collections/get-item-count.js.map +1 -0
  35. package/dist/collections/item.d.ts +29 -0
  36. package/dist/collections/item.js +68 -0
  37. package/dist/collections/item.js.map +1 -0
  38. package/dist/collections/section.d.ts +29 -0
  39. package/dist/collections/section.js +60 -0
  40. package/dist/collections/section.js.map +1 -0
  41. package/dist/collections/types.d.ts +46 -0
  42. package/dist/collections/types.js +29 -0
  43. package/dist/collections/types.js.map +1 -0
  44. package/dist/color/color/base-color.d.ts +40 -0
  45. package/dist/color/color/base-color.js +122 -0
  46. package/dist/color/color/base-color.js.map +1 -0
  47. package/dist/color/color/color-classes.d.ts +27 -0
  48. package/dist/color/color/color-classes.js +29 -0
  49. package/dist/color/color/color-classes.js.map +1 -0
  50. package/dist/color/color/color-constructors.d.ts +23 -0
  51. package/dist/color/color/color-constructors.js +16 -0
  52. package/dist/color/color/color.d.ts +3 -0
  53. package/dist/color/color/color.js +2 -0
  54. package/dist/color/color/hsb-color.d.ts +24 -0
  55. package/dist/color/color/hsb-color.js +183 -0
  56. package/dist/color/color/hsb-color.js.map +1 -0
  57. package/dist/color/color/hsl-color.d.ts +24 -0
  58. package/dist/color/color/hsl-color.js +184 -0
  59. package/dist/color/color/hsl-color.js.map +1 -0
  60. package/dist/color/color/normalize-hue.d.ts +18 -0
  61. package/dist/color/color/normalize-hue.js +24 -0
  62. package/dist/color/color/normalize-hue.js.map +1 -0
  63. package/dist/color/color/oklch.d.ts +19 -0
  64. package/dist/color/color/oklch.js +97 -0
  65. package/dist/color/color/oklch.js.map +1 -0
  66. package/dist/color/color/rgb-color.d.ts +24 -0
  67. package/dist/color/color/rgb-color.js +230 -0
  68. package/dist/color/color/rgb-color.js.map +1 -0
  69. package/dist/color/color.d.ts +25 -0
  70. package/dist/color/color.js +41 -0
  71. package/dist/color/color.js.map +1 -0
  72. package/dist/color/create-color-area-state.d.ts +105 -0
  73. package/dist/color/create-color-area-state.js +138 -0
  74. package/dist/color/create-color-area-state.js.map +1 -0
  75. package/dist/color/create-color-channel-field-state.d.ts +29 -0
  76. package/dist/color/create-color-channel-field-state.js +69 -0
  77. package/dist/color/create-color-channel-field-state.js.map +1 -0
  78. package/dist/color/create-color-field-state.d.ts +61 -0
  79. package/dist/color/create-color-field-state.js +113 -0
  80. package/dist/color/create-color-field-state.js.map +1 -0
  81. package/dist/color/create-color-picker-state.d.ts +16 -0
  82. package/dist/color/create-color-picker-state.js +26 -0
  83. package/dist/color/create-color-picker-state.js.map +1 -0
  84. package/dist/color/create-color-slider-state.d.ts +50 -0
  85. package/dist/color/create-color-slider-state.js +93 -0
  86. package/dist/color/create-color-slider-state.js.map +1 -0
  87. package/dist/color/create-color-wheel-state.d.ts +76 -0
  88. package/dist/color/create-color-wheel-state.js +130 -0
  89. package/dist/color/create-color-wheel-state.js.map +1 -0
  90. package/dist/color/create-color.d.ts +20 -0
  91. package/dist/color/create-color.js +33 -0
  92. package/dist/color/create-color.js.map +1 -0
  93. package/dist/color/types.d.ts +87 -0
  94. package/dist/color/types.js +5 -0
  95. package/dist/combobox/create-combo-box-state.d.ts +157 -0
  96. package/dist/combobox/create-combo-box-state.js +450 -0
  97. package/dist/combobox/create-combo-box-state.js.map +1 -0
  98. package/dist/data/create-async-list.d.ts +88 -0
  99. package/dist/data/create-async-list.js +276 -0
  100. package/dist/data/create-async-list.js.map +1 -0
  101. package/dist/data/create-list-data.d.ts +140 -0
  102. package/dist/data/create-list-data.js +250 -0
  103. package/dist/data/create-list-data.js.map +1 -0
  104. package/dist/data/create-tree-data.d.ts +134 -0
  105. package/dist/data/create-tree-data.js +364 -0
  106. package/dist/data/create-tree-data.js.map +1 -0
  107. package/dist/datepicker/create-date-field-state.d.ts +138 -0
  108. package/dist/datepicker/create-date-field-state.js +449 -0
  109. package/dist/datepicker/create-date-field-state.js.map +1 -0
  110. package/dist/datepicker/create-date-picker-state.d.ts +82 -0
  111. package/dist/datepicker/create-date-picker-state.js +191 -0
  112. package/dist/datepicker/create-date-picker-state.js.map +1 -0
  113. package/dist/datepicker/create-date-range-picker-state.d.ts +97 -0
  114. package/dist/datepicker/create-date-range-picker-state.js +305 -0
  115. package/dist/datepicker/create-date-range-picker-state.js.map +1 -0
  116. package/dist/datepicker/create-time-field-state.d.ts +34 -0
  117. package/dist/datepicker/create-time-field-state.js +128 -0
  118. package/dist/datepicker/create-time-field-state.js.map +1 -0
  119. package/dist/datepicker/incomplete-date.d.ts +71 -0
  120. package/dist/datepicker/incomplete-date.js +324 -0
  121. package/dist/datepicker/incomplete-date.js.map +1 -0
  122. package/dist/datepicker/placeholders.d.ts +18 -0
  123. package/dist/datepicker/placeholders.js +418 -0
  124. package/dist/datepicker/placeholders.js.map +1 -0
  125. package/dist/datepicker/types.d.ts +131 -0
  126. package/dist/datepicker/types.js +16 -0
  127. package/dist/datepicker/utils.d.ts +37 -0
  128. package/dist/datepicker/utils.js +168 -0
  129. package/dist/datepicker/utils.js.map +1 -0
  130. package/dist/disclosure/create-disclosure-group-state.d.ts +47 -0
  131. package/dist/disclosure/create-disclosure-group-state.js +62 -0
  132. package/dist/disclosure/create-disclosure-group-state.js.map +1 -0
  133. package/dist/disclosure/create-disclosure-state.d.ts +42 -0
  134. package/dist/disclosure/create-disclosure-state.js +49 -0
  135. package/dist/disclosure/create-disclosure-state.js.map +1 -0
  136. package/dist/dnd/create-draggable-collection-state.d.ts +63 -0
  137. package/dist/dnd/create-draggable-collection-state.js +136 -0
  138. package/dist/dnd/create-draggable-collection-state.js.map +1 -0
  139. package/dist/dnd/create-droppable-collection-state.d.ts +55 -0
  140. package/dist/dnd/create-droppable-collection-state.js +155 -0
  141. package/dist/dnd/create-droppable-collection-state.js.map +1 -0
  142. package/dist/flags/flags.d.ts +21 -0
  143. package/dist/flags/flags.js +34 -0
  144. package/dist/flags/flags.js.map +1 -0
  145. package/dist/form/create-form-validation-state.d.ts +37 -0
  146. package/dist/form/create-form-validation-state.js +152 -0
  147. package/dist/form/create-form-validation-state.js.map +1 -0
  148. package/dist/grid/create-grid-state.d.ts +38 -0
  149. package/dist/grid/create-grid-state.js +85 -0
  150. package/dist/grid/create-grid-state.js.map +1 -0
  151. package/dist/grid/grid-collection.d.ts +68 -0
  152. package/dist/grid/grid-collection.js +133 -0
  153. package/dist/grid/grid-collection.js.map +1 -0
  154. package/dist/index.d.ts +91 -0
  155. package/dist/index.js +86 -0
  156. package/dist/intl/color/ar-AE.js +44 -0
  157. package/dist/intl/color/ar-AE.js.map +1 -0
  158. package/dist/intl/color/bg-BG.js +44 -0
  159. package/dist/intl/color/bg-BG.js.map +1 -0
  160. package/dist/intl/color/cs-CZ.js +44 -0
  161. package/dist/intl/color/cs-CZ.js.map +1 -0
  162. package/dist/intl/color/da-DK.js +44 -0
  163. package/dist/intl/color/da-DK.js.map +1 -0
  164. package/dist/intl/color/de-DE.js +44 -0
  165. package/dist/intl/color/de-DE.js.map +1 -0
  166. package/dist/intl/color/el-GR.js +44 -0
  167. package/dist/intl/color/el-GR.js.map +1 -0
  168. package/dist/intl/color/en-US.js +44 -0
  169. package/dist/intl/color/en-US.js.map +1 -0
  170. package/dist/intl/color/es-ES.js +44 -0
  171. package/dist/intl/color/es-ES.js.map +1 -0
  172. package/dist/intl/color/et-EE.js +44 -0
  173. package/dist/intl/color/et-EE.js.map +1 -0
  174. package/dist/intl/color/fi-FI.js +44 -0
  175. package/dist/intl/color/fi-FI.js.map +1 -0
  176. package/dist/intl/color/fr-FR.js +44 -0
  177. package/dist/intl/color/fr-FR.js.map +1 -0
  178. package/dist/intl/color/he-IL.js +44 -0
  179. package/dist/intl/color/he-IL.js.map +1 -0
  180. package/dist/intl/color/hr-HR.js +44 -0
  181. package/dist/intl/color/hr-HR.js.map +1 -0
  182. package/dist/intl/color/hu-HU.js +44 -0
  183. package/dist/intl/color/hu-HU.js.map +1 -0
  184. package/dist/intl/color/index.js +75 -0
  185. package/dist/intl/color/index.js.map +1 -0
  186. package/dist/intl/color/it-IT.js +44 -0
  187. package/dist/intl/color/it-IT.js.map +1 -0
  188. package/dist/intl/color/ja-JP.js +44 -0
  189. package/dist/intl/color/ja-JP.js.map +1 -0
  190. package/dist/intl/color/ko-KR.js +44 -0
  191. package/dist/intl/color/ko-KR.js.map +1 -0
  192. package/dist/intl/color/lt-LT.js +44 -0
  193. package/dist/intl/color/lt-LT.js.map +1 -0
  194. package/dist/intl/color/lv-LV.js +44 -0
  195. package/dist/intl/color/lv-LV.js.map +1 -0
  196. package/dist/intl/color/nb-NO.js +44 -0
  197. package/dist/intl/color/nb-NO.js.map +1 -0
  198. package/dist/intl/color/nl-NL.js +44 -0
  199. package/dist/intl/color/nl-NL.js.map +1 -0
  200. package/dist/intl/color/pl-PL.js +44 -0
  201. package/dist/intl/color/pl-PL.js.map +1 -0
  202. package/dist/intl/color/pt-BR.js +44 -0
  203. package/dist/intl/color/pt-BR.js.map +1 -0
  204. package/dist/intl/color/pt-PT.js +44 -0
  205. package/dist/intl/color/pt-PT.js.map +1 -0
  206. package/dist/intl/color/ro-RO.js +44 -0
  207. package/dist/intl/color/ro-RO.js.map +1 -0
  208. package/dist/intl/color/ru-RU.js +44 -0
  209. package/dist/intl/color/ru-RU.js.map +1 -0
  210. package/dist/intl/color/sk-SK.js +44 -0
  211. package/dist/intl/color/sk-SK.js.map +1 -0
  212. package/dist/intl/color/sl-SI.js +44 -0
  213. package/dist/intl/color/sl-SI.js.map +1 -0
  214. package/dist/intl/color/sr-SP.js +44 -0
  215. package/dist/intl/color/sr-SP.js.map +1 -0
  216. package/dist/intl/color/sv-SE.js +44 -0
  217. package/dist/intl/color/sv-SE.js.map +1 -0
  218. package/dist/intl/color/tr-TR.js +44 -0
  219. package/dist/intl/color/tr-TR.js.map +1 -0
  220. package/dist/intl/color/uk-UA.js +44 -0
  221. package/dist/intl/color/uk-UA.js.map +1 -0
  222. package/dist/intl/color/zh-CN.js +44 -0
  223. package/dist/intl/color/zh-CN.js.map +1 -0
  224. package/dist/intl/color/zh-TW.js +44 -0
  225. package/dist/intl/color/zh-TW.js.map +1 -0
  226. package/dist/intl/datepicker/ar-AE.js +11 -0
  227. package/dist/intl/datepicker/ar-AE.js.map +1 -0
  228. package/dist/intl/datepicker/bg-BG.js +11 -0
  229. package/dist/intl/datepicker/bg-BG.js.map +1 -0
  230. package/dist/intl/datepicker/cs-CZ.js +11 -0
  231. package/dist/intl/datepicker/cs-CZ.js.map +1 -0
  232. package/dist/intl/datepicker/da-DK.js +11 -0
  233. package/dist/intl/datepicker/da-DK.js.map +1 -0
  234. package/dist/intl/datepicker/de-DE.js +11 -0
  235. package/dist/intl/datepicker/de-DE.js.map +1 -0
  236. package/dist/intl/datepicker/el-GR.js +11 -0
  237. package/dist/intl/datepicker/el-GR.js.map +1 -0
  238. package/dist/intl/datepicker/en-US.js +11 -0
  239. package/dist/intl/datepicker/en-US.js.map +1 -0
  240. package/dist/intl/datepicker/es-ES.js +11 -0
  241. package/dist/intl/datepicker/es-ES.js.map +1 -0
  242. package/dist/intl/datepicker/et-EE.js +11 -0
  243. package/dist/intl/datepicker/et-EE.js.map +1 -0
  244. package/dist/intl/datepicker/fi-FI.js +11 -0
  245. package/dist/intl/datepicker/fi-FI.js.map +1 -0
  246. package/dist/intl/datepicker/fr-FR.js +11 -0
  247. package/dist/intl/datepicker/fr-FR.js.map +1 -0
  248. package/dist/intl/datepicker/he-IL.js +11 -0
  249. package/dist/intl/datepicker/he-IL.js.map +1 -0
  250. package/dist/intl/datepicker/hr-HR.js +11 -0
  251. package/dist/intl/datepicker/hr-HR.js.map +1 -0
  252. package/dist/intl/datepicker/hu-HU.js +11 -0
  253. package/dist/intl/datepicker/hu-HU.js.map +1 -0
  254. package/dist/intl/datepicker/index.js +75 -0
  255. package/dist/intl/datepicker/index.js.map +1 -0
  256. package/dist/intl/datepicker/it-IT.js +11 -0
  257. package/dist/intl/datepicker/it-IT.js.map +1 -0
  258. package/dist/intl/datepicker/ja-JP.js +11 -0
  259. package/dist/intl/datepicker/ja-JP.js.map +1 -0
  260. package/dist/intl/datepicker/ko-KR.js +11 -0
  261. package/dist/intl/datepicker/ko-KR.js.map +1 -0
  262. package/dist/intl/datepicker/lt-LT.js +11 -0
  263. package/dist/intl/datepicker/lt-LT.js.map +1 -0
  264. package/dist/intl/datepicker/lv-LV.js +11 -0
  265. package/dist/intl/datepicker/lv-LV.js.map +1 -0
  266. package/dist/intl/datepicker/nb-NO.js +11 -0
  267. package/dist/intl/datepicker/nb-NO.js.map +1 -0
  268. package/dist/intl/datepicker/nl-NL.js +11 -0
  269. package/dist/intl/datepicker/nl-NL.js.map +1 -0
  270. package/dist/intl/datepicker/pl-PL.js +11 -0
  271. package/dist/intl/datepicker/pl-PL.js.map +1 -0
  272. package/dist/intl/datepicker/pt-BR.js +11 -0
  273. package/dist/intl/datepicker/pt-BR.js.map +1 -0
  274. package/dist/intl/datepicker/pt-PT.js +11 -0
  275. package/dist/intl/datepicker/pt-PT.js.map +1 -0
  276. package/dist/intl/datepicker/ro-RO.js +11 -0
  277. package/dist/intl/datepicker/ro-RO.js.map +1 -0
  278. package/dist/intl/datepicker/ru-RU.js +11 -0
  279. package/dist/intl/datepicker/ru-RU.js.map +1 -0
  280. package/dist/intl/datepicker/sk-SK.js +11 -0
  281. package/dist/intl/datepicker/sk-SK.js.map +1 -0
  282. package/dist/intl/datepicker/sl-SI.js +11 -0
  283. package/dist/intl/datepicker/sl-SI.js.map +1 -0
  284. package/dist/intl/datepicker/sr-SP.js +11 -0
  285. package/dist/intl/datepicker/sr-SP.js.map +1 -0
  286. package/dist/intl/datepicker/sv-SE.js +11 -0
  287. package/dist/intl/datepicker/sv-SE.js.map +1 -0
  288. package/dist/intl/datepicker/tr-TR.js +11 -0
  289. package/dist/intl/datepicker/tr-TR.js.map +1 -0
  290. package/dist/intl/datepicker/uk-UA.js +11 -0
  291. package/dist/intl/datepicker/uk-UA.js.map +1 -0
  292. package/dist/intl/datepicker/zh-CN.js +11 -0
  293. package/dist/intl/datepicker/zh-CN.js.map +1 -0
  294. package/dist/intl/datepicker/zh-TW.js +11 -0
  295. package/dist/intl/datepicker/zh-TW.js.map +1 -0
  296. package/dist/layout/grid-layout.d.ts +107 -0
  297. package/dist/layout/grid-layout.js +253 -0
  298. package/dist/layout/grid-layout.js.map +1 -0
  299. package/dist/layout/list-layout.d.ts +187 -0
  300. package/dist/layout/list-layout.js +488 -0
  301. package/dist/layout/list-layout.js.map +1 -0
  302. package/dist/layout/table-layout.d.ts +98 -0
  303. package/dist/layout/table-layout.js +476 -0
  304. package/dist/layout/table-layout.js.map +1 -0
  305. package/dist/layout/waterfall-layout.d.ts +85 -0
  306. package/dist/layout/waterfall-layout.js +225 -0
  307. package/dist/layout/waterfall-layout.js.map +1 -0
  308. package/dist/list/create-list-state.d.ts +48 -0
  309. package/dist/list/create-list-state.js +123 -0
  310. package/dist/list/create-list-state.js.map +1 -0
  311. package/dist/list/create-single-select-list-state.d.ts +38 -0
  312. package/dist/list/create-single-select-list-state.js +55 -0
  313. package/dist/list/create-single-select-list-state.js.map +1 -0
  314. package/dist/list/list-collection.d.ts +36 -0
  315. package/dist/list/list-collection.js +91 -0
  316. package/dist/list/list-collection.js.map +1 -0
  317. package/dist/menu/create-menu-trigger-state.d.ts +55 -0
  318. package/dist/menu/create-menu-trigger-state.js +58 -0
  319. package/dist/menu/create-menu-trigger-state.js.map +1 -0
  320. package/dist/menu/create-submenu-trigger-state.d.ts +47 -0
  321. package/dist/menu/create-submenu-trigger-state.js +59 -0
  322. package/dist/menu/create-submenu-trigger-state.js.map +1 -0
  323. package/dist/numberfield/create-number-field-state.d.ts +93 -0
  324. package/dist/numberfield/create-number-field-state.js +139 -0
  325. package/dist/numberfield/create-number-field-state.js.map +1 -0
  326. package/dist/overlays/create-overlay-trigger-state.d.ts +51 -0
  327. package/dist/overlays/create-overlay-trigger-state.js +56 -0
  328. package/dist/overlays/create-overlay-trigger-state.js.map +1 -0
  329. package/dist/radio/create-radio-group-state.d.ts +61 -0
  330. package/dist/radio/create-radio-group-state.js +71 -0
  331. package/dist/radio/create-radio-group-state.js.map +1 -0
  332. package/dist/searchfield/create-search-field-state.d.ts +35 -0
  333. package/dist/searchfield/create-search-field-state.js +34 -0
  334. package/dist/searchfield/create-search-field-state.js.map +1 -0
  335. package/dist/select/create-select-state.d.ts +116 -0
  336. package/dist/select/create-select-state.js +151 -0
  337. package/dist/select/create-select-state.js.map +1 -0
  338. package/dist/selection/create-multiple-selection-state.d.ts +39 -0
  339. package/dist/selection/create-multiple-selection-state.js +114 -0
  340. package/dist/selection/create-multiple-selection-state.js.map +1 -0
  341. package/dist/selection/selection-manager.d.ts +139 -0
  342. package/dist/selection/selection-manager.js +334 -0
  343. package/dist/selection/selection-manager.js.map +1 -0
  344. package/dist/selection/selection.d.ts +27 -0
  345. package/dist/selection/selection.js +38 -0
  346. package/dist/selection/selection.js.map +1 -0
  347. package/dist/selection/types.d.ts +116 -0
  348. package/dist/selection/types.js +16 -0
  349. package/dist/slider/create-slider-state.d.ts +182 -0
  350. package/dist/slider/create-slider-state.js +131 -0
  351. package/dist/slider/create-slider-state.js.map +1 -0
  352. package/dist/steplist/create-step-list-state.d.ts +40 -0
  353. package/dist/steplist/create-step-list-state.js +132 -0
  354. package/dist/steplist/create-step-list-state.js.map +1 -0
  355. package/dist/table/cell.d.ts +37 -0
  356. package/dist/table/cell.js +47 -0
  357. package/dist/table/cell.js.map +1 -0
  358. package/dist/table/collection-context.d.ts +4 -0
  359. package/dist/table/collection-context.js +8 -0
  360. package/dist/table/collection-context.js.map +1 -0
  361. package/dist/table/column.d.ts +66 -0
  362. package/dist/table/column.js +71 -0
  363. package/dist/table/column.js.map +1 -0
  364. package/dist/table/create-table-column-resize-state.d.ts +65 -0
  365. package/dist/table/create-table-column-resize-state.js +100 -0
  366. package/dist/table/create-table-column-resize-state.js.map +1 -0
  367. package/dist/table/create-table-state.d.ts +112 -0
  368. package/dist/table/create-table-state.js +122 -0
  369. package/dist/table/create-table-state.js.map +1 -0
  370. package/dist/table/create-tree-grid-state.d.ts +44 -0
  371. package/dist/table/create-tree-grid-state.js +145 -0
  372. package/dist/table/create-tree-grid-state.js.map +1 -0
  373. package/dist/table/row.d.ts +44 -0
  374. package/dist/table/row.js +91 -0
  375. package/dist/table/row.js.map +1 -0
  376. package/dist/table/table-body.d.ts +36 -0
  377. package/dist/table/table-body.js +57 -0
  378. package/dist/table/table-body.js.map +1 -0
  379. package/dist/table/table-collection.d.ts +62 -0
  380. package/dist/table/table-collection.js +274 -0
  381. package/dist/table/table-collection.js.map +1 -0
  382. package/dist/table/table-column-layout.d.ts +47 -0
  383. package/dist/table/table-column-layout.js +94 -0
  384. package/dist/table/table-column-layout.js.map +1 -0
  385. package/dist/table/table-header.d.ts +37 -0
  386. package/dist/table/table-header.js +52 -0
  387. package/dist/table/table-header.js.map +1 -0
  388. package/dist/table/table-utils.d.ts +60 -0
  389. package/dist/table/table-utils.js +203 -0
  390. package/dist/table/table-utils.js.map +1 -0
  391. package/dist/tabs/create-tab-list-state.d.ts +42 -0
  392. package/dist/tabs/create-tab-list-state.js +78 -0
  393. package/dist/tabs/create-tab-list-state.js.map +1 -0
  394. package/dist/toast/create-toast-state.d.ts +97 -0
  395. package/dist/toast/create-toast-state.js +166 -0
  396. package/dist/toast/create-toast-state.js.map +1 -0
  397. package/dist/toggle/create-toggle-group-state.d.ts +55 -0
  398. package/dist/toggle/create-toggle-group-state.js +62 -0
  399. package/dist/toggle/create-toggle-group-state.js.map +1 -0
  400. package/dist/toggle/create-toggle-state.d.ts +58 -0
  401. package/dist/toggle/create-toggle-state.js +43 -0
  402. package/dist/toggle/create-toggle-state.js.map +1 -0
  403. package/dist/tokenfield/create-token-field-state.d.ts +39 -0
  404. package/dist/tokenfield/create-token-field-state.js +44 -0
  405. package/dist/tokenfield/create-token-field-state.js.map +1 -0
  406. package/dist/tokenfield/token-field-value.d.ts +111 -0
  407. package/dist/tokenfield/token-field-value.js +327 -0
  408. package/dist/tokenfield/token-field-value.js.map +1 -0
  409. package/dist/tooltip/create-tooltip-trigger-state.d.ts +73 -0
  410. package/dist/tooltip/create-tooltip-trigger-state.js +136 -0
  411. package/dist/tooltip/create-tooltip-trigger-state.js.map +1 -0
  412. package/dist/tree/create-tree-state.d.ts +42 -0
  413. package/dist/tree/create-tree-state.js +75 -0
  414. package/dist/tree/create-tree-state.js.map +1 -0
  415. package/dist/tree/tree-collection.d.ts +36 -0
  416. package/dist/tree/tree-collection.js +84 -0
  417. package/dist/tree/tree-collection.js.map +1 -0
  418. package/dist/utils/create-controlled-signal.d.ts +23 -0
  419. package/dist/utils/create-controlled-signal.js +54 -0
  420. package/dist/utils/create-controlled-signal.js.map +1 -0
  421. package/dist/utils/get-item-key.d.ts +5 -0
  422. package/dist/utils/get-item-key.js +12 -0
  423. package/dist/utils/get-item-key.js.map +1 -0
  424. package/dist/utils/get-node-props.d.ts +23 -0
  425. package/dist/utils/get-node-props.js +38 -0
  426. package/dist/utils/get-node-props.js.map +1 -0
  427. package/dist/utils/has-content.d.ts +5 -0
  428. package/dist/utils/has-content.js +7 -0
  429. package/dist/utils/has-content.js.map +1 -0
  430. package/dist/utils/legacy-props.d.ts +10 -0
  431. package/dist/utils/legacy-props.js +17 -0
  432. package/dist/utils/legacy-props.js.map +1 -0
  433. package/dist/utils/number.d.ts +25 -0
  434. package/dist/utils/number.js +59 -0
  435. package/dist/utils/number.js.map +1 -0
  436. package/dist/utils/parse-calendar-identifier.d.ts +5 -0
  437. package/dist/utils/parse-calendar-identifier.js +31 -0
  438. package/dist/utils/parse-calendar-identifier.js.map +1 -0
  439. package/dist/utils/require-value.d.ts +4 -0
  440. package/dist/utils/require-value.js +10 -0
  441. package/dist/utils/require-value.js.map +1 -0
  442. package/dist/virtualizer/create-virtualizer-state.d.ts +44 -0
  443. package/dist/virtualizer/create-virtualizer-state.js +92 -0
  444. package/dist/virtualizer/create-virtualizer-state.js.map +1 -0
  445. package/dist/virtualizer/layout-info.d.ts +94 -0
  446. package/dist/virtualizer/layout-info.js +118 -0
  447. package/dist/virtualizer/layout-info.js.map +1 -0
  448. package/dist/virtualizer/layout.d.ts +91 -0
  449. package/dist/virtualizer/layout.js +71 -0
  450. package/dist/virtualizer/layout.js.map +1 -0
  451. package/dist/virtualizer/overscan-manager.d.ts +25 -0
  452. package/dist/virtualizer/overscan-manager.js +46 -0
  453. package/dist/virtualizer/overscan-manager.js.map +1 -0
  454. package/dist/virtualizer/point.d.ts +36 -0
  455. package/dist/virtualizer/point.js +48 -0
  456. package/dist/virtualizer/point.js.map +1 -0
  457. package/dist/virtualizer/rect.d.ts +103 -0
  458. package/dist/virtualizer/rect.js +156 -0
  459. package/dist/virtualizer/rect.js.map +1 -0
  460. package/dist/virtualizer/reusable-view.d.ts +51 -0
  461. package/dist/virtualizer/reusable-view.js +81 -0
  462. package/dist/virtualizer/reusable-view.js.map +1 -0
  463. package/dist/virtualizer/scroll-anchor.d.ts +98 -0
  464. package/dist/virtualizer/scroll-anchor.js +150 -0
  465. package/dist/virtualizer/scroll-anchor.js.map +1 -0
  466. package/dist/virtualizer/size.d.ts +34 -0
  467. package/dist/virtualizer/size.js +46 -0
  468. package/dist/virtualizer/size.js.map +1 -0
  469. package/dist/virtualizer/types.d.ts +47 -0
  470. package/dist/virtualizer/types.js +16 -0
  471. package/dist/virtualizer/utils.d.ts +19 -0
  472. package/dist/virtualizer/utils.js +27 -0
  473. package/dist/virtualizer/utils.js.map +1 -0
  474. package/dist/virtualizer/virtualizer.d.ts +99 -0
  475. package/dist/virtualizer/virtualizer.js +314 -0
  476. package/dist/virtualizer/virtualizer.js.map +1 -0
  477. package/package.json +174 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-form-validation-state.js","names":[],"sources":["../../src/form/create-form-validation-state.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/*\n * Derived from Adobe React Spectrum: packages/react-stately/src/form/useFormValidationState.ts.\n * Modified for Solid Aria: adapted state handling, APIs, or formatting for Solid 2.\n * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.\n */\n\nimport type {\n Validation,\n ValidationErrors,\n ValidationResult,\n} from \"@solid2-aria/types-shared\";\nimport {\n createContext,\n createMemo,\n untrack,\n createSignal,\n createEffect,\n useContext,\n} from \"solid-js\";\n\nimport { getLegacyValidationState } from \"../utils/legacy-props\";\n\nexport const VALID_VALIDITY_STATE: ValidationResult[\"validationDetails\"] = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: true,\n valueMissing: false,\n};\n\nconst CUSTOM_VALIDITY_STATE: ValidationResult[\"validationDetails\"] = {\n badInput: false,\n customError: true,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valid: false,\n valueMissing: false,\n};\n\nexport const DEFAULT_VALIDATION_RESULT: ValidationResult = {\n isInvalid: false,\n validationDetails: VALID_VALIDITY_STATE,\n validationErrors: [],\n};\n\nexport const FormValidationContext = createContext<ValidationErrors>({});\nexport const privateValidationStateProp = \"__solid2AriaFormValidationState\";\n\nexport interface FormValidationProps<T> extends Validation<T> {\n builtinValidation?: ValidationResult;\n name?: string | string[];\n value: T | null;\n __solid2AriaFormValidationState?: FormValidationState;\n}\n\nexport interface FormValidationState {\n readonly realtimeValidation: ValidationResult;\n readonly displayValidation: ValidationResult;\n updateValidation: (result: ValidationResult) => void;\n resetValidation: () => void;\n commitValidation: () => void;\n}\n\nfunction result(errors: string[]): ValidationResult | null {\n return errors.length\n ? {\n isInvalid: true,\n validationDetails: CUSTOM_VALIDITY_STATE,\n validationErrors: errors,\n }\n : null;\n}\n\nexport function createFormValidationState<T>(\n props: FormValidationProps<T>\n): FormValidationState {\n const inherited = untrack(() => props.__solid2AriaFormValidationState);\n\n if (inherited) {\n return inherited;\n }\n\n const serverErrors = useContext(FormValidationContext);\n\n const [clearedErrors, setClearedErrors] =\n createSignal<ValidationErrors | null>(null);\n\n const [current, setCurrent] = createSignal(DEFAULT_VALIDATION_RESULT);\n const [queued, setQueued] = createSignal(false);\n let next = DEFAULT_VALIDATION_RESULT;\n\n const controlled = createMemo(() => {\n const legacyState = getLegacyValidationState(props);\n\n const invalid =\n props.isInvalid ??\n (legacyState === undefined ? undefined : legacyState === \"invalid\");\n\n return invalid === undefined\n ? null\n : {\n isInvalid: invalid,\n validationDetails: CUSTOM_VALIDITY_STATE,\n validationErrors: [],\n };\n });\n\n const client = createMemo(() => {\n const error = props.value === null ? null : props.validate?.(props.value);\n\n if (typeof error === \"string\") {\n return result([error]);\n }\n\n return result(Array.isArray(error) ? error : []);\n });\n\n const builtin = () =>\n props.builtinValidation?.validationDetails.valid === true\n ? undefined\n : props.builtinValidation;\n\n const server = createMemo(() => {\n if (props.name === undefined || clearedErrors() === serverErrors) {\n return null;\n }\n\n const names = Array.isArray(props.name) ? props.name : [props.name];\n\n return result(\n names.flatMap((name) => {\n const e = serverErrors[name];\n\n if (e === undefined) {\n return [];\n }\n\n return Array.isArray(e) ? e : [e];\n })\n );\n });\n\n createEffect(\n () => ({ error: client() ?? builtin() ?? next, queued: queued() }),\n ({ queued: shouldCommit, error }) => {\n if (shouldCommit) {\n setQueued(false);\n setCurrent(error);\n }\n }\n );\n\n return {\n commitValidation() {\n if (props.validationBehavior === \"native\") {\n setQueued(true);\n }\n\n setClearedErrors(serverErrors);\n },\n get displayValidation() {\n return (\n controlled() ??\n server() ??\n (props.validationBehavior === \"native\"\n ? current()\n : (client() ?? builtin() ?? current()))\n );\n },\n get realtimeValidation() {\n return (\n controlled() ??\n server() ??\n client() ??\n builtin() ??\n DEFAULT_VALIDATION_RESULT\n );\n },\n resetValidation() {\n setCurrent(DEFAULT_VALIDATION_RESULT);\n setQueued(false);\n setClearedErrors(serverErrors);\n },\n updateValidation(v) {\n if (props.validationBehavior === \"native\") {\n next = v;\n } else {\n setCurrent(v);\n }\n },\n };\n}\n\nexport function mergeValidation(\n ...results: ValidationResult[]\n): ValidationResult {\n const errors = new Set<string>();\n let isInvalid = false;\n\n const validationDetails = {\n // oxlint-disable-next-line typescript/no-misused-spread -- The validation defaults are plain object literals, not native ValidityState instances.\n ...VALID_VALIDITY_STATE,\n };\n\n for (const v of results) {\n for (const e of v.validationErrors) {\n errors.add(e);\n }\n\n // Only these properties apply for checkboxes.\n isInvalid ||= v.isInvalid;\n\n for (const key of [\n \"badInput\",\n \"customError\",\n \"patternMismatch\",\n \"rangeOverflow\",\n \"rangeUnderflow\",\n \"stepMismatch\",\n \"tooLong\",\n \"tooShort\",\n \"typeMismatch\",\n \"valid\",\n \"valueMissing\",\n ] as const) {\n validationDetails[key] ||= v.validationDetails[key];\n }\n }\n\n validationDetails.valid = !isInvalid;\n\n return {\n isInvalid,\n validationDetails,\n validationErrors: [...errors],\n };\n}\n"],"mappings":"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"}
@@ -0,0 +1,38 @@
1
+ /*
2
+ * Derived from Adobe React Spectrum: packages/react-stately/src/grid/useGridState.ts.
3
+ * Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.
4
+ * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.
5
+ */
6
+ import { MultipleSelectionState } from "../selection/types.js";
7
+ import { MultipleSelectionStateProps } from "../selection/create-multiple-selection-state.js";
8
+ import { SelectionManager } from "../selection/selection-manager.js";
9
+ import { IGridCollection } from "./grid-collection.js";
10
+ import { Key } from "@solid2-aria/types-shared";
11
+ export interface GridState<T, C extends IGridCollection<T>> {
12
+ collection: C;
13
+ /** A set of keys for rows that are disabled. */
14
+ disabledKeys: Set<Key>;
15
+ /** A selection manager to read and update row selection state. */
16
+ selectionManager: SelectionManager;
17
+ /**
18
+ * Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a
19
+ * component within a cell.
20
+ */
21
+ isKeyboardNavigationDisabled: boolean;
22
+ }
23
+ export interface GridStateOptions<T, C extends IGridCollection<T>> extends MultipleSelectionStateProps {
24
+ collection: C;
25
+ disabledKeys?: Iterable<Key>;
26
+ focusMode?: "row" | "cell";
27
+ /**
28
+ * Do not use unless you know what you're doing.
29
+ * @private
30
+ */
31
+ UNSAFE_selectionState?: MultipleSelectionState;
32
+ }
33
+ /**
34
+ * Provides state management for a grid component. Handles row selection and focusing a grid cell's
35
+ * focusable child if applicable.
36
+ */
37
+ export declare function createGridState<T extends object, C extends IGridCollection<T>>(props: GridStateOptions<T, C>): GridState<T, C>;
38
+ //# sourceMappingURL=create-grid-state.d.ts.map
@@ -0,0 +1,85 @@
1
+ /*
2
+ * Derived from Adobe React Spectrum: packages/react-stately/src/grid/useGridState.ts.
3
+ * Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.
4
+ * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.
5
+ */
6
+ import { getChildNodes, getFirstItem, getLastItem } from "../collections/get-child-nodes.js";
7
+ import { createMultipleSelectionState } from "../selection/create-multiple-selection-state.js";
8
+ import { SelectionManager } from "../selection/selection-manager.js";
9
+ import { requireValue } from "../utils/require-value.js";
10
+ import { createMemo, createRenderEffect, untrack } from "solid-js";
11
+ // src/grid/create-grid-state.ts
12
+ /**
13
+ * Provides state management for a grid component. Handles row selection and focusing a grid cell's
14
+ * focusable child if applicable.
15
+ */
16
+ function createGridState(props) {
17
+ const selectionState = untrack(() => props.UNSAFE_selectionState) ?? createMultipleSelectionState(props);
18
+ const disabledKeys = createMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set());
19
+ const { setFocusedKey } = selectionState;
20
+ selectionState.setFocusedKey = (initialKey, child) => {
21
+ let key = initialKey;
22
+ if (props.focusMode === "cell" && key !== null && key !== void 0) {
23
+ const item = props.collection.getItem(key);
24
+ if (item?.type === "item") {
25
+ const children = getChildNodes(item, props.collection);
26
+ key = child === "last" ? getLastItem(children)?.key ?? null : getFirstItem(children)?.key ?? null;
27
+ }
28
+ }
29
+ setFocusedKey(key, child);
30
+ };
31
+ const selectionManager = createMemo(() => new SelectionManager(props.collection, selectionState));
32
+ let cachedCollection = null;
33
+ createRenderEffect(() => {
34
+ const { collection } = props;
35
+ const { focusedKey } = selectionState;
36
+ let nextFocusedKey;
37
+ if (focusedKey !== null && cachedCollection && !collection.getItem(focusedKey)) {
38
+ const node = cachedCollection.getItem(focusedKey);
39
+ const parentNode = node?.parentKey !== null && node?.parentKey !== void 0 && (node.type === "cell" || node.type === "rowheader" || node.type === "column") ? cachedCollection.getItem(node.parentKey) : node;
40
+ nextFocusedKey = null;
41
+ if (parentNode) {
42
+ const cachedRows = cachedCollection.rows;
43
+ const { rows } = collection;
44
+ const diff = cachedRows.length - rows.length;
45
+ const parentIndex = cachedRows.findIndex((row) => row.key === parentNode.key);
46
+ const newRow = findFocusableRow(rows, Math.min(diff > 1 ? Math.max(parentIndex - diff + 1, 0) : parentIndex, rows.length - 1), (key) => selectionManager().isDisabled(key));
47
+ if (newRow) {
48
+ const childNodes = newRow.hasChildNodes ? [...getChildNodes(newRow, collection)] : [];
49
+ nextFocusedKey = newRow.hasChildNodes && parentNode !== node && node && node.index < childNodes.length ? requireValue(childNodes[node.index], "Expected childNodes[node.index] to exist.").key : newRow.key;
50
+ }
51
+ }
52
+ }
53
+ return {
54
+ collection,
55
+ nextFocusedKey
56
+ };
57
+ }, ({ collection, nextFocusedKey }) => {
58
+ cachedCollection = collection;
59
+ if (nextFocusedKey !== void 0) untrack(() => {
60
+ selectionState.setFocusedKey(nextFocusedKey);
61
+ });
62
+ });
63
+ return {
64
+ get collection() {
65
+ return props.collection;
66
+ },
67
+ get disabledKeys() {
68
+ return disabledKeys();
69
+ },
70
+ get isKeyboardNavigationDisabled() {
71
+ return false;
72
+ },
73
+ get selectionManager() {
74
+ return selectionManager();
75
+ }
76
+ };
77
+ }
78
+ function findFocusableRow(rows, startIndex, isDisabled) {
79
+ for (const row of rows.slice(Math.max(0, startIndex))) if (!isDisabled(row.key) && row.type !== "headerrow") return row;
80
+ for (const row of rows.slice(0, Math.max(0, startIndex)).toReversed()) if (!isDisabled(row.key) && row.type !== "headerrow") return row;
81
+ return null;
82
+ }
83
+ export { createGridState };
84
+
85
+ //# sourceMappingURL=create-grid-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-grid-state.js","names":[],"sources":["../../src/grid/create-grid-state.ts"],"sourcesContent":["/*\n * Derived from Adobe React Spectrum: packages/react-stately/src/grid/useGridState.ts.\n * Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.\n * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.\n */\n\nimport type { Key } from \"@solid2-aria/types-shared\";\nimport { createMemo, createRenderEffect, untrack } from \"solid-js\";\n\nimport {\n getChildNodes,\n getFirstItem,\n getLastItem,\n} from \"../collections/get-child-nodes\";\nimport { createMultipleSelectionState } from \"../selection/create-multiple-selection-state\";\nimport type { MultipleSelectionStateProps } from \"../selection/create-multiple-selection-state\";\nimport { SelectionManager } from \"../selection/selection-manager\";\nimport type { MultipleSelectionState } from \"../selection/types\";\nimport { requireValue } from \"../utils/require-value\";\nimport type { GridNode, IGridCollection } from \"./grid-collection\";\n\nexport interface GridState<T, C extends IGridCollection<T>> {\n collection: C;\n /** A set of keys for rows that are disabled. */\n disabledKeys: Set<Key>;\n /** A selection manager to read and update row selection state. */\n selectionManager: SelectionManager;\n /**\n * Whether keyboard navigation is disabled, such as when the arrow keys should be handled by a\n * component within a cell.\n */\n isKeyboardNavigationDisabled: boolean;\n}\n\nexport interface GridStateOptions<\n T,\n C extends IGridCollection<T>,\n> extends MultipleSelectionStateProps {\n collection: C;\n disabledKeys?: Iterable<Key>;\n focusMode?: \"row\" | \"cell\";\n /**\n * Do not use unless you know what you're doing.\n * @private\n */\n UNSAFE_selectionState?: MultipleSelectionState;\n}\n\n/**\n * Provides state management for a grid component. Handles row selection and focusing a grid cell's\n * focusable child if applicable.\n */\nexport function createGridState<T extends object, C extends IGridCollection<T>>(\n props: GridStateOptions<T, C>\n): GridState<T, C> {\n const selectionState =\n untrack(() => props.UNSAFE_selectionState) ??\n createMultipleSelectionState(props);\n\n const disabledKeys = createMemo(() =>\n props.disabledKeys ? new Set(props.disabledKeys) : new Set<Key>()\n );\n\n const { setFocusedKey } = selectionState;\n // oxlint-disable-next-line solid/reactivity -- The returned callback runs in its consumer's scope.\n selectionState.setFocusedKey = (initialKey, child) => {\n let key = initialKey;\n\n // If focusMode is cell and an item is focused, focus a child cell instead.\n if (props.focusMode === \"cell\" && key !== null && key !== undefined) {\n const item = props.collection.getItem(key);\n\n if (item?.type === \"item\") {\n const children = getChildNodes(item, props.collection);\n\n key =\n child === \"last\"\n ? (getLastItem(children)?.key ?? null)\n : (getFirstItem(children)?.key ?? null);\n }\n }\n\n setFocusedKey(key, child);\n };\n\n const selectionManager = createMemo(\n () => new SelectionManager(props.collection, selectionState)\n );\n\n // Reset focused key if that item is deleted from the collection.\n let cachedCollection: C | null = null;\n\n createRenderEffect(\n () => {\n const { collection } = props;\n const { focusedKey } = selectionState;\n let nextFocusedKey: Key | null | undefined;\n\n if (\n focusedKey !== null &&\n cachedCollection &&\n !collection.getItem(focusedKey)\n ) {\n const node = cachedCollection.getItem(focusedKey);\n\n const parentNode =\n node?.parentKey !== null &&\n node?.parentKey !== undefined &&\n (node.type === \"cell\" ||\n node.type === \"rowheader\" ||\n node.type === \"column\")\n ? cachedCollection.getItem(node.parentKey)\n : node;\n\n nextFocusedKey = null;\n\n if (parentNode) {\n const cachedRows = cachedCollection.rows;\n const { rows } = collection;\n const diff = cachedRows.length - rows.length;\n\n const parentIndex = cachedRows.findIndex(\n (row) => row.key === parentNode.key\n );\n\n const index = Math.min(\n diff > 1 ? Math.max(parentIndex - diff + 1, 0) : parentIndex,\n rows.length - 1\n );\n\n const newRow = findFocusableRow(rows, index, (key) =>\n selectionManager().isDisabled(key)\n );\n\n if (newRow) {\n const childNodes = newRow.hasChildNodes\n ? [...getChildNodes(newRow, collection)]\n : [];\n\n nextFocusedKey =\n newRow.hasChildNodes &&\n parentNode !== node &&\n node &&\n node.index < childNodes.length\n ? requireValue(\n childNodes[node.index],\n \"Expected childNodes[node.index] to exist.\"\n ).key\n : newRow.key;\n }\n }\n }\n\n return { collection, nextFocusedKey };\n },\n ({ collection, nextFocusedKey }) => {\n cachedCollection = collection;\n\n if (nextFocusedKey !== undefined) {\n untrack(() => {\n selectionState.setFocusedKey(nextFocusedKey);\n });\n }\n }\n );\n\n return {\n get collection() {\n return props.collection;\n },\n get disabledKeys() {\n return disabledKeys();\n },\n get isKeyboardNavigationDisabled() {\n return false;\n },\n get selectionManager() {\n return selectionManager();\n },\n };\n}\n\nfunction findFocusableRow<T>(\n rows: GridNode<T>[],\n startIndex: number,\n isDisabled: (key: Key) => boolean\n): GridNode<T> | null {\n for (const row of rows.slice(Math.max(0, startIndex))) {\n if (!isDisabled(row.key) && row.type !== \"headerrow\") {\n return row;\n }\n }\n\n for (const row of rows.slice(0, Math.max(0, startIndex)).toReversed()) {\n if (!isDisabled(row.key) && row.type !== \"headerrow\") {\n return row;\n }\n }\n\n return null;\n}\n"],"mappings":";;;;;;;;;;;;;;;AAoDA,SAAgB,gBACd,OACiB;CACjB,MAAM,iBACJ,cAAc,MAAM,qBAAqB,KACzC,6BAA6B,KAAK;CAEpC,MAAM,eAAe,iBACnB,MAAM,eAAe,IAAI,IAAI,MAAM,YAAY,oBAAI,IAAI,IAAS,CAClE;CAEA,MAAM,EAAE,kBAAkB;CAE1B,eAAe,iBAAiB,YAAY,UAAU;EACpD,IAAI,MAAM;EAGV,IAAI,MAAM,cAAc,UAAU,QAAQ,QAAQ,QAAQ,KAAA,GAAW;GACnE,MAAM,OAAO,MAAM,WAAW,QAAQ,GAAG;GAEzC,IAAI,MAAM,SAAS,QAAQ;IACzB,MAAM,WAAW,cAAc,MAAM,MAAM,UAAU;IAErD,MACE,UAAU,SACL,YAAY,QAAQ,CAAC,EAAE,OAAO,OAC9B,aAAa,QAAQ,CAAC,EAAE,OAAO;GACxC;EACF;EAEA,cAAc,KAAK,KAAK;CAC1B;CAEA,MAAM,mBAAmB,iBACjB,IAAI,iBAAiB,MAAM,YAAY,cAAc,CAC7D;CAGA,IAAI,mBAA6B;CAEjC,yBACQ;EACJ,MAAM,EAAE,eAAe;EACvB,MAAM,EAAE,eAAe;EACvB,IAAI;EAEJ,IACE,eAAe,QACf,oBACA,CAAC,WAAW,QAAQ,UAAU,GAC9B;GACA,MAAM,OAAO,iBAAiB,QAAQ,UAAU;GAEhD,MAAM,aACJ,MAAM,cAAc,QACpB,MAAM,cAAc,KAAA,MACnB,KAAK,SAAS,UACb,KAAK,SAAS,eACd,KAAK,SAAS,YACZ,iBAAiB,QAAQ,KAAK,SAAS,IACvC;GAEN,iBAAiB;GAEjB,IAAI,YAAY;IACd,MAAM,aAAa,iBAAiB;IACpC,MAAM,EAAE,SAAS;IACjB,MAAM,OAAO,WAAW,SAAS,KAAK;IAEtC,MAAM,cAAc,WAAW,WAC5B,QAAQ,IAAI,QAAQ,WAAW,GAClC;IAOA,MAAM,SAAS,iBAAiB,MALlB,KAAK,IACjB,OAAO,IAAI,KAAK,IAAI,cAAc,OAAO,GAAG,CAAC,IAAI,aACjD,KAAK,SAAS,CAG0B,IAAI,QAC5C,iBAAiB,CAAC,CAAC,WAAW,GAAG,CACnC;IAEA,IAAI,QAAQ;KACV,MAAM,aAAa,OAAO,gBACtB,CAAC,GAAG,cAAc,QAAQ,UAAU,CAAC,IACrC,CAAC;KAEL,iBACE,OAAO,iBACP,eAAe,QACf,QACA,KAAK,QAAQ,WAAW,SACpB,aACE,WAAW,KAAK,QAChB,2CACF,CAAC,CAAC,MACF,OAAO;IACf;GACF;EACF;EAEA,OAAO;GAAE;GAAY;EAAe;CACtC,IACC,EAAE,YAAY,qBAAqB;EAClC,mBAAmB;EAEnB,IAAI,mBAAmB,KAAA,GACrB,cAAc;GACZ,eAAe,cAAc,cAAc;EAC7C,CAAC;CAEL,CACF;CAEA,OAAO;EACL,IAAI,aAAa;GACf,OAAO,MAAM;EACf;EACA,IAAI,eAAe;GACjB,OAAO,aAAa;EACtB;EACA,IAAI,+BAA+B;GACjC,OAAO;EACT;EACA,IAAI,mBAAmB;GACrB,OAAO,iBAAiB;EAC1B;CACF;AACF;AAEA,SAAS,iBACP,MACA,YACA,YACoB;CACpB,KAAK,MAAM,OAAO,KAAK,MAAM,KAAK,IAAI,GAAG,UAAU,CAAC,GAClD,IAAI,CAAC,WAAW,IAAI,GAAG,KAAK,IAAI,SAAS,aACvC,OAAO;CAIX,KAAK,MAAM,OAAO,KAAK,MAAM,GAAG,KAAK,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,WAAW,GAClE,IAAI,CAAC,WAAW,IAAI,GAAG,KAAK,IAAI,SAAS,aACvC,OAAO;CAIX,OAAO;AACT"}
@@ -0,0 +1,68 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+ /*
13
+ * Derived from Adobe React Spectrum: packages/react-stately/src/grid/GridCollection.ts.
14
+ * Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.
15
+ * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.
16
+ */
17
+ import { Collection, Key, Node } from "@solid2-aria/types-shared";
18
+ export interface IGridCollection<T> extends Collection<GridNode<T>> {
19
+ /** The number of columns in the grid. */
20
+ columnCount: number;
21
+ /** A list of rows in the grid. */
22
+ rows: GridNode<T>[];
23
+ }
24
+ export interface GridRow<T> extends Partial<GridNode<T>> {
25
+ key?: Key;
26
+ type: string;
27
+ childNodes: Iterable<Node<T>>;
28
+ }
29
+ export interface GridNode<T> extends Node<T> {
30
+ column?: GridNode<T>;
31
+ /**
32
+ * The number of columns spanned by this cell. Use `colSpan` instead.
33
+ *
34
+ * @deprecated
35
+ */
36
+ colspan?: number;
37
+ /** The number of columns spanned by this cell. */
38
+ colSpan?: number | null;
39
+ /** The column index of this cell, accounting for any colSpans. */
40
+ colIndex?: number | null;
41
+ /** The index of this node within its parent, ignoring sibling nodes that aren't of the same type. */
42
+ indexOfType?: number;
43
+ }
44
+ interface GridCollectionOptions<T> {
45
+ columnCount: number;
46
+ items: GridRow<T>[];
47
+ visitNode?: (cell: GridNode<T>) => GridNode<T>;
48
+ }
49
+ export declare class GridCollection<T> implements IGridCollection<T> {
50
+ keyMap: Map<Key, GridNode<T>>;
51
+ columnCount: number;
52
+ rows: GridNode<T>[];
53
+ constructor(opts: GridCollectionOptions<T>);
54
+ [Symbol.iterator](): IterableIterator<GridNode<T>>;
55
+ get size(): number;
56
+ getKeys(): IterableIterator<Key>;
57
+ getKeyBefore(key: Key): Key | null;
58
+ getKeyAfter(key: Key): Key | null;
59
+ getFirstKey(): Key | null;
60
+ getLastKey(): Key | null;
61
+ getItem(key: Key): GridNode<T> | null;
62
+ at(idx: number): GridNode<T> | null;
63
+ getChildren(key: Key): Iterable<GridNode<T>>;
64
+ }
65
+ /** Keeps the upstream output alias synchronized for existing collection consumers. */
66
+ export declare function setColumnSpan<T>(node: GridNode<T>, value: number | null | undefined): void;
67
+ export {};
68
+ //# sourceMappingURL=grid-collection.d.ts.map
@@ -0,0 +1,133 @@
1
+ /*
2
+ * Copyright 2020 Adobe. All rights reserved.
3
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ * you may not use this file except in compliance with the License. You may obtain a copy
5
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+ *
7
+ * Unless required by applicable law or agreed to in writing, software distributed under
8
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ * OF ANY KIND, either express or implied. See the License for the specific language
10
+ * governing permissions and limitations under the License.
11
+ */
12
+ /*
13
+ * Derived from Adobe React Spectrum: packages/react-stately/src/grid/GridCollection.ts.
14
+ * Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.
15
+ * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.
16
+ */
17
+ import { getNodeChildren } from "../collections/get-child-nodes.js";
18
+ import { getNodeProps } from "../utils/get-node-props.js";
19
+ // src/grid/grid-collection.ts
20
+ var GridCollection = class {
21
+ keyMap = /* @__PURE__ */ new Map();
22
+ columnCount;
23
+ rows;
24
+ constructor(opts) {
25
+ this.keyMap = /* @__PURE__ */ new Map();
26
+ this.columnCount = opts?.columnCount;
27
+ this.rows = [];
28
+ const remove = (node) => {
29
+ this.keyMap.delete(node.key);
30
+ for (const child of getNodeChildren(node)) if (this.keyMap.get(child.key) === child) remove(child);
31
+ };
32
+ const visit = (initialNode) => {
33
+ let node = initialNode;
34
+ const prevNode = this.keyMap.get(node.key);
35
+ if (opts.visitNode) node = opts.visitNode(node);
36
+ this.keyMap.set(node.key, node);
37
+ const childKeys = /* @__PURE__ */ new Set();
38
+ let last = null;
39
+ let rowHasCellWithColSpan = false;
40
+ if (node.type === "item") {
41
+ for (const child of getNodeChildren(node)) if (getNodeProps(child).colSpan !== void 0) {
42
+ rowHasCellWithColSpan = true;
43
+ break;
44
+ }
45
+ }
46
+ for (const childNode of getNodeChildren(node)) {
47
+ const child = childNode;
48
+ if (child.type === "cell" && rowHasCellWithColSpan) {
49
+ const span = getNodeProps(child).colSpan;
50
+ setColumnSpan(child, typeof span === "number" ? span : void 0);
51
+ child.colIndex = last ? (last.colIndex ?? last.index) + (last.colSpan ?? 1) : child.index;
52
+ }
53
+ if (child.type === "cell" && (child.parentKey === null || child.parentKey === void 0)) child.parentKey = node.key;
54
+ childKeys.add(child.key);
55
+ if (last) {
56
+ last.nextKey = child.key;
57
+ child.prevKey = last.key;
58
+ } else child.prevKey = null;
59
+ visit(child);
60
+ last = child;
61
+ }
62
+ if (last) last.nextKey = null;
63
+ if (prevNode) {
64
+ for (const child of getNodeChildren(prevNode)) if (!childKeys.has(child.key)) remove(child);
65
+ }
66
+ };
67
+ let last = null;
68
+ for (const [i, node] of opts.items.entries()) {
69
+ const rowNode = {
70
+ ...node,
71
+ childNodes: [...getNodeChildren(node)],
72
+ hasChildNodes: true,
73
+ index: node.index ?? i,
74
+ key: node.key ?? `row-${i}`,
75
+ level: node.level ?? 0,
76
+ rendered: node.rendered,
77
+ textValue: node.textValue ?? "",
78
+ type: node.type ?? "row",
79
+ value: node.value ?? null
80
+ };
81
+ if (last) {
82
+ last.nextKey = rowNode.key;
83
+ rowNode.prevKey = last.key;
84
+ } else rowNode.prevKey = null;
85
+ this.rows.push(rowNode);
86
+ visit(rowNode);
87
+ last = rowNode;
88
+ }
89
+ if (last) last.nextKey = null;
90
+ }
91
+ *[Symbol.iterator]() {
92
+ yield* this.rows;
93
+ }
94
+ get size() {
95
+ return [...this.rows].length;
96
+ }
97
+ getKeys() {
98
+ return this.keyMap.keys();
99
+ }
100
+ getKeyBefore(key) {
101
+ const node = this.keyMap.get(key);
102
+ return node ? node.prevKey ?? null : null;
103
+ }
104
+ getKeyAfter(key) {
105
+ const node = this.keyMap.get(key);
106
+ return node ? node.nextKey ?? null : null;
107
+ }
108
+ getFirstKey() {
109
+ return [...this.rows][0]?.key ?? null;
110
+ }
111
+ getLastKey() {
112
+ return [...this.rows].at(-1)?.key ?? null;
113
+ }
114
+ getItem(key) {
115
+ return this.keyMap.get(key) ?? null;
116
+ }
117
+ at(idx) {
118
+ const key = [...this.getKeys()][idx];
119
+ return key === void 0 ? null : this.getItem(key);
120
+ }
121
+ getChildren(key) {
122
+ const node = this.keyMap.get(key);
123
+ return node ? getNodeChildren(node) : [];
124
+ }
125
+ };
126
+ /** Keeps the upstream output alias synchronized for existing collection consumers. */
127
+ function setColumnSpan(node, value) {
128
+ node.colSpan = value;
129
+ node.colspan = value ?? void 0;
130
+ }
131
+ export { GridCollection, setColumnSpan };
132
+
133
+ //# sourceMappingURL=grid-collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"grid-collection.js","names":[],"sources":["../../src/grid/grid-collection.ts"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n/*\n * Derived from Adobe React Spectrum: packages/react-stately/src/grid/GridCollection.ts.\n * Modified for Solid Aria: adapted imports, collection descriptors, and reactive state APIs for Solid 2.\n * Licensed under Apache-2.0. See LICENSES/Apache-2.0.txt and NOTICE.txt at the repository root.\n */\n\nimport type { Collection, Key, Node } from \"@solid2-aria/types-shared\";\n\nimport { getNodeChildren } from \"../collections/get-child-nodes\";\nimport { getNodeProps } from \"../utils/get-node-props\";\n\nexport interface IGridCollection<T> extends Collection<GridNode<T>> {\n /** The number of columns in the grid. */\n columnCount: number;\n /** A list of rows in the grid. */\n rows: GridNode<T>[];\n}\n\nexport interface GridRow<T> extends Partial<GridNode<T>> {\n key?: Key;\n type: string;\n childNodes: Iterable<Node<T>>;\n}\n\nexport interface GridNode<T> extends Node<T> {\n column?: GridNode<T>;\n /**\n * The number of columns spanned by this cell. Use `colSpan` instead.\n *\n * @deprecated\n */\n colspan?: number;\n /** The number of columns spanned by this cell. */\n colSpan?: number | null;\n /** The column index of this cell, accounting for any colSpans. */\n colIndex?: number | null;\n /** The index of this node within its parent, ignoring sibling nodes that aren't of the same type. */\n indexOfType?: number;\n}\n\ninterface GridCollectionOptions<T> {\n columnCount: number;\n items: GridRow<T>[];\n visitNode?: (cell: GridNode<T>) => GridNode<T>;\n}\n\nexport class GridCollection<T> implements IGridCollection<T> {\n keyMap = new Map<Key, GridNode<T>>();\n columnCount: number;\n rows: GridNode<T>[];\n constructor(opts: GridCollectionOptions<T>) {\n this.keyMap = new Map();\n this.columnCount = opts?.columnCount;\n this.rows = [];\n\n const remove = (node: GridNode<T>) => {\n this.keyMap.delete(node.key);\n\n for (const child of getNodeChildren(node)) {\n if (this.keyMap.get(child.key) === child) {\n remove(child);\n }\n }\n };\n\n const visit = (initialNode: GridNode<T>) => {\n let node = initialNode;\n\n // If the node is the same object as the previous node for the same key,\n // we can skip this node and its children. We always visit columns though,\n // because we depend on order to build the columns array.\n const prevNode = this.keyMap.get(node.key);\n\n if (opts.visitNode) {\n node = opts.visitNode(node);\n }\n\n this.keyMap.set(node.key, node);\n const childKeys = new Set();\n let last: GridNode<T> | null = null;\n let rowHasCellWithColSpan = false;\n\n if (node.type === \"item\") {\n for (const child of getNodeChildren(node)) {\n if (getNodeProps(child).colSpan !== undefined) {\n rowHasCellWithColSpan = true;\n break;\n }\n }\n }\n\n for (const childNode of getNodeChildren(node)) {\n const child: GridNode<T> = childNode;\n\n if (child.type === \"cell\" && rowHasCellWithColSpan) {\n const span: unknown = getNodeProps(child).colSpan;\n setColumnSpan(child, typeof span === \"number\" ? span : undefined);\n child.colIndex = last\n ? (last.colIndex ?? last.index) + (last.colSpan ?? 1)\n : child.index;\n }\n\n if (\n child.type === \"cell\" &&\n (child.parentKey === null || child.parentKey === undefined)\n ) {\n // if child is a cell parent key isn't already established by the collection, match child node to parent row\n child.parentKey = node.key;\n }\n\n childKeys.add(child.key);\n\n if (last) {\n last.nextKey = child.key;\n child.prevKey = last.key;\n } else {\n child.prevKey = null;\n }\n\n visit(child);\n last = child;\n }\n\n if (last) {\n last.nextKey = null;\n }\n\n // Remove deleted nodes and their children from the key map\n if (prevNode) {\n for (const child of getNodeChildren(prevNode)) {\n if (!childKeys.has(child.key)) {\n remove(child);\n }\n }\n }\n };\n\n let last: GridNode<T> | null = null;\n\n for (const [i, node] of opts.items.entries()) {\n const rowNode: GridNode<T> = {\n ...node,\n // oxlint-disable-next-line typescript/no-deprecated -- Node-backed collection construction must populate the upstream childNodes output contract.\n childNodes: [...getNodeChildren(node)],\n hasChildNodes: true,\n index: node.index ?? i,\n key: node.key ?? `row-${i}`,\n level: node.level ?? 0,\n rendered: node.rendered,\n textValue: node.textValue ?? \"\",\n type: node.type ?? \"row\",\n value: node.value ?? null,\n };\n\n if (last) {\n last.nextKey = rowNode.key;\n rowNode.prevKey = last.key;\n } else {\n rowNode.prevKey = null;\n }\n\n this.rows.push(rowNode);\n visit(rowNode);\n last = rowNode;\n }\n\n if (last) {\n last.nextKey = null;\n }\n }\n *[Symbol.iterator](): IterableIterator<GridNode<T>> {\n yield* this.rows;\n }\n get size(): number {\n return [...this.rows].length;\n }\n getKeys(): IterableIterator<Key> {\n return this.keyMap.keys();\n }\n getKeyBefore(key: Key): Key | null {\n const node = this.keyMap.get(key);\n\n return node ? (node.prevKey ?? null) : null;\n }\n getKeyAfter(key: Key): Key | null {\n const node = this.keyMap.get(key);\n\n return node ? (node.nextKey ?? null) : null;\n }\n getFirstKey(): Key | null {\n return [...this.rows][0]?.key ?? null;\n }\n getLastKey(): Key | null {\n const rows = [...this.rows];\n\n return rows.at(-1)?.key ?? null;\n }\n getItem(key: Key): GridNode<T> | null {\n return this.keyMap.get(key) ?? null;\n }\n at(idx: number): GridNode<T> | null {\n const keys = [...this.getKeys()];\n const key = keys[idx];\n\n return key === undefined ? null : this.getItem(key);\n }\n getChildren(key: Key): Iterable<GridNode<T>> {\n const node = this.keyMap.get(key);\n\n return node ? getNodeChildren(node) : [];\n }\n}\n\n/** Keeps the upstream output alias synchronized for existing collection consumers. */\nexport function setColumnSpan<T>(\n node: GridNode<T>,\n value: number | null | undefined\n): void {\n node.colSpan = value;\n // oxlint-disable-next-line typescript/no-deprecated -- Preserve the legacy output alias at this compatibility boundary only.\n node.colspan = value ?? undefined;\n}\n"],"mappings":"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"}
@@ -0,0 +1,91 @@
1
+
2
+ import { AutocompleteProps, AutocompleteState, AutocompleteStateOptions, createAutocompleteState } from "./autocomplete/create-autocomplete-state.js";
3
+ import { CalendarPropsBase, CalendarSelectionMode, CalendarState, CalendarValueType, DateValue, MappedDateValue, PageBehavior, RangeCalendarState } from "./calendar/types.js";
4
+ import { CalendarProps, CalendarStateOptions, createCalendarState } from "./calendar/create-calendar-state.js";
5
+ import { DateRange, RangeCalendarProps, RangeCalendarStateOptions, createRangeCalendarState } from "./calendar/create-range-calendar-state.js";
6
+ import { DEFAULT_VALIDATION_RESULT, FormValidationContext, FormValidationProps, FormValidationState, VALID_VALIDITY_STATE, createFormValidationState, mergeValidation, privateValidationStateProp } from "./form/create-form-validation-state.js";
7
+ import { CheckboxGroupProps, CheckboxGroupState, createCheckboxGroupState } from "./checkbox/create-checkbox-group-state.js";
8
+ import { CollectionContext, CollectionElement, PartialNode, collectionChildren, isCollectionElement } from "./collections/types.js";
9
+ import { CollectionBuilder } from "./collections/collection-builder.js";
10
+ import { CollectionFactory, CollectionOptions, createCollection } from "./collections/create-collection.js";
11
+ import { compareNodeOrder, getChildNodes, getFirstItem, getLastItem, getNodeChildren, getNthItem } from "./collections/get-child-nodes.js";
12
+ import { getItemCount } from "./collections/get-item-count.js";
13
+ import { Item } from "./collections/item.js";
14
+ import { Section } from "./collections/section.js";
15
+ import { Color, ColorAxes, ColorChannel, ColorChannelRange, ColorFormat, ColorSpace } from "./color/types.js";
16
+ import { normalizeHue } from "./color/color/normalize-hue.js";
17
+ import { getColorChannels, normalizeColor, parseColor } from "./color/color.js";
18
+ import { ColorAreaProps, ColorAreaState, createColorAreaState } from "./color/create-color-area-state.js";
19
+ import { NumberFieldProps, NumberFieldState, NumberFieldStateOptions, createNumberFieldState } from "./numberfield/create-number-field-state.js";
20
+ import { ColorFieldProps, ColorFieldState, createColorFieldState } from "./color/create-color-field-state.js";
21
+ import { ColorChannelFieldProps, ColorChannelFieldState, ColorChannelFieldStateOptions, createColorChannelFieldState } from "./color/create-color-channel-field-state.js";
22
+ import { ColorPickerProps, ColorPickerState, createColorPickerState } from "./color/create-color-picker-state.js";
23
+ import { SliderProps, SliderState, SliderStateOptions, createSliderState } from "./slider/create-slider-state.js";
24
+ import { ColorSliderProps, ColorSliderState, ColorSliderStateOptions, createColorSliderState } from "./color/create-color-slider-state.js";
25
+ import { ColorWheelProps, ColorWheelState, createColorWheelState } from "./color/create-color-wheel-state.js";
26
+ import { createColor } from "./color/create-color.js";
27
+ import { FocusState, MultipleSelectionManager, MultipleSelectionState, SingleSelectionState } from "./selection/types.js";
28
+ import { MultipleSelectionStateProps, createMultipleSelectionState } from "./selection/create-multiple-selection-state.js";
29
+ import { SelectionManager } from "./selection/selection-manager.js";
30
+ import { ListProps, ListState, UNSTABLE_createFilteredListState, createListState } from "./list/create-list-state.js";
31
+ import { OverlayTriggerProps, OverlayTriggerState, createOverlayTriggerState } from "./overlays/create-overlay-trigger-state.js";
32
+ import { ComboBoxProps, ComboBoxState, ComboBoxStateOptions, ComboBoxValidationValue, MenuTriggerAction, createComboBoxState } from "./combobox/create-combo-box-state.js";
33
+ import { ListData, ListOptions, createListData } from "./data/create-list-data.js";
34
+ import { AsyncListData, AsyncListLoadFunction, AsyncListLoadOptions, AsyncListOptions, AsyncListStateUpdate, createAsyncList } from "./data/create-async-list.js";
35
+ import { TreeData, TreeOptions, createTreeData } from "./data/create-tree-data.js";
36
+ import { DateFieldProps, DatePickerProps, DateRangePickerProps, Granularity, MappedTimeValue, TimePickerProps, TimeValue } from "./datepicker/types.js";
37
+ import { DateFieldState, DateFieldStateOptions, DateSegment, DateSegmentType, createDateFieldState } from "./datepicker/create-date-field-state.js";
38
+ import { DatePickerState, DatePickerStateOptions, createDatePickerState } from "./datepicker/create-date-picker-state.js";
39
+ import { DateRangePickerState, DateRangePickerStateOptions, createDateRangePickerState } from "./datepicker/create-date-range-picker-state.js";
40
+ import { TimeFieldState, TimeFieldStateOptions, createTimeFieldState } from "./datepicker/create-time-field-state.js";
41
+ import { DisclosureGroupProps, DisclosureGroupState, createDisclosureGroupState } from "./disclosure/create-disclosure-group-state.js";
42
+ import { DisclosureProps, DisclosureState, createDisclosureState } from "./disclosure/create-disclosure-state.js";
43
+ import { DraggableCollectionState, DraggableCollectionStateOptions, createDraggableCollectionState } from "./dnd/create-draggable-collection-state.js";
44
+ import { DroppableCollectionState, DroppableCollectionStateOptions, createDroppableCollectionState } from "./dnd/create-droppable-collection-state.js";
45
+ import { enableShadowDOM, enableTableNestedRows, shadowDOM, tableNestedRows } from "./flags/flags.js";
46
+ import { GridCollection, GridNode, GridRow, IGridCollection, setColumnSpan } from "./grid/grid-collection.js";
47
+ import { GridState, GridStateOptions, createGridState } from "./grid/create-grid-state.js";
48
+ import { Point } from "./virtualizer/point.js";
49
+ import { Size } from "./virtualizer/size.js";
50
+ import { Rect, RectCorner } from "./virtualizer/rect.js";
51
+ import { LayoutInfo } from "./virtualizer/layout-info.js";
52
+ import { ResolveAfterLayoutOptions, ScrollAnchor, ScrollAnchorAxis, ScrollAnchorEdge, ScrollAnchorInfo, ScrollAnchorTracker, captureScrollAnchor, computeScrollAnchorTarget, getEdgeSnapTarget, isNearEdge, resolveScrollAdjustment } from "./virtualizer/scroll-anchor.js";
53
+ import { InvalidationContext, Mutable, VirtualizerDelegate, VirtualizerRenderOptions } from "./virtualizer/types.js";
54
+ import { ChildView, ReusableView, RootView } from "./virtualizer/reusable-view.js";
55
+ import { Virtualizer } from "./virtualizer/virtualizer.js";
56
+ import { Layout } from "./virtualizer/layout.js";
57
+ import { GridLayout, GridLayoutOptions } from "./layout/grid-layout.js";
58
+ import { LayoutNode, ListLayout, ListLayoutOptions, normalizeListLayoutOptions } from "./layout/list-layout.js";
59
+ import { ITableCollection, TableCollection, buildHeaderRows, isTableCollection } from "./table/table-collection.js";
60
+ import { TableLayout, TableLayoutProps } from "./layout/table-layout.js";
61
+ import { WaterfallLayout, WaterfallLayoutOptions } from "./layout/waterfall-layout.js";
62
+ import { SingleSelectListProps, SingleSelectListState, createSingleSelectListState } from "./list/create-single-select-list-state.js";
63
+ import { ListCollection } from "./list/list-collection.js";
64
+ import { MenuTriggerProps, MenuTriggerState, MenuTriggerType, RootMenuTriggerState, createMenuTriggerState } from "./menu/create-menu-trigger-state.js";
65
+ import { SubmenuTriggerProps, SubmenuTriggerState, createSubmenuTriggerState } from "./menu/create-submenu-trigger-state.js";
66
+ import { RadioGroupProps, RadioGroupState, createRadioGroupState } from "./radio/create-radio-group-state.js";
67
+ import { SearchFieldProps, SearchFieldState, TextFieldProps, createSearchFieldState } from "./searchfield/create-search-field-state.js";
68
+ import { SelectProps, SelectState, SelectStateOptions, createSelectState } from "./select/create-select-state.js";
69
+ import { Selection } from "./selection/selection.js";
70
+ import { StepListProps, StepListState, createStepListState } from "./steplist/create-step-list-state.js";
71
+ import { Cell, CellElement, CellProps, CellRenderer } from "./table/cell.js";
72
+ import { Column, ColumnDynamicSize, ColumnElement, ColumnProps, ColumnRenderer, ColumnSize, ColumnStaticSize } from "./table/column.js";
73
+ import { CollectionBuilderContext, TableProps, TableState, TableStateProps, UNSTABLE_createFilteredTableState, createTableState } from "./table/create-table-state.js";
74
+ import { TableColumnResizeState, TableColumnResizeStateProps, createTableColumnResizeState } from "./table/create-table-column-resize-state.js";
75
+ import { TreeGridState, TreeGridStateProps, UNSTABLE_createTreeGridState } from "./table/create-tree-grid-state.js";
76
+ import { Row, RowElement, RowProps } from "./table/row.js";
77
+ import { TableBody, TableBodyProps } from "./table/table-body.js";
78
+ import { TableColumnLayout, TableColumnLayoutOptions } from "./table/table-column-layout.js";
79
+ import { TableHeader, TableHeaderProps } from "./table/table-header.js";
80
+ import { TabListProps, TabListState, TabListStateOptions, createTabListState } from "./tabs/create-tab-list-state.js";
81
+ import { QueuedToast, ToastOptions, ToastQueue, ToastState, ToastStateProps, createToastQueue, createToastState } from "./toast/create-toast-state.js";
82
+ import { ToggleGroupProps, ToggleGroupState, createToggleGroupState } from "./toggle/create-toggle-group-state.js";
83
+ import { ToggleProps, ToggleState, ToggleStateOptions, createToggleState } from "./toggle/create-toggle-state.js";
84
+ import { Position, SelectedRange, TextSegment, TokenFieldSegment, TokenFieldValue, TokenFieldValueOptions, TokenSegment } from "./tokenfield/token-field-value.js";
85
+ import { TokenFieldProps, TokenFieldState, createTokenFieldState } from "./tokenfield/create-token-field-state.js";
86
+ import { TooltipTriggerProps, TooltipTriggerState, createTooltipTriggerState } from "./tooltip/create-tooltip-trigger-state.js";
87
+ import { TreeProps, TreeState, createTreeState } from "./tree/create-tree-state.js";
88
+ import { TreeCollection } from "./tree/tree-collection.js";
89
+ import { VirtualizerProps, VirtualizerState, createVirtualizerState } from "./virtualizer/create-virtualizer-state.js";
90
+ import { OverscanManager } from "./virtualizer/overscan-manager.js";
91
+ export { AsyncListData, AsyncListLoadFunction, AsyncListLoadOptions, AsyncListOptions, AsyncListStateUpdate, AutocompleteProps, AutocompleteState, AutocompleteStateOptions, CalendarProps, type CalendarPropsBase, type CalendarSelectionMode, type CalendarState, CalendarStateOptions, type CalendarValueType, Cell, CellElement, CellProps, CellRenderer, CheckboxGroupProps, CheckboxGroupState, ChildView, CollectionBuilder, CollectionBuilderContext, CollectionContext, CollectionElement, CollectionFactory, CollectionOptions, type Color, ColorAreaProps, ColorAreaState, type ColorAxes, type ColorChannel, ColorChannelFieldProps, ColorChannelFieldState, ColorChannelFieldStateOptions, type ColorChannelRange, ColorFieldProps, ColorFieldState, type ColorFormat, ColorPickerProps, ColorPickerState, ColorSliderProps, ColorSliderState, ColorSliderStateOptions, type ColorSpace, ColorWheelProps, ColorWheelState, Column, ColumnDynamicSize, ColumnElement, ColumnProps, ColumnRenderer, ColumnSize, ColumnStaticSize, type ComboBoxProps, type ComboBoxState, type ComboBoxStateOptions, type ComboBoxValidationValue, DEFAULT_VALIDATION_RESULT, type DateFieldProps, DateFieldState, DateFieldStateOptions, type DatePickerProps, DatePickerState, DatePickerStateOptions, DateRange, type DateRangePickerProps, DateRangePickerState, DateRangePickerStateOptions, DateSegment, DateSegmentType, type DateValue, DisclosureGroupProps, DisclosureGroupState, DisclosureProps, DisclosureState, DraggableCollectionState, DraggableCollectionStateOptions, DroppableCollectionState, DroppableCollectionStateOptions, type FocusState, FormValidationContext, FormValidationProps, FormValidationState, type Granularity, GridCollection, GridLayout, GridLayoutOptions, GridNode, GridRow, GridState, GridStateOptions, IGridCollection, ITableCollection, type InvalidationContext, Item, Layout, LayoutInfo, LayoutNode, ListCollection, type ListData, ListLayout, ListLayoutOptions, type ListOptions, ListProps, ListState, type MappedDateValue, type MappedTimeValue, type MenuTriggerAction, MenuTriggerProps, MenuTriggerState, MenuTriggerType, type MultipleSelectionManager, type MultipleSelectionState, MultipleSelectionStateProps, type Mutable, NumberFieldProps, NumberFieldState, NumberFieldStateOptions, OverlayTriggerProps, OverlayTriggerState, OverscanManager, type PageBehavior, PartialNode, Point, Position, QueuedToast, RadioGroupProps, RadioGroupState, RangeCalendarProps, type RangeCalendarState, RangeCalendarStateOptions, Rect, RectCorner, ResolveAfterLayoutOptions, ReusableView, RootMenuTriggerState, RootView, Row, RowElement, RowProps, ScrollAnchor, ScrollAnchorAxis, ScrollAnchorEdge, ScrollAnchorInfo, ScrollAnchorTracker, SearchFieldProps, SearchFieldState, Section, type SelectProps, type SelectState, type SelectStateOptions, SelectedRange, Selection, SelectionManager, SingleSelectListProps, SingleSelectListState, type SingleSelectionState, Size, SliderProps, SliderState, SliderStateOptions, StepListProps, StepListState, SubmenuTriggerProps, SubmenuTriggerState, TabListProps, TabListState, TabListStateOptions, TableBody, TableBodyProps, TableCollection, TableColumnLayout, TableColumnLayoutOptions, TableColumnResizeState, TableColumnResizeStateProps, TableHeader, TableHeaderProps, TableLayout, TableLayoutProps, TableProps, TableState, TableStateProps, TextFieldProps, TextSegment, TimeFieldState, TimeFieldStateOptions, type TimePickerProps, type TimeValue, ToastOptions, ToastQueue, ToastState, ToastStateProps, ToggleGroupProps, ToggleGroupState, ToggleProps, ToggleState, ToggleStateOptions, TokenFieldProps, TokenFieldSegment, TokenFieldState, TokenFieldValue, TokenFieldValueOptions, TokenSegment, TooltipTriggerProps, TooltipTriggerState, TreeCollection, TreeData, TreeGridState, TreeGridStateProps, TreeOptions, TreeProps, TreeState, UNSTABLE_createFilteredListState, UNSTABLE_createFilteredTableState, UNSTABLE_createTreeGridState, VALID_VALIDITY_STATE, Virtualizer, type VirtualizerDelegate, VirtualizerProps, type VirtualizerRenderOptions, VirtualizerState, WaterfallLayout, WaterfallLayoutOptions, buildHeaderRows, captureScrollAnchor, collectionChildren, compareNodeOrder, computeScrollAnchorTarget, createAsyncList, createAutocompleteState, createCalendarState, createCheckboxGroupState, createCollection, createColor, createColorAreaState, createColorChannelFieldState, createColorFieldState, createColorPickerState, createColorSliderState, createColorWheelState, createComboBoxState, createDateFieldState, createDatePickerState, createDateRangePickerState, createDisclosureGroupState, createDisclosureState, createDraggableCollectionState, createDroppableCollectionState, createFormValidationState, createGridState, createListData, createListState, createMenuTriggerState, createMultipleSelectionState, createNumberFieldState, createOverlayTriggerState, createRadioGroupState, createRangeCalendarState, createSearchFieldState, createSelectState, createSingleSelectListState, createSliderState, createStepListState, createSubmenuTriggerState, createTabListState, createTableColumnResizeState, createTableState, createTimeFieldState, createToastQueue, createToastState, createToggleGroupState, createToggleState, createTokenFieldState, createTooltipTriggerState, createTreeData, createTreeState, createVirtualizerState, enableShadowDOM, enableTableNestedRows, getChildNodes, getColorChannels, getEdgeSnapTarget, getFirstItem, getItemCount, getLastItem, getNodeChildren, getNthItem, isCollectionElement, isNearEdge, isTableCollection, mergeValidation, normalizeColor, normalizeHue, normalizeListLayoutOptions, parseColor, privateValidationStateProp, resolveScrollAdjustment, setColumnSpan, shadowDOM, tableNestedRows };
package/dist/index.js ADDED
@@ -0,0 +1,86 @@
1
+
2
+ import { createAutocompleteState } from "./autocomplete/create-autocomplete-state.js";
3
+ import { createCalendarState } from "./calendar/create-calendar-state.js";
4
+ import { createRangeCalendarState } from "./calendar/create-range-calendar-state.js";
5
+ import { DEFAULT_VALIDATION_RESULT, FormValidationContext, VALID_VALIDITY_STATE, createFormValidationState, mergeValidation, privateValidationStateProp } from "./form/create-form-validation-state.js";
6
+ import { createCheckboxGroupState } from "./checkbox/create-checkbox-group-state.js";
7
+ import { collectionChildren, isCollectionElement } from "./collections/types.js";
8
+ import { CollectionBuilder } from "./collections/collection-builder.js";
9
+ import { createCollection } from "./collections/create-collection.js";
10
+ import { compareNodeOrder, getChildNodes, getFirstItem, getLastItem, getNodeChildren, getNthItem } from "./collections/get-child-nodes.js";
11
+ import { getItemCount } from "./collections/get-item-count.js";
12
+ import { Item } from "./collections/item.js";
13
+ import { Section } from "./collections/section.js";
14
+ import { normalizeHue } from "./color/color/normalize-hue.js";
15
+ import { getColorChannels, normalizeColor, parseColor } from "./color/color.js";
16
+ import { createColor } from "./color/create-color.js";
17
+ import { createColorAreaState } from "./color/create-color-area-state.js";
18
+ import { createNumberFieldState } from "./numberfield/create-number-field-state.js";
19
+ import { createColorChannelFieldState } from "./color/create-color-channel-field-state.js";
20
+ import { createColorFieldState } from "./color/create-color-field-state.js";
21
+ import { createColorPickerState } from "./color/create-color-picker-state.js";
22
+ import { createSliderState } from "./slider/create-slider-state.js";
23
+ import { createColorSliderState } from "./color/create-color-slider-state.js";
24
+ import { createColorWheelState } from "./color/create-color-wheel-state.js";
25
+ import { Selection } from "./selection/selection.js";
26
+ import { createMultipleSelectionState } from "./selection/create-multiple-selection-state.js";
27
+ import { SelectionManager } from "./selection/selection-manager.js";
28
+ import { ListCollection } from "./list/list-collection.js";
29
+ import { UNSTABLE_createFilteredListState, createListState } from "./list/create-list-state.js";
30
+ import { createOverlayTriggerState } from "./overlays/create-overlay-trigger-state.js";
31
+ import { createComboBoxState } from "./combobox/create-combo-box-state.js";
32
+ import { createListData } from "./data/create-list-data.js";
33
+ import { createAsyncList } from "./data/create-async-list.js";
34
+ import { createTreeData } from "./data/create-tree-data.js";
35
+ import { createDateFieldState } from "./datepicker/create-date-field-state.js";
36
+ import { createDatePickerState } from "./datepicker/create-date-picker-state.js";
37
+ import { createDateRangePickerState } from "./datepicker/create-date-range-picker-state.js";
38
+ import { createTimeFieldState } from "./datepicker/create-time-field-state.js";
39
+ import { createDisclosureGroupState } from "./disclosure/create-disclosure-group-state.js";
40
+ import { createDisclosureState } from "./disclosure/create-disclosure-state.js";
41
+ import { createDraggableCollectionState } from "./dnd/create-draggable-collection-state.js";
42
+ import { createDroppableCollectionState } from "./dnd/create-droppable-collection-state.js";
43
+ import { enableShadowDOM, enableTableNestedRows, shadowDOM, tableNestedRows } from "./flags/flags.js";
44
+ import { createGridState } from "./grid/create-grid-state.js";
45
+ import { GridCollection, setColumnSpan } from "./grid/grid-collection.js";
46
+ import { Layout } from "./virtualizer/layout.js";
47
+ import { LayoutInfo } from "./virtualizer/layout-info.js";
48
+ import { Point } from "./virtualizer/point.js";
49
+ import { Rect } from "./virtualizer/rect.js";
50
+ import { Size } from "./virtualizer/size.js";
51
+ import { GridLayout } from "./layout/grid-layout.js";
52
+ import { ListLayout, normalizeListLayoutOptions } from "./layout/list-layout.js";
53
+ import { TableCollection, buildHeaderRows, isTableCollection } from "./table/table-collection.js";
54
+ import { TableColumnLayout } from "./table/table-column-layout.js";
55
+ import { TableLayout } from "./layout/table-layout.js";
56
+ import { WaterfallLayout } from "./layout/waterfall-layout.js";
57
+ import { createSingleSelectListState } from "./list/create-single-select-list-state.js";
58
+ import { createMenuTriggerState } from "./menu/create-menu-trigger-state.js";
59
+ import { createSubmenuTriggerState } from "./menu/create-submenu-trigger-state.js";
60
+ import { createRadioGroupState } from "./radio/create-radio-group-state.js";
61
+ import { createSearchFieldState } from "./searchfield/create-search-field-state.js";
62
+ import { createSelectState } from "./select/create-select-state.js";
63
+ import { createStepListState } from "./steplist/create-step-list-state.js";
64
+ import { Cell } from "./table/cell.js";
65
+ import { Column } from "./table/column.js";
66
+ import { createTableColumnResizeState } from "./table/create-table-column-resize-state.js";
67
+ import { UNSTABLE_createFilteredTableState, createTableState } from "./table/create-table-state.js";
68
+ import { UNSTABLE_createTreeGridState } from "./table/create-tree-grid-state.js";
69
+ import { Row } from "./table/row.js";
70
+ import { TableBody } from "./table/table-body.js";
71
+ import { TableHeader } from "./table/table-header.js";
72
+ import { createTabListState } from "./tabs/create-tab-list-state.js";
73
+ import { ToastQueue, createToastQueue, createToastState } from "./toast/create-toast-state.js";
74
+ import { createToggleGroupState } from "./toggle/create-toggle-group-state.js";
75
+ import { createToggleState } from "./toggle/create-toggle-state.js";
76
+ import { SelectedRange, TokenFieldValue } from "./tokenfield/token-field-value.js";
77
+ import { createTokenFieldState } from "./tokenfield/create-token-field-state.js";
78
+ import { createTooltipTriggerState } from "./tooltip/create-tooltip-trigger-state.js";
79
+ import { TreeCollection } from "./tree/tree-collection.js";
80
+ import { createTreeState } from "./tree/create-tree-state.js";
81
+ import { OverscanManager } from "./virtualizer/overscan-manager.js";
82
+ import { ChildView, ReusableView, RootView } from "./virtualizer/reusable-view.js";
83
+ import { ScrollAnchorTracker, captureScrollAnchor, computeScrollAnchorTarget, getEdgeSnapTarget, isNearEdge, resolveScrollAdjustment } from "./virtualizer/scroll-anchor.js";
84
+ import { Virtualizer } from "./virtualizer/virtualizer.js";
85
+ import { createVirtualizerState } from "./virtualizer/create-virtualizer-state.js";
86
+ export { Cell, ChildView, CollectionBuilder, Column, DEFAULT_VALIDATION_RESULT, FormValidationContext, GridCollection, GridLayout, Item, Layout, LayoutInfo, ListCollection, ListLayout, OverscanManager, Point, Rect, ReusableView, RootView, Row, ScrollAnchorTracker, Section, SelectedRange, Selection, SelectionManager, Size, TableBody, TableCollection, TableColumnLayout, TableHeader, TableLayout, ToastQueue, TokenFieldValue, TreeCollection, UNSTABLE_createFilteredListState, UNSTABLE_createFilteredTableState, UNSTABLE_createTreeGridState, VALID_VALIDITY_STATE, Virtualizer, WaterfallLayout, buildHeaderRows, captureScrollAnchor, collectionChildren, compareNodeOrder, computeScrollAnchorTarget, createAsyncList, createAutocompleteState, createCalendarState, createCheckboxGroupState, createCollection, createColor, createColorAreaState, createColorChannelFieldState, createColorFieldState, createColorPickerState, createColorSliderState, createColorWheelState, createComboBoxState, createDateFieldState, createDatePickerState, createDateRangePickerState, createDisclosureGroupState, createDisclosureState, createDraggableCollectionState, createDroppableCollectionState, createFormValidationState, createGridState, createListData, createListState, createMenuTriggerState, createMultipleSelectionState, createNumberFieldState, createOverlayTriggerState, createRadioGroupState, createRangeCalendarState, createSearchFieldState, createSelectState, createSingleSelectListState, createSliderState, createStepListState, createSubmenuTriggerState, createTabListState, createTableColumnResizeState, createTableState, createTimeFieldState, createToastQueue, createToastState, createToggleGroupState, createToggleState, createTokenFieldState, createTooltipTriggerState, createTreeData, createTreeState, createVirtualizerState, enableShadowDOM, enableTableNestedRows, getChildNodes, getColorChannels, getEdgeSnapTarget, getFirstItem, getItemCount, getLastItem, getNodeChildren, getNthItem, isCollectionElement, isNearEdge, isTableCollection, mergeValidation, normalizeColor, normalizeHue, normalizeListLayoutOptions, parseColor, privateValidationStateProp, resolveScrollAdjustment, setColumnSpan, shadowDOM, tableNestedRows };