@bevelo/svelte 0.0.0-stage → 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 (409) hide show
  1. package/LICENSE +21 -0
  2. package/dist/accordion.svelte +98 -0
  3. package/dist/accordion.svelte.d.ts +29 -0
  4. package/dist/agent.d.ts +2 -0
  5. package/dist/agent.js +5 -0
  6. package/dist/alert-dialog.svelte +17 -0
  7. package/dist/alert-dialog.svelte.d.ts +7 -0
  8. package/dist/alert.svelte +78 -0
  9. package/dist/alert.svelte.d.ts +16 -0
  10. package/dist/aspect-ratio.svelte +43 -0
  11. package/dist/aspect-ratio.svelte.d.ts +12 -0
  12. package/dist/async-options.svelte.d.ts +42 -0
  13. package/dist/async-options.svelte.js +94 -0
  14. package/dist/autocomplete.svelte +332 -0
  15. package/dist/autocomplete.svelte.d.ts +81 -0
  16. package/dist/avatar.svelte +39 -0
  17. package/dist/avatar.svelte.d.ts +12 -0
  18. package/dist/badge.svelte +37 -0
  19. package/dist/badge.svelte.d.ts +12 -0
  20. package/dist/bound.svelte.d.ts +15 -0
  21. package/dist/bound.svelte.js +56 -0
  22. package/dist/breadcrumb.svelte +90 -0
  23. package/dist/breadcrumb.svelte.d.ts +22 -0
  24. package/dist/button.svelte +45 -0
  25. package/dist/button.svelte.d.ts +12 -0
  26. package/dist/calendar.svelte +463 -0
  27. package/dist/calendar.svelte.d.ts +74 -0
  28. package/dist/card.svelte +69 -0
  29. package/dist/card.svelte.d.ts +16 -0
  30. package/dist/carousel.svelte +262 -0
  31. package/dist/carousel.svelte.d.ts +45 -0
  32. package/dist/checkbox-group-scope.d.ts +11 -0
  33. package/dist/checkbox-group-scope.js +5 -0
  34. package/dist/checkbox-group.svelte +93 -0
  35. package/dist/checkbox-group.svelte.d.ts +18 -0
  36. package/dist/checkbox.svelte +89 -0
  37. package/dist/checkbox.svelte.d.ts +16 -0
  38. package/dist/collapsible.svelte +73 -0
  39. package/dist/collapsible.svelte.d.ts +25 -0
  40. package/dist/color-picker-alpha-thumb.svelte +11 -0
  41. package/dist/color-picker-alpha-thumb.svelte.d.ts +4 -0
  42. package/dist/color-picker-area-canvas.svelte +11 -0
  43. package/dist/color-picker-area-canvas.svelte.d.ts +4 -0
  44. package/dist/color-picker-area-thumb.svelte +11 -0
  45. package/dist/color-picker-area-thumb.svelte.d.ts +4 -0
  46. package/dist/color-picker-area.svelte +11 -0
  47. package/dist/color-picker-area.svelte.d.ts +4 -0
  48. package/dist/color-picker-channel-input.svelte +35 -0
  49. package/dist/color-picker-channel-input.svelte.d.ts +9 -0
  50. package/dist/color-picker-context.d.ts +23 -0
  51. package/dist/color-picker-context.js +24 -0
  52. package/dist/color-picker-eye-dropper.svelte +11 -0
  53. package/dist/color-picker-eye-dropper.svelte.d.ts +4 -0
  54. package/dist/color-picker-input.svelte +11 -0
  55. package/dist/color-picker-input.svelte.d.ts +4 -0
  56. package/dist/color-picker-part.svelte +38 -0
  57. package/dist/color-picker-part.svelte.d.ts +11 -0
  58. package/dist/color-picker-slider-thumb.svelte +11 -0
  59. package/dist/color-picker-slider-thumb.svelte.d.ts +4 -0
  60. package/dist/color-picker-slider.svelte +21 -0
  61. package/dist/color-picker-slider.svelte.d.ts +9 -0
  62. package/dist/color-picker-swatch-item.svelte +38 -0
  63. package/dist/color-picker-swatch-item.svelte.d.ts +9 -0
  64. package/dist/color-picker-swatch.svelte +11 -0
  65. package/dist/color-picker-swatch.svelte.d.ts +4 -0
  66. package/dist/color-picker-swatches.svelte +11 -0
  67. package/dist/color-picker-swatches.svelte.d.ts +4 -0
  68. package/dist/color-picker.svelte +132 -0
  69. package/dist/color-picker.svelte.d.ts +18 -0
  70. package/dist/combobox-chip-remove.svelte +25 -0
  71. package/dist/combobox-chip-remove.svelte.d.ts +4 -0
  72. package/dist/combobox-chip.svelte +14 -0
  73. package/dist/combobox-chip.svelte.d.ts +7 -0
  74. package/dist/combobox-chips-overflow.svelte +27 -0
  75. package/dist/combobox-chips-overflow.svelte.d.ts +12 -0
  76. package/dist/combobox-chips.svelte +12 -0
  77. package/dist/combobox-chips.svelte.d.ts +4 -0
  78. package/dist/combobox-clear.svelte +27 -0
  79. package/dist/combobox-clear.svelte.d.ts +4 -0
  80. package/dist/combobox-compound-root.svelte +150 -0
  81. package/dist/combobox-compound-root.svelte.d.ts +37 -0
  82. package/dist/combobox-compound.svelte.d.ts +59 -0
  83. package/dist/combobox-compound.svelte.js +21 -0
  84. package/dist/combobox-content.svelte +21 -0
  85. package/dist/combobox-content.svelte.d.ts +7 -0
  86. package/dist/combobox-create.svelte +63 -0
  87. package/dist/combobox-create.svelte.d.ts +11 -0
  88. package/dist/combobox-empty.svelte +22 -0
  89. package/dist/combobox-empty.svelte.d.ts +9 -0
  90. package/dist/combobox-group-label.svelte +14 -0
  91. package/dist/combobox-group-label.svelte.d.ts +4 -0
  92. package/dist/combobox-group.svelte +16 -0
  93. package/dist/combobox-group.svelte.d.ts +4 -0
  94. package/dist/combobox-input.svelte +44 -0
  95. package/dist/combobox-input.svelte.d.ts +4 -0
  96. package/dist/combobox-item-icon.svelte +12 -0
  97. package/dist/combobox-item-icon.svelte.d.ts +7 -0
  98. package/dist/combobox-item-indicator.svelte +24 -0
  99. package/dist/combobox-item-indicator.svelte.d.ts +7 -0
  100. package/dist/combobox-item-text.svelte +31 -0
  101. package/dist/combobox-item-text.svelte.d.ts +11 -0
  102. package/dist/combobox-item.svelte +87 -0
  103. package/dist/combobox-item.svelte.d.ts +14 -0
  104. package/dist/combobox-label.svelte +14 -0
  105. package/dist/combobox-label.svelte.d.ts +4 -0
  106. package/dist/combobox-list.svelte +36 -0
  107. package/dist/combobox-list.svelte.d.ts +12 -0
  108. package/dist/combobox-options.svelte +194 -0
  109. package/dist/combobox-options.svelte.d.ts +63 -0
  110. package/dist/combobox-select-all.svelte +36 -0
  111. package/dist/combobox-select-all.svelte.d.ts +11 -0
  112. package/dist/combobox-separator.svelte +12 -0
  113. package/dist/combobox-separator.svelte.d.ts +4 -0
  114. package/dist/combobox-status.svelte +20 -0
  115. package/dist/combobox-status.svelte.d.ts +9 -0
  116. package/dist/combobox-trigger.svelte +36 -0
  117. package/dist/combobox-trigger.svelte.d.ts +11 -0
  118. package/dist/combobox-value-icon.svelte +12 -0
  119. package/dist/combobox-value-icon.svelte.d.ts +4 -0
  120. package/dist/combobox-value.svelte +40 -0
  121. package/dist/combobox-value.svelte.d.ts +12 -0
  122. package/dist/combobox.svelte +59 -0
  123. package/dist/combobox.svelte.d.ts +37 -0
  124. package/dist/command-empty.svelte +29 -0
  125. package/dist/command-empty.svelte.d.ts +15 -0
  126. package/dist/command-group-label.svelte +16 -0
  127. package/dist/command-group-label.svelte.d.ts +9 -0
  128. package/dist/command-group.svelte +31 -0
  129. package/dist/command-group.svelte.d.ts +11 -0
  130. package/dist/command-inline.svelte +45 -0
  131. package/dist/command-inline.svelte.d.ts +14 -0
  132. package/dist/command-input.svelte +27 -0
  133. package/dist/command-input.svelte.d.ts +6 -0
  134. package/dist/command-item-icon.svelte +18 -0
  135. package/dist/command-item-icon.svelte.d.ts +11 -0
  136. package/dist/command-item-text.svelte +24 -0
  137. package/dist/command-item-text.svelte.d.ts +12 -0
  138. package/dist/command-item.svelte +110 -0
  139. package/dist/command-item.svelte.d.ts +22 -0
  140. package/dist/command-list.svelte +28 -0
  141. package/dist/command-list.svelte.d.ts +15 -0
  142. package/dist/command-page.svelte +24 -0
  143. package/dist/command-page.svelte.d.ts +13 -0
  144. package/dist/command-scope.svelte.d.ts +93 -0
  145. package/dist/command-scope.svelte.js +155 -0
  146. package/dist/command-separator.svelte +13 -0
  147. package/dist/command-separator.svelte.d.ts +6 -0
  148. package/dist/command-shortcut.svelte +20 -0
  149. package/dist/command-shortcut.svelte.d.ts +11 -0
  150. package/dist/command-status.svelte +21 -0
  151. package/dist/command-status.svelte.d.ts +10 -0
  152. package/dist/command.svelte +219 -0
  153. package/dist/command.svelte.d.ts +54 -0
  154. package/dist/context-menu.svelte +107 -0
  155. package/dist/context-menu.svelte.d.ts +15 -0
  156. package/dist/date-input-segment.svelte +50 -0
  157. package/dist/date-input-segment.svelte.d.ts +12 -0
  158. package/dist/date-input.svelte +245 -0
  159. package/dist/date-input.svelte.d.ts +37 -0
  160. package/dist/date-picker.svelte +533 -0
  161. package/dist/date-picker.svelte.d.ts +85 -0
  162. package/dist/date-segments-context.d.ts +7 -0
  163. package/dist/date-segments-context.js +7 -0
  164. package/dist/describe.svelte +41 -0
  165. package/dist/describe.svelte.d.ts +8 -0
  166. package/dist/dialog.svelte +91 -0
  167. package/dist/dialog.svelte.d.ts +17 -0
  168. package/dist/direction.svelte +43 -0
  169. package/dist/direction.svelte.d.ts +12 -0
  170. package/dist/dnd.svelte.d.ts +60 -0
  171. package/dist/dnd.svelte.js +101 -0
  172. package/dist/drawer.svelte +87 -0
  173. package/dist/drawer.svelte.d.ts +17 -0
  174. package/dist/empty-state.svelte +83 -0
  175. package/dist/empty-state.svelte.d.ts +16 -0
  176. package/dist/engine-state.svelte.d.ts +12 -0
  177. package/dist/engine-state.svelte.js +28 -0
  178. package/dist/error-state.svelte +93 -0
  179. package/dist/error-state.svelte.d.ts +16 -0
  180. package/dist/field-api.d.ts +6 -0
  181. package/dist/field-api.js +16 -0
  182. package/dist/field.svelte +143 -0
  183. package/dist/field.svelte.d.ts +37 -0
  184. package/dist/file-input.svelte +102 -0
  185. package/dist/file-input.svelte.d.ts +28 -0
  186. package/dist/gauge-context.d.ts +26 -0
  187. package/dist/gauge-context.js +41 -0
  188. package/dist/gauge-indicator.svelte +25 -0
  189. package/dist/gauge-indicator.svelte.d.ts +10 -0
  190. package/dist/gauge-label.svelte +16 -0
  191. package/dist/gauge-label.svelte.d.ts +8 -0
  192. package/dist/gauge-track.svelte +14 -0
  193. package/dist/gauge-track.svelte.d.ts +8 -0
  194. package/dist/gauge-value.svelte +14 -0
  195. package/dist/gauge-value.svelte.d.ts +9 -0
  196. package/dist/headless.svelte.d.ts +63 -0
  197. package/dist/headless.svelte.js +314 -0
  198. package/dist/hidden-input.svelte +42 -0
  199. package/dist/hidden-input.svelte.d.ts +12 -0
  200. package/dist/hover-card.svelte +69 -0
  201. package/dist/hover-card.svelte.d.ts +17 -0
  202. package/dist/icon-button.svelte +83 -0
  203. package/dist/icon-button.svelte.d.ts +12 -0
  204. package/dist/icon.svelte +41 -0
  205. package/dist/icon.svelte.d.ts +16 -0
  206. package/dist/image-cropper.svelte +78 -0
  207. package/dist/image-cropper.svelte.d.ts +8 -0
  208. package/dist/image.svelte +51 -0
  209. package/dist/image.svelte.d.ts +12 -0
  210. package/dist/index.d.ts +198 -0
  211. package/dist/index.js +187 -0
  212. package/dist/input-group.svelte +100 -0
  213. package/dist/input-group.svelte.d.ts +14 -0
  214. package/dist/input.svelte +63 -0
  215. package/dist/input.svelte.d.ts +17 -0
  216. package/dist/item.svelte +147 -0
  217. package/dist/item.svelte.d.ts +29 -0
  218. package/dist/kbd.svelte +41 -0
  219. package/dist/kbd.svelte.d.ts +12 -0
  220. package/dist/label.svelte +40 -0
  221. package/dist/label.svelte.d.ts +14 -0
  222. package/dist/listbox.svelte +135 -0
  223. package/dist/listbox.svelte.d.ts +38 -0
  224. package/dist/loader.svelte +38 -0
  225. package/dist/loader.svelte.d.ts +8 -0
  226. package/dist/mention-menu.svelte +134 -0
  227. package/dist/mention-menu.svelte.d.ts +23 -0
  228. package/dist/menu.svelte +185 -0
  229. package/dist/menu.svelte.d.ts +34 -0
  230. package/dist/menubar.svelte +75 -0
  231. package/dist/menubar.svelte.d.ts +21 -0
  232. package/dist/meter.svelte +83 -0
  233. package/dist/meter.svelte.d.ts +21 -0
  234. package/dist/native-select.svelte +87 -0
  235. package/dist/native-select.svelte.d.ts +16 -0
  236. package/dist/navigation-menu.svelte +155 -0
  237. package/dist/navigation-menu.svelte.d.ts +28 -0
  238. package/dist/number-input-scrub-area.svelte +55 -0
  239. package/dist/number-input-scrub-area.svelte.d.ts +18 -0
  240. package/dist/number-input-scrub.d.ts +6 -0
  241. package/dist/number-input-scrub.js +4 -0
  242. package/dist/number-input.svelte +86 -0
  243. package/dist/number-input.svelte.d.ts +26 -0
  244. package/dist/otp-input.svelte +96 -0
  245. package/dist/otp-input.svelte.d.ts +14 -0
  246. package/dist/overlay.svelte.d.ts +29 -0
  247. package/dist/overlay.svelte.js +46 -0
  248. package/dist/pagination.svelte +129 -0
  249. package/dist/pagination.svelte.d.ts +33 -0
  250. package/dist/parts-part.svelte +62 -0
  251. package/dist/parts-part.svelte.d.ts +14 -0
  252. package/dist/parts-root.svelte +74 -0
  253. package/dist/parts-root.svelte.d.ts +12 -0
  254. package/dist/password-input.svelte +129 -0
  255. package/dist/password-input.svelte.d.ts +49 -0
  256. package/dist/popover.svelte +85 -0
  257. package/dist/popover.svelte.d.ts +19 -0
  258. package/dist/preferences/preferences.svelte +96 -0
  259. package/dist/preferences/preferences.svelte.d.ts +21 -0
  260. package/dist/preferences.d.ts +2 -0
  261. package/dist/preferences.js +2 -0
  262. package/dist/preferences.svelte.d.ts +11 -0
  263. package/dist/preferences.svelte.js +26 -0
  264. package/dist/presence.svelte.d.ts +25 -0
  265. package/dist/presence.svelte.js +57 -0
  266. package/dist/progress.svelte +88 -0
  267. package/dist/progress.svelte.d.ts +21 -0
  268. package/dist/props.d.ts +8 -0
  269. package/dist/props.js +7 -0
  270. package/dist/query.svelte.d.ts +65 -0
  271. package/dist/query.svelte.js +219 -0
  272. package/dist/radio.svelte +79 -0
  273. package/dist/radio.svelte.d.ts +21 -0
  274. package/dist/rating.svelte +86 -0
  275. package/dist/rating.svelte.d.ts +28 -0
  276. package/dist/resizable.svelte +69 -0
  277. package/dist/resizable.svelte.d.ts +21 -0
  278. package/dist/scroll-area.svelte +66 -0
  279. package/dist/scroll-area.svelte.d.ts +18 -0
  280. package/dist/segmented-control.svelte +83 -0
  281. package/dist/segmented-control.svelte.d.ts +27 -0
  282. package/dist/select.svelte +285 -0
  283. package/dist/select.svelte.d.ts +77 -0
  284. package/dist/separator.svelte +26 -0
  285. package/dist/separator.svelte.d.ts +8 -0
  286. package/dist/sheet.svelte +105 -0
  287. package/dist/sheet.svelte.d.ts +19 -0
  288. package/dist/sidebar.svelte +66 -0
  289. package/dist/sidebar.svelte.d.ts +16 -0
  290. package/dist/skeleton.svelte +29 -0
  291. package/dist/skeleton.svelte.d.ts +8 -0
  292. package/dist/slider.svelte +78 -0
  293. package/dist/slider.svelte.d.ts +17 -0
  294. package/dist/sortable-board-strict.svelte +76 -0
  295. package/dist/sortable-board-strict.svelte.d.ts +12 -0
  296. package/dist/sortable-engine.svelte +129 -0
  297. package/dist/sortable-engine.svelte.d.ts +30 -0
  298. package/dist/sortable.svelte +86 -0
  299. package/dist/sortable.svelte.d.ts +27 -0
  300. package/dist/spinner.svelte +27 -0
  301. package/dist/spinner.svelte.d.ts +8 -0
  302. package/dist/steps.svelte +95 -0
  303. package/dist/steps.svelte.d.ts +23 -0
  304. package/dist/switch.svelte +74 -0
  305. package/dist/switch.svelte.d.ts +19 -0
  306. package/dist/table.svelte +151 -0
  307. package/dist/table.svelte.d.ts +23 -0
  308. package/dist/tabs.svelte +97 -0
  309. package/dist/tabs.svelte.d.ts +23 -0
  310. package/dist/textarea.svelte +65 -0
  311. package/dist/textarea.svelte.d.ts +17 -0
  312. package/dist/time-input.svelte +128 -0
  313. package/dist/time-input.svelte.d.ts +28 -0
  314. package/dist/timeline.svelte +88 -0
  315. package/dist/timeline.svelte.d.ts +25 -0
  316. package/dist/toast.svelte +190 -0
  317. package/dist/toast.svelte.d.ts +37 -0
  318. package/dist/toaster.d.ts +2 -0
  319. package/dist/toaster.js +6 -0
  320. package/dist/toggle-group.svelte +76 -0
  321. package/dist/toggle-group.svelte.d.ts +19 -0
  322. package/dist/toggle.svelte +50 -0
  323. package/dist/toggle.svelte.d.ts +14 -0
  324. package/dist/token-input-editor.svelte +42 -0
  325. package/dist/token-input-editor.svelte.d.ts +4 -0
  326. package/dist/token-input-segments-root.svelte +120 -0
  327. package/dist/token-input-segments-root.svelte.d.ts +33 -0
  328. package/dist/token-input-token-remove.svelte +32 -0
  329. package/dist/token-input-token-remove.svelte.d.ts +4 -0
  330. package/dist/token-input-token-scope.svelte +15 -0
  331. package/dist/token-input-token-scope.svelte.d.ts +9 -0
  332. package/dist/token-input-token.svelte +22 -0
  333. package/dist/token-input-token.svelte.d.ts +4 -0
  334. package/dist/token-input.svelte +157 -0
  335. package/dist/token-input.svelte.d.ts +66 -0
  336. package/dist/token-segments-scope.svelte.d.ts +17 -0
  337. package/dist/token-segments-scope.svelte.js +11 -0
  338. package/dist/toolbar-item.svelte +31 -0
  339. package/dist/toolbar-item.svelte.d.ts +14 -0
  340. package/dist/toolbar.svelte +74 -0
  341. package/dist/toolbar.svelte.d.ts +19 -0
  342. package/dist/tooltip.svelte +84 -0
  343. package/dist/tooltip.svelte.d.ts +18 -0
  344. package/dist/tree-grid.svelte +159 -0
  345. package/dist/tree-grid.svelte.d.ts +34 -0
  346. package/dist/tree.svelte +229 -0
  347. package/dist/tree.svelte.d.ts +65 -0
  348. package/dist/trigger-menu-content.svelte +24 -0
  349. package/dist/trigger-menu-content.svelte.d.ts +11 -0
  350. package/dist/trigger-menu-editor.svelte +32 -0
  351. package/dist/trigger-menu-editor.svelte.d.ts +13 -0
  352. package/dist/trigger-menu-empty.svelte +29 -0
  353. package/dist/trigger-menu-empty.svelte.d.ts +15 -0
  354. package/dist/trigger-menu-group-label.svelte +16 -0
  355. package/dist/trigger-menu-group-label.svelte.d.ts +9 -0
  356. package/dist/trigger-menu-group.svelte +16 -0
  357. package/dist/trigger-menu-group.svelte.d.ts +9 -0
  358. package/dist/trigger-menu-hint.svelte +16 -0
  359. package/dist/trigger-menu-hint.svelte.d.ts +9 -0
  360. package/dist/trigger-menu-inline.svelte.d.ts +59 -0
  361. package/dist/trigger-menu-inline.svelte.js +72 -0
  362. package/dist/trigger-menu-input.svelte +24 -0
  363. package/dist/trigger-menu-input.svelte.d.ts +6 -0
  364. package/dist/trigger-menu-item-icon.svelte +18 -0
  365. package/dist/trigger-menu-item-icon.svelte.d.ts +11 -0
  366. package/dist/trigger-menu-item.svelte +40 -0
  367. package/dist/trigger-menu-item.svelte.d.ts +19 -0
  368. package/dist/trigger-menu-list.svelte +20 -0
  369. package/dist/trigger-menu-list.svelte.d.ts +12 -0
  370. package/dist/trigger-menu-separator.svelte +13 -0
  371. package/dist/trigger-menu-separator.svelte.d.ts +6 -0
  372. package/dist/trigger-menu-status.svelte +21 -0
  373. package/dist/trigger-menu-status.svelte.d.ts +10 -0
  374. package/dist/trigger-menu.svelte +150 -0
  375. package/dist/trigger-menu.svelte.d.ts +30 -0
  376. package/dist/virtual-list-strict.svelte +83 -0
  377. package/dist/virtual-list-strict.svelte.d.ts +23 -0
  378. package/dist/virtual-list.svelte +86 -0
  379. package/dist/virtual-list.svelte.d.ts +28 -0
  380. package/dist/virtual.svelte.d.ts +24 -0
  381. package/dist/virtual.svelte.js +48 -0
  382. package/dist/waterfall-axis.svelte +25 -0
  383. package/dist/waterfall-axis.svelte.d.ts +14 -0
  384. package/dist/waterfall-bar.svelte +23 -0
  385. package/dist/waterfall-bar.svelte.d.ts +7 -0
  386. package/dist/waterfall-cell.svelte +13 -0
  387. package/dist/waterfall-cell.svelte.d.ts +7 -0
  388. package/dist/waterfall-chart.svelte +134 -0
  389. package/dist/waterfall-chart.svelte.d.ts +27 -0
  390. package/dist/waterfall-column-header.svelte +13 -0
  391. package/dist/waterfall-column-header.svelte.d.ts +7 -0
  392. package/dist/waterfall-header-row.svelte +13 -0
  393. package/dist/waterfall-header-row.svelte.d.ts +7 -0
  394. package/dist/waterfall-indicator.svelte +32 -0
  395. package/dist/waterfall-indicator.svelte.d.ts +7 -0
  396. package/dist/waterfall-mark.svelte +26 -0
  397. package/dist/waterfall-mark.svelte.d.ts +9 -0
  398. package/dist/waterfall-row-header.svelte +13 -0
  399. package/dist/waterfall-row-header.svelte.d.ts +7 -0
  400. package/dist/waterfall-row.svelte +39 -0
  401. package/dist/waterfall-row.svelte.d.ts +9 -0
  402. package/dist/waterfall-tick.svelte +25 -0
  403. package/dist/waterfall-tick.svelte.d.ts +9 -0
  404. package/dist/waterfall-trace.d.ts +17 -0
  405. package/dist/waterfall-trace.js +10 -0
  406. package/dist/waterfall.svelte +177 -0
  407. package/dist/waterfall.svelte.d.ts +48 -0
  408. package/package.json +447 -3
  409. package/README.md +0 -3
@@ -0,0 +1,24 @@
1
+ <script module lang="ts">
2
+ // @stable — follows semver.
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
+ import type { CommandTextSegment } from "@bevelo/core";
6
+
7
+ /** Props for `CommandItemText`: a row's label. Its snippet receives the label split around what the query matched. */
8
+ export interface CommandItemTextProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
9
+ children?: Snippet<[{ readonly segments: readonly CommandTextSegment[] }]> | undefined;
10
+ }
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ import { commandTextSegments } from "@bevelo/core";
15
+ import { commandItem, inlineCommand } from "./command-scope.svelte.js";
16
+
17
+ let { children, ...rest }: CommandItemTextProps = $props();
18
+ const scope = inlineCommand();
19
+ const item = commandItem();
20
+ const label = $derived(item?.label() ?? "");
21
+ const segments = $derived(commandTextSegments(label, scope?.query ?? ""));
22
+ </script>
23
+
24
+ <span data-part="option-label" {...rest}>{#if children}{@render children({ segments })}{:else}{label}{/if}</span>
@@ -0,0 +1,12 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ import type { CommandTextSegment } from "@bevelo/core";
4
+ /** Props for `CommandItemText`: a row's label. Its snippet receives the label split around what the query matched. */
5
+ export interface CommandItemTextProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
6
+ children?: Snippet<[{
7
+ readonly segments: readonly CommandTextSegment[];
8
+ }]> | undefined;
9
+ }
10
+ declare const CommandItemText: import("svelte").Component<CommandItemTextProps, {}, "">;
11
+ type CommandItemText = ReturnType<typeof CommandItemText>;
12
+ export default CommandItemText;
@@ -0,0 +1,110 @@
1
+ <script module lang="ts">
2
+ // @stable — follows semver.
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
+ import type { CommandItemState } from "./command-scope.svelte.js";
6
+
7
+ /**
8
+ * Props for `CommandItem`: one row. Its value is `value`, else its label; its
9
+ * label is `label`, else the text it first renders.
10
+ */
11
+ export interface CommandItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onselect"> {
12
+ value?: string | undefined;
13
+ label?: string | undefined;
14
+ keywords?: readonly string[] | undefined;
15
+ shortcut?: string | undefined;
16
+ /** Pushes this page onto the list's stack when the row is chosen. */
17
+ page?: string | undefined;
18
+ disabled?: boolean | undefined;
19
+ /** Runs when the row is chosen; a returned promise marks the row pending until it settles. */
20
+ onSelect?: ((value: string) => unknown) | undefined;
21
+ children?: Snippet<[CommandItemState]> | undefined;
22
+ }
23
+ </script>
24
+
25
+ <script lang="ts">
26
+ import { onMount } from "svelte";
27
+ import { commandGroups, inlineCommand, provideItem, visibleText } from "./command-scope.svelte.js";
28
+
29
+ let {
30
+ value, label, keywords, shortcut = "", page, disabled = false, onSelect, onclick, children, ...rest
31
+ }: CommandItemProps = $props();
32
+
33
+ const scope = inlineCommand();
34
+ const groups = commandGroups();
35
+ let pending = $state(false);
36
+ let error = $state<unknown>(undefined);
37
+ let text = $state("");
38
+ const ownLabel = $derived(label ?? (text === "" ? (value ?? "") : text));
39
+ const ownValue = $derived(value ?? ownLabel);
40
+
41
+ function choose(): void {
42
+ if (disabled) return;
43
+ if (page !== undefined) scope?.push(page);
44
+ if (onSelect !== undefined) {
45
+ try {
46
+ const result = onSelect(ownValue);
47
+ if (result instanceof Promise) {
48
+ pending = true;
49
+ error = undefined;
50
+ result.then(
51
+ () => {
52
+ pending = false;
53
+ },
54
+ (reason: unknown) => {
55
+ pending = false;
56
+ error = reason;
57
+ },
58
+ );
59
+ }
60
+ } catch (reason) {
61
+ error = reason;
62
+ }
63
+ }
64
+ scope?.report(ownValue);
65
+ }
66
+
67
+ const key = Symbol("item");
68
+ if (scope !== undefined) {
69
+ scope.register(key, () => ({ value: ownValue, label: ownLabel, keywords, disabled, groups, run: choose }));
70
+ onMount(() => () => scope.unregister(key));
71
+ }
72
+ provideItem({ label: () => ownLabel, shortcut: () => shortcut });
73
+
74
+ const visible = $derived(scope === undefined || scope.matches({ value: ownValue, label: ownLabel, keywords }));
75
+ const active = $derived(scope?.highlighted === ownValue);
76
+ const itemState: CommandItemState = $derived({ highlighted: active, selected: active, disabled, pending, error });
77
+
78
+ // Without a `label`, the row's text is read once from what it first renders,
79
+ // the way a reader would hear it. Reading it on every change would feed a
80
+ // row's own state text (a spinner's label, a `<CommandItemText>` that renders
81
+ // the label) back into its label.
82
+ let element = $state<HTMLDivElement>();
83
+ onMount(() => {
84
+ if (label === undefined && element !== undefined) text = visibleText(element);
85
+ });
86
+ </script>
87
+
88
+ {#if visible}
89
+ <div
90
+ bind:this={element}
91
+ role="option"
92
+ tabindex="-1"
93
+ data-part="option"
94
+ data-value={ownValue}
95
+ aria-selected={active ? "true" : "false"}
96
+ data-active={active ? "" : undefined}
97
+ data-highlighted={active ? "" : undefined}
98
+ data-pending={pending ? "" : undefined}
99
+ aria-disabled={disabled ? "true" : undefined}
100
+ data-disabled={disabled ? "" : undefined}
101
+ {...rest}
102
+ onpointermove={() => {
103
+ if (scope !== undefined && !disabled && !active) scope.highlight(ownValue);
104
+ }}
105
+ onclick={(event) => {
106
+ choose();
107
+ onclick?.(event);
108
+ }}
109
+ >{#if children}{@render children(itemState)}{/if}</div>
110
+ {/if}
@@ -0,0 +1,22 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ import type { CommandItemState } from "./command-scope.svelte.js";
4
+ /**
5
+ * Props for `CommandItem`: one row. Its value is `value`, else its label; its
6
+ * label is `label`, else the text it first renders.
7
+ */
8
+ export interface CommandItemProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" | "onselect"> {
9
+ value?: string | undefined;
10
+ label?: string | undefined;
11
+ keywords?: readonly string[] | undefined;
12
+ shortcut?: string | undefined;
13
+ /** Pushes this page onto the list's stack when the row is chosen. */
14
+ page?: string | undefined;
15
+ disabled?: boolean | undefined;
16
+ /** Runs when the row is chosen; a returned promise marks the row pending until it settles. */
17
+ onSelect?: ((value: string) => unknown) | undefined;
18
+ children?: Snippet<[CommandItemState]> | undefined;
19
+ }
20
+ declare const CommandItem: import("svelte").Component<CommandItemProps, {}, "">;
21
+ type CommandItem = ReturnType<typeof CommandItem>;
22
+ export default CommandItem;
@@ -0,0 +1,28 @@
1
+ <script module lang="ts">
2
+ // @stable — follows semver.
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
+ import type { CommandData } from "@bevelo/core";
6
+
7
+ /** What `CommandList`'s snippet receives. */
8
+ export interface CommandListContent {
9
+ readonly items: CommandData;
10
+ readonly highlightedValue?: string | undefined;
11
+ }
12
+
13
+ /** Props for `CommandList`: the listbox. Its snippet receives `{ items, highlightedValue }`. */
14
+ export interface CommandListProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
15
+ children?: Snippet<[CommandListContent]> | undefined;
16
+ }
17
+ </script>
18
+
19
+ <script lang="ts">
20
+ import { inlineCommand } from "./command-scope.svelte.js";
21
+
22
+ let { children, ...rest }: CommandListProps = $props();
23
+ const scope = inlineCommand();
24
+ </script>
25
+
26
+ <div role="listbox" data-part="list" {...rest}>
27
+ {#if children}{@render children({ items: scope?.items ?? [], highlightedValue: scope?.highlighted })}{/if}
28
+ </div>
@@ -0,0 +1,15 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ import type { CommandData } from "@bevelo/core";
4
+ /** What `CommandList`'s snippet receives. */
5
+ export interface CommandListContent {
6
+ readonly items: CommandData;
7
+ readonly highlightedValue?: string | undefined;
8
+ }
9
+ /** Props for `CommandList`: the listbox. Its snippet receives `{ items, highlightedValue }`. */
10
+ export interface CommandListProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
11
+ children?: Snippet<[CommandListContent]> | undefined;
12
+ }
13
+ declare const CommandList: import("svelte").Component<CommandListProps, {}, "">;
14
+ type CommandList = ReturnType<typeof CommandList>;
15
+ export default CommandList;
@@ -0,0 +1,24 @@
1
+ <script module lang="ts">
2
+ // @stable — follows semver.
3
+ import type { Snippet } from "svelte";
4
+
5
+ /**
6
+ * Props for `CommandPage`: rows for one page of the stack. `value` names the
7
+ * page; a page without a value is the root, shown while the stack is empty.
8
+ */
9
+ export interface CommandPageProps {
10
+ value?: string | undefined;
11
+ id?: string | undefined;
12
+ children?: Snippet | undefined;
13
+ }
14
+ </script>
15
+
16
+ <script lang="ts">
17
+ import { inlineCommand } from "./command-scope.svelte.js";
18
+
19
+ let { value, id, children }: CommandPageProps = $props();
20
+ const scope = inlineCommand();
21
+ const shown = $derived(scope === undefined || scope.page === (id ?? value));
22
+ </script>
23
+
24
+ {#if shown && children}{@render children()}{/if}
@@ -0,0 +1,13 @@
1
+ import type { Snippet } from "svelte";
2
+ /**
3
+ * Props for `CommandPage`: rows for one page of the stack. `value` names the
4
+ * page; a page without a value is the root, shown while the stack is empty.
5
+ */
6
+ export interface CommandPageProps {
7
+ value?: string | undefined;
8
+ id?: string | undefined;
9
+ children?: Snippet | undefined;
10
+ }
11
+ declare const CommandPage: import("svelte").Component<CommandPageProps, {}, "">;
12
+ type CommandPage = ReturnType<typeof CommandPage>;
13
+ export default CommandPage;
@@ -0,0 +1,93 @@
1
+ import type { CommandData, CommandEntry, CommandFilterMode, PrimitiveCommandApi } from "@bevelo/core";
2
+ /**
3
+ * The imperative surface `Command`'s `api()` returns, in either mode. The
4
+ * palette's primitive methods are no-ops or empty in the inline list, and the
5
+ * page and focus methods are no-ops in the palette.
6
+ */
7
+ export type CommandApi = Omit<PrimitiveCommandApi, "run"> & {
8
+ /** Runs a row by value, the highlighted row when none is given. False when there is nothing to run. */
9
+ run(id?: string): boolean;
10
+ /** Pushes a page onto the stack. */
11
+ push(page: string): void;
12
+ /** Pops the top page. */
13
+ pop(): void;
14
+ /** Highlights a row by value; `null` clears the request. */
15
+ setValue(value: string | null): void;
16
+ /** Focuses the search field. */
17
+ focus(): void;
18
+ };
19
+ /** What `<CommandEmpty>` and `<CommandStatus>` snippets receive. */
20
+ export interface CommandListState {
21
+ readonly empty: boolean;
22
+ readonly loading: boolean;
23
+ readonly count: number;
24
+ readonly query: string;
25
+ readonly status: string;
26
+ }
27
+ /** What a `<CommandItem>` snippet receives. */
28
+ export interface CommandItemState {
29
+ readonly highlighted: boolean;
30
+ readonly selected: boolean;
31
+ readonly disabled: boolean;
32
+ readonly pending: boolean;
33
+ readonly error: unknown;
34
+ }
35
+ /** One registered row. */
36
+ export interface InlineEntry extends CommandEntry {
37
+ readonly groups: readonly symbol[];
38
+ readonly run: () => void;
39
+ }
40
+ /** The props the scope reads, through a getter so they stay live. */
41
+ export interface InlineCommandOptions {
42
+ readonly query?: string | undefined;
43
+ readonly items?: CommandData | undefined;
44
+ readonly status?: string | undefined;
45
+ readonly pages?: readonly string[] | undefined;
46
+ readonly page?: string | undefined;
47
+ readonly filter?: CommandFilterMode | undefined;
48
+ readonly onRun?: ((id: string) => void) | undefined;
49
+ readonly onInput?: ((query: string) => void) | undefined;
50
+ readonly onHighlight?: ((value: string | undefined, details: {
51
+ readonly index: number;
52
+ }) => void) | undefined;
53
+ readonly onPagesChange?: ((pages: string[]) => void) | undefined;
54
+ readonly onPageChange?: ((page: string | undefined) => void) | undefined;
55
+ }
56
+ /** The list's state and the operations its parts call. */
57
+ export declare class InlineCommandScope {
58
+ #private;
59
+ root: HTMLElement | undefined;
60
+ constructor(options: () => InlineCommandOptions);
61
+ readonly query: string;
62
+ readonly pages: readonly string[];
63
+ readonly page: string | undefined;
64
+ readonly filter: import("@bevelo/core").CommandFilter;
65
+ readonly items: CommandData;
66
+ readonly entries: InlineEntry[];
67
+ readonly runnable: InlineEntry[];
68
+ readonly highlighted: string | undefined;
69
+ readonly state: CommandListState;
70
+ setQuery: (next: string) => void;
71
+ highlight: (value: string | undefined) => void;
72
+ push: (next: string) => void;
73
+ pop: () => void;
74
+ run: (value?: string) => boolean;
75
+ report: (value: string) => void;
76
+ register: (key: symbol, entry: () => InlineEntry) => void;
77
+ unregister: (key: symbol) => void;
78
+ matches: (entry: CommandEntry) => boolean;
79
+ groupMatches: (group: symbol) => boolean;
80
+ keydown: (event: KeyboardEvent) => void;
81
+ readonly api: CommandApi;
82
+ }
83
+ export declare const provideInlineCommand: (value: InlineCommandScope) => void, inlineCommand: () => InlineCommandScope | undefined;
84
+ export declare function provideGroup(id: symbol): readonly symbol[];
85
+ export declare function commandGroups(): readonly symbol[];
86
+ /** What a row hands its `<CommandItemText>` and `<CommandShortcut>`. */
87
+ export interface CommandItemScope {
88
+ readonly label: () => string;
89
+ readonly shortcut: () => string;
90
+ }
91
+ export declare const provideItem: (value: CommandItemScope) => void, commandItem: () => CommandItemScope | undefined;
92
+ /** A row's text as a reader hears it: aria-hidden icons and shortcuts are skipped. */
93
+ export declare function visibleText(node: Node): string;
@@ -0,0 +1,155 @@
1
+ // The inline command list's shared state on Svelte: `<Command>` with children
2
+ // and no palette props renders a filtered list the host composes from
3
+ // `<CommandItem>` rows, with no dialog and no primitive instance.
4
+ //
5
+ // The rows register with the list as they are created, so the list knows
6
+ // every row's value, label and keywords; core's command-logic decides the
7
+ // filter, the highlight and the keys. The parts read this scope from context.
8
+ //
9
+ // Internal: not exported from any public subpath.
10
+ import { commandEntryMatches, commandHighlighted, commandKeyAction, commandRunnable, resolveCommandFilter, } from "@bevelo/core";
11
+ import { createContextScope } from "./headless.svelte.js";
12
+ const NO_ITEMS = [];
13
+ /** The palette methods an inline list has no use for: it is always open and owns no ids. */
14
+ const inlinePaletteStubs = {
15
+ isOpen: () => true,
16
+ open: () => { },
17
+ close: () => { },
18
+ toggle: () => { },
19
+ matches: () => [],
20
+ options: () => [],
21
+ active: () => undefined,
22
+ runItem: () => { },
23
+ move: () => { },
24
+ inputId: () => "",
25
+ listboxId: () => "",
26
+ optionId: () => "",
27
+ groupLabelId: () => "",
28
+ instanceId: () => "",
29
+ };
30
+ /** The list's state and the operations its parts call. */
31
+ export class InlineCommandScope {
32
+ #options;
33
+ #ownQuery = $state("");
34
+ #requested = $state(undefined);
35
+ #ownPages = $state.raw([]);
36
+ #registry = $state.raw(new Map());
37
+ root = undefined;
38
+ constructor(options) {
39
+ this.#options = options;
40
+ const page = options().page;
41
+ if (page !== undefined)
42
+ this.#ownPages = [page];
43
+ }
44
+ query = $derived.by(() => this.#options().query ?? this.#ownQuery);
45
+ pages = $derived.by(() => {
46
+ const { pages, page } = this.#options();
47
+ return pages ?? (page === undefined ? this.#ownPages : [page]);
48
+ });
49
+ page = $derived.by(() => this.pages[this.pages.length - 1]);
50
+ filter = $derived.by(() => resolveCommandFilter(this.#options().filter));
51
+ items = $derived.by(() => this.#options().items ?? NO_ITEMS);
52
+ entries = $derived.by(() => [...this.#registry.values()].map((read) => read()));
53
+ runnable = $derived.by(() => commandRunnable(this.entries, this.query, this.filter));
54
+ highlighted = $derived.by(() => commandHighlighted(this.runnable, this.#requested));
55
+ state = $derived.by(() => {
56
+ const status = this.#options().status ?? "idle";
57
+ return {
58
+ empty: !this.entries.some((entry) => commandEntryMatches(entry, this.query, this.filter)),
59
+ loading: status === "loading",
60
+ count: this.runnable.length,
61
+ query: this.query,
62
+ status,
63
+ };
64
+ });
65
+ setQuery = (next) => {
66
+ if (this.#options().query === undefined)
67
+ this.#ownQuery = next;
68
+ this.#options().onInput?.(next);
69
+ };
70
+ highlight = (value) => {
71
+ this.#requested = value;
72
+ const index = value === undefined ? -1 : this.runnable.findIndex((entry) => entry.value === value);
73
+ this.#options().onHighlight?.(value, { index });
74
+ };
75
+ #setPages(next) {
76
+ if (this.#options().pages === undefined)
77
+ this.#ownPages = next;
78
+ this.#options().onPagesChange?.([...next]);
79
+ this.#options().onPageChange?.(next[next.length - 1]);
80
+ }
81
+ push = (next) => this.#setPages([...this.pages, next]);
82
+ pop = () => this.#setPages(this.pages.slice(0, -1));
83
+ run = (value) => {
84
+ const target = value ?? this.highlighted;
85
+ if (target === undefined)
86
+ return false;
87
+ const entry = this.entries.find((candidate) => candidate.value === target);
88
+ if (entry === undefined)
89
+ this.report(target);
90
+ else
91
+ entry.run();
92
+ return true;
93
+ };
94
+ report = (value) => {
95
+ this.#options().onRun?.(value);
96
+ };
97
+ register = (key, entry) => {
98
+ this.#registry = new Map(this.#registry).set(key, entry);
99
+ };
100
+ unregister = (key) => {
101
+ const next = new Map(this.#registry);
102
+ next.delete(key);
103
+ this.#registry = next;
104
+ };
105
+ matches = (entry) => this.query === "" || commandEntryMatches(entry, this.query, this.filter);
106
+ groupMatches = (group) => this.entries.some((entry) => entry.groups.includes(group) && commandEntryMatches(entry, this.query, this.filter));
107
+ keydown = (event) => {
108
+ const action = commandKeyAction(this.runnable, this.highlighted, event.key);
109
+ if (action === undefined)
110
+ return;
111
+ event.preventDefault();
112
+ if (action.kind === "highlight")
113
+ this.highlight(action.entry.value);
114
+ else
115
+ action.entry.run();
116
+ };
117
+ api = {
118
+ ...inlinePaletteStubs,
119
+ query: () => this.query,
120
+ setQuery: (query) => this.setQuery(query),
121
+ typeQuery: (query) => this.setQuery(query),
122
+ activeId: () => this.highlighted,
123
+ run: (id) => this.run(id),
124
+ runActive: () => {
125
+ this.run();
126
+ },
127
+ count: () => this.runnable.length,
128
+ push: (page) => this.push(page),
129
+ pop: () => this.pop(),
130
+ setValue: (value) => this.highlight(value ?? undefined),
131
+ focus: () => this.root?.querySelector("input")?.focus(),
132
+ };
133
+ }
134
+ export const [provideInlineCommand, inlineCommand] = createContextScope("command-inline");
135
+ const [setGroups, getGroups] = createContextScope("command-groups");
136
+ export function provideGroup(id) {
137
+ const chain = [...commandGroups(), id];
138
+ setGroups(chain);
139
+ return chain;
140
+ }
141
+ export function commandGroups() {
142
+ return getGroups() ?? [];
143
+ }
144
+ export const [provideItem, commandItem] = createContextScope("command-item");
145
+ /** A row's text as a reader hears it: aria-hidden icons and shortcuts are skipped. */
146
+ export function visibleText(node) {
147
+ if (node.nodeType === 3)
148
+ return node.textContent ?? "";
149
+ if (node instanceof Element && node.getAttribute("aria-hidden") === "true")
150
+ return "";
151
+ let text = "";
152
+ for (const child of node.childNodes)
153
+ text += visibleText(child);
154
+ return text;
155
+ }
@@ -0,0 +1,13 @@
1
+ <script module lang="ts">
2
+ // @stable — follows semver.
3
+ import type { HTMLAttributes } from "svelte/elements";
4
+
5
+ /** Props for `CommandSeparator`: a divider between rows or groups. */
6
+ export type CommandSeparatorProps = HTMLAttributes<HTMLDivElement>;
7
+ </script>
8
+
9
+ <script lang="ts">
10
+ let { ...rest }: CommandSeparatorProps = $props();
11
+ </script>
12
+
13
+ <div role="separator" data-slot="command-separator" {...rest}></div>
@@ -0,0 +1,6 @@
1
+ import type { HTMLAttributes } from "svelte/elements";
2
+ /** Props for `CommandSeparator`: a divider between rows or groups. */
3
+ export type CommandSeparatorProps = HTMLAttributes<HTMLDivElement>;
4
+ declare const CommandSeparator: import("svelte").Component<CommandSeparatorProps, {}, "">;
5
+ type CommandSeparator = ReturnType<typeof CommandSeparator>;
6
+ export default CommandSeparator;
@@ -0,0 +1,20 @@
1
+ <script module lang="ts">
2
+ // @stable — follows semver.
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
+
6
+ /** Props for `CommandShortcut`: the row's `shortcut`, hidden from assistive technology. */
7
+ export interface CommandShortcutProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
8
+ children?: Snippet<[{ readonly text: string }]> | undefined;
9
+ }
10
+ </script>
11
+
12
+ <script lang="ts">
13
+ import { commandItem } from "./command-scope.svelte.js";
14
+
15
+ let { children, ...rest }: CommandShortcutProps = $props();
16
+ const item = commandItem();
17
+ const text = $derived(item?.shortcut() ?? "");
18
+ </script>
19
+
20
+ <span data-part="option-shortcut" aria-hidden="true" {...rest}>{#if children}{@render children({ text })}{:else}{text}{/if}</span>
@@ -0,0 +1,11 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ /** Props for `CommandShortcut`: the row's `shortcut`, hidden from assistive technology. */
4
+ export interface CommandShortcutProps extends Omit<HTMLAttributes<HTMLSpanElement>, "children"> {
5
+ children?: Snippet<[{
6
+ readonly text: string;
7
+ }]> | undefined;
8
+ }
9
+ declare const CommandShortcut: import("svelte").Component<CommandShortcutProps, {}, "">;
10
+ type CommandShortcut = ReturnType<typeof CommandShortcut>;
11
+ export default CommandShortcut;
@@ -0,0 +1,21 @@
1
+ <script module lang="ts">
2
+ // @stable — follows semver.
3
+ import type { Snippet } from "svelte";
4
+ import type { HTMLAttributes } from "svelte/elements";
5
+ import type { CommandListState } from "./command-scope.svelte.js";
6
+
7
+ /** Props for `CommandStatus`: a polite live region. Its snippet receives the list's state. */
8
+ export interface CommandStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
9
+ children?: Snippet<[CommandListState]> | undefined;
10
+ }
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ import { inlineCommand } from "./command-scope.svelte.js";
15
+
16
+ let { children, ...rest }: CommandStatusProps = $props();
17
+ const scope = inlineCommand();
18
+ const state = $derived(scope?.state ?? { empty: true, loading: false, count: 0, query: "", status: "idle" });
19
+ </script>
20
+
21
+ <div role="status" aria-live="polite" data-part="status" {...rest}>{#if children}{@render children(state)}{/if}</div>
@@ -0,0 +1,10 @@
1
+ import type { Snippet } from "svelte";
2
+ import type { HTMLAttributes } from "svelte/elements";
3
+ import type { CommandListState } from "./command-scope.svelte.js";
4
+ /** Props for `CommandStatus`: a polite live region. Its snippet receives the list's state. */
5
+ export interface CommandStatusProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
6
+ children?: Snippet<[CommandListState]> | undefined;
7
+ }
8
+ declare const CommandStatus: import("svelte").Component<CommandStatusProps, {}, "">;
9
+ type CommandStatus = ReturnType<typeof CommandStatus>;
10
+ export default CommandStatus;