@pstdio/ui 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 (697) hide show
  1. package/.storybook/main.ts +28 -0
  2. package/.storybook/preview.tsx +28 -0
  3. package/.storybook/vitest.setup.ts +6 -0
  4. package/README.md +72 -0
  5. package/package.json +91 -0
  6. package/src/components/alert.tsx +27 -0
  7. package/src/components/breadcrumb.stories.tsx +40 -0
  8. package/src/components/breadcrumb.tsx +67 -0
  9. package/src/components/button.stories.tsx +151 -0
  10. package/src/components/chat-ui/agent-types.ts +231 -0
  11. package/src/components/chat-ui/components/ai-conversation.stories.tsx +49 -0
  12. package/src/components/chat-ui/components/ai-conversation.tsx +68 -0
  13. package/src/components/chat-ui/components/ai-message.stories.tsx +60 -0
  14. package/src/components/chat-ui/components/ai-message.tsx +103 -0
  15. package/src/components/chat-ui/components/ai-response.stories.tsx +48 -0
  16. package/src/components/chat-ui/components/ai-response.tsx +19 -0
  17. package/src/components/chat-ui/components/approval-prompt.tsx +51 -0
  18. package/src/components/chat-ui/components/attachment-list.stories.tsx +24 -0
  19. package/src/components/chat-ui/components/attachment-list.tsx +76 -0
  20. package/src/components/chat-ui/components/auto-scroll.tsx +42 -0
  21. package/src/components/chat-ui/components/chat-input.stories.tsx +114 -0
  22. package/src/components/chat-ui/components/chat-input.tsx +142 -0
  23. package/src/components/chat-ui/components/chat-panel.stories.tsx +396 -0
  24. package/src/components/chat-ui/components/chat-panel.tsx +97 -0
  25. package/src/components/chat-ui/components/message-parts-renderer.stories.tsx +59 -0
  26. package/src/components/chat-ui/components/message-parts-renderer.tsx +133 -0
  27. package/src/components/chat-ui/components/message-types.ts +40 -0
  28. package/src/components/chat-ui/components/model-swap-separator.stories.tsx +27 -0
  29. package/src/components/chat-ui/components/model-swap-separator.tsx +20 -0
  30. package/src/components/chat-ui/components/send-button.tsx +56 -0
  31. package/src/components/chat-ui/components/timeline.tsx +414 -0
  32. package/src/components/chat-ui/components/tool-invocation-timeline.stories.tsx +32 -0
  33. package/src/components/chat-ui/components/tool-invocation-timeline.tsx +16 -0
  34. package/src/components/chat-ui/mocks/full-conversation-normalized.json +3557 -0
  35. package/src/components/chat-ui/tool-rendering/build-timeline.ts +127 -0
  36. package/src/components/chat-ui/tool-rendering/default-renderers.ts +420 -0
  37. package/src/components/chat-ui/tool-rendering/index.ts +3 -0
  38. package/src/components/chat-ui/tool-rendering/types.ts +19 -0
  39. package/src/components/chat-ui/utils/diff.ts +228 -0
  40. package/src/components/chat-ui/utils/editor-state.ts +5 -0
  41. package/src/components/chat-ui/utils/get-icon.ts +81 -0
  42. package/src/components/code-editor.tsx +147 -0
  43. package/src/components/column-file-browser.stories.tsx +217 -0
  44. package/src/components/column-file-browser.tsx +380 -0
  45. package/src/components/content-placeholder.tsx +21 -0
  46. package/src/components/data-table/build-columns.tsx +78 -0
  47. package/src/components/data-table/data-table.css +51 -0
  48. package/src/components/data-table/data-table.stories.tsx +209 -0
  49. package/src/components/data-table/data-table.tsx +232 -0
  50. package/src/components/data-table/helpers.tsx +69 -0
  51. package/src/components/data-table/index.ts +3 -0
  52. package/src/components/data-table/pagination-footer.tsx +58 -0
  53. package/src/components/data-table/selection-toolbar.tsx +26 -0
  54. package/src/components/data-table/types.ts +21 -0
  55. package/src/components/delete-confirmation-modal.stories.tsx +46 -0
  56. package/src/components/delete-confirmation-modal.tsx +56 -0
  57. package/src/components/diff-bubble.stories.tsx +70 -0
  58. package/src/components/diff-bubble.tsx +70 -0
  59. package/src/components/diff-card.tsx +139 -0
  60. package/src/components/diff-drawer.stories.tsx +106 -0
  61. package/src/components/diff-drawer.tsx +59 -0
  62. package/src/components/diff-editor.tsx +55 -0
  63. package/src/components/drawer-inline.stories.tsx +124 -0
  64. package/src/components/drawer-inline.tsx +90 -0
  65. package/src/components/empty-state.stories.tsx +65 -0
  66. package/src/components/empty-state.tsx +28 -0
  67. package/src/components/error-boundary.tsx +80 -0
  68. package/src/components/file-selector.stories.tsx +166 -0
  69. package/src/components/file-selector.tsx +192 -0
  70. package/src/components/file-tree-helpers.ts +28 -0
  71. package/src/components/horizontal-menu-stack.tsx +15 -0
  72. package/src/components/info-card.stories.tsx +120 -0
  73. package/src/components/info-card.tsx +60 -0
  74. package/src/components/item-section.stories.tsx +57 -0
  75. package/src/components/item-section.tsx +57 -0
  76. package/src/components/layout.stories.tsx +341 -0
  77. package/src/components/layout.tsx +67 -0
  78. package/src/components/menu-item.stories.tsx +162 -0
  79. package/src/components/menu-item.tsx +207 -0
  80. package/src/components/number-input.tsx +21 -0
  81. package/src/components/open-source-notices-screen.stories.tsx +69 -0
  82. package/src/components/open-source-notices-screen.tsx +154 -0
  83. package/src/components/panel-menu.stories.tsx +44 -0
  84. package/src/components/panel-menu.tsx +27 -0
  85. package/src/components/param-editor-color-input.tsx +98 -0
  86. package/src/components/param-editor-date-input.tsx +106 -0
  87. package/src/components/param-editor-horizontal-text-input.tsx +130 -0
  88. package/src/components/param-editor-horizontal.stories.tsx +545 -0
  89. package/src/components/param-editor-horizontal.tsx +137 -0
  90. package/src/components/param-editor-input-group.tsx +145 -0
  91. package/src/components/param-editor-number-input.tsx +145 -0
  92. package/src/components/param-editor-selection-input.tsx +181 -0
  93. package/src/components/param-editor-text-input.tsx +113 -0
  94. package/src/components/param-editor.stories.tsx +986 -0
  95. package/src/components/param-editor.tsx +142 -0
  96. package/src/components/param-editor.types.ts +95 -0
  97. package/src/components/properties.stories.tsx +108 -0
  98. package/src/components/properties.tsx +73 -0
  99. package/src/components/pstdio-logo.tsx +26 -0
  100. package/src/components/resource-badge.stories.tsx +26 -0
  101. package/src/components/resource-badge.tsx +173 -0
  102. package/src/components/rich-text/collaborative-markdown-editor/awareness-cursors.tsx +45 -0
  103. package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.tsx +230 -0
  104. package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.tsx +131 -0
  105. package/src/components/rich-text/index.ts +14 -0
  106. package/src/components/rich-text/markdown-editor/markdown-editor.stories.tsx +147 -0
  107. package/src/components/rich-text/markdown-editor/markdown-editor.tsx +112 -0
  108. package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +100 -0
  109. package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +32 -0
  110. package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.ts +2 -0
  111. package/src/components/rich-text/prompt-input/commands.ts +44 -0
  112. package/src/components/rich-text/prompt-input/events.ts +21 -0
  113. package/src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx +8 -0
  114. package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts +49 -0
  115. package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts +30 -0
  116. package/src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx +127 -0
  117. package/src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx +32 -0
  118. package/src/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.tsx +30 -0
  119. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.ts +15 -0
  120. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.tsx +88 -0
  121. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.tsx +90 -0
  122. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.tsx +50 -0
  123. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.ts +3 -0
  124. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.tsx +50 -0
  125. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.ts +45 -0
  126. package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.ts +20 -0
  127. package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.tsx +50 -0
  128. package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.tsx +107 -0
  129. package/src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts +13 -0
  130. package/src/components/rich-text/prompt-input/prompt-input.stories.tsx +87 -0
  131. package/src/components/rich-text/prompt-input/prompt-input.tsx +106 -0
  132. package/src/components/rich-text/prompt-input/theme/prompt-input-theme.css +3 -0
  133. package/src/components/rich-text/prompt-input/theme/prompt-input-theme.ts +11 -0
  134. package/src/components/rich-text/prompt-input/utils.ts +158 -0
  135. package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +100 -0
  136. package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +32 -0
  137. package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.ts +2 -0
  138. package/src/components/rich-text/rich-message/rich-message.stories.tsx +146 -0
  139. package/src/components/rich-text/rich-message/rich-message.tsx +118 -0
  140. package/src/components/rich-text/shared/components/content-editable.tsx +28 -0
  141. package/src/components/rich-text/shared/components/default-rich-text-components.tsx +99 -0
  142. package/src/components/rich-text/shared/editor-config.ts +38 -0
  143. package/src/components/rich-text/shared/nodes/DataTableNode.stories.tsx +52 -0
  144. package/src/components/rich-text/shared/nodes/DataTableNode.tsx +73 -0
  145. package/src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx +22 -0
  146. package/src/components/rich-text/shared/plugins/CodePlugin/CodeNode.tsx +57 -0
  147. package/src/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.tsx +46 -0
  148. package/src/components/rich-text/shared/plugins/EquationPlugin/EquationNode.tsx +161 -0
  149. package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.css +16 -0
  150. package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx +45 -0
  151. package/src/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.tsx +40 -0
  152. package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.css +26 -0
  153. package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx +414 -0
  154. package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.ts +1 -0
  155. package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts +52 -0
  156. package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts +16 -0
  157. package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.css +163 -0
  158. package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx +355 -0
  159. package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx +6 -0
  160. package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts +17 -0
  161. package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts +39 -0
  162. package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts +23 -0
  163. package/src/components/rich-text/shared/plugins/StateUpdatePlugin.tsx +21 -0
  164. package/src/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.tsx +224 -0
  165. package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.css +3 -0
  166. package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.tsx +315 -0
  167. package/src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx +12 -0
  168. package/src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx +20 -0
  169. package/src/components/rich-text/shared/transformers/markdown-transformers.ts +123 -0
  170. package/src/components/rich-text/shared/types/rich-text-components.ts +17 -0
  171. package/src/components/rich-text/theme/report-theme.tsx +81 -0
  172. package/src/components/rich-text/theme/rich-text-theme.css +773 -0
  173. package/src/components/rich-text/theme/rich-text-theme.tsx +81 -0
  174. package/src/components/rich-text/types.ts +9 -0
  175. package/src/components/rich-text/utils/inferResourceType.ts +17 -0
  176. package/src/components/rich-text/utils/markdown.ts +12 -0
  177. package/src/components/rich-text/utils/mediaType.ts +31 -0
  178. package/src/components/session-indicator.stories.tsx +46 -0
  179. package/src/components/session-indicator.tsx +40 -0
  180. package/src/components/slider.stories.tsx +38 -0
  181. package/src/components/slider.tsx +20 -0
  182. package/src/components/style-guide-data.ts +374 -0
  183. package/src/components/style-guide.stories.tsx +212 -0
  184. package/src/components/style-guide.tsx +305 -0
  185. package/src/components/ticket-board.stories.tsx +109 -0
  186. package/src/components/ticket-board.tsx +167 -0
  187. package/src/components/ticket-card.stories.tsx +133 -0
  188. package/src/components/ticket-card.tsx +126 -0
  189. package/src/components/toaster.stories.tsx +79 -0
  190. package/src/components/toaster.tsx +26 -0
  191. package/src/components/tooltip.tsx +43 -0
  192. package/src/index.ts +16 -0
  193. package/src/theme/global.ts +49 -0
  194. package/src/theme/index.ts +10 -0
  195. package/src/theme/primitives/colors.ts +209 -0
  196. package/src/theme/primitives/fonts.ts +33 -0
  197. package/src/theme/primitives/sizes.ts +49 -0
  198. package/src/theme/recipes/alert.ts +12 -0
  199. package/src/theme/recipes/button.ts +124 -0
  200. package/src/theme/recipes/dialog.ts +11 -0
  201. package/src/theme/recipes/divider.ts +7 -0
  202. package/src/theme/recipes/drawer.ts +16 -0
  203. package/src/theme/recipes/editable.ts +42 -0
  204. package/src/theme/recipes/form.ts +11 -0
  205. package/src/theme/recipes/input.ts +25 -0
  206. package/src/theme/recipes/menu.ts +40 -0
  207. package/src/theme/recipes/popover.ts +46 -0
  208. package/src/theme/recipes/progress-circle.ts +22 -0
  209. package/src/theme/recipes/skeleton.ts +8 -0
  210. package/src/theme/recipes/textarea.ts +29 -0
  211. package/src/theme/recipes/tooltip.ts +15 -0
  212. package/src/theme/theme.ts +70 -0
  213. package/src/theme/tokens/borders.ts +38 -0
  214. package/src/theme/tokens/colors.ts +488 -0
  215. package/src/theme/tokens/layer-styles.ts +15 -0
  216. package/src/theme/tokens/shadows.ts +47 -0
  217. package/src/theme/tokens/text.ts +236 -0
  218. package/src/utils/apply-theme-preference.ts +17 -0
  219. package/src/utils/formats.ts +27 -0
  220. package/src/utils/get-file-type-icon.ts +52 -0
  221. package/src/utils/theme-preference.tsx +60 -0
  222. package/src/vite-env.d.ts +6 -0
  223. package/storybook-static/assets/CodeBlockPlugin-C3OWpvP8.js +281 -0
  224. package/storybook-static/assets/CodeBlockPlugin-e2vWgtYm.css +1 -0
  225. package/storybook-static/assets/DataTableNode.stories-DLgTftOI.js +33 -0
  226. package/storybook-static/assets/EquationComponent-CUFxwyNf.js +1 -0
  227. package/storybook-static/assets/EquationComponent-DWZwfaVI.css +1 -0
  228. package/storybook-static/assets/FloatingTextFormatToolbarPlugin-B6jc8xvg.js +1 -0
  229. package/storybook-static/assets/FloatingTextFormatToolbarPlugin-D2l3--Te.css +1 -0
  230. package/storybook-static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  231. package/storybook-static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  232. package/storybook-static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  233. package/storybook-static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  234. package/storybook-static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  235. package/storybook-static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  236. package/storybook-static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  237. package/storybook-static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  238. package/storybook-static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  239. package/storybook-static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  240. package/storybook-static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  241. package/storybook-static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  242. package/storybook-static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  243. package/storybook-static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  244. package/storybook-static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  245. package/storybook-static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  246. package/storybook-static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  247. package/storybook-static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  248. package/storybook-static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  249. package/storybook-static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  250. package/storybook-static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  251. package/storybook-static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  252. package/storybook-static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  253. package/storybook-static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  254. package/storybook-static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  255. package/storybook-static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  256. package/storybook-static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  257. package/storybook-static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  258. package/storybook-static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  259. package/storybook-static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  260. package/storybook-static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  261. package/storybook-static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  262. package/storybook-static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  263. package/storybook-static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  264. package/storybook-static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  265. package/storybook-static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  266. package/storybook-static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  267. package/storybook-static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  268. package/storybook-static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  269. package/storybook-static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  270. package/storybook-static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  271. package/storybook-static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  272. package/storybook-static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  273. package/storybook-static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  274. package/storybook-static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  275. package/storybook-static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  276. package/storybook-static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  277. package/storybook-static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  278. package/storybook-static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  279. package/storybook-static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  280. package/storybook-static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  281. package/storybook-static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  282. package/storybook-static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  283. package/storybook-static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  284. package/storybook-static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  285. package/storybook-static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  286. package/storybook-static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  287. package/storybook-static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  288. package/storybook-static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  289. package/storybook-static/assets/LexicalHistoryPlugin.prod-BQAibkDj.js +1 -0
  290. package/storybook-static/assets/TreeViewPlugin-CyVKCrKJ.js +24 -0
  291. package/storybook-static/assets/ai-conversation-DcjS--ee.js +1 -0
  292. package/storybook-static/assets/ai-conversation.stories-COjWuS8V.js +3 -0
  293. package/storybook-static/assets/ai-message-DLdAGhWH.js +1 -0
  294. package/storybook-static/assets/ai-message.stories-CRTyreKL.js +3 -0
  295. package/storybook-static/assets/ai-response-ySM6s0iN.js +1 -0
  296. package/storybook-static/assets/ai-response.stories-DVBYlrGf.js +11 -0
  297. package/storybook-static/assets/attachment-list-1p1601I5.js +1 -0
  298. package/storybook-static/assets/attachment-list.stories-Cydlsnio.js +7 -0
  299. package/storybook-static/assets/badge-CtgJasjB.js +1 -0
  300. package/storybook-static/assets/breadcrumb.stories-SAjB-iqH.js +5 -0
  301. package/storybook-static/assets/button-C7it2n8t.js +1 -0
  302. package/storybook-static/assets/button.stories-BMVbbb4y.js +72 -0
  303. package/storybook-static/assets/chat-input-B-915nCM.js +1 -0
  304. package/storybook-static/assets/chat-input.stories-DrxvpT9p.js +32 -0
  305. package/storybook-static/assets/chat-panel.stories-D0L6eIte.js +96 -0
  306. package/storybook-static/assets/chevron-down-BYCAGyCV.js +1 -0
  307. package/storybook-static/assets/chevron-right-owK1wZnx.js +1 -0
  308. package/storybook-static/assets/collaborative-markdown-editor-Bj0GvTvv.js +41 -0
  309. package/storybook-static/assets/collaborative-markdown-editor.stories-B_MUIC5s.js +11 -0
  310. package/storybook-static/assets/collapsible-DBDG7h1r.js +1 -0
  311. package/storybook-static/assets/collapsible-content-B1Uq3jUM.js +1 -0
  312. package/storybook-static/assets/column-file-browser.stories-DPMQnHCw.js +54 -0
  313. package/storybook-static/assets/compiler-runtime-BXE7OOXE.js +1 -0
  314. package/storybook-static/assets/computed-style-C0hzrq9-.js +1 -0
  315. package/storybook-static/assets/create-recipe-context-BU56IzEo.js +1 -0
  316. package/storybook-static/assets/create-slot-recipe-context-DAhDE6G_.js +1 -0
  317. package/storybook-static/assets/create-split-props-u5h9OPvL.js +1 -0
  318. package/storybook-static/assets/createLucideIcon-CcBBUKX8.js +1 -0
  319. package/storybook-static/assets/data-table-vuIeWXui.css +1 -0
  320. package/storybook-static/assets/data-table.stories-Cs-q7dpj.js +19 -0
  321. package/storybook-static/assets/delete-confirmation-modal.stories-C8vDKFRD.js +14 -0
  322. package/storybook-static/assets/diff-bubble-_zZypMRt.js +1 -0
  323. package/storybook-static/assets/diff-bubble.stories-DfonanIk.js +39 -0
  324. package/storybook-static/assets/diff-drawer.stories-CGDWiKD8.js +38 -0
  325. package/storybook-static/assets/diff-editor-DV9BXqbn.js +11 -0
  326. package/storybook-static/assets/dismissable-layer-Cc5dFRd8.js +1 -0
  327. package/storybook-static/assets/drawer-inline.stories-B3Tp7vjL.js +88 -0
  328. package/storybook-static/assets/empty-state-BXkyq69k.js +1 -0
  329. package/storybook-static/assets/empty-state.stories-6eYYBOWR.js +29 -0
  330. package/storybook-static/assets/factory-BR3bc_RM.js +1 -0
  331. package/storybook-static/assets/factory-DAJZwK4o.js +1 -0
  332. package/storybook-static/assets/file-selector.stories-PKIGBUd5.js +31 -0
  333. package/storybook-static/assets/file-text-D5m8MJlG.js +1 -0
  334. package/storybook-static/assets/flex-DAJL4AFZ.js +1 -0
  335. package/storybook-static/assets/folder-C5dba_Co.js +1 -0
  336. package/storybook-static/assets/form-D_Xln9tK.js +1 -0
  337. package/storybook-static/assets/full-conversation-normalized-LUbl1coD.js +1 -0
  338. package/storybook-static/assets/grid-7OIKBlfh.js +1 -0
  339. package/storybook-static/assets/h-stack-DWHd8f97.js +1 -0
  340. package/storybook-static/assets/horizontal-menu-stack-Cph6x7ui.js +1 -0
  341. package/storybook-static/assets/icon-C8FN9JqD.js +1 -0
  342. package/storybook-static/assets/icon-button-DHiUe7rR.js +1 -0
  343. package/storybook-static/assets/icons-WRA1cA-W.js +1 -0
  344. package/storybook-static/assets/iframe-2XPD_vrQ.css +1 -0
  345. package/storybook-static/assets/iframe-B8FSoBNY.js +1075 -0
  346. package/storybook-static/assets/index-B0y2_lLF.js +1 -0
  347. package/storybook-static/assets/index-CXwl6T4k.js +1 -0
  348. package/storybook-static/assets/index-DaXC_qY_.js +1 -0
  349. package/storybook-static/assets/index-DpB4ozcR.js +1 -0
  350. package/storybook-static/assets/index-cFwdnc0b.js +1 -0
  351. package/storybook-static/assets/info-DlgY5-DW.js +1 -0
  352. package/storybook-static/assets/info-card.stories-Cry0Qfrn.js +55 -0
  353. package/storybook-static/assets/input-ZSs5cSFQ.js +1 -0
  354. package/storybook-static/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  355. package/storybook-static/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  356. package/storybook-static/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  357. package/storybook-static/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  358. package/storybook-static/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  359. package/storybook-static/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  360. package/storybook-static/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  361. package/storybook-static/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  362. package/storybook-static/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  363. package/storybook-static/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  364. package/storybook-static/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  365. package/storybook-static/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  366. package/storybook-static/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  367. package/storybook-static/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  368. package/storybook-static/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  369. package/storybook-static/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  370. package/storybook-static/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  371. package/storybook-static/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  372. package/storybook-static/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  373. package/storybook-static/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  374. package/storybook-static/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  375. package/storybook-static/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  376. package/storybook-static/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  377. package/storybook-static/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  378. package/storybook-static/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  379. package/storybook-static/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  380. package/storybook-static/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  381. package/storybook-static/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  382. package/storybook-static/assets/item-section-AoQrVPNJ.js +1 -0
  383. package/storybook-static/assets/item-section.stories-kYTPHRsx.js +24 -0
  384. package/storybook-static/assets/layout.stories-DhSjwzU1.js +3 -0
  385. package/storybook-static/assets/link-DE5grRtm.js +1 -0
  386. package/storybook-static/assets/markdown-BLUemkxK.js +1 -0
  387. package/storybook-static/assets/markdown-editor-Y4eMsgVb.js +1 -0
  388. package/storybook-static/assets/markdown-editor.stories-DIWw-hRP.js +115 -0
  389. package/storybook-static/assets/menu-item-CrqDaj9K.js +1 -0
  390. package/storybook-static/assets/menu-item.stories-D9Isjjrf.js +68 -0
  391. package/storybook-static/assets/message-parts-renderer.stories-CewRvbm7.js +5 -0
  392. package/storybook-static/assets/message-types-CEyA7Qm7.js +60 -0
  393. package/storybook-static/assets/model-swap-separator.stories-DrQW2NWQ.js +9 -0
  394. package/storybook-static/assets/mutation-observer-CAfGweIM.js +1 -0
  395. package/storybook-static/assets/normalize-props-D7NI5JRu.js +1 -0
  396. package/storybook-static/assets/number-C92MPsRM.js +1 -0
  397. package/storybook-static/assets/number-input-D1aC-9ls.js +7 -0
  398. package/storybook-static/assets/onest-cyrillic-400-normal-BxvCLB5P.woff +0 -0
  399. package/storybook-static/assets/onest-cyrillic-400-normal-DH8vlB-A.woff2 +0 -0
  400. package/storybook-static/assets/onest-cyrillic-500-normal-CyY1vN0Q.woff +0 -0
  401. package/storybook-static/assets/onest-cyrillic-500-normal-DHyr8B2c.woff2 +0 -0
  402. package/storybook-static/assets/onest-cyrillic-700-normal-CwpXuTGk.woff2 +0 -0
  403. package/storybook-static/assets/onest-cyrillic-700-normal-DOtXtm0s.woff +0 -0
  404. package/storybook-static/assets/onest-latin-400-normal-BAzPRZHg.woff +0 -0
  405. package/storybook-static/assets/onest-latin-400-normal-bladozIj.woff2 +0 -0
  406. package/storybook-static/assets/onest-latin-500-normal-oFTiz6Nq.woff +0 -0
  407. package/storybook-static/assets/onest-latin-500-normal-qHiQtL66.woff2 +0 -0
  408. package/storybook-static/assets/onest-latin-700-normal-Bd6qVL4Q.woff2 +0 -0
  409. package/storybook-static/assets/onest-latin-700-normal-XTvQgpoh.woff +0 -0
  410. package/storybook-static/assets/onest-latin-ext-400-normal--mQR5RlC.woff2 +0 -0
  411. package/storybook-static/assets/onest-latin-ext-400-normal-BbXTNVXw.woff +0 -0
  412. package/storybook-static/assets/onest-latin-ext-500-normal-BlXa29q8.woff2 +0 -0
  413. package/storybook-static/assets/onest-latin-ext-500-normal-CoujUMv_.woff +0 -0
  414. package/storybook-static/assets/onest-latin-ext-700-normal-C-Tcltod.woff2 +0 -0
  415. package/storybook-static/assets/onest-latin-ext-700-normal-CSGWRWNE.woff +0 -0
  416. package/storybook-static/assets/open-source-notices-screen.stories-BpdJxDZC.js +21 -0
  417. package/storybook-static/assets/overflow-CkG1DOya.js +1 -0
  418. package/storybook-static/assets/panel-menu-CqLSrdTB.js +1 -0
  419. package/storybook-static/assets/panel-menu.stories-CxdWaWjq.js +14 -0
  420. package/storybook-static/assets/param-editor-horizontal.stories-C1o-VOjG.js +561 -0
  421. package/storybook-static/assets/param-editor-selection-input-2pJE1_W1.js +1 -0
  422. package/storybook-static/assets/param-editor.stories-0ae3y4Vu.js +921 -0
  423. package/storybook-static/assets/playfair-display-cyrillic-400-normal-CjW2EstV.woff2 +0 -0
  424. package/storybook-static/assets/playfair-display-cyrillic-400-normal-ZiRag6zj.woff +0 -0
  425. package/storybook-static/assets/playfair-display-cyrillic-600-normal-DbWAkkgN.woff +0 -0
  426. package/storybook-static/assets/playfair-display-cyrillic-600-normal-oLY6jnZ7.woff2 +0 -0
  427. package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
  428. package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
  429. package/storybook-static/assets/playfair-display-latin-400-normal-CFtfchNt.woff2 +0 -0
  430. package/storybook-static/assets/playfair-display-latin-400-normal-DHYHbkg3.woff +0 -0
  431. package/storybook-static/assets/playfair-display-latin-600-normal-CZLGqjJe.woff2 +0 -0
  432. package/storybook-static/assets/playfair-display-latin-600-normal-CxxueQ0Z.woff +0 -0
  433. package/storybook-static/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
  434. package/storybook-static/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
  435. package/storybook-static/assets/playfair-display-latin-ext-400-normal-BxlSGspa.woff2 +0 -0
  436. package/storybook-static/assets/playfair-display-latin-ext-400-normal-qdZwdvNS.woff +0 -0
  437. package/storybook-static/assets/playfair-display-latin-ext-600-normal-BumBfC1v.woff +0 -0
  438. package/storybook-static/assets/playfair-display-latin-ext-600-normal-CEjQclLc.woff2 +0 -0
  439. package/storybook-static/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
  440. package/storybook-static/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
  441. package/storybook-static/assets/playfair-display-vietnamese-400-normal-BV2APVTb.woff2 +0 -0
  442. package/storybook-static/assets/playfair-display-vietnamese-400-normal-BbvUAu4N.woff +0 -0
  443. package/storybook-static/assets/playfair-display-vietnamese-600-normal-BPJkAZPN.woff +0 -0
  444. package/storybook-static/assets/playfair-display-vietnamese-600-normal-ICsRR-qJ.woff2 +0 -0
  445. package/storybook-static/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
  446. package/storybook-static/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
  447. package/storybook-static/assets/portal-CZHfPTRw.js +1 -0
  448. package/storybook-static/assets/preload-helper-PPVm8Dsz.js +1 -0
  449. package/storybook-static/assets/prompt-input-BLCttowi.js +14 -0
  450. package/storybook-static/assets/prompt-input-BVbz9joI.css +1 -0
  451. package/storybook-static/assets/prompt-input.stories-J8-AMVXy.js +9 -0
  452. package/storybook-static/assets/properties.stories-Bs7ivKgb.js +59 -0
  453. package/storybook-static/assets/react-18-KY0R7ltw.js +9 -0
  454. package/storybook-static/assets/render-strategy-BebqUNCa.js +1 -0
  455. package/storybook-static/assets/resource-badge-Bw5UoU4J.js +1 -0
  456. package/storybook-static/assets/resource-badge.stories-DtSh-RX9.js +9 -0
  457. package/storybook-static/assets/rich-message-BIkzo1SM.js +1 -0
  458. package/storybook-static/assets/rich-message.stories-C9Wc4d3O.js +115 -0
  459. package/storybook-static/assets/rich-text-theme-Bkhh9rAZ.js +14 -0
  460. package/storybook-static/assets/rich-text-theme-K2MBoCbx.css +1 -0
  461. package/storybook-static/assets/separator-CQkMOHNm.js +1 -0
  462. package/storybook-static/assets/settings-DUgg22A7.js +1 -0
  463. package/storybook-static/assets/simple-grid-DIKjhnVI.js +1 -0
  464. package/storybook-static/assets/spinner-ZYH_gvW-.js +1 -0
  465. package/storybook-static/assets/stack-CN4X31TA.js +1 -0
  466. package/storybook-static/assets/star-CvcHIXRa.js +1 -0
  467. package/storybook-static/assets/style-guide.stories-BUvEhZov.js +6 -0
  468. package/storybook-static/assets/tabbable-DHAf8oAu.js +1 -0
  469. package/storybook-static/assets/table-BKNSzs2r.js +1 -0
  470. package/storybook-static/assets/textarea-rqmaWSc5.js +1 -0
  471. package/storybook-static/assets/toaster-d9nN0H7K.js +1 -0
  472. package/storybook-static/assets/toaster.stories-BRVCYyaM.js +52 -0
  473. package/storybook-static/assets/tool-invocation-timeline-B-cS0W6M.js +59 -0
  474. package/storybook-static/assets/tool-invocation-timeline.stories-DXO59O73.js +5 -0
  475. package/storybook-static/assets/tooltip-C_a-XGZ8.js +1 -0
  476. package/storybook-static/assets/tooltip-DZxUoouw.js +1 -0
  477. package/storybook-static/assets/trash-2-BO05slEk.js +1 -0
  478. package/storybook-static/assets/typeahead-CuY9WxfQ.js +1 -0
  479. package/storybook-static/assets/use-field-context-DoxKQlMm.js +1 -0
  480. package/storybook-static/assets/use-presence-context-DK2PGZth.js +1 -0
  481. package/storybook-static/assets/v-stack-Btoq6OB_.js +1 -0
  482. package/storybook-static/assets/x-D42ziktz.js +1 -0
  483. package/storybook-static/components/alert.d.ts +9 -0
  484. package/storybook-static/components/breadcrumb.d.ts +18 -0
  485. package/storybook-static/components/breadcrumb.stories.d.ts +25 -0
  486. package/storybook-static/components/chat-ui/agent-types.d.ts +205 -0
  487. package/storybook-static/components/chat-ui/components/ai-conversation.stories.d.ts +6 -0
  488. package/storybook-static/components/chat-ui/components/ai-message.d.ts +94 -0
  489. package/storybook-static/components/chat-ui/components/ai-message.stories.d.ts +6 -0
  490. package/storybook-static/components/chat-ui/components/ai-response.d.ts +6 -0
  491. package/storybook-static/components/chat-ui/components/ai-response.stories.d.ts +7 -0
  492. package/storybook-static/components/chat-ui/components/approval-prompt.d.ts +8 -0
  493. package/storybook-static/components/chat-ui/components/attachment-list.d.ts +23 -0
  494. package/storybook-static/components/chat-ui/components/attachment-list.stories.d.ts +6 -0
  495. package/storybook-static/components/chat-ui/components/auto-scroll.d.ts +10 -0
  496. package/storybook-static/components/chat-ui/components/chat-input.d.ts +16 -0
  497. package/storybook-static/components/chat-ui/components/chat-input.stories.d.ts +7 -0
  498. package/storybook-static/components/chat-ui/components/chat-panel.d.ts +18 -0
  499. package/storybook-static/components/chat-ui/components/chat-panel.stories.d.ts +8 -0
  500. package/storybook-static/components/chat-ui/components/message-parts-renderer.d.ts +12 -0
  501. package/storybook-static/components/chat-ui/components/message-parts-renderer.stories.d.ts +7 -0
  502. package/storybook-static/components/chat-ui/components/message-types.d.ts +6 -0
  503. package/storybook-static/components/chat-ui/components/model-swap-separator.d.ts +5 -0
  504. package/storybook-static/components/chat-ui/components/model-swap-separator.stories.d.ts +6 -0
  505. package/storybook-static/components/chat-ui/components/send-button.d.ts +7 -0
  506. package/storybook-static/components/chat-ui/components/timeline.d.ts +86 -0
  507. package/storybook-static/components/chat-ui/components/tool-invocation-timeline.d.ts +7 -0
  508. package/storybook-static/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +6 -0
  509. package/storybook-static/components/chat-ui/mocks/full-conversation-normalized.json.d.ts +3560 -0
  510. package/storybook-static/components/chat-ui/tool-rendering/build-timeline.d.ts +23 -0
  511. package/storybook-static/components/chat-ui/tool-rendering/default-renderers.d.ts +9 -0
  512. package/storybook-static/components/chat-ui/tool-rendering/index.d.ts +3 -0
  513. package/storybook-static/components/chat-ui/tool-rendering/types.d.ts +13 -0
  514. package/storybook-static/components/chat-ui/utils/diff.d.ts +21 -0
  515. package/storybook-static/components/chat-ui/utils/editor-state.d.ts +1 -0
  516. package/storybook-static/components/code-editor.d.ts +33 -0
  517. package/storybook-static/components/column-file-browser.d.ts +21 -0
  518. package/storybook-static/components/content-placeholder.d.ts +5 -0
  519. package/storybook-static/components/data-table.d.ts +18 -0
  520. package/storybook-static/components/data-table.stories.d.ts +33 -0
  521. package/storybook-static/components/delete-confirmation-modal.d.ts +10 -0
  522. package/storybook-static/components/delete-confirmation-modal.stories.d.ts +11 -0
  523. package/storybook-static/components/diff-bubble.d.ts +14 -0
  524. package/storybook-static/components/diff-bubble.stories.d.ts +13 -0
  525. package/storybook-static/components/diff-card.d.ts +14 -0
  526. package/storybook-static/components/diff-drawer.d.ts +6 -0
  527. package/storybook-static/components/diff-drawer.stories.d.ts +8 -0
  528. package/storybook-static/components/diff-editor.d.ts +9 -0
  529. package/storybook-static/components/drawer-inline.d.ts +24 -0
  530. package/storybook-static/components/drawer-inline.stories.d.ts +8 -0
  531. package/storybook-static/components/empty-state.d.ts +8 -0
  532. package/storybook-static/components/empty-state.stories.d.ts +34 -0
  533. package/storybook-static/components/error-boundary.d.ts +26 -0
  534. package/storybook-static/components/file-selector.d.ts +13 -0
  535. package/storybook-static/components/file-tree-helpers.d.ts +8 -0
  536. package/storybook-static/components/horizontal-menu-stack.d.ts +6 -0
  537. package/storybook-static/components/info-card.d.ts +13 -0
  538. package/storybook-static/components/item-section.d.ts +11 -0
  539. package/storybook-static/components/item-section.stories.d.ts +17 -0
  540. package/storybook-static/components/layout.d.ts +14 -0
  541. package/storybook-static/components/layout.stories.d.ts +11 -0
  542. package/storybook-static/components/menu-item.d.ts +40 -0
  543. package/storybook-static/components/open-source-notices-screen.d.ts +20 -0
  544. package/storybook-static/components/open-source-notices-screen.stories.d.ts +12 -0
  545. package/storybook-static/components/panel-menu.d.ts +7 -0
  546. package/storybook-static/components/panel-menu.stories.d.ts +7 -0
  547. package/storybook-static/components/param-editor-color-input.d.ts +13 -0
  548. package/storybook-static/components/param-editor-date-input.d.ts +15 -0
  549. package/storybook-static/components/param-editor-horizontal-text-input.d.ts +12 -0
  550. package/storybook-static/components/param-editor-horizontal.d.ts +10 -0
  551. package/storybook-static/components/param-editor-horizontal.stories.d.ts +19 -0
  552. package/storybook-static/components/param-editor-input-group.d.ts +10 -0
  553. package/storybook-static/components/param-editor-number-input.d.ts +17 -0
  554. package/storybook-static/components/param-editor-selection-input.d.ts +21 -0
  555. package/storybook-static/components/param-editor-text-input.d.ts +13 -0
  556. package/storybook-static/components/param-editor.d.ts +10 -0
  557. package/storybook-static/components/param-editor.stories.d.ts +23 -0
  558. package/storybook-static/components/param-editor.types.d.ts +71 -0
  559. package/storybook-static/components/properties.d.ts +18 -0
  560. package/storybook-static/components/properties.stories.d.ts +17 -0
  561. package/storybook-static/components/resource-badge.d.ts +62 -0
  562. package/storybook-static/components/resource-badge.stories.d.ts +7 -0
  563. package/storybook-static/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +5 -0
  564. package/storybook-static/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +8 -0
  565. package/storybook-static/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +9 -0
  566. package/storybook-static/components/rich-text/index.d.ts +14 -0
  567. package/storybook-static/components/rich-text/markdown-editor/markdown-editor.d.ts +8 -0
  568. package/storybook-static/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +6 -0
  569. package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +21 -0
  570. package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +2 -0
  571. package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +2 -0
  572. package/storybook-static/components/rich-text/prompt-input/commands.d.ts +19 -0
  573. package/storybook-static/components/rich-text/prompt-input/events.d.ts +15 -0
  574. package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +1 -0
  575. package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +3 -0
  576. package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +1 -0
  577. package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +17 -0
  578. package/storybook-static/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +7 -0
  579. package/storybook-static/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +4 -0
  580. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +12 -0
  581. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +10 -0
  582. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +9 -0
  583. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +12 -0
  584. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +2 -0
  585. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +13 -0
  586. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +9 -0
  587. package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +2 -0
  588. package/storybook-static/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +6 -0
  589. package/storybook-static/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +25 -0
  590. package/storybook-static/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +9 -0
  591. package/storybook-static/components/rich-text/prompt-input/prompt-input.d.ts +24 -0
  592. package/storybook-static/components/rich-text/prompt-input/prompt-input.stories.d.ts +8 -0
  593. package/storybook-static/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +3 -0
  594. package/storybook-static/components/rich-text/prompt-input/utils.d.ts +23 -0
  595. package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +21 -0
  596. package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +2 -0
  597. package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +2 -0
  598. package/storybook-static/components/rich-text/rich-message/rich-message.d.ts +7 -0
  599. package/storybook-static/components/rich-text/rich-message/rich-message.stories.d.ts +6 -0
  600. package/storybook-static/components/rich-text/shared/components/content-editable.d.ts +7 -0
  601. package/storybook-static/components/rich-text/shared/components/default-rich-text-components.d.ts +3 -0
  602. package/storybook-static/components/rich-text/shared/editor-config.d.ts +4 -0
  603. package/storybook-static/components/rich-text/shared/nodes/DataTableNode.d.ts +22 -0
  604. package/storybook-static/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +7 -0
  605. package/storybook-static/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +1 -0
  606. package/storybook-static/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +19 -0
  607. package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +6 -0
  608. package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +26 -0
  609. package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +4 -0
  610. package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +4 -0
  611. package/storybook-static/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +4 -0
  612. package/storybook-static/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -0
  613. package/storybook-static/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +13 -0
  614. package/storybook-static/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +2 -0
  615. package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +4 -0
  616. package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +1 -0
  617. package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +2 -0
  618. package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +1 -0
  619. package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +2 -0
  620. package/storybook-static/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +6 -0
  621. package/storybook-static/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +5 -0
  622. package/storybook-static/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +2 -0
  623. package/storybook-static/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +3 -0
  624. package/storybook-static/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +1 -0
  625. package/storybook-static/components/rich-text/shared/transformers/markdown-transformers.d.ts +15 -0
  626. package/storybook-static/components/rich-text/shared/types/rich-text-components.d.ts +15 -0
  627. package/storybook-static/components/rich-text/theme/report-theme.d.ts +3 -0
  628. package/storybook-static/components/rich-text/theme/rich-text-theme.d.ts +3 -0
  629. package/storybook-static/components/rich-text/types.d.ts +8 -0
  630. package/storybook-static/components/rich-text/utils/inferResourceType.d.ts +1 -0
  631. package/storybook-static/components/rich-text/utils/markdown.d.ts +4 -0
  632. package/storybook-static/components/rich-text/utils/mediaType.d.ts +1 -0
  633. package/storybook-static/components/schub-logo.d.ts +2 -0
  634. package/storybook-static/components/slider.d.ts +5 -0
  635. package/storybook-static/components/style-guide-data.d.ts +46 -0
  636. package/storybook-static/components/style-guide.d.ts +1 -0
  637. package/storybook-static/components/style-guide.stories.d.ts +14 -0
  638. package/storybook-static/components/toaster.stories.d.ts +11 -0
  639. package/storybook-static/components/tooltip.d.ts +12 -0
  640. package/storybook-static/favicon-wrapper.svg +46 -0
  641. package/storybook-static/favicon.svg +1 -0
  642. package/storybook-static/iframe.html +705 -0
  643. package/storybook-static/index.d.ts +14 -0
  644. package/storybook-static/index.html +150 -0
  645. package/storybook-static/index.json +1 -0
  646. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  647. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  648. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  649. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  650. package/storybook-static/project.json +1 -0
  651. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +628 -0
  652. package/storybook-static/sb-addons/themes-1/manager-bundle.js +3 -0
  653. package/storybook-static/sb-addons/vitest-2/manager-bundle.js +3 -0
  654. package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
  655. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  656. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  657. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  658. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  659. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  660. package/storybook-static/sb-manager/globals-runtime.js +77956 -0
  661. package/storybook-static/sb-manager/globals.js +24 -0
  662. package/storybook-static/sb-manager/manager-stores.js +23 -0
  663. package/storybook-static/sb-manager/runtime.js +20422 -0
  664. package/storybook-static/theme/applyThemePreference.d.ts +2 -0
  665. package/storybook-static/theme/global.d.ts +46 -0
  666. package/storybook-static/theme/index.d.ts +1 -0
  667. package/storybook-static/theme/primitives/colors.d.ts +958 -0
  668. package/storybook-static/theme/primitives/fonts.d.ts +81 -0
  669. package/storybook-static/theme/primitives/sizes.d.ts +89 -0
  670. package/storybook-static/theme/recipes/alert.d.ts +1 -0
  671. package/storybook-static/theme/recipes/button.d.ts +129 -0
  672. package/storybook-static/theme/recipes/dialog.d.ts +1 -0
  673. package/storybook-static/theme/recipes/divider.d.ts +1 -0
  674. package/storybook-static/theme/recipes/drawer.d.ts +1 -0
  675. package/storybook-static/theme/recipes/editable.d.ts +1 -0
  676. package/storybook-static/theme/recipes/form.d.ts +1 -0
  677. package/storybook-static/theme/recipes/input.d.ts +7 -0
  678. package/storybook-static/theme/recipes/menu.d.ts +1 -0
  679. package/storybook-static/theme/recipes/popover.d.ts +16 -0
  680. package/storybook-static/theme/recipes/progress-circle.d.ts +28 -0
  681. package/storybook-static/theme/recipes/skeleton.d.ts +1 -0
  682. package/storybook-static/theme/recipes/textarea.d.ts +1 -0
  683. package/storybook-static/theme/recipes/tooltip.d.ts +1 -0
  684. package/storybook-static/theme/theme-preference.d.ts +15 -0
  685. package/storybook-static/theme/theme.d.ts +2 -0
  686. package/storybook-static/theme/tokens/borders.d.ts +38 -0
  687. package/storybook-static/theme/tokens/colors.d.ts +898 -0
  688. package/storybook-static/theme/tokens/layer-styles.d.ts +1 -0
  689. package/storybook-static/theme/tokens/shadows.d.ts +64 -0
  690. package/storybook-static/theme/tokens/text.d.ts +1 -0
  691. package/storybook-static/theme/types.d.ts +1 -0
  692. package/storybook-static/utils/formats.d.ts +7 -0
  693. package/storybook-static/utils/get-file-type-icon.d.ts +2 -0
  694. package/storybook-static/vite-inject-mocker-entry.js +2 -0
  695. package/tsconfig.json +29 -0
  696. package/vite.config.ts +82 -0
  697. package/vitest.shims.d.ts +1 -0
@@ -0,0 +1,88 @@
1
+ import{j as r,r as D}from"./iframe-B8FSoBNY.js";import{c as y}from"./compiler-runtime-BXE7OOXE.js";import{H as S,C as v}from"./horizontal-menu-stack-Cph6x7ui.js";import{F as p}from"./flex-DAJL4AFZ.js";import{B as h}from"./index-B0y2_lLF.js";import{S as B}from"./stack-CN4X31TA.js";import{I as F}from"./icon-button-DHiUe7rR.js";import{I as R}from"./icon-C8FN9JqD.js";import{c as P}from"./createLucideIcon-CcBBUKX8.js";import{T as a}from"./index-cFwdnc0b.js";import{B as u}from"./button-C7it2n8t.js";import"./preload-helper-PPVm8Dsz.js";import"./h-stack-DWHd8f97.js";import"./factory-DAJZwK4o.js";import"./create-recipe-context-BU56IzEo.js";import"./spinner-ZYH_gvW-.js";import"./index-CXwl6T4k.js";const k=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]],_=P("panel-right-close",k);function g(o){const e=y.c(12);let t,n,i,s;if(e[0]!==o?({open:n,width:s,children:t,...i}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=i,e[4]=s):(t=e[1],n=e[2],i=e[3],s=e[4]),!n)return null;let d;e[5]===Symbol.for("react.memo_cache_sentinel")?(d=r.jsx(h,{width:"8px",height:"100%",borderRightWidth:"1px",children:r.jsx(v,{height:"100%"})}),e[5]=d):d=e[5];let l;e[6]!==t?(l=r.jsx(B,{flex:"1",minH:"0",gap:"0",children:t}),e[6]=t,e[7]=l):l=e[7];let c;return e[8]!==i||e[9]!==l||e[10]!==s?(c=r.jsxs(p,{height:"100%",width:s,maxW:"100%",bg:"bg",...i,children:[d,l]}),e[8]=i,e[9]=l,e[10]=s,e[11]=c):c=e[11],c}function I(o){const e=y.c(20);let t,n,i,s,d;e[0]!==o?({title:d,actions:t,onClose:i,children:n,...s}=o,e[0]=o,e[1]=t,e[2]=n,e[3]=i,e[4]=s,e[5]=d):(t=e[1],n=e[2],i=e[3],s=e[4],d=e[5]);let l;e[6]!==i?(l=i?r.jsx(F,{onClick:i,"aria-label":"Close preview",variant:"ghost",size:"sm",children:r.jsx(R,{as:_,boxSize:"16px"})}):null,e[6]=i,e[7]=l):l=e[7];let c;e[8]!==d?(c=d?r.jsx(a,{textStyle:"paragraph/M/medium",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",children:d}):null,e[8]=d,e[9]=c):c=e[9];let m;e[10]!==n||e[11]!==c?(m=r.jsxs(p,{align:"center",gap:"xs",minW:"0",flex:"1",children:[c,n]}),e[10]=n,e[11]=c,e[12]=m):m=e[12];let x;e[13]!==t?(x=r.jsx(p,{align:"center",gap:"xs",flexWrap:"wrap",justify:"flex-end",children:t}),e[13]=t,e[14]=x):x=e[14];let f;return e[15]!==s||e[16]!==l||e[17]!==m||e[18]!==x?(f=r.jsxs(S,{...s,gap:"sm",px:"sm",py:"xs",alignItems:"center",borderBottomWidth:"1px",bg:"bg",children:[l,m,x]}),e[15]=s,e[16]=l,e[17]=m,e[18]=x,e[19]=f):f=e[19],f}function T(o){const e=y.c(6);let t,n;e[0]!==o?({children:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let i;return e[3]!==t||e[4]!==n?(i=r.jsx(p,{...n,direction:"column",flex:"1",minH:"0",gap:"sm",borderWidth:"0",overflowY:"auto",children:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5],i}function C(o){const e=y.c(6);let t,n;e[0]!==o?({children:t,...n}=o,e[0]=o,e[1]=t,e[2]=n):(t=e[1],n=e[2]);let i;return e[3]!==t||e[4]!==n?(i=r.jsx(p,{...n,justify:"flex-end",align:"center",gap:"xs",px:"sm",py:"xs",borderTopWidth:"1px",bg:"bg",children:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5],i}g.__docgenInfo={description:"",methods:[],displayName:"DrawerInline",props:{open:{required:!1,tsType:{name:"boolean"},description:""},children:{required:!1,tsType:{name:'FlexProps["children"]',raw:'FlexProps["children"]'},description:""},width:{required:!1,tsType:{name:'FlexProps["width"]',raw:'FlexProps["width"]'},description:""}},composes:["FlexProps"]};I.__docgenInfo={description:"",methods:[],displayName:"DrawerInlineHeader",props:{title:{required:!1,tsType:{name:"string"},description:""},actions:{required:!1,tsType:{name:"ReactNode"},description:""},onClose:{required:!1,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},children:{required:!1,tsType:{name:'StackProps["children"]',raw:'StackProps["children"]'},description:""}},composes:["StackProps"]};T.__docgenInfo={description:"",methods:[],displayName:"DrawerInlineBody",props:{children:{required:!1,tsType:{name:'FlexProps["children"]',raw:'FlexProps["children"]'},description:""}},composes:["FlexProps"]};C.__docgenInfo={description:"",methods:[],displayName:"DrawerInlineFooter",props:{children:{required:!1,tsType:{name:'FlexProps["children"]',raw:'FlexProps["children"]'},description:""}},composes:["FlexProps"]};const U={title:"Components/DrawerInline",component:g,decorators:[o=>r.jsx(h,{height:"500px",width:"100%",p:"md",children:r.jsx(o,{})})]},w={render:o=>r.jsxs(p,{height:"100%",border:"1px solid",borderColor:"border.muted",borderRadius:"md",overflow:"hidden",children:[r.jsxs(h,{flex:"1",p:"md",children:[r.jsx(a,{children:"Main Content Area"}),r.jsx(a,{color:"fg.muted",textStyle:"label/XS",children:"The drawer will appear to the right of this content."})]}),r.jsxs(g,{...o,children:[r.jsx(I,{title:"Drawer Title",onClose:()=>{}}),r.jsxs(T,{p:"md",children:[r.jsx(a,{children:"This is the drawer body content."}),r.jsx(a,{color:"fg.muted",children:"It has a vertical separator on the left and scrolls if the content is too long."}),Array.from({length:10}).map((e,t)=>r.jsxs(h,{p:"sm",bg:"bg.muted",borderRadius:"sm",children:["Item ",t+1]},t))]}),r.jsxs(C,{children:[r.jsx(u,{variant:"outline",size:"sm",children:"Cancel"}),r.jsx(u,{variant:"solid",size:"sm",children:"Save"})]})]})]}),args:{open:!0,width:"320px"}},b={render:o=>r.jsxs(p,{height:"100%",border:"1px solid",borderColor:"border.muted",borderRadius:"md",overflow:"hidden",children:[r.jsxs(h,{flex:"1",p:"md",children:[r.jsx(a,{children:"Main Content Area"}),r.jsx(a,{color:"fg.muted",textStyle:"label/XS",children:"The drawer will appear to the right of this content."})]}),r.jsxs(g,{...o,children:[r.jsx(I,{title:"Project Settings",onClose:()=>{},actions:r.jsx(u,{variant:"ghost",size:"sm",children:"Edit"})}),r.jsxs(T,{p:"md",children:[r.jsx(a,{textStyle:"label/L/medium",children:"General Settings"}),r.jsx(h,{height:"100px",bg:"bg.muted",borderRadius:"md"}),r.jsx(a,{textStyle:"label/L/medium",children:"Advanced Settings"}),r.jsx(h,{height:"200px",bg:"bg.muted",borderRadius:"md"})]})]})]}),args:{open:!0,width:"400px"}},j={render:function(e){const[t,n]=D.useState(!1);return r.jsxs(p,{height:"100%",border:"1px solid",borderColor:"border.muted",borderRadius:"md",overflow:"hidden",children:[r.jsxs(h,{flex:"1",p:"md",children:[r.jsx(a,{mb:"md",children:"Main Content Area"}),r.jsx(u,{onClick:()=>n(!0),size:"sm",children:"Open Drawer"})]}),r.jsxs(g,{...e,open:t,children:[r.jsx(I,{title:"Interactive Drawer",onClose:()=>n(!1)}),r.jsxs(T,{p:"md",children:[r.jsx(a,{children:"Click the close icon in the header to close me."}),r.jsx(a,{color:"fg.muted",children:"The drawer is rendered inline with the main content, pushing it if necessary or simply occupying the assigned space."})]}),r.jsx(C,{children:r.jsx(u,{variant:"outline",size:"sm",onClick:()=>n(!1),children:"Close"})})]})]})},args:{width:"320px"}};w.parameters={...w.parameters,docs:{...w.parameters?.docs,source:{originalSource:`{
2
+ render: args => <Flex height="100%" border="1px solid" borderColor="border.muted" borderRadius="md" overflow="hidden">
3
+ <Box flex="1" p="md">
4
+ <Text>Main Content Area</Text>
5
+ <Text color="fg.muted" textStyle="label/XS">
6
+ The drawer will appear to the right of this content.
7
+ </Text>
8
+ </Box>
9
+ <DrawerInline {...args}>
10
+ <DrawerInlineHeader title="Drawer Title" onClose={() => {}} />
11
+ <DrawerInlineBody p="md">
12
+ <Text>This is the drawer body content.</Text>
13
+ <Text color="fg.muted">It has a vertical separator on the left and scrolls if the content is too long.</Text>
14
+ {Array.from({
15
+ length: 10
16
+ }).map((_, i) => <Box key={i} p="sm" bg="bg.muted" borderRadius="sm">
17
+ Item {i + 1}
18
+ </Box>)}
19
+ </DrawerInlineBody>
20
+ <DrawerInlineFooter>
21
+ <Button variant="outline" size="sm">
22
+ Cancel
23
+ </Button>
24
+ <Button variant="solid" size="sm">
25
+ Save
26
+ </Button>
27
+ </DrawerInlineFooter>
28
+ </DrawerInline>
29
+ </Flex>,
30
+ args: {
31
+ open: true,
32
+ width: "320px"
33
+ }
34
+ }`,...w.parameters?.docs?.source}}};b.parameters={...b.parameters,docs:{...b.parameters?.docs,source:{originalSource:`{
35
+ render: args => <Flex height="100%" border="1px solid" borderColor="border.muted" borderRadius="md" overflow="hidden">
36
+ <Box flex="1" p="md">
37
+ <Text>Main Content Area</Text>
38
+ <Text color="fg.muted" textStyle="label/XS">
39
+ The drawer will appear to the right of this content.
40
+ </Text>
41
+ </Box>
42
+ <DrawerInline {...args}>
43
+ <DrawerInlineHeader title="Project Settings" onClose={() => {}} actions={<Button variant="ghost" size="sm">
44
+ Edit
45
+ </Button>} />
46
+ <DrawerInlineBody p="md">
47
+ <Text textStyle="label/L/medium">General Settings</Text>
48
+ <Box height="100px" bg="bg.muted" borderRadius="md" />
49
+ <Text textStyle="label/L/medium">Advanced Settings</Text>
50
+ <Box height="200px" bg="bg.muted" borderRadius="md" />
51
+ </DrawerInlineBody>
52
+ </DrawerInline>
53
+ </Flex>,
54
+ args: {
55
+ open: true,
56
+ width: "400px"
57
+ }
58
+ }`,...b.parameters?.docs?.source}}};j.parameters={...j.parameters,docs:{...j.parameters?.docs,source:{originalSource:`{
59
+ render: function Render(args) {
60
+ const [open, setOpen] = useState(false);
61
+ return <Flex height="100%" border="1px solid" borderColor="border.muted" borderRadius="md" overflow="hidden">
62
+ <Box flex="1" p="md">
63
+ <Text mb="md">Main Content Area</Text>
64
+ <Button onClick={() => setOpen(true)} size="sm">
65
+ Open Drawer
66
+ </Button>
67
+ </Box>
68
+ <DrawerInline {...args} open={open}>
69
+ <DrawerInlineHeader title="Interactive Drawer" onClose={() => setOpen(false)} />
70
+ <DrawerInlineBody p="md">
71
+ <Text>Click the close icon in the header to close me.</Text>
72
+ <Text color="fg.muted">
73
+ The drawer is rendered inline with the main content, pushing it if necessary or simply occupying the
74
+ assigned space.
75
+ </Text>
76
+ </DrawerInlineBody>
77
+ <DrawerInlineFooter>
78
+ <Button variant="outline" size="sm" onClick={() => setOpen(false)}>
79
+ Close
80
+ </Button>
81
+ </DrawerInlineFooter>
82
+ </DrawerInline>
83
+ </Flex>;
84
+ },
85
+ args: {
86
+ width: "320px"
87
+ }
88
+ }`,...j.parameters?.docs?.source}}};const V=["Default","WithActions","Interactive"];export{w as Default,j as Interactive,b as WithActions,V as __namedExportsOrder,U as default};
@@ -0,0 +1 @@
1
+ import{r as h,j as n}from"./iframe-B8FSoBNY.js";import{c as y}from"./compiler-runtime-BXE7OOXE.js";import{V as E}from"./v-stack-Btoq6OB_.js";import{c as S}from"./create-slot-recipe-context-DAhDE6G_.js";const{withProvider:j,withContext:p}=S({key:"emptyState"}),R=j("div","root"),u=p("div","content"),g=p("div","indicator"),x=p("h3","title"),v=p("p","description"),w=h.forwardRef(function(m,f){const t=y.c(19);let r,e,i,s,o;t[0]!==m?({title:o,description:e,icon:i,children:r,...s}=m,t[0]=m,t[1]=r,t[2]=e,t[3]=i,t[4]=s,t[5]=o):(r=t[1],e=t[2],i=t[3],s=t[4],o=t[5]);let c;t[6]!==i?(c=i&&n.jsx(g,{children:i}),t[6]=i,t[7]=c):c=t[7];let a;t[8]!==e||t[9]!==o?(a=e?n.jsxs(E,{textAlign:"center",children:[n.jsx(x,{fontWeight:"normal",children:o}),n.jsx(v,{children:e})]}):n.jsx(x,{fontWeight:"normal",children:o}),t[8]=e,t[9]=o,t[10]=a):a=t[10];let l;t[11]!==r||t[12]!==c||t[13]!==a?(l=n.jsxs(u,{children:[c,a,r]}),t[11]=r,t[12]=c,t[13]=a,t[14]=l):l=t[14];let d;return t[15]!==f||t[16]!==s||t[17]!==l?(d=n.jsx(R,{ref:f,...s,children:l}),t[15]=f,t[16]=s,t[17]=l,t[18]=d):d=t[18],d});w.__docgenInfo={description:"",methods:[],displayName:"EmptyState",props:{title:{required:!0,tsType:{name:"string"},description:""},description:{required:!1,tsType:{name:"string"},description:""},icon:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""}}};export{w as E};
@@ -0,0 +1,29 @@
1
+ import{j as t}from"./iframe-B8FSoBNY.js";import{E as i}from"./empty-state-BXkyq69k.js";import{B as a}from"./index-B0y2_lLF.js";import{I as n}from"./icon-C8FN9JqD.js";import{F as p}from"./folder-C5dba_Co.js";import{B as m}from"./button-C7it2n8t.js";import{F as d}from"./file-text-D5m8MJlG.js";import"./preload-helper-PPVm8Dsz.js";import"./compiler-runtime-BXE7OOXE.js";import"./v-stack-Btoq6OB_.js";import"./stack-CN4X31TA.js";import"./factory-DAJZwK4o.js";import"./create-slot-recipe-context-DAhDE6G_.js";import"./create-recipe-context-BU56IzEo.js";import"./createLucideIcon-CcBBUKX8.js";import"./spinner-ZYH_gvW-.js";import"./index-CXwl6T4k.js";const A={title:"Components/EmptyState",component:i,decorators:[e=>t.jsx(a,{padding:"sm",background:"bg",children:t.jsx(e,{})})],args:{title:"No documents yet.",description:"Upload files to start building extractions."}},o={render:e=>t.jsx(a,{width:"100%",maxWidth:"420px",children:t.jsx(i,{...e})})},r={args:{title:"Nothing uploaded yet.",description:"Drop files into sample-raw or use the upload action.",icon:t.jsx(n,{as:d,boxSize:"28px",color:"fg.muted"})},render:e=>t.jsx(a,{width:"100%",maxWidth:"420px",children:t.jsx(i,{...e,children:t.jsx(m,{size:"sm",variant:"outline",children:"Upload files"})})})},s={args:{title:"This folder is empty.",size:"sm",textAlign:"left",alignItems:"flex-start",icon:t.jsx(n,{as:p,boxSize:"20px",color:"fg.muted"})},render:e=>t.jsx(a,{width:"100%",maxWidth:"420px",children:t.jsx(i,{...e})})};o.parameters={...o.parameters,docs:{...o.parameters?.docs,source:{originalSource:`{
2
+ render: (args: EmptyStateProps) => <Box width="100%" maxWidth="420px">
3
+ <EmptyState {...args} />
4
+ </Box>
5
+ }`,...o.parameters?.docs?.source}}};r.parameters={...r.parameters,docs:{...r.parameters?.docs,source:{originalSource:`{
6
+ args: {
7
+ title: "Nothing uploaded yet.",
8
+ description: "Drop files into sample-raw or use the upload action.",
9
+ icon: <Icon as={FileText} boxSize="28px" color="fg.muted" />
10
+ },
11
+ render: (args: EmptyStateProps) => <Box width="100%" maxWidth="420px">
12
+ <EmptyState {...args}>
13
+ <Button size="sm" variant="outline">
14
+ Upload files
15
+ </Button>
16
+ </EmptyState>
17
+ </Box>
18
+ }`,...r.parameters?.docs?.source}}};s.parameters={...s.parameters,docs:{...s.parameters?.docs,source:{originalSource:`{
19
+ args: {
20
+ title: "This folder is empty.",
21
+ size: "sm",
22
+ textAlign: "left",
23
+ alignItems: "flex-start",
24
+ icon: <Icon as={Folder} boxSize="20px" color="fg.muted" />
25
+ },
26
+ render: (args: EmptyStateProps) => <Box width="100%" maxWidth="420px">
27
+ <EmptyState {...args} />
28
+ </Box>
29
+ }`,...s.parameters?.docs?.source}}};const F=["Default","WithIconAndAction","Compact"];export{s as Compact,o as Default,r as WithIconAndAction,F as __namedExportsOrder,A as default};
@@ -0,0 +1 @@
1
+ import{r as s}from"./iframe-B8FSoBNY.js";var O=t=>Array.isArray(t),h=t=>t!=null&&typeof t=="object",Q=t=>h(t)&&!O(t),d=t=>typeof t=="string",j=t=>typeof t=="function",Y=t=>t==null,w=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),R=t=>Object.prototype.toString.call(t),N=Function.prototype.toString,C=N.call(Object),tt=t=>{if(!h(t)||R(t)!="[object Object]"||T(t))return!1;const e=Object.getPrototypeOf(t);if(e===null)return!0;const r=w(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&N.call(r)==C},A=t=>typeof t=="object"&&t!==null&&"$$typeof"in t&&"props"in t,S=t=>typeof t=="object"&&t!==null&&"__v_isVNode"in t,T=t=>A(t)||S(t),et=(t,...e)=>(typeof t=="function"?t(...e):t)??void 0,rt=t=>t,nt=t=>t(),ot=()=>{},_=(...t)=>(...e)=>{t.forEach(function(r){r?.(...e)})},at=(()=>{let t=0;return()=>(t++,t.toString(36))})(),D=(t,e)=>{try{return t()}catch(r){return r instanceof Error&&Error.captureStackTrace?.(r,D),e?.()}};function x(t,e){return`${t} returned \`undefined\`. Seems you forgot to wrap component within ${e}`}function st(t={}){const{name:e,strict:r=!0,hookName:o="useContext",providerName:n="Provider",errorMessage:c,defaultValue:l}=t,a=s.createContext(l);a.displayName=e;function u(){const g=s.useContext(a);if(!g&&r){const m=new Error(c??x(o,n));throw m.name="ContextError",w(Error,"captureStackTrace")&&j(Error.captureStackTrace)&&Error.captureStackTrace(m,u),m}return g}return[a.Provider,u,a]}var M=(...t)=>t.map(e=>e?.trim?.()).filter(Boolean).join(" "),P=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,E=t=>{const e={};let r;for(;r=P.exec(t);)e[r[1]]=r[2];return e},k=(t,e)=>{if(d(t)){if(d(e))return`${t};${e}`;t=E(t)}else d(e)&&(e=E(e));return Object.assign({},t??{},e??{})};function W(...t){let e={};for(let r of t){if(!r)continue;for(let n in e){if(n.startsWith("on")&&typeof e[n]=="function"&&typeof r[n]=="function"){e[n]=_(r[n],e[n]);continue}if(n==="className"||n==="class"){e[n]=M(e[n],r[n]);continue}if(n==="style"){e[n]=k(e[n],r[n]);continue}e[n]=r[n]!==void 0?r[n]:e[n]}for(let n in r)e[n]===void 0&&(e[n]=r[n]);const o=Object.getOwnPropertySymbols(r);for(let n of o)e[n]=r[n]}return e}var it=t=>Math.max(0,Math.min(1,t)),ct=(t,e)=>t.map((r,o)=>t[(Math.max(e,0)+o)%t.length]),ut=()=>{},p=t=>typeof t=="object"&&t!==null,ft=2147483647,lt=t=>t?"":void 0,pt=t=>t?"true":void 0,$=1,F=9,V=11,i=t=>p(t)&&t.nodeType===$&&typeof t.nodeName=="string",y=t=>p(t)&&t.nodeType===F,G=t=>p(t)&&t===t.window,b=t=>i(t)?t.localName||"":"#document";function mt(t){return["html","body","#document"].includes(b(t))}var X=t=>p(t)&&t.nodeType!==void 0,f=t=>X(t)&&t.nodeType===V&&"host"in t,I=t=>i(t)&&t.localName==="input",dt=t=>!!t?.matches("a[href]"),vt=t=>i(t)?t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0:!1;function yt(t){if(!t)return!1;const e=t.getRootNode();return B(e)===t}var L=/(textarea|select)/;function gt(t){if(t==null||!i(t))return!1;try{return I(t)&&t.selectionStart!=null||L.test(t.localName)||t.isContentEditable||t.getAttribute("contenteditable")==="true"||t.getAttribute("contenteditable")===""}catch{return!1}}function Et(t,e){if(!t||!e||!i(t)||!i(e))return!1;const r=e.getRootNode?.();if(t===e||t.contains(e))return!0;if(r&&f(r)){let o=e;for(;o;){if(t===o)return!0;o=o.parentNode||o.host}}return!1}function U(t){return y(t)?t:G(t)?t.document:t?.ownerDocument??document}function H(t){return U(t).documentElement}function z(t){return f(t)?z(t.host):y(t)?t.defaultView??window:i(t)?t.ownerDocument?.defaultView??window:window}function B(t){let e=t.activeElement;for(;e?.shadowRoot;){const r=e.shadowRoot.activeElement;if(!r||r===e)break;e=r}return e}function ht(t){if(b(t)==="html")return t;const e=t.assignedSlot||t.parentNode||f(t)&&t.host||H(t);return f(e)?e.host:e}function wt(t){let e;try{if(e=t.getRootNode({composed:!0}),y(e)||f(e))return e}catch{}return t.ownerDocument??document}function q(...t){return e=>{const r=[];for(const o of t)if(typeof o=="function"){const n=o(e);typeof n=="function"&&r.push(n)}else o&&(o.current=e);if(r.length)return()=>{for(const o of r)o()}}}function J(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const v=t=>{const e=s.memo(s.forwardRef((r,o)=>{const{asChild:n,children:c,...l}=r;if(!n)return s.createElement(t,{...l,ref:o},c);if(!s.isValidElement(c))return null;const a=s.Children.only(c),u=J(a);return s.cloneElement(a,{...W(l,a.props),ref:o?q(o,u):u})}));return e.displayName=t.displayName||t.name,e},K=()=>{const t=new Map;return new Proxy(v,{apply(e,r,o){return v(o[0])},get(e,r){const o=r;return t.has(o)||t.set(o,v(o)),t.get(o)}})},Nt=K();export{tt as A,ut as B,nt as C,j as D,d as E,ht as F,mt as G,wt as H,vt as I,at as J,et as K,ft as M,Nt as a,B as b,st as c,i as d,q as e,Q as f,U as g,w as h,y as i,lt as j,dt as k,pt as l,W as m,gt as n,O as o,it as p,z as q,_ as r,yt as s,D as t,Et as u,rt as v,ct as w,f as x,ot as y,Y as z};
@@ -0,0 +1 @@
1
+ import{n as B,r as c,o as $,u as V,s as M,q as K,w as X,t as Y,T as G,v as Z,c as S,x as J,j as m,y as Q,z as ee,A as te}from"./iframe-B8FSoBNY.js";var re=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,ne=B(function(e){return re.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function oe(...e){return function(...r){e.forEach(n=>n?.(...r))}}const se=(...e)=>e.map(t=>t?.trim?.()).filter(Boolean).join(" "),ie=/^on[A-Z]/;function ae(...e){let t={};for(let r of e){for(let n in t){if(ie.test(n)&&typeof t[n]=="function"&&typeof r[n]=="function"){t[n]=oe(t[n],r[n]);continue}if(n==="className"||n==="class"){t[n]=se(t[n],r[n]);continue}if(n==="style"){t[n]=Object.assign({},t[n]??{},r[n]??{});continue}t[n]=r[n]!==void 0?r[n]:t[n]}for(let n in r)t[n]===void 0&&(t[n]=r[n])}return t}const le=parseInt(c.version.split(".")[0],10),ce=le>=19;function E(e,t){if(e!=null){if(typeof e=="function")return e(t);try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function de(...e){const t=e.filter(r=>r!=null);if(ce){const r=new Map;return n=>(t.forEach(o=>{const i=E(o,n);i&&r.set(o,i)}),()=>{t.forEach(o=>{const i=r.get(o);i&&typeof i=="function"?i():E(o,null)}),r.clear()})}else return r=>{t.forEach(n=>{E(n,r)})}}function pe(e){return e.default||e}function ue(e){const t=c.version;return!$(t)||t.startsWith("18.")?e?.ref:e?.props?.ref}const fe=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function me(e){return typeof e=="string"&&fe.has(e)}function he(e,t,r){const{css:n,isValidProperty:o}=V(),{children:i,...d}=e,h=c.useMemo(()=>{const[g,x]=M(d,w=>r(w,t.variantKeys)),[k,T]=M(x,t.variantKeys),[A,R]=M(T,o);return{forwardedProps:g,variantProps:k,styleProps:A,elementProps:R}},[t.variantKeys,r,d,o]),{css:p,...y}=h.styleProps,u=c.useMemo(()=>{const g={...h.variantProps},x=t.variantKeys.includes("colorPalette"),k=t.variantKeys.includes("orientation");return x||(g.colorPalette=d.colorPalette),k||(g.orientation=d.orientation),t(g)},[t,h.variantProps,d.colorPalette,d.orientation]);return{styles:c.useMemo(()=>n(u,...ye(p),y),[n,u,p,y]),props:{...h.forwardedProps,...h.elementProps,children:i}}}const ye=e=>(Array.isArray(e)?e:[e]).filter(Boolean).flat(),ge=pe(ne),Pe=ge,xe=e=>e!=="theme",ke=(e,t,r)=>{let n;if(t){const o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?i=>e.__emotion_forwardProp(i)&&o(i):o}return typeof n!="function"&&r&&(n=e.__emotion_forwardProp),n};let we=typeof document<"u";const z=({cache:e,serialized:t,isStringTag:r})=>{Q(e,t,r);const n=ee(()=>te(e,t,r));if(!we&&n!==void 0){let o=t.name,i=t.next;for(;i!==void 0;)o=S(o,i.name),i=i.next;return m.jsx("style",{"data-emotion":S(e.key,o),dangerouslySetInnerHTML:{__html:n},nonce:e.sheet.nonce})}return null},U={path:["d"],text:["x","y"],circle:["cx","cy","r"],rect:["width","height","x","y","rx","ry"],ellipse:["cx","cy","rx","ry"],g:["transform"],stop:["offset","stopOpacity"]},ve=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Se=(e,t={},r={})=>{if(ve(U,e)){r.forwardProps||(r.forwardProps=[]);const y=U[e];r.forwardProps=K([...r.forwardProps,...y])}const n=e.__emotion_real===e,o=n&&e.__emotion_base||e;let i,d;r!==void 0&&(i=r.label,d=r.target);let h=[];const p=X((y,u,C)=>{const{cva:g,isValidProperty:x}=V(),k=t.__cva__?t:g(t),T=_e(e.__emotion_cva,k),A=s=>(P,F)=>s.includes(P)?!0:!F?.includes(P)&&!x(P);!r.shouldForwardProp&&r.forwardProps&&(r.shouldForwardProp=A(r.forwardProps));const R=(s,P)=>{const F=typeof e=="string"&&e.charCodeAt(0)>96?Pe:xe,q=!P?.includes(s)&&!x(s);return F(s)&&q},w=ke(e,r,n)||R,D=c.useMemo(()=>Object.assign({},r.defaultProps,Y(y)),[y]),{props:a,styles:W}=he(D,T,w);let f="",N=[W],b=a;if(a.theme==null){b={};for(let s in a)b[s]=a[s];b.theme=c.useContext(G)}typeof a.className=="string"?f=Z(u.registered,N,a.className):a.className!=null&&(f=S(f,a.className));const _=J(h.concat(N),u.registered,b);_.styles&&(f=S(f,`${u.key}-${_.name}`)),d!==void 0&&(f=S(f,d));const I=!w("as");let v=I&&a.as||o,l={};for(let s in a)if(!(I&&s==="as")){if(me(s)){const P=s.replace("html","").toLowerCase();l[P]=a[s];continue}w(s)&&(l[s]=a[s])}let L=f.trim();L?l.className=L:Reflect.deleteProperty(l,"className"),l.ref=C;const H=r.forwardAsChild||r.forwardProps?.includes("asChild");if(a.asChild&&!H){const s=c.isValidElement(a.children)?c.Children.only(a.children):c.Children.toArray(a.children).find(c.isValidElement);if(!s)throw new Error("[chakra-ui > factory] No valid child found");v=s.type,l.children=null,Reflect.deleteProperty(l,"asChild"),l=ae(l,s.props),l.ref=de(C,ue(s))}return l.as&&H?(l.as=void 0,m.jsxs(c.Fragment,{children:[m.jsx(z,{cache:u,serialized:_,isStringTag:typeof v=="string"}),m.jsx(v,{asChild:!0,...l,children:m.jsx(a.as,{children:l.children})})]})):m.jsxs(c.Fragment,{children:[m.jsx(z,{cache:u,serialized:_,isStringTag:typeof v=="string"}),m.jsx(v,{...l})]})});return p.displayName=i!==void 0?i:`chakra(${typeof o=="string"?o:o.displayName||o.name||"Component"})`,p.__emotion_real=p,p.__emotion_base=o,p.__emotion_forwardProp=r.shouldForwardProp,p.__emotion_cva=t,Object.defineProperty(p,"toString",{value(){return`.${d}`}}),p},O=Se.bind(),j=new Map,be=new Proxy(O,{apply(e,t,r){return O(...r)},get(e,t){return j.has(t)||j.set(t,O(t)),j.get(t)}}),Te=be,_e=(e,t)=>e&&!t?e:!e&&t?t:e.merge(t);export{Te as c,ae as m};
@@ -0,0 +1,31 @@
1
+ import{b as P,r as v,j as u}from"./iframe-B8FSoBNY.js";import{c as Fe}from"./compiler-runtime-BXE7OOXE.js";import{E as ht}from"./empty-state-BXkyq69k.js";import{i as le,g as Ce}from"./typeahead-CuY9WxfQ.js";import{f as te,h as ne,j as y,k as z,l as re,n as pt,o as oe,c as Ve,m as k,a as A}from"./factory-BR3bc_RM.js";import{I as we}from"./icon-C8FN9JqD.js";import{F as ft}from"./folder-C5dba_Co.js";import{S as $}from"./stack-CN4X31TA.js";import{T as Q}from"./index-cFwdnc0b.js";import{F as gt}from"./file-text-D5m8MJlG.js";import{u as mt,E as Nt}from"./create-recipe-context-BU56IzEo.js";import{c as xt}from"./factory-DAJZwK4o.js";import{d as Ct,S as Vt}from"./spinner-ZYH_gvW-.js";import{B as ue}from"./index-B0y2_lLF.js";import{c as yt}from"./create-slot-recipe-context-DAhDE6G_.js";import{c as he}from"./create-split-props-u5h9OPvL.js";import{s as Le,R as _e,u as Et}from"./render-strategy-BebqUNCa.js";import{f as G,h as ce,j as J,k as Pe,l as fe,m as W,g as Tt,o as vt,p as ke,q as St,c as bt,t as wt,v as Ie,w as ge,x as me,r as U,y as Ne,z as Pt,a as kt,u as It,b as Rt,n as Bt}from"./normalize-props-D7NI5JRu.js";import{s as At}from"./form-D_Xln9tK.js";import{C as Dt,a as jt}from"./collapsible-content-B1Uq3jUM.js";import{B as Ft}from"./badge-CtgJasjB.js";import"./preload-helper-PPVm8Dsz.js";import"./v-stack-Btoq6OB_.js";import"./createLucideIcon-CcBBUKX8.js";import"./index-DaXC_qY_.js";import"./index-DpB4ozcR.js";import"./mutation-observer-CAfGweIM.js";import"./tabbable-DHAf8oAu.js";import"./computed-style-C0hzrq9-.js";import"./number-C92MPsRM.js";var Lt=Object.defineProperty,_t=(n,t,e)=>t in n?Lt(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,p=(n,t,e)=>_t(n,typeof t!="symbol"?t+"":t,e);function Me(n,t,e){for(let r=0;r<t.length;r++)n=e.getChildren(n,t.slice(r+1))[t[r]];return n}function Mt(n){const t=Ot(n),e=[],r=new Set;for(const o of t){const s=o.join();r.has(s)||(r.add(s),e.push(o))}return e}function Oe(n,t){for(let e=0;e<Math.min(n.length,t.length);e++){if(n[e]<t[e])return-1;if(n[e]>t[e])return 1}return n.length-t.length}function Ot(n){return n.sort(Oe)}function Kt(n,t){let e;return B(n,{...t,onEnter:(r,o)=>{if(t.predicate(r,o))return e=r,"stop"}}),e}function Ht(n,t){const e=[];return B(n,{onEnter:(r,o)=>{t.predicate(r,o)&&e.push(r)},getChildren:t.getChildren}),e}function Re(n,t){let e;return B(n,{onEnter:(r,o)=>{if(t.predicate(r,o))return e=[...o],"stop"},getChildren:t.getChildren}),e}function Wt(n,t){let e=t.initialResult;return B(n,{...t,onEnter:(r,o)=>{e=t.nextResult(e,r,o)}}),e}function Gt(n,t){return Wt(n,{...t,initialResult:[],nextResult:(e,r,o)=>(e.push(...t.transform(r,o)),e)})}function $t(n,t){const{predicate:e,create:r,getChildren:o}=t,s=(i,d)=>{const c=o(i,d),f=[];c.forEach((b,H)=>{const C=[...d,H],T=s(b,C);T&&f.push(T)});const N=d.length===0,x=e(i,d),V=f.length>0;return N||x||V?r(i,f,d):null};return s(n,[])||r(n,[],[])}function Xt(n,t){const e=[];let r=0;const o=new Map,s=new Map;return B(n,{getChildren:t.getChildren,onEnter:(i,d)=>{o.has(i)||o.set(i,r++);const c=t.getChildren(i,d);c.forEach(b=>{s.has(b)||s.set(b,i),o.has(b)||o.set(b,r++)});const f=c.length>0?c.map(b=>o.get(b)):void 0,N=s.get(i),x=N?o.get(N):void 0,V=o.get(i);e.push({...i,_children:f,_parent:x,_index:V})}}),e}function qt(n,t){return{type:"insert",index:n,nodes:t}}function Ut(n){return{type:"remove",indexes:n}}function ye(){return{type:"replace"}}function Ke(n){return[n.slice(0,-1),n[n.length-1]]}function He(n,t,e=new Map){const[r,o]=Ke(n);for(let i=r.length-1;i>=0;i--){const d=r.slice(0,i).join();e.get(d)?.type!=="remove"&&e.set(d,ye())}const s=e.get(r.join());return s?.type==="remove"?e.set(r.join(),{type:"removeThenInsert",removeIndexes:s.indexes,insertIndex:o,insertNodes:t}):e.set(r.join(),qt(o,t)),e}function We(n){const t=new Map,e=new Map;for(const r of n){const o=r.slice(0,-1).join(),s=e.get(o)??[];s.push(r[r.length-1]),e.set(o,s.sort((i,d)=>i-d))}for(const r of n)for(let o=r.length-2;o>=0;o--){const s=r.slice(0,o).join();t.has(s)||t.set(s,ye())}for(const[r,o]of e)t.set(r,Ut(o));return t}function Yt(n,t){const e=new Map,[r,o]=Ke(n);for(let s=r.length-1;s>=0;s--){const i=r.slice(0,s).join();e.set(i,ye())}return e.set(r.join(),{type:"removeThenInsert",removeIndexes:[o],insertIndex:o,insertNodes:[t]}),e}function pe(n,t,e){return Jt(n,{...e,getChildren:(r,o)=>{const s=o.join();switch(t.get(s)?.type){case"replace":case"remove":case"removeThenInsert":case"insert":return e.getChildren(r,o);default:return[]}},transform:(r,o,s)=>{const i=s.join(),d=t.get(i);switch(d?.type){case"remove":return e.create(r,o.filter((N,x)=>!d.indexes.includes(x)),s);case"removeThenInsert":const c=o.filter((N,x)=>!d.removeIndexes.includes(x)),f=d.removeIndexes.reduce((N,x)=>x<N?N-1:N,d.insertIndex);return e.create(r,Be(c,f,0,...d.insertNodes),s);case"insert":return e.create(r,Be(o,d.index,0,...d.nodes),s);case"replace":return e.create(r,o,s);default:return r}}})}function Be(n,t,e,...r){return[...n.slice(0,t),...r,...n.slice(t+e)]}function Jt(n,t){const e={};return B(n,{...t,onLeave:(r,o)=>{const s=[0,...o],i=s.join(),d=t.transform(r,e[i]??[],o),c=s.slice(0,-1).join(),f=e[c]??[];f.push(d),e[c]=f}}),e[""][0]}function Qt(n,t){const{nodes:e,at:r}=t;if(r.length===0)throw new Error("Can't insert nodes at the root");const o=He(r,e);return pe(n,o,t)}function Zt(n,t){if(t.at.length===0)return t.node;const e=Yt(t.at,t.node);return pe(n,e,t)}function zt(n,t){if(t.indexPaths.length===0)return n;for(const r of t.indexPaths)if(r.length===0)throw new Error("Can't remove the root node");const e=We(t.indexPaths);return pe(n,e,t)}function en(n,t){if(t.indexPaths.length===0)return n;for(const s of t.indexPaths)if(s.length===0)throw new Error("Can't move the root node");if(t.to.length===0)throw new Error("Can't move nodes to the root");const e=Mt(t.indexPaths),r=e.map(s=>Me(n,s,t)),o=He(t.to,r,We(e));return pe(n,o,t)}function B(n,t){const{onEnter:e,onLeave:r,getChildren:o}=t;let s=[],i=[{node:n}];const d=t.reuseIndexPath?()=>s:()=>s.slice();for(;i.length>0;){let c=i[i.length-1];if(c.state===void 0){const N=e?.(c.node,d());if(N==="stop")return;c.state=N==="skip"?-1:0}const f=c.children||o(c.node,d());if(c.children||(c.children=f),c.state!==-1){if(c.state<f.length){let x=c.state;s.push(x),i.push({node:f[x]}),c.state=x+1;continue}if(r?.(c.node,d())==="stop")return}s.pop(),i.pop()}}var Ee=class Ge{constructor(t){this.options=t,p(this,"rootNode"),p(this,"isEqual",e=>le(this.rootNode,e.rootNode)),p(this,"getNodeChildren",e=>this.options.nodeToChildren?.(e)??Z.nodeToChildren(e)??[]),p(this,"resolveIndexPath",e=>typeof e=="string"?this.getIndexPath(e):e),p(this,"resolveNode",e=>{const r=this.resolveIndexPath(e);return r?this.at(r):void 0}),p(this,"getNodeChildrenCount",e=>this.options.nodeToChildrenCount?.(e)??Z.nodeToChildrenCount(e)),p(this,"getNodeValue",e=>this.options.nodeToValue?.(e)??Z.nodeToValue(e)),p(this,"getNodeDisabled",e=>this.options.isNodeDisabled?.(e)??Z.isNodeDisabled(e)),p(this,"stringify",e=>{const r=this.findNode(e);return r?this.stringifyNode(r):null}),p(this,"stringifyNode",e=>this.options.nodeToString?.(e)??Z.nodeToString(e)),p(this,"getFirstNode",(e=this.rootNode,r={})=>{let o;return B(e,{getChildren:this.getNodeChildren,onEnter:(s,i)=>{if(!this.isSameNode(s,e)){if(r.skip?.({value:this.getNodeValue(s),node:s,indexPath:i}))return"skip";if(!o&&i.length>0&&!this.getNodeDisabled(s))return o=s,"stop"}}}),o}),p(this,"getLastNode",(e=this.rootNode,r={})=>{let o;return B(e,{getChildren:this.getNodeChildren,onEnter:(s,i)=>{if(!this.isSameNode(s,e)){if(r.skip?.({value:this.getNodeValue(s),node:s,indexPath:i}))return"skip";i.length>0&&!this.getNodeDisabled(s)&&(o=s)}}}),o}),p(this,"at",e=>Me(this.rootNode,e,{getChildren:this.getNodeChildren})),p(this,"findNode",(e,r=this.rootNode)=>Kt(r,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===e})),p(this,"findNodes",(e,r=this.rootNode)=>{const o=new Set(e.filter(s=>s!=null));return Ht(r,{getChildren:this.getNodeChildren,predicate:s=>o.has(this.getNodeValue(s))})}),p(this,"sort",e=>e.reduce((r,o)=>{const s=this.getIndexPath(o);return s&&r.push({value:o,indexPath:s}),r},[]).sort((r,o)=>Oe(r.indexPath,o.indexPath)).map(({value:r})=>r)),p(this,"getValue",e=>{const r=this.at(e);return r?this.getNodeValue(r):void 0}),p(this,"getValuePath",e=>{if(!e)return[];const r=[];let o=[...e];for(;o.length>0;){const s=this.at(o);s&&r.unshift(this.getNodeValue(s)),o.pop()}return r}),p(this,"getDepth",e=>Re(this.rootNode,{getChildren:this.getNodeChildren,predicate:o=>this.getNodeValue(o)===e})?.length??0),p(this,"isSameNode",(e,r)=>this.getNodeValue(e)===this.getNodeValue(r)),p(this,"isRootNode",e=>this.isSameNode(e,this.rootNode)),p(this,"contains",(e,r)=>!e||!r?!1:r.slice(0,e.length).every((o,s)=>e[s]===r[s])),p(this,"getNextNode",(e,r={})=>{let o=!1,s;return B(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,d)=>{if(this.isRootNode(i))return;const c=this.getNodeValue(i);if(r.skip?.({value:c,node:i,indexPath:d}))return c===e&&(o=!0),"skip";if(o&&!this.getNodeDisabled(i))return s=i,"stop";c===e&&(o=!0)}}),s}),p(this,"getPreviousNode",(e,r={})=>{let o,s=!1;return B(this.rootNode,{getChildren:this.getNodeChildren,onEnter:(i,d)=>{if(this.isRootNode(i))return;const c=this.getNodeValue(i);if(r.skip?.({value:c,node:i,indexPath:d}))return"skip";if(c===e)return s=!0,"stop";this.getNodeDisabled(i)||(o=i)}}),s?o:void 0}),p(this,"getParentNodes",e=>{const r=this.resolveIndexPath(e)?.slice();if(!r)return[];const o=[];for(;r.length>0;){r.pop();const s=this.at(r);s&&!this.isRootNode(s)&&o.unshift(s)}return o}),p(this,"getDescendantNodes",(e,r)=>{const o=this.resolveNode(e);if(!o)return[];const s=[];return B(o,{getChildren:this.getNodeChildren,onEnter:(i,d)=>{d.length!==0&&(!r?.withBranch&&this.isBranchNode(i)||s.push(i))}}),s}),p(this,"getDescendantValues",(e,r)=>this.getDescendantNodes(e,r).map(s=>this.getNodeValue(s))),p(this,"getParentIndexPath",e=>e.slice(0,-1)),p(this,"getParentNode",e=>{const r=this.resolveIndexPath(e);return r?this.at(this.getParentIndexPath(r)):void 0}),p(this,"visit",e=>{const{skip:r,...o}=e;B(this.rootNode,{...o,getChildren:this.getNodeChildren,onEnter:(s,i)=>{if(!this.isRootNode(s))return r?.({value:this.getNodeValue(s),node:s,indexPath:i})?"skip":o.onEnter?.(s,i)}})}),p(this,"getPreviousSibling",e=>{const r=this.getParentNode(e);if(!r)return;const o=this.getNodeChildren(r);let s=e[e.length-1];for(;--s>=0;){const i=o[s];if(!this.getNodeDisabled(i))return i}}),p(this,"getNextSibling",e=>{const r=this.getParentNode(e);if(!r)return;const o=this.getNodeChildren(r);let s=e[e.length-1];for(;++s<o.length;){const i=o[s];if(!this.getNodeDisabled(i))return i}}),p(this,"getSiblingNodes",e=>{const r=this.getParentNode(e);return r?this.getNodeChildren(r):[]}),p(this,"getValues",(e=this.rootNode)=>Gt(e,{getChildren:this.getNodeChildren,transform:o=>[this.getNodeValue(o)]}).slice(1)),p(this,"isValidDepth",(e,r)=>r==null?!0:typeof r=="function"?r(e.length):e.length===r),p(this,"isBranchNode",e=>this.getNodeChildren(e).length>0||this.getNodeChildrenCount(e)!=null),p(this,"getBranchValues",(e=this.rootNode,r={})=>{let o=[];return B(e,{getChildren:this.getNodeChildren,onEnter:(s,i)=>{if(i.length===0)return;const d=this.getNodeValue(s);if(r.skip?.({value:d,node:s,indexPath:i}))return"skip";this.isBranchNode(s)&&this.isValidDepth(i,r.depth)&&o.push(this.getNodeValue(s))}}),o}),p(this,"flatten",(e=this.rootNode)=>Xt(e,{getChildren:this.getNodeChildren})),p(this,"_create",(e,r)=>this.getNodeChildren(e).length>0||r.length>0?{...e,children:r}:{...e}),p(this,"_insert",(e,r,o)=>this.copy(Qt(e,{at:r,nodes:o,getChildren:this.getNodeChildren,create:this._create}))),p(this,"copy",e=>new Ge({...this.options,rootNode:e})),p(this,"_replace",(e,r,o)=>this.copy(Zt(e,{at:r,node:o,getChildren:this.getNodeChildren,create:this._create}))),p(this,"_move",(e,r,o)=>this.copy(en(e,{indexPaths:r,to:o,getChildren:this.getNodeChildren,create:this._create}))),p(this,"_remove",(e,r)=>this.copy(zt(e,{indexPaths:r,getChildren:this.getNodeChildren,create:this._create}))),p(this,"replace",(e,r)=>this._replace(this.rootNode,e,r)),p(this,"remove",e=>this._remove(this.rootNode,e)),p(this,"insertBefore",(e,r)=>this.getParentNode(e)?this._insert(this.rootNode,e,r):void 0),p(this,"insertAfter",(e,r)=>{if(!this.getParentNode(e))return;const s=[...e.slice(0,-1),e[e.length-1]+1];return this._insert(this.rootNode,s,r)}),p(this,"move",(e,r)=>this._move(this.rootNode,e,r)),p(this,"filter",e=>{const r=$t(this.rootNode,{predicate:e,getChildren:this.getNodeChildren,create:this._create});return this.copy(r)}),p(this,"toJSON",()=>this.getValues(this.rootNode)),this.rootNode=t.rootNode}getIndexPath(t){if(Array.isArray(t)){if(t.length===0)return[];const e=[];let r=this.getNodeChildren(this.rootNode);for(let o=0;o<t.length;o++){const s=t[o],i=r.findIndex(d=>this.getNodeValue(d)===s);if(i===-1)break;if(e.push(i),o<t.length-1){const d=r[i];r=this.getNodeChildren(d)}}return e}else return Re(this.rootNode,{getChildren:this.getNodeChildren,predicate:e=>this.getNodeValue(e)===t})}},Z={nodeToValue(n){return typeof n=="string"?n:te(n)&&ne(n,"value")?n.value:""},nodeToString(n){return typeof n=="string"?n:te(n)&&ne(n,"label")?n.label:Z.nodeToValue(n)},isNodeDisabled(n){return te(n)&&ne(n,"disabled")?!!n.disabled:!1},nodeToChildren(n){return n.children},nodeToChildrenCount(n){if(te(n)&&ne(n,"childrenCount"))return n.childrenCount}};const tn=n=>new Ee(n);var $e=n=>new Ee(n);$e.empty=()=>new Ee({rootNode:{children:[]}});var nn=n=>n.ids?.root??`tree:${n.id}:root`,Ae=n=>n.ids?.label??`tree:${n.id}:label`,Te=(n,t)=>n.ids?.node?.(t)??`tree:${n.id}:node:${t}`,xe=n=>n.ids?.tree??`tree:${n.id}:tree`,S=(n,t)=>{t!=null&&n.getById(Te(n,t))?.focus()},Xe=(n,t)=>`tree:${n.id}:rename-input:${t}`,De=(n,t)=>n.getById(Xe(n,t));function qe(n,t,e){const r=n.getNodeValue(t);if(!n.isBranchNode(t))return e.includes(r);const o=n.getDescendantValues(r),s=o.every(d=>e.includes(d)),i=o.some(d=>e.includes(d));return s?!0:i?"indeterminate":!1}function rn(n,t,e){const r=n.getDescendantValues(t),o=r.every(s=>e.includes(s));return G(o?ce(e,...r):J(e,...r))}function on(n,t){const e=new Map;return n.visit({onEnter:r=>{const o=n.getNodeValue(r),s=n.isBranchNode(r),i=qe(n,r,t);e.set(o,{type:s?"branch":"leaf",checked:i})}}),e}function sn(n,t){const{context:e,scope:r,computed:o,prop:s,send:i}=n,d=s("collection"),c=Array.from(e.get("expandedValue")),f=Array.from(e.get("selectedValue")),N=Array.from(e.get("checkedValue")),x=o("isTypingAhead"),V=e.get("focusedValue"),b=e.get("loadingStatus"),H=e.get("renamingValue"),C=({indexPath:l})=>d.getValuePath(l).slice(0,-1).some(h=>!c.includes(h)),T=d.getFirstNode(void 0,{skip:C}),w=T?d.getNodeValue(T):null;function E(l){const{node:a,indexPath:h}=l,m=d.getNodeValue(a);return{id:Te(r,m),value:m,indexPath:h,valuePath:d.getValuePath(h),disabled:!!a.disabled,focused:V==null?w===m:V===m,selected:f.includes(m),expanded:c.includes(m),loading:b[m]==="loading",depth:h.length,isBranch:d.isBranchNode(a),renaming:H===m,get checked(){return qe(d,a,N)}}}return{collection:d,expandedValue:c,selectedValue:f,checkedValue:N,toggleChecked(l,a){i({type:"CHECKED.TOGGLE",value:l,isBranch:a})},setChecked(l){i({type:"CHECKED.SET",value:l})},clearChecked(){i({type:"CHECKED.CLEAR"})},getCheckedMap(){return on(d,N)},expand(l){i({type:l?"BRANCH.EXPAND":"EXPANDED.ALL",value:l})},collapse(l){i({type:l?"BRANCH.COLLAPSE":"EXPANDED.CLEAR",value:l})},deselect(l){i({type:l?"NODE.DESELECT":"SELECTED.CLEAR",value:l})},select(l){i({type:l?"NODE.SELECT":"SELECTED.ALL",value:l,isTrusted:!1})},getVisibleNodes(){return o("visibleNodes")},focus(l){S(r,l)},selectParent(l){const a=d.getParentNode(l);if(!a)return;const h=J(f,d.getNodeValue(a));i({type:"SELECTED.SET",value:h,src:"select.parent"})},expandParent(l){const a=d.getParentNode(l);if(!a)return;const h=J(c,d.getNodeValue(a));i({type:"EXPANDED.SET",value:h,src:"expand.parent"})},setExpandedValue(l){const a=G(l);i({type:"EXPANDED.SET",value:a})},setSelectedValue(l){const a=G(l);i({type:"SELECTED.SET",value:a})},startRenaming(l){i({type:"NODE.RENAME",value:l})},submitRenaming(l,a){i({type:"RENAME.SUBMIT",value:l,label:a})},cancelRenaming(){i({type:"RENAME.CANCEL"})},getRootProps(){return t.element({...P.root.attrs,id:nn(r),dir:s("dir")})},getLabelProps(){return t.element({...P.label.attrs,id:Ae(r),dir:s("dir")})},getTreeProps(){return t.element({...P.tree.attrs,id:xe(r),dir:s("dir"),role:"tree","aria-label":"Tree View","aria-labelledby":Ae(r),"aria-multiselectable":s("selectionMode")==="multiple"||void 0,tabIndex:-1,onKeyDown(l){if(l.defaultPrevented||Pe(l))return;const a=Tt(l);if(pt(a))return;const h=a?.closest("[data-part=branch-control], [data-part=item]");if(!h)return;const m=h.dataset.value;if(m==null){console.warn("[zag-js/tree-view] Node id not found for node",h);return}const R=h.matches("[data-part=branch-control]"),j={ArrowDown(g){W(g)||(g.preventDefault(),i({type:"NODE.ARROW_DOWN",id:m,shiftKey:g.shiftKey}))},ArrowUp(g){W(g)||(g.preventDefault(),i({type:"NODE.ARROW_UP",id:m,shiftKey:g.shiftKey}))},ArrowLeft(g){W(g)||h.dataset.disabled||(g.preventDefault(),i({type:R?"BRANCH_NODE.ARROW_LEFT":"NODE.ARROW_LEFT",id:m}))},ArrowRight(g){!R||h.dataset.disabled||(g.preventDefault(),i({type:"BRANCH_NODE.ARROW_RIGHT",id:m}))},Home(g){W(g)||(g.preventDefault(),i({type:"NODE.HOME",id:m,shiftKey:g.shiftKey}))},End(g){W(g)||(g.preventDefault(),i({type:"NODE.END",id:m,shiftKey:g.shiftKey}))},Space(g){h.dataset.disabled||(x?i({type:"TREE.TYPEAHEAD",key:g.key}):j.Enter?.(g))},Enter(g){h.dataset.disabled||z(a)&&W(g)||(i({type:R?"BRANCH_NODE.CLICK":"NODE.CLICK",id:m,src:"keyboard"}),z(a)||g.preventDefault())},"*"(g){h.dataset.disabled||(g.preventDefault(),i({type:"SIBLINGS.EXPAND",id:m}))},a(g){!g.metaKey||h.dataset.disabled||(g.preventDefault(),i({type:"SELECTED.ALL",moveFocus:!0}))},F2(g){if(h.dataset.disabled)return;const _=s("canRename");if(!_)return;const M=d.getIndexPath(m);if(M){const q=d.at(M);if(q&&!_(q,M))return}g.preventDefault(),i({type:"NODE.RENAME",value:m})}},L=vt(l,{dir:s("dir")}),X=j[L];if(X){X(l);return}Ce.isValidEvent(l)&&(i({type:"TREE.TYPEAHEAD",key:l.key,id:m}),l.preventDefault())}})},getNodeState:E,getItemProps(l){const a=E(l);return t.element({...P.item.attrs,id:a.id,dir:s("dir"),"data-ownedby":xe(r),"data-path":l.indexPath.join("/"),"data-value":a.value,tabIndex:a.focused?0:-1,"data-focus":y(a.focused),role:"treeitem","aria-current":a.selected?"true":void 0,"aria-selected":a.disabled?void 0:a.selected,"data-selected":y(a.selected),"aria-disabled":re(a.disabled),"data-disabled":y(a.disabled),"data-renaming":y(a.renaming),"aria-level":a.depth,"data-depth":a.depth,style:{"--depth":a.depth},onFocus(h){h.stopPropagation(),i({type:"NODE.FOCUS",id:a.value})},onClick(h){if(a.disabled||!fe(h)||z(h.currentTarget)&&W(h))return;const m=h.metaKey||h.ctrlKey;i({type:"NODE.CLICK",id:a.value,shiftKey:h.shiftKey,ctrlKey:m}),h.stopPropagation(),z(h.currentTarget)||h.preventDefault()}})},getItemTextProps(l){const a=E(l);return t.element({...P.itemText.attrs,"data-disabled":y(a.disabled),"data-selected":y(a.selected),"data-focus":y(a.focused)})},getItemIndicatorProps(l){const a=E(l);return t.element({...P.itemIndicator.attrs,"aria-hidden":!0,"data-disabled":y(a.disabled),"data-selected":y(a.selected),"data-focus":y(a.focused),hidden:!a.selected})},getBranchProps(l){const a=E(l);return t.element({...P.branch.attrs,"data-depth":a.depth,dir:s("dir"),"data-branch":a.value,role:"treeitem","data-ownedby":xe(r),"data-value":a.value,"aria-level":a.depth,"aria-selected":a.disabled?void 0:a.selected,"data-path":l.indexPath.join("/"),"data-selected":y(a.selected),"aria-expanded":a.expanded,"data-state":a.expanded?"open":"closed","aria-disabled":re(a.disabled),"data-disabled":y(a.disabled),"data-loading":y(a.loading),"aria-busy":re(a.loading),style:{"--depth":a.depth}})},getBranchIndicatorProps(l){const a=E(l);return t.element({...P.branchIndicator.attrs,"aria-hidden":!0,"data-state":a.expanded?"open":"closed","data-disabled":y(a.disabled),"data-selected":y(a.selected),"data-focus":y(a.focused),"data-loading":y(a.loading)})},getBranchTriggerProps(l){const a=E(l);return t.element({...P.branchTrigger.attrs,role:"button",dir:s("dir"),"data-disabled":y(a.disabled),"data-state":a.expanded?"open":"closed","data-value":a.value,"data-loading":y(a.loading),disabled:a.loading,onClick(h){a.disabled||a.loading||(i({type:"BRANCH_TOGGLE.CLICK",id:a.value}),h.stopPropagation())}})},getBranchControlProps(l){const a=E(l);return t.element({...P.branchControl.attrs,role:"button",id:a.id,dir:s("dir"),tabIndex:a.focused?0:-1,"data-path":l.indexPath.join("/"),"data-state":a.expanded?"open":"closed","data-disabled":y(a.disabled),"data-selected":y(a.selected),"data-focus":y(a.focused),"data-renaming":y(a.renaming),"data-value":a.value,"data-depth":a.depth,"data-loading":y(a.loading),"aria-busy":re(a.loading),onFocus(h){i({type:"NODE.FOCUS",id:a.value}),h.stopPropagation()},onClick(h){if(a.disabled||a.loading||!fe(h)||z(h.currentTarget)&&W(h))return;const m=h.metaKey||h.ctrlKey;i({type:"BRANCH_NODE.CLICK",id:a.value,shiftKey:h.shiftKey,ctrlKey:m}),h.stopPropagation()}})},getBranchTextProps(l){const a=E(l);return t.element({...P.branchText.attrs,dir:s("dir"),"data-disabled":y(a.disabled),"data-state":a.expanded?"open":"closed","data-loading":y(a.loading)})},getBranchContentProps(l){const a=E(l);return t.element({...P.branchContent.attrs,role:"group",dir:s("dir"),"data-state":a.expanded?"open":"closed","data-depth":a.depth,"data-path":l.indexPath.join("/"),"data-value":a.value,hidden:!a.expanded})},getBranchIndentGuideProps(l){const a=E(l);return t.element({...P.branchIndentGuide.attrs,"data-depth":a.depth})},getNodeCheckboxProps(l){const a=E(l),h=a.checked;return t.element({...P.nodeCheckbox.attrs,tabIndex:-1,role:"checkbox","data-state":h===!0?"checked":h===!1?"unchecked":"indeterminate","aria-checked":h===!0?"true":h===!1?"false":"mixed","data-disabled":y(a.disabled),onClick(m){if(m.defaultPrevented||a.disabled||!fe(m))return;i({type:"CHECKED.TOGGLE",value:a.value,isBranch:a.isBranch}),m.stopPropagation(),m.currentTarget.closest("[role=treeitem]")?.focus({preventScroll:!0})}})},getNodeRenameInputProps(l){const a=E(l);return t.input({...P.nodeRenameInput.attrs,id:Xe(r,a.value),type:"text","aria-label":"Rename tree item",hidden:!a.renaming,onKeyDown(h){Pe(h)||(h.key==="Escape"&&(i({type:"RENAME.CANCEL"}),h.preventDefault()),h.key==="Enter"&&(i({type:"RENAME.SUBMIT",label:h.currentTarget.value}),h.preventDefault()),h.stopPropagation())},onBlur(h){i({type:"RENAME.SUBMIT",label:h.currentTarget.value})}})}}}function se(n,t){const{context:e,prop:r,refs:o}=n;if(!r("loadChildren")){e.set("expandedValue",C=>G(J(C,...t)));return}const s=e.get("loadingStatus"),[i,d]=ke(t,C=>s[C]==="loaded");if(i.length>0&&e.set("expandedValue",C=>G(J(C,...i))),d.length===0)return;const c=r("collection"),[f,N]=ke(d,C=>{const T=c.findNode(C);return c.getNodeChildren(T).length>0});if(f.length>0&&e.set("expandedValue",C=>G(J(C,...f))),N.length===0)return;e.set("loadingStatus",C=>({...C,...N.reduce((T,w)=>({...T,[w]:"loading"}),{})}));const x=N.map(C=>{const T=c.getIndexPath(C),w=c.getValuePath(T),E=c.findNode(C);return{id:C,indexPath:T,valuePath:w,node:E}}),V=o.get("pendingAborts"),b=r("loadChildren");St(b,()=>"[zag-js/tree-view] `loadChildren` is required for async expansion");const H=x.map(({id:C,indexPath:T,valuePath:w,node:E})=>{const l=V.get(C);l&&(l.abort(),V.delete(C));const a=new AbortController;return V.set(C,a),b({valuePath:w,indexPath:T,node:E,signal:a.signal})});Promise.allSettled(H).then(C=>{const T=[],w=[],E=e.get("loadingStatus");let l=r("collection");C.forEach((a,h)=>{const{id:m,indexPath:R,node:j,valuePath:L}=x[h];a.status==="fulfilled"?(E[m]="loaded",T.push(m),l=l.replace(R,{...j,children:a.value})):(V.delete(m),Reflect.deleteProperty(E,m),w.push({node:j,error:a.reason,indexPath:R,valuePath:L}))}),e.set("loadingStatus",E),T.length&&(e.set("expandedValue",a=>G(J(a,...T))),r("onLoadChildrenComplete")?.({collection:l})),w.length&&r("onLoadChildrenError")?.({nodes:w})})}function O(n){const{prop:t,context:e}=n;return function({indexPath:o}){return t("collection").getValuePath(o).slice(0,-1).some(i=>!e.get("expandedValue").includes(i))}}var{and:K}=wt(),an=bt({props({props:n}){return{selectionMode:"single",collection:$e.empty(),typeahead:!0,expandOnClick:!0,defaultExpandedValue:[],defaultSelectedValue:[],...n}},initialState(){return"idle"},context({prop:n,bindable:t,getContext:e}){return{expandedValue:t(()=>({defaultValue:n("defaultExpandedValue"),value:n("expandedValue"),isEqual:le,onChange(r){const s=e().get("focusedValue");n("onExpandedChange")?.({expandedValue:r,focusedValue:s,get expandedNodes(){return n("collection").findNodes(r)}})}})),selectedValue:t(()=>({defaultValue:n("defaultSelectedValue"),value:n("selectedValue"),isEqual:le,onChange(r){const s=e().get("focusedValue");n("onSelectionChange")?.({selectedValue:r,focusedValue:s,get selectedNodes(){return n("collection").findNodes(r)}})}})),focusedValue:t(()=>({defaultValue:n("defaultFocusedValue")||null,value:n("focusedValue"),onChange(r){n("onFocusChange")?.({focusedValue:r,get focusedNode(){return r?n("collection").findNode(r):null}})}})),loadingStatus:t(()=>({defaultValue:{}})),checkedValue:t(()=>({defaultValue:n("defaultCheckedValue")||[],value:n("checkedValue"),isEqual:le,onChange(r){n("onCheckedChange")?.({checkedValue:r})}})),renamingValue:t(()=>({sync:!0,defaultValue:null}))}},refs(){return{typeaheadState:{...Ce.defaultOptions},pendingAborts:new Map}},computed:{isMultipleSelection:({prop:n})=>n("selectionMode")==="multiple",isTypingAhead:({refs:n})=>n.get("typeaheadState").keysSoFar.length>0,visibleNodes:({prop:n,context:t})=>{const e=[];return n("collection").visit({skip:O({prop:n,context:t}),onEnter:(r,o)=>{e.push({node:r,indexPath:o})}}),e}},on:{"EXPANDED.SET":{actions:["setExpanded"]},"EXPANDED.CLEAR":{actions:["clearExpanded"]},"EXPANDED.ALL":{actions:["expandAllBranches"]},"BRANCH.EXPAND":{actions:["expandBranches"]},"BRANCH.COLLAPSE":{actions:["collapseBranches"]},"SELECTED.SET":{actions:["setSelected"]},"SELECTED.ALL":[{guard:K("isMultipleSelection","moveFocus"),actions:["selectAllNodes","focusTreeLastNode"]},{guard:"isMultipleSelection",actions:["selectAllNodes"]}],"SELECTED.CLEAR":{actions:["clearSelected"]},"NODE.SELECT":{actions:["selectNode"]},"NODE.DESELECT":{actions:["deselectNode"]},"CHECKED.TOGGLE":{actions:["toggleChecked"]},"CHECKED.SET":{actions:["setChecked"]},"CHECKED.CLEAR":{actions:["clearChecked"]},"NODE.FOCUS":{actions:["setFocusedNode"]},"NODE.ARROW_DOWN":[{guard:K("isShiftKey","isMultipleSelection"),actions:["focusTreeNextNode","extendSelectionToNextNode"]},{actions:["focusTreeNextNode"]}],"NODE.ARROW_UP":[{guard:K("isShiftKey","isMultipleSelection"),actions:["focusTreePrevNode","extendSelectionToPrevNode"]},{actions:["focusTreePrevNode"]}],"NODE.ARROW_LEFT":{actions:["focusBranchNode"]},"BRANCH_NODE.ARROW_LEFT":[{guard:"isBranchExpanded",actions:["collapseBranch"]},{actions:["focusBranchNode"]}],"BRANCH_NODE.ARROW_RIGHT":[{guard:K("isBranchFocused","isBranchExpanded"),actions:["focusBranchFirstNode"]},{actions:["expandBranch"]}],"SIBLINGS.EXPAND":{actions:["expandSiblingBranches"]},"NODE.HOME":[{guard:K("isShiftKey","isMultipleSelection"),actions:["extendSelectionToFirstNode","focusTreeFirstNode"]},{actions:["focusTreeFirstNode"]}],"NODE.END":[{guard:K("isShiftKey","isMultipleSelection"),actions:["extendSelectionToLastNode","focusTreeLastNode"]},{actions:["focusTreeLastNode"]}],"NODE.CLICK":[{guard:K("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:K("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{actions:["selectNode"]}],"BRANCH_NODE.CLICK":[{guard:K("isCtrlKey","isMultipleSelection"),actions:["toggleNodeSelection"]},{guard:K("isShiftKey","isMultipleSelection"),actions:["extendSelectionToNode"]},{guard:"expandOnClick",actions:["selectNode","toggleBranchNode"]},{actions:["selectNode"]}],"BRANCH_TOGGLE.CLICK":{actions:["toggleBranchNode"]},"TREE.TYPEAHEAD":{actions:["focusMatchedNode"]}},exit:["clearPendingAborts"],states:{idle:{on:{"NODE.RENAME":{target:"renaming",actions:["setRenamingValue"]}}},renaming:{entry:["syncRenameInput","focusRenameInput"],on:{"RENAME.SUBMIT":{guard:"isRenameLabelValid",target:"idle",actions:["submitRenaming"]},"RENAME.CANCEL":{target:"idle",actions:["cancelRenaming"]}}}},implementations:{guards:{isBranchFocused:({context:n,event:t})=>n.get("focusedValue")===t.id,isBranchExpanded:({context:n,event:t})=>n.get("expandedValue").includes(t.id),isShiftKey:({event:n})=>n.shiftKey,isCtrlKey:({event:n})=>n.ctrlKey,hasSelectedItems:({context:n})=>n.get("selectedValue").length>0,isMultipleSelection:({prop:n})=>n("selectionMode")==="multiple",moveFocus:({event:n})=>!!n.moveFocus,expandOnClick:({prop:n})=>!!n("expandOnClick"),isRenameLabelValid:({event:n})=>n.label.trim()!==""},actions:{selectNode({context:n,event:t}){const e=t.id||t.value;n.set("selectedValue",r=>e==null?r:!t.isTrusted&&oe(e)?r.concat(...e):[oe(e)?Pt(e):e].filter(Boolean))},deselectNode({context:n,event:t}){const e=Ne(t.id||t.value);n.set("selectedValue",r=>ce(r,...e))},setFocusedNode({context:n,event:t}){n.set("focusedValue",t.id)},clearFocusedNode({context:n}){n.set("focusedValue",null)},clearSelectedItem({context:n}){n.set("selectedValue",[])},toggleBranchNode({context:n,event:t,action:e}){const r=n.get("expandedValue").includes(t.id);e(r?["collapseBranch"]:["expandBranch"])},expandBranch(n){const{event:t}=n;se(n,[t.id])},expandBranches(n){const{context:t,event:e}=n,r=Ne(e.value);se(n,me(r,t.get("expandedValue")))},collapseBranch({context:n,event:t}){n.set("expandedValue",e=>ce(e,t.id))},collapseBranches(n){const{context:t,event:e}=n,r=Ne(e.value);t.set("expandedValue",o=>ce(o,...r))},setExpanded({context:n,event:t}){oe(t.value)&&n.set("expandedValue",t.value)},clearExpanded({context:n}){n.set("expandedValue",[])},setSelected({context:n,event:t}){oe(t.value)&&n.set("selectedValue",t.value)},clearSelected({context:n}){n.set("selectedValue",[])},focusTreeFirstNode(n){const{prop:t,scope:e}=n,r=t("collection"),o=r.getFirstNode(void 0,{skip:O(n)});if(!o)return;const s=r.getNodeValue(o);Y(n,s)?U(()=>S(e,s)):S(e,s)},focusTreeLastNode(n){const{prop:t,scope:e}=n,r=t("collection"),o=r.getLastNode(void 0,{skip:O(n)}),s=r.getNodeValue(o);Y(n,s)?U(()=>S(e,s)):S(e,s)},focusBranchFirstNode(n){const{event:t,prop:e,scope:r}=n,o=e("collection"),s=o.findNode(t.id),i=o.getFirstNode(s,{skip:O(n)});if(!i)return;const d=o.getNodeValue(i);Y(n,d)?U(()=>S(r,d)):S(r,d)},focusTreeNextNode(n){const{event:t,prop:e,scope:r}=n,o=e("collection"),s=o.getNextNode(t.id,{skip:O(n)});if(!s)return;const i=o.getNodeValue(s);Y(n,i)?U(()=>S(r,i)):S(r,i)},focusTreePrevNode(n){const{event:t,prop:e,scope:r}=n,o=e("collection"),s=o.getPreviousNode(t.id,{skip:O(n)});if(!s)return;const i=o.getNodeValue(s);Y(n,i)?U(()=>S(r,i)):S(r,i)},focusBranchNode(n){const{event:t,prop:e,scope:r}=n,o=e("collection"),s=o.getParentNode(t.id),i=s?o.getNodeValue(s):void 0;if(!i)return;Y(n,i)?U(()=>S(r,i)):S(r,i)},selectAllNodes({context:n,prop:t}){n.set("selectedValue",t("collection").getValues())},focusMatchedNode(n){const{context:t,prop:e,refs:r,event:o,scope:s,computed:i}=n,c=i("visibleNodes").map(({node:x})=>({textContent:e("collection").stringifyNode(x),id:e("collection").getNodeValue(x)})),f=Ce(c,{state:r.get("typeaheadState"),activeId:t.get("focusedValue"),key:o.key});if(!f?.id)return;Y(n,f.id)?U(()=>S(s,f.id)):S(s,f.id)},toggleNodeSelection({context:n,event:t}){const e=Ie(n.get("selectedValue"),t.id);n.set("selectedValue",e)},expandAllBranches(n){const{context:t,prop:e}=n,r=e("collection").getBranchValues(),o=me(r,t.get("expandedValue"));se(n,o)},expandSiblingBranches(n){const{context:t,event:e,prop:r}=n,o=r("collection"),s=o.getIndexPath(e.id);if(!s)return;const d=o.getSiblingNodes(s).map(f=>o.getNodeValue(f)),c=me(d,t.get("expandedValue"));se(n,c)},extendSelectionToNode(n){const{context:t,event:e,prop:r,computed:o}=n,s=r("collection"),i=ge(t.get("selectedValue"))||s.getNodeValue(s.getFirstNode()),d=e.id;let c=[i,d],f=0;o("visibleNodes").forEach(({node:x})=>{const V=s.getNodeValue(x);f===1&&c.push(V),(V===i||V===d)&&f++}),t.set("selectedValue",G(c))},extendSelectionToNextNode(n){const{context:t,event:e,prop:r}=n,o=r("collection"),s=o.getNextNode(e.id,{skip:O(n)});if(!s)return;const i=new Set(t.get("selectedValue")),d=o.getNodeValue(s);d!=null&&(i.has(e.id)&&i.has(d)?i.delete(e.id):i.has(d)||i.add(d),t.set("selectedValue",Array.from(i)))},extendSelectionToPrevNode(n){const{context:t,event:e,prop:r}=n,o=r("collection"),s=o.getPreviousNode(e.id,{skip:O(n)});if(!s)return;const i=new Set(t.get("selectedValue")),d=o.getNodeValue(s);d!=null&&(i.has(e.id)&&i.has(d)?i.delete(e.id):i.has(d)||i.add(d),t.set("selectedValue",Array.from(i)))},extendSelectionToFirstNode(n){const{context:t,prop:e}=n,r=e("collection"),o=ge(t.get("selectedValue")),s=[];r.visit({skip:O(n),onEnter:i=>{const d=r.getNodeValue(i);if(s.push(d),d===o)return"stop"}}),t.set("selectedValue",s)},extendSelectionToLastNode(n){const{context:t,prop:e}=n,r=e("collection"),o=ge(t.get("selectedValue")),s=[];let i=!1;r.visit({skip:O(n),onEnter:d=>{const c=r.getNodeValue(d);c===o&&(i=!0),i&&s.push(c)}}),t.set("selectedValue",s)},clearPendingAborts({refs:n}){const t=n.get("pendingAborts");t.forEach(e=>e.abort()),t.clear()},toggleChecked({context:n,event:t,prop:e}){const r=e("collection");n.set("checkedValue",o=>t.isBranch?rn(r,t.value,o):Ie(o,t.value))},setChecked({context:n,event:t}){n.set("checkedValue",t.value)},clearChecked({context:n}){n.set("checkedValue",[])},setRenamingValue({context:n,event:t,prop:e}){n.set("renamingValue",t.value);const r=e("onRenameStart");if(r){const o=e("collection"),s=o.getIndexPath(t.value);if(s){const i=o.at(s);i&&r({value:t.value,node:i,indexPath:s})}}},submitRenaming({context:n,event:t,prop:e,scope:r}){const o=n.get("renamingValue");if(!o)return;const i=e("collection").getIndexPath(o);if(!i)return;const d=t.label.trim(),c=e("onBeforeRename");if(c&&!c({value:o,label:d,indexPath:i})){n.set("renamingValue",null),S(r,o);return}e("onRenameComplete")?.({value:o,label:d,indexPath:i}),n.set("renamingValue",null),S(r,o)},cancelRenaming({context:n,scope:t}){const e=n.get("renamingValue");n.set("renamingValue",null),e&&S(t,e)},syncRenameInput({context:n,scope:t,prop:e}){const r=n.get("renamingValue");if(!r)return;const o=e("collection"),s=o.findNode(r);if(!s)return;const i=o.stringifyNode(s),d=De(t,r);At(d,i)},focusRenameInput({context:n,scope:t}){const e=n.get("renamingValue");if(!e)return;const r=De(t,e);r&&(r.focus(),r.select())}}}});function Y(n,t){const{prop:e,scope:r,computed:o}=n,s=e("scrollToIndexFn");if(!s)return!1;const i=e("collection"),d=o("visibleNodes");for(let c=0;c<d.length;c++){const{node:f,indexPath:N}=d[c];if(i.getNodeValue(f)===t)return s({index:c,node:f,indexPath:N,getElement:()=>r.getById(Te(r,t))}),!0}return!1}const dn=n=>{const t=v.useId(),{dir:e}=kt(),{getRootNode:r}=It(),o={id:t,dir:e,getRootNode:r,...n},s=Rt(an,o);return sn(s,Bt)},[Ue,I]=Ve({name:"TreeViewContext",hookName:"useTreeViewContext",providerName:"<TreeViewProvider />"}),ln=(n,t)=>{const[e,r]=Le(n),[o,s]=he()(r,["canRename","checkedValue","collection","defaultCheckedValue","defaultExpandedValue","defaultFocusedValue","defaultSelectedValue","expandedValue","expandOnClick","focusedValue","id","ids","loadChildren","onBeforeRename","onCheckedChange","onExpandedChange","onFocusChange","onLoadChildrenComplete","onLoadChildrenError","onRenameComplete","onRenameStart","onSelectionChange","scrollToIndexFn","selectedValue","selectionMode","typeahead"]),i=dn(o),d=k(i.getRootProps(),s);return u.jsx(Ue,{value:i,children:u.jsx(_e,{value:e,children:u.jsx(A.div,{...d,ref:t})})})},cn=v.forwardRef(ln),un=(n,t)=>{const[e,r]=Le(n),[{value:o},s]=he()(r,["value"]),i=k(o.getRootProps(),s);return u.jsx(Ue,{value:o,children:u.jsx(_e,{value:e,children:u.jsx(A.div,{...i,ref:t})})})},hn=v.forwardRef(un),Ye=v.forwardRef((n,t)=>{const e=I(),r=k(e.getTreeProps(),n);return u.jsx(A.div,{...r,ref:t})});Ye.displayName="TreeViewTree";const[pn,ve]=Ve({name:"TreeViewNodeContext",hookName:"useTreeViewNodeContext",providerName:"<TreeViewNodeProvider />"}),[fn,F]=Ve({name:"TreeViewNodePropsContext",hookName:"useTreeViewNodePropsContext",providerName:"<TreeViewItemProvider />"}),Je=v.forwardRef((n,t)=>{const e=I(),r=F(),o=ve(),s=Et(),i=k(e.getBranchProps(r),n),d=e.getBranchContentProps(r);return u.jsx(Dt,{ref:t,open:o.expanded,ids:{content:d.id},...s,...i})});Je.displayName="TreeViewBranch";const gn=he(),Qe=v.forwardRef((n,t)=>{const e=I(),r=F(),o=e.getBranchContentProps(r),[,s]=gn(o,["hidden","data-state"]),i=k(s,n);return u.jsx(jt,{ref:t,...i})});Qe.displayName="TreeViewBranchContent";const Ze=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getBranchControlProps(r),n);return u.jsx(A.div,{...o,ref:t})});Ze.displayName="TreeViewBranchControl";const ze=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getBranchIndentGuideProps(r),n);return u.jsx(A.div,{...o,ref:t})});ze.displayName="TreeViewBranchIndentGuide";const et=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getBranchIndicatorProps(r),n);return u.jsx(A.div,{...o,ref:t})});et.displayName="TreeViewBranchIndicator";const tt=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getBranchTextProps(r),n);return u.jsx(A.span,{...o,ref:t})});tt.displayName="TreeViewBranchText";const nt=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getItemProps(r),n);return u.jsx(A.div,{...o,ref:t})});nt.displayName="TreeViewItem";const rt=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getItemTextProps(r),n);return u.jsx(A.span,{...o,ref:t})});rt.displayName="TreeViewItemText";const mn=he();function Nn(n){const[t,e]=mn(n,["indexPath","node"]),o=I().getNodeState(t);return u.jsx(pn,{value:o,children:u.jsx(fn,{value:t,children:e.children})})}const ot=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getBranchTriggerProps(r),n);return u.jsx(A.div,{...o,ref:t})});ot.displayName="TreeViewBranchTrigger";const st=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getItemIndicatorProps(r),n);return u.jsx(A.div,{...o,ref:t})});st.displayName="TreeViewItemIndicator";const it=v.forwardRef((n,t)=>{const e=I(),r=k(e.getLabelProps(),n);return u.jsx(A.h3,{...r,ref:t})});it.displayName="TreeViewLabel";const xn=n=>n.children(ve()),at=v.forwardRef((n,t)=>{const e=I(),r=F(),o=k(e.getNodeCheckboxProps(r),n);return u.jsx(A.span,{...o,ref:t})});at.displayName="TreeViewNodeCheckbox";const dt=v.forwardRef(function(t,e){const r=mt({key:"checkmark",recipe:t.recipe}),[o,s]=r.splitVariantProps(t),{checked:i,indeterminate:d,disabled:c,unstyled:f,children:N,...x}=s,V=f?Nt:r(o);return u.jsx(xt.svg,{ref:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3px",strokeLinecap:"round",strokeLinejoin:"round","data-state":d?"indeterminate":i?"checked":"unchecked","data-disabled":Ct(c),css:[V,t.css],...x,children:d?u.jsx("path",{d:"M5 12h14"}):i?u.jsx("polyline",{points:"20 6 9 17 4 12"}):null})});dt.displayName="Checkmark";const{withProvider:lt,withContext:D}=yt({key:"treeView"});lt(hn,"root",{forwardAsChild:!0});const Cn=lt(cn,"root",{forwardAsChild:!0}),Vn=D(Je,"branch",{forwardAsChild:!0}),yn=D(Qe,"branchContent",{forwardAsChild:!0}),En=D(Ze,"branchControl",{forwardAsChild:!0});D(ot,"branchTrigger",{forwardAsChild:!0});D(et,"branchIndicator",{forwardAsChild:!0});const Tn=D(tt,"branchText",{forwardAsChild:!0});D(ze,"branchIndentGuide",{forwardAsChild:!0});const vn=D(nt,"item",{forwardAsChild:!0});D(st,"itemIndicator",{forwardAsChild:!0});const Sn=D(rt,"itemText",{forwardAsChild:!0});D(it,"label",{forwardAsChild:!0});const bn=D(Ye,"tree",{forwardAsChild:!0}),wn=D(at,"nodeCheckbox",{forwardAsChild:!0});function Pn(n){const{render:t,indentGuide:e,branchProps:r,branchContentProps:o}=n,s=I(),i=(d,c)=>u.jsx(Nn,{node:d,indexPath:c,children:u.jsx(xn,{children:f=>f.isBranch?u.jsxs(Vn,{...r,children:[t({node:d,indexPath:c,nodeState:f}),u.jsxs(yn,{...o,children:[e,s.collection.getNodeChildren(d).map((N,x)=>i(N,[...c,x]))]})]}):t({node:d,indexPath:c,nodeState:f})})},c.join("."));return u.jsx(u.Fragment,{children:s.collection.getNodeChildren(s.collection.rootNode).map((d,c)=>i(d,[c]))})}const kn=n=>{const t=new Map,e=r=>{r.forEach(o=>{if(o.type==="file"){t.set(o.id,o);return}o.children&&e(o.children)})};return e(n),t},je=n=>{const t=Fe.c(7),e=ve();let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={base:"bg",_checked:"colorPalette.solid",_indeterminate:"colorPalette.solid"},t[0]=r):r=t[0];const o=e.checked===!0,s=e.checked==="indeterminate";let i;t[1]!==o||t[2]!==s?(i=u.jsx(dt,{bg:r,size:"sm",checked:o,indeterminate:s}),t[1]=o,t[2]=s,t[3]=i):i=t[3];let d;return t[4]!==n||t[5]!==i?(d=u.jsx(wn,{"aria-label":"Select node",...n,children:i}),t[4]=n,t[5]=i,t[6]=d):d=t[6],d},ct=n=>{const t=[];return n.forEach(e=>{if(e.type==="file"){t.push(e);return}e.children&&t.push(...ct(e.children))}),t},In=n=>{const t=new Map,e=r=>{r.forEach(o=>{t.set(o.id,o),o.children&&e(o.children)})};return e(n),t},ee=n=>{const t=Fe.c(33),{files:e,checkedFileIds:r,defaultCheckedFileIds:o,label:s,emptyLabel:i,maxHeight:d,isLoading:c,onCheckedFilesChange:f}=n;let N;t[0]!==o?(N=o===void 0?[]:o,t[0]=o,t[1]=N):N=t[1];const x=N,V=s===void 0?"Files":s,b=i===void 0?"No files available.":i,H=d===void 0?"360px":d;let C;t[2]!==e?(C=tn({rootNode:{id:"__root__",name:"root",type:"folder",children:e},nodeToValue:Rn,nodeToString:Bn,nodeToChildren:An}),t[2]=e,t[3]=C):C=t[3];const T=C;let w;t[4]!==e?(w=e.filter(Dn).map(jn),t[4]=e,t[5]=w):w=t[5];const E=w;let l;t[6]!==e?(l=In(e),t[6]=e,t[7]=l):l=t[7];const a=l;let h;t[8]!==a||t[9]!==f?(h=g=>{if(!f)return;const _=new Map;g.checkedValue.forEach(M=>{const q=a.get(M);if(!q)return;(q.type==="file"?[q]:ct(q.children??[])).forEach(be=>{_.set(be.id,be)})}),f([..._.values()])},t[8]=a,t[9]=f,t[10]=h):h=t[10];const m=h;if(c){let g;t[11]!==V?(g=u.jsx(Q,{textStyle:"paragraph/M/medium",children:V}),t[11]=V,t[12]=g):g=t[12];let _;t[13]===Symbol.for("react.memo_cache_sentinel")?(_=u.jsxs($,{direction:"row",gap:"xs",align:"center",children:[u.jsx(Vt,{color:"fg",size:"sm"}),u.jsx(Q,{textStyle:"paragraph/S/regular",color:"fg.muted",children:"Loading files..."})]}),t[13]=_):_=t[13];let M;return t[14]!==g?(M=u.jsxs($,{gap:"xs",children:[g,_]}),t[14]=g,t[15]=M):M=t[15],M}let R;t[16]!==V?(R=u.jsx(Q,{textStyle:"paragraph/M/medium",children:V}),t[16]=V,t[17]=R):R=t[17];let j;t[18]!==r||t[19]!==T||t[20]!==x||t[21]!==b||t[22]!==E||t[23]!==e.length||t[24]!==m||t[25]!==V?(j=e.length===0?u.jsx(ht,{title:b,size:"sm",textAlign:"left",alignItems:"flex-start"}):u.jsx(Cn,{collection:T,selectionMode:"multiple","aria-label":V,...r?{checkedValue:r}:{defaultCheckedValue:x},defaultExpandedValue:E,onCheckedChange:m,children:u.jsx(bn,{children:u.jsx(Pn,{render:Fn})})}),t[18]=r,t[19]=T,t[20]=x,t[21]=b,t[22]=E,t[23]=e.length,t[24]=m,t[25]=V,t[26]=j):j=t[26];let L;t[27]!==H||t[28]!==j?(L=u.jsx(ue,{borderWidth:"1px",borderColor:"border.muted",borderRadius:"md",p:"xs",maxH:H,overflow:"auto",children:j}),t[27]=H,t[28]=j,t[29]=L):L=t[29];let X;return t[30]!==L||t[31]!==R?(X=u.jsxs($,{gap:"xs",children:[R,L]}),t[30]=L,t[31]=R,t[32]=X):X=t[32],X};ee.__docgenInfo={description:"",methods:[],displayName:"FileSelector",props:{files:{required:!0,tsType:{name:"Array",elements:[{name:"FileTreeItem"}],raw:"FileTreeItem[]"},description:""},checkedFileIds:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},defaultCheckedFileIds:{required:!1,tsType:{name:"Array",elements:[{name:"string"}],raw:"string[]"},description:""},label:{required:!1,tsType:{name:"string"},description:""},emptyLabel:{required:!1,tsType:{name:"string"},description:""},maxHeight:{required:!1,tsType:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}]},description:""},isLoading:{required:!1,tsType:{name:"boolean"},description:""},onCheckedFilesChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(files: FileTreeItem[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"FileTreeItem"}],raw:"FileTreeItem[]"},name:"files"}],return:{name:"void"}}},description:""}}};function Rn(n){return n.id}function Bn(n){return n.name}function An(n){return n.children??[]}function Dn(n){return n.type==="folder"}function jn(n){return n.id}function Fn(n){const{node:t,nodeState:e}=n;return e.isBranch?u.jsxs(En,{gap:"xs",py:"2px",children:[u.jsx(je,{}),u.jsx(we,{as:ft,boxSize:"16px",color:"fg"}),u.jsxs($,{gap:"1px",children:[u.jsx(Tn,{textStyle:"paragraph/S/medium",children:t.name}),t.meta?u.jsx(Q,{textStyle:"paragraph/XS/regular",color:"fg.muted",children:t.meta}):null]})]}):u.jsxs(vn,{gap:"xs",py:"2px",children:[u.jsx(je,{}),u.jsx(we,{as:gt,boxSize:"16px",color:"fg.muted"}),u.jsxs($,{gap:"1px",children:[u.jsx(Sn,{textStyle:"paragraph/S/regular",children:t.name}),t.meta?u.jsx(Q,{textStyle:"paragraph/XS/regular",color:"fg.muted",children:t.meta}):null]})]})}const Se=[{id:"sample-raw",name:"sample-raw",type:"folder",meta:"4 items",children:[{id:"sample-raw/invoices",name:"invoices",type:"folder",meta:"2 items",children:[{id:"sample-raw/invoices/2024-05.pdf",name:"2024-05.pdf",type:"file",meta:"1.4 MB · May 2, 2024"},{id:"sample-raw/invoices/2024-06.pdf",name:"2024-06.pdf",type:"file",meta:"1.1 MB · Jun 4, 2024"}]},{id:"sample-raw/receipts",name:"receipts",type:"folder",meta:"1 item",children:[{id:"sample-raw/receipts/ameris.csv",name:"ameris.csv",type:"file",meta:"120 KB · Apr 1, 2024"}]},{id:"sample-raw/notes.md",name:"notes.md",type:"file",meta:"6 KB · Apr 8, 2024"}]},{id:"sample-artifacts",name:"sample-artifacts",type:"folder",meta:"2 items",children:[{id:"sample-artifacts/run-042",name:"run-042",type:"folder",meta:"1 item",children:[{id:"sample-artifacts/run-042/output.json",name:"output.json",type:"file",meta:"48 KB · May 8, 2024"}]},{id:"sample-artifacts/summary.json",name:"summary.json",type:"file",meta:"12 KB · May 10, 2024"}]}],ut=["sample-raw/invoices/2024-05.pdf","sample-raw/notes.md"],Ln=kn(Se),_n=ut.flatMap(n=>{const t=Ln.get(n);return t?[t]:[]}),mr={title:"Components/FileSelector",component:ee,decorators:[n=>u.jsx(ue,{padding:"sm",background:"bg",children:u.jsx(n,{})})]},ie={render:()=>{const[n,t]=v.useState(ut),[e,r]=v.useState(_n),o=s=>{r(s),t(s.map(i=>i.id))};return u.jsxs($,{gap:"md",maxWidth:"420px",children:[u.jsx(ee,{files:Se,label:"Raw bucket files",checkedFileIds:n,maxHeight:"280px",onCheckedFilesChange:o}),u.jsxs($,{gap:"xs",children:[u.jsxs(Q,{textStyle:"paragraph/XS/regular",color:"fg.muted",children:["Selected files (",e.length,")"]}),e.length===0?u.jsx(Q,{textStyle:"paragraph/S/regular",children:"None"}):u.jsx($,{gap:"xs",children:e.map(s=>u.jsx(Ft,{variant:"subtle",colorPalette:"blue",children:s.name},s.id))})]})]})}},ae={render:()=>u.jsx(ue,{maxWidth:"420px",children:u.jsx(ee,{files:Se,label:"Raw bucket files",isLoading:!0,maxHeight:"280px"})})},de={render:()=>u.jsx(ue,{maxWidth:"420px",children:u.jsx(ee,{files:[],label:"Raw bucket files",emptyLabel:"No files in this bucket yet.",maxHeight:"280px"})})};ie.parameters={...ie.parameters,docs:{...ie.parameters?.docs,source:{originalSource:`{
2
+ render: () => {
3
+ const [checkedFileIds, setCheckedFileIds] = useState<string[]>(initialCheckedIds);
4
+ const [selectedFiles, setSelectedFiles] = useState<FileTreeItem[]>(initialSelectedFiles);
5
+ const handleCheckedFilesChange = (files: FileTreeItem[]) => {
6
+ setSelectedFiles(files);
7
+ setCheckedFileIds(files.map(file => file.id));
8
+ };
9
+ return <Stack gap="md" maxWidth="420px">
10
+ <FileSelector files={fileTree} label="Raw bucket files" checkedFileIds={checkedFileIds} maxHeight="280px" onCheckedFilesChange={handleCheckedFilesChange} />
11
+ <Stack gap="xs">
12
+ <Text textStyle="paragraph/XS/regular" color="fg.muted">
13
+ Selected files ({selectedFiles.length})
14
+ </Text>
15
+ {selectedFiles.length === 0 ? <Text textStyle="paragraph/S/regular">None</Text> : <Stack gap="xs">
16
+ {selectedFiles.map(file => <Badge key={file.id} variant="subtle" colorPalette="blue">
17
+ {file.name}
18
+ </Badge>)}
19
+ </Stack>}
20
+ </Stack>
21
+ </Stack>;
22
+ }
23
+ }`,...ie.parameters?.docs?.source}}};ae.parameters={...ae.parameters,docs:{...ae.parameters?.docs,source:{originalSource:`{
24
+ render: () => <Box maxWidth="420px">
25
+ <FileSelector files={fileTree} label="Raw bucket files" isLoading maxHeight="280px" />
26
+ </Box>
27
+ }`,...ae.parameters?.docs?.source}}};de.parameters={...de.parameters,docs:{...de.parameters?.docs,source:{originalSource:`{
28
+ render: () => <Box maxWidth="420px">
29
+ <FileSelector files={[]} label="Raw bucket files" emptyLabel="No files in this bucket yet." maxHeight="280px" />
30
+ </Box>
31
+ }`,...de.parameters?.docs?.source}}};const Nr=["Default","Loading","Empty"];export{ie as Default,de as Empty,ae as Loading,Nr as __namedExportsOrder,mr as default};
@@ -0,0 +1 @@
1
+ import{c as e}from"./createLucideIcon-CcBBUKX8.js";const a=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],o=e("file-text",a);export{o as F};
@@ -0,0 +1 @@
1
+ import{r as c,j as m}from"./iframe-B8FSoBNY.js";import{c as p}from"./factory-DAJZwK4o.js";const d=c.forwardRef(function(s,e){const{direction:i,align:r,justify:t,wrap:n,basis:a,grow:l,shrink:o,inline:x,...f}=s;return m.jsx(p.div,{ref:e,...f,css:{display:x?"inline-flex":"flex",flexDirection:i,alignItems:r,justifyContent:t,flexWrap:n,flexBasis:a,flexGrow:l,flexShrink:o,...s.css}})});d.displayName="Flex";export{d as F};
@@ -0,0 +1 @@
1
+ import{c as o}from"./createLucideIcon-CcBBUKX8.js";const a=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],c=o("folder",a);export{c as F};
@@ -0,0 +1 @@
1
+ import{q as i}from"./factory-BR3bc_RM.js";function c(t,n){const{type:e="HTMLInputElement",property:r="value"}=n,o=i(t)[e].prototype;return Object.getOwnPropertyDescriptor(o,r)??{}}function a(t){if(t.localName==="input")return"HTMLInputElement";if(t.localName==="textarea")return"HTMLTextAreaElement";if(t.localName==="select")return"HTMLSelectElement"}function f(t,n,e="value"){if(!t)return;const r=a(t);r&&c(t,{type:r,property:e}).set?.call(t,n),t.setAttribute(e,n)}function v(t,n){const{value:e,bubbles:r=!0}=n;if(!t)return;const o=i(t);if(!(t instanceof o.HTMLInputElement))return;f(t,`${e}`);const s=new o.Event("input",{bubbles:r});t.dispatchEvent(E(s))}function l(t){return t.matches("textarea, input, select, button")}function p(t,n){if(!t)return;const e=l(t)?t.form:t.closest("form"),r=o=>{o.defaultPrevented||n()};return e?.addEventListener("reset",r,{passive:!0}),()=>e?.removeEventListener("reset",r)}function d(t,n){const e=t?.closest("fieldset");if(!e)return;n(e.disabled);const r=i(e),o=new r.MutationObserver(()=>n(e.disabled));return o.observe(e,{attributes:!0,attributeFilter:["disabled"]}),()=>o.disconnect()}function g(t,n){if(!t)return;const{onFieldsetDisabledChange:e,onFormReset:r}=n,o=[p(t,r),d(t,e)];return()=>o.forEach(s=>s?.())}var u=Symbol.for("zag.changeEvent");function m(t){return Object.prototype.hasOwnProperty.call(t,u)}function E(t){return m(t)||Object.defineProperty(t,u,{value:!0}),t}export{v as d,f as s,g as t};