@pstdio/ui 0.0.2 → 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 +12 -9
- 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 -8
- 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 -82
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rich-message-CiA3ripk.js","sources":["../src/components/rich-text/shared/components/content-editable.tsx","../src/utils/get-file-type-icon.ts","../src/components/resource-badge.tsx","../src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx","../src/components/rich-text/markdown-editor/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts","../src/components/rich-text/theme/rich-text-theme.tsx","../src/components/rich-text/shared/components/default-rich-text-components.tsx","../src/components/rich-text/shared/nodes/DataTableNode.tsx","../src/components/rich-text/shared/plugins/CodePlugin/CodeNode.tsx","../src/components/rich-text/shared/plugins/EquationPlugin/EquationNode.tsx","../src/components/rich-text/shared/plugins/EquationPlugin/EquationPlugin.tsx","../src/components/rich-text/shared/plugins/HorizontalRulePlugin/HorizontalRuleNode.ts","../src/components/rich-text/shared/plugins/HorizontalRulePlugin/horizontalRule.ts","../src/components/rich-text/shared/transformers/markdown-transformers.ts","../src/components/rich-text/shared/editor-config.ts","../src/components/rich-text/shared/plugins/CodePlugin/CodeBlockPlugin.tsx","../src/components/rich-text/shared/plugins/ToggleEditablePlugin.tsx","../src/components/rich-text/shared/plugins/TreeViewPlugin/TreeViewPlugin.tsx","../src/components/rich-text/utils/markdown.ts","../src/components/rich-text/prompt-input/events.ts","../src/components/rich-text/prompt-input/commands.ts","../src/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.tsx","../src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentCommands.ts","../src/components/rich-text/prompt-input/plugins/CommentPlugin/hooks/useCommentSchema.ts","../src/components/rich-text/prompt-input/plugins/CommentPlugin/CommentPlugin.tsx","../src/components/rich-text/prompt-input/utils.ts","../src/components/rich-text/prompt-input/plugins/ImperativeAPIPlugin.tsx","../src/components/rich-text/prompt-input/plugins/keyboard-shortcuts.ts","../src/components/rich-text/prompt-input/plugins/KeyboardShortcutPlugin.tsx","../src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/constants.ts","../src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/getSortedMenuOptions.ts","../src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenuItem.tsx","../src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/components/ReferenceMenu/ReferenceMenu.tsx","../src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/hooks/useContextLookup.tsx","../src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/utils/checkForTriggers.ts","../src/components/rich-text/prompt-input/plugins/ReferenceMenuPlugin/ReferenceMenuPlugin.tsx","../src/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.tsx","../src/components/rich-text/prompt-input/plugins/ReferencePlugin/ReferencePlugin.tsx","../src/components/rich-text/prompt-input/theme/prompt-input-theme.ts","../src/components/rich-text/prompt-input/prompt-input.tsx","../src/components/rich-text/shared/plugins/StateUpdatePlugin.tsx","../src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkNode.tsx","../src/components/rich-text/rich-message/plugins/ReferenceLinkPlugin/ReferenceLinkTransformer.ts","../src/components/rich-text/rich-message/rich-message.tsx"],"sourcesContent":["import { chakra, Flex } from \"@chakra-ui/react\";\nimport { ContentEditable as LexicalContentEditable } from \"@lexical/react/LexicalContentEditable\";\n\nconst StyledEditable = chakra(LexicalContentEditable);\n\ninterface ContentEditableProps {\n onRef?: (elem: HTMLDivElement) => void;\n fullWidth?: boolean;\n padding?: string;\n}\n\nexport function ContentEditable({ onRef, fullWidth = false, padding }: ContentEditableProps) {\n return (\n <Flex className=\"rich-text\" height=\"100%\" overflow=\"auto\" position=\"relative\">\n <Flex ref={onRef} width=\"100%\" padding={padding} justifyContent={fullWidth ? \"flex-start\" : \"center\"}>\n <StyledEditable\n height=\"fit-content\"\n minH=\"100%\"\n width=\"100%\"\n maxWidth={fullWidth ? \"100%\" : \"720px\"}\n textStyle=\"paragraph/M/regular\"\n position=\"relative\"\n outline=\"none\"\n />\n </Flex>\n </Flex>\n );\n}\n","import type { LucideIcon } from \"lucide-react\";\nimport {\n File,\n FileArchive,\n FileChartLine,\n FileCode,\n FileCog,\n FileImage,\n FileJson,\n FileSpreadsheet,\n FileText,\n} from \"lucide-react\";\n\nexport const getFileTypeIcon = (filename: string): LucideIcon => {\n const extension = filename.split(\".\").pop()?.toLowerCase() ?? \"\";\n\n if ([\"csv\", \"tsv\", \"xlsx\", \"xls\", \"parquet\"].includes(extension)) return FileSpreadsheet;\n if (\n [\n \"sql\",\n \"py\",\n \"js\",\n \"ts\",\n \"jsx\",\n \"tsx\",\n \"java\",\n \"cpp\",\n \"c\",\n \"h\",\n \"css\",\n \"scss\",\n \"sass\",\n \"php\",\n \"rb\",\n \"go\",\n \"rs\",\n \"kt\",\n \"swift\",\n ].includes(extension)\n ) {\n return FileCode;\n }\n if ([\"json\", \"jsonl\", \"ndjson\"].includes(extension)) {\n if (filename.includes(\"/visualizations/\")) return FileChartLine;\n return FileJson;\n }\n if ([\"md\", \"txt\", \"rst\", \"org\", \"pdf\", \"doc\", \"docx\", \"rtf\"].includes(extension)) return FileText;\n if ([\"yaml\", \"yml\", \"toml\", \"ini\", \"conf\", \"config\"].includes(extension)) return FileCog;\n if ([\"png\", \"jpg\", \"jpeg\", \"gif\", \"svg\", \"webp\", \"ico\"].includes(extension)) return FileImage;\n if ([\"zip\", \"tar\", \"gz\", \"rar\", \"7z\"].includes(extension)) return FileArchive;\n return File;\n};\n","import type { HTMLChakraProps } from \"@chakra-ui/react\";\nimport { chakra, IconButton, Spacer, Text } from \"@chakra-ui/react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { AlertTriangle, X } from \"lucide-react\";\nimport type { ReactNode } from \"react\";\nimport { getFileTypeIcon } from \"../utils/get-file-type-icon\";\nimport { Tooltip } from \"./tooltip\";\n\nconst SIZE_STYLES = {\n sm: {\n container: {\n height: \"20px\",\n lineHeight: { base: \"20px\" },\n px: \"2xs\",\n },\n iconSize: 12,\n textStyle: \"xs\",\n },\n md: {\n container: {\n height: \"24px\",\n lineHeight: { base: \"24px\" },\n px: \"xs\",\n },\n iconSize: 14,\n textStyle: \"sm\",\n },\n} as const;\n\nconst TONE_STYLES = {\n neutral: {\n color: \"color.primary\",\n bg: \"bg.muted\",\n _hover: {\n bg: \"bg.emphasized\",\n },\n },\n accent: {\n color: \"var(--schub-foreground-accent)\",\n bg: \"var(--schub-accent-subtle)\",\n _hover: {\n bg: \"var(--schub-accent-subtle)\",\n },\n },\n} as const;\n\nexport interface MissingResourceBadgeProps {\n referenceId: string;\n onRemove?: (referenceId: string) => void;\n}\n\n/**\n * Shown when a reference points to a resource that no longer exists\n */\nexport const MissingResourceBadge = (props: MissingResourceBadgeProps) => {\n const { referenceId, onRemove } = props;\n return (\n <chakra.span\n height=\"24px\"\n lineHeight={{ base: \"24px\" }}\n gap=\"2xs\"\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n paddingX=\"xs\"\n borderRadius=\"xs\"\n color={`fg.error`}\n bg={`bg.accent-secondary.red-light`}\n _hover={{\n bg: `bg.accent-secondary.red-light`,\n }}\n >\n <chakra.span mr=\"xs\" display=\"inline-flex\">\n <AlertTriangle size={14} />\n </chakra.span>\n <Text maxW={{ base: \"17.5rem\" }} textOverflow=\"ellipsis\" whiteSpace=\"nowrap\" overflow=\"hidden\">\n Missing Reference\n </Text>\n <Spacer />\n {onRemove && (\n <IconButton\n color=\"fg.error\"\n aria-label=\"Remove reference\"\n size=\"2xs\"\n ml=\"sm\"\n variant=\"ghost\"\n _hover={{\n bg: \"transparent\",\n }}\n onClick={(e) => {\n e.stopPropagation();\n onRemove?.(referenceId);\n }}\n >\n <X size={12} />\n </IconButton>\n )}\n </chakra.span>\n );\n};\n\nexport type ResourceBadgeSize = keyof typeof SIZE_STYLES;\nexport type ResourceBadgeTone = keyof typeof TONE_STYLES;\n\nexport interface ResourceBadgeProps extends Omit<HTMLChakraProps<\"span\">, \"onSelect\"> {\n fileName: string;\n onRemove?: (fileName: string) => void;\n onSelect?: (fileName: string) => void;\n size?: ResourceBadgeSize;\n tone?: ResourceBadgeTone;\n icon?: ReactNode;\n}\n\nconst DEFAULT_SIZE: ResourceBadgeSize = \"md\";\nconst DEFAULT_TONE: ResourceBadgeTone = \"neutral\";\n\nexport const ResourceBadge = (props: ResourceBadgeProps) => {\n const { fileName, onSelect, onRemove, size = DEFAULT_SIZE, tone = DEFAULT_TONE, icon, ...rest } = props;\n const IconComp: LucideIcon = getFileTypeIcon(fileName);\n const sizeStyles = SIZE_STYLES[size];\n const toneStyles = TONE_STYLES[tone];\n\n return (\n <chakra.span\n display=\"flex\"\n flexDirection=\"row\"\n alignItems=\"center\"\n borderRadius=\"xs\"\n gap=\"2xs\"\n cursor={onSelect ? \"pointer\" : \"default\"}\n {...toneStyles}\n {...sizeStyles.container}\n onClick={(e) => {\n e.stopPropagation();\n onSelect?.(fileName);\n }}\n {...rest}\n >\n <chakra.span mr=\"xs\" display=\"inline-flex\">\n {icon ?? <IconComp size={sizeStyles.iconSize} />}\n </chakra.span>\n <Tooltip content={fileName}>\n <Text\n maxW={{ base: \"14rem\" }}\n textOverflow=\"ellipsis\"\n whiteSpace=\"nowrap\"\n overflow=\"hidden\"\n textStyle={sizeStyles.textStyle}\n >\n {fileName}\n </Text>\n </Tooltip>\n <Spacer />\n {onRemove && (\n <IconButton\n aria-label=\"Remove reference\"\n size=\"2xs\"\n ml=\"xs\"\n variant=\"ghost\"\n _hover={{\n bg: \"transparent\",\n }}\n onClick={(e) => {\n e.stopPropagation();\n onRemove?.(fileName);\n }}\n >\n <X size={12} />\n </IconButton>\n )}\n </chakra.span>\n );\n};\n","import { Box } from \"@chakra-ui/react\";\nimport {\n DecoratorNode,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n type NodeKey,\n type SerializedLexicalNode,\n type Spread,\n} from \"lexical\";\nimport type { ReactElement } from \"react\";\nimport { ResourceBadge } from \"../../../../resource-badge\";\n\nexport type SerializedReferenceLinkNode = Spread<\n {\n href: string;\n label?: string;\n },\n SerializedLexicalNode\n>;\n\nexport class ReferenceLinkNode extends DecoratorNode<ReactElement> {\n __href: string;\n __label?: string;\n\n static getType(): string {\n return \"reference-link\";\n }\n\n static clone(node: ReferenceLinkNode): ReferenceLinkNode {\n return new ReferenceLinkNode(node.__href, node.__label, node.__key);\n }\n\n constructor(href: string, label?: string, key?: NodeKey) {\n super(key);\n this.__href = href;\n this.__label = label;\n }\n\n createDOM(_config: EditorConfig, _editor: LexicalEditor): HTMLElement {\n return document.createElement(\"span\");\n }\n\n updateDOM(_prevNode: ReferenceLinkNode, _dom: HTMLElement, _config: EditorConfig): boolean {\n return false;\n }\n\n getTextContent(): string {\n const label = this.__label ?? this.__href;\n return `{{link('${label}')}}`;\n }\n\n exportJSON(): SerializedReferenceLinkNode {\n return {\n type: ReferenceLinkNode.getType(),\n version: 1,\n href: this.__href,\n label: this.__label,\n };\n }\n\n static importJSON(serializedNode: SerializedReferenceLinkNode): ReferenceLinkNode {\n return $createReferenceLinkNode(serializedNode.href, serializedNode.label);\n }\n\n decorate(_editor: LexicalEditor, _config: EditorConfig): ReactElement {\n const href = this.__href;\n const fileName = href.split(\"/\").pop();\n const label = fileName || \"unknown\";\n const isExternal = /^https?:\\/\\//i.test(href);\n const isProjectFile = /^#?\\$PROJECT\\//i.test(href);\n\n return (\n <Box width=\"fit-content\" display=\"inline-block\">\n <ResourceBadge\n fileName={label}\n onSelect={() => {\n if (isExternal) {\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n } else if (isProjectFile) {\n const projectPath = href.replace(/^#?\\$PROJECT\\//i, \"\");\n const event = new CustomEvent(\"ui:open-project-file\", { detail: projectPath });\n window.dispatchEvent(event);\n } else {\n window.location.assign(href);\n }\n }}\n />\n </Box>\n );\n }\n}\n\nexport function $createReferenceLinkNode(href: string, label?: string): ReferenceLinkNode {\n return new ReferenceLinkNode(href, label);\n}\n\nexport function $isReferenceLinkNode(node: LexicalNode | null | undefined): node is ReferenceLinkNode {\n return node instanceof ReferenceLinkNode;\n}\n","import type { TextMatchTransformer } from \"@lexical/markdown\";\nimport { $createReferenceLinkNode, $isReferenceLinkNode, ReferenceLinkNode } from \"./ReferenceLinkNode\";\n\n// Matches {{link('xxx')}} or {{ link(\"xxx\") }}\nconst LINK_REGEXP = /\\{\\{\\s*link\\((['\"])([^'\"\\s]+)\\1\\)\\s*\\}\\}/;\n\nexport const REFERENCE_LINK_TRANSFORMER: TextMatchTransformer = {\n dependencies: [ReferenceLinkNode],\n export: (node) => {\n if ($isReferenceLinkNode(node)) {\n const href = (node as ReferenceLinkNode).__href;\n const label = (node as ReferenceLinkNode).__label ?? href;\n // Export back to token form so markdown roundtrips\n if (label) {\n return `{{link('${label}')}}`;\n }\n return `{{link('${href}')}}`;\n }\n return null;\n },\n regExp: LINK_REGEXP,\n importRegExp: LINK_REGEXP,\n replace: (textNode, match) => {\n const value = match[2];\n // For now we assume value is both label and href; if it looks like a URL, use as href.\n const looksLikeUrl = /^(https?:\\/\\/|\\/)/i.test(value);\n const href = looksLikeUrl ? value : `#${value}`;\n const label = value;\n textNode.replace($createReferenceLinkNode(href, label));\n },\n type: \"text-match\",\n};\n","import type { EditorThemeClasses } from \"lexical\";\n\nimport \"./rich-text-theme.css\";\n\nconst theme: EditorThemeClasses = {\n code: \"rich-text__code\",\n codeHighlight: {\n atrule: \"rich-text__tokenAttr\",\n attr: \"rich-text__tokenAttr\",\n boolean: \"rich-text__tokenProperty\",\n builtin: \"rich-text__tokenSelector\",\n cdata: \"rich-text__tokenComment\",\n char: \"rich-text__tokenSelector\",\n class: \"rich-text__tokenFunction\",\n \"class-name\": \"rich-text__tokenFunction\",\n comment: \"rich-text__tokenComment\",\n constant: \"rich-text__tokenProperty\",\n deleted: \"rich-text__tokenProperty\",\n doctype: \"rich-text__tokenComment\",\n entity: \"rich-text__tokenOperator\",\n function: \"rich-text__tokenFunction\",\n important: \"rich-text__tokenVariable\",\n inserted: \"rich-text__tokenSelector\",\n keyword: \"rich-text__tokenAttr\",\n namespace: \"rich-text__tokenVariable\",\n number: \"rich-text__tokenProperty\",\n operator: \"rich-text__tokenOperator\",\n prolog: \"rich-text__tokenComment\",\n property: \"rich-text__tokenProperty\",\n punctuation: \"rich-text__tokenPunctuation\",\n regex: \"rich-text__tokenVariable\",\n selector: \"rich-text__tokenSelector\",\n string: \"rich-text__tokenSelector\",\n symbol: \"rich-text__tokenProperty\",\n tag: \"rich-text__tokenProperty\",\n url: \"rich-text__tokenOperator\",\n variable: \"rich-text__tokenVariable\",\n },\n embedBlock: {\n base: \"rich-text__embedBlock\",\n focus: \"rich-text__embedBlockFocus\",\n },\n list: {\n checklist: \"rich-text__checklist\",\n listitem: \"rich-text__listItem\",\n listitemChecked: \"rich-text__listItemChecked\",\n listitemUnchecked: \"rich-text__listItemUnchecked\",\n nested: {\n listitem: \"rich-text__nestedListItem\",\n },\n olDepth: [\"rich-text__ol1\", \"rich-text__ol2\", \"rich-text__ol3\", \"rich-text__ol4\", \"rich-text__ol5\"],\n ol: \"rich-text__ol\",\n ul: \"rich-text__ul\",\n },\n heading: {\n h1: \"rich-text__h1\",\n h2: \"rich-text__h2\",\n h3: \"rich-text__h3\",\n },\n paragraph: \"rich-text__p\",\n text: {\n underline: \"rich-text__textUnderline\",\n italic: \"rich-text__textItalic\",\n code: \"rich-text__textCode\",\n },\n link: \"rich-text__link\",\n quote: \"rich-text__quote\",\n reference: \"rich-text__reference\",\n table: \"rich-text__table\",\n tableCell: \"rich-text__tableCell\",\n tableRow: \"rich-text__tableRow\",\n tableCellHeader: \"rich-text__tableCellHeader\",\n layoutContainer: \"rich-text__layoutContainer\",\n layoutItem: \"rich-text__layoutItem\",\n draggableBlockDemo: {\n row: \"rich-text__row\",\n content: \"rich-text__content\",\n },\n};\n\nexport default theme;\n","import { Box, Table, Text, Textarea } from \"@chakra-ui/react\";\nimport type { CodeEditorProps, DataTableProps } from \"../types/rich-text-components\";\n\nconst formatValue = (value: unknown) => {\n if (value === null || value === undefined) return \"-\";\n if (typeof value === \"string\") return value.length ? value : \"-\";\n if (typeof value === \"number\" || typeof value === \"boolean\") return String(value).toUpperCase();\n if (value instanceof Date) return value.toISOString();\n return JSON.stringify(value);\n};\n\nexport const DefaultRichTextCodeEditor = (props: CodeEditorProps) => {\n const { defaultCode = \"\", isEditable = false, showLineNumbers = false, disableScroll = false } = props;\n\n if (isEditable) {\n return <Textarea defaultValue={defaultCode} fontFamily=\"mono\" fontSize=\"sm\" resize=\"vertical\" minHeight=\"100%\" />;\n }\n\n const lines = showLineNumbers ? defaultCode.split(\"\\n\") : [defaultCode];\n\n return (\n <Box\n as=\"pre\"\n margin={0}\n padding=\"sm\"\n fontFamily=\"mono\"\n fontSize=\"sm\"\n lineHeight=\"1.5\"\n overflowY={disableScroll ? \"hidden\" : \"auto\"}\n background=\"bg.muted\"\n borderRadius=\"md\"\n width=\"100%\"\n >\n {showLineNumbers ? (\n <Box as=\"code\" display=\"grid\" gridTemplateColumns=\"auto 1fr\" columnGap=\"sm\">\n {lines.map((line, index) => (\n <Box as=\"span\" key={`${index}-${line}`} display=\"contents\">\n <Text as=\"span\" color=\"fg.muted\" textAlign=\"right\">\n {index + 1}\n </Text>\n <Text as=\"span\">{line.length ? line : \" \"}</Text>\n </Box>\n ))}\n </Box>\n ) : (\n <Box as=\"code\">{defaultCode}</Box>\n )}\n </Box>\n );\n};\n\nexport const DefaultRichTextDataTable = (props: DataTableProps) => {\n const { data, fullWidth = false, noBorder = false, hiddenColumns = [] } = props;\n\n if (!data.length) {\n return (\n <Box padding=\"sm\" borderWidth={noBorder ? \"0\" : \"1px\"} borderColor=\"border.muted\">\n <Text textStyle=\"label/S/regular\" color=\"fg.muted\">\n No data\n </Text>\n </Box>\n );\n }\n\n const hiddenSet = new Set(hiddenColumns);\n const columns = Object.keys(data[0] ?? {}).filter((key) => !hiddenSet.has(key));\n\n return (\n <Table.ScrollArea overflowX=\"auto\" maxWidth=\"100%\">\n <Table.Root\n size=\"sm\"\n width={fullWidth ? \"100%\" : \"fit-content\"}\n borderWidth={noBorder ? \"0\" : \"1px\"}\n borderColor=\"border.muted\"\n >\n <Table.Header>\n <Table.Row background=\"bg.muted\">\n {columns.map((column) => (\n <Table.ColumnHeader key={column} textTransform=\"none\" paddingX=\"xs\" paddingY=\"2xs\">\n <Text textStyle=\"label/S/medium\">{column}</Text>\n </Table.ColumnHeader>\n ))}\n </Table.Row>\n </Table.Header>\n <Table.Body>\n {data.map((row, rowIndex) => (\n <Table.Row key={`${rowIndex}-${columns.join(\"-\")}`}>\n {columns.map((column) => (\n <Table.Cell key={`${rowIndex}-${column}`} paddingX=\"xs\" paddingY=\"2xs\">\n <Text textStyle=\"paragraph/S/regular\">{formatValue(row[column])}</Text>\n </Table.Cell>\n ))}\n </Table.Row>\n ))}\n </Table.Body>\n </Table.Root>\n </Table.ScrollArea>\n );\n};\n","import { DecoratorNode, type NodeKey, type SerializedLexicalNode, type Spread } from \"lexical\";\nimport type React from \"react\";\nimport { DefaultRichTextDataTable } from \"../components/default-rich-text-components\";\nimport type { RowData } from \"../types/rich-text-components\";\n\nexport type { RowData } from \"../types/rich-text-components\";\n\nexport class DataTableNode extends DecoratorNode<React.JSX.Element> {\n __data: RowData[];\n\n static getType() {\n return \"data_table\";\n }\n\n static clone(node: DataTableNode) {\n return new DataTableNode(node.__data, node.__key);\n }\n\n constructor(data: RowData[], key?: NodeKey) {\n super(key);\n this.__data = data;\n }\n\n getData(): RowData[] {\n return this.__data;\n }\n\n createDOM(): HTMLElement {\n return document.createElement(\"div\");\n }\n\n updateDOM(): boolean {\n return false;\n }\n\n decorate() {\n return <DefaultRichTextDataTable fullWidth isReadOnly data={this.__data} />;\n }\n\n exportJSON(): SerializedDataTableNode {\n return {\n type: \"data_table\",\n version: 1,\n data: this.__data,\n };\n }\n\n static importJSON(json: SerializedDataTableNode) {\n return new DataTableNode(json.data);\n }\n\n getTextContent(): string {\n // Convert table data to a readable text representation\n if (!this.__data.length) return \"\";\n\n const headers = Object.keys(this.__data[0]);\n const headerRow = headers.join(\" | \");\n const separator = headers.map(() => \"---\").join(\" | \");\n const dataRows = this.__data.map((row) => headers.map((header) => String(row[header] || \"\")).join(\" | \"));\n\n return [headerRow, separator, ...dataRows].join(\"\\n\");\n }\n}\n\nexport type SerializedDataTableNode = Spread<{ data: RowData[] }, SerializedLexicalNode>;\n\nexport function $createDataTableNode(data: RowData[]) {\n return new DataTableNode(data);\n}\n\nexport function $isDataTableNode(node: unknown): node is DataTableNode {\n return node instanceof DataTableNode;\n}\n","import { Box } from \"@chakra-ui/react\";\nimport { DecoratorNode, type SerializedLexicalNode } from \"lexical\";\nimport type { ReactNode } from \"react\";\nimport { DefaultRichTextCodeEditor } from \"../../components/default-rich-text-components\";\n\nexport interface SerializedCodeBlockNode extends SerializedLexicalNode {\n type: \"codeblock\";\n language: string;\n code: string;\n version: 1;\n}\n\nexport class CodeBlockNode extends DecoratorNode<ReactNode> {\n __language: string;\n __code: string;\n\n static getType() {\n return \"codeblock\";\n }\n\n static clone(node: CodeBlockNode) {\n return new CodeBlockNode(node.__language, node.__code, node.__key);\n }\n\n constructor(language: string, code: string, key?: string) {\n super(key);\n this.__language = language;\n this.__code = code;\n }\n\n createDOM() {\n return document.createElement(\"div\");\n }\n\n updateDOM() {\n return false;\n }\n\n static importJSON(serializedNode: SerializedCodeBlockNode): CodeBlockNode {\n const { language, code } = serializedNode;\n return new CodeBlockNode(language, code);\n }\n\n decorate() {\n return (\n <Box borderRadius=\"md\" overflow=\"hidden\">\n <DefaultRichTextCodeEditor\n language={this.__language || \"plaintext\"}\n defaultCode={this.__code}\n isEditable={false}\n showLineNumbers\n disableScroll\n />\n </Box>\n );\n }\n}\n","import katex from \"katex\";\nimport type {\n DOMConversionMap,\n DOMConversionOutput,\n EditorConfig,\n LexicalNode,\n NodeKey,\n SerializedLexicalNode,\n Spread,\n} from \"lexical\";\nimport { $applyNodeReplacement, DecoratorNode, type DOMExportOutput } from \"lexical\";\nimport * as React from \"react\";\nimport { Suspense } from \"react\";\n\nconst EquationComponent = React.lazy(() => import(\"./EquationComponent\"));\n\nexport type SerializedEquationNode = Spread<\n {\n equation: string;\n inline: boolean;\n },\n SerializedLexicalNode\n>;\n\nfunction $convertEquationElement(domNode: HTMLElement): null | DOMConversionOutput {\n let equation = domNode.getAttribute(\"data-lexical-equation\");\n const inline = domNode.getAttribute(\"data-lexical-inline\") === \"true\";\n\n // Decode the equation from base64\n equation = atob(equation || \"\");\n\n if (equation) {\n const node = $createEquationNode(equation, inline);\n return { node };\n }\n\n return null;\n}\n\nexport class EquationNode extends DecoratorNode<React.ReactNode> {\n __equation: string;\n __inline: boolean;\n\n static getType(): string {\n return \"equation\";\n }\n\n static clone(node: EquationNode): EquationNode {\n return new EquationNode(node.__equation, node.__inline, node.__key);\n }\n\n constructor(equation: string, inline?: boolean, key?: NodeKey) {\n super(key);\n this.__equation = equation;\n this.__inline = inline ?? false;\n }\n\n static importJSON(serializedNode: SerializedEquationNode): EquationNode {\n return $createEquationNode(serializedNode.equation, serializedNode.inline);\n }\n\n exportJSON(): SerializedEquationNode {\n return {\n equation: this.getEquation(),\n inline: this.__inline,\n type: \"equation\",\n version: 1,\n };\n }\n\n createDOM(_config: EditorConfig): HTMLElement {\n const element = document.createElement(this.__inline ? \"span\" : \"div\");\n\n // EquationNodes should implement `user-action:none` in their CSS to avoid issues with deletion on Android.\n element.className = \"editor-equation\";\n return element;\n }\n\n exportDOM(): DOMExportOutput {\n const element = document.createElement(this.__inline ? \"span\" : \"div\");\n\n // Encode the equation as base64 to avoid issues with special characters\n const equation = btoa(this.__equation);\n element.setAttribute(\"data-lexical-equation\", equation);\n element.setAttribute(\"data-lexical-inline\", `${this.__inline}`);\n katex.render(this.__equation, element, {\n displayMode: !this.__inline, // true === block display //\n errorColor: \"#cc0000\",\n output: \"html\",\n strict: \"warn\",\n throwOnError: false,\n trust: false,\n });\n\n return { element };\n }\n\n static importDOM(): DOMConversionMap | null {\n return {\n div: (domNode: HTMLElement) => {\n if (!domNode.hasAttribute(\"data-lexical-equation\")) {\n return null;\n }\n\n return {\n conversion: $convertEquationElement,\n priority: 2,\n };\n },\n span: (domNode: HTMLElement) => {\n if (!domNode.hasAttribute(\"data-lexical-equation\")) {\n return null;\n }\n\n return {\n conversion: $convertEquationElement,\n priority: 1,\n };\n },\n };\n }\n\n updateDOM(prevNode: EquationNode): boolean {\n // If the inline property changes, replace the element\n return this.__inline !== prevNode.__inline;\n }\n\n getTextContent(): string {\n return this.__equation;\n }\n\n getEquation(): string {\n return this.__equation;\n }\n\n setEquation(equation: string): void {\n const writable = this.getWritable();\n writable.__equation = equation;\n }\n\n isInline(): boolean {\n return this.__inline;\n }\n\n decorate() {\n return (\n <Suspense fallback={null}>\n <EquationComponent equation={this.__equation} inline={this.__inline} />\n </Suspense>\n );\n }\n}\n\nexport function $createEquationNode(equation = \"\", inline = false): EquationNode {\n const equationNode = new EquationNode(equation, inline);\n return $applyNodeReplacement(equationNode);\n}\n\nexport function $isEquationNode(node: LexicalNode | null | undefined): node is EquationNode {\n return node instanceof EquationNode;\n}\n","import \"./EquationPlugin.css\";\n\nimport type { MultilineElementTransformer, TextMatchTransformer } from \"@lexical/markdown\";\nimport { $createEquationNode, $isEquationNode, EquationNode } from \"./EquationNode.tsx\";\n\nexport const EQUATION_INLINE: TextMatchTransformer = {\n dependencies: [EquationNode],\n export: (node) => {\n if ($isEquationNode(node) && node.isInline()) {\n return `\\\\( ${node.getEquation().trim()} \\\\)`;\n }\n return null;\n },\n importRegExp: /\\\\\\((.*?)\\\\\\)/,\n regExp: /\\\\\\((.*?)\\\\\\)/,\n replace: (textNode, match) => {\n const equationNode = $createEquationNode(match[1].trim(), true);\n textNode.replace(equationNode);\n },\n type: \"text-match\",\n};\n\nexport const EQUATION_MULTILINE: MultilineElementTransformer = {\n dependencies: [EquationNode],\n regExpStart: /\\\\\\[/,\n regExpEnd: /\\\\]/,\n export: (node) => {\n if ($isEquationNode(node) && !node.isInline()) {\n return `\\\\[ ${node.getEquation().trim()} \\\\]`;\n }\n return null;\n },\n replace: (rootNode, _children, _startMatch, _endMatch, linesInBetween) => {\n if (linesInBetween) {\n rootNode.append($createEquationNode(linesInBetween.join(\" \"), false));\n return true;\n }\n return false;\n },\n type: \"multiline-element\",\n};\n\nexport function EquationPlugin(): null {\n return null;\n}\n","import {\n type EditorConfig,\n ElementNode,\n type LexicalEditor,\n type LexicalNode,\n type SerializedElementNode,\n type Spread,\n} from \"lexical\";\n\nexport type SerializedHRNode = Spread<SerializedElementNode, SerializedElementNode>;\n\nexport class HRNode extends ElementNode {\n static getType() {\n return \"hr\";\n }\n\n static clone(node: HRNode) {\n return new HRNode(node?.__key);\n }\n\n static importJSON(_serializedNode: SerializedHRNode) {\n return $createHRNode();\n }\n\n exportJSON(): SerializedHRNode {\n return {\n ...super.exportJSON(),\n };\n }\n\n createDOM(_config: EditorConfig, _editor: LexicalEditor): HTMLElement {\n const element = document.createElement(\"hr\");\n element.style = \"margin: 2rem 0;\";\n return element;\n }\n\n updateDOM(_prevNode: unknown, _dom: HTMLElement, _config: EditorConfig): boolean {\n return false;\n }\n\n decorate(_editor: LexicalEditor) {\n return null;\n }\n}\n\nexport function $createHRNode(): HRNode {\n return new HRNode();\n}\n\nexport function $isHRNode(node: LexicalNode | null | undefined): node is HRNode {\n return node instanceof HRNode;\n}\n","import type { ElementTransformer } from \"@lexical/markdown\";\nimport type { LexicalNode } from \"lexical\";\nimport { $createHRNode, $isHRNode, HRNode } from \"./HorizontalRuleNode\";\n\nexport const HR: ElementTransformer = {\n dependencies: [HRNode],\n export: (node: LexicalNode) => {\n return $isHRNode(node) ? \"***\" : null;\n },\n regExp: /^(---|\\*\\*\\*|___)\\s?$/,\n replace: (parentNode) => {\n const line = $createHRNode();\n parentNode.replace(line);\n },\n type: \"element\",\n};\n","import type { ElementTransformer, TextMatchTransformer } from \"@lexical/markdown\";\nimport { $createTextNode, TextNode } from \"lexical\";\nimport { $createDataTableNode, $isDataTableNode, type RowData } from \"../nodes/DataTableNode\";\nimport { HR } from \"../plugins/HorizontalRulePlugin/horizontalRule\";\n\nexport const TABLE: ElementTransformer = {\n dependencies: [],\n export: (node, _traverseChildren) => {\n if ($isDataTableNode(node)) {\n const data = node.getData();\n\n if (!data.length) return \"\";\n\n const headers = Object.keys(data[0]);\n const headerRow = headers.join(\" | \");\n const separator = headers.map(() => \"---\").join(\" | \");\n const dataRows = data.map((row) => headers.map((header) => String(row[header] || \"\")).join(\" | \"));\n\n return [`| ${headerRow} |`, `| ${separator} |`, ...dataRows.map((row) => `| ${row} |`)].join(\"\\n\");\n }\n\n return null;\n },\n regExp: /^\\s*(\\|.+\\|)\\s*$/,\n replace: (parentNode, _children, match, _isImport) => {\n const previousNode = parentNode.getPreviousSibling();\n const isTableDelimiter = /^\\|?\\s*:?-{3,}:?\\s*(?:\\|\\s*:?-{3,}:?\\s*)*\\|?$/gm.test(match[0]);\n\n // if it is a delimiter, remove it\n if (isTableDelimiter) {\n parentNode.remove();\n return;\n }\n\n // Parse current row\n const cells = match[0]\n .split(\"|\")\n .slice(1, -1)\n .map((cell) => cell.trim());\n\n if (previousNode?.getType() === \"data_table\" && $isDataTableNode(previousNode)) {\n // Add row to existing table\n const existingData = previousNode.getData();\n const newRow: RowData = {};\n\n // Check if we have a placeholder row with empty values (created from headers)\n const isPlaceholderRow =\n existingData.length === 1 && Object.values(existingData[0]).every((value) => value === \"\");\n\n // Get headers from existing data structure\n const headers = existingData.length > 0 ? Object.keys(existingData[0]) : cells.map((_, index) => `col_${index}`);\n\n cells.forEach((cell, index) => {\n const header = headers[index] || `col_${index}`;\n newRow[header] = cell;\n });\n\n // If we had a placeholder row, replace it; otherwise append\n const newTableData = isPlaceholderRow ? [newRow] : [...existingData, newRow];\n const newTableNode = $createDataTableNode(newTableData);\n previousNode.replace(newTableNode);\n parentNode.remove();\n } else {\n // Create new table - treat first row as headers\n // Create a temporary empty row with these headers, which will be replaced when actual data comes\n const newRow: RowData = {};\n cells.forEach((cell, index) => {\n newRow[cell || `col_${index}`] = \"\";\n });\n\n const tableNode = $createDataTableNode([newRow]);\n parentNode.replace(tableNode);\n }\n },\n type: \"element\",\n};\n\nexport const UNDERLINE_INS_TAG: TextMatchTransformer = {\n dependencies: [TextNode],\n export: (node, _children) => {\n if (node instanceof TextNode) {\n let markdownText = node.getTextContent();\n\n if (node.hasFormat(\"bold\")) {\n markdownText = `**${markdownText}**`;\n } else if (node.hasFormat(\"italic\")) {\n markdownText = `*${markdownText}*`;\n } else if (node.hasFormat(\"underline\")) {\n markdownText = `<ins>${markdownText}</ins>`;\n } else {\n return null;\n }\n\n return markdownText;\n }\n return null;\n },\n regExp: /<ins>(.*)<\\/ins>/,\n importRegExp: /<ins>(.*)<\\/ins>/,\n replace: (node, match) => {\n const textNode = $createTextNode(match[1]);\n textNode.toggleFormat(\"underline\");\n node.replace(textNode);\n },\n type: \"text-match\",\n};\n\nexport const UNDERLINE_U_TAG: TextMatchTransformer = {\n dependencies: [TextNode],\n export: (_node, _children) => {\n return null;\n },\n regExp: /<u>(.*)<\\/u>/,\n importRegExp: /<u>(.*)<\\/u>/,\n replace: (node, match) => {\n const textNode = $createTextNode(match[1]);\n textNode.toggleFormat(\"underline\");\n node.replace(textNode);\n },\n type: \"text-match\",\n};\n\nexport const TRANSFORMERS_EXTENDED = [TABLE, HR, UNDERLINE_INS_TAG, UNDERLINE_U_TAG];\n","import { CodeNode } from \"@lexical/code\";\nimport { LinkNode } from \"@lexical/link\";\nimport { ListItemNode, ListNode } from \"@lexical/list\";\nimport { TRANSFORMERS } from \"@lexical/markdown\";\nimport { HeadingNode, QuoteNode } from \"@lexical/rich-text\";\nimport type { Klass, LexicalNode } from \"lexical\";\nimport { REFERENCE_LINK_TRANSFORMER, ReferenceLinkNode } from \"../markdown-editor/plugins/ReferenceLinkPlugin\";\nimport theme from \"../theme/rich-text-theme\";\nimport { DataTableNode } from \"./nodes/DataTableNode\";\nimport { CodeBlockNode } from \"./plugins/CodePlugin/CodeNode\";\nimport { EquationNode } from \"./plugins/EquationPlugin/EquationNode\";\nimport { EQUATION_INLINE, EQUATION_MULTILINE } from \"./plugins/EquationPlugin/EquationPlugin\";\nimport { HRNode } from \"./plugins/HorizontalRulePlugin/HorizontalRuleNode\";\nimport { TRANSFORMERS_EXTENDED } from \"./transformers/markdown-transformers\";\n\nexport const editorNodes: Array<Klass<LexicalNode>> = [\n QuoteNode,\n LinkNode,\n DataTableNode,\n HeadingNode,\n ListNode,\n ListItemNode,\n CodeNode,\n CodeBlockNode,\n EquationNode,\n HRNode,\n ReferenceLinkNode,\n];\n\nexport const editorTransformers = [\n ...TRANSFORMERS,\n ...TRANSFORMERS_EXTENDED,\n EQUATION_INLINE,\n EQUATION_MULTILINE,\n REFERENCE_LINK_TRANSFORMER,\n];\n\nexport const editorTheme = theme;\n","import { CodeNode } from \"@lexical/code\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { $nodesOfType } from \"lexical\";\nimport { useEffect } from \"react\";\nimport { CodeBlockNode } from \"./CodeNode\";\n\nexport function ImportCodeBlocksPlugin() {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.update(() => {\n const codeNodes = $nodesOfType(CodeNode);\n for (const n of codeNodes) {\n const lang = n.getLanguage() ?? \"plaintext\";\n const code = n.getTextContent();\n n.replace(new CodeBlockNode(lang, code));\n }\n });\n }, [editor]);\n\n return null;\n}\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { useEffect } from \"react\";\n\nexport default function ToggleEditablePlugin({ isEditable }: { isEditable: boolean }) {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n editor.setEditable(isEditable);\n }, [isEditable, editor]);\n\n return null;\n}\n","import { Box } from \"@chakra-ui/react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { TreeView } from \"@lexical/react/LexicalTreeView\";\n\nexport function TreeViewPlugin() {\n const [editor] = useLexicalComposerContext();\n return (\n <Box fontSize=\"xs\" color=\"fg.muted\" padding=\"4\">\n <TreeView\n treeTypeButtonClassName=\"debug-treetype-button\"\n timeTravelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelButtonClassName=\"debug-timetravel-button\"\n timeTravelPanelClassName=\"debug-timetravel-panel\"\n timeTravelPanelSliderClassName=\"debug-timetravel-slider\"\n viewClassName=\"tree-view-output\"\n editor={editor}\n />\n </Box>\n );\n}\n","const FRONTMATTER_PATTERN = /^---\\s*\\n([\\s\\S]*?)\\n---\\s*(?:\\n|$)/;\n\nexport function splitFrontmatter(content: string) {\n const match = content.match(FRONTMATTER_PATTERN);\n if (!match) {\n return { frontmatter: \"\", body: content };\n }\n return {\n frontmatter: match[0],\n body: content.slice(match[0].length),\n };\n}\n","export const FOCUS_EDITOR = \"FOCUS_EDITOR\";\nexport const UPLOAD_FILE = \"UPLOAD_FILE\";\nexport const OPEN_CONTEXT = \"OPEN_CONTEXT\";\nexport const DROP_EVENT = \"DROP_EVENT\";\n\n// prompt actions\nexport const RUN_PROMPT = \"RUN_PROMPT\";\nexport const UPDATE_FORMAT = \"UPDATE_FORMAT\";\nexport const UPDATE_BEHAVIOR = \"UPDATE_BEHAVIOR\";\nexport const INSERT_PROMPT = \"INSERT_PROMPT\";\nexport const RENAME_PROMPT = \"RENAME_PROMPT\";\nexport const DUPLICATE_PROMPT = \"DUPLICATE_PROMPT\";\nexport const DELETE_PROMPT = \"DELETE_PROMPT\";\n\n// reference actions\nexport const DELETE_REFERENCES = \"DELETE_REFERENCES\";\nexport const RENAME_REFERENCES = \"RENAME_REFERENCES\";\nexport const INSERT_REFERENCE = \"INSERT_REFERENCE\";\n\n// block actions\nexport const INSERT_BLOCK = \"INSERT_BLOCK\";\n","import { createCommand } from \"lexical\";\nimport {\n DELETE_PROMPT,\n DELETE_REFERENCES,\n DUPLICATE_PROMPT,\n INSERT_BLOCK,\n INSERT_PROMPT,\n INSERT_REFERENCE,\n OPEN_CONTEXT,\n RENAME_PROMPT,\n RENAME_REFERENCES,\n RUN_PROMPT,\n UPDATE_BEHAVIOR,\n UPDATE_FORMAT,\n UPLOAD_FILE,\n} from \"./events\";\n\nexport const UPLOAD_FILE_COMMAND = createCommand(UPLOAD_FILE);\nexport const OPEN_CONTEXT_COMMAND = createCommand(OPEN_CONTEXT);\n\n// prompt actions\nexport const RUN_PROMPT_COMMAND = createCommand(RUN_PROMPT);\nexport const UPDATE_FORMAT_COMMAND = createCommand(UPDATE_FORMAT);\nexport const UPDATE_BEHAVIOR_COMMAND = createCommand(UPDATE_BEHAVIOR);\nexport const INSERT_PROMPT_COMMAND = createCommand(INSERT_PROMPT);\nexport const RENAME_PROMPT_COMMAND = createCommand(RENAME_PROMPT);\nexport const DUPLICATE_PROMPT_COMMAND = createCommand(DUPLICATE_PROMPT);\nexport const DELETE_PROMPT_COMMAND = createCommand(DELETE_PROMPT);\n\n// reference actions\nexport const DELETE_REFERENCES_COMMAND = createCommand(DELETE_REFERENCES);\nexport const RENAME_REFERENCES_COMMAND = createCommand(RENAME_REFERENCES);\nexport const INSERT_REFERENCE_COMMAND = createCommand(INSERT_REFERENCE);\n\n// block actions\nexport const INSERT_BLOCK_COMMAND = createCommand(INSERT_BLOCK);\n\n// placeholder actions\nexport const INSERT_NEW_FILE_PLACEHOLDER = \"INSERT_NEW_FILE_PLACEHOLDER\";\nexport const INSERT_NEW_TEXT_PLACEHOLDER = \"INSERT_NEW_TEXT_PLACEHOLDER\";\nexport const INSERT_PLACEHOLDER_REFERENCE = \"INSERT_PLACEHOLDER_REFERENCE\";\nexport const INSERT_NEW_FILE_PLACEHOLDER_COMMAND = createCommand(INSERT_NEW_FILE_PLACEHOLDER);\nexport const INSERT_NEW_TEXT_PLACEHOLDER_COMMAND = createCommand(INSERT_NEW_TEXT_PLACEHOLDER);\nexport const INSERT_PLACEHOLDER_REFERENCE_COMMAND = createCommand(INSERT_PLACEHOLDER_REFERENCE);\n","import { addClassNamesToElement } from \"@lexical/utils\";\nimport {\n $createParagraphNode,\n type DOMConversionMap,\n type DOMConversionOutput,\n type DOMExportOutput,\n type EditorConfig,\n type ElementFormatType,\n ElementNode,\n isHTMLElement,\n type LexicalEditor,\n type LexicalNode,\n type ParagraphNode,\n type RangeSelection,\n type SerializedElementNode,\n} from \"lexical\";\n\nexport type SerializedCommentNode = SerializedElementNode;\n\nfunction convertCommentElement(element: HTMLElement): DOMConversionOutput {\n const node = $createCommentNode();\n if (element.style !== null) {\n node.setFormat(element.style.textAlign as ElementFormatType);\n }\n return { node };\n}\n\nexport class CommentNode extends ElementNode {\n static getType(): string {\n return \"comment\";\n }\n\n static clone(node: CommentNode): CommentNode {\n return new CommentNode(node.__key);\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n const element = document.createElement(\"blockquote\");\n addClassNamesToElement(element, config.theme.comment);\n return element;\n }\n\n updateDOM(): boolean {\n return false;\n }\n\n static importDOM(): DOMConversionMap | null {\n return {\n blockquote: () => ({\n conversion: convertCommentElement,\n priority: 0,\n }),\n };\n }\n\n exportDOM(editor: LexicalEditor): DOMExportOutput {\n const { element } = super.exportDOM(editor);\n\n if (element && isHTMLElement(element)) {\n if (this.isEmpty()) {\n element.append(document.createElement(\"br\"));\n }\n\n const formatType = this.getFormatType();\n element.style.textAlign = formatType;\n\n const direction = this.getDirection();\n if (direction) {\n element.dir = direction;\n }\n }\n\n return {\n element,\n };\n }\n\n static importJSON(serializedNode: SerializedCommentNode): CommentNode {\n const node = $createCommentNode();\n node.setFormat(serializedNode.format);\n node.setIndent(serializedNode.indent);\n node.setDirection(serializedNode.direction);\n return node;\n }\n\n exportJSON(): SerializedElementNode {\n return {\n ...super.exportJSON(),\n type: \"comment\",\n };\n }\n\n getTextContent(): string {\n const originalText = super.getTextContent();\n // escape { and } symbols\n const withEscapedReferences = originalText.replace(/([{}])/g, \"\\\\$1\");\n return `{{! ${withEscapedReferences} }}`;\n }\n\n // mutation\n\n insertNewAfter(_: RangeSelection, restoreSelection?: boolean): ParagraphNode {\n const newBlock = $createParagraphNode();\n const direction = this.getDirection();\n newBlock.setDirection(direction);\n this.insertAfter(newBlock, restoreSelection);\n return newBlock;\n }\n\n collapseAtStart(): true {\n const paragraph = $createParagraphNode();\n const children = this.getChildren();\n children.forEach((child) => {\n paragraph.append(child);\n });\n this.replace(paragraph);\n return true;\n }\n}\n\nexport function $createCommentNode(): CommentNode {\n return new CommentNode();\n}\n\nexport function $isCommentNode(node: LexicalNode | null | undefined): node is CommentNode {\n return node instanceof CommentNode;\n}\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { $setBlocksType } from \"@lexical/selection\";\nimport { mergeRegister } from \"@lexical/utils\";\nimport { $getSelection, $isRangeSelection, COMMAND_PRIORITY_LOW, type TextNode } from \"lexical\";\nimport { useEffect } from \"react\";\nimport { INSERT_BLOCK_COMMAND } from \"../../../commands\";\nimport { $createCommentNode } from \"../nodes/CommentNode/CommentNode\";\n\nexport const insertCommentBlock = (_blockType: string, nodeToReplace?: TextNode) => {\n const selection = $getSelection();\n const commentNode = $createCommentNode();\n\n if (nodeToReplace) {\n const nodeParent = nodeToReplace.getParent();\n nodeParent?.replace(commentNode, true);\n nodeToReplace.remove();\n commentNode.selectEnd();\n return;\n }\n\n if ($isRangeSelection(selection)) {\n $setBlocksType(selection, $createCommentNode);\n }\n};\n\ntype InsertBlockEvent = {\n optionId: string;\n nodeToReplace?: TextNode;\n};\n\nexport function useCommentCommands(): null {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n INSERT_BLOCK_COMMAND,\n (event: InsertBlockEvent) => {\n const { optionId, nodeToReplace } = event;\n insertCommentBlock(optionId, nodeToReplace);\n return false;\n },\n COMMAND_PRIORITY_LOW,\n ),\n );\n }, [editor]);\n\n return null;\n}\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { mergeRegister } from \"@lexical/utils\";\nimport { $createParagraphNode } from \"lexical\";\nimport { useEffect } from \"react\";\nimport { CommentNode } from \"../nodes/CommentNode/CommentNode\";\n\nexport const useCommentSchema = () => {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n return mergeRegister(\n editor.registerNodeTransform(CommentNode, (node) => {\n const children = node.getChildren();\n\n /**\n * Comment nodes cannot have other comments as children\n */\n const invalidChildren = children.filter((child) => child.getType() === \"comment\");\n\n if (invalidChildren.length > 0) {\n editor.update(() => {\n invalidChildren.forEach((child) => {\n child.replace($createParagraphNode(), true);\n });\n });\n }\n }),\n );\n }, [editor]);\n};\n","import { useCommentCommands } from \"./hooks/useCommentCommands\";\nimport { useCommentSchema } from \"./hooks/useCommentSchema\";\n\nexport function CommentPlugin(): null {\n useCommentSchema();\n useCommentCommands();\n return null;\n}\n","import { $getRoot, $isElementNode, ElementNode, type Klass, type LexicalNode, type RootNode } from \"lexical\";\n\nexport function $getAllNodesOfType<T extends LexicalNode>(nodeType: Klass<T>) {\n const root = $getRoot();\n const nodesOfType: T[] = [];\n\n const traverse = (node: LexicalNode) => {\n if (node instanceof nodeType) {\n nodesOfType.push(node as T);\n }\n if (node instanceof ElementNode) {\n node.getChildren?.().forEach(traverse);\n }\n };\n\n traverse(root);\n return nodesOfType;\n}\n\nexport const $getTextContent = (root: RootNode) => {\n let textContent = \"\";\n const children = root.getChildren();\n const childrenLength = children.length;\n for (let i = 0; i < childrenLength; i++) {\n const child = children[i];\n textContent += child.getTextContent();\n if ($isElementNode(child) && i !== childrenLength - 1 && !child.isInline()) {\n textContent += \"\\n\";\n }\n }\n return textContent;\n};\n\ntype SerializedNode = {\n type?: string;\n text?: string;\n name?: string;\n referenceId?: string;\n children?: SerializedNode[];\n};\n\ntype SerializedRoot = {\n root?: SerializedNode;\n};\n\nconst getReferenceMarker = (node: SerializedNode) => {\n if (node.type !== \"reference\") return null;\n return `#${node.name ?? node.referenceId ?? \"\"}`;\n};\n\nconst shouldAppendParagraphBreak = (node: SerializedNode) => {\n return node.type === \"paragraph\" && Boolean(node.children?.length);\n};\n\nconst traverseSerializedNode = (node: SerializedNode): string => {\n if (node.type === \"comment\") {\n return \"\";\n }\n\n const referenceMarker = getReferenceMarker(node);\n if (referenceMarker !== null) {\n return referenceMarker;\n }\n\n let text = typeof node.text === \"string\" ? node.text : \"\";\n const children = node.children;\n if (!Array.isArray(children)) return text;\n\n const childrenLength = children.length;\n for (let i = 0; i < childrenLength; i += 1) {\n const child = children[i];\n if (child.type === \"comment\") {\n if (i !== childrenLength - 1) {\n text += \"\\n\";\n }\n continue;\n }\n\n text += traverseSerializedNode(child);\n if (shouldAppendParagraphBreak(child)) {\n text += \"\\n\";\n }\n }\n\n return text;\n};\n\nexport const getTextFromSerializedEditorState = (state: string): string => {\n try {\n const parsed = JSON.parse(state) as SerializedRoot;\n return traverseSerializedNode(parsed.root ?? {});\n } catch {\n return \"\";\n }\n};\n\nexport const emptyEditorState = {\n root: {\n direction: \"ltr\",\n format: \"\",\n indent: 0,\n type: \"root\",\n version: 1,\n children: [\n {\n type: \"paragraph\",\n version: 1,\n format: \"\",\n indent: 0,\n textFormat: undefined,\n direction: null,\n children: [],\n },\n ],\n },\n};\n\nexport function generateEditorStateFromString(input = \"\") {\n if (!input.trim()) {\n return JSON.parse(JSON.stringify(emptyEditorState));\n }\n\n // Split on line breaks → one paragraph per line\n const paragraphs = input.split(/\\r?\\n/);\n\n const children = paragraphs.map((line) => ({\n type: \"paragraph\",\n version: 1,\n format: \"\",\n indent: 0,\n textFormat: undefined,\n direction: null,\n children: line\n ? [\n {\n type: \"text\",\n version: 1,\n text: line,\n format: \"\",\n detail: 0,\n mode: \"normal\",\n style: \"\",\n },\n ]\n : [],\n }));\n\n return {\n root: {\n direction: \"ltr\",\n format: \"\",\n indent: 0,\n type: \"root\",\n version: 1,\n children,\n },\n };\n}\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { useImperativeHandle } from \"react\";\nimport { generateEditorStateFromString, getTextFromSerializedEditorState } from \"../utils\";\n\nexport interface PromptEditorRef {\n setEditorValue: (value: string) => void;\n}\n\nexport function ImperativeAPIPlugin({\n editorRef,\n previousTextRef,\n}: {\n editorRef: React.ForwardedRef<PromptEditorRef>;\n previousTextRef: React.MutableRefObject<string>;\n}) {\n const [editor] = useLexicalComposerContext();\n\n useImperativeHandle(\n editorRef,\n () => ({\n setEditorValue: (value: string) => {\n const state = editor.parseEditorState(JSON.stringify(generateEditorStateFromString(value)));\n editor.setEditorState(state);\n previousTextRef.current = getTextFromSerializedEditorState(value);\n editor.focus(undefined, { defaultSelection: \"rootEnd\" });\n },\n }),\n [editor, previousTextRef],\n );\n\n return null;\n}\n","type KeyDownLikeEvent = {\n key: string;\n ctrlKey: boolean;\n metaKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n};\n\nexport const shouldSubmitOnEnter = (event: KeyDownLikeEvent) => {\n if (event.key !== \"Enter\") return false;\n\n return !event.ctrlKey && !event.metaKey && !event.shiftKey && !event.altKey;\n};\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { COMMAND_PRIORITY_HIGH, KEY_DOWN_COMMAND } from \"lexical\";\nimport { useEffect } from \"react\";\nimport { shouldSubmitOnEnter } from \"./keyboard-shortcuts\";\n\nexport interface KeyboardShortcutPluginProps {\n onSubmit?: () => void;\n}\n\nexport function KeyboardShortcutPlugin({ onSubmit }: KeyboardShortcutPluginProps) {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n return editor.registerCommand(\n KEY_DOWN_COMMAND,\n (event: KeyboardEvent) => {\n if (shouldSubmitOnEnter(event)) {\n event.preventDefault();\n onSubmit?.();\n return true;\n }\n\n return false;\n },\n COMMAND_PRIORITY_HIGH,\n );\n }, [editor, onSubmit]);\n\n return null;\n}\n","import type { MenuOptionGroup } from \"./ReferenceMenuOption\";\n\nexport const menuSortOrder: MenuOptionGroup[] = [\"table\", \"connector\"];\n","import { menuSortOrder } from \"../constants\";\nimport type { MenuOptionGroup, ReferenceMenuOption } from \"../ReferenceMenuOption\";\n\nexport const getSortedMenuOptions = (options: ReferenceMenuOption[]) => {\n const sortedOptions = options\n .sort((a, b) => menuSortOrder.indexOf(a.group) - menuSortOrder.indexOf(b.group))\n .map((option, index) => ({ ...option, index }) as ReferenceMenuOption);\n\n const groupedOptions = sortedOptions.reduce(\n (acc, option) => {\n const bucket = acc[option.group] ?? [];\n bucket.push(option);\n acc[option.group] = bucket;\n return acc;\n },\n {} as Record<MenuOptionGroup, ReferenceMenuOption[]>,\n );\n\n return groupedOptions;\n};\n","import { Flex, Text, Tooltip } from \"@chakra-ui/react\";\n\ninterface ReferenceMenuItemProps {\n id: string;\n isSelected: boolean;\n onClick: () => void;\n onMouseEnter: () => void;\n primaryLabel: string;\n secondaryLabel?: string;\n setRefElement: (element: HTMLDivElement) => void;\n tabIndex: number;\n}\n\nexport function ReferenceMenuItem(props: ReferenceMenuItemProps) {\n const { id, isSelected, onClick, onMouseEnter, setRefElement, secondaryLabel, primaryLabel, tabIndex = -1 } = props;\n\n return (\n <Flex\n direction=\"column\"\n cursor=\"pointer\"\n gap=\"2xs\"\n padding=\"2xs\"\n paddingX=\"sm\"\n bg={isSelected ? \"bg.muted\" : \"transparent\"}\n tabIndex={tabIndex}\n ref={setRefElement}\n role=\"option\"\n aria-selected={isSelected}\n id={id}\n onMouseEnter={onMouseEnter}\n onClick={onClick}\n >\n <Tooltip.Root>\n <Tooltip.Trigger>\n <Text mt=\"1px\" lineClamp={1} textOverflow=\"ellipsis\" textStyle=\"label/M/regular\">\n {primaryLabel}\n </Text>\n </Tooltip.Trigger>\n <Tooltip.Positioner>\n <Tooltip.Content>{primaryLabel}</Tooltip.Content>\n </Tooltip.Positioner>\n </Tooltip.Root>\n {secondaryLabel && (\n <Text lineClamp={2} textOverflow=\"ellipsis\" textStyle=\"label/S/regular\" color=\"fg.muted\">\n {secondaryLabel}\n </Text>\n )}\n </Flex>\n );\n}\n","import { Box, Text } from \"@chakra-ui/react\";\nimport { useEffect } from \"react\";\nimport type { ReferenceMenuOption } from \"../../ReferenceMenuOption\";\nimport { getSortedMenuOptions } from \"../../utils/getSortedMenuOptions\";\nimport { ReferenceMenuItem } from \"./ReferenceMenuItem\";\n\ninterface ReferenceMenuProps {\n options: ReferenceMenuOption[];\n selectedIndex: number | null;\n onSelectItem: (option: ReferenceMenuOption, index: number) => void;\n onMouseEnterItem: (index: number) => void;\n}\n\nexport const ReferenceMenu = (props: ReferenceMenuProps) => {\n const { options, selectedIndex, onSelectItem, onMouseEnterItem } = props;\n const { table = [], connector = [] } = getSortedMenuOptions(options);\n\n const hasResults = [...table, ...connector].length;\n\n /** scroll to the selected item if necessary */\n useEffect(() => {\n document\n .getElementById(`typeahead-item-${selectedIndex}`)\n ?.scrollIntoView({ behavior: \"instant\", block: \"nearest\" });\n }, [selectedIndex]);\n\n return (\n <Box\n zIndex=\"1000\"\n position=\"absolute\"\n layerStyle=\"modal\"\n overflow=\"auto\"\n maxHeight={\"24rem\"}\n minWidth={{\n base: \"100vw\",\n md: \"264px\",\n }}\n >\n {!hasResults && <Text>No results</Text>}\n {!!table.length && (\n <>\n <Text paddingTop=\"xs\" paddingBottom=\"2xs\" paddingX=\"sm\" color=\"fg.muted\" textStyle=\"label/S/medium\">\n Tables\n </Text>\n <Box>\n {table.map((option) => {\n return (\n <ReferenceMenuItem\n id={`typeahead-item-${option.index}`}\n isSelected={selectedIndex === option.index}\n onClick={() => onSelectItem(option, option.index)}\n onMouseEnter={() => onMouseEnterItem(option.index)}\n key={option.id}\n primaryLabel={option.name}\n secondaryLabel={option.description}\n setRefElement={option.setRefElement}\n tabIndex={-1}\n />\n );\n })}\n </Box>\n </>\n )}\n {!!connector.length && (\n <>\n <Text paddingTop=\"xs\" paddingBottom=\"2xs\" paddingX=\"sm\" color=\"fg.muted\" textStyle=\"label/S/medium\">\n Data Sources\n </Text>\n <Box>\n {connector.map((option) => {\n return (\n <ReferenceMenuItem\n id={`typeahead-item-${option.index}`}\n isSelected={selectedIndex === option.index}\n onClick={() => onSelectItem(option, option.index)}\n onMouseEnter={() => onMouseEnterItem(option.index)}\n key={option.id}\n primaryLabel={option.name}\n secondaryLabel={option.description}\n setRefElement={option.setRefElement}\n tabIndex={-1}\n />\n );\n })}\n </Box>\n </>\n )}\n </Box>\n );\n};\n","import { useEffect, useMemo, useState } from \"react\";\nimport type { ReferenceMenuOption } from \"../ReferenceMenuOption\";\n\nconst localFilter = (data: ReferenceMenuOption[], q: string) =>\n data.filter((m) => m.name.replace(/ /g, \"_\").toLowerCase().includes(q.toLowerCase()));\n\n/**\n * Search across all resources and menu options\n *\n * @param queryString\n * @returns\n */\nexport function useContextLookup(\n queryString: string | null,\n items: {\n resourceId: string;\n resourceType: \"table\" | \"connector\";\n name: string;\n description?: string;\n }[] = [],\n) {\n const [results, setResults] = useState<Array<ReferenceMenuOption>>([]);\n\n const baseOptions: ReferenceMenuOption[] = useMemo(\n () =>\n items.map(\n (res, index): ReferenceMenuOption => ({\n id: res.resourceId,\n key: res.resourceId,\n index,\n group: res.resourceType,\n name: res.name,\n description: res.description,\n setRefElement: () => {},\n }),\n ),\n [items],\n );\n\n useEffect(() => {\n if (queryString == null || queryString === \"\") {\n setResults(baseOptions);\n return;\n }\n\n setResults(localFilter(baseOptions, queryString));\n }, [queryString, baseOptions]);\n\n return results;\n}\n","import type { MenuTextMatch } from \"@lexical/react/LexicalTypeaheadMenuPlugin\";\n\nconst VALID_PUNCTUATION = \"\\\\.\\\\-<>_:\";\nconst TRIGGERS = [\"#\"].join(\"\");\n\nconst VALID_CHARS = `[^${TRIGGERS}${VALID_PUNCTUATION}\\\\s]`;\nconst VALID_JOINS = `(?:[${VALID_PUNCTUATION}]|)`;\n\nconst LENGTH_LIMIT = 75;\n\nconst TriggerRegex = new RegExp(`(^|\\\\s|\\\\()([${TRIGGERS}]((?:${VALID_CHARS}${VALID_JOINS}){0,${LENGTH_LIMIT}}))$`);\n\nconst AliasRegex = new RegExp(`(^|\\\\s|\\\\()([${TRIGGERS}]((?:${VALID_CHARS}){0,${LENGTH_LIMIT}}))$`);\n\n/**\n * lexical will run this function on text nodes\n *\n * @param text\n * @param minMatchLength\n * @returns\n */\nexport function checkForTriggers(text: string, minMatchLength: number): MenuTextMatch | null {\n let match = TriggerRegex.exec(text);\n\n if (match === null) {\n match = AliasRegex.exec(text);\n }\n\n if (match !== null) {\n // The strategy ignores leading whitespace but we need to know it's\n // length to add it to the leadOffset\n const maybeLeadingWhitespace = match[1];\n const matchingString = match[3];\n\n if (matchingString.length >= minMatchLength) {\n return {\n leadOffset: match.index + maybeLeadingWhitespace.length,\n matchingString,\n replaceableString: match[2],\n };\n }\n }\n\n return null;\n}\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { LexicalTypeaheadMenuPlugin } from \"@lexical/react/LexicalTypeaheadMenuPlugin\";\nimport type { TextNode } from \"lexical\";\nimport { useCallback, useMemo, useState } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { INSERT_REFERENCE_COMMAND } from \"../../commands\";\nimport { ReferenceMenu } from \"./components/ReferenceMenu/ReferenceMenu\";\nimport { useContextLookup } from \"./hooks/useContextLookup\";\nimport type { ReferenceMenuOption } from \"./ReferenceMenuOption\";\nimport { checkForTriggers } from \"./utils/checkForTriggers\";\n\nconst SUGGESTION_LIST_LENGTH_LIMIT = 20;\n\ntype Props = {\n items?: Array<{\n resourceId: string;\n resourceType: \"table\" | \"connector\";\n name: string;\n description?: string;\n }>;\n};\n\nexport function ReferenceMenuPlugin({ items = [] }: Props) {\n const [queryString, setQueryString] = useState<string | null>(null);\n const [editor] = useLexicalComposerContext();\n const searchResults = useContextLookup(queryString, items);\n\n /**\n * triggers when the user selects an option in the context menu\n */\n const onSelectOption = useCallback(\n (selectedOption: ReferenceMenuOption, nodeToReplace: TextNode | null, closeMenu: () => void) => {\n editor.update(() => {\n if (!nodeToReplace) return;\n\n editor.dispatchCommand(INSERT_REFERENCE_COMMAND, {\n resourceId: selectedOption.id,\n resourceType: selectedOption.group,\n name: selectedOption.name,\n nodeToReplace,\n });\n\n closeMenu();\n });\n },\n [editor],\n );\n\n /**\n * checks text nodes and return nodes matching the trigger\n */\n const checkForTrigger = useCallback((text: string) => {\n return checkForTriggers(text, 0);\n }, []);\n\n /**\n * define the options to display in the context menu\n */\n const menuOptions = useMemo(() => {\n return [...searchResults.slice(0, SUGGESTION_LIST_LENGTH_LIMIT)];\n }, [searchResults]);\n\n return (\n <LexicalTypeaheadMenuPlugin<ReferenceMenuOption>\n onQueryChange={setQueryString}\n onSelectOption={onSelectOption}\n triggerFn={checkForTrigger}\n options={menuOptions}\n menuRenderFn={(anchorElementRef, { options, selectedIndex, selectOptionAndCleanUp, setHighlightedIndex }) => {\n if (!anchorElementRef.current) return null;\n return ReactDOM.createPortal(\n <ReferenceMenu\n options={options}\n selectedIndex={selectedIndex}\n onSelectItem={(option, i) => {\n setHighlightedIndex(i);\n selectOptionAndCleanUp(option);\n }}\n onMouseEnterItem={(i) => {\n setHighlightedIndex(i);\n }}\n />,\n anchorElementRef.current,\n );\n }}\n />\n );\n}\n","import { addClassNamesToElement } from \"@lexical/utils\";\nimport {\n type DOMExportOutput,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n type NodeKey,\n type SerializedTextNode,\n type Spread,\n TextNode,\n} from \"lexical\";\n\ntype SerializedReferenceNode = Spread<\n {\n referenceId: string;\n name: string;\n },\n SerializedTextNode\n>;\n\nexport class ReferenceNode extends TextNode {\n __referenceId: string;\n __name: string;\n\n static getType(): string {\n return \"reference\";\n }\n\n static clone(node: ReferenceNode): ReferenceNode {\n return new ReferenceNode(node.__referenceId, node.__name, node.__key);\n }\n\n constructor(referenceId: string, name: string, key?: NodeKey) {\n super(name, key);\n this.__referenceId = referenceId;\n this.__name = name;\n }\n\n isKeyboardSelectable(): boolean {\n return false;\n }\n\n canBeEmpty(): boolean {\n return false;\n }\n\n canInsertTextAfter(): boolean {\n return false;\n }\n\n canInsertTextBefore(): boolean {\n return false;\n }\n\n createDOM(config: EditorConfig): HTMLElement {\n const span = document.createElement(\"span\");\n addClassNamesToElement(span, config.theme.reference);\n span.setAttribute(\"data-reference-id\", this.__referenceId);\n span.setAttribute(\"data-name\", this.__name);\n span.textContent = `#${this.__name}`;\n return span;\n }\n\n updateDOM(prevNode: ReferenceNode, dom: HTMLElement): boolean {\n if (prevNode.__name !== this.__name || prevNode.__referenceId !== this.__referenceId) {\n dom.setAttribute(\"data-reference-id\", this.__referenceId);\n dom.setAttribute(\"data-name\", this.__name);\n dom.textContent = `#${this.__name}`;\n }\n\n return false;\n }\n\n exportDOM(_editor: LexicalEditor): DOMExportOutput {\n const el = document.createElement(\"span\");\n el.setAttribute(\"data-reference-id\", this.__referenceId);\n el.setAttribute(\"data-name\", this.__name);\n el.textContent = `#${this.__name}`;\n return { element: el };\n }\n\n static importJSON(serializedNode: SerializedReferenceNode): ReferenceNode {\n const node = new ReferenceNode(serializedNode.referenceId, serializedNode.name);\n return node;\n }\n\n exportJSON(): SerializedReferenceNode {\n return {\n ...super.exportJSON(),\n type: \"reference\",\n referenceId: this.__referenceId,\n name: this.__name,\n };\n }\n\n getTextContent(): string {\n return `#${this.__name}`;\n }\n}\n\nexport function $createReferenceNode(referenceId: string, name: string): ReferenceNode {\n return new ReferenceNode(referenceId, name);\n}\n\nexport function $isReferenceNode(node: LexicalNode | null | undefined): node is ReferenceNode {\n return node instanceof ReferenceNode;\n}\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { mergeRegister } from \"@lexical/utils\";\nimport { COMMAND_PRIORITY_LOW, type LexicalNode } from \"lexical\";\nimport { type PropsWithChildren, useEffect } from \"react\";\nimport { INSERT_REFERENCE_COMMAND } from \"../../commands\";\nimport { $createReferenceNode } from \"./nodes/ReferenceNode/ReferenceNode\";\n\nexport const $insertExistingReference = (nodeToReplace: LexicalNode, resourceId: string, name: string) => {\n const refNode = $createReferenceNode(resourceId, name);\n\n if (nodeToReplace) {\n nodeToReplace?.replace(refNode);\n nodeToReplace.remove();\n refNode.selectEnd();\n return;\n }\n};\n\nexport function ReferencePlugin(\n props: PropsWithChildren<{ onAddReference?: (resourceId: string, resourceType: \"table\" | \"connector\") => void }>,\n) {\n const { onAddReference } = props;\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n return mergeRegister(\n editor.registerCommand(\n INSERT_REFERENCE_COMMAND,\n (event: {\n resourceId: string;\n resourceType: \"table\" | \"connector\";\n name: string;\n nodeToReplace: LexicalNode;\n }) => {\n const { resourceId, resourceType, name, nodeToReplace } = event;\n\n editor.update(() => {\n $insertExistingReference(nodeToReplace, resourceId, name);\n });\n\n onAddReference?.(resourceId, resourceType);\n return true;\n },\n COMMAND_PRIORITY_LOW,\n ),\n );\n }, [editor, onAddReference]);\n\n return null;\n}\n","import type { EditorThemeClasses } from \"lexical\";\nimport baseTheme from \"../../theme/rich-text-theme\";\nimport \"./prompt-input-theme.css\";\n\nconst promptInputTheme: EditorThemeClasses = {\n ...baseTheme,\n // Override paragraph class to remove margins specifically for prompt input\n paragraph: \"rich-text__p rich-text__p--no-margin\",\n};\n\nexport default promptInputTheme;\n","import { Flex, Kbd, Text } from \"@chakra-ui/react\";\nimport { MarkNode } from \"@lexical/mark\";\nimport { LexicalComposer } from \"@lexical/react/LexicalComposer\";\nimport { LexicalErrorBoundary } from \"@lexical/react/LexicalErrorBoundary\";\nimport { HistoryPlugin } from \"@lexical/react/LexicalHistoryPlugin\";\nimport { OnChangePlugin } from \"@lexical/react/LexicalOnChangePlugin\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport { $getRoot } from \"lexical\";\nimport type { ReactElement } from \"react\";\nimport { type ForwardRefRenderFunction, forwardRef, useRef } from \"react\";\nimport { ContentEditable } from \"../shared/components/content-editable\";\nimport ToggleEditablePlugin from \"../shared/plugins/ToggleEditablePlugin\";\nimport { TreeViewPlugin } from \"../shared/plugins/TreeViewPlugin/TreeViewPlugin\";\nimport { CommentPlugin } from \"./plugins/CommentPlugin/CommentPlugin\";\nimport { CommentNode } from \"./plugins/CommentPlugin/nodes/CommentNode/CommentNode\";\nimport { ImperativeAPIPlugin, type PromptEditorRef } from \"./plugins/ImperativeAPIPlugin\";\nimport { KeyboardShortcutPlugin } from \"./plugins/KeyboardShortcutPlugin\";\nimport { ReferenceMenuPlugin } from \"./plugins/ReferenceMenuPlugin/ReferenceMenuPlugin\";\nimport { ReferenceNode } from \"./plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode\";\nimport { ReferencePlugin } from \"./plugins/ReferencePlugin/ReferencePlugin\";\nimport theme from \"./theme/prompt-input-theme\";\nimport { $getTextContent, getTextFromSerializedEditorState } from \"./utils\";\n\nexport type ReferenceItem = {\n resourceId: string;\n resourceType: \"table\" | \"connector\";\n name: string;\n description?: string;\n};\n\nexport interface PromptEditorProps {\n defaultState: string;\n debug?: boolean;\n isEditable?: boolean;\n placeholder?: ReactElement | ((isEditable: boolean) => ReactElement | null);\n onChange?: (text: string, state: object) => void;\n onError?: (error: Error) => void;\n onSubmit?: () => void;\n /** Dynamic list of references (tables, connectors) shown when typing # */\n references?: ReferenceItem[];\n /** Optional app callback when a reference is inserted */\n onAddReference?: (resourceId: string, resourceType: \"table\" | \"connector\") => void;\n}\n\nconst nodes = [CommentNode, MarkNode, ReferenceNode];\n\nexport const BasePromptEditor: ForwardRefRenderFunction<PromptEditorRef, PromptEditorProps> = (props, ref) => {\n const { defaultState, debug = false, isEditable = true, placeholder } = props;\n const { onChange, onError = () => {}, onSubmit, references = [], onAddReference } = props;\n\n const initialConfig = {\n namespace: \"PROMPT_EDITOR\",\n nodes,\n editorState: defaultState,\n editable: isEditable,\n onError,\n theme,\n };\n\n const previousTextRef = useRef<string>(getTextFromSerializedEditorState(defaultState));\n const placeholderNode: ReactElement | ((isEditable: boolean) => ReactElement | null) = placeholder ?? (\n <Text textStyle=\"label/M/regular\" color=\"fg.subtle\" pointerEvents=\"none\" position=\"absolute\" top=\"0\">\n Type your query here or press <Kbd color=\"fg.subtle\">#</Kbd> to add a reference.\n </Text>\n );\n\n return (\n <Flex direction=\"column\" justifyContent=\"space-between\" width=\"100%\" position=\"relative\">\n <LexicalComposer initialConfig={initialConfig}>\n <HistoryPlugin />\n <RichTextPlugin\n contentEditable={<ContentEditable fullWidth />}\n placeholder={placeholderNode}\n ErrorBoundary={LexicalErrorBoundary}\n />\n <OnChangePlugin\n ignoreSelectionChange\n ignoreHistoryMergeTagChange={false}\n onChange={(editorState) => {\n editorState.read(() => {\n // handle comment blocks properly\n const root = $getRoot();\n const rawText = $getTextContent(root);\n\n if (rawText !== previousTextRef.current) {\n previousTextRef.current = rawText;\n onChange?.(rawText, editorState.toJSON());\n }\n });\n }}\n />\n <ImperativeAPIPlugin editorRef={ref} previousTextRef={previousTextRef} />\n <ToggleEditablePlugin isEditable={isEditable} />\n <CommentPlugin />\n <KeyboardShortcutPlugin onSubmit={onSubmit} />\n <ReferenceMenuPlugin items={references} />\n <ReferencePlugin onAddReference={onAddReference} />\n {debug ? <TreeViewPlugin /> : \"\"}\n </LexicalComposer>\n </Flex>\n );\n};\n\nexport const PromptEditor = forwardRef(BasePromptEditor);\n\nexport type { PromptEditorRef } from \"./plugins/ImperativeAPIPlugin\";\n","import { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { useEffect } from \"react\";\n\ntype StateUpdatePluginProps = {\n value: string;\n onUpdate: (value: string) => void;\n};\n\nexport default function StateUpdatePlugin({ value, onUpdate }: StateUpdatePluginProps) {\n const [editor] = useLexicalComposerContext();\n\n useEffect(() => {\n if (!editor) {\n return;\n }\n\n editor.update(() => onUpdate(value), { tag: \"history-merge\" });\n }, [value, editor, onUpdate]);\n\n return null;\n}\n","import { Box } from \"@chakra-ui/react\";\nimport {\n DecoratorNode,\n type EditorConfig,\n type LexicalEditor,\n type LexicalNode,\n type NodeKey,\n type SerializedLexicalNode,\n type Spread,\n} from \"lexical\";\nimport type { ReactElement } from \"react\";\nimport { ResourceBadge } from \"../../../../resource-badge\";\n\nexport type SerializedReferenceLinkNode = Spread<\n {\n href: string;\n label?: string;\n },\n SerializedLexicalNode\n>;\n\nexport class ReferenceLinkNode extends DecoratorNode<ReactElement> {\n __href: string;\n __label?: string;\n\n static getType(): string {\n return \"reference-link\";\n }\n\n static clone(node: ReferenceLinkNode): ReferenceLinkNode {\n return new ReferenceLinkNode(node.__href, node.__label, node.__key);\n }\n\n constructor(href: string, label?: string, key?: NodeKey) {\n super(key);\n this.__href = href;\n this.__label = label;\n }\n\n createDOM(_config: EditorConfig, _editor: LexicalEditor): HTMLElement {\n return document.createElement(\"span\");\n }\n\n updateDOM(_prevNode: ReferenceLinkNode, _dom: HTMLElement, _config: EditorConfig): boolean {\n return false;\n }\n\n getTextContent(): string {\n const label = this.__label ?? this.__href;\n return `{{link('${label}')}}`;\n }\n\n exportJSON(): SerializedReferenceLinkNode {\n return {\n type: ReferenceLinkNode.getType(),\n version: 1,\n href: this.__href,\n label: this.__label,\n };\n }\n\n static importJSON(serializedNode: SerializedReferenceLinkNode): ReferenceLinkNode {\n return $createReferenceLinkNode(serializedNode.href, serializedNode.label);\n }\n\n decorate(_editor: LexicalEditor, _config: EditorConfig): ReactElement {\n const href = this.__href;\n const fileName = href.split(\"/\").pop();\n const label = fileName || \"unknown\";\n const isExternal = /^https?:\\/\\//i.test(href);\n const isProjectFile = /^#?\\$PROJECT\\//i.test(href);\n\n return (\n <Box width=\"fit-content\" display=\"inline-block\">\n <ResourceBadge\n fileName={label}\n onSelect={() => {\n if (isExternal) {\n window.open(href, \"_blank\", \"noopener,noreferrer\");\n } else if (isProjectFile) {\n const projectPath = href.replace(/^#?\\$PROJECT\\//i, \"\");\n const event = new CustomEvent(\"ui:open-project-file\", { detail: projectPath });\n window.dispatchEvent(event);\n } else {\n window.location.assign(href);\n }\n }}\n />\n </Box>\n );\n }\n}\n\nexport function $createReferenceLinkNode(href: string, label?: string): ReferenceLinkNode {\n return new ReferenceLinkNode(href, label);\n}\n\nexport function $isReferenceLinkNode(node: LexicalNode | null | undefined): node is ReferenceLinkNode {\n return node instanceof ReferenceLinkNode;\n}\n","import type { TextMatchTransformer } from \"@lexical/markdown\";\nimport { $createReferenceLinkNode, $isReferenceLinkNode, ReferenceLinkNode } from \"./ReferenceLinkNode\";\n\n// Matches {{link('xxx')}} or {{ link(\"xxx\") }}\nconst LINK_REGEXP = /\\{\\{\\s*link\\((['\"])([^'\"\\s]+)\\1\\)\\s*\\}\\}/;\n\nexport const REFERENCE_LINK_TRANSFORMER: TextMatchTransformer = {\n dependencies: [ReferenceLinkNode],\n export: (node) => {\n if ($isReferenceLinkNode(node)) {\n const href = (node as ReferenceLinkNode).__href;\n const label = (node as ReferenceLinkNode).__label ?? href;\n // Export back to token form so markdown roundtrips\n if (label) {\n return `{{link('${label}')}}`;\n }\n return `{{link('${href}')}}`;\n }\n return null;\n },\n regExp: LINK_REGEXP,\n importRegExp: LINK_REGEXP,\n replace: (textNode, match) => {\n const value = match[2];\n // For now we assume value is both label and href; if it looks like a URL, use as href.\n const looksLikeUrl = /^(https?:\\/\\/|\\/)/i.test(value);\n const href = looksLikeUrl ? value : `#${value}`;\n const label = value;\n textNode.replace($createReferenceLinkNode(href, label));\n },\n type: \"text-match\",\n};\n","import \"../theme/rich-text-theme.css\";\n\nimport { Flex } from \"@chakra-ui/react\";\nimport { CodeNode } from \"@lexical/code\";\nimport { LinkNode } from \"@lexical/link\";\nimport { ListItemNode, ListNode } from \"@lexical/list\";\nimport { $convertFromMarkdownString, $convertToMarkdownString, TRANSFORMERS } from \"@lexical/markdown\";\nimport { LexicalComposer } from \"@lexical/react/LexicalComposer\";\nimport { LexicalErrorBoundary } from \"@lexical/react/LexicalErrorBoundary\";\nimport { HorizontalRulePlugin } from \"@lexical/react/LexicalHorizontalRulePlugin\";\nimport { LinkPlugin } from \"@lexical/react/LexicalLinkPlugin\";\nimport { ListPlugin } from \"@lexical/react/LexicalListPlugin\";\nimport { OnChangePlugin } from \"@lexical/react/LexicalOnChangePlugin\";\nimport { RichTextPlugin } from \"@lexical/react/LexicalRichTextPlugin\";\nimport { HeadingNode, QuoteNode } from \"@lexical/rich-text\";\nimport { $getRoot } from \"lexical\";\nimport { ContentEditable } from \"../shared/components/content-editable\";\nimport { DataTableNode } from \"../shared/nodes/DataTableNode\";\nimport { ImportCodeBlocksPlugin } from \"../shared/plugins/CodePlugin/CodeBlockPlugin\";\nimport { CodeBlockNode } from \"../shared/plugins/CodePlugin/CodeNode\";\nimport { EquationNode } from \"../shared/plugins/EquationPlugin/EquationNode\";\nimport { EQUATION_INLINE, EQUATION_MULTILINE, EquationPlugin } from \"../shared/plugins/EquationPlugin/EquationPlugin\";\nimport { HRNode } from \"../shared/plugins/HorizontalRulePlugin/HorizontalRuleNode\";\nimport StateUpdatePlugin from \"../shared/plugins/StateUpdatePlugin\";\nimport ToggleEditablePlugin from \"../shared/plugins/ToggleEditablePlugin\";\nimport { TreeViewPlugin } from \"../shared/plugins/TreeViewPlugin/TreeViewPlugin\";\nimport { TRANSFORMERS_EXTENDED } from \"../shared/transformers/markdown-transformers\";\nimport theme from \"../theme/rich-text-theme\";\nimport { splitFrontmatter } from \"../utils/markdown\";\nimport { REFERENCE_LINK_TRANSFORMER, ReferenceLinkNode } from \"./plugins/ReferenceLinkPlugin\";\n\nexport interface RichMessageProps {\n debug?: boolean;\n defaultState: string;\n isEditable?: boolean;\n onChange?: (value: string) => void;\n}\n\nconst transformers = [\n ...TRANSFORMERS,\n ...TRANSFORMERS_EXTENDED,\n EQUATION_INLINE,\n EQUATION_MULTILINE,\n REFERENCE_LINK_TRANSFORMER,\n];\n\nexport function RichMessage(props: RichMessageProps) {\n const { debug = false, defaultState = \"\", isEditable = false, onChange } = props;\n const { frontmatter, body } = splitFrontmatter(defaultState);\n const shouldTrackChanges = isEditable && Boolean(onChange);\n\n const initialConfig = {\n namespace: \"RICH_MESSAGE\",\n nodes: [\n QuoteNode,\n LinkNode,\n DataTableNode,\n HeadingNode,\n ListNode,\n ListItemNode,\n CodeNode,\n CodeBlockNode,\n EquationNode,\n HRNode,\n ReferenceLinkNode,\n ],\n editorState: () => {\n return $convertFromMarkdownString(body, transformers, undefined, false);\n },\n onError: (error: Error) => console.error(error),\n editable: isEditable,\n theme,\n };\n\n return (\n <Flex\n className=\"rich-text\"\n data-rich-message=\"true\"\n justifyContent=\"space-between\"\n width=\"100%\"\n maxWidth=\"100%\"\n height=\"100%\"\n position=\"relative\"\n direction=\"column\"\n overflow=\"hidden\"\n >\n <LexicalComposer initialConfig={initialConfig}>\n <StateUpdatePlugin\n value={body}\n onUpdate={(value: string) => {\n $convertFromMarkdownString(value, transformers, undefined, false);\n }}\n />\n <LinkPlugin />\n <ListPlugin />\n <HorizontalRulePlugin />\n <ImportCodeBlocksPlugin />\n <EquationPlugin />\n <RichTextPlugin contentEditable={<ContentEditable fullWidth={false} />} ErrorBoundary={LexicalErrorBoundary} />\n {shouldTrackChanges ? (\n <OnChangePlugin\n ignoreSelectionChange\n ignoreHistoryMergeTagChange={false}\n onChange={(editorState) => {\n editorState.read(() => {\n const root = $getRoot();\n const markdownBody = $convertToMarkdownString(transformers, root);\n onChange?.(frontmatter + markdownBody);\n });\n }}\n />\n ) : null}\n <ToggleEditablePlugin isEditable={isEditable} />\n {debug && <TreeViewPlugin />}\n </LexicalComposer>\n </Flex>\n );\n}\n"],"names":["StyledEditable","chakra","LexicalContentEditable","ContentEditable","t0","$","_c","onRef","fullWidth","t1","padding","undefined","t2","t3","t4","jsx","t5","Flex","getFileTypeIcon","filename","extension","split","pop","toLowerCase","includes","FileSpreadsheet","FileCode","FileChartLine","FileJson","FileText","FileCog","FileImage","FileArchive","File","SIZE_STYLES","sm","container","height","lineHeight","base","px","iconSize","textStyle","md","TONE_STYLES","neutral","color","bg","_hover","accent","DEFAULT_SIZE","DEFAULT_TONE","ResourceBadge","props","fileName","icon","onRemove","onSelect","rest","size","tone","IconComp","sizeStyles","toneStyles","e","stopPropagation","t6","t7","Symbol","for","t8","Text","t9","Tooltip","t10","Spacer","t11","IconButton","e_0","X","t12","jsxs","ReferenceLinkNode","DecoratorNode","__href","__label","getType","clone","node","__key","constructor","href","label","key","createDOM","_config","_editor","document","createElement","updateDOM","_prevNode","_dom","getTextContent","exportJSON","type","version","importJSON","serializedNode","$createReferenceLinkNode","decorate","isExternal","test","isProjectFile","Box","window","open","projectPath","replace","event","CustomEvent","detail","dispatchEvent","location","assign","$isReferenceLinkNode","LINK_REGEXP","REFERENCE_LINK_TRANSFORMER","dependencies","export","regExp","importRegExp","textNode","match","value","theme","code","codeHighlight","atrule","attr","boolean","builtin","cdata","char","class","comment","constant","deleted","doctype","entity","function","important","inserted","keyword","namespace","number","operator","prolog","property","punctuation","regex","selector","string","symbol","tag","url","variable","embedBlock","focus","list","checklist","listitem","listitemChecked","listitemUnchecked","nested","olDepth","ol","ul","heading","h1","h2","h3","paragraph","text","underline","italic","link","quote","reference","table","tableCell","tableRow","tableCellHeader","layoutContainer","layoutItem","draggableBlockDemo","row","content","formatValue","length","String","toUpperCase","Date","toISOString","JSON","stringify","DefaultRichTextCodeEditor","defaultCode","isEditable","showLineNumbers","disableScroll","Textarea","lines","map","_temp","DefaultRichTextDataTable","data","noBorder","hiddenColumns","Set","hiddenSet","Object","keys","filter","has","columns","Table","_temp2","rowIndex","column_0","column","join","line","index","DataTableNode","__data","getData","json","headers","headerRow","separator","dataRows","header","$createDataTableNode","$isDataTableNode","CodeBlockNode","__language","__code","language","EquationComponent","React","lazy","$convertEquationElement","domNode","equation","getAttribute","inline","atob","$createEquationNode","EquationNode","__equation","__inline","getEquation","element","className","exportDOM","btoa","setAttribute","katex","render","displayMode","errorColor","output","strict","throwOnError","trust","importDOM","div","hasAttribute","conversion","priority","span","prevNode","setEquation","writable","getWritable","isInline","Suspense","equationNode","$applyNodeReplacement","$isEquationNode","EQUATION_INLINE","trim","EQUATION_MULTILINE","regExpStart","regExpEnd","rootNode","_children","_startMatch","_endMatch","linesInBetween","append","EquationPlugin","HRNode","ElementNode","_serializedNode","$createHRNode","style","$isHRNode","HR","parentNode","TABLE","_traverseChildren","_isImport","previousNode","getPreviousSibling","remove","cells","slice","cell","existingData","newRow","isPlaceholderRow","values","every","_","forEach","newTableData","newTableNode","tableNode","UNDERLINE_INS_TAG","TextNode","markdownText","hasFormat","$createTextNode","toggleFormat","UNDERLINE_U_TAG","_node","TRANSFORMERS_EXTENDED","editorNodes","QuoteNode","LinkNode","HeadingNode","ListNode","ListItemNode","CodeNode","editorTransformers","TRANSFORMERS","editorTheme","ImportCodeBlocksPlugin","editor","useLexicalComposerContext","update","useEffect","codeNodes","$nodesOfType","n","lang","getLanguage","ToggleEditablePlugin","setEditable","TreeViewPlugin","TreeView","FRONTMATTER_PATTERN","splitFrontmatter","frontmatter","body","UPLOAD_FILE","OPEN_CONTEXT","RUN_PROMPT","UPDATE_FORMAT","UPDATE_BEHAVIOR","INSERT_PROMPT","RENAME_PROMPT","DUPLICATE_PROMPT","DELETE_PROMPT","DELETE_REFERENCES","RENAME_REFERENCES","INSERT_REFERENCE","INSERT_BLOCK","createCommand","INSERT_REFERENCE_COMMAND","INSERT_BLOCK_COMMAND","INSERT_NEW_FILE_PLACEHOLDER","INSERT_NEW_TEXT_PLACEHOLDER","INSERT_PLACEHOLDER_REFERENCE","convertCommentElement","$createCommentNode","setFormat","textAlign","CommentNode","config","addClassNamesToElement","blockquote","isHTMLElement","isEmpty","formatType","getFormatType","direction","getDirection","dir","format","setIndent","indent","setDirection","insertNewAfter","restoreSelection","newBlock","$createParagraphNode","insertAfter","collapseAtStart","children","getChildren","child","insertCommentBlock","_blockType","nodeToReplace","selection","$getSelection","commentNode","nodeParent","getParent","selectEnd","$isRangeSelection","$setBlocksType","useCommentCommands","mergeRegister","registerCommand","COMMAND_PRIORITY_LOW","optionId","useCommentSchema","registerNodeTransform","invalidChildren","child_0","CommentPlugin","$getTextContent","root","textContent","childrenLength","i","$isElementNode","getReferenceMarker","name","referenceId","shouldAppendParagraphBreak","Boolean","traverseSerializedNode","referenceMarker","Array","isArray","getTextFromSerializedEditorState","state","parsed","parse","emptyEditorState","textFormat","generateEditorStateFromString","input","mode","ImperativeAPIPlugin","editorRef","previousTextRef","setEditorValue","parseEditorState","setEditorState","current","defaultSelection","useImperativeHandle","shouldSubmitOnEnter","ctrlKey","metaKey","shiftKey","altKey","KeyboardShortcutPlugin","onSubmit","KEY_DOWN_COMMAND","preventDefault","COMMAND_PRIORITY_HIGH","menuSortOrder","getSortedMenuOptions","options","sort","a","b","indexOf","group","option","reduce","acc","bucket","push","ReferenceMenuItem","id","isSelected","onClick","onMouseEnter","setRefElement","secondaryLabel","primaryLabel","tabIndex","ReferenceMenu","selectedIndex","onSelectItem","onMouseEnterItem","connector","hasResults","getElementById","scrollIntoView","behavior","block","T0","Fragment","description","option_0","t13","localFilter","q","m","useContextLookup","queryString","items","results","setResults","useState","baseOptions","res","resourceId","resourceType","VALID_PUNCTUATION","TRIGGERS","VALID_CHARS","VALID_JOINS","LENGTH_LIMIT","TriggerRegex","RegExp","AliasRegex","checkForTriggers","minMatchLength","exec","maybeLeadingWhitespace","matchingString","leadOffset","replaceableString","SUGGESTION_LIST_LENGTH_LIMIT","ReferenceMenuPlugin","setQueryString","searchResults","selectedOption","closeMenu","dispatchCommand","onSelectOption","checkForTrigger","menuOptions","LexicalTypeaheadMenuPlugin","anchorElementRef","selectOptionAndCleanUp","setHighlightedIndex","ReactDOM","createPortal","i_0","ReferenceNode","__referenceId","__name","isKeyboardSelectable","canBeEmpty","canInsertTextAfter","canInsertTextBefore","dom","el","$createReferenceNode","$insertExistingReference","refNode","ReferencePlugin","onAddReference","promptInputTheme","baseTheme","nodes","MarkNode","BasePromptEditor","ref","defaultState","debug","placeholder","onChange","onError","references","editorState","editable","initialConfig","useRef","Kbd","placeholderNode","HistoryPlugin","RichTextPlugin","LexicalErrorBoundary","OnChangePlugin","read","$getRoot","rawText","toJSON","t14","t15","t16","t17","t18","t19","LexicalComposer","PromptEditor","forwardRef","StateUpdatePlugin","onUpdate","transformers","RichMessage","shouldTrackChanges","$convertFromMarkdownString","LinkPlugin","ListPlugin","HorizontalRulePlugin","markdownBody","$convertToMarkdownString","error","console"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,MAAMA,KAAiBC,GAAOC,EAAsB;AAQ7C,SAAAC,GAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,CAAA,GAAyB;AAAA,IAAAC,OAAAA;AAAAA,IAAAC,WAAAC;AAAAA,IAAAC,SAAAA;AAAAA,EAAAA,IAAAN,GAASI,IAAAC,MAAAE,SAAA,KAAAF,GAG8BG,IAAAJ,IAAA,eAAA,UAKnDK,IAAAL,IAAA,SAAA;AAA4B,MAAAM;AAAA,EAAAT,SAAAQ,KAJxCC,IAAA,gBAAAC,EAACf,IAAA,EACQ,QAAA,eACF,MAAA,QACC,OAAA,QACI,UAAAa,GACA,WAAA,uBACD,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