@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,56 @@
|
|
|
1
|
+
import { Button, CloseButton, Dialog, Stack, Text } from "@chakra-ui/react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
|
|
4
|
+
interface DeleteConfirmationModalProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onDelete: () => void | Promise<void>;
|
|
8
|
+
headline?: string;
|
|
9
|
+
notificationText?: string;
|
|
10
|
+
buttonText?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type { DeleteConfirmationModalProps };
|
|
14
|
+
|
|
15
|
+
export const DeleteConfirmationModal = (props: DeleteConfirmationModalProps) => {
|
|
16
|
+
const [isDeleting, setIsDeleting] = useState(false);
|
|
17
|
+
const { headline, buttonText, notificationText, onDelete, open, onClose } = props;
|
|
18
|
+
|
|
19
|
+
const handleDelete = async () => {
|
|
20
|
+
setIsDeleting(true);
|
|
21
|
+
|
|
22
|
+
try {
|
|
23
|
+
await onDelete();
|
|
24
|
+
onClose();
|
|
25
|
+
} catch {
|
|
26
|
+
// Errors surface through parent state.
|
|
27
|
+
} finally {
|
|
28
|
+
setIsDeleting(false);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Dialog.Root open={open} onOpenChange={onClose}>
|
|
34
|
+
<Dialog.Backdrop />
|
|
35
|
+
<Dialog.Positioner>
|
|
36
|
+
<Dialog.Content>
|
|
37
|
+
<Dialog.Header>
|
|
38
|
+
<Text textStyle="heading/M">{headline}</Text>
|
|
39
|
+
<Dialog.CloseTrigger asChild>
|
|
40
|
+
<CloseButton size="sm" />
|
|
41
|
+
</Dialog.CloseTrigger>
|
|
42
|
+
</Dialog.Header>
|
|
43
|
+
<Dialog.Body>{notificationText}</Dialog.Body>
|
|
44
|
+
<Dialog.Footer>
|
|
45
|
+
<Stack direction="row" gap="1">
|
|
46
|
+
<Button onClick={onClose}>Close</Button>
|
|
47
|
+
<Button loading={isDeleting} variant="solid" colorPalette="red" onClick={handleDelete}>
|
|
48
|
+
{buttonText}
|
|
49
|
+
</Button>
|
|
50
|
+
</Stack>
|
|
51
|
+
</Dialog.Footer>
|
|
52
|
+
</Dialog.Content>
|
|
53
|
+
</Dialog.Positioner>
|
|
54
|
+
</Dialog.Root>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { DiffBubble } from "./diff-bubble";
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof DiffBubble> = {
|
|
5
|
+
title: "Components/DiffBubble",
|
|
6
|
+
component: DiffBubble,
|
|
7
|
+
args: {
|
|
8
|
+
fileName: "src/index.ts",
|
|
9
|
+
additions: 12,
|
|
10
|
+
deletions: 4,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default meta;
|
|
15
|
+
|
|
16
|
+
type Story = StoryObj<typeof DiffBubble>;
|
|
17
|
+
|
|
18
|
+
export const Default: Story = {};
|
|
19
|
+
|
|
20
|
+
export const Ghost: Story = {
|
|
21
|
+
args: {
|
|
22
|
+
variant: "ghost",
|
|
23
|
+
label: "Changes",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const NoFileName: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
fileName: undefined,
|
|
30
|
+
label: "Modified",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const GhostNoFileName: Story = {
|
|
35
|
+
args: {
|
|
36
|
+
variant: "ghost",
|
|
37
|
+
fileName: undefined,
|
|
38
|
+
label: "Total diff:",
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const Small: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
variant: "ghost",
|
|
45
|
+
size: "small",
|
|
46
|
+
fileName: undefined,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const Clickable: Story = {
|
|
51
|
+
args: {
|
|
52
|
+
variant: "ghost",
|
|
53
|
+
size: "small",
|
|
54
|
+
fileName: undefined,
|
|
55
|
+
onClick: () => {},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export const LongFileName: Story = {
|
|
60
|
+
args: {
|
|
61
|
+
fileName: "src/very/long/path/to/a/deeply/nested/file/component-with-a-very-long-name.tsx",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const LargeDiff: Story = {
|
|
66
|
+
args: {
|
|
67
|
+
additions: 1240,
|
|
68
|
+
deletions: 892,
|
|
69
|
+
},
|
|
70
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Span } from "@chakra-ui/react";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
import type { ComponentProps, MouseEvent } from "react";
|
|
4
|
+
|
|
5
|
+
interface DiffBubbleProps extends Omit<ComponentProps<typeof Span>, "onClick"> {
|
|
6
|
+
fileName?: string;
|
|
7
|
+
additions: number;
|
|
8
|
+
deletions: number;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
variant?: "outline" | "ghost";
|
|
11
|
+
size?: "default" | "small";
|
|
12
|
+
onClick?: (event: MouseEvent<HTMLSpanElement>) => void;
|
|
13
|
+
onClickFileLink?: () => void;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const DiffBubble = (props: DiffBubbleProps) => {
|
|
17
|
+
const {
|
|
18
|
+
fileName,
|
|
19
|
+
additions,
|
|
20
|
+
deletions,
|
|
21
|
+
label,
|
|
22
|
+
variant = "outline",
|
|
23
|
+
size = "default",
|
|
24
|
+
onClick,
|
|
25
|
+
onClickFileLink,
|
|
26
|
+
} = props;
|
|
27
|
+
|
|
28
|
+
const isSmall = size === "small";
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Span
|
|
32
|
+
display="inline-flex"
|
|
33
|
+
alignItems="center"
|
|
34
|
+
gap={"2xs"}
|
|
35
|
+
border={variant === "outline" ? "1px solid" : "none"}
|
|
36
|
+
borderColor="border.muted"
|
|
37
|
+
color="fg.muted"
|
|
38
|
+
paddingX={variant === "outline" ? (isSmall ? "3xs" : "2xs") : "0"}
|
|
39
|
+
paddingY="1px"
|
|
40
|
+
borderRadius="xs"
|
|
41
|
+
textStyle={isSmall ? "label/S/regular" : undefined}
|
|
42
|
+
cursor={onClick ? "pointer" : "default"}
|
|
43
|
+
onClick={onClick}
|
|
44
|
+
>
|
|
45
|
+
{label}
|
|
46
|
+
{fileName && (
|
|
47
|
+
<Span
|
|
48
|
+
display="inline-block"
|
|
49
|
+
maxW="24ch"
|
|
50
|
+
truncate
|
|
51
|
+
mr="xs"
|
|
52
|
+
title={fileName}
|
|
53
|
+
onClick={(e) => {
|
|
54
|
+
e.stopPropagation();
|
|
55
|
+
onClickFileLink?.();
|
|
56
|
+
}}
|
|
57
|
+
cursor={onClickFileLink ? "pointer" : "default"}
|
|
58
|
+
_hover={{
|
|
59
|
+
textDecoration: onClickFileLink ? "underline" : "none",
|
|
60
|
+
color: onClickFileLink ? "fg.blue-dark" : "fg.muted",
|
|
61
|
+
}}
|
|
62
|
+
>
|
|
63
|
+
{fileName}
|
|
64
|
+
</Span>
|
|
65
|
+
)}
|
|
66
|
+
<Span color="fg.success">{`+${additions}`}</Span>
|
|
67
|
+
<Span color="fg.error">{`-${deletions}`}</Span>
|
|
68
|
+
</Span>
|
|
69
|
+
);
|
|
70
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { Box, Grid, IconButton, Text } from "@chakra-ui/react";
|
|
2
|
+
import { ChevronDown, ChevronRight } from "lucide-react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { DiffBubble } from "@/components/diff-bubble";
|
|
5
|
+
import { DiffEditor } from "./diff-editor";
|
|
6
|
+
|
|
7
|
+
export interface Diff {
|
|
8
|
+
change: "added" | "deleted" | "modified" | "renamed" | "copied" | "permissionChange";
|
|
9
|
+
oldPath?: string;
|
|
10
|
+
newPath?: string;
|
|
11
|
+
oldContent?: string;
|
|
12
|
+
newContent?: string;
|
|
13
|
+
additions?: number;
|
|
14
|
+
deletions?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface DiffCardProps {
|
|
18
|
+
diff: Diff;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const getLanguage = (path: string) => {
|
|
22
|
+
const ext = path.split(".").pop()?.toLowerCase();
|
|
23
|
+
switch (ext) {
|
|
24
|
+
case "ts":
|
|
25
|
+
case "tsx":
|
|
26
|
+
return "typescript";
|
|
27
|
+
case "js":
|
|
28
|
+
case "jsx":
|
|
29
|
+
return "javascript";
|
|
30
|
+
case "json":
|
|
31
|
+
return "json";
|
|
32
|
+
case "md":
|
|
33
|
+
return "markdown";
|
|
34
|
+
case "py":
|
|
35
|
+
return "python";
|
|
36
|
+
case "go":
|
|
37
|
+
return "go";
|
|
38
|
+
case "rs":
|
|
39
|
+
return "rust";
|
|
40
|
+
case "css":
|
|
41
|
+
return "css";
|
|
42
|
+
case "html":
|
|
43
|
+
return "html";
|
|
44
|
+
case "sh":
|
|
45
|
+
return "shell";
|
|
46
|
+
case "yml":
|
|
47
|
+
case "yaml":
|
|
48
|
+
return "yaml";
|
|
49
|
+
default:
|
|
50
|
+
return "plaintext";
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const DiffCard = (props: DiffCardProps) => {
|
|
55
|
+
const { diff } = props;
|
|
56
|
+
const [isExpanded, setIsExpanded] = useState(true);
|
|
57
|
+
|
|
58
|
+
const filePath = diff.newPath || diff.oldPath || "unknown";
|
|
59
|
+
const language = getLanguage(filePath);
|
|
60
|
+
|
|
61
|
+
const additions = diff.additions ?? 0;
|
|
62
|
+
const deletions = diff.deletions ?? 0;
|
|
63
|
+
|
|
64
|
+
return (
|
|
65
|
+
<Box
|
|
66
|
+
border="1px solid"
|
|
67
|
+
borderColor="border.muted"
|
|
68
|
+
borderRadius="xs"
|
|
69
|
+
overflow="hidden"
|
|
70
|
+
bg="bg"
|
|
71
|
+
width="100%"
|
|
72
|
+
maxW="100%"
|
|
73
|
+
>
|
|
74
|
+
<Grid
|
|
75
|
+
templateColumns="auto minmax(0, 1fr) auto"
|
|
76
|
+
px="xs"
|
|
77
|
+
py="2xs"
|
|
78
|
+
alignItems="center"
|
|
79
|
+
justifyContent="space-between"
|
|
80
|
+
borderBottom={isExpanded ? "1px solid" : "none"}
|
|
81
|
+
borderColor="border.muted"
|
|
82
|
+
cursor="pointer"
|
|
83
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
84
|
+
gap="sm"
|
|
85
|
+
>
|
|
86
|
+
<IconButton
|
|
87
|
+
aria-label={isExpanded ? "Collapse" : "Expand"}
|
|
88
|
+
variant="ghost"
|
|
89
|
+
size="2xs"
|
|
90
|
+
onClick={(event) => {
|
|
91
|
+
event.stopPropagation();
|
|
92
|
+
setIsExpanded(!isExpanded);
|
|
93
|
+
}}
|
|
94
|
+
flexShrink={0}
|
|
95
|
+
>
|
|
96
|
+
{isExpanded ? <ChevronDown size={16} /> : <ChevronRight size={16} />}
|
|
97
|
+
</IconButton>
|
|
98
|
+
|
|
99
|
+
<Box minW={0} overflow="hidden" textOverflow="ellipsis" whiteSpace="nowrap" title={filePath}>
|
|
100
|
+
{diff.change === "renamed" ? (
|
|
101
|
+
<Text as="span" textStyle="sm">
|
|
102
|
+
<Text as="span" color="fg.muted" textDecoration="line-through" mr="xs">
|
|
103
|
+
{diff.oldPath}
|
|
104
|
+
</Text>
|
|
105
|
+
<Box as="span" display="inline-flex" alignItems="center" verticalAlign="middle" mr="xs">
|
|
106
|
+
<ChevronRight size={12} />
|
|
107
|
+
</Box>
|
|
108
|
+
{diff.newPath}
|
|
109
|
+
</Text>
|
|
110
|
+
) : diff.change === "deleted" ? (
|
|
111
|
+
<Text as="span" color="fg.muted" textDecoration="line-through" textStyle="sm">
|
|
112
|
+
{filePath}
|
|
113
|
+
</Text>
|
|
114
|
+
) : (
|
|
115
|
+
<Text as="span" textStyle="sm">
|
|
116
|
+
{filePath}
|
|
117
|
+
</Text>
|
|
118
|
+
)}
|
|
119
|
+
</Box>
|
|
120
|
+
|
|
121
|
+
<Box flexShrink={0}>
|
|
122
|
+
<DiffBubble variant="ghost" additions={additions} deletions={deletions} />
|
|
123
|
+
</Box>
|
|
124
|
+
</Grid>
|
|
125
|
+
|
|
126
|
+
{isExpanded && (
|
|
127
|
+
<Box height="400px" bg="bg">
|
|
128
|
+
<DiffEditor
|
|
129
|
+
original={diff.oldContent || ""}
|
|
130
|
+
modified={diff.newContent || ""}
|
|
131
|
+
language={language}
|
|
132
|
+
sideBySide={false}
|
|
133
|
+
disableScroll={false}
|
|
134
|
+
/>
|
|
135
|
+
</Box>
|
|
136
|
+
)}
|
|
137
|
+
</Box>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Box, Flex } from "@chakra-ui/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
import { type Diff, DiffDrawer } from "./diff-drawer";
|
|
5
|
+
|
|
6
|
+
type StoryFn = () => ReactNode;
|
|
7
|
+
|
|
8
|
+
const sampleDiffs: Diff[] = [
|
|
9
|
+
{
|
|
10
|
+
change: "modified",
|
|
11
|
+
oldPath: "src/index.ts",
|
|
12
|
+
newPath: "src/index.ts",
|
|
13
|
+
oldContent: `import { foo } from "./foo";\n\nconsole.log(foo);\n`,
|
|
14
|
+
newContent: `import { foo, bar } from "./foo";\n\nconsole.log(foo);\nconsole.log(bar);\n`,
|
|
15
|
+
additions: 2,
|
|
16
|
+
deletions: 0,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
change: "added",
|
|
20
|
+
newPath: "src/new-file.tsx",
|
|
21
|
+
oldContent: "",
|
|
22
|
+
newContent: `export const NewFile = () => {\n return <div>New File</div>;\n};\n`,
|
|
23
|
+
additions: 3,
|
|
24
|
+
deletions: 0,
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
change: "deleted",
|
|
28
|
+
oldPath: "src/old-file.ts",
|
|
29
|
+
oldContent: `export const old = true;\n`,
|
|
30
|
+
newContent: "",
|
|
31
|
+
additions: 0,
|
|
32
|
+
deletions: 1,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
change: "renamed",
|
|
36
|
+
oldPath: "src/utils.ts",
|
|
37
|
+
newPath: "src/helpers.ts",
|
|
38
|
+
oldContent: `export const util = () => {};\n`,
|
|
39
|
+
newContent: `export const helper = () => {};\n`,
|
|
40
|
+
additions: 1,
|
|
41
|
+
deletions: 1,
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
change: "modified",
|
|
45
|
+
oldPath:
|
|
46
|
+
"packages/very-long-directory-name-that-should-be-truncated-because-it-is-so-long/and-another-subdirectory/even-more-nesting/the-final-file-name-which-is-also-quite-long.ts",
|
|
47
|
+
newPath:
|
|
48
|
+
"packages/very-long-directory-name-that-should-be-truncated-because-it-is-so-long/and-another-subdirectory/even-more-nesting/the-final-file-name-which-is-also-quite-long.ts",
|
|
49
|
+
oldContent: "// long path test\n",
|
|
50
|
+
newContent: "// long path test - updated\n",
|
|
51
|
+
additions: 1,
|
|
52
|
+
deletions: 0,
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
const meta: Meta<typeof DiffDrawer> = {
|
|
57
|
+
title: "Components/DiffDrawer",
|
|
58
|
+
component: DiffDrawer,
|
|
59
|
+
decorators: [
|
|
60
|
+
(Story: StoryFn) => (
|
|
61
|
+
<Flex height="100vh" border="1px solid" borderColor="border.muted" borderRadius="md" overflow="hidden">
|
|
62
|
+
<Box flex="1" p="md"></Box>
|
|
63
|
+
<Box w="400px" h="full">
|
|
64
|
+
<Story />
|
|
65
|
+
</Box>
|
|
66
|
+
</Flex>
|
|
67
|
+
),
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default meta;
|
|
72
|
+
|
|
73
|
+
type Story = StoryObj<typeof DiffDrawer>;
|
|
74
|
+
|
|
75
|
+
export const Default: Story = {
|
|
76
|
+
render: (args) => <DiffDrawer {...args} />,
|
|
77
|
+
args: {
|
|
78
|
+
diffs: sampleDiffs,
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export const SingleFile: Story = {
|
|
83
|
+
render: (args) => <DiffDrawer {...args} />,
|
|
84
|
+
args: {
|
|
85
|
+
diffs: [sampleDiffs[0]],
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const changes: Diff["change"][] = ["modified", "added", "deleted", "renamed"];
|
|
90
|
+
|
|
91
|
+
const manyDiffs: Diff[] = Array.from({ length: 200 }, (_, i) => ({
|
|
92
|
+
change: changes[i % changes.length],
|
|
93
|
+
oldPath: `src/components/file-${i}.ts`,
|
|
94
|
+
newPath: `src/components/file-${i}.ts`,
|
|
95
|
+
oldContent: `// file ${i} original\nexport const value = ${i};\n`,
|
|
96
|
+
newContent: `// file ${i} updated\nexport const value = ${i + 1};\n`,
|
|
97
|
+
additions: 1,
|
|
98
|
+
deletions: 1,
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
export const ManyFiles: Story = {
|
|
102
|
+
render: (args) => <DiffDrawer {...args} />,
|
|
103
|
+
args: {
|
|
104
|
+
diffs: manyDiffs,
|
|
105
|
+
},
|
|
106
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Box, Stack } from "@chakra-ui/react";
|
|
2
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
3
|
+
import { useRef } from "react";
|
|
4
|
+
import { type Diff, DiffCard } from "./diff-card";
|
|
5
|
+
import { EmptyState } from "./empty-state";
|
|
6
|
+
|
|
7
|
+
interface DiffDrawerProps {
|
|
8
|
+
diffs: Diff[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type { Diff };
|
|
12
|
+
|
|
13
|
+
export function DiffDrawer(props: DiffDrawerProps) {
|
|
14
|
+
const { diffs } = props;
|
|
15
|
+
const scrollRef = useRef<HTMLDivElement>(null);
|
|
16
|
+
|
|
17
|
+
const virtualizer = useVirtualizer({
|
|
18
|
+
count: diffs.length,
|
|
19
|
+
getScrollElement: () => scrollRef.current,
|
|
20
|
+
estimateSize: () => 42,
|
|
21
|
+
overscan: 5,
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
if (diffs.length === 0) {
|
|
25
|
+
return (
|
|
26
|
+
<Stack h="full" minH="0" gap="0">
|
|
27
|
+
<Stack flex="1" minH="0" overflowY="auto" p="xs" gap="xs">
|
|
28
|
+
<EmptyState title="No changes detected" description="Make some changes to see the diff here." paddingY="sm" />
|
|
29
|
+
</Stack>
|
|
30
|
+
</Stack>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<Stack h="full" minH="0" gap="0">
|
|
36
|
+
<Box position="relative" flex="1" minH="0">
|
|
37
|
+
<Box ref={scrollRef} position="absolute" inset="0" overflowY="auto" p="xs">
|
|
38
|
+
<Box position="relative" width="100%" style={{ height: virtualizer.getTotalSize() }}>
|
|
39
|
+
{virtualizer.getVirtualItems().map((virtualItem) => (
|
|
40
|
+
<Box
|
|
41
|
+
key={virtualItem.key}
|
|
42
|
+
data-index={virtualItem.index}
|
|
43
|
+
ref={virtualizer.measureElement}
|
|
44
|
+
position="absolute"
|
|
45
|
+
top="0"
|
|
46
|
+
left="0"
|
|
47
|
+
width="100%"
|
|
48
|
+
pb="xs"
|
|
49
|
+
style={{ transform: `translateY(${virtualItem.start}px)` }}
|
|
50
|
+
>
|
|
51
|
+
<DiffCard diff={diffs[virtualItem.index]} />
|
|
52
|
+
</Box>
|
|
53
|
+
))}
|
|
54
|
+
</Box>
|
|
55
|
+
</Box>
|
|
56
|
+
</Box>
|
|
57
|
+
</Stack>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { DiffEditor as MonacoDiffEditor } from "@monaco-editor/react";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { customTheme } from "./code-editor";
|
|
4
|
+
|
|
5
|
+
interface DiffEditorProps {
|
|
6
|
+
original: string;
|
|
7
|
+
modified: string;
|
|
8
|
+
language?: string;
|
|
9
|
+
sideBySide?: boolean;
|
|
10
|
+
disableScroll?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function DiffEditor(props: DiffEditorProps) {
|
|
14
|
+
const { original, modified, language = "plaintext", sideBySide = false, disableScroll = true } = props;
|
|
15
|
+
|
|
16
|
+
const options = useMemo(() => {
|
|
17
|
+
return {
|
|
18
|
+
renderSideBySide: sideBySide,
|
|
19
|
+
readOnly: true,
|
|
20
|
+
fontSize: 11,
|
|
21
|
+
minimap: { enabled: false },
|
|
22
|
+
wordWrap: "on" as const,
|
|
23
|
+
scrollBeyondLastLine: false,
|
|
24
|
+
...(disableScroll
|
|
25
|
+
? {
|
|
26
|
+
scrollbar: {
|
|
27
|
+
vertical: "hidden" as const,
|
|
28
|
+
horizontal: "hidden" as const,
|
|
29
|
+
useShadows: false,
|
|
30
|
+
alwaysConsumeMouseWheel: false,
|
|
31
|
+
},
|
|
32
|
+
overviewRulerLanes: 0,
|
|
33
|
+
}
|
|
34
|
+
: {}),
|
|
35
|
+
} as const;
|
|
36
|
+
}, [sideBySide, disableScroll]);
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<MonacoDiffEditor
|
|
40
|
+
width="100%"
|
|
41
|
+
height="100%"
|
|
42
|
+
original={original}
|
|
43
|
+
modified={modified}
|
|
44
|
+
language={language}
|
|
45
|
+
theme="ps-theme"
|
|
46
|
+
options={options}
|
|
47
|
+
beforeMount={(monaco) => {
|
|
48
|
+
monaco.editor.defineTheme("ps-theme", customTheme);
|
|
49
|
+
}}
|
|
50
|
+
onMount={(_editor, monaco) => {
|
|
51
|
+
monaco.editor.setTheme("ps-theme");
|
|
52
|
+
}}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { Box, Button, Flex, Text } from "@chakra-ui/react";
|
|
2
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { DrawerInline, DrawerInlineBody, DrawerInlineFooter, DrawerInlineHeader } from "./drawer-inline";
|
|
5
|
+
|
|
6
|
+
const meta: Meta<typeof DrawerInline> = {
|
|
7
|
+
title: "Components/DrawerInline",
|
|
8
|
+
component: DrawerInline,
|
|
9
|
+
decorators: [
|
|
10
|
+
(Story) => (
|
|
11
|
+
<Box height="500px" width="100%" p="md">
|
|
12
|
+
<Story />
|
|
13
|
+
</Box>
|
|
14
|
+
),
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<typeof DrawerInline>;
|
|
20
|
+
|
|
21
|
+
export const Default: Story = {
|
|
22
|
+
render: (args) => (
|
|
23
|
+
<Flex height="100%" border="1px solid" borderColor="border.muted" borderRadius="md" overflow="hidden">
|
|
24
|
+
<Box flex="1" p="md">
|
|
25
|
+
<Text>Main Content Area</Text>
|
|
26
|
+
<Text color="fg.muted" textStyle="label/XS">
|
|
27
|
+
The drawer will appear to the right of this content.
|
|
28
|
+
</Text>
|
|
29
|
+
</Box>
|
|
30
|
+
<DrawerInline {...args}>
|
|
31
|
+
<DrawerInlineHeader title="Drawer Title" onClose={() => {}} />
|
|
32
|
+
<DrawerInlineBody p="md">
|
|
33
|
+
<Text>This is the drawer body content.</Text>
|
|
34
|
+
<Text color="fg.muted">It has a vertical separator on the left and scrolls if the content is too long.</Text>
|
|
35
|
+
{Array.from({ length: 10 }).map((_, i) => (
|
|
36
|
+
<Box key={i} p="sm" bg="bg.muted" borderRadius="sm">
|
|
37
|
+
Item {i + 1}
|
|
38
|
+
</Box>
|
|
39
|
+
))}
|
|
40
|
+
</DrawerInlineBody>
|
|
41
|
+
<DrawerInlineFooter>
|
|
42
|
+
<Button variant="outline" size="sm">
|
|
43
|
+
Cancel
|
|
44
|
+
</Button>
|
|
45
|
+
<Button variant="solid" size="sm">
|
|
46
|
+
Save
|
|
47
|
+
</Button>
|
|
48
|
+
</DrawerInlineFooter>
|
|
49
|
+
</DrawerInline>
|
|
50
|
+
</Flex>
|
|
51
|
+
),
|
|
52
|
+
args: {
|
|
53
|
+
open: true,
|
|
54
|
+
width: "320px",
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export const WithActions: Story = {
|
|
59
|
+
render: (args) => (
|
|
60
|
+
<Flex height="100%" border="1px solid" borderColor="border.muted" borderRadius="md" overflow="hidden">
|
|
61
|
+
<Box flex="1" p="md">
|
|
62
|
+
<Text>Main Content Area</Text>
|
|
63
|
+
<Text color="fg.muted" textStyle="label/XS">
|
|
64
|
+
The drawer will appear to the right of this content.
|
|
65
|
+
</Text>
|
|
66
|
+
</Box>
|
|
67
|
+
<DrawerInline {...args}>
|
|
68
|
+
<DrawerInlineHeader
|
|
69
|
+
title="Project Settings"
|
|
70
|
+
onClose={() => {}}
|
|
71
|
+
actions={
|
|
72
|
+
<Button variant="ghost" size="sm">
|
|
73
|
+
Edit
|
|
74
|
+
</Button>
|
|
75
|
+
}
|
|
76
|
+
/>
|
|
77
|
+
<DrawerInlineBody p="md">
|
|
78
|
+
<Text textStyle="label/L/medium">General Settings</Text>
|
|
79
|
+
<Box height="100px" bg="bg.muted" borderRadius="md" />
|
|
80
|
+
<Text textStyle="label/L/medium">Advanced Settings</Text>
|
|
81
|
+
<Box height="200px" bg="bg.muted" borderRadius="md" />
|
|
82
|
+
</DrawerInlineBody>
|
|
83
|
+
</DrawerInline>
|
|
84
|
+
</Flex>
|
|
85
|
+
),
|
|
86
|
+
args: {
|
|
87
|
+
open: true,
|
|
88
|
+
width: "400px",
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const Interactive: Story = {
|
|
93
|
+
render: function Render(args) {
|
|
94
|
+
const [open, setOpen] = useState(false);
|
|
95
|
+
return (
|
|
96
|
+
<Flex height="100%" border="1px solid" borderColor="border.muted" borderRadius="md" overflow="hidden">
|
|
97
|
+
<Box flex="1" p="md">
|
|
98
|
+
<Text mb="md">Main Content Area</Text>
|
|
99
|
+
<Button onClick={() => setOpen(true)} size="sm">
|
|
100
|
+
Open Drawer
|
|
101
|
+
</Button>
|
|
102
|
+
</Box>
|
|
103
|
+
<DrawerInline {...args} open={open}>
|
|
104
|
+
<DrawerInlineHeader title="Interactive Drawer" onClose={() => setOpen(false)} />
|
|
105
|
+
<DrawerInlineBody p="md">
|
|
106
|
+
<Text>Click the close icon in the header to close me.</Text>
|
|
107
|
+
<Text color="fg.muted">
|
|
108
|
+
The drawer is rendered inline with the main content, pushing it if necessary or simply occupying the
|
|
109
|
+
assigned space.
|
|
110
|
+
</Text>
|
|
111
|
+
</DrawerInlineBody>
|
|
112
|
+
<DrawerInlineFooter>
|
|
113
|
+
<Button variant="outline" size="sm" onClick={() => setOpen(false)}>
|
|
114
|
+
Close
|
|
115
|
+
</Button>
|
|
116
|
+
</DrawerInlineFooter>
|
|
117
|
+
</DrawerInline>
|
|
118
|
+
</Flex>
|
|
119
|
+
);
|
|
120
|
+
},
|
|
121
|
+
args: {
|
|
122
|
+
width: "320px",
|
|
123
|
+
},
|
|
124
|
+
};
|