@nuxt/ui 2.18.4 → 3.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +19 -2
  2. package/cli/commands/init.mjs +83 -0
  3. package/cli/index.mjs +15 -0
  4. package/cli/node_modules/.ignored/citty/LICENSE +36 -0
  5. package/cli/node_modules/.ignored/citty/README.md +134 -0
  6. package/cli/node_modules/.ignored/citty/dist/index.cjs +475 -0
  7. package/cli/node_modules/.ignored/citty/dist/index.d.cts +80 -0
  8. package/cli/node_modules/.ignored/citty/dist/index.d.mts +80 -0
  9. package/cli/node_modules/.ignored/citty/dist/index.d.ts +80 -0
  10. package/cli/node_modules/.ignored/citty/dist/index.mjs +463 -0
  11. package/cli/node_modules/.ignored/citty/package.json +49 -0
  12. package/cli/node_modules/.ignored/consola/LICENSE +47 -0
  13. package/cli/node_modules/.ignored/consola/README.md +318 -0
  14. package/cli/node_modules/.ignored/consola/core.d.ts +1 -0
  15. package/cli/node_modules/.ignored/consola/dist/basic.cjs +32 -0
  16. package/cli/node_modules/.ignored/consola/dist/basic.d.ts +9 -0
  17. package/cli/node_modules/.ignored/consola/dist/basic.mjs +24 -0
  18. package/cli/node_modules/.ignored/consola/dist/browser.cjs +80 -0
  19. package/cli/node_modules/.ignored/consola/dist/browser.d.ts +7 -0
  20. package/cli/node_modules/.ignored/consola/dist/browser.mjs +72 -0
  21. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.cjs +436 -0
  22. package/cli/node_modules/.ignored/consola/dist/chunks/prompt.mjs +429 -0
  23. package/cli/node_modules/.ignored/consola/dist/core.cjs +415 -0
  24. package/cli/node_modules/.ignored/consola/dist/core.d.ts +124 -0
  25. package/cli/node_modules/.ignored/consola/dist/core.mjs +410 -0
  26. package/cli/node_modules/.ignored/consola/dist/index.cjs +21 -0
  27. package/cli/node_modules/.ignored/consola/dist/index.d.ts +9 -0
  28. package/cli/node_modules/.ignored/consola/dist/index.mjs +8 -0
  29. package/cli/node_modules/.ignored/consola/dist/shared/consola.06ad8a64.mjs +62 -0
  30. package/cli/node_modules/.ignored/consola/dist/shared/consola.36c0034f.mjs +636 -0
  31. package/cli/node_modules/.ignored/consola/dist/shared/consola.4bbae468.cjs +645 -0
  32. package/cli/node_modules/.ignored/consola/dist/shared/consola.deac7d5a.cjs +65 -0
  33. package/cli/node_modules/.ignored/consola/dist/utils.cjs +308 -0
  34. package/cli/node_modules/.ignored/consola/dist/utils.d.ts +169 -0
  35. package/cli/node_modules/.ignored/consola/dist/utils.mjs +284 -0
  36. package/cli/node_modules/.ignored/consola/lib/index.cjs +9 -0
  37. package/cli/node_modules/.ignored/consola/package.json +101 -0
  38. package/cli/node_modules/.ignored/consola/utils.d.ts +1 -0
  39. package/cli/node_modules/.ignored/pathe/LICENSE +44 -0
  40. package/cli/node_modules/.ignored/pathe/README.md +69 -0
  41. package/cli/node_modules/.ignored/pathe/dist/index.cjs +23 -0
  42. package/cli/node_modules/.ignored/pathe/dist/index.d.cts +36 -0
  43. package/cli/node_modules/.ignored/pathe/dist/index.d.mts +36 -0
  44. package/cli/node_modules/.ignored/pathe/dist/index.d.ts +36 -0
  45. package/cli/node_modules/.ignored/pathe/dist/index.mjs +1 -0
  46. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.1f0a373c.cjs +238 -0
  47. package/cli/node_modules/.ignored/pathe/dist/shared/pathe.ff20891b.mjs +221 -0
  48. package/cli/node_modules/.ignored/pathe/dist/utils.cjs +58 -0
  49. package/cli/node_modules/.ignored/pathe/dist/utils.d.cts +5 -0
  50. package/cli/node_modules/.ignored/pathe/dist/utils.d.mts +5 -0
  51. package/cli/node_modules/.ignored/pathe/dist/utils.d.ts +5 -0
  52. package/cli/node_modules/.ignored/pathe/dist/utils.mjs +54 -0
  53. package/cli/node_modules/.ignored/pathe/package.json +48 -0
  54. package/cli/node_modules/.ignored/pathe/utils.d.ts +1 -0
  55. package/cli/node_modules/.ignored/scule/LICENSE +21 -0
  56. package/cli/node_modules/.ignored/scule/README.md +149 -0
  57. package/cli/node_modules/.ignored/scule/dist/index.cjs +92 -0
  58. package/cli/node_modules/.ignored/scule/dist/index.d.cts +57 -0
  59. package/cli/node_modules/.ignored/scule/dist/index.d.mts +57 -0
  60. package/cli/node_modules/.ignored/scule/dist/index.d.ts +57 -0
  61. package/cli/node_modules/.ignored/scule/dist/index.mjs +80 -0
  62. package/cli/node_modules/.ignored/scule/package.json +43 -0
  63. package/cli/node_modules/.package-lock.json +33 -0
  64. package/cli/package.json +13 -0
  65. package/cli/templates.mjs +171 -0
  66. package/cli/utils.mjs +17 -0
  67. package/dist/module.d.mts +10 -26
  68. package/dist/module.d.ts +10 -26
  69. package/dist/module.json +4 -4
  70. package/dist/module.mjs +2574 -154
  71. package/dist/runtime/components/Accordion.vue +110 -0
  72. package/dist/runtime/components/Alert.vue +130 -0
  73. package/dist/runtime/components/App.vue +42 -0
  74. package/dist/runtime/components/Avatar.vue +69 -0
  75. package/dist/runtime/components/AvatarGroup.vue +98 -0
  76. package/dist/runtime/components/Badge.vue +46 -0
  77. package/dist/runtime/components/Breadcrumb.vue +98 -0
  78. package/dist/runtime/components/Button.vue +82 -0
  79. package/dist/runtime/components/ButtonGroup.vue +53 -0
  80. package/dist/runtime/components/Card.vue +52 -0
  81. package/dist/runtime/components/Checkbox.vue +128 -0
  82. package/dist/runtime/components/Chip.vue +76 -0
  83. package/dist/runtime/components/Collapsible.vue +54 -0
  84. package/dist/runtime/components/CommandPalette.vue +303 -0
  85. package/dist/runtime/components/Container.vue +36 -0
  86. package/dist/runtime/components/ContextMenu.vue +103 -0
  87. package/dist/runtime/components/ContextMenuContent.vue +122 -0
  88. package/dist/runtime/components/Drawer.vue +115 -0
  89. package/dist/runtime/components/DropdownMenu.vue +115 -0
  90. package/dist/runtime/components/DropdownMenuContent.vue +129 -0
  91. package/dist/runtime/components/Form.vue +227 -0
  92. package/dist/runtime/components/FormField.vue +107 -0
  93. package/dist/runtime/components/Icon.vue +26 -0
  94. package/dist/runtime/components/Input.vue +180 -0
  95. package/dist/runtime/components/InputMenu.vue +371 -0
  96. package/dist/runtime/components/Kbd.vue +49 -0
  97. package/dist/runtime/components/Link.vue +147 -0
  98. package/dist/runtime/components/LinkBase.vue +60 -0
  99. package/dist/runtime/components/Modal.vue +163 -0
  100. package/dist/runtime/components/ModalProvider.vue +12 -0
  101. package/dist/runtime/components/NavigationMenu.vue +195 -0
  102. package/dist/runtime/components/Pagination.vue +173 -0
  103. package/dist/runtime/components/Popover.vue +88 -0
  104. package/dist/runtime/components/Progress.vue +164 -0
  105. package/dist/runtime/components/RadioGroup.vue +159 -0
  106. package/dist/runtime/components/Select.vue +230 -0
  107. package/dist/runtime/components/SelectMenu.vue +306 -0
  108. package/dist/runtime/components/Separator.vue +82 -0
  109. package/dist/runtime/components/Skeleton.vue +31 -0
  110. package/dist/runtime/components/Slideover.vue +162 -0
  111. package/dist/runtime/components/SlideoverProvider.vue +12 -0
  112. package/dist/runtime/components/Slider.vue +113 -0
  113. package/dist/runtime/components/Switch.vue +124 -0
  114. package/dist/runtime/components/Tabs.vue +114 -0
  115. package/dist/runtime/components/Textarea.vue +189 -0
  116. package/dist/runtime/components/Toast.vue +161 -0
  117. package/dist/runtime/components/Toaster.vue +130 -0
  118. package/dist/runtime/components/Tooltip.vue +88 -0
  119. package/dist/runtime/composables/defineShortcuts.d.ts +7 -5
  120. package/dist/runtime/composables/defineShortcuts.js +94 -65
  121. package/dist/runtime/composables/useAvatarGroup.d.ts +10 -0
  122. package/dist/runtime/composables/useAvatarGroup.js +10 -0
  123. package/dist/runtime/composables/useButtonGroup.d.ts +12 -17
  124. package/dist/runtime/composables/useButtonGroup.js +6 -56
  125. package/dist/runtime/composables/useComponentIcons.d.ts +26 -0
  126. package/dist/runtime/composables/useComponentIcons.js +26 -0
  127. package/dist/runtime/composables/useFormField.d.ts +34 -0
  128. package/dist/runtime/composables/useFormField.js +54 -0
  129. package/dist/runtime/composables/useKbd.d.ts +28 -0
  130. package/dist/runtime/composables/useKbd.js +46 -0
  131. package/dist/runtime/composables/useModal.d.ts +8 -4
  132. package/dist/runtime/composables/useModal.js +1 -0
  133. package/dist/runtime/composables/useSlideover.d.ts +9 -5
  134. package/dist/runtime/composables/useSlideover.js +3 -2
  135. package/dist/runtime/composables/useToast.d.ts +9 -17
  136. package/dist/runtime/composables/useToast.js +27 -13
  137. package/dist/runtime/index.css +1 -0
  138. package/dist/runtime/plugins/colors.js +9 -17
  139. package/dist/runtime/plugins/{slideovers.js → slideover.js} +3 -3
  140. package/dist/runtime/types/app.config.d.ts +6 -0
  141. package/dist/runtime/types/component.d.ts +17 -14
  142. package/dist/runtime/types/component.js +0 -0
  143. package/dist/runtime/types/form.d.ts +62 -32
  144. package/dist/runtime/types/form.js +12 -0
  145. package/dist/runtime/types/index.d.ts +41 -30
  146. package/dist/runtime/types/index.js +42 -31
  147. package/dist/runtime/types/utils.d.ts +13 -32
  148. package/dist/runtime/types/utils.js +0 -0
  149. package/dist/runtime/utils/form.d.ts +15 -0
  150. package/dist/runtime/utils/form.js +66 -0
  151. package/dist/runtime/utils/fuse.d.ts +4 -0
  152. package/dist/runtime/utils/fuse.js +63 -0
  153. package/dist/runtime/utils/index.d.ts +4 -10
  154. package/dist/runtime/utils/index.js +40 -60
  155. package/dist/runtime/utils/link.d.ts +26 -71
  156. package/dist/runtime/utils/link.js +4 -124
  157. package/package.json +50 -49
  158. package/dist/runtime/components/data/Table.vue +0 -355
  159. package/dist/runtime/components/data/Table.vue.d.ts +0 -439
  160. package/dist/runtime/components/elements/Accordion.vue +0 -185
  161. package/dist/runtime/components/elements/Accordion.vue.d.ts +0 -223
  162. package/dist/runtime/components/elements/Alert.vue +0 -139
  163. package/dist/runtime/components/elements/Alert.vue.d.ts +0 -194
  164. package/dist/runtime/components/elements/Avatar.vue +0 -160
  165. package/dist/runtime/components/elements/Avatar.vue.d.ts +0 -255
  166. package/dist/runtime/components/elements/AvatarGroup.d.ts +0 -56
  167. package/dist/runtime/components/elements/AvatarGroup.js +0 -58
  168. package/dist/runtime/components/elements/Badge.vue +0 -75
  169. package/dist/runtime/components/elements/Badge.vue.d.ts +0 -109
  170. package/dist/runtime/components/elements/Button.vue +0 -193
  171. package/dist/runtime/components/elements/Button.vue.d.ts +0 -504
  172. package/dist/runtime/components/elements/ButtonGroup.d.ts +0 -153
  173. package/dist/runtime/components/elements/ButtonGroup.js +0 -51
  174. package/dist/runtime/components/elements/Carousel.vue +0 -165
  175. package/dist/runtime/components/elements/Carousel.vue.d.ts +0 -159
  176. package/dist/runtime/components/elements/Chip.vue +0 -85
  177. package/dist/runtime/components/elements/Chip.vue.d.ts +0 -162
  178. package/dist/runtime/components/elements/Dropdown.vue +0 -254
  179. package/dist/runtime/components/elements/Dropdown.vue.d.ts +0 -254
  180. package/dist/runtime/components/elements/Icon.vue +0 -30
  181. package/dist/runtime/components/elements/Icon.vue.d.ts +0 -47
  182. package/dist/runtime/components/elements/Kbd.vue +0 -59
  183. package/dist/runtime/components/elements/Kbd.vue.d.ts +0 -86
  184. package/dist/runtime/components/elements/Link.vue +0 -95
  185. package/dist/runtime/components/elements/Link.vue.d.ts +0 -225
  186. package/dist/runtime/components/elements/Meter.vue +0 -170
  187. package/dist/runtime/components/elements/Meter.vue.d.ts +0 -279
  188. package/dist/runtime/components/elements/MeterGroup.d.ts +0 -135
  189. package/dist/runtime/components/elements/MeterGroup.js +0 -159
  190. package/dist/runtime/components/elements/Progress.vue +0 -203
  191. package/dist/runtime/components/elements/Progress.vue.d.ts +0 -280
  192. package/dist/runtime/components/forms/Checkbox.vue +0 -143
  193. package/dist/runtime/components/forms/Checkbox.vue.d.ts +0 -179
  194. package/dist/runtime/components/forms/Form.vue +0 -219
  195. package/dist/runtime/components/forms/Form.vue.d.ts +0 -53
  196. package/dist/runtime/components/forms/FormGroup.vue +0 -128
  197. package/dist/runtime/components/forms/FormGroup.vue.d.ts +0 -169
  198. package/dist/runtime/components/forms/Input.vue +0 -300
  199. package/dist/runtime/components/forms/Input.vue.d.ts +0 -482
  200. package/dist/runtime/components/forms/InputMenu.vue +0 -439
  201. package/dist/runtime/components/forms/InputMenu.vue.d.ts +0 -700
  202. package/dist/runtime/components/forms/Radio.vue +0 -140
  203. package/dist/runtime/components/forms/Radio.vue.d.ts +0 -168
  204. package/dist/runtime/components/forms/RadioGroup.vue +0 -145
  205. package/dist/runtime/components/forms/RadioGroup.vue.d.ts +0 -176
  206. package/dist/runtime/components/forms/Range.vue +0 -173
  207. package/dist/runtime/components/forms/Range.vue.d.ts +0 -268
  208. package/dist/runtime/components/forms/Select.vue +0 -322
  209. package/dist/runtime/components/forms/Select.vue.d.ts +0 -471
  210. package/dist/runtime/components/forms/SelectMenu.vue +0 -546
  211. package/dist/runtime/components/forms/SelectMenu.vue.d.ts +0 -754
  212. package/dist/runtime/components/forms/Textarea.vue +0 -231
  213. package/dist/runtime/components/forms/Textarea.vue.d.ts +0 -436
  214. package/dist/runtime/components/forms/Toggle.vue +0 -171
  215. package/dist/runtime/components/forms/Toggle.vue.d.ts +0 -262
  216. package/dist/runtime/components/layout/Card.vue +0 -63
  217. package/dist/runtime/components/layout/Card.vue.d.ts +0 -89
  218. package/dist/runtime/components/layout/Container.vue +0 -48
  219. package/dist/runtime/components/layout/Container.vue.d.ts +0 -53
  220. package/dist/runtime/components/layout/Divider.vue +0 -108
  221. package/dist/runtime/components/layout/Divider.vue.d.ts +0 -198
  222. package/dist/runtime/components/layout/Skeleton.vue +0 -46
  223. package/dist/runtime/components/layout/Skeleton.vue.d.ts +0 -53
  224. package/dist/runtime/components/navigation/Breadcrumb.vue +0 -82
  225. package/dist/runtime/components/navigation/Breadcrumb.vue.d.ts +0 -95
  226. package/dist/runtime/components/navigation/CommandPalette.vue +0 -345
  227. package/dist/runtime/components/navigation/CommandPalette.vue.d.ts +0 -390
  228. package/dist/runtime/components/navigation/CommandPaletteGroup.vue +0 -152
  229. package/dist/runtime/components/navigation/CommandPaletteGroup.vue.d.ts +0 -60
  230. package/dist/runtime/components/navigation/HorizontalNavigation.vue +0 -102
  231. package/dist/runtime/components/navigation/HorizontalNavigation.vue.d.ts +0 -99
  232. package/dist/runtime/components/navigation/Pagination.vue +0 -270
  233. package/dist/runtime/components/navigation/Pagination.vue.d.ts +0 -260
  234. package/dist/runtime/components/navigation/Tabs.vue +0 -163
  235. package/dist/runtime/components/navigation/Tabs.vue.d.ts +0 -165
  236. package/dist/runtime/components/navigation/VerticalNavigation.vue +0 -105
  237. package/dist/runtime/components/navigation/VerticalNavigation.vue.d.ts +0 -113
  238. package/dist/runtime/components/overlays/ContextMenu.vue +0 -85
  239. package/dist/runtime/components/overlays/ContextMenu.vue.d.ts +0 -126
  240. package/dist/runtime/components/overlays/Modal.vue +0 -122
  241. package/dist/runtime/components/overlays/Modal.vue.d.ts +0 -166
  242. package/dist/runtime/components/overlays/Modals.client.vue +0 -18
  243. package/dist/runtime/components/overlays/Notification.vue +0 -212
  244. package/dist/runtime/components/overlays/Notification.vue.d.ts +0 -235
  245. package/dist/runtime/components/overlays/Notifications.vue +0 -69
  246. package/dist/runtime/components/overlays/Notifications.vue.d.ts +0 -66
  247. package/dist/runtime/components/overlays/Popover.vue +0 -213
  248. package/dist/runtime/components/overlays/Popover.vue.d.ts +0 -220
  249. package/dist/runtime/components/overlays/Slideover.vue +0 -152
  250. package/dist/runtime/components/overlays/Slideover.vue.d.ts +0 -167
  251. package/dist/runtime/components/overlays/Slideovers.client.vue +0 -18
  252. package/dist/runtime/components/overlays/Tooltip.vue +0 -127
  253. package/dist/runtime/components/overlays/Tooltip.vue.d.ts +0 -165
  254. package/dist/runtime/composables/useCarouselScroll.d.ts +0 -2
  255. package/dist/runtime/composables/useCarouselScroll.js +0 -37
  256. package/dist/runtime/composables/useCopyToClipboard.d.ts +0 -10
  257. package/dist/runtime/composables/useCopyToClipboard.js +0 -26
  258. package/dist/runtime/composables/useFormGroup.d.ts +0 -18
  259. package/dist/runtime/composables/useFormGroup.js +0 -45
  260. package/dist/runtime/composables/usePopper.d.ts +0 -268
  261. package/dist/runtime/composables/usePopper.js +0 -94
  262. package/dist/runtime/composables/useShortcuts.d.ts +0 -12
  263. package/dist/runtime/composables/useShortcuts.js +0 -26
  264. package/dist/runtime/composables/useTimer.d.ts +0 -8
  265. package/dist/runtime/composables/useTimer.js +0 -51
  266. package/dist/runtime/composables/useUI.d.ts +0 -10
  267. package/dist/runtime/composables/useUI.js +0 -24
  268. package/dist/runtime/types/accordion.d.ts +0 -9
  269. package/dist/runtime/types/alert.d.ts +0 -12
  270. package/dist/runtime/types/avatar.d.ts +0 -17
  271. package/dist/runtime/types/badge.d.ts +0 -15
  272. package/dist/runtime/types/breadcrumb.d.ts +0 -10
  273. package/dist/runtime/types/button.d.ts +0 -31
  274. package/dist/runtime/types/chip.d.ts +0 -15
  275. package/dist/runtime/types/clipboard.d.ts +0 -3
  276. package/dist/runtime/types/command-palette.d.ts +0 -29
  277. package/dist/runtime/types/divider.d.ts +0 -3
  278. package/dist/runtime/types/dropdown.d.ts +0 -15
  279. package/dist/runtime/types/form-group.d.ts +0 -5
  280. package/dist/runtime/types/horizontal-navigation.d.ts +0 -13
  281. package/dist/runtime/types/input.d.ts +0 -8
  282. package/dist/runtime/types/kbd.d.ts +0 -5
  283. package/dist/runtime/types/link.d.ts +0 -12
  284. package/dist/runtime/types/meter.d.ts +0 -5
  285. package/dist/runtime/types/modal.d.ts +0 -18
  286. package/dist/runtime/types/notification.d.ts +0 -24
  287. package/dist/runtime/types/popper.d.ts +0 -17
  288. package/dist/runtime/types/progress.d.ts +0 -6
  289. package/dist/runtime/types/range.d.ts +0 -7
  290. package/dist/runtime/types/select.d.ts +0 -8
  291. package/dist/runtime/types/slideover.d.ts +0 -16
  292. package/dist/runtime/types/tabs.d.ts +0 -8
  293. package/dist/runtime/types/textarea.d.ts +0 -8
  294. package/dist/runtime/types/toggle.d.ts +0 -7
  295. package/dist/runtime/types/tooltip.d.ts +0 -7
  296. package/dist/runtime/types/vertical-navigation.d.ts +0 -13
  297. package/dist/runtime/ui.config/data/table.d.ts +0 -81
  298. package/dist/runtime/ui.config/data/table.js +0 -80
  299. package/dist/runtime/ui.config/elements/accordion.d.ts +0 -23
  300. package/dist/runtime/ui.config/elements/accordion.js +0 -22
  301. package/dist/runtime/ui.config/elements/alert.d.ts +0 -41
  302. package/dist/runtime/ui.config/elements/alert.js +0 -40
  303. package/dist/runtime/ui.config/elements/avatar.d.ts +0 -60
  304. package/dist/runtime/ui.config/elements/avatar.js +0 -59
  305. package/dist/runtime/ui.config/elements/avatarGroup.d.ts +0 -6
  306. package/dist/runtime/ui.config/elements/avatarGroup.js +0 -5
  307. package/dist/runtime/ui.config/elements/badge.d.ts +0 -34
  308. package/dist/runtime/ui.config/elements/badge.js +0 -33
  309. package/dist/runtime/ui.config/elements/button.d.ts +0 -81
  310. package/dist/runtime/ui.config/elements/button.js +0 -80
  311. package/dist/runtime/ui.config/elements/buttonGroup.d.ts +0 -101
  312. package/dist/runtime/ui.config/elements/buttonGroup.js +0 -19
  313. package/dist/runtime/ui.config/elements/carousel.d.ts +0 -27
  314. package/dist/runtime/ui.config/elements/carousel.js +0 -26
  315. package/dist/runtime/ui.config/elements/chip.d.ts +0 -35
  316. package/dist/runtime/ui.config/elements/chip.js +0 -34
  317. package/dist/runtime/ui.config/elements/dropdown.d.ts +0 -59
  318. package/dist/runtime/ui.config/elements/dropdown.js +0 -57
  319. package/dist/runtime/ui.config/elements/kbd.d.ts +0 -17
  320. package/dist/runtime/ui.config/elements/kbd.js +0 -16
  321. package/dist/runtime/ui.config/elements/meter.d.ts +0 -77
  322. package/dist/runtime/ui.config/elements/meter.js +0 -76
  323. package/dist/runtime/ui.config/elements/meterGroup.d.ts +0 -52
  324. package/dist/runtime/ui.config/elements/meterGroup.js +0 -24
  325. package/dist/runtime/ui.config/elements/progress.d.ts +0 -75
  326. package/dist/runtime/ui.config/elements/progress.js +0 -74
  327. package/dist/runtime/ui.config/forms/checkbox.d.ts +0 -19
  328. package/dist/runtime/ui.config/forms/checkbox.js +0 -18
  329. package/dist/runtime/ui.config/forms/formGroup.d.ts +0 -26
  330. package/dist/runtime/ui.config/forms/formGroup.js +0 -26
  331. package/dist/runtime/ui.config/forms/input.d.ts +0 -110
  332. package/dist/runtime/ui.config/forms/input.js +0 -109
  333. package/dist/runtime/ui.config/forms/inputMenu.d.ts +0 -64
  334. package/dist/runtime/ui.config/forms/inputMenu.js +0 -62
  335. package/dist/runtime/ui.config/forms/radio.d.ts +0 -18
  336. package/dist/runtime/ui.config/forms/radio.js +0 -17
  337. package/dist/runtime/ui.config/forms/radioGroup.d.ts +0 -9
  338. package/dist/runtime/ui.config/forms/radioGroup.js +0 -8
  339. package/dist/runtime/ui.config/forms/range.d.ts +0 -64
  340. package/dist/runtime/ui.config/forms/range.js +0 -63
  341. package/dist/runtime/ui.config/forms/select.d.ts +0 -111
  342. package/dist/runtime/ui.config/forms/select.js +0 -13
  343. package/dist/runtime/ui.config/forms/selectMenu.d.ts +0 -70
  344. package/dist/runtime/ui.config/forms/selectMenu.js +0 -32
  345. package/dist/runtime/ui.config/forms/textarea.d.ts +0 -109
  346. package/dist/runtime/ui.config/forms/textarea.js +0 -10
  347. package/dist/runtime/ui.config/forms/toggle.d.ts +0 -63
  348. package/dist/runtime/ui.config/forms/toggle.js +0 -62
  349. package/dist/runtime/ui.config/index.d.ts +0 -43
  350. package/dist/runtime/ui.config/index.js +0 -43
  351. package/dist/runtime/ui.config/layout/card.d.ts +0 -24
  352. package/dist/runtime/ui.config/layout/card.js +0 -23
  353. package/dist/runtime/ui.config/layout/container.d.ts +0 -6
  354. package/dist/runtime/ui.config/layout/container.js +0 -5
  355. package/dist/runtime/ui.config/layout/divider.d.ts +0 -52
  356. package/dist/runtime/ui.config/layout/divider.js +0 -51
  357. package/dist/runtime/ui.config/layout/skeleton.d.ts +0 -6
  358. package/dist/runtime/ui.config/layout/skeleton.js +0 -5
  359. package/dist/runtime/ui.config/navigation/breadcrumb.d.ts +0 -21
  360. package/dist/runtime/ui.config/navigation/breadcrumb.js +0 -20
  361. package/dist/runtime/ui.config/navigation/commandPalette.d.ts +0 -72
  362. package/dist/runtime/ui.config/navigation/commandPalette.js +0 -71
  363. package/dist/runtime/ui.config/navigation/horizontalNavigation.d.ts +0 -27
  364. package/dist/runtime/ui.config/navigation/horizontalNavigation.js +0 -26
  365. package/dist/runtime/ui.config/navigation/pagination.d.ts +0 -35
  366. package/dist/runtime/ui.config/navigation/pagination.js +0 -34
  367. package/dist/runtime/ui.config/navigation/tabs.d.ts +0 -35
  368. package/dist/runtime/ui.config/navigation/tabs.js +0 -34
  369. package/dist/runtime/ui.config/navigation/verticalNavigation.d.ts +0 -34
  370. package/dist/runtime/ui.config/navigation/verticalNavigation.js +0 -33
  371. package/dist/runtime/ui.config/overlays/contextMenu.d.ts +0 -31
  372. package/dist/runtime/ui.config/overlays/contextMenu.js +0 -25
  373. package/dist/runtime/ui.config/overlays/modal.d.ts +0 -36
  374. package/dist/runtime/ui.config/overlays/modal.js +0 -37
  375. package/dist/runtime/ui.config/overlays/notification.d.ts +0 -50
  376. package/dist/runtime/ui.config/overlays/notification.js +0 -50
  377. package/dist/runtime/ui.config/overlays/notifications.d.ts +0 -7
  378. package/dist/runtime/ui.config/overlays/notifications.js +0 -6
  379. package/dist/runtime/ui.config/overlays/popover.d.ts +0 -47
  380. package/dist/runtime/ui.config/overlays/popover.js +0 -41
  381. package/dist/runtime/ui.config/overlays/slideover.d.ts +0 -35
  382. package/dist/runtime/ui.config/overlays/slideover.js +0 -36
  383. package/dist/runtime/ui.config/overlays/tooltip.d.ts +0 -37
  384. package/dist/runtime/ui.config/overlays/tooltip.js +0 -34
  385. package/dist/runtime/ui.config/popper.d.ts +0 -8
  386. package/dist/runtime/ui.config/popper.js +0 -9
  387. package/dist/runtime/ui.css +0 -1
  388. package/dist/runtime/utils/colors.d.ts +0 -11
  389. package/dist/runtime/utils/colors.js +0 -307
  390. package/dist/runtime/utils/lodash.d.ts +0 -2
  391. package/dist/runtime/utils/lodash.js +0 -23
  392. package/dist/runtime/plugins/{modals.d.ts → modal.d.ts} +0 -0
  393. package/dist/runtime/plugins/{modals.js → modal.js} +1 -1
  394. /package/dist/runtime/plugins/{slideovers.d.ts → slideover.d.ts} +0 -0
@@ -0,0 +1,238 @@
1
+ 'use strict';
2
+
3
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
4
+ function normalizeWindowsPath(input = "") {
5
+ if (!input) {
6
+ return input;
7
+ }
8
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
9
+ }
10
+
11
+ const _UNC_REGEX = /^[/\\]{2}/;
12
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
13
+ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
14
+ const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
15
+ const sep = "/";
16
+ const delimiter = ":";
17
+ const normalize = function(path) {
18
+ if (path.length === 0) {
19
+ return ".";
20
+ }
21
+ path = normalizeWindowsPath(path);
22
+ const isUNCPath = path.match(_UNC_REGEX);
23
+ const isPathAbsolute = isAbsolute(path);
24
+ const trailingSeparator = path[path.length - 1] === "/";
25
+ path = normalizeString(path, !isPathAbsolute);
26
+ if (path.length === 0) {
27
+ if (isPathAbsolute) {
28
+ return "/";
29
+ }
30
+ return trailingSeparator ? "./" : ".";
31
+ }
32
+ if (trailingSeparator) {
33
+ path += "/";
34
+ }
35
+ if (_DRIVE_LETTER_RE.test(path)) {
36
+ path += "/";
37
+ }
38
+ if (isUNCPath) {
39
+ if (!isPathAbsolute) {
40
+ return `//./${path}`;
41
+ }
42
+ return `//${path}`;
43
+ }
44
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
45
+ };
46
+ const join = function(...arguments_) {
47
+ if (arguments_.length === 0) {
48
+ return ".";
49
+ }
50
+ let joined;
51
+ for (const argument of arguments_) {
52
+ if (argument && argument.length > 0) {
53
+ if (joined === void 0) {
54
+ joined = argument;
55
+ } else {
56
+ joined += `/${argument}`;
57
+ }
58
+ }
59
+ }
60
+ if (joined === void 0) {
61
+ return ".";
62
+ }
63
+ return normalize(joined.replace(/\/\/+/g, "/"));
64
+ };
65
+ function cwd() {
66
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
67
+ return process.cwd().replace(/\\/g, "/");
68
+ }
69
+ return "/";
70
+ }
71
+ const resolve = function(...arguments_) {
72
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
73
+ let resolvedPath = "";
74
+ let resolvedAbsolute = false;
75
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
76
+ const path = index >= 0 ? arguments_[index] : cwd();
77
+ if (!path || path.length === 0) {
78
+ continue;
79
+ }
80
+ resolvedPath = `${path}/${resolvedPath}`;
81
+ resolvedAbsolute = isAbsolute(path);
82
+ }
83
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
84
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
85
+ return `/${resolvedPath}`;
86
+ }
87
+ return resolvedPath.length > 0 ? resolvedPath : ".";
88
+ };
89
+ function normalizeString(path, allowAboveRoot) {
90
+ let res = "";
91
+ let lastSegmentLength = 0;
92
+ let lastSlash = -1;
93
+ let dots = 0;
94
+ let char = null;
95
+ for (let index = 0; index <= path.length; ++index) {
96
+ if (index < path.length) {
97
+ char = path[index];
98
+ } else if (char === "/") {
99
+ break;
100
+ } else {
101
+ char = "/";
102
+ }
103
+ if (char === "/") {
104
+ if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
105
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
106
+ if (res.length > 2) {
107
+ const lastSlashIndex = res.lastIndexOf("/");
108
+ if (lastSlashIndex === -1) {
109
+ res = "";
110
+ lastSegmentLength = 0;
111
+ } else {
112
+ res = res.slice(0, lastSlashIndex);
113
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
114
+ }
115
+ lastSlash = index;
116
+ dots = 0;
117
+ continue;
118
+ } else if (res.length > 0) {
119
+ res = "";
120
+ lastSegmentLength = 0;
121
+ lastSlash = index;
122
+ dots = 0;
123
+ continue;
124
+ }
125
+ }
126
+ if (allowAboveRoot) {
127
+ res += res.length > 0 ? "/.." : "..";
128
+ lastSegmentLength = 2;
129
+ }
130
+ } else {
131
+ if (res.length > 0) {
132
+ res += `/${path.slice(lastSlash + 1, index)}`;
133
+ } else {
134
+ res = path.slice(lastSlash + 1, index);
135
+ }
136
+ lastSegmentLength = index - lastSlash - 1;
137
+ }
138
+ lastSlash = index;
139
+ dots = 0;
140
+ } else if (char === "." && dots !== -1) {
141
+ ++dots;
142
+ } else {
143
+ dots = -1;
144
+ }
145
+ }
146
+ return res;
147
+ }
148
+ const isAbsolute = function(p) {
149
+ return _IS_ABSOLUTE_RE.test(p);
150
+ };
151
+ const toNamespacedPath = function(p) {
152
+ return normalizeWindowsPath(p);
153
+ };
154
+ const _EXTNAME_RE = /.(\.[^./]+)$/;
155
+ const extname = function(p) {
156
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
157
+ return match && match[1] || "";
158
+ };
159
+ const relative = function(from, to) {
160
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
161
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
162
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
163
+ return _to.join("/");
164
+ }
165
+ const _fromCopy = [..._from];
166
+ for (const segment of _fromCopy) {
167
+ if (_to[0] !== segment) {
168
+ break;
169
+ }
170
+ _from.shift();
171
+ _to.shift();
172
+ }
173
+ return [..._from.map(() => ".."), ..._to].join("/");
174
+ };
175
+ const dirname = function(p) {
176
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
177
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
178
+ segments[0] += "/";
179
+ }
180
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
181
+ };
182
+ const format = function(p) {
183
+ const segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);
184
+ return normalizeWindowsPath(
185
+ p.root ? resolve(...segments) : segments.join("/")
186
+ );
187
+ };
188
+ const basename = function(p, extension) {
189
+ const lastSegment = normalizeWindowsPath(p).split("/").pop();
190
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
191
+ };
192
+ const parse = function(p) {
193
+ const root = normalizeWindowsPath(p).split("/").shift() || "/";
194
+ const base = basename(p);
195
+ const extension = extname(base);
196
+ return {
197
+ root,
198
+ dir: dirname(p),
199
+ base,
200
+ ext: extension,
201
+ name: base.slice(0, base.length - extension.length)
202
+ };
203
+ };
204
+
205
+ const path = {
206
+ __proto__: null,
207
+ basename: basename,
208
+ delimiter: delimiter,
209
+ dirname: dirname,
210
+ extname: extname,
211
+ format: format,
212
+ isAbsolute: isAbsolute,
213
+ join: join,
214
+ normalize: normalize,
215
+ normalizeString: normalizeString,
216
+ parse: parse,
217
+ relative: relative,
218
+ resolve: resolve,
219
+ sep: sep,
220
+ toNamespacedPath: toNamespacedPath
221
+ };
222
+
223
+ exports.basename = basename;
224
+ exports.delimiter = delimiter;
225
+ exports.dirname = dirname;
226
+ exports.extname = extname;
227
+ exports.format = format;
228
+ exports.isAbsolute = isAbsolute;
229
+ exports.join = join;
230
+ exports.normalize = normalize;
231
+ exports.normalizeString = normalizeString;
232
+ exports.normalizeWindowsPath = normalizeWindowsPath;
233
+ exports.parse = parse;
234
+ exports.path = path;
235
+ exports.relative = relative;
236
+ exports.resolve = resolve;
237
+ exports.sep = sep;
238
+ exports.toNamespacedPath = toNamespacedPath;
@@ -0,0 +1,221 @@
1
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
2
+ function normalizeWindowsPath(input = "") {
3
+ if (!input) {
4
+ return input;
5
+ }
6
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
7
+ }
8
+
9
+ const _UNC_REGEX = /^[/\\]{2}/;
10
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
11
+ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
12
+ const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
13
+ const sep = "/";
14
+ const delimiter = ":";
15
+ const normalize = function(path) {
16
+ if (path.length === 0) {
17
+ return ".";
18
+ }
19
+ path = normalizeWindowsPath(path);
20
+ const isUNCPath = path.match(_UNC_REGEX);
21
+ const isPathAbsolute = isAbsolute(path);
22
+ const trailingSeparator = path[path.length - 1] === "/";
23
+ path = normalizeString(path, !isPathAbsolute);
24
+ if (path.length === 0) {
25
+ if (isPathAbsolute) {
26
+ return "/";
27
+ }
28
+ return trailingSeparator ? "./" : ".";
29
+ }
30
+ if (trailingSeparator) {
31
+ path += "/";
32
+ }
33
+ if (_DRIVE_LETTER_RE.test(path)) {
34
+ path += "/";
35
+ }
36
+ if (isUNCPath) {
37
+ if (!isPathAbsolute) {
38
+ return `//./${path}`;
39
+ }
40
+ return `//${path}`;
41
+ }
42
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
43
+ };
44
+ const join = function(...arguments_) {
45
+ if (arguments_.length === 0) {
46
+ return ".";
47
+ }
48
+ let joined;
49
+ for (const argument of arguments_) {
50
+ if (argument && argument.length > 0) {
51
+ if (joined === void 0) {
52
+ joined = argument;
53
+ } else {
54
+ joined += `/${argument}`;
55
+ }
56
+ }
57
+ }
58
+ if (joined === void 0) {
59
+ return ".";
60
+ }
61
+ return normalize(joined.replace(/\/\/+/g, "/"));
62
+ };
63
+ function cwd() {
64
+ if (typeof process !== "undefined" && typeof process.cwd === "function") {
65
+ return process.cwd().replace(/\\/g, "/");
66
+ }
67
+ return "/";
68
+ }
69
+ const resolve = function(...arguments_) {
70
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
71
+ let resolvedPath = "";
72
+ let resolvedAbsolute = false;
73
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
74
+ const path = index >= 0 ? arguments_[index] : cwd();
75
+ if (!path || path.length === 0) {
76
+ continue;
77
+ }
78
+ resolvedPath = `${path}/${resolvedPath}`;
79
+ resolvedAbsolute = isAbsolute(path);
80
+ }
81
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
82
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) {
83
+ return `/${resolvedPath}`;
84
+ }
85
+ return resolvedPath.length > 0 ? resolvedPath : ".";
86
+ };
87
+ function normalizeString(path, allowAboveRoot) {
88
+ let res = "";
89
+ let lastSegmentLength = 0;
90
+ let lastSlash = -1;
91
+ let dots = 0;
92
+ let char = null;
93
+ for (let index = 0; index <= path.length; ++index) {
94
+ if (index < path.length) {
95
+ char = path[index];
96
+ } else if (char === "/") {
97
+ break;
98
+ } else {
99
+ char = "/";
100
+ }
101
+ if (char === "/") {
102
+ if (lastSlash === index - 1 || dots === 1) ; else if (dots === 2) {
103
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
104
+ if (res.length > 2) {
105
+ const lastSlashIndex = res.lastIndexOf("/");
106
+ if (lastSlashIndex === -1) {
107
+ res = "";
108
+ lastSegmentLength = 0;
109
+ } else {
110
+ res = res.slice(0, lastSlashIndex);
111
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
112
+ }
113
+ lastSlash = index;
114
+ dots = 0;
115
+ continue;
116
+ } else if (res.length > 0) {
117
+ res = "";
118
+ lastSegmentLength = 0;
119
+ lastSlash = index;
120
+ dots = 0;
121
+ continue;
122
+ }
123
+ }
124
+ if (allowAboveRoot) {
125
+ res += res.length > 0 ? "/.." : "..";
126
+ lastSegmentLength = 2;
127
+ }
128
+ } else {
129
+ if (res.length > 0) {
130
+ res += `/${path.slice(lastSlash + 1, index)}`;
131
+ } else {
132
+ res = path.slice(lastSlash + 1, index);
133
+ }
134
+ lastSegmentLength = index - lastSlash - 1;
135
+ }
136
+ lastSlash = index;
137
+ dots = 0;
138
+ } else if (char === "." && dots !== -1) {
139
+ ++dots;
140
+ } else {
141
+ dots = -1;
142
+ }
143
+ }
144
+ return res;
145
+ }
146
+ const isAbsolute = function(p) {
147
+ return _IS_ABSOLUTE_RE.test(p);
148
+ };
149
+ const toNamespacedPath = function(p) {
150
+ return normalizeWindowsPath(p);
151
+ };
152
+ const _EXTNAME_RE = /.(\.[^./]+)$/;
153
+ const extname = function(p) {
154
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
155
+ return match && match[1] || "";
156
+ };
157
+ const relative = function(from, to) {
158
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
159
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
160
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) {
161
+ return _to.join("/");
162
+ }
163
+ const _fromCopy = [..._from];
164
+ for (const segment of _fromCopy) {
165
+ if (_to[0] !== segment) {
166
+ break;
167
+ }
168
+ _from.shift();
169
+ _to.shift();
170
+ }
171
+ return [..._from.map(() => ".."), ..._to].join("/");
172
+ };
173
+ const dirname = function(p) {
174
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
175
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) {
176
+ segments[0] += "/";
177
+ }
178
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
179
+ };
180
+ const format = function(p) {
181
+ const segments = [p.root, p.dir, p.base ?? p.name + p.ext].filter(Boolean);
182
+ return normalizeWindowsPath(
183
+ p.root ? resolve(...segments) : segments.join("/")
184
+ );
185
+ };
186
+ const basename = function(p, extension) {
187
+ const lastSegment = normalizeWindowsPath(p).split("/").pop();
188
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
189
+ };
190
+ const parse = function(p) {
191
+ const root = normalizeWindowsPath(p).split("/").shift() || "/";
192
+ const base = basename(p);
193
+ const extension = extname(base);
194
+ return {
195
+ root,
196
+ dir: dirname(p),
197
+ base,
198
+ ext: extension,
199
+ name: base.slice(0, base.length - extension.length)
200
+ };
201
+ };
202
+
203
+ const path = {
204
+ __proto__: null,
205
+ basename: basename,
206
+ delimiter: delimiter,
207
+ dirname: dirname,
208
+ extname: extname,
209
+ format: format,
210
+ isAbsolute: isAbsolute,
211
+ join: join,
212
+ normalize: normalize,
213
+ normalizeString: normalizeString,
214
+ parse: parse,
215
+ relative: relative,
216
+ resolve: resolve,
217
+ sep: sep,
218
+ toNamespacedPath: toNamespacedPath
219
+ };
220
+
221
+ export { normalize as a, normalizeString as b, relative as c, delimiter as d, extname as e, dirname as f, format as g, basename as h, isAbsolute as i, join as j, parse as k, normalizeWindowsPath as n, path as p, resolve as r, sep as s, toNamespacedPath as t };
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ const index = require('./shared/pathe.1f0a373c.cjs');
4
+
5
+ const pathSeparators = /* @__PURE__ */ new Set(["/", "\\", void 0]);
6
+ const normalizedAliasSymbol = Symbol.for("pathe:normalizedAlias");
7
+ function normalizeAliases(_aliases) {
8
+ if (_aliases[normalizedAliasSymbol]) {
9
+ return _aliases;
10
+ }
11
+ const aliases = Object.fromEntries(
12
+ Object.entries(_aliases).sort(([a], [b]) => _compareAliases(a, b))
13
+ );
14
+ for (const key in aliases) {
15
+ for (const alias in aliases) {
16
+ if (alias === key || key.startsWith(alias)) {
17
+ continue;
18
+ }
19
+ if (aliases[key].startsWith(alias) && pathSeparators.has(aliases[key][alias.length])) {
20
+ aliases[key] = aliases[alias] + aliases[key].slice(alias.length);
21
+ }
22
+ }
23
+ }
24
+ Object.defineProperty(aliases, normalizedAliasSymbol, {
25
+ value: true,
26
+ enumerable: false
27
+ });
28
+ return aliases;
29
+ }
30
+ function resolveAlias(path, aliases) {
31
+ const _path = index.normalizeWindowsPath(path);
32
+ aliases = normalizeAliases(aliases);
33
+ for (const [alias, to] of Object.entries(aliases)) {
34
+ if (!_path.startsWith(alias)) {
35
+ continue;
36
+ }
37
+ const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
38
+ if (hasTrailingSlash(_path[_alias.length])) {
39
+ return index.join(to, _path.slice(alias.length));
40
+ }
41
+ }
42
+ return _path;
43
+ }
44
+ const FILENAME_RE = /(^|[/\\])([^/\\]+?)(?=(\.[^.]+)?$)/;
45
+ function filename(path) {
46
+ return path.match(FILENAME_RE)?.[2];
47
+ }
48
+ function _compareAliases(a, b) {
49
+ return b.split("/").length - a.split("/").length;
50
+ }
51
+ function hasTrailingSlash(path = "/") {
52
+ const lastChar = path[path.length - 1];
53
+ return lastChar === "/" || lastChar === "\\";
54
+ }
55
+
56
+ exports.filename = filename;
57
+ exports.normalizeAliases = normalizeAliases;
58
+ exports.resolveAlias = resolveAlias;
@@ -0,0 +1,5 @@
1
+ declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
2
+ declare function resolveAlias(path: string, aliases: Record<string, string>): string;
3
+ declare function filename(path: string): string;
4
+
5
+ export { filename, normalizeAliases, resolveAlias };
@@ -0,0 +1,5 @@
1
+ declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
2
+ declare function resolveAlias(path: string, aliases: Record<string, string>): string;
3
+ declare function filename(path: string): string;
4
+
5
+ export { filename, normalizeAliases, resolveAlias };
@@ -0,0 +1,5 @@
1
+ declare function normalizeAliases(_aliases: Record<string, string>): Record<string, string>;
2
+ declare function resolveAlias(path: string, aliases: Record<string, string>): string;
3
+ declare function filename(path: string): string;
4
+
5
+ export { filename, normalizeAliases, resolveAlias };
@@ -0,0 +1,54 @@
1
+ import { n as normalizeWindowsPath, j as join } from './shared/pathe.ff20891b.mjs';
2
+
3
+ const pathSeparators = /* @__PURE__ */ new Set(["/", "\\", void 0]);
4
+ const normalizedAliasSymbol = Symbol.for("pathe:normalizedAlias");
5
+ function normalizeAliases(_aliases) {
6
+ if (_aliases[normalizedAliasSymbol]) {
7
+ return _aliases;
8
+ }
9
+ const aliases = Object.fromEntries(
10
+ Object.entries(_aliases).sort(([a], [b]) => _compareAliases(a, b))
11
+ );
12
+ for (const key in aliases) {
13
+ for (const alias in aliases) {
14
+ if (alias === key || key.startsWith(alias)) {
15
+ continue;
16
+ }
17
+ if (aliases[key].startsWith(alias) && pathSeparators.has(aliases[key][alias.length])) {
18
+ aliases[key] = aliases[alias] + aliases[key].slice(alias.length);
19
+ }
20
+ }
21
+ }
22
+ Object.defineProperty(aliases, normalizedAliasSymbol, {
23
+ value: true,
24
+ enumerable: false
25
+ });
26
+ return aliases;
27
+ }
28
+ function resolveAlias(path, aliases) {
29
+ const _path = normalizeWindowsPath(path);
30
+ aliases = normalizeAliases(aliases);
31
+ for (const [alias, to] of Object.entries(aliases)) {
32
+ if (!_path.startsWith(alias)) {
33
+ continue;
34
+ }
35
+ const _alias = hasTrailingSlash(alias) ? alias.slice(0, -1) : alias;
36
+ if (hasTrailingSlash(_path[_alias.length])) {
37
+ return join(to, _path.slice(alias.length));
38
+ }
39
+ }
40
+ return _path;
41
+ }
42
+ const FILENAME_RE = /(^|[/\\])([^/\\]+?)(?=(\.[^.]+)?$)/;
43
+ function filename(path) {
44
+ return path.match(FILENAME_RE)?.[2];
45
+ }
46
+ function _compareAliases(a, b) {
47
+ return b.split("/").length - a.split("/").length;
48
+ }
49
+ function hasTrailingSlash(path = "/") {
50
+ const lastChar = path[path.length - 1];
51
+ return lastChar === "/" || lastChar === "\\";
52
+ }
53
+
54
+ export { filename, normalizeAliases, resolveAlias };
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "pathe",
3
+ "version": "1.1.2",
4
+ "description": "Universal filesystem path utils",
5
+ "repository": "unjs/pathe",
6
+ "license": "MIT",
7
+ "sideEffects": false,
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.mjs",
12
+ "require": "./dist/index.cjs"
13
+ },
14
+ "./utils": {
15
+ "types": "./dist/utils.d.ts",
16
+ "import": "./dist/utils.mjs",
17
+ "require": "./dist/utils.cjs"
18
+ }
19
+ },
20
+ "main": "./dist/index.cjs",
21
+ "types": "./dist/index.d.ts",
22
+ "files": [
23
+ "dist",
24
+ "utils.d.ts"
25
+ ],
26
+ "devDependencies": {
27
+ "@types/node": "^20.10.8",
28
+ "@vitest/coverage-v8": "^1.1.3",
29
+ "changelogen": "^0.5.5",
30
+ "eslint": "^8.56.0",
31
+ "eslint-config-unjs": "^0.2.1",
32
+ "jiti": "^1.21.0",
33
+ "prettier": "^3.1.1",
34
+ "typescript": "^5.3.3",
35
+ "unbuild": "^2.0.0",
36
+ "vitest": "^1.1.3"
37
+ },
38
+ "packageManager": "pnpm@8.14.0",
39
+ "scripts": {
40
+ "build": "unbuild",
41
+ "dev": "vitest",
42
+ "lint": "eslint --ext .ts . && prettier -c src test",
43
+ "lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w",
44
+ "release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
45
+ "test": "pnpm lint && vitest run --coverage",
46
+ "test:types": "tsc --noEmit"
47
+ }
48
+ }
@@ -0,0 +1 @@
1
+ export * from "./dist/utils";
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Pooya Parsa <pooya@pi0.io>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.