@devalok/shilp-sutra 0.53.0 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (429) hide show
  1. package/AGENTS.md +7 -1
  2. package/BREAKING.json +29 -0
  3. package/MIGRATION.md +83 -0
  4. package/dist/_chunks/badge-group.js +1 -1
  5. package/dist/_chunks/popover.js +38 -37
  6. package/dist/_chunks/popover.js.map +1 -1
  7. package/dist/_chunks/primitives/react-accordion.js +270 -0
  8. package/dist/_chunks/primitives/react-accordion.js.map +1 -0
  9. package/dist/_chunks/primitives/react-alert-dialog.js +857 -0
  10. package/dist/_chunks/primitives/react-alert-dialog.js.map +1 -0
  11. package/dist/_chunks/primitives/react-aspect-ratio.js +32 -0
  12. package/dist/_chunks/primitives/react-aspect-ratio.js.map +1 -0
  13. package/dist/_chunks/primitives/react-avatar.js +69 -0
  14. package/dist/_chunks/primitives/react-avatar.js.map +1 -0
  15. package/dist/_chunks/primitives/react-checkbox.js +151 -0
  16. package/dist/_chunks/primitives/react-checkbox.js.map +1 -0
  17. package/dist/_chunks/primitives/react-context-menu.js +905 -0
  18. package/dist/_chunks/primitives/react-context-menu.js.map +1 -0
  19. package/dist/_chunks/primitives/react-dropdown-menu.js +220 -0
  20. package/dist/_chunks/primitives/react-dropdown-menu.js.map +1 -0
  21. package/dist/_chunks/primitives/react-hover-card.js +153 -0
  22. package/dist/_chunks/primitives/react-hover-card.js.map +1 -0
  23. package/dist/_chunks/primitives/react-label.js +16 -0
  24. package/dist/_chunks/primitives/react-label.js.map +1 -0
  25. package/dist/_chunks/primitives/react-menubar.js +304 -0
  26. package/dist/_chunks/primitives/react-menubar.js.map +1 -0
  27. package/dist/_chunks/primitives/react-navigation-menu.js +560 -0
  28. package/dist/_chunks/primitives/react-navigation-menu.js.map +1 -0
  29. package/dist/_chunks/primitives/react-popover.js +186 -0
  30. package/dist/_chunks/primitives/react-popover.js.map +1 -0
  31. package/dist/_chunks/primitives/react-progress.js +70 -0
  32. package/dist/_chunks/primitives/react-progress.js.map +1 -0
  33. package/dist/_chunks/primitives/react-radio-group.js +170 -0
  34. package/dist/_chunks/primitives/react-radio-group.js.map +1 -0
  35. package/dist/_chunks/primitives/react-select.js +671 -0
  36. package/dist/_chunks/primitives/react-select.js.map +1 -0
  37. package/dist/_chunks/primitives/react-separator.js +24 -0
  38. package/dist/_chunks/primitives/react-separator.js.map +1 -0
  39. package/dist/_chunks/primitives/react-slider.js +349 -0
  40. package/dist/_chunks/primitives/react-slider.js.map +1 -0
  41. package/dist/_chunks/primitives/react-switch.js +92 -0
  42. package/dist/_chunks/primitives/react-switch.js.map +1 -0
  43. package/dist/_chunks/primitives/react-tabs.js +114 -0
  44. package/dist/_chunks/primitives/react-tabs.js.map +1 -0
  45. package/dist/_chunks/primitives/react-toggle-group.js +122 -0
  46. package/dist/_chunks/primitives/react-toggle-group.js.map +1 -0
  47. package/dist/_chunks/primitives/react-toggle.js +28 -0
  48. package/dist/_chunks/primitives/react-toggle.js.map +1 -0
  49. package/dist/_chunks/primitives/react-tooltip.js +341 -0
  50. package/dist/_chunks/primitives/react-tooltip.js.map +1 -0
  51. package/dist/_chunks/primitives-internal.js +2071 -0
  52. package/dist/_chunks/primitives-internal.js.map +1 -0
  53. package/dist/_chunks/shared.js +32 -32
  54. package/dist/_chunks/tiptap.js +1 -1
  55. package/dist/ai/ai-command-provider.d.ts +2 -3
  56. package/dist/ai/block-renderer.d.ts +1 -2
  57. package/dist/ai/blocks/block-shell.d.ts +0 -1
  58. package/dist/ai/blocks/block-table.d.ts +1 -2
  59. package/dist/ai/blocks/confirm.d.ts +1 -2
  60. package/dist/ai/blocks/divider.d.ts +1 -2
  61. package/dist/ai/blocks/error.d.ts +1 -2
  62. package/dist/ai/blocks/index.d.ts +7 -8
  63. package/dist/ai/blocks/info.d.ts +1 -2
  64. package/dist/ai/blocks/loading.d.ts +1 -2
  65. package/dist/ai/blocks/stat-row.d.ts +1 -2
  66. package/dist/ai/blocks/success.d.ts +1 -2
  67. package/dist/ai/blocks/text.d.ts +1 -2
  68. package/dist/ai/command-bar.d.ts +1 -2
  69. package/dist/ai/conversation.d.ts +2 -3
  70. package/dist/ai/devadoot-icon.d.ts +0 -1
  71. package/dist/ai/index.d.ts +16 -17
  72. package/dist/ai/types.js +1 -0
  73. package/dist/composed/activity-feed.d.ts +1 -2
  74. package/dist/composed/avatar-group.d.ts +11 -10
  75. package/dist/composed/avatar-group.d.ts.map +1 -1
  76. package/dist/composed/avatar-group.js +108 -140
  77. package/dist/composed/avatar-group.js.map +1 -1
  78. package/dist/composed/bulk-action-bar.d.ts +20 -13
  79. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  80. package/dist/composed/bulk-action-bar.js +81 -110
  81. package/dist/composed/bulk-action-bar.js.map +1 -1
  82. package/dist/composed/command-palette.d.ts +1 -2
  83. package/dist/composed/confirm-dialog.d.ts +0 -1
  84. package/dist/composed/date-picker/calendar-grid.d.ts +0 -1
  85. package/dist/composed/date-picker/date-picker.d.ts +0 -1
  86. package/dist/composed/date-picker/date-range-picker.d.ts +1 -2
  87. package/dist/composed/date-picker/date-time-picker.d.ts +0 -1
  88. package/dist/composed/date-picker/index.d.ts +17 -18
  89. package/dist/composed/date-picker/month-picker.d.ts +0 -1
  90. package/dist/composed/date-picker/presets.d.ts +0 -1
  91. package/dist/composed/date-picker/time-picker.d.ts +0 -1
  92. package/dist/composed/date-picker/use-calendar.d.ts +0 -1
  93. package/dist/composed/date-picker/year-picker.d.ts +0 -1
  94. package/dist/composed/deadline-indicator.d.ts +0 -1
  95. package/dist/composed/diff.d.ts +0 -1
  96. package/dist/composed/emoji-picker.d.ts +0 -1
  97. package/dist/composed/empty-state.d.ts +1 -2
  98. package/dist/composed/error-boundary.d.ts +15 -4
  99. package/dist/composed/error-boundary.d.ts.map +1 -1
  100. package/dist/composed/error-boundary.js +43 -26
  101. package/dist/composed/error-boundary.js.map +1 -1
  102. package/dist/composed/extensions/emoji-data.d.ts +0 -1
  103. package/dist/composed/extensions/emoji-node.d.ts +0 -1
  104. package/dist/composed/extensions/emoji-suggestion.d.ts +1 -2
  105. package/dist/composed/extensions/file-attachment.d.ts +0 -1
  106. package/dist/composed/extensions/mention-suggestion.d.ts +1 -2
  107. package/dist/composed/extensions/slash-command.d.ts +0 -1
  108. package/dist/composed/file-preview/audio-preview.d.ts +0 -1
  109. package/dist/composed/file-preview/document-preview.d.ts +0 -1
  110. package/dist/composed/file-preview/embed-preview.d.ts +0 -1
  111. package/dist/composed/file-preview/image-preview.d.ts +0 -1
  112. package/dist/composed/file-preview/shared.d.ts +0 -1
  113. package/dist/composed/file-preview/video-preview.d.ts +0 -1
  114. package/dist/composed/file-preview.d.ts +0 -1
  115. package/dist/composed/filter-bar.d.ts +0 -1
  116. package/dist/composed/form-section.d.ts +0 -1
  117. package/dist/composed/global-loading.d.ts +0 -1
  118. package/dist/composed/index.d.ts +49 -50
  119. package/dist/composed/inline-edit.d.ts +0 -1
  120. package/dist/composed/loading-skeleton.d.ts +2 -0
  121. package/dist/composed/loading-skeleton.d.ts.map +1 -1
  122. package/dist/composed/loading-skeleton.js +79 -56
  123. package/dist/composed/loading-skeleton.js.map +1 -1
  124. package/dist/composed/markdown-viewer.d.ts +0 -1
  125. package/dist/composed/master-detail.d.ts +21 -9
  126. package/dist/composed/master-detail.d.ts.map +1 -1
  127. package/dist/composed/master-detail.js +91 -77
  128. package/dist/composed/master-detail.js.map +1 -1
  129. package/dist/composed/member-picker.d.ts +0 -1
  130. package/dist/composed/multi-select-popover.d.ts +0 -1
  131. package/dist/composed/page-skeletons.d.ts +6 -0
  132. package/dist/composed/page-skeletons.d.ts.map +1 -1
  133. package/dist/composed/page-skeletons.js +93 -71
  134. package/dist/composed/page-skeletons.js.map +1 -1
  135. package/dist/composed/priority-indicator.d.ts +0 -1
  136. package/dist/composed/responsive-modal.d.ts +1 -2
  137. package/dist/composed/responsive-modal.js +47 -47
  138. package/dist/composed/rich-chat-input/attachment-strip.d.ts +0 -1
  139. package/dist/composed/rich-chat-input/audio-player.d.ts +0 -1
  140. package/dist/composed/rich-chat-input/audio-waveform.d.ts +0 -1
  141. package/dist/composed/rich-chat-input/chat-toolbar.d.ts +0 -1
  142. package/dist/composed/rich-chat-input/recording-overlay.d.ts +0 -1
  143. package/dist/composed/rich-chat-input/reply-banner.d.ts +0 -1
  144. package/dist/composed/rich-chat-input/schedule-send.d.ts +0 -1
  145. package/dist/composed/rich-chat-input/use-voice-recorder.d.ts +0 -1
  146. package/dist/composed/rich-chat-input.d.ts +9 -10
  147. package/dist/composed/rich-chat-input.js +1 -1
  148. package/dist/composed/rich-text-editor.d.ts +1 -2
  149. package/dist/composed/schedule-view.d.ts +0 -1
  150. package/dist/composed/simple-tooltip.d.ts +0 -1
  151. package/dist/composed/status-badge.d.ts +1 -2
  152. package/dist/hooks/index.d.ts +6 -7
  153. package/dist/hooks/use-color-mode.d.ts +0 -1
  154. package/dist/hooks/use-mobile.d.ts +0 -1
  155. package/dist/hooks/use-touch-device.d.ts +0 -1
  156. package/dist/hooks/use-viewport-height.d.ts +0 -1
  157. package/dist/motion/check-motion-provider.d.ts +0 -1
  158. package/dist/motion/index.d.ts +2 -3
  159. package/dist/motion/motion-provider.d.ts +1 -2
  160. package/dist/motion/primitives-index.d.ts +1 -2
  161. package/dist/motion/primitives.d.ts +1 -2
  162. package/dist/primitives/_internal/react-arrow.d.ts +1 -1
  163. package/dist/primitives/_internal/react-collection.d.ts +2 -2
  164. package/dist/primitives/_internal/react-dismissable-layer.d.ts +1 -1
  165. package/dist/primitives/_internal/react-focus-scope.d.ts +1 -1
  166. package/dist/primitives/_internal/react-popper.d.ts +4 -4
  167. package/dist/primitives/_internal/react-portal.d.ts +1 -1
  168. package/dist/primitives/_internal/react-use-rect.d.ts +1 -1
  169. package/dist/primitives/react-accordion.d.ts +3 -3
  170. package/dist/primitives/react-alert-dialog.d.ts +2 -2
  171. package/dist/primitives/react-aspect-ratio.d.ts +1 -1
  172. package/dist/primitives/react-avatar.d.ts +2 -2
  173. package/dist/primitives/react-checkbox.d.ts +3 -3
  174. package/dist/primitives/react-collapsible.d.ts +2 -2
  175. package/dist/primitives/react-context-menu.d.ts +3 -3
  176. package/dist/primitives/react-dialog.d.ts +5 -5
  177. package/dist/primitives/react-dropdown-menu.d.ts +3 -3
  178. package/dist/primitives/react-hover-card.d.ts +5 -5
  179. package/dist/primitives/react-label.d.ts +1 -1
  180. package/dist/primitives/react-menu.d.ts +7 -7
  181. package/dist/primitives/react-menubar.d.ts +5 -5
  182. package/dist/primitives/react-navigation-menu.d.ts +5 -5
  183. package/dist/primitives/react-popover.d.ts +6 -6
  184. package/dist/primitives/react-progress.d.ts +2 -2
  185. package/dist/primitives/react-radio-group.d.ts +3 -3
  186. package/dist/primitives/react-roving-focus.d.ts +2 -2
  187. package/dist/primitives/react-select.d.ts +6 -6
  188. package/dist/primitives/react-separator.d.ts +1 -1
  189. package/dist/primitives/react-slider.d.ts +2 -2
  190. package/dist/primitives/react-switch.d.ts +2 -2
  191. package/dist/primitives/react-tabs.d.ts +3 -3
  192. package/dist/primitives/react-toast.d.ts +3 -3
  193. package/dist/primitives/react-toggle-group.d.ts +4 -4
  194. package/dist/primitives/react-toggle.d.ts +1 -1
  195. package/dist/primitives/react-tooltip.d.ts +5 -5
  196. package/dist/primitives/react-visually-hidden.d.ts +1 -1
  197. package/dist/shell/app-command-palette.d.ts +2 -3
  198. package/dist/shell/bottom-navbar.d.ts +1 -2
  199. package/dist/shell/command-registry.d.ts +1 -2
  200. package/dist/shell/index.d.ts +12 -11
  201. package/dist/shell/index.d.ts.map +1 -1
  202. package/dist/shell/index.js +2 -3
  203. package/dist/shell/link-context.d.ts +2 -3
  204. package/dist/shell/notification-center.d.ts +0 -1
  205. package/dist/shell/notification-preferences.d.ts +0 -1
  206. package/dist/shell/notification-preferences.d.ts.map +1 -1
  207. package/dist/shell/notification-preferences.js +2 -0
  208. package/dist/shell/notification-preferences.js.map +1 -1
  209. package/dist/shell/top-bar.d.ts +1 -2
  210. package/dist/test-utils/conformance.d.ts +0 -1
  211. package/dist/ui/accordion.d.ts +1 -2
  212. package/dist/ui/accordion.js +1 -1
  213. package/dist/ui/alert-dialog.d.ts +1 -2
  214. package/dist/ui/alert-dialog.js +52 -52
  215. package/dist/ui/alert.d.ts +0 -1
  216. package/dist/ui/aspect-ratio.d.ts +1 -2
  217. package/dist/ui/aspect-ratio.js +4 -4
  218. package/dist/ui/autocomplete.d.ts +1 -2
  219. package/dist/ui/autocomplete.js +1 -1
  220. package/dist/ui/avatar.d.ts +1 -2
  221. package/dist/ui/avatar.js +33 -33
  222. package/dist/ui/badge-group.d.ts +1 -2
  223. package/dist/ui/badge-indicator.d.ts +0 -1
  224. package/dist/ui/badge.d.ts +3 -4
  225. package/dist/ui/banner.d.ts +0 -1
  226. package/dist/ui/breadcrumb.js +1 -1
  227. package/dist/ui/button-group.d.ts +1 -2
  228. package/dist/ui/button-processing.d.ts +0 -1
  229. package/dist/ui/button.d.ts +1 -2
  230. package/dist/ui/button.js +1 -1
  231. package/dist/ui/card.d.ts +0 -1
  232. package/dist/ui/charts/_internal/animation.d.ts +0 -1
  233. package/dist/ui/charts/_internal/axes.d.ts +0 -1
  234. package/dist/ui/charts/_internal/colors.d.ts +1 -2
  235. package/dist/ui/charts/_internal/grid-lines.d.ts +0 -1
  236. package/dist/ui/charts/_internal/legend.d.ts +0 -1
  237. package/dist/ui/charts/_internal/scales.d.ts +0 -1
  238. package/dist/ui/charts/_internal/tooltip.d.ts +0 -1
  239. package/dist/ui/charts/_internal/types.d.ts +0 -1
  240. package/dist/ui/charts/area-chart.d.ts +1 -2
  241. package/dist/ui/charts/bar-chart.d.ts +1 -2
  242. package/dist/ui/charts/chart-container.d.ts +1 -2
  243. package/dist/ui/charts/gauge-chart.d.ts +0 -1
  244. package/dist/ui/charts/index.d.ts +9 -10
  245. package/dist/ui/charts/line-chart.d.ts +1 -2
  246. package/dist/ui/charts/pie-chart.d.ts +0 -1
  247. package/dist/ui/charts/radar-chart.d.ts +0 -1
  248. package/dist/ui/charts/sparkline.d.ts +0 -1
  249. package/dist/ui/chat/date-separator.d.ts +0 -1
  250. package/dist/ui/chat/index.d.ts +7 -8
  251. package/dist/ui/chat/message-input.d.ts +0 -1
  252. package/dist/ui/chat/message-list.d.ts +0 -1
  253. package/dist/ui/chat/message.d.ts +1 -2
  254. package/dist/ui/chat/system-message.d.ts +1 -2
  255. package/dist/ui/chat/typing-indicator.d.ts +0 -1
  256. package/dist/ui/chat/unread-separator.d.ts +0 -1
  257. package/dist/ui/checkbox.d.ts +2 -3
  258. package/dist/ui/checkbox.js +13 -13
  259. package/dist/ui/collapsible.d.ts +1 -2
  260. package/dist/ui/collapsible.js +1 -1
  261. package/dist/ui/color-input.d.ts +0 -1
  262. package/dist/ui/color-swatch.d.ts +0 -1
  263. package/dist/ui/combobox.d.ts +3 -4
  264. package/dist/ui/combobox.d.ts.map +1 -1
  265. package/dist/ui/combobox.js +146 -141
  266. package/dist/ui/combobox.js.map +1 -1
  267. package/dist/ui/context-menu.d.ts +1 -2
  268. package/dist/ui/context-menu.js +58 -58
  269. package/dist/ui/data-table-body.d.ts +0 -1
  270. package/dist/ui/data-table-bulk-actions.d.ts +0 -1
  271. package/dist/ui/data-table-card.d.ts +0 -1
  272. package/dist/ui/data-table-context.d.ts +0 -1
  273. package/dist/ui/data-table-header.d.ts +0 -1
  274. package/dist/ui/data-table-pagination.d.ts +0 -1
  275. package/dist/ui/data-table-toolbar.d.ts +0 -1
  276. package/dist/ui/data-table.d.ts +3 -4
  277. package/dist/ui/devalok-grain.d.ts +0 -1
  278. package/dist/ui/dialog.d.ts +1 -2
  279. package/dist/ui/dialog.js +43 -43
  280. package/dist/ui/dot.d.ts +0 -1
  281. package/dist/ui/dropdown-menu.d.ts +1 -2
  282. package/dist/ui/dropdown-menu.js +69 -69
  283. package/dist/ui/file-upload.d.ts +0 -1
  284. package/dist/ui/file-upload.d.ts.map +1 -1
  285. package/dist/ui/file-upload.js +124 -138
  286. package/dist/ui/file-upload.js.map +1 -1
  287. package/dist/ui/form.d.ts +7 -1
  288. package/dist/ui/form.d.ts.map +1 -1
  289. package/dist/ui/form.js +4 -2
  290. package/dist/ui/form.js.map +1 -1
  291. package/dist/ui/hover-card.d.ts +1 -2
  292. package/dist/ui/hover-card.js +16 -16
  293. package/dist/ui/icon-button.d.ts +4 -4
  294. package/dist/ui/icon-button.d.ts.map +1 -1
  295. package/dist/ui/icon-button.js +1 -1
  296. package/dist/ui/icon-button.js.map +1 -1
  297. package/dist/ui/icon-context.d.ts +0 -1
  298. package/dist/ui/icon-group.d.ts +1 -2
  299. package/dist/ui/icon.d.ts +1 -2
  300. package/dist/ui/index.d.ts +78 -79
  301. package/dist/ui/index.d.ts.map +1 -1
  302. package/dist/ui/index.js.map +1 -1
  303. package/dist/ui/input-otp.d.ts +0 -1
  304. package/dist/ui/input.d.ts +1 -2
  305. package/dist/ui/label.d.ts +1 -2
  306. package/dist/ui/label.d.ts.map +1 -1
  307. package/dist/ui/label.js +13 -12
  308. package/dist/ui/label.js.map +1 -1
  309. package/dist/ui/lib/bottom-sheet.d.ts +0 -1
  310. package/dist/ui/lib/check-tokens.d.ts +0 -1
  311. package/dist/ui/lib/field-state.d.ts +0 -1
  312. package/dist/ui/lib/icon-input.d.ts +0 -1
  313. package/dist/ui/lib/index.d.ts +6 -7
  314. package/dist/ui/lib/keybinding.d.ts +0 -1
  315. package/dist/ui/lib/link-context.d.ts +0 -1
  316. package/dist/ui/lib/mention.d.ts +0 -1
  317. package/dist/ui/lib/normalize-icon.d.ts +2 -2
  318. package/dist/ui/lib/slot.d.ts +2 -3
  319. package/dist/ui/lib/use-controllable-open.d.ts +0 -1
  320. package/dist/ui/link.d.ts +0 -1
  321. package/dist/ui/link.js +1 -1
  322. package/dist/ui/menubar.d.ts +1 -2
  323. package/dist/ui/menubar.js +64 -64
  324. package/dist/ui/navigation-menu.d.ts +1 -2
  325. package/dist/ui/navigation-menu.js +67 -67
  326. package/dist/ui/number-input.d.ts +1 -2
  327. package/dist/ui/oauth-button/index.d.ts +1 -2
  328. package/dist/ui/oauth-button/oauth-button.d.ts +2 -3
  329. package/dist/ui/pagination.d.ts +0 -1
  330. package/dist/ui/pagination.js +1 -1
  331. package/dist/ui/popover.d.ts +1 -2
  332. package/dist/ui/progress-ring.d.ts +0 -1
  333. package/dist/ui/progress.d.ts +1 -2
  334. package/dist/ui/progress.js +30 -30
  335. package/dist/ui/radio.d.ts +2 -3
  336. package/dist/ui/radio.js +18 -18
  337. package/dist/ui/search-input.d.ts +0 -1
  338. package/dist/ui/segmented-control.d.ts +1 -2
  339. package/dist/ui/select.d.ts +1 -2
  340. package/dist/ui/select.js +55 -55
  341. package/dist/ui/separator.d.ts +1 -2
  342. package/dist/ui/separator.js +5 -5
  343. package/dist/ui/sheet.d.ts +1 -2
  344. package/dist/ui/sheet.js +45 -45
  345. package/dist/ui/sidebar.d.ts +4 -5
  346. package/dist/ui/sidebar.js +1 -1
  347. package/dist/ui/slider.d.ts +1 -2
  348. package/dist/ui/slider.js +14 -14
  349. package/dist/ui/spinner.d.ts +0 -1
  350. package/dist/ui/spinner.d.ts.map +1 -1
  351. package/dist/ui/spinner.js +50 -44
  352. package/dist/ui/spinner.js.map +1 -1
  353. package/dist/ui/split-button.d.ts +14 -4
  354. package/dist/ui/split-button.d.ts.map +1 -1
  355. package/dist/ui/split-button.js.map +1 -1
  356. package/dist/ui/stat-card.d.ts +3 -4
  357. package/dist/ui/stat-flash.d.ts +1 -2
  358. package/dist/ui/stepper.d.ts +1 -2
  359. package/dist/ui/surface.js +1 -1
  360. package/dist/ui/switch.d.ts +2 -3
  361. package/dist/ui/switch.d.ts.map +1 -1
  362. package/dist/ui/switch.js +31 -31
  363. package/dist/ui/switch.js.map +1 -1
  364. package/dist/ui/table-row-link.d.ts +0 -1
  365. package/dist/ui/table.js +1 -1
  366. package/dist/ui/table.js.map +1 -1
  367. package/dist/ui/tabs.d.ts +1 -2
  368. package/dist/ui/tabs.js +35 -35
  369. package/dist/ui/textarea.d.ts +1 -2
  370. package/dist/ui/toast-registry.d.ts +0 -1
  371. package/dist/ui/toast-types.js +1 -0
  372. package/dist/ui/toast.d.ts +2 -3
  373. package/dist/ui/toaster.d.ts +0 -1
  374. package/dist/ui/toggle-group.d.ts +2 -3
  375. package/dist/ui/toggle-group.js +14 -14
  376. package/dist/ui/toggle.d.ts +1 -2
  377. package/dist/ui/toggle.js +12 -12
  378. package/dist/ui/tooltip.d.ts +1 -2
  379. package/dist/ui/tooltip.js +21 -21
  380. package/dist/ui/tree-view/index.d.ts +3 -4
  381. package/dist/ui/tree-view/tree-item.d.ts +1 -2
  382. package/dist/ui/tree-view/tree-view.d.ts +1 -2
  383. package/dist/ui/tree-view/use-tree.d.ts +1 -2
  384. package/dist/ui/truncated-text.d.ts +0 -1
  385. package/docs/components/composed/bulk-action-bar.md +9 -3
  386. package/docs/components/composed/error-boundary.md +18 -2
  387. package/docs/components/composed/master-detail.md +12 -2
  388. package/docs/components/composed/page-skeletons.md +2 -2
  389. package/docs/components/composed/rich-chat-input.md +18 -6
  390. package/docs/components/composed/simple-tooltip.md +1 -1
  391. package/docs/components/shell/app-command-palette.md +2 -1
  392. package/docs/components/shell/bottom-navbar.md +4 -4
  393. package/docs/components/shell/command-registry.md +2 -2
  394. package/docs/components/shell/link-context.md +2 -2
  395. package/docs/components/shell/top-bar.md +1 -1
  396. package/docs/components/ui/search-input.md +2 -2
  397. package/docs/components/ui/slider.md +2 -2
  398. package/docs/components/ui/split-button.md +3 -3
  399. package/docs/recipes/install-astro.md +2 -0
  400. package/docs/recipes/install-next-app-router.md +2 -0
  401. package/docs/recipes/install-remix.md +2 -0
  402. package/docs/recipes/install-tanstack-start.md +2 -0
  403. package/docs/recipes/install-vite.md +2 -0
  404. package/docs/recipes/troubleshoot.md +80 -0
  405. package/llms.txt +2 -2
  406. package/make-kit/Guidelines.md +1 -1
  407. package/make-kit/components/overview.md +2 -2
  408. package/make-kit/foundations/surfaces.md +1 -1
  409. package/mcp-manifest.json +411 -147
  410. package/package.json +30 -10
  411. package/skill/SKILL.md +1 -1
  412. package/skill/chat-skill/README.md +18 -0
  413. package/skill/chat-skill/SKILL.md +78 -0
  414. package/skill/chat-skill/chatgpt-instructions.md +26 -0
  415. package/skill/chat-skill/gemini-instructions.md +25 -0
  416. package/skill/references/components.md +2 -2
  417. package/skill/references/setup-astro.md +2 -0
  418. package/skill/references/setup-next-app-router.md +2 -0
  419. package/skill/references/setup-remix.md +2 -0
  420. package/skill/references/setup-tanstack-start.md +2 -0
  421. package/skill/references/setup-vite.md +2 -0
  422. package/skill/references/troubleshoot.md +80 -0
  423. package/dist/_chunks/primitives.js +0 -7596
  424. package/dist/_chunks/primitives.js.map +0 -1
  425. package/dist/shell/sidebar.d.ts +0 -113
  426. package/dist/shell/sidebar.d.ts.map +0 -1
  427. package/dist/shell/sidebar.js +0 -293
  428. package/dist/shell/sidebar.js.map +0 -1
  429. package/docs/components/shell/sidebar.md +0 -103
@@ -0,0 +1,905 @@
1
+ "use client";
2
+ import { Anchor as e, Arrow as t, Content as n, DismissableLayer as r, FocusScope as i, Portal as a, Presence as o, Primitive as s, Root as c, composeEventHandlers as l, composeRefs as u, createCollection as d, createContextScope as f, createPopperScope as p, createSlot as m, dispatchDiscreteCustomEvent as h, useCallbackRef as g, useComposedRefs as _, useControllableState as ee, useDirection as v, useFocusGuards as te, useId as y } from "../primitives-internal.js";
3
+ import { ReactRemoveScroll as ne, hideOthers as b } from "./react-alert-dialog.js";
4
+ import * as x from "react";
5
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
6
+ //#region src/primitives/react-roving-focus.js
7
+ var T = "rovingFocusGroup.onEntryFocus", E = {
8
+ bubbles: !1,
9
+ cancelable: !0
10
+ }, D = "RovingFocusGroup", [O, k, A] = d(D), [j, M] = f(D, [A]), [re, N] = j(D), P = x.forwardRef((e, t) => /* @__PURE__ */ C(O.Provider, {
11
+ scope: e.__scopeRovingFocusGroup,
12
+ children: /* @__PURE__ */ C(O.Slot, {
13
+ scope: e.__scopeRovingFocusGroup,
14
+ children: /* @__PURE__ */ C(F, {
15
+ ...e,
16
+ ref: t
17
+ })
18
+ })
19
+ }));
20
+ P.displayName = D;
21
+ var F = x.forwardRef((e, t) => {
22
+ let { __scopeRovingFocusGroup: n, orientation: r, loop: i = !1, dir: a, currentTabStopId: o, defaultCurrentTabStopId: c, onCurrentTabStopIdChange: u, onEntryFocus: d, preventScrollOnEntryFocus: f = !1, ...p } = e, m = x.useRef(null), h = _(t, m), te = v(a), [y, ne] = ee({
23
+ prop: o,
24
+ defaultProp: c ?? null,
25
+ onChange: u,
26
+ caller: D
27
+ }), [b, S] = x.useState(!1), w = g(d), O = k(n), A = x.useRef(!1), [j, M] = x.useState(0);
28
+ return x.useEffect(() => {
29
+ let e = m.current;
30
+ if (e) return e.addEventListener(T, w), () => e.removeEventListener(T, w);
31
+ }, [w]), /* @__PURE__ */ C(re, {
32
+ scope: n,
33
+ orientation: r,
34
+ dir: te,
35
+ loop: i,
36
+ currentTabStopId: y,
37
+ onItemFocus: x.useCallback((e) => ne(e), [ne]),
38
+ onItemShiftTab: x.useCallback(() => S(!0), []),
39
+ onFocusableItemAdd: x.useCallback(() => M((e) => e + 1), []),
40
+ onFocusableItemRemove: x.useCallback(() => M((e) => e - 1), []),
41
+ children: /* @__PURE__ */ C(s.div, {
42
+ tabIndex: b || j === 0 ? -1 : 0,
43
+ "data-orientation": r,
44
+ ...p,
45
+ ref: h,
46
+ style: {
47
+ outline: "none",
48
+ ...e.style
49
+ },
50
+ onMouseDown: l(e.onMouseDown, () => {
51
+ A.current = !0;
52
+ }),
53
+ onFocus: l(e.onFocus, (e) => {
54
+ let t = !A.current;
55
+ if (e.target === e.currentTarget && t && !b) {
56
+ let t = new CustomEvent(T, E);
57
+ if (e.currentTarget.dispatchEvent(t), !t.defaultPrevented) {
58
+ let e = O().filter((e) => e.focusable);
59
+ oe([
60
+ e.find((e) => e.active),
61
+ e.find((e) => e.id === y),
62
+ ...e
63
+ ].filter(Boolean).map((e) => e.ref.current), f);
64
+ }
65
+ }
66
+ A.current = !1;
67
+ }),
68
+ onBlur: l(e.onBlur, () => S(!1))
69
+ })
70
+ });
71
+ }), I = "RovingFocusGroupItem", L = x.forwardRef((e, t) => {
72
+ let { __scopeRovingFocusGroup: n, focusable: r = !0, active: i = !1, tabStopId: a, children: o, ...c } = e, u = y(), d = a || u, f = N(I, n), p = f.currentTabStopId === d, m = k(n), { onFocusableItemAdd: h, onFocusableItemRemove: g, currentTabStopId: _ } = f;
73
+ return x.useEffect(() => {
74
+ if (r) return h(), () => g();
75
+ }, [
76
+ r,
77
+ h,
78
+ g
79
+ ]), /* @__PURE__ */ C(O.ItemSlot, {
80
+ scope: n,
81
+ id: d,
82
+ focusable: r,
83
+ active: i,
84
+ children: /* @__PURE__ */ C(s.span, {
85
+ tabIndex: p ? 0 : -1,
86
+ "data-orientation": f.orientation,
87
+ ...c,
88
+ ref: t,
89
+ onMouseDown: l(e.onMouseDown, (e) => {
90
+ r ? f.onItemFocus(d) : e.preventDefault();
91
+ }),
92
+ onFocus: l(e.onFocus, () => f.onItemFocus(d)),
93
+ onKeyDown: l(e.onKeyDown, (e) => {
94
+ if (e.key === "Tab" && e.shiftKey) {
95
+ f.onItemShiftTab();
96
+ return;
97
+ }
98
+ if (e.target !== e.currentTarget) return;
99
+ let t = ae(e, f.orientation, f.dir);
100
+ if (t !== void 0) {
101
+ if (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey) return;
102
+ e.preventDefault();
103
+ let n = m().filter((e) => e.focusable).map((e) => e.ref.current);
104
+ if (t === "last") n.reverse();
105
+ else if (t === "prev" || t === "next") {
106
+ t === "prev" && n.reverse();
107
+ let r = n.indexOf(e.currentTarget);
108
+ n = f.loop ? se(n, r + 1) : n.slice(r + 1);
109
+ }
110
+ setTimeout(() => oe(n));
111
+ }
112
+ }),
113
+ children: typeof o == "function" ? o({
114
+ isCurrentTabStop: p,
115
+ hasTabStop: _ != null
116
+ }) : o
117
+ })
118
+ });
119
+ });
120
+ L.displayName = I;
121
+ var ie = {
122
+ ArrowLeft: "prev",
123
+ ArrowUp: "prev",
124
+ ArrowRight: "next",
125
+ ArrowDown: "next",
126
+ PageUp: "first",
127
+ Home: "first",
128
+ PageDown: "last",
129
+ End: "last"
130
+ };
131
+ function R(e, t) {
132
+ return t === "rtl" ? e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e : e;
133
+ }
134
+ function ae(e, t, n) {
135
+ let r = R(e.key, n);
136
+ if (!(t === "vertical" && ["ArrowLeft", "ArrowRight"].includes(r)) && !(t === "horizontal" && ["ArrowUp", "ArrowDown"].includes(r))) return ie[r];
137
+ }
138
+ function oe(e, t = !1) {
139
+ let n = document.activeElement;
140
+ for (let r of e) if (r === n || (r.focus({ preventScroll: t }), document.activeElement !== n)) return;
141
+ }
142
+ function se(e, t) {
143
+ return e.map((n, r) => e[(t + r) % e.length]);
144
+ }
145
+ var ce = P, le = L, ue = ["Enter", " "], de = [
146
+ "ArrowDown",
147
+ "PageUp",
148
+ "Home"
149
+ ], fe = [
150
+ "ArrowUp",
151
+ "PageDown",
152
+ "End"
153
+ ], pe = [...de, ...fe], me = {
154
+ ltr: [...ue, "ArrowRight"],
155
+ rtl: [...ue, "ArrowLeft"]
156
+ }, he = {
157
+ ltr: ["ArrowLeft"],
158
+ rtl: ["ArrowRight"]
159
+ }, z = "Menu", [B, ge, _e] = d(z), [V, H] = f(z, [
160
+ _e,
161
+ p,
162
+ M
163
+ ]), U = p(), ve = M(), [ye, W] = V(z), [be, G] = V(z), xe = (e) => {
164
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = U(t), [l, u] = x.useState(null), d = x.useRef(!1), f = g(a), p = v(i);
165
+ return x.useEffect(() => {
166
+ let e = () => {
167
+ d.current = !0, document.addEventListener("pointerdown", t, {
168
+ capture: !0,
169
+ once: !0
170
+ }), document.addEventListener("pointermove", t, {
171
+ capture: !0,
172
+ once: !0
173
+ });
174
+ }, t = () => d.current = !1;
175
+ return document.addEventListener("keydown", e, { capture: !0 }), () => {
176
+ document.removeEventListener("keydown", e, { capture: !0 }), document.removeEventListener("pointerdown", t, { capture: !0 }), document.removeEventListener("pointermove", t, { capture: !0 });
177
+ };
178
+ }, []), /* @__PURE__ */ C(c, {
179
+ ...s,
180
+ children: /* @__PURE__ */ C(ye, {
181
+ scope: t,
182
+ open: n,
183
+ onOpenChange: f,
184
+ content: l,
185
+ onContentChange: u,
186
+ children: /* @__PURE__ */ C(be, {
187
+ scope: t,
188
+ onClose: x.useCallback(() => f(!1), [f]),
189
+ isUsingKeyboardRef: d,
190
+ dir: p,
191
+ modal: o,
192
+ children: r
193
+ })
194
+ })
195
+ });
196
+ };
197
+ xe.displayName = z;
198
+ var Se = "MenuAnchor", Ce = x.forwardRef((t, n) => {
199
+ let { __scopeMenu: r, ...i } = t;
200
+ return /* @__PURE__ */ C(e, {
201
+ ...U(r),
202
+ ...i,
203
+ ref: n
204
+ });
205
+ });
206
+ Ce.displayName = Se;
207
+ var we = "MenuPortal", [Te, Ee] = V(we, { forceMount: void 0 }), De = (e) => {
208
+ let { __scopeMenu: t, forceMount: n, children: r, container: i } = e, s = W(we, t);
209
+ return /* @__PURE__ */ C(Te, {
210
+ scope: t,
211
+ forceMount: n,
212
+ children: /* @__PURE__ */ C(o, {
213
+ present: n || s.open,
214
+ children: /* @__PURE__ */ C(a, {
215
+ asChild: !0,
216
+ container: i,
217
+ children: r
218
+ })
219
+ })
220
+ });
221
+ };
222
+ De.displayName = we;
223
+ var K = "MenuContent", [Oe, ke] = V(K), Ae = x.forwardRef((e, t) => {
224
+ let n = Ee(K, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = W(K, e.__scopeMenu), s = G(K, e.__scopeMenu);
225
+ return /* @__PURE__ */ C(B.Provider, {
226
+ scope: e.__scopeMenu,
227
+ children: /* @__PURE__ */ C(o, {
228
+ present: r || a.open,
229
+ children: /* @__PURE__ */ C(B.Slot, {
230
+ scope: e.__scopeMenu,
231
+ children: s.modal ? /* @__PURE__ */ C(je, {
232
+ ...i,
233
+ ref: t
234
+ }) : /* @__PURE__ */ C(Me, {
235
+ ...i,
236
+ ref: t
237
+ })
238
+ })
239
+ })
240
+ });
241
+ }), je = x.forwardRef((e, t) => {
242
+ let n = W(K, e.__scopeMenu), r = x.useRef(null), i = _(t, r);
243
+ return x.useEffect(() => {
244
+ let e = r.current;
245
+ if (e) return b(e);
246
+ }, []), /* @__PURE__ */ C(Pe, {
247
+ ...e,
248
+ ref: i,
249
+ trapFocus: n.open,
250
+ disableOutsidePointerEvents: n.open,
251
+ disableOutsideScroll: !0,
252
+ onFocusOutside: l(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 }),
253
+ onDismiss: () => n.onOpenChange(!1)
254
+ });
255
+ }), Me = x.forwardRef((e, t) => {
256
+ let n = W(K, e.__scopeMenu);
257
+ return /* @__PURE__ */ C(Pe, {
258
+ ...e,
259
+ ref: t,
260
+ trapFocus: !1,
261
+ disableOutsidePointerEvents: !1,
262
+ disableOutsideScroll: !1,
263
+ onDismiss: () => n.onOpenChange(!1)
264
+ });
265
+ }), Ne = /* @__PURE__ */ m("MenuContent.ScrollLock"), Pe = x.forwardRef((e, t) => {
266
+ let { __scopeMenu: a, loop: o = !1, trapFocus: s, onOpenAutoFocus: c, onCloseAutoFocus: u, disableOutsidePointerEvents: d, onEntryFocus: f, onEscapeKeyDown: p, onPointerDownOutside: m, onFocusOutside: h, onInteractOutside: g, onDismiss: ee, disableOutsideScroll: v, ...y } = e, b = W(K, a), S = G(K, a), w = U(a), T = ve(a), E = ge(a), [D, O] = x.useState(null), k = x.useRef(null), A = _(t, k, b.onContentChange), j = x.useRef(0), M = x.useRef(""), re = x.useRef(0), N = x.useRef(null), P = x.useRef("right"), F = x.useRef(0), I = v ? ne : x.Fragment, L = v ? {
267
+ as: Ne,
268
+ allowPinchZoom: !0
269
+ } : void 0, ie = (e) => {
270
+ let t = M.current + e, n = E().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = mt(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
271
+ (function e(t) {
272
+ M.current = t, window.clearTimeout(j.current), t !== "" && (j.current = window.setTimeout(() => e(""), 1e3));
273
+ })(t), o && setTimeout(() => o.focus());
274
+ };
275
+ x.useEffect(() => () => window.clearTimeout(j.current), []), te();
276
+ let R = x.useCallback((e) => P.current === N.current?.side && gt(e, N.current?.area), []);
277
+ return /* @__PURE__ */ C(Oe, {
278
+ scope: a,
279
+ searchRef: M,
280
+ onItemEnter: x.useCallback((e) => {
281
+ R(e) && e.preventDefault();
282
+ }, [R]),
283
+ onItemLeave: x.useCallback((e) => {
284
+ R(e) || (k.current?.focus(), O(null));
285
+ }, [R]),
286
+ onTriggerLeave: x.useCallback((e) => {
287
+ R(e) && e.preventDefault();
288
+ }, [R]),
289
+ pointerGraceTimerRef: re,
290
+ onPointerGraceIntentChange: x.useCallback((e) => {
291
+ N.current = e;
292
+ }, []),
293
+ children: /* @__PURE__ */ C(I, {
294
+ ...L,
295
+ children: /* @__PURE__ */ C(i, {
296
+ asChild: !0,
297
+ trapped: s,
298
+ onMountAutoFocus: l(c, (e) => {
299
+ e.preventDefault(), k.current?.focus({ preventScroll: !0 });
300
+ }),
301
+ onUnmountAutoFocus: u,
302
+ children: /* @__PURE__ */ C(r, {
303
+ asChild: !0,
304
+ disableOutsidePointerEvents: d,
305
+ onEscapeKeyDown: p,
306
+ onPointerDownOutside: m,
307
+ onFocusOutside: h,
308
+ onInteractOutside: g,
309
+ onDismiss: ee,
310
+ children: /* @__PURE__ */ C(ce, {
311
+ asChild: !0,
312
+ ...T,
313
+ dir: S.dir,
314
+ orientation: "vertical",
315
+ loop: o,
316
+ currentTabStopId: D,
317
+ onCurrentTabStopIdChange: O,
318
+ onEntryFocus: l(f, (e) => {
319
+ S.isUsingKeyboardRef.current || e.preventDefault();
320
+ }),
321
+ preventScrollOnEntryFocus: !0,
322
+ children: /* @__PURE__ */ C(n, {
323
+ role: "menu",
324
+ "aria-orientation": "vertical",
325
+ "data-state": ut(b.open),
326
+ "data-radix-menu-content": "",
327
+ dir: S.dir,
328
+ ...w,
329
+ ...y,
330
+ ref: A,
331
+ style: {
332
+ outline: "none",
333
+ ...y.style
334
+ },
335
+ onKeyDown: l(y.onKeyDown, (e) => {
336
+ let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
337
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && ie(e.key));
338
+ let i = k.current;
339
+ if (e.target !== i || !pe.includes(e.key)) return;
340
+ e.preventDefault();
341
+ let a = E().filter((e) => !e.disabled).map((e) => e.ref.current);
342
+ fe.includes(e.key) && a.reverse(), ft(a);
343
+ }),
344
+ onBlur: l(e.onBlur, (e) => {
345
+ e.currentTarget.contains(e.target) || (window.clearTimeout(j.current), M.current = "");
346
+ }),
347
+ onPointerMove: l(e.onPointerMove, Z((e) => {
348
+ let t = e.target, n = F.current !== e.clientX;
349
+ if (e.currentTarget.contains(t) && n) {
350
+ let t = e.clientX > F.current ? "right" : "left";
351
+ P.current = t, F.current = e.clientX;
352
+ }
353
+ }))
354
+ })
355
+ })
356
+ })
357
+ })
358
+ })
359
+ });
360
+ });
361
+ Ae.displayName = K;
362
+ var Fe = "MenuGroup", Ie = x.forwardRef((e, t) => {
363
+ let { __scopeMenu: n, ...r } = e;
364
+ return /* @__PURE__ */ C(s.div, {
365
+ role: "group",
366
+ ...r,
367
+ ref: t
368
+ });
369
+ });
370
+ Ie.displayName = Fe;
371
+ var Le = "MenuLabel", Re = x.forwardRef((e, t) => {
372
+ let { __scopeMenu: n, ...r } = e;
373
+ return /* @__PURE__ */ C(s.div, {
374
+ ...r,
375
+ ref: t
376
+ });
377
+ });
378
+ Re.displayName = Le;
379
+ var q = "MenuItem", ze = "menu.itemSelect", J = x.forwardRef((e, t) => {
380
+ let { disabled: n = !1, onSelect: r, ...i } = e, a = x.useRef(null), o = G(q, e.__scopeMenu), s = ke(q, e.__scopeMenu), c = _(t, a), u = x.useRef(!1), d = () => {
381
+ let e = a.current;
382
+ if (!n && e) {
383
+ let t = new CustomEvent(ze, {
384
+ bubbles: !0,
385
+ cancelable: !0
386
+ });
387
+ e.addEventListener(ze, (e) => r?.(e), { once: !0 }), h(e, t), t.defaultPrevented ? u.current = !1 : o.onClose();
388
+ }
389
+ };
390
+ return /* @__PURE__ */ C(Be, {
391
+ ...i,
392
+ ref: c,
393
+ disabled: n,
394
+ onClick: l(e.onClick, d),
395
+ onPointerDown: (t) => {
396
+ e.onPointerDown?.(t), u.current = !0;
397
+ },
398
+ onPointerUp: l(e.onPointerUp, (e) => {
399
+ u.current || e.currentTarget?.click();
400
+ }),
401
+ onKeyDown: l(e.onKeyDown, (e) => {
402
+ let t = s.searchRef.current !== "";
403
+ n || t && e.key === " " || ue.includes(e.key) && (e.currentTarget.click(), e.preventDefault());
404
+ })
405
+ });
406
+ });
407
+ J.displayName = q;
408
+ var Be = x.forwardRef((e, t) => {
409
+ let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = ke(q, n), c = ve(n), u = x.useRef(null), d = _(t, u), [f, p] = x.useState(!1), [m, h] = x.useState("");
410
+ return x.useEffect(() => {
411
+ let e = u.current;
412
+ e && h((e.textContent ?? "").trim());
413
+ }, [a.children]), /* @__PURE__ */ C(B.ItemSlot, {
414
+ scope: n,
415
+ disabled: r,
416
+ textValue: i ?? m,
417
+ children: /* @__PURE__ */ C(le, {
418
+ asChild: !0,
419
+ ...c,
420
+ focusable: !r,
421
+ children: /* @__PURE__ */ C(s.div, {
422
+ role: "menuitem",
423
+ "data-highlighted": f ? "" : void 0,
424
+ "aria-disabled": r || void 0,
425
+ "data-disabled": r ? "" : void 0,
426
+ ...a,
427
+ ref: d,
428
+ onPointerMove: l(e.onPointerMove, Z((e) => {
429
+ r ? o.onItemLeave(e) : (o.onItemEnter(e), e.defaultPrevented || e.currentTarget.focus({ preventScroll: !0 }));
430
+ })),
431
+ onPointerLeave: l(e.onPointerLeave, Z((e) => o.onItemLeave(e))),
432
+ onFocus: l(e.onFocus, () => p(!0)),
433
+ onBlur: l(e.onBlur, () => p(!1))
434
+ })
435
+ })
436
+ });
437
+ }), Ve = "MenuCheckboxItem", He = x.forwardRef((e, t) => {
438
+ let { checked: n = !1, onCheckedChange: r, ...i } = e;
439
+ return /* @__PURE__ */ C(Xe, {
440
+ scope: e.__scopeMenu,
441
+ checked: n,
442
+ children: /* @__PURE__ */ C(J, {
443
+ role: "menuitemcheckbox",
444
+ "aria-checked": X(n) ? "mixed" : n,
445
+ ...i,
446
+ ref: t,
447
+ "data-state": dt(n),
448
+ onSelect: l(i.onSelect, () => r?.(X(n) ? !0 : !n), { checkForDefaultPrevented: !1 })
449
+ })
450
+ });
451
+ });
452
+ He.displayName = Ve;
453
+ var Ue = "MenuRadioGroup", [We, Ge] = V(Ue, {
454
+ value: void 0,
455
+ onValueChange: () => {}
456
+ }), Ke = x.forwardRef((e, t) => {
457
+ let { value: n, onValueChange: r, ...i } = e, a = g(r);
458
+ return /* @__PURE__ */ C(We, {
459
+ scope: e.__scopeMenu,
460
+ value: n,
461
+ onValueChange: a,
462
+ children: /* @__PURE__ */ C(Ie, {
463
+ ...i,
464
+ ref: t
465
+ })
466
+ });
467
+ });
468
+ Ke.displayName = Ue;
469
+ var qe = "MenuRadioItem", Je = x.forwardRef((e, t) => {
470
+ let { value: n, ...r } = e, i = Ge(qe, e.__scopeMenu), a = n === i.value;
471
+ return /* @__PURE__ */ C(Xe, {
472
+ scope: e.__scopeMenu,
473
+ checked: a,
474
+ children: /* @__PURE__ */ C(J, {
475
+ role: "menuitemradio",
476
+ "aria-checked": a,
477
+ ...r,
478
+ ref: t,
479
+ "data-state": dt(a),
480
+ onSelect: l(r.onSelect, () => i.onValueChange?.(n), { checkForDefaultPrevented: !1 })
481
+ })
482
+ });
483
+ });
484
+ Je.displayName = qe;
485
+ var Ye = "MenuItemIndicator", [Xe, Ze] = V(Ye, { checked: !1 }), Qe = x.forwardRef((e, t) => {
486
+ let { __scopeMenu: n, forceMount: r, ...i } = e, a = Ze(Ye, n);
487
+ return /* @__PURE__ */ C(o, {
488
+ present: r || X(a.checked) || a.checked === !0,
489
+ children: /* @__PURE__ */ C(s.span, {
490
+ ...i,
491
+ ref: t,
492
+ "data-state": dt(a.checked)
493
+ })
494
+ });
495
+ });
496
+ Qe.displayName = Ye;
497
+ var $e = "MenuSeparator", et = x.forwardRef((e, t) => {
498
+ let { __scopeMenu: n, ...r } = e;
499
+ return /* @__PURE__ */ C(s.div, {
500
+ role: "separator",
501
+ "aria-orientation": "horizontal",
502
+ ...r,
503
+ ref: t
504
+ });
505
+ });
506
+ et.displayName = $e;
507
+ var tt = "MenuArrow", nt = x.forwardRef((e, n) => {
508
+ let { __scopeMenu: r, ...i } = e;
509
+ return /* @__PURE__ */ C(t, {
510
+ ...U(r),
511
+ ...i,
512
+ ref: n
513
+ });
514
+ });
515
+ nt.displayName = tt;
516
+ var rt = "MenuSub", [it, at] = V(rt), ot = (e) => {
517
+ let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = W(rt, t), o = U(t), [s, l] = x.useState(null), [u, d] = x.useState(null), f = g(i);
518
+ return x.useEffect(() => (a.open === !1 && f(!1), () => f(!1)), [a.open, f]), /* @__PURE__ */ C(c, {
519
+ ...o,
520
+ children: /* @__PURE__ */ C(ye, {
521
+ scope: t,
522
+ open: r,
523
+ onOpenChange: f,
524
+ content: u,
525
+ onContentChange: d,
526
+ children: /* @__PURE__ */ C(it, {
527
+ scope: t,
528
+ contentId: y(),
529
+ triggerId: y(),
530
+ trigger: s,
531
+ onTriggerChange: l,
532
+ children: n
533
+ })
534
+ })
535
+ });
536
+ };
537
+ ot.displayName = rt;
538
+ var Y = "MenuSubTrigger", st = x.forwardRef((e, t) => {
539
+ let n = W(Y, e.__scopeMenu), r = G(Y, e.__scopeMenu), i = at(Y, e.__scopeMenu), a = ke(Y, e.__scopeMenu), o = x.useRef(null), { pointerGraceTimerRef: s, onPointerGraceIntentChange: c } = a, d = { __scopeMenu: e.__scopeMenu }, f = x.useCallback(() => {
540
+ o.current && window.clearTimeout(o.current), o.current = null;
541
+ }, []);
542
+ return x.useEffect(() => f, [f]), x.useEffect(() => {
543
+ let e = s.current;
544
+ return () => {
545
+ window.clearTimeout(e), c(null);
546
+ };
547
+ }, [s, c]), /* @__PURE__ */ C(Ce, {
548
+ asChild: !0,
549
+ ...d,
550
+ children: /* @__PURE__ */ C(Be, {
551
+ id: i.triggerId,
552
+ "aria-haspopup": "menu",
553
+ "aria-expanded": n.open,
554
+ "aria-controls": i.contentId,
555
+ "data-state": ut(n.open),
556
+ ...e,
557
+ ref: u(t, i.onTriggerChange),
558
+ onClick: (t) => {
559
+ e.onClick?.(t), !(e.disabled || t.defaultPrevented) && (t.currentTarget.focus(), n.open || n.onOpenChange(!0));
560
+ },
561
+ onPointerMove: l(e.onPointerMove, Z((t) => {
562
+ a.onItemEnter(t), !t.defaultPrevented && !e.disabled && !n.open && !o.current && (a.onPointerGraceIntentChange(null), o.current = window.setTimeout(() => {
563
+ n.onOpenChange(!0), f();
564
+ }, 100));
565
+ })),
566
+ onPointerLeave: l(e.onPointerLeave, Z((e) => {
567
+ f();
568
+ let t = n.content?.getBoundingClientRect();
569
+ if (t) {
570
+ let r = n.content?.dataset.side, i = r === "right", o = i ? -5 : 5, c = t[i ? "left" : "right"], l = t[i ? "right" : "left"];
571
+ a.onPointerGraceIntentChange({
572
+ area: [
573
+ {
574
+ x: e.clientX + o,
575
+ y: e.clientY
576
+ },
577
+ {
578
+ x: c,
579
+ y: t.top
580
+ },
581
+ {
582
+ x: l,
583
+ y: t.top
584
+ },
585
+ {
586
+ x: l,
587
+ y: t.bottom
588
+ },
589
+ {
590
+ x: c,
591
+ y: t.bottom
592
+ }
593
+ ],
594
+ side: r
595
+ }), window.clearTimeout(s.current), s.current = window.setTimeout(() => a.onPointerGraceIntentChange(null), 300);
596
+ } else {
597
+ if (a.onTriggerLeave(e), e.defaultPrevented) return;
598
+ a.onPointerGraceIntentChange(null);
599
+ }
600
+ })),
601
+ onKeyDown: l(e.onKeyDown, (t) => {
602
+ let i = a.searchRef.current !== "";
603
+ e.disabled || i && t.key === " " || me[r.dir].includes(t.key) && (n.onOpenChange(!0), n.content?.focus(), t.preventDefault());
604
+ })
605
+ })
606
+ });
607
+ });
608
+ st.displayName = Y;
609
+ var ct = "MenuSubContent", lt = x.forwardRef((e, t) => {
610
+ let n = Ee(K, e.__scopeMenu), { forceMount: r = n.forceMount, ...i } = e, a = W(K, e.__scopeMenu), s = G(K, e.__scopeMenu), c = at(ct, e.__scopeMenu), u = x.useRef(null), d = _(t, u);
611
+ return /* @__PURE__ */ C(B.Provider, {
612
+ scope: e.__scopeMenu,
613
+ children: /* @__PURE__ */ C(o, {
614
+ present: r || a.open,
615
+ children: /* @__PURE__ */ C(B.Slot, {
616
+ scope: e.__scopeMenu,
617
+ children: /* @__PURE__ */ C(Pe, {
618
+ id: c.contentId,
619
+ "aria-labelledby": c.triggerId,
620
+ ...i,
621
+ ref: d,
622
+ align: "start",
623
+ side: s.dir === "rtl" ? "left" : "right",
624
+ disableOutsidePointerEvents: !1,
625
+ disableOutsideScroll: !1,
626
+ trapFocus: !1,
627
+ onOpenAutoFocus: (e) => {
628
+ s.isUsingKeyboardRef.current && u.current?.focus(), e.preventDefault();
629
+ },
630
+ onCloseAutoFocus: (e) => e.preventDefault(),
631
+ onFocusOutside: l(e.onFocusOutside, (e) => {
632
+ e.target !== c.trigger && a.onOpenChange(!1);
633
+ }),
634
+ onEscapeKeyDown: l(e.onEscapeKeyDown, (e) => {
635
+ s.onClose(), e.preventDefault();
636
+ }),
637
+ onKeyDown: l(e.onKeyDown, (e) => {
638
+ let t = e.currentTarget.contains(e.target), n = he[s.dir].includes(e.key);
639
+ t && n && (a.onOpenChange(!1), c.trigger?.focus(), e.preventDefault());
640
+ })
641
+ })
642
+ })
643
+ })
644
+ });
645
+ });
646
+ lt.displayName = ct;
647
+ function ut(e) {
648
+ return e ? "open" : "closed";
649
+ }
650
+ function X(e) {
651
+ return e === "indeterminate";
652
+ }
653
+ function dt(e) {
654
+ return X(e) ? "indeterminate" : e ? "checked" : "unchecked";
655
+ }
656
+ function ft(e) {
657
+ let t = document.activeElement;
658
+ for (let n of e) if (n === t || (n.focus(), document.activeElement !== t)) return;
659
+ }
660
+ function pt(e, t) {
661
+ return e.map((n, r) => e[(t + r) % e.length]);
662
+ }
663
+ function mt(e, t, n) {
664
+ let r = t.length > 1 && Array.from(t).every((e) => e === t[0]) ? t[0] : t, i = n ? e.indexOf(n) : -1, a = pt(e, Math.max(i, 0));
665
+ r.length === 1 && (a = a.filter((e) => e !== n));
666
+ let o = a.find((e) => e.toLowerCase().startsWith(r.toLowerCase()));
667
+ return o === n ? void 0 : o;
668
+ }
669
+ function ht(e, t) {
670
+ let { x: n, y: r } = e, i = !1;
671
+ for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
672
+ let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
673
+ l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
674
+ }
675
+ return i;
676
+ }
677
+ function gt(e, t) {
678
+ return t ? ht({
679
+ x: e.clientX,
680
+ y: e.clientY
681
+ }, t) : !1;
682
+ }
683
+ function Z(e) {
684
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
685
+ }
686
+ var _t = xe, vt = Ce, yt = De, bt = Ae, xt = Ie, St = Re, Ct = J, wt = He, Tt = Ke, Et = Je, Dt = Qe, Ot = et, kt = nt, At = ot, jt = st, Mt = lt, Nt = "ContextMenu", [Pt, Ft] = f(Nt, [H]), Q = H(), [It, Lt] = Pt(Nt), Rt = (e) => {
687
+ let { __scopeContextMenu: t, children: n, onOpenChange: r, dir: i, modal: a = !0 } = e, [o, s] = x.useState(!1), c = Q(t), l = g(r), u = x.useCallback((e) => {
688
+ s(e), l(e);
689
+ }, [l]);
690
+ return /* @__PURE__ */ C(It, {
691
+ scope: t,
692
+ open: o,
693
+ onOpenChange: u,
694
+ modal: a,
695
+ children: /* @__PURE__ */ C(_t, {
696
+ ...c,
697
+ dir: i,
698
+ open: o,
699
+ onOpenChange: u,
700
+ modal: a,
701
+ children: n
702
+ })
703
+ });
704
+ };
705
+ Rt.displayName = Nt;
706
+ var zt = "ContextMenuTrigger", Bt = x.forwardRef((e, t) => {
707
+ let { __scopeContextMenu: n, disabled: r = !1, ...i } = e, a = Lt(zt, n), o = Q(n), c = x.useRef({
708
+ x: 0,
709
+ y: 0
710
+ }), u = x.useRef({ getBoundingClientRect: () => DOMRect.fromRect({
711
+ width: 0,
712
+ height: 0,
713
+ ...c.current
714
+ }) }), d = x.useRef(0), f = x.useCallback(() => window.clearTimeout(d.current), []), p = (e) => {
715
+ c.current = {
716
+ x: e.clientX,
717
+ y: e.clientY
718
+ }, a.onOpenChange(!0);
719
+ };
720
+ return x.useEffect(() => f, [f]), x.useEffect(() => void (r && f()), [r, f]), /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(vt, {
721
+ ...o,
722
+ virtualRef: u
723
+ }), /* @__PURE__ */ C(s.span, {
724
+ "data-state": a.open ? "open" : "closed",
725
+ "data-disabled": r ? "" : void 0,
726
+ ...i,
727
+ ref: t,
728
+ style: {
729
+ WebkitTouchCallout: "none",
730
+ ...e.style
731
+ },
732
+ onContextMenu: r ? e.onContextMenu : l(e.onContextMenu, (e) => {
733
+ f(), p(e), e.preventDefault();
734
+ }),
735
+ onPointerDown: r ? e.onPointerDown : l(e.onPointerDown, $((e) => {
736
+ f(), d.current = window.setTimeout(() => p(e), 700);
737
+ })),
738
+ onPointerMove: r ? e.onPointerMove : l(e.onPointerMove, $(f)),
739
+ onPointerCancel: r ? e.onPointerCancel : l(e.onPointerCancel, $(f)),
740
+ onPointerUp: r ? e.onPointerUp : l(e.onPointerUp, $(f))
741
+ })] });
742
+ });
743
+ Bt.displayName = zt;
744
+ var Vt = "ContextMenuPortal", Ht = (e) => {
745
+ let { __scopeContextMenu: t, ...n } = e;
746
+ return /* @__PURE__ */ C(yt, {
747
+ ...Q(t),
748
+ ...n
749
+ });
750
+ };
751
+ Ht.displayName = Vt;
752
+ var Ut = "ContextMenuContent", Wt = x.forwardRef((e, t) => {
753
+ let { __scopeContextMenu: n, ...r } = e, i = Lt(Ut, n), a = Q(n), o = x.useRef(!1);
754
+ return /* @__PURE__ */ C(bt, {
755
+ ...a,
756
+ ...r,
757
+ ref: t,
758
+ side: "right",
759
+ sideOffset: 2,
760
+ align: "start",
761
+ onCloseAutoFocus: (t) => {
762
+ e.onCloseAutoFocus?.(t), !t.defaultPrevented && o.current && t.preventDefault(), o.current = !1;
763
+ },
764
+ onInteractOutside: (t) => {
765
+ e.onInteractOutside?.(t), !t.defaultPrevented && !i.modal && (o.current = !0);
766
+ },
767
+ style: {
768
+ ...e.style,
769
+ "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
770
+ "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
771
+ "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
772
+ "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
773
+ "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
774
+ }
775
+ });
776
+ });
777
+ Wt.displayName = Ut;
778
+ var Gt = "ContextMenuGroup", Kt = x.forwardRef((e, t) => {
779
+ let { __scopeContextMenu: n, ...r } = e;
780
+ return /* @__PURE__ */ C(xt, {
781
+ ...Q(n),
782
+ ...r,
783
+ ref: t
784
+ });
785
+ });
786
+ Kt.displayName = Gt;
787
+ var qt = "ContextMenuLabel", Jt = x.forwardRef((e, t) => {
788
+ let { __scopeContextMenu: n, ...r } = e;
789
+ return /* @__PURE__ */ C(St, {
790
+ ...Q(n),
791
+ ...r,
792
+ ref: t
793
+ });
794
+ });
795
+ Jt.displayName = qt;
796
+ var Yt = "ContextMenuItem", Xt = x.forwardRef((e, t) => {
797
+ let { __scopeContextMenu: n, ...r } = e;
798
+ return /* @__PURE__ */ C(Ct, {
799
+ ...Q(n),
800
+ ...r,
801
+ ref: t
802
+ });
803
+ });
804
+ Xt.displayName = Yt;
805
+ var Zt = "ContextMenuCheckboxItem", Qt = x.forwardRef((e, t) => {
806
+ let { __scopeContextMenu: n, ...r } = e;
807
+ return /* @__PURE__ */ C(wt, {
808
+ ...Q(n),
809
+ ...r,
810
+ ref: t
811
+ });
812
+ });
813
+ Qt.displayName = Zt;
814
+ var $t = "ContextMenuRadioGroup", en = x.forwardRef((e, t) => {
815
+ let { __scopeContextMenu: n, ...r } = e;
816
+ return /* @__PURE__ */ C(Tt, {
817
+ ...Q(n),
818
+ ...r,
819
+ ref: t
820
+ });
821
+ });
822
+ en.displayName = $t;
823
+ var tn = "ContextMenuRadioItem", nn = x.forwardRef((e, t) => {
824
+ let { __scopeContextMenu: n, ...r } = e;
825
+ return /* @__PURE__ */ C(Et, {
826
+ ...Q(n),
827
+ ...r,
828
+ ref: t
829
+ });
830
+ });
831
+ nn.displayName = tn;
832
+ var rn = "ContextMenuItemIndicator", an = x.forwardRef((e, t) => {
833
+ let { __scopeContextMenu: n, ...r } = e;
834
+ return /* @__PURE__ */ C(Dt, {
835
+ ...Q(n),
836
+ ...r,
837
+ ref: t
838
+ });
839
+ });
840
+ an.displayName = rn;
841
+ var on = "ContextMenuSeparator", sn = x.forwardRef((e, t) => {
842
+ let { __scopeContextMenu: n, ...r } = e;
843
+ return /* @__PURE__ */ C(Ot, {
844
+ ...Q(n),
845
+ ...r,
846
+ ref: t
847
+ });
848
+ });
849
+ sn.displayName = on;
850
+ var cn = "ContextMenuArrow", ln = x.forwardRef((e, t) => {
851
+ let { __scopeContextMenu: n, ...r } = e;
852
+ return /* @__PURE__ */ C(kt, {
853
+ ...Q(n),
854
+ ...r,
855
+ ref: t
856
+ });
857
+ });
858
+ ln.displayName = cn;
859
+ var un = "ContextMenuSub", dn = (e) => {
860
+ let { __scopeContextMenu: t, children: n, onOpenChange: r, open: i, defaultOpen: a } = e, o = Q(t), [s, c] = ee({
861
+ prop: i,
862
+ defaultProp: a ?? !1,
863
+ onChange: r,
864
+ caller: un
865
+ });
866
+ return /* @__PURE__ */ C(At, {
867
+ ...o,
868
+ open: s,
869
+ onOpenChange: c,
870
+ children: n
871
+ });
872
+ };
873
+ dn.displayName = un;
874
+ var fn = "ContextMenuSubTrigger", pn = x.forwardRef((e, t) => {
875
+ let { __scopeContextMenu: n, ...r } = e;
876
+ return /* @__PURE__ */ C(jt, {
877
+ ...Q(n),
878
+ ...r,
879
+ ref: t
880
+ });
881
+ });
882
+ pn.displayName = fn;
883
+ var mn = "ContextMenuSubContent", hn = x.forwardRef((e, t) => {
884
+ let { __scopeContextMenu: n, ...r } = e;
885
+ return /* @__PURE__ */ C(Mt, {
886
+ ...Q(n),
887
+ ...r,
888
+ ref: t,
889
+ style: {
890
+ ...e.style,
891
+ "--radix-context-menu-content-transform-origin": "var(--radix-popper-transform-origin)",
892
+ "--radix-context-menu-content-available-width": "var(--radix-popper-available-width)",
893
+ "--radix-context-menu-content-available-height": "var(--radix-popper-available-height)",
894
+ "--radix-context-menu-trigger-width": "var(--radix-popper-anchor-width)",
895
+ "--radix-context-menu-trigger-height": "var(--radix-popper-anchor-height)"
896
+ }
897
+ });
898
+ });
899
+ hn.displayName = mn;
900
+ function $(e) {
901
+ return (t) => t.pointerType === "mouse" ? void 0 : e(t);
902
+ }
903
+ var gn = Rt, _n = Bt, vn = Ht, yn = Wt, bn = Kt, xn = Jt, Sn = Xt, Cn = Qt, wn = en, Tn = nn, En = an, Dn = sn, On = dn, kn = pn, An = hn;
904
+ //#endregion
905
+ export { vt as Anchor2, kt as Arrow2, wt as CheckboxItem, Cn as CheckboxItem2, yn as Content2, bt as Content2$1, xt as Group, bn as Group2, le as Item, Sn as Item2, Ct as Item2$1, Dt as ItemIndicator, En as ItemIndicator2, St as Label, xn as Label2, yt as Portal, vn as Portal2, Tt as RadioGroup, wn as RadioGroup2, Et as RadioItem, Tn as RadioItem2, ce as Root, gn as Root2, _t as Root3, Ot as Separator, Dn as Separator2, At as Sub, On as Sub2, Mt as SubContent, An as SubContent2, jt as SubTrigger, kn as SubTrigger2, _n as Trigger, H as createMenuScope, M as createRovingFocusGroupScope };