@blade-hq/agent-react 2612.0.0-beta.2 → 2612.0.0-beta.20
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/ChatLoadingIndicator.d.ts +7 -0
- package/dist/chat/ChatPanel.d.ts +1 -3
- package/dist/chat/ContextAttachmentPills.d.ts +4 -0
- package/dist/chat/LightComposer.d.ts +1 -1
- package/dist/chat/LiteMessageList.d.ts +1 -1
- package/dist/chat/MessageList.d.ts +1 -0
- package/dist/chat/WorkflowRunBlock.d.ts +19 -3
- package/dist/chat/ai-elements/reasoning.d.ts +4 -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/MarkdownContent.d.ts +3 -0
- package/dist/chat/runtime/actions.d.ts +3 -1
- package/dist/chat/runtime/composer-channels.d.ts +4 -0
- package/dist/chat/runtime/input-cache-reset.d.ts +1 -1
- package/dist/chat/runtime/input-history-storage.d.ts +2 -0
- package/dist/chat/runtime/input-services.d.ts +0 -6
- package/dist/{chunk-FQQJP2GJ.js → chunk-C4FUFBG4.js} +781 -819
- package/dist/chunk-C4FUFBG4.js.map +1 -0
- package/dist/{chunk-6ZDOQEWK.js → chunk-KSVVYASW.js} +1706 -1358
- package/dist/chunk-KSVVYASW.js.map +1 -0
- package/dist/{chunk-WCMGQJLE.js → chunk-TY7DRU2R.js} +2 -2
- package/dist/components/ChatInput.d.ts +3 -1
- package/dist/components/TopicAssetSubmitDialog.d.ts +14 -0
- package/dist/components/plugin-connector.d.ts +1 -0
- package/dist/embed/entry.d.ts +5 -3
- 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 +4 -2
- package/dist/internal.js +13 -48
- package/dist/internal.js.map +1 -1
- package/dist/rich-input/ChatInput.d.ts +1 -1
- package/dist/rich-input/FileCompletionMenu.d.ts +6 -9
- package/dist/rich-input/SkillStatusBar.d.ts +2 -4
- 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 +27 -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/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.js +6434 -6358
- package/dist/rich-input.js.map +1 -1
- package/dist/style.full.css +1 -1
- 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 +23 -2
- 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-6ZDOQEWK.js.map +0 -1
- package/dist/chunk-FQQJP2GJ.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
- /package/dist/{chunk-WCMGQJLE.js.map → chunk-TY7DRU2R.js.map} +0 -0
|
@@ -1894,6 +1894,12 @@ 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-slash.js
|
|
1898
|
+
var CircleSlash = createLucideIcon("CircleSlash", [
|
|
1899
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1900
|
+
["line", { x1: "9", x2: "15", y1: "15", y2: "9", key: "1dfufj" }]
|
|
1901
|
+
]);
|
|
1902
|
+
|
|
1897
1903
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/circle-x.js
|
|
1898
1904
|
var CircleX = createLucideIcon("CircleX", [
|
|
1899
1905
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
@@ -2303,14 +2309,6 @@ var RefreshCcw = createLucideIcon("RefreshCcw", [
|
|
|
2303
2309
|
["path", { d: "M16 16h5v5", key: "ccwih5" }]
|
|
2304
2310
|
]);
|
|
2305
2311
|
|
|
2306
|
-
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/refresh-cw.js
|
|
2307
|
-
var RefreshCw = createLucideIcon("RefreshCw", [
|
|
2308
|
-
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
2309
|
-
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
2310
|
-
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
2311
|
-
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
2312
|
-
]);
|
|
2313
|
-
|
|
2314
2312
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/rocket.js
|
|
2315
2313
|
var Rocket = createLucideIcon("Rocket", [
|
|
2316
2314
|
[
|
|
@@ -2429,13 +2427,6 @@ var TriangleAlert = createLucideIcon("TriangleAlert", [
|
|
|
2429
2427
|
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
2430
2428
|
]);
|
|
2431
2429
|
|
|
2432
|
-
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/workflow.js
|
|
2433
|
-
var Workflow = createLucideIcon("Workflow", [
|
|
2434
|
-
["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2", key: "by2w9f" }],
|
|
2435
|
-
["path", { d: "M7 11v4a2 2 0 0 0 2 2h4", key: "xkn7yn" }],
|
|
2436
|
-
["rect", { width: "8", height: "8", x: "13", y: "13", rx: "2", key: "1cgmvn" }]
|
|
2437
|
-
]);
|
|
2438
|
-
|
|
2439
2430
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/wrench.js
|
|
2440
2431
|
var Wrench = createLucideIcon("Wrench", [
|
|
2441
2432
|
[
|
|
@@ -2453,8 +2444,19 @@ var X = createLucideIcon("X", [
|
|
|
2453
2444
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
2454
2445
|
]);
|
|
2455
2446
|
|
|
2447
|
+
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/zap.js
|
|
2448
|
+
var Zap = createLucideIcon("Zap", [
|
|
2449
|
+
[
|
|
2450
|
+
"path",
|
|
2451
|
+
{
|
|
2452
|
+
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",
|
|
2453
|
+
key: "1xq2db"
|
|
2454
|
+
}
|
|
2455
|
+
]
|
|
2456
|
+
]);
|
|
2457
|
+
|
|
2456
2458
|
// src/components/PlanUpdateBlock.tsx
|
|
2457
|
-
import { useEffect
|
|
2459
|
+
import { useEffect, useRef, useState } from "react";
|
|
2458
2460
|
|
|
2459
2461
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2460
2462
|
function r(e2) {
|
|
@@ -5674,382 +5676,6 @@ async function copyToClipboard(text) {
|
|
|
5674
5676
|
}
|
|
5675
5677
|
}
|
|
5676
5678
|
|
|
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
5679
|
// src/chat/display-utils.ts
|
|
6054
5680
|
var TOOL_NAME_ALIASES = {
|
|
6055
5681
|
agent: "Agent",
|
|
@@ -6064,7 +5690,6 @@ var TOOL_NAME_ALIASES = {
|
|
|
6064
5690
|
finish_task: "FinishTask",
|
|
6065
5691
|
glob: "Glob",
|
|
6066
5692
|
grep: "Grep",
|
|
6067
|
-
kb_search: "KbSearch",
|
|
6068
5693
|
ls: "Ls",
|
|
6069
5694
|
multi_edit: "MultiEdit",
|
|
6070
5695
|
read: "Read",
|
|
@@ -6084,7 +5709,6 @@ var TOOL_DISPLAY_LABELS = {
|
|
|
6084
5709
|
Ls: "\u5217\u51FA\u76EE\u5F55",
|
|
6085
5710
|
Glob: "\u5339\u914D\u6587\u4EF6",
|
|
6086
5711
|
Grep: "\u641C\u7D22\u6587\u672C",
|
|
6087
|
-
KbSearch: "\u68C0\u7D22\u77E5\u8BC6\u5E93",
|
|
6088
5712
|
WebSearch: "\u641C\u7D22\u7F51\u9875",
|
|
6089
5713
|
WebFetch: "\u6574\u7406\u7F51\u9875\u5185\u5BB9",
|
|
6090
5714
|
Agent: "\u6D3E\u751F\u5B50\u667A\u80FD\u4F53",
|
|
@@ -6122,7 +5746,7 @@ function safeParseJson(value) {
|
|
|
6122
5746
|
return null;
|
|
6123
5747
|
}
|
|
6124
5748
|
}
|
|
6125
|
-
function
|
|
5749
|
+
function isPlainObject(value) {
|
|
6126
5750
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6127
5751
|
}
|
|
6128
5752
|
function getStringArgValue(args, key) {
|
|
@@ -6134,7 +5758,7 @@ function getCommandDescription(args) {
|
|
|
6134
5758
|
}
|
|
6135
5759
|
function getToolDescription(toolCall) {
|
|
6136
5760
|
const args = safeParseJson(toolCall.arguments);
|
|
6137
|
-
if (!
|
|
5761
|
+
if (!isPlainObject(args)) return null;
|
|
6138
5762
|
return getCommandDescription(args) || null;
|
|
6139
5763
|
}
|
|
6140
5764
|
function formatFileName(filePath) {
|
|
@@ -6192,12 +5816,6 @@ function getToolDisplayLabel(toolCall) {
|
|
|
6192
5816
|
const title = args && typeof args.title === "string" ? args.title : "";
|
|
6193
5817
|
return title ? `${baseLabel}\uFF1A${title}` : baseLabel;
|
|
6194
5818
|
}
|
|
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
5819
|
return description || baseLabel;
|
|
6202
5820
|
}
|
|
6203
5821
|
function getToolTone(status) {
|
|
@@ -6234,7 +5852,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6234
5852
|
for (const item of value) collect(item, depth + 1, allowPlainString);
|
|
6235
5853
|
return;
|
|
6236
5854
|
}
|
|
6237
|
-
if (!
|
|
5855
|
+
if (!isPlainObject(value)) return;
|
|
6238
5856
|
for (const key of PRIORITY_FILE_KEYS) collect(value[key], depth + 1, true);
|
|
6239
5857
|
for (const [key, nested] of Object.entries(value)) {
|
|
6240
5858
|
if (!PRIORITY_FILE_KEYS.includes(key) && nested && typeof nested === "object") collect(nested, depth + 1, false);
|
|
@@ -6249,7 +5867,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6249
5867
|
}
|
|
6250
5868
|
} else if (Array.isArray(value)) {
|
|
6251
5869
|
for (const item of value) collectPatchHeaders(item);
|
|
6252
|
-
} else if (
|
|
5870
|
+
} else if (isPlainObject(value)) {
|
|
6253
5871
|
for (const [key, nested] of Object.entries(value)) {
|
|
6254
5872
|
if (key.toLowerCase().includes("patch") || key.toLowerCase().includes("diff")) collectPatchHeaders(nested);
|
|
6255
5873
|
}
|
|
@@ -6273,7 +5891,7 @@ function getToolOutputTag(toolCall) {
|
|
|
6273
5891
|
}
|
|
6274
5892
|
|
|
6275
5893
|
// src/components/PlanUpdateBlock.tsx
|
|
6276
|
-
import { jsx as
|
|
5894
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
6277
5895
|
var PLAN_STEP_STATUSES = /* @__PURE__ */ new Set(["pending", "in_progress", "completed"]);
|
|
6278
5896
|
var PLAN_AUTO_COLLAPSE_MS = 5e3;
|
|
6279
5897
|
function isPlanUpdateTool(toolCall) {
|
|
@@ -6328,12 +5946,12 @@ function PlanStepIcon({
|
|
|
6328
5946
|
running = false
|
|
6329
5947
|
}) {
|
|
6330
5948
|
if (status === "completed") {
|
|
6331
|
-
return /* @__PURE__ */
|
|
5949
|
+
return /* @__PURE__ */ jsx2(Check, { size: size4, strokeWidth: 2, className: "shrink-0 text-emerald-500" });
|
|
6332
5950
|
}
|
|
6333
5951
|
if (status === "in_progress") {
|
|
6334
|
-
return running ? /* @__PURE__ */
|
|
5952
|
+
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
5953
|
}
|
|
6336
|
-
return /* @__PURE__ */
|
|
5954
|
+
return /* @__PURE__ */ jsx2(Circle, { size: size4, className: "shrink-0 text-[hsl(var(--muted-foreground))]/60" });
|
|
6337
5955
|
}
|
|
6338
5956
|
function PlanUpdateBlock({
|
|
6339
5957
|
toolCall,
|
|
@@ -6343,10 +5961,10 @@ function PlanUpdateBlock({
|
|
|
6343
5961
|
}) {
|
|
6344
5962
|
const updateKey = `${toolCall.id}:${toolCall.arguments}`;
|
|
6345
5963
|
const revealKey = autoReveal ? updateKey : null;
|
|
6346
|
-
const [collapsed, setCollapsed] =
|
|
6347
|
-
const collapseTimerRef =
|
|
5964
|
+
const [collapsed, setCollapsed] = useState(!autoReveal);
|
|
5965
|
+
const collapseTimerRef = useRef(null);
|
|
6348
5966
|
const data = parsePlanUpdate(toolCall.arguments);
|
|
6349
|
-
|
|
5967
|
+
useEffect(() => {
|
|
6350
5968
|
if (!revealKey) return;
|
|
6351
5969
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6352
5970
|
setCollapsed(false);
|
|
@@ -6355,7 +5973,7 @@ function PlanUpdateBlock({
|
|
|
6355
5973
|
collapseTimerRef.current = null;
|
|
6356
5974
|
}, PLAN_AUTO_COLLAPSE_MS);
|
|
6357
5975
|
}, [revealKey]);
|
|
6358
|
-
|
|
5976
|
+
useEffect(
|
|
6359
5977
|
() => () => {
|
|
6360
5978
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6361
5979
|
},
|
|
@@ -6384,20 +6002,20 @@ function PlanUpdateBlock({
|
|
|
6384
6002
|
),
|
|
6385
6003
|
children: [
|
|
6386
6004
|
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__ */
|
|
6005
|
+
/* @__PURE__ */ jsx2(PlanStepIcon, { status: currentStep.status, size: 14, running }),
|
|
6006
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: currentStep.step }),
|
|
6007
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-[11px] text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6390
6008
|
] }) : /* @__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__ */
|
|
6009
|
+
/* @__PURE__ */ jsx2(ListChecks, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
|
|
6010
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: "\u4EFB\u52A1\u8FDB\u5EA6" }),
|
|
6011
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6394
6012
|
] }),
|
|
6395
6013
|
/* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[11px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
|
|
6396
6014
|
completed,
|
|
6397
6015
|
"/",
|
|
6398
6016
|
data.plan.length
|
|
6399
6017
|
] }),
|
|
6400
|
-
/* @__PURE__ */
|
|
6018
|
+
/* @__PURE__ */ jsx2(
|
|
6401
6019
|
ChevronDown,
|
|
6402
6020
|
{
|
|
6403
6021
|
size: 14,
|
|
@@ -6410,7 +6028,7 @@ function PlanUpdateBlock({
|
|
|
6410
6028
|
]
|
|
6411
6029
|
}
|
|
6412
6030
|
),
|
|
6413
|
-
/* @__PURE__ */
|
|
6031
|
+
/* @__PURE__ */ jsx2(
|
|
6414
6032
|
"div",
|
|
6415
6033
|
{
|
|
6416
6034
|
"aria-hidden": collapsed,
|
|
@@ -6418,9 +6036,9 @@ function PlanUpdateBlock({
|
|
|
6418
6036
|
"grid transition-[grid-template-rows,opacity] duration-300 ease-out motion-reduce:transition-none",
|
|
6419
6037
|
collapsed ? "grid-rows-[0fr] opacity-0" : "grid-rows-[1fr] opacity-100"
|
|
6420
6038
|
),
|
|
6421
|
-
children: /* @__PURE__ */
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6039
|
+
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: [
|
|
6040
|
+
/* @__PURE__ */ jsx2("span", { className: "mt-[3px] flex shrink-0", children: /* @__PURE__ */ jsx2(PlanStepIcon, { status: item.status, size: 14, running }) }),
|
|
6041
|
+
/* @__PURE__ */ jsx2(
|
|
6424
6042
|
"span",
|
|
6425
6043
|
{
|
|
6426
6044
|
className: cn(
|
|
@@ -6436,6 +6054,59 @@ function PlanUpdateBlock({
|
|
|
6436
6054
|
] });
|
|
6437
6055
|
}
|
|
6438
6056
|
|
|
6057
|
+
// src/chat/runtime/input-history-storage.ts
|
|
6058
|
+
var generation = 0;
|
|
6059
|
+
function getInputHistoryGeneration() {
|
|
6060
|
+
return generation;
|
|
6061
|
+
}
|
|
6062
|
+
|
|
6063
|
+
// src/chat/runtime/input-cache-reset.ts
|
|
6064
|
+
var resetters = /* @__PURE__ */ new WeakMap();
|
|
6065
|
+
function onInputCachesReset(client, reset) {
|
|
6066
|
+
let set = resetters.get(client);
|
|
6067
|
+
if (!set) {
|
|
6068
|
+
set = /* @__PURE__ */ new Set();
|
|
6069
|
+
resetters.set(client, set);
|
|
6070
|
+
}
|
|
6071
|
+
set.add(reset);
|
|
6072
|
+
return () => {
|
|
6073
|
+
set.delete(reset);
|
|
6074
|
+
};
|
|
6075
|
+
}
|
|
6076
|
+
|
|
6077
|
+
// src/rich-input/lib/plugin-suggestions.ts
|
|
6078
|
+
var accountPreparation = /* @__PURE__ */ new WeakMap();
|
|
6079
|
+
var registeredClients = /* @__PURE__ */ new WeakSet();
|
|
6080
|
+
function pluginRefsForSend(refs, turns = []) {
|
|
6081
|
+
const latest = [...turns].reverse().find((turn) => turn.role === "user");
|
|
6082
|
+
return refs.length || latest?.refs?.length ? refs : void 0;
|
|
6083
|
+
}
|
|
6084
|
+
function prepareAccount(client) {
|
|
6085
|
+
if (!registeredClients.has(client)) {
|
|
6086
|
+
registeredClients.add(client);
|
|
6087
|
+
onInputCachesReset(client, () => accountPreparation.delete(client));
|
|
6088
|
+
}
|
|
6089
|
+
const current = accountPreparation.get(client);
|
|
6090
|
+
if (current && current.token === client.token) return current.ready;
|
|
6091
|
+
const ready = client.plugins.catalog().catch((error) => {
|
|
6092
|
+
accountPreparation.delete(client);
|
|
6093
|
+
throw error;
|
|
6094
|
+
});
|
|
6095
|
+
accountPreparation.set(client, { token: client.token, ready });
|
|
6096
|
+
return ready;
|
|
6097
|
+
}
|
|
6098
|
+
async function getPluginSuggestionItems(client, session, query, pendingPlugins = []) {
|
|
6099
|
+
if (!session && pendingPlugins.length === 0) return [];
|
|
6100
|
+
const path = session ? `/api/sessions/${encodeURIComponent(session)}/plugin-tools/mentions` : "/api/plugin-mentions/mentions";
|
|
6101
|
+
try {
|
|
6102
|
+
if (!session) await prepareAccount(client);
|
|
6103
|
+
const data = await client.json("POST", path, { arguments: { query, cursor: "" }, ...!session ? { plugin_selection: pendingPlugins } : {} });
|
|
6104
|
+
return [...data.items.map((item) => ({ ...item, kind: "plugin", name: item.label })), ...data.errors.map((message) => ({ kind: "pluginError", message }))];
|
|
6105
|
+
} catch {
|
|
6106
|
+
return [{ kind: "pluginError", message: "\u63D2\u4EF6\u6761\u76EE\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
|
|
6107
|
+
}
|
|
6108
|
+
}
|
|
6109
|
+
|
|
6439
6110
|
// ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
6440
6111
|
function deepCompareStrict(a, b) {
|
|
6441
6112
|
const typeofa = typeof a;
|
|
@@ -7646,7 +7317,7 @@ function canExpand(schema, uiSchema = {}, formData) {
|
|
|
7646
7317
|
}
|
|
7647
7318
|
|
|
7648
7319
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/isPlainObject.js
|
|
7649
|
-
function
|
|
7320
|
+
function isPlainObject2(thing) {
|
|
7650
7321
|
if (typeof thing !== "object" || thing === null) {
|
|
7651
7322
|
return false;
|
|
7652
7323
|
}
|
|
@@ -11540,7 +11211,7 @@ var ErrorSchemaBuilder = class {
|
|
|
11540
11211
|
|
|
11541
11212
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/getChangedFields.js
|
|
11542
11213
|
function getChangedDescendants(a, b) {
|
|
11543
|
-
if (
|
|
11214
|
+
if (isPlainObject2(a) && isPlainObject2(b)) {
|
|
11544
11215
|
return getChangedFields(a, b, true);
|
|
11545
11216
|
}
|
|
11546
11217
|
if (Array.isArray(a) && Array.isArray(b) && a.length === b.length) {
|
|
@@ -11558,10 +11229,10 @@ function getChangedFields(a, b, deep = false) {
|
|
|
11558
11229
|
if (a === b) {
|
|
11559
11230
|
return [];
|
|
11560
11231
|
}
|
|
11561
|
-
if (!
|
|
11562
|
-
return
|
|
11232
|
+
if (!isPlainObject2(a)) {
|
|
11233
|
+
return isPlainObject2(b) ? Object.keys(b) : [];
|
|
11563
11234
|
}
|
|
11564
|
-
if (!
|
|
11235
|
+
if (!isPlainObject2(b)) {
|
|
11565
11236
|
return Object.keys(a);
|
|
11566
11237
|
}
|
|
11567
11238
|
const aKeys = Object.keys(a);
|
|
@@ -12152,7 +11823,7 @@ function errorsFrom(errorSchema, fieldPath) {
|
|
|
12152
11823
|
const errorList = Array.isArray(errors) ? errors.map((message) => ({ property, message, stack: `${property} ${message}` })) : [];
|
|
12153
11824
|
return Object.keys(errorSchema).reduce((currentList, key) => {
|
|
12154
11825
|
const childSchema = errorSchema[key];
|
|
12155
|
-
if (key !== ERRORS_KEY &&
|
|
11826
|
+
if (key !== ERRORS_KEY && isPlainObject2(childSchema)) {
|
|
12156
11827
|
return currentList.concat(errorsFrom(childSchema, [...fieldPath, key]));
|
|
12157
11828
|
}
|
|
12158
11829
|
return currentList;
|
|
@@ -12174,7 +11845,7 @@ function toFieldPathId(fieldPath, globalFormOptions, parentPath, isMultiValue) {
|
|
|
12174
11845
|
|
|
12175
11846
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useAltDateWidgetProps.js
|
|
12176
11847
|
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
12177
|
-
import { useCallback, useEffect as
|
|
11848
|
+
import { useCallback, useEffect as useEffect2, useMemo, useState as useState2 } from "react";
|
|
12178
11849
|
function readyForChange(state) {
|
|
12179
11850
|
return Object.values(state).every((value) => value !== -1);
|
|
12180
11851
|
}
|
|
@@ -12187,8 +11858,8 @@ function DateElement(props) {
|
|
|
12187
11858
|
}
|
|
12188
11859
|
function useAltDateWidgetProps(props) {
|
|
12189
11860
|
const { time: time2 = false, disabled = false, readonly = false, options, onChange, value } = props;
|
|
12190
|
-
const [state, setState] =
|
|
12191
|
-
|
|
11861
|
+
const [state, setState] = useState2(parseDateString(value, time2));
|
|
11862
|
+
useEffect2(() => {
|
|
12192
11863
|
setState(parseDateString(value, time2));
|
|
12193
11864
|
}, [time2, value]);
|
|
12194
11865
|
const handleChange = useCallback((property, newValue) => {
|
|
@@ -12217,14 +11888,14 @@ function useAltDateWidgetProps(props) {
|
|
|
12217
11888
|
const nextState = parseDateString((/* @__PURE__ */ new Date()).toJSON(), time2);
|
|
12218
11889
|
onChange(toDateString(nextState, time2));
|
|
12219
11890
|
}, [disabled, readonly, time2, onChange]);
|
|
12220
|
-
const elements =
|
|
11891
|
+
const elements = useMemo(() => getDateElementProps(state, time2, options.yearsRange, options.format), [state, time2, options.yearsRange, options.format]);
|
|
12221
11892
|
return { elements, handleChange, handleClear, handleSetNow };
|
|
12222
11893
|
}
|
|
12223
11894
|
|
|
12224
11895
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useDeepCompareMemo.js
|
|
12225
|
-
import { useRef as
|
|
11896
|
+
import { useRef as useRef2 } from "react";
|
|
12226
11897
|
function useDeepCompareMemo(newValue) {
|
|
12227
|
-
const valueRef =
|
|
11898
|
+
const valueRef = useRef2(newValue);
|
|
12228
11899
|
if (!deepEquals_default(newValue, valueRef.current)) {
|
|
12229
11900
|
valueRef.current = newValue;
|
|
12230
11901
|
}
|
|
@@ -12232,7 +11903,7 @@ function useDeepCompareMemo(newValue) {
|
|
|
12232
11903
|
}
|
|
12233
11904
|
|
|
12234
11905
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useFileWidgetProps.js
|
|
12235
|
-
import { useCallback as useCallback2, useMemo as
|
|
11906
|
+
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
12236
11907
|
function addNameToDataURL(dataURL, name) {
|
|
12237
11908
|
return dataURL.replace(";base64", `;name=${encodeURIComponent(name)};base64`);
|
|
12238
11909
|
}
|
|
@@ -12286,13 +11957,13 @@ function extractFileInfo(dataURLs) {
|
|
|
12286
11957
|
}, []);
|
|
12287
11958
|
}
|
|
12288
11959
|
function useFileWidgetProps(value, onChange, multiple = false) {
|
|
12289
|
-
const values =
|
|
11960
|
+
const values = useMemo2(() => {
|
|
12290
11961
|
if (multiple && value) {
|
|
12291
11962
|
return Array.isArray(value) ? value : [value];
|
|
12292
11963
|
}
|
|
12293
11964
|
return [];
|
|
12294
11965
|
}, [value, multiple]);
|
|
12295
|
-
const filesInfo =
|
|
11966
|
+
const filesInfo = useMemo2(() => Array.isArray(value) ? extractFileInfo(value) : extractFileInfo([value || ""]), [value]);
|
|
12296
11967
|
const handleChange = useCallback2(async (files) => {
|
|
12297
11968
|
const filesInfoEvent = await processFiles(files);
|
|
12298
11969
|
const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL || null);
|
|
@@ -12418,7 +12089,7 @@ var TranslatableString;
|
|
|
12418
12089
|
|
|
12419
12090
|
// ../../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
12091
|
import { jsx as _jsx4 } from "react/jsx-runtime";
|
|
12421
|
-
import { memo, useCallback as useCallback3, useMemo as
|
|
12092
|
+
import { memo, useCallback as useCallback3, useMemo as useMemo3, useRef as useRef3, useState as useState3 } from "react";
|
|
12422
12093
|
var rowIdCounter = 0;
|
|
12423
12094
|
function generateRowId() {
|
|
12424
12095
|
rowIdCounter += 1;
|
|
@@ -12512,8 +12183,8 @@ function ArrayAsFiles(props) {
|
|
|
12512
12183
|
function ArrayFieldItemInner(props) {
|
|
12513
12184
|
const { itemKey, index: index2, name, disabled, hideError, readonly, registry, uiOptions, parentUiSchema, canAdd, canRemove = true, canMoveUp, canMoveDown, rawItemSchema, itemData, itemUiSchema, parentFieldPathId, itemErrorSchema, autofocus, onBlur, onFocus, onChange, rawErrors, totalItems, title, handleAddItem, handleCopyItem, handleRemoveItem, handleReorderItems } = props;
|
|
12514
12185
|
const { schemaUtils, fields: { ArraySchemaField, SchemaField: SchemaField2 }, globalUiOptions, globalFormOptions } = registry;
|
|
12515
|
-
const itemSchema =
|
|
12516
|
-
const fieldPathId =
|
|
12186
|
+
const itemSchema = useMemo3(() => schemaUtils.retrieveSchema(rawItemSchema, itemData), [schemaUtils, rawItemSchema, itemData]);
|
|
12187
|
+
const fieldPathId = useMemo3(() => toFieldPathId(index2, globalFormOptions, parentFieldPathId), [index2, globalFormOptions, parentFieldPathId]);
|
|
12517
12188
|
const ItemSchemaField = ArraySchemaField || SchemaField2;
|
|
12518
12189
|
const ArrayFieldItemTemplate2 = getTemplate("ArrayFieldItemTemplate", registry, uiOptions);
|
|
12519
12190
|
const displayLabel = schemaUtils.getDisplayLabel(itemSchema, itemUiSchema, globalUiOptions);
|
|
@@ -12587,13 +12258,13 @@ function NormalArray(props) {
|
|
|
12587
12258
|
const fieldTitle = schema.title || title || name;
|
|
12588
12259
|
const { schemaUtils, fields: fields2, formContext, globalUiOptions } = registry;
|
|
12589
12260
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
12590
|
-
const uiOptions =
|
|
12591
|
-
const schemaItems =
|
|
12592
|
-
const itemsSchema =
|
|
12593
|
-
const formData =
|
|
12261
|
+
const uiOptions = useMemo3(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
12262
|
+
const schemaItems = useMemo3(() => isObject(schema.items) ? schema.items : {}, [schema.items]);
|
|
12263
|
+
const itemsSchema = useMemo3(() => schemaUtils.retrieveSchema(schemaItems), [schemaUtils, schemaItems]);
|
|
12264
|
+
const formData = useMemo3(() => keyedToPlainFormData(keyedFormData), [keyedFormData]);
|
|
12594
12265
|
const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
|
|
12595
12266
|
const hasFormData = isFormDataAvailable(formDataFromProps);
|
|
12596
|
-
const canAdd =
|
|
12267
|
+
const canAdd = useMemo3(() => canAddItem(registry, schema, formData, uiSchema) && (!renderOptionalField || hasFormData), [registry, schema, formData, uiSchema, renderOptionalField, hasFormData]);
|
|
12597
12268
|
const actualFormData = hasFormData ? keyedFormData : [];
|
|
12598
12269
|
const extraClass = renderOptionalField ? " rjsf-optional-array-field" : "";
|
|
12599
12270
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
@@ -12660,11 +12331,11 @@ function FixedArray(props) {
|
|
|
12660
12331
|
let { formData: items = [] } = props;
|
|
12661
12332
|
const fieldTitle = schema.title || title || name;
|
|
12662
12333
|
const { fields: fields2, formContext, globalUiOptions } = registry;
|
|
12663
|
-
const uiOptions =
|
|
12334
|
+
const uiOptions = useMemo3(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
12664
12335
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
12665
12336
|
const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
|
|
12666
12337
|
const hasFormData = isFormDataAvailable(formData);
|
|
12667
|
-
const schemaItems =
|
|
12338
|
+
const schemaItems = useMemo3(() => Array.isArray(schema.items) ? schema.items : [], [schema.items]);
|
|
12668
12339
|
const hasAdditionalItems = isObject(schema.additionalItems);
|
|
12669
12340
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
12670
12341
|
if (items.length < schemaItems.length) {
|
|
@@ -12743,8 +12414,8 @@ function FixedArray(props) {
|
|
|
12743
12414
|
return _jsx4(Template, { ...arrayProps });
|
|
12744
12415
|
}
|
|
12745
12416
|
function useKeyedFormData(formData = []) {
|
|
12746
|
-
const newHash =
|
|
12747
|
-
const [state, setState] =
|
|
12417
|
+
const newHash = useMemo3(() => hashObject(formData), [formData]);
|
|
12418
|
+
const [state, setState] = useState3(() => ({
|
|
12748
12419
|
formDataHash: newHash,
|
|
12749
12420
|
keyedFormData: generateKeyedFormData(formData)
|
|
12750
12421
|
}));
|
|
@@ -12771,9 +12442,9 @@ function ArrayField(props) {
|
|
|
12771
12442
|
const { schema, uiSchema, errorSchema, fieldPathId, registry, formData, onChange } = props;
|
|
12772
12443
|
const { globalFormOptions, schemaUtils, translateString } = registry;
|
|
12773
12444
|
const { keyedFormData, updateKeyedFormData } = useKeyedFormData(formData);
|
|
12774
|
-
const keyedFormDataRef =
|
|
12445
|
+
const keyedFormDataRef = useRef3(keyedFormData);
|
|
12775
12446
|
keyedFormDataRef.current = keyedFormData;
|
|
12776
|
-
const errorSchemaRef =
|
|
12447
|
+
const errorSchemaRef = useRef3(errorSchema);
|
|
12777
12448
|
errorSchemaRef.current = errorSchema;
|
|
12778
12449
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
12779
12450
|
const handleAddItem = useCallback3((event, index2) => {
|
|
@@ -12991,9 +12662,9 @@ var BooleanField_default = BooleanField;
|
|
|
12991
12662
|
|
|
12992
12663
|
// ../../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/CyclicSchemaField.js
|
|
12993
12664
|
import { jsx as _jsx6 } from "react/jsx-runtime";
|
|
12994
|
-
import { useState as
|
|
12665
|
+
import { useState as useState4 } from "react";
|
|
12995
12666
|
function CyclicSchemaField(props) {
|
|
12996
|
-
const [expanded, setExpanded] =
|
|
12667
|
+
const [expanded, setExpanded] = useState4(false);
|
|
12997
12668
|
const { name, registry, schema, uiSchema, fieldPathId } = props;
|
|
12998
12669
|
const { globalUiOptions } = registry;
|
|
12999
12670
|
const uiOptions = getUiOptions(uiSchema, globalUiOptions);
|
|
@@ -13008,7 +12679,7 @@ function CyclicSchemaField(props) {
|
|
|
13008
12679
|
|
|
13009
12680
|
// ../../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/FallbackField.js
|
|
13010
12681
|
import { jsx as _jsx7 } from "react/jsx-runtime";
|
|
13011
|
-
import { useMemo as
|
|
12682
|
+
import { useMemo as useMemo4, useState as useState5 } from "react";
|
|
13012
12683
|
function getFallbackTypeSelectionSchema(title) {
|
|
13013
12684
|
return {
|
|
13014
12685
|
type: "string",
|
|
@@ -13044,11 +12715,11 @@ function castToNewType(formData, newType) {
|
|
|
13044
12715
|
function FallbackField(props) {
|
|
13045
12716
|
const { id, formData, displayLabel = true, schema, name, uiSchema, required, disabled = false, readonly = false, onBlur, onFocus, registry, fieldPathId, onChange, errorSchema } = props;
|
|
13046
12717
|
const { translateString, fields: fields2, globalFormOptions } = registry;
|
|
13047
|
-
const [type, setType] =
|
|
12718
|
+
const [type, setType] = useState5(getTypeOfFormData(formData));
|
|
13048
12719
|
const uiOptions = getUiOptions(uiSchema);
|
|
13049
12720
|
const typeSelectorInnerFieldPathId = useDeepCompareMemo(toFieldPathId("__internal_type_selector", globalFormOptions, fieldPathId));
|
|
13050
12721
|
const schemaTitle = translateString(TranslatableString.Type);
|
|
13051
|
-
const typesOptionSchema =
|
|
12722
|
+
const typesOptionSchema = useMemo4(() => getFallbackTypeSelectionSchema(schemaTitle), [schemaTitle]);
|
|
13052
12723
|
const onTypeChange = (newType) => {
|
|
13053
12724
|
if (newType != null) {
|
|
13054
12725
|
setType(newType);
|
|
@@ -13135,7 +12806,7 @@ function conditionMatches(operator, datum, value = "$0m3tH1nG Un3xP3cT3d") {
|
|
|
13135
12806
|
function findChildrenAndProps(layoutGridSchema, schemaKey, registry) {
|
|
13136
12807
|
let gridProps = {};
|
|
13137
12808
|
let children = layoutGridSchema[schemaKey];
|
|
13138
|
-
if (
|
|
12809
|
+
if (isPlainObject2(children)) {
|
|
13139
12810
|
const { children: elements, className: toMapClassNames, ...otherProps } = children;
|
|
13140
12811
|
children = elements;
|
|
13141
12812
|
if (toMapClassNames) {
|
|
@@ -13387,7 +13058,7 @@ function LayoutHeaderField(props) {
|
|
|
13387
13058
|
|
|
13388
13059
|
// ../../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
13060
|
import { jsx as _jsx10 } from "react/jsx-runtime";
|
|
13390
|
-
import { useState as
|
|
13061
|
+
import { useState as useState6, useEffect as useEffect3 } from "react";
|
|
13391
13062
|
function getSelectedOption(options, selectorField, value) {
|
|
13392
13063
|
const defaultValue = "!@#!@$@#$!@$#";
|
|
13393
13064
|
const schemaOptions = options.map(({ schema }) => schema);
|
|
@@ -13414,7 +13085,7 @@ function computeEnumOptions(schema, options, schemaUtils, uiSchema, formData) {
|
|
|
13414
13085
|
function LayoutMultiSchemaField(props) {
|
|
13415
13086
|
const { name, baseType, disabled = false, formData, fieldPathId, onBlur, onChange, options, onFocus, registry, uiSchema, schema, autofocus, readonly, required, errorSchema, hideError = false } = props;
|
|
13416
13087
|
const { widgets: widgets2, schemaUtils, globalUiOptions } = registry;
|
|
13417
|
-
const [enumOptions, setEnumOptions] =
|
|
13088
|
+
const [enumOptions, setEnumOptions] = useState6(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));
|
|
13418
13089
|
const id = fieldPathId[ID_KEY];
|
|
13419
13090
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
13420
13091
|
const FieldErrorTemplate2 = getTemplate("FieldErrorTemplate", registry, options);
|
|
@@ -13423,7 +13094,7 @@ function LayoutMultiSchemaField(props) {
|
|
|
13423
13094
|
const optionsHash = hashObject(options);
|
|
13424
13095
|
const uiSchemaHash = uiSchema ? hashObject(uiSchema) : "";
|
|
13425
13096
|
const formDataHash = formData ? hashObject(formData) : "";
|
|
13426
|
-
|
|
13097
|
+
useEffect3(() => {
|
|
13427
13098
|
setEnumOptions(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));
|
|
13428
13099
|
}, [schemaHash, optionsHash, schemaUtils, uiSchemaHash, formDataHash]);
|
|
13429
13100
|
const { widget = discriminator ? "radio" : "select", title = "", placeholder = "", optionsSchemaSelector: selectorField = discriminator, hideError: uiSchemaHideError, ...uiOptions } = getUiOptions(uiSchema);
|
|
@@ -13462,24 +13133,24 @@ function LayoutMultiSchemaField(props) {
|
|
|
13462
13133
|
|
|
13463
13134
|
// ../../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
13135
|
import { jsx as _jsx11 } from "react/jsx-runtime";
|
|
13465
|
-
import { useCallback as useCallback5, useEffect as
|
|
13136
|
+
import { useCallback as useCallback5, useEffect as useEffect4, useMemo as useMemo5, useRef as useRef4, useState as useState7 } from "react";
|
|
13466
13137
|
function AnyOfField(props) {
|
|
13467
13138
|
const { name, disabled = false, errorSchema, formData, fieldPathId, onBlur, onChange, onFocus, options, readonly, registry, required = false, schema, uiSchema } = props;
|
|
13468
13139
|
const { schemaUtils } = registry;
|
|
13469
13140
|
const formDataHash = hashObject(formData ?? null);
|
|
13470
|
-
const retrievedOptions =
|
|
13141
|
+
const retrievedOptions = useMemo5(
|
|
13471
13142
|
() => options.map((opt) => schemaUtils.retrieveSchema(opt, formData)),
|
|
13472
13143
|
// oxlint-disable-next-line react-hooks/exhaustive-deps -- formDataHash is the value-stable proxy for formData
|
|
13473
13144
|
[options, schemaUtils, formDataHash]
|
|
13474
13145
|
);
|
|
13475
|
-
const [selectedOption, setSelectedOption] =
|
|
13146
|
+
const [selectedOption, setSelectedOption] = useState7(() => {
|
|
13476
13147
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
13477
13148
|
return schemaUtils.getClosestMatchingOption(formData, retrievedOptions, 0, discriminator);
|
|
13478
13149
|
});
|
|
13479
|
-
const skipNextOptionRecalculation =
|
|
13480
|
-
const prevFormDataRef =
|
|
13481
|
-
const prevFieldIdRef =
|
|
13482
|
-
|
|
13150
|
+
const skipNextOptionRecalculation = useRef4(false);
|
|
13151
|
+
const prevFormDataRef = useRef4(formData);
|
|
13152
|
+
const prevFieldIdRef = useRef4(fieldPathId.$id);
|
|
13153
|
+
useEffect4(() => {
|
|
13483
13154
|
const prevFormData = prevFormDataRef.current;
|
|
13484
13155
|
const prevFieldId = prevFieldIdRef.current;
|
|
13485
13156
|
prevFormDataRef.current = formData;
|
|
@@ -13577,10 +13248,10 @@ function AnyOfField(props) {
|
|
|
13577
13248
|
var MultiSchemaField_default = AnyOfField;
|
|
13578
13249
|
|
|
13579
13250
|
// ../../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
|
|
13251
|
+
import { useEffect as useEffect5 } from "react";
|
|
13581
13252
|
function NullField(props) {
|
|
13582
13253
|
const { formData, onChange, fieldPathId } = props;
|
|
13583
|
-
|
|
13254
|
+
useEffect5(() => {
|
|
13584
13255
|
if (formData === void 0) {
|
|
13585
13256
|
onChange(null, fieldPathId.path);
|
|
13586
13257
|
}
|
|
@@ -13591,12 +13262,12 @@ var NullField_default = NullField;
|
|
|
13591
13262
|
|
|
13592
13263
|
// ../../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
13264
|
import { jsx as _jsx12 } from "react/jsx-runtime";
|
|
13594
|
-
import { useState as
|
|
13265
|
+
import { useState as useState8, useCallback as useCallback6 } from "react";
|
|
13595
13266
|
var trailingCharMatcherWithPrefix = /\.([0-9]*0)*$/;
|
|
13596
13267
|
var trailingCharMatcher = /[0.]0*$/;
|
|
13597
13268
|
function NumberField(props) {
|
|
13598
13269
|
const { registry, onChange, formData, value: initialValue } = props;
|
|
13599
|
-
const [lastValue, setLastValue] =
|
|
13270
|
+
const [lastValue, setLastValue] = useState8(initialValue);
|
|
13600
13271
|
const { StringField: StringField2 } = registry.fields;
|
|
13601
13272
|
const separator = getDecimalSeparator();
|
|
13602
13273
|
const escapedSeparator = separator === "." ? "\\." : separator;
|
|
@@ -13631,7 +13302,7 @@ var NumberField_default = NumberField;
|
|
|
13631
13302
|
|
|
13632
13303
|
// ../../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
13304
|
import { jsx as _jsx13, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13634
|
-
import { memo as memo2, useCallback as useCallback7, useMemo as
|
|
13305
|
+
import { memo as memo2, useCallback as useCallback7, useMemo as useMemo7, useRef as useRef6, useState as useState9 } from "react";
|
|
13635
13306
|
|
|
13636
13307
|
// ../../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
13308
|
import * as i0 from "react";
|
|
@@ -16766,7 +16437,7 @@ function getAdditionalPropertyOrder(schemaProperties) {
|
|
|
16766
16437
|
}
|
|
16767
16438
|
function ObjectFieldPropertyFn(props) {
|
|
16768
16439
|
const { fieldPathId, schema, registry, uiSchema, errorSchema, formData, onChange, onBlur, onFocus, disabled, readonly, required, hideError, propertyName, handleKeyRename, handleRemoveProperty, addedByAdditionalProperties } = props;
|
|
16769
|
-
const [wasPropertyKeyModified, setWasPropertyKeyModified] =
|
|
16440
|
+
const [wasPropertyKeyModified, setWasPropertyKeyModified] = useState9(false);
|
|
16770
16441
|
const { globalFormOptions, fields: fields2 } = registry;
|
|
16771
16442
|
const { SchemaField: SchemaField2 } = fields2;
|
|
16772
16443
|
const innerFieldIdPathId = useDeepCompareMemo(toFieldPathId(propertyName, globalFormOptions, fieldPathId.path));
|
|
@@ -16797,15 +16468,15 @@ function ObjectField(props) {
|
|
|
16797
16468
|
const { schema: rawSchema, uiSchema = {}, formData, errorSchema, fieldPathId, name, required = false, disabled, readonly, hideError, onBlur, onFocus, onChange, registry, title } = props;
|
|
16798
16469
|
const { fields: fields2, schemaUtils, translateString, globalUiOptions } = registry;
|
|
16799
16470
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
16800
|
-
const formDataRef =
|
|
16471
|
+
const formDataRef = useRef6(formData);
|
|
16801
16472
|
formDataRef.current = formData;
|
|
16802
|
-
const schema =
|
|
16803
|
-
const uiOptions =
|
|
16804
|
-
const schemaProperties =
|
|
16473
|
+
const schema = useMemo7(() => schemaUtils.retrieveSchema(rawSchema, formData, true), [schemaUtils, rawSchema, formData]);
|
|
16474
|
+
const uiOptions = useMemo7(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
16475
|
+
const schemaProperties = useMemo7(() => schema.properties ?? {}, [schema.properties]);
|
|
16805
16476
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
16806
|
-
const lastRenamedProperty =
|
|
16807
|
-
const [additionalPropertyOrder, setAdditionalPropertyOrder] =
|
|
16808
|
-
const definedPropertyOrder =
|
|
16477
|
+
const lastRenamedProperty = useRef6({ previousKey: "", currentKey: void 0 });
|
|
16478
|
+
const [additionalPropertyOrder, setAdditionalPropertyOrder] = useState9(() => getAdditionalPropertyOrder(schemaProperties));
|
|
16479
|
+
const definedPropertyOrder = useMemo7(() => {
|
|
16809
16480
|
const additionalPropertySet = new Set(getAdditionalPropertyOrder(schemaProperties));
|
|
16810
16481
|
return Object.keys(schemaProperties).filter((property) => !additionalPropertySet.has(property));
|
|
16811
16482
|
}, [schemaProperties]);
|
|
@@ -18759,7 +18430,7 @@ var Form = class _Form extends Component {
|
|
|
18759
18430
|
};
|
|
18760
18431
|
|
|
18761
18432
|
// src/components/SessionPluginConfigForm.tsx
|
|
18762
|
-
import { isValidElement, useMemo as
|
|
18433
|
+
import { isValidElement, useMemo as useMemo8, useState as useState10 } from "react";
|
|
18763
18434
|
|
|
18764
18435
|
// src/components/plugin-config-schema.ts
|
|
18765
18436
|
function asSchema(value) {
|
|
@@ -18954,7 +18625,7 @@ function configDraftOperations(initial, values, retained, removed) {
|
|
|
18954
18625
|
}
|
|
18955
18626
|
|
|
18956
18627
|
// src/components/SessionPluginConfigForm.tsx
|
|
18957
|
-
import { Fragment as Fragment2, jsx as
|
|
18628
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
18958
18629
|
var defaults = getDefaultRegistry();
|
|
18959
18630
|
var validator = {
|
|
18960
18631
|
isValid(schema, data, rootSchema) {
|
|
@@ -19011,7 +18682,7 @@ function presentationSchema(schema) {
|
|
|
19011
18682
|
}
|
|
19012
18683
|
function ConfigMultiSchemaField(props) {
|
|
19013
18684
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-field", children: [
|
|
19014
|
-
/* @__PURE__ */
|
|
18685
|
+
/* @__PURE__ */ jsx3("label", { htmlFor: isValidElement(props.selector) ? props.selector.props.id : void 0, children: "\u914D\u7F6E\u65B9\u5F0F" }),
|
|
19015
18686
|
props.selector,
|
|
19016
18687
|
props.optionSchemaField
|
|
19017
18688
|
] });
|
|
@@ -19039,12 +18710,12 @@ function ConfigSchemaField(inputProps) {
|
|
|
19039
18710
|
const pointer = pointerOf(originalConfigPath(fieldPathId.path, context.removed));
|
|
19040
18711
|
const originalMarker = [...context.retained].find(([, path2]) => path2 === pointer)?.[0];
|
|
19041
18712
|
if (schema.const !== void 0 && schema.writeOnly !== true)
|
|
19042
|
-
return /* @__PURE__ */
|
|
18713
|
+
return /* @__PURE__ */ jsx3(Fragment2, { children: context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx3("p", { role: "alert", children: error.message }, error.message)) });
|
|
19043
18714
|
if (schema.writeOnly === true) {
|
|
19044
18715
|
const kept = typeof formData === "string" && context.retained.has(formData);
|
|
19045
18716
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-field", children: [
|
|
19046
18717
|
Array.isArray(schema.type) && schema.type.includes("null") ? /* @__PURE__ */ jsxs2("label", { children: [
|
|
19047
|
-
/* @__PURE__ */
|
|
18718
|
+
/* @__PURE__ */ jsx3(
|
|
19048
18719
|
"input",
|
|
19049
18720
|
{
|
|
19050
18721
|
type: "checkbox",
|
|
@@ -19056,8 +18727,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19056
18727
|
schema.title ?? props.name,
|
|
19057
18728
|
"\uFF1A\u7F6E\u4E3A\u7A7A\u503C"
|
|
19058
18729
|
] }) : null,
|
|
19059
|
-
/* @__PURE__ */
|
|
19060
|
-
/* @__PURE__ */
|
|
18730
|
+
/* @__PURE__ */ jsx3("label", { htmlFor: fieldPathId.$id, "data-required": props.required, children: schema.title ?? props.name }),
|
|
18731
|
+
/* @__PURE__ */ jsx3(
|
|
19061
18732
|
"input",
|
|
19062
18733
|
{
|
|
19063
18734
|
id: fieldPathId.$id,
|
|
@@ -19070,8 +18741,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19070
18741
|
onChange: (event) => onChange(event.target.value || originalMarker, fieldPathId.path)
|
|
19071
18742
|
}
|
|
19072
18743
|
),
|
|
19073
|
-
kept ? /* @__PURE__ */
|
|
19074
|
-
formData !== void 0 ? /* @__PURE__ */
|
|
18744
|
+
kept ? /* @__PURE__ */ jsx3("p", { children: "\u5DF2\u4FDD\u5B58\uFF0C\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8" }) : null,
|
|
18745
|
+
formData !== void 0 ? /* @__PURE__ */ jsx3(
|
|
19075
18746
|
"button",
|
|
19076
18747
|
{
|
|
19077
18748
|
type: "button",
|
|
@@ -19080,8 +18751,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19080
18751
|
children: "\u6E05\u9664\u5DF2\u4FDD\u5B58\u7684\u503C"
|
|
19081
18752
|
}
|
|
19082
18753
|
) : null,
|
|
19083
|
-
schema.description ? /* @__PURE__ */
|
|
19084
|
-
context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */
|
|
18754
|
+
schema.description ? /* @__PURE__ */ jsx3("p", { children: schema.description }) : null,
|
|
18755
|
+
context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx3("p", { role: "alert", children: error.message }, error.message))
|
|
19085
18756
|
] });
|
|
19086
18757
|
}
|
|
19087
18758
|
const types = Array.isArray(schema.type) ? schema.type : [schema.type];
|
|
@@ -19090,7 +18761,7 @@ function ConfigSchemaField(inputProps) {
|
|
|
19090
18761
|
const inner = { ...schema, type: nonNull[0] };
|
|
19091
18762
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-field", children: [
|
|
19092
18763
|
/* @__PURE__ */ jsxs2("label", { children: [
|
|
19093
|
-
/* @__PURE__ */
|
|
18764
|
+
/* @__PURE__ */ jsx3(
|
|
19094
18765
|
"input",
|
|
19095
18766
|
{
|
|
19096
18767
|
type: "checkbox",
|
|
@@ -19105,28 +18776,28 @@ function ConfigSchemaField(inputProps) {
|
|
|
19105
18776
|
schema.title ?? props.name,
|
|
19106
18777
|
"\uFF1A\u7F6E\u4E3A\u7A7A\u503C"
|
|
19107
18778
|
] }),
|
|
19108
|
-
nonNull.length && formData !== null ? /* @__PURE__ */
|
|
18779
|
+
nonNull.length && formData !== null ? /* @__PURE__ */ jsx3(defaults.fields.SchemaField, { ...props, schema: inner }) : null
|
|
19109
18780
|
] });
|
|
19110
18781
|
}
|
|
19111
|
-
return /* @__PURE__ */
|
|
18782
|
+
return /* @__PURE__ */ jsx3(defaults.fields.SchemaField, { ...props });
|
|
19112
18783
|
}
|
|
19113
18784
|
function ConfigFieldTemplate(props) {
|
|
19114
18785
|
const pointer = pointerOf(
|
|
19115
18786
|
originalConfigPath(props.fieldPathId.path, props.registry.formContext.removed)
|
|
19116
18787
|
);
|
|
19117
18788
|
return /* @__PURE__ */ jsxs2("div", { className: props.classNames, hidden: props.hidden, children: [
|
|
19118
|
-
props.displayLabel ? /* @__PURE__ */
|
|
18789
|
+
props.displayLabel ? /* @__PURE__ */ jsx3("label", { htmlFor: props.id, "data-required": props.required, children: props.label }) : null,
|
|
19119
18790
|
props.displayLabel ? props.description : null,
|
|
19120
18791
|
props.children,
|
|
19121
18792
|
props.help,
|
|
19122
|
-
props.registry.formContext.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */
|
|
18793
|
+
props.registry.formContext.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx3("p", { role: "alert", children: error.message }, error.message))
|
|
19123
18794
|
] });
|
|
19124
18795
|
}
|
|
19125
18796
|
function ConfigArrayItem(props) {
|
|
19126
18797
|
const { buttonsProps: buttons, registry } = props;
|
|
19127
18798
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-array-item", children: [
|
|
19128
18799
|
props.children,
|
|
19129
|
-
buttons.hasRemove ? /* @__PURE__ */
|
|
18800
|
+
buttons.hasRemove ? /* @__PURE__ */ jsx3(
|
|
19130
18801
|
"button",
|
|
19131
18802
|
{
|
|
19132
18803
|
type: "button",
|
|
@@ -19141,7 +18812,7 @@ function ConfigArrayItem(props) {
|
|
|
19141
18812
|
if (previous !== void 0) registry.formContext.removed.add(pointerOf(path));
|
|
19142
18813
|
buttons.onRemoveItem(event);
|
|
19143
18814
|
},
|
|
19144
|
-
children: /* @__PURE__ */
|
|
18815
|
+
children: /* @__PURE__ */ jsx3(Trash2, { size: 14 })
|
|
19145
18816
|
}
|
|
19146
18817
|
) : null
|
|
19147
18818
|
] });
|
|
@@ -19154,12 +18825,12 @@ function SessionPluginConfigForm({
|
|
|
19154
18825
|
onSubmit,
|
|
19155
18826
|
onCancel
|
|
19156
18827
|
}) {
|
|
19157
|
-
const [initial] =
|
|
19158
|
-
const [values, setValues] =
|
|
19159
|
-
const [removed] =
|
|
19160
|
-
const [draftFailure, setDraftFailure] =
|
|
19161
|
-
const support =
|
|
19162
|
-
const schema =
|
|
18828
|
+
const [initial] = useState10(() => createConfigDraft(config));
|
|
18829
|
+
const [values, setValues] = useState10(initial.values);
|
|
18830
|
+
const [removed] = useState10(() => /* @__PURE__ */ new Set());
|
|
18831
|
+
const [draftFailure, setDraftFailure] = useState10(null);
|
|
18832
|
+
const support = useMemo8(() => formSupport(config.schema), [config.schema]);
|
|
18833
|
+
const schema = useMemo8(() => {
|
|
19163
18834
|
try {
|
|
19164
18835
|
return config.schema ? presentationSchema(config.schema) : null;
|
|
19165
18836
|
} catch {
|
|
@@ -19176,11 +18847,11 @@ function SessionPluginConfigForm({
|
|
|
19176
18847
|
};
|
|
19177
18848
|
if (!schema || support)
|
|
19178
18849
|
return /* @__PURE__ */ jsxs2("div", { className: "space-y-3 text-xs", children: [
|
|
19179
|
-
/* @__PURE__ */
|
|
19180
|
-
/* @__PURE__ */
|
|
18850
|
+
/* @__PURE__ */ jsx3("p", { children: support ?? "\u914D\u7F6E\u58F0\u660E\u7684\u7EC4\u5408\u65E0\u6CD5\u5448\u73B0\uFF0C\u8BF7\u8054\u7CFB\u63D2\u4EF6\u63D0\u4F9B\u65B9" }),
|
|
18851
|
+
/* @__PURE__ */ jsx3("button", { type: "button", onClick: onCancel, children: "\u5173\u95ED" })
|
|
19181
18852
|
] });
|
|
19182
18853
|
return /* @__PURE__ */ jsxs2("div", { className: "blade-plugin-config text-xs", children: [
|
|
19183
|
-
/* @__PURE__ */
|
|
18854
|
+
/* @__PURE__ */ jsx3("style", { children: `
|
|
19184
18855
|
.blade-plugin-config .rjsf-field, .blade-plugin-config fieldset { min-width:0; margin:0 0 10px; padding:0; border:0 }
|
|
19185
18856
|
.blade-plugin-config label, .blade-plugin-config legend { display:block; font-size:12px; font-weight:500; overflow-wrap:anywhere; margin-bottom:4px }
|
|
19186
18857
|
.blade-plugin-config label[data-required=true]::after { content:' *'; color:hsl(var(--destructive)) }
|
|
@@ -19193,8 +18864,8 @@ function SessionPluginConfigForm({
|
|
|
19193
18864
|
.blade-plugin-config button:disabled { opacity:.5 }
|
|
19194
18865
|
.blade-plugin-config .control-label { display:block }
|
|
19195
18866
|
` }),
|
|
19196
|
-
failure || draftFailure ? /* @__PURE__ */
|
|
19197
|
-
/* @__PURE__ */
|
|
18867
|
+
failure || draftFailure ? /* @__PURE__ */ jsx3("p", { role: "alert", children: failure ?? draftFailure }) : null,
|
|
18868
|
+
/* @__PURE__ */ jsx3(
|
|
19198
18869
|
Form,
|
|
19199
18870
|
{
|
|
19200
18871
|
schema,
|
|
@@ -19208,7 +18879,7 @@ function SessionPluginConfigForm({
|
|
|
19208
18879
|
MultiSchemaFieldTemplate: ConfigMultiSchemaField,
|
|
19209
18880
|
ButtonTemplates: {
|
|
19210
18881
|
...defaults.templates.ButtonTemplates,
|
|
19211
|
-
AddButton: (props) => /* @__PURE__ */
|
|
18882
|
+
AddButton: (props) => /* @__PURE__ */ jsx3(
|
|
19212
18883
|
"button",
|
|
19213
18884
|
{
|
|
19214
18885
|
type: "button",
|
|
@@ -19216,7 +18887,7 @@ function SessionPluginConfigForm({
|
|
|
19216
18887
|
"aria-label": "\u6DFB\u52A0\u4E00\u9879",
|
|
19217
18888
|
disabled: props.disabled,
|
|
19218
18889
|
onClick: props.onClick,
|
|
19219
|
-
children: /* @__PURE__ */
|
|
18890
|
+
children: /* @__PURE__ */ jsx3(Plus, { size: 14 })
|
|
19220
18891
|
}
|
|
19221
18892
|
)
|
|
19222
18893
|
}
|
|
@@ -19258,8 +18929,8 @@ function SessionPluginConfigForm({
|
|
|
19258
18929
|
}
|
|
19259
18930
|
},
|
|
19260
18931
|
children: /* @__PURE__ */ jsxs2("div", { className: "flex justify-end gap-2", children: [
|
|
19261
|
-
/* @__PURE__ */
|
|
19262
|
-
/* @__PURE__ */
|
|
18932
|
+
/* @__PURE__ */ jsx3("button", { type: "button", onClick: onCancel, children: "\u53D6\u6D88" }),
|
|
18933
|
+
/* @__PURE__ */ jsx3("button", { type: "submit", disabled: submitting, children: submitting ? "\u4FDD\u5B58\u4E2D\u2026" : "\u4FDD\u5B58" })
|
|
19263
18934
|
] })
|
|
19264
18935
|
}
|
|
19265
18936
|
)
|
|
@@ -19267,8 +18938,8 @@ function SessionPluginConfigForm({
|
|
|
19267
18938
|
}
|
|
19268
18939
|
|
|
19269
18940
|
// src/components/SessionPluginIcon.tsx
|
|
19270
|
-
import { useEffect as
|
|
19271
|
-
import { jsx as
|
|
18941
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
18942
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
19272
18943
|
function sessionPluginLabel(plugin) {
|
|
19273
18944
|
const display = typeof plugin.display_name === "string" ? plugin.display_name.trim() : "";
|
|
19274
18945
|
return display || plugin.name;
|
|
@@ -19293,9 +18964,9 @@ function iconBlob(client, sessionId, name, token) {
|
|
|
19293
18964
|
return pending;
|
|
19294
18965
|
}
|
|
19295
18966
|
function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape = "rounded", className }) {
|
|
19296
|
-
const [url, setUrl] =
|
|
18967
|
+
const [url, setUrl] = useState11(null);
|
|
19297
18968
|
const token = plugin.icon;
|
|
19298
|
-
|
|
18969
|
+
useEffect6(() => {
|
|
19299
18970
|
setUrl(null);
|
|
19300
18971
|
if (!token) return;
|
|
19301
18972
|
let alive = true;
|
|
@@ -19313,14 +18984,14 @@ function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape
|
|
|
19313
18984
|
const frame = `flex shrink-0 items-center justify-center overflow-hidden ${shape === "circle" ? "rounded-full" : "rounded"} ${className ?? ""}`;
|
|
19314
18985
|
const frameStyle = { width: size4, height: size4 };
|
|
19315
18986
|
if (!url) {
|
|
19316
|
-
return /* @__PURE__ */
|
|
18987
|
+
return /* @__PURE__ */ jsx4("span", { className: `${frame} bg-[hsl(var(--muted))] text-[hsl(var(--muted-foreground))]`, style: frameStyle, "data-plugin-icon": "placeholder", children: /* @__PURE__ */ jsx4(Puzzle, { "aria-hidden": true, size: Math.round(size4 * 0.7) }) });
|
|
19317
18988
|
}
|
|
19318
|
-
return /* @__PURE__ */
|
|
18989
|
+
return /* @__PURE__ */ jsx4("span", { className: frame, style: frameStyle, "data-plugin-icon": "image", children: /* @__PURE__ */ jsx4("img", { src: url, alt: "", "aria-hidden": true, className: "h-full w-full object-cover", onError: () => setUrl(null) }) });
|
|
19319
18990
|
}
|
|
19320
18991
|
|
|
19321
18992
|
// src/components/SessionPluginConfigDialog.tsx
|
|
19322
|
-
import { useEffect as
|
|
19323
|
-
import { Fragment as Fragment3, jsx as
|
|
18993
|
+
import { useEffect as useEffect7, useRef as useRef7, useState as useState12 } from "react";
|
|
18994
|
+
import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
19324
18995
|
async function readFailure(error) {
|
|
19325
18996
|
const response = error?.response;
|
|
19326
18997
|
if (!response || typeof response.json !== "function") {
|
|
@@ -19347,7 +19018,7 @@ function SessionPluginConfigDialog({
|
|
|
19347
19018
|
plugin,
|
|
19348
19019
|
...props
|
|
19349
19020
|
}) {
|
|
19350
|
-
return /* @__PURE__ */
|
|
19021
|
+
return /* @__PURE__ */ jsx5(
|
|
19351
19022
|
ConfigDialogState,
|
|
19352
19023
|
{
|
|
19353
19024
|
client,
|
|
@@ -19365,41 +19036,66 @@ function ConfigDialogState({
|
|
|
19365
19036
|
onSaved,
|
|
19366
19037
|
onClose
|
|
19367
19038
|
}) {
|
|
19368
|
-
const [
|
|
19369
|
-
const [
|
|
19370
|
-
const [
|
|
19371
|
-
const
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19039
|
+
const [host, setHost] = useState12(null);
|
|
19040
|
+
const [restarting, setRestarting] = useState12(false);
|
|
19041
|
+
const [scope, setScope] = useState12("personal");
|
|
19042
|
+
const waitingForHost = host?.state === "starting" || host?.state === "updating";
|
|
19043
|
+
useEffect7(() => {
|
|
19044
|
+
if (!waitingForHost) return;
|
|
19045
|
+
const abort = new AbortController();
|
|
19046
|
+
let timer;
|
|
19047
|
+
const refresh = async () => {
|
|
19048
|
+
try {
|
|
19049
|
+
const next = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, { signal: abort.signal }, scope);
|
|
19050
|
+
if (!abort.signal.aborted) setHost(next.host ?? null);
|
|
19051
|
+
} catch {
|
|
19052
|
+
}
|
|
19053
|
+
if (!abort.signal.aborted) timer = setTimeout(refresh, 2e3);
|
|
19054
|
+
};
|
|
19055
|
+
timer = setTimeout(refresh, 2e3);
|
|
19056
|
+
return () => {
|
|
19057
|
+
abort.abort();
|
|
19058
|
+
clearTimeout(timer);
|
|
19059
|
+
};
|
|
19060
|
+
}, [client, sessionId, plugin.name, scope, waitingForHost]);
|
|
19061
|
+
const [canConfigureGlobal, setCanConfigureGlobal] = useState12(false);
|
|
19062
|
+
const [config, setConfig] = useState12(null);
|
|
19063
|
+
const [loading, setLoading] = useState12(true);
|
|
19064
|
+
const [loadFailure, setLoadFailure] = useState12(null);
|
|
19065
|
+
const [saving, setSaving] = useState12(false);
|
|
19066
|
+
const [failure, setFailure] = useState12(null);
|
|
19067
|
+
const [fieldErrors, setFieldErrors] = useState12([]);
|
|
19068
|
+
const [formVersion, setFormVersion] = useState12(0);
|
|
19069
|
+
const alive = useRef7(true);
|
|
19070
|
+
const generation2 = useRef7(0);
|
|
19071
|
+
const dialog = useRef7(null);
|
|
19072
|
+
useEffect7(() => {
|
|
19379
19073
|
const element = dialog.current;
|
|
19380
19074
|
if (!element || element.open) return;
|
|
19381
19075
|
if (typeof element.showModal === "function") element.showModal();
|
|
19382
19076
|
else element.setAttribute("open", "");
|
|
19383
19077
|
}, []);
|
|
19384
19078
|
const load = async () => {
|
|
19385
|
-
const current = ++
|
|
19079
|
+
const current = ++generation2.current;
|
|
19386
19080
|
setLoading(true);
|
|
19387
19081
|
setLoadFailure(null);
|
|
19388
19082
|
try {
|
|
19389
|
-
const { config: state } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name);
|
|
19390
|
-
if (!alive.current ||
|
|
19083
|
+
const { config: state, can_configure_global, host: hostState } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, void 0, scope);
|
|
19084
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19085
|
+
setCanConfigureGlobal(can_configure_global ?? false);
|
|
19086
|
+
setHost(hostState ?? null);
|
|
19391
19087
|
setConfig(state);
|
|
19392
19088
|
setFormVersion((value) => value + 1);
|
|
19393
19089
|
} catch (error) {
|
|
19394
|
-
if (!alive.current ||
|
|
19090
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19395
19091
|
const detail = await readFailure(error);
|
|
19396
|
-
if (!alive.current ||
|
|
19092
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19397
19093
|
setLoadFailure(detail.message ?? "\u914D\u7F6E\u6682\u4E0D\u53EF\u7528");
|
|
19398
19094
|
} finally {
|
|
19399
|
-
if (alive.current &&
|
|
19095
|
+
if (alive.current && generation2.current === current) setLoading(false);
|
|
19400
19096
|
}
|
|
19401
19097
|
};
|
|
19402
|
-
|
|
19098
|
+
useEffect7(() => {
|
|
19403
19099
|
alive.current = true;
|
|
19404
19100
|
setConfig(null);
|
|
19405
19101
|
setFailure(null);
|
|
@@ -19407,12 +19103,12 @@ function ConfigDialogState({
|
|
|
19407
19103
|
void load();
|
|
19408
19104
|
return () => {
|
|
19409
19105
|
alive.current = false;
|
|
19410
|
-
|
|
19106
|
+
generation2.current++;
|
|
19411
19107
|
};
|
|
19412
|
-
}, [client, sessionId, plugin.name]);
|
|
19108
|
+
}, [client, sessionId, plugin.name, scope]);
|
|
19413
19109
|
const save = async (draft) => {
|
|
19414
19110
|
if (!config) return;
|
|
19415
|
-
const current =
|
|
19111
|
+
const current = generation2.current;
|
|
19416
19112
|
setSaving(true);
|
|
19417
19113
|
setFailure(null);
|
|
19418
19114
|
setFieldErrors([]);
|
|
@@ -19424,16 +19120,18 @@ function ConfigDialogState({
|
|
|
19424
19120
|
expected_revision: config.revision,
|
|
19425
19121
|
set: draft.set,
|
|
19426
19122
|
remove: draft.remove
|
|
19427
|
-
}
|
|
19123
|
+
},
|
|
19124
|
+
void 0,
|
|
19125
|
+
scope
|
|
19428
19126
|
);
|
|
19429
|
-
if (!alive.current ||
|
|
19127
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19430
19128
|
setConfig(state);
|
|
19431
19129
|
setFormVersion((value) => value + 1);
|
|
19432
|
-
onSaved?.(state);
|
|
19130
|
+
if (scope === "personal") onSaved?.(state);
|
|
19433
19131
|
} catch (error) {
|
|
19434
|
-
if (!alive.current ||
|
|
19132
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19435
19133
|
const detail = await readFailure(error);
|
|
19436
|
-
if (!alive.current ||
|
|
19134
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19437
19135
|
setFailure(detail.message ?? "\u914D\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
19438
19136
|
setFieldErrors(detail.errors ?? []);
|
|
19439
19137
|
if (detail.code === "plugin_config_conflict") await load();
|
|
@@ -19442,7 +19140,7 @@ function ConfigDialogState({
|
|
|
19442
19140
|
}
|
|
19443
19141
|
};
|
|
19444
19142
|
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
19445
|
-
/* @__PURE__ */
|
|
19143
|
+
/* @__PURE__ */ jsx5("style", { children: ".blade-plugin-dialog::backdrop { background: rgb(0 0 0 / 40%); }" }),
|
|
19446
19144
|
/* @__PURE__ */ jsxs3(
|
|
19447
19145
|
"dialog",
|
|
19448
19146
|
{
|
|
@@ -19469,8 +19167,8 @@ function ConfigDialogState({
|
|
|
19469
19167
|
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
19168
|
children: [
|
|
19471
19169
|
/* @__PURE__ */ jsxs3("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
19472
|
-
/* @__PURE__ */
|
|
19473
|
-
/* @__PURE__ */
|
|
19170
|
+
/* @__PURE__ */ jsx5(SessionPluginIcon, { client, sessionId, plugin }),
|
|
19171
|
+
/* @__PURE__ */ jsx5(
|
|
19474
19172
|
"span",
|
|
19475
19173
|
{
|
|
19476
19174
|
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
|
@@ -19478,7 +19176,7 @@ function ConfigDialogState({
|
|
|
19478
19176
|
children: sessionPluginLabel(plugin)
|
|
19479
19177
|
}
|
|
19480
19178
|
),
|
|
19481
|
-
/* @__PURE__ */
|
|
19179
|
+
/* @__PURE__ */ jsx5(
|
|
19482
19180
|
"button",
|
|
19483
19181
|
{
|
|
19484
19182
|
type: "button",
|
|
@@ -19489,10 +19187,44 @@ function ConfigDialogState({
|
|
|
19489
19187
|
}
|
|
19490
19188
|
)
|
|
19491
19189
|
] }),
|
|
19492
|
-
|
|
19190
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs3("div", { className: "mb-3 flex gap-2 text-xs", children: [
|
|
19191
|
+
/* @__PURE__ */ jsx5("button", { type: "button", disabled: saving, "aria-pressed": scope === "personal", onClick: () => setScope("personal"), children: "\u6211\u7684\u767B\u5F55" }),
|
|
19192
|
+
/* @__PURE__ */ jsx5("button", { type: "button", disabled: saving, "aria-pressed": scope === "global", onClick: () => setScope("global"), children: "\u7EC4\u7EC7\u5171\u4EAB\u914D\u7F6E" })
|
|
19193
|
+
] }) : null,
|
|
19194
|
+
host ? /* @__PURE__ */ jsxs3("div", { className: "mb-3 space-y-1 text-xs", children: [
|
|
19195
|
+
/* @__PURE__ */ jsxs3("p", { children: [
|
|
19196
|
+
"\u670D\u52A1\uFF1A",
|
|
19197
|
+
host.reason,
|
|
19198
|
+
" \xB7 \u5DF2\u6062\u590D ",
|
|
19199
|
+
host.restarts,
|
|
19200
|
+
" \u6B21"
|
|
19201
|
+
] }),
|
|
19202
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
19203
|
+
/* @__PURE__ */ jsxs3("p", { className: "break-all text-[hsl(var(--muted-foreground))]", children: [
|
|
19204
|
+
"\u5305\u6458\u8981\uFF1A",
|
|
19205
|
+
host.digest,
|
|
19206
|
+
" \xB7 \u914D\u7F6E\uFF1A",
|
|
19207
|
+
host.revision
|
|
19208
|
+
] }),
|
|
19209
|
+
/* @__PURE__ */ jsx5("button", { type: "button", disabled: restarting || saving, onClick: () => {
|
|
19210
|
+
setRestarting(true);
|
|
19211
|
+
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(() => {
|
|
19212
|
+
if (alive.current) setRestarting(false);
|
|
19213
|
+
});
|
|
19214
|
+
}, children: restarting ? "\u6B63\u5728\u91CD\u542F\u2026" : "\u91CD\u542F\u670D\u52A1" }),
|
|
19215
|
+
host.recent?.length ? /* @__PURE__ */ jsxs3("details", { children: [
|
|
19216
|
+
/* @__PURE__ */ jsx5("summary", { children: "\u6700\u8FD1\u6D3B\u52A8" }),
|
|
19217
|
+
host.recent.map((line, index2) => /* @__PURE__ */ jsx5("p", { children: line }, `${index2}-${line}`))
|
|
19218
|
+
] }) : null
|
|
19219
|
+
] }) : null
|
|
19220
|
+
] }) : null,
|
|
19221
|
+
scope === "personal" && config?.auth_status === "expired" ? /* @__PURE__ */ jsx5("p", { className: "mb-2 text-xs", children: "\u767B\u5F55\u5DF2\u8FC7\u671F\uFF0C\u8BF7\u91CD\u65B0\u586B\u5199" }) : null,
|
|
19222
|
+
scope === "personal" && config?.global_ready === false ? /* @__PURE__ */ jsx5("p", { className: "mb-2 text-xs", children: "\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u586B\u5199\u5171\u4EAB\u914D\u7F6E" }) : null,
|
|
19223
|
+
scope === "global" ? /* @__PURE__ */ jsx5("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,
|
|
19224
|
+
loading ? /* @__PURE__ */ jsx5("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u6B63\u5728\u8BFB\u53D6\u914D\u7F6E\u2026" }) : null,
|
|
19493
19225
|
loadFailure ? /* @__PURE__ */ jsxs3("div", { className: "space-y-2 text-xs", children: [
|
|
19494
|
-
/* @__PURE__ */
|
|
19495
|
-
/* @__PURE__ */
|
|
19226
|
+
/* @__PURE__ */ jsx5("p", { children: loadFailure }),
|
|
19227
|
+
/* @__PURE__ */ jsx5(
|
|
19496
19228
|
"button",
|
|
19497
19229
|
{
|
|
19498
19230
|
type: "button",
|
|
@@ -19502,7 +19234,7 @@ function ConfigDialogState({
|
|
|
19502
19234
|
}
|
|
19503
19235
|
)
|
|
19504
19236
|
] }) : null,
|
|
19505
|
-
config && !loading ? /* @__PURE__ */
|
|
19237
|
+
config && !loading ? /* @__PURE__ */ jsx5(
|
|
19506
19238
|
SessionPluginConfigForm,
|
|
19507
19239
|
{
|
|
19508
19240
|
config,
|
|
@@ -19521,7 +19253,7 @@ function ConfigDialogState({
|
|
|
19521
19253
|
}
|
|
19522
19254
|
|
|
19523
19255
|
// src/components/PluginConnectorList.tsx
|
|
19524
|
-
import { jsx as
|
|
19256
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
19525
19257
|
function PluginSwitch({
|
|
19526
19258
|
label,
|
|
19527
19259
|
checked,
|
|
@@ -19531,7 +19263,7 @@ function PluginSwitch({
|
|
|
19531
19263
|
draft = false,
|
|
19532
19264
|
onToggle
|
|
19533
19265
|
}) {
|
|
19534
|
-
return /* @__PURE__ */
|
|
19266
|
+
return /* @__PURE__ */ jsx6(
|
|
19535
19267
|
"button",
|
|
19536
19268
|
{
|
|
19537
19269
|
type: "button",
|
|
@@ -19541,12 +19273,12 @@ function PluginSwitch({
|
|
|
19541
19273
|
disabled,
|
|
19542
19274
|
onClick: () => onToggle(!checked),
|
|
19543
19275
|
className: `relative inline-flex h-[18px] w-8 shrink-0 cursor-pointer items-center rounded-full border transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${checked ? "border-transparent bg-[hsl(213_94%_55%)]" : "border-[hsl(var(--border))] bg-[hsl(var(--muted))]"}`,
|
|
19544
|
-
children: /* @__PURE__ */
|
|
19276
|
+
children: /* @__PURE__ */ jsx6(
|
|
19545
19277
|
"span",
|
|
19546
19278
|
{
|
|
19547
19279
|
"aria-hidden": "true",
|
|
19548
19280
|
className: `pointer-events-none flex h-3.5 w-3.5 items-center justify-center rounded-full bg-white shadow transition-transform ${checked ? "translate-x-[16px]" : "translate-x-[2px]"}`,
|
|
19549
|
-
children: pending ? /* @__PURE__ */
|
|
19281
|
+
children: pending ? /* @__PURE__ */ jsx6(LoaderCircle, { size: 9, className: "animate-spin text-[hsl(var(--muted-foreground))]" }) : null
|
|
19550
19282
|
}
|
|
19551
19283
|
)
|
|
19552
19284
|
}
|
|
@@ -19572,8 +19304,8 @@ function PluginConnectorList({
|
|
|
19572
19304
|
}) {
|
|
19573
19305
|
const configuringItem = configuring ? items.find((item) => item.name === configuring.name) ?? null : null;
|
|
19574
19306
|
return /* @__PURE__ */ jsxs4("div", { className: "py-0.5", children: [
|
|
19575
|
-
disabledReason ? /* @__PURE__ */
|
|
19576
|
-
items.length === 0 ? /* @__PURE__ */
|
|
19307
|
+
disabledReason ? /* @__PURE__ */ jsx6("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: disabledReason }) : null,
|
|
19308
|
+
items.length === 0 ? /* @__PURE__ */ jsx6("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: unavailableText ?? emptyText }) : null,
|
|
19577
19309
|
items.map((item) => {
|
|
19578
19310
|
const label = sessionPluginLabel(item);
|
|
19579
19311
|
const actionable = !disabledReason && item.installed !== false || item.active;
|
|
@@ -19581,7 +19313,7 @@ function PluginConnectorList({
|
|
|
19581
19313
|
const checked = item.active;
|
|
19582
19314
|
return /* @__PURE__ */ jsxs4("div", { className: "group px-3 py-1", children: [
|
|
19583
19315
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
19584
|
-
/* @__PURE__ */
|
|
19316
|
+
/* @__PURE__ */ jsx6(
|
|
19585
19317
|
SessionPluginIcon,
|
|
19586
19318
|
{
|
|
19587
19319
|
client,
|
|
@@ -19589,8 +19321,9 @@ function PluginConnectorList({
|
|
|
19589
19321
|
plugin: item
|
|
19590
19322
|
}
|
|
19591
19323
|
),
|
|
19592
|
-
/* @__PURE__ */
|
|
19593
|
-
|
|
19324
|
+
/* @__PURE__ */ jsx6("span", { className: "min-w-0 flex-1 truncate text-[11px]", title: label, children: label }),
|
|
19325
|
+
item.auth_status === "expired" || item.auth_status === "login_required" || item.auth_status === "unavailable" ? /* @__PURE__ */ jsx6("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,
|
|
19326
|
+
!draft && item.config === "configured" ? /* @__PURE__ */ jsx6(
|
|
19594
19327
|
"button",
|
|
19595
19328
|
{
|
|
19596
19329
|
type: "button",
|
|
@@ -19601,7 +19334,7 @@ function PluginConnectorList({
|
|
|
19601
19334
|
children: "\u66F4\u65B0\u914D\u7F6E"
|
|
19602
19335
|
}
|
|
19603
19336
|
) : null,
|
|
19604
|
-
!draft && (item.config === "required" || item.config === "error") ? /* @__PURE__ */
|
|
19337
|
+
!draft && (item.config === "required" || item.config === "error") ? /* @__PURE__ */ jsx6(
|
|
19605
19338
|
"button",
|
|
19606
19339
|
{
|
|
19607
19340
|
type: "button",
|
|
@@ -19612,7 +19345,7 @@ function PluginConnectorList({
|
|
|
19612
19345
|
children: "\u586B\u5199\u914D\u7F6E"
|
|
19613
19346
|
}
|
|
19614
19347
|
) : null,
|
|
19615
|
-
/* @__PURE__ */
|
|
19348
|
+
/* @__PURE__ */ jsx6(
|
|
19616
19349
|
PluginSwitch,
|
|
19617
19350
|
{
|
|
19618
19351
|
label,
|
|
@@ -19625,8 +19358,8 @@ function PluginConnectorList({
|
|
|
19625
19358
|
)
|
|
19626
19359
|
] }),
|
|
19627
19360
|
!draft && item.active && item.status !== "valid" && item.status !== "required" ? /* @__PURE__ */ jsxs4("div", { className: "mt-0.5 flex items-center gap-2 pl-7 text-[10px] text-[hsl(var(--muted-foreground))]", children: [
|
|
19628
|
-
/* @__PURE__ */
|
|
19629
|
-
/* @__PURE__ */
|
|
19361
|
+
/* @__PURE__ */ jsx6("span", { children: item.reason || "\u63D2\u4EF6\u6682\u4E0D\u53EF\u7528" }),
|
|
19362
|
+
/* @__PURE__ */ jsx6(
|
|
19630
19363
|
"button",
|
|
19631
19364
|
{
|
|
19632
19365
|
type: "button",
|
|
@@ -19639,8 +19372,8 @@ function PluginConnectorList({
|
|
|
19639
19372
|
] }) : null
|
|
19640
19373
|
] }, item.name);
|
|
19641
19374
|
}),
|
|
19642
|
-
mutationError ? /* @__PURE__ */
|
|
19643
|
-
configuring && configuringItem && sessionId ? /* @__PURE__ */
|
|
19375
|
+
mutationError ? /* @__PURE__ */ jsx6("div", { className: "px-3 pt-1 text-[10px] text-[hsl(var(--destructive))]", children: "\u64CD\u4F5C\u672A\u5B8C\u6210\uFF0C\u8BF7\u91CD\u8BD5" }) : null,
|
|
19376
|
+
configuring && configuringItem && sessionId ? /* @__PURE__ */ jsx6(
|
|
19644
19377
|
SessionPluginConfigDialog,
|
|
19645
19378
|
{
|
|
19646
19379
|
client,
|
|
@@ -19661,6 +19394,7 @@ function catalogToConnectorItems(catalog) {
|
|
|
19661
19394
|
icon: entry.icon,
|
|
19662
19395
|
iconSource: "account",
|
|
19663
19396
|
installed: entry.installed,
|
|
19397
|
+
auth_status: entry.auth_status,
|
|
19664
19398
|
active: false,
|
|
19665
19399
|
status: "not_prepared",
|
|
19666
19400
|
projected: false
|
|
@@ -19690,6 +19424,7 @@ function mergeConnectorItems(sessionPlugins, catalog) {
|
|
|
19690
19424
|
icon: entry.icon,
|
|
19691
19425
|
iconSource: "account",
|
|
19692
19426
|
installed: entry.installed,
|
|
19427
|
+
auth_status: entry.auth_status,
|
|
19693
19428
|
active: plugin.active,
|
|
19694
19429
|
status: plugin.status,
|
|
19695
19430
|
reason: plugin.reason,
|
|
@@ -19707,29 +19442,29 @@ function filterConnectorItems(items, query) {
|
|
|
19707
19442
|
}
|
|
19708
19443
|
|
|
19709
19444
|
// src/components/use-session-plugin-activation.ts
|
|
19710
|
-
import { useCallback as useCallback19, useEffect as
|
|
19445
|
+
import { useCallback as useCallback19, useEffect as useEffect8, useMemo as useMemo9, useRef as useRef8, useState as useState13 } from "react";
|
|
19711
19446
|
function useSessionPluginActivation({
|
|
19712
19447
|
client,
|
|
19713
19448
|
sessionId,
|
|
19714
19449
|
onChange
|
|
19715
19450
|
}) {
|
|
19716
|
-
const [plugins, setPlugins] =
|
|
19717
|
-
const [catalog, setCatalog] =
|
|
19718
|
-
const [loading, setLoading] =
|
|
19719
|
-
const [listError, setListError] =
|
|
19720
|
-
const [mutationError, setMutationError] =
|
|
19721
|
-
const [inFlight, setInFlight] =
|
|
19722
|
-
const [configuring, setConfiguring] =
|
|
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 =
|
|
19732
|
-
const [desiredVersion, setDesiredVersion] =
|
|
19451
|
+
const [plugins, setPlugins] = useState13([]);
|
|
19452
|
+
const [catalog, setCatalog] = useState13(null);
|
|
19453
|
+
const [loading, setLoading] = useState13(false);
|
|
19454
|
+
const [listError, setListError] = useState13(false);
|
|
19455
|
+
const [mutationError, setMutationError] = useState13(false);
|
|
19456
|
+
const [inFlight, setInFlight] = useState13({});
|
|
19457
|
+
const [configuring, setConfiguring] = useState13(null);
|
|
19458
|
+
const alive = useRef8(true);
|
|
19459
|
+
const generation2 = useRef8(0);
|
|
19460
|
+
const mutationGenerations = useRef8(/* @__PURE__ */ new Map());
|
|
19461
|
+
const desiredActivations = useRef8(/* @__PURE__ */ new Map());
|
|
19462
|
+
const pendingMutations = useRef8(/* @__PURE__ */ new Map());
|
|
19463
|
+
const submittedActivations = useRef8(/* @__PURE__ */ new Set());
|
|
19464
|
+
const serverActive = useRef8(/* @__PURE__ */ new Set());
|
|
19465
|
+
const lifetime = useRef8(0);
|
|
19466
|
+
const request = useRef8(null);
|
|
19467
|
+
const [desiredVersion, setDesiredVersion] = useState13(0);
|
|
19733
19468
|
const setDesired = useCallback19((name, value) => {
|
|
19734
19469
|
if (value === null) {
|
|
19735
19470
|
if (!desiredActivations.current.delete(name)) return;
|
|
@@ -19739,7 +19474,7 @@ function useSessionPluginActivation({
|
|
|
19739
19474
|
}
|
|
19740
19475
|
setDesiredVersion((version) => version + 1);
|
|
19741
19476
|
}, []);
|
|
19742
|
-
const items =
|
|
19477
|
+
const items = useMemo9(() => {
|
|
19743
19478
|
void desiredVersion;
|
|
19744
19479
|
const merged = mergeConnectorItems(plugins, catalog);
|
|
19745
19480
|
return merged.map((item) => {
|
|
@@ -19759,7 +19494,7 @@ function useSessionPluginActivation({
|
|
|
19759
19494
|
return rest;
|
|
19760
19495
|
});
|
|
19761
19496
|
}, []);
|
|
19762
|
-
|
|
19497
|
+
useEffect8(() => {
|
|
19763
19498
|
alive.current = true;
|
|
19764
19499
|
setPlugins([]);
|
|
19765
19500
|
setCatalog(null);
|
|
@@ -19775,7 +19510,7 @@ function useSessionPluginActivation({
|
|
|
19775
19510
|
return () => {
|
|
19776
19511
|
alive.current = false;
|
|
19777
19512
|
lifetime.current++;
|
|
19778
|
-
|
|
19513
|
+
generation2.current++;
|
|
19779
19514
|
request.current?.abort();
|
|
19780
19515
|
};
|
|
19781
19516
|
}, [client]);
|
|
@@ -19784,7 +19519,7 @@ function useSessionPluginActivation({
|
|
|
19784
19519
|
request.current?.abort();
|
|
19785
19520
|
const controller = new AbortController();
|
|
19786
19521
|
request.current = controller;
|
|
19787
|
-
const current = ++
|
|
19522
|
+
const current = ++generation2.current;
|
|
19788
19523
|
setLoading(true);
|
|
19789
19524
|
setListError(false);
|
|
19790
19525
|
try {
|
|
@@ -19802,7 +19537,7 @@ function useSessionPluginActivation({
|
|
|
19802
19537
|
}
|
|
19803
19538
|
})
|
|
19804
19539
|
);
|
|
19805
|
-
if (alive.current && current ===
|
|
19540
|
+
if (alive.current && current === generation2.current) {
|
|
19806
19541
|
serverActive.current = new Set(withConfig.filter((item) => item.active).map((item) => item.name));
|
|
19807
19542
|
setPlugins(withConfig.map((item) => {
|
|
19808
19543
|
const desired = desiredActivations.current.get(item.name);
|
|
@@ -19810,9 +19545,9 @@ function useSessionPluginActivation({
|
|
|
19810
19545
|
}));
|
|
19811
19546
|
}
|
|
19812
19547
|
} catch {
|
|
19813
|
-
if (alive.current && current ===
|
|
19548
|
+
if (alive.current && current === generation2.current && !controller.signal.aborted) setListError(true);
|
|
19814
19549
|
} finally {
|
|
19815
|
-
if (alive.current && current ===
|
|
19550
|
+
if (alive.current && current === generation2.current) setLoading(false);
|
|
19816
19551
|
}
|
|
19817
19552
|
}, [client, sessionId]);
|
|
19818
19553
|
const loadCatalog = useCallback19(async () => {
|
|
@@ -19874,112 +19609,330 @@ function useSessionPluginActivation({
|
|
|
19874
19609
|
void load();
|
|
19875
19610
|
}
|
|
19876
19611
|
}
|
|
19877
|
-
},
|
|
19878
|
-
[client, finish, load, markInFlight, onChange, sessionId, setDesired]
|
|
19612
|
+
},
|
|
19613
|
+
[client, finish, load, markInFlight, onChange, sessionId, setDesired]
|
|
19614
|
+
);
|
|
19615
|
+
const enable = useCallback19(async (name) => {
|
|
19616
|
+
if (!alive.current) return;
|
|
19617
|
+
const startedAt = lifetime.current;
|
|
19618
|
+
const mutation = (mutationGenerations.current.get(name) ?? 0) + 1;
|
|
19619
|
+
mutationGenerations.current.set(name, mutation);
|
|
19620
|
+
pendingMutations.current.set(name, mutation);
|
|
19621
|
+
setDesired(name, true);
|
|
19622
|
+
setMutationError(false);
|
|
19623
|
+
markInFlight(name, true);
|
|
19624
|
+
request.current?.abort();
|
|
19625
|
+
generation2.current++;
|
|
19626
|
+
setLoading(false);
|
|
19627
|
+
let state;
|
|
19628
|
+
try {
|
|
19629
|
+
const result = await client.sessions.prepareSessionPluginConfig(sessionId, name);
|
|
19630
|
+
if (!alive.current || startedAt !== lifetime.current || mutation !== mutationGenerations.current.get(name)) return;
|
|
19631
|
+
state = result.config;
|
|
19632
|
+
} catch {
|
|
19633
|
+
if (!alive.current || startedAt !== lifetime.current || mutation !== mutationGenerations.current.get(name)) return;
|
|
19634
|
+
abandon(name);
|
|
19635
|
+
setMutationError(true);
|
|
19636
|
+
return;
|
|
19637
|
+
}
|
|
19638
|
+
if (state.state === "required") {
|
|
19639
|
+
pendingMutations.current.delete(name);
|
|
19640
|
+
markInFlight(name, false);
|
|
19641
|
+
setConfiguring({ name, pendingActivation: true });
|
|
19642
|
+
return;
|
|
19643
|
+
}
|
|
19644
|
+
if (state.state !== "configured" && state.state !== "not_required") {
|
|
19645
|
+
abandon(name);
|
|
19646
|
+
setMutationError(true);
|
|
19647
|
+
return;
|
|
19648
|
+
}
|
|
19649
|
+
setPlugins((current) => current.map((item) => item.name === name ? { ...item, config: state.state } : item));
|
|
19650
|
+
await commitActivation(name, true, mutation, startedAt);
|
|
19651
|
+
}, [abandon, client, commitActivation, markInFlight, sessionId, setDesired]);
|
|
19652
|
+
const disable = useCallback19((name) => {
|
|
19653
|
+
const startedAt = lifetime.current;
|
|
19654
|
+
request.current?.abort();
|
|
19655
|
+
generation2.current++;
|
|
19656
|
+
setLoading(false);
|
|
19657
|
+
if (!submittedActivations.current.has(name) && !serverActive.current.has(name)) {
|
|
19658
|
+
abandon(name);
|
|
19659
|
+
return;
|
|
19660
|
+
}
|
|
19661
|
+
const mutation = (mutationGenerations.current.get(name) ?? 0) + 1;
|
|
19662
|
+
mutationGenerations.current.set(name, mutation);
|
|
19663
|
+
pendingMutations.current.set(name, mutation);
|
|
19664
|
+
setDesired(name, false);
|
|
19665
|
+
setMutationError(false);
|
|
19666
|
+
markInFlight(name, true);
|
|
19667
|
+
void commitActivation(name, false, mutation, startedAt);
|
|
19668
|
+
}, [abandon, commitActivation, markInFlight, setDesired]);
|
|
19669
|
+
const toggle = useCallback19((item, next) => {
|
|
19670
|
+
if (next) void enable(item.name);
|
|
19671
|
+
else disable(item.name);
|
|
19672
|
+
}, [disable, enable]);
|
|
19673
|
+
const retry = useCallback19((item) => {
|
|
19674
|
+
void enable(item.name);
|
|
19675
|
+
}, [enable]);
|
|
19676
|
+
const editConfig = useCallback19((item) => {
|
|
19677
|
+
setConfiguring({ name: item.name, pendingActivation: false });
|
|
19678
|
+
}, []);
|
|
19679
|
+
const onConfigSaved = useCallback19((state) => {
|
|
19680
|
+
const target = configuring;
|
|
19681
|
+
if (!target) return;
|
|
19682
|
+
setConfiguring(null);
|
|
19683
|
+
void loadCatalog();
|
|
19684
|
+
setPlugins((current) => current.map((item) => item.name === target.name ? { ...item, config: state.state } : item));
|
|
19685
|
+
if (!target.pendingActivation || state.state !== "configured") {
|
|
19686
|
+
void load();
|
|
19687
|
+
return;
|
|
19688
|
+
}
|
|
19689
|
+
const startedAt = lifetime.current;
|
|
19690
|
+
const mutation = (mutationGenerations.current.get(target.name) ?? 0) + 1;
|
|
19691
|
+
mutationGenerations.current.set(target.name, mutation);
|
|
19692
|
+
pendingMutations.current.set(target.name, mutation);
|
|
19693
|
+
setDesired(target.name, true);
|
|
19694
|
+
markInFlight(target.name, true);
|
|
19695
|
+
void commitActivation(target.name, true, mutation, startedAt);
|
|
19696
|
+
}, [commitActivation, configuring, load, loadCatalog, markInFlight, setDesired]);
|
|
19697
|
+
const onConfigClose = useCallback19(() => {
|
|
19698
|
+
const target = configuring;
|
|
19699
|
+
if (!target) return;
|
|
19700
|
+
setConfiguring(null);
|
|
19701
|
+
if (target.pendingActivation) abandon(target.name);
|
|
19702
|
+
else void load();
|
|
19703
|
+
}, [abandon, configuring, load]);
|
|
19704
|
+
return {
|
|
19705
|
+
items,
|
|
19706
|
+
loading,
|
|
19707
|
+
listError,
|
|
19708
|
+
mutationError,
|
|
19709
|
+
inFlight,
|
|
19710
|
+
busy: Object.keys(inFlight).length > 0,
|
|
19711
|
+
configuring,
|
|
19712
|
+
reload,
|
|
19713
|
+
toggle,
|
|
19714
|
+
retry,
|
|
19715
|
+
editConfig,
|
|
19716
|
+
onConfigSaved,
|
|
19717
|
+
onConfigClose
|
|
19718
|
+
};
|
|
19719
|
+
}
|
|
19720
|
+
|
|
19721
|
+
// src/chat/runtime/session-source.tsx
|
|
19722
|
+
import { createInitialSessionState } from "@blade-hq/agent-client/internal";
|
|
19723
|
+
import {
|
|
19724
|
+
createContext as createContext3,
|
|
19725
|
+
useContext as useContext3,
|
|
19726
|
+
useEffect as useEffect9,
|
|
19727
|
+
useLayoutEffect,
|
|
19728
|
+
useMemo as useMemo10,
|
|
19729
|
+
useRef as useRef9,
|
|
19730
|
+
useState as useState14,
|
|
19731
|
+
useSyncExternalStore
|
|
19732
|
+
} from "react";
|
|
19733
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
19734
|
+
var EMPTY_SOURCE = {
|
|
19735
|
+
subscribe: () => () => {
|
|
19736
|
+
},
|
|
19737
|
+
getSession: () => void 0,
|
|
19738
|
+
isHistoryLoading: () => false,
|
|
19739
|
+
planRevealRevision: () => 0
|
|
19740
|
+
};
|
|
19741
|
+
var SessionSourceContext = createContext3(EMPTY_SOURCE);
|
|
19742
|
+
function SessionSourceProvider({ source, children }) {
|
|
19743
|
+
return /* @__PURE__ */ jsx7(SessionSourceContext.Provider, { value: source, children });
|
|
19744
|
+
}
|
|
19745
|
+
function useSessionSource() {
|
|
19746
|
+
return useContext3(SessionSourceContext);
|
|
19747
|
+
}
|
|
19748
|
+
var SingleSessionSource = class {
|
|
19749
|
+
session = null;
|
|
19750
|
+
loading = false;
|
|
19751
|
+
listeners = /* @__PURE__ */ new Set();
|
|
19752
|
+
revisions = /* @__PURE__ */ new Map();
|
|
19753
|
+
subscribe = (listener) => {
|
|
19754
|
+
this.listeners.add(listener);
|
|
19755
|
+
return () => {
|
|
19756
|
+
this.listeners.delete(listener);
|
|
19757
|
+
};
|
|
19758
|
+
};
|
|
19759
|
+
getSession = (sessionId) => {
|
|
19760
|
+
const current = this.session;
|
|
19761
|
+
return current && (!sessionId || current.sessionId === sessionId) ? current : void 0;
|
|
19762
|
+
};
|
|
19763
|
+
isHistoryLoading = (sessionId) => {
|
|
19764
|
+
if (!this.session) return this.loading;
|
|
19765
|
+
return (!sessionId || this.session.sessionId === sessionId) && this.loading;
|
|
19766
|
+
};
|
|
19767
|
+
planRevealRevision = (sessionId) => sessionId ? this.revisions.get(sessionId) ?? 0 : 0;
|
|
19768
|
+
update(session, loading) {
|
|
19769
|
+
if (this.session === session && this.loading === loading) return;
|
|
19770
|
+
this.session = session;
|
|
19771
|
+
this.loading = loading;
|
|
19772
|
+
this.notify();
|
|
19773
|
+
}
|
|
19774
|
+
/** 只认实时成功的根回路 update_plan:历史加载与断线补数不算「新揭示」。 */
|
|
19775
|
+
watchPlan(session) {
|
|
19776
|
+
return session.on("toolResult", ({ toolCall, turn, source }) => {
|
|
19777
|
+
if (source === "reconnect_replay" || (turn.loop_id || "root") !== "root" || toolCall.status !== "done" || !isPlanUpdateTool(toolCall) || !parsePlanUpdate(toolCall.arguments)) {
|
|
19778
|
+
return;
|
|
19779
|
+
}
|
|
19780
|
+
this.revisions.set(session.sessionId, (this.revisions.get(session.sessionId) ?? 0) + 1);
|
|
19781
|
+
this.notify();
|
|
19782
|
+
});
|
|
19783
|
+
}
|
|
19784
|
+
notify() {
|
|
19785
|
+
for (const listener of [...this.listeners]) listener();
|
|
19786
|
+
}
|
|
19787
|
+
};
|
|
19788
|
+
function useSingleSessionSource(session, loading) {
|
|
19789
|
+
const [source] = useState14(() => new SingleSessionSource());
|
|
19790
|
+
useLayoutEffect(() => {
|
|
19791
|
+
source.update(session, loading);
|
|
19792
|
+
}, [source, session, loading]);
|
|
19793
|
+
useEffect9(() => session ? source.watchPlan(session) : void 0, [source, session]);
|
|
19794
|
+
return source;
|
|
19795
|
+
}
|
|
19796
|
+
var EMPTY_STATE = createInitialSessionState("");
|
|
19797
|
+
var noopSubscribe = () => () => {
|
|
19798
|
+
};
|
|
19799
|
+
function useSessionHandle(sessionId) {
|
|
19800
|
+
const source = useSessionSource();
|
|
19801
|
+
return useSyncExternalStore(
|
|
19802
|
+
source.subscribe,
|
|
19803
|
+
() => source.getSession(sessionId) ?? null,
|
|
19804
|
+
() => source.getSession(sessionId) ?? null
|
|
19805
|
+
);
|
|
19806
|
+
}
|
|
19807
|
+
function useSessionState(sessionId, selector) {
|
|
19808
|
+
const session = useSessionHandle(sessionId);
|
|
19809
|
+
const selectorRef = useRef9(selector);
|
|
19810
|
+
selectorRef.current = selector;
|
|
19811
|
+
const store = useMemo10(() => {
|
|
19812
|
+
let lastState = null;
|
|
19813
|
+
let lastSelector = null;
|
|
19814
|
+
let lastSelected;
|
|
19815
|
+
const getSnapshot = () => {
|
|
19816
|
+
const state = session ? session.getState() : EMPTY_STATE;
|
|
19817
|
+
const current = selectorRef.current;
|
|
19818
|
+
if (state !== lastState || current !== lastSelector) {
|
|
19819
|
+
const next = current(state);
|
|
19820
|
+
if (!(lastState !== null && Object.is(next, lastSelected))) lastSelected = next;
|
|
19821
|
+
lastState = state;
|
|
19822
|
+
lastSelector = current;
|
|
19823
|
+
}
|
|
19824
|
+
return lastSelected;
|
|
19825
|
+
};
|
|
19826
|
+
return {
|
|
19827
|
+
subscribe: session ? (listener) => session.subscribe(listener) : noopSubscribe,
|
|
19828
|
+
getSnapshot
|
|
19829
|
+
};
|
|
19830
|
+
}, [session]);
|
|
19831
|
+
return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
19832
|
+
}
|
|
19833
|
+
function useIsSessionHistoryLoading(sessionId) {
|
|
19834
|
+
const source = useSessionSource();
|
|
19835
|
+
return useSyncExternalStore(
|
|
19836
|
+
source.subscribe,
|
|
19837
|
+
() => source.isHistoryLoading(sessionId),
|
|
19838
|
+
() => source.isHistoryLoading(sessionId)
|
|
19839
|
+
);
|
|
19840
|
+
}
|
|
19841
|
+
function usePlanRevealRevision(sessionId) {
|
|
19842
|
+
const source = useSessionSource();
|
|
19843
|
+
return useSyncExternalStore(
|
|
19844
|
+
source.subscribe,
|
|
19845
|
+
() => source.planRevealRevision(sessionId),
|
|
19846
|
+
() => source.planRevealRevision(sessionId)
|
|
19847
|
+
);
|
|
19848
|
+
}
|
|
19849
|
+
var CurrentChatSessionContext = createContext3(null);
|
|
19850
|
+
function CurrentChatSessionProvider({ sessionId, children }) {
|
|
19851
|
+
return /* @__PURE__ */ jsx7(CurrentChatSessionContext.Provider, { value: sessionId, children });
|
|
19852
|
+
}
|
|
19853
|
+
function useCurrentChatSessionId() {
|
|
19854
|
+
return useContext3(CurrentChatSessionContext);
|
|
19855
|
+
}
|
|
19856
|
+
|
|
19857
|
+
// src/chat/runtime/environment.tsx
|
|
19858
|
+
import { createContext as createContext4, useContext as useContext4, useMemo as useMemo11 } from "react";
|
|
19859
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
19860
|
+
var EMPTY_ENVIRONMENT = {};
|
|
19861
|
+
var ChatEnvironmentContext = createContext4(EMPTY_ENVIRONMENT);
|
|
19862
|
+
function ChatEnvironmentProvider({ value, children }) {
|
|
19863
|
+
return /* @__PURE__ */ jsx8(ChatEnvironmentContext.Provider, { value, children });
|
|
19864
|
+
}
|
|
19865
|
+
function useChatEnvironment() {
|
|
19866
|
+
return useContext4(ChatEnvironmentContext);
|
|
19867
|
+
}
|
|
19868
|
+
var NO_HIGHLIGHT = { highlightedHtml: null };
|
|
19869
|
+
function usePlainCode() {
|
|
19870
|
+
return NO_HIGHLIGHT;
|
|
19871
|
+
}
|
|
19872
|
+
function useHighlightedCode(code, language) {
|
|
19873
|
+
const use = useChatEnvironment().useHighlightedCode ?? usePlainCode;
|
|
19874
|
+
return use(code, language);
|
|
19875
|
+
}
|
|
19876
|
+
function useNoDetail() {
|
|
19877
|
+
return null;
|
|
19878
|
+
}
|
|
19879
|
+
function useChatSessionDetail(sessionId) {
|
|
19880
|
+
const use = useChatEnvironment().useSessionDetail ?? useNoDetail;
|
|
19881
|
+
return use(sessionId);
|
|
19882
|
+
}
|
|
19883
|
+
function useShowTodo() {
|
|
19884
|
+
return false;
|
|
19885
|
+
}
|
|
19886
|
+
function useHideTodo() {
|
|
19887
|
+
const use = useChatEnvironment().useHideTodo ?? useShowTodo;
|
|
19888
|
+
return use();
|
|
19889
|
+
}
|
|
19890
|
+
function useChatRenderMode() {
|
|
19891
|
+
return useChatEnvironment().renderMode ?? "normal";
|
|
19892
|
+
}
|
|
19893
|
+
function notifyChat(environment, kind, message, options) {
|
|
19894
|
+
if (environment.notify) environment.notify(kind, message, options);
|
|
19895
|
+
else if (kind === "error") console.error(message);
|
|
19896
|
+
}
|
|
19897
|
+
function useComposerBridge(sessionId) {
|
|
19898
|
+
const environment = useChatEnvironment();
|
|
19899
|
+
const session = useSessionHandle(sessionId);
|
|
19900
|
+
return useMemo11(
|
|
19901
|
+
() => ({
|
|
19902
|
+
appendText(text, separate = false) {
|
|
19903
|
+
if (!sessionId) return;
|
|
19904
|
+
if (environment.appendToComposer) environment.appendToComposer(sessionId, text, separate);
|
|
19905
|
+
else session?.insertText(separate ? `
|
|
19906
|
+
|
|
19907
|
+
${text}` : text);
|
|
19908
|
+
},
|
|
19909
|
+
addContext(context) {
|
|
19910
|
+
if (!sessionId) return;
|
|
19911
|
+
if (environment.addComposerContext) environment.addComposerContext(sessionId, context);
|
|
19912
|
+
else session?.attach(context.label, context.content);
|
|
19913
|
+
}
|
|
19914
|
+
}),
|
|
19915
|
+
[environment, session, sessionId]
|
|
19879
19916
|
);
|
|
19880
|
-
|
|
19881
|
-
|
|
19882
|
-
|
|
19883
|
-
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
|
|
19887
|
-
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
|
|
19891
|
-
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
abandon(name);
|
|
19900
|
-
setMutationError(true);
|
|
19901
|
-
return;
|
|
19902
|
-
}
|
|
19903
|
-
if (state.state === "required") {
|
|
19904
|
-
pendingMutations.current.delete(name);
|
|
19905
|
-
markInFlight(name, false);
|
|
19906
|
-
setConfiguring({ name, pendingActivation: true });
|
|
19907
|
-
return;
|
|
19908
|
-
}
|
|
19909
|
-
if (state.state !== "configured" && state.state !== "not_required") {
|
|
19910
|
-
abandon(name);
|
|
19911
|
-
setMutationError(true);
|
|
19912
|
-
return;
|
|
19913
|
-
}
|
|
19914
|
-
setPlugins((current) => current.map((item) => item.name === name ? { ...item, config: state.state } : item));
|
|
19915
|
-
await commitActivation(name, true, mutation, startedAt);
|
|
19916
|
-
}, [abandon, client, commitActivation, markInFlight, sessionId, setDesired]);
|
|
19917
|
-
const disable = useCallback19((name) => {
|
|
19918
|
-
const startedAt = lifetime.current;
|
|
19919
|
-
request.current?.abort();
|
|
19920
|
-
generation.current++;
|
|
19921
|
-
setLoading(false);
|
|
19922
|
-
if (!submittedActivations.current.has(name) && !serverActive.current.has(name)) {
|
|
19923
|
-
abandon(name);
|
|
19924
|
-
return;
|
|
19925
|
-
}
|
|
19926
|
-
const mutation = (mutationGenerations.current.get(name) ?? 0) + 1;
|
|
19927
|
-
mutationGenerations.current.set(name, mutation);
|
|
19928
|
-
pendingMutations.current.set(name, mutation);
|
|
19929
|
-
setDesired(name, false);
|
|
19930
|
-
setMutationError(false);
|
|
19931
|
-
markInFlight(name, true);
|
|
19932
|
-
void commitActivation(name, false, mutation, startedAt);
|
|
19933
|
-
}, [abandon, commitActivation, markInFlight, setDesired]);
|
|
19934
|
-
const toggle = useCallback19((item, next) => {
|
|
19935
|
-
if (next) void enable(item.name);
|
|
19936
|
-
else disable(item.name);
|
|
19937
|
-
}, [disable, enable]);
|
|
19938
|
-
const retry = useCallback19((item) => {
|
|
19939
|
-
void enable(item.name);
|
|
19940
|
-
}, [enable]);
|
|
19941
|
-
const editConfig = useCallback19((item) => {
|
|
19942
|
-
setConfiguring({ name: item.name, pendingActivation: false });
|
|
19943
|
-
}, []);
|
|
19944
|
-
const onConfigSaved = useCallback19((state) => {
|
|
19945
|
-
const target = configuring;
|
|
19946
|
-
if (!target) return;
|
|
19947
|
-
setConfiguring(null);
|
|
19948
|
-
setPlugins((current) => current.map((item) => item.name === target.name ? { ...item, config: state.state } : item));
|
|
19949
|
-
if (!target.pendingActivation || state.state !== "configured") {
|
|
19950
|
-
void load();
|
|
19951
|
-
return;
|
|
19952
|
-
}
|
|
19953
|
-
const startedAt = lifetime.current;
|
|
19954
|
-
const mutation = (mutationGenerations.current.get(target.name) ?? 0) + 1;
|
|
19955
|
-
mutationGenerations.current.set(target.name, mutation);
|
|
19956
|
-
pendingMutations.current.set(target.name, mutation);
|
|
19957
|
-
setDesired(target.name, true);
|
|
19958
|
-
markInFlight(target.name, true);
|
|
19959
|
-
void commitActivation(target.name, true, mutation, startedAt);
|
|
19960
|
-
}, [commitActivation, configuring, load, markInFlight, setDesired]);
|
|
19961
|
-
const onConfigClose = useCallback19(() => {
|
|
19962
|
-
const target = configuring;
|
|
19963
|
-
if (!target) return;
|
|
19964
|
-
setConfiguring(null);
|
|
19965
|
-
if (target.pendingActivation) abandon(target.name);
|
|
19966
|
-
else void load();
|
|
19967
|
-
}, [abandon, configuring, load]);
|
|
19968
|
-
return {
|
|
19969
|
-
items,
|
|
19970
|
-
loading,
|
|
19971
|
-
listError,
|
|
19972
|
-
mutationError,
|
|
19973
|
-
inFlight,
|
|
19974
|
-
busy: Object.keys(inFlight).length > 0,
|
|
19975
|
-
configuring,
|
|
19976
|
-
reload,
|
|
19977
|
-
toggle,
|
|
19978
|
-
retry,
|
|
19979
|
-
editConfig,
|
|
19980
|
-
onConfigSaved,
|
|
19981
|
-
onConfigClose
|
|
19982
|
-
};
|
|
19917
|
+
}
|
|
19918
|
+
var NO_VIRTUAL_ITEMS = [];
|
|
19919
|
+
var NO_VIRTUALIZER = {
|
|
19920
|
+
getVirtualItems: () => NO_VIRTUAL_ITEMS,
|
|
19921
|
+
getTotalSize: () => 0,
|
|
19922
|
+
measureElement: () => {
|
|
19923
|
+
},
|
|
19924
|
+
scrollToIndex: () => {
|
|
19925
|
+
},
|
|
19926
|
+
getOffsetForIndex: () => void 0
|
|
19927
|
+
};
|
|
19928
|
+
function useNoVirtualizer() {
|
|
19929
|
+
return NO_VIRTUALIZER;
|
|
19930
|
+
}
|
|
19931
|
+
function useChatVirtualizer(options) {
|
|
19932
|
+
const injected = useChatEnvironment().useVirtualizer;
|
|
19933
|
+
const use = injected ?? useNoVirtualizer;
|
|
19934
|
+
const virtualizer = use(options);
|
|
19935
|
+
return { virtualizer, enabled: Boolean(injected) };
|
|
19983
19936
|
}
|
|
19984
19937
|
|
|
19985
19938
|
// src/chat/runtime/actions.ts
|
|
@@ -20010,7 +19963,9 @@ function sendToSession(session, message, mode, askUserAnswer, extras = {}) {
|
|
|
20010
19963
|
model: extras.model,
|
|
20011
19964
|
thinkingOverride: extras.thinkingOverride,
|
|
20012
19965
|
reasoningLevel: extras.reasoningLevel,
|
|
20013
|
-
|
|
19966
|
+
refs: extras.refs,
|
|
19967
|
+
contextAttachments: extras.contextAttachments,
|
|
19968
|
+
topicAssetRefs: extras.topicAssetRefs,
|
|
20014
19969
|
whatif: extras.whatif,
|
|
20015
19970
|
replayDecision: extras.replayDecision,
|
|
20016
19971
|
queueWhenRunning: extras.queueWhenRunning
|
|
@@ -20088,13 +20043,13 @@ function useComposedRefs(...refs) {
|
|
|
20088
20043
|
|
|
20089
20044
|
// ../../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
20045
|
import * as React2 from "react";
|
|
20091
|
-
import { jsx as
|
|
20046
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
20092
20047
|
function createContext22(rootComponentName, defaultContext) {
|
|
20093
20048
|
const Context = React2.createContext(defaultContext);
|
|
20094
20049
|
const Provider2 = (props) => {
|
|
20095
20050
|
const { children, ...context } = props;
|
|
20096
20051
|
const value = React2.useMemo(() => context, Object.values(context));
|
|
20097
|
-
return /* @__PURE__ */
|
|
20052
|
+
return /* @__PURE__ */ jsx9(Context.Provider, { value, children });
|
|
20098
20053
|
};
|
|
20099
20054
|
Provider2.displayName = rootComponentName + "Provider";
|
|
20100
20055
|
function useContext22(consumerName) {
|
|
@@ -20115,7 +20070,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
20115
20070
|
const { scope, children, ...context } = props;
|
|
20116
20071
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
20117
20072
|
const value = React2.useMemo(() => context, Object.values(context));
|
|
20118
|
-
return /* @__PURE__ */
|
|
20073
|
+
return /* @__PURE__ */ jsx9(Context.Provider, { value, children });
|
|
20119
20074
|
};
|
|
20120
20075
|
Provider2.displayName = rootComponentName + "Provider";
|
|
20121
20076
|
function useContext22(consumerName, scope) {
|
|
@@ -20172,7 +20127,7 @@ import * as ReactDOM from "react-dom";
|
|
|
20172
20127
|
|
|
20173
20128
|
// ../../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
20129
|
import * as React3 from "react";
|
|
20175
|
-
import { Fragment as Fragment22, jsx as
|
|
20130
|
+
import { Fragment as Fragment22, jsx as jsx10 } from "react/jsx-runtime";
|
|
20176
20131
|
// @__NO_SIDE_EFFECTS__
|
|
20177
20132
|
function createSlot(ownerName) {
|
|
20178
20133
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -20190,9 +20145,9 @@ function createSlot(ownerName) {
|
|
|
20190
20145
|
return child;
|
|
20191
20146
|
}
|
|
20192
20147
|
});
|
|
20193
|
-
return /* @__PURE__ */
|
|
20148
|
+
return /* @__PURE__ */ jsx10(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
20194
20149
|
}
|
|
20195
|
-
return /* @__PURE__ */
|
|
20150
|
+
return /* @__PURE__ */ jsx10(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
20196
20151
|
});
|
|
20197
20152
|
Slot22.displayName = `${ownerName}.Slot`;
|
|
20198
20153
|
return Slot22;
|
|
@@ -20218,7 +20173,7 @@ var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
|
20218
20173
|
// @__NO_SIDE_EFFECTS__
|
|
20219
20174
|
function createSlottable(ownerName) {
|
|
20220
20175
|
const Slottable2 = ({ children }) => {
|
|
20221
|
-
return /* @__PURE__ */
|
|
20176
|
+
return /* @__PURE__ */ jsx10(Fragment22, { children });
|
|
20222
20177
|
};
|
|
20223
20178
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
20224
20179
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -20266,7 +20221,7 @@ function getElementRef(element) {
|
|
|
20266
20221
|
}
|
|
20267
20222
|
|
|
20268
20223
|
// ../../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
|
|
20224
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
20270
20225
|
var NODES = [
|
|
20271
20226
|
"a",
|
|
20272
20227
|
"button",
|
|
@@ -20294,7 +20249,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
20294
20249
|
if (typeof window !== "undefined") {
|
|
20295
20250
|
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
20296
20251
|
}
|
|
20297
|
-
return /* @__PURE__ */
|
|
20252
|
+
return /* @__PURE__ */ jsx11(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
20298
20253
|
});
|
|
20299
20254
|
Node2.displayName = `Primitive.${node}`;
|
|
20300
20255
|
return { ...primitive, [node]: Node2 };
|
|
@@ -20329,7 +20284,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
20329
20284
|
}
|
|
20330
20285
|
|
|
20331
20286
|
// ../../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
|
|
20287
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
20333
20288
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
20334
20289
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
20335
20290
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
@@ -20417,7 +20372,7 @@ var DismissableLayer = React7.forwardRef(
|
|
|
20417
20372
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
20418
20373
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
20419
20374
|
}, []);
|
|
20420
|
-
return /* @__PURE__ */
|
|
20375
|
+
return /* @__PURE__ */ jsx12(
|
|
20421
20376
|
Primitive.div,
|
|
20422
20377
|
{
|
|
20423
20378
|
...layerProps,
|
|
@@ -20451,7 +20406,7 @@ var DismissableLayerBranch = React7.forwardRef((props, forwardedRef) => {
|
|
|
20451
20406
|
};
|
|
20452
20407
|
}
|
|
20453
20408
|
}, [context.branches]);
|
|
20454
|
-
return /* @__PURE__ */
|
|
20409
|
+
return /* @__PURE__ */ jsx12(Primitive.div, { ...props, ref: composedRefs });
|
|
20455
20410
|
});
|
|
20456
20411
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
20457
20412
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -20563,7 +20518,7 @@ function createFocusGuard() {
|
|
|
20563
20518
|
|
|
20564
20519
|
// ../../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
20520
|
import * as React9 from "react";
|
|
20566
|
-
import { jsx as
|
|
20521
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
20567
20522
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
20568
20523
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
20569
20524
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
@@ -20682,7 +20637,7 @@ var FocusScope = React9.forwardRef((props, forwardedRef) => {
|
|
|
20682
20637
|
},
|
|
20683
20638
|
[loop, trapped, focusScope.paused]
|
|
20684
20639
|
);
|
|
20685
|
-
return /* @__PURE__ */
|
|
20640
|
+
return /* @__PURE__ */ jsx13(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
20686
20641
|
});
|
|
20687
20642
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
20688
20643
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -22717,11 +22672,11 @@ var arrow3 = (options, deps) => {
|
|
|
22717
22672
|
|
|
22718
22673
|
// ../../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
22674
|
import * as React13 from "react";
|
|
22720
|
-
import { jsx as
|
|
22675
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
22721
22676
|
var NAME = "Arrow";
|
|
22722
22677
|
var Arrow = React13.forwardRef((props, forwardedRef) => {
|
|
22723
22678
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
22724
|
-
return /* @__PURE__ */
|
|
22679
|
+
return /* @__PURE__ */ jsx14(
|
|
22725
22680
|
Primitive.svg,
|
|
22726
22681
|
{
|
|
22727
22682
|
...arrowProps,
|
|
@@ -22730,7 +22685,7 @@ var Arrow = React13.forwardRef((props, forwardedRef) => {
|
|
|
22730
22685
|
height,
|
|
22731
22686
|
viewBox: "0 0 30 10",
|
|
22732
22687
|
preserveAspectRatio: "none",
|
|
22733
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
22688
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx14("polygon", { points: "0,0 30,0 15,10" })
|
|
22734
22689
|
}
|
|
22735
22690
|
);
|
|
22736
22691
|
});
|
|
@@ -22775,14 +22730,14 @@ function useSize(element) {
|
|
|
22775
22730
|
}
|
|
22776
22731
|
|
|
22777
22732
|
// ../../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
|
|
22733
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
22779
22734
|
var POPPER_NAME = "Popper";
|
|
22780
22735
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
22781
22736
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22782
22737
|
var Popper = (props) => {
|
|
22783
22738
|
const { __scopePopper, children } = props;
|
|
22784
22739
|
const [anchor, setAnchor] = React15.useState(null);
|
|
22785
|
-
return /* @__PURE__ */
|
|
22740
|
+
return /* @__PURE__ */ jsx15(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22786
22741
|
};
|
|
22787
22742
|
Popper.displayName = POPPER_NAME;
|
|
22788
22743
|
var ANCHOR_NAME = "PopperAnchor";
|
|
@@ -22800,7 +22755,7 @@ var PopperAnchor = React15.forwardRef(
|
|
|
22800
22755
|
context.onAnchorChange(anchorRef.current);
|
|
22801
22756
|
}
|
|
22802
22757
|
});
|
|
22803
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
22758
|
+
return virtualRef ? null : /* @__PURE__ */ jsx15(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
22804
22759
|
}
|
|
22805
22760
|
);
|
|
22806
22761
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
@@ -22893,7 +22848,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22893
22848
|
useLayoutEffect22(() => {
|
|
22894
22849
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
22895
22850
|
}, [content]);
|
|
22896
|
-
return /* @__PURE__ */
|
|
22851
|
+
return /* @__PURE__ */ jsx15(
|
|
22897
22852
|
"div",
|
|
22898
22853
|
{
|
|
22899
22854
|
ref: refs.setFloating,
|
|
@@ -22917,7 +22872,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22917
22872
|
}
|
|
22918
22873
|
},
|
|
22919
22874
|
dir: props.dir,
|
|
22920
|
-
children: /* @__PURE__ */
|
|
22875
|
+
children: /* @__PURE__ */ jsx15(
|
|
22921
22876
|
PopperContentProvider,
|
|
22922
22877
|
{
|
|
22923
22878
|
scope: __scopePopper,
|
|
@@ -22926,7 +22881,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22926
22881
|
arrowX,
|
|
22927
22882
|
arrowY,
|
|
22928
22883
|
shouldHideArrow: cannotCenterArrow,
|
|
22929
|
-
children: /* @__PURE__ */
|
|
22884
|
+
children: /* @__PURE__ */ jsx15(
|
|
22930
22885
|
Primitive.div,
|
|
22931
22886
|
{
|
|
22932
22887
|
"data-side": placedSide,
|
|
@@ -22963,7 +22918,7 @@ var PopperArrow = React15.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
22963
22918
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
22964
22919
|
// doesn't report size as we'd expect on SVG elements.
|
|
22965
22920
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
22966
|
-
/* @__PURE__ */
|
|
22921
|
+
/* @__PURE__ */ jsx15(
|
|
22967
22922
|
"span",
|
|
22968
22923
|
{
|
|
22969
22924
|
ref: contentContext.onArrowChange,
|
|
@@ -22986,7 +22941,7 @@ var PopperArrow = React15.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
22986
22941
|
}[contentContext.placedSide],
|
|
22987
22942
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
22988
22943
|
},
|
|
22989
|
-
children: /* @__PURE__ */
|
|
22944
|
+
children: /* @__PURE__ */ jsx15(
|
|
22990
22945
|
Root,
|
|
22991
22946
|
{
|
|
22992
22947
|
...arrowProps,
|
|
@@ -23049,14 +23004,14 @@ var Arrow2 = PopperArrow;
|
|
|
23049
23004
|
// ../../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
23005
|
import * as React16 from "react";
|
|
23051
23006
|
import ReactDOM3 from "react-dom";
|
|
23052
|
-
import { jsx as
|
|
23007
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
23053
23008
|
var PORTAL_NAME = "Portal";
|
|
23054
23009
|
var Portal = React16.forwardRef((props, forwardedRef) => {
|
|
23055
23010
|
const { container: containerProp, ...portalProps } = props;
|
|
23056
23011
|
const [mounted, setMounted] = React16.useState(false);
|
|
23057
23012
|
useLayoutEffect22(() => setMounted(true), []);
|
|
23058
23013
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
23059
|
-
return container ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
23014
|
+
return container ? ReactDOM3.createPortal(/* @__PURE__ */ jsx16(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
23060
23015
|
});
|
|
23061
23016
|
Portal.displayName = PORTAL_NAME;
|
|
23062
23017
|
|
|
@@ -24096,7 +24051,7 @@ ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
|
24096
24051
|
var Combination_default = ReactRemoveScroll;
|
|
24097
24052
|
|
|
24098
24053
|
// ../../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
|
|
24054
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
24100
24055
|
var POPOVER_NAME = "Popover";
|
|
24101
24056
|
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
24102
24057
|
createPopperScope
|
|
@@ -24121,7 +24076,7 @@ var Popover = (props) => {
|
|
|
24121
24076
|
onChange: onOpenChange,
|
|
24122
24077
|
caller: POPOVER_NAME
|
|
24123
24078
|
});
|
|
24124
|
-
return /* @__PURE__ */
|
|
24079
|
+
return /* @__PURE__ */ jsx17(Root2, { ...popperScope, children: /* @__PURE__ */ jsx17(
|
|
24125
24080
|
PopoverProvider,
|
|
24126
24081
|
{
|
|
24127
24082
|
scope: __scopePopover,
|
|
@@ -24150,7 +24105,7 @@ var PopoverAnchor = React28.forwardRef(
|
|
|
24150
24105
|
onCustomAnchorAdd();
|
|
24151
24106
|
return () => onCustomAnchorRemove();
|
|
24152
24107
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
24153
|
-
return /* @__PURE__ */
|
|
24108
|
+
return /* @__PURE__ */ jsx17(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
24154
24109
|
}
|
|
24155
24110
|
);
|
|
24156
24111
|
PopoverAnchor.displayName = ANCHOR_NAME2;
|
|
@@ -24161,7 +24116,7 @@ var PopoverTrigger = React28.forwardRef(
|
|
|
24161
24116
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
24162
24117
|
const popperScope = usePopperScope(__scopePopover);
|
|
24163
24118
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
24164
|
-
const trigger = /* @__PURE__ */
|
|
24119
|
+
const trigger = /* @__PURE__ */ jsx17(
|
|
24165
24120
|
Primitive.button,
|
|
24166
24121
|
{
|
|
24167
24122
|
type: "button",
|
|
@@ -24174,7 +24129,7 @@ var PopoverTrigger = React28.forwardRef(
|
|
|
24174
24129
|
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
24175
24130
|
}
|
|
24176
24131
|
);
|
|
24177
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */
|
|
24132
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx17(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
24178
24133
|
}
|
|
24179
24134
|
);
|
|
24180
24135
|
PopoverTrigger.displayName = TRIGGER_NAME;
|
|
@@ -24185,7 +24140,7 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
|
|
|
24185
24140
|
var PopoverPortal = (props) => {
|
|
24186
24141
|
const { __scopePopover, forceMount, children, container } = props;
|
|
24187
24142
|
const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
|
|
24188
|
-
return /* @__PURE__ */
|
|
24143
|
+
return /* @__PURE__ */ jsx17(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx17(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx17(Portal, { asChild: true, container, children }) }) });
|
|
24189
24144
|
};
|
|
24190
24145
|
PopoverPortal.displayName = PORTAL_NAME2;
|
|
24191
24146
|
var CONTENT_NAME2 = "PopoverContent";
|
|
@@ -24194,7 +24149,7 @@ var PopoverContent = React28.forwardRef(
|
|
|
24194
24149
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
|
|
24195
24150
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
24196
24151
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
24197
|
-
return /* @__PURE__ */
|
|
24152
|
+
return /* @__PURE__ */ jsx17(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx17(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx17(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
24198
24153
|
}
|
|
24199
24154
|
);
|
|
24200
24155
|
PopoverContent.displayName = CONTENT_NAME2;
|
|
@@ -24209,7 +24164,7 @@ var PopoverContentModal = React28.forwardRef(
|
|
|
24209
24164
|
const content = contentRef.current;
|
|
24210
24165
|
if (content) return hideOthers(content);
|
|
24211
24166
|
}, []);
|
|
24212
|
-
return /* @__PURE__ */
|
|
24167
|
+
return /* @__PURE__ */ jsx17(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx17(
|
|
24213
24168
|
PopoverContentImpl,
|
|
24214
24169
|
{
|
|
24215
24170
|
...props,
|
|
@@ -24244,7 +24199,7 @@ var PopoverContentNonModal = React28.forwardRef(
|
|
|
24244
24199
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
24245
24200
|
const hasInteractedOutsideRef = React28.useRef(false);
|
|
24246
24201
|
const hasPointerDownOutsideRef = React28.useRef(false);
|
|
24247
|
-
return /* @__PURE__ */
|
|
24202
|
+
return /* @__PURE__ */ jsx17(
|
|
24248
24203
|
PopoverContentImpl,
|
|
24249
24204
|
{
|
|
24250
24205
|
...props,
|
|
@@ -24296,7 +24251,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24296
24251
|
const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
|
|
24297
24252
|
const popperScope = usePopperScope(__scopePopover);
|
|
24298
24253
|
useFocusGuards();
|
|
24299
|
-
return /* @__PURE__ */
|
|
24254
|
+
return /* @__PURE__ */ jsx17(
|
|
24300
24255
|
FocusScope,
|
|
24301
24256
|
{
|
|
24302
24257
|
asChild: true,
|
|
@@ -24304,7 +24259,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24304
24259
|
trapped: trapFocus,
|
|
24305
24260
|
onMountAutoFocus: onOpenAutoFocus,
|
|
24306
24261
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
24307
|
-
children: /* @__PURE__ */
|
|
24262
|
+
children: /* @__PURE__ */ jsx17(
|
|
24308
24263
|
DismissableLayer,
|
|
24309
24264
|
{
|
|
24310
24265
|
asChild: true,
|
|
@@ -24314,7 +24269,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24314
24269
|
onPointerDownOutside,
|
|
24315
24270
|
onFocusOutside,
|
|
24316
24271
|
onDismiss: () => context.onOpenChange(false),
|
|
24317
|
-
children: /* @__PURE__ */
|
|
24272
|
+
children: /* @__PURE__ */ jsx17(
|
|
24318
24273
|
Content,
|
|
24319
24274
|
{
|
|
24320
24275
|
"data-state": getState(context.open),
|
|
@@ -24347,7 +24302,7 @@ var PopoverClose = React28.forwardRef(
|
|
|
24347
24302
|
(props, forwardedRef) => {
|
|
24348
24303
|
const { __scopePopover, ...closeProps } = props;
|
|
24349
24304
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
24350
|
-
return /* @__PURE__ */
|
|
24305
|
+
return /* @__PURE__ */ jsx17(
|
|
24351
24306
|
Primitive.button,
|
|
24352
24307
|
{
|
|
24353
24308
|
type: "button",
|
|
@@ -24364,7 +24319,7 @@ var PopoverArrow = React28.forwardRef(
|
|
|
24364
24319
|
(props, forwardedRef) => {
|
|
24365
24320
|
const { __scopePopover, ...arrowProps } = props;
|
|
24366
24321
|
const popperScope = usePopperScope(__scopePopover);
|
|
24367
|
-
return /* @__PURE__ */
|
|
24322
|
+
return /* @__PURE__ */ jsx17(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
24368
24323
|
}
|
|
24369
24324
|
);
|
|
24370
24325
|
PopoverArrow.displayName = ARROW_NAME2;
|
|
@@ -24400,7 +24355,7 @@ import * as React30 from "react";
|
|
|
24400
24355
|
|
|
24401
24356
|
// ../../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
24357
|
import * as React29 from "react";
|
|
24403
|
-
import { jsx as
|
|
24358
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
24404
24359
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
24405
24360
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
24406
24361
|
position: "absolute",
|
|
@@ -24417,7 +24372,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
24417
24372
|
var NAME2 = "VisuallyHidden";
|
|
24418
24373
|
var VisuallyHidden = React29.forwardRef(
|
|
24419
24374
|
(props, forwardedRef) => {
|
|
24420
|
-
return /* @__PURE__ */
|
|
24375
|
+
return /* @__PURE__ */ jsx18(
|
|
24421
24376
|
Primitive.span,
|
|
24422
24377
|
{
|
|
24423
24378
|
...props,
|
|
@@ -24431,7 +24386,7 @@ VisuallyHidden.displayName = NAME2;
|
|
|
24431
24386
|
var Root3 = VisuallyHidden;
|
|
24432
24387
|
|
|
24433
24388
|
// ../../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
|
|
24389
|
+
import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
24435
24390
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
24436
24391
|
createPopperScope
|
|
24437
24392
|
]);
|
|
@@ -24455,7 +24410,7 @@ var TooltipProvider = (props) => {
|
|
|
24455
24410
|
const skipDelayTimer = skipDelayTimerRef.current;
|
|
24456
24411
|
return () => window.clearTimeout(skipDelayTimer);
|
|
24457
24412
|
}, []);
|
|
24458
|
-
return /* @__PURE__ */
|
|
24413
|
+
return /* @__PURE__ */ jsx19(
|
|
24459
24414
|
TooltipProviderContextProvider,
|
|
24460
24415
|
{
|
|
24461
24416
|
scope: __scopeTooltip,
|
|
@@ -24546,7 +24501,7 @@ var Tooltip = (props) => {
|
|
|
24546
24501
|
}
|
|
24547
24502
|
};
|
|
24548
24503
|
}, []);
|
|
24549
|
-
return /* @__PURE__ */
|
|
24504
|
+
return /* @__PURE__ */ jsx19(Root2, { ...popperScope, children: /* @__PURE__ */ jsx19(
|
|
24550
24505
|
TooltipContextProvider,
|
|
24551
24506
|
{
|
|
24552
24507
|
scope: __scopeTooltip,
|
|
@@ -24590,7 +24545,7 @@ var TooltipTrigger = React30.forwardRef(
|
|
|
24590
24545
|
React30.useEffect(() => {
|
|
24591
24546
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
24592
24547
|
}, [handlePointerUp]);
|
|
24593
|
-
return /* @__PURE__ */
|
|
24548
|
+
return /* @__PURE__ */ jsx19(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx19(
|
|
24594
24549
|
Primitive.button,
|
|
24595
24550
|
{
|
|
24596
24551
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
@@ -24632,7 +24587,7 @@ var [PortalProvider2, usePortalContext2] = createTooltipContext(PORTAL_NAME3, {
|
|
|
24632
24587
|
var TooltipPortal = (props) => {
|
|
24633
24588
|
const { __scopeTooltip, forceMount, children, container } = props;
|
|
24634
24589
|
const context = useTooltipContext(PORTAL_NAME3, __scopeTooltip);
|
|
24635
|
-
return /* @__PURE__ */
|
|
24590
|
+
return /* @__PURE__ */ jsx19(PortalProvider2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx19(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx19(Portal, { asChild: true, container, children }) }) });
|
|
24636
24591
|
};
|
|
24637
24592
|
TooltipPortal.displayName = PORTAL_NAME3;
|
|
24638
24593
|
var CONTENT_NAME3 = "TooltipContent";
|
|
@@ -24641,7 +24596,7 @@ var TooltipContent = React30.forwardRef(
|
|
|
24641
24596
|
const portalContext = usePortalContext2(CONTENT_NAME3, props.__scopeTooltip);
|
|
24642
24597
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
24643
24598
|
const context = useTooltipContext(CONTENT_NAME3, props.__scopeTooltip);
|
|
24644
|
-
return /* @__PURE__ */
|
|
24599
|
+
return /* @__PURE__ */ jsx19(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx19(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx19(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
|
24645
24600
|
}
|
|
24646
24601
|
);
|
|
24647
24602
|
var TooltipContentHoverable = React30.forwardRef((props, forwardedRef) => {
|
|
@@ -24703,7 +24658,7 @@ var TooltipContentHoverable = React30.forwardRef((props, forwardedRef) => {
|
|
|
24703
24658
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
24704
24659
|
}
|
|
24705
24660
|
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
24706
|
-
return /* @__PURE__ */
|
|
24661
|
+
return /* @__PURE__ */ jsx19(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
24707
24662
|
});
|
|
24708
24663
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
24709
24664
|
var Slottable = createSlottable("TooltipContent");
|
|
@@ -24734,7 +24689,7 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24734
24689
|
return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
|
|
24735
24690
|
}
|
|
24736
24691
|
}, [context.trigger, onClose]);
|
|
24737
|
-
return /* @__PURE__ */
|
|
24692
|
+
return /* @__PURE__ */ jsx19(
|
|
24738
24693
|
DismissableLayer,
|
|
24739
24694
|
{
|
|
24740
24695
|
asChild: true,
|
|
@@ -24762,8 +24717,8 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24762
24717
|
}
|
|
24763
24718
|
},
|
|
24764
24719
|
children: [
|
|
24765
|
-
/* @__PURE__ */
|
|
24766
|
-
/* @__PURE__ */
|
|
24720
|
+
/* @__PURE__ */ jsx19(Slottable, { children }),
|
|
24721
|
+
/* @__PURE__ */ jsx19(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx19(Root3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
24767
24722
|
]
|
|
24768
24723
|
}
|
|
24769
24724
|
)
|
|
@@ -24781,7 +24736,7 @@ var TooltipArrow = React30.forwardRef(
|
|
|
24781
24736
|
ARROW_NAME3,
|
|
24782
24737
|
__scopeTooltip
|
|
24783
24738
|
);
|
|
24784
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */
|
|
24739
|
+
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx19(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
24785
24740
|
}
|
|
24786
24741
|
);
|
|
24787
24742
|
TooltipArrow.displayName = ARROW_NAME3;
|
|
@@ -24919,7 +24874,7 @@ __export(dist_exports6, {
|
|
|
24919
24874
|
createCollapsibleScope: () => createCollapsibleScope
|
|
24920
24875
|
});
|
|
24921
24876
|
import * as React31 from "react";
|
|
24922
|
-
import { jsx as
|
|
24877
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
24923
24878
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
24924
24879
|
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
24925
24880
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
@@ -24939,7 +24894,7 @@ var Collapsible = React31.forwardRef(
|
|
|
24939
24894
|
onChange: onOpenChange,
|
|
24940
24895
|
caller: COLLAPSIBLE_NAME
|
|
24941
24896
|
});
|
|
24942
|
-
return /* @__PURE__ */
|
|
24897
|
+
return /* @__PURE__ */ jsx20(
|
|
24943
24898
|
CollapsibleProvider,
|
|
24944
24899
|
{
|
|
24945
24900
|
scope: __scopeCollapsible,
|
|
@@ -24947,7 +24902,7 @@ var Collapsible = React31.forwardRef(
|
|
|
24947
24902
|
contentId: useId(),
|
|
24948
24903
|
open,
|
|
24949
24904
|
onOpenToggle: React31.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
24950
|
-
children: /* @__PURE__ */
|
|
24905
|
+
children: /* @__PURE__ */ jsx20(
|
|
24951
24906
|
Primitive.div,
|
|
24952
24907
|
{
|
|
24953
24908
|
"data-state": getState2(open),
|
|
@@ -24966,7 +24921,7 @@ var CollapsibleTrigger = React31.forwardRef(
|
|
|
24966
24921
|
(props, forwardedRef) => {
|
|
24967
24922
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
24968
24923
|
const context = useCollapsibleContext(TRIGGER_NAME3, __scopeCollapsible);
|
|
24969
|
-
return /* @__PURE__ */
|
|
24924
|
+
return /* @__PURE__ */ jsx20(
|
|
24970
24925
|
Primitive.button,
|
|
24971
24926
|
{
|
|
24972
24927
|
type: "button",
|
|
@@ -24988,7 +24943,7 @@ var CollapsibleContent = React31.forwardRef(
|
|
|
24988
24943
|
(props, forwardedRef) => {
|
|
24989
24944
|
const { forceMount, ...contentProps } = props;
|
|
24990
24945
|
const context = useCollapsibleContext(CONTENT_NAME4, props.__scopeCollapsible);
|
|
24991
|
-
return /* @__PURE__ */
|
|
24946
|
+
return /* @__PURE__ */ jsx20(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx20(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
24992
24947
|
}
|
|
24993
24948
|
);
|
|
24994
24949
|
CollapsibleContent.displayName = CONTENT_NAME4;
|
|
@@ -25028,7 +24983,7 @@ var CollapsibleContentImpl = React31.forwardRef((props, forwardedRef) => {
|
|
|
25028
24983
|
setIsPresent(present);
|
|
25029
24984
|
}
|
|
25030
24985
|
}, [context.open, present]);
|
|
25031
|
-
return /* @__PURE__ */
|
|
24986
|
+
return /* @__PURE__ */ jsx20(
|
|
25032
24987
|
Primitive.div,
|
|
25033
24988
|
{
|
|
25034
24989
|
"data-state": getState2(context.open),
|
|
@@ -25076,7 +25031,7 @@ __export(dist_exports7, {
|
|
|
25076
25031
|
createDialogScope: () => createDialogScope
|
|
25077
25032
|
});
|
|
25078
25033
|
import * as React32 from "react";
|
|
25079
|
-
import { Fragment as Fragment7, jsx as
|
|
25034
|
+
import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
25080
25035
|
var DIALOG_NAME = "Dialog";
|
|
25081
25036
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
25082
25037
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -25097,7 +25052,7 @@ var Dialog = (props) => {
|
|
|
25097
25052
|
onChange: onOpenChange,
|
|
25098
25053
|
caller: DIALOG_NAME
|
|
25099
25054
|
});
|
|
25100
|
-
return /* @__PURE__ */
|
|
25055
|
+
return /* @__PURE__ */ jsx21(
|
|
25101
25056
|
DialogProvider,
|
|
25102
25057
|
{
|
|
25103
25058
|
scope: __scopeDialog,
|
|
@@ -25121,7 +25076,7 @@ var DialogTrigger = React32.forwardRef(
|
|
|
25121
25076
|
const { __scopeDialog, ...triggerProps } = props;
|
|
25122
25077
|
const context = useDialogContext(TRIGGER_NAME4, __scopeDialog);
|
|
25123
25078
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
25124
|
-
return /* @__PURE__ */
|
|
25079
|
+
return /* @__PURE__ */ jsx21(
|
|
25125
25080
|
Primitive.button,
|
|
25126
25081
|
{
|
|
25127
25082
|
type: "button",
|
|
@@ -25144,7 +25099,7 @@ var [PortalProvider3, usePortalContext3] = createDialogContext(PORTAL_NAME4, {
|
|
|
25144
25099
|
var DialogPortal = (props) => {
|
|
25145
25100
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
25146
25101
|
const context = useDialogContext(PORTAL_NAME4, __scopeDialog);
|
|
25147
|
-
return /* @__PURE__ */
|
|
25102
|
+
return /* @__PURE__ */ jsx21(PortalProvider3, { scope: __scopeDialog, forceMount, children: React32.Children.map(children, (child) => /* @__PURE__ */ jsx21(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx21(Portal, { asChild: true, container, children: child }) })) });
|
|
25148
25103
|
};
|
|
25149
25104
|
DialogPortal.displayName = PORTAL_NAME4;
|
|
25150
25105
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -25153,7 +25108,7 @@ var DialogOverlay = React32.forwardRef(
|
|
|
25153
25108
|
const portalContext = usePortalContext3(OVERLAY_NAME, props.__scopeDialog);
|
|
25154
25109
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
25155
25110
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
25156
|
-
return context.modal ? /* @__PURE__ */
|
|
25111
|
+
return context.modal ? /* @__PURE__ */ jsx21(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx21(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
25157
25112
|
}
|
|
25158
25113
|
);
|
|
25159
25114
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
@@ -25165,7 +25120,7 @@ var DialogOverlayImpl = React32.forwardRef(
|
|
|
25165
25120
|
return (
|
|
25166
25121
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
25167
25122
|
// ie. when `Overlay` and `Content` are siblings
|
|
25168
|
-
/* @__PURE__ */
|
|
25123
|
+
/* @__PURE__ */ jsx21(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx21(
|
|
25169
25124
|
Primitive.div,
|
|
25170
25125
|
{
|
|
25171
25126
|
"data-state": getState3(context.open),
|
|
@@ -25183,7 +25138,7 @@ var DialogContent = React32.forwardRef(
|
|
|
25183
25138
|
const portalContext = usePortalContext3(CONTENT_NAME5, props.__scopeDialog);
|
|
25184
25139
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
25185
25140
|
const context = useDialogContext(CONTENT_NAME5, props.__scopeDialog);
|
|
25186
|
-
return /* @__PURE__ */
|
|
25141
|
+
return /* @__PURE__ */ jsx21(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx21(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx21(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
25187
25142
|
}
|
|
25188
25143
|
);
|
|
25189
25144
|
DialogContent.displayName = CONTENT_NAME5;
|
|
@@ -25196,7 +25151,7 @@ var DialogContentModal = React32.forwardRef(
|
|
|
25196
25151
|
const content = contentRef.current;
|
|
25197
25152
|
if (content) return hideOthers(content);
|
|
25198
25153
|
}, []);
|
|
25199
|
-
return /* @__PURE__ */
|
|
25154
|
+
return /* @__PURE__ */ jsx21(
|
|
25200
25155
|
DialogContentImpl,
|
|
25201
25156
|
{
|
|
25202
25157
|
...props,
|
|
@@ -25226,7 +25181,7 @@ var DialogContentNonModal = React32.forwardRef(
|
|
|
25226
25181
|
const context = useDialogContext(CONTENT_NAME5, props.__scopeDialog);
|
|
25227
25182
|
const hasInteractedOutsideRef = React32.useRef(false);
|
|
25228
25183
|
const hasPointerDownOutsideRef = React32.useRef(false);
|
|
25229
|
-
return /* @__PURE__ */
|
|
25184
|
+
return /* @__PURE__ */ jsx21(
|
|
25230
25185
|
DialogContentImpl,
|
|
25231
25186
|
{
|
|
25232
25187
|
...props,
|
|
@@ -25269,7 +25224,7 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25269
25224
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
25270
25225
|
useFocusGuards();
|
|
25271
25226
|
return /* @__PURE__ */ jsxs6(Fragment7, { children: [
|
|
25272
|
-
/* @__PURE__ */
|
|
25227
|
+
/* @__PURE__ */ jsx21(
|
|
25273
25228
|
FocusScope,
|
|
25274
25229
|
{
|
|
25275
25230
|
asChild: true,
|
|
@@ -25277,7 +25232,7 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25277
25232
|
trapped: trapFocus,
|
|
25278
25233
|
onMountAutoFocus: onOpenAutoFocus,
|
|
25279
25234
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
25280
|
-
children: /* @__PURE__ */
|
|
25235
|
+
children: /* @__PURE__ */ jsx21(
|
|
25281
25236
|
DismissableLayer,
|
|
25282
25237
|
{
|
|
25283
25238
|
role: "dialog",
|
|
@@ -25293,8 +25248,8 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25293
25248
|
}
|
|
25294
25249
|
),
|
|
25295
25250
|
/* @__PURE__ */ jsxs6(Fragment7, { children: [
|
|
25296
|
-
/* @__PURE__ */
|
|
25297
|
-
/* @__PURE__ */
|
|
25251
|
+
/* @__PURE__ */ jsx21(TitleWarning, { titleId: context.titleId }),
|
|
25252
|
+
/* @__PURE__ */ jsx21(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
25298
25253
|
] })
|
|
25299
25254
|
] });
|
|
25300
25255
|
}
|
|
@@ -25304,7 +25259,7 @@ var DialogTitle = React32.forwardRef(
|
|
|
25304
25259
|
(props, forwardedRef) => {
|
|
25305
25260
|
const { __scopeDialog, ...titleProps } = props;
|
|
25306
25261
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
25307
|
-
return /* @__PURE__ */
|
|
25262
|
+
return /* @__PURE__ */ jsx21(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
25308
25263
|
}
|
|
25309
25264
|
);
|
|
25310
25265
|
DialogTitle.displayName = TITLE_NAME;
|
|
@@ -25313,7 +25268,7 @@ var DialogDescription = React32.forwardRef(
|
|
|
25313
25268
|
(props, forwardedRef) => {
|
|
25314
25269
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
25315
25270
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
25316
|
-
return /* @__PURE__ */
|
|
25271
|
+
return /* @__PURE__ */ jsx21(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
25317
25272
|
}
|
|
25318
25273
|
);
|
|
25319
25274
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
@@ -25322,7 +25277,7 @@ var DialogClose = React32.forwardRef(
|
|
|
25322
25277
|
(props, forwardedRef) => {
|
|
25323
25278
|
const { __scopeDialog, ...closeProps } = props;
|
|
25324
25279
|
const context = useDialogContext(CLOSE_NAME2, __scopeDialog);
|
|
25325
|
-
return /* @__PURE__ */
|
|
25280
|
+
return /* @__PURE__ */ jsx21(
|
|
25326
25281
|
Primitive.button,
|
|
25327
25282
|
{
|
|
25328
25283
|
type: "button",
|
|
@@ -26571,18 +26526,21 @@ var cn2 = /* @__PURE__ */ wrapClsx(instance.mergeString, instance);
|
|
|
26571
26526
|
var twMerge2 = instance.merge;
|
|
26572
26527
|
|
|
26573
26528
|
// ../ui/src/components/dialog.tsx
|
|
26574
|
-
import { jsx as
|
|
26529
|
+
import { jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
26575
26530
|
function Dialog2({
|
|
26576
26531
|
...props
|
|
26577
26532
|
}) {
|
|
26578
|
-
return /* @__PURE__ */
|
|
26533
|
+
return /* @__PURE__ */ jsx22(dist_exports7.Root, { "data-slot": "dialog", ...props });
|
|
26579
26534
|
}
|
|
26580
26535
|
function DialogClose2({
|
|
26581
26536
|
...props
|
|
26582
26537
|
}) {
|
|
26583
|
-
return /* @__PURE__ */
|
|
26538
|
+
return /* @__PURE__ */ jsx22(dist_exports7.Close, { "data-slot": "dialog-close", ...props });
|
|
26584
26539
|
}
|
|
26585
26540
|
|
|
26541
|
+
// ../ui/src/composites/dialog.tsx
|
|
26542
|
+
import { forwardRef as forwardRef17 } from "react";
|
|
26543
|
+
|
|
26586
26544
|
// ../ui/src/lib/shadow-focus.ts
|
|
26587
26545
|
var TABBABLE = [
|
|
26588
26546
|
"a[href]",
|
|
@@ -26617,14 +26575,12 @@ function loopTabInShadowRoot(event) {
|
|
|
26617
26575
|
}
|
|
26618
26576
|
|
|
26619
26577
|
// ../ui/src/composites/dialog.tsx
|
|
26620
|
-
import { jsx as
|
|
26621
|
-
|
|
26622
|
-
|
|
26623
|
-
...props
|
|
26624
|
-
}) {
|
|
26625
|
-
return /* @__PURE__ */ jsx24(
|
|
26578
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26579
|
+
var DialogOverlay2 = forwardRef17(function DialogOverlay3({ className, ...props }, ref) {
|
|
26580
|
+
return /* @__PURE__ */ jsx23(
|
|
26626
26581
|
dist_exports7.Overlay,
|
|
26627
26582
|
{
|
|
26583
|
+
ref,
|
|
26628
26584
|
"data-slot": "dialog-overlay",
|
|
26629
26585
|
className: cn2(
|
|
26630
26586
|
"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 +26589,7 @@ function DialogOverlay2({
|
|
|
26633
26589
|
...props
|
|
26634
26590
|
}
|
|
26635
26591
|
);
|
|
26636
|
-
}
|
|
26592
|
+
});
|
|
26637
26593
|
function DialogContent2({
|
|
26638
26594
|
className,
|
|
26639
26595
|
children,
|
|
@@ -26644,7 +26600,7 @@ function DialogContent2({
|
|
|
26644
26600
|
}) {
|
|
26645
26601
|
const overlayRoot = useOverlayRoot();
|
|
26646
26602
|
return /* @__PURE__ */ jsxs8(dist_exports7.Portal, { "data-slot": "dialog-portal", container: overlayRoot, children: [
|
|
26647
|
-
/* @__PURE__ */
|
|
26603
|
+
/* @__PURE__ */ jsx23(DialogOverlay2, { className: overlayClassName }),
|
|
26648
26604
|
/* @__PURE__ */ jsxs8(
|
|
26649
26605
|
dist_exports7.Content,
|
|
26650
26606
|
{
|
|
@@ -26666,8 +26622,8 @@ function DialogContent2({
|
|
|
26666
26622
|
"data-slot": "dialog-close",
|
|
26667
26623
|
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
26624
|
children: [
|
|
26669
|
-
/* @__PURE__ */
|
|
26670
|
-
/* @__PURE__ */
|
|
26625
|
+
/* @__PURE__ */ jsx23(X, { size: 16 }),
|
|
26626
|
+
/* @__PURE__ */ jsx23("span", { className: "sr-only", children: "\u5173\u95ED" })
|
|
26671
26627
|
]
|
|
26672
26628
|
}
|
|
26673
26629
|
)
|
|
@@ -26677,7 +26633,7 @@ function DialogContent2({
|
|
|
26677
26633
|
] });
|
|
26678
26634
|
}
|
|
26679
26635
|
function DialogTitle2({ className, ...props }) {
|
|
26680
|
-
return /* @__PURE__ */
|
|
26636
|
+
return /* @__PURE__ */ jsx23(
|
|
26681
26637
|
dist_exports7.Title,
|
|
26682
26638
|
{
|
|
26683
26639
|
"data-slot": "dialog-title",
|
|
@@ -26686,6 +26642,19 @@ function DialogTitle2({ className, ...props }) {
|
|
|
26686
26642
|
}
|
|
26687
26643
|
);
|
|
26688
26644
|
}
|
|
26645
|
+
function DialogDescription2({
|
|
26646
|
+
className,
|
|
26647
|
+
...props
|
|
26648
|
+
}) {
|
|
26649
|
+
return /* @__PURE__ */ jsx23(
|
|
26650
|
+
dist_exports7.Description,
|
|
26651
|
+
{
|
|
26652
|
+
"data-slot": "dialog-description",
|
|
26653
|
+
className: cn2("text-sm text-[hsl(var(--muted-foreground))]", className),
|
|
26654
|
+
...props
|
|
26655
|
+
}
|
|
26656
|
+
);
|
|
26657
|
+
}
|
|
26689
26658
|
|
|
26690
26659
|
// src/chat/chat-theme.tsx
|
|
26691
26660
|
var NEUTRAL = {
|
|
@@ -26750,6 +26719,7 @@ export {
|
|
|
26750
26719
|
CircleAlert,
|
|
26751
26720
|
CircleCheck,
|
|
26752
26721
|
CirclePause,
|
|
26722
|
+
CircleSlash,
|
|
26753
26723
|
CircleX,
|
|
26754
26724
|
Copy,
|
|
26755
26725
|
Download,
|
|
@@ -26790,7 +26760,6 @@ export {
|
|
|
26790
26760
|
Plug,
|
|
26791
26761
|
Plus,
|
|
26792
26762
|
RefreshCcw,
|
|
26793
|
-
RefreshCw,
|
|
26794
26763
|
Rocket,
|
|
26795
26764
|
RotateCcw,
|
|
26796
26765
|
Scissors,
|
|
@@ -26803,32 +26772,11 @@ export {
|
|
|
26803
26772
|
Terminal,
|
|
26804
26773
|
Trash2,
|
|
26805
26774
|
TriangleAlert,
|
|
26806
|
-
Workflow,
|
|
26807
26775
|
Wrench,
|
|
26808
26776
|
X,
|
|
26777
|
+
Zap,
|
|
26809
26778
|
cn,
|
|
26810
26779
|
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
26780
|
getToolDescription,
|
|
26833
26781
|
formatToolFileName,
|
|
26834
26782
|
formatToolName,
|
|
@@ -26852,6 +26800,19 @@ export {
|
|
|
26852
26800
|
usePlanRevealRevision,
|
|
26853
26801
|
CurrentChatSessionProvider,
|
|
26854
26802
|
useCurrentChatSessionId,
|
|
26803
|
+
ChatEnvironmentProvider,
|
|
26804
|
+
useChatEnvironment,
|
|
26805
|
+
useHighlightedCode,
|
|
26806
|
+
useChatSessionDetail,
|
|
26807
|
+
useHideTodo,
|
|
26808
|
+
useChatRenderMode,
|
|
26809
|
+
notifyChat,
|
|
26810
|
+
useComposerBridge,
|
|
26811
|
+
useChatVirtualizer,
|
|
26812
|
+
getInputHistoryGeneration,
|
|
26813
|
+
onInputCachesReset,
|
|
26814
|
+
pluginRefsForSend,
|
|
26815
|
+
getPluginSuggestionItems,
|
|
26855
26816
|
sendToSession,
|
|
26856
26817
|
useControllableState,
|
|
26857
26818
|
dist_exports6 as dist_exports,
|
|
@@ -26869,6 +26830,7 @@ export {
|
|
|
26869
26830
|
DialogClose2 as DialogClose,
|
|
26870
26831
|
DialogContent2 as DialogContent,
|
|
26871
26832
|
DialogTitle2 as DialogTitle,
|
|
26833
|
+
DialogDescription2 as DialogDescription,
|
|
26872
26834
|
chatTone,
|
|
26873
26835
|
useEffectEvent2 as useEffectEvent,
|
|
26874
26836
|
SessionPluginConfigForm,
|
|
@@ -26916,6 +26878,7 @@ lucide-react/dist/esm/icons/circle-alert.js:
|
|
|
26916
26878
|
lucide-react/dist/esm/icons/circle-check.js:
|
|
26917
26879
|
lucide-react/dist/esm/icons/circle-dot.js:
|
|
26918
26880
|
lucide-react/dist/esm/icons/circle-pause.js:
|
|
26881
|
+
lucide-react/dist/esm/icons/circle-slash.js:
|
|
26919
26882
|
lucide-react/dist/esm/icons/circle-x.js:
|
|
26920
26883
|
lucide-react/dist/esm/icons/circle.js:
|
|
26921
26884
|
lucide-react/dist/esm/icons/copy.js:
|
|
@@ -26959,7 +26922,6 @@ lucide-react/dist/esm/icons/plug.js:
|
|
|
26959
26922
|
lucide-react/dist/esm/icons/plus.js:
|
|
26960
26923
|
lucide-react/dist/esm/icons/puzzle.js:
|
|
26961
26924
|
lucide-react/dist/esm/icons/refresh-ccw.js:
|
|
26962
|
-
lucide-react/dist/esm/icons/refresh-cw.js:
|
|
26963
26925
|
lucide-react/dist/esm/icons/rocket.js:
|
|
26964
26926
|
lucide-react/dist/esm/icons/rotate-ccw.js:
|
|
26965
26927
|
lucide-react/dist/esm/icons/scissors.js:
|
|
@@ -26972,9 +26934,9 @@ lucide-react/dist/esm/icons/square.js:
|
|
|
26972
26934
|
lucide-react/dist/esm/icons/terminal.js:
|
|
26973
26935
|
lucide-react/dist/esm/icons/trash-2.js:
|
|
26974
26936
|
lucide-react/dist/esm/icons/triangle-alert.js:
|
|
26975
|
-
lucide-react/dist/esm/icons/workflow.js:
|
|
26976
26937
|
lucide-react/dist/esm/icons/wrench.js:
|
|
26977
26938
|
lucide-react/dist/esm/icons/x.js:
|
|
26939
|
+
lucide-react/dist/esm/icons/zap.js:
|
|
26978
26940
|
lucide-react/dist/esm/lucide-react.js:
|
|
26979
26941
|
(**
|
|
26980
26942
|
* @license lucide-react v0.468.0 - ISC
|
|
@@ -26983,4 +26945,4 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
26983
26945
|
* See the LICENSE file in the root directory of this source tree.
|
|
26984
26946
|
*)
|
|
26985
26947
|
*/
|
|
26986
|
-
//# sourceMappingURL=chunk-
|
|
26948
|
+
//# sourceMappingURL=chunk-C4FUFBG4.js.map
|