@diegopluna/narvi 0.0.0-stage → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (351) hide show
  1. package/README.md +82 -2
  2. package/dist/components/activity/ActivityContent.svelte +55 -0
  3. package/dist/components/activity/ActivityContent.svelte.d.ts +11 -0
  4. package/dist/components/activity/ActivityRoot.svelte +66 -0
  5. package/dist/components/activity/ActivityRoot.svelte.d.ts +17 -0
  6. package/dist/components/activity/ActivityStep.svelte +157 -0
  7. package/dist/components/activity/ActivityStep.svelte.d.ts +26 -0
  8. package/dist/components/activity/ActivityThought.svelte +60 -0
  9. package/dist/components/activity/ActivityThought.svelte.d.ts +10 -0
  10. package/dist/components/activity/ActivityTrigger.svelte +103 -0
  11. package/dist/components/activity/ActivityTrigger.svelte.d.ts +20 -0
  12. package/dist/components/activity/context.d.ts +7 -0
  13. package/dist/components/activity/context.js +11 -0
  14. package/dist/components/activity/index.d.ts +11 -0
  15. package/dist/components/activity/index.js +6 -0
  16. package/dist/components/announcer/Announcer.svelte +84 -0
  17. package/dist/components/announcer/Announcer.svelte.d.ts +13 -0
  18. package/dist/components/app-shell/AppShellHeader.svelte +54 -0
  19. package/dist/components/app-shell/AppShellHeader.svelte.d.ts +15 -0
  20. package/dist/components/app-shell/AppShellMain.svelte +49 -0
  21. package/dist/components/app-shell/AppShellMain.svelte.d.ts +11 -0
  22. package/dist/components/app-shell/AppShellPanel.svelte +107 -0
  23. package/dist/components/app-shell/AppShellPanel.svelte.d.ts +18 -0
  24. package/dist/components/app-shell/AppShellRoot.svelte +136 -0
  25. package/dist/components/app-shell/AppShellRoot.svelte.d.ts +28 -0
  26. package/dist/components/app-shell/AppShellSidebar.svelte +192 -0
  27. package/dist/components/app-shell/AppShellSidebar.svelte.d.ts +17 -0
  28. package/dist/components/app-shell/AppShellToggle.svelte +50 -0
  29. package/dist/components/app-shell/AppShellToggle.svelte.d.ts +10 -0
  30. package/dist/components/app-shell/context.d.ts +15 -0
  31. package/dist/components/app-shell/context.js +15 -0
  32. package/dist/components/app-shell/index.d.ts +15 -0
  33. package/dist/components/app-shell/index.js +8 -0
  34. package/dist/components/approval/Approval.svelte +213 -0
  35. package/dist/components/approval/Approval.svelte.d.ts +38 -0
  36. package/dist/components/avatar/AvatarFallback.svelte +73 -0
  37. package/dist/components/avatar/AvatarFallback.svelte.d.ts +11 -0
  38. package/dist/components/avatar/AvatarImage.svelte +75 -0
  39. package/dist/components/avatar/AvatarImage.svelte.d.ts +11 -0
  40. package/dist/components/avatar/AvatarRoot.svelte +108 -0
  41. package/dist/components/avatar/AvatarRoot.svelte.d.ts +19 -0
  42. package/dist/components/avatar/context.d.ts +11 -0
  43. package/dist/components/avatar/context.js +11 -0
  44. package/dist/components/avatar/index.d.ts +7 -0
  45. package/dist/components/avatar/index.js +6 -0
  46. package/dist/components/badge/Badge.svelte +78 -0
  47. package/dist/components/badge/Badge.svelte.d.ts +15 -0
  48. package/dist/components/button/Button.svelte +270 -0
  49. package/dist/components/button/Button.svelte.d.ts +22 -0
  50. package/dist/components/card/Card.svelte +65 -0
  51. package/dist/components/card/Card.svelte.d.ts +15 -0
  52. package/dist/components/change-stats/ChangeStats.svelte +52 -0
  53. package/dist/components/change-stats/ChangeStats.svelte.d.ts +14 -0
  54. package/dist/components/changes-summary/ChangesSummary.svelte +152 -0
  55. package/dist/components/changes-summary/ChangesSummary.svelte.d.ts +20 -0
  56. package/dist/components/checkbox/Checkbox.svelte +178 -0
  57. package/dist/components/checkbox/Checkbox.svelte.d.ts +19 -0
  58. package/dist/components/code/Code.svelte +33 -0
  59. package/dist/components/code/Code.svelte.d.ts +10 -0
  60. package/dist/components/command/CommandDialog.svelte +37 -0
  61. package/dist/components/command/CommandDialog.svelte.d.ts +12 -0
  62. package/dist/components/command/CommandEmpty.svelte +20 -0
  63. package/dist/components/command/CommandEmpty.svelte.d.ts +11 -0
  64. package/dist/components/command/CommandFooter.svelte +25 -0
  65. package/dist/components/command/CommandFooter.svelte.d.ts +11 -0
  66. package/dist/components/command/CommandGroup.svelte +25 -0
  67. package/dist/components/command/CommandGroup.svelte.d.ts +12 -0
  68. package/dist/components/command/CommandInput.svelte +33 -0
  69. package/dist/components/command/CommandInput.svelte.d.ts +8 -0
  70. package/dist/components/command/CommandItem.svelte +49 -0
  71. package/dist/components/command/CommandItem.svelte.d.ts +16 -0
  72. package/dist/components/command/CommandList.svelte +21 -0
  73. package/dist/components/command/CommandList.svelte.d.ts +10 -0
  74. package/dist/components/command/CommandRoot.svelte +20 -0
  75. package/dist/components/command/CommandRoot.svelte.d.ts +11 -0
  76. package/dist/components/command/index.d.ts +20 -0
  77. package/dist/components/command/index.js +12 -0
  78. package/dist/components/command/styles.d.ts +117 -0
  79. package/dist/components/command/styles.js +121 -0
  80. package/dist/components/composer/ComposerAttachButton.svelte +55 -0
  81. package/dist/components/composer/ComposerAttachButton.svelte.d.ts +14 -0
  82. package/dist/components/composer/ComposerAttachment.svelte +173 -0
  83. package/dist/components/composer/ComposerAttachment.svelte.d.ts +13 -0
  84. package/dist/components/composer/ComposerAttachments.svelte +63 -0
  85. package/dist/components/composer/ComposerAttachments.svelte.d.ts +13 -0
  86. package/dist/components/composer/ComposerModelPicker.svelte +475 -0
  87. package/dist/components/composer/ComposerModelPicker.svelte.d.ts +27 -0
  88. package/dist/components/composer/ComposerRoot.svelte +315 -0
  89. package/dist/components/composer/ComposerRoot.svelte.d.ts +42 -0
  90. package/dist/components/composer/ComposerSubmit.svelte +131 -0
  91. package/dist/components/composer/ComposerSubmit.svelte.d.ts +13 -0
  92. package/dist/components/composer/ComposerTextarea.svelte +109 -0
  93. package/dist/components/composer/ComposerTextarea.svelte.d.ts +9 -0
  94. package/dist/components/composer/ComposerToggle.svelte +106 -0
  95. package/dist/components/composer/ComposerToggle.svelte.d.ts +14 -0
  96. package/dist/components/composer/ComposerToolbar.svelte +29 -0
  97. package/dist/components/composer/ComposerToolbar.svelte.d.ts +11 -0
  98. package/dist/components/composer/context.d.ts +53 -0
  99. package/dist/components/composer/context.js +32 -0
  100. package/dist/components/composer/index.d.ts +21 -0
  101. package/dist/components/composer/index.js +13 -0
  102. package/dist/components/conversation/ConversationContent.svelte +94 -0
  103. package/dist/components/conversation/ConversationContent.svelte.d.ts +15 -0
  104. package/dist/components/conversation/ConversationEmpty.svelte +89 -0
  105. package/dist/components/conversation/ConversationEmpty.svelte.d.ts +16 -0
  106. package/dist/components/conversation/ConversationRoot.svelte +237 -0
  107. package/dist/components/conversation/ConversationRoot.svelte.d.ts +20 -0
  108. package/dist/components/conversation/ConversationScrollButton.svelte +114 -0
  109. package/dist/components/conversation/ConversationScrollButton.svelte.d.ts +14 -0
  110. package/dist/components/conversation/context.d.ts +28 -0
  111. package/dist/components/conversation/context.js +15 -0
  112. package/dist/components/conversation/index.d.ts +11 -0
  113. package/dist/components/conversation/index.js +8 -0
  114. package/dist/components/conversation/scrolling.d.ts +25 -0
  115. package/dist/components/conversation/scrolling.js +60 -0
  116. package/dist/components/dev-styles/DevStyles.svelte +21 -0
  117. package/dist/components/dev-styles/DevStyles.svelte.d.ts +3 -0
  118. package/dist/components/dialog/ConfirmDialog.svelte +157 -0
  119. package/dist/components/dialog/ConfirmDialog.svelte.d.ts +31 -0
  120. package/dist/components/dialog/DialogBody.svelte +19 -0
  121. package/dist/components/dialog/DialogBody.svelte.d.ts +10 -0
  122. package/dist/components/dialog/DialogContent.svelte +55 -0
  123. package/dist/components/dialog/DialogContent.svelte.d.ts +17 -0
  124. package/dist/components/dialog/DialogDescription.svelte +23 -0
  125. package/dist/components/dialog/DialogDescription.svelte.d.ts +10 -0
  126. package/dist/components/dialog/DialogFooter.svelte +19 -0
  127. package/dist/components/dialog/DialogFooter.svelte.d.ts +10 -0
  128. package/dist/components/dialog/DialogHeader.svelte +19 -0
  129. package/dist/components/dialog/DialogHeader.svelte.d.ts +10 -0
  130. package/dist/components/dialog/DialogTitle.svelte +20 -0
  131. package/dist/components/dialog/DialogTitle.svelte.d.ts +10 -0
  132. package/dist/components/dialog/index.d.ts +17 -0
  133. package/dist/components/dialog/index.js +12 -0
  134. package/dist/components/dialog/styles.d.ts +120 -0
  135. package/dist/components/dialog/styles.js +136 -0
  136. package/dist/components/divider/Divider.svelte +42 -0
  137. package/dist/components/divider/Divider.svelte.d.ts +11 -0
  138. package/dist/components/empty-state/EmptyState.svelte +82 -0
  139. package/dist/components/empty-state/EmptyState.svelte.d.ts +15 -0
  140. package/dist/components/field/Field.svelte +132 -0
  141. package/dist/components/field/Field.svelte.d.ts +23 -0
  142. package/dist/components/field/context.d.ts +12 -0
  143. package/dist/components/field/context.js +9 -0
  144. package/dist/components/frame/Frame.svelte +88 -0
  145. package/dist/components/frame/Frame.svelte.d.ts +19 -0
  146. package/dist/components/heading/Heading.svelte +82 -0
  147. package/dist/components/heading/Heading.svelte.d.ts +16 -0
  148. package/dist/components/input/Input.svelte +47 -0
  149. package/dist/components/input/Input.svelte.d.ts +14 -0
  150. package/dist/components/kbd/Kbd.svelte +40 -0
  151. package/dist/components/kbd/Kbd.svelte.d.ts +11 -0
  152. package/dist/components/link/Link.svelte +68 -0
  153. package/dist/components/link/Link.svelte.d.ts +16 -0
  154. package/dist/components/menu/ContextMenuContent.svelte +33 -0
  155. package/dist/components/menu/ContextMenuContent.svelte.d.ts +11 -0
  156. package/dist/components/menu/ContextMenuTrigger.svelte +44 -0
  157. package/dist/components/menu/ContextMenuTrigger.svelte.d.ts +11 -0
  158. package/dist/components/menu/MenuCheckboxItem.svelte +43 -0
  159. package/dist/components/menu/MenuCheckboxItem.svelte.d.ts +11 -0
  160. package/dist/components/menu/MenuContent.svelte +36 -0
  161. package/dist/components/menu/MenuContent.svelte.d.ts +10 -0
  162. package/dist/components/menu/MenuItem.svelte +41 -0
  163. package/dist/components/menu/MenuItem.svelte.d.ts +16 -0
  164. package/dist/components/menu/MenuLabel.svelte +24 -0
  165. package/dist/components/menu/MenuLabel.svelte.d.ts +10 -0
  166. package/dist/components/menu/MenuRadioItem.svelte +54 -0
  167. package/dist/components/menu/MenuRadioItem.svelte.d.ts +12 -0
  168. package/dist/components/menu/MenuSeparator.svelte +19 -0
  169. package/dist/components/menu/MenuSeparator.svelte.d.ts +8 -0
  170. package/dist/components/menu/MenuSubContent.svelte +34 -0
  171. package/dist/components/menu/MenuSubContent.svelte.d.ts +10 -0
  172. package/dist/components/menu/MenuSubTrigger.svelte +35 -0
  173. package/dist/components/menu/MenuSubTrigger.svelte.d.ts +11 -0
  174. package/dist/components/menu/context-menu.d.ts +11 -0
  175. package/dist/components/menu/context-menu.js +10 -0
  176. package/dist/components/menu/index.js +16 -0
  177. package/dist/components/message/MessageAction.svelte +62 -0
  178. package/dist/components/message/MessageAction.svelte.d.ts +16 -0
  179. package/dist/components/message/MessageActions.svelte +77 -0
  180. package/dist/components/message/MessageActions.svelte.d.ts +19 -0
  181. package/dist/components/message/MessageContent.svelte +68 -0
  182. package/dist/components/message/MessageContent.svelte.d.ts +12 -0
  183. package/dist/components/message/MessageCopy.svelte +106 -0
  184. package/dist/components/message/MessageCopy.svelte.d.ts +16 -0
  185. package/dist/components/message/MessageHeader.svelte +74 -0
  186. package/dist/components/message/MessageHeader.svelte.d.ts +15 -0
  187. package/dist/components/message/MessagePending.svelte +44 -0
  188. package/dist/components/message/MessagePending.svelte.d.ts +10 -0
  189. package/dist/components/message/MessageRoot.svelte +79 -0
  190. package/dist/components/message/MessageRoot.svelte.d.ts +20 -0
  191. package/dist/components/message/MessageTime.svelte +58 -0
  192. package/dist/components/message/MessageTime.svelte.d.ts +12 -0
  193. package/dist/components/message/context.d.ts +7 -0
  194. package/dist/components/message/context.js +11 -0
  195. package/dist/components/message/index.d.ts +18 -0
  196. package/dist/components/message/index.js +11 -0
  197. package/dist/components/notice/Notice.svelte +111 -0
  198. package/dist/components/notice/Notice.svelte.d.ts +26 -0
  199. package/dist/components/plan/Plan.svelte +198 -0
  200. package/dist/components/plan/Plan.svelte.d.ts +18 -0
  201. package/dist/components/popover/PopoverContent.svelte +42 -0
  202. package/dist/components/popover/PopoverContent.svelte.d.ts +10 -0
  203. package/dist/components/popover/index.d.ts +7 -0
  204. package/dist/components/popover/index.js +7 -0
  205. package/dist/components/progress/Progress.svelte +113 -0
  206. package/dist/components/progress/Progress.svelte.d.ts +11 -0
  207. package/dist/components/questionnaire/Questionnaire.svelte +315 -0
  208. package/dist/components/questionnaire/Questionnaire.svelte.d.ts +33 -0
  209. package/dist/components/queued-message/QueuedMessage.svelte +133 -0
  210. package/dist/components/queued-message/QueuedMessage.svelte.d.ts +23 -0
  211. package/dist/components/rail/RailItem.svelte +170 -0
  212. package/dist/components/rail/RailItem.svelte.d.ts +21 -0
  213. package/dist/components/rail/RailRoot.svelte +46 -0
  214. package/dist/components/rail/RailRoot.svelte.d.ts +13 -0
  215. package/dist/components/rail/RailSpacer.svelte +2 -0
  216. package/dist/components/rail/RailSpacer.svelte.d.ts +26 -0
  217. package/dist/components/rail/index.d.ts +6 -0
  218. package/dist/components/rail/index.js +4 -0
  219. package/dist/components/reasoning/ReasoningContent.svelte +56 -0
  220. package/dist/components/reasoning/ReasoningContent.svelte.d.ts +12 -0
  221. package/dist/components/reasoning/ReasoningRoot.svelte +102 -0
  222. package/dist/components/reasoning/ReasoningRoot.svelte.d.ts +25 -0
  223. package/dist/components/reasoning/ReasoningTrigger.svelte +106 -0
  224. package/dist/components/reasoning/ReasoningTrigger.svelte.d.ts +18 -0
  225. package/dist/components/reasoning/context.d.ts +8 -0
  226. package/dist/components/reasoning/context.js +11 -0
  227. package/dist/components/reasoning/index.d.ts +7 -0
  228. package/dist/components/reasoning/index.js +6 -0
  229. package/dist/components/resize-handle/ResizeHandle.svelte +177 -0
  230. package/dist/components/resize-handle/ResizeHandle.svelte.d.ts +29 -0
  231. package/dist/components/rolling-text/RollingText.svelte +51 -0
  232. package/dist/components/rolling-text/RollingText.svelte.d.ts +11 -0
  233. package/dist/components/segmented/SegmentedControl.svelte +171 -0
  234. package/dist/components/segmented/SegmentedControl.svelte.d.ts +20 -0
  235. package/dist/components/select/Select.svelte +146 -0
  236. package/dist/components/select/Select.svelte.d.ts +31 -0
  237. package/dist/components/separator/Separator.svelte +48 -0
  238. package/dist/components/separator/Separator.svelte.d.ts +11 -0
  239. package/dist/components/settings-row/SettingsRow.svelte +97 -0
  240. package/dist/components/settings-row/SettingsRow.svelte.d.ts +21 -0
  241. package/dist/components/shimmer/Shimmer.svelte +66 -0
  242. package/dist/components/shimmer/Shimmer.svelte.d.ts +12 -0
  243. package/dist/components/sidebar/SidebarContent.svelte +70 -0
  244. package/dist/components/sidebar/SidebarContent.svelte.d.ts +13 -0
  245. package/dist/components/sidebar/SidebarFooter.svelte +33 -0
  246. package/dist/components/sidebar/SidebarFooter.svelte.d.ts +10 -0
  247. package/dist/components/sidebar/SidebarGroup.svelte +123 -0
  248. package/dist/components/sidebar/SidebarGroup.svelte.d.ts +19 -0
  249. package/dist/components/sidebar/SidebarHeader.svelte +39 -0
  250. package/dist/components/sidebar/SidebarHeader.svelte.d.ts +12 -0
  251. package/dist/components/sidebar/SidebarItem.svelte +236 -0
  252. package/dist/components/sidebar/SidebarItem.svelte.d.ts +27 -0
  253. package/dist/components/sidebar/index.d.ts +11 -0
  254. package/dist/components/sidebar/index.js +6 -0
  255. package/dist/components/skeleton/Skeleton.svelte +61 -0
  256. package/dist/components/skeleton/Skeleton.svelte.d.ts +13 -0
  257. package/dist/components/spinner/Spinner.svelte +57 -0
  258. package/dist/components/spinner/Spinner.svelte.d.ts +12 -0
  259. package/dist/components/stack/Stack.svelte +99 -0
  260. package/dist/components/stack/Stack.svelte.d.ts +19 -0
  261. package/dist/components/status-indicator/StatusIndicator.svelte +97 -0
  262. package/dist/components/status-indicator/StatusIndicator.svelte.d.ts +14 -0
  263. package/dist/components/suggestions/SuggestionsItem.svelte +104 -0
  264. package/dist/components/suggestions/SuggestionsItem.svelte.d.ts +14 -0
  265. package/dist/components/suggestions/SuggestionsRoot.svelte +80 -0
  266. package/dist/components/suggestions/SuggestionsRoot.svelte.d.ts +20 -0
  267. package/dist/components/suggestions/context.d.ts +7 -0
  268. package/dist/components/suggestions/context.js +8 -0
  269. package/dist/components/suggestions/index.d.ts +5 -0
  270. package/dist/components/suggestions/index.js +5 -0
  271. package/dist/components/switch/Switch.svelte +175 -0
  272. package/dist/components/switch/Switch.svelte.d.ts +17 -0
  273. package/dist/components/tabs/Tabs.svelte +170 -0
  274. package/dist/components/tabs/Tabs.svelte.d.ts +22 -0
  275. package/dist/components/text/Text.svelte +88 -0
  276. package/dist/components/text/Text.svelte.d.ts +20 -0
  277. package/dist/components/textarea/Textarea.svelte +64 -0
  278. package/dist/components/textarea/Textarea.svelte.d.ts +13 -0
  279. package/dist/components/theme/Theme.svelte +49 -0
  280. package/dist/components/theme/Theme.svelte.d.ts +25 -0
  281. package/dist/components/toast/Toaster.svelte +223 -0
  282. package/dist/components/toast/Toaster.svelte.d.ts +9 -0
  283. package/dist/components/toast/toasts.svelte.d.ts +55 -0
  284. package/dist/components/toast/toasts.svelte.js +66 -0
  285. package/dist/components/tool/ToolContent.svelte +51 -0
  286. package/dist/components/tool/ToolContent.svelte.d.ts +11 -0
  287. package/dist/components/tool/ToolInput.svelte +21 -0
  288. package/dist/components/tool/ToolInput.svelte.d.ts +14 -0
  289. package/dist/components/tool/ToolOutput.svelte +33 -0
  290. package/dist/components/tool/ToolOutput.svelte.d.ts +16 -0
  291. package/dist/components/tool/ToolRoot.svelte +94 -0
  292. package/dist/components/tool/ToolRoot.svelte.d.ts +23 -0
  293. package/dist/components/tool/ToolSection.svelte +102 -0
  294. package/dist/components/tool/ToolSection.svelte.d.ts +16 -0
  295. package/dist/components/tool/ToolTrigger.svelte +191 -0
  296. package/dist/components/tool/ToolTrigger.svelte.d.ts +14 -0
  297. package/dist/components/tool/context.d.ts +18 -0
  298. package/dist/components/tool/context.js +11 -0
  299. package/dist/components/tool/index.d.ts +12 -0
  300. package/dist/components/tool/index.js +8 -0
  301. package/dist/components/tooltip/TooltipContent.svelte +76 -0
  302. package/dist/components/tooltip/TooltipContent.svelte.d.ts +12 -0
  303. package/dist/components/tooltip/TooltipRoot.svelte +37 -0
  304. package/dist/components/tooltip/TooltipRoot.svelte.d.ts +10 -0
  305. package/dist/components/tooltip/TooltipTrigger.svelte +25 -0
  306. package/dist/components/tooltip/TooltipTrigger.svelte.d.ts +5 -0
  307. package/dist/components/tooltip/index.d.ts +13 -0
  308. package/dist/components/tooltip/index.js +10 -0
  309. package/dist/components/tooltip/intent.d.ts +2 -0
  310. package/dist/components/tooltip/intent.js +29 -0
  311. package/dist/components/work-fold/WorkFold.svelte +100 -0
  312. package/dist/components/work-fold/WorkFold.svelte.d.ts +15 -0
  313. package/dist/index.d.ts +127 -0
  314. package/dist/index.js +93 -0
  315. package/dist/internal/Chevron.svelte +28 -0
  316. package/dist/internal/Chevron.svelte.d.ts +7 -0
  317. package/dist/internal/Code.svelte +70 -0
  318. package/dist/internal/Code.svelte.d.ts +10 -0
  319. package/dist/internal/Collapse.svelte +57 -0
  320. package/dist/internal/Collapse.svelte.d.ts +12 -0
  321. package/dist/internal/Glyph.svelte +89 -0
  322. package/dist/internal/Glyph.svelte.d.ts +37 -0
  323. package/dist/internal/Tile.svelte +86 -0
  324. package/dist/internal/Tile.svelte.d.ts +15 -0
  325. package/dist/internal/control.d.ts +58 -0
  326. package/dist/internal/control.js +74 -0
  327. package/dist/internal/disclosure.d.ts +7 -0
  328. package/dist/internal/disclosure.js +1 -0
  329. package/dist/internal/json.d.ts +13 -0
  330. package/dist/internal/json.js +51 -0
  331. package/dist/internal/kinds.d.ts +9 -0
  332. package/dist/internal/kinds.js +25 -0
  333. package/dist/internal/layer.d.ts +103 -0
  334. package/dist/internal/layer.js +129 -0
  335. package/dist/internal/loop.d.ts +35 -0
  336. package/dist/internal/loop.js +72 -0
  337. package/dist/internal/markers.stylex.d.ts +14 -0
  338. package/dist/internal/markers.stylex.js +10 -0
  339. package/dist/internal/roving.d.ts +17 -0
  340. package/dist/internal/roving.js +68 -0
  341. package/dist/internal/shared.d.ts +36 -0
  342. package/dist/internal/shared.js +44 -0
  343. package/dist/internal/sx.d.ts +14 -0
  344. package/dist/internal/sx.js +11 -0
  345. package/dist/preset.d.ts +102 -0
  346. package/dist/preset.js +334 -0
  347. package/dist/tokens.stylex.d.ts +104 -0
  348. package/dist/tokens.stylex.js +125 -0
  349. package/dist/vite.d.ts +16 -0
  350. package/dist/vite.js +58 -0
  351. package/package.json +123 -5
@@ -0,0 +1,11 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { HTMLAttributes } from 'svelte/elements';
3
+ import { type Sx } from '../../internal/sx.js';
4
+ export type CommandFooterProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
5
+ sx?: Sx;
6
+ /** Hints for the keys, such as "↑↓ to move". */
7
+ children?: Snippet;
8
+ };
9
+ declare const CommandFooter: import("svelte").Component<CommandFooterProps, {}, "">;
10
+ type CommandFooter = ReturnType<typeof CommandFooter>;
11
+ export default CommandFooter;
@@ -0,0 +1,25 @@
1
+ <script lang="ts" module>
2
+ import { Command } from 'bits-ui';
3
+ import * as stylex from '@stylexjs/stylex';
4
+ import type { Snippet } from 'svelte';
5
+ import { layer } from '../../internal/layer.js';
6
+ import type { Sx } from '../../internal/sx.js';
7
+
8
+ export type CommandGroupProps = Omit<Command.GroupProps, 'children' | 'child'> & {
9
+ /** The group's name, shown above its items. */
10
+ heading?: string;
11
+ sx?: Sx;
12
+ children?: Snippet;
13
+ };
14
+ </script>
15
+
16
+ <script lang="ts">
17
+ let { heading, sx, children, ...rest }: CommandGroupProps = $props();
18
+ </script>
19
+
20
+ <Command.Group data-slot="command-group" {...rest} {...stylex.attrs(sx)}>
21
+ {#if heading}
22
+ <Command.GroupHeading {...stylex.attrs(layer.heading)}>{heading}</Command.GroupHeading>
23
+ {/if}
24
+ <Command.GroupItems>{@render children?.()}</Command.GroupItems>
25
+ </Command.Group>
@@ -0,0 +1,12 @@
1
+ import { Command } from 'bits-ui';
2
+ import type { Snippet } from 'svelte';
3
+ import type { Sx } from '../../internal/sx.js';
4
+ export type CommandGroupProps = Omit<Command.GroupProps, 'children' | 'child'> & {
5
+ /** The group's name, shown above its items. */
6
+ heading?: string;
7
+ sx?: Sx;
8
+ children?: Snippet;
9
+ };
10
+ declare const CommandGroup: import("svelte").Component<CommandGroupProps, {}, "">;
11
+ type CommandGroup = ReturnType<typeof CommandGroup>;
12
+ export default CommandGroup;
@@ -0,0 +1,33 @@
1
+ <script lang="ts" module>
2
+ import { Command } from 'bits-ui';
3
+ import * as stylex from '@stylexjs/stylex';
4
+ import Glyph from '../../internal/Glyph.svelte';
5
+ import { attrs, type Sx } from '../../internal/sx.js';
6
+ import { command } from './styles.js';
7
+
8
+ export type CommandInputProps = Omit<Command.InputProps, 'child'> & { sx?: Sx };
9
+ </script>
10
+
11
+ <script lang="ts">
12
+ let {
13
+ value = $bindable(''),
14
+ placeholder = 'Search for a command…',
15
+ sx,
16
+ class: className,
17
+ ...rest
18
+ }: CommandInputProps = $props();
19
+ </script>
20
+
21
+ <!-- Focus stays here while the arrow keys move through the list -->
22
+ <div {...stylex.attrs(command.search)}>
23
+ <Glyph name="search" />
24
+ <Command.Input
25
+ bind:value
26
+ {placeholder}
27
+ autocomplete="off"
28
+ spellcheck={false}
29
+ data-slot="command-input"
30
+ {...rest}
31
+ {...attrs([command.input, sx], className)}
32
+ />
33
+ </div>
@@ -0,0 +1,8 @@
1
+ import { Command } from 'bits-ui';
2
+ import { type Sx } from '../../internal/sx.js';
3
+ export type CommandInputProps = Omit<Command.InputProps, 'child'> & {
4
+ sx?: Sx;
5
+ };
6
+ declare const CommandInput: import("svelte").Component<CommandInputProps, {}, "value">;
7
+ type CommandInput = ReturnType<typeof CommandInput>;
8
+ export default CommandInput;
@@ -0,0 +1,49 @@
1
+ <script lang="ts" module>
2
+ import { Command } from 'bits-ui';
3
+ import * as stylex from '@stylexjs/stylex';
4
+ import type { Snippet } from 'svelte';
5
+ import { layer } from '../../internal/layer.js';
6
+ import { attrs, type Sx } from '../../internal/sx.js';
7
+ import Kbd from '../kbd/Kbd.svelte';
8
+ import { command } from './styles.js';
9
+
10
+ export type CommandItemProps = Omit<Command.ItemProps, 'children' | 'child'> & {
11
+ /** A 16px icon before the label. */
12
+ icon?: Snippet;
13
+ /** A quieter note after the label, such as where a thread lives. */
14
+ detail?: string;
15
+ /** The keys that do the same from anywhere, such as "⌘N". */
16
+ shortcut?: string;
17
+ sx?: Sx;
18
+ children?: Snippet;
19
+ };
20
+ </script>
21
+
22
+ <script lang="ts">
23
+ let {
24
+ icon,
25
+ detail,
26
+ shortcut,
27
+ sx,
28
+ class: className,
29
+ children,
30
+ ...rest
31
+ }: CommandItemProps = $props();
32
+ </script>
33
+
34
+ <Command.Item data-slot="command-item" {...rest} {...attrs([command.item, sx], className)}>
35
+ {#snippet child({ props })}
36
+ <div {...props}>
37
+ {#if icon}<span {...stylex.attrs(layer.icon)}>{@render icon()}</span>{/if}
38
+ <span {...stylex.attrs(layer.label)}>
39
+ {@render children?.()}
40
+ {#if detail}<span {...stylex.attrs(command.detail)}>&nbsp;· {detail}</span>{/if}
41
+ </span>
42
+ <span {...stylex.attrs(layer.trailing)}>
43
+ {#if shortcut}{shortcut}{/if}
44
+ <!-- Enter is the way to choose, shown only on the highlighted row -->
45
+ {#if props['data-selected'] !== undefined}<Kbd>↵</Kbd>{/if}
46
+ </span>
47
+ </div>
48
+ {/snippet}
49
+ </Command.Item>
@@ -0,0 +1,16 @@
1
+ import { Command } from 'bits-ui';
2
+ import type { Snippet } from 'svelte';
3
+ import { type Sx } from '../../internal/sx.js';
4
+ export type CommandItemProps = Omit<Command.ItemProps, 'children' | 'child'> & {
5
+ /** A 16px icon before the label. */
6
+ icon?: Snippet;
7
+ /** A quieter note after the label, such as where a thread lives. */
8
+ detail?: string;
9
+ /** The keys that do the same from anywhere, such as "⌘N". */
10
+ shortcut?: string;
11
+ sx?: Sx;
12
+ children?: Snippet;
13
+ };
14
+ declare const CommandItem: import("svelte").Component<CommandItemProps, {}, "">;
15
+ type CommandItem = ReturnType<typeof CommandItem>;
16
+ export default CommandItem;
@@ -0,0 +1,21 @@
1
+ <script lang="ts" module>
2
+ import { Command } from 'bits-ui';
3
+ import type { Snippet } from 'svelte';
4
+ import { attrs, type Sx } from '../../internal/sx.js';
5
+ import { command } from './styles.js';
6
+
7
+ export type CommandListProps = Omit<Command.ListProps, 'children' | 'child'> & {
8
+ sx?: Sx;
9
+ children?: Snippet;
10
+ };
11
+ </script>
12
+
13
+ <script lang="ts">
14
+ let { sx, class: className, children, ...rest }: CommandListProps = $props();
15
+ </script>
16
+
17
+ <Command.List data-slot="command-list" {...rest} {...attrs([command.list, sx], className)}>
18
+ <Command.Viewport>
19
+ {@render children?.()}
20
+ </Command.Viewport>
21
+ </Command.List>
@@ -0,0 +1,10 @@
1
+ import { Command } from 'bits-ui';
2
+ import type { Snippet } from 'svelte';
3
+ import { type Sx } from '../../internal/sx.js';
4
+ export type CommandListProps = Omit<Command.ListProps, 'children' | 'child'> & {
5
+ sx?: Sx;
6
+ children?: Snippet;
7
+ };
8
+ declare const CommandList: import("svelte").Component<CommandListProps, {}, "">;
9
+ type CommandList = ReturnType<typeof CommandList>;
10
+ export default CommandList;
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import { Command } from 'bits-ui';
3
+ import type { Snippet } from 'svelte';
4
+ import { attrs, type Sx } from '../../internal/sx.js';
5
+ import { command } from './styles.js';
6
+
7
+ export type CommandRootProps = Omit<Command.RootProps, 'children' | 'child'> & {
8
+ sx?: Sx;
9
+ /** A Command.Input, a Command.List and, if you like, a Command.Footer. */
10
+ children?: Snippet;
11
+ };
12
+ </script>
13
+
14
+ <script lang="ts">
15
+ let { loop = true, sx, class: className, children, ...rest }: CommandRootProps = $props();
16
+ </script>
17
+
18
+ <Command.Root {loop} data-slot="command" {...rest} {...attrs([command.root, sx], className)}>
19
+ {@render children?.()}
20
+ </Command.Root>
@@ -0,0 +1,11 @@
1
+ import { Command } from 'bits-ui';
2
+ import type { Snippet } from 'svelte';
3
+ import { type Sx } from '../../internal/sx.js';
4
+ export type CommandRootProps = Omit<Command.RootProps, 'children' | 'child'> & {
5
+ sx?: Sx;
6
+ /** A Command.Input, a Command.List and, if you like, a Command.Footer. */
7
+ children?: Snippet;
8
+ };
9
+ declare const CommandRoot: import("svelte").Component<CommandRootProps, {}, "">;
10
+ type CommandRoot = ReturnType<typeof CommandRoot>;
11
+ export default CommandRoot;
@@ -0,0 +1,20 @@
1
+ import { Command } from 'bits-ui';
2
+ import Dialog from './CommandDialog.svelte';
3
+ import Empty from './CommandEmpty.svelte';
4
+ import Footer from './CommandFooter.svelte';
5
+ import Group from './CommandGroup.svelte';
6
+ import Input from './CommandInput.svelte';
7
+ import Item from './CommandItem.svelte';
8
+ import List from './CommandList.svelte';
9
+ import Root from './CommandRoot.svelte';
10
+ declare const Separator: import("svelte").Component<Command.SeparatorProps, {}, "ref">;
11
+ declare const Loading: import("svelte").Component<Command.LoadingProps, {}, "ref">;
12
+ export { Dialog, Root, Input, List, Group, Item, Empty, Separator, Loading, Footer };
13
+ export type { CommandDialogProps } from './CommandDialog.svelte';
14
+ export type { CommandEmptyProps } from './CommandEmpty.svelte';
15
+ export type { CommandFooterProps } from './CommandFooter.svelte';
16
+ export type { CommandGroupProps } from './CommandGroup.svelte';
17
+ export type { CommandInputProps } from './CommandInput.svelte';
18
+ export type { CommandItemProps } from './CommandItem.svelte';
19
+ export type { CommandListProps } from './CommandList.svelte';
20
+ export type { CommandRootProps } from './CommandRoot.svelte';
@@ -0,0 +1,12 @@
1
+ import { Command } from 'bits-ui';
2
+ import Dialog from './CommandDialog.svelte';
3
+ import Empty from './CommandEmpty.svelte';
4
+ import Footer from './CommandFooter.svelte';
5
+ import Group from './CommandGroup.svelte';
6
+ import Input from './CommandInput.svelte';
7
+ import Item from './CommandItem.svelte';
8
+ import List from './CommandList.svelte';
9
+ import Root from './CommandRoot.svelte';
10
+ const Separator = Command.Separator;
11
+ const Loading = Command.Loading;
12
+ export { Dialog, Root, Input, List, Group, Item, Empty, Separator, Loading, Footer };
@@ -0,0 +1,117 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ export declare const command: Readonly<{
3
+ readonly root: Readonly<{
4
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
5
+ readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
6
+ readonly minHeight: stylex.StyleXClassNameFor<"minHeight", 0>;
7
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
8
+ readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", string>;
9
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
10
+ }>;
11
+ readonly search: Readonly<{
12
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
13
+ readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
14
+ readonly gap: stylex.StyleXClassNameFor<"gap", "0.625rem">;
15
+ readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
16
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
17
+ readonly borderBottomWidth: stylex.StyleXClassNameFor<"borderBottomWidth", "1px">;
18
+ readonly borderBottomStyle: stylex.StyleXClassNameFor<"borderBottomStyle", "solid">;
19
+ readonly borderBottomColor: stylex.StyleXClassNameFor<"borderBottomColor", string>;
20
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
21
+ }>;
22
+ readonly input: Readonly<{
23
+ readonly flexGrow: stylex.StyleXClassNameFor<"flexGrow", 1>;
24
+ readonly minWidth: stylex.StyleXClassNameFor<"minWidth", 0>;
25
+ readonly height: stylex.StyleXClassNameFor<"height", "3rem">;
26
+ readonly margin: stylex.StyleXClassNameFor<"margin", 0>;
27
+ readonly padding: stylex.StyleXClassNameFor<"padding", 0>;
28
+ readonly borderWidth: stylex.StyleXClassNameFor<"borderWidth", 0>;
29
+ readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "transparent">;
30
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
31
+ readonly fontFamily: stylex.StyleXClassNameFor<"fontFamily", "inherit">;
32
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
33
+ readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "none">;
34
+ readonly '::placeholder': stylex.StyleXClassNameFor<"::placeholder", {
35
+ readonly color: stylex.StyleXVar<string>;
36
+ readonly opacity: 1;
37
+ }>;
38
+ }>;
39
+ readonly list: Readonly<{
40
+ readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "min(24rem, 60dvh)">;
41
+ readonly overflowY: stylex.StyleXClassNameFor<"overflowY", "auto">;
42
+ readonly overscrollBehavior: stylex.StyleXClassNameFor<"overscrollBehavior", "contain">;
43
+ readonly padding: stylex.StyleXClassNameFor<"padding", "0.375rem">;
44
+ readonly scrollbarWidth: stylex.StyleXClassNameFor<"scrollbarWidth", "thin">;
45
+ readonly scrollPaddingBlock: stylex.StyleXClassNameFor<"scrollPaddingBlock", "0.375rem">;
46
+ }>;
47
+ readonly item: Readonly<{
48
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
49
+ readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
50
+ readonly gap: stylex.StyleXClassNameFor<"gap", "0.625rem">;
51
+ readonly minHeight: stylex.StyleXClassNameFor<"minHeight", "2.375rem">;
52
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", "0.625rem">;
53
+ readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
54
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
55
+ readonly cursor: stylex.StyleXClassNameFor<"cursor", "default">;
56
+ readonly userSelect: stylex.StyleXClassNameFor<"userSelect", "none">;
57
+ readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
58
+ readonly forcedColorAdjust: stylex.StyleXClassNameFor<"forcedColorAdjust", "none">;
59
+ }>;
60
+ readonly detail: Readonly<{
61
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
62
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
63
+ readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
64
+ readonly textOverflow: stylex.StyleXClassNameFor<"textOverflow", "ellipsis">;
65
+ readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
66
+ }>;
67
+ readonly empty: Readonly<{
68
+ readonly paddingBlock: stylex.StyleXClassNameFor<"paddingBlock", string>;
69
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
70
+ readonly textAlign: stylex.StyleXClassNameFor<"textAlign", "center">;
71
+ }>;
72
+ readonly footer: Readonly<{
73
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
74
+ readonly alignItems: stylex.StyleXClassNameFor<"alignItems", "center">;
75
+ readonly gap: stylex.StyleXClassNameFor<"gap", string>;
76
+ readonly flexShrink: stylex.StyleXClassNameFor<"flexShrink", 0>;
77
+ readonly minHeight: stylex.StyleXClassNameFor<"minHeight", "2.5rem">;
78
+ readonly paddingInline: stylex.StyleXClassNameFor<"paddingInline", string>;
79
+ readonly borderTopWidth: stylex.StyleXClassNameFor<"borderTopWidth", "1px">;
80
+ readonly borderTopStyle: stylex.StyleXClassNameFor<"borderTopStyle", "solid">;
81
+ readonly borderTopColor: stylex.StyleXClassNameFor<"borderTopColor", string>;
82
+ readonly color: stylex.StyleXClassNameFor<"color", string>;
83
+ readonly fontSize: stylex.StyleXClassNameFor<"fontSize", string>;
84
+ }>;
85
+ readonly dialog: Readonly<{
86
+ readonly position: stylex.StyleXClassNameFor<"position", "fixed">;
87
+ readonly insetInline: stylex.StyleXClassNameFor<"insetInline", 0>;
88
+ readonly top: stylex.StyleXClassNameFor<"top", "min(14vh, 8rem)">;
89
+ readonly zIndex: stylex.StyleXClassNameFor<"zIndex", 51>;
90
+ readonly display: stylex.StyleXClassNameFor<"display", "flex">;
91
+ readonly flexDirection: stylex.StyleXClassNameFor<"flexDirection", "column">;
92
+ readonly width: stylex.StyleXClassNameFor<"width", "min(38rem, calc(100vw - 2rem))">;
93
+ readonly maxHeight: stylex.StyleXClassNameFor<"maxHeight", "calc(100dvh - min(14vh, 8rem) - 2rem)">;
94
+ readonly marginInline: stylex.StyleXClassNameFor<"marginInline", "auto">;
95
+ readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
96
+ readonly borderRadius: stylex.StyleXClassNameFor<"borderRadius", string>;
97
+ readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", string>;
98
+ readonly boxShadow: stylex.StyleXClassNameFor<"boxShadow", `inset 0 0 0 1px ${stylex.StyleXVar<string>}, inset 0 1px 0 ${stylex.StyleXVar<string>}, 0 32px 80px -16px rgb(0 0 0 / 0.55)`>;
99
+ readonly outlineStyle: stylex.StyleXClassNameFor<"outlineStyle", "solid">;
100
+ readonly outlineWidth: stylex.StyleXClassNameFor<"outlineWidth", 0 | "1px">;
101
+ readonly outlineColor: stylex.StyleXClassNameFor<"outlineColor", "CanvasText">;
102
+ }>;
103
+ readonly overlay: Readonly<{
104
+ readonly position: stylex.StyleXClassNameFor<"position", "fixed">;
105
+ readonly inset: stylex.StyleXClassNameFor<"inset", 0>;
106
+ readonly zIndex: stylex.StyleXClassNameFor<"zIndex", 50>;
107
+ readonly backgroundColor: stylex.StyleXClassNameFor<"backgroundColor", "light-dark(rgb(20 23 28 / 0.2), rgb(0 0 0 / 0.45))">;
108
+ }>;
109
+ readonly hidden: Readonly<{
110
+ readonly position: stylex.StyleXClassNameFor<"position", "absolute">;
111
+ readonly width: stylex.StyleXClassNameFor<"width", "1px">;
112
+ readonly height: stylex.StyleXClassNameFor<"height", "1px">;
113
+ readonly overflow: stylex.StyleXClassNameFor<"overflow", "hidden">;
114
+ readonly clipPath: stylex.StyleXClassNameFor<"clipPath", "inset(50%)">;
115
+ readonly whiteSpace: stylex.StyleXClassNameFor<"whiteSpace", "nowrap">;
116
+ }>;
117
+ }>;
@@ -0,0 +1,121 @@
1
+ import * as stylex from '@stylexjs/stylex';
2
+ import { colors, font, radius, space } from '../../tokens.stylex.js';
3
+ const SELECTED = ':is([data-selected])';
4
+ const FORCED = '@media (forced-colors: active)';
5
+ export const command = stylex.create({
6
+ root: {
7
+ display: 'flex',
8
+ flexDirection: 'column',
9
+ minHeight: 0,
10
+ color: colors.text,
11
+ fontFamily: font.body,
12
+ fontSize: font.sizeMd
13
+ },
14
+ search: {
15
+ display: 'flex',
16
+ alignItems: 'center',
17
+ gap: '0.625rem',
18
+ flexShrink: 0,
19
+ paddingInline: space.x4,
20
+ borderBottomWidth: '1px',
21
+ borderBottomStyle: 'solid',
22
+ borderBottomColor: colors.line,
23
+ color: colors.textSubtle
24
+ },
25
+ input: {
26
+ flexGrow: 1,
27
+ minWidth: 0,
28
+ height: '3rem',
29
+ margin: 0,
30
+ padding: 0,
31
+ borderWidth: 0,
32
+ backgroundColor: 'transparent',
33
+ color: colors.text,
34
+ fontFamily: 'inherit',
35
+ fontSize: font.sizeLg,
36
+ outlineStyle: 'none',
37
+ '::placeholder': { color: colors.textSubtle, opacity: 1 }
38
+ },
39
+ list: {
40
+ maxHeight: 'min(24rem, 60dvh)',
41
+ overflowY: 'auto',
42
+ overscrollBehavior: 'contain',
43
+ padding: '0.375rem',
44
+ scrollbarWidth: 'thin',
45
+ scrollPaddingBlock: '0.375rem'
46
+ },
47
+ item: {
48
+ display: 'flex',
49
+ alignItems: 'center',
50
+ gap: '0.625rem',
51
+ minHeight: '2.375rem',
52
+ paddingInline: '0.625rem',
53
+ borderRadius: radius.md,
54
+ color: colors.text,
55
+ cursor: 'default',
56
+ userSelect: 'none',
57
+ backgroundColor: {
58
+ default: 'transparent',
59
+ [SELECTED]: { default: colors.hover, [FORCED]: 'Highlight' }
60
+ },
61
+ forcedColorAdjust: 'none'
62
+ },
63
+ detail: {
64
+ color: colors.textSubtle,
65
+ fontSize: font.sizeSm,
66
+ overflow: 'hidden',
67
+ textOverflow: 'ellipsis',
68
+ whiteSpace: 'nowrap'
69
+ },
70
+ empty: {
71
+ paddingBlock: space.x8,
72
+ color: colors.textMuted,
73
+ textAlign: 'center'
74
+ },
75
+ footer: {
76
+ display: 'flex',
77
+ alignItems: 'center',
78
+ gap: space.x4,
79
+ flexShrink: 0,
80
+ minHeight: '2.5rem',
81
+ paddingInline: space.x4,
82
+ borderTopWidth: '1px',
83
+ borderTopStyle: 'solid',
84
+ borderTopColor: colors.line,
85
+ color: colors.textSubtle,
86
+ fontSize: font.sizeXs
87
+ },
88
+ // The palette is opened many times a day, so it opens and closes at once
89
+ dialog: {
90
+ position: 'fixed',
91
+ insetInline: 0,
92
+ top: 'min(14vh, 8rem)',
93
+ zIndex: 51,
94
+ display: 'flex',
95
+ flexDirection: 'column',
96
+ width: 'min(38rem, calc(100vw - 2rem))',
97
+ maxHeight: 'calc(100dvh - min(14vh, 8rem) - 2rem)',
98
+ marginInline: 'auto',
99
+ overflow: 'hidden',
100
+ borderRadius: radius.frame,
101
+ backgroundColor: colors.bgRaised,
102
+ boxShadow: `inset 0 0 0 1px ${colors.lineStrong}, inset 0 1px 0 ${colors.highlight}, 0 32px 80px -16px rgb(0 0 0 / 0.55)`,
103
+ outlineStyle: 'solid',
104
+ outlineWidth: { default: 0, [FORCED]: '1px' },
105
+ outlineColor: 'CanvasText'
106
+ },
107
+ overlay: {
108
+ position: 'fixed',
109
+ inset: 0,
110
+ zIndex: 50,
111
+ backgroundColor: 'light-dark(rgb(20 23 28 / 0.2), rgb(0 0 0 / 0.45))'
112
+ },
113
+ hidden: {
114
+ position: 'absolute',
115
+ width: '1px',
116
+ height: '1px',
117
+ overflow: 'hidden',
118
+ clipPath: 'inset(50%)',
119
+ whiteSpace: 'nowrap'
120
+ }
121
+ });
@@ -0,0 +1,55 @@
1
+ <script lang="ts" module>
2
+ import * as stylex from '@stylexjs/stylex';
3
+ import type { Snippet } from 'svelte';
4
+ import Glyph from '../../internal/Glyph.svelte';
5
+ import type { Sx } from '../../internal/sx.js';
6
+ import { radius } from '../../tokens.stylex.js';
7
+ import Button, { type ButtonProps } from '../button/Button.svelte';
8
+ import { useComposer } from './context.js';
9
+
10
+ export type ComposerAttachButtonProps = Omit<
11
+ ButtonProps,
12
+ 'children' | 'variant' | 'size' | 'iconOnly' | 'href' | 'ref' | 'sx' | 'onclick'
13
+ > & {
14
+ /** Accessible name. */
15
+ label?: string;
16
+ onclick?: (event: MouseEvent) => void;
17
+ sx?: Sx;
18
+ /** An icon of your own, in place of the paperclip. */
19
+ children?: Snippet;
20
+ };
21
+
22
+ const styles = stylex.create({
23
+ button: { borderRadius: `calc(${radius.xl} * 4 / 3)` }
24
+ });
25
+ </script>
26
+
27
+ <script lang="ts">
28
+ let {
29
+ label = 'Attach files',
30
+ disabled,
31
+ onclick,
32
+ sx,
33
+ children,
34
+ ...rest
35
+ }: ComposerAttachButtonProps = $props();
36
+
37
+ const composer = useComposer('AttachButton');
38
+ </script>
39
+
40
+ <Button
41
+ variant="ghost"
42
+ size="sm"
43
+ iconOnly
44
+ aria-label={label}
45
+ disabled={disabled ?? composer.disabled}
46
+ data-slot="composer-attach"
47
+ {...rest}
48
+ sx={[styles.button, sx]}
49
+ onclick={(event: MouseEvent) => {
50
+ onclick?.(event);
51
+ if (!event.defaultPrevented) composer.browse();
52
+ }}
53
+ >
54
+ {#if children}{@render children()}{:else}<Glyph name="paperclip" />{/if}
55
+ </Button>
@@ -0,0 +1,14 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { Sx } from '../../internal/sx.js';
3
+ import { type ButtonProps } from '../button/Button.svelte';
4
+ export type ComposerAttachButtonProps = Omit<ButtonProps, 'children' | 'variant' | 'size' | 'iconOnly' | 'href' | 'ref' | 'sx' | 'onclick'> & {
5
+ /** Accessible name. */
6
+ label?: string;
7
+ onclick?: (event: MouseEvent) => void;
8
+ sx?: Sx;
9
+ /** An icon of your own, in place of the paperclip. */
10
+ children?: Snippet;
11
+ };
12
+ declare const ComposerAttachButton: import("svelte").Component<ComposerAttachButtonProps, {}, "">;
13
+ type ComposerAttachButton = ReturnType<typeof ComposerAttachButton>;
14
+ export default ComposerAttachButton;