@sewadah/selaras 0.1.1 → 0.3.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 (385) hide show
  1. package/README.md +67 -20
  2. package/dist/module.d.mts +10 -0
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +123 -36
  5. package/dist/runtime/components/Accordion.d.vue.ts +3 -0
  6. package/dist/runtime/components/Accordion.vue +5 -1
  7. package/dist/runtime/components/Accordion.vue.d.ts +3 -0
  8. package/dist/runtime/components/Alert.d.vue.ts +2 -1
  9. package/dist/runtime/components/Alert.vue +6 -3
  10. package/dist/runtime/components/Alert.vue.d.ts +2 -1
  11. package/dist/runtime/components/AlertDialog.d.vue.ts +2 -0
  12. package/dist/runtime/components/AlertDialog.vue +21 -8
  13. package/dist/runtime/components/AlertDialog.vue.d.ts +2 -0
  14. package/dist/runtime/components/App.vue +9 -2
  15. package/dist/runtime/components/Autocomplete.d.vue.ts +22 -58
  16. package/dist/runtime/components/Autocomplete.vue +50 -11
  17. package/dist/runtime/components/Autocomplete.vue.d.ts +22 -58
  18. package/dist/runtime/components/Avatar.d.vue.ts +2 -1
  19. package/dist/runtime/components/Avatar.vue +4 -2
  20. package/dist/runtime/components/Avatar.vue.d.ts +2 -1
  21. package/dist/runtime/components/Badge.d.vue.ts +3 -2
  22. package/dist/runtime/components/Badge.vue +8 -5
  23. package/dist/runtime/components/Badge.vue.d.ts +3 -2
  24. package/dist/runtime/components/Breadcrumb.d.vue.ts +3 -0
  25. package/dist/runtime/components/Breadcrumb.vue +5 -2
  26. package/dist/runtime/components/Breadcrumb.vue.d.ts +3 -0
  27. package/dist/runtime/components/Button.d.vue.ts +5 -2
  28. package/dist/runtime/components/Button.vue +5 -2
  29. package/dist/runtime/components/Button.vue.d.ts +5 -2
  30. package/dist/runtime/components/Checkbox.d.vue.ts +2 -1
  31. package/dist/runtime/components/Checkbox.vue +4 -2
  32. package/dist/runtime/components/Checkbox.vue.d.ts +2 -1
  33. package/dist/runtime/components/Chip.d.vue.ts +2 -1
  34. package/dist/runtime/components/Chip.vue +4 -2
  35. package/dist/runtime/components/Chip.vue.d.ts +2 -1
  36. package/dist/runtime/components/Collapsible.d.vue.ts +3 -0
  37. package/dist/runtime/components/Collapsible.vue +11 -6
  38. package/dist/runtime/components/Collapsible.vue.d.ts +3 -0
  39. package/dist/runtime/components/ColorPicker.d.vue.ts +13 -3
  40. package/dist/runtime/components/ColorPicker.vue +60 -14
  41. package/dist/runtime/components/ColorPicker.vue.d.ts +13 -3
  42. package/dist/runtime/components/Column.d.ts +1 -1
  43. package/dist/runtime/components/CommandPalette.vue +18 -16
  44. package/dist/runtime/components/ContentNavigation.d.vue.ts +3 -0
  45. package/dist/runtime/components/ContentNavigation.vue +6 -3
  46. package/dist/runtime/components/ContentNavigation.vue.d.ts +3 -0
  47. package/dist/runtime/components/ContentSurround.d.vue.ts +3 -0
  48. package/dist/runtime/components/ContentSurround.vue +7 -4
  49. package/dist/runtime/components/ContentSurround.vue.d.ts +3 -0
  50. package/dist/runtime/components/ContentToc.d.vue.ts +3 -0
  51. package/dist/runtime/components/ContentToc.vue +22 -12
  52. package/dist/runtime/components/ContentToc.vue.d.ts +3 -0
  53. package/dist/runtime/components/ContextMenu.vue +3 -2
  54. package/dist/runtime/components/DashboardSidebar.vue +1 -1
  55. package/dist/runtime/components/DashboardSidebarToggle.d.vue.ts +1 -0
  56. package/dist/runtime/components/DashboardSidebarToggle.vue +3 -1
  57. package/dist/runtime/components/DashboardSidebarToggle.vue.d.ts +1 -0
  58. package/dist/runtime/components/DatePicker.d.vue.ts +32 -23
  59. package/dist/runtime/components/DatePicker.vue +130 -60
  60. package/dist/runtime/components/DatePicker.vue.d.ts +32 -23
  61. package/dist/runtime/components/Drawer.d.vue.ts +2 -0
  62. package/dist/runtime/components/Drawer.vue +21 -8
  63. package/dist/runtime/components/Drawer.vue.d.ts +2 -0
  64. package/dist/runtime/components/DrawerRenderer.vue +28 -21
  65. package/dist/runtime/components/Dropdown.d.vue.ts +14 -4
  66. package/dist/runtime/components/Dropdown.vue +19 -4
  67. package/dist/runtime/components/Dropdown.vue.d.ts +14 -4
  68. package/dist/runtime/components/FileTree.d.vue.ts +3 -0
  69. package/dist/runtime/components/FileTree.vue +7 -3
  70. package/dist/runtime/components/FileTree.vue.d.ts +3 -0
  71. package/dist/runtime/components/FileUpload.d.vue.ts +2 -1
  72. package/dist/runtime/components/FileUpload.vue +75 -32
  73. package/dist/runtime/components/FileUpload.vue.d.ts +2 -1
  74. package/dist/runtime/components/FormField.d.vue.ts +2 -0
  75. package/dist/runtime/components/FormField.vue +12 -9
  76. package/dist/runtime/components/FormField.vue.d.ts +2 -0
  77. package/dist/runtime/components/Icon.d.vue.ts +2 -4
  78. package/dist/runtime/components/Icon.vue +7 -2
  79. package/dist/runtime/components/Icon.vue.d.ts +2 -4
  80. package/dist/runtime/components/Input.d.vue.ts +2 -1
  81. package/dist/runtime/components/Input.vue +12 -6
  82. package/dist/runtime/components/Input.vue.d.ts +2 -1
  83. package/dist/runtime/components/InputNumber.d.vue.ts +4 -1
  84. package/dist/runtime/components/InputNumber.vue +21 -8
  85. package/dist/runtime/components/InputNumber.vue.d.ts +4 -1
  86. package/dist/runtime/components/Modal.d.vue.ts +2 -0
  87. package/dist/runtime/components/Modal.vue +21 -8
  88. package/dist/runtime/components/Modal.vue.d.ts +2 -0
  89. package/dist/runtime/components/ModalRenderer.vue +23 -16
  90. package/dist/runtime/components/NavigationMenu.d.vue.ts +2 -4
  91. package/dist/runtime/components/NavigationMenu.vue +8 -4
  92. package/dist/runtime/components/NavigationMenu.vue.d.ts +2 -4
  93. package/dist/runtime/components/NavigationMenuAccordionItem.d.vue.ts +2 -4
  94. package/dist/runtime/components/NavigationMenuAccordionItem.vue +5 -3
  95. package/dist/runtime/components/NavigationMenuAccordionItem.vue.d.ts +2 -4
  96. package/dist/runtime/components/NavigationMenuFlyoutList.d.vue.ts +2 -4
  97. package/dist/runtime/components/NavigationMenuFlyoutList.vue +7 -4
  98. package/dist/runtime/components/NavigationMenuFlyoutList.vue.d.ts +2 -4
  99. package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +2 -4
  100. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +9 -2
  101. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +2 -4
  102. package/dist/runtime/components/Pagination.d.vue.ts +3 -2
  103. package/dist/runtime/components/Pagination.vue.d.ts +3 -2
  104. package/dist/runtime/components/PinInput.d.vue.ts +2 -1
  105. package/dist/runtime/components/PinInput.vue +17 -6
  106. package/dist/runtime/components/PinInput.vue.d.ts +2 -1
  107. package/dist/runtime/components/Popover.d.vue.ts +2 -0
  108. package/dist/runtime/components/Popover.vue +14 -7
  109. package/dist/runtime/components/Popover.vue.d.ts +2 -0
  110. package/dist/runtime/components/Progress.d.vue.ts +2 -1
  111. package/dist/runtime/components/Progress.vue +6 -4
  112. package/dist/runtime/components/Progress.vue.d.ts +2 -1
  113. package/dist/runtime/components/ProseH1.d.vue.ts +2 -0
  114. package/dist/runtime/components/ProseH1.vue +7 -4
  115. package/dist/runtime/components/ProseH1.vue.d.ts +2 -0
  116. package/dist/runtime/components/ProseH2.d.vue.ts +2 -0
  117. package/dist/runtime/components/ProseH2.vue +7 -4
  118. package/dist/runtime/components/ProseH2.vue.d.ts +2 -0
  119. package/dist/runtime/components/ProseH3.d.vue.ts +2 -0
  120. package/dist/runtime/components/ProseH3.vue +7 -4
  121. package/dist/runtime/components/ProseH3.vue.d.ts +2 -0
  122. package/dist/runtime/components/ProseH4.d.vue.ts +2 -0
  123. package/dist/runtime/components/ProseH4.vue +7 -4
  124. package/dist/runtime/components/ProseH4.vue.d.ts +2 -0
  125. package/dist/runtime/components/ProseH5.d.vue.ts +2 -0
  126. package/dist/runtime/components/ProseH5.vue +7 -4
  127. package/dist/runtime/components/ProseH5.vue.d.ts +2 -0
  128. package/dist/runtime/components/ProseH6.d.vue.ts +2 -0
  129. package/dist/runtime/components/ProseH6.vue +7 -4
  130. package/dist/runtime/components/ProseH6.vue.d.ts +2 -0
  131. package/dist/runtime/components/ProsePre.d.vue.ts +4 -2
  132. package/dist/runtime/components/ProsePre.vue +9 -3
  133. package/dist/runtime/components/ProsePre.vue.d.ts +4 -2
  134. package/dist/runtime/components/RadioGroup.d.vue.ts +2 -1
  135. package/dist/runtime/components/RadioGroup.vue +9 -5
  136. package/dist/runtime/components/RadioGroup.vue.d.ts +2 -1
  137. package/dist/runtime/components/Rating.d.vue.ts +2 -1
  138. package/dist/runtime/components/Rating.vue +4 -1
  139. package/dist/runtime/components/Rating.vue.d.ts +2 -1
  140. package/dist/runtime/components/ReadMore.d.vue.ts +3 -0
  141. package/dist/runtime/components/ReadMore.vue +24 -6
  142. package/dist/runtime/components/ReadMore.vue.d.ts +3 -0
  143. package/dist/runtime/components/Select.d.vue.ts +21 -57
  144. package/dist/runtime/components/Select.vue +58 -9
  145. package/dist/runtime/components/Select.vue.d.ts +21 -57
  146. package/dist/runtime/components/Separator.d.vue.ts +2 -1
  147. package/dist/runtime/components/Separator.vue +4 -2
  148. package/dist/runtime/components/Separator.vue.d.ts +2 -1
  149. package/dist/runtime/components/Slideover.d.vue.ts +2 -0
  150. package/dist/runtime/components/Slideover.vue +21 -8
  151. package/dist/runtime/components/Slideover.vue.d.ts +2 -0
  152. package/dist/runtime/components/SlideoverRenderer.vue +25 -18
  153. package/dist/runtime/components/Slider.d.vue.ts +2 -1
  154. package/dist/runtime/components/Slider.vue +4 -1
  155. package/dist/runtime/components/Slider.vue.d.ts +2 -1
  156. package/dist/runtime/components/SplitterResizeHandle.d.vue.ts +3 -0
  157. package/dist/runtime/components/SplitterResizeHandle.vue +5 -2
  158. package/dist/runtime/components/SplitterResizeHandle.vue.d.ts +3 -0
  159. package/dist/runtime/components/Stepper.d.vue.ts +2 -1
  160. package/dist/runtime/components/Stepper.vue +4 -1
  161. package/dist/runtime/components/Stepper.vue.d.ts +2 -1
  162. package/dist/runtime/components/Switch.d.vue.ts +2 -1
  163. package/dist/runtime/components/Switch.vue +4 -2
  164. package/dist/runtime/components/Switch.vue.d.ts +2 -1
  165. package/dist/runtime/components/Table.d.vue.ts +28 -80
  166. package/dist/runtime/components/Table.vue +25 -13
  167. package/dist/runtime/components/Table.vue.d.ts +28 -80
  168. package/dist/runtime/components/Tabs.d.vue.ts +3 -0
  169. package/dist/runtime/components/Tabs.vue +5 -1
  170. package/dist/runtime/components/Tabs.vue.d.ts +3 -0
  171. package/dist/runtime/components/Textarea.d.vue.ts +2 -1
  172. package/dist/runtime/components/Textarea.vue +11 -6
  173. package/dist/runtime/components/Textarea.vue.d.ts +2 -1
  174. package/dist/runtime/components/Theme.d.vue.ts +16 -5
  175. package/dist/runtime/components/Theme.vue +30 -5
  176. package/dist/runtime/components/Theme.vue.d.ts +16 -5
  177. package/dist/runtime/components/Toast.vue +11 -39
  178. package/dist/runtime/components/Toggle.d.vue.ts +2 -1
  179. package/dist/runtime/components/Toggle.vue +4 -1
  180. package/dist/runtime/components/Toggle.vue.d.ts +2 -1
  181. package/dist/runtime/components/ToggleGroup.d.vue.ts +2 -1
  182. package/dist/runtime/components/ToggleGroup.vue +4 -1
  183. package/dist/runtime/components/ToggleGroup.vue.d.ts +2 -1
  184. package/dist/runtime/components/Tooltip.vue +3 -2
  185. package/dist/runtime/components/Tree.d.vue.ts +5 -2
  186. package/dist/runtime/components/Tree.vue +5 -1
  187. package/dist/runtime/components/Tree.vue.d.ts +5 -2
  188. package/dist/runtime/composables/use-drawer.d.ts +1 -22
  189. package/dist/runtime/composables/use-drawer.js +12 -18
  190. package/dist/runtime/composables/use-form-field.d.ts +1 -0
  191. package/dist/runtime/composables/use-icons.d.ts +2 -2
  192. package/dist/runtime/composables/use-icons.js +1 -1
  193. package/dist/runtime/composables/use-locale.d.ts +2 -2
  194. package/dist/runtime/composables/use-locale.js +1 -1
  195. package/dist/runtime/composables/use-media-query.d.ts +6 -8
  196. package/dist/runtime/composables/use-media-query.js +7 -2
  197. package/dist/runtime/composables/use-messages.d.ts +2 -2
  198. package/dist/runtime/composables/use-messages.js +1 -1
  199. package/dist/runtime/composables/use-modal.d.ts +1 -17
  200. package/dist/runtime/composables/use-modal.js +12 -18
  201. package/dist/runtime/composables/use-ripple.d.ts +2 -2
  202. package/dist/runtime/composables/use-ripple.js +1 -1
  203. package/dist/runtime/composables/use-slideover.d.ts +1 -19
  204. package/dist/runtime/composables/use-slideover.js +12 -18
  205. package/dist/runtime/composables/use-table.d.ts +74 -17
  206. package/dist/runtime/composables/use-table.js +4 -1
  207. package/dist/runtime/composables/use-toast.d.ts +8 -8
  208. package/dist/runtime/composables/use-toast.js +9 -11
  209. package/dist/runtime/default-color-metadata.d.ts +4 -0
  210. package/dist/runtime/default-color-metadata.js +4 -0
  211. package/dist/runtime/default-colors.css +1 -0
  212. package/dist/runtime/internal/ColorPickerBody.d.vue.ts +1 -0
  213. package/dist/runtime/internal/ColorPickerBody.vue +24 -1
  214. package/dist/runtime/internal/ColorPickerBody.vue.d.ts +1 -0
  215. package/dist/runtime/internal/ComboboxSelectBase.d.vue.ts +50 -46
  216. package/dist/runtime/internal/ComboboxSelectBase.vue +340 -93
  217. package/dist/runtime/internal/ComboboxSelectBase.vue.d.ts +50 -46
  218. package/dist/runtime/internal/ComboboxSelectBody.d.vue.ts +29 -23
  219. package/dist/runtime/internal/ComboboxSelectBody.vue +74 -40
  220. package/dist/runtime/internal/ComboboxSelectBody.vue.d.ts +29 -23
  221. package/dist/runtime/internal/DatePickerCalendarBody.d.vue.ts +3 -5
  222. package/dist/runtime/internal/DatePickerCalendarBody.vue +2 -2
  223. package/dist/runtime/internal/DatePickerCalendarBody.vue.d.ts +3 -5
  224. package/dist/runtime/internal/DatePickerRangeCalendarBody.d.vue.ts +3 -5
  225. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue +1 -1
  226. package/dist/runtime/internal/DatePickerRangeCalendarBody.vue.d.ts +3 -5
  227. package/dist/runtime/internal/DatePickerTimeBody.d.vue.ts +2 -4
  228. package/dist/runtime/internal/DatePickerTimeBody.vue.d.ts +2 -4
  229. package/dist/runtime/internal/ProgrammaticTheme.d.vue.ts +17 -0
  230. package/dist/runtime/internal/ProgrammaticTheme.vue +41 -0
  231. package/dist/runtime/internal/ProgrammaticTheme.vue.d.ts +17 -0
  232. package/dist/runtime/internal/TimeStepper.vue +1 -1
  233. package/dist/runtime/internal/ToastItemRenderer.d.vue.ts +14 -0
  234. package/dist/runtime/internal/ToastItemRenderer.vue +54 -0
  235. package/dist/runtime/internal/ToastItemRenderer.vue.d.ts +14 -0
  236. package/dist/runtime/internal/combobox-select.d.ts +52 -0
  237. package/dist/runtime/{composables/use-combobox-select.js → internal/combobox-select.js} +26 -11
  238. package/dist/runtime/internal/programmatic-services.d.ts +71 -0
  239. package/dist/runtime/internal/programmatic-services.js +61 -0
  240. package/dist/runtime/prose.css +1 -1
  241. package/dist/runtime/structural.css +1 -0
  242. package/dist/runtime/table.d.ts +3 -0
  243. package/dist/runtime/table.js +1 -0
  244. package/dist/runtime/theme/accordion.d.ts +27 -0
  245. package/dist/runtime/theme/accordion.js +15 -6
  246. package/dist/runtime/theme/alert-dialog.js +5 -5
  247. package/dist/runtime/theme/alert.js +6 -15
  248. package/dist/runtime/theme/avatar-group.js +2 -2
  249. package/dist/runtime/theme/avatar.js +12 -18
  250. package/dist/runtime/theme/badge.d.ts +39 -9
  251. package/dist/runtime/theme/badge.js +11 -40
  252. package/dist/runtime/theme/breadcrumb.d.ts +29 -47
  253. package/dist/runtime/theme/breadcrumb.js +16 -5
  254. package/dist/runtime/theme/button.d.ts +45 -15
  255. package/dist/runtime/theme/button.js +10 -57
  256. package/dist/runtime/theme/callout.js +7 -7
  257. package/dist/runtime/theme/card.js +7 -7
  258. package/dist/runtime/theme/checkbox.d.ts +21 -84
  259. package/dist/runtime/theme/checkbox.js +15 -36
  260. package/dist/runtime/theme/chip.js +4 -22
  261. package/dist/runtime/theme/code-button.js +2 -2
  262. package/dist/runtime/theme/code-tree.d.ts +3 -3
  263. package/dist/runtime/theme/code-tree.js +4 -4
  264. package/dist/runtime/theme/collapsible.d.ts +27 -0
  265. package/dist/runtime/theme/collapsible.js +12 -3
  266. package/dist/runtime/theme/color-picker.d.ts +18 -54
  267. package/dist/runtime/theme/color-picker.js +19 -18
  268. package/dist/runtime/theme/command-palette.d.ts +6 -6
  269. package/dist/runtime/theme/command-palette.js +12 -10
  270. package/dist/runtime/theme/content-navigation.d.ts +27 -0
  271. package/dist/runtime/theme/content-navigation.js +14 -5
  272. package/dist/runtime/theme/content-surround.d.ts +27 -0
  273. package/dist/runtime/theme/content-surround.js +13 -4
  274. package/dist/runtime/theme/content-toc.d.ts +27 -0
  275. package/dist/runtime/theme/content-toc.js +14 -5
  276. package/dist/runtime/theme/context-menu.js +7 -7
  277. package/dist/runtime/theme/dashboard-navbar.d.ts +6 -6
  278. package/dist/runtime/theme/dashboard-navbar.js +2 -2
  279. package/dist/runtime/theme/dashboard-resize-handle.js +3 -3
  280. package/dist/runtime/theme/dashboard-sidebar.js +3 -3
  281. package/dist/runtime/theme/date-picker.js +10 -10
  282. package/dist/runtime/theme/drawer.js +9 -9
  283. package/dist/runtime/theme/dropdown.js +7 -7
  284. package/dist/runtime/theme/file-tree.d.ts +27 -0
  285. package/dist/runtime/theme/file-tree.js +12 -3
  286. package/dist/runtime/theme/file-upload.d.ts +18 -72
  287. package/dist/runtime/theme/file-upload.js +20 -19
  288. package/dist/runtime/theme/form-field.js +5 -5
  289. package/dist/runtime/theme/header.d.ts +3 -3
  290. package/dist/runtime/theme/header.js +1 -1
  291. package/dist/runtime/theme/icon.d.ts +30 -57
  292. package/dist/runtime/theme/icon.js +19 -9
  293. package/dist/runtime/theme/input-number.d.ts +21 -63
  294. package/dist/runtime/theme/input-number.js +12 -12
  295. package/dist/runtime/theme/input.d.ts +21 -63
  296. package/dist/runtime/theme/input.js +12 -12
  297. package/dist/runtime/theme/kbd.js +1 -1
  298. package/dist/runtime/theme/modal.js +4 -4
  299. package/dist/runtime/theme/navigation-menu.d.ts +2 -0
  300. package/dist/runtime/theme/navigation-menu.js +17 -28
  301. package/dist/runtime/theme/page-header.js +3 -3
  302. package/dist/runtime/theme/pagination.js +1 -1
  303. package/dist/runtime/theme/pin-input.d.ts +21 -63
  304. package/dist/runtime/theme/pin-input.js +13 -11
  305. package/dist/runtime/theme/popover.js +2 -2
  306. package/dist/runtime/theme/progress.d.ts +21 -84
  307. package/dist/runtime/theme/progress.js +12 -12
  308. package/dist/runtime/theme/prose.d.ts +35 -50
  309. package/dist/runtime/theme/prose.js +24 -11
  310. package/dist/runtime/theme/radio-group.d.ts +21 -84
  311. package/dist/runtime/theme/radio-group.js +16 -22
  312. package/dist/runtime/theme/rating.d.ts +21 -63
  313. package/dist/runtime/theme/rating.js +10 -10
  314. package/dist/runtime/theme/read-more.d.ts +27 -0
  315. package/dist/runtime/theme/read-more.js +13 -4
  316. package/dist/runtime/theme/scroll-area.d.ts +3 -3
  317. package/dist/runtime/theme/scroll-area.js +2 -2
  318. package/dist/runtime/theme/select.d.ts +21 -54
  319. package/dist/runtime/theme/select.js +32 -24
  320. package/dist/runtime/theme/separator.d.ts +18 -54
  321. package/dist/runtime/theme/separator.js +16 -12
  322. package/dist/runtime/theme/skeleton.js +4 -4
  323. package/dist/runtime/theme/slideover.js +5 -5
  324. package/dist/runtime/theme/slider.d.ts +21 -84
  325. package/dist/runtime/theme/slider.js +14 -14
  326. package/dist/runtime/theme/splitter-resize-handle.d.ts +27 -0
  327. package/dist/runtime/theme/splitter-resize-handle.js +11 -1
  328. package/dist/runtime/theme/stepper.d.ts +21 -84
  329. package/dist/runtime/theme/stepper.js +12 -33
  330. package/dist/runtime/theme/switch.d.ts +21 -84
  331. package/dist/runtime/theme/switch.js +13 -13
  332. package/dist/runtime/theme/table.d.ts +27 -0
  333. package/dist/runtime/theme/table.js +31 -21
  334. package/dist/runtime/theme/tabs.d.ts +27 -0
  335. package/dist/runtime/theme/tabs.js +17 -7
  336. package/dist/runtime/theme/textarea.d.ts +21 -63
  337. package/dist/runtime/theme/textarea.js +12 -12
  338. package/dist/runtime/theme/toast.d.ts +12 -48
  339. package/dist/runtime/theme/toast.js +9 -9
  340. package/dist/runtime/theme/toggle-group.js +5 -11
  341. package/dist/runtime/theme/toggle.js +2 -12
  342. package/dist/runtime/theme/tooltip.d.ts +3 -3
  343. package/dist/runtime/theme/tooltip.js +3 -3
  344. package/dist/runtime/theme/tree.d.ts +27 -0
  345. package/dist/runtime/theme/tree.js +13 -3
  346. package/dist/runtime/theme-api.d.ts +15 -0
  347. package/dist/runtime/theme-api.js +12 -0
  348. package/dist/runtime/theme-config.d.ts +470 -0
  349. package/dist/runtime/theme-config.js +0 -0
  350. package/dist/runtime/theme.css +1 -1
  351. package/dist/runtime/types/app-config.d.ts +11 -8
  352. package/dist/runtime/types/index.d.ts +19 -1
  353. package/dist/runtime/utils/app-scoped-state.d.ts +2 -0
  354. package/dist/runtime/utils/app-scoped-state.js +13 -0
  355. package/dist/runtime/utils/autocomplete-contracts.d.ts +24 -0
  356. package/dist/runtime/utils/autocomplete-contracts.js +0 -0
  357. package/dist/runtime/utils/color-registry.d.ts +62 -0
  358. package/dist/runtime/utils/color-registry.js +191 -0
  359. package/dist/runtime/utils/dtcg-colors.d.ts +25 -0
  360. package/dist/runtime/utils/dtcg-colors.js +40 -0
  361. package/dist/runtime/utils/file-icons.d.ts +8 -0
  362. package/dist/runtime/utils/file-icons.js +131 -0
  363. package/dist/runtime/utils/functional-tokens.d.ts +26 -0
  364. package/dist/runtime/utils/functional-tokens.js +54 -0
  365. package/dist/runtime/utils/icons.d.ts +3 -0
  366. package/dist/runtime/utils/icons.js +4 -0
  367. package/dist/runtime/utils/injection-keys.d.ts +12 -3
  368. package/dist/runtime/utils/native-input.d.ts +5 -0
  369. package/dist/runtime/utils/native-input.js +32 -0
  370. package/dist/runtime/utils/navigation-menu.d.ts +3 -0
  371. package/dist/runtime/utils/programmatic-theme.d.ts +17 -0
  372. package/dist/runtime/utils/programmatic-theme.js +59 -0
  373. package/dist/runtime/utils/registered-colors.d.ts +3 -0
  374. package/dist/runtime/utils/registered-colors.js +14 -0
  375. package/dist/runtime/utils/seed-colors.d.ts +19 -0
  376. package/dist/runtime/utils/seed-colors.js +207 -0
  377. package/dist/runtime/utils/select-contracts.d.ts +101 -0
  378. package/dist/runtime/utils/select-contracts.js +0 -0
  379. package/dist/runtime/utils/table-contracts.d.ts +60 -0
  380. package/dist/runtime/utils/table-contracts.js +0 -0
  381. package/dist/runtime/utils/ui.d.ts +26 -4
  382. package/dist/runtime/utils/ui.js +38 -5
  383. package/dist/tokens/default-colors.tokens.json +879 -0
  384. package/package.json +83 -16
  385. package/dist/runtime/composables/use-combobox-select.d.ts +0 -45
@@ -0,0 +1,62 @@
1
+ import type { ThemeTokenOverrides } from './functional-tokens.js';
2
+ /**
3
+ * Framework-independent semantic color contracts.
4
+ *
5
+ * This module deliberately contains no Vue, Nuxt or Tailwind imports. It is
6
+ * the normalization boundary that build-time adapters and runtime CSS
7
+ * bindings can share without putting a token resolver in component bundles.
8
+ */
9
+ export declare const builtinColorNames: readonly ["primary", "secondary", "success", "info", "warning", "danger", "neutral"];
10
+ export type BuiltinColorName = typeof builtinColorNames[number];
11
+ declare global {
12
+ interface SelarasColorRegistry {
13
+ }
14
+ }
15
+ export type ColorRole = BuiltinColorName | Extract<keyof SelarasColorRegistry, string>;
16
+ export interface ColorRecipe {
17
+ fill: string;
18
+ fillHover: string;
19
+ fillPressed: string;
20
+ onFill: string;
21
+ /** Essential unpaired graphics such as progress and selection indicators. */
22
+ indicator: string;
23
+ subtle: string;
24
+ subtleHover: string;
25
+ subtlePressed: string;
26
+ onSubtle: string;
27
+ text: string;
28
+ textHover: string;
29
+ textPressed: string;
30
+ border: string;
31
+ focus: string;
32
+ }
33
+ export type ColorRecipeInput = Pick<ColorRecipe, 'fill' | 'onFill' | 'subtle' | 'onSubtle' | 'text' | 'border'> & Partial<Pick<ColorRecipe, 'fillHover' | 'fillPressed' | 'indicator' | 'subtleHover' | 'subtlePressed' | 'textHover' | 'textPressed' | 'focus'>>;
34
+ export type RuntimeColorOverrides = Partial<Record<ColorRole, Partial<ColorRecipeInput>>>;
35
+ export interface RuntimeThemeMode extends ThemeTokenOverrides {
36
+ colors?: RuntimeColorOverrides;
37
+ }
38
+ export interface RuntimeTokenOverrides {
39
+ light?: RuntimeThemeMode;
40
+ dark?: RuntimeThemeMode;
41
+ }
42
+ /** Composes managed scope leaves without resolving authored CSS expressions. */
43
+ export declare function mergeRuntimeTokenOverrides(parent?: RuntimeTokenOverrides, local?: RuntimeTokenOverrides): RuntimeTokenOverrides;
44
+ export interface ColorModePair<T> {
45
+ light: T;
46
+ dark: T;
47
+ }
48
+ export declare function assertColorRoleName(name: string): asserts name is string;
49
+ /** Compiles omitted web recipe leaves into dependencies on resolved bindings. */
50
+ export declare function normalizeColorRecipe(input: ColorRecipeInput): ColorRecipe;
51
+ export declare function createColorRegistry<T extends Record<string, ColorModePair<ColorRecipeInput>>>(custom: T): { [K in keyof T]: ColorModePair<ColorRecipe>; };
52
+ /** Exact owners rematerialize effective leaves, including across DOM portals. */
53
+ export declare function generateRuntimeTokenOverrideCss(overrides: RuntimeTokenOverrides, scopeSelector?: string): string;
54
+ /**
55
+ * Serializes normalized role recipes into public owner-local read values and
56
+ * the private selected-role bindings consumed by role-capable components.
57
+ * Role-specific public inputs inherit from the DOM; authored defaults resolve
58
+ * at managed owners so local external variables remain usable.
59
+ * The output is deterministic so Nuxt template
60
+ * hashes and HMR invalidation do not change with object insertion order.
61
+ */
62
+ export declare function generateColorRoleCss(registry: Record<string, ColorModePair<ColorRecipe>>): string;
@@ -0,0 +1,191 @@
1
+ import { functionalTokenEntries, mergeFunctionalTokenOverrides } from "./functional-tokens.js";
2
+ export const builtinColorNames = ["primary", "secondary", "success", "info", "warning", "danger", "neutral"];
3
+ export function mergeRuntimeTokenOverrides(parent = {}, local = {}) {
4
+ const result = {};
5
+ for (const mode of ["light", "dark"]) {
6
+ const functional = mergeFunctionalTokenOverrides(parent[mode], local[mode]);
7
+ const roles = /* @__PURE__ */ new Set([...Object.keys(parent[mode]?.colors ?? {}), ...Object.keys(local[mode]?.colors ?? {})]);
8
+ if (roles.size === 0 && Object.keys(functional).length === 0)
9
+ continue;
10
+ const colors = {};
11
+ for (const role of roles) {
12
+ assertColorRoleName(role);
13
+ const key = role;
14
+ colors[key] = Object.fromEntries(
15
+ [...Object.entries(parent[mode]?.colors?.[key] ?? {}), ...Object.entries(local[mode]?.colors?.[key] ?? {})].filter(([, value]) => value !== void 0)
16
+ );
17
+ }
18
+ result[mode] = { ...functional, ...roles.size ? { colors } : {} };
19
+ }
20
+ return result;
21
+ }
22
+ const roleNamePattern = /^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/;
23
+ const reservedRoleNames = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
24
+ const requiredRecipeFields = ["fill", "onFill", "subtle", "onSubtle", "text", "border"];
25
+ export function assertColorRoleName(name) {
26
+ if (!roleNamePattern.test(name) || reservedRoleNames.has(name))
27
+ throw new Error(`Invalid Selaras color role "${name}". Use lowercase kebab-case, for example "brand-accent".`);
28
+ }
29
+ export function normalizeColorRecipe(input) {
30
+ for (const field of requiredRecipeFields) {
31
+ if (typeof input?.[field] !== "string" || input[field].length === 0)
32
+ throw new Error(`Invalid Selaras color recipe: "${field}" must be a non-empty string.`);
33
+ }
34
+ return {
35
+ fill: input.fill,
36
+ // Keep omitted leaves as dependencies on the resolved state, rather than
37
+ // copying authored values. CSS overrides then propagate through the chain.
38
+ fillHover: input.fillHover ?? "var(--_selaras-color-fill)",
39
+ fillPressed: input.fillPressed ?? "var(--_selaras-color-fill-hover)",
40
+ onFill: input.onFill,
41
+ // A recipe's border is already authored for visibility against its
42
+ // surrounding surface, making it the safe shorthand for unpaired marks.
43
+ indicator: input.indicator ?? "var(--_selaras-color-border)",
44
+ subtle: input.subtle,
45
+ subtleHover: input.subtleHover ?? "var(--_selaras-color-subtle)",
46
+ subtlePressed: input.subtlePressed ?? "var(--_selaras-color-subtle-hover)",
47
+ onSubtle: input.onSubtle,
48
+ text: input.text,
49
+ textHover: input.textHover ?? "var(--_selaras-color-text)",
50
+ textPressed: input.textPressed ?? "var(--_selaras-color-text-hover)",
51
+ border: input.border,
52
+ focus: input.focus ?? "var(--_selaras-color-text)"
53
+ };
54
+ }
55
+ export function createColorRegistry(custom) {
56
+ for (const name of Object.keys(custom))
57
+ assertColorRoleName(name);
58
+ return Object.fromEntries(Object.entries(custom).map(([name, modes]) => [name, {
59
+ light: normalizeColorRecipe(modes.light),
60
+ dark: normalizeColorRecipe(modes.dark)
61
+ }]));
62
+ }
63
+ const generatedRoleFields = [
64
+ "fill",
65
+ "fill-hover",
66
+ "fill-pressed",
67
+ "on-fill",
68
+ "indicator",
69
+ "subtle",
70
+ "subtle-hover",
71
+ "subtle-pressed",
72
+ "on-subtle",
73
+ "text",
74
+ "text-hover",
75
+ "text-pressed",
76
+ "border",
77
+ "focus"
78
+ ];
79
+ function roleFieldValue(recipe, field) {
80
+ const property = field.replace(/-([a-z])/g, (_, character) => character.toUpperCase());
81
+ return recipe[property];
82
+ }
83
+ const selectedRoleDependencyPattern = /^var\(--_selaras-color-([a-z-]+)\)$/;
84
+ function resolvedRoleProperty(role, field) {
85
+ return `--selaras-resolved-color-${role}-${field}`;
86
+ }
87
+ function resolvedRoleValue(role, recipe, field) {
88
+ return roleFieldValue(recipe, field).replace(selectedRoleDependencyPattern, (_match, dependency) => `var(${resolvedRoleProperty(role, dependency)})`);
89
+ }
90
+ function assertCssValue(value) {
91
+ if (typeof value !== "string" || value.trim().length === 0)
92
+ throw new Error("Invalid Selaras token value: expected a non-empty CSS string.");
93
+ if (/[;{}\r\n]/.test(value))
94
+ throw new Error("Invalid Selaras token value: declaration delimiters are not allowed.");
95
+ }
96
+ function overrideRule(selector, role, overrides) {
97
+ const declarations = Object.entries(overrides).map(([field, value]) => {
98
+ if (value === void 0)
99
+ return void 0;
100
+ assertCssValue(value);
101
+ const kebab = field.replace(/[A-Z]/g, (character) => `-${character.toLowerCase()}`);
102
+ return ` --selaras-color-${role}-${kebab}: ${value};`;
103
+ }).filter(Boolean);
104
+ return declarations.length > 0 ? `${selector} {
105
+ ${declarations.join("\n")}
106
+ }` : void 0;
107
+ }
108
+ export function generateRuntimeTokenOverrideCss(overrides, scopeSelector = '[data-selaras-theme="global"]') {
109
+ const rules = [];
110
+ const owner = scopeSelector.trim();
111
+ const roles = /* @__PURE__ */ new Set([...Object.keys(overrides.light?.colors ?? {}), ...Object.keys(overrides.dark?.colors ?? {})]);
112
+ const functional = {
113
+ light: Object.fromEntries(functionalTokenEntries(overrides.light)),
114
+ dark: Object.fromEntries(functionalTokenEntries(overrides.dark))
115
+ };
116
+ const functionalFields = [.../* @__PURE__ */ new Set([...Object.keys(functional.light), ...Object.keys(functional.dark)])].sort();
117
+ for (const mode of ["light", "dark"]) {
118
+ const selector = mode === "dark" ? `:root.dark ${owner}:where(:not([data-selaras-mode]), [data-selaras-mode="root"]),
119
+ ${owner}:where([data-selaras-mode="dark"])` : `${owner}:where(:not([data-selaras-mode]), [data-selaras-mode="root"], [data-selaras-mode="light"])`;
120
+ const functionalDeclarations = functionalFields.map((field) => {
121
+ const value = functional[mode][field] ?? "initial";
122
+ assertCssValue(value);
123
+ return ` ${field}: ${value};`;
124
+ });
125
+ if (functionalDeclarations.length) {
126
+ const functionalSelector = owner === '[data-selaras-theme="global"]' ? `${selector},
127
+ ${mode === "dark" ? ":root.dark" : ":root"}` : selector;
128
+ rules.push(`${functionalSelector} {
129
+ ${functionalDeclarations.join("\n")}
130
+ }`);
131
+ }
132
+ const colors = overrides[mode]?.colors;
133
+ const colorSelector = owner === '[data-selaras-theme="global"]' ? `${selector},
134
+ ${mode === "dark" ? ":root.dark" : ":root"}` : selector;
135
+ for (const role of [...roles].sort()) {
136
+ assertColorRoleName(role);
137
+ const key = role;
138
+ const fields = new Set([
139
+ ...Object.entries(overrides.light?.colors?.[key] ?? {}),
140
+ ...Object.entries(overrides.dark?.colors?.[key] ?? {})
141
+ ].filter(([, value]) => value !== void 0).map(([field]) => field));
142
+ const effective = Object.fromEntries([...fields].map((field) => [field, colors?.[key]?.[field] ?? "initial"]));
143
+ const rule = overrideRule(colorSelector, role, effective);
144
+ if (rule)
145
+ rules.push(rule);
146
+ }
147
+ }
148
+ return rules.length > 0 ? `@layer theme {
149
+ ${rules.join("\n\n")}
150
+ }
151
+ ` : "";
152
+ }
153
+ function roleReadRule(selector, registry, mode, changedOnly = false) {
154
+ const declarations = [];
155
+ for (const role of Object.keys(registry).sort()) {
156
+ const recipes = registry[role];
157
+ for (const field of generatedRoleFields) {
158
+ const value = resolvedRoleValue(role, recipes[mode], field);
159
+ if (changedOnly && value === resolvedRoleValue(role, recipes.light, field))
160
+ continue;
161
+ declarations.push(` ${resolvedRoleProperty(role, field)}: var(--selaras-color-${role}-${field}, ${value});`);
162
+ }
163
+ }
164
+ return declarations.length ? `${selector} {
165
+ ${declarations.join("\n")}
166
+ }` : void 0;
167
+ }
168
+ function selectedRoleRule(role) {
169
+ const declarations = generatedRoleFields.map((field) => ` --_selaras-color-${field}: var(--selaras-color-${role}-${field}, var(${resolvedRoleProperty(role, field)}));`).join("\n");
170
+ return `[data-selaras-color="${role}"] {
171
+ ${declarations}
172
+ }`;
173
+ }
174
+ export function generateColorRoleCss(registry) {
175
+ const roles = Object.keys(registry).sort();
176
+ for (const role of roles)
177
+ assertColorRoleName(role);
178
+ const rules = [];
179
+ const lightReads = roleReadRule(":root,\n[data-selaras-theme]", registry, "light");
180
+ if (lightReads)
181
+ rules.push(lightReads);
182
+ const darkReads = roleReadRule(':root.dark,\n:root.dark [data-selaras-theme]:where(:not([data-selaras-mode]), [data-selaras-mode="root"]),\n[data-selaras-theme]:where([data-selaras-mode="dark"])', registry, "dark", true);
183
+ if (darkReads)
184
+ rules.push(darkReads);
185
+ for (const role of roles)
186
+ rules.push(selectedRoleRule(role));
187
+ return rules.length > 0 ? `@layer theme {
188
+ ${rules.join("\n\n")}
189
+ }
190
+ ` : "";
191
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * The structured, already-resolved DTCG color subset Selaras can serialize
3
+ * today. Resolution, alias traversal and context selection belong to the
4
+ * caller's DTCG processor, not the component runtime.
5
+ */
6
+ export type DtcgColorSpace = 'srgb' | 'srgb-linear' | 'oklch';
7
+ export type DtcgColorComponent = number | 'none';
8
+ export interface DtcgResolvedColor {
9
+ colorSpace: DtcgColorSpace;
10
+ components: readonly [DtcgColorComponent, DtcgColorComponent, DtcgColorComponent];
11
+ /** Omitted alpha means fully opaque; DTCG does not permit `none` here. */
12
+ alpha?: number;
13
+ /** Optional six-digit fallback required by DTCG when provided. */
14
+ hex?: string;
15
+ }
16
+ export interface DtcgColorConversionOptions {
17
+ /** Source path included in validation errors. @default '$value' */
18
+ path?: string;
19
+ }
20
+ /**
21
+ * Converts a resolved structured DTCG color to a browser CSS value.
22
+ * It deliberately accepts no CSS strings, aliases, token groups or Resolver
23
+ * documents: pass a resolved `$value` at the semantic mapping boundary.
24
+ */
25
+ export declare function dtcgColorToCss(value: unknown, options?: DtcgColorConversionOptions): string;
@@ -0,0 +1,40 @@
1
+ function invalid(path, message) {
2
+ throw new Error(`Invalid resolved DTCG color at ${path}: ${message}`);
3
+ }
4
+ function assertComponent(value, path) {
5
+ if (value !== "none" && (typeof value !== "number" || !Number.isFinite(value)))
6
+ invalid(path, 'components must be finite numbers or "none".');
7
+ }
8
+ function assertRange(value, path, minimum, maximum, inclusiveMaximum = true) {
9
+ if (value === "none")
10
+ return;
11
+ if (value < minimum || value > maximum || !inclusiveMaximum && value === maximum)
12
+ invalid(path, `must be within ${inclusiveMaximum ? `[${minimum}, ${maximum}]` : `[${minimum}, ${maximum})`}.`);
13
+ }
14
+ export function dtcgColorToCss(value, options = {}) {
15
+ const path = options.path ?? "$value";
16
+ if (!value || typeof value !== "object" || Array.isArray(value))
17
+ invalid(path, "expected a structured color value after reference resolution.");
18
+ const color = value;
19
+ if (color.colorSpace !== "srgb" && color.colorSpace !== "srgb-linear" && color.colorSpace !== "oklch")
20
+ invalid(path, 'unsupported colorSpace; supported values are "srgb", "srgb-linear" and "oklch".');
21
+ if (!Array.isArray(color.components) || color.components.length !== 3)
22
+ invalid(path, "components must contain exactly three values.");
23
+ for (const [index, component] of color.components.entries())
24
+ assertComponent(component, `${path}.components[${index}]`);
25
+ if (color.colorSpace === "srgb" || color.colorSpace === "srgb-linear") {
26
+ for (const [index, component] of color.components.entries())
27
+ assertRange(component, `${path}.components[${index}]`, 0, 1);
28
+ } else {
29
+ assertRange(color.components[0], `${path}.components[0]`, 0, 1);
30
+ assertRange(color.components[1], `${path}.components[1]`, 0, Number.POSITIVE_INFINITY);
31
+ assertRange(color.components[2], `${path}.components[2]`, 0, 360, false);
32
+ }
33
+ if (color.alpha !== void 0 && (typeof color.alpha !== "number" || !Number.isFinite(color.alpha) || color.alpha < 0 || color.alpha > 1))
34
+ invalid(`${path}.alpha`, "must be a number within [0, 1].");
35
+ if (color.hex !== void 0 && (typeof color.hex !== "string" || !/^#[0-9a-f]{6}$/i.test(color.hex)))
36
+ invalid(`${path}.hex`, "must be a six-digit CSS hex fallback.");
37
+ const alpha = color.alpha === void 0 ? "" : ` / ${color.alpha}`;
38
+ const components = color.components.join(" ");
39
+ return color.colorSpace === "oklch" ? `oklch(${components}${alpha})` : `color(${color.colorSpace} ${components}${alpha})`;
40
+ }
@@ -0,0 +1,8 @@
1
+ export declare const defaultFileIcons: Record<string, string>;
2
+ /**
3
+ * Resolves a file-type icon for a code block, preferring a filename's own
4
+ * extension (the more specific signal) over the fence's `language`. Returns
5
+ * undefined when neither maps to a known type, so callers can render no icon
6
+ * rather than a misleading fallback.
7
+ */
8
+ export declare function resolveFileIcon(language?: string, filename?: string): string | undefined;
@@ -0,0 +1,131 @@
1
+ export const defaultFileIcons = {
2
+ "vue": "vscode-icons:file-type-vue",
3
+ "ts": "vscode-icons:file-type-typescript",
4
+ "typescript": "vscode-icons:file-type-typescript",
5
+ "mts": "vscode-icons:file-type-typescript",
6
+ "cts": "vscode-icons:file-type-typescript",
7
+ "tsx": "vscode-icons:file-type-reactts",
8
+ "js": "vscode-icons:file-type-js",
9
+ "javascript": "vscode-icons:file-type-js",
10
+ "mjs": "vscode-icons:file-type-js",
11
+ "cjs": "vscode-icons:file-type-js",
12
+ "jsx": "vscode-icons:file-type-reactjs",
13
+ "html": "vscode-icons:file-type-html",
14
+ "htm": "vscode-icons:file-type-html",
15
+ "css": "vscode-icons:file-type-css",
16
+ "scss": "vscode-icons:file-type-scss",
17
+ "sass": "vscode-icons:file-type-sass",
18
+ "less": "vscode-icons:file-type-less",
19
+ "json": "vscode-icons:file-type-json",
20
+ "jsonc": "vscode-icons:file-type-json",
21
+ "json5": "vscode-icons:file-type-json",
22
+ "md": "vscode-icons:file-type-markdown",
23
+ "markdown": "vscode-icons:file-type-markdown",
24
+ "mdx": "vscode-icons:file-type-markdown",
25
+ "bash": "vscode-icons:file-type-shell",
26
+ "sh": "vscode-icons:file-type-shell",
27
+ "shell": "vscode-icons:file-type-shell",
28
+ "zsh": "vscode-icons:file-type-shell",
29
+ "console": "vscode-icons:file-type-shell",
30
+ "terminal": "vscode-icons:file-type-shell",
31
+ "python": "vscode-icons:file-type-python",
32
+ "py": "vscode-icons:file-type-python",
33
+ "yaml": "vscode-icons:file-type-yaml",
34
+ "yml": "vscode-icons:file-type-yaml",
35
+ "toml": "vscode-icons:file-type-toml",
36
+ "ini": "vscode-icons:file-type-ini",
37
+ "cfg": "vscode-icons:file-type-config",
38
+ "conf": "vscode-icons:file-type-config",
39
+ "config": "vscode-icons:file-type-config",
40
+ "env": "vscode-icons:file-type-dotenv",
41
+ "dotenv": "vscode-icons:file-type-dotenv",
42
+ "go": "vscode-icons:file-type-go",
43
+ "rust": "vscode-icons:file-type-rust",
44
+ "rs": "vscode-icons:file-type-rust",
45
+ "php": "vscode-icons:file-type-php",
46
+ "ruby": "vscode-icons:file-type-ruby",
47
+ "rb": "vscode-icons:file-type-ruby",
48
+ "sql": "vscode-icons:file-type-sql",
49
+ "docker": "vscode-icons:file-type-docker",
50
+ "dockerfile": "vscode-icons:file-type-docker",
51
+ "svelte": "vscode-icons:file-type-svelte",
52
+ "astro": "vscode-icons:file-type-astro",
53
+ "xml": "vscode-icons:file-type-xml",
54
+ "svg": "vscode-icons:file-type-svg",
55
+ "java": "vscode-icons:file-type-java",
56
+ "kotlin": "vscode-icons:file-type-kotlin",
57
+ "kt": "vscode-icons:file-type-kotlin",
58
+ "swift": "vscode-icons:file-type-swift",
59
+ "csharp": "vscode-icons:file-type-csharp",
60
+ "cs": "vscode-icons:file-type-csharp",
61
+ "cpp": "vscode-icons:file-type-cpp",
62
+ "c++": "vscode-icons:file-type-cpp",
63
+ "c": "vscode-icons:file-type-c",
64
+ "vim": "vscode-icons:file-type-vim",
65
+ "lua": "vscode-icons:file-type-lua",
66
+ "nginx": "vscode-icons:file-type-nginx",
67
+ "graphql": "vscode-icons:file-type-graphql",
68
+ "gql": "vscode-icons:file-type-graphql",
69
+ "prisma": "vscode-icons:file-type-prisma",
70
+ "powershell": "vscode-icons:file-type-powershell",
71
+ "ps1": "vscode-icons:file-type-powershell",
72
+ "r": "vscode-icons:file-type-r",
73
+ "elixir": "vscode-icons:file-type-elixir",
74
+ "ex": "vscode-icons:file-type-elixir",
75
+ "exs": "vscode-icons:file-type-elixir",
76
+ "erlang": "vscode-icons:file-type-erlang",
77
+ "erl": "vscode-icons:file-type-erlang",
78
+ "haskell": "vscode-icons:file-type-haskell",
79
+ "hs": "vscode-icons:file-type-haskell",
80
+ "scala": "vscode-icons:file-type-scala",
81
+ "julia": "vscode-icons:file-type-julia",
82
+ "jl": "vscode-icons:file-type-julia",
83
+ "zig": "vscode-icons:file-type-zig",
84
+ "nim": "vscode-icons:file-type-nim",
85
+ "crystal": "vscode-icons:file-type-crystal",
86
+ "solidity": "vscode-icons:file-type-solidity",
87
+ "sol": "vscode-icons:file-type-solidity",
88
+ "terraform": "vscode-icons:file-type-terraform",
89
+ "tf": "vscode-icons:file-type-terraform",
90
+ "cmake": "vscode-icons:file-type-cmake",
91
+ "wasm": "vscode-icons:file-type-wasm",
92
+ "text": "vscode-icons:file-type-text",
93
+ "txt": "vscode-icons:file-type-text",
94
+ "plaintext": "vscode-icons:file-type-text",
95
+ "plain": "vscode-icons:file-type-text",
96
+ "output": "vscode-icons:file-type-text",
97
+ "ansi": "vscode-icons:file-type-text",
98
+ "diff": "vscode-icons:file-type-diff",
99
+ "patch": "vscode-icons:file-type-diff",
100
+ "log": "vscode-icons:file-type-log",
101
+ "image": "vscode-icons:file-type-image",
102
+ "audio": "vscode-icons:file-type-audio",
103
+ "video": "vscode-icons:file-type-video",
104
+ "font": "vscode-icons:file-type-font",
105
+ "zip": "vscode-icons:file-type-zip",
106
+ "git": "vscode-icons:file-type-git",
107
+ "gitignore": "vscode-icons:file-type-git",
108
+ "npm": "vscode-icons:file-type-npm",
109
+ "nuxt": "vscode-icons:file-type-nuxt",
110
+ "ansible": "vscode-icons:file-type-ansible",
111
+ "bicep": "vscode-icons:file-type-bicep"
112
+ };
113
+ function normalizeFileIconKey(value) {
114
+ const key = value?.trim().toLowerCase().replace(/^\./, "");
115
+ return key || void 0;
116
+ }
117
+ function extensionOf(filename) {
118
+ if (!filename)
119
+ return void 0;
120
+ const base = filename.split(/[\\/]/).pop() ?? filename;
121
+ const dot = base.lastIndexOf(".");
122
+ return dot > 0 ? base.slice(dot + 1) : base.replace(/^\./, "");
123
+ }
124
+ export function resolveFileIcon(language, filename) {
125
+ for (const candidate of [extensionOf(filename), language]) {
126
+ const key = normalizeFileIconKey(candidate);
127
+ if (key && defaultFileIcons[key])
128
+ return defaultFileIcons[key];
129
+ }
130
+ return void 0;
131
+ }
@@ -0,0 +1,26 @@
1
+ /** Functional colors are independent of a component's selected intent role. */
2
+ export declare const functionalTokenGroups: {
3
+ readonly surface: readonly ["canvas", "default", "elevated", "inverted"];
4
+ readonly text: readonly ["default", "muted", "inverted"];
5
+ readonly border: readonly ["default", "muted", "hover"];
6
+ };
7
+ /** Geometry is scoped with functional colors because overlays cross portals. */
8
+ export declare const geometryTokenGroups: {
9
+ readonly radius: readonly ["base", "sm", "md", "lg", "full"];
10
+ readonly shadow: readonly ["sm", "md", "lg"];
11
+ readonly zIndex: readonly ["modal-overlay", "modal", "dropdown", "tooltip", "toast"];
12
+ };
13
+ /** Partial CSS-valued functional inputs for one semantic mode. */
14
+ export type FunctionalTokenOverrides = {
15
+ -readonly [K in keyof typeof functionalTokenGroups]?: Partial<Record<typeof functionalTokenGroups[K][number], string>>;
16
+ } & {
17
+ /** Background behind a modal surface, independently of its content surface. */
18
+ scrim?: string;
19
+ };
20
+ export type GeometryTokenOverrides = {
21
+ -readonly [K in keyof typeof geometryTokenGroups]?: Partial<Record<typeof geometryTokenGroups[K][number], string>>;
22
+ };
23
+ export type ThemeTokenOverrides = FunctionalTokenOverrides & GeometryTokenOverrides;
24
+ export declare function mergeFunctionalTokenOverrides(parent?: ThemeTokenOverrides, local?: ThemeTokenOverrides): ThemeTokenOverrides;
25
+ /** Known public CSS inputs; defaults belong to owner-local resolved bindings. */
26
+ export declare function functionalTokenEntries(overrides?: ThemeTokenOverrides): [string, string][];
@@ -0,0 +1,54 @@
1
+ export const functionalTokenGroups = {
2
+ surface: ["canvas", "default", "elevated", "inverted"],
3
+ text: ["default", "muted", "inverted"],
4
+ border: ["default", "muted", "hover"]
5
+ };
6
+ export const geometryTokenGroups = {
7
+ radius: ["base", "sm", "md", "lg", "full"],
8
+ shadow: ["sm", "md", "lg"],
9
+ zIndex: ["modal-overlay", "modal", "dropdown", "tooltip", "toast"]
10
+ };
11
+ export function mergeFunctionalTokenOverrides(parent = {}, local = {}) {
12
+ const result = {};
13
+ for (const group of Object.keys(functionalTokenGroups)) {
14
+ const values = Object.fromEntries(
15
+ [...Object.entries(parent[group] ?? {}), ...Object.entries(local[group] ?? {})].filter(([, value]) => value !== void 0)
16
+ );
17
+ if (Object.keys(values).length)
18
+ result[group] = values;
19
+ }
20
+ const scrim = local.scrim ?? parent.scrim;
21
+ if (scrim !== void 0)
22
+ result.scrim = scrim;
23
+ for (const group of Object.keys(geometryTokenGroups)) {
24
+ const values = Object.fromEntries(
25
+ [...Object.entries(parent[group] ?? {}), ...Object.entries(local[group] ?? {})].filter(([, value]) => value !== void 0)
26
+ );
27
+ if (Object.keys(values).length)
28
+ result[group] = values;
29
+ }
30
+ return result;
31
+ }
32
+ export function functionalTokenEntries(overrides = {}) {
33
+ const entries = [];
34
+ for (const group of Object.keys(functionalTokenGroups)) {
35
+ const values = overrides[group];
36
+ for (const leaf of functionalTokenGroups[group]) {
37
+ const value = values?.[leaf];
38
+ if (value !== void 0)
39
+ entries.push([`--selaras-${group}-${leaf}`, value]);
40
+ }
41
+ }
42
+ if (overrides.scrim !== void 0)
43
+ entries.push(["--selaras-scrim", overrides.scrim]);
44
+ for (const group of Object.keys(geometryTokenGroups)) {
45
+ const values = overrides[group];
46
+ const prefix = group === "zIndex" ? "z" : group;
47
+ for (const leaf of geometryTokenGroups[group]) {
48
+ const value = values?.[leaf];
49
+ if (value !== void 0)
50
+ entries.push([`--selaras-${prefix}-${leaf}`, value]);
51
+ }
52
+ }
53
+ return entries;
54
+ }
@@ -35,4 +35,7 @@ export interface IconRegistry {
35
35
  more: string;
36
36
  sidebarCollapse: string;
37
37
  }
38
+ export declare const feedbackIntentNames: readonly ["success", "danger", "warning", "info"];
39
+ export type FeedbackIntent = typeof feedbackIntentNames[number];
40
+ export declare function isFeedbackIntent(value: string): value is FeedbackIntent;
38
41
  export declare const defaultIcons: IconRegistry;
@@ -1,3 +1,7 @@
1
+ export const feedbackIntentNames = ["success", "danger", "warning", "info"];
2
+ export function isFeedbackIntent(value) {
3
+ return feedbackIntentNames.includes(value);
4
+ }
1
5
  export const defaultIcons = {
2
6
  close: "hugeicons:cancel-01",
3
7
  check: "hugeicons:tick-02",
@@ -1,4 +1,6 @@
1
1
  import type { ComputedRef, InjectionKey, Ref } from 'vue';
2
+ import type { ThemeDefaults, ThemeUiOverrides } from '../theme-config.js';
3
+ import type { RuntimeTokenOverrides } from './color-registry.js';
2
4
  export declare const AVATAR_SIZE_INJECTION_KEY: InjectionKey<ComputedRef<'sm' | 'md' | 'lg' | undefined>>;
3
5
  /**
4
6
  * Shared from DashboardGroup down to DashboardSidebar, DashboardPanel, and
@@ -58,12 +60,19 @@ export declare const DASHBOARD_INJECTION_KEY: InjectionKey<DashboardContext>;
58
60
  * a pre-merged bag: this lets the read side walk the *whole* ancestor
59
61
  * chain and compose overrides in the correct outermost-to-innermost
60
62
  * order (see useComponentTheme's own collectThemeChain), so nesting two
61
- * STheme components inherits an outer one's unset slots/props instead of
63
+ * STheme components inherits an outer one's unset slots/defaults instead of
62
64
  * an inner one wholesale replacing it.
63
65
  */
64
66
  export interface ThemeContext {
65
- ui?: Partial<Record<string, object>>;
66
- props?: Partial<Record<string, Record<string, unknown>>>;
67
+ ui?: ThemeUiOverrides;
68
+ defaults?: ThemeDefaults;
69
+ scopeId?: string;
70
+ /** `root` follows the document root; explicit modes inherit logically. */
71
+ mode?: 'root' | 'light' | 'dark';
72
+ /** Effective managed tokens from explicit DOM scopes only. */
73
+ tokens?: RuntimeTokenOverrides;
67
74
  parent?: ThemeContext;
75
+ /** Internal snapshot boundary: its chain already contains global UI/defaults. */
76
+ replaceGlobal?: boolean;
68
77
  }
69
78
  export declare const THEME_INJECTION_KEY: InjectionKey<ComputedRef<ThemeContext>>;
@@ -0,0 +1,5 @@
1
+ /** Fallthrough keys that belong on a wrapped text-like native input. */
2
+ export declare function isNativeInputAttr(key: string): boolean;
3
+ export declare function isNativeInputEvent(key: string): boolean;
4
+ /** Accessible naming and description belong on the wrapped input, not its layout root. */
5
+ export declare function isNativeInputA11yAttr(key: string): boolean;
@@ -0,0 +1,32 @@
1
+ const nativeInputAttributes = /* @__PURE__ */ new Set([
2
+ "autocomplete",
3
+ "autocapitalize",
4
+ "autocorrect",
5
+ "form",
6
+ "inputmode",
7
+ "list",
8
+ "maxlength",
9
+ "minlength",
10
+ "pattern",
11
+ "readonly",
12
+ "required",
13
+ "spellcheck",
14
+ "step"
15
+ ]);
16
+ const nativeInputEvents = /^on(?:BeforeInput|Change|CompositionEnd|CompositionStart|CompositionUpdate|Focus|Input|KeyDown|KeyUp|Paste|Select|Blur)$/;
17
+ const nativeInputAccessibilityAttributes = /* @__PURE__ */ new Set([
18
+ "aria-label",
19
+ "aria-labelledby",
20
+ "aria-describedby",
21
+ "aria-errormessage",
22
+ "aria-details"
23
+ ]);
24
+ export function isNativeInputAttr(key) {
25
+ return nativeInputAttributes.has(key) || nativeInputEvents.test(key);
26
+ }
27
+ export function isNativeInputEvent(key) {
28
+ return nativeInputEvents.test(key);
29
+ }
30
+ export function isNativeInputA11yAttr(key) {
31
+ return nativeInputAccessibilityAttributes.has(key);
32
+ }
@@ -2,6 +2,9 @@ export interface NavigationMenuItem {
2
2
  label: string;
3
3
  icon?: string;
4
4
  to?: string;
5
+ target?: string;
6
+ rel?: string;
7
+ ariaLabel?: string;
5
8
  disabled?: boolean;
6
9
  /** Force active state - otherwise auto-detected against the current route when `to` is set. */
7
10
  active?: boolean;
@@ -0,0 +1,17 @@
1
+ import type { ThemeDefaults, ThemeUiOverrides } from '../theme-config.js';
2
+ import type { RuntimeTokenOverrides } from './color-registry.js';
3
+ export interface ProgrammaticThemeLayer {
4
+ ui?: ThemeUiOverrides;
5
+ defaults?: ThemeDefaults;
6
+ }
7
+ /** @internal */
8
+ export interface ProgrammaticThemeSnapshot {
9
+ layers: ProgrammaticThemeLayer[];
10
+ tokens?: RuntimeTokenOverrides;
11
+ mode: 'root' | 'light' | 'dark';
12
+ }
13
+ /**
14
+ * Captures injection access during setup, then snapshots its current effective
15
+ * presentation when an imperative operation is actually queued.
16
+ */
17
+ export declare function useProgrammaticThemeSnapshot(): () => ProgrammaticThemeSnapshot;