@blade-hq/agent-react 2612.0.0-beta.4 → 2612.0.0-beta.41
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/README.md +22 -0
- package/dist/chat/AgentLoopBlock.d.ts +0 -2
- package/dist/chat/AssistantTurnBlock.d.ts +1 -9
- package/dist/chat/AttachmentPreviewDialog.d.ts +0 -1
- package/dist/chat/ChatLoadingIndicator.d.ts +7 -0
- package/dist/chat/ChatPanel.d.ts +1 -3
- package/dist/chat/ContextAttachmentPills.d.ts +4 -0
- package/dist/chat/CurrentPlanPanel.d.ts +0 -3
- package/dist/chat/FileDeliveryCards.d.ts +0 -4
- package/dist/chat/FinalArtifactCards.d.ts +0 -1
- package/dist/chat/LightComposer.d.ts +1 -1
- package/dist/chat/LiteMessageList.d.ts +1 -3
- package/dist/chat/MessageFileAttachmentList.d.ts +0 -5
- package/dist/chat/SessionReplayBar.d.ts +0 -1
- package/dist/chat/TextAttachmentPills.d.ts +0 -3
- package/dist/chat/TurnNavRail.d.ts +0 -3
- package/dist/chat/WorkflowRunBlock.d.ts +21 -4
- package/dist/chat/ai-elements/reasoning.d.ts +4 -4
- package/dist/chat/ai-elements/shimmer.d.ts +0 -4
- package/dist/chat/customization.d.ts +1 -5
- package/dist/chat/index.d.ts +1 -4
- package/dist/chat/lib/citations.d.ts +5 -22
- package/dist/chat/markdown/ExternalAnchor.d.ts +2 -2
- package/dist/chat/markdown/MarkdownContent.d.ts +3 -0
- package/dist/chat/message-list-blocks.d.ts +0 -1
- package/dist/chat/runtime/actions.d.ts +4 -3
- package/dist/chat/runtime/background-task-dismissals.d.ts +0 -1
- package/dist/chat/runtime/composer-channels.d.ts +4 -3
- package/dist/chat/runtime/input-cache-reset.d.ts +1 -6
- package/dist/chat/runtime/input-history-storage.d.ts +2 -0
- package/dist/chat/runtime/input-services.d.ts +0 -6
- package/dist/chat/runtime/session-source.d.ts +0 -5
- package/dist/chat/runtime/use-chat-actions.d.ts +0 -4
- package/dist/{chat-OCLOVB3H.css → chat-IHPRU35X.css} +5 -18
- package/dist/chat.css +5 -18
- package/dist/{chunk-FQQJP2GJ.js → chunk-42P352DI.js} +1134 -740
- package/dist/chunk-42P352DI.js.map +1 -0
- package/dist/{chunk-5J54S5BK.js → chunk-F7BR2KMK.js} +3869 -2816
- package/dist/chunk-F7BR2KMK.js.map +1 -0
- package/dist/chunk-S3AC4DZF.js +577 -0
- package/dist/chunk-S3AC4DZF.js.map +1 -0
- package/dist/components/AccountConnectors.d.ts +13 -0
- package/dist/components/BrowserConnectionDialog.d.ts +7 -0
- package/dist/components/ChatInput.d.ts +4 -16
- package/dist/components/LlmAdvancedSettings.d.ts +0 -1
- package/dist/components/PlanUpdateBlock.d.ts +0 -1
- package/dist/components/SessionPluginConfigForm.d.ts +3 -1
- package/dist/components/TopicAssetSubmitDialog.d.ts +14 -0
- package/dist/components/plugin-connector.d.ts +2 -0
- package/dist/embed/blade-chat-element.d.ts +0 -8
- package/dist/embed/entry.d.ts +8 -19
- package/dist/hooks/use-message-pin.d.ts +1 -1
- package/dist/host.d.ts +0 -4
- package/dist/index.d.ts +2 -0
- package/dist/index.js +8 -4
- package/dist/internal.d.ts +6 -2
- package/dist/internal.js +18 -51
- package/dist/internal.js.map +1 -1
- package/dist/lib/message-shortcuts.d.ts +5 -0
- package/dist/rich-input/ChatInput.d.ts +1 -1
- package/dist/rich-input/ConnectButton.d.ts +0 -2
- package/dist/rich-input/FileCompletionMenu.d.ts +7 -11
- package/dist/rich-input/SkillStatusBar.d.ts +1 -9
- package/dist/rich-input/extensions/plugin-mention.d.ts +15 -0
- package/dist/rich-input/extensions/skill-mention.d.ts +3 -21
- package/dist/rich-input/extensions/topic-asset-mention.d.ts +13 -0
- package/dist/rich-input/index.d.ts +6 -3
- package/dist/rich-input/lib/composer-content.d.ts +15 -21
- package/dist/rich-input/lib/input-history-document.d.ts +3 -0
- package/dist/rich-input/lib/plugin-suggestions.d.ts +7 -0
- package/dist/rich-input/lib/reference-candidates.d.ts +26 -0
- package/dist/rich-input/lib/skill-suggestions.d.ts +1 -1
- package/dist/rich-input/lib/topic-asset-suggestions.d.ts +6 -0
- package/dist/rich-input/lib/user-home.d.ts +0 -17
- package/dist/rich-input/services.d.ts +2 -3
- package/dist/rich-input/use-input-history.d.ts +8 -8
- package/dist/rich-input/use-reference-candidates.d.ts +8 -0
- package/dist/rich-input/voice/VoiceWaveform.d.ts +0 -3
- package/dist/rich-input.js +6409 -6679
- package/dist/rich-input.js.map +1 -1
- package/dist/style.css +16 -55
- package/dist/style.full.css +23 -77
- package/node_modules/@floating-ui/core/LICENSE +20 -0
- package/node_modules/@floating-ui/core/README.md +4 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +1184 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +531 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +531 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +1058 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +1058 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +1203 -0
- package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -0
- package/node_modules/@floating-ui/core/package.json +63 -0
- package/node_modules/@floating-ui/dom/LICENSE +20 -0
- package/node_modules/@floating-ui/dom/README.md +4 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +956 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +358 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +358 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +781 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +781 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +975 -0
- package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -0
- package/node_modules/@floating-ui/dom/package.json +71 -0
- package/node_modules/@floating-ui/utils/LICENSE +20 -0
- package/node_modules/@floating-ui/utils/README.md +4 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +103 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +103 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +47 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +165 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +165 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +192 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.esm.js +136 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs +136 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.js +167 -0
- package/node_modules/@floating-ui/utils/dist/floating-ui.utils.umd.min.js +1 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +165 -0
- package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +192 -0
- package/node_modules/@floating-ui/utils/dom/package.json +6 -0
- package/node_modules/@floating-ui/utils/package.json +70 -0
- package/node_modules/@radix-ui/primitive/LICENSE +21 -0
- package/node_modules/@radix-ui/primitive/README.md +3 -0
- package/node_modules/@radix-ui/primitive/dist/index.d.mts +20 -0
- package/node_modules/@radix-ui/primitive/dist/index.d.ts +20 -0
- package/node_modules/@radix-ui/primitive/dist/index.js +76 -0
- package/node_modules/@radix-ui/primitive/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/primitive/dist/index.mjs +53 -0
- package/node_modules/@radix-ui/primitive/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/primitive/package.json +47 -0
- package/node_modules/@radix-ui/react-collapsible/LICENSE +21 -0
- package/node_modules/@radix-ui/react-collapsible/README.md +3 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +33 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +33 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.js +187 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +155 -0
- package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-collapsible/package.json +75 -0
- package/node_modules/@radix-ui/react-compose-refs/README.md +13 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +15 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +15 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.js +74 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +41 -0
- package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-compose-refs/package.json +75 -0
- package/node_modules/@radix-ui/react-context/README.md +13 -0
- package/node_modules/@radix-ui/react-context/dist/index.d.mts +21 -0
- package/node_modules/@radix-ui/react-context/dist/index.d.ts +21 -0
- package/node_modules/@radix-ui/react-context/dist/index.js +114 -0
- package/node_modules/@radix-ui/react-context/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-context/dist/index.mjs +81 -0
- package/node_modules/@radix-ui/react-context/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-context/package.json +75 -0
- package/node_modules/@radix-ui/react-id/README.md +13 -0
- package/node_modules/@radix-ui/react-id/dist/index.d.mts +3 -0
- package/node_modules/@radix-ui/react-id/dist/index.d.ts +3 -0
- package/node_modules/@radix-ui/react-id/dist/index.js +49 -0
- package/node_modules/@radix-ui/react-id/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-id/dist/index.mjs +16 -0
- package/node_modules/@radix-ui/react-id/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-id/package.json +78 -0
- package/node_modules/@radix-ui/react-presence/LICENSE +21 -0
- package/node_modules/@radix-ui/react-presence/README.md +3 -0
- package/node_modules/@radix-ui/react-presence/dist/index.d.mts +12 -0
- package/node_modules/@radix-ui/react-presence/dist/index.d.ts +12 -0
- package/node_modules/@radix-ui/react-presence/dist/index.js +171 -0
- package/node_modules/@radix-ui/react-presence/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-presence/dist/index.mjs +139 -0
- package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-presence/package.json +69 -0
- package/node_modules/@radix-ui/react-primitive/LICENSE +21 -0
- package/node_modules/@radix-ui/react-primitive/README.md +3 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +52 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +52 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.js +80 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.mjs +47 -0
- package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-primitive/package.json +68 -0
- package/node_modules/@radix-ui/react-slot/LICENSE +21 -0
- package/node_modules/@radix-ui/react-slot/README.md +3 -0
- package/node_modules/@radix-ui/react-slot/dist/index.d.mts +17 -0
- package/node_modules/@radix-ui/react-slot/dist/index.d.ts +17 -0
- package/node_modules/@radix-ui/react-slot/dist/index.js +138 -0
- package/node_modules/@radix-ui/react-slot/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-slot/dist/index.mjs +105 -0
- package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-slot/package.json +63 -0
- package/node_modules/@radix-ui/react-use-controllable-state/LICENSE +21 -0
- package/node_modules/@radix-ui/react-use-controllable-state/README.md +3 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +40 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +40 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +169 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +136 -0
- package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-use-controllable-state/package.json +64 -0
- package/node_modules/@radix-ui/react-use-effect-event/LICENSE +21 -0
- package/node_modules/@radix-ui/react-use-effect-event/README.md +5 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.mts +8 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.d.ts +8 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.js +60 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs +27 -0
- package/node_modules/@radix-ui/react-use-effect-event/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-use-effect-event/package.json +65 -0
- package/node_modules/@radix-ui/react-use-effect-event/src/index.ts +1 -0
- package/node_modules/@radix-ui/react-use-effect-event/src/use-effect-event.tsx +36 -0
- package/node_modules/@radix-ui/react-use-layout-effect/README.md +13 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +12 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +12 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +41 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +7 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +8 -0
- package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +7 -0
- package/node_modules/@radix-ui/react-use-layout-effect/package.json +75 -0
- package/node_modules/@remirror/core-constants/LICENSE +21 -0
- package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.cts +612 -0
- package/node_modules/@remirror/core-constants/dist/_tsup-dts-rollup.d.ts +612 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.cjs +314 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.cts +20 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.d.ts +20 -0
- package/node_modules/@remirror/core-constants/dist/remirror-core-constants.js +269 -0
- package/node_modules/@remirror/core-constants/dist-types/core-constants.d.ts +431 -0
- package/node_modules/@remirror/core-constants/dist-types/error-constants.d.ts +119 -0
- package/node_modules/@remirror/core-constants/dist-types/index.d.ts +2 -0
- package/node_modules/@remirror/core-constants/dist-types/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@remirror/core-constants/package.json +45 -0
- package/node_modules/@remirror/core-constants/readme.md +17 -0
- package/node_modules/@tiptap/core/LICENSE.md +21 -0
- package/node_modules/@tiptap/core/README.md +18 -0
- package/node_modules/@tiptap/core/dist/index.cjs +7126 -0
- package/node_modules/@tiptap/core/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/core/dist/index.d.cts +4954 -0
- package/node_modules/@tiptap/core/dist/index.d.ts +4954 -0
- package/node_modules/@tiptap/core/dist/index.js +6992 -0
- package/node_modules/@tiptap/core/dist/index.js.map +1 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs +56 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.cjs.map +1 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.cts +23 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.d.ts +23 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +26 -0
- package/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.cjs +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.cts +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.d.ts +1 -0
- package/node_modules/@tiptap/core/jsx-dev-runtime/index.js +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.cjs +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.d.cts +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.d.ts +1 -0
- package/node_modules/@tiptap/core/jsx-runtime/index.js +1 -0
- package/node_modules/@tiptap/core/package.json +70 -0
- package/node_modules/@tiptap/core/src/CommandManager.ts +138 -0
- package/node_modules/@tiptap/core/src/Editor.ts +806 -0
- package/node_modules/@tiptap/core/src/EventEmitter.ts +58 -0
- package/node_modules/@tiptap/core/src/Extendable.ts +602 -0
- package/node_modules/@tiptap/core/src/Extension.ts +55 -0
- package/node_modules/@tiptap/core/src/ExtensionManager.ts +440 -0
- package/node_modules/@tiptap/core/src/InputRule.ts +290 -0
- package/node_modules/@tiptap/core/src/Mark.ts +211 -0
- package/node_modules/@tiptap/core/src/MarkView.ts +122 -0
- package/node_modules/@tiptap/core/src/Node.ts +377 -0
- package/node_modules/@tiptap/core/src/NodePos.ts +257 -0
- package/node_modules/@tiptap/core/src/NodeView.ts +339 -0
- package/node_modules/@tiptap/core/src/PasteRule.ts +373 -0
- package/node_modules/@tiptap/core/src/Tracker.ts +36 -0
- package/node_modules/@tiptap/core/src/__tests__/transformPastedHTML.test.ts +575 -0
- package/node_modules/@tiptap/core/src/commands/blur.ts +29 -0
- package/node_modules/@tiptap/core/src/commands/clearContent.ts +25 -0
- package/node_modules/@tiptap/core/src/commands/clearNodes.ts +57 -0
- package/node_modules/@tiptap/core/src/commands/command.ts +22 -0
- package/node_modules/@tiptap/core/src/commands/createParagraphNear.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/cut.ts +36 -0
- package/node_modules/@tiptap/core/src/commands/deleteCurrentNode.ts +44 -0
- package/node_modules/@tiptap/core/src/commands/deleteNode.ts +41 -0
- package/node_modules/@tiptap/core/src/commands/deleteRange.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/deleteSelection.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/enter.ts +19 -0
- package/node_modules/@tiptap/core/src/commands/exitCode.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/extendMarkRange.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/first.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/focus.ts +108 -0
- package/node_modules/@tiptap/core/src/commands/forEach.ts +24 -0
- package/node_modules/@tiptap/core/src/commands/index.ts +57 -0
- package/node_modules/@tiptap/core/src/commands/insertContent.ts +46 -0
- package/node_modules/@tiptap/core/src/commands/insertContentAt.ts +212 -0
- package/node_modules/@tiptap/core/src/commands/join.ts +69 -0
- package/node_modules/@tiptap/core/src/commands/joinItemBackward.ts +37 -0
- package/node_modules/@tiptap/core/src/commands/joinItemForward.ts +37 -0
- package/node_modules/@tiptap/core/src/commands/joinTextblockBackward.ts +20 -0
- package/node_modules/@tiptap/core/src/commands/joinTextblockForward.ts +20 -0
- package/node_modules/@tiptap/core/src/commands/keyboardShortcut.ts +100 -0
- package/node_modules/@tiptap/core/src/commands/lift.ts +34 -0
- package/node_modules/@tiptap/core/src/commands/liftEmptyBlock.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/liftListItem.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/newlineInCode.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/resetAttributes.ts +73 -0
- package/node_modules/@tiptap/core/src/commands/scrollIntoView.ts +23 -0
- package/node_modules/@tiptap/core/src/commands/selectAll.ts +27 -0
- package/node_modules/@tiptap/core/src/commands/selectNodeBackward.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/selectNodeForward.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/selectParentNode.ts +21 -0
- package/node_modules/@tiptap/core/src/commands/selectTextblockEnd.ts +23 -0
- package/node_modules/@tiptap/core/src/commands/selectTextblockStart.ts +23 -0
- package/node_modules/@tiptap/core/src/commands/setContent.ts +76 -0
- package/node_modules/@tiptap/core/src/commands/setMark.ts +118 -0
- package/node_modules/@tiptap/core/src/commands/setMeta.ts +25 -0
- package/node_modules/@tiptap/core/src/commands/setNode.ts +57 -0
- package/node_modules/@tiptap/core/src/commands/setNodeSelection.ts +31 -0
- package/node_modules/@tiptap/core/src/commands/setTextDirection.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/setTextSelection.ts +35 -0
- package/node_modules/@tiptap/core/src/commands/sinkListItem.ts +26 -0
- package/node_modules/@tiptap/core/src/commands/splitBlock.ts +115 -0
- package/node_modules/@tiptap/core/src/commands/splitListItem.ts +149 -0
- package/node_modules/@tiptap/core/src/commands/toggleList.ts +159 -0
- package/node_modules/@tiptap/core/src/commands/toggleMark.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/toggleNode.ts +47 -0
- package/node_modules/@tiptap/core/src/commands/toggleWrap.ts +32 -0
- package/node_modules/@tiptap/core/src/commands/undoInputRule.ts +49 -0
- package/node_modules/@tiptap/core/src/commands/unsetAllMarks.ts +32 -0
- package/node_modules/@tiptap/core/src/commands/unsetMark.ts +65 -0
- package/node_modules/@tiptap/core/src/commands/unsetTextDirection.ts +51 -0
- package/node_modules/@tiptap/core/src/commands/updateAttributes.ts +150 -0
- package/node_modules/@tiptap/core/src/commands/wrapIn.ts +27 -0
- package/node_modules/@tiptap/core/src/commands/wrapInList.ts +27 -0
- package/node_modules/@tiptap/core/src/extensions/clipboardTextSerializer.ts +44 -0
- package/node_modules/@tiptap/core/src/extensions/commands.ts +14 -0
- package/node_modules/@tiptap/core/src/extensions/delete.ts +89 -0
- package/node_modules/@tiptap/core/src/extensions/drop.ts +26 -0
- package/node_modules/@tiptap/core/src/extensions/editable.ts +18 -0
- package/node_modules/@tiptap/core/src/extensions/focusEvents.ts +41 -0
- package/node_modules/@tiptap/core/src/extensions/index.ts +10 -0
- package/node_modules/@tiptap/core/src/extensions/keymap.ts +160 -0
- package/node_modules/@tiptap/core/src/extensions/paste.ts +25 -0
- package/node_modules/@tiptap/core/src/extensions/tabindex.ts +18 -0
- package/node_modules/@tiptap/core/src/extensions/textDirection.ts +86 -0
- package/node_modules/@tiptap/core/src/helpers/MappablePosition.ts +66 -0
- package/node_modules/@tiptap/core/src/helpers/combineTransactionSteps.ts +21 -0
- package/node_modules/@tiptap/core/src/helpers/createChainableState.ts +39 -0
- package/node_modules/@tiptap/core/src/helpers/createDocument.ts +24 -0
- package/node_modules/@tiptap/core/src/helpers/createNodeFromContent.ts +119 -0
- package/node_modules/@tiptap/core/src/helpers/defaultBlockAt.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/findChildren.ts +24 -0
- package/node_modules/@tiptap/core/src/helpers/findChildrenInRange.ts +36 -0
- package/node_modules/@tiptap/core/src/helpers/findParentNode.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/findParentNodeClosestToPos.ts +37 -0
- package/node_modules/@tiptap/core/src/helpers/flattenExtensions.ts +30 -0
- package/node_modules/@tiptap/core/src/helpers/generateHTML.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/generateJSON.ts +18 -0
- package/node_modules/@tiptap/core/src/helpers/generateText.ts +34 -0
- package/node_modules/@tiptap/core/src/helpers/getAttributes.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/getAttributesFromExtensions.ts +122 -0
- package/node_modules/@tiptap/core/src/helpers/getChangedRanges.ts +85 -0
- package/node_modules/@tiptap/core/src/helpers/getDebugJSON.ts +54 -0
- package/node_modules/@tiptap/core/src/helpers/getExtensionField.ts +32 -0
- package/node_modules/@tiptap/core/src/helpers/getHTMLFromFragment.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/getMarkAttributes.ts +30 -0
- package/node_modules/@tiptap/core/src/helpers/getMarkRange.ts +90 -0
- package/node_modules/@tiptap/core/src/helpers/getMarkType.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/getMarksBetween.ts +44 -0
- package/node_modules/@tiptap/core/src/helpers/getNodeAtPosition.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/getNodeAttributes.ts +22 -0
- package/node_modules/@tiptap/core/src/helpers/getNodeType.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/getRenderedAttributes.ts +23 -0
- package/node_modules/@tiptap/core/src/helpers/getSchema.ts +12 -0
- package/node_modules/@tiptap/core/src/helpers/getSchemaByResolvedExtensions.ts +183 -0
- package/node_modules/@tiptap/core/src/helpers/getSchemaTypeByName.ts +11 -0
- package/node_modules/@tiptap/core/src/helpers/getSchemaTypeNameByName.ts +19 -0
- package/node_modules/@tiptap/core/src/helpers/getSplittedAttributes.ts +28 -0
- package/node_modules/@tiptap/core/src/helpers/getText.ts +28 -0
- package/node_modules/@tiptap/core/src/helpers/getTextBetween.ts +52 -0
- package/node_modules/@tiptap/core/src/helpers/getTextContentFromNodes.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/getTextSerializersFromSchema.ts +16 -0
- package/node_modules/@tiptap/core/src/helpers/index.ts +55 -0
- package/node_modules/@tiptap/core/src/helpers/injectExtensionAttributesToParseRule.ts +47 -0
- package/node_modules/@tiptap/core/src/helpers/isActive.ts +23 -0
- package/node_modules/@tiptap/core/src/helpers/isAtEndOfNode.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/isAtStartOfNode.ts +11 -0
- package/node_modules/@tiptap/core/src/helpers/isExtensionRulesEnabled.ts +13 -0
- package/node_modules/@tiptap/core/src/helpers/isList.ts +27 -0
- package/node_modules/@tiptap/core/src/helpers/isMarkActive.ts +94 -0
- package/node_modules/@tiptap/core/src/helpers/isNodeActive.ts +51 -0
- package/node_modules/@tiptap/core/src/helpers/isNodeEmpty.ts +62 -0
- package/node_modules/@tiptap/core/src/helpers/isNodeSelection.ts +5 -0
- package/node_modules/@tiptap/core/src/helpers/isTextSelection.ts +5 -0
- package/node_modules/@tiptap/core/src/helpers/posToDOMRect.ts +35 -0
- package/node_modules/@tiptap/core/src/helpers/resolveExtensions.ts +25 -0
- package/node_modules/@tiptap/core/src/helpers/resolveFocusPosition.ts +31 -0
- package/node_modules/@tiptap/core/src/helpers/rewriteUnknownContent.ts +149 -0
- package/node_modules/@tiptap/core/src/helpers/selectionToInsertionEnd.ts +29 -0
- package/node_modules/@tiptap/core/src/helpers/sortExtensions.ts +26 -0
- package/node_modules/@tiptap/core/src/helpers/splitExtensions.ts +16 -0
- package/node_modules/@tiptap/core/src/index.ts +28 -0
- package/node_modules/@tiptap/core/src/inputRules/index.ts +5 -0
- package/node_modules/@tiptap/core/src/inputRules/markInputRule.ts +68 -0
- package/node_modules/@tiptap/core/src/inputRules/nodeInputRule.ts +73 -0
- package/node_modules/@tiptap/core/src/inputRules/textInputRule.ts +35 -0
- package/node_modules/@tiptap/core/src/inputRules/textblockTypeInputRule.ts +35 -0
- package/node_modules/@tiptap/core/src/inputRules/wrappingInputRule.ts +82 -0
- package/node_modules/@tiptap/core/src/jsx-runtime.ts +65 -0
- package/node_modules/@tiptap/core/src/lib/ResizableNodeView.ts +1060 -0
- package/node_modules/@tiptap/core/src/lib/index.ts +1 -0
- package/node_modules/@tiptap/core/src/pasteRules/index.ts +3 -0
- package/node_modules/@tiptap/core/src/pasteRules/markPasteRule.ts +71 -0
- package/node_modules/@tiptap/core/src/pasteRules/nodePasteRule.ts +44 -0
- package/node_modules/@tiptap/core/src/pasteRules/textPasteRule.ts +34 -0
- package/node_modules/@tiptap/core/src/style.ts +71 -0
- package/node_modules/@tiptap/core/src/types.ts +1058 -0
- package/node_modules/@tiptap/core/src/utilities/callOrReturn.ts +21 -0
- package/node_modules/@tiptap/core/src/utilities/canInsertNode.ts +30 -0
- package/node_modules/@tiptap/core/src/utilities/createStyleTag.ts +21 -0
- package/node_modules/@tiptap/core/src/utilities/deleteProps.ts +16 -0
- package/node_modules/@tiptap/core/src/utilities/elementFromString.ts +27 -0
- package/node_modules/@tiptap/core/src/utilities/escapeForRegEx.ts +4 -0
- package/node_modules/@tiptap/core/src/utilities/findDuplicates.ts +8 -0
- package/node_modules/@tiptap/core/src/utilities/fromString.ts +19 -0
- package/node_modules/@tiptap/core/src/utilities/index.ts +26 -0
- package/node_modules/@tiptap/core/src/utilities/isAndroid.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isEmptyObject.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isFirefox.ts +11 -0
- package/node_modules/@tiptap/core/src/utilities/isFunction.ts +4 -0
- package/node_modules/@tiptap/core/src/utilities/isMacOS.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isNumber.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isPlainObject.ts +13 -0
- package/node_modules/@tiptap/core/src/utilities/isRegExp.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isSafari.ts +11 -0
- package/node_modules/@tiptap/core/src/utilities/isString.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/isiOS.ts +7 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/attributeUtils.ts +130 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/createAtomBlockMarkdownSpec.ts +141 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/createBlockMarkdownSpec.ts +225 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/createInlineMarkdownSpec.ts +282 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/index.ts +13 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/parseIndentedBlocks.ts +194 -0
- package/node_modules/@tiptap/core/src/utilities/markdown/renderNestedMarkdownContent.ts +96 -0
- package/node_modules/@tiptap/core/src/utilities/mergeAttributes.ts +109 -0
- package/node_modules/@tiptap/core/src/utilities/mergeDeep.ts +17 -0
- package/node_modules/@tiptap/core/src/utilities/minMax.ts +3 -0
- package/node_modules/@tiptap/core/src/utilities/objectIncludes.ts +30 -0
- package/node_modules/@tiptap/core/src/utilities/removeDuplicates.ts +13 -0
- package/node_modules/@tiptap/extension-bubble-menu/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-bubble-menu/README.md +18 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs +462 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.cts +169 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.d.ts +169 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.js +443 -0
- package/node_modules/@tiptap/extension-bubble-menu/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-bubble-menu/package.json +54 -0
- package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu-plugin.ts +650 -0
- package/node_modules/@tiptap/extension-bubble-menu/src/bubble-menu.ts +50 -0
- package/node_modules/@tiptap/extension-bubble-menu/src/index.ts +6 -0
- package/node_modules/@tiptap/extension-floating-menu/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-floating-menu/README.md +18 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs +380 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.cts +179 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.d.ts +179 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.js +361 -0
- package/node_modules/@tiptap/extension-floating-menu/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-floating-menu/package.json +53 -0
- package/node_modules/@tiptap/extension-floating-menu/src/floating-menu-plugin.ts +525 -0
- package/node_modules/@tiptap/extension-floating-menu/src/floating-menu.ts +77 -0
- package/node_modules/@tiptap/extension-floating-menu/src/index.ts +6 -0
- package/node_modules/@tiptap/extension-mention/LICENSE.md +21 -0
- package/node_modules/@tiptap/extension-mention/README.md +18 -0
- package/node_modules/@tiptap/extension-mention/dist/index.cjs +277 -0
- package/node_modules/@tiptap/extension-mention/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/extension-mention/dist/index.d.cts +93 -0
- package/node_modules/@tiptap/extension-mention/dist/index.d.ts +93 -0
- package/node_modules/@tiptap/extension-mention/dist/index.js +250 -0
- package/node_modules/@tiptap/extension-mention/dist/index.js.map +1 -0
- package/node_modules/@tiptap/extension-mention/package.json +52 -0
- package/node_modules/@tiptap/extension-mention/src/index.ts +5 -0
- package/node_modules/@tiptap/extension-mention/src/mention.ts +357 -0
- package/node_modules/@tiptap/extension-mention/src/utils/get-default-suggestion-attributes.ts +89 -0
- package/node_modules/@tiptap/pm/LICENSE.md +21 -0
- package/node_modules/@tiptap/pm/README.md +22 -0
- package/node_modules/@tiptap/pm/changeset/index.ts +1 -0
- package/node_modules/@tiptap/pm/collab/index.ts +1 -0
- package/node_modules/@tiptap/pm/commands/index.ts +1 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.d.cts +18 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.d.ts +18 -0
- package/node_modules/@tiptap/pm/dist/changeset/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/collab/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/collab/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/collab/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/collab/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/commands/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/commands/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/commands/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/commands/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/dropcursor/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/gapcursor/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/history/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/history/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/history/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/history/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/inputrules/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/keymap/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/markdown/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/menu/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/menu/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/menu/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/menu/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/model/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/model/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/model/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/model/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-basic/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/schema-list/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/state/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/state/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/state/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/state/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/tables/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/tables/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/tables/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/tables/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/trailing-node/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/transform/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/transform/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/transform/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/transform/index.js +2 -0
- package/node_modules/@tiptap/pm/dist/view/index.cjs +2 -0
- package/node_modules/@tiptap/pm/dist/view/index.d.cts +1 -0
- package/node_modules/@tiptap/pm/dist/view/index.d.ts +1 -0
- package/node_modules/@tiptap/pm/dist/view/index.js +2 -0
- package/node_modules/@tiptap/pm/dropcursor/index.ts +1 -0
- package/node_modules/@tiptap/pm/gapcursor/index.ts +1 -0
- package/node_modules/@tiptap/pm/history/index.ts +1 -0
- package/node_modules/@tiptap/pm/inputrules/index.ts +1 -0
- package/node_modules/@tiptap/pm/keymap/index.ts +1 -0
- package/node_modules/@tiptap/pm/markdown/index.ts +1 -0
- package/node_modules/@tiptap/pm/menu/index.ts +1 -0
- package/node_modules/@tiptap/pm/model/index.ts +1 -0
- package/node_modules/@tiptap/pm/package.json +211 -0
- package/node_modules/@tiptap/pm/schema-basic/index.ts +1 -0
- package/node_modules/@tiptap/pm/schema-list/index.ts +1 -0
- package/node_modules/@tiptap/pm/state/index.ts +1 -0
- package/node_modules/@tiptap/pm/tables/index.ts +1 -0
- package/node_modules/@tiptap/pm/trailing-node/index.ts +1 -0
- package/node_modules/@tiptap/pm/transform/index.ts +1 -0
- package/node_modules/@tiptap/pm/view/index.ts +1 -0
- package/node_modules/@tiptap/react/LICENSE.md +21 -0
- package/node_modules/@tiptap/react/README.md +18 -0
- package/node_modules/@tiptap/react/dist/index.cjs +1195 -0
- package/node_modules/@tiptap/react/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/react/dist/index.d.cts +534 -0
- package/node_modules/@tiptap/react/dist/index.d.ts +534 -0
- package/node_modules/@tiptap/react/dist/index.js +1131 -0
- package/node_modules/@tiptap/react/dist/index.js.map +1 -0
- package/node_modules/@tiptap/react/dist/menus/index.cjs +499 -0
- package/node_modules/@tiptap/react/dist/menus/index.cjs.map +1 -0
- package/node_modules/@tiptap/react/dist/menus/index.d.cts +19 -0
- package/node_modules/@tiptap/react/dist/menus/index.d.ts +19 -0
- package/node_modules/@tiptap/react/dist/menus/index.js +461 -0
- package/node_modules/@tiptap/react/dist/menus/index.js.map +1 -0
- package/node_modules/@tiptap/react/package.json +76 -0
- package/node_modules/@tiptap/react/src/Context.tsx +60 -0
- package/node_modules/@tiptap/react/src/Editor.ts +13 -0
- package/node_modules/@tiptap/react/src/EditorContent.tsx +229 -0
- package/node_modules/@tiptap/react/src/NodeViewContent.tsx +30 -0
- package/node_modules/@tiptap/react/src/NodeViewWrapper.tsx +27 -0
- package/node_modules/@tiptap/react/src/ReactMarkViewRenderer.tsx +106 -0
- package/node_modules/@tiptap/react/src/ReactNodeViewRenderer.tsx +387 -0
- package/node_modules/@tiptap/react/src/ReactRenderer.tsx +282 -0
- package/node_modules/@tiptap/react/src/Tiptap.tsx +224 -0
- package/node_modules/@tiptap/react/src/index.ts +13 -0
- package/node_modules/@tiptap/react/src/menus/BubbleMenu.spec.ts +174 -0
- package/node_modules/@tiptap/react/src/menus/BubbleMenu.tsx +153 -0
- package/node_modules/@tiptap/react/src/menus/FloatingMenu.spec.ts +164 -0
- package/node_modules/@tiptap/react/src/menus/FloatingMenu.tsx +137 -0
- package/node_modules/@tiptap/react/src/menus/getAutoPluginKey.ts +5 -0
- package/node_modules/@tiptap/react/src/menus/index.ts +2 -0
- package/node_modules/@tiptap/react/src/menus/useMenuElementProps.ts +354 -0
- package/node_modules/@tiptap/react/src/types.ts +6 -0
- package/node_modules/@tiptap/react/src/useEditor.ts +382 -0
- package/node_modules/@tiptap/react/src/useEditorState.ts +173 -0
- package/node_modules/@tiptap/react/src/useReactNodeView.ts +28 -0
- package/node_modules/@tiptap/suggestion/LICENSE.md +21 -0
- package/node_modules/@tiptap/suggestion/README.md +18 -0
- package/node_modules/@tiptap/suggestion/dist/index.cjs +369 -0
- package/node_modules/@tiptap/suggestion/dist/index.cjs.map +1 -0
- package/node_modules/@tiptap/suggestion/dist/index.d.cts +213 -0
- package/node_modules/@tiptap/suggestion/dist/index.d.ts +213 -0
- package/node_modules/@tiptap/suggestion/dist/index.js +339 -0
- package/node_modules/@tiptap/suggestion/dist/index.js.map +1 -0
- package/node_modules/@tiptap/suggestion/package.json +50 -0
- package/node_modules/@tiptap/suggestion/src/__tests__/suggestion.test.ts +127 -0
- package/node_modules/@tiptap/suggestion/src/findSuggestionMatch.ts +79 -0
- package/node_modules/@tiptap/suggestion/src/index.ts +8 -0
- package/node_modules/@tiptap/suggestion/src/suggestion.ts +585 -0
- package/node_modules/@types/linkify-it/LICENSE +21 -0
- package/node_modules/@types/linkify-it/README.md +15 -0
- package/node_modules/@types/linkify-it/build/index.cjs.d.ts +178 -0
- package/node_modules/@types/linkify-it/index.d.mts +174 -0
- package/node_modules/@types/linkify-it/index.d.ts +3 -0
- package/node_modules/@types/linkify-it/package.json +50 -0
- package/node_modules/@types/markdown-it/LICENSE +21 -0
- package/node_modules/@types/markdown-it/README.md +15 -0
- package/node_modules/@types/markdown-it/dist/index.cjs.d.ts +1236 -0
- package/node_modules/@types/markdown-it/dist/markdown-it.d.ts +5 -0
- package/node_modules/@types/markdown-it/dist/markdown-it.min.d.ts +5 -0
- package/node_modules/@types/markdown-it/index.d.mts +1 -0
- package/node_modules/@types/markdown-it/index.d.ts +3 -0
- package/node_modules/@types/markdown-it/lib/common/html_blocks.d.mts +7 -0
- package/node_modules/@types/markdown-it/lib/common/html_re.d.mts +2 -0
- package/node_modules/@types/markdown-it/lib/common/utils.d.mts +62 -0
- package/node_modules/@types/markdown-it/lib/helpers/index.d.mts +5 -0
- package/node_modules/@types/markdown-it/lib/helpers/parse_link_destination.d.mts +7 -0
- package/node_modules/@types/markdown-it/lib/helpers/parse_link_label.d.mts +3 -0
- package/node_modules/@types/markdown-it/lib/helpers/parse_link_title.d.mts +29 -0
- package/node_modules/@types/markdown-it/lib/index.d.mts +404 -0
- package/node_modules/@types/markdown-it/lib/parser_block.d.mts +25 -0
- package/node_modules/@types/markdown-it/lib/parser_core.d.mts +18 -0
- package/node_modules/@types/markdown-it/lib/parser_inline.d.mts +38 -0
- package/node_modules/@types/markdown-it/lib/renderer.d.mts +96 -0
- package/node_modules/@types/markdown-it/lib/ruler.d.mts +158 -0
- package/node_modules/@types/markdown-it/lib/rules_block/state_block.d.mts +124 -0
- package/node_modules/@types/markdown-it/lib/rules_core/state_core.d.mts +18 -0
- package/node_modules/@types/markdown-it/lib/rules_inline/state_inline.d.mts +73 -0
- package/node_modules/@types/markdown-it/lib/token.d.mts +108 -0
- package/node_modules/@types/markdown-it/package.json +54 -0
- package/node_modules/@types/mdurl/LICENSE +21 -0
- package/node_modules/@types/mdurl/README.md +15 -0
- package/node_modules/@types/mdurl/build/index.cjs.d.ts +52 -0
- package/node_modules/@types/mdurl/index.d.mts +6 -0
- package/node_modules/@types/mdurl/index.d.ts +3 -0
- package/node_modules/@types/mdurl/lib/decode.d.mts +10 -0
- package/node_modules/@types/mdurl/lib/encode.d.mts +15 -0
- package/node_modules/@types/mdurl/lib/format.d.mts +3 -0
- package/node_modules/@types/mdurl/lib/parse.d.mts +18 -0
- package/node_modules/@types/mdurl/package.json +36 -0
- package/node_modules/@types/use-sync-external-store/LICENSE +21 -0
- package/node_modules/@types/use-sync-external-store/README.md +15 -0
- package/node_modules/@types/use-sync-external-store/index.d.ts +5 -0
- package/node_modules/@types/use-sync-external-store/package.json +30 -0
- package/node_modules/@types/use-sync-external-store/shim/index.d.ts +1 -0
- package/node_modules/@types/use-sync-external-store/shim/with-selector.d.ts +1 -0
- package/node_modules/@types/use-sync-external-store/with-selector.d.ts +7 -0
- package/node_modules/argparse/LICENSE +254 -0
- package/node_modules/argparse/README.md +84 -0
- package/node_modules/argparse/argparse.js +3707 -0
- package/node_modules/argparse/lib/sub.js +67 -0
- package/node_modules/argparse/lib/textwrap.js +440 -0
- package/node_modules/argparse/package.json +31 -0
- package/node_modules/crelt/LICENSE +19 -0
- package/node_modules/crelt/README.md +23 -0
- package/node_modules/crelt/dist/index.cjs +31 -0
- package/node_modules/crelt/dist/index.d.cts +4 -0
- package/node_modules/crelt/index.d.ts +4 -0
- package/node_modules/crelt/index.js +28 -0
- package/node_modules/crelt/package.json +35 -0
- package/node_modules/crelt/rollup.config.js +13 -0
- package/node_modules/entities/LICENSE +11 -0
- package/node_modules/entities/lib/decode.d.ts +211 -0
- package/node_modules/entities/lib/decode.d.ts.map +1 -0
- package/node_modules/entities/lib/decode.js +536 -0
- package/node_modules/entities/lib/decode.js.map +1 -0
- package/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
- package/node_modules/entities/lib/decode_codepoint.d.ts.map +1 -0
- package/node_modules/entities/lib/decode_codepoint.js +76 -0
- package/node_modules/entities/lib/decode_codepoint.js.map +1 -0
- package/node_modules/entities/lib/encode.d.ts +22 -0
- package/node_modules/entities/lib/encode.d.ts.map +1 -0
- package/node_modules/entities/lib/encode.js +77 -0
- package/node_modules/entities/lib/encode.js.map +1 -0
- package/node_modules/entities/lib/escape.d.ts +43 -0
- package/node_modules/entities/lib/escape.d.ts.map +1 -0
- package/node_modules/entities/lib/escape.js +122 -0
- package/node_modules/entities/lib/escape.js.map +1 -0
- package/node_modules/entities/lib/esm/decode.d.ts +211 -0
- package/node_modules/entities/lib/esm/decode.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/decode.js +496 -0
- package/node_modules/entities/lib/esm/decode.js.map +1 -0
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
- package/node_modules/entities/lib/esm/decode_codepoint.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/decode_codepoint.js +71 -0
- package/node_modules/entities/lib/esm/decode_codepoint.js.map +1 -0
- package/node_modules/entities/lib/esm/encode.d.ts +22 -0
- package/node_modules/entities/lib/esm/encode.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/encode.js +69 -0
- package/node_modules/entities/lib/esm/encode.js.map +1 -0
- package/node_modules/entities/lib/esm/escape.d.ts +43 -0
- package/node_modules/entities/lib/esm/escape.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/escape.js +116 -0
- package/node_modules/entities/lib/esm/escape.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.js +7 -0
- package/node_modules/entities/lib/esm/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js +7 -0
- package/node_modules/entities/lib/esm/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/lib/esm/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/generated/encode-html.js +10 -0
- package/node_modules/entities/lib/esm/generated/encode-html.js.map +1 -0
- package/node_modules/entities/lib/esm/index.d.ts +96 -0
- package/node_modules/entities/lib/esm/index.d.ts.map +1 -0
- package/node_modules/entities/lib/esm/index.js +99 -0
- package/node_modules/entities/lib/esm/index.js.map +1 -0
- package/node_modules/entities/lib/esm/package.json +1 -0
- package/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
- package/node_modules/entities/lib/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-html.js +9 -0
- package/node_modules/entities/lib/generated/decode-data-html.js.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/entities/lib/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
- package/node_modules/entities/lib/generated/decode-data-xml.js.map +1 -0
- package/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
- package/node_modules/entities/lib/generated/encode-html.d.ts.map +1 -0
- package/node_modules/entities/lib/generated/encode-html.js +12 -0
- package/node_modules/entities/lib/generated/encode-html.js.map +1 -0
- package/node_modules/entities/lib/index.d.ts +96 -0
- package/node_modules/entities/lib/index.d.ts.map +1 -0
- package/node_modules/entities/lib/index.js +126 -0
- package/node_modules/entities/lib/index.js.map +1 -0
- package/node_modules/entities/package.json +90 -0
- package/node_modules/entities/readme.md +122 -0
- package/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/node_modules/escape-string-regexp/index.js +13 -0
- package/node_modules/escape-string-regexp/license +9 -0
- package/node_modules/escape-string-regexp/package.json +38 -0
- package/node_modules/escape-string-regexp/readme.md +34 -0
- package/node_modules/fast-equals/LICENSE +21 -0
- package/node_modules/fast-equals/README.md +477 -0
- package/node_modules/fast-equals/dist/cjs/comparator.d.cts +60 -0
- package/node_modules/fast-equals/dist/cjs/equals.d.cts +62 -0
- package/node_modules/fast-equals/dist/cjs/index.cjs +653 -0
- package/node_modules/fast-equals/dist/cjs/index.cjs.map +1 -0
- package/node_modules/fast-equals/dist/cjs/index.d.cts +66 -0
- package/node_modules/fast-equals/dist/cjs/internalTypes.d.cts +178 -0
- package/node_modules/fast-equals/dist/cjs/utils.d.cts +33 -0
- package/node_modules/fast-equals/dist/es/comparator.d.mts +60 -0
- package/node_modules/fast-equals/dist/es/equals.d.mts +62 -0
- package/node_modules/fast-equals/dist/es/index.d.mts +66 -0
- package/node_modules/fast-equals/dist/es/index.mjs +642 -0
- package/node_modules/fast-equals/dist/es/index.mjs.map +1 -0
- package/node_modules/fast-equals/dist/es/internalTypes.d.mts +178 -0
- package/node_modules/fast-equals/dist/es/utils.d.mts +33 -0
- package/node_modules/fast-equals/dist/umd/comparator.d.ts +26 -0
- package/node_modules/fast-equals/dist/umd/equals.d.ts +62 -0
- package/node_modules/fast-equals/dist/umd/index.d.ts +47 -0
- package/node_modules/fast-equals/dist/umd/index.js +659 -0
- package/node_modules/fast-equals/dist/umd/index.js.map +1 -0
- package/node_modules/fast-equals/dist/umd/internalTypes.d.ts +159 -0
- package/node_modules/fast-equals/dist/umd/utils.d.ts +28 -0
- package/node_modules/fast-equals/index.d.ts +260 -0
- package/node_modules/fast-equals/package.json +113 -0
- package/node_modules/linkify-it/LICENSE +22 -0
- package/node_modules/linkify-it/README.md +196 -0
- package/node_modules/linkify-it/build/index.cjs.js +832 -0
- package/node_modules/linkify-it/index.mjs +642 -0
- package/node_modules/linkify-it/lib/re.mjs +189 -0
- package/node_modules/linkify-it/package.json +58 -0
- package/node_modules/markdown-it/LICENSE +22 -0
- package/node_modules/markdown-it/README.md +324 -0
- package/node_modules/markdown-it/bin/markdown-it.mjs +107 -0
- package/node_modules/markdown-it/dist/index.cjs.js +5547 -0
- package/node_modules/markdown-it/dist/markdown-it.js +6969 -0
- package/node_modules/markdown-it/dist/markdown-it.min.js +2 -0
- package/node_modules/markdown-it/index.mjs +1 -0
- package/node_modules/markdown-it/lib/common/html_blocks.mjs +67 -0
- package/node_modules/markdown-it/lib/common/html_re.mjs +25 -0
- package/node_modules/markdown-it/lib/common/utils.mjs +304 -0
- package/node_modules/markdown-it/lib/helpers/index.mjs +11 -0
- package/node_modules/markdown-it/lib/helpers/parse_link_destination.mjs +77 -0
- package/node_modules/markdown-it/lib/helpers/parse_link_label.mjs +49 -0
- package/node_modules/markdown-it/lib/helpers/parse_link_title.mjs +66 -0
- package/node_modules/markdown-it/lib/index.mjs +565 -0
- package/node_modules/markdown-it/lib/parser_block.mjs +134 -0
- package/node_modules/markdown-it/lib/parser_core.mjs +62 -0
- package/node_modules/markdown-it/lib/parser_inline.mjs +197 -0
- package/node_modules/markdown-it/lib/presets/commonmark.mjs +88 -0
- package/node_modules/markdown-it/lib/presets/default.mjs +47 -0
- package/node_modules/markdown-it/lib/presets/zero.mjs +70 -0
- package/node_modules/markdown-it/lib/renderer.mjs +322 -0
- package/node_modules/markdown-it/lib/ruler.mjs +340 -0
- package/node_modules/markdown-it/lib/rules_block/blockquote.mjs +209 -0
- package/node_modules/markdown-it/lib/rules_block/code.mjs +30 -0
- package/node_modules/markdown-it/lib/rules_block/fence.mjs +94 -0
- package/node_modules/markdown-it/lib/rules_block/heading.mjs +51 -0
- package/node_modules/markdown-it/lib/rules_block/hr.mjs +40 -0
- package/node_modules/markdown-it/lib/rules_block/html_block.mjs +69 -0
- package/node_modules/markdown-it/lib/rules_block/lheading.mjs +82 -0
- package/node_modules/markdown-it/lib/rules_block/list.mjs +331 -0
- package/node_modules/markdown-it/lib/rules_block/paragraph.mjs +46 -0
- package/node_modules/markdown-it/lib/rules_block/reference.mjs +212 -0
- package/node_modules/markdown-it/lib/rules_block/state_block.mjs +220 -0
- package/node_modules/markdown-it/lib/rules_block/table.mjs +228 -0
- package/node_modules/markdown-it/lib/rules_core/block.mjs +13 -0
- package/node_modules/markdown-it/lib/rules_core/inline.mjs +11 -0
- package/node_modules/markdown-it/lib/rules_core/linkify.mjs +134 -0
- package/node_modules/markdown-it/lib/rules_core/normalize.mjs +17 -0
- package/node_modules/markdown-it/lib/rules_core/replacements.mjs +101 -0
- package/node_modules/markdown-it/lib/rules_core/smartquotes.mjs +193 -0
- package/node_modules/markdown-it/lib/rules_core/state_core.mjs +17 -0
- package/node_modules/markdown-it/lib/rules_core/text_join.mjs +43 -0
- package/node_modules/markdown-it/lib/rules_inline/autolink.mjs +72 -0
- package/node_modules/markdown-it/lib/rules_inline/backticks.mjs +60 -0
- package/node_modules/markdown-it/lib/rules_inline/balance_pairs.mjs +124 -0
- package/node_modules/markdown-it/lib/rules_inline/emphasis.mjs +123 -0
- package/node_modules/markdown-it/lib/rules_inline/entity.mjs +51 -0
- package/node_modules/markdown-it/lib/rules_inline/escape.mjs +69 -0
- package/node_modules/markdown-it/lib/rules_inline/fragments_join.mjs +38 -0
- package/node_modules/markdown-it/lib/rules_inline/html_inline.mjs +50 -0
- package/node_modules/markdown-it/lib/rules_inline/image.mjs +138 -0
- package/node_modules/markdown-it/lib/rules_inline/link.mjs +139 -0
- package/node_modules/markdown-it/lib/rules_inline/linkify.mjs +63 -0
- package/node_modules/markdown-it/lib/rules_inline/newline.mjs +42 -0
- package/node_modules/markdown-it/lib/rules_inline/state_inline.mjs +123 -0
- package/node_modules/markdown-it/lib/rules_inline/strikethrough.mjs +127 -0
- package/node_modules/markdown-it/lib/rules_inline/text.mjs +86 -0
- package/node_modules/markdown-it/lib/token.mjs +191 -0
- package/node_modules/markdown-it/package.json +92 -0
- package/node_modules/mdurl/LICENSE +45 -0
- package/node_modules/mdurl/README.md +102 -0
- package/node_modules/mdurl/build/index.cjs.js +534 -0
- package/node_modules/mdurl/index.mjs +11 -0
- package/node_modules/mdurl/lib/decode.mjs +112 -0
- package/node_modules/mdurl/lib/encode.mjs +89 -0
- package/node_modules/mdurl/lib/format.mjs +21 -0
- package/node_modules/mdurl/lib/parse.mjs +308 -0
- package/node_modules/mdurl/package.json +37 -0
- package/node_modules/orderedmap/LICENSE +19 -0
- package/node_modules/orderedmap/README.md +69 -0
- package/node_modules/orderedmap/dist/index.cjs +139 -0
- package/node_modules/orderedmap/dist/index.d.cts +33 -0
- package/node_modules/orderedmap/dist/index.d.ts +33 -0
- package/node_modules/orderedmap/dist/index.js +137 -0
- package/node_modules/orderedmap/package.json +39 -0
- package/node_modules/prosemirror-changeset/CHANGELOG.md +147 -0
- package/node_modules/prosemirror-changeset/LICENSE +19 -0
- package/node_modules/prosemirror-changeset/README.md +175 -0
- package/node_modules/prosemirror-changeset/dist/index.cjs +585 -0
- package/node_modules/prosemirror-changeset/dist/index.d.cts +186 -0
- package/node_modules/prosemirror-changeset/dist/index.d.ts +186 -0
- package/node_modules/prosemirror-changeset/dist/index.js +715 -0
- package/node_modules/prosemirror-changeset/package.json +40 -0
- package/node_modules/prosemirror-changeset/src/README.md +32 -0
- package/node_modules/prosemirror-changeset/src/change.ts +189 -0
- package/node_modules/prosemirror-changeset/src/changeset.ts +212 -0
- package/node_modules/prosemirror-changeset/src/diff.ts +151 -0
- package/node_modules/prosemirror-changeset/src/simplify.ts +132 -0
- package/node_modules/prosemirror-changeset/test/test-changed-range.ts +48 -0
- package/node_modules/prosemirror-changeset/test/test-changes.ts +211 -0
- package/node_modules/prosemirror-changeset/test/test-diff.ts +69 -0
- package/node_modules/prosemirror-changeset/test/test-merge.ts +56 -0
- package/node_modules/prosemirror-changeset/test/test-simplify.ts +71 -0
- package/node_modules/prosemirror-collab/.tern-project +8 -0
- package/node_modules/prosemirror-collab/CHANGELOG.md +77 -0
- package/node_modules/prosemirror-collab/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-collab/LICENSE +19 -0
- package/node_modules/prosemirror-collab/README.md +28 -0
- package/node_modules/prosemirror-collab/dist/index.cjs +155 -0
- package/node_modules/prosemirror-collab/dist/index.d.cts +60 -0
- package/node_modules/prosemirror-collab/dist/index.d.ts +60 -0
- package/node_modules/prosemirror-collab/dist/index.js +156 -0
- package/node_modules/prosemirror-collab/package.json +40 -0
- package/node_modules/prosemirror-collab/src/README.md +11 -0
- package/node_modules/prosemirror-collab/src/collab.ts +184 -0
- package/node_modules/prosemirror-commands/.tern-project +8 -0
- package/node_modules/prosemirror-commands/CHANGELOG.md +322 -0
- package/node_modules/prosemirror-commands/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-commands/LICENSE +19 -0
- package/node_modules/prosemirror-commands/README.md +28 -0
- package/node_modules/prosemirror-commands/dist/index.cjs +687 -0
- package/node_modules/prosemirror-commands/dist/index.d.cts +215 -0
- package/node_modules/prosemirror-commands/dist/index.d.ts +215 -0
- package/node_modules/prosemirror-commands/dist/index.js +850 -0
- package/node_modules/prosemirror-commands/package.json +39 -0
- package/node_modules/prosemirror-commands/src/README.md +40 -0
- package/node_modules/prosemirror-commands/src/commands.ts +783 -0
- package/node_modules/prosemirror-dropcursor/CHANGELOG.md +137 -0
- package/node_modules/prosemirror-dropcursor/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-dropcursor/LICENSE +19 -0
- package/node_modules/prosemirror-dropcursor/README.md +50 -0
- package/node_modules/prosemirror-dropcursor/dist/index.cjs +185 -0
- package/node_modules/prosemirror-dropcursor/dist/index.d.cts +38 -0
- package/node_modules/prosemirror-dropcursor/dist/index.d.ts +38 -0
- package/node_modules/prosemirror-dropcursor/dist/index.js +146 -0
- package/node_modules/prosemirror-dropcursor/package.json +38 -0
- package/node_modules/prosemirror-dropcursor/src/dropcursor.ts +170 -0
- package/node_modules/prosemirror-gapcursor/CHANGELOG.md +122 -0
- package/node_modules/prosemirror-gapcursor/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-gapcursor/LICENSE +19 -0
- package/node_modules/prosemirror-gapcursor/README.md +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.cjs +239 -0
- package/node_modules/prosemirror-gapcursor/dist/index.d.cts +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.d.ts +31 -0
- package/node_modules/prosemirror-gapcursor/dist/index.js +239 -0
- package/node_modules/prosemirror-gapcursor/package.json +43 -0
- package/node_modules/prosemirror-gapcursor/src/README.md +21 -0
- package/node_modules/prosemirror-gapcursor/src/gapcursor.ts +141 -0
- package/node_modules/prosemirror-gapcursor/src/index.ts +91 -0
- package/node_modules/prosemirror-gapcursor/style/gapcursor.css +25 -0
- package/node_modules/prosemirror-history/.tern-project +8 -0
- package/node_modules/prosemirror-history/CHANGELOG.md +170 -0
- package/node_modules/prosemirror-history/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-history/LICENSE +19 -0
- package/node_modules/prosemirror-history/README.md +27 -0
- package/node_modules/prosemirror-history/dist/index.cjs +382 -0
- package/node_modules/prosemirror-history/dist/index.d.cts +64 -0
- package/node_modules/prosemirror-history/dist/index.d.ts +64 -0
- package/node_modules/prosemirror-history/dist/index.js +453 -0
- package/node_modules/prosemirror-history/package.json +40 -0
- package/node_modules/prosemirror-history/src/README.md +23 -0
- package/node_modules/prosemirror-history/src/history.ts +465 -0
- package/node_modules/prosemirror-inputrules/.tern-project +8 -0
- package/node_modules/prosemirror-inputrules/CHANGELOG.md +127 -0
- package/node_modules/prosemirror-inputrules/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-inputrules/LICENSE +19 -0
- package/node_modules/prosemirror-inputrules/README.md +29 -0
- package/node_modules/prosemirror-inputrules/dist/index.cjs +194 -0
- package/node_modules/prosemirror-inputrules/dist/index.d.cts +131 -0
- package/node_modules/prosemirror-inputrules/dist/index.d.ts +131 -0
- package/node_modules/prosemirror-inputrules/dist/index.js +239 -0
- package/node_modules/prosemirror-inputrules/package.json +36 -0
- package/node_modules/prosemirror-inputrules/src/README.md +23 -0
- package/node_modules/prosemirror-inputrules/src/index.ts +4 -0
- package/node_modules/prosemirror-inputrules/src/inputrules.ts +167 -0
- package/node_modules/prosemirror-inputrules/src/rulebuilders.ts +59 -0
- package/node_modules/prosemirror-inputrules/src/rules.ts +17 -0
- package/node_modules/prosemirror-keymap/.tern-project +8 -0
- package/node_modules/prosemirror-keymap/CHANGELOG.md +104 -0
- package/node_modules/prosemirror-keymap/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-keymap/LICENSE +19 -0
- package/node_modules/prosemirror-keymap/README.md +27 -0
- package/node_modules/prosemirror-keymap/dist/index.cjs +65 -0
- package/node_modules/prosemirror-keymap/dist/index.d.cts +47 -0
- package/node_modules/prosemirror-keymap/dist/index.d.ts +47 -0
- package/node_modules/prosemirror-keymap/dist/index.js +128 -0
- package/node_modules/prosemirror-keymap/package.json +38 -0
- package/node_modules/prosemirror-keymap/src/README.md +5 -0
- package/node_modules/prosemirror-keymap/src/keymap.ts +105 -0
- package/node_modules/prosemirror-markdown/.tern-project +8 -0
- package/node_modules/prosemirror-markdown/CHANGELOG.md +311 -0
- package/node_modules/prosemirror-markdown/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-markdown/LICENSE +19 -0
- package/node_modules/prosemirror-markdown/README.md +276 -0
- package/node_modules/prosemirror-markdown/dist/index.cjs +966 -0
- package/node_modules/prosemirror-markdown/dist/index.d.cts +335 -0
- package/node_modules/prosemirror-markdown/dist/index.d.ts +335 -0
- package/node_modules/prosemirror-markdown/dist/index.js +878 -0
- package/node_modules/prosemirror-markdown/package.json +40 -0
- package/node_modules/prosemirror-markdown/src/README.md +42 -0
- package/node_modules/prosemirror-markdown/src/from_markdown.ts +272 -0
- package/node_modules/prosemirror-markdown/src/index.ts +5 -0
- package/node_modules/prosemirror-markdown/src/schema.ts +156 -0
- package/node_modules/prosemirror-markdown/src/to_markdown.ts +483 -0
- package/node_modules/prosemirror-menu/.tern-project +8 -0
- package/node_modules/prosemirror-menu/CHANGELOG.md +107 -0
- package/node_modules/prosemirror-menu/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-menu/LICENSE +19 -0
- package/node_modules/prosemirror-menu/README.md +235 -0
- package/node_modules/prosemirror-menu/dist/index.cjs +798 -0
- package/node_modules/prosemirror-menu/dist/index.d.cts +281 -0
- package/node_modules/prosemirror-menu/dist/index.d.ts +281 -0
- package/node_modules/prosemirror-menu/dist/index.js +795 -0
- package/node_modules/prosemirror-menu/package.json +42 -0
- package/node_modules/prosemirror-menu/src/README.md +60 -0
- package/node_modules/prosemirror-menu/src/icons.ts +53 -0
- package/node_modules/prosemirror-menu/src/index.ts +4 -0
- package/node_modules/prosemirror-menu/src/menu.ts +628 -0
- package/node_modules/prosemirror-menu/src/menubar.ts +210 -0
- package/node_modules/prosemirror-menu/style/menu.css +169 -0
- package/node_modules/prosemirror-model/.tern-project +8 -0
- package/node_modules/prosemirror-model/CHANGELOG.md +730 -0
- package/node_modules/prosemirror-model/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-model/LICENSE +19 -0
- package/node_modules/prosemirror-model/README.md +29 -0
- package/node_modules/prosemirror-model/dist/index.cjs +2898 -0
- package/node_modules/prosemirror-model/dist/index.d.cts +1679 -0
- package/node_modules/prosemirror-model/dist/index.d.ts +1679 -0
- package/node_modules/prosemirror-model/dist/index.js +3464 -0
- package/node_modules/prosemirror-model/package.json +38 -0
- package/node_modules/prosemirror-model/src/README.md +62 -0
- package/node_modules/prosemirror-model/src/comparedeep.ts +15 -0
- package/node_modules/prosemirror-model/src/content.ts +413 -0
- package/node_modules/prosemirror-model/src/diff.ts +52 -0
- package/node_modules/prosemirror-model/src/dom.ts +1 -0
- package/node_modules/prosemirror-model/src/fragment.ts +268 -0
- package/node_modules/prosemirror-model/src/from_dom.ts +848 -0
- package/node_modules/prosemirror-model/src/index.ts +11 -0
- package/node_modules/prosemirror-model/src/mark.ts +111 -0
- package/node_modules/prosemirror-model/src/node.ts +402 -0
- package/node_modules/prosemirror-model/src/replace.ts +225 -0
- package/node_modules/prosemirror-model/src/resolvedpos.ts +289 -0
- package/node_modules/prosemirror-model/src/schema.ts +705 -0
- package/node_modules/prosemirror-model/src/to_dom.ts +238 -0
- package/node_modules/prosemirror-schema-basic/.tern-project +8 -0
- package/node_modules/prosemirror-schema-basic/CHANGELOG.md +81 -0
- package/node_modules/prosemirror-schema-basic/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-schema-basic/LICENSE +19 -0
- package/node_modules/prosemirror-schema-basic/README.md +28 -0
- package/node_modules/prosemirror-schema-basic/dist/index.cjs +246 -0
- package/node_modules/prosemirror-schema-basic/dist/index.d.cts +87 -0
- package/node_modules/prosemirror-schema-basic/dist/index.d.ts +87 -0
- package/node_modules/prosemirror-schema-basic/dist/index.js +183 -0
- package/node_modules/prosemirror-schema-basic/package.json +37 -0
- package/node_modules/prosemirror-schema-basic/src/README.md +8 -0
- package/node_modules/prosemirror-schema-basic/src/schema-basic.ts +166 -0
- package/node_modules/prosemirror-schema-list/.tern-project +8 -0
- package/node_modules/prosemirror-schema-list/CHANGELOG.md +140 -0
- package/node_modules/prosemirror-schema-list/CONTRIBUTING.md +100 -0
- package/node_modules/prosemirror-schema-list/LICENSE +19 -0
- package/node_modules/prosemirror-schema-list/README.md +28 -0
- package/node_modules/prosemirror-schema-list/dist/index.cjs +253 -0
- package/node_modules/prosemirror-schema-list/dist/index.d.cts +71 -0
- package/node_modules/prosemirror-schema-list/dist/index.d.ts +71 -0
- package/node_modules/prosemirror-schema-list/dist/index.js +289 -0
- package/node_modules/prosemirror-schema-list/package.json +40 -0
- package/node_modules/prosemirror-schema-list/src/README.md +29 -0
- package/node_modules/prosemirror-schema-list/src/schema-list.ts +267 -0
- package/node_modules/prosemirror-state/.tern-project +8 -0
- package/node_modules/prosemirror-state/CHANGELOG.md +296 -0
- package/node_modules/prosemirror-state/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-state/LICENSE +19 -0
- package/node_modules/prosemirror-state/README.md +28 -0
- package/node_modules/prosemirror-state/dist/index.cjs +884 -0
- package/node_modules/prosemirror-state/dist/index.d.cts +709 -0
- package/node_modules/prosemirror-state/dist/index.d.ts +709 -0
- package/node_modules/prosemirror-state/dist/index.js +1002 -0
- package/node_modules/prosemirror-state/package.json +39 -0
- package/node_modules/prosemirror-state/src/README.md +42 -0
- package/node_modules/prosemirror-state/src/index.ts +7 -0
- package/node_modules/prosemirror-state/src/plugin.ts +142 -0
- package/node_modules/prosemirror-state/src/selection.ts +462 -0
- package/node_modules/prosemirror-state/src/state.ts +266 -0
- package/node_modules/prosemirror-state/src/transaction.ts +215 -0
- package/node_modules/prosemirror-tables/LICENSE +19 -0
- package/node_modules/prosemirror-tables/README.md +254 -0
- package/node_modules/prosemirror-tables/dist/index.cjs +2683 -0
- package/node_modules/prosemirror-tables/dist/index.d.cts +751 -0
- package/node_modules/prosemirror-tables/dist/index.d.cts.map +1 -0
- package/node_modules/prosemirror-tables/dist/index.d.ts +751 -0
- package/node_modules/prosemirror-tables/dist/index.d.ts.map +1 -0
- package/node_modules/prosemirror-tables/dist/index.js +2626 -0
- package/node_modules/prosemirror-tables/dist/index.js.map +1 -0
- package/node_modules/prosemirror-tables/package.json +80 -0
- package/node_modules/prosemirror-tables/style/tables.css +48 -0
- package/node_modules/prosemirror-trailing-node/LICENSE +21 -0
- package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.cts +41 -0
- package/node_modules/prosemirror-trailing-node/dist/_tsup-dts-rollup.d.ts +41 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.cjs +70 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.cts +2 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.d.ts +2 -0
- package/node_modules/prosemirror-trailing-node/dist/prosemirror-trailing-node.js +43 -0
- package/node_modules/prosemirror-trailing-node/dist-types/index.d.ts +2 -0
- package/node_modules/prosemirror-trailing-node/dist-types/trailing-node-plugin.d.ts +33 -0
- package/node_modules/prosemirror-trailing-node/dist-types/tsconfig.tsbuildinfo +1 -0
- package/node_modules/prosemirror-trailing-node/package.json +57 -0
- package/node_modules/prosemirror-trailing-node/readme.md +55 -0
- package/node_modules/prosemirror-transform/.tern-project +8 -0
- package/node_modules/prosemirror-transform/CHANGELOG.md +502 -0
- package/node_modules/prosemirror-transform/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-transform/LICENSE +19 -0
- package/node_modules/prosemirror-transform/README.md +29 -0
- package/node_modules/prosemirror-transform/dist/index.cjs +1888 -0
- package/node_modules/prosemirror-transform/dist/index.d.cts +847 -0
- package/node_modules/prosemirror-transform/dist/index.d.ts +847 -0
- package/node_modules/prosemirror-transform/dist/index.js +2181 -0
- package/node_modules/prosemirror-transform/package.json +37 -0
- package/node_modules/prosemirror-transform/src/README.md +59 -0
- package/node_modules/prosemirror-transform/src/attr_step.ts +98 -0
- package/node_modules/prosemirror-transform/src/index.ts +11 -0
- package/node_modules/prosemirror-transform/src/map.ts +284 -0
- package/node_modules/prosemirror-transform/src/mark.ts +106 -0
- package/node_modules/prosemirror-transform/src/mark_step.ts +224 -0
- package/node_modules/prosemirror-transform/src/replace.ts +460 -0
- package/node_modules/prosemirror-transform/src/replace_step.ts +178 -0
- package/node_modules/prosemirror-transform/src/step.ts +97 -0
- package/node_modules/prosemirror-transform/src/structure.ts +349 -0
- package/node_modules/prosemirror-transform/src/transform.ts +271 -0
- package/node_modules/prosemirror-view/.tern-project +8 -0
- package/node_modules/prosemirror-view/CHANGELOG.md +2447 -0
- package/node_modules/prosemirror-view/CONTRIBUTING.md +104 -0
- package/node_modules/prosemirror-view/LICENSE +19 -0
- package/node_modules/prosemirror-view/README.md +28 -0
- package/node_modules/prosemirror-view/dist/index.cjs +5381 -0
- package/node_modules/prosemirror-view/dist/index.d.cts +904 -0
- package/node_modules/prosemirror-view/dist/index.d.ts +904 -0
- package/node_modules/prosemirror-view/dist/index.js +5900 -0
- package/node_modules/prosemirror-view/package.json +43 -0
- package/node_modules/prosemirror-view/src/README.md +38 -0
- package/node_modules/prosemirror-view/src/browser.ts +24 -0
- package/node_modules/prosemirror-view/src/capturekeys.ts +345 -0
- package/node_modules/prosemirror-view/src/clipboard.ts +263 -0
- package/node_modules/prosemirror-view/src/decoration.ts +793 -0
- package/node_modules/prosemirror-view/src/dom.ts +159 -0
- package/node_modules/prosemirror-view/src/domchange.ts +383 -0
- package/node_modules/prosemirror-view/src/domcoords.ts +515 -0
- package/node_modules/prosemirror-view/src/domobserver.ts +392 -0
- package/node_modules/prosemirror-view/src/index.ts +825 -0
- package/node_modules/prosemirror-view/src/input.ts +830 -0
- package/node_modules/prosemirror-view/src/selection.ts +216 -0
- package/node_modules/prosemirror-view/src/viewdesc.ts +1590 -0
- package/node_modules/prosemirror-view/style/prosemirror.css +54 -0
- package/node_modules/punycode.js/LICENSE-MIT.txt +20 -0
- package/node_modules/punycode.js/README.md +148 -0
- package/node_modules/punycode.js/package.json +58 -0
- package/node_modules/punycode.js/punycode.es6.js +444 -0
- package/node_modules/punycode.js/punycode.js +443 -0
- package/node_modules/rope-sequence/LICENSE +19 -0
- package/node_modules/rope-sequence/README.md +63 -0
- package/node_modules/rope-sequence/dist/index.cjs +209 -0
- package/node_modules/rope-sequence/dist/index.d.cts +11 -0
- package/node_modules/rope-sequence/dist/index.d.ts +11 -0
- package/node_modules/rope-sequence/dist/index.js +207 -0
- package/node_modules/rope-sequence/index.js +190 -0
- package/node_modules/rope-sequence/package.json +34 -0
- package/node_modules/rope-sequence/test.js +78 -0
- package/node_modules/uc.micro/LICENSE.txt +20 -0
- package/node_modules/uc.micro/README.md +14 -0
- package/node_modules/uc.micro/build/index.cjs.js +20 -0
- package/node_modules/uc.micro/categories/Cc/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/Cf/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/P/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/S/regex.mjs +1 -0
- package/node_modules/uc.micro/categories/Z/regex.mjs +1 -0
- package/node_modules/uc.micro/index.mjs +8 -0
- package/node_modules/uc.micro/package.json +37 -0
- package/node_modules/uc.micro/properties/Any/regex.mjs +1 -0
- package/node_modules/use-sync-external-store/LICENSE +21 -0
- package/node_modules/use-sync-external-store/README.md +5 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +97 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +85 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +95 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.development.js +88 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.native.production.js +59 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +66 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.development.js +96 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store-with-selector.production.js +84 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.development.js +27 -0
- package/node_modules/use-sync-external-store/cjs/use-sync-external-store.production.js +13 -0
- package/node_modules/use-sync-external-store/index.js +7 -0
- package/node_modules/use-sync-external-store/package.json +43 -0
- package/node_modules/use-sync-external-store/shim/index.js +7 -0
- package/node_modules/use-sync-external-store/shim/index.native.js +7 -0
- package/node_modules/use-sync-external-store/shim/with-selector.js +7 -0
- package/node_modules/use-sync-external-store/with-selector.js +7 -0
- package/node_modules/w3c-keyname/.tern-port +1 -0
- package/node_modules/w3c-keyname/LICENSE +19 -0
- package/node_modules/w3c-keyname/README.md +18 -0
- package/node_modules/w3c-keyname/index.cjs +127 -0
- package/node_modules/w3c-keyname/index.d.cts +5 -0
- package/node_modules/w3c-keyname/index.d.ts +5 -0
- package/node_modules/w3c-keyname/index.js +119 -0
- package/node_modules/w3c-keyname/package.json +37 -0
- package/package.json +120 -3
- package/public-api.md +24 -3
- package/dist/chat/tool-renderers/KbSearchRenderer.d.ts +0 -2
- package/dist/chat/tool-renderers/kb-search-result.d.ts +0 -19
- package/dist/chunk-5J54S5BK.js.map +0 -1
- package/dist/chunk-FQQJP2GJ.js.map +0 -1
- package/dist/chunk-WCMGQJLE.js +0 -258
- package/dist/chunk-WCMGQJLE.js.map +0 -1
- package/dist/lib/agent-computer-command.d.ts +0 -34
- package/dist/rich-input/extensions/kb-mention.d.ts +0 -18
- package/dist/rich-input/extensions/workflow-mention.d.ts +0 -10
- package/dist/rich-input/lib/kb-suggestions.d.ts +0 -37
|
@@ -1894,11 +1894,10 @@ var CirclePause = createLucideIcon("CirclePause", [
|
|
|
1894
1894
|
["line", { x1: "14", x2: "14", y1: "15", y2: "9", key: "h65svq" }]
|
|
1895
1895
|
]);
|
|
1896
1896
|
|
|
1897
|
-
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle-
|
|
1898
|
-
var
|
|
1897
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle-slash.js
|
|
1898
|
+
var CircleSlash = createLucideIcon("CircleSlash", [
|
|
1899
1899
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1900
|
-
["
|
|
1901
|
-
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
1900
|
+
["line", { x1: "9", x2: "15", y1: "15", y2: "9", key: "1dfufj" }]
|
|
1902
1901
|
]);
|
|
1903
1902
|
|
|
1904
1903
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle.js
|
|
@@ -2429,11 +2428,20 @@ var TriangleAlert = createLucideIcon("TriangleAlert", [
|
|
|
2429
2428
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2430
2429
|
]);
|
|
2431
2430
|
|
|
2432
|
-
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/
|
|
2433
|
-
var
|
|
2434
|
-
["
|
|
2435
|
-
["path", { d: "
|
|
2436
|
-
[
|
|
2431
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/unplug.js
|
|
2432
|
+
var Unplug = createLucideIcon("Unplug", [
|
|
2433
|
+
["path", { d: "m19 5 3-3", key: "yk6iyv" }],
|
|
2434
|
+
["path", { d: "m2 22 3-3", key: "19mgm9" }],
|
|
2435
|
+
[
|
|
2436
|
+
"path",
|
|
2437
|
+
{ d: "M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z", key: "goz73y" }
|
|
2438
|
+
],
|
|
2439
|
+
["path", { d: "M7.5 13.5 10 11", key: "7xgeeb" }],
|
|
2440
|
+
["path", { d: "M10.5 16.5 13 14", key: "10btkg" }],
|
|
2441
|
+
[
|
|
2442
|
+
"path",
|
|
2443
|
+
{ d: "m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z", key: "1snsnr" }
|
|
2444
|
+
]
|
|
2437
2445
|
]);
|
|
2438
2446
|
|
|
2439
2447
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/wrench.js
|
|
@@ -2453,8 +2461,19 @@ var X = createLucideIcon("X", [
|
|
|
2453
2461
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2454
2462
|
]);
|
|
2455
2463
|
|
|
2464
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/zap.js
|
|
2465
|
+
var Zap = createLucideIcon("Zap", [
|
|
2466
|
+
[
|
|
2467
|
+
"path",
|
|
2468
|
+
{
|
|
2469
|
+
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
2470
|
+
key: "1xq2db"
|
|
2471
|
+
}
|
|
2472
|
+
]
|
|
2473
|
+
]);
|
|
2474
|
+
|
|
2456
2475
|
// src/components/PlanUpdateBlock.tsx
|
|
2457
|
-
import { useEffect
|
|
2476
|
+
import { useEffect, useRef, useState } from "react";
|
|
2458
2477
|
|
|
2459
2478
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2460
2479
|
function r(e2) {
|
|
@@ -2640,7 +2659,7 @@ var createLruCache = (maxCacheSize) => {
|
|
|
2640
2659
|
let cacheSize = 0;
|
|
2641
2660
|
let cache = /* @__PURE__ */ Object.create(null);
|
|
2642
2661
|
let previousCache = /* @__PURE__ */ Object.create(null);
|
|
2643
|
-
const
|
|
2662
|
+
const update2 = (key, value) => {
|
|
2644
2663
|
cache[key] = value;
|
|
2645
2664
|
cacheSize++;
|
|
2646
2665
|
if (cacheSize > maxCacheSize) {
|
|
@@ -2656,7 +2675,7 @@ var createLruCache = (maxCacheSize) => {
|
|
|
2656
2675
|
return value;
|
|
2657
2676
|
}
|
|
2658
2677
|
if ((value = previousCache[key]) !== void 0) {
|
|
2659
|
-
|
|
2678
|
+
update2(key, value);
|
|
2660
2679
|
return value;
|
|
2661
2680
|
}
|
|
2662
2681
|
},
|
|
@@ -2664,7 +2683,7 @@ var createLruCache = (maxCacheSize) => {
|
|
|
2664
2683
|
if (key in cache) {
|
|
2665
2684
|
cache[key] = value;
|
|
2666
2685
|
} else {
|
|
2667
|
-
|
|
2686
|
+
update2(key, value);
|
|
2668
2687
|
}
|
|
2669
2688
|
}
|
|
2670
2689
|
};
|
|
@@ -5674,388 +5693,13 @@ async function copyToClipboard(text) {
|
|
|
5674
5693
|
}
|
|
5675
5694
|
}
|
|
5676
5695
|
|
|
5677
|
-
// src/chat/lib/code-language.ts
|
|
5678
|
-
var FILE_EXTENSION_ALIASES = {
|
|
5679
|
-
".bash": "bash",
|
|
5680
|
-
".css": "css",
|
|
5681
|
-
".go": "go",
|
|
5682
|
-
".htm": "html",
|
|
5683
|
-
".html": "html",
|
|
5684
|
-
".js": "javascript",
|
|
5685
|
-
".json": "json",
|
|
5686
|
-
".jsonc": "json",
|
|
5687
|
-
".jsx": "jsx",
|
|
5688
|
-
".md": "markdown",
|
|
5689
|
-
".mdx": "markdown",
|
|
5690
|
-
".py": "python",
|
|
5691
|
-
".rs": "rust",
|
|
5692
|
-
".scss": "css",
|
|
5693
|
-
".sh": "bash",
|
|
5694
|
-
".ts": "typescript",
|
|
5695
|
-
".tsx": "tsx",
|
|
5696
|
-
".yaml": "yaml",
|
|
5697
|
-
".yml": "yaml",
|
|
5698
|
-
".zsh": "bash"
|
|
5699
|
-
};
|
|
5700
|
-
function getCodeLanguageFromFilename(filePath) {
|
|
5701
|
-
if (!filePath) return null;
|
|
5702
|
-
const dotIndex = filePath.lastIndexOf(".");
|
|
5703
|
-
if (dotIndex < 0) return null;
|
|
5704
|
-
return FILE_EXTENSION_ALIASES[filePath.slice(dotIndex).toLowerCase()] ?? null;
|
|
5705
|
-
}
|
|
5706
|
-
|
|
5707
|
-
// src/chat/runtime/environment.tsx
|
|
5708
|
-
import { createContext as createContext3, useContext as useContext3, useMemo as useMemo2 } from "react";
|
|
5709
|
-
|
|
5710
|
-
// src/chat/runtime/session-source.tsx
|
|
5711
|
-
import { createInitialSessionState } from "@blade-hq/agent-client/internal";
|
|
5712
|
-
import {
|
|
5713
|
-
createContext as createContext2,
|
|
5714
|
-
useContext as useContext2,
|
|
5715
|
-
useEffect,
|
|
5716
|
-
useLayoutEffect,
|
|
5717
|
-
useMemo,
|
|
5718
|
-
useRef,
|
|
5719
|
-
useState,
|
|
5720
|
-
useSyncExternalStore
|
|
5721
|
-
} from "react";
|
|
5722
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
5723
|
-
var EMPTY_SOURCE = {
|
|
5724
|
-
subscribe: () => () => {
|
|
5725
|
-
},
|
|
5726
|
-
getSession: () => void 0,
|
|
5727
|
-
isHistoryLoading: () => false,
|
|
5728
|
-
planRevealRevision: () => 0
|
|
5729
|
-
};
|
|
5730
|
-
var SessionSourceContext = createContext2(EMPTY_SOURCE);
|
|
5731
|
-
function SessionSourceProvider({ source, children }) {
|
|
5732
|
-
return /* @__PURE__ */ jsx2(SessionSourceContext.Provider, { value: source, children });
|
|
5733
|
-
}
|
|
5734
|
-
function useSessionSource() {
|
|
5735
|
-
return useContext2(SessionSourceContext);
|
|
5736
|
-
}
|
|
5737
|
-
var SingleSessionSource = class {
|
|
5738
|
-
session = null;
|
|
5739
|
-
loading = false;
|
|
5740
|
-
listeners = /* @__PURE__ */ new Set();
|
|
5741
|
-
revisions = /* @__PURE__ */ new Map();
|
|
5742
|
-
subscribe = (listener) => {
|
|
5743
|
-
this.listeners.add(listener);
|
|
5744
|
-
return () => {
|
|
5745
|
-
this.listeners.delete(listener);
|
|
5746
|
-
};
|
|
5747
|
-
};
|
|
5748
|
-
getSession = (sessionId) => {
|
|
5749
|
-
const current = this.session;
|
|
5750
|
-
return current && (!sessionId || current.sessionId === sessionId) ? current : void 0;
|
|
5751
|
-
};
|
|
5752
|
-
isHistoryLoading = (sessionId) => {
|
|
5753
|
-
if (!this.session) return this.loading;
|
|
5754
|
-
return (!sessionId || this.session.sessionId === sessionId) && this.loading;
|
|
5755
|
-
};
|
|
5756
|
-
planRevealRevision = (sessionId) => sessionId ? this.revisions.get(sessionId) ?? 0 : 0;
|
|
5757
|
-
update(session, loading) {
|
|
5758
|
-
if (this.session === session && this.loading === loading) return;
|
|
5759
|
-
this.session = session;
|
|
5760
|
-
this.loading = loading;
|
|
5761
|
-
this.notify();
|
|
5762
|
-
}
|
|
5763
|
-
/** 只认实时成功的根回路 update_plan:历史加载与断线补数不算「新揭示」。 */
|
|
5764
|
-
watchPlan(session) {
|
|
5765
|
-
return session.on("toolResult", ({ toolCall, turn, source }) => {
|
|
5766
|
-
if (source === "reconnect_replay" || (turn.loop_id || "root") !== "root" || toolCall.status !== "done" || !isPlanUpdateTool(toolCall) || !parsePlanUpdate(toolCall.arguments)) {
|
|
5767
|
-
return;
|
|
5768
|
-
}
|
|
5769
|
-
this.revisions.set(session.sessionId, (this.revisions.get(session.sessionId) ?? 0) + 1);
|
|
5770
|
-
this.notify();
|
|
5771
|
-
});
|
|
5772
|
-
}
|
|
5773
|
-
notify() {
|
|
5774
|
-
for (const listener of [...this.listeners]) listener();
|
|
5775
|
-
}
|
|
5776
|
-
};
|
|
5777
|
-
function useSingleSessionSource(session, loading) {
|
|
5778
|
-
const [source] = useState(() => new SingleSessionSource());
|
|
5779
|
-
useLayoutEffect(() => {
|
|
5780
|
-
source.update(session, loading);
|
|
5781
|
-
}, [source, session, loading]);
|
|
5782
|
-
useEffect(() => session ? source.watchPlan(session) : void 0, [source, session]);
|
|
5783
|
-
return source;
|
|
5784
|
-
}
|
|
5785
|
-
var EMPTY_STATE = createInitialSessionState("");
|
|
5786
|
-
var noopSubscribe = () => () => {
|
|
5787
|
-
};
|
|
5788
|
-
function useSessionHandle(sessionId) {
|
|
5789
|
-
const source = useSessionSource();
|
|
5790
|
-
return useSyncExternalStore(
|
|
5791
|
-
source.subscribe,
|
|
5792
|
-
() => source.getSession(sessionId) ?? null,
|
|
5793
|
-
() => source.getSession(sessionId) ?? null
|
|
5794
|
-
);
|
|
5795
|
-
}
|
|
5796
|
-
function useSessionState(sessionId, selector) {
|
|
5797
|
-
const session = useSessionHandle(sessionId);
|
|
5798
|
-
const selectorRef = useRef(selector);
|
|
5799
|
-
selectorRef.current = selector;
|
|
5800
|
-
const store = useMemo(() => {
|
|
5801
|
-
let lastState = null;
|
|
5802
|
-
let lastSelector = null;
|
|
5803
|
-
let lastSelected;
|
|
5804
|
-
const getSnapshot = () => {
|
|
5805
|
-
const state = session ? session.getState() : EMPTY_STATE;
|
|
5806
|
-
const current = selectorRef.current;
|
|
5807
|
-
if (state !== lastState || current !== lastSelector) {
|
|
5808
|
-
const next = current(state);
|
|
5809
|
-
if (!(lastState !== null && Object.is(next, lastSelected))) lastSelected = next;
|
|
5810
|
-
lastState = state;
|
|
5811
|
-
lastSelector = current;
|
|
5812
|
-
}
|
|
5813
|
-
return lastSelected;
|
|
5814
|
-
};
|
|
5815
|
-
return {
|
|
5816
|
-
subscribe: session ? (listener) => session.subscribe(listener) : noopSubscribe,
|
|
5817
|
-
getSnapshot
|
|
5818
|
-
};
|
|
5819
|
-
}, [session]);
|
|
5820
|
-
return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
5821
|
-
}
|
|
5822
|
-
function useIsSessionHistoryLoading(sessionId) {
|
|
5823
|
-
const source = useSessionSource();
|
|
5824
|
-
return useSyncExternalStore(
|
|
5825
|
-
source.subscribe,
|
|
5826
|
-
() => source.isHistoryLoading(sessionId),
|
|
5827
|
-
() => source.isHistoryLoading(sessionId)
|
|
5828
|
-
);
|
|
5829
|
-
}
|
|
5830
|
-
function usePlanRevealRevision(sessionId) {
|
|
5831
|
-
const source = useSessionSource();
|
|
5832
|
-
return useSyncExternalStore(
|
|
5833
|
-
source.subscribe,
|
|
5834
|
-
() => source.planRevealRevision(sessionId),
|
|
5835
|
-
() => source.planRevealRevision(sessionId)
|
|
5836
|
-
);
|
|
5837
|
-
}
|
|
5838
|
-
var CurrentChatSessionContext = createContext2(null);
|
|
5839
|
-
function CurrentChatSessionProvider({ sessionId, children }) {
|
|
5840
|
-
return /* @__PURE__ */ jsx2(CurrentChatSessionContext.Provider, { value: sessionId, children });
|
|
5841
|
-
}
|
|
5842
|
-
function useCurrentChatSessionId() {
|
|
5843
|
-
return useContext2(CurrentChatSessionContext);
|
|
5844
|
-
}
|
|
5845
|
-
|
|
5846
|
-
// src/chat/runtime/environment.tsx
|
|
5847
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
5848
|
-
var EMPTY_ENVIRONMENT = {};
|
|
5849
|
-
var ChatEnvironmentContext = createContext3(EMPTY_ENVIRONMENT);
|
|
5850
|
-
function ChatEnvironmentProvider({ value, children }) {
|
|
5851
|
-
return /* @__PURE__ */ jsx3(ChatEnvironmentContext.Provider, { value, children });
|
|
5852
|
-
}
|
|
5853
|
-
function useChatEnvironment() {
|
|
5854
|
-
return useContext3(ChatEnvironmentContext);
|
|
5855
|
-
}
|
|
5856
|
-
var NO_HIGHLIGHT = { highlightedHtml: null };
|
|
5857
|
-
function usePlainCode() {
|
|
5858
|
-
return NO_HIGHLIGHT;
|
|
5859
|
-
}
|
|
5860
|
-
function useHighlightedCode(code, language) {
|
|
5861
|
-
const use = useChatEnvironment().useHighlightedCode ?? usePlainCode;
|
|
5862
|
-
return use(code, language);
|
|
5863
|
-
}
|
|
5864
|
-
function useNoDetail() {
|
|
5865
|
-
return null;
|
|
5866
|
-
}
|
|
5867
|
-
function useChatSessionDetail(sessionId) {
|
|
5868
|
-
const use = useChatEnvironment().useSessionDetail ?? useNoDetail;
|
|
5869
|
-
return use(sessionId);
|
|
5870
|
-
}
|
|
5871
|
-
function useShowTodo() {
|
|
5872
|
-
return false;
|
|
5873
|
-
}
|
|
5874
|
-
function useHideTodo() {
|
|
5875
|
-
const use = useChatEnvironment().useHideTodo ?? useShowTodo;
|
|
5876
|
-
return use();
|
|
5877
|
-
}
|
|
5878
|
-
function useChatRenderMode() {
|
|
5879
|
-
return useChatEnvironment().renderMode ?? "normal";
|
|
5880
|
-
}
|
|
5881
|
-
function notifyChat(environment, kind, message, options) {
|
|
5882
|
-
if (environment.notify) environment.notify(kind, message, options);
|
|
5883
|
-
else if (kind === "error") console.error(message);
|
|
5884
|
-
}
|
|
5885
|
-
function useComposerBridge(sessionId) {
|
|
5886
|
-
const environment = useChatEnvironment();
|
|
5887
|
-
const session = useSessionHandle(sessionId);
|
|
5888
|
-
return useMemo2(
|
|
5889
|
-
() => ({
|
|
5890
|
-
appendText(text, separate = false) {
|
|
5891
|
-
if (!sessionId) return;
|
|
5892
|
-
if (environment.appendToComposer) environment.appendToComposer(sessionId, text, separate);
|
|
5893
|
-
else session?.insertText(separate ? `
|
|
5894
|
-
|
|
5895
|
-
${text}` : text);
|
|
5896
|
-
},
|
|
5897
|
-
addContext(context) {
|
|
5898
|
-
if (!sessionId) return;
|
|
5899
|
-
if (environment.addComposerContext) environment.addComposerContext(sessionId, context);
|
|
5900
|
-
else session?.attach(context.label, context.content);
|
|
5901
|
-
}
|
|
5902
|
-
}),
|
|
5903
|
-
[environment, session, sessionId]
|
|
5904
|
-
);
|
|
5905
|
-
}
|
|
5906
|
-
var NO_VIRTUAL_ITEMS = [];
|
|
5907
|
-
var NO_VIRTUALIZER = {
|
|
5908
|
-
getVirtualItems: () => NO_VIRTUAL_ITEMS,
|
|
5909
|
-
getTotalSize: () => 0,
|
|
5910
|
-
measureElement: () => {
|
|
5911
|
-
},
|
|
5912
|
-
scrollToIndex: () => {
|
|
5913
|
-
},
|
|
5914
|
-
getOffsetForIndex: () => void 0
|
|
5915
|
-
};
|
|
5916
|
-
function useNoVirtualizer() {
|
|
5917
|
-
return NO_VIRTUALIZER;
|
|
5918
|
-
}
|
|
5919
|
-
function useChatVirtualizer(options) {
|
|
5920
|
-
const injected = useChatEnvironment().useVirtualizer;
|
|
5921
|
-
const use = injected ?? useNoVirtualizer;
|
|
5922
|
-
const virtualizer = use(options);
|
|
5923
|
-
return { virtualizer, enabled: Boolean(injected) };
|
|
5924
|
-
}
|
|
5925
|
-
|
|
5926
|
-
// src/chat/tool-renderers/shared.tsx
|
|
5927
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
5928
|
-
function getResultText(result) {
|
|
5929
|
-
if (typeof result === "string") return result;
|
|
5930
|
-
if (Array.isArray(result)) {
|
|
5931
|
-
const texts = result.filter(
|
|
5932
|
-
(p2) => typeof p2 === "object" && p2 !== null && p2.type === "text" && typeof p2.text === "string"
|
|
5933
|
-
).map((p2) => p2.text);
|
|
5934
|
-
return texts.length > 0 ? texts.join("\n") : null;
|
|
5935
|
-
}
|
|
5936
|
-
return result != null ? String(result) : null;
|
|
5937
|
-
}
|
|
5938
|
-
function getResultImages(result) {
|
|
5939
|
-
if (!Array.isArray(result)) return [];
|
|
5940
|
-
return result.filter(
|
|
5941
|
-
(p2) => typeof p2 === "object" && p2 !== null && p2.type === "image_url" && typeof p2.image_url?.url === "string"
|
|
5942
|
-
).map((p2) => p2.image_url);
|
|
5943
|
-
}
|
|
5944
|
-
function parseJsonValue(value) {
|
|
5945
|
-
if (!value) return null;
|
|
5946
|
-
try {
|
|
5947
|
-
return JSON.parse(value);
|
|
5948
|
-
} catch {
|
|
5949
|
-
return null;
|
|
5950
|
-
}
|
|
5951
|
-
}
|
|
5952
|
-
function isPlainObject(value) {
|
|
5953
|
-
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5954
|
-
}
|
|
5955
|
-
function getStringValue(data, key) {
|
|
5956
|
-
const value = data?.[key];
|
|
5957
|
-
return typeof value === "string" && value.trim() ? value.trim() : null;
|
|
5958
|
-
}
|
|
5959
|
-
function getNumberValue(data, key) {
|
|
5960
|
-
const value = data?.[key];
|
|
5961
|
-
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
5962
|
-
}
|
|
5963
|
-
function getBooleanValue(data, key) {
|
|
5964
|
-
return data?.[key] === true;
|
|
5965
|
-
}
|
|
5966
|
-
function extractErrorMessage(value) {
|
|
5967
|
-
const text = typeof value === "string" ? value : getResultText(value);
|
|
5968
|
-
if (!text?.trim()) return null;
|
|
5969
|
-
const parsed = parseJsonValue(text);
|
|
5970
|
-
if (!isPlainObject(parsed)) return null;
|
|
5971
|
-
return typeof parsed.error === "string" && parsed.error.trim() ? parsed.error.trim() : null;
|
|
5972
|
-
}
|
|
5973
|
-
function getFileName(filePath) {
|
|
5974
|
-
if (!filePath) return "\u672A\u547D\u540D\u6587\u4EF6";
|
|
5975
|
-
return filePath.split(/[\\/]/).pop() ?? filePath;
|
|
5976
|
-
}
|
|
5977
|
-
function getCodeLanguage(filePath) {
|
|
5978
|
-
return getCodeLanguageFromFilename(filePath);
|
|
5979
|
-
}
|
|
5980
|
-
function formatBytes(size4) {
|
|
5981
|
-
if (typeof size4 !== "number" || !Number.isFinite(size4) || size4 < 0) return null;
|
|
5982
|
-
if (size4 < 1024) return `${size4} B`;
|
|
5983
|
-
if (size4 < 1024 * 1024) return `${(size4 / 1024).toFixed(1)} KB`;
|
|
5984
|
-
return `${(size4 / (1024 * 1024)).toFixed(1)} MB`;
|
|
5985
|
-
}
|
|
5986
|
-
function CodePreview({
|
|
5987
|
-
content,
|
|
5988
|
-
filePath,
|
|
5989
|
-
emptyLabel = "\uFF08\u6682\u65E0\u5185\u5BB9\uFF09",
|
|
5990
|
-
className
|
|
5991
|
-
}) {
|
|
5992
|
-
const { highlightedHtml } = useHighlightedCode(content, getCodeLanguage(filePath));
|
|
5993
|
-
if (!content.trim()) {
|
|
5994
|
-
return /* @__PURE__ */ jsx4(
|
|
5995
|
-
"pre",
|
|
5996
|
-
{
|
|
5997
|
-
className: cn(
|
|
5998
|
-
"overflow-auto rounded-lg border border-[hsl(var(--border))]",
|
|
5999
|
-
"bg-[hsl(var(--muted))]/35 p-3 font-mono text-[11px] text-[hsl(var(--muted-foreground))]",
|
|
6000
|
-
className
|
|
6001
|
-
),
|
|
6002
|
-
children: /* @__PURE__ */ jsx4("code", { children: emptyLabel })
|
|
6003
|
-
}
|
|
6004
|
-
);
|
|
6005
|
-
}
|
|
6006
|
-
return /* @__PURE__ */ jsx4(
|
|
6007
|
-
"pre",
|
|
6008
|
-
{
|
|
6009
|
-
className: cn(
|
|
6010
|
-
"overflow-auto rounded-lg border border-[hsl(var(--border))]",
|
|
6011
|
-
"bg-[hsl(var(--muted))]/35 p-3 text-[11px]",
|
|
6012
|
-
className
|
|
6013
|
-
),
|
|
6014
|
-
children: highlightedHtml ? /* @__PURE__ */ jsx4(
|
|
6015
|
-
"code",
|
|
6016
|
-
{
|
|
6017
|
-
className: "font-mono",
|
|
6018
|
-
dangerouslySetInnerHTML: { __html: highlightedHtml }
|
|
6019
|
-
}
|
|
6020
|
-
) : /* @__PURE__ */ jsx4("code", { className: "whitespace-pre-wrap break-words font-mono text-[hsl(var(--foreground))]", children: content })
|
|
6021
|
-
}
|
|
6022
|
-
);
|
|
6023
|
-
}
|
|
6024
|
-
|
|
6025
|
-
// src/chat/tool-renderers/kb-search-result.ts
|
|
6026
|
-
function parseKbSearchResult(result) {
|
|
6027
|
-
const value = parseJsonValue(getResultText(result));
|
|
6028
|
-
if (!isPlainObject(value) || !Array.isArray(value.hits)) return null;
|
|
6029
|
-
const hits = value.hits.filter(isPlainObject).map((hit, index2) => ({
|
|
6030
|
-
n: typeof hit.n === "number" ? hit.n : index2 + 1,
|
|
6031
|
-
kbName: getStringValue(hit, "kb_name") ?? "",
|
|
6032
|
-
title: getStringValue(hit, "title") ?? getStringValue(hit, "path") ?? "\u672A\u547D\u540D\u6587\u6863",
|
|
6033
|
-
path: getStringValue(hit, "path") ?? "",
|
|
6034
|
-
page: typeof hit.page === "number" ? hit.page : null,
|
|
6035
|
-
heading: getStringValue(hit, "heading"),
|
|
6036
|
-
text: getStringValue(hit, "text") ?? "",
|
|
6037
|
-
previewUrl: getStringValue(hit, "preview_url")
|
|
6038
|
-
}));
|
|
6039
|
-
return {
|
|
6040
|
-
summary: getStringValue(value, "summary"),
|
|
6041
|
-
query: getStringValue(value, "query"),
|
|
6042
|
-
hits
|
|
6043
|
-
};
|
|
6044
|
-
}
|
|
6045
|
-
function formatKbSearchLabel(result) {
|
|
6046
|
-
const parsed = parseKbSearchResult(result);
|
|
6047
|
-
if (!parsed) return null;
|
|
6048
|
-
const names = [...new Set(parsed.hits.map((hit) => hit.kbName).filter(Boolean))];
|
|
6049
|
-
const scope = names.length > 0 ? names.map((name) => `\u300A${name}\u300B`).join("") : "\u77E5\u8BC6\u5E93";
|
|
6050
|
-
return `\u{1F50D} \u5728${scope}\u68C0\u7D22\u5230 ${parsed.hits.length} \u6761`;
|
|
6051
|
-
}
|
|
6052
|
-
|
|
6053
5696
|
// src/chat/display-utils.ts
|
|
6054
5697
|
var TOOL_NAME_ALIASES = {
|
|
6055
5698
|
agent: "Agent",
|
|
6056
5699
|
ask_user_question: "AskUserQuestion",
|
|
6057
5700
|
bash: "Bash",
|
|
6058
5701
|
bg_bash: "BgBash",
|
|
5702
|
+
code_mode_run: "CodeMode",
|
|
6059
5703
|
edit: "Edit",
|
|
6060
5704
|
exit_plan_mode: "ExitPlanMode",
|
|
6061
5705
|
file_edit: "Edit",
|
|
@@ -6064,7 +5708,6 @@ var TOOL_NAME_ALIASES = {
|
|
|
6064
5708
|
finish_task: "FinishTask",
|
|
6065
5709
|
glob: "Glob",
|
|
6066
5710
|
grep: "Grep",
|
|
6067
|
-
kb_search: "KbSearch",
|
|
6068
5711
|
ls: "Ls",
|
|
6069
5712
|
multi_edit: "MultiEdit",
|
|
6070
5713
|
read: "Read",
|
|
@@ -6077,6 +5720,7 @@ var TOOL_NAME_ALIASES = {
|
|
|
6077
5720
|
var TOOL_DISPLAY_LABELS = {
|
|
6078
5721
|
Bash: "\u6267\u884C\u547D\u4EE4",
|
|
6079
5722
|
BgBash: "\u540E\u53F0\u6267\u884C\u547D\u4EE4",
|
|
5723
|
+
CodeMode: "\u6267\u884C\u7A0B\u5E8F",
|
|
6080
5724
|
Read: "\u8BFB\u53D6\u6587\u4EF6",
|
|
6081
5725
|
Write: "\u5199\u5165\u6587\u4EF6",
|
|
6082
5726
|
Edit: "\u7F16\u8F91\u6587\u4EF6",
|
|
@@ -6084,7 +5728,6 @@ var TOOL_DISPLAY_LABELS = {
|
|
|
6084
5728
|
Ls: "\u5217\u51FA\u76EE\u5F55",
|
|
6085
5729
|
Glob: "\u5339\u914D\u6587\u4EF6",
|
|
6086
5730
|
Grep: "\u641C\u7D22\u6587\u672C",
|
|
6087
|
-
KbSearch: "\u68C0\u7D22\u77E5\u8BC6\u5E93",
|
|
6088
5731
|
WebSearch: "\u641C\u7D22\u7F51\u9875",
|
|
6089
5732
|
WebFetch: "\u6574\u7406\u7F51\u9875\u5185\u5BB9",
|
|
6090
5733
|
Agent: "\u6D3E\u751F\u5B50\u667A\u80FD\u4F53",
|
|
@@ -6122,7 +5765,7 @@ function safeParseJson(value) {
|
|
|
6122
5765
|
return null;
|
|
6123
5766
|
}
|
|
6124
5767
|
}
|
|
6125
|
-
function
|
|
5768
|
+
function isPlainObject(value) {
|
|
6126
5769
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6127
5770
|
}
|
|
6128
5771
|
function getStringArgValue(args, key) {
|
|
@@ -6134,7 +5777,7 @@ function getCommandDescription(args) {
|
|
|
6134
5777
|
}
|
|
6135
5778
|
function getToolDescription(toolCall) {
|
|
6136
5779
|
const args = safeParseJson(toolCall.arguments);
|
|
6137
|
-
if (!
|
|
5780
|
+
if (!isPlainObject(args)) return null;
|
|
6138
5781
|
return getCommandDescription(args) || null;
|
|
6139
5782
|
}
|
|
6140
5783
|
function formatFileName(filePath) {
|
|
@@ -6161,6 +5804,7 @@ function isInternalStatusFile(filePath) {
|
|
|
6161
5804
|
function formatToolName(name) {
|
|
6162
5805
|
const trimmed = name.trim();
|
|
6163
5806
|
if (!trimmed) return name;
|
|
5807
|
+
if (trimmed === "code:run" || trimmed === "code__run") return "CodeMode";
|
|
6164
5808
|
const stripped = trimmed.split(":").pop()?.split("/").pop()?.split(".").pop()?.trim() || trimmed;
|
|
6165
5809
|
const normalized = stripped.replace(/([a-z0-9])([A-Z])/g, "$1_$2").replace(/[^a-zA-Z0-9]+/g, "_").replace(/^_+|_+$/g, "").toLowerCase();
|
|
6166
5810
|
return TOOL_NAME_ALIASES[normalized] ?? stripped;
|
|
@@ -6169,7 +5813,8 @@ function getToolDisplayLabel(toolCall) {
|
|
|
6169
5813
|
const normalized = formatToolName(toolCall.name);
|
|
6170
5814
|
const args = safeParseJson(toolCall.arguments);
|
|
6171
5815
|
const displayName = toolCall.display_name?.trim() ?? "";
|
|
6172
|
-
const
|
|
5816
|
+
const explicitLabel = displayName === toolCall.name ? "" : displayName;
|
|
5817
|
+
const baseLabel = explicitLabel || TOOL_DISPLAY_LABELS[normalized] || displayName || normalized;
|
|
6173
5818
|
const metaDisplayName = getStringArgValue(args, "_meta_display_name");
|
|
6174
5819
|
if (metaDisplayName) {
|
|
6175
5820
|
return metaDisplayName;
|
|
@@ -6192,12 +5837,6 @@ function getToolDisplayLabel(toolCall) {
|
|
|
6192
5837
|
const title = args && typeof args.title === "string" ? args.title : "";
|
|
6193
5838
|
return title ? `${baseLabel}\uFF1A${title}` : baseLabel;
|
|
6194
5839
|
}
|
|
6195
|
-
if (normalized === "KbSearch") {
|
|
6196
|
-
const resultLabel = formatKbSearchLabel(toolCall.result);
|
|
6197
|
-
if (resultLabel) return resultLabel;
|
|
6198
|
-
const query = getStringArgValue(args, "query");
|
|
6199
|
-
return query ? `${baseLabel}\uFF1A${query}` : baseLabel;
|
|
6200
|
-
}
|
|
6201
5840
|
return description || baseLabel;
|
|
6202
5841
|
}
|
|
6203
5842
|
function getToolTone(status) {
|
|
@@ -6234,7 +5873,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6234
5873
|
for (const item of value) collect(item, depth + 1, allowPlainString);
|
|
6235
5874
|
return;
|
|
6236
5875
|
}
|
|
6237
|
-
if (!
|
|
5876
|
+
if (!isPlainObject(value)) return;
|
|
6238
5877
|
for (const key of PRIORITY_FILE_KEYS) collect(value[key], depth + 1, true);
|
|
6239
5878
|
for (const [key, nested] of Object.entries(value)) {
|
|
6240
5879
|
if (!PRIORITY_FILE_KEYS.includes(key) && nested && typeof nested === "object") collect(nested, depth + 1, false);
|
|
@@ -6249,7 +5888,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6249
5888
|
}
|
|
6250
5889
|
} else if (Array.isArray(value)) {
|
|
6251
5890
|
for (const item of value) collectPatchHeaders(item);
|
|
6252
|
-
} else if (
|
|
5891
|
+
} else if (isPlainObject(value)) {
|
|
6253
5892
|
for (const [key, nested] of Object.entries(value)) {
|
|
6254
5893
|
if (key.toLowerCase().includes("patch") || key.toLowerCase().includes("diff")) collectPatchHeaders(nested);
|
|
6255
5894
|
}
|
|
@@ -6273,7 +5912,7 @@ function getToolOutputTag(toolCall) {
|
|
|
6273
5912
|
}
|
|
6274
5913
|
|
|
6275
5914
|
// src/components/PlanUpdateBlock.tsx
|
|
6276
|
-
import { jsx as
|
|
5915
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
6277
5916
|
var PLAN_STEP_STATUSES = /* @__PURE__ */ new Set(["pending", "in_progress", "completed"]);
|
|
6278
5917
|
var PLAN_AUTO_COLLAPSE_MS = 5e3;
|
|
6279
5918
|
function isPlanUpdateTool(toolCall) {
|
|
@@ -6328,12 +5967,12 @@ function PlanStepIcon({
|
|
|
6328
5967
|
running = false
|
|
6329
5968
|
}) {
|
|
6330
5969
|
if (status === "completed") {
|
|
6331
|
-
return /* @__PURE__ */
|
|
5970
|
+
return /* @__PURE__ */ jsx2(Check, { size: size4, strokeWidth: 2, className: "shrink-0 text-emerald-500" });
|
|
6332
5971
|
}
|
|
6333
5972
|
if (status === "in_progress") {
|
|
6334
|
-
return running ? /* @__PURE__ */
|
|
5973
|
+
return running ? /* @__PURE__ */ jsx2(LoaderCircle, { size: size4, className: "shrink-0 animate-spin text-[hsl(var(--muted-foreground))]" }) : /* @__PURE__ */ jsx2(CircleDot, { size: size4, className: "shrink-0 text-amber-500" });
|
|
6335
5974
|
}
|
|
6336
|
-
return /* @__PURE__ */
|
|
5975
|
+
return /* @__PURE__ */ jsx2(Circle, { size: size4, className: "shrink-0 text-[hsl(var(--muted-foreground))]/60" });
|
|
6337
5976
|
}
|
|
6338
5977
|
function PlanUpdateBlock({
|
|
6339
5978
|
toolCall,
|
|
@@ -6343,10 +5982,10 @@ function PlanUpdateBlock({
|
|
|
6343
5982
|
}) {
|
|
6344
5983
|
const updateKey = `${toolCall.id}:${toolCall.arguments}`;
|
|
6345
5984
|
const revealKey = autoReveal ? updateKey : null;
|
|
6346
|
-
const [collapsed, setCollapsed] =
|
|
6347
|
-
const collapseTimerRef =
|
|
5985
|
+
const [collapsed, setCollapsed] = useState(!autoReveal);
|
|
5986
|
+
const collapseTimerRef = useRef(null);
|
|
6348
5987
|
const data = parsePlanUpdate(toolCall.arguments);
|
|
6349
|
-
|
|
5988
|
+
useEffect(() => {
|
|
6350
5989
|
if (!revealKey) return;
|
|
6351
5990
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6352
5991
|
setCollapsed(false);
|
|
@@ -6355,7 +5994,7 @@ function PlanUpdateBlock({
|
|
|
6355
5994
|
collapseTimerRef.current = null;
|
|
6356
5995
|
}, PLAN_AUTO_COLLAPSE_MS);
|
|
6357
5996
|
}, [revealKey]);
|
|
6358
|
-
|
|
5997
|
+
useEffect(
|
|
6359
5998
|
() => () => {
|
|
6360
5999
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6361
6000
|
},
|
|
@@ -6384,20 +6023,20 @@ function PlanUpdateBlock({
|
|
|
6384
6023
|
),
|
|
6385
6024
|
children: [
|
|
6386
6025
|
collapsed && currentStep ? /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 text-xs text-[hsl(var(--foreground))]", children: [
|
|
6387
|
-
/* @__PURE__ */
|
|
6388
|
-
/* @__PURE__ */
|
|
6389
|
-
pausedAtCurrentStep ? /* @__PURE__ */
|
|
6026
|
+
/* @__PURE__ */ jsx2(PlanStepIcon, { status: currentStep.status, size: 14, running }),
|
|
6027
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: currentStep.step }),
|
|
6028
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-[11px] text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6390
6029
|
] }) : /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 items-center gap-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: [
|
|
6391
|
-
/* @__PURE__ */
|
|
6392
|
-
/* @__PURE__ */
|
|
6393
|
-
pausedAtCurrentStep ? /* @__PURE__ */
|
|
6030
|
+
/* @__PURE__ */ jsx2(ListChecks, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
|
|
6031
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: "\u4EFB\u52A1\u8FDB\u5EA6" }),
|
|
6032
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6394
6033
|
] }),
|
|
6395
6034
|
/* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[11px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
|
|
6396
6035
|
completed,
|
|
6397
6036
|
"/",
|
|
6398
6037
|
data.plan.length
|
|
6399
6038
|
] }),
|
|
6400
|
-
/* @__PURE__ */
|
|
6039
|
+
/* @__PURE__ */ jsx2(
|
|
6401
6040
|
ChevronDown,
|
|
6402
6041
|
{
|
|
6403
6042
|
size: 14,
|
|
@@ -6410,7 +6049,7 @@ function PlanUpdateBlock({
|
|
|
6410
6049
|
]
|
|
6411
6050
|
}
|
|
6412
6051
|
),
|
|
6413
|
-
/* @__PURE__ */
|
|
6052
|
+
/* @__PURE__ */ jsx2(
|
|
6414
6053
|
"div",
|
|
6415
6054
|
{
|
|
6416
6055
|
"aria-hidden": collapsed,
|
|
@@ -6418,9 +6057,9 @@ function PlanUpdateBlock({
|
|
|
6418
6057
|
"grid transition-[grid-template-rows,opacity] duration-300 ease-out motion-reduce:transition-none",
|
|
6419
6058
|
collapsed ? "grid-rows-[0fr] opacity-0" : "grid-rows-[1fr] opacity-100"
|
|
6420
6059
|
),
|
|
6421
|
-
children: /* @__PURE__ */
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6060
|
+
children: /* @__PURE__ */ jsx2("div", { className: "min-h-0 overflow-hidden", children: /* @__PURE__ */ jsx2("div", { className: "flex max-h-40 flex-col gap-0.5 overflow-y-auto px-3 py-2", children: data.plan.length === 0 ? /* @__PURE__ */ jsx2("span", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u6682\u65E0\u4EFB\u52A1\u6B65\u9AA4" }) : data.plan.map((item, index2) => /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2 py-0.5", children: [
|
|
6061
|
+
/* @__PURE__ */ jsx2("span", { className: "mt-[3px] flex shrink-0", children: /* @__PURE__ */ jsx2(PlanStepIcon, { status: item.status, size: 14, running }) }),
|
|
6062
|
+
/* @__PURE__ */ jsx2(
|
|
6424
6063
|
"span",
|
|
6425
6064
|
{
|
|
6426
6065
|
className: cn(
|
|
@@ -6436,6 +6075,559 @@ function PlanUpdateBlock({
|
|
|
6436
6075
|
] });
|
|
6437
6076
|
}
|
|
6438
6077
|
|
|
6078
|
+
// src/chat/runtime/input-history-storage.ts
|
|
6079
|
+
var generation = 0;
|
|
6080
|
+
function getInputHistoryGeneration() {
|
|
6081
|
+
return generation;
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
// src/chat/runtime/input-cache-reset.ts
|
|
6085
|
+
var resetters = /* @__PURE__ */ new WeakMap();
|
|
6086
|
+
function onInputCachesReset(client, reset) {
|
|
6087
|
+
let set = resetters.get(client);
|
|
6088
|
+
if (!set) {
|
|
6089
|
+
set = /* @__PURE__ */ new Set();
|
|
6090
|
+
resetters.set(client, set);
|
|
6091
|
+
}
|
|
6092
|
+
set.add(reset);
|
|
6093
|
+
return () => {
|
|
6094
|
+
set.delete(reset);
|
|
6095
|
+
};
|
|
6096
|
+
}
|
|
6097
|
+
|
|
6098
|
+
// src/rich-input/lib/plugin-suggestions.ts
|
|
6099
|
+
var accountPreparation = /* @__PURE__ */ new WeakMap();
|
|
6100
|
+
var registeredClients = /* @__PURE__ */ new WeakSet();
|
|
6101
|
+
function pluginRefsForSend(refs, turns = []) {
|
|
6102
|
+
const latest = [...turns].reverse().find((turn) => turn.role === "user");
|
|
6103
|
+
return refs.length || latest?.refs?.length ? refs : void 0;
|
|
6104
|
+
}
|
|
6105
|
+
function prepareAccount(client) {
|
|
6106
|
+
if (!registeredClients.has(client)) {
|
|
6107
|
+
registeredClients.add(client);
|
|
6108
|
+
onInputCachesReset(client, () => accountPreparation.delete(client));
|
|
6109
|
+
}
|
|
6110
|
+
const current = accountPreparation.get(client);
|
|
6111
|
+
if (current && current.token === client.token) return current.ready;
|
|
6112
|
+
const ready = client.plugins.catalog().catch((error) => {
|
|
6113
|
+
accountPreparation.delete(client);
|
|
6114
|
+
throw error;
|
|
6115
|
+
});
|
|
6116
|
+
accountPreparation.set(client, { token: client.token, ready });
|
|
6117
|
+
return ready;
|
|
6118
|
+
}
|
|
6119
|
+
async function getPluginSuggestionItems(client, session, query, pendingPlugins = []) {
|
|
6120
|
+
if (!session && pendingPlugins.length === 0) return [];
|
|
6121
|
+
const path = session ? `/api/sessions/${encodeURIComponent(session)}/plugin-tools/mentions` : "/api/plugin-mentions/mentions";
|
|
6122
|
+
try {
|
|
6123
|
+
if (!session) await prepareAccount(client);
|
|
6124
|
+
const data = await client.json("POST", path, { arguments: { query, cursor: "" }, ...!session ? { plugin_selection: pendingPlugins } : {} });
|
|
6125
|
+
return [...data.items.map((item) => ({ ...item, kind: "plugin", name: item.label })), ...data.errors.map((message) => ({ kind: "pluginError", message }))];
|
|
6126
|
+
} catch {
|
|
6127
|
+
return [{ kind: "pluginError", message: "\u63D2\u4EF6\u6761\u76EE\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
|
|
6128
|
+
}
|
|
6129
|
+
}
|
|
6130
|
+
|
|
6131
|
+
// src/components/BrowserConnectionDialog.tsx
|
|
6132
|
+
import { useEffect as useEffect2, useRef as useRef2 } from "react";
|
|
6133
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
6134
|
+
function BrowserConnectionDialog({ client, name, label = "\u4E1A\u52A1\u8D26\u53F7", onClose }) {
|
|
6135
|
+
const dialog = useRef2(null);
|
|
6136
|
+
const frame = useRef2(null);
|
|
6137
|
+
const url = new URL(client.connectors.browserAuthorizationUrl(name), window.location.href);
|
|
6138
|
+
url.searchParams.set("embedded", "1");
|
|
6139
|
+
const origin = url.origin;
|
|
6140
|
+
useEffect2(() => {
|
|
6141
|
+
const element = dialog.current;
|
|
6142
|
+
element?.showModal();
|
|
6143
|
+
return () => element?.close();
|
|
6144
|
+
}, []);
|
|
6145
|
+
useEffect2(() => {
|
|
6146
|
+
if (!frame.current) return;
|
|
6147
|
+
return client.connectors.bindBrowserAuthorizationFrame(frame.current, name);
|
|
6148
|
+
}, [client, name]);
|
|
6149
|
+
useEffect2(() => {
|
|
6150
|
+
const receive = (event) => {
|
|
6151
|
+
if (event.origin === origin && event.source === frame.current?.contentWindow && event.data?.type === "blade:connector-auth-close") onClose();
|
|
6152
|
+
};
|
|
6153
|
+
window.addEventListener("message", receive);
|
|
6154
|
+
return () => window.removeEventListener("message", receive);
|
|
6155
|
+
}, [origin, onClose]);
|
|
6156
|
+
return /* @__PURE__ */ jsx3("dialog", { ref: dialog, "aria-label": `\u8FDE\u63A5 ${label}`, onCancel: (event) => {
|
|
6157
|
+
event.preventDefault();
|
|
6158
|
+
onClose();
|
|
6159
|
+
}, className: "fixed inset-0 m-auto h-[min(820px,90dvh)] max-h-none w-[min(960px,calc(100%_-_32px))] max-w-none overflow-hidden rounded-2xl border border-[hsl(var(--border))] bg-[hsl(var(--background))] p-0 text-[hsl(var(--foreground))] shadow-xl backdrop:bg-black/45", children: /* @__PURE__ */ jsxs2("div", { className: "flex h-full min-h-0 flex-col", children: [
|
|
6160
|
+
/* @__PURE__ */ jsxs2("header", { className: "flex shrink-0 items-center justify-between gap-3 border-b border-[hsl(var(--border))] px-4 py-3", children: [
|
|
6161
|
+
/* @__PURE__ */ jsxs2("h2", { className: "text-sm font-medium", children: [
|
|
6162
|
+
"\u8FDE\u63A5 ",
|
|
6163
|
+
label
|
|
6164
|
+
] }),
|
|
6165
|
+
/* @__PURE__ */ jsxs2("button", { type: "button", className: "inline-flex h-8 shrink-0 items-center justify-center gap-1.5 rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--background))] px-3 text-xs font-medium hover:bg-[hsl(var(--accent))]", onClick: onClose, children: [
|
|
6166
|
+
/* @__PURE__ */ jsx3(X, { size: 14, "aria-hidden": "true" }),
|
|
6167
|
+
"\u8FD4\u56DE\u8FDE\u63A5\u5668"
|
|
6168
|
+
] })
|
|
6169
|
+
] }),
|
|
6170
|
+
/* @__PURE__ */ jsx3("iframe", { ref: frame, title: `${label}\u767B\u5F55\u9875\u9762`, className: "min-h-0 w-full flex-1 border-0" })
|
|
6171
|
+
] }) });
|
|
6172
|
+
}
|
|
6173
|
+
|
|
6174
|
+
// src/chat/runtime/input-services.tsx
|
|
6175
|
+
import { createContext as createContext2, useContext as useContext2 } from "react";
|
|
6176
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
6177
|
+
function parseModelReasoningLevels(value) {
|
|
6178
|
+
if (!value) return {};
|
|
6179
|
+
try {
|
|
6180
|
+
const parsed = JSON.parse(value);
|
|
6181
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) return {};
|
|
6182
|
+
return Object.fromEntries(
|
|
6183
|
+
Object.entries(parsed).filter(
|
|
6184
|
+
(entry) => Boolean(entry[0]) && typeof entry[1] === "string" && Boolean(entry[1])
|
|
6185
|
+
)
|
|
6186
|
+
);
|
|
6187
|
+
} catch {
|
|
6188
|
+
return {};
|
|
6189
|
+
}
|
|
6190
|
+
}
|
|
6191
|
+
var RichInputServicesContext = createContext2({});
|
|
6192
|
+
function RichInputServicesProvider({ value, children }) {
|
|
6193
|
+
return /* @__PURE__ */ jsx4(RichInputServicesContext.Provider, { value, children });
|
|
6194
|
+
}
|
|
6195
|
+
function useRichInputServices() {
|
|
6196
|
+
return useContext2(RichInputServicesContext);
|
|
6197
|
+
}
|
|
6198
|
+
|
|
6199
|
+
// src/rich-input/lib/client-query.ts
|
|
6200
|
+
import { useCallback, useEffect as useEffect3, useSyncExternalStore } from "react";
|
|
6201
|
+
var EMPTY = { data: void 0, error: null, isLoading: false, isFetching: false };
|
|
6202
|
+
var caches = /* @__PURE__ */ new WeakMap();
|
|
6203
|
+
function entryFor(client, key) {
|
|
6204
|
+
let cache = caches.get(client);
|
|
6205
|
+
if (!cache) {
|
|
6206
|
+
const created = /* @__PURE__ */ new Map();
|
|
6207
|
+
cache = created;
|
|
6208
|
+
caches.set(client, created);
|
|
6209
|
+
onInputCachesReset(client, () => {
|
|
6210
|
+
for (const [key2, entry2] of created) {
|
|
6211
|
+
entry2.request = null;
|
|
6212
|
+
entry2.fetchedAt = 0;
|
|
6213
|
+
update(entry2, EMPTY);
|
|
6214
|
+
const load = loadersFor(client).get(key2);
|
|
6215
|
+
if (load && entry2.listeners.size > 0) void fetchClientQuery(client, key2, load, { force: true }).catch(() => {
|
|
6216
|
+
});
|
|
6217
|
+
}
|
|
6218
|
+
});
|
|
6219
|
+
}
|
|
6220
|
+
let entry = cache.get(key);
|
|
6221
|
+
if (!entry) {
|
|
6222
|
+
entry = { snapshot: EMPTY, fetchedAt: 0, request: null, listeners: /* @__PURE__ */ new Set() };
|
|
6223
|
+
cache.set(key, entry);
|
|
6224
|
+
}
|
|
6225
|
+
return entry;
|
|
6226
|
+
}
|
|
6227
|
+
function update(entry, patch) {
|
|
6228
|
+
entry.snapshot = { ...entry.snapshot, ...patch };
|
|
6229
|
+
for (const listener of [...entry.listeners]) listener();
|
|
6230
|
+
}
|
|
6231
|
+
function fetchClientQuery(client, key, load, { staleMs = 3e4, force = false } = {}) {
|
|
6232
|
+
const entry = entryFor(client, key);
|
|
6233
|
+
if (entry.request) return entry.request;
|
|
6234
|
+
if (!force && entry.snapshot.data !== void 0 && Date.now() - entry.fetchedAt < staleMs) {
|
|
6235
|
+
return Promise.resolve(entry.snapshot.data);
|
|
6236
|
+
}
|
|
6237
|
+
const request = Promise.resolve().then(() => load(client));
|
|
6238
|
+
entry.request = request;
|
|
6239
|
+
update(entry, { isFetching: true, isLoading: entry.snapshot.data === void 0 });
|
|
6240
|
+
request.then(
|
|
6241
|
+
(data) => {
|
|
6242
|
+
if (entry.request !== request) return;
|
|
6243
|
+
entry.request = null;
|
|
6244
|
+
entry.fetchedAt = Date.now();
|
|
6245
|
+
update(entry, { data, error: null, isFetching: false, isLoading: false });
|
|
6246
|
+
},
|
|
6247
|
+
(error) => {
|
|
6248
|
+
if (entry.request !== request) return;
|
|
6249
|
+
entry.request = null;
|
|
6250
|
+
update(entry, { error, isFetching: false, isLoading: false });
|
|
6251
|
+
}
|
|
6252
|
+
);
|
|
6253
|
+
return request;
|
|
6254
|
+
}
|
|
6255
|
+
function setClientQueryData(client, key, updater) {
|
|
6256
|
+
const entry = entryFor(client, key);
|
|
6257
|
+
if (entry.snapshot.data === void 0) return;
|
|
6258
|
+
update(entry, { data: updater(entry.snapshot.data) });
|
|
6259
|
+
}
|
|
6260
|
+
function useClientQuery(key, load, { staleMs = 3e4 } = {}) {
|
|
6261
|
+
const client = useBladeClient();
|
|
6262
|
+
const subscribe = useCallback(
|
|
6263
|
+
(listener) => {
|
|
6264
|
+
if (!key) return () => {
|
|
6265
|
+
};
|
|
6266
|
+
const entry = entryFor(client, key);
|
|
6267
|
+
entry.listeners.add(listener);
|
|
6268
|
+
return () => {
|
|
6269
|
+
entry.listeners.delete(listener);
|
|
6270
|
+
};
|
|
6271
|
+
},
|
|
6272
|
+
[client, key]
|
|
6273
|
+
);
|
|
6274
|
+
const snapshot = useSyncExternalStore(
|
|
6275
|
+
subscribe,
|
|
6276
|
+
() => key ? entryFor(client, key).snapshot : EMPTY,
|
|
6277
|
+
() => key ? entryFor(client, key).snapshot : EMPTY
|
|
6278
|
+
);
|
|
6279
|
+
if (key) loadersFor(client).set(key, load);
|
|
6280
|
+
useEffect3(() => {
|
|
6281
|
+
if (!key) return;
|
|
6282
|
+
const registered = loadersFor(client).get(key);
|
|
6283
|
+
if (registered) void fetchClientQuery(client, key, registered, { staleMs }).catch(() => {
|
|
6284
|
+
});
|
|
6285
|
+
}, [client, key, staleMs]);
|
|
6286
|
+
const refetch = useCallback(async () => {
|
|
6287
|
+
if (!key) return void 0;
|
|
6288
|
+
const registered = loadersFor(client).get(key);
|
|
6289
|
+
if (!registered) return void 0;
|
|
6290
|
+
return fetchClientQuery(client, key, registered, { force: true }).catch(() => void 0);
|
|
6291
|
+
}, [client, key]);
|
|
6292
|
+
return { ...snapshot, refetch };
|
|
6293
|
+
}
|
|
6294
|
+
var loaderRegistry = /* @__PURE__ */ new WeakMap();
|
|
6295
|
+
function loadersFor(client) {
|
|
6296
|
+
let loaders = loaderRegistry.get(client);
|
|
6297
|
+
if (!loaders) {
|
|
6298
|
+
loaders = /* @__PURE__ */ new Map();
|
|
6299
|
+
loaderRegistry.set(client, loaders);
|
|
6300
|
+
}
|
|
6301
|
+
return loaders;
|
|
6302
|
+
}
|
|
6303
|
+
function refreshClientQuery(client, key) {
|
|
6304
|
+
const entry = caches.get(client)?.get(key);
|
|
6305
|
+
if (!entry) return;
|
|
6306
|
+
entry.fetchedAt = 0;
|
|
6307
|
+
const load = loadersFor(client).get(key);
|
|
6308
|
+
if (load && entry.listeners.size > 0) void fetchClientQuery(client, key, load, { force: true }).catch(() => {
|
|
6309
|
+
});
|
|
6310
|
+
}
|
|
6311
|
+
|
|
6312
|
+
// src/rich-input/lib/session-data.ts
|
|
6313
|
+
import { useEffect as useEffect5, useRef as useRef4 } from "react";
|
|
6314
|
+
|
|
6315
|
+
// src/chat/runtime/session-source.tsx
|
|
6316
|
+
import { createInitialSessionState } from "@blade-hq/agent-client/internal";
|
|
6317
|
+
import {
|
|
6318
|
+
createContext as createContext3,
|
|
6319
|
+
useContext as useContext3,
|
|
6320
|
+
useEffect as useEffect4,
|
|
6321
|
+
useLayoutEffect,
|
|
6322
|
+
useMemo,
|
|
6323
|
+
useRef as useRef3,
|
|
6324
|
+
useState as useState2,
|
|
6325
|
+
useSyncExternalStore as useSyncExternalStore2
|
|
6326
|
+
} from "react";
|
|
6327
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
6328
|
+
var EMPTY_SOURCE = {
|
|
6329
|
+
subscribe: () => () => {
|
|
6330
|
+
},
|
|
6331
|
+
getSession: () => void 0,
|
|
6332
|
+
isHistoryLoading: () => false,
|
|
6333
|
+
planRevealRevision: () => 0
|
|
6334
|
+
};
|
|
6335
|
+
var SessionSourceContext = createContext3(EMPTY_SOURCE);
|
|
6336
|
+
function SessionSourceProvider({ source, children }) {
|
|
6337
|
+
return /* @__PURE__ */ jsx5(SessionSourceContext.Provider, { value: source, children });
|
|
6338
|
+
}
|
|
6339
|
+
function useSessionSource() {
|
|
6340
|
+
return useContext3(SessionSourceContext);
|
|
6341
|
+
}
|
|
6342
|
+
var SingleSessionSource = class {
|
|
6343
|
+
session = null;
|
|
6344
|
+
loading = false;
|
|
6345
|
+
listeners = /* @__PURE__ */ new Set();
|
|
6346
|
+
revisions = /* @__PURE__ */ new Map();
|
|
6347
|
+
subscribe = (listener) => {
|
|
6348
|
+
this.listeners.add(listener);
|
|
6349
|
+
return () => {
|
|
6350
|
+
this.listeners.delete(listener);
|
|
6351
|
+
};
|
|
6352
|
+
};
|
|
6353
|
+
getSession = (sessionId) => {
|
|
6354
|
+
const current = this.session;
|
|
6355
|
+
return current && (!sessionId || current.sessionId === sessionId) ? current : void 0;
|
|
6356
|
+
};
|
|
6357
|
+
isHistoryLoading = (sessionId) => {
|
|
6358
|
+
if (!this.session) return this.loading;
|
|
6359
|
+
return (!sessionId || this.session.sessionId === sessionId) && this.loading;
|
|
6360
|
+
};
|
|
6361
|
+
planRevealRevision = (sessionId) => sessionId ? this.revisions.get(sessionId) ?? 0 : 0;
|
|
6362
|
+
update(session, loading) {
|
|
6363
|
+
if (this.session === session && this.loading === loading) return;
|
|
6364
|
+
this.session = session;
|
|
6365
|
+
this.loading = loading;
|
|
6366
|
+
this.notify();
|
|
6367
|
+
}
|
|
6368
|
+
watchPlan(session) {
|
|
6369
|
+
return session.on("toolResult", ({ toolCall, turn, source }) => {
|
|
6370
|
+
if (source === "reconnect_replay" || (turn.loop_id || "root") !== "root" || toolCall.status !== "done" || !isPlanUpdateTool(toolCall) || !parsePlanUpdate(toolCall.arguments)) {
|
|
6371
|
+
return;
|
|
6372
|
+
}
|
|
6373
|
+
this.revisions.set(session.sessionId, (this.revisions.get(session.sessionId) ?? 0) + 1);
|
|
6374
|
+
this.notify();
|
|
6375
|
+
});
|
|
6376
|
+
}
|
|
6377
|
+
notify() {
|
|
6378
|
+
for (const listener of [...this.listeners]) listener();
|
|
6379
|
+
}
|
|
6380
|
+
};
|
|
6381
|
+
function useSingleSessionSource(session, loading) {
|
|
6382
|
+
const [source] = useState2(() => new SingleSessionSource());
|
|
6383
|
+
useLayoutEffect(() => {
|
|
6384
|
+
source.update(session, loading);
|
|
6385
|
+
}, [source, session, loading]);
|
|
6386
|
+
useEffect4(() => session ? source.watchPlan(session) : void 0, [source, session]);
|
|
6387
|
+
return source;
|
|
6388
|
+
}
|
|
6389
|
+
var EMPTY_STATE = createInitialSessionState("");
|
|
6390
|
+
var noopSubscribe = () => () => {
|
|
6391
|
+
};
|
|
6392
|
+
function useSessionHandle(sessionId) {
|
|
6393
|
+
const source = useSessionSource();
|
|
6394
|
+
return useSyncExternalStore2(
|
|
6395
|
+
source.subscribe,
|
|
6396
|
+
() => source.getSession(sessionId) ?? null,
|
|
6397
|
+
() => source.getSession(sessionId) ?? null
|
|
6398
|
+
);
|
|
6399
|
+
}
|
|
6400
|
+
function useSessionState(sessionId, selector) {
|
|
6401
|
+
const session = useSessionHandle(sessionId);
|
|
6402
|
+
const selectorRef = useRef3(selector);
|
|
6403
|
+
selectorRef.current = selector;
|
|
6404
|
+
const store = useMemo(() => {
|
|
6405
|
+
let lastState = null;
|
|
6406
|
+
let lastSelector = null;
|
|
6407
|
+
let lastSelected;
|
|
6408
|
+
const getSnapshot = () => {
|
|
6409
|
+
const state = session ? session.getState() : EMPTY_STATE;
|
|
6410
|
+
const current = selectorRef.current;
|
|
6411
|
+
if (state !== lastState || current !== lastSelector) {
|
|
6412
|
+
const next = current(state);
|
|
6413
|
+
if (!(lastState !== null && Object.is(next, lastSelected))) lastSelected = next;
|
|
6414
|
+
lastState = state;
|
|
6415
|
+
lastSelector = current;
|
|
6416
|
+
}
|
|
6417
|
+
return lastSelected;
|
|
6418
|
+
};
|
|
6419
|
+
return {
|
|
6420
|
+
subscribe: session ? (listener) => session.subscribe(listener) : noopSubscribe,
|
|
6421
|
+
getSnapshot
|
|
6422
|
+
};
|
|
6423
|
+
}, [session]);
|
|
6424
|
+
return useSyncExternalStore2(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
6425
|
+
}
|
|
6426
|
+
function useIsSessionHistoryLoading(sessionId) {
|
|
6427
|
+
const source = useSessionSource();
|
|
6428
|
+
return useSyncExternalStore2(
|
|
6429
|
+
source.subscribe,
|
|
6430
|
+
() => source.isHistoryLoading(sessionId),
|
|
6431
|
+
() => source.isHistoryLoading(sessionId)
|
|
6432
|
+
);
|
|
6433
|
+
}
|
|
6434
|
+
function usePlanRevealRevision(sessionId) {
|
|
6435
|
+
const source = useSessionSource();
|
|
6436
|
+
return useSyncExternalStore2(
|
|
6437
|
+
source.subscribe,
|
|
6438
|
+
() => source.planRevealRevision(sessionId),
|
|
6439
|
+
() => source.planRevealRevision(sessionId)
|
|
6440
|
+
);
|
|
6441
|
+
}
|
|
6442
|
+
var CurrentChatSessionContext = createContext3(null);
|
|
6443
|
+
function CurrentChatSessionProvider({ sessionId, children }) {
|
|
6444
|
+
return /* @__PURE__ */ jsx5(CurrentChatSessionContext.Provider, { value: sessionId, children });
|
|
6445
|
+
}
|
|
6446
|
+
function useCurrentChatSessionId() {
|
|
6447
|
+
return useContext3(CurrentChatSessionContext);
|
|
6448
|
+
}
|
|
6449
|
+
|
|
6450
|
+
// src/rich-input/lib/session-data.ts
|
|
6451
|
+
var sessionPath = (sessionId, rest) => `/api/sessions/${encodeURIComponent(sessionId)}/${rest}`;
|
|
6452
|
+
function useRefreshWhenRunEnds(sessionId, keys2) {
|
|
6453
|
+
const client = useBladeClient();
|
|
6454
|
+
const streaming = useSessionState(sessionId, (state) => state.isStreaming);
|
|
6455
|
+
const wasStreaming = useRef4(streaming);
|
|
6456
|
+
useEffect5(() => {
|
|
6457
|
+
if (wasStreaming.current && !streaming) {
|
|
6458
|
+
for (const key of keys2) refreshClientQuery(client, key);
|
|
6459
|
+
}
|
|
6460
|
+
wasStreaming.current = streaming;
|
|
6461
|
+
});
|
|
6462
|
+
}
|
|
6463
|
+
function useClientSessionSkills(sessionId) {
|
|
6464
|
+
const key = sessionId ? `session-skills:${sessionId}` : null;
|
|
6465
|
+
const query = useClientQuery(
|
|
6466
|
+
key,
|
|
6467
|
+
(client) => client.json("GET", sessionPath(sessionId ?? "", "skills"))
|
|
6468
|
+
);
|
|
6469
|
+
useRefreshWhenRunEnds(sessionId, key ? [key] : []);
|
|
6470
|
+
return { data: query.data, loading: query.isLoading, error: query.error };
|
|
6471
|
+
}
|
|
6472
|
+
function useClientSkillStats(sessionId) {
|
|
6473
|
+
const key = sessionId ? `skill-stats:${sessionId}` : null;
|
|
6474
|
+
const query = useClientQuery(key, (client) => client.json("GET", sessionPath(sessionId ?? "", "skill-stats")), {
|
|
6475
|
+
staleMs: 3e5
|
|
6476
|
+
});
|
|
6477
|
+
useRefreshWhenRunEnds(sessionId, key ? [key] : []);
|
|
6478
|
+
return { data: query.data, loading: query.isLoading, error: query.error };
|
|
6479
|
+
}
|
|
6480
|
+
function useClientContextStats(sessionId) {
|
|
6481
|
+
const key = sessionId ? `context-stats:${sessionId}` : null;
|
|
6482
|
+
const query = useClientQuery(
|
|
6483
|
+
key,
|
|
6484
|
+
(client) => client.json("GET", sessionPath(sessionId ?? "", "context-stats"))
|
|
6485
|
+
);
|
|
6486
|
+
useRefreshWhenRunEnds(sessionId, key ? [key] : []);
|
|
6487
|
+
return { data: query.data, loading: query.isLoading, error: query.error };
|
|
6488
|
+
}
|
|
6489
|
+
function useClientBackgroundTasks(sessionId) {
|
|
6490
|
+
const client = useBladeClient();
|
|
6491
|
+
const key = sessionId ? `background-tasks:${sessionId}` : null;
|
|
6492
|
+
const query = useClientQuery(key, (c) => c.sessions.listBackgroundTasks(sessionId ?? ""));
|
|
6493
|
+
const session = useSessionHandle(sessionId);
|
|
6494
|
+
useEffect5(() => {
|
|
6495
|
+
if (!session || !key) return;
|
|
6496
|
+
return session.on("backgroundTask", () => refreshClientQuery(client, key));
|
|
6497
|
+
}, [client, key, session]);
|
|
6498
|
+
return { data: query.data, loading: query.isLoading, error: query.error };
|
|
6499
|
+
}
|
|
6500
|
+
function refreshClientSessionSkills(client, sessionId) {
|
|
6501
|
+
refreshClientQuery(client, `session-skills:${sessionId}`);
|
|
6502
|
+
refreshClientQuery(client, `skill-stats:${sessionId}`);
|
|
6503
|
+
}
|
|
6504
|
+
function useClientSessionModel(sessionId) {
|
|
6505
|
+
const key = sessionId ? `session-detail:${sessionId}` : null;
|
|
6506
|
+
const query = useClientQuery(key, (client) => client.sessions.getSession(sessionId ?? ""));
|
|
6507
|
+
useRefreshWhenRunEnds(sessionId, key ? [key] : []);
|
|
6508
|
+
return query.data?.model ?? null;
|
|
6509
|
+
}
|
|
6510
|
+
|
|
6511
|
+
// src/rich-input/model/model-data.ts
|
|
6512
|
+
var EMPTY_MODELS = [];
|
|
6513
|
+
var EMPTY_IDS = [];
|
|
6514
|
+
var CATALOG_KEY = "model-catalog";
|
|
6515
|
+
function useClientModelCatalog() {
|
|
6516
|
+
const { data, isLoading, isFetching, refetch } = useClientQuery(
|
|
6517
|
+
CATALOG_KEY,
|
|
6518
|
+
(client) => client.json("GET", "/api/config/models"),
|
|
6519
|
+
{ staleMs: 0 }
|
|
6520
|
+
);
|
|
6521
|
+
return {
|
|
6522
|
+
models: data?.models ?? EMPTY_MODELS,
|
|
6523
|
+
defaultModel: data?.default ?? "",
|
|
6524
|
+
thinkingAvailable: data?.thinkingAvailable ?? false,
|
|
6525
|
+
unavailableProviderIds: data?.unavailableProviderIds ?? EMPTY_IDS,
|
|
6526
|
+
unavailableModelIds: data?.unavailableModelIds ?? EMPTY_IDS,
|
|
6527
|
+
isLoading,
|
|
6528
|
+
isFetching,
|
|
6529
|
+
refresh: async () => {
|
|
6530
|
+
await refetch();
|
|
6531
|
+
}
|
|
6532
|
+
};
|
|
6533
|
+
}
|
|
6534
|
+
var PREFERRED_MODEL_KEY = "preferred_model";
|
|
6535
|
+
var MODEL_REASONING_LEVELS_KEY = "llm.model_thinking_preferences";
|
|
6536
|
+
var PREFERENCES_KEY = "model-preferences";
|
|
6537
|
+
function loadPreferences(client) {
|
|
6538
|
+
const query = new URLSearchParams();
|
|
6539
|
+
query.append("key", PREFERRED_MODEL_KEY);
|
|
6540
|
+
query.append("key", MODEL_REASONING_LEVELS_KEY);
|
|
6541
|
+
return client.json("GET", `/api/user/preferences?${query.toString()}`).then((response) => response.values ?? {});
|
|
6542
|
+
}
|
|
6543
|
+
async function writePreference(client, key, value) {
|
|
6544
|
+
const previous = await fetchClientQuery(client, PREFERENCES_KEY, loadPreferences, { staleMs: 6e4 }).catch(
|
|
6545
|
+
() => ({})
|
|
6546
|
+
);
|
|
6547
|
+
setClientQueryData(client, PREFERENCES_KEY, (current) => ({ ...current, [key]: value }));
|
|
6548
|
+
try {
|
|
6549
|
+
await client.json("PUT", `/api/user/preferences/${encodeURIComponent(key)}`, { value });
|
|
6550
|
+
} catch {
|
|
6551
|
+
setClientQueryData(client, PREFERENCES_KEY, (current) => ({ ...current, [key]: previous[key] ?? null }));
|
|
6552
|
+
}
|
|
6553
|
+
}
|
|
6554
|
+
var EMPTY_LEVELS = {};
|
|
6555
|
+
function useClientModelPreferences() {
|
|
6556
|
+
const client = useBladeClient();
|
|
6557
|
+
const { data } = useClientQuery(PREFERENCES_KEY, loadPreferences, { staleMs: 6e4 });
|
|
6558
|
+
const rawLevels = data?.[MODEL_REASONING_LEVELS_KEY] ?? null;
|
|
6559
|
+
const reasoningLevels = rawLevels ? parseModelReasoningLevels(rawLevels) : EMPTY_LEVELS;
|
|
6560
|
+
return {
|
|
6561
|
+
preferredModel: data?.[PREFERRED_MODEL_KEY] ?? null,
|
|
6562
|
+
setPreferredModel: (modelId) => void writePreference(client, PREFERRED_MODEL_KEY, modelId),
|
|
6563
|
+
reasoningLevels,
|
|
6564
|
+
setReasoningLevel: (modelId, level) => {
|
|
6565
|
+
if (!modelId) return;
|
|
6566
|
+
void writePreference(
|
|
6567
|
+
client,
|
|
6568
|
+
MODEL_REASONING_LEVELS_KEY,
|
|
6569
|
+
JSON.stringify({ ...reasoningLevels, [modelId]: level })
|
|
6570
|
+
);
|
|
6571
|
+
}
|
|
6572
|
+
};
|
|
6573
|
+
}
|
|
6574
|
+
|
|
6575
|
+
// src/rich-input/services.tsx
|
|
6576
|
+
import { useMemo as useMemo2, useRef as useRef5 } from "react";
|
|
6577
|
+
function useModelCatalog() {
|
|
6578
|
+
const use = useRichInputServices().useModelCatalog ?? useClientModelCatalog;
|
|
6579
|
+
return use();
|
|
6580
|
+
}
|
|
6581
|
+
function useModelPreferences() {
|
|
6582
|
+
const use = useRichInputServices().useModelPreferences ?? useClientModelPreferences;
|
|
6583
|
+
return use();
|
|
6584
|
+
}
|
|
6585
|
+
function useSessionConnection(sessionId) {
|
|
6586
|
+
const connection = useSessionState(sessionId, (state) => state.connection);
|
|
6587
|
+
const status = sessionId ? connection : "connected";
|
|
6588
|
+
const everConnected = useRef5(false);
|
|
6589
|
+
if (status === "connected") everConnected.current = true;
|
|
6590
|
+
return { status, reconnectAttempt: 0, hasEverConnected: everConnected.current };
|
|
6591
|
+
}
|
|
6592
|
+
function useComposerConnectionInfo(sessionId) {
|
|
6593
|
+
const use = useRichInputServices().useConnection ?? useSessionConnection;
|
|
6594
|
+
return use(sessionId);
|
|
6595
|
+
}
|
|
6596
|
+
function useComposerConnection(sessionId) {
|
|
6597
|
+
return useComposerConnectionInfo(sessionId).status;
|
|
6598
|
+
}
|
|
6599
|
+
function useSessionSkills(sessionId) {
|
|
6600
|
+
const use = useRichInputServices().useSessionSkills ?? useClientSessionSkills;
|
|
6601
|
+
return use(sessionId);
|
|
6602
|
+
}
|
|
6603
|
+
function useSkillStats(sessionId) {
|
|
6604
|
+
const use = useRichInputServices().useSkillStats ?? useClientSkillStats;
|
|
6605
|
+
return use(sessionId);
|
|
6606
|
+
}
|
|
6607
|
+
function useContextStats(sessionId) {
|
|
6608
|
+
const use = useRichInputServices().useContextStats ?? useClientContextStats;
|
|
6609
|
+
return use(sessionId);
|
|
6610
|
+
}
|
|
6611
|
+
function useBackgroundTaskList(sessionId) {
|
|
6612
|
+
const use = useRichInputServices().useBackgroundTasks ?? useClientBackgroundTasks;
|
|
6613
|
+
return use(sessionId);
|
|
6614
|
+
}
|
|
6615
|
+
function useClientSessionDataInvalidation() {
|
|
6616
|
+
const client = useBladeClient();
|
|
6617
|
+
return useMemo2(
|
|
6618
|
+
() => ({
|
|
6619
|
+
filesUploaded: (_sessionId) => {
|
|
6620
|
+
},
|
|
6621
|
+
pluginsChanged: (sessionId) => refreshClientSessionSkills(client, sessionId)
|
|
6622
|
+
}),
|
|
6623
|
+
[client]
|
|
6624
|
+
);
|
|
6625
|
+
}
|
|
6626
|
+
function useSessionDataInvalidation() {
|
|
6627
|
+
const use = useRichInputServices().useSessionDataInvalidation ?? useClientSessionDataInvalidation;
|
|
6628
|
+
return use();
|
|
6629
|
+
}
|
|
6630
|
+
|
|
6439
6631
|
// ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
6440
6632
|
function deepCompareStrict(a, b) {
|
|
6441
6633
|
const typeofa = typeof a;
|
|
@@ -7646,7 +7838,7 @@ function canExpand(schema, uiSchema = {}, formData) {
|
|
|
7646
7838
|
}
|
|
7647
7839
|
|
|
7648
7840
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/isPlainObject.js
|
|
7649
|
-
function
|
|
7841
|
+
function isPlainObject2(thing) {
|
|
7650
7842
|
if (typeof thing !== "object" || thing === null) {
|
|
7651
7843
|
return false;
|
|
7652
7844
|
}
|
|
@@ -11540,7 +11732,7 @@ var ErrorSchemaBuilder = class {
|
|
|
11540
11732
|
|
|
11541
11733
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/getChangedFields.js
|
|
11542
11734
|
function getChangedDescendants(a, b) {
|
|
11543
|
-
if (
|
|
11735
|
+
if (isPlainObject2(a) && isPlainObject2(b)) {
|
|
11544
11736
|
return getChangedFields(a, b, true);
|
|
11545
11737
|
}
|
|
11546
11738
|
if (Array.isArray(a) && Array.isArray(b) && a.length === b.length) {
|
|
@@ -11558,10 +11750,10 @@ function getChangedFields(a, b, deep = false) {
|
|
|
11558
11750
|
if (a === b) {
|
|
11559
11751
|
return [];
|
|
11560
11752
|
}
|
|
11561
|
-
if (!
|
|
11562
|
-
return
|
|
11753
|
+
if (!isPlainObject2(a)) {
|
|
11754
|
+
return isPlainObject2(b) ? Object.keys(b) : [];
|
|
11563
11755
|
}
|
|
11564
|
-
if (!
|
|
11756
|
+
if (!isPlainObject2(b)) {
|
|
11565
11757
|
return Object.keys(a);
|
|
11566
11758
|
}
|
|
11567
11759
|
const aKeys = Object.keys(a);
|
|
@@ -12152,7 +12344,7 @@ function errorsFrom(errorSchema, fieldPath) {
|
|
|
12152
12344
|
const errorList = Array.isArray(errors) ? errors.map((message) => ({ property, message, stack: `${property} ${message}` })) : [];
|
|
12153
12345
|
return Object.keys(errorSchema).reduce((currentList, key) => {
|
|
12154
12346
|
const childSchema = errorSchema[key];
|
|
12155
|
-
if (key !== ERRORS_KEY &&
|
|
12347
|
+
if (key !== ERRORS_KEY && isPlainObject2(childSchema)) {
|
|
12156
12348
|
return currentList.concat(errorsFrom(childSchema, [...fieldPath, key]));
|
|
12157
12349
|
}
|
|
12158
12350
|
return currentList;
|
|
@@ -12174,7 +12366,7 @@ function toFieldPathId(fieldPath, globalFormOptions, parentPath, isMultiValue) {
|
|
|
12174
12366
|
|
|
12175
12367
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useAltDateWidgetProps.js
|
|
12176
12368
|
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
12177
|
-
import { useCallback, useEffect as
|
|
12369
|
+
import { useCallback as useCallback2, useEffect as useEffect6, useMemo as useMemo3, useState as useState3 } from "react";
|
|
12178
12370
|
function readyForChange(state) {
|
|
12179
12371
|
return Object.values(state).every((value) => value !== -1);
|
|
12180
12372
|
}
|
|
@@ -12182,16 +12374,16 @@ function DateElement(props) {
|
|
|
12182
12374
|
const { className = "form-control", type, range, value, select, rootId, name, disabled, readonly, autofocus, registry, onBlur, onFocus } = props;
|
|
12183
12375
|
const id = `${rootId}_${type}`;
|
|
12184
12376
|
const { SelectWidget: SelectWidget2 } = registry.widgets;
|
|
12185
|
-
const onChange =
|
|
12377
|
+
const onChange = useCallback2((newValue) => select(type, newValue), [select, type]);
|
|
12186
12378
|
return _jsx3(SelectWidget2, { schema: { type: "integer" }, id, name, className, options: { enumOptions: dateRangeOptions(range[0], range[1]) }, placeholder: type, value, disabled, readonly, autofocus, onChange, onBlur, onFocus, registry, label: "", "aria-describedby": ariaDescribedByIds(rootId) });
|
|
12187
12379
|
}
|
|
12188
12380
|
function useAltDateWidgetProps(props) {
|
|
12189
12381
|
const { time: time2 = false, disabled = false, readonly = false, options, onChange, value } = props;
|
|
12190
12382
|
const [state, setState] = useState3(parseDateString(value, time2));
|
|
12191
|
-
|
|
12383
|
+
useEffect6(() => {
|
|
12192
12384
|
setState(parseDateString(value, time2));
|
|
12193
12385
|
}, [time2, value]);
|
|
12194
|
-
const handleChange =
|
|
12386
|
+
const handleChange = useCallback2((property, newValue) => {
|
|
12195
12387
|
const nextState = {
|
|
12196
12388
|
...state,
|
|
12197
12389
|
[property]: typeof newValue === "undefined" ? -1 : newValue
|
|
@@ -12202,14 +12394,14 @@ function useAltDateWidgetProps(props) {
|
|
|
12202
12394
|
setState(nextState);
|
|
12203
12395
|
}
|
|
12204
12396
|
}, [state, onChange, time2]);
|
|
12205
|
-
const handleClear =
|
|
12397
|
+
const handleClear = useCallback2((event) => {
|
|
12206
12398
|
event.preventDefault();
|
|
12207
12399
|
if (disabled || readonly) {
|
|
12208
12400
|
return;
|
|
12209
12401
|
}
|
|
12210
12402
|
onChange(void 0);
|
|
12211
12403
|
}, [disabled, readonly, onChange]);
|
|
12212
|
-
const handleSetNow =
|
|
12404
|
+
const handleSetNow = useCallback2((event) => {
|
|
12213
12405
|
event.preventDefault();
|
|
12214
12406
|
if (disabled || readonly) {
|
|
12215
12407
|
return;
|
|
@@ -12222,9 +12414,9 @@ function useAltDateWidgetProps(props) {
|
|
|
12222
12414
|
}
|
|
12223
12415
|
|
|
12224
12416
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useDeepCompareMemo.js
|
|
12225
|
-
import { useRef as
|
|
12417
|
+
import { useRef as useRef6 } from "react";
|
|
12226
12418
|
function useDeepCompareMemo(newValue) {
|
|
12227
|
-
const valueRef =
|
|
12419
|
+
const valueRef = useRef6(newValue);
|
|
12228
12420
|
if (!deepEquals_default(newValue, valueRef.current)) {
|
|
12229
12421
|
valueRef.current = newValue;
|
|
12230
12422
|
}
|
|
@@ -12232,7 +12424,7 @@ function useDeepCompareMemo(newValue) {
|
|
|
12232
12424
|
}
|
|
12233
12425
|
|
|
12234
12426
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useFileWidgetProps.js
|
|
12235
|
-
import { useCallback as
|
|
12427
|
+
import { useCallback as useCallback3, useMemo as useMemo4 } from "react";
|
|
12236
12428
|
function addNameToDataURL(dataURL, name) {
|
|
12237
12429
|
return dataURL.replace(";base64", `;name=${encodeURIComponent(name)};base64`);
|
|
12238
12430
|
}
|
|
@@ -12293,7 +12485,7 @@ function useFileWidgetProps(value, onChange, multiple = false) {
|
|
|
12293
12485
|
return [];
|
|
12294
12486
|
}, [value, multiple]);
|
|
12295
12487
|
const filesInfo = useMemo4(() => Array.isArray(value) ? extractFileInfo(value) : extractFileInfo([value || ""]), [value]);
|
|
12296
|
-
const handleChange =
|
|
12488
|
+
const handleChange = useCallback3(async (files) => {
|
|
12297
12489
|
const filesInfoEvent = await processFiles(files);
|
|
12298
12490
|
const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL || null);
|
|
12299
12491
|
if (multiple) {
|
|
@@ -12302,7 +12494,7 @@ function useFileWidgetProps(value, onChange, multiple = false) {
|
|
|
12302
12494
|
onChange(newValue[0]);
|
|
12303
12495
|
}
|
|
12304
12496
|
}, [values, multiple, onChange]);
|
|
12305
|
-
const handleRemove =
|
|
12497
|
+
const handleRemove = useCallback3((index2) => {
|
|
12306
12498
|
if (multiple) {
|
|
12307
12499
|
const newValue = values.filter((_, i) => i !== index2);
|
|
12308
12500
|
onChange(newValue);
|
|
@@ -12418,7 +12610,7 @@ var TranslatableString;
|
|
|
12418
12610
|
|
|
12419
12611
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/ArrayField.js
|
|
12420
12612
|
import { jsx as _jsx4 } from "react/jsx-runtime";
|
|
12421
|
-
import { memo, useCallback as
|
|
12613
|
+
import { memo, useCallback as useCallback4, useMemo as useMemo5, useRef as useRef7, useState as useState4 } from "react";
|
|
12422
12614
|
var rowIdCounter = 0;
|
|
12423
12615
|
function generateRowId() {
|
|
12424
12616
|
rowIdCounter += 1;
|
|
@@ -12528,19 +12720,19 @@ function ArrayFieldItemInner(props) {
|
|
|
12528
12720
|
toolbar: false
|
|
12529
12721
|
};
|
|
12530
12722
|
has.toolbar = Object.keys(has).some((key) => has[key]);
|
|
12531
|
-
const onAddItem =
|
|
12723
|
+
const onAddItem = useCallback4((event) => {
|
|
12532
12724
|
handleAddItem(event, index2 + 1);
|
|
12533
12725
|
}, [handleAddItem, index2]);
|
|
12534
|
-
const onCopyItem =
|
|
12726
|
+
const onCopyItem = useCallback4((event) => {
|
|
12535
12727
|
handleCopyItem(event, index2);
|
|
12536
12728
|
}, [handleCopyItem, index2]);
|
|
12537
|
-
const onRemoveItem =
|
|
12729
|
+
const onRemoveItem = useCallback4((event) => {
|
|
12538
12730
|
handleRemoveItem(event, index2);
|
|
12539
12731
|
}, [handleRemoveItem, index2]);
|
|
12540
|
-
const onMoveUpItem =
|
|
12732
|
+
const onMoveUpItem = useCallback4((event) => {
|
|
12541
12733
|
handleReorderItems(event, index2, index2 - 1);
|
|
12542
12734
|
}, [handleReorderItems, index2]);
|
|
12543
|
-
const onMoveDownItem =
|
|
12735
|
+
const onMoveDownItem = useCallback4((event) => {
|
|
12544
12736
|
handleReorderItems(event, index2, index2 + 1);
|
|
12545
12737
|
}, [handleReorderItems, index2]);
|
|
12546
12738
|
const templateProps = {
|
|
@@ -12759,7 +12951,7 @@ function useKeyedFormData(formData = []) {
|
|
|
12759
12951
|
formDataHash = newHash;
|
|
12760
12952
|
setState({ formDataHash, keyedFormData });
|
|
12761
12953
|
}
|
|
12762
|
-
const updateKeyedFormData =
|
|
12954
|
+
const updateKeyedFormData = useCallback4((newData) => {
|
|
12763
12955
|
const plainFormData = keyedToPlainFormData(newData);
|
|
12764
12956
|
const updatedHash = hashObject(plainFormData);
|
|
12765
12957
|
setState({ formDataHash: updatedHash, keyedFormData: newData });
|
|
@@ -12771,12 +12963,12 @@ function ArrayField(props) {
|
|
|
12771
12963
|
const { schema, uiSchema, errorSchema, fieldPathId, registry, formData, onChange } = props;
|
|
12772
12964
|
const { globalFormOptions, schemaUtils, translateString } = registry;
|
|
12773
12965
|
const { keyedFormData, updateKeyedFormData } = useKeyedFormData(formData);
|
|
12774
|
-
const keyedFormDataRef =
|
|
12966
|
+
const keyedFormDataRef = useRef7(keyedFormData);
|
|
12775
12967
|
keyedFormDataRef.current = keyedFormData;
|
|
12776
|
-
const errorSchemaRef =
|
|
12968
|
+
const errorSchemaRef = useRef7(errorSchema);
|
|
12777
12969
|
errorSchemaRef.current = errorSchema;
|
|
12778
12970
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
12779
|
-
const handleAddItem =
|
|
12971
|
+
const handleAddItem = useCallback4((event, index2) => {
|
|
12780
12972
|
if (event) {
|
|
12781
12973
|
event.preventDefault();
|
|
12782
12974
|
}
|
|
@@ -12804,7 +12996,7 @@ function ArrayField(props) {
|
|
|
12804
12996
|
}
|
|
12805
12997
|
onChange(updateKeyedFormData(newKeyedFormData), childFieldPathId.path, newErrorSchema);
|
|
12806
12998
|
}, [registry, schema, onChange, updateKeyedFormData, childFieldPathId]);
|
|
12807
|
-
const handleCopyItem =
|
|
12999
|
+
const handleCopyItem = useCallback4((event, index2) => {
|
|
12808
13000
|
if (event) {
|
|
12809
13001
|
event.preventDefault();
|
|
12810
13002
|
}
|
|
@@ -12832,7 +13024,7 @@ function ArrayField(props) {
|
|
|
12832
13024
|
}
|
|
12833
13025
|
onChange(updateKeyedFormData(newKeyedFormData), childFieldPathId.path, newErrorSchema);
|
|
12834
13026
|
}, [onChange, updateKeyedFormData, childFieldPathId]);
|
|
12835
|
-
const handleRemoveItem =
|
|
13027
|
+
const handleRemoveItem = useCallback4((event, index2) => {
|
|
12836
13028
|
if (event) {
|
|
12837
13029
|
event.preventDefault();
|
|
12838
13030
|
}
|
|
@@ -12851,7 +13043,7 @@ function ArrayField(props) {
|
|
|
12851
13043
|
const newKeyedFormData = keyedFormDataRef.current.filter((_, i) => i !== index2);
|
|
12852
13044
|
onChange(updateKeyedFormData(newKeyedFormData), childFieldPathId.path, newErrorSchema);
|
|
12853
13045
|
}, [onChange, updateKeyedFormData, childFieldPathId]);
|
|
12854
|
-
const handleReorderItems =
|
|
13046
|
+
const handleReorderItems = useCallback4((event, index2, newIndex) => {
|
|
12855
13047
|
if (event) {
|
|
12856
13048
|
event.preventDefault();
|
|
12857
13049
|
event.currentTarget.blur();
|
|
@@ -12879,7 +13071,7 @@ function ArrayField(props) {
|
|
|
12879
13071
|
const newKeyedFormData = reOrderArray();
|
|
12880
13072
|
onChange(updateKeyedFormData(newKeyedFormData), childFieldPathId.path, newErrorSchema);
|
|
12881
13073
|
}, [onChange, updateKeyedFormData, childFieldPathId]);
|
|
12882
|
-
const handleChange =
|
|
13074
|
+
const handleChange = useCallback4((value, path, newErrorSchema, id) => {
|
|
12883
13075
|
const lastPathIsItemIndex = typeof path.at(-1) === "number";
|
|
12884
13076
|
onChange(
|
|
12885
13077
|
// We need to treat undefined items as nulls to have validation.
|
|
@@ -12891,7 +13083,7 @@ function ArrayField(props) {
|
|
|
12891
13083
|
id
|
|
12892
13084
|
);
|
|
12893
13085
|
}, [onChange]);
|
|
12894
|
-
const onSelectChange =
|
|
13086
|
+
const onSelectChange = useCallback4((value) => {
|
|
12895
13087
|
onChange(value, childFieldPathId.path, void 0, childFieldPathId?.[ID_KEY]);
|
|
12896
13088
|
}, [onChange, childFieldPathId]);
|
|
12897
13089
|
const arrayAsMultiProps = {
|
|
@@ -12936,7 +13128,7 @@ function ArrayField(props) {
|
|
|
12936
13128
|
|
|
12937
13129
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/BooleanField.js
|
|
12938
13130
|
import { jsx as _jsx5 } from "react/jsx-runtime";
|
|
12939
|
-
import { useCallback as
|
|
13131
|
+
import { useCallback as useCallback5 } from "react";
|
|
12940
13132
|
function BooleanField(props) {
|
|
12941
13133
|
const { schema, name, uiSchema, fieldPathId, formData, registry, required, disabled, readonly, hideError, autofocus, title, onChange, onFocus, onBlur, rawErrors } = props;
|
|
12942
13134
|
const { title: schemaTitle } = schema;
|
|
@@ -12984,7 +13176,7 @@ function BooleanField(props) {
|
|
|
12984
13176
|
enumOptions = optionsList({ enum: enums }, uiSchema);
|
|
12985
13177
|
}
|
|
12986
13178
|
}
|
|
12987
|
-
const onWidgetChange =
|
|
13179
|
+
const onWidgetChange = useCallback5((value, errorSchema, id) => onChange(value, fieldPathId.path, errorSchema, id), [onChange, fieldPathId]);
|
|
12988
13180
|
return _jsx5(Widget, { options: { ...options, enumOptions }, schema, uiSchema, id: fieldPathId.$id, name, onChange: onWidgetChange, onFocus, onBlur, label, hideLabel: !displayLabel, value: formData, required, disabled, readonly, hideError, registry, autofocus, rawErrors, htmlName: fieldPathId.name });
|
|
12989
13181
|
}
|
|
12990
13182
|
var BooleanField_default = BooleanField;
|
|
@@ -13135,7 +13327,7 @@ function conditionMatches(operator, datum, value = "$0m3tH1nG Un3xP3cT3d") {
|
|
|
13135
13327
|
function findChildrenAndProps(layoutGridSchema, schemaKey, registry) {
|
|
13136
13328
|
let gridProps = {};
|
|
13137
13329
|
let children = layoutGridSchema[schemaKey];
|
|
13138
|
-
if (
|
|
13330
|
+
if (isPlainObject2(children)) {
|
|
13139
13331
|
const { children: elements, className: toMapClassNames, ...otherProps } = children;
|
|
13140
13332
|
children = elements;
|
|
13141
13333
|
if (toMapClassNames) {
|
|
@@ -13387,7 +13579,7 @@ function LayoutHeaderField(props) {
|
|
|
13387
13579
|
|
|
13388
13580
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/LayoutMultiSchemaField.js
|
|
13389
13581
|
import { jsx as _jsx10 } from "react/jsx-runtime";
|
|
13390
|
-
import { useState as useState7, useEffect as
|
|
13582
|
+
import { useState as useState7, useEffect as useEffect7 } from "react";
|
|
13391
13583
|
function getSelectedOption(options, selectorField, value) {
|
|
13392
13584
|
const defaultValue = "!@#!@$@#$!@$#";
|
|
13393
13585
|
const schemaOptions = options.map(({ schema }) => schema);
|
|
@@ -13423,7 +13615,7 @@ function LayoutMultiSchemaField(props) {
|
|
|
13423
13615
|
const optionsHash = hashObject(options);
|
|
13424
13616
|
const uiSchemaHash = uiSchema ? hashObject(uiSchema) : "";
|
|
13425
13617
|
const formDataHash = formData ? hashObject(formData) : "";
|
|
13426
|
-
|
|
13618
|
+
useEffect7(() => {
|
|
13427
13619
|
setEnumOptions(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));
|
|
13428
13620
|
}, [schemaHash, optionsHash, schemaUtils, uiSchemaHash, formDataHash]);
|
|
13429
13621
|
const { widget = discriminator ? "radio" : "select", title = "", placeholder = "", optionsSchemaSelector: selectorField = discriminator, hideError: uiSchemaHideError, ...uiOptions } = getUiOptions(uiSchema);
|
|
@@ -13462,7 +13654,7 @@ function LayoutMultiSchemaField(props) {
|
|
|
13462
13654
|
|
|
13463
13655
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/MultiSchemaField.js
|
|
13464
13656
|
import { jsx as _jsx11 } from "react/jsx-runtime";
|
|
13465
|
-
import { useCallback as
|
|
13657
|
+
import { useCallback as useCallback6, useEffect as useEffect8, useMemo as useMemo7, useRef as useRef8, useState as useState8 } from "react";
|
|
13466
13658
|
function AnyOfField(props) {
|
|
13467
13659
|
const { name, disabled = false, errorSchema, formData, fieldPathId, onBlur, onChange, onFocus, options, readonly, registry, required = false, schema, uiSchema } = props;
|
|
13468
13660
|
const { schemaUtils } = registry;
|
|
@@ -13476,10 +13668,10 @@ function AnyOfField(props) {
|
|
|
13476
13668
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
13477
13669
|
return schemaUtils.getClosestMatchingOption(formData, retrievedOptions, 0, discriminator);
|
|
13478
13670
|
});
|
|
13479
|
-
const skipNextOptionRecalculation =
|
|
13480
|
-
const prevFormDataRef =
|
|
13481
|
-
const prevFieldIdRef =
|
|
13482
|
-
|
|
13671
|
+
const skipNextOptionRecalculation = useRef8(false);
|
|
13672
|
+
const prevFormDataRef = useRef8(formData);
|
|
13673
|
+
const prevFieldIdRef = useRef8(fieldPathId.$id);
|
|
13674
|
+
useEffect8(() => {
|
|
13483
13675
|
const prevFormData = prevFormDataRef.current;
|
|
13484
13676
|
const prevFieldId = prevFieldIdRef.current;
|
|
13485
13677
|
prevFormDataRef.current = formData;
|
|
@@ -13497,7 +13689,7 @@ function AnyOfField(props) {
|
|
|
13497
13689
|
}
|
|
13498
13690
|
});
|
|
13499
13691
|
const fieldId = `${fieldPathId.$id}${schema.oneOf ? "__oneof_select" : "__anyof_select"}`;
|
|
13500
|
-
const onOptionChange =
|
|
13692
|
+
const onOptionChange = useCallback6(
|
|
13501
13693
|
(option2) => {
|
|
13502
13694
|
if (disabled || readonly) {
|
|
13503
13695
|
return;
|
|
@@ -13577,10 +13769,10 @@ function AnyOfField(props) {
|
|
|
13577
13769
|
var MultiSchemaField_default = AnyOfField;
|
|
13578
13770
|
|
|
13579
13771
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/NullField.js
|
|
13580
|
-
import { useEffect as
|
|
13772
|
+
import { useEffect as useEffect9 } from "react";
|
|
13581
13773
|
function NullField(props) {
|
|
13582
13774
|
const { formData, onChange, fieldPathId } = props;
|
|
13583
|
-
|
|
13775
|
+
useEffect9(() => {
|
|
13584
13776
|
if (formData === void 0) {
|
|
13585
13777
|
onChange(null, fieldPathId.path);
|
|
13586
13778
|
}
|
|
@@ -13591,7 +13783,7 @@ var NullField_default = NullField;
|
|
|
13591
13783
|
|
|
13592
13784
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/NumberField.js
|
|
13593
13785
|
import { jsx as _jsx12 } from "react/jsx-runtime";
|
|
13594
|
-
import { useState as useState9, useCallback as
|
|
13786
|
+
import { useState as useState9, useCallback as useCallback7 } from "react";
|
|
13595
13787
|
var trailingCharMatcherWithPrefix = /\.([0-9]*0)*$/;
|
|
13596
13788
|
var trailingCharMatcher = /[0.]0*$/;
|
|
13597
13789
|
function NumberField(props) {
|
|
@@ -13601,7 +13793,7 @@ function NumberField(props) {
|
|
|
13601
13793
|
const separator = getDecimalSeparator();
|
|
13602
13794
|
const escapedSeparator = separator === "." ? "\\." : separator;
|
|
13603
13795
|
let value = formData;
|
|
13604
|
-
const handleChange =
|
|
13796
|
+
const handleChange = useCallback7((newValue, path, errorSchema, id) => {
|
|
13605
13797
|
setLastValue(newValue);
|
|
13606
13798
|
const standardValue = typeof newValue === "string" ? newValue.replace(separator, ".") : newValue;
|
|
13607
13799
|
const normalizedValue = `${standardValue}`.startsWith(".") ? `0${standardValue}` : standardValue;
|
|
@@ -13631,7 +13823,7 @@ var NumberField_default = NumberField;
|
|
|
13631
13823
|
|
|
13632
13824
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/ObjectField.js
|
|
13633
13825
|
import { jsx as _jsx13, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13634
|
-
import { memo as memo2, useCallback as
|
|
13826
|
+
import { memo as memo2, useCallback as useCallback8, useMemo as useMemo9, useRef as useRef10, useState as useState10 } from "react";
|
|
13635
13827
|
|
|
13636
13828
|
// ../../node_modules/.pnpm/markdown-to-jsx@9.10.2_react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/markdown-to-jsx/dist/react.js
|
|
13637
13829
|
import * as i0 from "react";
|
|
@@ -16770,24 +16962,24 @@ function ObjectFieldPropertyFn(props) {
|
|
|
16770
16962
|
const { globalFormOptions, fields: fields2 } = registry;
|
|
16771
16963
|
const { SchemaField: SchemaField2 } = fields2;
|
|
16772
16964
|
const innerFieldIdPathId = useDeepCompareMemo(toFieldPathId(propertyName, globalFormOptions, fieldPathId.path));
|
|
16773
|
-
const onPropertyChange =
|
|
16965
|
+
const onPropertyChange = useCallback8((value, path, newErrorSchema, id) => {
|
|
16774
16966
|
let normalizedValue = value;
|
|
16775
16967
|
if (value === void 0 && addedByAdditionalProperties && deepEquals_default(path, innerFieldIdPathId.path)) {
|
|
16776
16968
|
normalizedValue = "";
|
|
16777
16969
|
}
|
|
16778
16970
|
onChange(normalizedValue, path, newErrorSchema, id);
|
|
16779
16971
|
}, [onChange, addedByAdditionalProperties, innerFieldIdPathId]);
|
|
16780
|
-
const onKeyRename =
|
|
16972
|
+
const onKeyRename = useCallback8((value) => {
|
|
16781
16973
|
if (propertyName !== value) {
|
|
16782
16974
|
setWasPropertyKeyModified(true);
|
|
16783
16975
|
}
|
|
16784
16976
|
handleKeyRename(propertyName, value);
|
|
16785
16977
|
}, [propertyName, handleKeyRename]);
|
|
16786
|
-
const onKeyRenameBlur =
|
|
16978
|
+
const onKeyRenameBlur = useCallback8((event) => {
|
|
16787
16979
|
const { target: { value } } = event;
|
|
16788
16980
|
onKeyRename(value);
|
|
16789
16981
|
}, [onKeyRename]);
|
|
16790
|
-
const onRemoveProperty =
|
|
16982
|
+
const onRemoveProperty = useCallback8(() => {
|
|
16791
16983
|
handleRemoveProperty(propertyName);
|
|
16792
16984
|
}, [propertyName, handleRemoveProperty]);
|
|
16793
16985
|
return _jsx13(SchemaField2, { name: propertyName, required, schema, uiSchema, errorSchema, fieldPathId: innerFieldIdPathId, formData, wasPropertyKeyModified, onKeyRename, onKeyRenameBlur, onRemoveProperty, onChange: onPropertyChange, onBlur, onFocus, registry, disabled, readonly, hideError });
|
|
@@ -16797,13 +16989,13 @@ function ObjectField(props) {
|
|
|
16797
16989
|
const { schema: rawSchema, uiSchema = {}, formData, errorSchema, fieldPathId, name, required = false, disabled, readonly, hideError, onBlur, onFocus, onChange, registry, title } = props;
|
|
16798
16990
|
const { fields: fields2, schemaUtils, translateString, globalUiOptions } = registry;
|
|
16799
16991
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
16800
|
-
const formDataRef =
|
|
16992
|
+
const formDataRef = useRef10(formData);
|
|
16801
16993
|
formDataRef.current = formData;
|
|
16802
16994
|
const schema = useMemo9(() => schemaUtils.retrieveSchema(rawSchema, formData, true), [schemaUtils, rawSchema, formData]);
|
|
16803
16995
|
const uiOptions = useMemo9(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
16804
16996
|
const schemaProperties = useMemo9(() => schema.properties ?? {}, [schema.properties]);
|
|
16805
16997
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
16806
|
-
const lastRenamedProperty =
|
|
16998
|
+
const lastRenamedProperty = useRef10({ previousKey: "", currentKey: void 0 });
|
|
16807
16999
|
const [additionalPropertyOrder, setAdditionalPropertyOrder] = useState10(() => getAdditionalPropertyOrder(schemaProperties));
|
|
16808
17000
|
const definedPropertyOrder = useMemo9(() => {
|
|
16809
17001
|
const additionalPropertySet = new Set(getAdditionalPropertyOrder(schemaProperties));
|
|
@@ -16814,7 +17006,7 @@ function ObjectField(props) {
|
|
|
16814
17006
|
const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
|
|
16815
17007
|
const hasFormData = isFormDataAvailable(formData);
|
|
16816
17008
|
let orderedProperties = [];
|
|
16817
|
-
const getAvailableKey =
|
|
17009
|
+
const getAvailableKey = useCallback8((preferredKey, existingFormData) => {
|
|
16818
17010
|
const { duplicateKeySuffixSeparator = "-" } = getUiOptions(uiSchema, globalUiOptions);
|
|
16819
17011
|
let index2 = 0;
|
|
16820
17012
|
let newKey = preferredKey;
|
|
@@ -16824,7 +17016,7 @@ function ObjectField(props) {
|
|
|
16824
17016
|
}
|
|
16825
17017
|
return newKey;
|
|
16826
17018
|
}, [uiSchema, globalUiOptions]);
|
|
16827
|
-
const onAddProperty =
|
|
17019
|
+
const onAddProperty = useCallback8(() => {
|
|
16828
17020
|
if (!(schema.additionalProperties || schema.patternProperties)) {
|
|
16829
17021
|
return;
|
|
16830
17022
|
}
|
|
@@ -16861,7 +17053,7 @@ function ObjectField(props) {
|
|
|
16861
17053
|
setAdditionalPropertyOrder((order) => [...order, newKey]);
|
|
16862
17054
|
onChange(newFormData, childFieldPathId.path);
|
|
16863
17055
|
}, [formData, onChange, translateString, schemaUtils, childFieldPathId, getAvailableKey, schema]);
|
|
16864
|
-
const handleKeyRename =
|
|
17056
|
+
const handleKeyRename = useCallback8((oldKey, newKey) => {
|
|
16865
17057
|
if (oldKey !== newKey) {
|
|
16866
17058
|
const currentFormData = formDataRef.current;
|
|
16867
17059
|
const actualNewKey = getAvailableKey(newKey, currentFormData);
|
|
@@ -16883,11 +17075,11 @@ function ObjectField(props) {
|
|
|
16883
17075
|
onChange(renamedObj, childFieldPathId.path);
|
|
16884
17076
|
}
|
|
16885
17077
|
}, [onChange, childFieldPathId, getAvailableKey]);
|
|
16886
|
-
const handleRemoveProperty =
|
|
17078
|
+
const handleRemoveProperty = useCallback8((key) => {
|
|
16887
17079
|
setAdditionalPropertyOrder((order) => order.filter((property) => property !== key));
|
|
16888
17080
|
onChange(ADDITIONAL_PROPERTY_KEY_REMOVE, [...childFieldPathId.path, key]);
|
|
16889
17081
|
}, [onChange, childFieldPathId]);
|
|
16890
|
-
const getStableKey =
|
|
17082
|
+
const getStableKey = useCallback8((property) => {
|
|
16891
17083
|
if (lastRenamedProperty.current.currentKey === property) {
|
|
16892
17084
|
return lastRenamedProperty.current.previousKey;
|
|
16893
17085
|
}
|
|
@@ -16974,7 +17166,7 @@ function OptionalDataControlsField(props) {
|
|
|
16974
17166
|
|
|
16975
17167
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/SchemaField.js
|
|
16976
17168
|
import { jsx as _jsx15, Fragment as _Fragment, jsxs as _jsxs2 } from "react/jsx-runtime";
|
|
16977
|
-
import { useCallback as
|
|
17169
|
+
import { useCallback as useCallback9, memo as memo3 } from "react";
|
|
16978
17170
|
var COMPONENT_TYPES = {
|
|
16979
17171
|
array: "ArrayField",
|
|
16980
17172
|
boolean: "BooleanField",
|
|
@@ -17010,7 +17202,7 @@ function SchemaFieldRender(props) {
|
|
|
17010
17202
|
const { schemaUtils, globalFormOptions, globalUiOptions, fields: fields2 } = registry;
|
|
17011
17203
|
const { AnyOfField: _AnyOfField, OneOfField: _OneOfField, CyclicSchemaField: CyclicSchemaField2 } = fields2;
|
|
17012
17204
|
const fieldId = fieldPathId[ID_KEY];
|
|
17013
|
-
const handleFieldComponentChange =
|
|
17205
|
+
const handleFieldComponentChange = useCallback9((newFormData, path, newErrorSchema, id2) => {
|
|
17014
17206
|
const theId = id2 || fieldId;
|
|
17015
17207
|
return onChange(newFormData, path, newErrorSchema, theId);
|
|
17016
17208
|
}, [fieldId, onChange]);
|
|
@@ -17130,7 +17322,7 @@ var SchemaField_default = SchemaField;
|
|
|
17130
17322
|
|
|
17131
17323
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/fields/StringField.js
|
|
17132
17324
|
import { jsx as _jsx16 } from "react/jsx-runtime";
|
|
17133
|
-
import { useCallback as
|
|
17325
|
+
import { useCallback as useCallback10 } from "react";
|
|
17134
17326
|
function StringField(props) {
|
|
17135
17327
|
const { schema, name, uiSchema, fieldPathId, formData, required, disabled = false, readonly = false, autofocus = false, onChange, onBlur, onFocus, registry, rawErrors, hideError, title } = props;
|
|
17136
17328
|
const { title: schemaTitle, format: format2 } = schema;
|
|
@@ -17144,7 +17336,7 @@ function StringField(props) {
|
|
|
17144
17336
|
const displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema, globalUiOptions);
|
|
17145
17337
|
const label = uiTitle ?? title ?? schemaTitle ?? name;
|
|
17146
17338
|
const Widget = getWidget(schema, widget, widgets2);
|
|
17147
|
-
const onWidgetChange =
|
|
17339
|
+
const onWidgetChange = useCallback10((value, errorSchema, id) => onChange(value, fieldPathId.path, errorSchema, id), [onChange, fieldPathId]);
|
|
17148
17340
|
return _jsx16(Widget, { options: { ...options, enumOptions }, schema, uiSchema, id: fieldPathId.$id, name, label, hideLabel: !displayLabel, hideError, value: formData, onChange: onWidgetChange, onBlur, onFocus, required, disabled, readonly, autofocus, registry, placeholder, rawErrors, htmlName: fieldPathId.name });
|
|
17149
17341
|
}
|
|
17150
17342
|
var StringField_default = StringField;
|
|
@@ -17238,7 +17430,7 @@ function ArrayFieldTitleTemplate(props) {
|
|
|
17238
17430
|
|
|
17239
17431
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/templates/BaseInputTemplate.js
|
|
17240
17432
|
import { jsx as _jsx23, Fragment as _Fragment3, jsxs as _jsxs6 } from "react/jsx-runtime";
|
|
17241
|
-
import { useCallback as
|
|
17433
|
+
import { useCallback as useCallback11 } from "react";
|
|
17242
17434
|
|
|
17243
17435
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/SchemaExamples.js
|
|
17244
17436
|
import { jsx as _jsx22 } from "react/jsx-runtime";
|
|
@@ -17293,10 +17485,10 @@ function BaseInputTemplate(props) {
|
|
|
17293
17485
|
} else {
|
|
17294
17486
|
inputValue = value == null ? "" : value;
|
|
17295
17487
|
}
|
|
17296
|
-
const handleChange =
|
|
17297
|
-
const handleBlur =
|
|
17298
|
-
const handleFocus =
|
|
17299
|
-
const handleClear =
|
|
17488
|
+
const handleChange = useCallback11(({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue), [onChange, options]);
|
|
17489
|
+
const handleBlur = useCallback11(({ target }) => onBlur(id, target?.value), [onBlur, id]);
|
|
17490
|
+
const handleFocus = useCallback11(({ target }) => onFocus(id, target?.value), [onFocus, id]);
|
|
17491
|
+
const handleClear = useCallback11((e2) => {
|
|
17300
17492
|
e2.preventDefault();
|
|
17301
17493
|
e2.stopPropagation();
|
|
17302
17494
|
onChange(options.emptyValue);
|
|
@@ -17625,13 +17817,13 @@ var AltDateWidget_default = AltDateWidget;
|
|
|
17625
17817
|
|
|
17626
17818
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/CheckboxesWidget.js
|
|
17627
17819
|
import { jsx as _jsx46, jsxs as _jsxs17 } from "react/jsx-runtime";
|
|
17628
|
-
import { useCallback as
|
|
17820
|
+
import { useCallback as useCallback12 } from "react";
|
|
17629
17821
|
function CheckboxesWidget({ id, disabled, options, value, autofocus = false, readonly, onChange, onBlur, onFocus, htmlName }) {
|
|
17630
17822
|
const { inline: inline3 = false, enumOptions, enumDisabled, emptyValue } = options;
|
|
17631
17823
|
const optionValueFormat = getOptionValueFormat(options);
|
|
17632
17824
|
const checkboxesValues = Array.isArray(value) ? value : [value];
|
|
17633
|
-
const handleBlur =
|
|
17634
|
-
const handleFocus =
|
|
17825
|
+
const handleBlur = useCallback12(({ target }) => onBlur(id, enumOptionValueDecoder(target?.value, enumOptions, optionValueFormat, emptyValue)), [onBlur, id, enumOptions, emptyValue, optionValueFormat]);
|
|
17826
|
+
const handleFocus = useCallback12(({ target }) => onFocus(id, enumOptionValueDecoder(target?.value, enumOptions, optionValueFormat, emptyValue)), [onFocus, id, enumOptions, emptyValue, optionValueFormat]);
|
|
17635
17827
|
return _jsx46("div", { className: "checkboxes", id, children: Array.isArray(enumOptions) && enumOptions.map((option, index2) => {
|
|
17636
17828
|
const checked = enumOptionsIsSelected(option.value, checkboxesValues);
|
|
17637
17829
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
|
|
@@ -17651,13 +17843,13 @@ var CheckboxesWidget_default = CheckboxesWidget;
|
|
|
17651
17843
|
|
|
17652
17844
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/CheckboxWidget.js
|
|
17653
17845
|
import { jsx as _jsx47, jsxs as _jsxs18 } from "react/jsx-runtime";
|
|
17654
|
-
import { useCallback as
|
|
17846
|
+
import { useCallback as useCallback13 } from "react";
|
|
17655
17847
|
function CheckboxWidget({ schema, uiSchema, options, id, value, disabled, readonly, label, hideLabel, autofocus = false, onBlur, onFocus, onChange, registry, htmlName, required }) {
|
|
17656
17848
|
const DescriptionFieldTemplate = getTemplate("DescriptionFieldTemplate", registry, options);
|
|
17657
17849
|
const trueValueRequired = schemaRequiresTrueValue(schema) && required;
|
|
17658
|
-
const handleChange =
|
|
17659
|
-
const handleBlur =
|
|
17660
|
-
const handleFocus =
|
|
17850
|
+
const handleChange = useCallback13((event) => onChange(event.target.checked), [onChange]);
|
|
17851
|
+
const handleBlur = useCallback13((event) => onBlur(id, event.target.checked), [onBlur, id]);
|
|
17852
|
+
const handleFocus = useCallback13((event) => onFocus(id, event.target.checked), [onFocus, id]);
|
|
17661
17853
|
const uiOptions = getUiOptions(uiSchema);
|
|
17662
17854
|
const isCheckboxWidget = uiOptions.widget === "checkbox";
|
|
17663
17855
|
const description = isCheckboxWidget ? void 0 : options.description ?? schema.description;
|
|
@@ -17683,11 +17875,11 @@ function DateTimeWidget(props) {
|
|
|
17683
17875
|
|
|
17684
17876
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/DateWidget.js
|
|
17685
17877
|
import { jsx as _jsx50 } from "react/jsx-runtime";
|
|
17686
|
-
import { useCallback as
|
|
17878
|
+
import { useCallback as useCallback14 } from "react";
|
|
17687
17879
|
function DateWidget(props) {
|
|
17688
17880
|
const { onChange, options, registry } = props;
|
|
17689
17881
|
const BaseInputTemplate2 = getTemplate("BaseInputTemplate", registry, options);
|
|
17690
|
-
const handleChange =
|
|
17882
|
+
const handleChange = useCallback14((value) => onChange(value || void 0), [onChange]);
|
|
17691
17883
|
return _jsx50(BaseInputTemplate2, { type: "date", ...props, onChange: handleChange });
|
|
17692
17884
|
}
|
|
17693
17885
|
|
|
@@ -17755,12 +17947,12 @@ function PasswordWidget(props) {
|
|
|
17755
17947
|
|
|
17756
17948
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/RadioWidget.js
|
|
17757
17949
|
import { jsx as _jsx55, jsxs as _jsxs20 } from "react/jsx-runtime";
|
|
17758
|
-
import { useCallback as
|
|
17950
|
+
import { useCallback as useCallback15 } from "react";
|
|
17759
17951
|
function RadioWidget({ options, value, required, disabled, readonly, autofocus = false, onBlur, onFocus, onChange, id, htmlName }) {
|
|
17760
17952
|
const { enumOptions, enumDisabled, inline: inline3, emptyValue } = options;
|
|
17761
17953
|
const optionValueFormat = getOptionValueFormat(options);
|
|
17762
|
-
const handleBlur =
|
|
17763
|
-
const handleFocus =
|
|
17954
|
+
const handleBlur = useCallback15(({ target }) => onBlur(id, enumOptionValueDecoder(target?.value, enumOptions, optionValueFormat, emptyValue)), [onBlur, enumOptions, emptyValue, id, optionValueFormat]);
|
|
17955
|
+
const handleFocus = useCallback15(({ target }) => onFocus(id, enumOptionValueDecoder(target?.value, enumOptions, optionValueFormat, emptyValue)), [onFocus, enumOptions, emptyValue, id, optionValueFormat]);
|
|
17764
17956
|
return _jsx55("div", { className: "field-radio-group", id, role: "radiogroup", children: Array.isArray(enumOptions) && enumOptions.map((option, i) => {
|
|
17765
17957
|
const checked = enumOptionsIsSelected(option.value, value);
|
|
17766
17958
|
const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.includes(option.value);
|
|
@@ -17781,23 +17973,23 @@ function RangeWidget(props) {
|
|
|
17781
17973
|
|
|
17782
17974
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/RatingWidget.js
|
|
17783
17975
|
import { jsx as _jsx57, jsxs as _jsxs22 } from "react/jsx-runtime";
|
|
17784
|
-
import { useCallback as
|
|
17976
|
+
import { useCallback as useCallback16 } from "react";
|
|
17785
17977
|
function RatingWidget({ id, value, required, disabled, readonly, onChange, onFocus, onBlur, schema, options, htmlName }) {
|
|
17786
17978
|
const { stars = 5, shape = "star" } = options;
|
|
17787
17979
|
const numStars = schema.maximum ? Math.min(schema.maximum, 5) : Math.min(Math.max(stars, 1), 5);
|
|
17788
17980
|
const min2 = schema.minimum || 0;
|
|
17789
|
-
const handleStarClick =
|
|
17981
|
+
const handleStarClick = useCallback16((starValue) => {
|
|
17790
17982
|
if (!disabled && !readonly) {
|
|
17791
17983
|
onChange(starValue);
|
|
17792
17984
|
}
|
|
17793
17985
|
}, [onChange, disabled, readonly]);
|
|
17794
|
-
const handleFocus =
|
|
17986
|
+
const handleFocus = useCallback16((event) => {
|
|
17795
17987
|
if (onFocus) {
|
|
17796
17988
|
const starValue = Number(event.target.dataset.value);
|
|
17797
17989
|
onFocus(id, starValue);
|
|
17798
17990
|
}
|
|
17799
17991
|
}, [onFocus, id]);
|
|
17800
|
-
const handleBlur =
|
|
17992
|
+
const handleBlur = useCallback16((event) => {
|
|
17801
17993
|
if (onBlur) {
|
|
17802
17994
|
const starValue = Number(event.target.dataset.value);
|
|
17803
17995
|
onBlur(id, starValue);
|
|
@@ -17827,7 +18019,7 @@ function RatingWidget({ id, value, required, disabled, readonly, onChange, onFoc
|
|
|
17827
18019
|
|
|
17828
18020
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/SelectWidget.js
|
|
17829
18021
|
import { jsx as _jsx58, jsxs as _jsxs23, Fragment as _Fragment5 } from "react/jsx-runtime";
|
|
17830
|
-
import { useCallback as
|
|
18022
|
+
import { useCallback as useCallback17 } from "react";
|
|
17831
18023
|
function getValue(event, multiple) {
|
|
17832
18024
|
if (multiple) {
|
|
17833
18025
|
return Array.from(event.target.options).slice().filter((o2) => o2.selected).map((o2) => o2.value);
|
|
@@ -17838,15 +18030,15 @@ function SelectWidget({ schema, id, options, value, required, disabled, readonly
|
|
|
17838
18030
|
const { enumOptions, enumDisabled, emptyValue: optEmptyVal } = options;
|
|
17839
18031
|
const emptyValue = multiple ? [] : "";
|
|
17840
18032
|
const optionValueFormat = getOptionValueFormat(options);
|
|
17841
|
-
const handleFocus =
|
|
18033
|
+
const handleFocus = useCallback17((event) => {
|
|
17842
18034
|
const newValue = getValue(event, multiple);
|
|
17843
18035
|
return onFocus(id, enumOptionValueDecoder(newValue, enumOptions, optionValueFormat, optEmptyVal));
|
|
17844
18036
|
}, [onFocus, id, multiple, enumOptions, optEmptyVal, optionValueFormat]);
|
|
17845
|
-
const handleBlur =
|
|
18037
|
+
const handleBlur = useCallback17((event) => {
|
|
17846
18038
|
const newValue = getValue(event, multiple);
|
|
17847
18039
|
return onBlur(id, enumOptionValueDecoder(newValue, enumOptions, optionValueFormat, optEmptyVal));
|
|
17848
18040
|
}, [onBlur, id, multiple, enumOptions, optEmptyVal, optionValueFormat]);
|
|
17849
|
-
const handleChange =
|
|
18041
|
+
const handleChange = useCallback17((event) => {
|
|
17850
18042
|
const newValue = getValue(event, multiple);
|
|
17851
18043
|
return onChange(enumOptionValueDecoder(newValue, enumOptions, optionValueFormat, optEmptyVal));
|
|
17852
18044
|
}, [onChange, multiple, enumOptions, optEmptyVal, optionValueFormat]);
|
|
@@ -17862,11 +18054,11 @@ var SelectWidget_default = SelectWidget;
|
|
|
17862
18054
|
|
|
17863
18055
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/TextareaWidget.js
|
|
17864
18056
|
import { jsx as _jsx59 } from "react/jsx-runtime";
|
|
17865
|
-
import { useCallback as
|
|
18057
|
+
import { useCallback as useCallback18 } from "react";
|
|
17866
18058
|
function TextareaWidget({ id, options, placeholder, value, required, disabled, readonly, autofocus = false, onChange, onBlur, onFocus, htmlName }) {
|
|
17867
|
-
const handleChange =
|
|
17868
|
-
const handleBlur =
|
|
17869
|
-
const handleFocus =
|
|
18059
|
+
const handleChange = useCallback18(({ target: { value: newValue } }) => onChange(newValue === "" ? options.emptyValue : newValue), [onChange, options.emptyValue]);
|
|
18060
|
+
const handleBlur = useCallback18(({ target }) => onBlur(id, target?.value), [onBlur, id]);
|
|
18061
|
+
const handleFocus = useCallback18(({ target }) => onFocus(id, target?.value), [id, onFocus]);
|
|
17870
18062
|
return _jsx59("textarea", { id, name: htmlName || id, className: "form-control", value: value || "", placeholder, required, disabled, readOnly: readonly, autoFocus: autofocus, rows: options.rows, onBlur: handleBlur, onFocus: handleFocus, onChange: handleChange, "aria-describedby": ariaDescribedByIds(id) });
|
|
17871
18063
|
}
|
|
17872
18064
|
var TextareaWidget_default = TextareaWidget;
|
|
@@ -17881,12 +18073,12 @@ function TextWidget(props) {
|
|
|
17881
18073
|
|
|
17882
18074
|
// ../../node_modules/.pnpm/@rjsf+core@6.10.0_@rjsf+utils@6.10.0_react@19.2.4__react@19.2.4_vue@3.5.40_typescript@5.9.3_/node_modules/@rjsf/core/lib/components/widgets/TimeWidget.js
|
|
17883
18075
|
import { jsx as _jsx61 } from "react/jsx-runtime";
|
|
17884
|
-
import { useCallback as
|
|
18076
|
+
import { useCallback as useCallback19 } from "react";
|
|
17885
18077
|
function TimeWidget(props) {
|
|
17886
18078
|
const { onChange, options, registry, schema, value } = props;
|
|
17887
18079
|
const BaseInputTemplate2 = getTemplate("BaseInputTemplate", registry, options);
|
|
17888
18080
|
const hasSecondPrecision = typeof schema.multipleOf === "number" && Number.isFinite(schema.multipleOf) && schema.multipleOf < 60;
|
|
17889
|
-
const handleChange =
|
|
18081
|
+
const handleChange = useCallback19((newValue) => {
|
|
17890
18082
|
if (!newValue) {
|
|
17891
18083
|
onChange(void 0);
|
|
17892
18084
|
} else if (hasSecondPrecision) {
|
|
@@ -18954,7 +19146,7 @@ function configDraftOperations(initial, values, retained, removed) {
|
|
|
18954
19146
|
}
|
|
18955
19147
|
|
|
18956
19148
|
// src/components/SessionPluginConfigForm.tsx
|
|
18957
|
-
import { Fragment as Fragment2, jsx as jsx6, jsxs as
|
|
19149
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
18958
19150
|
var defaults = getDefaultRegistry();
|
|
18959
19151
|
var validator = {
|
|
18960
19152
|
isValid(schema, data, rootSchema) {
|
|
@@ -19010,7 +19202,7 @@ function presentationSchema(schema) {
|
|
|
19010
19202
|
return result;
|
|
19011
19203
|
}
|
|
19012
19204
|
function ConfigMultiSchemaField(props) {
|
|
19013
|
-
return /* @__PURE__ */
|
|
19205
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-field", children: [
|
|
19014
19206
|
/* @__PURE__ */ jsx6("label", { htmlFor: isValidElement(props.selector) ? props.selector.props.id : void 0, children: "\u914D\u7F6E\u65B9\u5F0F" }),
|
|
19015
19207
|
props.selector,
|
|
19016
19208
|
props.optionSchemaField
|
|
@@ -19042,8 +19234,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19042
19234
|
return /* @__PURE__ */ jsx6(Fragment2, { children: context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx6("p", { role: "alert", children: error.message }, error.message)) });
|
|
19043
19235
|
if (schema.writeOnly === true) {
|
|
19044
19236
|
const kept = typeof formData === "string" && context.retained.has(formData);
|
|
19045
|
-
return /* @__PURE__ */
|
|
19046
|
-
Array.isArray(schema.type) && schema.type.includes("null") ? /* @__PURE__ */
|
|
19237
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-field", children: [
|
|
19238
|
+
Array.isArray(schema.type) && schema.type.includes("null") ? /* @__PURE__ */ jsxs3("label", { children: [
|
|
19047
19239
|
/* @__PURE__ */ jsx6(
|
|
19048
19240
|
"input",
|
|
19049
19241
|
{
|
|
@@ -19088,8 +19280,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19088
19280
|
if (types.includes("null")) {
|
|
19089
19281
|
const nonNull = types.filter((type) => type !== "null");
|
|
19090
19282
|
const inner = { ...schema, type: nonNull[0] };
|
|
19091
|
-
return /* @__PURE__ */
|
|
19092
|
-
/* @__PURE__ */
|
|
19283
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-field", children: [
|
|
19284
|
+
/* @__PURE__ */ jsxs3("label", { children: [
|
|
19093
19285
|
/* @__PURE__ */ jsx6(
|
|
19094
19286
|
"input",
|
|
19095
19287
|
{
|
|
@@ -19114,7 +19306,7 @@ function ConfigFieldTemplate(props) {
|
|
|
19114
19306
|
const pointer = pointerOf(
|
|
19115
19307
|
originalConfigPath(props.fieldPathId.path, props.registry.formContext.removed)
|
|
19116
19308
|
);
|
|
19117
|
-
return /* @__PURE__ */
|
|
19309
|
+
return /* @__PURE__ */ jsxs3("div", { className: props.classNames, hidden: props.hidden, children: [
|
|
19118
19310
|
props.displayLabel ? /* @__PURE__ */ jsx6("label", { htmlFor: props.id, "data-required": props.required, children: props.label }) : null,
|
|
19119
19311
|
props.displayLabel ? props.description : null,
|
|
19120
19312
|
props.children,
|
|
@@ -19124,7 +19316,7 @@ function ConfigFieldTemplate(props) {
|
|
|
19124
19316
|
}
|
|
19125
19317
|
function ConfigArrayItem(props) {
|
|
19126
19318
|
const { buttonsProps: buttons, registry } = props;
|
|
19127
|
-
return /* @__PURE__ */
|
|
19319
|
+
return /* @__PURE__ */ jsxs3("div", { className: "rjsf-array-item", children: [
|
|
19128
19320
|
props.children,
|
|
19129
19321
|
buttons.hasRemove ? /* @__PURE__ */ jsx6(
|
|
19130
19322
|
"button",
|
|
@@ -19152,7 +19344,9 @@ function SessionPluginConfigForm({
|
|
|
19152
19344
|
errors,
|
|
19153
19345
|
failure,
|
|
19154
19346
|
onSubmit,
|
|
19155
|
-
onCancel
|
|
19347
|
+
onCancel,
|
|
19348
|
+
submitLabel = "\u4FDD\u5B58",
|
|
19349
|
+
submittingLabel = "\u4FDD\u5B58\u4E2D\u2026"
|
|
19156
19350
|
}) {
|
|
19157
19351
|
const [initial] = useState11(() => createConfigDraft(config));
|
|
19158
19352
|
const [values, setValues] = useState11(initial.values);
|
|
@@ -19175,11 +19369,11 @@ function SessionPluginConfigForm({
|
|
|
19175
19369
|
changeRoot: setValues
|
|
19176
19370
|
};
|
|
19177
19371
|
if (!schema || support)
|
|
19178
|
-
return /* @__PURE__ */
|
|
19372
|
+
return /* @__PURE__ */ jsxs3("div", { className: "space-y-3 text-xs", children: [
|
|
19179
19373
|
/* @__PURE__ */ jsx6("p", { children: support ?? "\u914D\u7F6E\u58F0\u660E\u7684\u7EC4\u5408\u65E0\u6CD5\u5448\u73B0\uFF0C\u8BF7\u8054\u7CFB\u63D2\u4EF6\u63D0\u4F9B\u65B9" }),
|
|
19180
19374
|
/* @__PURE__ */ jsx6("button", { type: "button", onClick: onCancel, children: "\u5173\u95ED" })
|
|
19181
19375
|
] });
|
|
19182
|
-
return /* @__PURE__ */
|
|
19376
|
+
return /* @__PURE__ */ jsxs3("div", { className: "blade-plugin-config text-xs", children: [
|
|
19183
19377
|
/* @__PURE__ */ jsx6("style", { children: `
|
|
19184
19378
|
.blade-plugin-config .rjsf-field, .blade-plugin-config fieldset { min-width:0; margin:0 0 10px; padding:0; border:0 }
|
|
19185
19379
|
.blade-plugin-config label, .blade-plugin-config legend { display:block; font-size:12px; font-weight:500; overflow-wrap:anywhere; margin-bottom:4px }
|
|
@@ -19257,9 +19451,9 @@ function SessionPluginConfigForm({
|
|
|
19257
19451
|
setDraftFailure(error.message);
|
|
19258
19452
|
}
|
|
19259
19453
|
},
|
|
19260
|
-
children: /* @__PURE__ */
|
|
19454
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "flex justify-end gap-2", children: [
|
|
19261
19455
|
/* @__PURE__ */ jsx6("button", { type: "button", onClick: onCancel, children: "\u53D6\u6D88" }),
|
|
19262
|
-
/* @__PURE__ */ jsx6("button", { type: "submit", disabled: submitting, children: submitting ?
|
|
19456
|
+
/* @__PURE__ */ jsx6("button", { type: "submit", disabled: submitting, children: submitting ? submittingLabel : submitLabel })
|
|
19263
19457
|
] })
|
|
19264
19458
|
}
|
|
19265
19459
|
)
|
|
@@ -19267,7 +19461,7 @@ function SessionPluginConfigForm({
|
|
|
19267
19461
|
}
|
|
19268
19462
|
|
|
19269
19463
|
// src/components/SessionPluginIcon.tsx
|
|
19270
|
-
import { useEffect as
|
|
19464
|
+
import { useEffect as useEffect10, useState as useState12 } from "react";
|
|
19271
19465
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
19272
19466
|
function sessionPluginLabel(plugin) {
|
|
19273
19467
|
const display = typeof plugin.display_name === "string" ? plugin.display_name.trim() : "";
|
|
@@ -19295,7 +19489,7 @@ function iconBlob(client, sessionId, name, token) {
|
|
|
19295
19489
|
function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape = "rounded", className }) {
|
|
19296
19490
|
const [url, setUrl] = useState12(null);
|
|
19297
19491
|
const token = plugin.icon;
|
|
19298
|
-
|
|
19492
|
+
useEffect10(() => {
|
|
19299
19493
|
setUrl(null);
|
|
19300
19494
|
if (!token) return;
|
|
19301
19495
|
let alive = true;
|
|
@@ -19319,8 +19513,8 @@ function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape
|
|
|
19319
19513
|
}
|
|
19320
19514
|
|
|
19321
19515
|
// src/components/SessionPluginConfigDialog.tsx
|
|
19322
|
-
import { useEffect as
|
|
19323
|
-
import { Fragment as Fragment3, jsx as jsx8, jsxs as
|
|
19516
|
+
import { useEffect as useEffect11, useRef as useRef11, useState as useState13 } from "react";
|
|
19517
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
19324
19518
|
async function readFailure(error) {
|
|
19325
19519
|
const response = error?.response;
|
|
19326
19520
|
if (!response || typeof response.json !== "function") {
|
|
@@ -19365,6 +19559,29 @@ function ConfigDialogState({
|
|
|
19365
19559
|
onSaved,
|
|
19366
19560
|
onClose
|
|
19367
19561
|
}) {
|
|
19562
|
+
const [host, setHost] = useState13(null);
|
|
19563
|
+
const [restarting, setRestarting] = useState13(false);
|
|
19564
|
+
const [scope, setScope] = useState13("personal");
|
|
19565
|
+
const waitingForHost = host?.state === "starting" || host?.state === "updating";
|
|
19566
|
+
useEffect11(() => {
|
|
19567
|
+
if (!waitingForHost) return;
|
|
19568
|
+
const abort = new AbortController();
|
|
19569
|
+
let timer;
|
|
19570
|
+
const refresh = async () => {
|
|
19571
|
+
try {
|
|
19572
|
+
const next = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, { signal: abort.signal }, scope);
|
|
19573
|
+
if (!abort.signal.aborted) setHost(next.host ?? null);
|
|
19574
|
+
} catch {
|
|
19575
|
+
}
|
|
19576
|
+
if (!abort.signal.aborted) timer = setTimeout(refresh, 2e3);
|
|
19577
|
+
};
|
|
19578
|
+
timer = setTimeout(refresh, 2e3);
|
|
19579
|
+
return () => {
|
|
19580
|
+
abort.abort();
|
|
19581
|
+
clearTimeout(timer);
|
|
19582
|
+
};
|
|
19583
|
+
}, [client, sessionId, plugin.name, scope, waitingForHost]);
|
|
19584
|
+
const [canConfigureGlobal, setCanConfigureGlobal] = useState13(false);
|
|
19368
19585
|
const [config, setConfig] = useState13(null);
|
|
19369
19586
|
const [loading, setLoading] = useState13(true);
|
|
19370
19587
|
const [loadFailure, setLoadFailure] = useState13(null);
|
|
@@ -19372,34 +19589,36 @@ function ConfigDialogState({
|
|
|
19372
19589
|
const [failure, setFailure] = useState13(null);
|
|
19373
19590
|
const [fieldErrors, setFieldErrors] = useState13([]);
|
|
19374
19591
|
const [formVersion, setFormVersion] = useState13(0);
|
|
19375
|
-
const alive =
|
|
19376
|
-
const
|
|
19377
|
-
const dialog =
|
|
19378
|
-
|
|
19592
|
+
const alive = useRef11(true);
|
|
19593
|
+
const generation2 = useRef11(0);
|
|
19594
|
+
const dialog = useRef11(null);
|
|
19595
|
+
useEffect11(() => {
|
|
19379
19596
|
const element = dialog.current;
|
|
19380
19597
|
if (!element || element.open) return;
|
|
19381
19598
|
if (typeof element.showModal === "function") element.showModal();
|
|
19382
19599
|
else element.setAttribute("open", "");
|
|
19383
19600
|
}, []);
|
|
19384
19601
|
const load = async () => {
|
|
19385
|
-
const current = ++
|
|
19602
|
+
const current = ++generation2.current;
|
|
19386
19603
|
setLoading(true);
|
|
19387
19604
|
setLoadFailure(null);
|
|
19388
19605
|
try {
|
|
19389
|
-
const { config: state } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name);
|
|
19390
|
-
if (!alive.current ||
|
|
19606
|
+
const { config: state, can_configure_global, host: hostState } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, void 0, scope);
|
|
19607
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19608
|
+
setCanConfigureGlobal(can_configure_global ?? false);
|
|
19609
|
+
setHost(hostState ?? null);
|
|
19391
19610
|
setConfig(state);
|
|
19392
19611
|
setFormVersion((value) => value + 1);
|
|
19393
19612
|
} catch (error) {
|
|
19394
|
-
if (!alive.current ||
|
|
19613
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19395
19614
|
const detail = await readFailure(error);
|
|
19396
|
-
if (!alive.current ||
|
|
19615
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19397
19616
|
setLoadFailure(detail.message ?? "\u914D\u7F6E\u6682\u4E0D\u53EF\u7528");
|
|
19398
19617
|
} finally {
|
|
19399
|
-
if (alive.current &&
|
|
19618
|
+
if (alive.current && generation2.current === current) setLoading(false);
|
|
19400
19619
|
}
|
|
19401
19620
|
};
|
|
19402
|
-
|
|
19621
|
+
useEffect11(() => {
|
|
19403
19622
|
alive.current = true;
|
|
19404
19623
|
setConfig(null);
|
|
19405
19624
|
setFailure(null);
|
|
@@ -19407,12 +19626,12 @@ function ConfigDialogState({
|
|
|
19407
19626
|
void load();
|
|
19408
19627
|
return () => {
|
|
19409
19628
|
alive.current = false;
|
|
19410
|
-
|
|
19629
|
+
generation2.current++;
|
|
19411
19630
|
};
|
|
19412
|
-
}, [client, sessionId, plugin.name]);
|
|
19631
|
+
}, [client, sessionId, plugin.name, scope]);
|
|
19413
19632
|
const save = async (draft) => {
|
|
19414
19633
|
if (!config) return;
|
|
19415
|
-
const current =
|
|
19634
|
+
const current = generation2.current;
|
|
19416
19635
|
setSaving(true);
|
|
19417
19636
|
setFailure(null);
|
|
19418
19637
|
setFieldErrors([]);
|
|
@@ -19424,16 +19643,18 @@ function ConfigDialogState({
|
|
|
19424
19643
|
expected_revision: config.revision,
|
|
19425
19644
|
set: draft.set,
|
|
19426
19645
|
remove: draft.remove
|
|
19427
|
-
}
|
|
19646
|
+
},
|
|
19647
|
+
void 0,
|
|
19648
|
+
scope
|
|
19428
19649
|
);
|
|
19429
|
-
if (!alive.current ||
|
|
19650
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19430
19651
|
setConfig(state);
|
|
19431
19652
|
setFormVersion((value) => value + 1);
|
|
19432
|
-
onSaved?.(state);
|
|
19653
|
+
if (scope === "personal") onSaved?.(state);
|
|
19433
19654
|
} catch (error) {
|
|
19434
|
-
if (!alive.current ||
|
|
19655
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19435
19656
|
const detail = await readFailure(error);
|
|
19436
|
-
if (!alive.current ||
|
|
19657
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19437
19658
|
setFailure(detail.message ?? "\u914D\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
19438
19659
|
setFieldErrors(detail.errors ?? []);
|
|
19439
19660
|
if (detail.code === "plugin_config_conflict") await load();
|
|
@@ -19441,9 +19662,9 @@ function ConfigDialogState({
|
|
|
19441
19662
|
if (alive.current) setSaving(false);
|
|
19442
19663
|
}
|
|
19443
19664
|
};
|
|
19444
|
-
return /* @__PURE__ */
|
|
19665
|
+
return /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
19445
19666
|
/* @__PURE__ */ jsx8("style", { children: ".blade-plugin-dialog::backdrop { background: rgb(0 0 0 / 40%); }" }),
|
|
19446
|
-
/* @__PURE__ */
|
|
19667
|
+
/* @__PURE__ */ jsxs4(
|
|
19447
19668
|
"dialog",
|
|
19448
19669
|
{
|
|
19449
19670
|
ref: dialog,
|
|
@@ -19468,7 +19689,7 @@ function ConfigDialogState({
|
|
|
19468
19689
|
},
|
|
19469
19690
|
className: "blade-plugin-dialog max-h-[80vh] overflow-y-auto rounded-lg border border-[hsl(var(--border))] bg-[hsl(var(--popover))] p-4 text-[hsl(var(--popover-foreground))] shadow-lg",
|
|
19470
19691
|
children: [
|
|
19471
|
-
/* @__PURE__ */
|
|
19692
|
+
/* @__PURE__ */ jsxs4("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
19472
19693
|
/* @__PURE__ */ jsx8(SessionPluginIcon, { client, sessionId, plugin }),
|
|
19473
19694
|
/* @__PURE__ */ jsx8(
|
|
19474
19695
|
"span",
|
|
@@ -19489,8 +19710,42 @@ function ConfigDialogState({
|
|
|
19489
19710
|
}
|
|
19490
19711
|
)
|
|
19491
19712
|
] }),
|
|
19713
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs4("div", { className: "mb-3 flex gap-2 text-xs", children: [
|
|
19714
|
+
/* @__PURE__ */ jsx8("button", { type: "button", disabled: saving, "aria-pressed": scope === "personal", onClick: () => setScope("personal"), children: "\u6211\u7684\u767B\u5F55" }),
|
|
19715
|
+
/* @__PURE__ */ jsx8("button", { type: "button", disabled: saving, "aria-pressed": scope === "global", onClick: () => setScope("global"), children: "\u7EC4\u7EC7\u5171\u4EAB\u914D\u7F6E" })
|
|
19716
|
+
] }) : null,
|
|
19717
|
+
host ? /* @__PURE__ */ jsxs4("div", { className: "mb-3 space-y-1 text-xs", children: [
|
|
19718
|
+
/* @__PURE__ */ jsxs4("p", { children: [
|
|
19719
|
+
"\u670D\u52A1\uFF1A",
|
|
19720
|
+
host.reason,
|
|
19721
|
+
" \xB7 \u5DF2\u6062\u590D ",
|
|
19722
|
+
host.restarts,
|
|
19723
|
+
" \u6B21"
|
|
19724
|
+
] }),
|
|
19725
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
|
|
19726
|
+
/* @__PURE__ */ jsxs4("p", { className: "break-all text-[hsl(var(--muted-foreground))]", children: [
|
|
19727
|
+
"\u5305\u6458\u8981\uFF1A",
|
|
19728
|
+
host.digest,
|
|
19729
|
+
" \xB7 \u914D\u7F6E\uFF1A",
|
|
19730
|
+
host.revision
|
|
19731
|
+
] }),
|
|
19732
|
+
/* @__PURE__ */ jsx8("button", { type: "button", disabled: restarting || saving, onClick: () => {
|
|
19733
|
+
setRestarting(true);
|
|
19734
|
+
void client.sessions.restartSessionPluginHost(sessionId, plugin.name).then(() => load()).catch(() => setFailure("\u670D\u52A1\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5")).finally(() => {
|
|
19735
|
+
if (alive.current) setRestarting(false);
|
|
19736
|
+
});
|
|
19737
|
+
}, children: restarting ? "\u6B63\u5728\u91CD\u542F\u2026" : "\u91CD\u542F\u670D\u52A1" }),
|
|
19738
|
+
host.recent?.length ? /* @__PURE__ */ jsxs4("details", { children: [
|
|
19739
|
+
/* @__PURE__ */ jsx8("summary", { children: "\u6700\u8FD1\u6D3B\u52A8" }),
|
|
19740
|
+
host.recent.map((line, index2) => /* @__PURE__ */ jsx8("p", { children: line }, `${index2}-${line}`))
|
|
19741
|
+
] }) : null
|
|
19742
|
+
] }) : null
|
|
19743
|
+
] }) : null,
|
|
19744
|
+
scope === "personal" && config?.auth_status === "expired" ? /* @__PURE__ */ jsx8("p", { className: "mb-2 text-xs", children: "\u767B\u5F55\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199" }) : null,
|
|
19745
|
+
scope === "personal" && config?.global_ready === false ? /* @__PURE__ */ jsx8("p", { className: "mb-2 text-xs", children: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u586B\u5199\u5171\u4EAB\u914D\u7F6E" }) : null,
|
|
19746
|
+
scope === "global" ? /* @__PURE__ */ jsx8("p", { className: "mb-2 text-xs", children: "\u5171\u4EAB\u5BC6\u94A5\u7528\u4E8E\u63D2\u4EF6\u670D\u52A1\u3002\u547D\u4EE4\u7C7B\u63D2\u4EF6\u7684\u6C99\u76D2\u4EE3\u7801\u53EF\u4EE5\u8BFB\u53D6\u5B83\uFF1B\u9700\u4FDD\u5BC6\u65F6\u8BF7\u4F7F\u7528\u6258\u7BA1\u670D\u52A1\u3002" }) : null,
|
|
19492
19747
|
loading ? /* @__PURE__ */ jsx8("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u6B63\u5728\u8BFB\u53D6\u914D\u7F6E\u2026" }) : null,
|
|
19493
|
-
loadFailure ? /* @__PURE__ */
|
|
19748
|
+
loadFailure ? /* @__PURE__ */ jsxs4("div", { className: "space-y-2 text-xs", children: [
|
|
19494
19749
|
/* @__PURE__ */ jsx8("p", { children: loadFailure }),
|
|
19495
19750
|
/* @__PURE__ */ jsx8(
|
|
19496
19751
|
"button",
|
|
@@ -19521,13 +19776,12 @@ function ConfigDialogState({
|
|
|
19521
19776
|
}
|
|
19522
19777
|
|
|
19523
19778
|
// src/components/PluginConnectorList.tsx
|
|
19524
|
-
import { jsx as jsx9, jsxs as
|
|
19779
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
19525
19780
|
function PluginSwitch({
|
|
19526
19781
|
label,
|
|
19527
19782
|
checked,
|
|
19528
19783
|
pending,
|
|
19529
19784
|
disabled,
|
|
19530
|
-
/** 首页的开关只是"这次输入的待选",不是"已经启用",措辞必须跟着分。 */
|
|
19531
19785
|
draft = false,
|
|
19532
19786
|
onToggle
|
|
19533
19787
|
}) {
|
|
@@ -19571,7 +19825,7 @@ function PluginConnectorList({
|
|
|
19571
19825
|
draft = false
|
|
19572
19826
|
}) {
|
|
19573
19827
|
const configuringItem = configuring ? items.find((item) => item.name === configuring.name) ?? null : null;
|
|
19574
|
-
return /* @__PURE__ */
|
|
19828
|
+
return /* @__PURE__ */ jsxs5("div", { className: "py-0.5", children: [
|
|
19575
19829
|
disabledReason ? /* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: disabledReason }) : null,
|
|
19576
19830
|
items.length === 0 ? /* @__PURE__ */ jsx9("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: unavailableText ?? emptyText }) : null,
|
|
19577
19831
|
items.map((item) => {
|
|
@@ -19579,8 +19833,8 @@ function PluginConnectorList({
|
|
|
19579
19833
|
const actionable = !disabledReason && item.installed !== false || item.active;
|
|
19580
19834
|
const pending = Boolean(inFlight[item.name]);
|
|
19581
19835
|
const checked = item.active;
|
|
19582
|
-
return /* @__PURE__ */
|
|
19583
|
-
/* @__PURE__ */
|
|
19836
|
+
return /* @__PURE__ */ jsxs5("div", { className: "group px-3 py-1", children: [
|
|
19837
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
|
|
19584
19838
|
/* @__PURE__ */ jsx9(
|
|
19585
19839
|
SessionPluginIcon,
|
|
19586
19840
|
{
|
|
@@ -19590,6 +19844,7 @@ function PluginConnectorList({
|
|
|
19590
19844
|
}
|
|
19591
19845
|
),
|
|
19592
19846
|
/* @__PURE__ */ jsx9("span", { className: "min-w-0 flex-1 truncate text-[11px]", title: label, children: label }),
|
|
19847
|
+
item.auth_status === "expired" || item.auth_status === "login_required" || item.auth_status === "unavailable" ? /* @__PURE__ */ jsx9("button", { type: "button", disabled: !sessionId || busy, onClick: () => onEditConfig(item), className: "shrink-0 text-[10px] underline", children: item.auth_status === "expired" ? "\u767B\u5F55\u5DF2\u8FC7\u671F" : item.auth_status === "unavailable" ? "\u6682\u65F6\u4E0D\u53EF\u7528" : "\u672A\u767B\u5F55" }) : null,
|
|
19593
19848
|
!draft && item.config === "configured" ? /* @__PURE__ */ jsx9(
|
|
19594
19849
|
"button",
|
|
19595
19850
|
{
|
|
@@ -19624,7 +19879,7 @@ function PluginConnectorList({
|
|
|
19624
19879
|
}
|
|
19625
19880
|
)
|
|
19626
19881
|
] }),
|
|
19627
|
-
!draft && item.active && item.status !== "valid" && item.status !== "required" ? /* @__PURE__ */
|
|
19882
|
+
!draft && item.active && item.status !== "valid" && item.status !== "required" ? /* @__PURE__ */ jsxs5("div", { className: "mt-0.5 flex items-center gap-2 pl-7 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
|
|
19628
19883
|
/* @__PURE__ */ jsx9("span", { children: item.reason || "\u63D2\u4EF6\u6682\u4E0D\u53EF\u7528" }),
|
|
19629
19884
|
/* @__PURE__ */ jsx9(
|
|
19630
19885
|
"button",
|
|
@@ -19661,6 +19916,8 @@ function catalogToConnectorItems(catalog) {
|
|
|
19661
19916
|
icon: entry.icon,
|
|
19662
19917
|
iconSource: "account",
|
|
19663
19918
|
installed: entry.installed,
|
|
19919
|
+
connector: entry.connector,
|
|
19920
|
+
auth_status: entry.auth_status,
|
|
19664
19921
|
active: false,
|
|
19665
19922
|
status: "not_prepared",
|
|
19666
19923
|
projected: false
|
|
@@ -19690,6 +19947,8 @@ function mergeConnectorItems(sessionPlugins, catalog) {
|
|
|
19690
19947
|
icon: entry.icon,
|
|
19691
19948
|
iconSource: "account",
|
|
19692
19949
|
installed: entry.installed,
|
|
19950
|
+
connector: entry.connector,
|
|
19951
|
+
auth_status: entry.auth_status,
|
|
19693
19952
|
active: plugin.active,
|
|
19694
19953
|
status: plugin.status,
|
|
19695
19954
|
reason: plugin.reason,
|
|
@@ -19707,7 +19966,8 @@ function filterConnectorItems(items, query) {
|
|
|
19707
19966
|
}
|
|
19708
19967
|
|
|
19709
19968
|
// src/components/use-session-plugin-activation.ts
|
|
19710
|
-
import {
|
|
19969
|
+
import { isLocalConnectorName } from "@blade-hq/agent-client/internal";
|
|
19970
|
+
import { useCallback as useCallback20, useEffect as useEffect12, useMemo as useMemo11, useRef as useRef12, useState as useState14 } from "react";
|
|
19711
19971
|
function useSessionPluginActivation({
|
|
19712
19972
|
client,
|
|
19713
19973
|
sessionId,
|
|
@@ -19720,17 +19980,17 @@ function useSessionPluginActivation({
|
|
|
19720
19980
|
const [mutationError, setMutationError] = useState14(false);
|
|
19721
19981
|
const [inFlight, setInFlight] = useState14({});
|
|
19722
19982
|
const [configuring, setConfiguring] = useState14(null);
|
|
19723
|
-
const alive =
|
|
19724
|
-
const
|
|
19725
|
-
const mutationGenerations =
|
|
19726
|
-
const desiredActivations =
|
|
19727
|
-
const pendingMutations =
|
|
19728
|
-
const submittedActivations =
|
|
19729
|
-
const serverActive =
|
|
19730
|
-
const lifetime =
|
|
19731
|
-
const request =
|
|
19983
|
+
const alive = useRef12(true);
|
|
19984
|
+
const generation2 = useRef12(0);
|
|
19985
|
+
const mutationGenerations = useRef12(/* @__PURE__ */ new Map());
|
|
19986
|
+
const desiredActivations = useRef12(/* @__PURE__ */ new Map());
|
|
19987
|
+
const pendingMutations = useRef12(/* @__PURE__ */ new Map());
|
|
19988
|
+
const submittedActivations = useRef12(/* @__PURE__ */ new Set());
|
|
19989
|
+
const serverActive = useRef12(/* @__PURE__ */ new Set());
|
|
19990
|
+
const lifetime = useRef12(0);
|
|
19991
|
+
const request = useRef12(null);
|
|
19732
19992
|
const [desiredVersion, setDesiredVersion] = useState14(0);
|
|
19733
|
-
const setDesired =
|
|
19993
|
+
const setDesired = useCallback20((name, value) => {
|
|
19734
19994
|
if (value === null) {
|
|
19735
19995
|
if (!desiredActivations.current.delete(name)) return;
|
|
19736
19996
|
} else {
|
|
@@ -19750,7 +20010,7 @@ function useSessionPluginActivation({
|
|
|
19750
20010
|
return desired === void 0 ? item : { ...item, active: desired };
|
|
19751
20011
|
});
|
|
19752
20012
|
}, [catalog, configuring, desiredVersion, plugins]);
|
|
19753
|
-
const markInFlight =
|
|
20013
|
+
const markInFlight = useCallback20((name, on) => {
|
|
19754
20014
|
setInFlight((current) => {
|
|
19755
20015
|
if (on) return current[name] ? current : { ...current, [name]: true };
|
|
19756
20016
|
if (!current[name]) return current;
|
|
@@ -19759,7 +20019,7 @@ function useSessionPluginActivation({
|
|
|
19759
20019
|
return rest;
|
|
19760
20020
|
});
|
|
19761
20021
|
}, []);
|
|
19762
|
-
|
|
20022
|
+
useEffect12(() => {
|
|
19763
20023
|
alive.current = true;
|
|
19764
20024
|
setPlugins([]);
|
|
19765
20025
|
setCatalog(null);
|
|
@@ -19775,23 +20035,23 @@ function useSessionPluginActivation({
|
|
|
19775
20035
|
return () => {
|
|
19776
20036
|
alive.current = false;
|
|
19777
20037
|
lifetime.current++;
|
|
19778
|
-
|
|
20038
|
+
generation2.current++;
|
|
19779
20039
|
request.current?.abort();
|
|
19780
20040
|
};
|
|
19781
20041
|
}, [client]);
|
|
19782
|
-
const load =
|
|
20042
|
+
const load = useCallback20(async () => {
|
|
19783
20043
|
if (!alive.current) return;
|
|
19784
20044
|
request.current?.abort();
|
|
19785
20045
|
const controller = new AbortController();
|
|
19786
20046
|
request.current = controller;
|
|
19787
|
-
const current = ++
|
|
20047
|
+
const current = ++generation2.current;
|
|
19788
20048
|
setLoading(true);
|
|
19789
20049
|
setListError(false);
|
|
19790
20050
|
try {
|
|
19791
20051
|
const result = await client.sessions.listSessionPlugins(sessionId, { signal: controller.signal });
|
|
19792
20052
|
const withConfig = await Promise.all(
|
|
19793
20053
|
result.plugins.map(async (item) => {
|
|
19794
|
-
if (item.config !== void 0 && item.config !== "unchecked") return item;
|
|
20054
|
+
if (isLocalConnectorName(item.name) || item.config !== void 0 && item.config !== "unchecked") return item;
|
|
19795
20055
|
try {
|
|
19796
20056
|
const { config } = await client.sessions.getSessionPluginConfig(sessionId, item.name, {
|
|
19797
20057
|
signal: controller.signal
|
|
@@ -19802,7 +20062,7 @@ function useSessionPluginActivation({
|
|
|
19802
20062
|
}
|
|
19803
20063
|
})
|
|
19804
20064
|
);
|
|
19805
|
-
if (alive.current && current ===
|
|
20065
|
+
if (alive.current && current === generation2.current) {
|
|
19806
20066
|
serverActive.current = new Set(withConfig.filter((item) => item.active).map((item) => item.name));
|
|
19807
20067
|
setPlugins(withConfig.map((item) => {
|
|
19808
20068
|
const desired = desiredActivations.current.get(item.name);
|
|
@@ -19810,35 +20070,35 @@ function useSessionPluginActivation({
|
|
|
19810
20070
|
}));
|
|
19811
20071
|
}
|
|
19812
20072
|
} catch {
|
|
19813
|
-
if (alive.current && current ===
|
|
20073
|
+
if (alive.current && current === generation2.current && !controller.signal.aborted) setListError(true);
|
|
19814
20074
|
} finally {
|
|
19815
|
-
if (alive.current && current ===
|
|
20075
|
+
if (alive.current && current === generation2.current) setLoading(false);
|
|
19816
20076
|
}
|
|
19817
20077
|
}, [client, sessionId]);
|
|
19818
|
-
const loadCatalog =
|
|
20078
|
+
const loadCatalog = useCallback20(async () => {
|
|
19819
20079
|
try {
|
|
19820
20080
|
const { plugins: entries } = await client.plugins.catalog();
|
|
19821
20081
|
if (alive.current) setCatalog(entries);
|
|
19822
20082
|
} catch {
|
|
19823
20083
|
}
|
|
19824
20084
|
}, [client]);
|
|
19825
|
-
const reload =
|
|
20085
|
+
const reload = useCallback20(() => {
|
|
19826
20086
|
void load();
|
|
19827
20087
|
void loadCatalog();
|
|
19828
20088
|
}, [load, loadCatalog]);
|
|
19829
|
-
const abandon =
|
|
20089
|
+
const abandon = useCallback20((name) => {
|
|
19830
20090
|
setDesired(name, null);
|
|
19831
20091
|
pendingMutations.current.delete(name);
|
|
19832
20092
|
mutationGenerations.current.set(name, (mutationGenerations.current.get(name) ?? 0) + 1);
|
|
19833
20093
|
markInFlight(name, false);
|
|
19834
20094
|
void load();
|
|
19835
20095
|
}, [load, markInFlight, setDesired]);
|
|
19836
|
-
const finish =
|
|
20096
|
+
const finish = useCallback20((name, mutation) => {
|
|
19837
20097
|
pendingMutations.current.delete(name);
|
|
19838
20098
|
setDesired(name, null);
|
|
19839
20099
|
if (mutation === mutationGenerations.current.get(name)) markInFlight(name, false);
|
|
19840
20100
|
}, [markInFlight, setDesired]);
|
|
19841
|
-
const commitActivation =
|
|
20101
|
+
const commitActivation = useCallback20(
|
|
19842
20102
|
async (name, active, mutation, startedAt) => {
|
|
19843
20103
|
submittedActivations.current.add(name);
|
|
19844
20104
|
try {
|
|
@@ -19877,7 +20137,7 @@ function useSessionPluginActivation({
|
|
|
19877
20137
|
},
|
|
19878
20138
|
[client, finish, load, markInFlight, onChange, sessionId, setDesired]
|
|
19879
20139
|
);
|
|
19880
|
-
const enable =
|
|
20140
|
+
const enable = useCallback20(async (name) => {
|
|
19881
20141
|
if (!alive.current) return;
|
|
19882
20142
|
const startedAt = lifetime.current;
|
|
19883
20143
|
const mutation = (mutationGenerations.current.get(name) ?? 0) + 1;
|
|
@@ -19887,7 +20147,7 @@ function useSessionPluginActivation({
|
|
|
19887
20147
|
setMutationError(false);
|
|
19888
20148
|
markInFlight(name, true);
|
|
19889
20149
|
request.current?.abort();
|
|
19890
|
-
|
|
20150
|
+
generation2.current++;
|
|
19891
20151
|
setLoading(false);
|
|
19892
20152
|
let state;
|
|
19893
20153
|
try {
|
|
@@ -19914,10 +20174,10 @@ function useSessionPluginActivation({
|
|
|
19914
20174
|
setPlugins((current) => current.map((item) => item.name === name ? { ...item, config: state.state } : item));
|
|
19915
20175
|
await commitActivation(name, true, mutation, startedAt);
|
|
19916
20176
|
}, [abandon, client, commitActivation, markInFlight, sessionId, setDesired]);
|
|
19917
|
-
const disable =
|
|
20177
|
+
const disable = useCallback20((name) => {
|
|
19918
20178
|
const startedAt = lifetime.current;
|
|
19919
20179
|
request.current?.abort();
|
|
19920
|
-
|
|
20180
|
+
generation2.current++;
|
|
19921
20181
|
setLoading(false);
|
|
19922
20182
|
if (!submittedActivations.current.has(name) && !serverActive.current.has(name)) {
|
|
19923
20183
|
abandon(name);
|
|
@@ -19931,20 +20191,21 @@ function useSessionPluginActivation({
|
|
|
19931
20191
|
markInFlight(name, true);
|
|
19932
20192
|
void commitActivation(name, false, mutation, startedAt);
|
|
19933
20193
|
}, [abandon, commitActivation, markInFlight, setDesired]);
|
|
19934
|
-
const toggle =
|
|
20194
|
+
const toggle = useCallback20((item, next) => {
|
|
19935
20195
|
if (next) void enable(item.name);
|
|
19936
20196
|
else disable(item.name);
|
|
19937
20197
|
}, [disable, enable]);
|
|
19938
|
-
const retry =
|
|
20198
|
+
const retry = useCallback20((item) => {
|
|
19939
20199
|
void enable(item.name);
|
|
19940
20200
|
}, [enable]);
|
|
19941
|
-
const editConfig =
|
|
20201
|
+
const editConfig = useCallback20((item) => {
|
|
19942
20202
|
setConfiguring({ name: item.name, pendingActivation: false });
|
|
19943
20203
|
}, []);
|
|
19944
|
-
const onConfigSaved =
|
|
20204
|
+
const onConfigSaved = useCallback20((state) => {
|
|
19945
20205
|
const target = configuring;
|
|
19946
20206
|
if (!target) return;
|
|
19947
20207
|
setConfiguring(null);
|
|
20208
|
+
void loadCatalog();
|
|
19948
20209
|
setPlugins((current) => current.map((item) => item.name === target.name ? { ...item, config: state.state } : item));
|
|
19949
20210
|
if (!target.pendingActivation || state.state !== "configured") {
|
|
19950
20211
|
void load();
|
|
@@ -19957,8 +20218,8 @@ function useSessionPluginActivation({
|
|
|
19957
20218
|
setDesired(target.name, true);
|
|
19958
20219
|
markInFlight(target.name, true);
|
|
19959
20220
|
void commitActivation(target.name, true, mutation, startedAt);
|
|
19960
|
-
}, [commitActivation, configuring, load, markInFlight, setDesired]);
|
|
19961
|
-
const onConfigClose =
|
|
20221
|
+
}, [commitActivation, configuring, load, loadCatalog, markInFlight, setDesired]);
|
|
20222
|
+
const onConfigClose = useCallback20(() => {
|
|
19962
20223
|
const target = configuring;
|
|
19963
20224
|
if (!target) return;
|
|
19964
20225
|
setConfiguring(null);
|
|
@@ -19982,6 +20243,99 @@ function useSessionPluginActivation({
|
|
|
19982
20243
|
};
|
|
19983
20244
|
}
|
|
19984
20245
|
|
|
20246
|
+
// src/chat/runtime/environment.tsx
|
|
20247
|
+
import { createContext as createContext5, useContext as useContext5, useMemo as useMemo12 } from "react";
|
|
20248
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
20249
|
+
var EMPTY_ENVIRONMENT = {};
|
|
20250
|
+
var ChatEnvironmentContext = createContext5(EMPTY_ENVIRONMENT);
|
|
20251
|
+
function ChatEnvironmentProvider({ value, children }) {
|
|
20252
|
+
return /* @__PURE__ */ jsx10(ChatEnvironmentContext.Provider, { value, children });
|
|
20253
|
+
}
|
|
20254
|
+
function useChatEnvironment() {
|
|
20255
|
+
return useContext5(ChatEnvironmentContext);
|
|
20256
|
+
}
|
|
20257
|
+
var NO_HIGHLIGHT = { highlightedHtml: null };
|
|
20258
|
+
function usePlainCode() {
|
|
20259
|
+
return NO_HIGHLIGHT;
|
|
20260
|
+
}
|
|
20261
|
+
function useHighlightedCode(code, language) {
|
|
20262
|
+
const use = useChatEnvironment().useHighlightedCode ?? usePlainCode;
|
|
20263
|
+
return use(code, language);
|
|
20264
|
+
}
|
|
20265
|
+
function useNoDetail() {
|
|
20266
|
+
return null;
|
|
20267
|
+
}
|
|
20268
|
+
function useChatSessionDetail(sessionId) {
|
|
20269
|
+
const use = useChatEnvironment().useSessionDetail ?? useNoDetail;
|
|
20270
|
+
return use(sessionId);
|
|
20271
|
+
}
|
|
20272
|
+
function useShowTodo() {
|
|
20273
|
+
return false;
|
|
20274
|
+
}
|
|
20275
|
+
function useHideTodo() {
|
|
20276
|
+
const use = useChatEnvironment().useHideTodo ?? useShowTodo;
|
|
20277
|
+
return use();
|
|
20278
|
+
}
|
|
20279
|
+
function useChatRenderMode() {
|
|
20280
|
+
return useChatEnvironment().renderMode ?? "normal";
|
|
20281
|
+
}
|
|
20282
|
+
function notifyChat(environment, kind, message, options) {
|
|
20283
|
+
if (environment.notify) environment.notify(kind, message, options);
|
|
20284
|
+
else if (kind === "error") console.error(message);
|
|
20285
|
+
}
|
|
20286
|
+
function useComposerBridge(sessionId) {
|
|
20287
|
+
const environment = useChatEnvironment();
|
|
20288
|
+
const session = useSessionHandle(sessionId);
|
|
20289
|
+
return useMemo12(
|
|
20290
|
+
() => ({
|
|
20291
|
+
appendText(text, separate = false) {
|
|
20292
|
+
if (!sessionId) return;
|
|
20293
|
+
if (environment.appendToComposer) environment.appendToComposer(sessionId, text, separate);
|
|
20294
|
+
else session?.insertText(separate ? `
|
|
20295
|
+
|
|
20296
|
+
${text}` : text);
|
|
20297
|
+
},
|
|
20298
|
+
addContext(context) {
|
|
20299
|
+
if (!sessionId) return;
|
|
20300
|
+
if (environment.addComposerContext) environment.addComposerContext(sessionId, context);
|
|
20301
|
+
else session?.attach(context.label, context.content);
|
|
20302
|
+
}
|
|
20303
|
+
}),
|
|
20304
|
+
[environment, session, sessionId]
|
|
20305
|
+
);
|
|
20306
|
+
}
|
|
20307
|
+
var NO_VIRTUAL_ITEMS = [];
|
|
20308
|
+
var NO_VIRTUALIZER = {
|
|
20309
|
+
getVirtualItems: () => NO_VIRTUAL_ITEMS,
|
|
20310
|
+
getTotalSize: () => 0,
|
|
20311
|
+
measureElement: () => {
|
|
20312
|
+
},
|
|
20313
|
+
scrollToIndex: () => {
|
|
20314
|
+
},
|
|
20315
|
+
getOffsetForIndex: () => void 0
|
|
20316
|
+
};
|
|
20317
|
+
function useNoVirtualizer() {
|
|
20318
|
+
return NO_VIRTUALIZER;
|
|
20319
|
+
}
|
|
20320
|
+
function useChatVirtualizer(options) {
|
|
20321
|
+
const injected = useChatEnvironment().useVirtualizer;
|
|
20322
|
+
const use = injected ?? useNoVirtualizer;
|
|
20323
|
+
const virtualizer = use(options);
|
|
20324
|
+
return { virtualizer, enabled: Boolean(injected) };
|
|
20325
|
+
}
|
|
20326
|
+
|
|
20327
|
+
// src/lib/message-shortcuts.ts
|
|
20328
|
+
function usesCommandKey() {
|
|
20329
|
+
if (typeof navigator === "undefined") return false;
|
|
20330
|
+
return /Mac|iPhone|iPad|iPod/i.test(navigator.platform || navigator.userAgent);
|
|
20331
|
+
}
|
|
20332
|
+
function queueShortcutLabel() {
|
|
20333
|
+
return usesCommandKey() ? "\u2318 Enter" : "Ctrl Enter";
|
|
20334
|
+
}
|
|
20335
|
+
function isQueueShortcut(event) {
|
|
20336
|
+
return usesCommandKey() ? event.metaKey : event.ctrlKey;
|
|
20337
|
+
}
|
|
20338
|
+
|
|
19985
20339
|
// src/chat/runtime/actions.ts
|
|
19986
20340
|
function buildPendingAskUserAnswer(state, message) {
|
|
19987
20341
|
if (state.status !== "waiting_for_input") return void 0;
|
|
@@ -20010,7 +20364,9 @@ function sendToSession(session, message, mode, askUserAnswer, extras = {}) {
|
|
|
20010
20364
|
model: extras.model,
|
|
20011
20365
|
thinkingOverride: extras.thinkingOverride,
|
|
20012
20366
|
reasoningLevel: extras.reasoningLevel,
|
|
20013
|
-
|
|
20367
|
+
refs: extras.refs,
|
|
20368
|
+
contextAttachments: extras.contextAttachments,
|
|
20369
|
+
topicAssetRefs: extras.topicAssetRefs,
|
|
20014
20370
|
whatif: extras.whatif,
|
|
20015
20371
|
replayDecision: extras.replayDecision,
|
|
20016
20372
|
queueWhenRunning: extras.queueWhenRunning
|
|
@@ -20088,13 +20444,13 @@ function useComposedRefs(...refs) {
|
|
|
20088
20444
|
|
|
20089
20445
|
// ../../node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-context/dist/index.mjs
|
|
20090
20446
|
import * as React2 from "react";
|
|
20091
|
-
import { jsx as
|
|
20447
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
20092
20448
|
function createContext22(rootComponentName, defaultContext) {
|
|
20093
20449
|
const Context = React2.createContext(defaultContext);
|
|
20094
20450
|
const Provider2 = (props) => {
|
|
20095
20451
|
const { children, ...context } = props;
|
|
20096
20452
|
const value = React2.useMemo(() => context, Object.values(context));
|
|
20097
|
-
return /* @__PURE__ */
|
|
20453
|
+
return /* @__PURE__ */ jsx11(Context.Provider, { value, children });
|
|
20098
20454
|
};
|
|
20099
20455
|
Provider2.displayName = rootComponentName + "Provider";
|
|
20100
20456
|
function useContext22(consumerName) {
|
|
@@ -20115,7 +20471,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
20115
20471
|
const { scope, children, ...context } = props;
|
|
20116
20472
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
20117
20473
|
const value = React2.useMemo(() => context, Object.values(context));
|
|
20118
|
-
return /* @__PURE__ */
|
|
20474
|
+
return /* @__PURE__ */ jsx11(Context.Provider, { value, children });
|
|
20119
20475
|
};
|
|
20120
20476
|
Provider2.displayName = rootComponentName + "Provider";
|
|
20121
20477
|
function useContext22(consumerName, scope) {
|
|
@@ -20172,7 +20528,7 @@ import * as ReactDOM from "react-dom";
|
|
|
20172
20528
|
|
|
20173
20529
|
// ../../node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.2.14_react@19.2.4/node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
20174
20530
|
import * as React3 from "react";
|
|
20175
|
-
import { Fragment as Fragment22, jsx as
|
|
20531
|
+
import { Fragment as Fragment22, jsx as jsx12 } from "react/jsx-runtime";
|
|
20176
20532
|
// @__NO_SIDE_EFFECTS__
|
|
20177
20533
|
function createSlot(ownerName) {
|
|
20178
20534
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -20190,9 +20546,9 @@ function createSlot(ownerName) {
|
|
|
20190
20546
|
return child;
|
|
20191
20547
|
}
|
|
20192
20548
|
});
|
|
20193
|
-
return /* @__PURE__ */
|
|
20549
|
+
return /* @__PURE__ */ jsx12(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
20194
20550
|
}
|
|
20195
|
-
return /* @__PURE__ */
|
|
20551
|
+
return /* @__PURE__ */ jsx12(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
20196
20552
|
});
|
|
20197
20553
|
Slot22.displayName = `${ownerName}.Slot`;
|
|
20198
20554
|
return Slot22;
|
|
@@ -20218,7 +20574,7 @@ var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
|
20218
20574
|
// @__NO_SIDE_EFFECTS__
|
|
20219
20575
|
function createSlottable(ownerName) {
|
|
20220
20576
|
const Slottable2 = ({ children }) => {
|
|
20221
|
-
return /* @__PURE__ */
|
|
20577
|
+
return /* @__PURE__ */ jsx12(Fragment22, { children });
|
|
20222
20578
|
};
|
|
20223
20579
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
20224
20580
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -20266,7 +20622,7 @@ function getElementRef(element) {
|
|
|
20266
20622
|
}
|
|
20267
20623
|
|
|
20268
20624
|
// ../../node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.2.3_@types+react@19.2.14__@types+re_1181ea5061ec9212248424669240e4ec/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
20269
|
-
import { jsx as
|
|
20625
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
20270
20626
|
var NODES = [
|
|
20271
20627
|
"a",
|
|
20272
20628
|
"button",
|
|
@@ -20294,7 +20650,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
20294
20650
|
if (typeof window !== "undefined") {
|
|
20295
20651
|
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
20296
20652
|
}
|
|
20297
|
-
return /* @__PURE__ */
|
|
20653
|
+
return /* @__PURE__ */ jsx13(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
20298
20654
|
});
|
|
20299
20655
|
Node2.displayName = `Primitive.${node}`;
|
|
20300
20656
|
return { ...primitive, [node]: Node2 };
|
|
@@ -20329,7 +20685,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
20329
20685
|
}
|
|
20330
20686
|
|
|
20331
20687
|
// ../../node_modules/.pnpm/@radix-ui+react-dismissable-layer@1.1.11_@types+react-dom@19.2.3_@types+react@19.2.14___3d3960154a4c07d09bb90cb341135fc5/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
20332
|
-
import { jsx as
|
|
20688
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
20333
20689
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
20334
20690
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
20335
20691
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
@@ -20417,7 +20773,7 @@ var DismissableLayer = React7.forwardRef(
|
|
|
20417
20773
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
20418
20774
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
20419
20775
|
}, []);
|
|
20420
|
-
return /* @__PURE__ */
|
|
20776
|
+
return /* @__PURE__ */ jsx14(
|
|
20421
20777
|
Primitive.div,
|
|
20422
20778
|
{
|
|
20423
20779
|
...layerProps,
|
|
@@ -20451,7 +20807,7 @@ var DismissableLayerBranch = React7.forwardRef((props, forwardedRef) => {
|
|
|
20451
20807
|
};
|
|
20452
20808
|
}
|
|
20453
20809
|
}, [context.branches]);
|
|
20454
|
-
return /* @__PURE__ */
|
|
20810
|
+
return /* @__PURE__ */ jsx14(Primitive.div, { ...props, ref: composedRefs });
|
|
20455
20811
|
});
|
|
20456
20812
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
20457
20813
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -20563,7 +20919,7 @@ function createFocusGuard() {
|
|
|
20563
20919
|
|
|
20564
20920
|
// ../../node_modules/.pnpm/@radix-ui+react-focus-scope@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.14__@types+_f62f3af4ca2ba305a7aecf04c8534604/node_modules/@radix-ui/react-focus-scope/dist/index.mjs
|
|
20565
20921
|
import * as React9 from "react";
|
|
20566
|
-
import { jsx as
|
|
20922
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
20567
20923
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
20568
20924
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
20569
20925
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
@@ -20682,7 +21038,7 @@ var FocusScope = React9.forwardRef((props, forwardedRef) => {
|
|
|
20682
21038
|
},
|
|
20683
21039
|
[loop, trapped, focusScope.paused]
|
|
20684
21040
|
);
|
|
20685
|
-
return /* @__PURE__ */
|
|
21041
|
+
return /* @__PURE__ */ jsx15(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
20686
21042
|
});
|
|
20687
21043
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
20688
21044
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -22311,7 +22667,7 @@ function observeMove(element, onMove) {
|
|
|
22311
22667
|
refresh(true);
|
|
22312
22668
|
return cleanup;
|
|
22313
22669
|
}
|
|
22314
|
-
function autoUpdate(reference, floating,
|
|
22670
|
+
function autoUpdate(reference, floating, update2, options) {
|
|
22315
22671
|
if (options === void 0) {
|
|
22316
22672
|
options = {};
|
|
22317
22673
|
}
|
|
@@ -22325,12 +22681,12 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
22325
22681
|
const referenceEl = unwrapElement(reference);
|
|
22326
22682
|
const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...floating ? getOverflowAncestors(floating) : []] : [];
|
|
22327
22683
|
ancestors.forEach((ancestor) => {
|
|
22328
|
-
ancestorScroll && ancestor.addEventListener("scroll",
|
|
22684
|
+
ancestorScroll && ancestor.addEventListener("scroll", update2, {
|
|
22329
22685
|
passive: true
|
|
22330
22686
|
});
|
|
22331
|
-
ancestorResize && ancestor.addEventListener("resize",
|
|
22687
|
+
ancestorResize && ancestor.addEventListener("resize", update2);
|
|
22332
22688
|
});
|
|
22333
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl,
|
|
22689
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update2) : null;
|
|
22334
22690
|
let reobserveFrame = -1;
|
|
22335
22691
|
let resizeObserver = null;
|
|
22336
22692
|
if (elementResize) {
|
|
@@ -22344,7 +22700,7 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
22344
22700
|
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
22345
22701
|
});
|
|
22346
22702
|
}
|
|
22347
|
-
|
|
22703
|
+
update2();
|
|
22348
22704
|
});
|
|
22349
22705
|
if (referenceEl && !animationFrame) {
|
|
22350
22706
|
resizeObserver.observe(referenceEl);
|
|
@@ -22361,17 +22717,17 @@ function autoUpdate(reference, floating, update, options) {
|
|
|
22361
22717
|
function frameLoop() {
|
|
22362
22718
|
const nextRefRect = getBoundingClientRect(reference);
|
|
22363
22719
|
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
22364
|
-
|
|
22720
|
+
update2();
|
|
22365
22721
|
}
|
|
22366
22722
|
prevRefRect = nextRefRect;
|
|
22367
22723
|
frameId = requestAnimationFrame(frameLoop);
|
|
22368
22724
|
}
|
|
22369
|
-
|
|
22725
|
+
update2();
|
|
22370
22726
|
return () => {
|
|
22371
22727
|
var _resizeObserver2;
|
|
22372
22728
|
ancestors.forEach((ancestor) => {
|
|
22373
|
-
ancestorScroll && ancestor.removeEventListener("scroll",
|
|
22374
|
-
ancestorResize && ancestor.removeEventListener("resize",
|
|
22729
|
+
ancestorScroll && ancestor.removeEventListener("scroll", update2);
|
|
22730
|
+
ancestorResize && ancestor.removeEventListener("resize", update2);
|
|
22375
22731
|
});
|
|
22376
22732
|
cleanupIo == null || cleanupIo();
|
|
22377
22733
|
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
@@ -22529,7 +22885,7 @@ function useFloating(options) {
|
|
|
22529
22885
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
22530
22886
|
const platformRef = useLatestRef(platform2);
|
|
22531
22887
|
const openRef = useLatestRef(open);
|
|
22532
|
-
const
|
|
22888
|
+
const update2 = React12.useCallback(() => {
|
|
22533
22889
|
if (!referenceRef.current || !floatingRef.current) {
|
|
22534
22890
|
return;
|
|
22535
22891
|
}
|
|
@@ -22579,11 +22935,11 @@ function useFloating(options) {
|
|
|
22579
22935
|
if (floatingEl) floatingRef.current = floatingEl;
|
|
22580
22936
|
if (referenceEl && floatingEl) {
|
|
22581
22937
|
if (whileElementsMountedRef.current) {
|
|
22582
|
-
return whileElementsMountedRef.current(referenceEl, floatingEl,
|
|
22938
|
+
return whileElementsMountedRef.current(referenceEl, floatingEl, update2);
|
|
22583
22939
|
}
|
|
22584
|
-
|
|
22940
|
+
update2();
|
|
22585
22941
|
}
|
|
22586
|
-
}, [referenceEl, floatingEl,
|
|
22942
|
+
}, [referenceEl, floatingEl, update2, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
22587
22943
|
const refs = React12.useMemo(() => ({
|
|
22588
22944
|
reference: referenceRef,
|
|
22589
22945
|
floating: floatingRef,
|
|
@@ -22622,11 +22978,11 @@ function useFloating(options) {
|
|
|
22622
22978
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
22623
22979
|
return React12.useMemo(() => ({
|
|
22624
22980
|
...data,
|
|
22625
|
-
update,
|
|
22981
|
+
update: update2,
|
|
22626
22982
|
refs,
|
|
22627
22983
|
elements,
|
|
22628
22984
|
floatingStyles
|
|
22629
|
-
}), [data,
|
|
22985
|
+
}), [data, update2, refs, elements, floatingStyles]);
|
|
22630
22986
|
}
|
|
22631
22987
|
var arrow$1 = (options) => {
|
|
22632
22988
|
function isRef(value) {
|
|
@@ -22717,11 +23073,11 @@ var arrow3 = (options, deps) => {
|
|
|
22717
23073
|
|
|
22718
23074
|
// ../../node_modules/.pnpm/@radix-ui+react-arrow@1.1.7_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react@_e05f2c19a58a99fddf374207b5e3778c/node_modules/@radix-ui/react-arrow/dist/index.mjs
|
|
22719
23075
|
import * as React13 from "react";
|
|
22720
|
-
import { jsx as
|
|
23076
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
22721
23077
|
var NAME = "Arrow";
|
|
22722
23078
|
var Arrow = React13.forwardRef((props, forwardedRef) => {
|
|
22723
23079
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
22724
|
-
return /* @__PURE__ */
|
|
23080
|
+
return /* @__PURE__ */ jsx16(
|
|
22725
23081
|
Primitive.svg,
|
|
22726
23082
|
{
|
|
22727
23083
|
...arrowProps,
|
|
@@ -22730,7 +23086,7 @@ var Arrow = React13.forwardRef((props, forwardedRef) => {
|
|
|
22730
23086
|
height,
|
|
22731
23087
|
viewBox: "0 0 30 10",
|
|
22732
23088
|
preserveAspectRatio: "none",
|
|
22733
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
23089
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx16("polygon", { points: "0,0 30,0 15,10" })
|
|
22734
23090
|
}
|
|
22735
23091
|
);
|
|
22736
23092
|
});
|
|
@@ -22775,14 +23131,14 @@ function useSize(element) {
|
|
|
22775
23131
|
}
|
|
22776
23132
|
|
|
22777
23133
|
// ../../node_modules/.pnpm/@radix-ui+react-popper@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react_13e0521d8aea7ebfbfb8bee1fb615c05/node_modules/@radix-ui/react-popper/dist/index.mjs
|
|
22778
|
-
import { jsx as
|
|
23134
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
22779
23135
|
var POPPER_NAME = "Popper";
|
|
22780
23136
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
22781
23137
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22782
23138
|
var Popper = (props) => {
|
|
22783
23139
|
const { __scopePopper, children } = props;
|
|
22784
23140
|
const [anchor, setAnchor] = React15.useState(null);
|
|
22785
|
-
return /* @__PURE__ */
|
|
23141
|
+
return /* @__PURE__ */ jsx17(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22786
23142
|
};
|
|
22787
23143
|
Popper.displayName = POPPER_NAME;
|
|
22788
23144
|
var ANCHOR_NAME = "PopperAnchor";
|
|
@@ -22800,7 +23156,7 @@ var PopperAnchor = React15.forwardRef(
|
|
|
22800
23156
|
context.onAnchorChange(anchorRef.current);
|
|
22801
23157
|
}
|
|
22802
23158
|
});
|
|
22803
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
23159
|
+
return virtualRef ? null : /* @__PURE__ */ jsx17(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
22804
23160
|
}
|
|
22805
23161
|
);
|
|
22806
23162
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
@@ -22893,7 +23249,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22893
23249
|
useLayoutEffect22(() => {
|
|
22894
23250
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
22895
23251
|
}, [content]);
|
|
22896
|
-
return /* @__PURE__ */
|
|
23252
|
+
return /* @__PURE__ */ jsx17(
|
|
22897
23253
|
"div",
|
|
22898
23254
|
{
|
|
22899
23255
|
ref: refs.setFloating,
|
|
@@ -22917,7 +23273,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22917
23273
|
}
|
|
22918
23274
|
},
|
|
22919
23275
|
dir: props.dir,
|
|
22920
|
-
children: /* @__PURE__ */
|
|
23276
|
+
children: /* @__PURE__ */ jsx17(
|
|
22921
23277
|
PopperContentProvider,
|
|
22922
23278
|
{
|
|
22923
23279
|
scope: __scopePopper,
|
|
@@ -22926,7 +23282,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22926
23282
|
arrowX,
|
|
22927
23283
|
arrowY,
|
|
22928
23284
|
shouldHideArrow: cannotCenterArrow,
|
|
22929
|
-
children: /* @__PURE__ */
|
|
23285
|
+
children: /* @__PURE__ */ jsx17(
|
|
22930
23286
|
Primitive.div,
|
|
22931
23287
|
{
|
|
22932
23288
|
"data-side": placedSide,
|
|
@@ -22963,7 +23319,7 @@ var PopperArrow = React15.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
22963
23319
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
22964
23320
|
// doesn't report size as we'd expect on SVG elements.
|
|
22965
23321
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
22966
|
-
/* @__PURE__ */
|
|
23322
|
+
/* @__PURE__ */ jsx17(
|
|
22967
23323
|
"span",
|
|
22968
23324
|
{
|
|
22969
23325
|
ref: contentContext.onArrowChange,
|
|
@@ -22986,7 +23342,7 @@ var PopperArrow = React15.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
22986
23342
|
}[contentContext.placedSide],
|
|
22987
23343
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
22988
23344
|
},
|
|
22989
|
-
children: /* @__PURE__ */
|
|
23345
|
+
children: /* @__PURE__ */ jsx17(
|
|
22990
23346
|
Root,
|
|
22991
23347
|
{
|
|
22992
23348
|
...arrowProps,
|
|
@@ -23049,14 +23405,14 @@ var Arrow2 = PopperArrow;
|
|
|
23049
23405
|
// ../../node_modules/.pnpm/@radix-ui+react-portal@1.1.9_@types+react-dom@19.2.3_@types+react@19.2.14__@types+react_7668895bec2444446faa4e0f4eb5244b/node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
23050
23406
|
import * as React16 from "react";
|
|
23051
23407
|
import ReactDOM3 from "react-dom";
|
|
23052
|
-
import { jsx as
|
|
23408
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
23053
23409
|
var PORTAL_NAME = "Portal";
|
|
23054
23410
|
var Portal = React16.forwardRef((props, forwardedRef) => {
|
|
23055
23411
|
const { container: containerProp, ...portalProps } = props;
|
|
23056
23412
|
const [mounted, setMounted] = React16.useState(false);
|
|
23057
23413
|
useLayoutEffect22(() => setMounted(true), []);
|
|
23058
23414
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
23059
|
-
return container ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
23415
|
+
return container ? ReactDOM3.createPortal(/* @__PURE__ */ jsx18(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
23060
23416
|
});
|
|
23061
23417
|
Portal.displayName = PORTAL_NAME;
|
|
23062
23418
|
|
|
@@ -24096,7 +24452,7 @@ ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
|
24096
24452
|
var Combination_default = ReactRemoveScroll;
|
|
24097
24453
|
|
|
24098
24454
|
// ../../node_modules/.pnpm/@radix-ui+react-popover@1.1.15_@types+react-dom@19.2.3_@types+react@19.2.14__@types+rea_8b5332f8e883134e9d9ab2856fc4395d/node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
24099
|
-
import { jsx as
|
|
24455
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
24100
24456
|
var POPOVER_NAME = "Popover";
|
|
24101
24457
|
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
24102
24458
|
createPopperScope
|
|
@@ -24121,7 +24477,7 @@ var Popover = (props) => {
|
|
|
24121
24477
|
onChange: onOpenChange,
|
|
24122
24478
|
caller: POPOVER_NAME
|
|
24123
24479
|
});
|
|
24124
|
-
return /* @__PURE__ */
|
|
24480
|
+
return /* @__PURE__ */ jsx19(Root2, { ...popperScope, children: /* @__PURE__ */ jsx19(
|
|
24125
24481
|
PopoverProvider,
|
|
24126
24482
|
{
|
|
24127
24483
|
scope: __scopePopover,
|
|
@@ -24150,7 +24506,7 @@ var PopoverAnchor = React28.forwardRef(
|
|
|
24150
24506
|
onCustomAnchorAdd();
|
|
24151
24507
|
return () => onCustomAnchorRemove();
|
|
24152
24508
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
24153
|
-
return /* @__PURE__ */
|
|
24509
|
+
return /* @__PURE__ */ jsx19(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
24154
24510
|
}
|
|
24155
24511
|
);
|
|
24156
24512
|
PopoverAnchor.displayName = ANCHOR_NAME2;
|
|
@@ -24161,7 +24517,7 @@ var PopoverTrigger = React28.forwardRef(
|
|
|
24161
24517
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
24162
24518
|
const popperScope = usePopperScope(__scopePopover);
|
|
24163
24519
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
24164
|
-
const trigger = /* @__PURE__ */
|
|
24520
|
+
const trigger = /* @__PURE__ */ jsx19(
|
|
24165
24521
|
Primitive.button,
|
|
24166
24522
|
{
|
|
24167
24523
|
type: "button",
|
|
@@ -24174,7 +24530,7 @@ var PopoverTrigger = React28.forwardRef(
|
|
|
24174
24530
|
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
24175
24531
|
}
|
|
24176
24532
|
);
|
|
24177
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */
|
|
24533
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx19(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
24178
24534
|
}
|
|
24179
24535
|
);
|
|
24180
24536
|
PopoverTrigger.displayName = TRIGGER_NAME;
|
|
@@ -24185,7 +24541,7 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
|
|
|
24185
24541
|
var PopoverPortal = (props) => {
|
|
24186
24542
|
const { __scopePopover, forceMount, children, container } = props;
|
|
24187
24543
|
const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
|
|
24188
|
-
return /* @__PURE__ */
|
|
24544
|
+
return /* @__PURE__ */ jsx19(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx19(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx19(Portal, { asChild: true, container, children }) }) });
|
|
24189
24545
|
};
|
|
24190
24546
|
PopoverPortal.displayName = PORTAL_NAME2;
|
|
24191
24547
|
var CONTENT_NAME2 = "PopoverContent";
|
|
@@ -24194,7 +24550,7 @@ var PopoverContent = React28.forwardRef(
|
|
|
24194
24550
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
|
|
24195
24551
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
24196
24552
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
24197
|
-
return /* @__PURE__ */
|
|
24553
|
+
return /* @__PURE__ */ jsx19(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx19(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx19(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
24198
24554
|
}
|
|
24199
24555
|
);
|
|
24200
24556
|
PopoverContent.displayName = CONTENT_NAME2;
|
|
@@ -24209,7 +24565,7 @@ var PopoverContentModal = React28.forwardRef(
|
|
|
24209
24565
|
const content = contentRef.current;
|
|
24210
24566
|
if (content) return hideOthers(content);
|
|
24211
24567
|
}, []);
|
|
24212
|
-
return /* @__PURE__ */
|
|
24568
|
+
return /* @__PURE__ */ jsx19(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx19(
|
|
24213
24569
|
PopoverContentImpl,
|
|
24214
24570
|
{
|
|
24215
24571
|
...props,
|
|
@@ -24244,7 +24600,7 @@ var PopoverContentNonModal = React28.forwardRef(
|
|
|
24244
24600
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
24245
24601
|
const hasInteractedOutsideRef = React28.useRef(false);
|
|
24246
24602
|
const hasPointerDownOutsideRef = React28.useRef(false);
|
|
24247
|
-
return /* @__PURE__ */
|
|
24603
|
+
return /* @__PURE__ */ jsx19(
|
|
24248
24604
|
PopoverContentImpl,
|
|
24249
24605
|
{
|
|
24250
24606
|
...props,
|
|
@@ -24296,7 +24652,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24296
24652
|
const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
|
|
24297
24653
|
const popperScope = usePopperScope(__scopePopover);
|
|
24298
24654
|
useFocusGuards();
|
|
24299
|
-
return /* @__PURE__ */
|
|
24655
|
+
return /* @__PURE__ */ jsx19(
|
|
24300
24656
|
FocusScope,
|
|
24301
24657
|
{
|
|
24302
24658
|
asChild: true,
|
|
@@ -24304,7 +24660,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24304
24660
|
trapped: trapFocus,
|
|
24305
24661
|
onMountAutoFocus: onOpenAutoFocus,
|
|
24306
24662
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
24307
|
-
children: /* @__PURE__ */
|
|
24663
|
+
children: /* @__PURE__ */ jsx19(
|
|
24308
24664
|
DismissableLayer,
|
|
24309
24665
|
{
|
|
24310
24666
|
asChild: true,
|
|
@@ -24314,7 +24670,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24314
24670
|
onPointerDownOutside,
|
|
24315
24671
|
onFocusOutside,
|
|
24316
24672
|
onDismiss: () => context.onOpenChange(false),
|
|
24317
|
-
children: /* @__PURE__ */
|
|
24673
|
+
children: /* @__PURE__ */ jsx19(
|
|
24318
24674
|
Content,
|
|
24319
24675
|
{
|
|
24320
24676
|
"data-state": getState(context.open),
|
|
@@ -24347,7 +24703,7 @@ var PopoverClose = React28.forwardRef(
|
|
|
24347
24703
|
(props, forwardedRef) => {
|
|
24348
24704
|
const { __scopePopover, ...closeProps } = props;
|
|
24349
24705
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
24350
|
-
return /* @__PURE__ */
|
|
24706
|
+
return /* @__PURE__ */ jsx19(
|
|
24351
24707
|
Primitive.button,
|
|
24352
24708
|
{
|
|
24353
24709
|
type: "button",
|
|
@@ -24364,7 +24720,7 @@ var PopoverArrow = React28.forwardRef(
|
|
|
24364
24720
|
(props, forwardedRef) => {
|
|
24365
24721
|
const { __scopePopover, ...arrowProps } = props;
|
|
24366
24722
|
const popperScope = usePopperScope(__scopePopover);
|
|
24367
|
-
return /* @__PURE__ */
|
|
24723
|
+
return /* @__PURE__ */ jsx19(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
24368
24724
|
}
|
|
24369
24725
|
);
|
|
24370
24726
|
PopoverArrow.displayName = ARROW_NAME2;
|
|
@@ -24400,7 +24756,7 @@ import * as React30 from "react";
|
|
|
24400
24756
|
|
|
24401
24757
|
// ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.14__@ty_fa89646d7248b32d1762bf88948f6339/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
24402
24758
|
import * as React29 from "react";
|
|
24403
|
-
import { jsx as
|
|
24759
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
24404
24760
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
24405
24761
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
24406
24762
|
position: "absolute",
|
|
@@ -24417,7 +24773,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
24417
24773
|
var NAME2 = "VisuallyHidden";
|
|
24418
24774
|
var VisuallyHidden = React29.forwardRef(
|
|
24419
24775
|
(props, forwardedRef) => {
|
|
24420
|
-
return /* @__PURE__ */
|
|
24776
|
+
return /* @__PURE__ */ jsx20(
|
|
24421
24777
|
Primitive.span,
|
|
24422
24778
|
{
|
|
24423
24779
|
...props,
|
|
@@ -24431,7 +24787,7 @@ VisuallyHidden.displayName = NAME2;
|
|
|
24431
24787
|
var Root3 = VisuallyHidden;
|
|
24432
24788
|
|
|
24433
24789
|
// ../../node_modules/.pnpm/@radix-ui+react-tooltip@1.2.8_@types+react-dom@19.2.3_@types+react@19.2.14__@types+reac_9074d9fb06315b089b2bee17c4c65951/node_modules/@radix-ui/react-tooltip/dist/index.mjs
|
|
24434
|
-
import { jsx as
|
|
24790
|
+
import { jsx as jsx21, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
24435
24791
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
24436
24792
|
createPopperScope
|
|
24437
24793
|
]);
|
|
@@ -24455,7 +24811,7 @@ var TooltipProvider = (props) => {
|
|
|
24455
24811
|
const skipDelayTimer = skipDelayTimerRef.current;
|
|
24456
24812
|
return () => window.clearTimeout(skipDelayTimer);
|
|
24457
24813
|
}, []);
|
|
24458
|
-
return /* @__PURE__ */
|
|
24814
|
+
return /* @__PURE__ */ jsx21(
|
|
24459
24815
|
TooltipProviderContextProvider,
|
|
24460
24816
|
{
|
|
24461
24817
|
scope: __scopeTooltip,
|
|
@@ -24546,7 +24902,7 @@ var Tooltip = (props) => {
|
|
|
24546
24902
|
}
|
|
24547
24903
|
};
|
|
24548
24904
|
}, []);
|
|
24549
|
-
return /* @__PURE__ */
|
|
24905
|
+
return /* @__PURE__ */ jsx21(Root2, { ...popperScope, children: /* @__PURE__ */ jsx21(
|
|
24550
24906
|
TooltipContextProvider,
|
|
24551
24907
|
{
|
|
24552
24908
|
scope: __scopeTooltip,
|
|
@@ -24590,7 +24946,7 @@ var TooltipTrigger = React30.forwardRef(
|
|
|
24590
24946
|
React30.useEffect(() => {
|
|
24591
24947
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
24592
24948
|
}, [handlePointerUp]);
|
|
24593
|
-
return /* @__PURE__ */
|
|
24949
|
+
return /* @__PURE__ */ jsx21(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx21(
|
|
24594
24950
|
Primitive.button,
|
|
24595
24951
|
{
|
|
24596
24952
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
@@ -24632,7 +24988,7 @@ var [PortalProvider2, usePortalContext2] = createTooltipContext(PORTAL_NAME3, {
|
|
|
24632
24988
|
var TooltipPortal = (props) => {
|
|
24633
24989
|
const { __scopeTooltip, forceMount, children, container } = props;
|
|
24634
24990
|
const context = useTooltipContext(PORTAL_NAME3, __scopeTooltip);
|
|
24635
|
-
return /* @__PURE__ */
|
|
24991
|
+
return /* @__PURE__ */ jsx21(PortalProvider2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx21(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx21(Portal, { asChild: true, container, children }) }) });
|
|
24636
24992
|
};
|
|
24637
24993
|
TooltipPortal.displayName = PORTAL_NAME3;
|
|
24638
24994
|
var CONTENT_NAME3 = "TooltipContent";
|
|
@@ -24641,7 +24997,7 @@ var TooltipContent = React30.forwardRef(
|
|
|
24641
24997
|
const portalContext = usePortalContext2(CONTENT_NAME3, props.__scopeTooltip);
|
|
24642
24998
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
24643
24999
|
const context = useTooltipContext(CONTENT_NAME3, props.__scopeTooltip);
|
|
24644
|
-
return /* @__PURE__ */
|
|
25000
|
+
return /* @__PURE__ */ jsx21(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx21(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx21(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
|
24645
25001
|
}
|
|
24646
25002
|
);
|
|
24647
25003
|
var TooltipContentHoverable = React30.forwardRef((props, forwardedRef) => {
|
|
@@ -24703,7 +25059,7 @@ var TooltipContentHoverable = React30.forwardRef((props, forwardedRef) => {
|
|
|
24703
25059
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
24704
25060
|
}
|
|
24705
25061
|
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
24706
|
-
return /* @__PURE__ */
|
|
25062
|
+
return /* @__PURE__ */ jsx21(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
24707
25063
|
});
|
|
24708
25064
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
24709
25065
|
var Slottable = createSlottable("TooltipContent");
|
|
@@ -24734,7 +25090,7 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24734
25090
|
return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
|
|
24735
25091
|
}
|
|
24736
25092
|
}, [context.trigger, onClose]);
|
|
24737
|
-
return /* @__PURE__ */
|
|
25093
|
+
return /* @__PURE__ */ jsx21(
|
|
24738
25094
|
DismissableLayer,
|
|
24739
25095
|
{
|
|
24740
25096
|
asChild: true,
|
|
@@ -24743,7 +25099,7 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24743
25099
|
onPointerDownOutside,
|
|
24744
25100
|
onFocusOutside: (event) => event.preventDefault(),
|
|
24745
25101
|
onDismiss: onClose,
|
|
24746
|
-
children: /* @__PURE__ */
|
|
25102
|
+
children: /* @__PURE__ */ jsxs6(
|
|
24747
25103
|
Content,
|
|
24748
25104
|
{
|
|
24749
25105
|
"data-state": context.stateAttribute,
|
|
@@ -24762,8 +25118,8 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24762
25118
|
}
|
|
24763
25119
|
},
|
|
24764
25120
|
children: [
|
|
24765
|
-
/* @__PURE__ */
|
|
24766
|
-
/* @__PURE__ */
|
|
25121
|
+
/* @__PURE__ */ jsx21(Slottable, { children }),
|
|
25122
|
+
/* @__PURE__ */ jsx21(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx21(Root3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
24767
25123
|
]
|
|
24768
25124
|
}
|
|
24769
25125
|
)
|
|
@@ -24781,7 +25137,7 @@ var TooltipArrow = React30.forwardRef(
|
|
|
24781
25137
|
ARROW_NAME3,
|
|
24782
25138
|
__scopeTooltip
|
|
24783
25139
|
);
|
|
24784
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */
|
|
25140
|
+
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx21(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
24785
25141
|
}
|
|
24786
25142
|
);
|
|
24787
25143
|
TooltipArrow.displayName = ARROW_NAME3;
|
|
@@ -24919,7 +25275,7 @@ __export(dist_exports6, {
|
|
|
24919
25275
|
createCollapsibleScope: () => createCollapsibleScope
|
|
24920
25276
|
});
|
|
24921
25277
|
import * as React31 from "react";
|
|
24922
|
-
import { jsx as
|
|
25278
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
24923
25279
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
24924
25280
|
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
24925
25281
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
@@ -24939,7 +25295,7 @@ var Collapsible = React31.forwardRef(
|
|
|
24939
25295
|
onChange: onOpenChange,
|
|
24940
25296
|
caller: COLLAPSIBLE_NAME
|
|
24941
25297
|
});
|
|
24942
|
-
return /* @__PURE__ */
|
|
25298
|
+
return /* @__PURE__ */ jsx22(
|
|
24943
25299
|
CollapsibleProvider,
|
|
24944
25300
|
{
|
|
24945
25301
|
scope: __scopeCollapsible,
|
|
@@ -24947,7 +25303,7 @@ var Collapsible = React31.forwardRef(
|
|
|
24947
25303
|
contentId: useId(),
|
|
24948
25304
|
open,
|
|
24949
25305
|
onOpenToggle: React31.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
24950
|
-
children: /* @__PURE__ */
|
|
25306
|
+
children: /* @__PURE__ */ jsx22(
|
|
24951
25307
|
Primitive.div,
|
|
24952
25308
|
{
|
|
24953
25309
|
"data-state": getState2(open),
|
|
@@ -24966,7 +25322,7 @@ var CollapsibleTrigger = React31.forwardRef(
|
|
|
24966
25322
|
(props, forwardedRef) => {
|
|
24967
25323
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
24968
25324
|
const context = useCollapsibleContext(TRIGGER_NAME3, __scopeCollapsible);
|
|
24969
|
-
return /* @__PURE__ */
|
|
25325
|
+
return /* @__PURE__ */ jsx22(
|
|
24970
25326
|
Primitive.button,
|
|
24971
25327
|
{
|
|
24972
25328
|
type: "button",
|
|
@@ -24988,7 +25344,7 @@ var CollapsibleContent = React31.forwardRef(
|
|
|
24988
25344
|
(props, forwardedRef) => {
|
|
24989
25345
|
const { forceMount, ...contentProps } = props;
|
|
24990
25346
|
const context = useCollapsibleContext(CONTENT_NAME4, props.__scopeCollapsible);
|
|
24991
|
-
return /* @__PURE__ */
|
|
25347
|
+
return /* @__PURE__ */ jsx22(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx22(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
24992
25348
|
}
|
|
24993
25349
|
);
|
|
24994
25350
|
CollapsibleContent.displayName = CONTENT_NAME4;
|
|
@@ -25028,7 +25384,7 @@ var CollapsibleContentImpl = React31.forwardRef((props, forwardedRef) => {
|
|
|
25028
25384
|
setIsPresent(present);
|
|
25029
25385
|
}
|
|
25030
25386
|
}, [context.open, present]);
|
|
25031
|
-
return /* @__PURE__ */
|
|
25387
|
+
return /* @__PURE__ */ jsx22(
|
|
25032
25388
|
Primitive.div,
|
|
25033
25389
|
{
|
|
25034
25390
|
"data-state": getState2(context.open),
|
|
@@ -25076,7 +25432,7 @@ __export(dist_exports7, {
|
|
|
25076
25432
|
createDialogScope: () => createDialogScope
|
|
25077
25433
|
});
|
|
25078
25434
|
import * as React32 from "react";
|
|
25079
|
-
import { Fragment as Fragment7, jsx as
|
|
25435
|
+
import { Fragment as Fragment7, jsx as jsx23, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
25080
25436
|
var DIALOG_NAME = "Dialog";
|
|
25081
25437
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
25082
25438
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -25097,7 +25453,7 @@ var Dialog = (props) => {
|
|
|
25097
25453
|
onChange: onOpenChange,
|
|
25098
25454
|
caller: DIALOG_NAME
|
|
25099
25455
|
});
|
|
25100
|
-
return /* @__PURE__ */
|
|
25456
|
+
return /* @__PURE__ */ jsx23(
|
|
25101
25457
|
DialogProvider,
|
|
25102
25458
|
{
|
|
25103
25459
|
scope: __scopeDialog,
|
|
@@ -25121,7 +25477,7 @@ var DialogTrigger = React32.forwardRef(
|
|
|
25121
25477
|
const { __scopeDialog, ...triggerProps } = props;
|
|
25122
25478
|
const context = useDialogContext(TRIGGER_NAME4, __scopeDialog);
|
|
25123
25479
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
25124
|
-
return /* @__PURE__ */
|
|
25480
|
+
return /* @__PURE__ */ jsx23(
|
|
25125
25481
|
Primitive.button,
|
|
25126
25482
|
{
|
|
25127
25483
|
type: "button",
|
|
@@ -25144,7 +25500,7 @@ var [PortalProvider3, usePortalContext3] = createDialogContext(PORTAL_NAME4, {
|
|
|
25144
25500
|
var DialogPortal = (props) => {
|
|
25145
25501
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
25146
25502
|
const context = useDialogContext(PORTAL_NAME4, __scopeDialog);
|
|
25147
|
-
return /* @__PURE__ */
|
|
25503
|
+
return /* @__PURE__ */ jsx23(PortalProvider3, { scope: __scopeDialog, forceMount, children: React32.Children.map(children, (child) => /* @__PURE__ */ jsx23(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx23(Portal, { asChild: true, container, children: child }) })) });
|
|
25148
25504
|
};
|
|
25149
25505
|
DialogPortal.displayName = PORTAL_NAME4;
|
|
25150
25506
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -25153,7 +25509,7 @@ var DialogOverlay = React32.forwardRef(
|
|
|
25153
25509
|
const portalContext = usePortalContext3(OVERLAY_NAME, props.__scopeDialog);
|
|
25154
25510
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
25155
25511
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
25156
|
-
return context.modal ? /* @__PURE__ */
|
|
25512
|
+
return context.modal ? /* @__PURE__ */ jsx23(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx23(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
25157
25513
|
}
|
|
25158
25514
|
);
|
|
25159
25515
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
@@ -25165,7 +25521,7 @@ var DialogOverlayImpl = React32.forwardRef(
|
|
|
25165
25521
|
return (
|
|
25166
25522
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
25167
25523
|
// ie. when `Overlay` and `Content` are siblings
|
|
25168
|
-
/* @__PURE__ */
|
|
25524
|
+
/* @__PURE__ */ jsx23(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx23(
|
|
25169
25525
|
Primitive.div,
|
|
25170
25526
|
{
|
|
25171
25527
|
"data-state": getState3(context.open),
|
|
@@ -25183,7 +25539,7 @@ var DialogContent = React32.forwardRef(
|
|
|
25183
25539
|
const portalContext = usePortalContext3(CONTENT_NAME5, props.__scopeDialog);
|
|
25184
25540
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
25185
25541
|
const context = useDialogContext(CONTENT_NAME5, props.__scopeDialog);
|
|
25186
|
-
return /* @__PURE__ */
|
|
25542
|
+
return /* @__PURE__ */ jsx23(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx23(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx23(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
25187
25543
|
}
|
|
25188
25544
|
);
|
|
25189
25545
|
DialogContent.displayName = CONTENT_NAME5;
|
|
@@ -25196,7 +25552,7 @@ var DialogContentModal = React32.forwardRef(
|
|
|
25196
25552
|
const content = contentRef.current;
|
|
25197
25553
|
if (content) return hideOthers(content);
|
|
25198
25554
|
}, []);
|
|
25199
|
-
return /* @__PURE__ */
|
|
25555
|
+
return /* @__PURE__ */ jsx23(
|
|
25200
25556
|
DialogContentImpl,
|
|
25201
25557
|
{
|
|
25202
25558
|
...props,
|
|
@@ -25226,7 +25582,7 @@ var DialogContentNonModal = React32.forwardRef(
|
|
|
25226
25582
|
const context = useDialogContext(CONTENT_NAME5, props.__scopeDialog);
|
|
25227
25583
|
const hasInteractedOutsideRef = React32.useRef(false);
|
|
25228
25584
|
const hasPointerDownOutsideRef = React32.useRef(false);
|
|
25229
|
-
return /* @__PURE__ */
|
|
25585
|
+
return /* @__PURE__ */ jsx23(
|
|
25230
25586
|
DialogContentImpl,
|
|
25231
25587
|
{
|
|
25232
25588
|
...props,
|
|
@@ -25268,8 +25624,8 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25268
25624
|
const contentRef = React32.useRef(null);
|
|
25269
25625
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
25270
25626
|
useFocusGuards();
|
|
25271
|
-
return /* @__PURE__ */
|
|
25272
|
-
/* @__PURE__ */
|
|
25627
|
+
return /* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
25628
|
+
/* @__PURE__ */ jsx23(
|
|
25273
25629
|
FocusScope,
|
|
25274
25630
|
{
|
|
25275
25631
|
asChild: true,
|
|
@@ -25277,7 +25633,7 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25277
25633
|
trapped: trapFocus,
|
|
25278
25634
|
onMountAutoFocus: onOpenAutoFocus,
|
|
25279
25635
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
25280
|
-
children: /* @__PURE__ */
|
|
25636
|
+
children: /* @__PURE__ */ jsx23(
|
|
25281
25637
|
DismissableLayer,
|
|
25282
25638
|
{
|
|
25283
25639
|
role: "dialog",
|
|
@@ -25292,9 +25648,9 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25292
25648
|
)
|
|
25293
25649
|
}
|
|
25294
25650
|
),
|
|
25295
|
-
/* @__PURE__ */
|
|
25296
|
-
/* @__PURE__ */
|
|
25297
|
-
/* @__PURE__ */
|
|
25651
|
+
/* @__PURE__ */ jsxs7(Fragment7, { children: [
|
|
25652
|
+
/* @__PURE__ */ jsx23(TitleWarning, { titleId: context.titleId }),
|
|
25653
|
+
/* @__PURE__ */ jsx23(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
25298
25654
|
] })
|
|
25299
25655
|
] });
|
|
25300
25656
|
}
|
|
@@ -25304,7 +25660,7 @@ var DialogTitle = React32.forwardRef(
|
|
|
25304
25660
|
(props, forwardedRef) => {
|
|
25305
25661
|
const { __scopeDialog, ...titleProps } = props;
|
|
25306
25662
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
25307
|
-
return /* @__PURE__ */
|
|
25663
|
+
return /* @__PURE__ */ jsx23(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
25308
25664
|
}
|
|
25309
25665
|
);
|
|
25310
25666
|
DialogTitle.displayName = TITLE_NAME;
|
|
@@ -25313,7 +25669,7 @@ var DialogDescription = React32.forwardRef(
|
|
|
25313
25669
|
(props, forwardedRef) => {
|
|
25314
25670
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
25315
25671
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
25316
|
-
return /* @__PURE__ */
|
|
25672
|
+
return /* @__PURE__ */ jsx23(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
25317
25673
|
}
|
|
25318
25674
|
);
|
|
25319
25675
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
@@ -25322,7 +25678,7 @@ var DialogClose = React32.forwardRef(
|
|
|
25322
25678
|
(props, forwardedRef) => {
|
|
25323
25679
|
const { __scopeDialog, ...closeProps } = props;
|
|
25324
25680
|
const context = useDialogContext(CLOSE_NAME2, __scopeDialog);
|
|
25325
|
-
return /* @__PURE__ */
|
|
25681
|
+
return /* @__PURE__ */ jsx23(
|
|
25326
25682
|
Primitive.button,
|
|
25327
25683
|
{
|
|
25328
25684
|
type: "button",
|
|
@@ -25381,17 +25737,17 @@ var Description = DialogDescription;
|
|
|
25381
25737
|
var Close2 = DialogClose;
|
|
25382
25738
|
|
|
25383
25739
|
// ../ui/src/lib/overlay-container.ts
|
|
25384
|
-
import { createContext as
|
|
25385
|
-
var OverlayRootContext =
|
|
25386
|
-
var PortalContainerContext =
|
|
25740
|
+
import { createContext as createContext8, useContext as useContext8 } from "react";
|
|
25741
|
+
var OverlayRootContext = createContext8(null);
|
|
25742
|
+
var PortalContainerContext = createContext8(null);
|
|
25387
25743
|
var OverlayRootProvider = OverlayRootContext.Provider;
|
|
25388
25744
|
var PortalContainerProvider = PortalContainerContext.Provider;
|
|
25389
25745
|
function useOverlayRoot() {
|
|
25390
|
-
return
|
|
25746
|
+
return useContext8(OverlayRootContext) ?? void 0;
|
|
25391
25747
|
}
|
|
25392
25748
|
function usePortalContainer() {
|
|
25393
|
-
const container =
|
|
25394
|
-
const root =
|
|
25749
|
+
const container = useContext8(PortalContainerContext);
|
|
25750
|
+
const root = useContext8(OverlayRootContext);
|
|
25395
25751
|
return container ?? root ?? void 0;
|
|
25396
25752
|
}
|
|
25397
25753
|
|
|
@@ -26571,18 +26927,21 @@ var cn2 = /* @__PURE__ */ wrapClsx(instance.mergeString, instance);
|
|
|
26571
26927
|
var twMerge2 = instance.merge;
|
|
26572
26928
|
|
|
26573
26929
|
// ../ui/src/components/dialog.tsx
|
|
26574
|
-
import { jsx as
|
|
26930
|
+
import { jsx as jsx24, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26575
26931
|
function Dialog2({
|
|
26576
26932
|
...props
|
|
26577
26933
|
}) {
|
|
26578
|
-
return /* @__PURE__ */
|
|
26934
|
+
return /* @__PURE__ */ jsx24(dist_exports7.Root, { "data-slot": "dialog", ...props });
|
|
26579
26935
|
}
|
|
26580
26936
|
function DialogClose2({
|
|
26581
26937
|
...props
|
|
26582
26938
|
}) {
|
|
26583
|
-
return /* @__PURE__ */
|
|
26939
|
+
return /* @__PURE__ */ jsx24(dist_exports7.Close, { "data-slot": "dialog-close", ...props });
|
|
26584
26940
|
}
|
|
26585
26941
|
|
|
26942
|
+
// ../ui/src/composites/dialog.tsx
|
|
26943
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
26944
|
+
|
|
26586
26945
|
// ../ui/src/lib/shadow-focus.ts
|
|
26587
26946
|
var TABBABLE = [
|
|
26588
26947
|
"a[href]",
|
|
@@ -26617,14 +26976,12 @@ function loopTabInShadowRoot(event) {
|
|
|
26617
26976
|
}
|
|
26618
26977
|
|
|
26619
26978
|
// ../ui/src/composites/dialog.tsx
|
|
26620
|
-
import { jsx as
|
|
26621
|
-
|
|
26622
|
-
|
|
26623
|
-
...props
|
|
26624
|
-
}) {
|
|
26625
|
-
return /* @__PURE__ */ jsx24(
|
|
26979
|
+
import { jsx as jsx25, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
26980
|
+
var DialogOverlay2 = forwardRef17(function DialogOverlay3({ className, ...props }, ref) {
|
|
26981
|
+
return /* @__PURE__ */ jsx25(
|
|
26626
26982
|
dist_exports7.Overlay,
|
|
26627
26983
|
{
|
|
26984
|
+
ref,
|
|
26628
26985
|
"data-slot": "dialog-overlay",
|
|
26629
26986
|
className: cn2(
|
|
26630
26987
|
"fixed inset-0 z-50 bg-black/45 backdrop-blur-sm duration-(--motion-duration-fast) data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
|
|
@@ -26633,7 +26990,7 @@ function DialogOverlay2({
|
|
|
26633
26990
|
...props
|
|
26634
26991
|
}
|
|
26635
26992
|
);
|
|
26636
|
-
}
|
|
26993
|
+
});
|
|
26637
26994
|
function DialogContent2({
|
|
26638
26995
|
className,
|
|
26639
26996
|
children,
|
|
@@ -26643,9 +27000,9 @@ function DialogContent2({
|
|
|
26643
27000
|
...props
|
|
26644
27001
|
}) {
|
|
26645
27002
|
const overlayRoot = useOverlayRoot();
|
|
26646
|
-
return /* @__PURE__ */
|
|
26647
|
-
/* @__PURE__ */
|
|
26648
|
-
/* @__PURE__ */
|
|
27003
|
+
return /* @__PURE__ */ jsxs9(dist_exports7.Portal, { "data-slot": "dialog-portal", container: overlayRoot, children: [
|
|
27004
|
+
/* @__PURE__ */ jsx25(DialogOverlay2, { className: overlayClassName }),
|
|
27005
|
+
/* @__PURE__ */ jsxs9(
|
|
26649
27006
|
dist_exports7.Content,
|
|
26650
27007
|
{
|
|
26651
27008
|
onKeyDown: (event) => {
|
|
@@ -26660,14 +27017,14 @@ function DialogContent2({
|
|
|
26660
27017
|
...props,
|
|
26661
27018
|
children: [
|
|
26662
27019
|
children,
|
|
26663
|
-
showCloseButton && /* @__PURE__ */
|
|
27020
|
+
showCloseButton && /* @__PURE__ */ jsxs9(
|
|
26664
27021
|
dist_exports7.Close,
|
|
26665
27022
|
{
|
|
26666
27023
|
"data-slot": "dialog-close",
|
|
26667
27024
|
className: "absolute top-4 right-4 rounded-[8px] p-2 text-[hsl(var(--muted-foreground))] opacity-90 transition-colors hover:bg-[hsl(var(--accent))] hover:opacity-100 focus:outline-none disabled:pointer-events-none",
|
|
26668
27025
|
children: [
|
|
26669
|
-
/* @__PURE__ */
|
|
26670
|
-
/* @__PURE__ */
|
|
27026
|
+
/* @__PURE__ */ jsx25(X, { size: 16 }),
|
|
27027
|
+
/* @__PURE__ */ jsx25("span", { className: "sr-only", children: "\u5173\u95ED" })
|
|
26671
27028
|
]
|
|
26672
27029
|
}
|
|
26673
27030
|
)
|
|
@@ -26677,7 +27034,7 @@ function DialogContent2({
|
|
|
26677
27034
|
] });
|
|
26678
27035
|
}
|
|
26679
27036
|
function DialogTitle2({ className, ...props }) {
|
|
26680
|
-
return /* @__PURE__ */
|
|
27037
|
+
return /* @__PURE__ */ jsx25(
|
|
26681
27038
|
dist_exports7.Title,
|
|
26682
27039
|
{
|
|
26683
27040
|
"data-slot": "dialog-title",
|
|
@@ -26686,6 +27043,19 @@ function DialogTitle2({ className, ...props }) {
|
|
|
26686
27043
|
}
|
|
26687
27044
|
);
|
|
26688
27045
|
}
|
|
27046
|
+
function DialogDescription2({
|
|
27047
|
+
className,
|
|
27048
|
+
...props
|
|
27049
|
+
}) {
|
|
27050
|
+
return /* @__PURE__ */ jsx25(
|
|
27051
|
+
dist_exports7.Description,
|
|
27052
|
+
{
|
|
27053
|
+
"data-slot": "dialog-description",
|
|
27054
|
+
className: cn2("text-sm text-[hsl(var(--muted-foreground))]", className),
|
|
27055
|
+
...props
|
|
27056
|
+
}
|
|
27057
|
+
);
|
|
27058
|
+
}
|
|
26689
27059
|
|
|
26690
27060
|
// src/chat/chat-theme.tsx
|
|
26691
27061
|
var NEUTRAL = {
|
|
@@ -26750,7 +27120,7 @@ export {
|
|
|
26750
27120
|
CircleAlert,
|
|
26751
27121
|
CircleCheck,
|
|
26752
27122
|
CirclePause,
|
|
26753
|
-
|
|
27123
|
+
CircleSlash,
|
|
26754
27124
|
Copy,
|
|
26755
27125
|
Download,
|
|
26756
27126
|
Earth,
|
|
@@ -26803,32 +27173,12 @@ export {
|
|
|
26803
27173
|
Terminal,
|
|
26804
27174
|
Trash2,
|
|
26805
27175
|
TriangleAlert,
|
|
26806
|
-
|
|
27176
|
+
Unplug,
|
|
26807
27177
|
Wrench,
|
|
26808
27178
|
X,
|
|
27179
|
+
Zap,
|
|
26809
27180
|
cn,
|
|
26810
27181
|
copyToClipboard,
|
|
26811
|
-
ChatEnvironmentProvider,
|
|
26812
|
-
useChatEnvironment,
|
|
26813
|
-
useHighlightedCode,
|
|
26814
|
-
useChatSessionDetail,
|
|
26815
|
-
useHideTodo,
|
|
26816
|
-
useChatRenderMode,
|
|
26817
|
-
notifyChat,
|
|
26818
|
-
useComposerBridge,
|
|
26819
|
-
useChatVirtualizer,
|
|
26820
|
-
getResultText,
|
|
26821
|
-
getResultImages,
|
|
26822
|
-
parseJsonValue,
|
|
26823
|
-
isPlainObject,
|
|
26824
|
-
getStringValue,
|
|
26825
|
-
getNumberValue,
|
|
26826
|
-
getBooleanValue,
|
|
26827
|
-
extractErrorMessage,
|
|
26828
|
-
getFileName,
|
|
26829
|
-
formatBytes,
|
|
26830
|
-
CodePreview,
|
|
26831
|
-
parseKbSearchResult,
|
|
26832
27182
|
getToolDescription,
|
|
26833
27183
|
formatToolFileName,
|
|
26834
27184
|
formatToolName,
|
|
@@ -26852,6 +27202,21 @@ export {
|
|
|
26852
27202
|
usePlanRevealRevision,
|
|
26853
27203
|
CurrentChatSessionProvider,
|
|
26854
27204
|
useCurrentChatSessionId,
|
|
27205
|
+
ChatEnvironmentProvider,
|
|
27206
|
+
useChatEnvironment,
|
|
27207
|
+
useHighlightedCode,
|
|
27208
|
+
useChatSessionDetail,
|
|
27209
|
+
useHideTodo,
|
|
27210
|
+
useChatRenderMode,
|
|
27211
|
+
notifyChat,
|
|
27212
|
+
useComposerBridge,
|
|
27213
|
+
useChatVirtualizer,
|
|
27214
|
+
getInputHistoryGeneration,
|
|
27215
|
+
onInputCachesReset,
|
|
27216
|
+
pluginRefsForSend,
|
|
27217
|
+
getPluginSuggestionItems,
|
|
27218
|
+
queueShortcutLabel,
|
|
27219
|
+
isQueueShortcut,
|
|
26855
27220
|
sendToSession,
|
|
26856
27221
|
useControllableState,
|
|
26857
27222
|
dist_exports6 as dist_exports,
|
|
@@ -26862,6 +27227,7 @@ export {
|
|
|
26862
27227
|
Portal3 as Portal,
|
|
26863
27228
|
Content22 as Content2,
|
|
26864
27229
|
dist_exports4 as dist_exports3,
|
|
27230
|
+
BrowserConnectionDialog,
|
|
26865
27231
|
useOverlayRoot,
|
|
26866
27232
|
usePortalContainer,
|
|
26867
27233
|
cn2,
|
|
@@ -26869,7 +27235,34 @@ export {
|
|
|
26869
27235
|
DialogClose2 as DialogClose,
|
|
26870
27236
|
DialogContent2 as DialogContent,
|
|
26871
27237
|
DialogTitle2 as DialogTitle,
|
|
27238
|
+
DialogDescription2 as DialogDescription,
|
|
26872
27239
|
chatTone,
|
|
27240
|
+
RichInputServicesProvider,
|
|
27241
|
+
useRichInputServices,
|
|
27242
|
+
fetchClientQuery,
|
|
27243
|
+
setClientQueryData,
|
|
27244
|
+
useClientQuery,
|
|
27245
|
+
refreshClientQuery,
|
|
27246
|
+
useRefreshWhenRunEnds,
|
|
27247
|
+
useClientSessionSkills,
|
|
27248
|
+
useClientSkillStats,
|
|
27249
|
+
useClientContextStats,
|
|
27250
|
+
useClientBackgroundTasks,
|
|
27251
|
+
refreshClientSessionSkills,
|
|
27252
|
+
useClientSessionModel,
|
|
27253
|
+
useClientModelCatalog,
|
|
27254
|
+
PREFERRED_MODEL_KEY,
|
|
27255
|
+
MODEL_REASONING_LEVELS_KEY,
|
|
27256
|
+
useClientModelPreferences,
|
|
27257
|
+
useModelCatalog,
|
|
27258
|
+
useModelPreferences,
|
|
27259
|
+
useComposerConnectionInfo,
|
|
27260
|
+
useComposerConnection,
|
|
27261
|
+
useSessionSkills,
|
|
27262
|
+
useSkillStats,
|
|
27263
|
+
useContextStats,
|
|
27264
|
+
useBackgroundTaskList,
|
|
27265
|
+
useSessionDataInvalidation,
|
|
26873
27266
|
useEffectEvent2 as useEffectEvent,
|
|
26874
27267
|
SessionPluginConfigForm,
|
|
26875
27268
|
sessionPluginLabel,
|
|
@@ -26916,7 +27309,7 @@ lucide-react/dist/esm/icons/circle-alert.js:
|
|
|
26916
27309
|
lucide-react/dist/esm/icons/circle-check.js:
|
|
26917
27310
|
lucide-react/dist/esm/icons/circle-dot.js:
|
|
26918
27311
|
lucide-react/dist/esm/icons/circle-pause.js:
|
|
26919
|
-
lucide-react/dist/esm/icons/circle-
|
|
27312
|
+
lucide-react/dist/esm/icons/circle-slash.js:
|
|
26920
27313
|
lucide-react/dist/esm/icons/circle.js:
|
|
26921
27314
|
lucide-react/dist/esm/icons/copy.js:
|
|
26922
27315
|
lucide-react/dist/esm/icons/download.js:
|
|
@@ -26972,9 +27365,10 @@ lucide-react/dist/esm/icons/square.js:
|
|
|
26972
27365
|
lucide-react/dist/esm/icons/terminal.js:
|
|
26973
27366
|
lucide-react/dist/esm/icons/trash-2.js:
|
|
26974
27367
|
lucide-react/dist/esm/icons/triangle-alert.js:
|
|
26975
|
-
lucide-react/dist/esm/icons/
|
|
27368
|
+
lucide-react/dist/esm/icons/unplug.js:
|
|
26976
27369
|
lucide-react/dist/esm/icons/wrench.js:
|
|
26977
27370
|
lucide-react/dist/esm/icons/x.js:
|
|
27371
|
+
lucide-react/dist/esm/icons/zap.js:
|
|
26978
27372
|
lucide-react/dist/esm/lucide-react.js:
|
|
26979
27373
|
(**
|
|
26980
27374
|
* @license lucide-react v0.468.0 - ISC
|
|
@@ -26983,4 +27377,4 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
26983
27377
|
* See the LICENSE file in the root directory of this source tree.
|
|
26984
27378
|
*)
|
|
26985
27379
|
*/
|
|
26986
|
-
//# sourceMappingURL=chunk-
|
|
27380
|
+
//# sourceMappingURL=chunk-42P352DI.js.map
|