@blade-hq/agent-react 2612.0.0-beta.5 → 2612.0.0-beta.7
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 +8 -0
- package/dist/chat/ChatPanel.d.ts +1 -3
- package/dist/chat/LightComposer.d.ts +1 -1
- package/dist/chat/LiteMessageList.d.ts +1 -1
- 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/runtime/actions.d.ts +1 -1
- 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-T5WGKZN4.js → chunk-67GHJQK5.js} +724 -575
- package/dist/chunk-67GHJQK5.js.map +1 -0
- package/dist/{chunk-7IPINZHT.js → chunk-DPDXGYGM.js} +2 -2
- package/dist/{chunk-XULCQP3Q.js → chunk-MERN5XEM.js} +636 -704
- package/dist/chunk-MERN5XEM.js.map +1 -0
- package/dist/components/ChatInput.d.ts +3 -1
- package/dist/components/plugin-connector.d.ts +1 -0
- package/dist/embed/entry.d.ts +1 -0
- package/dist/host.d.ts +0 -4
- package/dist/index.js +2 -2
- package/dist/internal.js +3 -3
- package/dist/internal.js.map +1 -1
- package/dist/lib/agent-computer-command.d.ts +1 -3
- package/dist/rich-input/ChatInput.d.ts +1 -1
- package/dist/rich-input/FileCompletionMenu.d.ts +5 -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 +0 -1
- package/dist/rich-input/index.d.ts +4 -2
- package/dist/rich-input/lib/composer-content.d.ts +7 -22
- 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/services.d.ts +2 -3
- package/dist/rich-input/use-input-history.d.ts +8 -10
- package/dist/rich-input/use-reference-candidates.d.ts +8 -0
- package/dist/rich-input.js +491 -472
- 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 +0 -1
- 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-T5WGKZN4.js.map +0 -1
- package/dist/chunk-XULCQP3Q.js.map +0 -1
- package/dist/rich-input/extensions/kb-mention.d.ts +0 -18
- package/dist/rich-input/lib/kb-suggestions.d.ts +0 -37
- /package/dist/{chunk-7IPINZHT.js.map → chunk-DPDXGYGM.js.map} +0 -0
|
@@ -2303,14 +2303,6 @@ var RefreshCcw = createLucideIcon("RefreshCcw", [
|
|
|
2303
2303
|
["path", { d: "M16 16h5v5", key: "ccwih5" }]
|
|
2304
2304
|
]);
|
|
2305
2305
|
|
|
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
2306
|
// ../../node_modules/.pnpm/lucide-react@0.468.0_react@19.2.4/node_modules/lucide-react/dist/esm/icons/rocket.js
|
|
2315
2307
|
var Rocket = createLucideIcon("Rocket", [
|
|
2316
2308
|
[
|
|
@@ -2454,7 +2446,7 @@ var X = createLucideIcon("X", [
|
|
|
2454
2446
|
]);
|
|
2455
2447
|
|
|
2456
2448
|
// src/components/PlanUpdateBlock.tsx
|
|
2457
|
-
import { useEffect
|
|
2449
|
+
import { useEffect, useRef, useState } from "react";
|
|
2458
2450
|
|
|
2459
2451
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
2460
2452
|
function r(e2) {
|
|
@@ -5674,382 +5666,6 @@ async function copyToClipboard(text) {
|
|
|
5674
5666
|
}
|
|
5675
5667
|
}
|
|
5676
5668
|
|
|
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
5669
|
// src/chat/display-utils.ts
|
|
6054
5670
|
var TOOL_NAME_ALIASES = {
|
|
6055
5671
|
agent: "Agent",
|
|
@@ -6064,7 +5680,6 @@ var TOOL_NAME_ALIASES = {
|
|
|
6064
5680
|
finish_task: "FinishTask",
|
|
6065
5681
|
glob: "Glob",
|
|
6066
5682
|
grep: "Grep",
|
|
6067
|
-
kb_search: "KbSearch",
|
|
6068
5683
|
ls: "Ls",
|
|
6069
5684
|
multi_edit: "MultiEdit",
|
|
6070
5685
|
read: "Read",
|
|
@@ -6084,7 +5699,6 @@ var TOOL_DISPLAY_LABELS = {
|
|
|
6084
5699
|
Ls: "\u5217\u51FA\u76EE\u5F55",
|
|
6085
5700
|
Glob: "\u5339\u914D\u6587\u4EF6",
|
|
6086
5701
|
Grep: "\u641C\u7D22\u6587\u672C",
|
|
6087
|
-
KbSearch: "\u68C0\u7D22\u77E5\u8BC6\u5E93",
|
|
6088
5702
|
WebSearch: "\u641C\u7D22\u7F51\u9875",
|
|
6089
5703
|
WebFetch: "\u6574\u7406\u7F51\u9875\u5185\u5BB9",
|
|
6090
5704
|
Agent: "\u6D3E\u751F\u5B50\u667A\u80FD\u4F53",
|
|
@@ -6122,7 +5736,7 @@ function safeParseJson(value) {
|
|
|
6122
5736
|
return null;
|
|
6123
5737
|
}
|
|
6124
5738
|
}
|
|
6125
|
-
function
|
|
5739
|
+
function isPlainObject(value) {
|
|
6126
5740
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
6127
5741
|
}
|
|
6128
5742
|
function getStringArgValue(args, key) {
|
|
@@ -6134,7 +5748,7 @@ function getCommandDescription(args) {
|
|
|
6134
5748
|
}
|
|
6135
5749
|
function getToolDescription(toolCall) {
|
|
6136
5750
|
const args = safeParseJson(toolCall.arguments);
|
|
6137
|
-
if (!
|
|
5751
|
+
if (!isPlainObject(args)) return null;
|
|
6138
5752
|
return getCommandDescription(args) || null;
|
|
6139
5753
|
}
|
|
6140
5754
|
function formatFileName(filePath) {
|
|
@@ -6192,12 +5806,6 @@ function getToolDisplayLabel(toolCall) {
|
|
|
6192
5806
|
const title = args && typeof args.title === "string" ? args.title : "";
|
|
6193
5807
|
return title ? `${baseLabel}\uFF1A${title}` : baseLabel;
|
|
6194
5808
|
}
|
|
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
5809
|
return description || baseLabel;
|
|
6202
5810
|
}
|
|
6203
5811
|
function getToolTone(status) {
|
|
@@ -6234,7 +5842,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6234
5842
|
for (const item of value) collect(item, depth + 1, allowPlainString);
|
|
6235
5843
|
return;
|
|
6236
5844
|
}
|
|
6237
|
-
if (!
|
|
5845
|
+
if (!isPlainObject(value)) return;
|
|
6238
5846
|
for (const key of PRIORITY_FILE_KEYS) collect(value[key], depth + 1, true);
|
|
6239
5847
|
for (const [key, nested] of Object.entries(value)) {
|
|
6240
5848
|
if (!PRIORITY_FILE_KEYS.includes(key) && nested && typeof nested === "object") collect(nested, depth + 1, false);
|
|
@@ -6249,7 +5857,7 @@ function extractToolFilePaths(toolCall) {
|
|
|
6249
5857
|
}
|
|
6250
5858
|
} else if (Array.isArray(value)) {
|
|
6251
5859
|
for (const item of value) collectPatchHeaders(item);
|
|
6252
|
-
} else if (
|
|
5860
|
+
} else if (isPlainObject(value)) {
|
|
6253
5861
|
for (const [key, nested] of Object.entries(value)) {
|
|
6254
5862
|
if (key.toLowerCase().includes("patch") || key.toLowerCase().includes("diff")) collectPatchHeaders(nested);
|
|
6255
5863
|
}
|
|
@@ -6273,7 +5881,7 @@ function getToolOutputTag(toolCall) {
|
|
|
6273
5881
|
}
|
|
6274
5882
|
|
|
6275
5883
|
// src/components/PlanUpdateBlock.tsx
|
|
6276
|
-
import { jsx as
|
|
5884
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
6277
5885
|
var PLAN_STEP_STATUSES = /* @__PURE__ */ new Set(["pending", "in_progress", "completed"]);
|
|
6278
5886
|
var PLAN_AUTO_COLLAPSE_MS = 5e3;
|
|
6279
5887
|
function isPlanUpdateTool(toolCall) {
|
|
@@ -6328,12 +5936,12 @@ function PlanStepIcon({
|
|
|
6328
5936
|
running = false
|
|
6329
5937
|
}) {
|
|
6330
5938
|
if (status === "completed") {
|
|
6331
|
-
return /* @__PURE__ */
|
|
5939
|
+
return /* @__PURE__ */ jsx2(Check, { size: size4, strokeWidth: 2, className: "shrink-0 text-emerald-500" });
|
|
6332
5940
|
}
|
|
6333
5941
|
if (status === "in_progress") {
|
|
6334
|
-
return running ? /* @__PURE__ */
|
|
5942
|
+
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
5943
|
}
|
|
6336
|
-
return /* @__PURE__ */
|
|
5944
|
+
return /* @__PURE__ */ jsx2(Circle, { size: size4, className: "shrink-0 text-[hsl(var(--muted-foreground))]/60" });
|
|
6337
5945
|
}
|
|
6338
5946
|
function PlanUpdateBlock({
|
|
6339
5947
|
toolCall,
|
|
@@ -6343,10 +5951,10 @@ function PlanUpdateBlock({
|
|
|
6343
5951
|
}) {
|
|
6344
5952
|
const updateKey = `${toolCall.id}:${toolCall.arguments}`;
|
|
6345
5953
|
const revealKey = autoReveal ? updateKey : null;
|
|
6346
|
-
const [collapsed, setCollapsed] =
|
|
6347
|
-
const collapseTimerRef =
|
|
5954
|
+
const [collapsed, setCollapsed] = useState(!autoReveal);
|
|
5955
|
+
const collapseTimerRef = useRef(null);
|
|
6348
5956
|
const data = parsePlanUpdate(toolCall.arguments);
|
|
6349
|
-
|
|
5957
|
+
useEffect(() => {
|
|
6350
5958
|
if (!revealKey) return;
|
|
6351
5959
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6352
5960
|
setCollapsed(false);
|
|
@@ -6355,7 +5963,7 @@ function PlanUpdateBlock({
|
|
|
6355
5963
|
collapseTimerRef.current = null;
|
|
6356
5964
|
}, PLAN_AUTO_COLLAPSE_MS);
|
|
6357
5965
|
}, [revealKey]);
|
|
6358
|
-
|
|
5966
|
+
useEffect(
|
|
6359
5967
|
() => () => {
|
|
6360
5968
|
if (collapseTimerRef.current) clearTimeout(collapseTimerRef.current);
|
|
6361
5969
|
},
|
|
@@ -6384,20 +5992,20 @@ function PlanUpdateBlock({
|
|
|
6384
5992
|
),
|
|
6385
5993
|
children: [
|
|
6386
5994
|
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__ */
|
|
5995
|
+
/* @__PURE__ */ jsx2(PlanStepIcon, { status: currentStep.status, size: 14, running }),
|
|
5996
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: currentStep.step }),
|
|
5997
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-[11px] text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6390
5998
|
] }) : /* @__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__ */
|
|
5999
|
+
/* @__PURE__ */ jsx2(ListChecks, { size: 14, className: "shrink-0", "aria-hidden": "true" }),
|
|
6000
|
+
/* @__PURE__ */ jsx2("span", { className: "truncate", children: "\u4EFB\u52A1\u8FDB\u5EA6" }),
|
|
6001
|
+
pausedAtCurrentStep ? /* @__PURE__ */ jsx2("span", { className: "shrink-0 text-amber-500", children: "\u5DF2\u6682\u505C" }) : null
|
|
6394
6002
|
] }),
|
|
6395
6003
|
/* @__PURE__ */ jsxs("span", { className: "shrink-0 text-[11px] tabular-nums text-[hsl(var(--muted-foreground))]", children: [
|
|
6396
6004
|
completed,
|
|
6397
6005
|
"/",
|
|
6398
6006
|
data.plan.length
|
|
6399
6007
|
] }),
|
|
6400
|
-
/* @__PURE__ */
|
|
6008
|
+
/* @__PURE__ */ jsx2(
|
|
6401
6009
|
ChevronDown,
|
|
6402
6010
|
{
|
|
6403
6011
|
size: 14,
|
|
@@ -6410,7 +6018,7 @@ function PlanUpdateBlock({
|
|
|
6410
6018
|
]
|
|
6411
6019
|
}
|
|
6412
6020
|
),
|
|
6413
|
-
/* @__PURE__ */
|
|
6021
|
+
/* @__PURE__ */ jsx2(
|
|
6414
6022
|
"div",
|
|
6415
6023
|
{
|
|
6416
6024
|
"aria-hidden": collapsed,
|
|
@@ -6418,9 +6026,9 @@ function PlanUpdateBlock({
|
|
|
6418
6026
|
"grid transition-[grid-template-rows,opacity] duration-300 ease-out motion-reduce:transition-none",
|
|
6419
6027
|
collapsed ? "grid-rows-[0fr] opacity-0" : "grid-rows-[1fr] opacity-100"
|
|
6420
6028
|
),
|
|
6421
|
-
children: /* @__PURE__ */
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6029
|
+
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: [
|
|
6030
|
+
/* @__PURE__ */ jsx2("span", { className: "mt-[3px] flex shrink-0", children: /* @__PURE__ */ jsx2(PlanStepIcon, { status: item.status, size: 14, running }) }),
|
|
6031
|
+
/* @__PURE__ */ jsx2(
|
|
6424
6032
|
"span",
|
|
6425
6033
|
{
|
|
6426
6034
|
className: cn(
|
|
@@ -6436,6 +6044,58 @@ function PlanUpdateBlock({
|
|
|
6436
6044
|
] });
|
|
6437
6045
|
}
|
|
6438
6046
|
|
|
6047
|
+
// src/chat/runtime/input-history-storage.ts
|
|
6048
|
+
var generation = 0;
|
|
6049
|
+
function getInputHistoryGeneration() {
|
|
6050
|
+
return generation;
|
|
6051
|
+
}
|
|
6052
|
+
|
|
6053
|
+
// src/chat/runtime/input-cache-reset.ts
|
|
6054
|
+
var resetters = /* @__PURE__ */ new WeakMap();
|
|
6055
|
+
function onInputCachesReset(client, reset) {
|
|
6056
|
+
let set = resetters.get(client);
|
|
6057
|
+
if (!set) {
|
|
6058
|
+
set = /* @__PURE__ */ new Set();
|
|
6059
|
+
resetters.set(client, set);
|
|
6060
|
+
}
|
|
6061
|
+
set.add(reset);
|
|
6062
|
+
return () => {
|
|
6063
|
+
set.delete(reset);
|
|
6064
|
+
};
|
|
6065
|
+
}
|
|
6066
|
+
|
|
6067
|
+
// src/rich-input/lib/plugin-suggestions.ts
|
|
6068
|
+
var accountPreparation = /* @__PURE__ */ new WeakMap();
|
|
6069
|
+
var registeredClients = /* @__PURE__ */ new WeakSet();
|
|
6070
|
+
function pluginRefsForSend(refs, turns = []) {
|
|
6071
|
+
const latest = [...turns].reverse().find((turn) => turn.role === "user");
|
|
6072
|
+
return refs.length || latest?.refs?.length ? refs : void 0;
|
|
6073
|
+
}
|
|
6074
|
+
function prepareAccount(client) {
|
|
6075
|
+
if (!registeredClients.has(client)) {
|
|
6076
|
+
registeredClients.add(client);
|
|
6077
|
+
onInputCachesReset(client, () => accountPreparation.delete(client));
|
|
6078
|
+
}
|
|
6079
|
+
const current = accountPreparation.get(client);
|
|
6080
|
+
if (current && current.token === client.token) return current.ready;
|
|
6081
|
+
const ready = client.plugins.catalog().catch((error) => {
|
|
6082
|
+
accountPreparation.delete(client);
|
|
6083
|
+
throw error;
|
|
6084
|
+
});
|
|
6085
|
+
accountPreparation.set(client, { token: client.token, ready });
|
|
6086
|
+
return ready;
|
|
6087
|
+
}
|
|
6088
|
+
async function getPluginSuggestionItems(client, session, query) {
|
|
6089
|
+
const path = session ? `/api/sessions/${encodeURIComponent(session)}/plugin-tools/mentions` : "/api/plugin-mentions/mentions";
|
|
6090
|
+
try {
|
|
6091
|
+
if (!session) await prepareAccount(client);
|
|
6092
|
+
const data = await client.json("POST", path, { arguments: { query, cursor: "" } });
|
|
6093
|
+
return [...data.items.map((item) => ({ ...item, kind: "plugin", name: item.label })), ...data.errors.map((message) => ({ kind: "pluginError", message }))];
|
|
6094
|
+
} catch {
|
|
6095
|
+
return [{ kind: "pluginError", message: "\u63D2\u4EF6\u6761\u76EE\u6682\u65F6\u65E0\u6CD5\u52A0\u8F7D\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165 @ \u91CD\u8BD5" }];
|
|
6096
|
+
}
|
|
6097
|
+
}
|
|
6098
|
+
|
|
6439
6099
|
// ../../node_modules/.pnpm/@cfworker+json-schema@4.1.1/node_modules/@cfworker/json-schema/dist/esm/deep-compare-strict.js
|
|
6440
6100
|
function deepCompareStrict(a, b) {
|
|
6441
6101
|
const typeofa = typeof a;
|
|
@@ -7646,7 +7306,7 @@ function canExpand(schema, uiSchema = {}, formData) {
|
|
|
7646
7306
|
}
|
|
7647
7307
|
|
|
7648
7308
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/isPlainObject.js
|
|
7649
|
-
function
|
|
7309
|
+
function isPlainObject2(thing) {
|
|
7650
7310
|
if (typeof thing !== "object" || thing === null) {
|
|
7651
7311
|
return false;
|
|
7652
7312
|
}
|
|
@@ -11540,7 +11200,7 @@ var ErrorSchemaBuilder = class {
|
|
|
11540
11200
|
|
|
11541
11201
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/getChangedFields.js
|
|
11542
11202
|
function getChangedDescendants(a, b) {
|
|
11543
|
-
if (
|
|
11203
|
+
if (isPlainObject2(a) && isPlainObject2(b)) {
|
|
11544
11204
|
return getChangedFields(a, b, true);
|
|
11545
11205
|
}
|
|
11546
11206
|
if (Array.isArray(a) && Array.isArray(b) && a.length === b.length) {
|
|
@@ -11558,10 +11218,10 @@ function getChangedFields(a, b, deep = false) {
|
|
|
11558
11218
|
if (a === b) {
|
|
11559
11219
|
return [];
|
|
11560
11220
|
}
|
|
11561
|
-
if (!
|
|
11562
|
-
return
|
|
11221
|
+
if (!isPlainObject2(a)) {
|
|
11222
|
+
return isPlainObject2(b) ? Object.keys(b) : [];
|
|
11563
11223
|
}
|
|
11564
|
-
if (!
|
|
11224
|
+
if (!isPlainObject2(b)) {
|
|
11565
11225
|
return Object.keys(a);
|
|
11566
11226
|
}
|
|
11567
11227
|
const aKeys = Object.keys(a);
|
|
@@ -12152,7 +11812,7 @@ function errorsFrom(errorSchema, fieldPath) {
|
|
|
12152
11812
|
const errorList = Array.isArray(errors) ? errors.map((message) => ({ property, message, stack: `${property} ${message}` })) : [];
|
|
12153
11813
|
return Object.keys(errorSchema).reduce((currentList, key) => {
|
|
12154
11814
|
const childSchema = errorSchema[key];
|
|
12155
|
-
if (key !== ERRORS_KEY &&
|
|
11815
|
+
if (key !== ERRORS_KEY && isPlainObject2(childSchema)) {
|
|
12156
11816
|
return currentList.concat(errorsFrom(childSchema, [...fieldPath, key]));
|
|
12157
11817
|
}
|
|
12158
11818
|
return currentList;
|
|
@@ -12174,7 +11834,7 @@ function toFieldPathId(fieldPath, globalFormOptions, parentPath, isMultiValue) {
|
|
|
12174
11834
|
|
|
12175
11835
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useAltDateWidgetProps.js
|
|
12176
11836
|
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
12177
|
-
import { useCallback, useEffect as
|
|
11837
|
+
import { useCallback, useEffect as useEffect2, useMemo, useState as useState2 } from "react";
|
|
12178
11838
|
function readyForChange(state) {
|
|
12179
11839
|
return Object.values(state).every((value) => value !== -1);
|
|
12180
11840
|
}
|
|
@@ -12187,8 +11847,8 @@ function DateElement(props) {
|
|
|
12187
11847
|
}
|
|
12188
11848
|
function useAltDateWidgetProps(props) {
|
|
12189
11849
|
const { time: time2 = false, disabled = false, readonly = false, options, onChange, value } = props;
|
|
12190
|
-
const [state, setState] =
|
|
12191
|
-
|
|
11850
|
+
const [state, setState] = useState2(parseDateString(value, time2));
|
|
11851
|
+
useEffect2(() => {
|
|
12192
11852
|
setState(parseDateString(value, time2));
|
|
12193
11853
|
}, [time2, value]);
|
|
12194
11854
|
const handleChange = useCallback((property, newValue) => {
|
|
@@ -12217,14 +11877,14 @@ function useAltDateWidgetProps(props) {
|
|
|
12217
11877
|
const nextState = parseDateString((/* @__PURE__ */ new Date()).toJSON(), time2);
|
|
12218
11878
|
onChange(toDateString(nextState, time2));
|
|
12219
11879
|
}, [disabled, readonly, time2, onChange]);
|
|
12220
|
-
const elements =
|
|
11880
|
+
const elements = useMemo(() => getDateElementProps(state, time2, options.yearsRange, options.format), [state, time2, options.yearsRange, options.format]);
|
|
12221
11881
|
return { elements, handleChange, handleClear, handleSetNow };
|
|
12222
11882
|
}
|
|
12223
11883
|
|
|
12224
11884
|
// ../../node_modules/.pnpm/@rjsf+utils@6.10.0_react@19.2.4/node_modules/@rjsf/utils/lib/useDeepCompareMemo.js
|
|
12225
|
-
import { useRef as
|
|
11885
|
+
import { useRef as useRef2 } from "react";
|
|
12226
11886
|
function useDeepCompareMemo(newValue) {
|
|
12227
|
-
const valueRef =
|
|
11887
|
+
const valueRef = useRef2(newValue);
|
|
12228
11888
|
if (!deepEquals_default(newValue, valueRef.current)) {
|
|
12229
11889
|
valueRef.current = newValue;
|
|
12230
11890
|
}
|
|
@@ -12232,7 +11892,7 @@ function useDeepCompareMemo(newValue) {
|
|
|
12232
11892
|
}
|
|
12233
11893
|
|
|
12234
11894
|
// ../../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
|
|
11895
|
+
import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
|
|
12236
11896
|
function addNameToDataURL(dataURL, name) {
|
|
12237
11897
|
return dataURL.replace(";base64", `;name=${encodeURIComponent(name)};base64`);
|
|
12238
11898
|
}
|
|
@@ -12286,13 +11946,13 @@ function extractFileInfo(dataURLs) {
|
|
|
12286
11946
|
}, []);
|
|
12287
11947
|
}
|
|
12288
11948
|
function useFileWidgetProps(value, onChange, multiple = false) {
|
|
12289
|
-
const values =
|
|
11949
|
+
const values = useMemo2(() => {
|
|
12290
11950
|
if (multiple && value) {
|
|
12291
11951
|
return Array.isArray(value) ? value : [value];
|
|
12292
11952
|
}
|
|
12293
11953
|
return [];
|
|
12294
11954
|
}, [value, multiple]);
|
|
12295
|
-
const filesInfo =
|
|
11955
|
+
const filesInfo = useMemo2(() => Array.isArray(value) ? extractFileInfo(value) : extractFileInfo([value || ""]), [value]);
|
|
12296
11956
|
const handleChange = useCallback2(async (files) => {
|
|
12297
11957
|
const filesInfoEvent = await processFiles(files);
|
|
12298
11958
|
const newValue = filesInfoEvent.map((fileInfo) => fileInfo.dataURL || null);
|
|
@@ -12418,7 +12078,7 @@ var TranslatableString;
|
|
|
12418
12078
|
|
|
12419
12079
|
// ../../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
12080
|
import { jsx as _jsx4 } from "react/jsx-runtime";
|
|
12421
|
-
import { memo, useCallback as useCallback3, useMemo as
|
|
12081
|
+
import { memo, useCallback as useCallback3, useMemo as useMemo3, useRef as useRef3, useState as useState3 } from "react";
|
|
12422
12082
|
var rowIdCounter = 0;
|
|
12423
12083
|
function generateRowId() {
|
|
12424
12084
|
rowIdCounter += 1;
|
|
@@ -12512,8 +12172,8 @@ function ArrayAsFiles(props) {
|
|
|
12512
12172
|
function ArrayFieldItemInner(props) {
|
|
12513
12173
|
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
12174
|
const { schemaUtils, fields: { ArraySchemaField, SchemaField: SchemaField2 }, globalUiOptions, globalFormOptions } = registry;
|
|
12515
|
-
const itemSchema =
|
|
12516
|
-
const fieldPathId =
|
|
12175
|
+
const itemSchema = useMemo3(() => schemaUtils.retrieveSchema(rawItemSchema, itemData), [schemaUtils, rawItemSchema, itemData]);
|
|
12176
|
+
const fieldPathId = useMemo3(() => toFieldPathId(index2, globalFormOptions, parentFieldPathId), [index2, globalFormOptions, parentFieldPathId]);
|
|
12517
12177
|
const ItemSchemaField = ArraySchemaField || SchemaField2;
|
|
12518
12178
|
const ArrayFieldItemTemplate2 = getTemplate("ArrayFieldItemTemplate", registry, uiOptions);
|
|
12519
12179
|
const displayLabel = schemaUtils.getDisplayLabel(itemSchema, itemUiSchema, globalUiOptions);
|
|
@@ -12587,13 +12247,13 @@ function NormalArray(props) {
|
|
|
12587
12247
|
const fieldTitle = schema.title || title || name;
|
|
12588
12248
|
const { schemaUtils, fields: fields2, formContext, globalUiOptions } = registry;
|
|
12589
12249
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
12590
|
-
const uiOptions =
|
|
12591
|
-
const schemaItems =
|
|
12592
|
-
const itemsSchema =
|
|
12593
|
-
const formData =
|
|
12250
|
+
const uiOptions = useMemo3(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
12251
|
+
const schemaItems = useMemo3(() => isObject(schema.items) ? schema.items : {}, [schema.items]);
|
|
12252
|
+
const itemsSchema = useMemo3(() => schemaUtils.retrieveSchema(schemaItems), [schemaUtils, schemaItems]);
|
|
12253
|
+
const formData = useMemo3(() => keyedToPlainFormData(keyedFormData), [keyedFormData]);
|
|
12594
12254
|
const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
|
|
12595
12255
|
const hasFormData = isFormDataAvailable(formDataFromProps);
|
|
12596
|
-
const canAdd =
|
|
12256
|
+
const canAdd = useMemo3(() => canAddItem(registry, schema, formData, uiSchema) && (!renderOptionalField || hasFormData), [registry, schema, formData, uiSchema, renderOptionalField, hasFormData]);
|
|
12597
12257
|
const actualFormData = hasFormData ? keyedFormData : [];
|
|
12598
12258
|
const extraClass = renderOptionalField ? " rjsf-optional-array-field" : "";
|
|
12599
12259
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
@@ -12660,11 +12320,11 @@ function FixedArray(props) {
|
|
|
12660
12320
|
let { formData: items = [] } = props;
|
|
12661
12321
|
const fieldTitle = schema.title || title || name;
|
|
12662
12322
|
const { fields: fields2, formContext, globalUiOptions } = registry;
|
|
12663
|
-
const uiOptions =
|
|
12323
|
+
const uiOptions = useMemo3(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
12664
12324
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
12665
12325
|
const renderOptionalField = shouldRenderOptionalField(registry, schema, required, uiSchema);
|
|
12666
12326
|
const hasFormData = isFormDataAvailable(formData);
|
|
12667
|
-
const schemaItems =
|
|
12327
|
+
const schemaItems = useMemo3(() => Array.isArray(schema.items) ? schema.items : [], [schema.items]);
|
|
12668
12328
|
const hasAdditionalItems = isObject(schema.additionalItems);
|
|
12669
12329
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
12670
12330
|
if (items.length < schemaItems.length) {
|
|
@@ -12743,8 +12403,8 @@ function FixedArray(props) {
|
|
|
12743
12403
|
return _jsx4(Template, { ...arrayProps });
|
|
12744
12404
|
}
|
|
12745
12405
|
function useKeyedFormData(formData = []) {
|
|
12746
|
-
const newHash =
|
|
12747
|
-
const [state, setState] =
|
|
12406
|
+
const newHash = useMemo3(() => hashObject(formData), [formData]);
|
|
12407
|
+
const [state, setState] = useState3(() => ({
|
|
12748
12408
|
formDataHash: newHash,
|
|
12749
12409
|
keyedFormData: generateKeyedFormData(formData)
|
|
12750
12410
|
}));
|
|
@@ -12771,9 +12431,9 @@ function ArrayField(props) {
|
|
|
12771
12431
|
const { schema, uiSchema, errorSchema, fieldPathId, registry, formData, onChange } = props;
|
|
12772
12432
|
const { globalFormOptions, schemaUtils, translateString } = registry;
|
|
12773
12433
|
const { keyedFormData, updateKeyedFormData } = useKeyedFormData(formData);
|
|
12774
|
-
const keyedFormDataRef =
|
|
12434
|
+
const keyedFormDataRef = useRef3(keyedFormData);
|
|
12775
12435
|
keyedFormDataRef.current = keyedFormData;
|
|
12776
|
-
const errorSchemaRef =
|
|
12436
|
+
const errorSchemaRef = useRef3(errorSchema);
|
|
12777
12437
|
errorSchemaRef.current = errorSchema;
|
|
12778
12438
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
12779
12439
|
const handleAddItem = useCallback3((event, index2) => {
|
|
@@ -12991,9 +12651,9 @@ var BooleanField_default = BooleanField;
|
|
|
12991
12651
|
|
|
12992
12652
|
// ../../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
12653
|
import { jsx as _jsx6 } from "react/jsx-runtime";
|
|
12994
|
-
import { useState as
|
|
12654
|
+
import { useState as useState4 } from "react";
|
|
12995
12655
|
function CyclicSchemaField(props) {
|
|
12996
|
-
const [expanded, setExpanded] =
|
|
12656
|
+
const [expanded, setExpanded] = useState4(false);
|
|
12997
12657
|
const { name, registry, schema, uiSchema, fieldPathId } = props;
|
|
12998
12658
|
const { globalUiOptions } = registry;
|
|
12999
12659
|
const uiOptions = getUiOptions(uiSchema, globalUiOptions);
|
|
@@ -13008,7 +12668,7 @@ function CyclicSchemaField(props) {
|
|
|
13008
12668
|
|
|
13009
12669
|
// ../../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
12670
|
import { jsx as _jsx7 } from "react/jsx-runtime";
|
|
13011
|
-
import { useMemo as
|
|
12671
|
+
import { useMemo as useMemo4, useState as useState5 } from "react";
|
|
13012
12672
|
function getFallbackTypeSelectionSchema(title) {
|
|
13013
12673
|
return {
|
|
13014
12674
|
type: "string",
|
|
@@ -13044,11 +12704,11 @@ function castToNewType(formData, newType) {
|
|
|
13044
12704
|
function FallbackField(props) {
|
|
13045
12705
|
const { id, formData, displayLabel = true, schema, name, uiSchema, required, disabled = false, readonly = false, onBlur, onFocus, registry, fieldPathId, onChange, errorSchema } = props;
|
|
13046
12706
|
const { translateString, fields: fields2, globalFormOptions } = registry;
|
|
13047
|
-
const [type, setType] =
|
|
12707
|
+
const [type, setType] = useState5(getTypeOfFormData(formData));
|
|
13048
12708
|
const uiOptions = getUiOptions(uiSchema);
|
|
13049
12709
|
const typeSelectorInnerFieldPathId = useDeepCompareMemo(toFieldPathId("__internal_type_selector", globalFormOptions, fieldPathId));
|
|
13050
12710
|
const schemaTitle = translateString(TranslatableString.Type);
|
|
13051
|
-
const typesOptionSchema =
|
|
12711
|
+
const typesOptionSchema = useMemo4(() => getFallbackTypeSelectionSchema(schemaTitle), [schemaTitle]);
|
|
13052
12712
|
const onTypeChange = (newType) => {
|
|
13053
12713
|
if (newType != null) {
|
|
13054
12714
|
setType(newType);
|
|
@@ -13135,7 +12795,7 @@ function conditionMatches(operator, datum, value = "$0m3tH1nG Un3xP3cT3d") {
|
|
|
13135
12795
|
function findChildrenAndProps(layoutGridSchema, schemaKey, registry) {
|
|
13136
12796
|
let gridProps = {};
|
|
13137
12797
|
let children = layoutGridSchema[schemaKey];
|
|
13138
|
-
if (
|
|
12798
|
+
if (isPlainObject2(children)) {
|
|
13139
12799
|
const { children: elements, className: toMapClassNames, ...otherProps } = children;
|
|
13140
12800
|
children = elements;
|
|
13141
12801
|
if (toMapClassNames) {
|
|
@@ -13387,7 +13047,7 @@ function LayoutHeaderField(props) {
|
|
|
13387
13047
|
|
|
13388
13048
|
// ../../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
13049
|
import { jsx as _jsx10 } from "react/jsx-runtime";
|
|
13390
|
-
import { useState as
|
|
13050
|
+
import { useState as useState6, useEffect as useEffect3 } from "react";
|
|
13391
13051
|
function getSelectedOption(options, selectorField, value) {
|
|
13392
13052
|
const defaultValue = "!@#!@$@#$!@$#";
|
|
13393
13053
|
const schemaOptions = options.map(({ schema }) => schema);
|
|
@@ -13414,7 +13074,7 @@ function computeEnumOptions(schema, options, schemaUtils, uiSchema, formData) {
|
|
|
13414
13074
|
function LayoutMultiSchemaField(props) {
|
|
13415
13075
|
const { name, baseType, disabled = false, formData, fieldPathId, onBlur, onChange, options, onFocus, registry, uiSchema, schema, autofocus, readonly, required, errorSchema, hideError = false } = props;
|
|
13416
13076
|
const { widgets: widgets2, schemaUtils, globalUiOptions } = registry;
|
|
13417
|
-
const [enumOptions, setEnumOptions] =
|
|
13077
|
+
const [enumOptions, setEnumOptions] = useState6(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));
|
|
13418
13078
|
const id = fieldPathId[ID_KEY];
|
|
13419
13079
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
13420
13080
|
const FieldErrorTemplate2 = getTemplate("FieldErrorTemplate", registry, options);
|
|
@@ -13423,7 +13083,7 @@ function LayoutMultiSchemaField(props) {
|
|
|
13423
13083
|
const optionsHash = hashObject(options);
|
|
13424
13084
|
const uiSchemaHash = uiSchema ? hashObject(uiSchema) : "";
|
|
13425
13085
|
const formDataHash = formData ? hashObject(formData) : "";
|
|
13426
|
-
|
|
13086
|
+
useEffect3(() => {
|
|
13427
13087
|
setEnumOptions(computeEnumOptions(schema, options, schemaUtils, uiSchema, formData));
|
|
13428
13088
|
}, [schemaHash, optionsHash, schemaUtils, uiSchemaHash, formDataHash]);
|
|
13429
13089
|
const { widget = discriminator ? "radio" : "select", title = "", placeholder = "", optionsSchemaSelector: selectorField = discriminator, hideError: uiSchemaHideError, ...uiOptions } = getUiOptions(uiSchema);
|
|
@@ -13462,24 +13122,24 @@ function LayoutMultiSchemaField(props) {
|
|
|
13462
13122
|
|
|
13463
13123
|
// ../../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
13124
|
import { jsx as _jsx11 } from "react/jsx-runtime";
|
|
13465
|
-
import { useCallback as useCallback5, useEffect as
|
|
13125
|
+
import { useCallback as useCallback5, useEffect as useEffect4, useMemo as useMemo5, useRef as useRef4, useState as useState7 } from "react";
|
|
13466
13126
|
function AnyOfField(props) {
|
|
13467
13127
|
const { name, disabled = false, errorSchema, formData, fieldPathId, onBlur, onChange, onFocus, options, readonly, registry, required = false, schema, uiSchema } = props;
|
|
13468
13128
|
const { schemaUtils } = registry;
|
|
13469
13129
|
const formDataHash = hashObject(formData ?? null);
|
|
13470
|
-
const retrievedOptions =
|
|
13130
|
+
const retrievedOptions = useMemo5(
|
|
13471
13131
|
() => options.map((opt) => schemaUtils.retrieveSchema(opt, formData)),
|
|
13472
13132
|
// oxlint-disable-next-line react-hooks/exhaustive-deps -- formDataHash is the value-stable proxy for formData
|
|
13473
13133
|
[options, schemaUtils, formDataHash]
|
|
13474
13134
|
);
|
|
13475
|
-
const [selectedOption, setSelectedOption] =
|
|
13135
|
+
const [selectedOption, setSelectedOption] = useState7(() => {
|
|
13476
13136
|
const discriminator = getDiscriminatorFieldFromSchema(schema);
|
|
13477
13137
|
return schemaUtils.getClosestMatchingOption(formData, retrievedOptions, 0, discriminator);
|
|
13478
13138
|
});
|
|
13479
|
-
const skipNextOptionRecalculation =
|
|
13480
|
-
const prevFormDataRef =
|
|
13481
|
-
const prevFieldIdRef =
|
|
13482
|
-
|
|
13139
|
+
const skipNextOptionRecalculation = useRef4(false);
|
|
13140
|
+
const prevFormDataRef = useRef4(formData);
|
|
13141
|
+
const prevFieldIdRef = useRef4(fieldPathId.$id);
|
|
13142
|
+
useEffect4(() => {
|
|
13483
13143
|
const prevFormData = prevFormDataRef.current;
|
|
13484
13144
|
const prevFieldId = prevFieldIdRef.current;
|
|
13485
13145
|
prevFormDataRef.current = formData;
|
|
@@ -13577,10 +13237,10 @@ function AnyOfField(props) {
|
|
|
13577
13237
|
var MultiSchemaField_default = AnyOfField;
|
|
13578
13238
|
|
|
13579
13239
|
// ../../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
|
|
13240
|
+
import { useEffect as useEffect5 } from "react";
|
|
13581
13241
|
function NullField(props) {
|
|
13582
13242
|
const { formData, onChange, fieldPathId } = props;
|
|
13583
|
-
|
|
13243
|
+
useEffect5(() => {
|
|
13584
13244
|
if (formData === void 0) {
|
|
13585
13245
|
onChange(null, fieldPathId.path);
|
|
13586
13246
|
}
|
|
@@ -13591,12 +13251,12 @@ var NullField_default = NullField;
|
|
|
13591
13251
|
|
|
13592
13252
|
// ../../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
13253
|
import { jsx as _jsx12 } from "react/jsx-runtime";
|
|
13594
|
-
import { useState as
|
|
13254
|
+
import { useState as useState8, useCallback as useCallback6 } from "react";
|
|
13595
13255
|
var trailingCharMatcherWithPrefix = /\.([0-9]*0)*$/;
|
|
13596
13256
|
var trailingCharMatcher = /[0.]0*$/;
|
|
13597
13257
|
function NumberField(props) {
|
|
13598
13258
|
const { registry, onChange, formData, value: initialValue } = props;
|
|
13599
|
-
const [lastValue, setLastValue] =
|
|
13259
|
+
const [lastValue, setLastValue] = useState8(initialValue);
|
|
13600
13260
|
const { StringField: StringField2 } = registry.fields;
|
|
13601
13261
|
const separator = getDecimalSeparator();
|
|
13602
13262
|
const escapedSeparator = separator === "." ? "\\." : separator;
|
|
@@ -13631,7 +13291,7 @@ var NumberField_default = NumberField;
|
|
|
13631
13291
|
|
|
13632
13292
|
// ../../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
13293
|
import { jsx as _jsx13, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13634
|
-
import { memo as memo2, useCallback as useCallback7, useMemo as
|
|
13294
|
+
import { memo as memo2, useCallback as useCallback7, useMemo as useMemo7, useRef as useRef6, useState as useState9 } from "react";
|
|
13635
13295
|
|
|
13636
13296
|
// ../../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
13297
|
import * as i0 from "react";
|
|
@@ -16766,7 +16426,7 @@ function getAdditionalPropertyOrder(schemaProperties) {
|
|
|
16766
16426
|
}
|
|
16767
16427
|
function ObjectFieldPropertyFn(props) {
|
|
16768
16428
|
const { fieldPathId, schema, registry, uiSchema, errorSchema, formData, onChange, onBlur, onFocus, disabled, readonly, required, hideError, propertyName, handleKeyRename, handleRemoveProperty, addedByAdditionalProperties } = props;
|
|
16769
|
-
const [wasPropertyKeyModified, setWasPropertyKeyModified] =
|
|
16429
|
+
const [wasPropertyKeyModified, setWasPropertyKeyModified] = useState9(false);
|
|
16770
16430
|
const { globalFormOptions, fields: fields2 } = registry;
|
|
16771
16431
|
const { SchemaField: SchemaField2 } = fields2;
|
|
16772
16432
|
const innerFieldIdPathId = useDeepCompareMemo(toFieldPathId(propertyName, globalFormOptions, fieldPathId.path));
|
|
@@ -16797,15 +16457,15 @@ function ObjectField(props) {
|
|
|
16797
16457
|
const { schema: rawSchema, uiSchema = {}, formData, errorSchema, fieldPathId, name, required = false, disabled, readonly, hideError, onBlur, onFocus, onChange, registry, title } = props;
|
|
16798
16458
|
const { fields: fields2, schemaUtils, translateString, globalUiOptions } = registry;
|
|
16799
16459
|
const { OptionalDataControlsField: OptionalDataControlsField2 } = fields2;
|
|
16800
|
-
const formDataRef =
|
|
16460
|
+
const formDataRef = useRef6(formData);
|
|
16801
16461
|
formDataRef.current = formData;
|
|
16802
|
-
const schema =
|
|
16803
|
-
const uiOptions =
|
|
16804
|
-
const schemaProperties =
|
|
16462
|
+
const schema = useMemo7(() => schemaUtils.retrieveSchema(rawSchema, formData, true), [schemaUtils, rawSchema, formData]);
|
|
16463
|
+
const uiOptions = useMemo7(() => getUiOptions(uiSchema, globalUiOptions), [uiSchema, globalUiOptions]);
|
|
16464
|
+
const schemaProperties = useMemo7(() => schema.properties ?? {}, [schema.properties]);
|
|
16805
16465
|
const childFieldPathId = props.childFieldPathId ?? fieldPathId;
|
|
16806
|
-
const lastRenamedProperty =
|
|
16807
|
-
const [additionalPropertyOrder, setAdditionalPropertyOrder] =
|
|
16808
|
-
const definedPropertyOrder =
|
|
16466
|
+
const lastRenamedProperty = useRef6({ previousKey: "", currentKey: void 0 });
|
|
16467
|
+
const [additionalPropertyOrder, setAdditionalPropertyOrder] = useState9(() => getAdditionalPropertyOrder(schemaProperties));
|
|
16468
|
+
const definedPropertyOrder = useMemo7(() => {
|
|
16809
16469
|
const additionalPropertySet = new Set(getAdditionalPropertyOrder(schemaProperties));
|
|
16810
16470
|
return Object.keys(schemaProperties).filter((property) => !additionalPropertySet.has(property));
|
|
16811
16471
|
}, [schemaProperties]);
|
|
@@ -18759,7 +18419,7 @@ var Form = class _Form extends Component {
|
|
|
18759
18419
|
};
|
|
18760
18420
|
|
|
18761
18421
|
// src/components/SessionPluginConfigForm.tsx
|
|
18762
|
-
import { isValidElement, useMemo as
|
|
18422
|
+
import { isValidElement, useMemo as useMemo8, useState as useState10 } from "react";
|
|
18763
18423
|
|
|
18764
18424
|
// src/components/plugin-config-schema.ts
|
|
18765
18425
|
function asSchema(value) {
|
|
@@ -18954,7 +18614,7 @@ function configDraftOperations(initial, values, retained, removed) {
|
|
|
18954
18614
|
}
|
|
18955
18615
|
|
|
18956
18616
|
// src/components/SessionPluginConfigForm.tsx
|
|
18957
|
-
import { Fragment as Fragment2, jsx as
|
|
18617
|
+
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
18958
18618
|
var defaults = getDefaultRegistry();
|
|
18959
18619
|
var validator = {
|
|
18960
18620
|
isValid(schema, data, rootSchema) {
|
|
@@ -19011,7 +18671,7 @@ function presentationSchema(schema) {
|
|
|
19011
18671
|
}
|
|
19012
18672
|
function ConfigMultiSchemaField(props) {
|
|
19013
18673
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-field", children: [
|
|
19014
|
-
/* @__PURE__ */
|
|
18674
|
+
/* @__PURE__ */ jsx3("label", { htmlFor: isValidElement(props.selector) ? props.selector.props.id : void 0, children: "\u914D\u7F6E\u65B9\u5F0F" }),
|
|
19015
18675
|
props.selector,
|
|
19016
18676
|
props.optionSchemaField
|
|
19017
18677
|
] });
|
|
@@ -19039,12 +18699,12 @@ function ConfigSchemaField(inputProps) {
|
|
|
19039
18699
|
const pointer = pointerOf(originalConfigPath(fieldPathId.path, context.removed));
|
|
19040
18700
|
const originalMarker = [...context.retained].find(([, path2]) => path2 === pointer)?.[0];
|
|
19041
18701
|
if (schema.const !== void 0 && schema.writeOnly !== true)
|
|
19042
|
-
return /* @__PURE__ */
|
|
18702
|
+
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
18703
|
if (schema.writeOnly === true) {
|
|
19044
18704
|
const kept = typeof formData === "string" && context.retained.has(formData);
|
|
19045
18705
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-field", children: [
|
|
19046
18706
|
Array.isArray(schema.type) && schema.type.includes("null") ? /* @__PURE__ */ jsxs2("label", { children: [
|
|
19047
|
-
/* @__PURE__ */
|
|
18707
|
+
/* @__PURE__ */ jsx3(
|
|
19048
18708
|
"input",
|
|
19049
18709
|
{
|
|
19050
18710
|
type: "checkbox",
|
|
@@ -19056,8 +18716,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19056
18716
|
schema.title ?? props.name,
|
|
19057
18717
|
"\uFF1A\u7F6E\u4E3A\u7A7A\u503C"
|
|
19058
18718
|
] }) : null,
|
|
19059
|
-
/* @__PURE__ */
|
|
19060
|
-
/* @__PURE__ */
|
|
18719
|
+
/* @__PURE__ */ jsx3("label", { htmlFor: fieldPathId.$id, "data-required": props.required, children: schema.title ?? props.name }),
|
|
18720
|
+
/* @__PURE__ */ jsx3(
|
|
19061
18721
|
"input",
|
|
19062
18722
|
{
|
|
19063
18723
|
id: fieldPathId.$id,
|
|
@@ -19070,8 +18730,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19070
18730
|
onChange: (event) => onChange(event.target.value || originalMarker, fieldPathId.path)
|
|
19071
18731
|
}
|
|
19072
18732
|
),
|
|
19073
|
-
kept ? /* @__PURE__ */
|
|
19074
|
-
formData !== void 0 ? /* @__PURE__ */
|
|
18733
|
+
kept ? /* @__PURE__ */ jsx3("p", { children: "\u5DF2\u4FDD\u5B58\uFF0C\u7559\u7A7A\u4FDD\u6301\u4E0D\u53D8" }) : null,
|
|
18734
|
+
formData !== void 0 ? /* @__PURE__ */ jsx3(
|
|
19075
18735
|
"button",
|
|
19076
18736
|
{
|
|
19077
18737
|
type: "button",
|
|
@@ -19080,8 +18740,8 @@ function ConfigSchemaField(inputProps) {
|
|
|
19080
18740
|
children: "\u6E05\u9664\u5DF2\u4FDD\u5B58\u7684\u503C"
|
|
19081
18741
|
}
|
|
19082
18742
|
) : null,
|
|
19083
|
-
schema.description ? /* @__PURE__ */
|
|
19084
|
-
context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */
|
|
18743
|
+
schema.description ? /* @__PURE__ */ jsx3("p", { children: schema.description }) : null,
|
|
18744
|
+
context.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx3("p", { role: "alert", children: error.message }, error.message))
|
|
19085
18745
|
] });
|
|
19086
18746
|
}
|
|
19087
18747
|
const types = Array.isArray(schema.type) ? schema.type : [schema.type];
|
|
@@ -19090,7 +18750,7 @@ function ConfigSchemaField(inputProps) {
|
|
|
19090
18750
|
const inner = { ...schema, type: nonNull[0] };
|
|
19091
18751
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-field", children: [
|
|
19092
18752
|
/* @__PURE__ */ jsxs2("label", { children: [
|
|
19093
|
-
/* @__PURE__ */
|
|
18753
|
+
/* @__PURE__ */ jsx3(
|
|
19094
18754
|
"input",
|
|
19095
18755
|
{
|
|
19096
18756
|
type: "checkbox",
|
|
@@ -19105,28 +18765,28 @@ function ConfigSchemaField(inputProps) {
|
|
|
19105
18765
|
schema.title ?? props.name,
|
|
19106
18766
|
"\uFF1A\u7F6E\u4E3A\u7A7A\u503C"
|
|
19107
18767
|
] }),
|
|
19108
|
-
nonNull.length && formData !== null ? /* @__PURE__ */
|
|
18768
|
+
nonNull.length && formData !== null ? /* @__PURE__ */ jsx3(defaults.fields.SchemaField, { ...props, schema: inner }) : null
|
|
19109
18769
|
] });
|
|
19110
18770
|
}
|
|
19111
|
-
return /* @__PURE__ */
|
|
18771
|
+
return /* @__PURE__ */ jsx3(defaults.fields.SchemaField, { ...props });
|
|
19112
18772
|
}
|
|
19113
18773
|
function ConfigFieldTemplate(props) {
|
|
19114
18774
|
const pointer = pointerOf(
|
|
19115
18775
|
originalConfigPath(props.fieldPathId.path, props.registry.formContext.removed)
|
|
19116
18776
|
);
|
|
19117
18777
|
return /* @__PURE__ */ jsxs2("div", { className: props.classNames, hidden: props.hidden, children: [
|
|
19118
|
-
props.displayLabel ? /* @__PURE__ */
|
|
18778
|
+
props.displayLabel ? /* @__PURE__ */ jsx3("label", { htmlFor: props.id, "data-required": props.required, children: props.label }) : null,
|
|
19119
18779
|
props.displayLabel ? props.description : null,
|
|
19120
18780
|
props.children,
|
|
19121
18781
|
props.help,
|
|
19122
|
-
props.registry.formContext.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */
|
|
18782
|
+
props.registry.formContext.errors.filter((error) => error.path === pointer).map((error) => /* @__PURE__ */ jsx3("p", { role: "alert", children: error.message }, error.message))
|
|
19123
18783
|
] });
|
|
19124
18784
|
}
|
|
19125
18785
|
function ConfigArrayItem(props) {
|
|
19126
18786
|
const { buttonsProps: buttons, registry } = props;
|
|
19127
18787
|
return /* @__PURE__ */ jsxs2("div", { className: "rjsf-array-item", children: [
|
|
19128
18788
|
props.children,
|
|
19129
|
-
buttons.hasRemove ? /* @__PURE__ */
|
|
18789
|
+
buttons.hasRemove ? /* @__PURE__ */ jsx3(
|
|
19130
18790
|
"button",
|
|
19131
18791
|
{
|
|
19132
18792
|
type: "button",
|
|
@@ -19141,7 +18801,7 @@ function ConfigArrayItem(props) {
|
|
|
19141
18801
|
if (previous !== void 0) registry.formContext.removed.add(pointerOf(path));
|
|
19142
18802
|
buttons.onRemoveItem(event);
|
|
19143
18803
|
},
|
|
19144
|
-
children: /* @__PURE__ */
|
|
18804
|
+
children: /* @__PURE__ */ jsx3(Trash2, { size: 14 })
|
|
19145
18805
|
}
|
|
19146
18806
|
) : null
|
|
19147
18807
|
] });
|
|
@@ -19154,12 +18814,12 @@ function SessionPluginConfigForm({
|
|
|
19154
18814
|
onSubmit,
|
|
19155
18815
|
onCancel
|
|
19156
18816
|
}) {
|
|
19157
|
-
const [initial] =
|
|
19158
|
-
const [values, setValues] =
|
|
19159
|
-
const [removed] =
|
|
19160
|
-
const [draftFailure, setDraftFailure] =
|
|
19161
|
-
const support =
|
|
19162
|
-
const schema =
|
|
18817
|
+
const [initial] = useState10(() => createConfigDraft(config));
|
|
18818
|
+
const [values, setValues] = useState10(initial.values);
|
|
18819
|
+
const [removed] = useState10(() => /* @__PURE__ */ new Set());
|
|
18820
|
+
const [draftFailure, setDraftFailure] = useState10(null);
|
|
18821
|
+
const support = useMemo8(() => formSupport(config.schema), [config.schema]);
|
|
18822
|
+
const schema = useMemo8(() => {
|
|
19163
18823
|
try {
|
|
19164
18824
|
return config.schema ? presentationSchema(config.schema) : null;
|
|
19165
18825
|
} catch {
|
|
@@ -19176,11 +18836,11 @@ function SessionPluginConfigForm({
|
|
|
19176
18836
|
};
|
|
19177
18837
|
if (!schema || support)
|
|
19178
18838
|
return /* @__PURE__ */ jsxs2("div", { className: "space-y-3 text-xs", children: [
|
|
19179
|
-
/* @__PURE__ */
|
|
19180
|
-
/* @__PURE__ */
|
|
18839
|
+
/* @__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" }),
|
|
18840
|
+
/* @__PURE__ */ jsx3("button", { type: "button", onClick: onCancel, children: "\u5173\u95ED" })
|
|
19181
18841
|
] });
|
|
19182
18842
|
return /* @__PURE__ */ jsxs2("div", { className: "blade-plugin-config text-xs", children: [
|
|
19183
|
-
/* @__PURE__ */
|
|
18843
|
+
/* @__PURE__ */ jsx3("style", { children: `
|
|
19184
18844
|
.blade-plugin-config .rjsf-field, .blade-plugin-config fieldset { min-width:0; margin:0 0 10px; padding:0; border:0 }
|
|
19185
18845
|
.blade-plugin-config label, .blade-plugin-config legend { display:block; font-size:12px; font-weight:500; overflow-wrap:anywhere; margin-bottom:4px }
|
|
19186
18846
|
.blade-plugin-config label[data-required=true]::after { content:' *'; color:hsl(var(--destructive)) }
|
|
@@ -19193,8 +18853,8 @@ function SessionPluginConfigForm({
|
|
|
19193
18853
|
.blade-plugin-config button:disabled { opacity:.5 }
|
|
19194
18854
|
.blade-plugin-config .control-label { display:block }
|
|
19195
18855
|
` }),
|
|
19196
|
-
failure || draftFailure ? /* @__PURE__ */
|
|
19197
|
-
/* @__PURE__ */
|
|
18856
|
+
failure || draftFailure ? /* @__PURE__ */ jsx3("p", { role: "alert", children: failure ?? draftFailure }) : null,
|
|
18857
|
+
/* @__PURE__ */ jsx3(
|
|
19198
18858
|
Form,
|
|
19199
18859
|
{
|
|
19200
18860
|
schema,
|
|
@@ -19208,7 +18868,7 @@ function SessionPluginConfigForm({
|
|
|
19208
18868
|
MultiSchemaFieldTemplate: ConfigMultiSchemaField,
|
|
19209
18869
|
ButtonTemplates: {
|
|
19210
18870
|
...defaults.templates.ButtonTemplates,
|
|
19211
|
-
AddButton: (props) => /* @__PURE__ */
|
|
18871
|
+
AddButton: (props) => /* @__PURE__ */ jsx3(
|
|
19212
18872
|
"button",
|
|
19213
18873
|
{
|
|
19214
18874
|
type: "button",
|
|
@@ -19216,7 +18876,7 @@ function SessionPluginConfigForm({
|
|
|
19216
18876
|
"aria-label": "\u6DFB\u52A0\u4E00\u9879",
|
|
19217
18877
|
disabled: props.disabled,
|
|
19218
18878
|
onClick: props.onClick,
|
|
19219
|
-
children: /* @__PURE__ */
|
|
18879
|
+
children: /* @__PURE__ */ jsx3(Plus, { size: 14 })
|
|
19220
18880
|
}
|
|
19221
18881
|
)
|
|
19222
18882
|
}
|
|
@@ -19258,8 +18918,8 @@ function SessionPluginConfigForm({
|
|
|
19258
18918
|
}
|
|
19259
18919
|
},
|
|
19260
18920
|
children: /* @__PURE__ */ jsxs2("div", { className: "flex justify-end gap-2", children: [
|
|
19261
|
-
/* @__PURE__ */
|
|
19262
|
-
/* @__PURE__ */
|
|
18921
|
+
/* @__PURE__ */ jsx3("button", { type: "button", onClick: onCancel, children: "\u53D6\u6D88" }),
|
|
18922
|
+
/* @__PURE__ */ jsx3("button", { type: "submit", disabled: submitting, children: submitting ? "\u4FDD\u5B58\u4E2D\u2026" : "\u4FDD\u5B58" })
|
|
19263
18923
|
] })
|
|
19264
18924
|
}
|
|
19265
18925
|
)
|
|
@@ -19267,8 +18927,8 @@ function SessionPluginConfigForm({
|
|
|
19267
18927
|
}
|
|
19268
18928
|
|
|
19269
18929
|
// src/components/SessionPluginIcon.tsx
|
|
19270
|
-
import { useEffect as
|
|
19271
|
-
import { jsx as
|
|
18930
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
18931
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
19272
18932
|
function sessionPluginLabel(plugin) {
|
|
19273
18933
|
const display = typeof plugin.display_name === "string" ? plugin.display_name.trim() : "";
|
|
19274
18934
|
return display || plugin.name;
|
|
@@ -19293,9 +18953,9 @@ function iconBlob(client, sessionId, name, token) {
|
|
|
19293
18953
|
return pending;
|
|
19294
18954
|
}
|
|
19295
18955
|
function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape = "rounded", className }) {
|
|
19296
|
-
const [url, setUrl] =
|
|
18956
|
+
const [url, setUrl] = useState11(null);
|
|
19297
18957
|
const token = plugin.icon;
|
|
19298
|
-
|
|
18958
|
+
useEffect6(() => {
|
|
19299
18959
|
setUrl(null);
|
|
19300
18960
|
if (!token) return;
|
|
19301
18961
|
let alive = true;
|
|
@@ -19313,14 +18973,14 @@ function SessionPluginIcon({ client, sessionId, plugin, size: size4 = 20, shape
|
|
|
19313
18973
|
const frame = `flex shrink-0 items-center justify-center overflow-hidden ${shape === "circle" ? "rounded-full" : "rounded"} ${className ?? ""}`;
|
|
19314
18974
|
const frameStyle = { width: size4, height: size4 };
|
|
19315
18975
|
if (!url) {
|
|
19316
|
-
return /* @__PURE__ */
|
|
18976
|
+
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
18977
|
}
|
|
19318
|
-
return /* @__PURE__ */
|
|
18978
|
+
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
18979
|
}
|
|
19320
18980
|
|
|
19321
18981
|
// src/components/SessionPluginConfigDialog.tsx
|
|
19322
|
-
import { useEffect as
|
|
19323
|
-
import { Fragment as Fragment3, jsx as
|
|
18982
|
+
import { useEffect as useEffect7, useRef as useRef7, useState as useState12 } from "react";
|
|
18983
|
+
import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
19324
18984
|
async function readFailure(error) {
|
|
19325
18985
|
const response = error?.response;
|
|
19326
18986
|
if (!response || typeof response.json !== "function") {
|
|
@@ -19347,7 +19007,7 @@ function SessionPluginConfigDialog({
|
|
|
19347
19007
|
plugin,
|
|
19348
19008
|
...props
|
|
19349
19009
|
}) {
|
|
19350
|
-
return /* @__PURE__ */
|
|
19010
|
+
return /* @__PURE__ */ jsx5(
|
|
19351
19011
|
ConfigDialogState,
|
|
19352
19012
|
{
|
|
19353
19013
|
client,
|
|
@@ -19365,41 +19025,66 @@ function ConfigDialogState({
|
|
|
19365
19025
|
onSaved,
|
|
19366
19026
|
onClose
|
|
19367
19027
|
}) {
|
|
19368
|
-
const [
|
|
19369
|
-
const [
|
|
19370
|
-
const [
|
|
19371
|
-
const
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19028
|
+
const [host, setHost] = useState12(null);
|
|
19029
|
+
const [restarting, setRestarting] = useState12(false);
|
|
19030
|
+
const [scope, setScope] = useState12("personal");
|
|
19031
|
+
const waitingForHost = host?.state === "starting" || host?.state === "updating";
|
|
19032
|
+
useEffect7(() => {
|
|
19033
|
+
if (!waitingForHost) return;
|
|
19034
|
+
const abort = new AbortController();
|
|
19035
|
+
let timer;
|
|
19036
|
+
const refresh = async () => {
|
|
19037
|
+
try {
|
|
19038
|
+
const next = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, { signal: abort.signal }, scope);
|
|
19039
|
+
if (!abort.signal.aborted) setHost(next.host ?? null);
|
|
19040
|
+
} catch {
|
|
19041
|
+
}
|
|
19042
|
+
if (!abort.signal.aborted) timer = setTimeout(refresh, 2e3);
|
|
19043
|
+
};
|
|
19044
|
+
timer = setTimeout(refresh, 2e3);
|
|
19045
|
+
return () => {
|
|
19046
|
+
abort.abort();
|
|
19047
|
+
clearTimeout(timer);
|
|
19048
|
+
};
|
|
19049
|
+
}, [client, sessionId, plugin.name, scope, waitingForHost]);
|
|
19050
|
+
const [canConfigureGlobal, setCanConfigureGlobal] = useState12(false);
|
|
19051
|
+
const [config, setConfig] = useState12(null);
|
|
19052
|
+
const [loading, setLoading] = useState12(true);
|
|
19053
|
+
const [loadFailure, setLoadFailure] = useState12(null);
|
|
19054
|
+
const [saving, setSaving] = useState12(false);
|
|
19055
|
+
const [failure, setFailure] = useState12(null);
|
|
19056
|
+
const [fieldErrors, setFieldErrors] = useState12([]);
|
|
19057
|
+
const [formVersion, setFormVersion] = useState12(0);
|
|
19058
|
+
const alive = useRef7(true);
|
|
19059
|
+
const generation2 = useRef7(0);
|
|
19060
|
+
const dialog = useRef7(null);
|
|
19061
|
+
useEffect7(() => {
|
|
19379
19062
|
const element = dialog.current;
|
|
19380
19063
|
if (!element || element.open) return;
|
|
19381
19064
|
if (typeof element.showModal === "function") element.showModal();
|
|
19382
19065
|
else element.setAttribute("open", "");
|
|
19383
19066
|
}, []);
|
|
19384
19067
|
const load = async () => {
|
|
19385
|
-
const current = ++
|
|
19068
|
+
const current = ++generation2.current;
|
|
19386
19069
|
setLoading(true);
|
|
19387
19070
|
setLoadFailure(null);
|
|
19388
19071
|
try {
|
|
19389
|
-
const { config: state } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name);
|
|
19390
|
-
if (!alive.current ||
|
|
19072
|
+
const { config: state, can_configure_global, host: hostState } = await client.sessions.getSessionPluginConfig(sessionId, plugin.name, void 0, scope);
|
|
19073
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19074
|
+
setCanConfigureGlobal(can_configure_global ?? false);
|
|
19075
|
+
setHost(hostState ?? null);
|
|
19391
19076
|
setConfig(state);
|
|
19392
19077
|
setFormVersion((value) => value + 1);
|
|
19393
19078
|
} catch (error) {
|
|
19394
|
-
if (!alive.current ||
|
|
19079
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19395
19080
|
const detail = await readFailure(error);
|
|
19396
|
-
if (!alive.current ||
|
|
19081
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19397
19082
|
setLoadFailure(detail.message ?? "\u914D\u7F6E\u6682\u4E0D\u53EF\u7528");
|
|
19398
19083
|
} finally {
|
|
19399
|
-
if (alive.current &&
|
|
19084
|
+
if (alive.current && generation2.current === current) setLoading(false);
|
|
19400
19085
|
}
|
|
19401
19086
|
};
|
|
19402
|
-
|
|
19087
|
+
useEffect7(() => {
|
|
19403
19088
|
alive.current = true;
|
|
19404
19089
|
setConfig(null);
|
|
19405
19090
|
setFailure(null);
|
|
@@ -19407,12 +19092,12 @@ function ConfigDialogState({
|
|
|
19407
19092
|
void load();
|
|
19408
19093
|
return () => {
|
|
19409
19094
|
alive.current = false;
|
|
19410
|
-
|
|
19095
|
+
generation2.current++;
|
|
19411
19096
|
};
|
|
19412
|
-
}, [client, sessionId, plugin.name]);
|
|
19097
|
+
}, [client, sessionId, plugin.name, scope]);
|
|
19413
19098
|
const save = async (draft) => {
|
|
19414
19099
|
if (!config) return;
|
|
19415
|
-
const current =
|
|
19100
|
+
const current = generation2.current;
|
|
19416
19101
|
setSaving(true);
|
|
19417
19102
|
setFailure(null);
|
|
19418
19103
|
setFieldErrors([]);
|
|
@@ -19424,16 +19109,18 @@ function ConfigDialogState({
|
|
|
19424
19109
|
expected_revision: config.revision,
|
|
19425
19110
|
set: draft.set,
|
|
19426
19111
|
remove: draft.remove
|
|
19427
|
-
}
|
|
19112
|
+
},
|
|
19113
|
+
void 0,
|
|
19114
|
+
scope
|
|
19428
19115
|
);
|
|
19429
|
-
if (!alive.current ||
|
|
19116
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19430
19117
|
setConfig(state);
|
|
19431
19118
|
setFormVersion((value) => value + 1);
|
|
19432
|
-
onSaved?.(state);
|
|
19119
|
+
if (scope === "personal") onSaved?.(state);
|
|
19433
19120
|
} catch (error) {
|
|
19434
|
-
if (!alive.current ||
|
|
19121
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19435
19122
|
const detail = await readFailure(error);
|
|
19436
|
-
if (!alive.current ||
|
|
19123
|
+
if (!alive.current || generation2.current !== current) return;
|
|
19437
19124
|
setFailure(detail.message ?? "\u914D\u7F6E\u672A\u4FDD\u5B58\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");
|
|
19438
19125
|
setFieldErrors(detail.errors ?? []);
|
|
19439
19126
|
if (detail.code === "plugin_config_conflict") await load();
|
|
@@ -19442,7 +19129,7 @@ function ConfigDialogState({
|
|
|
19442
19129
|
}
|
|
19443
19130
|
};
|
|
19444
19131
|
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
19445
|
-
/* @__PURE__ */
|
|
19132
|
+
/* @__PURE__ */ jsx5("style", { children: ".blade-plugin-dialog::backdrop { background: rgb(0 0 0 / 40%); }" }),
|
|
19446
19133
|
/* @__PURE__ */ jsxs3(
|
|
19447
19134
|
"dialog",
|
|
19448
19135
|
{
|
|
@@ -19469,8 +19156,8 @@ function ConfigDialogState({
|
|
|
19469
19156
|
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
19157
|
children: [
|
|
19471
19158
|
/* @__PURE__ */ jsxs3("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
19472
|
-
/* @__PURE__ */
|
|
19473
|
-
/* @__PURE__ */
|
|
19159
|
+
/* @__PURE__ */ jsx5(SessionPluginIcon, { client, sessionId, plugin }),
|
|
19160
|
+
/* @__PURE__ */ jsx5(
|
|
19474
19161
|
"span",
|
|
19475
19162
|
{
|
|
19476
19163
|
className: "min-w-0 flex-1 truncate text-sm font-medium",
|
|
@@ -19478,7 +19165,7 @@ function ConfigDialogState({
|
|
|
19478
19165
|
children: sessionPluginLabel(plugin)
|
|
19479
19166
|
}
|
|
19480
19167
|
),
|
|
19481
|
-
/* @__PURE__ */
|
|
19168
|
+
/* @__PURE__ */ jsx5(
|
|
19482
19169
|
"button",
|
|
19483
19170
|
{
|
|
19484
19171
|
type: "button",
|
|
@@ -19489,10 +19176,44 @@ function ConfigDialogState({
|
|
|
19489
19176
|
}
|
|
19490
19177
|
)
|
|
19491
19178
|
] }),
|
|
19492
|
-
|
|
19179
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs3("div", { className: "mb-3 flex gap-2 text-xs", children: [
|
|
19180
|
+
/* @__PURE__ */ jsx5("button", { type: "button", disabled: saving, "aria-pressed": scope === "personal", onClick: () => setScope("personal"), children: "\u6211\u7684\u767B\u5F55" }),
|
|
19181
|
+
/* @__PURE__ */ jsx5("button", { type: "button", disabled: saving, "aria-pressed": scope === "global", onClick: () => setScope("global"), children: "\u7EC4\u7EC7\u5171\u4EAB\u914D\u7F6E" })
|
|
19182
|
+
] }) : null,
|
|
19183
|
+
host ? /* @__PURE__ */ jsxs3("div", { className: "mb-3 space-y-1 text-xs", children: [
|
|
19184
|
+
/* @__PURE__ */ jsxs3("p", { children: [
|
|
19185
|
+
"\u670D\u52A1\uFF1A",
|
|
19186
|
+
host.reason,
|
|
19187
|
+
" \xB7 \u5DF2\u6062\u590D ",
|
|
19188
|
+
host.restarts,
|
|
19189
|
+
" \u6B21"
|
|
19190
|
+
] }),
|
|
19191
|
+
canConfigureGlobal ? /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
19192
|
+
/* @__PURE__ */ jsxs3("p", { className: "break-all text-[hsl(var(--muted-foreground))]", children: [
|
|
19193
|
+
"\u5305\u6458\u8981\uFF1A",
|
|
19194
|
+
host.digest,
|
|
19195
|
+
" \xB7 \u914D\u7F6E\uFF1A",
|
|
19196
|
+
host.revision
|
|
19197
|
+
] }),
|
|
19198
|
+
/* @__PURE__ */ jsx5("button", { type: "button", disabled: restarting || saving, onClick: () => {
|
|
19199
|
+
setRestarting(true);
|
|
19200
|
+
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(() => {
|
|
19201
|
+
if (alive.current) setRestarting(false);
|
|
19202
|
+
});
|
|
19203
|
+
}, children: restarting ? "\u6B63\u5728\u91CD\u542F\u2026" : "\u91CD\u542F\u670D\u52A1" }),
|
|
19204
|
+
host.recent?.length ? /* @__PURE__ */ jsxs3("details", { children: [
|
|
19205
|
+
/* @__PURE__ */ jsx5("summary", { children: "\u6700\u8FD1\u6D3B\u52A8" }),
|
|
19206
|
+
host.recent.map((line, index2) => /* @__PURE__ */ jsx5("p", { children: line }, `${index2}-${line}`))
|
|
19207
|
+
] }) : null
|
|
19208
|
+
] }) : null
|
|
19209
|
+
] }) : null,
|
|
19210
|
+
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,
|
|
19211
|
+
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,
|
|
19212
|
+
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,
|
|
19213
|
+
loading ? /* @__PURE__ */ jsx5("p", { className: "text-xs text-[hsl(var(--muted-foreground))]", children: "\u6B63\u5728\u8BFB\u53D6\u914D\u7F6E\u2026" }) : null,
|
|
19493
19214
|
loadFailure ? /* @__PURE__ */ jsxs3("div", { className: "space-y-2 text-xs", children: [
|
|
19494
|
-
/* @__PURE__ */
|
|
19495
|
-
/* @__PURE__ */
|
|
19215
|
+
/* @__PURE__ */ jsx5("p", { children: loadFailure }),
|
|
19216
|
+
/* @__PURE__ */ jsx5(
|
|
19496
19217
|
"button",
|
|
19497
19218
|
{
|
|
19498
19219
|
type: "button",
|
|
@@ -19502,7 +19223,7 @@ function ConfigDialogState({
|
|
|
19502
19223
|
}
|
|
19503
19224
|
)
|
|
19504
19225
|
] }) : null,
|
|
19505
|
-
config && !loading ? /* @__PURE__ */
|
|
19226
|
+
config && !loading ? /* @__PURE__ */ jsx5(
|
|
19506
19227
|
SessionPluginConfigForm,
|
|
19507
19228
|
{
|
|
19508
19229
|
config,
|
|
@@ -19521,7 +19242,7 @@ function ConfigDialogState({
|
|
|
19521
19242
|
}
|
|
19522
19243
|
|
|
19523
19244
|
// src/components/PluginConnectorList.tsx
|
|
19524
|
-
import { jsx as
|
|
19245
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
19525
19246
|
function PluginSwitch({
|
|
19526
19247
|
label,
|
|
19527
19248
|
checked,
|
|
@@ -19531,7 +19252,7 @@ function PluginSwitch({
|
|
|
19531
19252
|
draft = false,
|
|
19532
19253
|
onToggle
|
|
19533
19254
|
}) {
|
|
19534
|
-
return /* @__PURE__ */
|
|
19255
|
+
return /* @__PURE__ */ jsx6(
|
|
19535
19256
|
"button",
|
|
19536
19257
|
{
|
|
19537
19258
|
type: "button",
|
|
@@ -19541,12 +19262,12 @@ function PluginSwitch({
|
|
|
19541
19262
|
disabled,
|
|
19542
19263
|
onClick: () => onToggle(!checked),
|
|
19543
19264
|
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__ */
|
|
19265
|
+
children: /* @__PURE__ */ jsx6(
|
|
19545
19266
|
"span",
|
|
19546
19267
|
{
|
|
19547
19268
|
"aria-hidden": "true",
|
|
19548
19269
|
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__ */
|
|
19270
|
+
children: pending ? /* @__PURE__ */ jsx6(LoaderCircle, { size: 9, className: "animate-spin text-[hsl(var(--muted-foreground))]" }) : null
|
|
19550
19271
|
}
|
|
19551
19272
|
)
|
|
19552
19273
|
}
|
|
@@ -19572,8 +19293,8 @@ function PluginConnectorList({
|
|
|
19572
19293
|
}) {
|
|
19573
19294
|
const configuringItem = configuring ? items.find((item) => item.name === configuring.name) ?? null : null;
|
|
19574
19295
|
return /* @__PURE__ */ jsxs4("div", { className: "py-0.5", children: [
|
|
19575
|
-
disabledReason ? /* @__PURE__ */
|
|
19576
|
-
items.length === 0 ? /* @__PURE__ */
|
|
19296
|
+
disabledReason ? /* @__PURE__ */ jsx6("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: disabledReason }) : null,
|
|
19297
|
+
items.length === 0 ? /* @__PURE__ */ jsx6("div", { className: "px-3 py-1.5 text-[11px] text-[hsl(var(--muted-foreground))]", children: unavailableText ?? emptyText }) : null,
|
|
19577
19298
|
items.map((item) => {
|
|
19578
19299
|
const label = sessionPluginLabel(item);
|
|
19579
19300
|
const actionable = !disabledReason && item.installed !== false || item.active;
|
|
@@ -19581,7 +19302,7 @@ function PluginConnectorList({
|
|
|
19581
19302
|
const checked = item.active;
|
|
19582
19303
|
return /* @__PURE__ */ jsxs4("div", { className: "group px-3 py-1", children: [
|
|
19583
19304
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-2", children: [
|
|
19584
|
-
/* @__PURE__ */
|
|
19305
|
+
/* @__PURE__ */ jsx6(
|
|
19585
19306
|
SessionPluginIcon,
|
|
19586
19307
|
{
|
|
19587
19308
|
client,
|
|
@@ -19589,8 +19310,9 @@ function PluginConnectorList({
|
|
|
19589
19310
|
plugin: item
|
|
19590
19311
|
}
|
|
19591
19312
|
),
|
|
19592
|
-
/* @__PURE__ */
|
|
19593
|
-
|
|
19313
|
+
/* @__PURE__ */ jsx6("span", { className: "min-w-0 flex-1 truncate text-[11px]", title: label, children: label }),
|
|
19314
|
+
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,
|
|
19315
|
+
!draft && item.config === "configured" ? /* @__PURE__ */ jsx6(
|
|
19594
19316
|
"button",
|
|
19595
19317
|
{
|
|
19596
19318
|
type: "button",
|
|
@@ -19601,7 +19323,7 @@ function PluginConnectorList({
|
|
|
19601
19323
|
children: "\u66F4\u65B0\u914D\u7F6E"
|
|
19602
19324
|
}
|
|
19603
19325
|
) : null,
|
|
19604
|
-
!draft && (item.config === "required" || item.config === "error") ? /* @__PURE__ */
|
|
19326
|
+
!draft && (item.config === "required" || item.config === "error") ? /* @__PURE__ */ jsx6(
|
|
19605
19327
|
"button",
|
|
19606
19328
|
{
|
|
19607
19329
|
type: "button",
|
|
@@ -19612,7 +19334,7 @@ function PluginConnectorList({
|
|
|
19612
19334
|
children: "\u586B\u5199\u914D\u7F6E"
|
|
19613
19335
|
}
|
|
19614
19336
|
) : null,
|
|
19615
|
-
/* @__PURE__ */
|
|
19337
|
+
/* @__PURE__ */ jsx6(
|
|
19616
19338
|
PluginSwitch,
|
|
19617
19339
|
{
|
|
19618
19340
|
label,
|
|
@@ -19625,8 +19347,8 @@ function PluginConnectorList({
|
|
|
19625
19347
|
)
|
|
19626
19348
|
] }),
|
|
19627
19349
|
!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__ */
|
|
19350
|
+
/* @__PURE__ */ jsx6("span", { children: item.reason || "\u63D2\u4EF6\u6682\u4E0D\u53EF\u7528" }),
|
|
19351
|
+
/* @__PURE__ */ jsx6(
|
|
19630
19352
|
"button",
|
|
19631
19353
|
{
|
|
19632
19354
|
type: "button",
|
|
@@ -19639,8 +19361,8 @@ function PluginConnectorList({
|
|
|
19639
19361
|
] }) : null
|
|
19640
19362
|
] }, item.name);
|
|
19641
19363
|
}),
|
|
19642
|
-
mutationError ? /* @__PURE__ */
|
|
19643
|
-
configuring && configuringItem && sessionId ? /* @__PURE__ */
|
|
19364
|
+
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,
|
|
19365
|
+
configuring && configuringItem && sessionId ? /* @__PURE__ */ jsx6(
|
|
19644
19366
|
SessionPluginConfigDialog,
|
|
19645
19367
|
{
|
|
19646
19368
|
client,
|
|
@@ -19661,6 +19383,7 @@ function catalogToConnectorItems(catalog) {
|
|
|
19661
19383
|
icon: entry.icon,
|
|
19662
19384
|
iconSource: "account",
|
|
19663
19385
|
installed: entry.installed,
|
|
19386
|
+
auth_status: entry.auth_status,
|
|
19664
19387
|
active: false,
|
|
19665
19388
|
status: "not_prepared",
|
|
19666
19389
|
projected: false
|
|
@@ -19690,6 +19413,7 @@ function mergeConnectorItems(sessionPlugins, catalog) {
|
|
|
19690
19413
|
icon: entry.icon,
|
|
19691
19414
|
iconSource: "account",
|
|
19692
19415
|
installed: entry.installed,
|
|
19416
|
+
auth_status: entry.auth_status,
|
|
19693
19417
|
active: plugin.active,
|
|
19694
19418
|
status: plugin.status,
|
|
19695
19419
|
reason: plugin.reason,
|
|
@@ -19707,29 +19431,29 @@ function filterConnectorItems(items, query) {
|
|
|
19707
19431
|
}
|
|
19708
19432
|
|
|
19709
19433
|
// src/components/use-session-plugin-activation.ts
|
|
19710
|
-
import { useCallback as useCallback19, useEffect as
|
|
19434
|
+
import { useCallback as useCallback19, useEffect as useEffect8, useMemo as useMemo9, useRef as useRef8, useState as useState13 } from "react";
|
|
19711
19435
|
function useSessionPluginActivation({
|
|
19712
19436
|
client,
|
|
19713
19437
|
sessionId,
|
|
19714
19438
|
onChange
|
|
19715
19439
|
}) {
|
|
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] =
|
|
19440
|
+
const [plugins, setPlugins] = useState13([]);
|
|
19441
|
+
const [catalog, setCatalog] = useState13(null);
|
|
19442
|
+
const [loading, setLoading] = useState13(false);
|
|
19443
|
+
const [listError, setListError] = useState13(false);
|
|
19444
|
+
const [mutationError, setMutationError] = useState13(false);
|
|
19445
|
+
const [inFlight, setInFlight] = useState13({});
|
|
19446
|
+
const [configuring, setConfiguring] = useState13(null);
|
|
19447
|
+
const alive = useRef8(true);
|
|
19448
|
+
const generation2 = useRef8(0);
|
|
19449
|
+
const mutationGenerations = useRef8(/* @__PURE__ */ new Map());
|
|
19450
|
+
const desiredActivations = useRef8(/* @__PURE__ */ new Map());
|
|
19451
|
+
const pendingMutations = useRef8(/* @__PURE__ */ new Map());
|
|
19452
|
+
const submittedActivations = useRef8(/* @__PURE__ */ new Set());
|
|
19453
|
+
const serverActive = useRef8(/* @__PURE__ */ new Set());
|
|
19454
|
+
const lifetime = useRef8(0);
|
|
19455
|
+
const request = useRef8(null);
|
|
19456
|
+
const [desiredVersion, setDesiredVersion] = useState13(0);
|
|
19733
19457
|
const setDesired = useCallback19((name, value) => {
|
|
19734
19458
|
if (value === null) {
|
|
19735
19459
|
if (!desiredActivations.current.delete(name)) return;
|
|
@@ -19739,7 +19463,7 @@ function useSessionPluginActivation({
|
|
|
19739
19463
|
}
|
|
19740
19464
|
setDesiredVersion((version) => version + 1);
|
|
19741
19465
|
}, []);
|
|
19742
|
-
const items =
|
|
19466
|
+
const items = useMemo9(() => {
|
|
19743
19467
|
void desiredVersion;
|
|
19744
19468
|
const merged = mergeConnectorItems(plugins, catalog);
|
|
19745
19469
|
return merged.map((item) => {
|
|
@@ -19759,7 +19483,7 @@ function useSessionPluginActivation({
|
|
|
19759
19483
|
return rest;
|
|
19760
19484
|
});
|
|
19761
19485
|
}, []);
|
|
19762
|
-
|
|
19486
|
+
useEffect8(() => {
|
|
19763
19487
|
alive.current = true;
|
|
19764
19488
|
setPlugins([]);
|
|
19765
19489
|
setCatalog(null);
|
|
@@ -19775,7 +19499,7 @@ function useSessionPluginActivation({
|
|
|
19775
19499
|
return () => {
|
|
19776
19500
|
alive.current = false;
|
|
19777
19501
|
lifetime.current++;
|
|
19778
|
-
|
|
19502
|
+
generation2.current++;
|
|
19779
19503
|
request.current?.abort();
|
|
19780
19504
|
};
|
|
19781
19505
|
}, [client]);
|
|
@@ -19784,7 +19508,7 @@ function useSessionPluginActivation({
|
|
|
19784
19508
|
request.current?.abort();
|
|
19785
19509
|
const controller = new AbortController();
|
|
19786
19510
|
request.current = controller;
|
|
19787
|
-
const current = ++
|
|
19511
|
+
const current = ++generation2.current;
|
|
19788
19512
|
setLoading(true);
|
|
19789
19513
|
setListError(false);
|
|
19790
19514
|
try {
|
|
@@ -19802,7 +19526,7 @@ function useSessionPluginActivation({
|
|
|
19802
19526
|
}
|
|
19803
19527
|
})
|
|
19804
19528
|
);
|
|
19805
|
-
if (alive.current && current ===
|
|
19529
|
+
if (alive.current && current === generation2.current) {
|
|
19806
19530
|
serverActive.current = new Set(withConfig.filter((item) => item.active).map((item) => item.name));
|
|
19807
19531
|
setPlugins(withConfig.map((item) => {
|
|
19808
19532
|
const desired = desiredActivations.current.get(item.name);
|
|
@@ -19810,9 +19534,9 @@ function useSessionPluginActivation({
|
|
|
19810
19534
|
}));
|
|
19811
19535
|
}
|
|
19812
19536
|
} catch {
|
|
19813
|
-
if (alive.current && current ===
|
|
19537
|
+
if (alive.current && current === generation2.current && !controller.signal.aborted) setListError(true);
|
|
19814
19538
|
} finally {
|
|
19815
|
-
if (alive.current && current ===
|
|
19539
|
+
if (alive.current && current === generation2.current) setLoading(false);
|
|
19816
19540
|
}
|
|
19817
19541
|
}, [client, sessionId]);
|
|
19818
19542
|
const loadCatalog = useCallback19(async () => {
|
|
@@ -19887,7 +19611,7 @@ function useSessionPluginActivation({
|
|
|
19887
19611
|
setMutationError(false);
|
|
19888
19612
|
markInFlight(name, true);
|
|
19889
19613
|
request.current?.abort();
|
|
19890
|
-
|
|
19614
|
+
generation2.current++;
|
|
19891
19615
|
setLoading(false);
|
|
19892
19616
|
let state;
|
|
19893
19617
|
try {
|
|
@@ -19917,7 +19641,7 @@ function useSessionPluginActivation({
|
|
|
19917
19641
|
const disable = useCallback19((name) => {
|
|
19918
19642
|
const startedAt = lifetime.current;
|
|
19919
19643
|
request.current?.abort();
|
|
19920
|
-
|
|
19644
|
+
generation2.current++;
|
|
19921
19645
|
setLoading(false);
|
|
19922
19646
|
if (!submittedActivations.current.has(name) && !serverActive.current.has(name)) {
|
|
19923
19647
|
abandon(name);
|
|
@@ -19945,6 +19669,7 @@ function useSessionPluginActivation({
|
|
|
19945
19669
|
const target = configuring;
|
|
19946
19670
|
if (!target) return;
|
|
19947
19671
|
setConfiguring(null);
|
|
19672
|
+
void loadCatalog();
|
|
19948
19673
|
setPlugins((current) => current.map((item) => item.name === target.name ? { ...item, config: state.state } : item));
|
|
19949
19674
|
if (!target.pendingActivation || state.state !== "configured") {
|
|
19950
19675
|
void load();
|
|
@@ -19957,7 +19682,7 @@ function useSessionPluginActivation({
|
|
|
19957
19682
|
setDesired(target.name, true);
|
|
19958
19683
|
markInFlight(target.name, true);
|
|
19959
19684
|
void commitActivation(target.name, true, mutation, startedAt);
|
|
19960
|
-
}, [commitActivation, configuring, load, markInFlight, setDesired]);
|
|
19685
|
+
}, [commitActivation, configuring, load, loadCatalog, markInFlight, setDesired]);
|
|
19961
19686
|
const onConfigClose = useCallback19(() => {
|
|
19962
19687
|
const target = configuring;
|
|
19963
19688
|
if (!target) return;
|
|
@@ -19982,6 +19707,223 @@ function useSessionPluginActivation({
|
|
|
19982
19707
|
};
|
|
19983
19708
|
}
|
|
19984
19709
|
|
|
19710
|
+
// src/chat/runtime/session-source.tsx
|
|
19711
|
+
import { createInitialSessionState } from "@blade-hq/agent-client/internal";
|
|
19712
|
+
import {
|
|
19713
|
+
createContext as createContext3,
|
|
19714
|
+
useContext as useContext3,
|
|
19715
|
+
useEffect as useEffect9,
|
|
19716
|
+
useLayoutEffect,
|
|
19717
|
+
useMemo as useMemo10,
|
|
19718
|
+
useRef as useRef9,
|
|
19719
|
+
useState as useState14,
|
|
19720
|
+
useSyncExternalStore
|
|
19721
|
+
} from "react";
|
|
19722
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
19723
|
+
var EMPTY_SOURCE = {
|
|
19724
|
+
subscribe: () => () => {
|
|
19725
|
+
},
|
|
19726
|
+
getSession: () => void 0,
|
|
19727
|
+
isHistoryLoading: () => false,
|
|
19728
|
+
planRevealRevision: () => 0
|
|
19729
|
+
};
|
|
19730
|
+
var SessionSourceContext = createContext3(EMPTY_SOURCE);
|
|
19731
|
+
function SessionSourceProvider({ source, children }) {
|
|
19732
|
+
return /* @__PURE__ */ jsx7(SessionSourceContext.Provider, { value: source, children });
|
|
19733
|
+
}
|
|
19734
|
+
function useSessionSource() {
|
|
19735
|
+
return useContext3(SessionSourceContext);
|
|
19736
|
+
}
|
|
19737
|
+
var SingleSessionSource = class {
|
|
19738
|
+
session = null;
|
|
19739
|
+
loading = false;
|
|
19740
|
+
listeners = /* @__PURE__ */ new Set();
|
|
19741
|
+
revisions = /* @__PURE__ */ new Map();
|
|
19742
|
+
subscribe = (listener) => {
|
|
19743
|
+
this.listeners.add(listener);
|
|
19744
|
+
return () => {
|
|
19745
|
+
this.listeners.delete(listener);
|
|
19746
|
+
};
|
|
19747
|
+
};
|
|
19748
|
+
getSession = (sessionId) => {
|
|
19749
|
+
const current = this.session;
|
|
19750
|
+
return current && (!sessionId || current.sessionId === sessionId) ? current : void 0;
|
|
19751
|
+
};
|
|
19752
|
+
isHistoryLoading = (sessionId) => {
|
|
19753
|
+
if (!this.session) return this.loading;
|
|
19754
|
+
return (!sessionId || this.session.sessionId === sessionId) && this.loading;
|
|
19755
|
+
};
|
|
19756
|
+
planRevealRevision = (sessionId) => sessionId ? this.revisions.get(sessionId) ?? 0 : 0;
|
|
19757
|
+
update(session, loading) {
|
|
19758
|
+
if (this.session === session && this.loading === loading) return;
|
|
19759
|
+
this.session = session;
|
|
19760
|
+
this.loading = loading;
|
|
19761
|
+
this.notify();
|
|
19762
|
+
}
|
|
19763
|
+
/** 只认实时成功的根回路 update_plan:历史加载与断线补数不算「新揭示」。 */
|
|
19764
|
+
watchPlan(session) {
|
|
19765
|
+
return session.on("toolResult", ({ toolCall, turn, source }) => {
|
|
19766
|
+
if (source === "reconnect_replay" || (turn.loop_id || "root") !== "root" || toolCall.status !== "done" || !isPlanUpdateTool(toolCall) || !parsePlanUpdate(toolCall.arguments)) {
|
|
19767
|
+
return;
|
|
19768
|
+
}
|
|
19769
|
+
this.revisions.set(session.sessionId, (this.revisions.get(session.sessionId) ?? 0) + 1);
|
|
19770
|
+
this.notify();
|
|
19771
|
+
});
|
|
19772
|
+
}
|
|
19773
|
+
notify() {
|
|
19774
|
+
for (const listener of [...this.listeners]) listener();
|
|
19775
|
+
}
|
|
19776
|
+
};
|
|
19777
|
+
function useSingleSessionSource(session, loading) {
|
|
19778
|
+
const [source] = useState14(() => new SingleSessionSource());
|
|
19779
|
+
useLayoutEffect(() => {
|
|
19780
|
+
source.update(session, loading);
|
|
19781
|
+
}, [source, session, loading]);
|
|
19782
|
+
useEffect9(() => session ? source.watchPlan(session) : void 0, [source, session]);
|
|
19783
|
+
return source;
|
|
19784
|
+
}
|
|
19785
|
+
var EMPTY_STATE = createInitialSessionState("");
|
|
19786
|
+
var noopSubscribe = () => () => {
|
|
19787
|
+
};
|
|
19788
|
+
function useSessionHandle(sessionId) {
|
|
19789
|
+
const source = useSessionSource();
|
|
19790
|
+
return useSyncExternalStore(
|
|
19791
|
+
source.subscribe,
|
|
19792
|
+
() => source.getSession(sessionId) ?? null,
|
|
19793
|
+
() => source.getSession(sessionId) ?? null
|
|
19794
|
+
);
|
|
19795
|
+
}
|
|
19796
|
+
function useSessionState(sessionId, selector) {
|
|
19797
|
+
const session = useSessionHandle(sessionId);
|
|
19798
|
+
const selectorRef = useRef9(selector);
|
|
19799
|
+
selectorRef.current = selector;
|
|
19800
|
+
const store = useMemo10(() => {
|
|
19801
|
+
let lastState = null;
|
|
19802
|
+
let lastSelector = null;
|
|
19803
|
+
let lastSelected;
|
|
19804
|
+
const getSnapshot = () => {
|
|
19805
|
+
const state = session ? session.getState() : EMPTY_STATE;
|
|
19806
|
+
const current = selectorRef.current;
|
|
19807
|
+
if (state !== lastState || current !== lastSelector) {
|
|
19808
|
+
const next = current(state);
|
|
19809
|
+
if (!(lastState !== null && Object.is(next, lastSelected))) lastSelected = next;
|
|
19810
|
+
lastState = state;
|
|
19811
|
+
lastSelector = current;
|
|
19812
|
+
}
|
|
19813
|
+
return lastSelected;
|
|
19814
|
+
};
|
|
19815
|
+
return {
|
|
19816
|
+
subscribe: session ? (listener) => session.subscribe(listener) : noopSubscribe,
|
|
19817
|
+
getSnapshot
|
|
19818
|
+
};
|
|
19819
|
+
}, [session]);
|
|
19820
|
+
return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
|
19821
|
+
}
|
|
19822
|
+
function useIsSessionHistoryLoading(sessionId) {
|
|
19823
|
+
const source = useSessionSource();
|
|
19824
|
+
return useSyncExternalStore(
|
|
19825
|
+
source.subscribe,
|
|
19826
|
+
() => source.isHistoryLoading(sessionId),
|
|
19827
|
+
() => source.isHistoryLoading(sessionId)
|
|
19828
|
+
);
|
|
19829
|
+
}
|
|
19830
|
+
function usePlanRevealRevision(sessionId) {
|
|
19831
|
+
const source = useSessionSource();
|
|
19832
|
+
return useSyncExternalStore(
|
|
19833
|
+
source.subscribe,
|
|
19834
|
+
() => source.planRevealRevision(sessionId),
|
|
19835
|
+
() => source.planRevealRevision(sessionId)
|
|
19836
|
+
);
|
|
19837
|
+
}
|
|
19838
|
+
var CurrentChatSessionContext = createContext3(null);
|
|
19839
|
+
function CurrentChatSessionProvider({ sessionId, children }) {
|
|
19840
|
+
return /* @__PURE__ */ jsx7(CurrentChatSessionContext.Provider, { value: sessionId, children });
|
|
19841
|
+
}
|
|
19842
|
+
function useCurrentChatSessionId() {
|
|
19843
|
+
return useContext3(CurrentChatSessionContext);
|
|
19844
|
+
}
|
|
19845
|
+
|
|
19846
|
+
// src/chat/runtime/environment.tsx
|
|
19847
|
+
import { createContext as createContext4, useContext as useContext4, useMemo as useMemo11 } from "react";
|
|
19848
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
19849
|
+
var EMPTY_ENVIRONMENT = {};
|
|
19850
|
+
var ChatEnvironmentContext = createContext4(EMPTY_ENVIRONMENT);
|
|
19851
|
+
function ChatEnvironmentProvider({ value, children }) {
|
|
19852
|
+
return /* @__PURE__ */ jsx8(ChatEnvironmentContext.Provider, { value, children });
|
|
19853
|
+
}
|
|
19854
|
+
function useChatEnvironment() {
|
|
19855
|
+
return useContext4(ChatEnvironmentContext);
|
|
19856
|
+
}
|
|
19857
|
+
var NO_HIGHLIGHT = { highlightedHtml: null };
|
|
19858
|
+
function usePlainCode() {
|
|
19859
|
+
return NO_HIGHLIGHT;
|
|
19860
|
+
}
|
|
19861
|
+
function useHighlightedCode(code, language) {
|
|
19862
|
+
const use = useChatEnvironment().useHighlightedCode ?? usePlainCode;
|
|
19863
|
+
return use(code, language);
|
|
19864
|
+
}
|
|
19865
|
+
function useNoDetail() {
|
|
19866
|
+
return null;
|
|
19867
|
+
}
|
|
19868
|
+
function useChatSessionDetail(sessionId) {
|
|
19869
|
+
const use = useChatEnvironment().useSessionDetail ?? useNoDetail;
|
|
19870
|
+
return use(sessionId);
|
|
19871
|
+
}
|
|
19872
|
+
function useShowTodo() {
|
|
19873
|
+
return false;
|
|
19874
|
+
}
|
|
19875
|
+
function useHideTodo() {
|
|
19876
|
+
const use = useChatEnvironment().useHideTodo ?? useShowTodo;
|
|
19877
|
+
return use();
|
|
19878
|
+
}
|
|
19879
|
+
function useChatRenderMode() {
|
|
19880
|
+
return useChatEnvironment().renderMode ?? "normal";
|
|
19881
|
+
}
|
|
19882
|
+
function notifyChat(environment, kind, message, options) {
|
|
19883
|
+
if (environment.notify) environment.notify(kind, message, options);
|
|
19884
|
+
else if (kind === "error") console.error(message);
|
|
19885
|
+
}
|
|
19886
|
+
function useComposerBridge(sessionId) {
|
|
19887
|
+
const environment = useChatEnvironment();
|
|
19888
|
+
const session = useSessionHandle(sessionId);
|
|
19889
|
+
return useMemo11(
|
|
19890
|
+
() => ({
|
|
19891
|
+
appendText(text, separate = false) {
|
|
19892
|
+
if (!sessionId) return;
|
|
19893
|
+
if (environment.appendToComposer) environment.appendToComposer(sessionId, text, separate);
|
|
19894
|
+
else session?.insertText(separate ? `
|
|
19895
|
+
|
|
19896
|
+
${text}` : text);
|
|
19897
|
+
},
|
|
19898
|
+
addContext(context) {
|
|
19899
|
+
if (!sessionId) return;
|
|
19900
|
+
if (environment.addComposerContext) environment.addComposerContext(sessionId, context);
|
|
19901
|
+
else session?.attach(context.label, context.content);
|
|
19902
|
+
}
|
|
19903
|
+
}),
|
|
19904
|
+
[environment, session, sessionId]
|
|
19905
|
+
);
|
|
19906
|
+
}
|
|
19907
|
+
var NO_VIRTUAL_ITEMS = [];
|
|
19908
|
+
var NO_VIRTUALIZER = {
|
|
19909
|
+
getVirtualItems: () => NO_VIRTUAL_ITEMS,
|
|
19910
|
+
getTotalSize: () => 0,
|
|
19911
|
+
measureElement: () => {
|
|
19912
|
+
},
|
|
19913
|
+
scrollToIndex: () => {
|
|
19914
|
+
},
|
|
19915
|
+
getOffsetForIndex: () => void 0
|
|
19916
|
+
};
|
|
19917
|
+
function useNoVirtualizer() {
|
|
19918
|
+
return NO_VIRTUALIZER;
|
|
19919
|
+
}
|
|
19920
|
+
function useChatVirtualizer(options) {
|
|
19921
|
+
const injected = useChatEnvironment().useVirtualizer;
|
|
19922
|
+
const use = injected ?? useNoVirtualizer;
|
|
19923
|
+
const virtualizer = use(options);
|
|
19924
|
+
return { virtualizer, enabled: Boolean(injected) };
|
|
19925
|
+
}
|
|
19926
|
+
|
|
19985
19927
|
// src/chat/runtime/actions.ts
|
|
19986
19928
|
function buildPendingAskUserAnswer(state, message) {
|
|
19987
19929
|
if (state.status !== "waiting_for_input") return void 0;
|
|
@@ -20010,7 +19952,7 @@ function sendToSession(session, message, mode, askUserAnswer, extras = {}) {
|
|
|
20010
19952
|
model: extras.model,
|
|
20011
19953
|
thinkingOverride: extras.thinkingOverride,
|
|
20012
19954
|
reasoningLevel: extras.reasoningLevel,
|
|
20013
|
-
|
|
19955
|
+
refs: extras.refs,
|
|
20014
19956
|
topicAssetRefs: extras.topicAssetRefs,
|
|
20015
19957
|
whatif: extras.whatif,
|
|
20016
19958
|
replayDecision: extras.replayDecision,
|
|
@@ -20089,13 +20031,13 @@ function useComposedRefs(...refs) {
|
|
|
20089
20031
|
|
|
20090
20032
|
// ../../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
|
|
20091
20033
|
import * as React2 from "react";
|
|
20092
|
-
import { jsx as
|
|
20034
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
20093
20035
|
function createContext22(rootComponentName, defaultContext) {
|
|
20094
20036
|
const Context = React2.createContext(defaultContext);
|
|
20095
20037
|
const Provider2 = (props) => {
|
|
20096
20038
|
const { children, ...context } = props;
|
|
20097
20039
|
const value = React2.useMemo(() => context, Object.values(context));
|
|
20098
|
-
return /* @__PURE__ */
|
|
20040
|
+
return /* @__PURE__ */ jsx9(Context.Provider, { value, children });
|
|
20099
20041
|
};
|
|
20100
20042
|
Provider2.displayName = rootComponentName + "Provider";
|
|
20101
20043
|
function useContext22(consumerName) {
|
|
@@ -20116,7 +20058,7 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
20116
20058
|
const { scope, children, ...context } = props;
|
|
20117
20059
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
20118
20060
|
const value = React2.useMemo(() => context, Object.values(context));
|
|
20119
|
-
return /* @__PURE__ */
|
|
20061
|
+
return /* @__PURE__ */ jsx9(Context.Provider, { value, children });
|
|
20120
20062
|
};
|
|
20121
20063
|
Provider2.displayName = rootComponentName + "Provider";
|
|
20122
20064
|
function useContext22(consumerName, scope) {
|
|
@@ -20173,7 +20115,7 @@ import * as ReactDOM from "react-dom";
|
|
|
20173
20115
|
|
|
20174
20116
|
// ../../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
|
|
20175
20117
|
import * as React3 from "react";
|
|
20176
|
-
import { Fragment as Fragment22, jsx as
|
|
20118
|
+
import { Fragment as Fragment22, jsx as jsx10 } from "react/jsx-runtime";
|
|
20177
20119
|
// @__NO_SIDE_EFFECTS__
|
|
20178
20120
|
function createSlot(ownerName) {
|
|
20179
20121
|
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
|
@@ -20191,9 +20133,9 @@ function createSlot(ownerName) {
|
|
|
20191
20133
|
return child;
|
|
20192
20134
|
}
|
|
20193
20135
|
});
|
|
20194
|
-
return /* @__PURE__ */
|
|
20136
|
+
return /* @__PURE__ */ jsx10(SlotClone, { ...slotProps, ref: forwardedRef, children: React3.isValidElement(newElement) ? React3.cloneElement(newElement, void 0, newChildren) : null });
|
|
20195
20137
|
}
|
|
20196
|
-
return /* @__PURE__ */
|
|
20138
|
+
return /* @__PURE__ */ jsx10(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
|
20197
20139
|
});
|
|
20198
20140
|
Slot22.displayName = `${ownerName}.Slot`;
|
|
20199
20141
|
return Slot22;
|
|
@@ -20219,7 +20161,7 @@ var SLOTTABLE_IDENTIFIER = /* @__PURE__ */ Symbol("radix.slottable");
|
|
|
20219
20161
|
// @__NO_SIDE_EFFECTS__
|
|
20220
20162
|
function createSlottable(ownerName) {
|
|
20221
20163
|
const Slottable2 = ({ children }) => {
|
|
20222
|
-
return /* @__PURE__ */
|
|
20164
|
+
return /* @__PURE__ */ jsx10(Fragment22, { children });
|
|
20223
20165
|
};
|
|
20224
20166
|
Slottable2.displayName = `${ownerName}.Slottable`;
|
|
20225
20167
|
Slottable2.__radixId = SLOTTABLE_IDENTIFIER;
|
|
@@ -20267,7 +20209,7 @@ function getElementRef(element) {
|
|
|
20267
20209
|
}
|
|
20268
20210
|
|
|
20269
20211
|
// ../../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
|
|
20270
|
-
import { jsx as
|
|
20212
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
20271
20213
|
var NODES = [
|
|
20272
20214
|
"a",
|
|
20273
20215
|
"button",
|
|
@@ -20295,7 +20237,7 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
20295
20237
|
if (typeof window !== "undefined") {
|
|
20296
20238
|
window[/* @__PURE__ */ Symbol.for("radix-ui")] = true;
|
|
20297
20239
|
}
|
|
20298
|
-
return /* @__PURE__ */
|
|
20240
|
+
return /* @__PURE__ */ jsx11(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
20299
20241
|
});
|
|
20300
20242
|
Node2.displayName = `Primitive.${node}`;
|
|
20301
20243
|
return { ...primitive, [node]: Node2 };
|
|
@@ -20330,7 +20272,7 @@ function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.docum
|
|
|
20330
20272
|
}
|
|
20331
20273
|
|
|
20332
20274
|
// ../../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
|
|
20333
|
-
import { jsx as
|
|
20275
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
20334
20276
|
var DISMISSABLE_LAYER_NAME = "DismissableLayer";
|
|
20335
20277
|
var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
20336
20278
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
@@ -20418,7 +20360,7 @@ var DismissableLayer = React7.forwardRef(
|
|
|
20418
20360
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
20419
20361
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
20420
20362
|
}, []);
|
|
20421
|
-
return /* @__PURE__ */
|
|
20363
|
+
return /* @__PURE__ */ jsx12(
|
|
20422
20364
|
Primitive.div,
|
|
20423
20365
|
{
|
|
20424
20366
|
...layerProps,
|
|
@@ -20452,7 +20394,7 @@ var DismissableLayerBranch = React7.forwardRef((props, forwardedRef) => {
|
|
|
20452
20394
|
};
|
|
20453
20395
|
}
|
|
20454
20396
|
}, [context.branches]);
|
|
20455
|
-
return /* @__PURE__ */
|
|
20397
|
+
return /* @__PURE__ */ jsx12(Primitive.div, { ...props, ref: composedRefs });
|
|
20456
20398
|
});
|
|
20457
20399
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
20458
20400
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
@@ -20564,7 +20506,7 @@ function createFocusGuard() {
|
|
|
20564
20506
|
|
|
20565
20507
|
// ../../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
|
|
20566
20508
|
import * as React9 from "react";
|
|
20567
|
-
import { jsx as
|
|
20509
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
20568
20510
|
var AUTOFOCUS_ON_MOUNT = "focusScope.autoFocusOnMount";
|
|
20569
20511
|
var AUTOFOCUS_ON_UNMOUNT = "focusScope.autoFocusOnUnmount";
|
|
20570
20512
|
var EVENT_OPTIONS = { bubbles: false, cancelable: true };
|
|
@@ -20683,7 +20625,7 @@ var FocusScope = React9.forwardRef((props, forwardedRef) => {
|
|
|
20683
20625
|
},
|
|
20684
20626
|
[loop, trapped, focusScope.paused]
|
|
20685
20627
|
);
|
|
20686
|
-
return /* @__PURE__ */
|
|
20628
|
+
return /* @__PURE__ */ jsx13(Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });
|
|
20687
20629
|
});
|
|
20688
20630
|
FocusScope.displayName = FOCUS_SCOPE_NAME;
|
|
20689
20631
|
function focusFirst(candidates, { select = false } = {}) {
|
|
@@ -22718,11 +22660,11 @@ var arrow3 = (options, deps) => {
|
|
|
22718
22660
|
|
|
22719
22661
|
// ../../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
|
|
22720
22662
|
import * as React13 from "react";
|
|
22721
|
-
import { jsx as
|
|
22663
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
22722
22664
|
var NAME = "Arrow";
|
|
22723
22665
|
var Arrow = React13.forwardRef((props, forwardedRef) => {
|
|
22724
22666
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
22725
|
-
return /* @__PURE__ */
|
|
22667
|
+
return /* @__PURE__ */ jsx14(
|
|
22726
22668
|
Primitive.svg,
|
|
22727
22669
|
{
|
|
22728
22670
|
...arrowProps,
|
|
@@ -22731,7 +22673,7 @@ var Arrow = React13.forwardRef((props, forwardedRef) => {
|
|
|
22731
22673
|
height,
|
|
22732
22674
|
viewBox: "0 0 30 10",
|
|
22733
22675
|
preserveAspectRatio: "none",
|
|
22734
|
-
children: props.asChild ? children : /* @__PURE__ */
|
|
22676
|
+
children: props.asChild ? children : /* @__PURE__ */ jsx14("polygon", { points: "0,0 30,0 15,10" })
|
|
22735
22677
|
}
|
|
22736
22678
|
);
|
|
22737
22679
|
});
|
|
@@ -22776,14 +22718,14 @@ function useSize(element) {
|
|
|
22776
22718
|
}
|
|
22777
22719
|
|
|
22778
22720
|
// ../../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
|
|
22779
|
-
import { jsx as
|
|
22721
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
22780
22722
|
var POPPER_NAME = "Popper";
|
|
22781
22723
|
var [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);
|
|
22782
22724
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
22783
22725
|
var Popper = (props) => {
|
|
22784
22726
|
const { __scopePopper, children } = props;
|
|
22785
22727
|
const [anchor, setAnchor] = React15.useState(null);
|
|
22786
|
-
return /* @__PURE__ */
|
|
22728
|
+
return /* @__PURE__ */ jsx15(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
22787
22729
|
};
|
|
22788
22730
|
Popper.displayName = POPPER_NAME;
|
|
22789
22731
|
var ANCHOR_NAME = "PopperAnchor";
|
|
@@ -22801,7 +22743,7 @@ var PopperAnchor = React15.forwardRef(
|
|
|
22801
22743
|
context.onAnchorChange(anchorRef.current);
|
|
22802
22744
|
}
|
|
22803
22745
|
});
|
|
22804
|
-
return virtualRef ? null : /* @__PURE__ */
|
|
22746
|
+
return virtualRef ? null : /* @__PURE__ */ jsx15(Primitive.div, { ...anchorProps, ref: composedRefs });
|
|
22805
22747
|
}
|
|
22806
22748
|
);
|
|
22807
22749
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
@@ -22894,7 +22836,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22894
22836
|
useLayoutEffect22(() => {
|
|
22895
22837
|
if (content) setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
22896
22838
|
}, [content]);
|
|
22897
|
-
return /* @__PURE__ */
|
|
22839
|
+
return /* @__PURE__ */ jsx15(
|
|
22898
22840
|
"div",
|
|
22899
22841
|
{
|
|
22900
22842
|
ref: refs.setFloating,
|
|
@@ -22918,7 +22860,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22918
22860
|
}
|
|
22919
22861
|
},
|
|
22920
22862
|
dir: props.dir,
|
|
22921
|
-
children: /* @__PURE__ */
|
|
22863
|
+
children: /* @__PURE__ */ jsx15(
|
|
22922
22864
|
PopperContentProvider,
|
|
22923
22865
|
{
|
|
22924
22866
|
scope: __scopePopper,
|
|
@@ -22927,7 +22869,7 @@ var PopperContent = React15.forwardRef(
|
|
|
22927
22869
|
arrowX,
|
|
22928
22870
|
arrowY,
|
|
22929
22871
|
shouldHideArrow: cannotCenterArrow,
|
|
22930
|
-
children: /* @__PURE__ */
|
|
22872
|
+
children: /* @__PURE__ */ jsx15(
|
|
22931
22873
|
Primitive.div,
|
|
22932
22874
|
{
|
|
22933
22875
|
"data-side": placedSide,
|
|
@@ -22964,7 +22906,7 @@ var PopperArrow = React15.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
22964
22906
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
22965
22907
|
// doesn't report size as we'd expect on SVG elements.
|
|
22966
22908
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
22967
|
-
/* @__PURE__ */
|
|
22909
|
+
/* @__PURE__ */ jsx15(
|
|
22968
22910
|
"span",
|
|
22969
22911
|
{
|
|
22970
22912
|
ref: contentContext.onArrowChange,
|
|
@@ -22987,7 +22929,7 @@ var PopperArrow = React15.forwardRef(function PopperArrow2(props, forwardedRef)
|
|
|
22987
22929
|
}[contentContext.placedSide],
|
|
22988
22930
|
visibility: contentContext.shouldHideArrow ? "hidden" : void 0
|
|
22989
22931
|
},
|
|
22990
|
-
children: /* @__PURE__ */
|
|
22932
|
+
children: /* @__PURE__ */ jsx15(
|
|
22991
22933
|
Root,
|
|
22992
22934
|
{
|
|
22993
22935
|
...arrowProps,
|
|
@@ -23050,14 +22992,14 @@ var Arrow2 = PopperArrow;
|
|
|
23050
22992
|
// ../../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
|
|
23051
22993
|
import * as React16 from "react";
|
|
23052
22994
|
import ReactDOM3 from "react-dom";
|
|
23053
|
-
import { jsx as
|
|
22995
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
23054
22996
|
var PORTAL_NAME = "Portal";
|
|
23055
22997
|
var Portal = React16.forwardRef((props, forwardedRef) => {
|
|
23056
22998
|
const { container: containerProp, ...portalProps } = props;
|
|
23057
22999
|
const [mounted, setMounted] = React16.useState(false);
|
|
23058
23000
|
useLayoutEffect22(() => setMounted(true), []);
|
|
23059
23001
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
23060
|
-
return container ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
23002
|
+
return container ? ReactDOM3.createPortal(/* @__PURE__ */ jsx16(Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
23061
23003
|
});
|
|
23062
23004
|
Portal.displayName = PORTAL_NAME;
|
|
23063
23005
|
|
|
@@ -24097,7 +24039,7 @@ ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
|
24097
24039
|
var Combination_default = ReactRemoveScroll;
|
|
24098
24040
|
|
|
24099
24041
|
// ../../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
|
|
24100
|
-
import { jsx as
|
|
24042
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
24101
24043
|
var POPOVER_NAME = "Popover";
|
|
24102
24044
|
var [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [
|
|
24103
24045
|
createPopperScope
|
|
@@ -24122,7 +24064,7 @@ var Popover = (props) => {
|
|
|
24122
24064
|
onChange: onOpenChange,
|
|
24123
24065
|
caller: POPOVER_NAME
|
|
24124
24066
|
});
|
|
24125
|
-
return /* @__PURE__ */
|
|
24067
|
+
return /* @__PURE__ */ jsx17(Root2, { ...popperScope, children: /* @__PURE__ */ jsx17(
|
|
24126
24068
|
PopoverProvider,
|
|
24127
24069
|
{
|
|
24128
24070
|
scope: __scopePopover,
|
|
@@ -24151,7 +24093,7 @@ var PopoverAnchor = React28.forwardRef(
|
|
|
24151
24093
|
onCustomAnchorAdd();
|
|
24152
24094
|
return () => onCustomAnchorRemove();
|
|
24153
24095
|
}, [onCustomAnchorAdd, onCustomAnchorRemove]);
|
|
24154
|
-
return /* @__PURE__ */
|
|
24096
|
+
return /* @__PURE__ */ jsx17(Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });
|
|
24155
24097
|
}
|
|
24156
24098
|
);
|
|
24157
24099
|
PopoverAnchor.displayName = ANCHOR_NAME2;
|
|
@@ -24162,7 +24104,7 @@ var PopoverTrigger = React28.forwardRef(
|
|
|
24162
24104
|
const context = usePopoverContext(TRIGGER_NAME, __scopePopover);
|
|
24163
24105
|
const popperScope = usePopperScope(__scopePopover);
|
|
24164
24106
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
24165
|
-
const trigger = /* @__PURE__ */
|
|
24107
|
+
const trigger = /* @__PURE__ */ jsx17(
|
|
24166
24108
|
Primitive.button,
|
|
24167
24109
|
{
|
|
24168
24110
|
type: "button",
|
|
@@ -24175,7 +24117,7 @@ var PopoverTrigger = React28.forwardRef(
|
|
|
24175
24117
|
onClick: composeEventHandlers(props.onClick, context.onOpenToggle)
|
|
24176
24118
|
}
|
|
24177
24119
|
);
|
|
24178
|
-
return context.hasCustomAnchor ? trigger : /* @__PURE__ */
|
|
24120
|
+
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx17(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
24179
24121
|
}
|
|
24180
24122
|
);
|
|
24181
24123
|
PopoverTrigger.displayName = TRIGGER_NAME;
|
|
@@ -24186,7 +24128,7 @@ var [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME2, {
|
|
|
24186
24128
|
var PopoverPortal = (props) => {
|
|
24187
24129
|
const { __scopePopover, forceMount, children, container } = props;
|
|
24188
24130
|
const context = usePopoverContext(PORTAL_NAME2, __scopePopover);
|
|
24189
|
-
return /* @__PURE__ */
|
|
24131
|
+
return /* @__PURE__ */ jsx17(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx17(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx17(Portal, { asChild: true, container, children }) }) });
|
|
24190
24132
|
};
|
|
24191
24133
|
PopoverPortal.displayName = PORTAL_NAME2;
|
|
24192
24134
|
var CONTENT_NAME2 = "PopoverContent";
|
|
@@ -24195,7 +24137,7 @@ var PopoverContent = React28.forwardRef(
|
|
|
24195
24137
|
const portalContext = usePortalContext(CONTENT_NAME2, props.__scopePopover);
|
|
24196
24138
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
24197
24139
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
24198
|
-
return /* @__PURE__ */
|
|
24140
|
+
return /* @__PURE__ */ jsx17(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx17(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx17(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
24199
24141
|
}
|
|
24200
24142
|
);
|
|
24201
24143
|
PopoverContent.displayName = CONTENT_NAME2;
|
|
@@ -24210,7 +24152,7 @@ var PopoverContentModal = React28.forwardRef(
|
|
|
24210
24152
|
const content = contentRef.current;
|
|
24211
24153
|
if (content) return hideOthers(content);
|
|
24212
24154
|
}, []);
|
|
24213
|
-
return /* @__PURE__ */
|
|
24155
|
+
return /* @__PURE__ */ jsx17(Combination_default, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx17(
|
|
24214
24156
|
PopoverContentImpl,
|
|
24215
24157
|
{
|
|
24216
24158
|
...props,
|
|
@@ -24245,7 +24187,7 @@ var PopoverContentNonModal = React28.forwardRef(
|
|
|
24245
24187
|
const context = usePopoverContext(CONTENT_NAME2, props.__scopePopover);
|
|
24246
24188
|
const hasInteractedOutsideRef = React28.useRef(false);
|
|
24247
24189
|
const hasPointerDownOutsideRef = React28.useRef(false);
|
|
24248
|
-
return /* @__PURE__ */
|
|
24190
|
+
return /* @__PURE__ */ jsx17(
|
|
24249
24191
|
PopoverContentImpl,
|
|
24250
24192
|
{
|
|
24251
24193
|
...props,
|
|
@@ -24297,7 +24239,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24297
24239
|
const context = usePopoverContext(CONTENT_NAME2, __scopePopover);
|
|
24298
24240
|
const popperScope = usePopperScope(__scopePopover);
|
|
24299
24241
|
useFocusGuards();
|
|
24300
|
-
return /* @__PURE__ */
|
|
24242
|
+
return /* @__PURE__ */ jsx17(
|
|
24301
24243
|
FocusScope,
|
|
24302
24244
|
{
|
|
24303
24245
|
asChild: true,
|
|
@@ -24305,7 +24247,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24305
24247
|
trapped: trapFocus,
|
|
24306
24248
|
onMountAutoFocus: onOpenAutoFocus,
|
|
24307
24249
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
24308
|
-
children: /* @__PURE__ */
|
|
24250
|
+
children: /* @__PURE__ */ jsx17(
|
|
24309
24251
|
DismissableLayer,
|
|
24310
24252
|
{
|
|
24311
24253
|
asChild: true,
|
|
@@ -24315,7 +24257,7 @@ var PopoverContentImpl = React28.forwardRef(
|
|
|
24315
24257
|
onPointerDownOutside,
|
|
24316
24258
|
onFocusOutside,
|
|
24317
24259
|
onDismiss: () => context.onOpenChange(false),
|
|
24318
|
-
children: /* @__PURE__ */
|
|
24260
|
+
children: /* @__PURE__ */ jsx17(
|
|
24319
24261
|
Content,
|
|
24320
24262
|
{
|
|
24321
24263
|
"data-state": getState(context.open),
|
|
@@ -24348,7 +24290,7 @@ var PopoverClose = React28.forwardRef(
|
|
|
24348
24290
|
(props, forwardedRef) => {
|
|
24349
24291
|
const { __scopePopover, ...closeProps } = props;
|
|
24350
24292
|
const context = usePopoverContext(CLOSE_NAME, __scopePopover);
|
|
24351
|
-
return /* @__PURE__ */
|
|
24293
|
+
return /* @__PURE__ */ jsx17(
|
|
24352
24294
|
Primitive.button,
|
|
24353
24295
|
{
|
|
24354
24296
|
type: "button",
|
|
@@ -24365,7 +24307,7 @@ var PopoverArrow = React28.forwardRef(
|
|
|
24365
24307
|
(props, forwardedRef) => {
|
|
24366
24308
|
const { __scopePopover, ...arrowProps } = props;
|
|
24367
24309
|
const popperScope = usePopperScope(__scopePopover);
|
|
24368
|
-
return /* @__PURE__ */
|
|
24310
|
+
return /* @__PURE__ */ jsx17(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
24369
24311
|
}
|
|
24370
24312
|
);
|
|
24371
24313
|
PopoverArrow.displayName = ARROW_NAME2;
|
|
@@ -24401,7 +24343,7 @@ import * as React30 from "react";
|
|
|
24401
24343
|
|
|
24402
24344
|
// ../../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
|
|
24403
24345
|
import * as React29 from "react";
|
|
24404
|
-
import { jsx as
|
|
24346
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
24405
24347
|
var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
24406
24348
|
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
24407
24349
|
position: "absolute",
|
|
@@ -24418,7 +24360,7 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
24418
24360
|
var NAME2 = "VisuallyHidden";
|
|
24419
24361
|
var VisuallyHidden = React29.forwardRef(
|
|
24420
24362
|
(props, forwardedRef) => {
|
|
24421
|
-
return /* @__PURE__ */
|
|
24363
|
+
return /* @__PURE__ */ jsx18(
|
|
24422
24364
|
Primitive.span,
|
|
24423
24365
|
{
|
|
24424
24366
|
...props,
|
|
@@ -24432,7 +24374,7 @@ VisuallyHidden.displayName = NAME2;
|
|
|
24432
24374
|
var Root3 = VisuallyHidden;
|
|
24433
24375
|
|
|
24434
24376
|
// ../../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
|
|
24435
|
-
import { jsx as
|
|
24377
|
+
import { jsx as jsx19, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
24436
24378
|
var [createTooltipContext, createTooltipScope] = createContextScope("Tooltip", [
|
|
24437
24379
|
createPopperScope
|
|
24438
24380
|
]);
|
|
@@ -24456,7 +24398,7 @@ var TooltipProvider = (props) => {
|
|
|
24456
24398
|
const skipDelayTimer = skipDelayTimerRef.current;
|
|
24457
24399
|
return () => window.clearTimeout(skipDelayTimer);
|
|
24458
24400
|
}, []);
|
|
24459
|
-
return /* @__PURE__ */
|
|
24401
|
+
return /* @__PURE__ */ jsx19(
|
|
24460
24402
|
TooltipProviderContextProvider,
|
|
24461
24403
|
{
|
|
24462
24404
|
scope: __scopeTooltip,
|
|
@@ -24547,7 +24489,7 @@ var Tooltip = (props) => {
|
|
|
24547
24489
|
}
|
|
24548
24490
|
};
|
|
24549
24491
|
}, []);
|
|
24550
|
-
return /* @__PURE__ */
|
|
24492
|
+
return /* @__PURE__ */ jsx19(Root2, { ...popperScope, children: /* @__PURE__ */ jsx19(
|
|
24551
24493
|
TooltipContextProvider,
|
|
24552
24494
|
{
|
|
24553
24495
|
scope: __scopeTooltip,
|
|
@@ -24591,7 +24533,7 @@ var TooltipTrigger = React30.forwardRef(
|
|
|
24591
24533
|
React30.useEffect(() => {
|
|
24592
24534
|
return () => document.removeEventListener("pointerup", handlePointerUp);
|
|
24593
24535
|
}, [handlePointerUp]);
|
|
24594
|
-
return /* @__PURE__ */
|
|
24536
|
+
return /* @__PURE__ */ jsx19(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx19(
|
|
24595
24537
|
Primitive.button,
|
|
24596
24538
|
{
|
|
24597
24539
|
"aria-describedby": context.open ? context.contentId : void 0,
|
|
@@ -24633,7 +24575,7 @@ var [PortalProvider2, usePortalContext2] = createTooltipContext(PORTAL_NAME3, {
|
|
|
24633
24575
|
var TooltipPortal = (props) => {
|
|
24634
24576
|
const { __scopeTooltip, forceMount, children, container } = props;
|
|
24635
24577
|
const context = useTooltipContext(PORTAL_NAME3, __scopeTooltip);
|
|
24636
|
-
return /* @__PURE__ */
|
|
24578
|
+
return /* @__PURE__ */ jsx19(PortalProvider2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx19(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx19(Portal, { asChild: true, container, children }) }) });
|
|
24637
24579
|
};
|
|
24638
24580
|
TooltipPortal.displayName = PORTAL_NAME3;
|
|
24639
24581
|
var CONTENT_NAME3 = "TooltipContent";
|
|
@@ -24642,7 +24584,7 @@ var TooltipContent = React30.forwardRef(
|
|
|
24642
24584
|
const portalContext = usePortalContext2(CONTENT_NAME3, props.__scopeTooltip);
|
|
24643
24585
|
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props;
|
|
24644
24586
|
const context = useTooltipContext(CONTENT_NAME3, props.__scopeTooltip);
|
|
24645
|
-
return /* @__PURE__ */
|
|
24587
|
+
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 }) });
|
|
24646
24588
|
}
|
|
24647
24589
|
);
|
|
24648
24590
|
var TooltipContentHoverable = React30.forwardRef((props, forwardedRef) => {
|
|
@@ -24704,7 +24646,7 @@ var TooltipContentHoverable = React30.forwardRef((props, forwardedRef) => {
|
|
|
24704
24646
|
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
24705
24647
|
}
|
|
24706
24648
|
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
24707
|
-
return /* @__PURE__ */
|
|
24649
|
+
return /* @__PURE__ */ jsx19(TooltipContentImpl, { ...props, ref: composedRefs });
|
|
24708
24650
|
});
|
|
24709
24651
|
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
24710
24652
|
var Slottable = createSlottable("TooltipContent");
|
|
@@ -24735,7 +24677,7 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24735
24677
|
return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
|
|
24736
24678
|
}
|
|
24737
24679
|
}, [context.trigger, onClose]);
|
|
24738
|
-
return /* @__PURE__ */
|
|
24680
|
+
return /* @__PURE__ */ jsx19(
|
|
24739
24681
|
DismissableLayer,
|
|
24740
24682
|
{
|
|
24741
24683
|
asChild: true,
|
|
@@ -24763,8 +24705,8 @@ var TooltipContentImpl = React30.forwardRef(
|
|
|
24763
24705
|
}
|
|
24764
24706
|
},
|
|
24765
24707
|
children: [
|
|
24766
|
-
/* @__PURE__ */
|
|
24767
|
-
/* @__PURE__ */
|
|
24708
|
+
/* @__PURE__ */ jsx19(Slottable, { children }),
|
|
24709
|
+
/* @__PURE__ */ jsx19(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx19(Root3, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
24768
24710
|
]
|
|
24769
24711
|
}
|
|
24770
24712
|
)
|
|
@@ -24782,7 +24724,7 @@ var TooltipArrow = React30.forwardRef(
|
|
|
24782
24724
|
ARROW_NAME3,
|
|
24783
24725
|
__scopeTooltip
|
|
24784
24726
|
);
|
|
24785
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */
|
|
24727
|
+
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx19(Arrow2, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
24786
24728
|
}
|
|
24787
24729
|
);
|
|
24788
24730
|
TooltipArrow.displayName = ARROW_NAME3;
|
|
@@ -24920,7 +24862,7 @@ __export(dist_exports6, {
|
|
|
24920
24862
|
createCollapsibleScope: () => createCollapsibleScope
|
|
24921
24863
|
});
|
|
24922
24864
|
import * as React31 from "react";
|
|
24923
|
-
import { jsx as
|
|
24865
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
24924
24866
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
24925
24867
|
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
24926
24868
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
@@ -24940,7 +24882,7 @@ var Collapsible = React31.forwardRef(
|
|
|
24940
24882
|
onChange: onOpenChange,
|
|
24941
24883
|
caller: COLLAPSIBLE_NAME
|
|
24942
24884
|
});
|
|
24943
|
-
return /* @__PURE__ */
|
|
24885
|
+
return /* @__PURE__ */ jsx20(
|
|
24944
24886
|
CollapsibleProvider,
|
|
24945
24887
|
{
|
|
24946
24888
|
scope: __scopeCollapsible,
|
|
@@ -24948,7 +24890,7 @@ var Collapsible = React31.forwardRef(
|
|
|
24948
24890
|
contentId: useId(),
|
|
24949
24891
|
open,
|
|
24950
24892
|
onOpenToggle: React31.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
24951
|
-
children: /* @__PURE__ */
|
|
24893
|
+
children: /* @__PURE__ */ jsx20(
|
|
24952
24894
|
Primitive.div,
|
|
24953
24895
|
{
|
|
24954
24896
|
"data-state": getState2(open),
|
|
@@ -24967,7 +24909,7 @@ var CollapsibleTrigger = React31.forwardRef(
|
|
|
24967
24909
|
(props, forwardedRef) => {
|
|
24968
24910
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
24969
24911
|
const context = useCollapsibleContext(TRIGGER_NAME3, __scopeCollapsible);
|
|
24970
|
-
return /* @__PURE__ */
|
|
24912
|
+
return /* @__PURE__ */ jsx20(
|
|
24971
24913
|
Primitive.button,
|
|
24972
24914
|
{
|
|
24973
24915
|
type: "button",
|
|
@@ -24989,7 +24931,7 @@ var CollapsibleContent = React31.forwardRef(
|
|
|
24989
24931
|
(props, forwardedRef) => {
|
|
24990
24932
|
const { forceMount, ...contentProps } = props;
|
|
24991
24933
|
const context = useCollapsibleContext(CONTENT_NAME4, props.__scopeCollapsible);
|
|
24992
|
-
return /* @__PURE__ */
|
|
24934
|
+
return /* @__PURE__ */ jsx20(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx20(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
24993
24935
|
}
|
|
24994
24936
|
);
|
|
24995
24937
|
CollapsibleContent.displayName = CONTENT_NAME4;
|
|
@@ -25029,7 +24971,7 @@ var CollapsibleContentImpl = React31.forwardRef((props, forwardedRef) => {
|
|
|
25029
24971
|
setIsPresent(present);
|
|
25030
24972
|
}
|
|
25031
24973
|
}, [context.open, present]);
|
|
25032
|
-
return /* @__PURE__ */
|
|
24974
|
+
return /* @__PURE__ */ jsx20(
|
|
25033
24975
|
Primitive.div,
|
|
25034
24976
|
{
|
|
25035
24977
|
"data-state": getState2(context.open),
|
|
@@ -25077,7 +25019,7 @@ __export(dist_exports7, {
|
|
|
25077
25019
|
createDialogScope: () => createDialogScope
|
|
25078
25020
|
});
|
|
25079
25021
|
import * as React32 from "react";
|
|
25080
|
-
import { Fragment as Fragment7, jsx as
|
|
25022
|
+
import { Fragment as Fragment7, jsx as jsx21, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
25081
25023
|
var DIALOG_NAME = "Dialog";
|
|
25082
25024
|
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
25083
25025
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
@@ -25098,7 +25040,7 @@ var Dialog = (props) => {
|
|
|
25098
25040
|
onChange: onOpenChange,
|
|
25099
25041
|
caller: DIALOG_NAME
|
|
25100
25042
|
});
|
|
25101
|
-
return /* @__PURE__ */
|
|
25043
|
+
return /* @__PURE__ */ jsx21(
|
|
25102
25044
|
DialogProvider,
|
|
25103
25045
|
{
|
|
25104
25046
|
scope: __scopeDialog,
|
|
@@ -25122,7 +25064,7 @@ var DialogTrigger = React32.forwardRef(
|
|
|
25122
25064
|
const { __scopeDialog, ...triggerProps } = props;
|
|
25123
25065
|
const context = useDialogContext(TRIGGER_NAME4, __scopeDialog);
|
|
25124
25066
|
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
25125
|
-
return /* @__PURE__ */
|
|
25067
|
+
return /* @__PURE__ */ jsx21(
|
|
25126
25068
|
Primitive.button,
|
|
25127
25069
|
{
|
|
25128
25070
|
type: "button",
|
|
@@ -25145,7 +25087,7 @@ var [PortalProvider3, usePortalContext3] = createDialogContext(PORTAL_NAME4, {
|
|
|
25145
25087
|
var DialogPortal = (props) => {
|
|
25146
25088
|
const { __scopeDialog, forceMount, children, container } = props;
|
|
25147
25089
|
const context = useDialogContext(PORTAL_NAME4, __scopeDialog);
|
|
25148
|
-
return /* @__PURE__ */
|
|
25090
|
+
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 }) })) });
|
|
25149
25091
|
};
|
|
25150
25092
|
DialogPortal.displayName = PORTAL_NAME4;
|
|
25151
25093
|
var OVERLAY_NAME = "DialogOverlay";
|
|
@@ -25154,7 +25096,7 @@ var DialogOverlay = React32.forwardRef(
|
|
|
25154
25096
|
const portalContext = usePortalContext3(OVERLAY_NAME, props.__scopeDialog);
|
|
25155
25097
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
25156
25098
|
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
25157
|
-
return context.modal ? /* @__PURE__ */
|
|
25099
|
+
return context.modal ? /* @__PURE__ */ jsx21(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx21(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
25158
25100
|
}
|
|
25159
25101
|
);
|
|
25160
25102
|
DialogOverlay.displayName = OVERLAY_NAME;
|
|
@@ -25166,7 +25108,7 @@ var DialogOverlayImpl = React32.forwardRef(
|
|
|
25166
25108
|
return (
|
|
25167
25109
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
25168
25110
|
// ie. when `Overlay` and `Content` are siblings
|
|
25169
|
-
/* @__PURE__ */
|
|
25111
|
+
/* @__PURE__ */ jsx21(Combination_default, { as: Slot2, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx21(
|
|
25170
25112
|
Primitive.div,
|
|
25171
25113
|
{
|
|
25172
25114
|
"data-state": getState3(context.open),
|
|
@@ -25184,7 +25126,7 @@ var DialogContent = React32.forwardRef(
|
|
|
25184
25126
|
const portalContext = usePortalContext3(CONTENT_NAME5, props.__scopeDialog);
|
|
25185
25127
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
25186
25128
|
const context = useDialogContext(CONTENT_NAME5, props.__scopeDialog);
|
|
25187
|
-
return /* @__PURE__ */
|
|
25129
|
+
return /* @__PURE__ */ jsx21(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx21(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx21(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
25188
25130
|
}
|
|
25189
25131
|
);
|
|
25190
25132
|
DialogContent.displayName = CONTENT_NAME5;
|
|
@@ -25197,7 +25139,7 @@ var DialogContentModal = React32.forwardRef(
|
|
|
25197
25139
|
const content = contentRef.current;
|
|
25198
25140
|
if (content) return hideOthers(content);
|
|
25199
25141
|
}, []);
|
|
25200
|
-
return /* @__PURE__ */
|
|
25142
|
+
return /* @__PURE__ */ jsx21(
|
|
25201
25143
|
DialogContentImpl,
|
|
25202
25144
|
{
|
|
25203
25145
|
...props,
|
|
@@ -25227,7 +25169,7 @@ var DialogContentNonModal = React32.forwardRef(
|
|
|
25227
25169
|
const context = useDialogContext(CONTENT_NAME5, props.__scopeDialog);
|
|
25228
25170
|
const hasInteractedOutsideRef = React32.useRef(false);
|
|
25229
25171
|
const hasPointerDownOutsideRef = React32.useRef(false);
|
|
25230
|
-
return /* @__PURE__ */
|
|
25172
|
+
return /* @__PURE__ */ jsx21(
|
|
25231
25173
|
DialogContentImpl,
|
|
25232
25174
|
{
|
|
25233
25175
|
...props,
|
|
@@ -25270,7 +25212,7 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25270
25212
|
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
25271
25213
|
useFocusGuards();
|
|
25272
25214
|
return /* @__PURE__ */ jsxs6(Fragment7, { children: [
|
|
25273
|
-
/* @__PURE__ */
|
|
25215
|
+
/* @__PURE__ */ jsx21(
|
|
25274
25216
|
FocusScope,
|
|
25275
25217
|
{
|
|
25276
25218
|
asChild: true,
|
|
@@ -25278,7 +25220,7 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25278
25220
|
trapped: trapFocus,
|
|
25279
25221
|
onMountAutoFocus: onOpenAutoFocus,
|
|
25280
25222
|
onUnmountAutoFocus: onCloseAutoFocus,
|
|
25281
|
-
children: /* @__PURE__ */
|
|
25223
|
+
children: /* @__PURE__ */ jsx21(
|
|
25282
25224
|
DismissableLayer,
|
|
25283
25225
|
{
|
|
25284
25226
|
role: "dialog",
|
|
@@ -25294,8 +25236,8 @@ var DialogContentImpl = React32.forwardRef(
|
|
|
25294
25236
|
}
|
|
25295
25237
|
),
|
|
25296
25238
|
/* @__PURE__ */ jsxs6(Fragment7, { children: [
|
|
25297
|
-
/* @__PURE__ */
|
|
25298
|
-
/* @__PURE__ */
|
|
25239
|
+
/* @__PURE__ */ jsx21(TitleWarning, { titleId: context.titleId }),
|
|
25240
|
+
/* @__PURE__ */ jsx21(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
25299
25241
|
] })
|
|
25300
25242
|
] });
|
|
25301
25243
|
}
|
|
@@ -25305,7 +25247,7 @@ var DialogTitle = React32.forwardRef(
|
|
|
25305
25247
|
(props, forwardedRef) => {
|
|
25306
25248
|
const { __scopeDialog, ...titleProps } = props;
|
|
25307
25249
|
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
25308
|
-
return /* @__PURE__ */
|
|
25250
|
+
return /* @__PURE__ */ jsx21(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
25309
25251
|
}
|
|
25310
25252
|
);
|
|
25311
25253
|
DialogTitle.displayName = TITLE_NAME;
|
|
@@ -25314,7 +25256,7 @@ var DialogDescription = React32.forwardRef(
|
|
|
25314
25256
|
(props, forwardedRef) => {
|
|
25315
25257
|
const { __scopeDialog, ...descriptionProps } = props;
|
|
25316
25258
|
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
25317
|
-
return /* @__PURE__ */
|
|
25259
|
+
return /* @__PURE__ */ jsx21(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
25318
25260
|
}
|
|
25319
25261
|
);
|
|
25320
25262
|
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
@@ -25323,7 +25265,7 @@ var DialogClose = React32.forwardRef(
|
|
|
25323
25265
|
(props, forwardedRef) => {
|
|
25324
25266
|
const { __scopeDialog, ...closeProps } = props;
|
|
25325
25267
|
const context = useDialogContext(CLOSE_NAME2, __scopeDialog);
|
|
25326
|
-
return /* @__PURE__ */
|
|
25268
|
+
return /* @__PURE__ */ jsx21(
|
|
25327
25269
|
Primitive.button,
|
|
25328
25270
|
{
|
|
25329
25271
|
type: "button",
|
|
@@ -26572,16 +26514,16 @@ var cn2 = /* @__PURE__ */ wrapClsx(instance.mergeString, instance);
|
|
|
26572
26514
|
var twMerge2 = instance.merge;
|
|
26573
26515
|
|
|
26574
26516
|
// ../ui/src/components/dialog.tsx
|
|
26575
|
-
import { jsx as
|
|
26517
|
+
import { jsx as jsx22, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
26576
26518
|
function Dialog2({
|
|
26577
26519
|
...props
|
|
26578
26520
|
}) {
|
|
26579
|
-
return /* @__PURE__ */
|
|
26521
|
+
return /* @__PURE__ */ jsx22(dist_exports7.Root, { "data-slot": "dialog", ...props });
|
|
26580
26522
|
}
|
|
26581
26523
|
function DialogClose2({
|
|
26582
26524
|
...props
|
|
26583
26525
|
}) {
|
|
26584
|
-
return /* @__PURE__ */
|
|
26526
|
+
return /* @__PURE__ */ jsx22(dist_exports7.Close, { "data-slot": "dialog-close", ...props });
|
|
26585
26527
|
}
|
|
26586
26528
|
|
|
26587
26529
|
// ../ui/src/composites/dialog.tsx
|
|
@@ -26621,9 +26563,9 @@ function loopTabInShadowRoot(event) {
|
|
|
26621
26563
|
}
|
|
26622
26564
|
|
|
26623
26565
|
// ../ui/src/composites/dialog.tsx
|
|
26624
|
-
import { jsx as
|
|
26566
|
+
import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26625
26567
|
var DialogOverlay2 = forwardRef17(function DialogOverlay3({ className, ...props }, ref) {
|
|
26626
|
-
return /* @__PURE__ */
|
|
26568
|
+
return /* @__PURE__ */ jsx23(
|
|
26627
26569
|
dist_exports7.Overlay,
|
|
26628
26570
|
{
|
|
26629
26571
|
ref,
|
|
@@ -26646,7 +26588,7 @@ function DialogContent2({
|
|
|
26646
26588
|
}) {
|
|
26647
26589
|
const overlayRoot = useOverlayRoot();
|
|
26648
26590
|
return /* @__PURE__ */ jsxs8(dist_exports7.Portal, { "data-slot": "dialog-portal", container: overlayRoot, children: [
|
|
26649
|
-
/* @__PURE__ */
|
|
26591
|
+
/* @__PURE__ */ jsx23(DialogOverlay2, { className: overlayClassName }),
|
|
26650
26592
|
/* @__PURE__ */ jsxs8(
|
|
26651
26593
|
dist_exports7.Content,
|
|
26652
26594
|
{
|
|
@@ -26668,8 +26610,8 @@ function DialogContent2({
|
|
|
26668
26610
|
"data-slot": "dialog-close",
|
|
26669
26611
|
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",
|
|
26670
26612
|
children: [
|
|
26671
|
-
/* @__PURE__ */
|
|
26672
|
-
/* @__PURE__ */
|
|
26613
|
+
/* @__PURE__ */ jsx23(X, { size: 16 }),
|
|
26614
|
+
/* @__PURE__ */ jsx23("span", { className: "sr-only", children: "\u5173\u95ED" })
|
|
26673
26615
|
]
|
|
26674
26616
|
}
|
|
26675
26617
|
)
|
|
@@ -26679,7 +26621,7 @@ function DialogContent2({
|
|
|
26679
26621
|
] });
|
|
26680
26622
|
}
|
|
26681
26623
|
function DialogTitle2({ className, ...props }) {
|
|
26682
|
-
return /* @__PURE__ */
|
|
26624
|
+
return /* @__PURE__ */ jsx23(
|
|
26683
26625
|
dist_exports7.Title,
|
|
26684
26626
|
{
|
|
26685
26627
|
"data-slot": "dialog-title",
|
|
@@ -26692,7 +26634,7 @@ function DialogDescription2({
|
|
|
26692
26634
|
className,
|
|
26693
26635
|
...props
|
|
26694
26636
|
}) {
|
|
26695
|
-
return /* @__PURE__ */
|
|
26637
|
+
return /* @__PURE__ */ jsx23(
|
|
26696
26638
|
dist_exports7.Description,
|
|
26697
26639
|
{
|
|
26698
26640
|
"data-slot": "dialog-description",
|
|
@@ -26805,7 +26747,6 @@ export {
|
|
|
26805
26747
|
Plug,
|
|
26806
26748
|
Plus,
|
|
26807
26749
|
RefreshCcw,
|
|
26808
|
-
RefreshCw,
|
|
26809
26750
|
Rocket,
|
|
26810
26751
|
RotateCcw,
|
|
26811
26752
|
Scissors,
|
|
@@ -26823,27 +26764,6 @@ export {
|
|
|
26823
26764
|
X,
|
|
26824
26765
|
cn,
|
|
26825
26766
|
copyToClipboard,
|
|
26826
|
-
ChatEnvironmentProvider,
|
|
26827
|
-
useChatEnvironment,
|
|
26828
|
-
useHighlightedCode,
|
|
26829
|
-
useChatSessionDetail,
|
|
26830
|
-
useHideTodo,
|
|
26831
|
-
useChatRenderMode,
|
|
26832
|
-
notifyChat,
|
|
26833
|
-
useComposerBridge,
|
|
26834
|
-
useChatVirtualizer,
|
|
26835
|
-
getResultText,
|
|
26836
|
-
getResultImages,
|
|
26837
|
-
parseJsonValue,
|
|
26838
|
-
isPlainObject,
|
|
26839
|
-
getStringValue,
|
|
26840
|
-
getNumberValue,
|
|
26841
|
-
getBooleanValue,
|
|
26842
|
-
extractErrorMessage,
|
|
26843
|
-
getFileName,
|
|
26844
|
-
formatBytes,
|
|
26845
|
-
CodePreview,
|
|
26846
|
-
parseKbSearchResult,
|
|
26847
26767
|
getToolDescription,
|
|
26848
26768
|
formatToolFileName,
|
|
26849
26769
|
formatToolName,
|
|
@@ -26867,6 +26787,19 @@ export {
|
|
|
26867
26787
|
usePlanRevealRevision,
|
|
26868
26788
|
CurrentChatSessionProvider,
|
|
26869
26789
|
useCurrentChatSessionId,
|
|
26790
|
+
ChatEnvironmentProvider,
|
|
26791
|
+
useChatEnvironment,
|
|
26792
|
+
useHighlightedCode,
|
|
26793
|
+
useChatSessionDetail,
|
|
26794
|
+
useHideTodo,
|
|
26795
|
+
useChatRenderMode,
|
|
26796
|
+
notifyChat,
|
|
26797
|
+
useComposerBridge,
|
|
26798
|
+
useChatVirtualizer,
|
|
26799
|
+
getInputHistoryGeneration,
|
|
26800
|
+
onInputCachesReset,
|
|
26801
|
+
pluginRefsForSend,
|
|
26802
|
+
getPluginSuggestionItems,
|
|
26870
26803
|
sendToSession,
|
|
26871
26804
|
useControllableState,
|
|
26872
26805
|
dist_exports6 as dist_exports,
|
|
@@ -26975,7 +26908,6 @@ lucide-react/dist/esm/icons/plug.js:
|
|
|
26975
26908
|
lucide-react/dist/esm/icons/plus.js:
|
|
26976
26909
|
lucide-react/dist/esm/icons/puzzle.js:
|
|
26977
26910
|
lucide-react/dist/esm/icons/refresh-ccw.js:
|
|
26978
|
-
lucide-react/dist/esm/icons/refresh-cw.js:
|
|
26979
26911
|
lucide-react/dist/esm/icons/rocket.js:
|
|
26980
26912
|
lucide-react/dist/esm/icons/rotate-ccw.js:
|
|
26981
26913
|
lucide-react/dist/esm/icons/scissors.js:
|
|
@@ -26999,4 +26931,4 @@ lucide-react/dist/esm/lucide-react.js:
|
|
|
26999
26931
|
* See the LICENSE file in the root directory of this source tree.
|
|
27000
26932
|
*)
|
|
27001
26933
|
*/
|
|
27002
|
-
//# sourceMappingURL=chunk-
|
|
26934
|
+
//# sourceMappingURL=chunk-MERN5XEM.js.map
|