@pstdio/ui 0.0.3 → 0.0.4
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/dist/EquationComponent-DeDYHvqY.js +62 -0
- package/dist/EquationComponent-DeDYHvqY.js.map +1 -0
- package/dist/chat-ui.js +347 -0
- package/dist/chat-ui.js.map +1 -0
- package/dist/components/button.stories.d.ts +18 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +1161 -0
- package/dist/components/chat-ui/index.d.ts +10 -0
- package/dist/components/chat-ui/utils/get-icon.d.ts +34 -0
- package/{storybook-static → dist}/components/column-file-browser.d.ts +1 -2
- package/dist/components/column-file-browser.stories.d.ts +15 -0
- package/dist/components/data-table/build-columns.d.ts +3 -0
- package/dist/components/data-table/data-table.d.ts +2 -0
- package/{storybook-static/components → dist/components/data-table}/data-table.stories.d.ts +1 -1
- package/dist/components/data-table/helpers.d.ts +10 -0
- package/dist/components/data-table/index.d.ts +3 -0
- package/dist/components/data-table/pagination-footer.d.ts +5 -0
- package/dist/components/data-table/selection-toolbar.d.ts +9 -0
- package/{storybook-static/components/data-table.d.ts → dist/components/data-table/types.d.ts} +6 -4
- package/{storybook-static → dist}/components/file-selector.d.ts +1 -2
- package/{storybook-static/components/style-guide.stories.d.ts → dist/components/file-selector.stories.d.ts} +6 -3
- package/{storybook-static → dist}/components/info-card.d.ts +1 -2
- package/dist/components/info-card.stories.d.ts +41 -0
- package/{storybook-static → dist}/components/menu-item.d.ts +1 -1
- package/dist/components/menu-item.stories.d.ts +72 -0
- package/dist/components/number-input.d.ts +8 -0
- package/{storybook-static → dist}/components/param-editor.stories.d.ts +1 -0
- package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.d.ts +1 -0
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -0
- package/dist/components/session-indicator.d.ts +14 -0
- package/dist/components/session-indicator.stories.d.ts +11 -0
- package/dist/components/slider.stories.d.ts +15 -0
- package/dist/components/style-guide.stories.d.ts +28 -0
- package/dist/components/ticket-board.d.ts +33 -0
- package/dist/components/ticket-board.stories.d.ts +5 -0
- package/dist/components/ticket-card.d.ts +24 -0
- package/dist/components/ticket-card.stories.d.ts +17 -0
- package/dist/components/toaster.d.ts +3 -0
- package/{storybook-static → dist}/index.d.ts +5 -3
- package/dist/index.js +435 -0
- package/dist/index.js.map +1 -0
- package/dist/rich-message-CiA3ripk.js +1401 -0
- package/dist/rich-message-CiA3ripk.js.map +1 -0
- package/dist/rich-text.js +485 -0
- package/dist/rich-text.js.map +1 -0
- package/dist/style.css +1 -0
- package/{storybook-static → dist}/theme/primitives/colors.d.ts +6 -0
- package/dist/theme-9E0MRtZk.js +1985 -0
- package/dist/theme-9E0MRtZk.js.map +1 -0
- package/{src/theme/index.ts → dist/theme.js} +5 -2
- package/dist/theme.js.map +1 -0
- package/dist/tooltip-Gm7PLwZG.js +51 -0
- package/dist/tooltip-Gm7PLwZG.js.map +1 -0
- package/{storybook-static/theme/applyThemePreference.d.ts → dist/utils/apply-theme-preference.d.ts} +1 -1
- package/{storybook-static/theme → dist/utils}/theme-preference.d.ts +3 -3
- package/package.json +4 -1
- package/.storybook/main.ts +0 -28
- package/.storybook/preview.tsx +0 -28
- package/.storybook/vitest.setup.ts +0 -6
- package/src/components/alert.tsx +0 -27
- package/src/components/breadcrumb.stories.tsx +0 -40
- package/src/components/breadcrumb.tsx +0 -67
- package/src/components/button.stories.tsx +0 -151
- package/src/components/chat-ui/agent-types.ts +0 -231
- package/src/components/chat-ui/components/ai-conversation.stories.tsx +0 -49
- package/src/components/chat-ui/components/ai-conversation.tsx +0 -68
- package/src/components/chat-ui/components/ai-message.stories.tsx +0 -60
- package/src/components/chat-ui/components/ai-message.tsx +0 -103
- package/src/components/chat-ui/components/ai-response.stories.tsx +0 -48
- package/src/components/chat-ui/components/ai-response.tsx +0 -19
- package/src/components/chat-ui/components/approval-prompt.tsx +0 -51
- package/src/components/chat-ui/components/attachment-list.stories.tsx +0 -24
- package/src/components/chat-ui/components/attachment-list.tsx +0 -76
- package/src/components/chat-ui/components/auto-scroll.tsx +0 -42
- package/src/components/chat-ui/components/chat-input.stories.tsx +0 -114
- package/src/components/chat-ui/components/chat-input.tsx +0 -142
- package/src/components/chat-ui/components/chat-panel.stories.tsx +0 -396
- package/src/components/chat-ui/components/chat-panel.tsx +0 -97
- package/src/components/chat-ui/components/message-parts-renderer.stories.tsx +0 -59
- package/src/components/chat-ui/components/message-parts-renderer.tsx +0 -133
- package/src/components/chat-ui/components/message-types.ts +0 -40
- package/src/components/chat-ui/components/model-swap-separator.stories.tsx +0 -27
- package/src/components/chat-ui/components/model-swap-separator.tsx +0 -20
- package/src/components/chat-ui/components/send-button.tsx +0 -56
- package/src/components/chat-ui/components/timeline.tsx +0 -414
- package/src/components/chat-ui/components/tool-invocation-timeline.stories.tsx +0 -32
- package/src/components/chat-ui/components/tool-invocation-timeline.tsx +0 -16
- package/src/components/chat-ui/index.ts +0 -15
- package/src/components/chat-ui/mocks/full-conversation-normalized.json +0 -3557
- package/src/components/chat-ui/tool-rendering/build-timeline.ts +0 -127
- package/src/components/chat-ui/tool-rendering/default-renderers.ts +0 -420
- package/src/components/chat-ui/tool-rendering/index.ts +0 -3
- package/src/components/chat-ui/tool-rendering/types.ts +0 -19
- package/src/components/chat-ui/utils/diff.ts +0 -228
- package/src/components/chat-ui/utils/editor-state.ts +0 -5
- package/src/components/chat-ui/utils/get-icon.ts +0 -81
- package/src/components/code-editor.tsx +0 -147
- package/src/components/column-file-browser.stories.tsx +0 -217
- package/src/components/column-file-browser.tsx +0 -380
- package/src/components/content-placeholder.tsx +0 -21
- package/src/components/data-table/build-columns.tsx +0 -78
- package/src/components/data-table/data-table.css +0 -51
- package/src/components/data-table/data-table.stories.tsx +0 -209
- package/src/components/data-table/data-table.tsx +0 -232
- package/src/components/data-table/helpers.tsx +0 -69
- package/src/components/data-table/index.ts +0 -3
- package/src/components/data-table/pagination-footer.tsx +0 -58
- package/src/components/data-table/selection-toolbar.tsx +0 -26
- package/src/components/data-table/types.ts +0 -21
- package/src/components/delete-confirmation-modal.stories.tsx +0 -46
- package/src/components/delete-confirmation-modal.tsx +0 -56
- package/src/components/diff-bubble.stories.tsx +0 -70
- package/src/components/diff-bubble.tsx +0 -70
- package/src/components/diff-card.tsx +0 -139
- package/src/components/diff-drawer.stories.tsx +0 -106
- package/src/components/diff-drawer.tsx +0 -59
- package/src/components/diff-editor.tsx +0 -55
- package/src/components/drawer-inline.stories.tsx +0 -124
- package/src/components/drawer-inline.tsx +0 -90
- package/src/components/empty-state.stories.tsx +0 -65
- package/src/components/empty-state.tsx +0 -28
- package/src/components/error-boundary.tsx +0 -80
- package/src/components/file-selector.stories.tsx +0 -166
- package/src/components/file-selector.tsx +0 -192
- package/src/components/file-tree-helpers.ts +0 -28
- package/src/components/horizontal-menu-stack.tsx +0 -15
- package/src/components/info-card.stories.tsx +0 -120
- package/src/components/info-card.tsx +0 -60
- package/src/components/item-section.stories.tsx +0 -57
- package/src/components/item-section.tsx +0 -57
- package/src/components/layout.stories.tsx +0 -341
- package/src/components/layout.tsx +0 -67
- package/src/components/menu-item.stories.tsx +0 -162
- package/src/components/menu-item.tsx +0 -207
- package/src/components/number-input.tsx +0 -21
- package/src/components/open-source-notices-screen.stories.tsx +0 -69
- package/src/components/open-source-notices-screen.tsx +0 -154
- package/src/components/panel-menu.stories.tsx +0 -44
- package/src/components/panel-menu.tsx +0 -27
- package/src/components/param-editor-color-input.tsx +0 -98
- package/src/components/param-editor-date-input.tsx +0 -106
- package/src/components/param-editor-horizontal-text-input.tsx +0 -130
- package/src/components/param-editor-horizontal.stories.tsx +0 -545
- package/src/components/param-editor-horizontal.tsx +0 -137
- package/src/components/param-editor-input-group.tsx +0 -145
- package/src/components/param-editor-number-input.tsx +0 -145
- package/src/components/param-editor-selection-input.tsx +0 -181
- package/src/components/param-editor-text-input.tsx +0 -113
- package/src/components/param-editor.stories.tsx +0 -986
- package/src/components/param-editor.tsx +0 -142
- package/src/components/param-editor.types.ts +0 -95
- package/src/components/properties.stories.tsx +0 -108
- package/src/components/properties.tsx +0 -73
- package/src/components/pstdio-logo.tsx +0 -26
- package/src/components/resource-badge.stories.tsx +0 -26
- package/src/components/resource-badge.tsx +0 -173
- package/src/components/rich-text/collaborative-markdown-editor/awareness-cursors.tsx +0 -45
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.tsx +0 -230
- package/src/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.tsx +0 -131
- package/src/components/rich-text/index.ts +0 -14
- package/src/components/rich-text/markdown-editor/markdown-editor.stories.tsx +0 -147
- package/src/components/rich-text/markdown-editor/markdown-editor.tsx +0 -112
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +0 -100
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +0 -32
- package/src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.ts +0 -2
- package/src/components/rich-text/prompt-input/commands.ts +0 -44
- package/src/components/rich-text/prompt-input/events.ts +0 -21
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx +0 -8
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts +0 -49
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts +0 -30
- package/src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx +0 -127
- package/src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx +0 -32
- package/src/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.tsx +0 -30
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.ts +0 -15
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.tsx +0 -88
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.tsx +0 -90
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.ts +0 -3
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.ts +0 -45
- package/src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.ts +0 -20
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.tsx +0 -50
- package/src/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.tsx +0 -107
- package/src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts +0 -13
- package/src/components/rich-text/prompt-input/prompt-input.stories.tsx +0 -87
- package/src/components/rich-text/prompt-input/prompt-input.tsx +0 -106
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.css +0 -3
- package/src/components/rich-text/prompt-input/theme/prompt-input-theme.ts +0 -11
- package/src/components/rich-text/prompt-input/utils.ts +0 -158
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx +0 -100
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts +0 -32
- package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.ts +0 -2
- package/src/components/rich-text/rich-message/rich-message.stories.tsx +0 -146
- package/src/components/rich-text/rich-message/rich-message.tsx +0 -118
- package/src/components/rich-text/shared/components/content-editable.tsx +0 -28
- package/src/components/rich-text/shared/components/default-rich-text-components.tsx +0 -99
- package/src/components/rich-text/shared/editor-config.ts +0 -38
- package/src/components/rich-text/shared/nodes/DataTableNode.stories.tsx +0 -52
- package/src/components/rich-text/shared/nodes/DataTableNode.tsx +0 -73
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx +0 -22
- package/src/components/rich-text/shared/plugins/CodePlugin/CodeNode.tsx +0 -57
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.tsx +0 -46
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationNode.tsx +0 -161
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.css +0 -16
- package/src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx +0 -45
- package/src/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.tsx +0 -40
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.css +0 -26
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.tsx +0 -414
- package/src/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.ts +0 -1
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts +0 -52
- package/src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts +0 -16
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.css +0 -163
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.tsx +0 -355
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.tsx +0 -6
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.ts +0 -17
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.ts +0 -39
- package/src/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.ts +0 -23
- package/src/components/rich-text/shared/plugins/StateUpdatePlugin.tsx +0 -21
- package/src/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.tsx +0 -224
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.css +0 -3
- package/src/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.tsx +0 -315
- package/src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx +0 -12
- package/src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx +0 -20
- package/src/components/rich-text/shared/transformers/markdown-transformers.ts +0 -123
- package/src/components/rich-text/shared/types/rich-text-components.ts +0 -17
- package/src/components/rich-text/theme/report-theme.tsx +0 -81
- package/src/components/rich-text/theme/rich-text-theme.css +0 -773
- package/src/components/rich-text/theme/rich-text-theme.tsx +0 -81
- package/src/components/rich-text/types.ts +0 -9
- package/src/components/rich-text/utils/inferResourceType.ts +0 -17
- package/src/components/rich-text/utils/markdown.ts +0 -12
- package/src/components/rich-text/utils/mediaType.ts +0 -31
- package/src/components/session-indicator.stories.tsx +0 -46
- package/src/components/session-indicator.tsx +0 -40
- package/src/components/slider.stories.tsx +0 -38
- package/src/components/slider.tsx +0 -20
- package/src/components/style-guide-data.ts +0 -374
- package/src/components/style-guide.stories.tsx +0 -212
- package/src/components/style-guide.tsx +0 -305
- package/src/components/ticket-board.stories.tsx +0 -109
- package/src/components/ticket-board.tsx +0 -167
- package/src/components/ticket-card.stories.tsx +0 -133
- package/src/components/ticket-card.tsx +0 -126
- package/src/components/toaster.stories.tsx +0 -79
- package/src/components/toaster.tsx +0 -26
- package/src/components/tooltip.tsx +0 -43
- package/src/index.ts +0 -16
- package/src/theme/global.ts +0 -49
- package/src/theme/primitives/colors.ts +0 -209
- package/src/theme/primitives/fonts.ts +0 -33
- package/src/theme/primitives/sizes.ts +0 -49
- package/src/theme/recipes/alert.ts +0 -12
- package/src/theme/recipes/button.ts +0 -124
- package/src/theme/recipes/dialog.ts +0 -11
- package/src/theme/recipes/divider.ts +0 -7
- package/src/theme/recipes/drawer.ts +0 -16
- package/src/theme/recipes/editable.ts +0 -42
- package/src/theme/recipes/form.ts +0 -11
- package/src/theme/recipes/input.ts +0 -25
- package/src/theme/recipes/menu.ts +0 -40
- package/src/theme/recipes/popover.ts +0 -46
- package/src/theme/recipes/progress-circle.ts +0 -22
- package/src/theme/recipes/skeleton.ts +0 -8
- package/src/theme/recipes/textarea.ts +0 -29
- package/src/theme/recipes/tooltip.ts +0 -15
- package/src/theme/theme.ts +0 -70
- package/src/theme/tokens/borders.ts +0 -38
- package/src/theme/tokens/colors.ts +0 -488
- package/src/theme/tokens/layer-styles.ts +0 -15
- package/src/theme/tokens/shadows.ts +0 -47
- package/src/theme/tokens/text.ts +0 -236
- package/src/utils/apply-theme-preference.ts +0 -17
- package/src/utils/formats.ts +0 -27
- package/src/utils/get-file-type-icon.ts +0 -52
- package/src/utils/theme-preference.tsx +0 -60
- package/src/vite-env.d.ts +0 -6
- package/storybook-static/assets/CodeBlockPlugin-C3OWpvP8.js +0 -281
- package/storybook-static/assets/CodeBlockPlugin-e2vWgtYm.css +0 -1
- package/storybook-static/assets/DataTableNode.stories-DLgTftOI.js +0 -33
- package/storybook-static/assets/EquationComponent-CUFxwyNf.js +0 -1
- package/storybook-static/assets/EquationComponent-DWZwfaVI.css +0 -1
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-B6jc8xvg.js +0 -1
- package/storybook-static/assets/FloatingTextFormatToolbarPlugin-D2l3--Te.css +0 -1
- 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 +0 -1
- package/storybook-static/assets/TreeViewPlugin-CyVKCrKJ.js +0 -24
- package/storybook-static/assets/ai-conversation-DcjS--ee.js +0 -1
- package/storybook-static/assets/ai-conversation.stories-COjWuS8V.js +0 -3
- package/storybook-static/assets/ai-message-DLdAGhWH.js +0 -1
- package/storybook-static/assets/ai-message.stories-CRTyreKL.js +0 -3
- package/storybook-static/assets/ai-response-ySM6s0iN.js +0 -1
- package/storybook-static/assets/ai-response.stories-DVBYlrGf.js +0 -11
- package/storybook-static/assets/attachment-list-1p1601I5.js +0 -1
- package/storybook-static/assets/attachment-list.stories-Cydlsnio.js +0 -7
- package/storybook-static/assets/badge-CtgJasjB.js +0 -1
- package/storybook-static/assets/breadcrumb.stories-SAjB-iqH.js +0 -5
- package/storybook-static/assets/button-C7it2n8t.js +0 -1
- package/storybook-static/assets/button.stories-BMVbbb4y.js +0 -72
- package/storybook-static/assets/chat-input-B-915nCM.js +0 -1
- package/storybook-static/assets/chat-input.stories-DrxvpT9p.js +0 -32
- package/storybook-static/assets/chat-panel.stories-D0L6eIte.js +0 -96
- package/storybook-static/assets/chevron-down-BYCAGyCV.js +0 -1
- package/storybook-static/assets/chevron-right-owK1wZnx.js +0 -1
- package/storybook-static/assets/collaborative-markdown-editor-Bj0GvTvv.js +0 -41
- package/storybook-static/assets/collaborative-markdown-editor.stories-B_MUIC5s.js +0 -11
- package/storybook-static/assets/collapsible-DBDG7h1r.js +0 -1
- package/storybook-static/assets/collapsible-content-B1Uq3jUM.js +0 -1
- package/storybook-static/assets/column-file-browser.stories-DPMQnHCw.js +0 -54
- package/storybook-static/assets/compiler-runtime-BXE7OOXE.js +0 -1
- package/storybook-static/assets/computed-style-C0hzrq9-.js +0 -1
- package/storybook-static/assets/create-recipe-context-BU56IzEo.js +0 -1
- package/storybook-static/assets/create-slot-recipe-context-DAhDE6G_.js +0 -1
- package/storybook-static/assets/create-split-props-u5h9OPvL.js +0 -1
- package/storybook-static/assets/createLucideIcon-CcBBUKX8.js +0 -1
- package/storybook-static/assets/data-table-vuIeWXui.css +0 -1
- package/storybook-static/assets/data-table.stories-Cs-q7dpj.js +0 -19
- package/storybook-static/assets/delete-confirmation-modal.stories-C8vDKFRD.js +0 -14
- package/storybook-static/assets/diff-bubble-_zZypMRt.js +0 -1
- package/storybook-static/assets/diff-bubble.stories-DfonanIk.js +0 -39
- package/storybook-static/assets/diff-drawer.stories-CGDWiKD8.js +0 -38
- package/storybook-static/assets/diff-editor-DV9BXqbn.js +0 -11
- package/storybook-static/assets/dismissable-layer-Cc5dFRd8.js +0 -1
- package/storybook-static/assets/drawer-inline.stories-B3Tp7vjL.js +0 -88
- package/storybook-static/assets/empty-state-BXkyq69k.js +0 -1
- package/storybook-static/assets/empty-state.stories-6eYYBOWR.js +0 -29
- package/storybook-static/assets/factory-BR3bc_RM.js +0 -1
- package/storybook-static/assets/factory-DAJZwK4o.js +0 -1
- package/storybook-static/assets/file-selector.stories-PKIGBUd5.js +0 -31
- package/storybook-static/assets/file-text-D5m8MJlG.js +0 -1
- package/storybook-static/assets/flex-DAJL4AFZ.js +0 -1
- package/storybook-static/assets/folder-C5dba_Co.js +0 -1
- package/storybook-static/assets/form-D_Xln9tK.js +0 -1
- package/storybook-static/assets/full-conversation-normalized-LUbl1coD.js +0 -1
- package/storybook-static/assets/grid-7OIKBlfh.js +0 -1
- package/storybook-static/assets/h-stack-DWHd8f97.js +0 -1
- package/storybook-static/assets/horizontal-menu-stack-Cph6x7ui.js +0 -1
- package/storybook-static/assets/icon-C8FN9JqD.js +0 -1
- package/storybook-static/assets/icon-button-DHiUe7rR.js +0 -1
- package/storybook-static/assets/icons-WRA1cA-W.js +0 -1
- package/storybook-static/assets/iframe-2XPD_vrQ.css +0 -1
- package/storybook-static/assets/iframe-B8FSoBNY.js +0 -1075
- package/storybook-static/assets/index-B0y2_lLF.js +0 -1
- package/storybook-static/assets/index-CXwl6T4k.js +0 -1
- package/storybook-static/assets/index-DaXC_qY_.js +0 -1
- package/storybook-static/assets/index-DpB4ozcR.js +0 -1
- package/storybook-static/assets/index-cFwdnc0b.js +0 -1
- package/storybook-static/assets/info-DlgY5-DW.js +0 -1
- package/storybook-static/assets/info-card.stories-Cry0Qfrn.js +0 -55
- package/storybook-static/assets/input-ZSs5cSFQ.js +0 -1
- 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 +0 -1
- package/storybook-static/assets/item-section.stories-kYTPHRsx.js +0 -24
- package/storybook-static/assets/layout.stories-DhSjwzU1.js +0 -3
- package/storybook-static/assets/link-DE5grRtm.js +0 -1
- package/storybook-static/assets/markdown-BLUemkxK.js +0 -1
- package/storybook-static/assets/markdown-editor-Y4eMsgVb.js +0 -1
- package/storybook-static/assets/markdown-editor.stories-DIWw-hRP.js +0 -115
- package/storybook-static/assets/menu-item-CrqDaj9K.js +0 -1
- package/storybook-static/assets/menu-item.stories-D9Isjjrf.js +0 -68
- package/storybook-static/assets/message-parts-renderer.stories-CewRvbm7.js +0 -5
- package/storybook-static/assets/message-types-CEyA7Qm7.js +0 -60
- package/storybook-static/assets/model-swap-separator.stories-DrQW2NWQ.js +0 -9
- package/storybook-static/assets/mutation-observer-CAfGweIM.js +0 -1
- package/storybook-static/assets/normalize-props-D7NI5JRu.js +0 -1
- package/storybook-static/assets/number-C92MPsRM.js +0 -1
- package/storybook-static/assets/number-input-D1aC-9ls.js +0 -7
- 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 +0 -21
- package/storybook-static/assets/overflow-CkG1DOya.js +0 -1
- package/storybook-static/assets/panel-menu-CqLSrdTB.js +0 -1
- package/storybook-static/assets/panel-menu.stories-CxdWaWjq.js +0 -14
- package/storybook-static/assets/param-editor-horizontal.stories-C1o-VOjG.js +0 -561
- package/storybook-static/assets/param-editor-selection-input-2pJE1_W1.js +0 -1
- package/storybook-static/assets/param-editor.stories-0ae3y4Vu.js +0 -921
- 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 +0 -1
- package/storybook-static/assets/preload-helper-PPVm8Dsz.js +0 -1
- package/storybook-static/assets/prompt-input-BLCttowi.js +0 -14
- package/storybook-static/assets/prompt-input-BVbz9joI.css +0 -1
- package/storybook-static/assets/prompt-input.stories-J8-AMVXy.js +0 -9
- package/storybook-static/assets/properties.stories-Bs7ivKgb.js +0 -59
- package/storybook-static/assets/react-18-KY0R7ltw.js +0 -9
- package/storybook-static/assets/render-strategy-BebqUNCa.js +0 -1
- package/storybook-static/assets/resource-badge-Bw5UoU4J.js +0 -1
- package/storybook-static/assets/resource-badge.stories-DtSh-RX9.js +0 -9
- package/storybook-static/assets/rich-message-BIkzo1SM.js +0 -1
- package/storybook-static/assets/rich-message.stories-C9Wc4d3O.js +0 -115
- package/storybook-static/assets/rich-text-theme-Bkhh9rAZ.js +0 -14
- package/storybook-static/assets/rich-text-theme-K2MBoCbx.css +0 -1
- package/storybook-static/assets/separator-CQkMOHNm.js +0 -1
- package/storybook-static/assets/settings-DUgg22A7.js +0 -1
- package/storybook-static/assets/simple-grid-DIKjhnVI.js +0 -1
- package/storybook-static/assets/spinner-ZYH_gvW-.js +0 -1
- package/storybook-static/assets/stack-CN4X31TA.js +0 -1
- package/storybook-static/assets/star-CvcHIXRa.js +0 -1
- package/storybook-static/assets/style-guide.stories-BUvEhZov.js +0 -6
- package/storybook-static/assets/tabbable-DHAf8oAu.js +0 -1
- package/storybook-static/assets/table-BKNSzs2r.js +0 -1
- package/storybook-static/assets/textarea-rqmaWSc5.js +0 -1
- package/storybook-static/assets/toaster-d9nN0H7K.js +0 -1
- package/storybook-static/assets/toaster.stories-BRVCYyaM.js +0 -52
- package/storybook-static/assets/tool-invocation-timeline-B-cS0W6M.js +0 -59
- package/storybook-static/assets/tool-invocation-timeline.stories-DXO59O73.js +0 -5
- package/storybook-static/assets/tooltip-C_a-XGZ8.js +0 -1
- package/storybook-static/assets/tooltip-DZxUoouw.js +0 -1
- package/storybook-static/assets/trash-2-BO05slEk.js +0 -1
- package/storybook-static/assets/typeahead-CuY9WxfQ.js +0 -1
- package/storybook-static/assets/use-field-context-DoxKQlMm.js +0 -1
- package/storybook-static/assets/use-presence-context-DK2PGZth.js +0 -1
- package/storybook-static/assets/v-stack-Btoq6OB_.js +0 -1
- package/storybook-static/assets/x-D42ziktz.js +0 -1
- package/storybook-static/components/chat-ui/mocks/full-conversation-normalized.json.d.ts +0 -3560
- package/storybook-static/components/rich-text/utils/inferResourceType.d.ts +0 -1
- package/storybook-static/favicon-wrapper.svg +0 -46
- package/storybook-static/favicon.svg +0 -1
- package/storybook-static/iframe.html +0 -705
- package/storybook-static/index.html +0 -150
- package/storybook-static/index.json +0 -1
- 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 +0 -1
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +0 -628
- package/storybook-static/sb-addons/themes-1/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/vitest-2/manager-bundle.js +0 -3
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +0 -46
- package/storybook-static/sb-common-assets/favicon.svg +0 -1
- 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 +0 -77956
- package/storybook-static/sb-manager/globals.js +0 -24
- package/storybook-static/sb-manager/manager-stores.js +0 -23
- package/storybook-static/sb-manager/runtime.js +0 -20422
- package/storybook-static/theme/types.d.ts +0 -1
- package/storybook-static/vite-inject-mocker-entry.js +0 -2
- package/tsconfig.json +0 -29
- package/vite.config.ts +0 -85
- package/vitest.shims.d.ts +0 -1
- /package/{storybook-static → dist}/components/alert.d.ts +0 -0
- /package/{storybook-static → dist}/components/breadcrumb.d.ts +0 -0
- /package/{storybook-static → dist}/components/breadcrumb.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/agent-types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-conversation.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-message.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-message.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-response.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/ai-response.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/approval-prompt.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/attachment-list.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/attachment-list.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/auto-scroll.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-input.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-panel.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/chat-panel.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-parts-renderer.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-parts-renderer.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/message-types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/model-swap-separator.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/model-swap-separator.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/send-button.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/tool-invocation-timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/components/tool-invocation-timeline.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/build-timeline.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/default-renderers.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/tool-rendering/types.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/utils/diff.d.ts +0 -0
- /package/{storybook-static → dist}/components/chat-ui/utils/editor-state.d.ts +0 -0
- /package/{storybook-static → dist}/components/code-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/content-placeholder.d.ts +0 -0
- /package/{storybook-static → dist}/components/delete-confirmation-modal.d.ts +0 -0
- /package/{storybook-static → dist}/components/delete-confirmation-modal.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-bubble.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-bubble.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-card.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-drawer.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-drawer.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/diff-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/drawer-inline.d.ts +0 -0
- /package/{storybook-static → dist}/components/drawer-inline.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/empty-state.d.ts +0 -0
- /package/{storybook-static → dist}/components/empty-state.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/error-boundary.d.ts +0 -0
- /package/{storybook-static → dist}/components/file-tree-helpers.d.ts +0 -0
- /package/{storybook-static → dist}/components/horizontal-menu-stack.d.ts +0 -0
- /package/{storybook-static → dist}/components/item-section.d.ts +0 -0
- /package/{storybook-static → dist}/components/item-section.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/layout.d.ts +0 -0
- /package/{storybook-static → dist}/components/layout.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/open-source-notices-screen.d.ts +0 -0
- /package/{storybook-static → dist}/components/open-source-notices-screen.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/panel-menu.d.ts +0 -0
- /package/{storybook-static → dist}/components/panel-menu.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-color-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-date-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal-text-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-horizontal.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-input-group.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-number-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-selection-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor-text-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/param-editor.types.d.ts +0 -0
- /package/{storybook-static → dist}/components/properties.d.ts +0 -0
- /package/{storybook-static → dist}/components/properties.stories.d.ts +0 -0
- /package/{storybook-static/components/schub-logo.d.ts → dist/components/pstdio-logo.d.ts} +0 -0
- /package/{storybook-static → dist}/components/resource-badge.d.ts +0 -0
- /package/{storybook-static → dist}/components/resource-badge.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/awareness-cursors.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/collaborative-markdown-editor/collaborative-markdown-editor.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/markdown-editor.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/markdown-editor.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/commands.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/events.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuOption.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/plugins/keyboard-shortcuts.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/prompt-input.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/prompt-input.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/theme/prompt-input-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/prompt-input/utils.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/rich-message.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/rich-message/rich-message.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/components/content-editable.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/components/default-rich-text-components.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/editor-config.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/nodes/DataTableNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/nodes/DataTableNode.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/CodePlugin/CodeNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationComponent.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/EquationPlugin/KatexRenderer.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/FloatingTextFormatToolbarPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/LinkEditorPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/LinkPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/getSelectedNode.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/setFloatingElemPos.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/LinkEditorPlugin/utils/url.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/StateUpdatePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/ToggleEditablePlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/transformers/markdown-transformers.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/shared/types/rich-text-components.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/theme/report-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/theme/rich-text-theme.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/types.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/utils/markdown.d.ts +0 -0
- /package/{storybook-static → dist}/components/rich-text/utils/mediaType.d.ts +0 -0
- /package/{storybook-static → dist}/components/slider.d.ts +0 -0
- /package/{storybook-static → dist}/components/style-guide-data.d.ts +0 -0
- /package/{storybook-static → dist}/components/style-guide.d.ts +0 -0
- /package/{storybook-static → dist}/components/toaster.stories.d.ts +0 -0
- /package/{storybook-static → dist}/components/tooltip.d.ts +0 -0
- /package/{storybook-static → dist}/theme/global.d.ts +0 -0
- /package/{storybook-static → dist}/theme/index.d.ts +0 -0
- /package/{storybook-static → dist}/theme/primitives/fonts.d.ts +0 -0
- /package/{storybook-static → dist}/theme/primitives/sizes.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/alert.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/button.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/dialog.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/divider.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/drawer.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/editable.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/form.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/input.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/menu.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/popover.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/progress-circle.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/skeleton.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/textarea.d.ts +0 -0
- /package/{storybook-static → dist}/theme/recipes/tooltip.d.ts +0 -0
- /package/{storybook-static → dist}/theme/theme.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/borders.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/colors.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/layer-styles.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/shadows.d.ts +0 -0
- /package/{storybook-static → dist}/theme/tokens/text.d.ts +0 -0
- /package/{storybook-static → dist}/utils/formats.d.ts +0 -0
- /package/{storybook-static → dist}/utils/get-file-type-icon.d.ts +0 -0
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { $getRoot, $isElementNode, ElementNode, type Klass, type LexicalNode, type RootNode } from "lexical";
|
|
2
|
-
|
|
3
|
-
export function $getAllNodesOfType<T extends LexicalNode>(nodeType: Klass<T>) {
|
|
4
|
-
const root = $getRoot();
|
|
5
|
-
const nodesOfType: T[] = [];
|
|
6
|
-
|
|
7
|
-
const traverse = (node: LexicalNode) => {
|
|
8
|
-
if (node instanceof nodeType) {
|
|
9
|
-
nodesOfType.push(node as T);
|
|
10
|
-
}
|
|
11
|
-
if (node instanceof ElementNode) {
|
|
12
|
-
node.getChildren?.().forEach(traverse);
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
traverse(root);
|
|
17
|
-
return nodesOfType;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const $getTextContent = (root: RootNode) => {
|
|
21
|
-
let textContent = "";
|
|
22
|
-
const children = root.getChildren();
|
|
23
|
-
const childrenLength = children.length;
|
|
24
|
-
for (let i = 0; i < childrenLength; i++) {
|
|
25
|
-
const child = children[i];
|
|
26
|
-
textContent += child.getTextContent();
|
|
27
|
-
if ($isElementNode(child) && i !== childrenLength - 1 && !child.isInline()) {
|
|
28
|
-
textContent += "\n";
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return textContent;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
type SerializedNode = {
|
|
35
|
-
type?: string;
|
|
36
|
-
text?: string;
|
|
37
|
-
name?: string;
|
|
38
|
-
referenceId?: string;
|
|
39
|
-
children?: SerializedNode[];
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
type SerializedRoot = {
|
|
43
|
-
root?: SerializedNode;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
const getReferenceMarker = (node: SerializedNode) => {
|
|
47
|
-
if (node.type !== "reference") return null;
|
|
48
|
-
return `#${node.name ?? node.referenceId ?? ""}`;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
const shouldAppendParagraphBreak = (node: SerializedNode) => {
|
|
52
|
-
return node.type === "paragraph" && Boolean(node.children?.length);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const traverseSerializedNode = (node: SerializedNode): string => {
|
|
56
|
-
if (node.type === "comment") {
|
|
57
|
-
return "";
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
const referenceMarker = getReferenceMarker(node);
|
|
61
|
-
if (referenceMarker !== null) {
|
|
62
|
-
return referenceMarker;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
let text = typeof node.text === "string" ? node.text : "";
|
|
66
|
-
const children = node.children;
|
|
67
|
-
if (!Array.isArray(children)) return text;
|
|
68
|
-
|
|
69
|
-
const childrenLength = children.length;
|
|
70
|
-
for (let i = 0; i < childrenLength; i += 1) {
|
|
71
|
-
const child = children[i];
|
|
72
|
-
if (child.type === "comment") {
|
|
73
|
-
if (i !== childrenLength - 1) {
|
|
74
|
-
text += "\n";
|
|
75
|
-
}
|
|
76
|
-
continue;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
text += traverseSerializedNode(child);
|
|
80
|
-
if (shouldAppendParagraphBreak(child)) {
|
|
81
|
-
text += "\n";
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return text;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export const getTextFromSerializedEditorState = (state: string): string => {
|
|
89
|
-
try {
|
|
90
|
-
const parsed = JSON.parse(state) as SerializedRoot;
|
|
91
|
-
return traverseSerializedNode(parsed.root ?? {});
|
|
92
|
-
} catch {
|
|
93
|
-
return "";
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export const emptyEditorState = {
|
|
98
|
-
root: {
|
|
99
|
-
direction: "ltr",
|
|
100
|
-
format: "",
|
|
101
|
-
indent: 0,
|
|
102
|
-
type: "root",
|
|
103
|
-
version: 1,
|
|
104
|
-
children: [
|
|
105
|
-
{
|
|
106
|
-
type: "paragraph",
|
|
107
|
-
version: 1,
|
|
108
|
-
format: "",
|
|
109
|
-
indent: 0,
|
|
110
|
-
textFormat: undefined,
|
|
111
|
-
direction: null,
|
|
112
|
-
children: [],
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
},
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
export function generateEditorStateFromString(input = "") {
|
|
119
|
-
if (!input.trim()) {
|
|
120
|
-
return JSON.parse(JSON.stringify(emptyEditorState));
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Split on line breaks → one paragraph per line
|
|
124
|
-
const paragraphs = input.split(/\r?\n/);
|
|
125
|
-
|
|
126
|
-
const children = paragraphs.map((line) => ({
|
|
127
|
-
type: "paragraph",
|
|
128
|
-
version: 1,
|
|
129
|
-
format: "",
|
|
130
|
-
indent: 0,
|
|
131
|
-
textFormat: undefined,
|
|
132
|
-
direction: null,
|
|
133
|
-
children: line
|
|
134
|
-
? [
|
|
135
|
-
{
|
|
136
|
-
type: "text",
|
|
137
|
-
version: 1,
|
|
138
|
-
text: line,
|
|
139
|
-
format: "",
|
|
140
|
-
detail: 0,
|
|
141
|
-
mode: "normal",
|
|
142
|
-
style: "",
|
|
143
|
-
},
|
|
144
|
-
]
|
|
145
|
-
: [],
|
|
146
|
-
}));
|
|
147
|
-
|
|
148
|
-
return {
|
|
149
|
-
root: {
|
|
150
|
-
direction: "ltr",
|
|
151
|
-
format: "",
|
|
152
|
-
indent: 0,
|
|
153
|
-
type: "root",
|
|
154
|
-
version: 1,
|
|
155
|
-
children,
|
|
156
|
-
},
|
|
157
|
-
};
|
|
158
|
-
}
|
package/src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { Box } from "@chakra-ui/react";
|
|
2
|
-
import {
|
|
3
|
-
DecoratorNode,
|
|
4
|
-
type EditorConfig,
|
|
5
|
-
type LexicalEditor,
|
|
6
|
-
type LexicalNode,
|
|
7
|
-
type NodeKey,
|
|
8
|
-
type SerializedLexicalNode,
|
|
9
|
-
type Spread,
|
|
10
|
-
} from "lexical";
|
|
11
|
-
import type { ReactElement } from "react";
|
|
12
|
-
import { ResourceBadge } from "../../../../resource-badge";
|
|
13
|
-
|
|
14
|
-
export type SerializedReferenceLinkNode = Spread<
|
|
15
|
-
{
|
|
16
|
-
href: string;
|
|
17
|
-
label?: string;
|
|
18
|
-
},
|
|
19
|
-
SerializedLexicalNode
|
|
20
|
-
>;
|
|
21
|
-
|
|
22
|
-
export class ReferenceLinkNode extends DecoratorNode<ReactElement> {
|
|
23
|
-
__href: string;
|
|
24
|
-
__label?: string;
|
|
25
|
-
|
|
26
|
-
static getType(): string {
|
|
27
|
-
return "reference-link";
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static clone(node: ReferenceLinkNode): ReferenceLinkNode {
|
|
31
|
-
return new ReferenceLinkNode(node.__href, node.__label, node.__key);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
constructor(href: string, label?: string, key?: NodeKey) {
|
|
35
|
-
super(key);
|
|
36
|
-
this.__href = href;
|
|
37
|
-
this.__label = label;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
createDOM(_config: EditorConfig, _editor: LexicalEditor): HTMLElement {
|
|
41
|
-
return document.createElement("span");
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
updateDOM(_prevNode: ReferenceLinkNode, _dom: HTMLElement, _config: EditorConfig): boolean {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
getTextContent(): string {
|
|
49
|
-
const label = this.__label ?? this.__href;
|
|
50
|
-
return `{{link('${label}')}}`;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
exportJSON(): SerializedReferenceLinkNode {
|
|
54
|
-
return {
|
|
55
|
-
type: ReferenceLinkNode.getType(),
|
|
56
|
-
version: 1,
|
|
57
|
-
href: this.__href,
|
|
58
|
-
label: this.__label,
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
static importJSON(serializedNode: SerializedReferenceLinkNode): ReferenceLinkNode {
|
|
63
|
-
return $createReferenceLinkNode(serializedNode.href, serializedNode.label);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
decorate(_editor: LexicalEditor, _config: EditorConfig): ReactElement {
|
|
67
|
-
const href = this.__href;
|
|
68
|
-
const fileName = href.split("/").pop();
|
|
69
|
-
const label = fileName || "unknown";
|
|
70
|
-
const isExternal = /^https?:\/\//i.test(href);
|
|
71
|
-
const isProjectFile = /^#?\$PROJECT\//i.test(href);
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<Box width="fit-content" display="inline-block">
|
|
75
|
-
<ResourceBadge
|
|
76
|
-
fileName={label}
|
|
77
|
-
onSelect={() => {
|
|
78
|
-
if (isExternal) {
|
|
79
|
-
window.open(href, "_blank", "noopener,noreferrer");
|
|
80
|
-
} else if (isProjectFile) {
|
|
81
|
-
const projectPath = href.replace(/^#?\$PROJECT\//i, "");
|
|
82
|
-
const event = new CustomEvent("ui:open-project-file", { detail: projectPath });
|
|
83
|
-
window.dispatchEvent(event);
|
|
84
|
-
} else {
|
|
85
|
-
window.location.assign(href);
|
|
86
|
-
}
|
|
87
|
-
}}
|
|
88
|
-
/>
|
|
89
|
-
</Box>
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export function $createReferenceLinkNode(href: string, label?: string): ReferenceLinkNode {
|
|
95
|
-
return new ReferenceLinkNode(href, label);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function $isReferenceLinkNode(node: LexicalNode | null | undefined): node is ReferenceLinkNode {
|
|
99
|
-
return node instanceof ReferenceLinkNode;
|
|
100
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import type { TextMatchTransformer } from "@lexical/markdown";
|
|
2
|
-
import { $createReferenceLinkNode, $isReferenceLinkNode, ReferenceLinkNode } from "./ReferenceLinkNode";
|
|
3
|
-
|
|
4
|
-
// Matches {{link('xxx')}} or {{ link("xxx") }}
|
|
5
|
-
const LINK_REGEXP = /\{\{\s*link\((['"])([^'"\s]+)\1\)\s*\}\}/;
|
|
6
|
-
|
|
7
|
-
export const REFERENCE_LINK_TRANSFORMER: TextMatchTransformer = {
|
|
8
|
-
dependencies: [ReferenceLinkNode],
|
|
9
|
-
export: (node) => {
|
|
10
|
-
if ($isReferenceLinkNode(node)) {
|
|
11
|
-
const href = (node as ReferenceLinkNode).__href;
|
|
12
|
-
const label = (node as ReferenceLinkNode).__label ?? href;
|
|
13
|
-
// Export back to token form so markdown roundtrips
|
|
14
|
-
if (label) {
|
|
15
|
-
return `{{link('${label}')}}`;
|
|
16
|
-
}
|
|
17
|
-
return `{{link('${href}')}}`;
|
|
18
|
-
}
|
|
19
|
-
return null;
|
|
20
|
-
},
|
|
21
|
-
regExp: LINK_REGEXP,
|
|
22
|
-
importRegExp: LINK_REGEXP,
|
|
23
|
-
replace: (textNode, match) => {
|
|
24
|
-
const value = match[2];
|
|
25
|
-
// For now we assume value is both label and href; if it looks like a URL, use as href.
|
|
26
|
-
const looksLikeUrl = /^(https?:\/\/|\/)/i.test(value);
|
|
27
|
-
const href = looksLikeUrl ? value : `#${value}`;
|
|
28
|
-
const label = value;
|
|
29
|
-
textNode.replace($createReferenceLinkNode(href, label));
|
|
30
|
-
},
|
|
31
|
-
type: "text-match",
|
|
32
|
-
};
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import { RichMessage } from "./rich-message";
|
|
3
|
-
|
|
4
|
-
const message = `
|
|
5
|
-
# RichMessage
|
|
6
|
-
|
|
7
|
-
This is a rich message rendered from Markdown.
|
|
8
|
-
|
|
9
|
-
- Supports lists
|
|
10
|
-
- Links like [Pufflig](https://pufflig.com)
|
|
11
|
-
- Quotes
|
|
12
|
-
|
|
13
|
-
> A nice quote to demo the Quote node.
|
|
14
|
-
|
|
15
|
-
| Feature | Supported |
|
|
16
|
-
| ------- | --------- |
|
|
17
|
-
| Tables | ✅ |
|
|
18
|
-
| Links | ✅ |
|
|
19
|
-
| Lists | ✅ |
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
## Subheading
|
|
24
|
-
Some more text under a subheading.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Table Example
|
|
29
|
-
|
|
30
|
-
| Name | Value |
|
|
31
|
-
| ---- | ----- |
|
|
32
|
-
| Foo | Bar |
|
|
33
|
-
| Baz | Qux |
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
# Heading 1
|
|
38
|
-
|
|
39
|
-
## Heading 2
|
|
40
|
-
|
|
41
|
-
### Heading 3
|
|
42
|
-
|
|
43
|
-
This paragraph has **bold**, *italic*, ~~strikethrough~~ text and <u>underline</u>.
|
|
44
|
-
|
|
45
|
-
Inline link to [Chakra UI](https://chakra-ui.com).
|
|
46
|
-
|
|
47
|
-
ReferenceLink token examples:
|
|
48
|
-
- {{link('$PROJECT/sources/orders.csv')}}
|
|
49
|
-
- {{link('$PROJECT/sources/readme.md')}}
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
# Nested Lists
|
|
54
|
-
|
|
55
|
-
- Fruits
|
|
56
|
-
- Apple
|
|
57
|
-
- Banana
|
|
58
|
-
- Orange
|
|
59
|
-
- Vegetables
|
|
60
|
-
- Carrot
|
|
61
|
-
- Lettuce
|
|
62
|
-
|
|
63
|
-
1. First
|
|
64
|
-
2. Second
|
|
65
|
-
1. Second.A
|
|
66
|
-
2. Second.B
|
|
67
|
-
|
|
68
|
-
---
|
|
69
|
-
|
|
70
|
-
A paragraph above the rule.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
> This is a blockquote.
|
|
75
|
-
> It can span multiple lines.
|
|
76
|
-
|
|
77
|
-
\\[ G_{\\mu\\nu} + \\Lambda g_{\\mu\\nu} = \\frac{8\\pi G}{c^4} T_{\\mu\\nu} \\]
|
|
78
|
-
Where: \\( G_{\\mu\\nu} \\) is the Einstein tensor, which represents the curvature of spacetime. \\( \\Lambda \\) is the cosmological constant. \\( g_{\\mu\\nu} \\) is the metric tensor, which describes the geometry of spacetime. \\( G \\) is the gravitational constant. \\( c \\) is the speed of light in a vacuum. \\( T_{\\mu\\nu} \\) is the stress-energy tensor, which represents the distribution of matter and energy in spacetime.
|
|
79
|
-
|
|
80
|
-
\\[
|
|
81
|
-
\\begin{align}
|
|
82
|
-
a + b &= c \\\\
|
|
83
|
-
d + e &= f \\\\
|
|
84
|
-
g + h &= i
|
|
85
|
-
\\end{align}
|
|
86
|
-
\\]
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Code Blocks
|
|
91
|
-
|
|
92
|
-
SQL:
|
|
93
|
-
|
|
94
|
-
\`\`\`sql
|
|
95
|
-
CREATE TABLE users (
|
|
96
|
-
id SERIAL PRIMARY KEY,
|
|
97
|
-
email TEXT NOT NULL UNIQUE,
|
|
98
|
-
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
SELECT id, email
|
|
102
|
-
FROM users
|
|
103
|
-
WHERE created_at > NOW() - INTERVAL '7 days'
|
|
104
|
-
ORDER BY created_at DESC;
|
|
105
|
-
\`\`\`
|
|
106
|
-
|
|
107
|
-
Python:
|
|
108
|
-
|
|
109
|
-
\`\`\`python
|
|
110
|
-
def fib(n: int):
|
|
111
|
-
a, b = 0, 1
|
|
112
|
-
for _ in range(n):
|
|
113
|
-
yield a
|
|
114
|
-
a, b = b, a + b
|
|
115
|
-
|
|
116
|
-
print(list(fib(10)))
|
|
117
|
-
\`\`\`
|
|
118
|
-
`;
|
|
119
|
-
|
|
120
|
-
const meta: Meta<typeof RichMessage> = {
|
|
121
|
-
title: "Chat UI/RichMessage",
|
|
122
|
-
component: RichMessage,
|
|
123
|
-
parameters: {
|
|
124
|
-
layout: "padded",
|
|
125
|
-
},
|
|
126
|
-
args: {
|
|
127
|
-
debug: false,
|
|
128
|
-
defaultState: message,
|
|
129
|
-
},
|
|
130
|
-
argTypes: {
|
|
131
|
-
defaultState: {
|
|
132
|
-
control: "text",
|
|
133
|
-
description: "Markdown source to render",
|
|
134
|
-
},
|
|
135
|
-
debug: {
|
|
136
|
-
control: "boolean",
|
|
137
|
-
description: "Show Lexical tree for debugging",
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
export default meta;
|
|
143
|
-
|
|
144
|
-
type Story = StoryObj<typeof RichMessage>;
|
|
145
|
-
|
|
146
|
-
export const Basic: Story = {};
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import "../theme/rich-text-theme.css";
|
|
2
|
-
|
|
3
|
-
import { Flex } from "@chakra-ui/react";
|
|
4
|
-
import { CodeNode } from "@lexical/code";
|
|
5
|
-
import { LinkNode } from "@lexical/link";
|
|
6
|
-
import { ListItemNode, ListNode } from "@lexical/list";
|
|
7
|
-
import { $convertFromMarkdownString, $convertToMarkdownString, TRANSFORMERS } from "@lexical/markdown";
|
|
8
|
-
import { LexicalComposer } from "@lexical/react/LexicalComposer";
|
|
9
|
-
import { LexicalErrorBoundary } from "@lexical/react/LexicalErrorBoundary";
|
|
10
|
-
import { HorizontalRulePlugin } from "@lexical/react/LexicalHorizontalRulePlugin";
|
|
11
|
-
import { LinkPlugin } from "@lexical/react/LexicalLinkPlugin";
|
|
12
|
-
import { ListPlugin } from "@lexical/react/LexicalListPlugin";
|
|
13
|
-
import { OnChangePlugin } from "@lexical/react/LexicalOnChangePlugin";
|
|
14
|
-
import { RichTextPlugin } from "@lexical/react/LexicalRichTextPlugin";
|
|
15
|
-
import { HeadingNode, QuoteNode } from "@lexical/rich-text";
|
|
16
|
-
import { $getRoot } from "lexical";
|
|
17
|
-
import { ContentEditable } from "../shared/components/content-editable";
|
|
18
|
-
import { DataTableNode } from "../shared/nodes/DataTableNode";
|
|
19
|
-
import { ImportCodeBlocksPlugin } from "../shared/plugins/CodePlugin/CodeBlockPlugin";
|
|
20
|
-
import { CodeBlockNode } from "../shared/plugins/CodePlugin/CodeNode";
|
|
21
|
-
import { EquationNode } from "../shared/plugins/EquationPlugin/EquationNode";
|
|
22
|
-
import { EQUATION_INLINE, EQUATION_MULTILINE, EquationPlugin } from "../shared/plugins/EquationPlugin/EquationPlugin";
|
|
23
|
-
import { HRNode } from "../shared/plugins/HorizontalRulePlugin/HorizontalRuleNode";
|
|
24
|
-
import StateUpdatePlugin from "../shared/plugins/StateUpdatePlugin";
|
|
25
|
-
import ToggleEditablePlugin from "../shared/plugins/ToggleEditablePlugin";
|
|
26
|
-
import { TreeViewPlugin } from "../shared/plugins/TreeViewPlugin/TreeViewPlugin";
|
|
27
|
-
import { TRANSFORMERS_EXTENDED } from "../shared/transformers/markdown-transformers";
|
|
28
|
-
import theme from "../theme/rich-text-theme";
|
|
29
|
-
import { splitFrontmatter } from "../utils/markdown";
|
|
30
|
-
import { REFERENCE_LINK_TRANSFORMER, ReferenceLinkNode } from "./plugins/ReferenceLinkPlugin";
|
|
31
|
-
|
|
32
|
-
export interface RichMessageProps {
|
|
33
|
-
debug?: boolean;
|
|
34
|
-
defaultState: string;
|
|
35
|
-
isEditable?: boolean;
|
|
36
|
-
onChange?: (value: string) => void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const transformers = [
|
|
40
|
-
...TRANSFORMERS,
|
|
41
|
-
...TRANSFORMERS_EXTENDED,
|
|
42
|
-
EQUATION_INLINE,
|
|
43
|
-
EQUATION_MULTILINE,
|
|
44
|
-
REFERENCE_LINK_TRANSFORMER,
|
|
45
|
-
];
|
|
46
|
-
|
|
47
|
-
export function RichMessage(props: RichMessageProps) {
|
|
48
|
-
const { debug = false, defaultState = "", isEditable = false, onChange } = props;
|
|
49
|
-
const { frontmatter, body } = splitFrontmatter(defaultState);
|
|
50
|
-
const shouldTrackChanges = isEditable && Boolean(onChange);
|
|
51
|
-
|
|
52
|
-
const initialConfig = {
|
|
53
|
-
namespace: "RICH_MESSAGE",
|
|
54
|
-
nodes: [
|
|
55
|
-
QuoteNode,
|
|
56
|
-
LinkNode,
|
|
57
|
-
DataTableNode,
|
|
58
|
-
HeadingNode,
|
|
59
|
-
ListNode,
|
|
60
|
-
ListItemNode,
|
|
61
|
-
CodeNode,
|
|
62
|
-
CodeBlockNode,
|
|
63
|
-
EquationNode,
|
|
64
|
-
HRNode,
|
|
65
|
-
ReferenceLinkNode,
|
|
66
|
-
],
|
|
67
|
-
editorState: () => {
|
|
68
|
-
return $convertFromMarkdownString(body, transformers, undefined, false);
|
|
69
|
-
},
|
|
70
|
-
onError: (error: Error) => console.error(error),
|
|
71
|
-
editable: isEditable,
|
|
72
|
-
theme,
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<Flex
|
|
77
|
-
className="rich-text"
|
|
78
|
-
data-rich-message="true"
|
|
79
|
-
justifyContent="space-between"
|
|
80
|
-
width="100%"
|
|
81
|
-
maxWidth="100%"
|
|
82
|
-
height="100%"
|
|
83
|
-
position="relative"
|
|
84
|
-
direction="column"
|
|
85
|
-
overflow="hidden"
|
|
86
|
-
>
|
|
87
|
-
<LexicalComposer initialConfig={initialConfig}>
|
|
88
|
-
<StateUpdatePlugin
|
|
89
|
-
value={body}
|
|
90
|
-
onUpdate={(value: string) => {
|
|
91
|
-
$convertFromMarkdownString(value, transformers, undefined, false);
|
|
92
|
-
}}
|
|
93
|
-
/>
|
|
94
|
-
<LinkPlugin />
|
|
95
|
-
<ListPlugin />
|
|
96
|
-
<HorizontalRulePlugin />
|
|
97
|
-
<ImportCodeBlocksPlugin />
|
|
98
|
-
<EquationPlugin />
|
|
99
|
-
<RichTextPlugin contentEditable={<ContentEditable fullWidth={false} />} ErrorBoundary={LexicalErrorBoundary} />
|
|
100
|
-
{shouldTrackChanges ? (
|
|
101
|
-
<OnChangePlugin
|
|
102
|
-
ignoreSelectionChange
|
|
103
|
-
ignoreHistoryMergeTagChange={false}
|
|
104
|
-
onChange={(editorState) => {
|
|
105
|
-
editorState.read(() => {
|
|
106
|
-
const root = $getRoot();
|
|
107
|
-
const markdownBody = $convertToMarkdownString(transformers, root);
|
|
108
|
-
onChange?.(frontmatter + markdownBody);
|
|
109
|
-
});
|
|
110
|
-
}}
|
|
111
|
-
/>
|
|
112
|
-
) : null}
|
|
113
|
-
<ToggleEditablePlugin isEditable={isEditable} />
|
|
114
|
-
{debug && <TreeViewPlugin />}
|
|
115
|
-
</LexicalComposer>
|
|
116
|
-
</Flex>
|
|
117
|
-
);
|
|
118
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { chakra, Flex } from "@chakra-ui/react";
|
|
2
|
-
import { ContentEditable as LexicalContentEditable } from "@lexical/react/LexicalContentEditable";
|
|
3
|
-
|
|
4
|
-
const StyledEditable = chakra(LexicalContentEditable);
|
|
5
|
-
|
|
6
|
-
interface ContentEditableProps {
|
|
7
|
-
onRef?: (elem: HTMLDivElement) => void;
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
padding?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function ContentEditable({ onRef, fullWidth = false, padding }: ContentEditableProps) {
|
|
13
|
-
return (
|
|
14
|
-
<Flex className="rich-text" height="100%" overflow="auto" position="relative">
|
|
15
|
-
<Flex ref={onRef} width="100%" padding={padding} justifyContent={fullWidth ? "flex-start" : "center"}>
|
|
16
|
-
<StyledEditable
|
|
17
|
-
height="fit-content"
|
|
18
|
-
minH="100%"
|
|
19
|
-
width="100%"
|
|
20
|
-
maxWidth={fullWidth ? "100%" : "720px"}
|
|
21
|
-
textStyle="paragraph/M/regular"
|
|
22
|
-
position="relative"
|
|
23
|
-
outline="none"
|
|
24
|
-
/>
|
|
25
|
-
</Flex>
|
|
26
|
-
</Flex>
|
|
27
|
-
);
|
|
28
|
-
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { Box, Table, Text, Textarea } from "@chakra-ui/react";
|
|
2
|
-
import type { CodeEditorProps, DataTableProps } from "../types/rich-text-components";
|
|
3
|
-
|
|
4
|
-
const formatValue = (value: unknown) => {
|
|
5
|
-
if (value === null || value === undefined) return "-";
|
|
6
|
-
if (typeof value === "string") return value.length ? value : "-";
|
|
7
|
-
if (typeof value === "number" || typeof value === "boolean") return String(value).toUpperCase();
|
|
8
|
-
if (value instanceof Date) return value.toISOString();
|
|
9
|
-
return JSON.stringify(value);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const DefaultRichTextCodeEditor = (props: CodeEditorProps) => {
|
|
13
|
-
const { defaultCode = "", isEditable = false, showLineNumbers = false, disableScroll = false } = props;
|
|
14
|
-
|
|
15
|
-
if (isEditable) {
|
|
16
|
-
return <Textarea defaultValue={defaultCode} fontFamily="mono" fontSize="sm" resize="vertical" minHeight="100%" />;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const lines = showLineNumbers ? defaultCode.split("\n") : [defaultCode];
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<Box
|
|
23
|
-
as="pre"
|
|
24
|
-
margin={0}
|
|
25
|
-
padding="sm"
|
|
26
|
-
fontFamily="mono"
|
|
27
|
-
fontSize="sm"
|
|
28
|
-
lineHeight="1.5"
|
|
29
|
-
overflowY={disableScroll ? "hidden" : "auto"}
|
|
30
|
-
background="bg.muted"
|
|
31
|
-
borderRadius="md"
|
|
32
|
-
width="100%"
|
|
33
|
-
>
|
|
34
|
-
{showLineNumbers ? (
|
|
35
|
-
<Box as="code" display="grid" gridTemplateColumns="auto 1fr" columnGap="sm">
|
|
36
|
-
{lines.map((line, index) => (
|
|
37
|
-
<Box as="span" key={`${index}-${line}`} display="contents">
|
|
38
|
-
<Text as="span" color="fg.muted" textAlign="right">
|
|
39
|
-
{index + 1}
|
|
40
|
-
</Text>
|
|
41
|
-
<Text as="span">{line.length ? line : " "}</Text>
|
|
42
|
-
</Box>
|
|
43
|
-
))}
|
|
44
|
-
</Box>
|
|
45
|
-
) : (
|
|
46
|
-
<Box as="code">{defaultCode}</Box>
|
|
47
|
-
)}
|
|
48
|
-
</Box>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export const DefaultRichTextDataTable = (props: DataTableProps) => {
|
|
53
|
-
const { data, fullWidth = false, noBorder = false, hiddenColumns = [] } = props;
|
|
54
|
-
|
|
55
|
-
if (!data.length) {
|
|
56
|
-
return (
|
|
57
|
-
<Box padding="sm" borderWidth={noBorder ? "0" : "1px"} borderColor="border.muted">
|
|
58
|
-
<Text textStyle="label/S/regular" color="fg.muted">
|
|
59
|
-
No data
|
|
60
|
-
</Text>
|
|
61
|
-
</Box>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
const hiddenSet = new Set(hiddenColumns);
|
|
66
|
-
const columns = Object.keys(data[0] ?? {}).filter((key) => !hiddenSet.has(key));
|
|
67
|
-
|
|
68
|
-
return (
|
|
69
|
-
<Table.ScrollArea overflowX="auto" maxWidth="100%">
|
|
70
|
-
<Table.Root
|
|
71
|
-
size="sm"
|
|
72
|
-
width={fullWidth ? "100%" : "fit-content"}
|
|
73
|
-
borderWidth={noBorder ? "0" : "1px"}
|
|
74
|
-
borderColor="border.muted"
|
|
75
|
-
>
|
|
76
|
-
<Table.Header>
|
|
77
|
-
<Table.Row background="bg.muted">
|
|
78
|
-
{columns.map((column) => (
|
|
79
|
-
<Table.ColumnHeader key={column} textTransform="none" paddingX="xs" paddingY="2xs">
|
|
80
|
-
<Text textStyle="label/S/medium">{column}</Text>
|
|
81
|
-
</Table.ColumnHeader>
|
|
82
|
-
))}
|
|
83
|
-
</Table.Row>
|
|
84
|
-
</Table.Header>
|
|
85
|
-
<Table.Body>
|
|
86
|
-
{data.map((row, rowIndex) => (
|
|
87
|
-
<Table.Row key={`${rowIndex}-${columns.join("-")}`}>
|
|
88
|
-
{columns.map((column) => (
|
|
89
|
-
<Table.Cell key={`${rowIndex}-${column}`} paddingX="xs" paddingY="2xs">
|
|
90
|
-
<Text textStyle="paragraph/S/regular">{formatValue(row[column])}</Text>
|
|
91
|
-
</Table.Cell>
|
|
92
|
-
))}
|
|
93
|
-
</Table.Row>
|
|
94
|
-
))}
|
|
95
|
-
</Table.Body>
|
|
96
|
-
</Table.Root>
|
|
97
|
-
</Table.ScrollArea>
|
|
98
|
-
);
|
|
99
|
-
};
|