@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.
- package/.storybook/main.ts +28 -0
- package/.storybook/preview.tsx +28 -0
- package/.storybook/vitest.setup.ts +6 -0
- package/README.md +72 -0
- package/package.json +91 -0
- package/src/components/alert.tsx +27 -0
- package/src/components/breadcrumb.stories.tsx +40 -0
- package/src/components/breadcrumb.tsx +67 -0
- package/src/components/button.stories.tsx +151 -0
- package/src/components/chat-ui/agent-types.ts +231 -0
- package/src/components/chat-ui/components/ai-conversation.stories.tsx +49 -0
- package/src/components/chat-ui/components/ai-conversation.tsx +68 -0
- package/src/components/chat-ui/components/ai-message.stories.tsx +60 -0
- package/src/components/chat-ui/components/ai-message.tsx +103 -0
- package/src/components/chat-ui/components/ai-response.stories.tsx +48 -0
- package/src/components/chat-ui/components/ai-response.tsx +19 -0
- package/src/components/chat-ui/components/approval-prompt.tsx +51 -0
- package/src/components/chat-ui/components/attachment-list.stories.tsx +24 -0
- package/src/components/chat-ui/components/attachment-list.tsx +76 -0
- package/src/components/chat-ui/components/auto-scroll.tsx +42 -0
- package/src/components/chat-ui/components/chat-input.stories.tsx +114 -0
- package/src/components/chat-ui/components/chat-input.tsx +142 -0
- package/src/components/chat-ui/components/chat-panel.stories.tsx +396 -0
- package/src/components/chat-ui/components/chat-panel.tsx +97 -0
- package/src/components/chat-ui/components/message-parts-renderer.stories.tsx +59 -0
- package/src/components/chat-ui/components/message-parts-renderer.tsx +133 -0
- package/src/components/chat-ui/components/message-types.ts +40 -0
- package/src/components/chat-ui/components/model-swap-separator.stories.tsx +27 -0
- package/src/components/chat-ui/components/model-swap-separator.tsx +20 -0
- package/src/components/chat-ui/components/send-button.tsx +56 -0
- package/src/components/chat-ui/components/timeline.tsx +414 -0
- package/src/components/chat-ui/components/tool-invocation-timeline.stories.tsx +32 -0
- package/src/components/chat-ui/components/tool-invocation-timeline.tsx +16 -0
- package/src/components/chat-ui/mocks/full-conversation-normalized.json +3557 -0
- package/src/components/chat-ui/tool-rendering/build-timeline.ts +127 -0
- package/src/components/chat-ui/tool-rendering/default-renderers.ts +420 -0
- package/src/components/chat-ui/tool-rendering/index.ts +3 -0
- package/src/components/chat-ui/tool-rendering/types.ts +19 -0
- package/src/components/chat-ui/utils/diff.ts +228 -0
- package/src/components/chat-ui/utils/editor-state.ts +5 -0
- package/src/components/chat-ui/utils/get-icon.ts +81 -0
- package/src/components/code-editor.tsx +147 -0
- package/src/components/column-file-browser.stories.tsx +217 -0
- package/src/components/column-file-browser.tsx +380 -0
- package/src/components/content-placeholder.tsx +21 -0
- package/src/components/data-table/build-columns.tsx +78 -0
- package/src/components/data-table/data-table.css +51 -0
- package/src/components/data-table/data-table.stories.tsx +209 -0
- package/src/components/data-table/data-table.tsx +232 -0
- package/src/components/data-table/helpers.tsx +69 -0
- package/src/components/data-table/index.ts +3 -0
- package/src/components/data-table/pagination-footer.tsx +58 -0
- package/src/components/data-table/selection-toolbar.tsx +26 -0
- package/src/components/data-table/types.ts +21 -0
- package/src/components/delete-confirmation-modal.stories.tsx +46 -0
- package/src/components/delete-confirmation-modal.tsx +56 -0
- package/src/components/diff-bubble.stories.tsx +70 -0
- package/src/components/diff-bubble.tsx +70 -0
- package/src/components/diff-card.tsx +139 -0
- package/src/components/diff-drawer.stories.tsx +106 -0
- package/src/components/diff-drawer.tsx +59 -0
- package/src/components/diff-editor.tsx +55 -0
- package/src/components/drawer-inline.stories.tsx +124 -0
- package/src/components/drawer-inline.tsx +90 -0
- package/src/components/empty-state.stories.tsx +65 -0
- package/src/components/empty-state.tsx +28 -0
- package/src/components/error-boundary.tsx +80 -0
- package/src/components/file-selector.stories.tsx +166 -0
- package/src/components/file-selector.tsx +192 -0
- package/src/components/file-tree-helpers.ts +28 -0
- package/src/components/horizontal-menu-stack.tsx +15 -0
- package/src/components/info-card.stories.tsx +120 -0
- package/src/components/info-card.tsx +60 -0
- package/src/components/item-section.stories.tsx +57 -0
- package/src/components/item-section.tsx +57 -0
- package/src/components/layout.stories.tsx +341 -0
- package/src/components/layout.tsx +67 -0
- package/src/components/menu-item.stories.tsx +162 -0
- package/src/components/menu-item.tsx +207 -0
- package/src/components/number-input.tsx +21 -0
- package/src/components/open-source-notices-screen.stories.tsx +69 -0
- package/src/components/open-source-notices-screen.tsx +154 -0
- package/src/components/panel-menu.stories.tsx +44 -0
- package/src/components/panel-menu.tsx +27 -0
- package/src/components/param-editor-color-input.tsx +98 -0
- package/src/components/param-editor-date-input.tsx +106 -0
- package/src/components/param-editor-horizontal-text-input.tsx +130 -0
- package/src/components/param-editor-horizontal.stories.tsx +545 -0
- package/src/components/param-editor-horizontal.tsx +137 -0
- package/src/components/param-editor-input-group.tsx +145 -0
- package/src/components/param-editor-number-input.tsx +145 -0
- package/src/components/param-editor-selection-input.tsx +181 -0
- package/src/components/param-editor-text-input.tsx +113 -0
- package/src/components/param-editor.stories.tsx +986 -0
- package/src/components/param-editor.tsx +142 -0
- package/src/components/param-editor.types.ts +95 -0
- package/src/components/properties.stories.tsx +108 -0
- package/src/components/properties.tsx +73 -0
- package/src/components/pstdio-logo.tsx +26 -0
- package/src/components/resource-badge.stories.tsx +26 -0
- package/src/components/resource-badge.tsx +173 -0
- package/src/components/rich-text/collaborative-markdown-editor/awareness-cursors.tsx +45 -0
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.tsx +230 -0
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.tsx +131 -0
- package/src/components/rich-text/index.ts +14 -0
- package/src/components/rich-text/markdown-editor/markdown-editor.stories.tsx +147 -0
- package/src/components/rich-text/markdown-editor/markdown-editor.tsx +112 -0
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +100 -0
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +32 -0
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.ts +2 -0
- package/src/components/rich-text/prompt-input/commands.ts +44 -0
- package/src/components/rich-text/prompt-input/events.ts +21 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx +8 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts +49 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts +30 -0
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx +127 -0
- package/src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx +32 -0
- package/src/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.tsx +30 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.ts +15 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.tsx +88 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.tsx +90 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.tsx +50 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.ts +3 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.tsx +50 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.ts +45 -0
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.ts +20 -0
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.tsx +50 -0
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.tsx +107 -0
- package/src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts +13 -0
- package/src/components/rich-text/prompt-input/prompt-input.stories.tsx +87 -0
- package/src/components/rich-text/prompt-input/prompt-input.tsx +106 -0
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.css +3 -0
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.ts +11 -0
- package/src/components/rich-text/prompt-input/utils.ts +158 -0
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +100 -0
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +32 -0
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.ts +2 -0
- package/src/components/rich-text/rich-message/rich-message.stories.tsx +146 -0
- package/src/components/rich-text/rich-message/rich-message.tsx +118 -0
- package/src/components/rich-text/shared/components/content-editable.tsx +28 -0
- package/src/components/rich-text/shared/components/default-rich-text-components.tsx +99 -0
- package/src/components/rich-text/shared/editor-config.ts +38 -0
- package/src/components/rich-text/shared/nodes/DataTableNode.stories.tsx +52 -0
- package/src/components/rich-text/shared/nodes/DataTableNode.tsx +73 -0
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx +22 -0
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeNode.tsx +57 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.tsx +46 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationNode.tsx +161 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.css +16 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx +45 -0
- package/src/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.tsx +40 -0
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.css +26 -0
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx +414 -0
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.ts +1 -0
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts +52 -0
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts +16 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.css +163 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx +355 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx +6 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts +17 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts +39 -0
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts +23 -0
- package/src/components/rich-text/shared/plugins/StateUpdatePlugin.tsx +21 -0
- package/src/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.tsx +224 -0
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.css +3 -0
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.tsx +315 -0
- package/src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx +12 -0
- package/src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx +20 -0
- package/src/components/rich-text/shared/transformers/markdown-transformers.ts +123 -0
- package/src/components/rich-text/shared/types/rich-text-components.ts +17 -0
- package/src/components/rich-text/theme/report-theme.tsx +81 -0
- package/src/components/rich-text/theme/rich-text-theme.css +773 -0
- package/src/components/rich-text/theme/rich-text-theme.tsx +81 -0
- package/src/components/rich-text/types.ts +9 -0
- package/src/components/rich-text/utils/inferResourceType.ts +17 -0
- package/src/components/rich-text/utils/markdown.ts +12 -0
- package/src/components/rich-text/utils/mediaType.ts +31 -0
- package/src/components/session-indicator.stories.tsx +46 -0
- package/src/components/session-indicator.tsx +40 -0
- package/src/components/slider.stories.tsx +38 -0
- package/src/components/slider.tsx +20 -0
- package/src/components/style-guide-data.ts +374 -0
- package/src/components/style-guide.stories.tsx +212 -0
- package/src/components/style-guide.tsx +305 -0
- package/src/components/ticket-board.stories.tsx +109 -0
- package/src/components/ticket-board.tsx +167 -0
- package/src/components/ticket-card.stories.tsx +133 -0
- package/src/components/ticket-card.tsx +126 -0
- package/src/components/toaster.stories.tsx +79 -0
- package/src/components/toaster.tsx +26 -0
- package/src/components/tooltip.tsx +43 -0
- package/src/index.ts +16 -0
- package/src/theme/global.ts +49 -0
- package/src/theme/index.ts +10 -0
- package/src/theme/primitives/colors.ts +209 -0
- package/src/theme/primitives/fonts.ts +33 -0
- package/src/theme/primitives/sizes.ts +49 -0
- package/src/theme/recipes/alert.ts +12 -0
- package/src/theme/recipes/button.ts +124 -0
- package/src/theme/recipes/dialog.ts +11 -0
- package/src/theme/recipes/divider.ts +7 -0
- package/src/theme/recipes/drawer.ts +16 -0
- package/src/theme/recipes/editable.ts +42 -0
- package/src/theme/recipes/form.ts +11 -0
- package/src/theme/recipes/input.ts +25 -0
- package/src/theme/recipes/menu.ts +40 -0
- package/src/theme/recipes/popover.ts +46 -0
- package/src/theme/recipes/progress-circle.ts +22 -0
- package/src/theme/recipes/skeleton.ts +8 -0
- package/src/theme/recipes/textarea.ts +29 -0
- package/src/theme/recipes/tooltip.ts +15 -0
- package/src/theme/theme.ts +70 -0
- package/src/theme/tokens/borders.ts +38 -0
- package/src/theme/tokens/colors.ts +488 -0
- package/src/theme/tokens/layer-styles.ts +15 -0
- package/src/theme/tokens/shadows.ts +47 -0
- package/src/theme/tokens/text.ts +236 -0
- package/src/utils/apply-theme-preference.ts +17 -0
- package/src/utils/formats.ts +27 -0
- package/src/utils/get-file-type-icon.ts +52 -0
- package/src/utils/theme-preference.tsx +60 -0
- package/src/vite-env.d.ts +6 -0
- package/storybook-static/assets/CodeBlockPlugin-C3OWpvP8.js +281 -0
- package/storybook-static/assets/CodeBlockPlugin-e2vWgtYm.css +1 -0
- package/storybook-static/assets/DataTableNode.stories-DLgTftOI.js +33 -0
- package/storybook-static/assets/EquationComponent-CUFxwyNf.js +1 -0
- package/storybook-static/assets/EquationComponent-DWZwfaVI.css +1 -0
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-B6jc8xvg.js +1 -0
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-D2l3--Te.css +1 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/storybook-static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/storybook-static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/storybook-static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/storybook-static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/storybook-static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/storybook-static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/storybook-static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/storybook-static/assets/LexicalHistoryPlugin.prod-BQAibkDj.js +1 -0
- package/storybook-static/assets/TreeViewPlugin-CyVKCrKJ.js +24 -0
- package/storybook-static/assets/ai-conversation-DcjS--ee.js +1 -0
- package/storybook-static/assets/ai-conversation.stories-COjWuS8V.js +3 -0
- package/storybook-static/assets/ai-message-DLdAGhWH.js +1 -0
- package/storybook-static/assets/ai-message.stories-CRTyreKL.js +3 -0
- package/storybook-static/assets/ai-response-ySM6s0iN.js +1 -0
- package/storybook-static/assets/ai-response.stories-DVBYlrGf.js +11 -0
- package/storybook-static/assets/attachment-list-1p1601I5.js +1 -0
- package/storybook-static/assets/attachment-list.stories-Cydlsnio.js +7 -0
- package/storybook-static/assets/badge-CtgJasjB.js +1 -0
- package/storybook-static/assets/breadcrumb.stories-SAjB-iqH.js +5 -0
- package/storybook-static/assets/button-C7it2n8t.js +1 -0
- package/storybook-static/assets/button.stories-BMVbbb4y.js +72 -0
- package/storybook-static/assets/chat-input-B-915nCM.js +1 -0
- package/storybook-static/assets/chat-input.stories-DrxvpT9p.js +32 -0
- package/storybook-static/assets/chat-panel.stories-D0L6eIte.js +96 -0
- package/storybook-static/assets/chevron-down-BYCAGyCV.js +1 -0
- package/storybook-static/assets/chevron-right-owK1wZnx.js +1 -0
- package/storybook-static/assets/collaborative-markdown-editor-Bj0GvTvv.js +41 -0
- package/storybook-static/assets/collaborative-markdown-editor.stories-B_MUIC5s.js +11 -0
- package/storybook-static/assets/collapsible-DBDG7h1r.js +1 -0
- package/storybook-static/assets/collapsible-content-B1Uq3jUM.js +1 -0
- package/storybook-static/assets/column-file-browser.stories-DPMQnHCw.js +54 -0
- package/storybook-static/assets/compiler-runtime-BXE7OOXE.js +1 -0
- package/storybook-static/assets/computed-style-C0hzrq9-.js +1 -0
- package/storybook-static/assets/create-recipe-context-BU56IzEo.js +1 -0
- package/storybook-static/assets/create-slot-recipe-context-DAhDE6G_.js +1 -0
- package/storybook-static/assets/create-split-props-u5h9OPvL.js +1 -0
- package/storybook-static/assets/createLucideIcon-CcBBUKX8.js +1 -0
- package/storybook-static/assets/data-table-vuIeWXui.css +1 -0
- package/storybook-static/assets/data-table.stories-Cs-q7dpj.js +19 -0
- package/storybook-static/assets/delete-confirmation-modal.stories-C8vDKFRD.js +14 -0
- package/storybook-static/assets/diff-bubble-_zZypMRt.js +1 -0
- package/storybook-static/assets/diff-bubble.stories-DfonanIk.js +39 -0
- package/storybook-static/assets/diff-drawer.stories-CGDWiKD8.js +38 -0
- package/storybook-static/assets/diff-editor-DV9BXqbn.js +11 -0
- package/storybook-static/assets/dismissable-layer-Cc5dFRd8.js +1 -0
- package/storybook-static/assets/drawer-inline.stories-B3Tp7vjL.js +88 -0
- package/storybook-static/assets/empty-state-BXkyq69k.js +1 -0
- package/storybook-static/assets/empty-state.stories-6eYYBOWR.js +29 -0
- package/storybook-static/assets/factory-BR3bc_RM.js +1 -0
- package/storybook-static/assets/factory-DAJZwK4o.js +1 -0
- package/storybook-static/assets/file-selector.stories-PKIGBUd5.js +31 -0
- package/storybook-static/assets/file-text-D5m8MJlG.js +1 -0
- package/storybook-static/assets/flex-DAJL4AFZ.js +1 -0
- package/storybook-static/assets/folder-C5dba_Co.js +1 -0
- package/storybook-static/assets/form-D_Xln9tK.js +1 -0
- package/storybook-static/assets/full-conversation-normalized-LUbl1coD.js +1 -0
- package/storybook-static/assets/grid-7OIKBlfh.js +1 -0
- package/storybook-static/assets/h-stack-DWHd8f97.js +1 -0
- package/storybook-static/assets/horizontal-menu-stack-Cph6x7ui.js +1 -0
- package/storybook-static/assets/icon-C8FN9JqD.js +1 -0
- package/storybook-static/assets/icon-button-DHiUe7rR.js +1 -0
- package/storybook-static/assets/icons-WRA1cA-W.js +1 -0
- package/storybook-static/assets/iframe-2XPD_vrQ.css +1 -0
- package/storybook-static/assets/iframe-B8FSoBNY.js +1075 -0
- package/storybook-static/assets/index-B0y2_lLF.js +1 -0
- package/storybook-static/assets/index-CXwl6T4k.js +1 -0
- package/storybook-static/assets/index-DaXC_qY_.js +1 -0
- package/storybook-static/assets/index-DpB4ozcR.js +1 -0
- package/storybook-static/assets/index-cFwdnc0b.js +1 -0
- package/storybook-static/assets/info-DlgY5-DW.js +1 -0
- package/storybook-static/assets/info-card.stories-Cry0Qfrn.js +55 -0
- package/storybook-static/assets/input-ZSs5cSFQ.js +1 -0
- package/storybook-static/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- package/storybook-static/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- package/storybook-static/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- package/storybook-static/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- package/storybook-static/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- package/storybook-static/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- package/storybook-static/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- package/storybook-static/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- package/storybook-static/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- package/storybook-static/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- package/storybook-static/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- package/storybook-static/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- package/storybook-static/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- package/storybook-static/assets/item-section-AoQrVPNJ.js +1 -0
- package/storybook-static/assets/item-section.stories-kYTPHRsx.js +24 -0
- package/storybook-static/assets/layout.stories-DhSjwzU1.js +3 -0
- package/storybook-static/assets/link-DE5grRtm.js +1 -0
- package/storybook-static/assets/markdown-BLUemkxK.js +1 -0
- package/storybook-static/assets/markdown-editor-Y4eMsgVb.js +1 -0
- package/storybook-static/assets/markdown-editor.stories-DIWw-hRP.js +115 -0
- package/storybook-static/assets/menu-item-CrqDaj9K.js +1 -0
- package/storybook-static/assets/menu-item.stories-D9Isjjrf.js +68 -0
- package/storybook-static/assets/message-parts-renderer.stories-CewRvbm7.js +5 -0
- package/storybook-static/assets/message-types-CEyA7Qm7.js +60 -0
- package/storybook-static/assets/model-swap-separator.stories-DrQW2NWQ.js +9 -0
- package/storybook-static/assets/mutation-observer-CAfGweIM.js +1 -0
- package/storybook-static/assets/normalize-props-D7NI5JRu.js +1 -0
- package/storybook-static/assets/number-C92MPsRM.js +1 -0
- package/storybook-static/assets/number-input-D1aC-9ls.js +7 -0
- package/storybook-static/assets/onest-cyrillic-400-normal-BxvCLB5P.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-400-normal-DH8vlB-A.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-CyY1vN0Q.woff +0 -0
- package/storybook-static/assets/onest-cyrillic-500-normal-DHyr8B2c.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-CwpXuTGk.woff2 +0 -0
- package/storybook-static/assets/onest-cyrillic-700-normal-DOtXtm0s.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-BAzPRZHg.woff +0 -0
- package/storybook-static/assets/onest-latin-400-normal-bladozIj.woff2 +0 -0
- package/storybook-static/assets/onest-latin-500-normal-oFTiz6Nq.woff +0 -0
- package/storybook-static/assets/onest-latin-500-normal-qHiQtL66.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-Bd6qVL4Q.woff2 +0 -0
- package/storybook-static/assets/onest-latin-700-normal-XTvQgpoh.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal--mQR5RlC.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-400-normal-BbXTNVXw.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-BlXa29q8.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-500-normal-CoujUMv_.woff +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-C-Tcltod.woff2 +0 -0
- package/storybook-static/assets/onest-latin-ext-700-normal-CSGWRWNE.woff +0 -0
- package/storybook-static/assets/open-source-notices-screen.stories-BpdJxDZC.js +21 -0
- package/storybook-static/assets/overflow-CkG1DOya.js +1 -0
- package/storybook-static/assets/panel-menu-CqLSrdTB.js +1 -0
- package/storybook-static/assets/panel-menu.stories-CxdWaWjq.js +14 -0
- package/storybook-static/assets/param-editor-horizontal.stories-C1o-VOjG.js +561 -0
- package/storybook-static/assets/param-editor-selection-input-2pJE1_W1.js +1 -0
- package/storybook-static/assets/param-editor.stories-0ae3y4Vu.js +921 -0
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-CjW2EstV.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-400-normal-ZiRag6zj.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-DbWAkkgN.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-600-normal-oLY6jnZ7.woff2 +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dk1mTcxf.woff +0 -0
- package/storybook-static/assets/playfair-display-cyrillic-700-normal-Dw3uKy19.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-CFtfchNt.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-400-normal-DHYHbkg3.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CZLGqjJe.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-600-normal-CxxueQ0Z.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-Bc_1Q1cG.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-700-normal-CuDiGg7c.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-BxlSGspa.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-400-normal-qdZwdvNS.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-BumBfC1v.woff +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-600-normal-CEjQclLc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-C58ejOkc.woff2 +0 -0
- package/storybook-static/assets/playfair-display-latin-ext-700-normal-D5HUU8GT.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BV2APVTb.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-400-normal-BbvUAu4N.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-BPJkAZPN.woff +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-600-normal-ICsRR-qJ.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-CaKJSIny.woff2 +0 -0
- package/storybook-static/assets/playfair-display-vietnamese-700-normal-Cr1rw0mr.woff +0 -0
- package/storybook-static/assets/portal-CZHfPTRw.js +1 -0
- package/storybook-static/assets/preload-helper-PPVm8Dsz.js +1 -0
- package/storybook-static/assets/prompt-input-BLCttowi.js +14 -0
- package/storybook-static/assets/prompt-input-BVbz9joI.css +1 -0
- package/storybook-static/assets/prompt-input.stories-J8-AMVXy.js +9 -0
- package/storybook-static/assets/properties.stories-Bs7ivKgb.js +59 -0
- package/storybook-static/assets/react-18-KY0R7ltw.js +9 -0
- package/storybook-static/assets/render-strategy-BebqUNCa.js +1 -0
- package/storybook-static/assets/resource-badge-Bw5UoU4J.js +1 -0
- package/storybook-static/assets/resource-badge.stories-DtSh-RX9.js +9 -0
- package/storybook-static/assets/rich-message-BIkzo1SM.js +1 -0
- package/storybook-static/assets/rich-message.stories-C9Wc4d3O.js +115 -0
- package/storybook-static/assets/rich-text-theme-Bkhh9rAZ.js +14 -0
- package/storybook-static/assets/rich-text-theme-K2MBoCbx.css +1 -0
- package/storybook-static/assets/separator-CQkMOHNm.js +1 -0
- package/storybook-static/assets/settings-DUgg22A7.js +1 -0
- package/storybook-static/assets/simple-grid-DIKjhnVI.js +1 -0
- package/storybook-static/assets/spinner-ZYH_gvW-.js +1 -0
- package/storybook-static/assets/stack-CN4X31TA.js +1 -0
- package/storybook-static/assets/star-CvcHIXRa.js +1 -0
- package/storybook-static/assets/style-guide.stories-BUvEhZov.js +6 -0
- package/storybook-static/assets/tabbable-DHAf8oAu.js +1 -0
- package/storybook-static/assets/table-BKNSzs2r.js +1 -0
- package/storybook-static/assets/textarea-rqmaWSc5.js +1 -0
- package/storybook-static/assets/toaster-d9nN0H7K.js +1 -0
- package/storybook-static/assets/toaster.stories-BRVCYyaM.js +52 -0
- package/storybook-static/assets/tool-invocation-timeline-B-cS0W6M.js +59 -0
- package/storybook-static/assets/tool-invocation-timeline.stories-DXO59O73.js +5 -0
- package/storybook-static/assets/tooltip-C_a-XGZ8.js +1 -0
- package/storybook-static/assets/tooltip-DZxUoouw.js +1 -0
- package/storybook-static/assets/trash-2-BO05slEk.js +1 -0
- package/storybook-static/assets/typeahead-CuY9WxfQ.js +1 -0
- package/storybook-static/assets/use-field-context-DoxKQlMm.js +1 -0
- package/storybook-static/assets/use-presence-context-DK2PGZth.js +1 -0
- package/storybook-static/assets/v-stack-Btoq6OB_.js +1 -0
- package/storybook-static/assets/x-D42ziktz.js +1 -0
- package/storybook-static/components/alert.d.ts +9 -0
- package/storybook-static/components/breadcrumb.d.ts +18 -0
- package/storybook-static/components/breadcrumb.stories.d.ts +25 -0
- package/storybook-static/components/chat-ui/agent-types.d.ts +205 -0
- package/storybook-static/components/chat-ui/components/ai-conversation.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/ai-message.d.ts +94 -0
- package/storybook-static/components/chat-ui/components/ai-message.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/ai-response.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/ai-response.stories.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/approval-prompt.d.ts +8 -0
- package/storybook-static/components/chat-ui/components/attachment-list.d.ts +23 -0
- package/storybook-static/components/chat-ui/components/attachment-list.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/auto-scroll.d.ts +10 -0
- package/storybook-static/components/chat-ui/components/chat-input.d.ts +16 -0
- package/storybook-static/components/chat-ui/components/chat-input.stories.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/chat-panel.d.ts +18 -0
- package/storybook-static/components/chat-ui/components/chat-panel.stories.d.ts +8 -0
- package/storybook-static/components/chat-ui/components/message-parts-renderer.d.ts +12 -0
- package/storybook-static/components/chat-ui/components/message-parts-renderer.stories.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/message-types.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/model-swap-separator.d.ts +5 -0
- package/storybook-static/components/chat-ui/components/model-swap-separator.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/components/send-button.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/timeline.d.ts +86 -0
- package/storybook-static/components/chat-ui/components/tool-invocation-timeline.d.ts +7 -0
- package/storybook-static/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +6 -0
- package/storybook-static/components/chat-ui/mocks/full-conversation-normalized.json.d.ts +3560 -0
- package/storybook-static/components/chat-ui/tool-rendering/build-timeline.d.ts +23 -0
- package/storybook-static/components/chat-ui/tool-rendering/default-renderers.d.ts +9 -0
- package/storybook-static/components/chat-ui/tool-rendering/index.d.ts +3 -0
- package/storybook-static/components/chat-ui/tool-rendering/types.d.ts +13 -0
- package/storybook-static/components/chat-ui/utils/diff.d.ts +21 -0
- package/storybook-static/components/chat-ui/utils/editor-state.d.ts +1 -0
- package/storybook-static/components/code-editor.d.ts +33 -0
- package/storybook-static/components/column-file-browser.d.ts +21 -0
- package/storybook-static/components/content-placeholder.d.ts +5 -0
- package/storybook-static/components/data-table.d.ts +18 -0
- package/storybook-static/components/data-table.stories.d.ts +33 -0
- package/storybook-static/components/delete-confirmation-modal.d.ts +10 -0
- package/storybook-static/components/delete-confirmation-modal.stories.d.ts +11 -0
- package/storybook-static/components/diff-bubble.d.ts +14 -0
- package/storybook-static/components/diff-bubble.stories.d.ts +13 -0
- package/storybook-static/components/diff-card.d.ts +14 -0
- package/storybook-static/components/diff-drawer.d.ts +6 -0
- package/storybook-static/components/diff-drawer.stories.d.ts +8 -0
- package/storybook-static/components/diff-editor.d.ts +9 -0
- package/storybook-static/components/drawer-inline.d.ts +24 -0
- package/storybook-static/components/drawer-inline.stories.d.ts +8 -0
- package/storybook-static/components/empty-state.d.ts +8 -0
- package/storybook-static/components/empty-state.stories.d.ts +34 -0
- package/storybook-static/components/error-boundary.d.ts +26 -0
- package/storybook-static/components/file-selector.d.ts +13 -0
- package/storybook-static/components/file-tree-helpers.d.ts +8 -0
- package/storybook-static/components/horizontal-menu-stack.d.ts +6 -0
- package/storybook-static/components/info-card.d.ts +13 -0
- package/storybook-static/components/item-section.d.ts +11 -0
- package/storybook-static/components/item-section.stories.d.ts +17 -0
- package/storybook-static/components/layout.d.ts +14 -0
- package/storybook-static/components/layout.stories.d.ts +11 -0
- package/storybook-static/components/menu-item.d.ts +40 -0
- package/storybook-static/components/open-source-notices-screen.d.ts +20 -0
- package/storybook-static/components/open-source-notices-screen.stories.d.ts +12 -0
- package/storybook-static/components/panel-menu.d.ts +7 -0
- package/storybook-static/components/panel-menu.stories.d.ts +7 -0
- package/storybook-static/components/param-editor-color-input.d.ts +13 -0
- package/storybook-static/components/param-editor-date-input.d.ts +15 -0
- package/storybook-static/components/param-editor-horizontal-text-input.d.ts +12 -0
- package/storybook-static/components/param-editor-horizontal.d.ts +10 -0
- package/storybook-static/components/param-editor-horizontal.stories.d.ts +19 -0
- package/storybook-static/components/param-editor-input-group.d.ts +10 -0
- package/storybook-static/components/param-editor-number-input.d.ts +17 -0
- package/storybook-static/components/param-editor-selection-input.d.ts +21 -0
- package/storybook-static/components/param-editor-text-input.d.ts +13 -0
- package/storybook-static/components/param-editor.d.ts +10 -0
- package/storybook-static/components/param-editor.stories.d.ts +23 -0
- package/storybook-static/components/param-editor.types.d.ts +71 -0
- package/storybook-static/components/properties.d.ts +18 -0
- package/storybook-static/components/properties.stories.d.ts +17 -0
- package/storybook-static/components/resource-badge.d.ts +62 -0
- package/storybook-static/components/resource-badge.stories.d.ts +7 -0
- package/storybook-static/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +5 -0
- package/storybook-static/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +8 -0
- package/storybook-static/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +9 -0
- package/storybook-static/components/rich-text/index.d.ts +14 -0
- package/storybook-static/components/rich-text/markdown-editor/markdown-editor.d.ts +8 -0
- package/storybook-static/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +6 -0
- package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +21 -0
- package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +2 -0
- package/storybook-static/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +2 -0
- package/storybook-static/components/rich-text/prompt-input/commands.d.ts +19 -0
- package/storybook-static/components/rich-text/prompt-input/events.d.ts +15 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +3 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +1 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +17 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +7 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +12 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +10 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +9 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +12 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +2 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +13 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +9 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +2 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +6 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +25 -0
- package/storybook-static/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +9 -0
- package/storybook-static/components/rich-text/prompt-input/prompt-input.d.ts +24 -0
- package/storybook-static/components/rich-text/prompt-input/prompt-input.stories.d.ts +8 -0
- package/storybook-static/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +3 -0
- package/storybook-static/components/rich-text/prompt-input/utils.d.ts +23 -0
- package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +21 -0
- package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +2 -0
- package/storybook-static/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +2 -0
- package/storybook-static/components/rich-text/rich-message/rich-message.d.ts +7 -0
- package/storybook-static/components/rich-text/rich-message/rich-message.stories.d.ts +6 -0
- package/storybook-static/components/rich-text/shared/components/content-editable.d.ts +7 -0
- package/storybook-static/components/rich-text/shared/components/default-rich-text-components.d.ts +3 -0
- package/storybook-static/components/rich-text/shared/editor-config.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/nodes/DataTableNode.d.ts +22 -0
- package/storybook-static/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +7 -0
- package/storybook-static/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +19 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +6 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +26 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +13 -0
- package/storybook-static/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +4 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +6 -0
- package/storybook-static/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +5 -0
- package/storybook-static/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +2 -0
- package/storybook-static/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +3 -0
- package/storybook-static/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +1 -0
- package/storybook-static/components/rich-text/shared/transformers/markdown-transformers.d.ts +15 -0
- package/storybook-static/components/rich-text/shared/types/rich-text-components.d.ts +15 -0
- package/storybook-static/components/rich-text/theme/report-theme.d.ts +3 -0
- package/storybook-static/components/rich-text/theme/rich-text-theme.d.ts +3 -0
- package/storybook-static/components/rich-text/types.d.ts +8 -0
- package/storybook-static/components/rich-text/utils/inferResourceType.d.ts +1 -0
- package/storybook-static/components/rich-text/utils/markdown.d.ts +4 -0
- package/storybook-static/components/rich-text/utils/mediaType.d.ts +1 -0
- package/storybook-static/components/schub-logo.d.ts +2 -0
- package/storybook-static/components/slider.d.ts +5 -0
- package/storybook-static/components/style-guide-data.d.ts +46 -0
- package/storybook-static/components/style-guide.d.ts +1 -0
- package/storybook-static/components/style-guide.stories.d.ts +14 -0
- package/storybook-static/components/toaster.stories.d.ts +11 -0
- package/storybook-static/components/tooltip.d.ts +12 -0
- package/storybook-static/favicon-wrapper.svg +46 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +705 -0
- package/storybook-static/index.d.ts +14 -0
- package/storybook-static/index.html +150 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +628 -0
- package/storybook-static/sb-addons/themes-1/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/vitest-2/manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-runtime.js +77956 -0
- package/storybook-static/sb-manager/globals.js +24 -0
- package/storybook-static/sb-manager/manager-stores.js +23 -0
- package/storybook-static/sb-manager/runtime.js +20422 -0
- package/storybook-static/theme/applyThemePreference.d.ts +2 -0
- package/storybook-static/theme/global.d.ts +46 -0
- package/storybook-static/theme/index.d.ts +1 -0
- package/storybook-static/theme/primitives/colors.d.ts +958 -0
- package/storybook-static/theme/primitives/fonts.d.ts +81 -0
- package/storybook-static/theme/primitives/sizes.d.ts +89 -0
- package/storybook-static/theme/recipes/alert.d.ts +1 -0
- package/storybook-static/theme/recipes/button.d.ts +129 -0
- package/storybook-static/theme/recipes/dialog.d.ts +1 -0
- package/storybook-static/theme/recipes/divider.d.ts +1 -0
- package/storybook-static/theme/recipes/drawer.d.ts +1 -0
- package/storybook-static/theme/recipes/editable.d.ts +1 -0
- package/storybook-static/theme/recipes/form.d.ts +1 -0
- package/storybook-static/theme/recipes/input.d.ts +7 -0
- package/storybook-static/theme/recipes/menu.d.ts +1 -0
- package/storybook-static/theme/recipes/popover.d.ts +16 -0
- package/storybook-static/theme/recipes/progress-circle.d.ts +28 -0
- package/storybook-static/theme/recipes/skeleton.d.ts +1 -0
- package/storybook-static/theme/recipes/textarea.d.ts +1 -0
- package/storybook-static/theme/recipes/tooltip.d.ts +1 -0
- package/storybook-static/theme/theme-preference.d.ts +15 -0
- package/storybook-static/theme/theme.d.ts +2 -0
- package/storybook-static/theme/tokens/borders.d.ts +38 -0
- package/storybook-static/theme/tokens/colors.d.ts +898 -0
- package/storybook-static/theme/tokens/layer-styles.d.ts +1 -0
- package/storybook-static/theme/tokens/shadows.d.ts +64 -0
- package/storybook-static/theme/tokens/text.d.ts +1 -0
- package/storybook-static/theme/types.d.ts +1 -0
- package/storybook-static/utils/formats.d.ts +7 -0
- package/storybook-static/utils/get-file-type-icon.d.ts +2 -0
- package/storybook-static/vite-inject-mocker-entry.js +2 -0
- package/tsconfig.json +29 -0
- package/vite.config.ts +82 -0
- package/vitest.shims.d.ts +1 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Box, Flex, type FlexProps, Icon, IconButton, Stack, type StackProps, Text } from "@chakra-ui/react";
|
|
2
|
+
import { PanelRightClose } from "lucide-react";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { ContentPlaceholder } from "./content-placeholder";
|
|
5
|
+
import { HorizontalMenuStack } from "./horizontal-menu-stack";
|
|
6
|
+
|
|
7
|
+
interface DrawerInlineProps extends FlexProps {
|
|
8
|
+
open?: boolean;
|
|
9
|
+
children?: FlexProps["children"];
|
|
10
|
+
width?: FlexProps["width"];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function DrawerInline(props: DrawerInlineProps) {
|
|
14
|
+
const { open, width, children, ...rest } = props;
|
|
15
|
+
|
|
16
|
+
if (!open) return null;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Flex height="100%" width={width} maxW="100%" bg="bg" {...rest}>
|
|
20
|
+
<Box width="8px" height="100%" borderRightWidth={"1px"}>
|
|
21
|
+
<ContentPlaceholder height="100%" />
|
|
22
|
+
</Box>
|
|
23
|
+
<Stack flex="1" minH="0" gap="0">
|
|
24
|
+
{children}
|
|
25
|
+
</Stack>
|
|
26
|
+
</Flex>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface DrawerInlineHeaderProps extends StackProps {
|
|
31
|
+
title?: string;
|
|
32
|
+
actions?: ReactNode;
|
|
33
|
+
onClose?: () => void;
|
|
34
|
+
children?: StackProps["children"];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function DrawerInlineHeader(props: DrawerInlineHeaderProps) {
|
|
38
|
+
const { title, actions, onClose, children, ...rest } = props;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<HorizontalMenuStack {...rest} gap="sm" px="sm" py="xs" alignItems="center" borderBottomWidth="1px" bg="bg">
|
|
42
|
+
{onClose ? (
|
|
43
|
+
<IconButton onClick={onClose} aria-label="Close preview" variant="ghost" size="sm">
|
|
44
|
+
<Icon as={PanelRightClose} boxSize="16px" />
|
|
45
|
+
</IconButton>
|
|
46
|
+
) : null}
|
|
47
|
+
|
|
48
|
+
<Flex align="center" gap="xs" minW="0" flex="1">
|
|
49
|
+
{title ? (
|
|
50
|
+
<Text textStyle="paragraph/M/medium" overflow="hidden" textOverflow="ellipsis" whiteSpace="nowrap">
|
|
51
|
+
{title}
|
|
52
|
+
</Text>
|
|
53
|
+
) : null}
|
|
54
|
+
{children}
|
|
55
|
+
</Flex>
|
|
56
|
+
|
|
57
|
+
<Flex align="center" gap="xs" flexWrap="wrap" justify="flex-end">
|
|
58
|
+
{actions}
|
|
59
|
+
</Flex>
|
|
60
|
+
</HorizontalMenuStack>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface DrawerInlineBodyProps extends FlexProps {
|
|
65
|
+
children?: FlexProps["children"];
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function DrawerInlineBody(props: DrawerInlineBodyProps) {
|
|
69
|
+
const { children, ...rest } = props;
|
|
70
|
+
|
|
71
|
+
return (
|
|
72
|
+
<Flex {...rest} direction="column" flex="1" minH="0" gap="sm" borderWidth="0" overflowY="auto">
|
|
73
|
+
{children}
|
|
74
|
+
</Flex>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
interface DrawerInlineFooterProps extends FlexProps {
|
|
79
|
+
children?: FlexProps["children"];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function DrawerInlineFooter(props: DrawerInlineFooterProps) {
|
|
83
|
+
const { children, ...rest } = props;
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<Flex {...rest} justify="flex-end" align="center" gap="xs" px="sm" py="xs" borderTopWidth="1px" bg="bg">
|
|
87
|
+
{children}
|
|
88
|
+
</Flex>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { Box, Button, Icon } from "@chakra-ui/react";
|
|
2
|
+
import { FileText, Folder } from "lucide-react";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
import { EmptyState, type EmptyStateProps } from "./empty-state";
|
|
6
|
+
|
|
7
|
+
type StoryFn = () => ReactNode;
|
|
8
|
+
|
|
9
|
+
const meta = {
|
|
10
|
+
title: "Components/EmptyState",
|
|
11
|
+
component: EmptyState,
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story: StoryFn) => (
|
|
14
|
+
<Box padding="sm" background="bg">
|
|
15
|
+
<Story />
|
|
16
|
+
</Box>
|
|
17
|
+
),
|
|
18
|
+
],
|
|
19
|
+
args: {
|
|
20
|
+
title: "No documents yet.",
|
|
21
|
+
description: "Upload files to start building extractions.",
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default meta;
|
|
26
|
+
|
|
27
|
+
export const Default = {
|
|
28
|
+
render: (args: EmptyStateProps) => (
|
|
29
|
+
<Box width="100%" maxWidth="420px">
|
|
30
|
+
<EmptyState {...args} />
|
|
31
|
+
</Box>
|
|
32
|
+
),
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const WithIconAndAction = {
|
|
36
|
+
args: {
|
|
37
|
+
title: "Nothing uploaded yet.",
|
|
38
|
+
description: "Drop files into sample-raw or use the upload action.",
|
|
39
|
+
icon: <Icon as={FileText} boxSize="28px" color="fg.muted" />,
|
|
40
|
+
},
|
|
41
|
+
render: (args: EmptyStateProps) => (
|
|
42
|
+
<Box width="100%" maxWidth="420px">
|
|
43
|
+
<EmptyState {...args}>
|
|
44
|
+
<Button size="sm" variant="outline">
|
|
45
|
+
Upload files
|
|
46
|
+
</Button>
|
|
47
|
+
</EmptyState>
|
|
48
|
+
</Box>
|
|
49
|
+
),
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export const Compact = {
|
|
53
|
+
args: {
|
|
54
|
+
title: "This folder is empty.",
|
|
55
|
+
size: "sm",
|
|
56
|
+
textAlign: "left",
|
|
57
|
+
alignItems: "flex-start",
|
|
58
|
+
icon: <Icon as={Folder} boxSize="20px" color="fg.muted" />,
|
|
59
|
+
},
|
|
60
|
+
render: (args: EmptyStateProps) => (
|
|
61
|
+
<Box width="100%" maxWidth="420px">
|
|
62
|
+
<EmptyState {...args} />
|
|
63
|
+
</Box>
|
|
64
|
+
),
|
|
65
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EmptyState as ChakraEmptyState, VStack } from "@chakra-ui/react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
export interface EmptyStateProps extends ChakraEmptyState.RootProps {
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(function EmptyState(props, ref) {
|
|
11
|
+
const { title, description, icon, children, ...rest } = props;
|
|
12
|
+
return (
|
|
13
|
+
<ChakraEmptyState.Root ref={ref} {...rest}>
|
|
14
|
+
<ChakraEmptyState.Content>
|
|
15
|
+
{icon && <ChakraEmptyState.Indicator>{icon}</ChakraEmptyState.Indicator>}
|
|
16
|
+
{description ? (
|
|
17
|
+
<VStack textAlign="center">
|
|
18
|
+
<ChakraEmptyState.Title fontWeight="normal">{title}</ChakraEmptyState.Title>
|
|
19
|
+
<ChakraEmptyState.Description>{description}</ChakraEmptyState.Description>
|
|
20
|
+
</VStack>
|
|
21
|
+
) : (
|
|
22
|
+
<ChakraEmptyState.Title fontWeight="normal">{title}</ChakraEmptyState.Title>
|
|
23
|
+
)}
|
|
24
|
+
{children}
|
|
25
|
+
</ChakraEmptyState.Content>
|
|
26
|
+
</ChakraEmptyState.Root>
|
|
27
|
+
);
|
|
28
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { AbsoluteCenter, Button, Stack, Text } from "@chakra-ui/react";
|
|
2
|
+
import { Component, type ErrorInfo, type ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
import { AlertMessage } from "./alert";
|
|
5
|
+
import { ContentPlaceholder } from "./content-placeholder";
|
|
6
|
+
|
|
7
|
+
interface ErrorBoundaryProps {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
fallback?: ReactNode;
|
|
10
|
+
label?: string;
|
|
11
|
+
onReset?: () => void;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface ErrorBoundaryState {
|
|
15
|
+
error: Error | null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
19
|
+
state: ErrorBoundaryState = { error: null };
|
|
20
|
+
|
|
21
|
+
static getDerivedStateFromError(error: Error) {
|
|
22
|
+
return { error };
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
componentDidCatch(error: Error, info: ErrorInfo) {
|
|
26
|
+
console.error("Dashboard error boundary caught an error", error, info);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
handleReset = () => {
|
|
30
|
+
this.setState({ error: null });
|
|
31
|
+
this.props.onReset?.();
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
render() {
|
|
35
|
+
const { children, fallback, label } = this.props;
|
|
36
|
+
const { error } = this.state;
|
|
37
|
+
|
|
38
|
+
if (error) {
|
|
39
|
+
if (fallback) {
|
|
40
|
+
return fallback;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return <ErrorFallback error={error} label={label} onReset={this.handleReset} />;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
return children;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface ErrorFallbackProps {
|
|
51
|
+
error: Error;
|
|
52
|
+
label?: string;
|
|
53
|
+
onReset?: () => void;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const ErrorFallback = (props: ErrorFallbackProps) => {
|
|
57
|
+
const { error, label, onReset } = props;
|
|
58
|
+
|
|
59
|
+
return (
|
|
60
|
+
<ContentPlaceholder height="100%" width="100%">
|
|
61
|
+
<AbsoluteCenter>
|
|
62
|
+
<AlertMessage
|
|
63
|
+
status="error"
|
|
64
|
+
title={<Text textStyle="paragraph/M/medium">{label ?? "Something went wrong"}</Text>}
|
|
65
|
+
>
|
|
66
|
+
<Stack gap="sm">
|
|
67
|
+
<Text textStyle="paragraph/S/regular">
|
|
68
|
+
{error.message || "An unexpected error occurred while rendering this section."}
|
|
69
|
+
</Text>
|
|
70
|
+
{onReset ? (
|
|
71
|
+
<Button size="sm" variant="solid" colorScheme={"black"} onClick={onReset}>
|
|
72
|
+
Try again
|
|
73
|
+
</Button>
|
|
74
|
+
) : null}
|
|
75
|
+
</Stack>
|
|
76
|
+
</AlertMessage>
|
|
77
|
+
</AbsoluteCenter>
|
|
78
|
+
</ContentPlaceholder>
|
|
79
|
+
);
|
|
80
|
+
};
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Badge, Box, Stack, Text } from "@chakra-ui/react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
|
|
5
|
+
import { type FileTreeItem, mapFilesById } from "@/components/file-tree-helpers";
|
|
6
|
+
import { FileSelector } from "./file-selector";
|
|
7
|
+
|
|
8
|
+
type StoryFn = () => ReactNode;
|
|
9
|
+
|
|
10
|
+
const fileTree: FileTreeItem[] = [
|
|
11
|
+
{
|
|
12
|
+
id: "sample-raw",
|
|
13
|
+
name: "sample-raw",
|
|
14
|
+
type: "folder",
|
|
15
|
+
meta: "4 items",
|
|
16
|
+
children: [
|
|
17
|
+
{
|
|
18
|
+
id: "sample-raw/invoices",
|
|
19
|
+
name: "invoices",
|
|
20
|
+
type: "folder",
|
|
21
|
+
meta: "2 items",
|
|
22
|
+
children: [
|
|
23
|
+
{
|
|
24
|
+
id: "sample-raw/invoices/2024-05.pdf",
|
|
25
|
+
name: "2024-05.pdf",
|
|
26
|
+
type: "file",
|
|
27
|
+
meta: "1.4 MB · May 2, 2024",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "sample-raw/invoices/2024-06.pdf",
|
|
31
|
+
name: "2024-06.pdf",
|
|
32
|
+
type: "file",
|
|
33
|
+
meta: "1.1 MB · Jun 4, 2024",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "sample-raw/receipts",
|
|
39
|
+
name: "receipts",
|
|
40
|
+
type: "folder",
|
|
41
|
+
meta: "1 item",
|
|
42
|
+
children: [
|
|
43
|
+
{
|
|
44
|
+
id: "sample-raw/receipts/ameris.csv",
|
|
45
|
+
name: "ameris.csv",
|
|
46
|
+
type: "file",
|
|
47
|
+
meta: "120 KB · Apr 1, 2024",
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: "sample-raw/notes.md",
|
|
53
|
+
name: "notes.md",
|
|
54
|
+
type: "file",
|
|
55
|
+
meta: "6 KB · Apr 8, 2024",
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "sample-artifacts",
|
|
61
|
+
name: "sample-artifacts",
|
|
62
|
+
type: "folder",
|
|
63
|
+
meta: "2 items",
|
|
64
|
+
children: [
|
|
65
|
+
{
|
|
66
|
+
id: "sample-artifacts/run-042",
|
|
67
|
+
name: "run-042",
|
|
68
|
+
type: "folder",
|
|
69
|
+
meta: "1 item",
|
|
70
|
+
children: [
|
|
71
|
+
{
|
|
72
|
+
id: "sample-artifacts/run-042/output.json",
|
|
73
|
+
name: "output.json",
|
|
74
|
+
type: "file",
|
|
75
|
+
meta: "48 KB · May 8, 2024",
|
|
76
|
+
},
|
|
77
|
+
],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "sample-artifacts/summary.json",
|
|
81
|
+
name: "summary.json",
|
|
82
|
+
type: "file",
|
|
83
|
+
meta: "12 KB · May 10, 2024",
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
const initialCheckedIds = ["sample-raw/invoices/2024-05.pdf", "sample-raw/notes.md"];
|
|
90
|
+
const filesById = mapFilesById(fileTree);
|
|
91
|
+
const initialSelectedFiles = initialCheckedIds.flatMap((id) => {
|
|
92
|
+
const file = filesById.get(id);
|
|
93
|
+
|
|
94
|
+
return file ? [file] : [];
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const meta = {
|
|
98
|
+
title: "Components/FileSelector",
|
|
99
|
+
component: FileSelector,
|
|
100
|
+
decorators: [
|
|
101
|
+
(Story: StoryFn) => (
|
|
102
|
+
<Box padding="sm" background="bg">
|
|
103
|
+
<Story />
|
|
104
|
+
</Box>
|
|
105
|
+
),
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default meta;
|
|
110
|
+
|
|
111
|
+
export const Default = {
|
|
112
|
+
render: () => {
|
|
113
|
+
const [checkedFileIds, setCheckedFileIds] = useState<string[]>(initialCheckedIds);
|
|
114
|
+
const [selectedFiles, setSelectedFiles] = useState<FileTreeItem[]>(initialSelectedFiles);
|
|
115
|
+
|
|
116
|
+
const handleCheckedFilesChange = (files: FileTreeItem[]) => {
|
|
117
|
+
setSelectedFiles(files);
|
|
118
|
+
|
|
119
|
+
setCheckedFileIds(files.map((file) => file.id));
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<Stack gap="md" maxWidth="420px">
|
|
124
|
+
<FileSelector
|
|
125
|
+
files={fileTree}
|
|
126
|
+
label="Raw bucket files"
|
|
127
|
+
checkedFileIds={checkedFileIds}
|
|
128
|
+
maxHeight="280px"
|
|
129
|
+
onCheckedFilesChange={handleCheckedFilesChange}
|
|
130
|
+
/>
|
|
131
|
+
<Stack gap="xs">
|
|
132
|
+
<Text textStyle="paragraph/XS/regular" color="fg.muted">
|
|
133
|
+
Selected files ({selectedFiles.length})
|
|
134
|
+
</Text>
|
|
135
|
+
{selectedFiles.length === 0 ? (
|
|
136
|
+
<Text textStyle="paragraph/S/regular">None</Text>
|
|
137
|
+
) : (
|
|
138
|
+
<Stack gap="xs">
|
|
139
|
+
{selectedFiles.map((file) => (
|
|
140
|
+
<Badge key={file.id} variant="subtle" colorPalette="blue">
|
|
141
|
+
{file.name}
|
|
142
|
+
</Badge>
|
|
143
|
+
))}
|
|
144
|
+
</Stack>
|
|
145
|
+
)}
|
|
146
|
+
</Stack>
|
|
147
|
+
</Stack>
|
|
148
|
+
);
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
export const Loading = {
|
|
153
|
+
render: () => (
|
|
154
|
+
<Box maxWidth="420px">
|
|
155
|
+
<FileSelector files={fileTree} label="Raw bucket files" isLoading maxHeight="280px" />
|
|
156
|
+
</Box>
|
|
157
|
+
),
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const Empty = {
|
|
161
|
+
render: () => (
|
|
162
|
+
<Box maxWidth="420px">
|
|
163
|
+
<FileSelector files={[]} label="Raw bucket files" emptyLabel="No files in this bucket yet." maxHeight="280px" />
|
|
164
|
+
</Box>
|
|
165
|
+
),
|
|
166
|
+
};
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
Checkmark,
|
|
4
|
+
createTreeCollection,
|
|
5
|
+
Icon,
|
|
6
|
+
Spinner,
|
|
7
|
+
Stack,
|
|
8
|
+
Text,
|
|
9
|
+
TreeView,
|
|
10
|
+
useTreeViewNodeContext,
|
|
11
|
+
} from "@chakra-ui/react";
|
|
12
|
+
import { FileText, Folder } from "lucide-react";
|
|
13
|
+
|
|
14
|
+
import type { FileTreeItem } from "@/components/file-tree-helpers";
|
|
15
|
+
import { EmptyState } from "./empty-state";
|
|
16
|
+
|
|
17
|
+
interface FileSelectorProps {
|
|
18
|
+
files: FileTreeItem[];
|
|
19
|
+
checkedFileIds?: string[];
|
|
20
|
+
defaultCheckedFileIds?: string[];
|
|
21
|
+
label?: string;
|
|
22
|
+
emptyLabel?: string;
|
|
23
|
+
maxHeight?: string | number;
|
|
24
|
+
isLoading?: boolean;
|
|
25
|
+
onCheckedFilesChange?: (files: FileTreeItem[]) => void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const TreeNodeCheckbox = (props: TreeView.NodeCheckboxProps) => {
|
|
29
|
+
const nodeState = useTreeViewNodeContext();
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<TreeView.NodeCheckbox aria-label="Select node" {...props}>
|
|
33
|
+
<Checkmark
|
|
34
|
+
bg={{
|
|
35
|
+
base: "bg",
|
|
36
|
+
_checked: "colorPalette.solid",
|
|
37
|
+
_indeterminate: "colorPalette.solid",
|
|
38
|
+
}}
|
|
39
|
+
size="sm"
|
|
40
|
+
checked={nodeState.checked === true}
|
|
41
|
+
indeterminate={nodeState.checked === "indeterminate"}
|
|
42
|
+
/>
|
|
43
|
+
</TreeView.NodeCheckbox>
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const collectFiles = (nodes: FileTreeItem[]) => {
|
|
48
|
+
const files: FileTreeItem[] = [];
|
|
49
|
+
|
|
50
|
+
nodes.forEach((node) => {
|
|
51
|
+
if (node.type === "file") {
|
|
52
|
+
files.push(node);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (node.children) {
|
|
57
|
+
files.push(...collectFiles(node.children));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
return files;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const indexNodesById = (nodes: FileTreeItem[]) => {
|
|
65
|
+
const map = new Map<string, FileTreeItem>();
|
|
66
|
+
|
|
67
|
+
const visit = (items: FileTreeItem[]) => {
|
|
68
|
+
items.forEach((item) => {
|
|
69
|
+
map.set(item.id, item);
|
|
70
|
+
|
|
71
|
+
if (item.children) {
|
|
72
|
+
visit(item.children);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
visit(nodes);
|
|
78
|
+
|
|
79
|
+
return map;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const FileSelector = (props: FileSelectorProps) => {
|
|
83
|
+
const {
|
|
84
|
+
files,
|
|
85
|
+
checkedFileIds,
|
|
86
|
+
defaultCheckedFileIds = [],
|
|
87
|
+
label = "Files",
|
|
88
|
+
emptyLabel = "No files available.",
|
|
89
|
+
maxHeight = "360px",
|
|
90
|
+
isLoading,
|
|
91
|
+
onCheckedFilesChange,
|
|
92
|
+
} = props;
|
|
93
|
+
|
|
94
|
+
const collection = createTreeCollection<FileTreeItem>({
|
|
95
|
+
rootNode: { id: "__root__", name: "root", type: "folder", children: files },
|
|
96
|
+
nodeToValue: (node) => node.id,
|
|
97
|
+
nodeToString: (node) => node.name,
|
|
98
|
+
nodeToChildren: (node) => node.children ?? [],
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const expandedBranches = files.filter((item) => item.type === "folder").map((item) => item.id);
|
|
102
|
+
const nodesById = indexNodesById(files);
|
|
103
|
+
|
|
104
|
+
const handleCheckedChange = (details: { checkedValue: string[] }) => {
|
|
105
|
+
if (!onCheckedFilesChange) return;
|
|
106
|
+
|
|
107
|
+
const uniqueFiles = new Map<string, FileTreeItem>();
|
|
108
|
+
|
|
109
|
+
details.checkedValue.forEach((value) => {
|
|
110
|
+
const node = nodesById.get(value);
|
|
111
|
+
|
|
112
|
+
if (!node) return;
|
|
113
|
+
|
|
114
|
+
const filesFromNode = node.type === "file" ? [node] : collectFiles(node.children ?? []);
|
|
115
|
+
|
|
116
|
+
filesFromNode.forEach((file) => {
|
|
117
|
+
uniqueFiles.set(file.id, file);
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
onCheckedFilesChange([...uniqueFiles.values()]);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
if (isLoading) {
|
|
125
|
+
return (
|
|
126
|
+
<Stack gap="xs">
|
|
127
|
+
<Text textStyle="paragraph/M/medium">{label}</Text>
|
|
128
|
+
<Stack direction="row" gap="xs" align="center">
|
|
129
|
+
<Spinner color="fg" size="sm" />
|
|
130
|
+
<Text textStyle="paragraph/S/regular" color="fg.muted">
|
|
131
|
+
Loading files...
|
|
132
|
+
</Text>
|
|
133
|
+
</Stack>
|
|
134
|
+
</Stack>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return (
|
|
139
|
+
<Stack gap="xs">
|
|
140
|
+
<Text textStyle="paragraph/M/medium">{label}</Text>
|
|
141
|
+
|
|
142
|
+
<Box borderWidth="1px" borderColor="border.muted" borderRadius="md" p="xs" maxH={maxHeight} overflow="auto">
|
|
143
|
+
{files.length === 0 ? (
|
|
144
|
+
<EmptyState title={emptyLabel} size="sm" textAlign="left" alignItems="flex-start" />
|
|
145
|
+
) : (
|
|
146
|
+
<TreeView.Root
|
|
147
|
+
collection={collection}
|
|
148
|
+
selectionMode="multiple"
|
|
149
|
+
aria-label={label}
|
|
150
|
+
{...(checkedFileIds ? { checkedValue: checkedFileIds } : { defaultCheckedValue: defaultCheckedFileIds })}
|
|
151
|
+
defaultExpandedValue={expandedBranches}
|
|
152
|
+
onCheckedChange={handleCheckedChange}
|
|
153
|
+
>
|
|
154
|
+
<TreeView.Tree>
|
|
155
|
+
<TreeView.Node
|
|
156
|
+
render={({ node, nodeState }) =>
|
|
157
|
+
nodeState.isBranch ? (
|
|
158
|
+
<TreeView.BranchControl gap="xs" py="2px">
|
|
159
|
+
<TreeNodeCheckbox />
|
|
160
|
+
<Icon as={Folder} boxSize="16px" color="fg" />
|
|
161
|
+
<Stack gap="1px">
|
|
162
|
+
<TreeView.BranchText textStyle="paragraph/S/medium">{node.name}</TreeView.BranchText>
|
|
163
|
+
{node.meta ? (
|
|
164
|
+
<Text textStyle="paragraph/XS/regular" color="fg.muted">
|
|
165
|
+
{node.meta}
|
|
166
|
+
</Text>
|
|
167
|
+
) : null}
|
|
168
|
+
</Stack>
|
|
169
|
+
</TreeView.BranchControl>
|
|
170
|
+
) : (
|
|
171
|
+
<TreeView.Item gap="xs" py="2px">
|
|
172
|
+
<TreeNodeCheckbox />
|
|
173
|
+
<Icon as={FileText} boxSize="16px" color="fg.muted" />
|
|
174
|
+
<Stack gap="1px">
|
|
175
|
+
<TreeView.ItemText textStyle="paragraph/S/regular">{node.name}</TreeView.ItemText>
|
|
176
|
+
{node.meta ? (
|
|
177
|
+
<Text textStyle="paragraph/XS/regular" color="fg.muted">
|
|
178
|
+
{node.meta}
|
|
179
|
+
</Text>
|
|
180
|
+
) : null}
|
|
181
|
+
</Stack>
|
|
182
|
+
</TreeView.Item>
|
|
183
|
+
)
|
|
184
|
+
}
|
|
185
|
+
/>
|
|
186
|
+
</TreeView.Tree>
|
|
187
|
+
</TreeView.Root>
|
|
188
|
+
)}
|
|
189
|
+
</Box>
|
|
190
|
+
</Stack>
|
|
191
|
+
);
|
|
192
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type FileTreeItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
type: "file" | "folder";
|
|
5
|
+
meta?: string;
|
|
6
|
+
children?: FileTreeItem[];
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const mapFilesById = (nodes: FileTreeItem[]) => {
|
|
10
|
+
const map = new Map<string, FileTreeItem>();
|
|
11
|
+
|
|
12
|
+
const visit = (items: FileTreeItem[]) => {
|
|
13
|
+
items.forEach((item) => {
|
|
14
|
+
if (item.type === "file") {
|
|
15
|
+
map.set(item.id, item);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
if (item.children) {
|
|
20
|
+
visit(item.children);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
visit(nodes);
|
|
26
|
+
|
|
27
|
+
return map;
|
|
28
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HStack, type StackProps } from "@chakra-ui/react";
|
|
2
|
+
|
|
3
|
+
interface HorizontalMenuStackProps extends StackProps {
|
|
4
|
+
children?: StackProps["children"];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function HorizontalMenuStack(props: HorizontalMenuStackProps) {
|
|
8
|
+
const { children, ...rest } = props;
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<HStack {...rest} minH="49px" justify="space-between" align="center" borderBottomWidth="1px" p="xs">
|
|
12
|
+
{children}
|
|
13
|
+
</HStack>
|
|
14
|
+
);
|
|
15
|
+
}
|