@tdesign-react/chat 1.0.2-alpha.8 → 1.1.0-alpha.1
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/es/_chunks/dep-f2051ebd.js +839 -0
- package/es/_chunks/dep-f2051ebd.js.map +1 -0
- package/es/_util/reactify.d.ts +1 -2
- package/es/_util/reactify.js +81 -231
- package/es/_util/reactify.js.map +1 -1
- package/es/_util/useDynamicStyle.js +1 -1
- package/es/attachments/index.js +4 -6
- package/es/attachments/index.js.map +1 -1
- package/es/chat-actionbar/_example-js/base.d.ts +2 -0
- package/es/chat-actionbar/_example-js/custom.d.ts +2 -0
- package/es/chat-actionbar/_example-js/style.d.ts +2 -0
- package/es/chat-actionbar/index.js +4 -6
- package/es/chat-actionbar/index.js.map +1 -1
- package/es/chat-attachments/_example-js/base.d.ts +2 -0
- package/es/chat-attachments/_example-js/scroll-x.d.ts +2 -0
- package/es/chat-attachments/_example-js/scroll-y.d.ts +2 -0
- package/es/chat-attachments/index.js +3 -1
- package/es/chat-attachments/index.js.map +1 -1
- package/es/chat-engine/_example-js/agui-basic.d.ts +10 -0
- package/es/chat-engine/_example-js/agui-comprehensive.d.ts +2 -0
- package/es/chat-engine/_example-js/agui-test.d.ts +11 -0
- package/es/chat-engine/_example-js/agui-toolcall.d.ts +5 -0
- package/es/chat-engine/_example-js/agui-videoclip.d.ts +8 -0
- package/es/chat-engine/_example-js/agui.d.ts +1 -0
- package/es/chat-engine/_example-js/basic.d.ts +9 -0
- package/es/chat-engine/_example-js/components/HotelCard.d.ts +3 -0
- package/es/chat-engine/_example-js/components/HumanInputForm.d.ts +6 -0
- package/es/chat-engine/_example-js/components/HumanInputResult.d.ts +3 -0
- package/es/chat-engine/_example-js/components/ItineraryCard.d.ts +3 -0
- package/es/chat-engine/_example-js/components/PlanningStatePanel.d.ts +4 -0
- package/es/chat-engine/_example-js/components/Toolcall.d.ts +4 -0
- package/es/chat-engine/_example-js/components/WeatherCard.d.ts +3 -0
- package/es/chat-engine/_example-js/components/login.d.ts +1 -0
- package/es/chat-engine/_example-js/comprehensive.d.ts +12 -0
- package/es/chat-engine/_example-js/custom-content.d.ts +1 -0
- package/es/chat-engine/_example-js/hookComponent.d.ts +1 -0
- package/es/chat-engine/_example-js/initial-messages.d.ts +9 -0
- package/es/chat-engine/_example-js/instance-methods.d.ts +13 -0
- package/es/chat-engine/_example-js/travel-actions.d.ts +91 -0
- package/es/chat-engine/_example-js/travelToolcall.d.ts +1 -0
- package/es/chat-engine/components/a2ui/A2UIActivityRenderer.d.ts +196 -0
- package/es/chat-engine/components/a2ui/A2UIActivityRenderer.js +301 -0
- package/es/chat-engine/components/a2ui/A2UIActivityRenderer.js.map +1 -0
- package/es/chat-engine/components/a2ui/A2UIComponentRenderer.d.ts +37 -0
- package/es/chat-engine/components/a2ui/A2UIComponentRenderer.js +116 -0
- package/es/chat-engine/components/a2ui/A2UIComponentRenderer.js.map +1 -0
- package/es/chat-engine/components/a2ui/A2UIErrorBoundary.d.ts +42 -0
- package/es/chat-engine/components/a2ui/A2UIErrorBoundary.js +113 -0
- package/es/chat-engine/components/a2ui/A2UIErrorBoundary.js.map +1 -0
- package/es/chat-engine/components/a2ui/A2UISkeleton.d.ts +60 -0
- package/es/chat-engine/components/a2ui/A2UISkeleton.js +197 -0
- package/es/chat-engine/components/a2ui/A2UISkeleton.js.map +1 -0
- package/es/chat-engine/components/a2ui/A2UISurfaceRenderer.d.ts +44 -0
- package/es/chat-engine/components/a2ui/A2UISurfaceRenderer.js +139 -0
- package/es/chat-engine/components/a2ui/A2UISurfaceRenderer.js.map +1 -0
- package/es/chat-engine/components/a2ui/containers/A2UICard.d.ts +22 -0
- package/es/chat-engine/components/a2ui/containers/A2UICard.js +82 -0
- package/es/chat-engine/components/a2ui/containers/A2UICard.js.map +1 -0
- package/es/chat-engine/components/a2ui/containers/A2UIColumn.d.ts +18 -0
- package/es/chat-engine/components/a2ui/containers/A2UIColumn.js +81 -0
- package/es/chat-engine/components/a2ui/containers/A2UIColumn.js.map +1 -0
- package/es/chat-engine/components/a2ui/containers/A2UIList.d.ts +14 -0
- package/es/chat-engine/components/a2ui/containers/A2UIList.js +62 -0
- package/es/chat-engine/components/a2ui/containers/A2UIList.js.map +1 -0
- package/es/chat-engine/components/a2ui/containers/A2UIRow.d.ts +20 -0
- package/es/chat-engine/components/a2ui/containers/A2UIRow.js +84 -0
- package/es/chat-engine/components/a2ui/containers/A2UIRow.js.map +1 -0
- package/es/chat-engine/components/a2ui/containers/A2UITabs.d.ts +14 -0
- package/es/chat-engine/components/a2ui/containers/A2UITabs.js +69 -0
- package/es/chat-engine/components/a2ui/containers/A2UITabs.js.map +1 -0
- package/es/chat-engine/components/a2ui/containers/index.d.ts +8 -0
- package/es/chat-engine/components/a2ui/containers/index.js +30 -0
- package/es/chat-engine/components/a2ui/containers/index.js.map +1 -0
- package/es/chat-engine/components/a2ui/index.d.ts +11 -0
- package/es/chat-engine/components/a2ui/index.js +62 -0
- package/es/chat-engine/components/a2ui/index.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIButton.d.ts +33 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIButton.js +80 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIButton.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UICheckBox.d.ts +12 -0
- package/es/chat-engine/components/a2ui/primitives/A2UICheckBox.js +43 -0
- package/es/chat-engine/components/a2ui/primitives/A2UICheckBox.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UICheckboxGroup.d.ts +50 -0
- package/es/chat-engine/components/a2ui/primitives/A2UICheckboxGroup.js +54 -0
- package/es/chat-engine/components/a2ui/primitives/A2UICheckboxGroup.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIChoicePicker.d.ts +13 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIChoicePicker.js +89 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIChoicePicker.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIDivider.d.ts +12 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIDivider.js +25 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIDivider.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIIcon.d.ts +13 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIIcon.js +138942 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIIcon.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIImage.d.ts +12 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIImage.js +75 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIImage.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIInput.d.ts +20 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIInput.js +63 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIInput.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIRadioGroup.d.ts +56 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIRadioGroup.js +64 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIRadioGroup.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UISlider.d.ts +12 -0
- package/es/chat-engine/components/a2ui/primitives/A2UISlider.js +55 -0
- package/es/chat-engine/components/a2ui/primitives/A2UISlider.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIText.d.ts +12 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIText.js +104 -0
- package/es/chat-engine/components/a2ui/primitives/A2UIText.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/A2UITextField.d.ts +12 -0
- package/es/chat-engine/components/a2ui/primitives/A2UITextField.js +80 -0
- package/es/chat-engine/components/a2ui/primitives/A2UITextField.js.map +1 -0
- package/es/chat-engine/components/a2ui/primitives/index.d.ts +15 -0
- package/es/chat-engine/components/a2ui/primitives/index.js +39 -0
- package/es/chat-engine/components/a2ui/primitives/index.js.map +1 -0
- package/es/chat-engine/components/a2ui/registry.d.ts +35 -0
- package/es/chat-engine/components/a2ui/registry.js +74 -0
- package/es/chat-engine/components/a2ui/registry.js.map +1 -0
- package/es/{chatbot/components/toolcall → chat-engine/components/activity}/index.d.ts +1 -0
- package/es/chat-engine/components/activity/index.js +18 -0
- package/es/chat-engine/components/activity/index.js.map +1 -0
- package/es/chat-engine/components/activity/registry.d.ts +44 -0
- package/es/{chatbot/components/toolcall → chat-engine/components/activity}/registry.js +32 -22
- package/es/chat-engine/components/activity/registry.js.map +1 -0
- package/es/chat-engine/components/activity/render.d.ts +11 -0
- package/es/chat-engine/components/activity/render.js +107 -0
- package/es/chat-engine/components/activity/render.js.map +1 -0
- package/es/chat-engine/components/activity/types.d.ts +32 -0
- package/es/chat-engine/components/activity/types.js +7 -0
- package/es/chat-engine/components/activity/types.js.map +1 -0
- package/es/chat-engine/components/index.d.ts +4 -0
- package/es/chat-engine/components/index.js +76 -0
- package/es/chat-engine/components/index.js.map +1 -0
- package/es/chat-engine/components/json-render/A2UIJsonRenderActivityRenderer.d.ts +36 -0
- package/es/chat-engine/components/json-render/A2UIJsonRenderActivityRenderer.js +36 -0
- package/es/chat-engine/components/json-render/A2UIJsonRenderActivityRenderer.js.map +1 -0
- package/es/chat-engine/components/json-render/JsonRenderActivityRenderer.d.ts +46 -0
- package/es/chat-engine/components/json-render/JsonRenderActivityRenderer.js +36 -0
- package/es/chat-engine/components/json-render/JsonRenderActivityRenderer.js.map +1 -0
- package/es/chat-engine/components/json-render/SurfaceStateManager.d.ts +113 -0
- package/es/chat-engine/components/json-render/SurfaceStateManager.js +195 -0
- package/es/chat-engine/components/json-render/SurfaceStateManager.js.map +1 -0
- package/es/chat-engine/components/json-render/adapters/a2ui-to-jsonrender.d.ts +49 -0
- package/es/chat-engine/components/json-render/adapters/a2ui-to-jsonrender.js +307 -0
- package/es/chat-engine/components/json-render/adapters/a2ui-to-jsonrender.js.map +1 -0
- package/es/chat-engine/components/json-render/adapters/a2ui-types.d.ts +96 -0
- package/es/chat-engine/components/json-render/adapters/a2ui-types.js +7 -0
- package/es/chat-engine/components/json-render/adapters/a2ui-types.js.map +1 -0
- package/es/chat-engine/components/json-render/adapters/index.d.ts +7 -0
- package/es/chat-engine/components/json-render/adapters/index.js +11 -0
- package/es/chat-engine/components/json-render/adapters/index.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/a2ui-binding.d.ts +64 -0
- package/es/chat-engine/components/json-render/catalog/a2ui-binding.js +36 -0
- package/es/chat-engine/components/json-render/catalog/a2ui-binding.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/a2ui-registry.d.ts +78 -0
- package/es/chat-engine/components/json-render/catalog/a2ui-registry.js +36 -0
- package/es/chat-engine/components/json-render/catalog/a2ui-registry.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/button.d.ts +14 -0
- package/es/chat-engine/components/json-render/catalog/button.js +71 -0
- package/es/chat-engine/components/json-render/catalog/button.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/card.d.ts +11 -0
- package/es/chat-engine/components/json-render/catalog/card.js +57 -0
- package/es/chat-engine/components/json-render/catalog/card.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/index.d.ts +127 -0
- package/es/chat-engine/components/json-render/catalog/index.js +36 -0
- package/es/chat-engine/components/json-render/catalog/index.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/input.d.ts +20 -0
- package/es/chat-engine/components/json-render/catalog/input.js +36 -0
- package/es/chat-engine/components/json-render/catalog/input.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/layout.d.ts +44 -0
- package/es/chat-engine/components/json-render/catalog/layout.js +129 -0
- package/es/chat-engine/components/json-render/catalog/layout.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog/text.d.ts +11 -0
- package/es/chat-engine/components/json-render/catalog/text.js +31 -0
- package/es/chat-engine/components/json-render/catalog/text.js.map +1 -0
- package/es/chat-engine/components/json-render/catalog.d.ts +549 -0
- package/es/chat-engine/components/json-render/catalog.js +147 -0
- package/es/chat-engine/components/json-render/catalog.js.map +1 -0
- package/es/chat-engine/components/json-render/config.d.ts +154 -0
- package/es/chat-engine/components/json-render/config.js +36 -0
- package/es/chat-engine/components/json-render/config.js.map +1 -0
- package/es/chat-engine/components/json-render/contexts/actions.d.ts +74 -0
- package/es/chat-engine/components/json-render/contexts/actions.js +290 -0
- package/es/chat-engine/components/json-render/contexts/actions.js.map +1 -0
- package/es/chat-engine/components/json-render/contexts/data.d.ts +45 -0
- package/es/chat-engine/components/json-render/contexts/data.js +104 -0
- package/es/chat-engine/components/json-render/contexts/data.js.map +1 -0
- package/es/chat-engine/components/json-render/contexts/validation.d.ts +59 -0
- package/es/chat-engine/components/json-render/contexts/validation.js +151 -0
- package/es/chat-engine/components/json-render/contexts/validation.js.map +1 -0
- package/es/chat-engine/components/json-render/contexts/visibility.d.ts +29 -0
- package/es/chat-engine/components/json-render/contexts/visibility.js +56 -0
- package/es/chat-engine/components/json-render/contexts/visibility.js.map +1 -0
- package/es/chat-engine/components/json-render/engine.d.ts +58 -0
- package/es/chat-engine/components/json-render/engine.js +88 -0
- package/es/chat-engine/components/json-render/engine.js.map +1 -0
- package/es/chat-engine/components/json-render/index.d.ts +34 -0
- package/es/chat-engine/components/json-render/index.js +36 -0
- package/es/chat-engine/components/json-render/index.js.map +1 -0
- package/es/chat-engine/components/json-render/performance.d.ts +91 -0
- package/es/chat-engine/components/json-render/performance.js +135 -0
- package/es/chat-engine/components/json-render/performance.js.map +1 -0
- package/es/chat-engine/components/json-render/renderer.d.ts +71 -0
- package/es/chat-engine/components/json-render/renderer.js +124 -0
- package/es/chat-engine/components/json-render/renderer.js.map +1 -0
- package/es/chat-engine/components/json-render/types.d.ts +69 -0
- package/es/chat-engine/components/json-render/types.js +7 -0
- package/es/chat-engine/components/json-render/types.js.map +1 -0
- package/es/chat-engine/components/provider/agent-state.js +39 -2
- package/es/chat-engine/components/provider/agent-state.js.map +1 -1
- package/es/chat-engine/components/toolcall/index.js +35 -2
- package/es/chat-engine/components/toolcall/index.js.map +1 -1
- package/es/chat-engine/components/toolcall/registry.js +1 -1
- package/es/chat-engine/components/toolcall/render.d.ts +1 -1
- package/es/chat-engine/components/toolcall/render.js +102 -26
- package/es/chat-engine/components/toolcall/render.js.map +1 -1
- package/es/chat-engine/components/toolcall/types.js +1 -1
- package/es/chat-engine/core/a2ui/index.d.ts +10 -0
- package/es/chat-engine/core/a2ui/index.js +24 -0
- package/es/chat-engine/core/a2ui/index.js.map +1 -0
- package/es/chat-engine/core/a2ui/processor/A2uiMessageProcessor.d.ts +197 -0
- package/es/chat-engine/core/a2ui/processor/A2uiMessageProcessor.js +438 -0
- package/es/chat-engine/core/a2ui/processor/A2uiMessageProcessor.js.map +1 -0
- package/es/chat-engine/core/a2ui/processor/ComponentTree.d.ts +53 -0
- package/es/chat-engine/core/a2ui/processor/ComponentTree.js +158 -0
- package/es/chat-engine/core/a2ui/processor/ComponentTree.js.map +1 -0
- package/es/chat-engine/core/a2ui/processor/DataStore.d.ts +63 -0
- package/es/chat-engine/core/a2ui/processor/DataStore.js +172 -0
- package/es/chat-engine/core/a2ui/processor/DataStore.js.map +1 -0
- package/es/chat-engine/core/a2ui/processor/PathResolver.d.ts +47 -0
- package/es/chat-engine/core/a2ui/processor/PathResolver.js +99 -0
- package/es/chat-engine/core/a2ui/processor/PathResolver.js.map +1 -0
- package/es/chat-engine/core/a2ui/types/index.d.ts +4 -0
- package/es/chat-engine/core/a2ui/types/index.js +9 -0
- package/es/chat-engine/core/a2ui/types/index.js.map +1 -0
- package/es/chat-engine/core/a2ui/types/types.d.ts +770 -0
- package/es/chat-engine/core/a2ui/types/types.js +104 -0
- package/es/chat-engine/core/a2ui/types/types.js.map +1 -0
- package/es/chat-engine/core/a2ui/utils/binding.d.ts +34 -0
- package/es/chat-engine/core/a2ui/utils/binding.js +1784 -0
- package/es/chat-engine/core/a2ui/utils/binding.js.map +1 -0
- package/es/chat-engine/core/a2ui/utils/index.d.ts +5 -0
- package/es/chat-engine/core/a2ui/utils/index.js +13 -0
- package/es/chat-engine/core/a2ui/utils/index.js.map +1 -0
- package/es/chat-engine/core/a2ui/utils/validation.d.ts +70 -0
- package/es/chat-engine/core/a2ui/utils/validation.js +333 -0
- package/es/chat-engine/core/a2ui/utils/validation.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/activity-manager.d.ts +102 -0
- package/es/chat-engine/core/adapters/agui/activity-manager.js +144 -0
- package/es/chat-engine/core/adapters/agui/activity-manager.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/event-mapper.d.ts +149 -0
- package/es/chat-engine/core/adapters/agui/event-mapper.js +415 -0
- package/es/chat-engine/core/adapters/agui/event-mapper.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/events.d.ts +1550 -0
- package/es/chat-engine/core/adapters/agui/events.js +199 -0
- package/es/chat-engine/core/adapters/agui/events.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/index.d.ts +95 -0
- package/es/chat-engine/core/adapters/agui/index.js +195 -0
- package/es/chat-engine/core/adapters/agui/index.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/state-manager.d.ts +99 -0
- package/es/chat-engine/core/adapters/agui/state-manager.js +168 -0
- package/es/chat-engine/core/adapters/agui/state-manager.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/types.d.ts +818 -0
- package/es/chat-engine/core/adapters/agui/types.js +95 -0
- package/es/chat-engine/core/adapters/agui/types.js.map +1 -0
- package/es/chat-engine/core/adapters/agui/utils.d.ts +203 -0
- package/es/chat-engine/core/adapters/agui/utils.js +330 -0
- package/es/chat-engine/core/adapters/agui/utils.js.map +1 -0
- package/es/chat-engine/core/event-bus/ChatEventBus.d.ts +88 -0
- package/es/chat-engine/core/event-bus/ChatEventBus.js +295 -0
- package/es/chat-engine/core/event-bus/ChatEventBus.js.map +1 -0
- package/es/chat-engine/core/event-bus/index.d.ts +5 -0
- package/es/chat-engine/core/event-bus/index.js +13 -0
- package/es/chat-engine/core/event-bus/index.js.map +1 -0
- package/es/chat-engine/core/event-bus/types.d.ts +230 -0
- package/es/chat-engine/core/event-bus/types.js +32 -0
- package/es/chat-engine/core/event-bus/types.js.map +1 -0
- package/es/chat-engine/core/index.d.ts +147 -0
- package/es/chat-engine/core/index.js +754 -0
- package/es/chat-engine/core/index.js.map +1 -0
- package/es/chat-engine/core/processor/index.d.ts +20 -0
- package/es/chat-engine/core/processor/index.js +146 -0
- package/es/chat-engine/core/processor/index.js.map +1 -0
- package/es/chat-engine/core/server/batch-client.d.ts +20 -0
- package/es/chat-engine/core/server/batch-client.js +114 -0
- package/es/chat-engine/core/server/batch-client.js.map +1 -0
- package/es/chat-engine/core/server/connection-manager.d.ts +39 -0
- package/es/chat-engine/core/server/connection-manager.js +84 -0
- package/es/chat-engine/core/server/connection-manager.js.map +1 -0
- package/es/chat-engine/core/server/errors.d.ts +22 -0
- package/es/chat-engine/core/server/errors.js +80 -0
- package/es/chat-engine/core/server/errors.js.map +1 -0
- package/es/chat-engine/core/server/index.d.ts +11 -0
- package/es/chat-engine/core/server/index.js +26 -0
- package/es/chat-engine/core/server/index.js.map +1 -0
- package/es/chat-engine/core/server/llm-service.d.ts +44 -0
- package/es/chat-engine/core/server/llm-service.js +200 -0
- package/es/chat-engine/core/server/llm-service.js.map +1 -0
- package/es/chat-engine/core/server/sse-client.d.ts +77 -0
- package/es/chat-engine/core/server/sse-client.js +362 -0
- package/es/chat-engine/core/server/sse-client.js.map +1 -0
- package/es/chat-engine/core/server/sse-parser.d.ts +49 -0
- package/es/chat-engine/core/server/sse-parser.js +116 -0
- package/es/chat-engine/core/server/sse-parser.js.map +1 -0
- package/es/chat-engine/core/server/types.d.ts +54 -0
- package/es/chat-engine/core/server/types.js +28 -0
- package/es/chat-engine/core/server/types.js.map +1 -0
- package/es/chat-engine/core/store/message.d.ts +27 -0
- package/es/chat-engine/core/store/message.js +263 -0
- package/es/chat-engine/core/store/message.js.map +1 -0
- package/es/chat-engine/core/store/model.d.ts +8 -0
- package/es/chat-engine/core/store/model.js +65 -0
- package/es/chat-engine/core/store/model.js.map +1 -0
- package/es/chat-engine/core/store/reactiveState.d.ts +52 -0
- package/es/chat-engine/core/store/reactiveState.js +1359 -0
- package/es/chat-engine/core/store/reactiveState.js.map +1 -0
- package/es/chat-engine/core/type.d.ts +271 -0
- package/es/chat-engine/core/type.js +7 -0
- package/es/chat-engine/core/type.js.map +1 -0
- package/es/chat-engine/core/utils/eventEmitter.d.ts +10 -0
- package/es/chat-engine/core/utils/eventEmitter.js +67 -0
- package/es/chat-engine/core/utils/eventEmitter.js.map +1 -0
- package/es/chat-engine/core/utils/index.d.ts +33 -0
- package/es/chat-engine/core/utils/index.js +999 -0
- package/es/chat-engine/core/utils/index.js.map +1 -0
- package/es/chat-engine/core/utils/logger.d.ts +30 -0
- package/es/chat-engine/core/utils/logger.js +87 -0
- package/es/chat-engine/core/utils/logger.js.map +1 -0
- package/es/chat-engine/hooks/a2ui/A2UIContext.d.ts +90 -0
- package/es/chat-engine/hooks/a2ui/A2UIContext.js +97 -0
- package/es/chat-engine/hooks/a2ui/A2UIContext.js.map +1 -0
- package/es/chat-engine/hooks/a2ui/index.d.ts +12 -0
- package/es/chat-engine/hooks/a2ui/index.js +19 -0
- package/es/chat-engine/hooks/a2ui/useA2UIAction.d.ts +40 -0
- package/es/chat-engine/hooks/a2ui/useA2UIAction.js +74 -0
- package/es/chat-engine/hooks/a2ui/useA2UIAction.js.map +1 -0
- package/es/chat-engine/hooks/a2ui/useA2UISurface.d.ts +36 -0
- package/es/chat-engine/hooks/a2ui/useA2UISurface.js +39 -0
- package/es/chat-engine/hooks/a2ui/useA2UISurface.js.map +1 -0
- package/es/chat-engine/hooks/a2ui/useDataBinding.d.ts +53 -0
- package/es/chat-engine/hooks/a2ui/useDataBinding.js +111 -0
- package/es/chat-engine/hooks/a2ui/useDataBinding.js.map +1 -0
- package/es/chat-engine/hooks/index.d.ts +4 -0
- package/es/chat-engine/hooks/index.js +54 -0
- package/es/chat-engine/hooks/index.js.map +1 -0
- package/es/chat-engine/hooks/useAgentActivity.d.ts +15 -0
- package/es/chat-engine/hooks/useAgentActivity.js +73 -0
- package/es/chat-engine/hooks/useAgentActivity.js.map +1 -0
- package/es/chat-engine/hooks/useAgentState.js +39 -2
- package/es/chat-engine/hooks/useAgentState.js.map +1 -1
- package/es/chat-engine/hooks/useAgentToolcall.js +1 -1
- package/es/chat-engine/hooks/useChat.d.ts +3 -3
- package/es/chat-engine/hooks/useChat.js +41 -3
- package/es/chat-engine/hooks/useChat.js.map +1 -1
- package/es/chat-engine/hooks/useJsonRenderActivity.d.ts +56 -0
- package/es/chat-engine/hooks/useJsonRenderActivity.js +63 -0
- package/es/chat-engine/hooks/useJsonRenderActivity.js.map +1 -0
- package/es/chat-engine/index.d.ts +3 -3
- package/es/chat-engine/index.js +61 -5
- package/es/chat-engine/index.js.map +1 -1
- package/es/chat-filecard/_example-js/base.d.ts +1 -0
- package/es/chat-filecard/index.js +4 -6
- package/es/chat-filecard/index.js.map +1 -1
- package/es/chat-loading/_example-js/base.d.ts +2 -0
- package/es/chat-loading/_example-js/text.d.ts +2 -0
- package/es/chat-loading/index.js +4 -6
- package/es/chat-loading/index.js.map +1 -1
- package/es/chat-markdown/_example-js/base.d.ts +1 -0
- package/es/chat-markdown/_example-js/custom.d.ts +2 -0
- package/es/chat-markdown/_example-js/event.d.ts +1 -0
- package/es/chat-markdown/_example-js/footnote.d.ts +2 -0
- package/es/chat-markdown/_example-js/plugin.d.ts +2 -0
- package/es/chat-markdown/_example-js/theme.d.ts +2 -0
- package/es/chat-markdown/index.js +4 -6
- package/es/chat-markdown/index.js.map +1 -1
- package/es/chat-message/_example-js/action.d.ts +1 -0
- package/es/chat-message/_example-js/base.d.ts +1 -0
- package/es/chat-message/_example-js/configure.d.ts +1 -0
- package/es/chat-message/_example-js/content.d.ts +1 -0
- package/es/chat-message/_example-js/custom.d.ts +1 -0
- package/es/chat-message/_example-js/handle-actions.d.ts +7 -0
- package/es/chat-message/_example-js/status.d.ts +1 -0
- package/es/chat-message/_example-js/think.d.ts +1 -0
- package/es/chat-message/index.js +4 -6
- package/es/chat-message/index.js.map +1 -1
- package/es/chat-sender/_example-js/attachment.d.ts +2 -0
- package/es/chat-sender/_example-js/base.d.ts +2 -0
- package/es/chat-sender/_example-js/custom.d.ts +2 -0
- package/es/chat-sender/index.js +4 -6
- package/es/chat-sender/index.js.map +1 -1
- package/es/chat-thinking/_example-js/base.d.ts +1 -0
- package/es/chat-thinking/_example-js/style.d.ts +1 -0
- package/es/chat-thinking/index.js +4 -6
- package/es/chat-thinking/index.js.map +1 -1
- package/es/chatbot/_example-js/agent.d.ts +1 -0
- package/es/chatbot/_example-js/agui.d.ts +13 -0
- package/es/chatbot/_example-js/backup/travel.d.ts +1 -0
- package/es/chatbot/_example-js/basic.d.ts +1 -0
- package/es/chatbot/_example-js/code.d.ts +1 -0
- package/es/chatbot/_example-js/components/ItineraryCard.d.ts +3 -0
- package/es/chatbot/_example-js/components/login.d.ts +1 -0
- package/es/chatbot/_example-js/comprehensive.d.ts +1 -0
- package/es/chatbot/_example-js/custom-content.d.ts +1 -0
- package/es/chatbot/_example-js/custom-merge.d.ts +1 -0
- package/es/chatbot/_example-js/custom.d.ts +1 -0
- package/es/chatbot/_example-js/docs.d.ts +1 -0
- package/es/chatbot/_example-js/image.d.ts +1 -0
- package/es/chatbot/_example-js/initial-messages.d.ts +9 -0
- package/es/chatbot/_example-js/instance-methods.d.ts +14 -0
- package/es/chatbot/_example-js/nostream.d.ts +1 -0
- package/es/chatbot/_example-js/quick-start.d.ts +9 -0
- package/es/chatbot/_example-js/research.d.ts +1 -0
- package/es/chatbot/_example-js/role-message-config.d.ts +22 -0
- package/es/chatbot/_example-js/sender-config.d.ts +20 -0
- package/es/chatbot/_example-js/service-config.d.ts +17 -0
- package/es/chatbot/_example-js/simple.d.ts +1 -0
- package/es/chatbot/_example-js/utils/messageRenderer.d.ts +5 -0
- package/es/chatbot/docs/react-best-practice.d.ts +13 -0
- package/es/chatbot/index.js +4 -6
- package/es/chatbot/index.js.map +1 -1
- package/es/index.js +59 -9
- package/es/index.js.map +1 -1
- package/es/style/index.js +1 -1
- package/package.json +6 -3
- package/es/chatbot/components/provider/agent-state.d.ts +0 -5
- package/es/chatbot/components/provider/agent-state.js +0 -28
- package/es/chatbot/components/provider/agent-state.js.map +0 -1
- package/es/chatbot/components/toolcall/index.js +0 -19
- package/es/chatbot/components/toolcall/registry.d.ts +0 -35
- package/es/chatbot/components/toolcall/registry.js.map +0 -1
- package/es/chatbot/components/toolcall/render.d.ts +0 -13
- package/es/chatbot/components/toolcall/render.js +0 -207
- package/es/chatbot/components/toolcall/render.js.map +0 -1
- package/es/chatbot/components/toolcall/types.d.ts +0 -57
- package/es/chatbot/components/toolcall/types.js +0 -15
- package/es/chatbot/components/toolcall/types.js.map +0 -1
- package/es/chatbot/hooks/useAgentState.d.ts +0 -40
- package/es/chatbot/hooks/useAgentState.js +0 -76
- package/es/chatbot/hooks/useAgentState.js.map +0 -1
- package/es/chatbot/hooks/useAgentToolcall.d.ts +0 -28
- package/es/chatbot/hooks/useAgentToolcall.js +0 -78
- package/es/chatbot/hooks/useAgentToolcall.js.map +0 -1
- package/es/chatbot/hooks/useChat.d.ts +0 -11
- package/es/chatbot/hooks/useChat.js +0 -66
- package/es/chatbot/hooks/useChat.js.map +0 -1
- /package/es/{chatbot/components/toolcall → chat-engine/hooks/a2ui}/index.js.map +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import ChatEngine from '
|
|
2
|
-
import type { ChatMessagesData, ChatServiceConfig, ChatStatus } from '
|
|
1
|
+
import ChatEngine from '../core';
|
|
2
|
+
import type { ChatMessagesData, ChatServiceConfig, ChatStatus } from '../core';
|
|
3
3
|
export type IUseChat = {
|
|
4
4
|
defaultMessages?: ChatMessagesData[];
|
|
5
|
-
chatServiceConfig: ChatServiceConfig;
|
|
5
|
+
chatServiceConfig: ChatServiceConfig | (() => ChatServiceConfig);
|
|
6
6
|
};
|
|
7
7
|
export declare const useChat: ({ defaultMessages: initialMessages, chatServiceConfig }: IUseChat) => {
|
|
8
8
|
chatEngine: ChatEngine;
|
|
@@ -1,12 +1,50 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
3
|
* (c) 2026 tdesign
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
8
8
|
import { useState, useRef, useEffect } from 'react';
|
|
9
|
-
import
|
|
9
|
+
import ChatEngine from '../core/index.js';
|
|
10
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
|
+
import '@babel/runtime/helpers/asyncToGenerator';
|
|
12
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
13
|
+
import '@babel/runtime/helpers/createClass';
|
|
14
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
15
|
+
import '@babel/runtime/regenerator';
|
|
16
|
+
import '../core/adapters/agui/index.js';
|
|
17
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
18
|
+
import '../core/adapters/agui/event-mapper.js';
|
|
19
|
+
import '../core/adapters/agui/events.js';
|
|
20
|
+
import 'zod';
|
|
21
|
+
import '../core/adapters/agui/types.js';
|
|
22
|
+
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
23
|
+
import '@babel/runtime/helpers/getPrototypeOf';
|
|
24
|
+
import '@babel/runtime/helpers/inherits';
|
|
25
|
+
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
26
|
+
import '../core/adapters/agui/state-manager.js';
|
|
27
|
+
import '@babel/runtime/helpers/typeof';
|
|
28
|
+
import '../core/utils/index.js';
|
|
29
|
+
import '../core/adapters/agui/activity-manager.js';
|
|
30
|
+
import '../core/adapters/agui/utils.js';
|
|
31
|
+
import '../core/event-bus/index.js';
|
|
32
|
+
import '../core/event-bus/ChatEventBus.js';
|
|
33
|
+
import '../core/event-bus/types.js';
|
|
34
|
+
import '../core/store/message.js';
|
|
35
|
+
import '@babel/runtime/helpers/get';
|
|
36
|
+
import '../core/store/reactiveState.js';
|
|
37
|
+
import '../core/processor/index.js';
|
|
38
|
+
import '../core/server/index.js';
|
|
39
|
+
import '../core/server/llm-service.js';
|
|
40
|
+
import '../core/utils/logger.js';
|
|
41
|
+
import '../core/server/batch-client.js';
|
|
42
|
+
import '../core/utils/eventEmitter.js';
|
|
43
|
+
import '../core/server/errors.js';
|
|
44
|
+
import '../core/server/sse-client.js';
|
|
45
|
+
import '../core/server/connection-manager.js';
|
|
46
|
+
import '../core/server/sse-parser.js';
|
|
47
|
+
import '../core/server/types.js';
|
|
10
48
|
|
|
11
49
|
var useChat = function useChat(_ref) {
|
|
12
50
|
var initialMessages = _ref.defaultMessages,
|
|
@@ -19,7 +57,7 @@ var useChat = function useChat(_ref) {
|
|
|
19
57
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
20
58
|
status = _useState4[0],
|
|
21
59
|
setStatus = _useState4[1];
|
|
22
|
-
var chatEngineRef = useRef(new
|
|
60
|
+
var chatEngineRef = useRef(new ChatEngine());
|
|
23
61
|
var msgSubscribeRef = useRef(null);
|
|
24
62
|
var prevInitialMessagesRef = useRef([]);
|
|
25
63
|
var chatEngine = chatEngineRef.current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChat.js","sources":["../../../../pro-components/chat/chat-engine/hooks/useChat.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport ChatEngine from 'tdesign-web-components/lib/chat-engine';\
|
|
1
|
+
{"version":3,"file":"useChat.js","sources":["../../../../pro-components/chat/chat-engine/hooks/useChat.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport ChatEngine from '../core';\nimport type { ChatMessagesData, ChatServiceConfig, ChatStatus } from '../core';\n// import ChatEngine from 'tdesign-web-components/lib/chat-engine';\n// import type { ChatMessagesData, ChatServiceConfig, ChatStatus } from 'tdesign-web-components/lib/chat-engine';\n\n\nexport type IUseChat = {\n defaultMessages?: ChatMessagesData[];\n chatServiceConfig: ChatServiceConfig | (() => ChatServiceConfig);\n};\n\nexport const useChat = ({ defaultMessages: initialMessages, chatServiceConfig }: IUseChat) => {\n const [messages, setMessage] = useState<ChatMessagesData[]>([]);\n const [status, setStatus] = useState<ChatStatus>('idle');\n const chatEngineRef = useRef<ChatEngine>(new ChatEngine());\n const msgSubscribeRef = useRef<null | (() => void)>(null);\n const prevInitialMessagesRef = useRef<ChatMessagesData[]>([]);\n\n const chatEngine = chatEngineRef.current;\n\n const syncState = (state: ChatMessagesData[]) => {\n setMessage(state);\n setStatus(state.at(-1)?.status || 'idle');\n };\n\n const subscribeToChat = () => {\n // 清理之前的订阅\n msgSubscribeRef.current?.();\n\n msgSubscribeRef.current = chatEngine.messageStore.subscribe((state) => {\n syncState(state.messages);\n });\n };\n\n const initChat = () => {\n // @ts-ignore\n chatEngine.init(chatServiceConfig, initialMessages);\n // @ts-ignore\n syncState(initialMessages);\n subscribeToChat();\n };\n\n // 初始化聊天引擎\n useEffect(() => {\n initChat();\n return () => msgSubscribeRef.current?.();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // 监听 defaultMessages 变化\n useEffect(() => {\n // 检查 initialMessages 是否真的发生了变化\n const hasChanged = JSON.stringify(prevInitialMessagesRef.current) !== JSON.stringify(initialMessages);\n\n if (hasChanged && initialMessages && initialMessages.length > 0) {\n // 更新引用\n prevInitialMessagesRef.current = initialMessages;\n\n // 重新初始化聊天引擎或更新消息\n chatEngine.setMessages(initialMessages, 'replace');\n\n // 同步状态\n syncState(initialMessages);\n }\n }, [initialMessages, chatEngine]);\n\n return {\n chatEngine,\n messages,\n status,\n };\n};\n"],"names":["useChat","initialMessages","_ref","defaultMessages","chatServiceConfig","_useState","useState","_useState2","_slicedToArray","messages","setMessage","_useState3","_useState4","status","setStatus","chatEngineRef","useRef","ChatEngine","msgSubscribeRef","prevInitialMessagesRef","chatEngine","current","syncState","state","_state$at","at","subscribeToChat","_msgSubscribeRef$curr","call","messageStore","subscribe","initChat","init","useEffect","_msgSubscribeRef$curr2","hasChanged","JSON","stringify","length","setMessages"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAYaA,UAAU,SAAVA,cAAiF;AAAA,EAAA,IAAnDC,eAAA,GAAAC,IAAA,CAAjBC,eAAiB;IAAiBC,yBAAAA;AAC1D,EAAA,IAAAC,SAAA,GAA+BC,QAAA,CAA6B,EAAE,CAAA;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvDI,IAAAA,QAAU,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAAG,IAAAA,UAAU,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAC3B,EAAA,IAAAI,UAAA,GAA4BL,SAAqB,MAAM,CAAA;IAAAM,UAAA,GAAAJ,cAAA,CAAAG,UAAA,EAAA,CAAA,CAAA;AAAhDE,IAAAA,MAAA,GAAAD,UAAA,CAAA,CAAA,CAAA;AAAQE,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA,CAAA;EACxB,IAAMG,aAAgB,GAAAC,MAAA,CAAmB,IAAIC,UAAA,EAAY,CAAA,CAAA;AACnD,EAAA,IAAAC,eAAA,GAAkBF,OAA4B,IAAI,CAAA,CAAA;AAClD,EAAA,IAAAG,sBAAA,GAAyBH,MAA2B,CAAA,EAAE,CAAA,CAAA;AAE5D,EAAA,IAAMI,aAAaL,aAAc,CAAAM,OAAA,CAAA;AAE3B,EAAA,IAAAC,SAAA,GAAY,SAAZA,SAAAA,CAAaC,KAA8B,EAAA;AAAA,IAAA,IAAAC,SAAA,CAAA;IAC/Cd,UAAA,CAAWa,KAAK,CAAA,CAAA;AAChBT,IAAAA,SAAA,CAAU,CAAAU,CAAAA,SAAA,GAAAD,KAAM,CAAAE,EAAA,CAAG,CAAE,CAAA,CAAA,MAAA,IAAA,IAAAD,SAAA,KAAXA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,SAAA,CAAcX,WAAU,MAAM,CAAA,CAAA;GAC1C,CAAA;AAEA,EAAA,IAAMa,kBAAkB,SAAlBA,kBAAwB;AAAA,IAAA,IAAAC,qBAAA,CAAA;AAE5B,IAAA,CAAAA,qBAAA,GAAAT,eAAA,CAAgBG,OAAU,MAAA,IAAA,IAAAM,qBAAA,KAAA,KAAA,CAAA,IAA1BA,qBAAA,CAAAC,IAAA,CAAAV,eAA0B,CAAA,CAAA;IAE1BA,eAAA,CAAgBG,OAAU,GAAAD,UAAA,CAAWS,YAAa,CAAAC,SAAA,CAAU,UAACP,KAAU,EAAA;AACrED,MAAAA,SAAA,CAAUC,MAAMd,QAAQ,CAAA,CAAA;AAC1B,KAAC,CAAA,CAAA;GACH,CAAA;AAEA,EAAA,IAAMsB,WAAW,SAAXA,WAAiB;AAEVX,IAAAA,UAAA,CAAAY,IAAA,CAAK5B,mBAAmBH,eAAe,CAAA,CAAA;IAElDqB,SAAA,CAAUrB,eAAe,CAAA,CAAA;AACTyB,IAAAA,eAAA,EAAA,CAAA;GAClB,CAAA;AAGAO,EAAAA,SAAA,CAAU,YAAM;AACLF,IAAAA,QAAA,EAAA,CAAA;IACF,OAAA,YAAA;AAAA,MAAA,IAAAG,sBAAA,CAAA;AAAA,MAAA,OAAA,CAAAA,sBAAA,GAAMhB,gBAAgBG,OAAU,MAAA,IAAA,IAAAa,sBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAA1BA,sBAAA,CAAAN,IAAA,CAAAV,eAA0B,CAAA,CAAA;AAAA,KAAA,CAAA;GAEzC,EAAG,EAAE,CAAA,CAAA;AAGLe,EAAAA,SAAA,CAAU,YAAM;AAER,IAAA,IAAAE,UAAA,GAAaC,KAAKC,SAAU,CAAAlB,sBAAA,CAAuBE,OAAO,CAAM,KAAAe,IAAA,CAAKC,UAAUpC,eAAe,CAAA,CAAA;IAEpG,IAAIkC,UAAc,IAAAlC,eAAA,IAAmBA,eAAgB,CAAAqC,MAAA,GAAS,CAAG,EAAA;MAE/DnB,sBAAA,CAAuBE,OAAU,GAAApB,eAAA,CAAA;AAGtBmB,MAAAA,UAAA,CAAAmB,WAAA,CAAYtC,iBAAiB,SAAS,CAAA,CAAA;MAGjDqB,SAAA,CAAUrB,eAAe,CAAA,CAAA;AAC3B,KAAA;AACF,GAAG,EAAA,CAACA,eAAiB,EAAAmB,UAAU,CAAC,CAAA,CAAA;EAEzB,OAAA;AACLA,IAAAA,UAAA,EAAAA,UAAA;AACAX,IAAAA,QAAA,EAAAA,QAAA;AACAI,IAAAA,MAAA,EAAAA,MAAAA;GACF,CAAA;AACF;;;;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* json-render Activity 便捷 Hook
|
|
3
|
+
* 简化 json-render Activity 的注册和使用
|
|
4
|
+
*/
|
|
5
|
+
import type { UseAgentActivityReturn } from './useAgentActivity';
|
|
6
|
+
import type { JsonRenderActivityConfigOptions, ComponentCatalog } from '../components/json-render';
|
|
7
|
+
/**
|
|
8
|
+
* json-render Activity Hook 配置选项
|
|
9
|
+
*/
|
|
10
|
+
export interface UseJsonRenderActivityOptions extends JsonRenderActivityConfigOptions {
|
|
11
|
+
/** 是否启用 A2UI 适配模式 */
|
|
12
|
+
enableA2UIAdapter?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 使用 json-render Activity 渲染器
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* // 直接模式
|
|
20
|
+
* useJsonRenderActivity({
|
|
21
|
+
* activityType: 'json-render',
|
|
22
|
+
* onAction: async (actionName, params) => {
|
|
23
|
+
* console.log('Action:', actionName, params);
|
|
24
|
+
* },
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* // A2UI 适配模式
|
|
28
|
+
* useJsonRenderActivity({
|
|
29
|
+
* activityType: 'a2ui-json-render',
|
|
30
|
+
* enableA2UIAdapter: true,
|
|
31
|
+
* onAction: async (actionName, params) => {
|
|
32
|
+
* console.log('Action:', actionName, params);
|
|
33
|
+
* },
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare function useJsonRenderActivity(options?: UseJsonRenderActivityOptions): UseAgentActivityReturn;
|
|
38
|
+
/**
|
|
39
|
+
* 创建自定义 Catalog 的 json-render Activity Hook
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```tsx
|
|
43
|
+
* const customCatalog = {
|
|
44
|
+
* MyButton: MyCustomButton,
|
|
45
|
+
* MyInput: MyCustomInput,
|
|
46
|
+
* };
|
|
47
|
+
*
|
|
48
|
+
* useJsonRenderActivityWithCatalog(customCatalog, {
|
|
49
|
+
* onAction: async (actionName, params) => {
|
|
50
|
+
* console.log('Action:', actionName, params);
|
|
51
|
+
* },
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function useJsonRenderActivityWithCatalog(catalog: ComponentCatalog, options?: Omit<UseJsonRenderActivityOptions, 'catalog'>): UseAgentActivityReturn;
|
|
56
|
+
export default useJsonRenderActivity;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
|
+
* (c) 2026 tdesign
|
|
4
|
+
* @license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
8
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
9
|
+
import { useMemo } from 'react';
|
|
10
|
+
import { useAgentActivity } from './useAgentActivity.js';
|
|
11
|
+
import { j as createA2UIJsonRenderActivityConfig, h as createJsonRenderActivityConfig } from '../../_chunks/dep-f2051ebd.js';
|
|
12
|
+
import '@babel/runtime/helpers/toConsumableArray';
|
|
13
|
+
import '../components/activity/registry.js';
|
|
14
|
+
import '@babel/runtime/helpers/classCallCheck';
|
|
15
|
+
import '@babel/runtime/helpers/createClass';
|
|
16
|
+
import '@babel/runtime/helpers/typeof';
|
|
17
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
18
|
+
import '../components/json-render/adapters/index.js';
|
|
19
|
+
import '../components/json-render/adapters/a2ui-to-jsonrender.js';
|
|
20
|
+
import '../components/json-render/SurfaceStateManager.js';
|
|
21
|
+
import '../components/json-render/engine.js';
|
|
22
|
+
import '../components/json-render/performance.js';
|
|
23
|
+
import '../components/json-render/catalog/button.js';
|
|
24
|
+
import 'tdesign-react';
|
|
25
|
+
import '@json-render/core';
|
|
26
|
+
import '../components/json-render/contexts/data.js';
|
|
27
|
+
import '../components/json-render/catalog/card.js';
|
|
28
|
+
import '../components/json-render/catalog/text.js';
|
|
29
|
+
import '../components/json-render/catalog/layout.js';
|
|
30
|
+
import '../components/json-render/catalog.js';
|
|
31
|
+
import 'zod';
|
|
32
|
+
import '../components/json-render/contexts/visibility.js';
|
|
33
|
+
import '../components/json-render/contexts/actions.js';
|
|
34
|
+
import '@babel/runtime/helpers/asyncToGenerator';
|
|
35
|
+
import '@babel/runtime/regenerator';
|
|
36
|
+
import '../components/json-render/contexts/validation.js';
|
|
37
|
+
import '../components/json-render/renderer.js';
|
|
38
|
+
|
|
39
|
+
var _excluded = ["enableA2UIAdapter"];
|
|
40
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
41
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
42
|
+
function useJsonRenderActivity() {
|
|
43
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
44
|
+
var _options$enableA2UIAd = options.enableA2UIAdapter,
|
|
45
|
+
enableA2UIAdapter = _options$enableA2UIAd === void 0 ? false : _options$enableA2UIAd,
|
|
46
|
+
configOptions = _objectWithoutProperties(options, _excluded);
|
|
47
|
+
var config = useMemo(function () {
|
|
48
|
+
if (enableA2UIAdapter) {
|
|
49
|
+
return createA2UIJsonRenderActivityConfig(configOptions);
|
|
50
|
+
}
|
|
51
|
+
return createJsonRenderActivityConfig(configOptions);
|
|
52
|
+
}, [enableA2UIAdapter, configOptions]);
|
|
53
|
+
return useAgentActivity(config);
|
|
54
|
+
}
|
|
55
|
+
function useJsonRenderActivityWithCatalog(catalog) {
|
|
56
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
57
|
+
return useJsonRenderActivity(_objectSpread(_objectSpread({}, options), {}, {
|
|
58
|
+
catalog: catalog
|
|
59
|
+
}));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export { useJsonRenderActivity as default, useJsonRenderActivity, useJsonRenderActivityWithCatalog };
|
|
63
|
+
//# sourceMappingURL=useJsonRenderActivity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useJsonRenderActivity.js","sources":["../../../../pro-components/chat/chat-engine/hooks/useJsonRenderActivity.ts"],"sourcesContent":["/**\n * json-render Activity 便捷 Hook\n * 简化 json-render Activity 的注册和使用\n */\n\nimport { useMemo } from 'react';\nimport { useAgentActivity } from './useAgentActivity';\nimport type { UseAgentActivityReturn } from './useAgentActivity';\nimport {\n createJsonRenderActivityConfig,\n createA2UIJsonRenderActivityConfig,\n} from '../components/json-render';\nimport type {\n JsonRenderActivityConfigOptions,\n ComponentCatalog,\n} from '../components/json-render';\n\n/**\n * json-render Activity Hook 配置选项\n */\nexport interface UseJsonRenderActivityOptions extends JsonRenderActivityConfigOptions {\n /** 是否启用 A2UI 适配模式 */\n enableA2UIAdapter?: boolean;\n}\n\n/**\n * 使用 json-render Activity 渲染器\n * \n * @example\n * ```tsx\n * // 直接模式\n * useJsonRenderActivity({\n * activityType: 'json-render',\n * onAction: async (actionName, params) => {\n * console.log('Action:', actionName, params);\n * },\n * });\n * \n * // A2UI 适配模式\n * useJsonRenderActivity({\n * activityType: 'a2ui-json-render',\n * enableA2UIAdapter: true,\n * onAction: async (actionName, params) => {\n * console.log('Action:', actionName, params);\n * },\n * });\n * ```\n */\nexport function useJsonRenderActivity(\n options: UseJsonRenderActivityOptions = {},\n): UseAgentActivityReturn {\n const { enableA2UIAdapter = false, ...configOptions } = options;\n\n // 根据模式创建配置\n const config = useMemo(() => {\n if (enableA2UIAdapter) {\n return createA2UIJsonRenderActivityConfig(configOptions);\n }\n return createJsonRenderActivityConfig(configOptions);\n }, [enableA2UIAdapter, configOptions]);\n\n // 使用 useAgentActivity 注册\n return useAgentActivity(config);\n}\n\n/**\n * 创建自定义 Catalog 的 json-render Activity Hook\n * \n * @example\n * ```tsx\n * const customCatalog = {\n * MyButton: MyCustomButton,\n * MyInput: MyCustomInput,\n * };\n * \n * useJsonRenderActivityWithCatalog(customCatalog, {\n * onAction: async (actionName, params) => {\n * console.log('Action:', actionName, params);\n * },\n * });\n * ```\n */\nexport function useJsonRenderActivityWithCatalog(\n catalog: ComponentCatalog,\n options: Omit<UseJsonRenderActivityOptions, 'catalog'> = {},\n): UseAgentActivityReturn {\n return useJsonRenderActivity({\n ...options,\n catalog,\n });\n}\n\nexport default useJsonRenderActivity;\n"],"names":["useJsonRenderActivity","options","arguments","length","undefined","_options$enableA2UIAd","enableA2UIAdapter","configOptions","_objectWithoutProperties","_excluded","config","useMemo","createA2UIJsonRenderActivityConfig","createJsonRenderActivityConfig","useAgentActivity","useJsonRenderActivityWithCatalog","catalog","_objectSpread"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDgB,SAAAA,qBAAAA,GAEU;AAAA,EAAA,IADxBC,OAAwC,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAA,EAChB,CAAA;AACxB,EAAA,IAAAG,qBAAA,GAAwDJ,OAAA,CAAhDK,iBAAA;AAAAA,IAAAA,iBAAA,GAAAD,qBAAA,KAAoB,KAAA,CAAA,GAAA,KAAU,GAAAA,qBAAA;AAAAE,IAAAA,aAAA,GAAAC,wBAAA,CAAkBP,OAAA,EAAAQ,SAAA,CAAA,CAAA;AAGlD,EAAA,IAAAC,MAAA,GAASC,QAAQ,YAAM;AAC3B,IAAA,IAAIL,iBAAmB,EAAA;MACrB,OAAOM,mCAAmCL,aAAa,CAAA,CAAA;AACzD,KAAA;IACA,OAAOM,+BAA+BN,aAAa,CAAA,CAAA;AACrD,GAAG,EAAA,CAACD,iBAAmB,EAAAC,aAAa,CAAC,CAAA,CAAA;EAGrC,OAAOO,iBAAiBJ,MAAM,CAAA,CAAA;AAChC,CAAA;AAmBO,SAASK,gCACdA,CAAAC,OAAA,EAEwB;AAAA,EAAA,IADxBf,OAAyD,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAA,EACjC,CAAA;AACxB,EAAA,OAAOF,qBAAsB,CAAAiB,aAAA,CAAAA,aAAA,KACxBhB,OAAA,CAAA,EAAA,EAAA,EAAA;AACHe,IAAAA,OAAA,EAAAA,OAAAA;AAAA,GAAA,CACD,CAAA,CAAA;AACH;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './hooks/useChat';
|
|
2
2
|
export * from './hooks/useAgentToolcall';
|
|
3
3
|
export * from './hooks/useAgentState';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './components
|
|
6
|
-
export * from '
|
|
4
|
+
export * from './hooks/useAgentActivity';
|
|
5
|
+
export * from './components';
|
|
6
|
+
export * from './core';
|
package/es/chat-engine/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
3
|
* (c) 2026 tdesign
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -7,18 +7,74 @@
|
|
|
7
7
|
export { useChat } from './hooks/useChat.js';
|
|
8
8
|
export { useAgentToolcall } from './hooks/useAgentToolcall.js';
|
|
9
9
|
export { AgentStateContext, useAgentState, useAgentStateContext, useAgentStateDataByKey } from './hooks/useAgentState.js';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export { useAgentActivity } from './hooks/useAgentActivity.js';
|
|
11
|
+
import './components/index.js';
|
|
12
|
+
import './core/index.js';
|
|
13
13
|
export { isNonInteractive, isNonInteractiveConfig } from './components/toolcall/types.js';
|
|
14
14
|
export { agentToolcallRegistry } from './components/toolcall/registry.js';
|
|
15
15
|
export { ToolCallRenderer, withAgentStateToolcall, withAgentStateToolcall1 } from './components/toolcall/render.js';
|
|
16
|
+
export { activityRegistry } from './components/activity/registry.js';
|
|
17
|
+
export { ActivityRenderer } from './components/activity/render.js';
|
|
18
|
+
export { AgentStateProvider } from './components/provider/agent-state.js';
|
|
19
|
+
export { e as A2UIButton, A as A2UIJsonRenderActivityRenderer, d as A2UITextField, J as JsonRenderActivityRenderer, g as JsonRenderInput, a as a2uiRegistry, j as createA2UIJsonRenderActivityConfig, b as createA2UIRegistry, c as createCustomRegistry, h as createJsonRenderActivityConfig, k as defaultA2UIJsonRenderActivityConfig, i as defaultJsonRenderActivityConfig, t as tdesignRegistry, f as withA2UIBinding, w as withStableProps } from '../_chunks/dep-f2051ebd.js';
|
|
20
|
+
export { JsonRenderEngine, createJsonRenderEngine } from './components/json-render/engine.js';
|
|
21
|
+
export { PERFORMANCE_THRESHOLDS, PerformanceMonitor, checkPerformance, globalPerformanceMonitor } from './components/json-render/performance.js';
|
|
22
|
+
export { createCustomCatalog, tdesignActionList, tdesignCatalog, tdesignComponentList } from './components/json-render/catalog.js';
|
|
23
|
+
export { JsonRenderButton } from './components/json-render/catalog/button.js';
|
|
24
|
+
export { JsonRenderCard } from './components/json-render/catalog/card.js';
|
|
25
|
+
export { JsonRenderCol, JsonRenderDivider, JsonRenderRow, JsonRenderSpace } from './components/json-render/catalog/layout.js';
|
|
26
|
+
export { SurfaceStateManager, surfaceStateManager } from './components/json-render/SurfaceStateManager.js';
|
|
27
|
+
export { DataProvider, useData, useDataBinding, useDataValue } from './components/json-render/contexts/data.js';
|
|
28
|
+
export { VisibilityProvider, useIsVisible, useVisibility } from './components/json-render/contexts/visibility.js';
|
|
29
|
+
export { ActionProvider, ConfirmDialog, useAction, useActions } from './components/json-render/contexts/actions.js';
|
|
30
|
+
export { ValidationProvider, useFieldValidation, useValidation } from './components/json-render/contexts/validation.js';
|
|
31
|
+
export { JSONUIProvider, Renderer, createRendererFromCatalog } from './components/json-render/renderer.js';
|
|
32
|
+
export { default as A2UIAdapter, applyA2UIDataUpdate, applyA2UIUpdates, convertA2UIMessagesToJsonRender } from './components/json-render/adapters/a2ui-to-jsonrender.js';
|
|
33
|
+
export { StateManagerImpl, stateManager } from './core/adapters/agui/state-manager.js';
|
|
34
|
+
export { activityManager } from './core/adapters/agui/activity-manager.js';
|
|
35
|
+
export { applyJsonPatch, findTargetElement, getMessageContentForCopy, isAIMessage, isActivityContent, isAttachmentContent, isImageContent, isMarkdownContent, isReasoningContent, isSearchContent, isSuggestionContent, isTextContent, isThinkingContent, isToolCallContent, isUserMessage, safeParseJSON } from './core/utils/index.js';
|
|
36
|
+
export { AGUIEventType, ActivityDeltaEventSchema, ActivitySnapshotEventSchema, CustomEventSchema, EventSchemas, MessagesSnapshotEventSchema, RawEventSchema, RunErrorEventSchema, RunFinishedEventSchema, RunStartedEventSchema, StateDeltaEventSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageStartEventSchema, ThinkingEndEventSchema, ThinkingStartEventSchema, ThinkingTextMessageContentEventSchema, ThinkingTextMessageEndEventSchema, ThinkingTextMessageStartEventSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallStartEventSchema, isActivityEvent, isStateEvent, isTextMessageEvent, isThinkingEvent, isToolCallEvent } from './core/adapters/agui/events.js';
|
|
37
|
+
export { AGUIAdapter } from './core/adapters/agui/index.js';
|
|
38
|
+
export { ChatEventBus, createEventBus } from './core/event-bus/ChatEventBus.js';
|
|
39
|
+
export { ChatEngineEventType } from './core/event-bus/types.js';
|
|
16
40
|
import '@babel/runtime/helpers/slicedToArray';
|
|
17
41
|
import 'react';
|
|
18
42
|
import '@babel/runtime/helpers/toConsumableArray';
|
|
19
43
|
import '@babel/runtime/helpers/defineProperty';
|
|
44
|
+
import './components/toolcall/index.js';
|
|
45
|
+
import './components/activity/index.js';
|
|
46
|
+
import './components/activity/types.js';
|
|
47
|
+
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
48
|
+
import '@babel/runtime/helpers/asyncToGenerator';
|
|
20
49
|
import '@babel/runtime/helpers/classCallCheck';
|
|
21
50
|
import '@babel/runtime/helpers/createClass';
|
|
22
|
-
import '@babel/runtime/helpers/asyncToGenerator';
|
|
23
51
|
import '@babel/runtime/regenerator';
|
|
52
|
+
import './core/event-bus/index.js';
|
|
53
|
+
import './core/store/message.js';
|
|
54
|
+
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
55
|
+
import '@babel/runtime/helpers/getPrototypeOf';
|
|
56
|
+
import '@babel/runtime/helpers/get';
|
|
57
|
+
import '@babel/runtime/helpers/inherits';
|
|
58
|
+
import './core/store/reactiveState.js';
|
|
59
|
+
import '@babel/runtime/helpers/wrapNativeSuper';
|
|
60
|
+
import '@babel/runtime/helpers/typeof';
|
|
61
|
+
import './core/processor/index.js';
|
|
62
|
+
import './core/server/index.js';
|
|
63
|
+
import './core/server/llm-service.js';
|
|
64
|
+
import './core/utils/logger.js';
|
|
65
|
+
import './core/server/batch-client.js';
|
|
66
|
+
import './core/utils/eventEmitter.js';
|
|
67
|
+
import './core/server/errors.js';
|
|
68
|
+
import './core/server/sse-client.js';
|
|
69
|
+
import './core/server/connection-manager.js';
|
|
70
|
+
import './core/server/sse-parser.js';
|
|
71
|
+
import './core/server/types.js';
|
|
72
|
+
import './components/json-render/adapters/index.js';
|
|
73
|
+
import 'tdesign-react';
|
|
74
|
+
import '@json-render/core';
|
|
75
|
+
import './components/json-render/catalog/text.js';
|
|
76
|
+
import 'zod';
|
|
77
|
+
import './core/adapters/agui/types.js';
|
|
78
|
+
import './core/adapters/agui/event-mapper.js';
|
|
79
|
+
import './core/adapters/agui/utils.js';
|
|
24
80
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Cards(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
3
|
* (c) 2026 tdesign
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import 'tdesign-web-components/lib/filecard';
|
|
8
8
|
import reactify from '../_util/reactify.js';
|
|
9
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
9
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
|
-
import '@babel/runtime/helpers/
|
|
11
|
+
import '@babel/runtime/helpers/typeof';
|
|
12
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
11
13
|
import '@babel/runtime/helpers/classCallCheck';
|
|
12
14
|
import '@babel/runtime/helpers/createClass';
|
|
13
15
|
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
14
16
|
import '@babel/runtime/helpers/getPrototypeOf';
|
|
15
17
|
import '@babel/runtime/helpers/inherits';
|
|
16
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
17
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
18
|
-
import '@babel/runtime/helpers/typeof';
|
|
19
18
|
import 'react';
|
|
20
|
-
import 'react-dom';
|
|
21
19
|
import 'react-dom/client';
|
|
22
20
|
|
|
23
21
|
var Filecard = reactify("t-filecard");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-filecard/index.ts"],"sourcesContent":["import { TdFileCardProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/filecard';\nimport reactify from '../_util/reactify';\n\nexport const Filecard: React.ForwardRefExoticComponent<\n Omit<TdFileCardProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdFileCardProps>('t-filecard');\n\nexport default Filecard;\nexport type { TdFileCardProps } from 'tdesign-web-components';\n"],"names":["Filecard","reactify"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-filecard/index.ts"],"sourcesContent":["import { TdFileCardProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/filecard';\nimport reactify from '../_util/reactify';\n\nexport const Filecard: React.ForwardRefExoticComponent<\n Omit<TdFileCardProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdFileCardProps>('t-filecard');\n\nexport default Filecard;\nexport type { TdFileCardProps } from 'tdesign-web-components';\n"],"names":["Filecard","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,QAAA,GAETC,SAA0B,YAAY;;;;"}
|
package/es/chat-loading/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
3
|
* (c) 2026 tdesign
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import 'tdesign-web-components/lib/chat-loading';
|
|
8
8
|
import reactify from '../_util/reactify.js';
|
|
9
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
9
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
|
-
import '@babel/runtime/helpers/
|
|
11
|
+
import '@babel/runtime/helpers/typeof';
|
|
12
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
11
13
|
import '@babel/runtime/helpers/classCallCheck';
|
|
12
14
|
import '@babel/runtime/helpers/createClass';
|
|
13
15
|
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
14
16
|
import '@babel/runtime/helpers/getPrototypeOf';
|
|
15
17
|
import '@babel/runtime/helpers/inherits';
|
|
16
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
17
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
18
|
-
import '@babel/runtime/helpers/typeof';
|
|
19
18
|
import 'react';
|
|
20
|
-
import 'react-dom';
|
|
21
19
|
import 'react-dom/client';
|
|
22
20
|
|
|
23
21
|
var ChatLoading = reactify("t-chat-loading");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-loading/index.ts"],"sourcesContent":["import { TdChatLoadingProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-loading';\nimport reactify from '../_util/reactify';\n\nexport const ChatLoading: React.ForwardRefExoticComponent<\n Omit<TdChatLoadingProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatLoadingProps>('t-chat-loading');\n\nexport default ChatLoading;\nexport type { TdChatLoadingProps, ChatLoadingAnimationType } from 'tdesign-web-components';\n"],"names":["ChatLoading","reactify"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-loading/index.ts"],"sourcesContent":["import { TdChatLoadingProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-loading';\nimport reactify from '../_util/reactify';\n\nexport const ChatLoading: React.ForwardRefExoticComponent<\n Omit<TdChatLoadingProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatLoadingProps>('t-chat-loading');\n\nexport default ChatLoading;\nexport type { TdChatLoadingProps, ChatLoadingAnimationType } from 'tdesign-web-components';\n"],"names":["ChatLoading","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,WAAA,GAETC,SAA6B,gBAAgB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ThinkContentDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ThinkContentDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
3
|
* (c) 2026 tdesign
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
@@ -7,18 +7,16 @@
|
|
|
7
7
|
import { TdMarkdownEngine } from 'tdesign-web-components';
|
|
8
8
|
import reactify from '../_util/reactify.js';
|
|
9
9
|
import 'tdesign-web-components/lib/chat-message/content/markdown-content';
|
|
10
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
10
11
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
11
|
-
import '@babel/runtime/helpers/
|
|
12
|
+
import '@babel/runtime/helpers/typeof';
|
|
13
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
12
14
|
import '@babel/runtime/helpers/classCallCheck';
|
|
13
15
|
import '@babel/runtime/helpers/createClass';
|
|
14
16
|
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
15
17
|
import '@babel/runtime/helpers/getPrototypeOf';
|
|
16
18
|
import '@babel/runtime/helpers/inherits';
|
|
17
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
18
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
19
|
-
import '@babel/runtime/helpers/typeof';
|
|
20
19
|
import 'react';
|
|
21
|
-
import 'react-dom';
|
|
22
20
|
import 'react-dom/client';
|
|
23
21
|
|
|
24
22
|
var MarkdownEngine = TdMarkdownEngine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-markdown/index.ts"],"sourcesContent":["import { TdChatMarkdownContentProps, TdMarkdownEngine } from 'tdesign-web-components';\nimport reactify from '../_util/reactify';\n\nexport const MarkdownEngine: typeof TdMarkdownEngine = TdMarkdownEngine;\nexport const ChatMarkdown: React.ForwardRefExoticComponent<\n Omit<TdChatMarkdownContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMarkdownContentProps>('t-chat-md-content');\n\n// eslint-disable-next-line import/first\nimport 'tdesign-web-components/lib/chat-message/content/markdown-content';\n\nexport default ChatMarkdown;\nexport type { TdChatMarkdownContentProps } from 'tdesign-web-components';\n"],"names":["MarkdownEngine","TdMarkdownEngine","ChatMarkdown","reactify"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-markdown/index.ts"],"sourcesContent":["import { TdChatMarkdownContentProps, TdMarkdownEngine } from 'tdesign-web-components';\nimport reactify from '../_util/reactify';\n\nexport const MarkdownEngine: typeof TdMarkdownEngine = TdMarkdownEngine;\nexport const ChatMarkdown: React.ForwardRefExoticComponent<\n Omit<TdChatMarkdownContentProps, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMarkdownContentProps>('t-chat-md-content');\n\n// eslint-disable-next-line import/first\nimport 'tdesign-web-components/lib/chat-message/content/markdown-content';\n\nexport default ChatMarkdown;\nexport type { TdChatMarkdownContentProps } from 'tdesign-web-components';\n"],"names":["MarkdownEngine","TdMarkdownEngine","ChatMarkdown","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAGO,IAAMA,cAA0C,GAAAC,iBAAA;IAC1CC,YAAA,GAETC,SAAqC,mBAAmB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageExample(): import("react/jsx-runtime").JSX.Element;
|
package/es/chat-message/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
3
|
* (c) 2026 tdesign
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import 'tdesign-web-components/lib/chat-message';
|
|
8
8
|
import reactify from '../_util/reactify.js';
|
|
9
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
9
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
|
-
import '@babel/runtime/helpers/
|
|
11
|
+
import '@babel/runtime/helpers/typeof';
|
|
12
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
11
13
|
import '@babel/runtime/helpers/classCallCheck';
|
|
12
14
|
import '@babel/runtime/helpers/createClass';
|
|
13
15
|
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
14
16
|
import '@babel/runtime/helpers/getPrototypeOf';
|
|
15
17
|
import '@babel/runtime/helpers/inherits';
|
|
16
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
17
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
18
|
-
import '@babel/runtime/helpers/typeof';
|
|
19
18
|
import 'react';
|
|
20
|
-
import 'react-dom';
|
|
21
19
|
import 'react-dom/client';
|
|
22
20
|
|
|
23
21
|
var ChatMessage = reactify("t-chat-item");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-message/index.ts"],"sourcesContent":["import { type TdChatMessageProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-message';\nimport reactify from '../_util/reactify';\n\nexport const ChatMessage: React.ForwardRefExoticComponent<\n Omit<TdChatMessageProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMessageProps>('t-chat-item');\n\nexport default ChatMessage;\n\nexport type { TdChatMessageProps } from 'tdesign-web-components';\n"],"names":["ChatMessage","reactify"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-message/index.ts"],"sourcesContent":["import { type TdChatMessageProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-message';\nimport reactify from '../_util/reactify';\n\nexport const ChatMessage: React.ForwardRefExoticComponent<\n Omit<TdChatMessageProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatMessageProps>('t-chat-item');\n\nexport default ChatMessage;\n\nexport type { TdChatMessageProps } from 'tdesign-web-components';\n"],"names":["ChatMessage","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,WAAA,GAETC,SAA6B,aAAa;;;;"}
|
package/es/chat-sender/index.js
CHANGED
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* tdesign v1.0.2-alpha.
|
|
2
|
+
* tdesign v1.0.2-alpha.15
|
|
3
3
|
* (c) 2026 tdesign
|
|
4
4
|
* @license MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import 'tdesign-web-components/lib/chat-sender';
|
|
8
8
|
import reactify from '../_util/reactify.js';
|
|
9
|
+
import '@babel/runtime/helpers/defineProperty';
|
|
9
10
|
import '@babel/runtime/helpers/objectWithoutProperties';
|
|
10
|
-
import '@babel/runtime/helpers/
|
|
11
|
+
import '@babel/runtime/helpers/typeof';
|
|
12
|
+
import '@babel/runtime/helpers/slicedToArray';
|
|
11
13
|
import '@babel/runtime/helpers/classCallCheck';
|
|
12
14
|
import '@babel/runtime/helpers/createClass';
|
|
13
15
|
import '@babel/runtime/helpers/possibleConstructorReturn';
|
|
14
16
|
import '@babel/runtime/helpers/getPrototypeOf';
|
|
15
17
|
import '@babel/runtime/helpers/inherits';
|
|
16
|
-
import '@babel/runtime/helpers/defineProperty';
|
|
17
|
-
import '@babel/runtime/helpers/slicedToArray';
|
|
18
|
-
import '@babel/runtime/helpers/typeof';
|
|
19
18
|
import 'react';
|
|
20
|
-
import 'react-dom';
|
|
21
19
|
import 'react-dom/client';
|
|
22
20
|
|
|
23
21
|
var ChatSender = reactify("t-chat-sender");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-sender/index.ts"],"sourcesContent":["import { TdChatSenderProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-sender';\nimport reactify from '../_util/reactify';\n\nexport const ChatSender: React.ForwardRefExoticComponent<\n Omit<TdChatSenderProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSenderProps>('t-chat-sender');\n\nexport default ChatSender;\nexport type * from 'tdesign-web-components/lib/chat-sender/type';\n"],"names":["ChatSender","reactify"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../pro-components/chat/chat-sender/index.ts"],"sourcesContent":["import { TdChatSenderProps } from 'tdesign-web-components';\nimport 'tdesign-web-components/lib/chat-sender';\nimport reactify from '../_util/reactify';\n\nexport const ChatSender: React.ForwardRefExoticComponent<\n Omit<TdChatSenderProps & React.PropsWithChildren, 'ref'> & React.RefAttributes<HTMLElement | undefined>\n> = reactify<TdChatSenderProps>('t-chat-sender');\n\nexport default ChatSender;\nexport type * from 'tdesign-web-components/lib/chat-sender/type';\n"],"names":["ChatSender","reactify"],"mappings":";;;;;;;;;;;;;;;;;;;;IAIaA,UAAA,GAETC,SAA4B,eAAe;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ThinkContentDemo(): import("react/jsx-runtime").JSX.Element;
|