@gemologic/sheen 0.1.0-rc.0 → 0.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 (484) hide show
  1. package/README.md +11 -1
  2. package/THIRD_PARTY_NOTICES.md +18 -0
  3. package/dist/primitives/Accordion.js +1 -1
  4. package/dist/primitives/Collapsible.js +1 -1
  5. package/dist/primitives/Combobox.js +1 -1
  6. package/dist/primitives/CommandPalette.js +2 -2
  7. package/dist/primitives/ContextMenu.js +2 -2
  8. package/dist/primitives/Dialog.js +1 -1
  9. package/dist/primitives/DropdownMenu.js +2 -2
  10. package/dist/primitives/LinkTooltip.js +1 -1
  11. package/dist/primitives/Popover.js +1 -1
  12. package/dist/primitives/Select.js +1 -1
  13. package/dist/primitives/Tabs.js +1 -1
  14. package/dist/primitives/Tooltip.js +1 -1
  15. package/dist/primitives/tooltip-layer.js +1 -1
  16. package/dist/theme/ThemeProvider.js +30 -30
  17. package/dist/theme/intl.js +4 -4
  18. package/dist/utils/polymorphic.d.ts +1 -1
  19. package/dist/vite.d.ts +3 -0
  20. package/dist/vite.js +54 -0
  21. package/package.json +71 -5
  22. package/src/primitives/Accordion.tsx +1 -1
  23. package/src/primitives/Collapsible.tsx +1 -1
  24. package/src/primitives/Combobox.tsx +1 -1
  25. package/src/primitives/CommandPalette.tsx +2 -2
  26. package/src/primitives/ContextMenu.tsx +2 -2
  27. package/src/primitives/Dialog.tsx +1 -1
  28. package/src/primitives/DropdownMenu.tsx +2 -2
  29. package/src/primitives/LinkTooltip.tsx +1 -1
  30. package/src/primitives/Popover.tsx +1 -1
  31. package/src/primitives/Select.tsx +1 -1
  32. package/src/primitives/Tabs.tsx +1 -1
  33. package/src/primitives/Tooltip.tsx +1 -1
  34. package/src/primitives/tooltip-layer.tsx +1 -1
  35. package/src/theme/ThemeProvider.tsx +7 -3
  36. package/src/theme/intl.ts +4 -2
  37. package/src/utils/polymorphic.ts +1 -1
  38. package/src/vite.ts +51 -0
  39. package/vendor/cmdk-solid/LICENSE +14 -0
  40. package/vendor/cmdk-solid/chunk/5WIGIOAJ.jsx +98 -0
  41. package/vendor/cmdk-solid/chunk/IOVUHIGA.js +96 -0
  42. package/vendor/cmdk-solid/command-score.cjs +98 -0
  43. package/vendor/cmdk-solid/command-score.d.cts +4 -0
  44. package/vendor/cmdk-solid/command-score.d.ts +4 -0
  45. package/vendor/cmdk-solid/command-score.js +2 -0
  46. package/vendor/cmdk-solid/command-score.jsx +7 -0
  47. package/vendor/cmdk-solid/index.cjs +827 -0
  48. package/vendor/cmdk-solid/index.d.cts +184 -0
  49. package/vendor/cmdk-solid/index.d.ts +184 -0
  50. package/vendor/cmdk-solid/index.js +729 -0
  51. package/vendor/cmdk-solid/index.jsx +666 -0
  52. package/vendor/integrity.json +450 -0
  53. package/vendor/kobalte-core/LICENSE.md +21 -0
  54. package/vendor/kobalte-core/NOTICE.txt +231 -0
  55. package/vendor/kobalte-core/accordion/index.d.ts +10 -0
  56. package/vendor/kobalte-core/accordion/index.js +2 -0
  57. package/vendor/kobalte-core/accordion/index.jsx +33 -0
  58. package/vendor/kobalte-core/alert/index.d.ts +5 -0
  59. package/vendor/kobalte-core/alert/index.js +2 -0
  60. package/vendor/kobalte-core/alert/index.jsx +11 -0
  61. package/vendor/kobalte-core/alert-dialog/index.d.ts +10 -0
  62. package/vendor/kobalte-core/alert-dialog/index.js +3 -0
  63. package/vendor/kobalte-core/alert-dialog/index.jsx +40 -0
  64. package/vendor/kobalte-core/badge/index.d.ts +23 -0
  65. package/vendor/kobalte-core/badge/index.js +24 -0
  66. package/vendor/kobalte-core/badge/index.jsx +24 -0
  67. package/vendor/kobalte-core/breadcrumbs/index.d.ts +5 -0
  68. package/vendor/kobalte-core/breadcrumbs/index.js +2 -0
  69. package/vendor/kobalte-core/breadcrumbs/index.jsx +19 -0
  70. package/vendor/kobalte-core/button/index.d.ts +6 -0
  71. package/vendor/kobalte-core/button/index.js +2 -0
  72. package/vendor/kobalte-core/button/index.jsx +12 -0
  73. package/vendor/kobalte-core/button-root-da654b3e.d.ts +28 -0
  74. package/vendor/kobalte-core/checkbox/index.d.ts +8 -0
  75. package/vendor/kobalte-core/checkbox/index.js +2 -0
  76. package/vendor/kobalte-core/checkbox/index.jsx +35 -0
  77. package/vendor/kobalte-core/chunk/272QBW42.js +712 -0
  78. package/vendor/kobalte-core/chunk/27MLNS66.js +353 -0
  79. package/vendor/kobalte-core/chunk/2RVGL3MU.js +45 -0
  80. package/vendor/kobalte-core/chunk/2UV3VFID.jsx +431 -0
  81. package/vendor/kobalte-core/chunk/2X5XWQIS.js +19 -0
  82. package/vendor/kobalte-core/chunk/2YCOH52P.js +81 -0
  83. package/vendor/kobalte-core/chunk/3565MS4H.jsx +127 -0
  84. package/vendor/kobalte-core/chunk/3ARTUDH2.jsx +1633 -0
  85. package/vendor/kobalte-core/chunk/3D6FM2PJ.js +1001 -0
  86. package/vendor/kobalte-core/chunk/3DLZMX4Z.jsx +81 -0
  87. package/vendor/kobalte-core/chunk/3DZKSKAQ.jsx +366 -0
  88. package/vendor/kobalte-core/chunk/3JA5IX2L.jsx +52 -0
  89. package/vendor/kobalte-core/chunk/3NGA46QE.js +116 -0
  90. package/vendor/kobalte-core/chunk/3QQCO6IA.js +46 -0
  91. package/vendor/kobalte-core/chunk/3T74IGH6.js +860 -0
  92. package/vendor/kobalte-core/chunk/3XNSRO2W.jsx +226 -0
  93. package/vendor/kobalte-core/chunk/43XIKO67.js +99 -0
  94. package/vendor/kobalte-core/chunk/4VWIKJ7Q.jsx +842 -0
  95. package/vendor/kobalte-core/chunk/53Y5XP3B.js +61 -0
  96. package/vendor/kobalte-core/chunk/5WXHJDCZ.jsx +10 -0
  97. package/vendor/kobalte-core/chunk/5ZKAE4VZ.js +8 -0
  98. package/vendor/kobalte-core/chunk/66KLKSW3.js +36 -0
  99. package/vendor/kobalte-core/chunk/6TDKM7BK.jsx +815 -0
  100. package/vendor/kobalte-core/chunk/6Y7B2NEO.js +21 -0
  101. package/vendor/kobalte-core/chunk/7ABWW5DT.jsx +483 -0
  102. package/vendor/kobalte-core/chunk/7CVNMTYF.js +171 -0
  103. package/vendor/kobalte-core/chunk/7DPKSDZL.js +447 -0
  104. package/vendor/kobalte-core/chunk/7I44E2QD.js +190 -0
  105. package/vendor/kobalte-core/chunk/7LCANGHD.js +29 -0
  106. package/vendor/kobalte-core/chunk/7OVKXYPU.js +90 -0
  107. package/vendor/kobalte-core/chunk/7TPOQ36Z.js +202 -0
  108. package/vendor/kobalte-core/chunk/7ZHN3PYD.js +30 -0
  109. package/vendor/kobalte-core/chunk/ANN3A2QM.js +29 -0
  110. package/vendor/kobalte-core/chunk/AT6SKIG6.js +119 -0
  111. package/vendor/kobalte-core/chunk/AWVDBFMO.jsx +280 -0
  112. package/vendor/kobalte-core/chunk/B2CSS4CB.js +36 -0
  113. package/vendor/kobalte-core/chunk/BDJEWKR2.jsx +153 -0
  114. package/vendor/kobalte-core/chunk/BK63AFY4.js +348 -0
  115. package/vendor/kobalte-core/chunk/BLN63FDC.js +40 -0
  116. package/vendor/kobalte-core/chunk/BU4OFZP5.jsx +146 -0
  117. package/vendor/kobalte-core/chunk/CLZZ2KZC.js +152 -0
  118. package/vendor/kobalte-core/chunk/CODJDE4S.jsx +131 -0
  119. package/vendor/kobalte-core/chunk/CWAEFUDR.js +732 -0
  120. package/vendor/kobalte-core/chunk/DBKNBLZP.js +395 -0
  121. package/vendor/kobalte-core/chunk/DTAYBJDT.jsx +339 -0
  122. package/vendor/kobalte-core/chunk/DX4MAOJL.js +653 -0
  123. package/vendor/kobalte-core/chunk/E4R2EMM4.js +10 -0
  124. package/vendor/kobalte-core/chunk/E53DB7BS.jsx +34 -0
  125. package/vendor/kobalte-core/chunk/EHGSTO6V.jsx +138 -0
  126. package/vendor/kobalte-core/chunk/EJ5I5XML.jsx +1 -0
  127. package/vendor/kobalte-core/chunk/ET5T45DO.js +17 -0
  128. package/vendor/kobalte-core/chunk/EYO4IMPK.jsx +867 -0
  129. package/vendor/kobalte-core/chunk/FINWO3A5.jsx +21 -0
  130. package/vendor/kobalte-core/chunk/FKUFPCQ6.jsx +120 -0
  131. package/vendor/kobalte-core/chunk/FLVHQV4A.jsx +22 -0
  132. package/vendor/kobalte-core/chunk/FN6EICGO.jsx +44 -0
  133. package/vendor/kobalte-core/chunk/FOXVCQFV.jsx +48 -0
  134. package/vendor/kobalte-core/chunk/G3KI2B4X.js +228 -0
  135. package/vendor/kobalte-core/chunk/G4JQYERT.jsx +1 -0
  136. package/vendor/kobalte-core/chunk/GAVSAJBM.jsx +86 -0
  137. package/vendor/kobalte-core/chunk/GIRHAWVP.jsx +46 -0
  138. package/vendor/kobalte-core/chunk/GROIIANN.jsx +32 -0
  139. package/vendor/kobalte-core/chunk/GSF7SFRW.jsx +98 -0
  140. package/vendor/kobalte-core/chunk/GXANOQ5B.jsx +66 -0
  141. package/vendor/kobalte-core/chunk/H7BK6JF7.jsx +489 -0
  142. package/vendor/kobalte-core/chunk/HGKTPMYY.js +1332 -0
  143. package/vendor/kobalte-core/chunk/HWIPVJ7H.js +121 -0
  144. package/vendor/kobalte-core/chunk/I2LBZHJH.js +144 -0
  145. package/vendor/kobalte-core/chunk/ICNSTULC.js +33 -0
  146. package/vendor/kobalte-core/chunk/IGYOA2ZZ.jsx +33 -0
  147. package/vendor/kobalte-core/chunk/IN725QRS.js +175 -0
  148. package/vendor/kobalte-core/chunk/INFLGCRV.js +123 -0
  149. package/vendor/kobalte-core/chunk/JEP7F7FN.js +89 -0
  150. package/vendor/kobalte-core/chunk/JGNXQB3J.js +140 -0
  151. package/vendor/kobalte-core/chunk/JHMNWOLY.jsx +87 -0
  152. package/vendor/kobalte-core/chunk/JNCCF6MP.jsx +12 -0
  153. package/vendor/kobalte-core/chunk/K6ON3K7Z.js +93 -0
  154. package/vendor/kobalte-core/chunk/K6P57S75.js +23 -0
  155. package/vendor/kobalte-core/chunk/KEL2LLJM.jsx +244 -0
  156. package/vendor/kobalte-core/chunk/KQVCPTCE.js +316 -0
  157. package/vendor/kobalte-core/chunk/KR2RRKPK.jsx +197 -0
  158. package/vendor/kobalte-core/chunk/KVL5CS3M.jsx +37 -0
  159. package/vendor/kobalte-core/chunk/LP6E37CW.jsx +228 -0
  160. package/vendor/kobalte-core/chunk/LUHKRAPV.js +129 -0
  161. package/vendor/kobalte-core/chunk/LV6CC6HJ.js +226 -0
  162. package/vendor/kobalte-core/chunk/MUDPLHYE.js +56 -0
  163. package/vendor/kobalte-core/chunk/NEFPNRTI.jsx +426 -0
  164. package/vendor/kobalte-core/chunk/NY67XGGP.js +216 -0
  165. package/vendor/kobalte-core/chunk/OGE3DKII.jsx +413 -0
  166. package/vendor/kobalte-core/chunk/OK5BA5VH.jsx +533 -0
  167. package/vendor/kobalte-core/chunk/OPHDMVQK.jsx +217 -0
  168. package/vendor/kobalte-core/chunk/OPRD3XHK.js +207 -0
  169. package/vendor/kobalte-core/chunk/OU7DYFTQ.jsx +191 -0
  170. package/vendor/kobalte-core/chunk/OYES4GOP.jsx +21 -0
  171. package/vendor/kobalte-core/chunk/P6IXTWXS.jsx +197 -0
  172. package/vendor/kobalte-core/chunk/PBBM7A6R.jsx +113 -0
  173. package/vendor/kobalte-core/chunk/PKWJSNR5.js +474 -0
  174. package/vendor/kobalte-core/chunk/PTVG6YKC.js +148 -0
  175. package/vendor/kobalte-core/chunk/PTWD4LYA.jsx +537 -0
  176. package/vendor/kobalte-core/chunk/PYSNB6I6.jsx +324 -0
  177. package/vendor/kobalte-core/chunk/Q2T3QQUA.js +419 -0
  178. package/vendor/kobalte-core/chunk/QEMPLYZX.js +28 -0
  179. package/vendor/kobalte-core/chunk/QIRIOMOH.js +338 -0
  180. package/vendor/kobalte-core/chunk/QJIB6BDF.jsx +30 -0
  181. package/vendor/kobalte-core/chunk/QJK6CGTE.js +293 -0
  182. package/vendor/kobalte-core/chunk/R4V3527Z.js +130 -0
  183. package/vendor/kobalte-core/chunk/R5JXRO27.js +1 -0
  184. package/vendor/kobalte-core/chunk/RFN6X5VH.jsx +1058 -0
  185. package/vendor/kobalte-core/chunk/SD3NY4DU.js +344 -0
  186. package/vendor/kobalte-core/chunk/SLRA6PIF.jsx +263 -0
  187. package/vendor/kobalte-core/chunk/SOM3K36D.jsx +191 -0
  188. package/vendor/kobalte-core/chunk/STGRFJHZ.js +43 -0
  189. package/vendor/kobalte-core/chunk/T4C3DMHT.jsx +52 -0
  190. package/vendor/kobalte-core/chunk/TDH5Z2ZB.js +263 -0
  191. package/vendor/kobalte-core/chunk/TP2BLHDF.jsx +284 -0
  192. package/vendor/kobalte-core/chunk/TS4C47MF.js +22 -0
  193. package/vendor/kobalte-core/chunk/TSB6MOZK.jsx +242 -0
  194. package/vendor/kobalte-core/chunk/TVVHJCOX.js +204 -0
  195. package/vendor/kobalte-core/chunk/TY22MKYR.jsx +996 -0
  196. package/vendor/kobalte-core/chunk/UEEZAKDC.js +1 -0
  197. package/vendor/kobalte-core/chunk/UESR3MKV.jsx +743 -0
  198. package/vendor/kobalte-core/chunk/UGE6PPGT.jsx +220 -0
  199. package/vendor/kobalte-core/chunk/UKTBL2JL.jsx +88 -0
  200. package/vendor/kobalte-core/chunk/V25KEN4T.jsx +399 -0
  201. package/vendor/kobalte-core/chunk/VI7QYH27.jsx +33 -0
  202. package/vendor/kobalte-core/chunk/W4MWOWKG.js +310 -0
  203. package/vendor/kobalte-core/chunk/WAUM5GOD.jsx +68 -0
  204. package/vendor/kobalte-core/chunk/WHII6HHI.js +145 -0
  205. package/vendor/kobalte-core/chunk/WKVBAVXH.jsx +378 -0
  206. package/vendor/kobalte-core/chunk/WR5BIFYV.js +780 -0
  207. package/vendor/kobalte-core/chunk/XLBXJFYN.js +108 -0
  208. package/vendor/kobalte-core/chunk/XNF3WGZ2.jsx +176 -0
  209. package/vendor/kobalte-core/chunk/XOC6SOOC.jsx +53 -0
  210. package/vendor/kobalte-core/chunk/XTJD7L6B.jsx +101 -0
  211. package/vendor/kobalte-core/chunk/XUUROM4M.jsx +120 -0
  212. package/vendor/kobalte-core/chunk/YA7DCYMB.js +80 -0
  213. package/vendor/kobalte-core/chunk/YFEENJN5.jsx +41 -0
  214. package/vendor/kobalte-core/chunk/YGDQXQ2B.js +28 -0
  215. package/vendor/kobalte-core/chunk/YKGT7A57.js +85 -0
  216. package/vendor/kobalte-core/chunk/YPUNLYJC.js +268 -0
  217. package/vendor/kobalte-core/chunk/YSW4UOAR.js +40 -0
  218. package/vendor/kobalte-core/chunk/ZAGMEN2K.jsx +152 -0
  219. package/vendor/kobalte-core/chunk/ZG3NR5OC.jsx +120 -0
  220. package/vendor/kobalte-core/chunk/ZZYKR3VO.jsx +42 -0
  221. package/vendor/kobalte-core/collapsible/index.d.ts +7 -0
  222. package/vendor/kobalte-core/collapsible/index.js +2 -0
  223. package/vendor/kobalte-core/collapsible/index.jsx +23 -0
  224. package/vendor/kobalte-core/collapsible-trigger-6358fcd4.d.ts +84 -0
  225. package/vendor/kobalte-core/color-area/index.d.ts +189 -0
  226. package/vendor/kobalte-core/color-area/index.js +724 -0
  227. package/vendor/kobalte-core/color-area/index.jsx +777 -0
  228. package/vendor/kobalte-core/color-channel-field/index.d.ts +49 -0
  229. package/vendor/kobalte-core/color-channel-field/index.js +72 -0
  230. package/vendor/kobalte-core/color-channel-field/index.jsx +117 -0
  231. package/vendor/kobalte-core/color-field/index.d.ts +48 -0
  232. package/vendor/kobalte-core/color-field/index.js +114 -0
  233. package/vendor/kobalte-core/color-field/index.jsx +155 -0
  234. package/vendor/kobalte-core/color-mode/index.d.ts +78 -0
  235. package/vendor/kobalte-core/color-mode/index.js +2 -0
  236. package/vendor/kobalte-core/color-mode/index.jsx +28 -0
  237. package/vendor/kobalte-core/color-slider/index.d.ts +109 -0
  238. package/vendor/kobalte-core/color-slider/index.js +183 -0
  239. package/vendor/kobalte-core/color-slider/index.jsx +255 -0
  240. package/vendor/kobalte-core/color-swatch/index.d.ts +39 -0
  241. package/vendor/kobalte-core/color-swatch/index.js +48 -0
  242. package/vendor/kobalte-core/color-swatch/index.jsx +64 -0
  243. package/vendor/kobalte-core/color-wheel/index.d.ts +166 -0
  244. package/vendor/kobalte-core/color-wheel/index.js +620 -0
  245. package/vendor/kobalte-core/color-wheel/index.jsx +640 -0
  246. package/vendor/kobalte-core/colors/index.d.ts +15 -0
  247. package/vendor/kobalte-core/colors/index.js +2 -0
  248. package/vendor/kobalte-core/colors/index.jsx +17 -0
  249. package/vendor/kobalte-core/combobox/index.d.ts +20 -0
  250. package/vendor/kobalte-core/combobox/index.js +8 -0
  251. package/vendor/kobalte-core/combobox/index.jsx +80 -0
  252. package/vendor/kobalte-core/combobox-root-3702d1f6.d.ts +382 -0
  253. package/vendor/kobalte-core/context-menu/index.d.ts +15 -0
  254. package/vendor/kobalte-core/context-menu/index.js +5 -0
  255. package/vendor/kobalte-core/context-menu/index.jsx +75 -0
  256. package/vendor/kobalte-core/create-list-state-d9a0f1f2.d.ts +232 -0
  257. package/vendor/kobalte-core/dialog/index.d.ts +10 -0
  258. package/vendor/kobalte-core/dialog/index.js +2 -0
  259. package/vendor/kobalte-core/dialog/index.jsx +40 -0
  260. package/vendor/kobalte-core/dialog-trigger-f415bd9b.d.ts +184 -0
  261. package/vendor/kobalte-core/dismissable-layer/index.d.ts +51 -0
  262. package/vendor/kobalte-core/dismissable-layer/index.js +2 -0
  263. package/vendor/kobalte-core/dismissable-layer/index.jsx +12 -0
  264. package/vendor/kobalte-core/dropdown-menu/index.d.ts +18 -0
  265. package/vendor/kobalte-core/dropdown-menu/index.js +5 -0
  266. package/vendor/kobalte-core/dropdown-menu/index.jsx +73 -0
  267. package/vendor/kobalte-core/file-field/index.d.ts +221 -0
  268. package/vendor/kobalte-core/file-field/index.js +539 -0
  269. package/vendor/kobalte-core/file-field/index.jsx +564 -0
  270. package/vendor/kobalte-core/form-control-description-330657bc.d.ts +49 -0
  271. package/vendor/kobalte-core/form-control-error-message-9efcbea8.d.ts +25 -0
  272. package/vendor/kobalte-core/form-control-label-2a5ca7a3.d.ts +22 -0
  273. package/vendor/kobalte-core/hover-card/index.d.ts +11 -0
  274. package/vendor/kobalte-core/hover-card/index.js +3 -0
  275. package/vendor/kobalte-core/hover-card/index.jsx +33 -0
  276. package/vendor/kobalte-core/i18n/index.d.ts +81 -0
  277. package/vendor/kobalte-core/i18n/index.js +2 -0
  278. package/vendor/kobalte-core/i18n/index.jsx +28 -0
  279. package/vendor/kobalte-core/image/index.d.ts +5 -0
  280. package/vendor/kobalte-core/image/index.js +2 -0
  281. package/vendor/kobalte-core/image/index.jsx +17 -0
  282. package/vendor/kobalte-core/index-19a0ff67.d.ts +180 -0
  283. package/vendor/kobalte-core/index-1a4410b1.d.ts +184 -0
  284. package/vendor/kobalte-core/index-29c57b8d.d.ts +90 -0
  285. package/vendor/kobalte-core/index-2a97f0d5.d.ts +259 -0
  286. package/vendor/kobalte-core/index-339032c6.d.ts +24 -0
  287. package/vendor/kobalte-core/index-3a4165aa.d.ts +38 -0
  288. package/vendor/kobalte-core/index-45d19411.d.ts +181 -0
  289. package/vendor/kobalte-core/index-47114d4c.d.ts +153 -0
  290. package/vendor/kobalte-core/index-4933558f.d.ts +22 -0
  291. package/vendor/kobalte-core/index-4cb1a0c7.d.ts +178 -0
  292. package/vendor/kobalte-core/index-544033ad.d.ts +148 -0
  293. package/vendor/kobalte-core/index-5eae1bf9.d.ts +145 -0
  294. package/vendor/kobalte-core/index-64ed0578.d.ts +47 -0
  295. package/vendor/kobalte-core/index-68c6e688.d.ts +125 -0
  296. package/vendor/kobalte-core/index-71913923.d.ts +107 -0
  297. package/vendor/kobalte-core/index-774e18fb.d.ts +155 -0
  298. package/vendor/kobalte-core/index-78f1e72b.d.ts +22 -0
  299. package/vendor/kobalte-core/index-79050fd4.d.ts +22 -0
  300. package/vendor/kobalte-core/index-82a3d7cf.d.ts +76 -0
  301. package/vendor/kobalte-core/index-839e646d.d.ts +308 -0
  302. package/vendor/kobalte-core/index-8b78f50e.d.ts +96 -0
  303. package/vendor/kobalte-core/index-8dfcce13.d.ts +49 -0
  304. package/vendor/kobalte-core/index-929e4c7c.d.ts +109 -0
  305. package/vendor/kobalte-core/index-a6cbe732.d.ts +267 -0
  306. package/vendor/kobalte-core/index-a8504bc6.d.ts +105 -0
  307. package/vendor/kobalte-core/index-d652f235.d.ts +234 -0
  308. package/vendor/kobalte-core/index-d734f7ac.d.ts +120 -0
  309. package/vendor/kobalte-core/index-e3628d61.d.ts +405 -0
  310. package/vendor/kobalte-core/index-e8f9edc7.d.ts +484 -0
  311. package/vendor/kobalte-core/index-e96454a3.d.ts +113 -0
  312. package/vendor/kobalte-core/index-ed2fe8c4.d.ts +176 -0
  313. package/vendor/kobalte-core/index-f3e15e6a.d.ts +107 -0
  314. package/vendor/kobalte-core/index.d.ts +333 -0
  315. package/vendor/kobalte-core/index.js +56 -0
  316. package/vendor/kobalte-core/index.jsx +322 -0
  317. package/vendor/kobalte-core/link/index.d.ts +6 -0
  318. package/vendor/kobalte-core/link/index.js +2 -0
  319. package/vendor/kobalte-core/link/index.jsx +12 -0
  320. package/vendor/kobalte-core/link-root-bf54d4f3.d.ts +26 -0
  321. package/vendor/kobalte-core/listbox/index.d.ts +10 -0
  322. package/vendor/kobalte-core/listbox/index.js +2 -0
  323. package/vendor/kobalte-core/listbox/index.jsx +30 -0
  324. package/vendor/kobalte-core/listbox-item-indicator-b8390ce9.d.ts +27 -0
  325. package/vendor/kobalte-core/listbox-section-58338bda.d.ts +172 -0
  326. package/vendor/kobalte-core/menu/index.d.ts +41 -0
  327. package/vendor/kobalte-core/menu/index.js +2 -0
  328. package/vendor/kobalte-core/menu/index.jsx +72 -0
  329. package/vendor/kobalte-core/menu-sub-trigger-29a7ad75.d.ts +462 -0
  330. package/vendor/kobalte-core/menubar/index.d.ts +19 -0
  331. package/vendor/kobalte-core/menubar/index.js +6 -0
  332. package/vendor/kobalte-core/menubar/index.jsx +79 -0
  333. package/vendor/kobalte-core/menubar-context-c1a81ca0.d.ts +73 -0
  334. package/vendor/kobalte-core/meter/index.d.ts +15 -0
  335. package/vendor/kobalte-core/meter/index.js +2 -0
  336. package/vendor/kobalte-core/meter/index.jsx +23 -0
  337. package/vendor/kobalte-core/meter-value-label-797727cd.d.ts +117 -0
  338. package/vendor/kobalte-core/navigation-menu/index.d.ts +191 -0
  339. package/vendor/kobalte-core/navigation-menu/index.js +432 -0
  340. package/vendor/kobalte-core/navigation-menu/index.jsx +571 -0
  341. package/vendor/kobalte-core/number-field/index.d.ts +11 -0
  342. package/vendor/kobalte-core/number-field/index.js +5 -0
  343. package/vendor/kobalte-core/number-field/index.jsx +42 -0
  344. package/vendor/kobalte-core/number-field-root-3524531f.d.ts +128 -0
  345. package/vendor/kobalte-core/pagination/index.d.ts +6 -0
  346. package/vendor/kobalte-core/pagination/index.js +2 -0
  347. package/vendor/kobalte-core/pagination/index.jsx +26 -0
  348. package/vendor/kobalte-core/polymorphic/index.d.ts +29 -0
  349. package/vendor/kobalte-core/polymorphic/index.js +2 -0
  350. package/vendor/kobalte-core/polymorphic/index.jsx +8 -0
  351. package/vendor/kobalte-core/popover/index.d.ts +11 -0
  352. package/vendor/kobalte-core/popover/index.js +3 -0
  353. package/vendor/kobalte-core/popover/index.jsx +45 -0
  354. package/vendor/kobalte-core/popper/index.d.ts +42 -0
  355. package/vendor/kobalte-core/popper/index.js +2 -0
  356. package/vendor/kobalte-core/popper/index.jsx +20 -0
  357. package/vendor/kobalte-core/popper-arrow-89a19127.d.ts +24 -0
  358. package/vendor/kobalte-core/popper-root-c2da235c.d.ts +81 -0
  359. package/vendor/kobalte-core/primitives/create-collection/index.d.ts +16 -0
  360. package/vendor/kobalte-core/primitives/create-collection/index.js +3 -0
  361. package/vendor/kobalte-core/primitives/create-collection/index.jsx +12 -0
  362. package/vendor/kobalte-core/primitives/create-controllable-signal/index.d.ts +33 -0
  363. package/vendor/kobalte-core/primitives/create-controllable-signal/index.js +2 -0
  364. package/vendor/kobalte-core/primitives/create-controllable-signal/index.jsx +15 -0
  365. package/vendor/kobalte-core/primitives/create-disclosure-state/index.d.ts +31 -0
  366. package/vendor/kobalte-core/primitives/create-disclosure-state/index.js +2 -0
  367. package/vendor/kobalte-core/primitives/create-disclosure-state/index.jsx +10 -0
  368. package/vendor/kobalte-core/primitives/create-dom-collection/index.d.ts +32 -0
  369. package/vendor/kobalte-core/primitives/create-dom-collection/index.js +2 -0
  370. package/vendor/kobalte-core/primitives/create-dom-collection/index.jsx +17 -0
  371. package/vendor/kobalte-core/primitives/create-escape-key-down/index.d.ts +18 -0
  372. package/vendor/kobalte-core/primitives/create-escape-key-down/index.js +2 -0
  373. package/vendor/kobalte-core/primitives/create-escape-key-down/index.jsx +8 -0
  374. package/vendor/kobalte-core/primitives/create-focus-scope/index.d.ts +21 -0
  375. package/vendor/kobalte-core/primitives/create-focus-scope/index.js +2 -0
  376. package/vendor/kobalte-core/primitives/create-focus-scope/index.jsx +9 -0
  377. package/vendor/kobalte-core/primitives/create-form-reset-listener/index.d.ts +9 -0
  378. package/vendor/kobalte-core/primitives/create-form-reset-listener/index.js +2 -0
  379. package/vendor/kobalte-core/primitives/create-form-reset-listener/index.jsx +8 -0
  380. package/vendor/kobalte-core/primitives/create-hide-outside/index.d.ts +29 -0
  381. package/vendor/kobalte-core/primitives/create-hide-outside/index.js +2 -0
  382. package/vendor/kobalte-core/primitives/create-hide-outside/index.jsx +12 -0
  383. package/vendor/kobalte-core/primitives/create-interact-outside/index.d.ts +39 -0
  384. package/vendor/kobalte-core/primitives/create-interact-outside/index.js +2 -0
  385. package/vendor/kobalte-core/primitives/create-interact-outside/index.jsx +9 -0
  386. package/vendor/kobalte-core/primitives/create-register-id/index.d.ts +9 -0
  387. package/vendor/kobalte-core/primitives/create-register-id/index.js +2 -0
  388. package/vendor/kobalte-core/primitives/create-register-id/index.jsx +8 -0
  389. package/vendor/kobalte-core/primitives/create-size/index.d.ts +9 -0
  390. package/vendor/kobalte-core/primitives/create-size/index.js +2 -0
  391. package/vendor/kobalte-core/primitives/create-size/index.jsx +8 -0
  392. package/vendor/kobalte-core/primitives/create-tag-name/index.d.ts +15 -0
  393. package/vendor/kobalte-core/primitives/create-tag-name/index.js +2 -0
  394. package/vendor/kobalte-core/primitives/create-tag-name/index.jsx +9 -0
  395. package/vendor/kobalte-core/primitives/create-toggle-state/index.d.ts +33 -0
  396. package/vendor/kobalte-core/primitives/create-toggle-state/index.js +2 -0
  397. package/vendor/kobalte-core/primitives/create-toggle-state/index.jsx +10 -0
  398. package/vendor/kobalte-core/primitives/create-transition/index.d.ts +52 -0
  399. package/vendor/kobalte-core/primitives/create-transition/index.js +2 -0
  400. package/vendor/kobalte-core/primitives/create-transition/index.jsx +8 -0
  401. package/vendor/kobalte-core/progress/index.d.ts +6 -0
  402. package/vendor/kobalte-core/progress/index.js +2 -0
  403. package/vendor/kobalte-core/progress/index.jsx +24 -0
  404. package/vendor/kobalte-core/radio-group/index.d.ts +8 -0
  405. package/vendor/kobalte-core/radio-group/index.js +4 -0
  406. package/vendor/kobalte-core/radio-group/index.jsx +40 -0
  407. package/vendor/kobalte-core/radio-group-root-0af7f9b9.d.ts +195 -0
  408. package/vendor/kobalte-core/rating/index.d.ts +172 -0
  409. package/vendor/kobalte-core/rating/index.js +464 -0
  410. package/vendor/kobalte-core/rating/index.jsx +540 -0
  411. package/vendor/kobalte-core/search/index.d.ts +85 -0
  412. package/vendor/kobalte-core/search/index.js +177 -0
  413. package/vendor/kobalte-core/search/index.jsx +227 -0
  414. package/vendor/kobalte-core/segmented-control/index.d.ts +69 -0
  415. package/vendor/kobalte-core/segmented-control/index.js +162 -0
  416. package/vendor/kobalte-core/segmented-control/index.jsx +217 -0
  417. package/vendor/kobalte-core/select/index.d.ts +19 -0
  418. package/vendor/kobalte-core/select/index.js +6 -0
  419. package/vendor/kobalte-core/select/index.jsx +75 -0
  420. package/vendor/kobalte-core/separator/index.d.ts +6 -0
  421. package/vendor/kobalte-core/separator/index.js +2 -0
  422. package/vendor/kobalte-core/separator/index.jsx +12 -0
  423. package/vendor/kobalte-core/separator-root-cb685406.d.ts +25 -0
  424. package/vendor/kobalte-core/skeleton/index.d.ts +5 -0
  425. package/vendor/kobalte-core/skeleton/index.js +2 -0
  426. package/vendor/kobalte-core/skeleton/index.jsx +11 -0
  427. package/vendor/kobalte-core/slider/index.d.ts +11 -0
  428. package/vendor/kobalte-core/slider/index.js +5 -0
  429. package/vendor/kobalte-core/slider/index.jsx +43 -0
  430. package/vendor/kobalte-core/slider-value-label-2be90f59.d.ts +211 -0
  431. package/vendor/kobalte-core/spin-button/index.d.ts +10 -0
  432. package/vendor/kobalte-core/spin-button/index.js +2 -0
  433. package/vendor/kobalte-core/spin-button/index.jsx +12 -0
  434. package/vendor/kobalte-core/spin-button-root-3a44420a.d.ts +63 -0
  435. package/vendor/kobalte-core/switch/index.d.ts +8 -0
  436. package/vendor/kobalte-core/switch/index.js +2 -0
  437. package/vendor/kobalte-core/switch/index.jsx +35 -0
  438. package/vendor/kobalte-core/tabs/index.d.ts +8 -0
  439. package/vendor/kobalte-core/tabs/index.js +2 -0
  440. package/vendor/kobalte-core/tabs/index.jsx +27 -0
  441. package/vendor/kobalte-core/text-field/index.d.ts +9 -0
  442. package/vendor/kobalte-core/text-field/index.js +5 -0
  443. package/vendor/kobalte-core/text-field/index.jsx +34 -0
  444. package/vendor/kobalte-core/text-field-root-0b8dfa5a.d.ts +73 -0
  445. package/vendor/kobalte-core/time-field/index.d.ts +165 -0
  446. package/vendor/kobalte-core/time-field/index.js +818 -0
  447. package/vendor/kobalte-core/time-field/index.jsx +824 -0
  448. package/vendor/kobalte-core/toast/index.d.ts +6 -0
  449. package/vendor/kobalte-core/toast/index.js +2 -0
  450. package/vendor/kobalte-core/toast/index.jsx +33 -0
  451. package/vendor/kobalte-core/toggle-button/index.d.ts +7 -0
  452. package/vendor/kobalte-core/toggle-button/index.js +2 -0
  453. package/vendor/kobalte-core/toggle-button/index.jsx +16 -0
  454. package/vendor/kobalte-core/toggle-button-root-1cfacf95.d.ts +42 -0
  455. package/vendor/kobalte-core/toggle-group/index.d.ts +10 -0
  456. package/vendor/kobalte-core/toggle-group/index.js +2 -0
  457. package/vendor/kobalte-core/toggle-group/index.jsx +26 -0
  458. package/vendor/kobalte-core/tooltip/index.d.ts +10 -0
  459. package/vendor/kobalte-core/tooltip/index.js +3 -0
  460. package/vendor/kobalte-core/tooltip/index.jsx +32 -0
  461. package/vendor/kobalte-core/types-6adf33e1.d.ts +8 -0
  462. package/vendor/kobalte-core/types-877adc4a.d.ts +125 -0
  463. package/vendor/kobalte-core/types-f8ae18e5.d.ts +72 -0
  464. package/vendor/kobalte-core/utils-45fb8d63.d.ts +11 -0
  465. package/vendor/kobalte-utils/LICENSE.md +21 -0
  466. package/vendor/kobalte-utils/NOTICE.txt +231 -0
  467. package/vendor/kobalte-utils/index.cjs +878 -0
  468. package/vendor/kobalte-utils/index.d.cts +227 -0
  469. package/vendor/kobalte-utils/index.d.ts +227 -0
  470. package/vendor/kobalte-utils/index.js +791 -0
  471. package/vendor/origins.json +33 -0
  472. package/vendor/solid-web/LICENSE +21 -0
  473. package/vendor/solid-web/dev.cjs +896 -0
  474. package/vendor/solid-web/dev.js +784 -0
  475. package/vendor/solid-web/server.cjs +2 -0
  476. package/vendor/solid-web/server.js +2 -0
  477. package/vendor/solid-web/types/client.d.ts +93 -0
  478. package/vendor/solid-web/types/core.d.ts +2 -0
  479. package/vendor/solid-web/types/index.d.ts +50 -0
  480. package/vendor/solid-web/types/jsx.d.ts +1 -0
  481. package/vendor/solid-web/types/server-mock.d.ts +65 -0
  482. package/vendor/solid-web/types/server.d.ts +187 -0
  483. package/vendor/solid-web/web.cjs +885 -0
  484. package/vendor/solid-web/web.js +773 -0
@@ -0,0 +1,827 @@
1
+ // Vendored and modified by Gemologic Sheen from cmdk-solid@1.2.0; see package THIRD_PARTY_NOTICES.md.
2
+ 'use strict';
3
+
4
+ var web = require('solid-js/web');
5
+ var core = require("#sheen-kobalte");
6
+ var solidJs = require('solid-js');
7
+ var store = require('solid-js/store');
8
+
9
+ // src/index.tsx
10
+
11
+ // src/command-score.ts
12
+ var SCORE_CONTINUE_MATCH = 1;
13
+ var SCORE_SPACE_WORD_JUMP = 0.9;
14
+ var SCORE_NON_SPACE_WORD_JUMP = 0.8;
15
+ var SCORE_CHARACTER_JUMP = 0.17;
16
+ var SCORE_TRANSPOSITION = 0.1;
17
+ var PENALTY_SKIPPED = 0.999;
18
+ var PENALTY_CASE_MISMATCH = 0.9999;
19
+ var PENALTY_NOT_COMPLETE = 0.99;
20
+ var IS_GAP_REGEXP = /[\\\/_+.#"@\[\(\{&]/;
21
+ var COUNT_GAPS_REGEXP = /[\\\/_+.#"@\[\(\{&]/g;
22
+ var IS_SPACE_REGEXP = /[\s-]/;
23
+ var COUNT_SPACE_REGEXP = /[\s-]/g;
24
+ function commandScoreInner(string, abbreviation, lowerString, lowerAbbreviation, stringIndex, abbreviationIndex, memoizedResults) {
25
+ if (abbreviationIndex === abbreviation.length) {
26
+ if (stringIndex === string.length) {
27
+ return SCORE_CONTINUE_MATCH;
28
+ }
29
+ return PENALTY_NOT_COMPLETE;
30
+ }
31
+ var memoizeKey = `${stringIndex},${abbreviationIndex}`;
32
+ if (memoizedResults[memoizeKey] !== void 0) {
33
+ return memoizedResults[memoizeKey];
34
+ }
35
+ var abbreviationChar = lowerAbbreviation.charAt(abbreviationIndex);
36
+ var index = lowerString.indexOf(abbreviationChar, stringIndex);
37
+ var highScore = 0;
38
+ var score, transposedScore, wordBreaks, spaceBreaks;
39
+ while (index >= 0) {
40
+ score = commandScoreInner(
41
+ string,
42
+ abbreviation,
43
+ lowerString,
44
+ lowerAbbreviation,
45
+ index + 1,
46
+ abbreviationIndex + 1,
47
+ memoizedResults
48
+ );
49
+ if (score > highScore) {
50
+ if (index === stringIndex) {
51
+ score *= SCORE_CONTINUE_MATCH;
52
+ } else if (IS_GAP_REGEXP.test(string.charAt(index - 1))) {
53
+ score *= SCORE_NON_SPACE_WORD_JUMP;
54
+ wordBreaks = string.slice(stringIndex, index - 1).match(COUNT_GAPS_REGEXP);
55
+ if (wordBreaks && stringIndex > 0) {
56
+ score *= Math.pow(PENALTY_SKIPPED, wordBreaks.length);
57
+ }
58
+ } else if (IS_SPACE_REGEXP.test(string.charAt(index - 1))) {
59
+ score *= SCORE_SPACE_WORD_JUMP;
60
+ spaceBreaks = string.slice(stringIndex, index - 1).match(COUNT_SPACE_REGEXP);
61
+ if (spaceBreaks && stringIndex > 0) {
62
+ score *= Math.pow(PENALTY_SKIPPED, spaceBreaks.length);
63
+ }
64
+ } else {
65
+ score *= SCORE_CHARACTER_JUMP;
66
+ if (stringIndex > 0) {
67
+ score *= Math.pow(PENALTY_SKIPPED, index - stringIndex);
68
+ }
69
+ }
70
+ if (string.charAt(index) !== abbreviation.charAt(abbreviationIndex)) {
71
+ score *= PENALTY_CASE_MISMATCH;
72
+ }
73
+ }
74
+ if (score < SCORE_TRANSPOSITION && lowerString.charAt(index - 1) === lowerAbbreviation.charAt(abbreviationIndex + 1) || lowerAbbreviation.charAt(abbreviationIndex + 1) === lowerAbbreviation.charAt(abbreviationIndex) && // allow duplicate letters. Ref #7428
75
+ lowerString.charAt(index - 1) !== lowerAbbreviation.charAt(abbreviationIndex)) {
76
+ transposedScore = commandScoreInner(
77
+ string,
78
+ abbreviation,
79
+ lowerString,
80
+ lowerAbbreviation,
81
+ index + 1,
82
+ abbreviationIndex + 2,
83
+ memoizedResults
84
+ );
85
+ if (transposedScore * SCORE_TRANSPOSITION > score) {
86
+ score = transposedScore * SCORE_TRANSPOSITION;
87
+ }
88
+ }
89
+ if (score > highScore) {
90
+ highScore = score;
91
+ }
92
+ index = lowerString.indexOf(abbreviationChar, index + 1);
93
+ }
94
+ memoizedResults[memoizeKey] = highScore;
95
+ return highScore;
96
+ }
97
+ function formatInput(string) {
98
+ return string.toLowerCase().replace(COUNT_SPACE_REGEXP, " ");
99
+ }
100
+ function commandScore(string, abbreviation, aliases) {
101
+ string = aliases && aliases.length > 0 ? `${string + " " + aliases.join(" ")}` : string;
102
+ return commandScoreInner(string, abbreviation, formatInput(string), formatInput(abbreviation), 0, 0, {});
103
+ }
104
+
105
+ // src/index.tsx
106
+ var _tmpl$ = /* @__PURE__ */ web.template(`<div tabindex=-1><label cmdk-label>`);
107
+ var _tmpl$2 = /* @__PURE__ */ web.template(`<div>`);
108
+ var _tmpl$3 = /* @__PURE__ */ web.template(`<div cmdk-group-heading aria-hidden=true>`);
109
+ var _tmpl$4 = /* @__PURE__ */ web.template(`<div><div cmdk-group-items role=group>`);
110
+ var _tmpl$5 = /* @__PURE__ */ web.template(`<input>`);
111
+ var _tmpl$6 = /* @__PURE__ */ web.template(`<div cmdk-list-sizer>`);
112
+ var _tmpl$7 = /* @__PURE__ */ web.template(`<div aria-hidden=true>`);
113
+ var GROUP_SELECTOR = `[cmdk-group=""]`;
114
+ var GROUP_HEADING_SELECTOR = `[cmdk-group-heading=""]`;
115
+ var ITEM_SELECTOR = `[cmdk-item=""]`;
116
+ var VALID_ITEM_SELECTOR = `${ITEM_SELECTOR}:not([aria-disabled="true"])`;
117
+ var SELECT_EVENT = `cmdk-item-select`;
118
+ var VALUE_ATTR = `data-value`;
119
+ var DIALOG_ROOT_KEYS = ["open", "defaultOpen", "onOpenChange", "id", "modal", "preventScroll", "forceMount", "translations"];
120
+ exports.defaultFilter = (value, search, keywords) => commandScore(value, search, keywords);
121
+ var CommandContext = solidJs.createContext();
122
+ var useCommand = () => solidJs.useContext(CommandContext);
123
+ var StoreContext = solidJs.createContext();
124
+ var useStore = () => solidJs.useContext(StoreContext);
125
+ var GroupContext = solidJs.createContext(() => void 0);
126
+ exports.CommandRoot = (props) => {
127
+ const [uncontrolledValue, setUncontrolledValue] = solidJs.createSignal(props.value?.trim() ?? props.defaultValue ?? "");
128
+ const [state, setState] = store.createStore({
129
+ search: "",
130
+ get value() {
131
+ return props.value !== void 0 ? props.value.trim() : uncontrolledValue();
132
+ },
133
+ get filtered() {
134
+ return filtered();
135
+ },
136
+ items: [],
137
+ groups: {},
138
+ ids: {}
139
+ });
140
+ const mergedProps = solidJs.mergeProps({
141
+ vimBindings: true,
142
+ disablePointerSelection: false
143
+ }, props);
144
+ const filtered = solidJs.createMemo(() => {
145
+ const skipFiltering = !state.search || mergedProps.shouldFilter === false;
146
+ const items = state.items.reduce((acc, id) => {
147
+ const registered = state.ids[id];
148
+ acc[id] = skipFiltering ? 1 : registered ? score(registered.value(), registered.keywords?.()) : 0;
149
+ return acc;
150
+ }, {});
151
+ const groups = Object.keys(state.groups).filter((groupId) => {
152
+ return state.groups[groupId].some((id) => (items[id] || 0) > 0);
153
+ });
154
+ const count = Object.values(items).filter((score2) => score2 > 0).length;
155
+ return {
156
+ count,
157
+ items,
158
+ groups
159
+ };
160
+ });
161
+ const [, etc] = solidJs.splitProps(mergedProps, ["label", "children", "value", "onValueChange", "filter", "shouldFilter", "loop", "disablePointerSelection", "vimBindings"]);
162
+ const listId = solidJs.createUniqueId();
163
+ const labelId = solidJs.createUniqueId();
164
+ const inputId = solidJs.createUniqueId();
165
+ const [listInnerRef, setListInnerRef] = solidJs.createSignal(null);
166
+ const schedule = useSchedule();
167
+ solidJs.onMount(() => {
168
+ schedule(6, scrollSelectedIntoView);
169
+ });
170
+ const store$1 = {
171
+ state,
172
+ setState: (key, value, opts) => {
173
+ if (solidJs.untrack(() => Object.is(state[key], value))) return;
174
+ if (key === "value") {
175
+ setUncontrolledValue(value);
176
+ } else {
177
+ setState(key, value);
178
+ }
179
+ if (key === "search") {
180
+ schedule(8, selectFirstItem);
181
+ } else if (key === "value") {
182
+ if (!opts) {
183
+ schedule(5, scrollSelectedIntoView);
184
+ }
185
+ if (mergedProps.value !== void 0) {
186
+ const newValue = value ?? "";
187
+ mergedProps.onValueChange?.(newValue);
188
+ return;
189
+ }
190
+ }
191
+ }
192
+ };
193
+ const context = {
194
+ value: (id, value, keywords) => {
195
+ setState(store.produce((draft) => {
196
+ draft.ids[id] = {
197
+ value,
198
+ keywords
199
+ };
200
+ }));
201
+ return () => {
202
+ setState(store.produce((draft) => {
203
+ delete draft.ids[id];
204
+ }));
205
+ };
206
+ },
207
+ // Track item lifecycle (mount, unmount)
208
+ item: (id, groupId) => {
209
+ if (!listInnerRef()) {
210
+ console.warn("Mount Command.Item inside a Command.List component.");
211
+ }
212
+ setState(store.produce((draft) => {
213
+ if (!draft.items.includes(id)) draft.items.push(id);
214
+ if (groupId) {
215
+ const group = draft.groups[groupId] ??= [];
216
+ if (!group.includes(id)) group.push(id);
217
+ }
218
+ }));
219
+ schedule(3, () => {
220
+ if (!state.value) {
221
+ selectFirstItem();
222
+ }
223
+ });
224
+ return () => {
225
+ setState(store.produce((draft) => {
226
+ const index = draft.items.indexOf(id);
227
+ if (index !== -1) draft.items.splice(index, 1);
228
+ if (groupId) {
229
+ const group = draft.groups[groupId];
230
+ const groupIndex = group?.indexOf(id) ?? -1;
231
+ if (group && groupIndex !== -1) group.splice(groupIndex, 1);
232
+ }
233
+ }));
234
+ const selectedItem = getSelectedItem();
235
+ if (selectedItem?.getAttribute("id") === id) schedule(1, () => selectFirstItem());
236
+ };
237
+ },
238
+ // Track group lifecycle (mount, unmount)
239
+ group: (id) => {
240
+ if (!listInnerRef()) {
241
+ console.warn("Mount Command.Group inside a Command.List component.");
242
+ }
243
+ setState(store.produce((draft) => {
244
+ draft.groups[id] ??= [];
245
+ }));
246
+ return () => {
247
+ setState(store.produce((draft) => {
248
+ delete draft.groups[id];
249
+ }));
250
+ };
251
+ },
252
+ filter: () => {
253
+ return mergedProps.shouldFilter !== false;
254
+ },
255
+ label: () => mergedProps.label || props["aria-label"] || "",
256
+ disablePointerSelection: () => !!mergedProps.disablePointerSelection,
257
+ listId,
258
+ inputId,
259
+ labelId,
260
+ listInnerRef,
261
+ setListInnerRef
262
+ };
263
+ function score(value, keywords) {
264
+ const filter = mergedProps.filter ?? exports.defaultFilter;
265
+ return value ? filter(value, state.search, keywords) : 0;
266
+ }
267
+ function selectFirstItem() {
268
+ const item = getValidItems().find((item2) => item2.getAttribute("aria-disabled") !== "true");
269
+ const value = item?.getAttribute(VALUE_ATTR) || "";
270
+ store$1.setState("value", value);
271
+ }
272
+ function scrollSelectedIntoView() {
273
+ requestAnimationFrame(() => {
274
+ const item = getSelectedItem();
275
+ if (item) {
276
+ if (item.parentElement?.firstChild === item) {
277
+ item.closest(GROUP_SELECTOR)?.querySelector(GROUP_HEADING_SELECTOR)?.scrollIntoView({
278
+ block: "nearest"
279
+ });
280
+ }
281
+ item.scrollIntoView({
282
+ block: "nearest"
283
+ });
284
+ }
285
+ });
286
+ }
287
+ function getSelectedItem() {
288
+ return listInnerRef()?.querySelector(`${ITEM_SELECTOR}[aria-selected="true"]`);
289
+ }
290
+ function getValidItems() {
291
+ return Array.from(listInnerRef()?.querySelectorAll(VALID_ITEM_SELECTOR) || []);
292
+ }
293
+ function updateSelectedToIndex(index) {
294
+ const items = getValidItems();
295
+ const item = items[index];
296
+ if (item) store$1.setState("value", item.getAttribute(VALUE_ATTR) || "");
297
+ }
298
+ function updateSelectedByItem(change) {
299
+ const selected = getSelectedItem();
300
+ const items = getValidItems();
301
+ const index = items.findIndex((item) => item === selected);
302
+ let newSelected = items[index + change];
303
+ if (mergedProps.loop) {
304
+ newSelected = index + change < 0 ? items[items.length - 1] : index + change === items.length ? items[0] : items[index + change];
305
+ }
306
+ if (newSelected) store$1.setState("value", newSelected.getAttribute(VALUE_ATTR) || "");
307
+ }
308
+ function updateSelectedByGroup(change) {
309
+ const selected = getSelectedItem();
310
+ let group = selected?.closest(GROUP_SELECTOR);
311
+ let item = null;
312
+ while (group && !item) {
313
+ group = change > 0 ? findNextSibling(group, GROUP_SELECTOR) : findPreviousSibling(group, GROUP_SELECTOR);
314
+ item = group?.querySelector(VALID_ITEM_SELECTOR) || null;
315
+ }
316
+ if (item) {
317
+ store$1.setState("value", item.getAttribute(VALUE_ATTR) || "");
318
+ } else {
319
+ updateSelectedByItem(change);
320
+ }
321
+ }
322
+ const last = () => updateSelectedToIndex(getValidItems().length - 1);
323
+ const next = (e) => {
324
+ e.preventDefault();
325
+ if (e.metaKey) {
326
+ last();
327
+ } else if (e.altKey) {
328
+ updateSelectedByGroup(1);
329
+ } else {
330
+ updateSelectedByItem(1);
331
+ }
332
+ };
333
+ const prev = (e) => {
334
+ e.preventDefault();
335
+ if (e.metaKey) {
336
+ updateSelectedToIndex(0);
337
+ } else if (e.altKey) {
338
+ updateSelectedByGroup(-1);
339
+ } else {
340
+ updateSelectedByItem(-1);
341
+ }
342
+ };
343
+ return (() => {
344
+ var _el$ = _tmpl$(), _el$2 = _el$.firstChild;
345
+ web.spread(_el$, web.mergeProps(etc, {
346
+ "cmdk-root": "",
347
+ "onKeyDown": (e) => {
348
+ etc.onKeyDown?.(e);
349
+ if (!e.defaultPrevented) {
350
+ switch (e.key) {
351
+ case "n":
352
+ case "j": {
353
+ if (mergedProps.vimBindings && e.ctrlKey) {
354
+ next(e);
355
+ }
356
+ break;
357
+ }
358
+ case "ArrowDown": {
359
+ next(e);
360
+ break;
361
+ }
362
+ case "p":
363
+ case "k": {
364
+ if (mergedProps.vimBindings && e.ctrlKey) {
365
+ prev(e);
366
+ }
367
+ break;
368
+ }
369
+ case "ArrowUp": {
370
+ prev(e);
371
+ break;
372
+ }
373
+ case "Home": {
374
+ e.preventDefault();
375
+ updateSelectedToIndex(0);
376
+ break;
377
+ }
378
+ case "End": {
379
+ e.preventDefault();
380
+ last();
381
+ break;
382
+ }
383
+ case "Enter": {
384
+ if (!e.isComposing && e.keyCode !== 229) {
385
+ e.preventDefault();
386
+ const item = getSelectedItem();
387
+ if (item) {
388
+ const event = new Event(SELECT_EVENT);
389
+ item.dispatchEvent(event);
390
+ }
391
+ }
392
+ }
393
+ }
394
+ }
395
+ }
396
+ }), false, true);
397
+ web.insert(_el$2, () => mergedProps.label);
398
+ web.insert(_el$, web.createComponent(StoreContext.Provider, {
399
+ value: store$1,
400
+ get children() {
401
+ return web.createComponent(CommandContext.Provider, {
402
+ value: context,
403
+ get children() {
404
+ return props.children;
405
+ }
406
+ });
407
+ }
408
+ }), null);
409
+ web.effect((_p$) => {
410
+ var _v$ = context.inputId, _v$2 = context.labelId, _v$3 = srOnlyStyles;
411
+ _v$ !== _p$.e && web.setAttribute(_el$2, "for", _p$.e = _v$);
412
+ _v$2 !== _p$.t && web.setAttribute(_el$2, "id", _p$.t = _v$2);
413
+ _p$.a = web.style(_el$2, _v$3, _p$.a);
414
+ return _p$;
415
+ }, {
416
+ e: void 0,
417
+ t: void 0,
418
+ a: void 0
419
+ });
420
+ return _el$;
421
+ })();
422
+ };
423
+ exports.CommandItem = (props) => {
424
+ const store = useStore();
425
+ const id = solidJs.createUniqueId();
426
+ const [ref, setRef] = solidJs.createSignal();
427
+ const groupContext = solidJs.useContext(GroupContext);
428
+ const context = useCommand();
429
+ const rendered = solidJs.createMemo((wasRendered) => wasRendered || !!ref() && !props.disabled, false);
430
+ solidJs.onMount(() => {
431
+ const unregisterValue = context.value(id, value, () => props.keywords);
432
+ if (forceMount()) {
433
+ solidJs.onCleanup(unregisterValue);
434
+ return;
435
+ }
436
+ const unregisterItem = context.item(id, groupContext()?.id);
437
+ solidJs.onCleanup(() => {
438
+ unregisterItem();
439
+ unregisterValue();
440
+ });
441
+ });
442
+ const [textValue, setTextValue] = solidJs.createSignal("");
443
+ solidJs.createEffect(solidJs.on(ref, (el) => {
444
+ if (el) setTextValue(el.textContent || "");
445
+ }));
446
+ const value = () => props.value || textValue();
447
+ solidJs.createEffect(solidJs.on([value, ref], ([value2, el]) => {
448
+ el?.setAttribute(VALUE_ATTR, value2);
449
+ }));
450
+ const forceMount = () => props.forceMount ?? groupContext()?.forceMount;
451
+ const selected = useCmdk((state) => value() && value() == state.value);
452
+ const render = useCmdk((state) => !rendered() ? true : forceMount() ? true : context.filter() === false ? true : !state.search ? true : (state.filtered.items[id] || 0) > 0);
453
+ solidJs.createEffect(solidJs.on(ref, (el) => {
454
+ if (!el) return;
455
+ el.addEventListener(SELECT_EVENT, onSelect);
456
+ solidJs.onCleanup(() => el.removeEventListener(SELECT_EVENT, onSelect));
457
+ }));
458
+ function onSelect() {
459
+ select();
460
+ props.onSelect?.(value());
461
+ }
462
+ function select() {
463
+ store.setState("value", value(), true);
464
+ }
465
+ const [, etc] = solidJs.splitProps(props, ["disabled", "onSelect", "value", "forceMount", "keywords"]);
466
+ return web.createComponent(solidJs.Show, {
467
+ get when() {
468
+ return render();
469
+ },
470
+ get children() {
471
+ var _el$3 = _tmpl$2();
472
+ web.use((el) => setRef(el), _el$3);
473
+ web.spread(_el$3, web.mergeProps(etc, {
474
+ "id": id,
475
+ "cmdk-item": "",
476
+ "role": "option",
477
+ get ["aria-disabled"]() {
478
+ return props.disabled ? "true" : "false";
479
+ },
480
+ get ["aria-selected"]() {
481
+ return selected() ? "true" : "false";
482
+ },
483
+ get ["data-disabled"]() {
484
+ return props.disabled ? "true" : "false";
485
+ },
486
+ get ["data-selected"]() {
487
+ return selected() ? "true" : "false";
488
+ },
489
+ get onPointerMove() {
490
+ return props.disabled || context.disablePointerSelection() ? void 0 : select;
491
+ },
492
+ get onClick() {
493
+ return props.disabled ? void 0 : onSelect;
494
+ }
495
+ }), false, true);
496
+ web.insert(_el$3, () => props.children);
497
+ return _el$3;
498
+ }
499
+ });
500
+ };
501
+ exports.CommandGroup = (props) => {
502
+ const [, etc] = solidJs.splitProps(props, ["heading", "value", "forceMount"]);
503
+ const id = solidJs.createUniqueId();
504
+ const [ref, setRef] = solidJs.createSignal();
505
+ const [headerRef, setHeaderRef] = solidJs.createSignal();
506
+ const headingId = solidJs.createUniqueId();
507
+ const context = useCommand();
508
+ const render = useCmdk((state) => {
509
+ return props.forceMount ? true : context.filter() === false ? true : !state.search ? true : state.filtered.groups.includes(id);
510
+ });
511
+ solidJs.onMount(() => {
512
+ const unregisterValue = context.value(id, value);
513
+ const unregisterGroup = context.group(id);
514
+ solidJs.onCleanup(() => {
515
+ unregisterGroup();
516
+ unregisterValue();
517
+ });
518
+ });
519
+ const [headerValue, setHeaderValue] = solidJs.createSignal("");
520
+ solidJs.createEffect(solidJs.on(headerRef, (el) => {
521
+ if (el) setHeaderValue(el.textContent || "");
522
+ }));
523
+ const value = () => props.value || headerValue();
524
+ solidJs.createEffect(solidJs.on([value, ref], ([value2, el]) => {
525
+ el?.setAttribute(VALUE_ATTR, value2);
526
+ }));
527
+ const contextValue = () => ({
528
+ id,
529
+ forceMount: props.forceMount
530
+ });
531
+ return (() => {
532
+ var _el$4 = _tmpl$4(), _el$6 = _el$4.firstChild;
533
+ var _ref$ = mergeRefs(setRef, props.ref);
534
+ typeof _ref$ === "function" && web.use(_ref$, _el$4);
535
+ web.spread(_el$4, web.mergeProps(etc, {
536
+ "cmdk-group": "",
537
+ "id": id,
538
+ "role": "presentation",
539
+ get hidden() {
540
+ return render() ? void 0 : true;
541
+ }
542
+ }), false, true);
543
+ web.insert(_el$4, web.createComponent(solidJs.Show, {
544
+ get when() {
545
+ return props.heading;
546
+ },
547
+ get children() {
548
+ var _el$5 = _tmpl$3();
549
+ web.use((el) => setHeaderRef(el), _el$5);
550
+ web.setAttribute(_el$5, "id", headingId);
551
+ web.insert(_el$5, () => props.heading);
552
+ return _el$5;
553
+ }
554
+ }), _el$6);
555
+ web.insert(_el$6, web.createComponent(GroupContext.Provider, {
556
+ value: contextValue,
557
+ get children() {
558
+ return props.children;
559
+ }
560
+ }));
561
+ web.effect(() => web.setAttribute(_el$6, "aria-labelledby", props.heading ? headingId : void 0));
562
+ return _el$4;
563
+ })();
564
+ };
565
+ exports.CommandSeparator = (props) => {
566
+ const [, etc] = solidJs.splitProps(props, ["alwaysRender"]);
567
+ const render = useCmdk((state) => !state.search);
568
+ return web.createComponent(solidJs.Show, {
569
+ get when() {
570
+ return props.alwaysRender || render();
571
+ },
572
+ get children() {
573
+ var _el$7 = _tmpl$2();
574
+ web.spread(_el$7, web.mergeProps(etc, {
575
+ "cmdk-separator": "",
576
+ "role": "separator"
577
+ }), false, false);
578
+ return _el$7;
579
+ }
580
+ });
581
+ };
582
+ exports.CommandInput = (props) => {
583
+ const [, etc] = solidJs.splitProps(props, ["onValueChange", "ref"]);
584
+ const isControlled = () => props.value != null;
585
+ const store = useStore();
586
+ const search = useCmdk((state) => state.search);
587
+ const value = useCmdk((state) => state.value);
588
+ const context = useCommand();
589
+ const selectedItemId = solidJs.createMemo(() => {
590
+ const item = context.listInnerRef()?.querySelector(`${ITEM_SELECTOR}[${VALUE_ATTR}="${encodeURIComponent(value())}"]`);
591
+ return item?.getAttribute("id") || void 0;
592
+ });
593
+ solidJs.createEffect(solidJs.on(() => props.value, (value2) => {
594
+ if (value2 != null) {
595
+ store.setState("search", value2);
596
+ }
597
+ }));
598
+ return (() => {
599
+ var _el$8 = _tmpl$5();
600
+ var _ref$2 = props.ref;
601
+ typeof _ref$2 === "function" ? web.use(_ref$2, _el$8) : props.ref = _el$8;
602
+ web.spread(_el$8, web.mergeProps(etc, {
603
+ "cmdk-input": "",
604
+ "autocomplete": "off",
605
+ "autocorrect": "off",
606
+ "spellcheck": false,
607
+ "aria-autocomplete": "list",
608
+ "role": "combobox",
609
+ "aria-expanded": "true",
610
+ get ["aria-controls"]() {
611
+ return context.listId;
612
+ },
613
+ get ["aria-labelledby"]() {
614
+ return context.labelId;
615
+ },
616
+ get ["aria-activedescendant"]() {
617
+ return selectedItemId();
618
+ },
619
+ get id() {
620
+ return context.inputId;
621
+ },
622
+ "type": "text",
623
+ get value() {
624
+ return web.memo(() => !!isControlled())() ? props.value : search();
625
+ },
626
+ "onInput": (e) => {
627
+ if (!isControlled()) {
628
+ store.setState("search", e.currentTarget.value);
629
+ }
630
+ props.onValueChange?.(e.currentTarget.value);
631
+ }
632
+ }), false, false);
633
+ return _el$8;
634
+ })();
635
+ };
636
+ exports.CommandList = (props) => {
637
+ const mergedProps = solidJs.mergeProps({
638
+ label: "Suggestions"
639
+ }, props);
640
+ const [, etc] = solidJs.splitProps(mergedProps, ["label", "children", "ref"]);
641
+ const [wrapperRef, setWrapperRef] = solidJs.createSignal();
642
+ const [sizerRef, setSizerRef] = solidJs.createSignal();
643
+ const context = useCommand();
644
+ solidJs.createEffect(solidJs.on([wrapperRef, sizerRef], ([wrapper, sizer]) => {
645
+ if (!wrapper || !sizer) return;
646
+ let animationFrame;
647
+ const observer = new ResizeObserver(() => {
648
+ animationFrame = requestAnimationFrame(() => {
649
+ wrapper.style.setProperty(`--cmdk-list-height`, sizer.offsetHeight.toFixed(1) + "px");
650
+ });
651
+ });
652
+ observer.observe(sizer);
653
+ solidJs.onCleanup(() => {
654
+ cancelAnimationFrame(animationFrame);
655
+ observer.unobserve(sizer);
656
+ });
657
+ }));
658
+ return (() => {
659
+ var _el$9 = _tmpl$2();
660
+ var _ref$3 = mergeRefs(setWrapperRef, mergedProps.ref);
661
+ typeof _ref$3 === "function" && web.use(_ref$3, _el$9);
662
+ web.spread(_el$9, web.mergeProps(etc, {
663
+ "cmdk-list": "",
664
+ "role": "listbox",
665
+ get ["aria-label"]() {
666
+ return mergedProps.label;
667
+ },
668
+ get id() {
669
+ return context.listId;
670
+ }
671
+ }), false, true);
672
+ web.insert(_el$9, () => SlottableWithNestedChildren(props, (child) => (() => {
673
+ var _el$0 = _tmpl$6();
674
+ var _ref$4 = mergeRefs(setSizerRef, context.setListInnerRef);
675
+ typeof _ref$4 === "function" && web.use(_ref$4, _el$0);
676
+ web.insert(_el$0, child);
677
+ return _el$0;
678
+ })()));
679
+ return _el$9;
680
+ })();
681
+ };
682
+ exports.CommandDialog = (props) => {
683
+ const [, dialogRootProps, etc] = solidJs.splitProps(props, ["overlayClassName", "contentClassName", "container"], DIALOG_ROOT_KEYS);
684
+ return web.createComponent(core.Dialog.Root, web.mergeProps(dialogRootProps, {
685
+ get children() {
686
+ return web.createComponent(core.Dialog.Portal, {
687
+ get mount() {
688
+ return props.container;
689
+ },
690
+ get children() {
691
+ return [web.createComponent(core.Dialog.Overlay, {
692
+ "cmdk-overlay": "",
693
+ get ["class"]() {
694
+ return props.overlayClassName;
695
+ }
696
+ }), web.createComponent(core.Dialog.Content, {
697
+ get ["aria-label"]() {
698
+ return props.label;
699
+ },
700
+ "cmdk-dialog": "",
701
+ get ["class"]() {
702
+ return props.contentClassName;
703
+ },
704
+ get children() {
705
+ return web.createComponent(exports.CommandRoot, etc);
706
+ }
707
+ })];
708
+ }
709
+ });
710
+ }
711
+ }));
712
+ };
713
+ exports.CommandEmpty = (props) => {
714
+ const [mounted, setMounted] = solidJs.createSignal(false);
715
+ const render = useCmdk((state) => state.filtered.count === 0 && mounted());
716
+ solidJs.onMount(() => {
717
+ setMounted(true);
718
+ });
719
+ return web.createComponent(solidJs.Show, {
720
+ get when() {
721
+ return render();
722
+ },
723
+ get children() {
724
+ var _el$1 = _tmpl$2();
725
+ web.spread(_el$1, web.mergeProps(props, {
726
+ "cmdk-empty": "",
727
+ "role": "presentation"
728
+ }), false, false);
729
+ return _el$1;
730
+ }
731
+ });
732
+ };
733
+ exports.CommandLoading = (props) => {
734
+ const mergedProps = solidJs.mergeProps({
735
+ label: "Loading..."
736
+ }, props);
737
+ const [, etc] = solidJs.splitProps(mergedProps, ["progress", "children", "label"]);
738
+ return (() => {
739
+ var _el$10 = _tmpl$2();
740
+ web.spread(_el$10, web.mergeProps(etc, {
741
+ "cmdk-loading": "",
742
+ "role": "progressbar",
743
+ get ["aria-valuenow"]() {
744
+ return mergedProps.progress;
745
+ },
746
+ "aria-valuemin": 0,
747
+ "aria-valuemax": 100,
748
+ get ["aria-label"]() {
749
+ return mergedProps.label;
750
+ }
751
+ }), false, true);
752
+ web.insert(_el$10, () => SlottableWithNestedChildren(props, (child) => (() => {
753
+ var _el$11 = _tmpl$7();
754
+ web.insert(_el$11, child);
755
+ return _el$11;
756
+ })()));
757
+ return _el$10;
758
+ })();
759
+ };
760
+ exports.Command = Object.assign(exports.CommandRoot, {
761
+ List: exports.CommandList,
762
+ Item: exports.CommandItem,
763
+ Input: exports.CommandInput,
764
+ Group: exports.CommandGroup,
765
+ Separator: exports.CommandSeparator,
766
+ Dialog: exports.CommandDialog,
767
+ Empty: exports.CommandEmpty,
768
+ Loading: exports.CommandLoading
769
+ });
770
+ function findNextSibling(el, selector) {
771
+ let sibling = el.nextElementSibling;
772
+ while (sibling) {
773
+ if (sibling.matches(selector)) return sibling;
774
+ sibling = sibling.nextElementSibling;
775
+ }
776
+ }
777
+ function findPreviousSibling(el, selector) {
778
+ let sibling = el.previousElementSibling;
779
+ while (sibling) {
780
+ if (sibling.matches(selector)) return sibling;
781
+ sibling = sibling.previousElementSibling;
782
+ }
783
+ }
784
+ function useCmdk(selector) {
785
+ const store = useStore();
786
+ return () => selector(store.state);
787
+ }
788
+ var useSchedule = () => {
789
+ let fns = /* @__PURE__ */ new Map();
790
+ let queued = false;
791
+ return (id, cb) => {
792
+ fns.set(id, cb);
793
+ if (queued) return;
794
+ queued = true;
795
+ queueMicrotask(() => {
796
+ queued = false;
797
+ const pending = fns;
798
+ fns = /* @__PURE__ */ new Map();
799
+ pending.forEach((f) => {
800
+ f();
801
+ });
802
+ });
803
+ };
804
+ };
805
+ function mergeRefs(...refs) {
806
+ return (el) => {
807
+ for (const ref of refs) {
808
+ if (typeof ref === "function") ref(el);
809
+ }
810
+ };
811
+ }
812
+ function SlottableWithNestedChildren(props, render) {
813
+ return render(props.children);
814
+ }
815
+ var srOnlyStyles = {
816
+ position: "absolute",
817
+ width: "1px",
818
+ height: "1px",
819
+ padding: "0",
820
+ margin: "-1px",
821
+ overflow: "hidden",
822
+ clip: "rect(0, 0, 0, 0)",
823
+ "white-space": "nowrap",
824
+ "border-width": "0"
825
+ };
826
+
827
+ exports.useCommandState = useCmdk;