@aheart-ui/ai 1.1.0 → 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/agent-execution.vue.js +1 -0
- package/dist/cjs/agent-workbench.vue.js +1 -0
- package/dist/cjs/form-field.vue.js +1 -0
- package/dist/cjs/form.vue.js +1 -0
- package/dist/cjs/full.js +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/package.json +6 -0
- package/dist/compat/es/actions/index.d.ts +2 -0
- package/dist/compat/es/actions/index.js +2 -0
- package/dist/compat/es/actions.vue.d.ts +2 -0
- package/dist/compat/es/actions.vue.js +2 -0
- package/dist/compat/es/actions.vue2.js +2 -0
- package/dist/compat/es/agent/index.d.ts +1 -0
- package/dist/compat/es/agent/index.js +1 -0
- package/dist/compat/es/agent/style.css +3241 -0
- package/dist/compat/es/agent-execution.vue.d.ts +2 -0
- package/dist/compat/es/agent-execution.vue.js +2 -0
- package/dist/compat/es/agent-execution.vue2.js +2 -0
- package/dist/compat/es/agent-workbench/index.d.ts +2 -0
- package/dist/compat/es/agent-workbench/index.js +2 -0
- package/{es → dist/compat/es}/agent-workbench/style.css +1095 -4
- package/dist/compat/es/agent-workbench.vue.d.ts +2 -0
- package/dist/compat/es/agent-workbench.vue.js +2 -0
- package/dist/compat/es/agent-workbench.vue2.js +2 -0
- package/dist/compat/es/attachments/index.d.ts +2 -0
- package/dist/compat/es/attachments/index.js +2 -0
- package/dist/compat/es/attachments.vue.d.ts +2 -0
- package/dist/compat/es/attachments.vue.js +2 -0
- package/dist/compat/es/attachments.vue2.js +2 -0
- package/dist/compat/es/bubble/index.d.ts +2 -0
- package/dist/compat/es/bubble/index.js +2 -0
- package/dist/compat/es/bubble.vue.d.ts +2 -0
- package/dist/compat/es/bubble.vue.js +2 -0
- package/dist/compat/es/bubble.vue2.js +2 -0
- package/dist/compat/es/chat/index.d.ts +1 -0
- package/dist/compat/es/chat/index.js +1 -0
- package/dist/compat/es/chat-panel/index.d.ts +2 -0
- package/dist/compat/es/chat-panel/index.js +2 -0
- package/{lib/chat → dist/compat/es/chat-panel}/style.css +0 -4
- package/dist/compat/es/chat-panel.vue.d.ts +2 -0
- package/dist/compat/es/chat-panel.vue.js +2 -0
- package/dist/compat/es/chat-panel.vue2.js +2 -0
- package/dist/compat/es/conversations/index.d.ts +2 -0
- package/dist/compat/es/conversations/index.js +2 -0
- package/dist/compat/es/conversations.vue.d.ts +2 -0
- package/dist/compat/es/conversations.vue.js +2 -0
- package/dist/compat/es/conversations.vue2.js +2 -0
- package/dist/compat/es/form/index.d.ts +2 -0
- package/dist/compat/es/form/index.js +2 -0
- package/dist/compat/es/form/style.css +3175 -0
- package/dist/compat/es/form-field.vue.d.ts +2 -0
- package/dist/compat/es/form-field.vue.js +2 -0
- package/dist/compat/es/form-field.vue2.js +2 -0
- package/dist/compat/es/form-schema.d.ts +1 -0
- package/dist/compat/es/form-schema.js +1 -0
- package/dist/compat/es/form.vue.d.ts +2 -0
- package/dist/compat/es/form.vue.js +2 -0
- package/dist/compat/es/form.vue2.js +2 -0
- package/dist/compat/es/full.d.ts +2 -0
- package/dist/compat/es/full.js +2 -0
- package/dist/compat/es/index.d.ts +2 -0
- package/dist/compat/es/index.js +2 -0
- package/dist/compat/es/package.json +6 -0
- package/dist/compat/es/process/index.d.ts +2 -0
- package/dist/compat/es/process/index.js +2 -0
- package/dist/compat/es/process.vue.d.ts +2 -0
- package/dist/compat/es/process.vue.js +2 -0
- package/dist/compat/es/process.vue2.js +2 -0
- package/dist/compat/es/prompts/index.d.ts +2 -0
- package/dist/compat/es/prompts/index.js +2 -0
- package/dist/compat/es/prompts.vue.d.ts +2 -0
- package/dist/compat/es/prompts.vue.js +2 -0
- package/dist/compat/es/prompts.vue2.js +2 -0
- package/dist/compat/es/safe-markdown.d.ts +1 -0
- package/dist/compat/es/safe-markdown.js +1 -0
- package/dist/compat/es/sender/index.d.ts +2 -0
- package/dist/compat/es/sender/index.js +2 -0
- package/dist/compat/es/sender.vue.d.ts +2 -0
- package/dist/compat/es/sender.vue.js +2 -0
- package/dist/compat/es/sender.vue2.js +2 -0
- package/dist/compat/es/sources/index.d.ts +2 -0
- package/dist/compat/es/sources/index.js +2 -0
- package/dist/compat/es/sources.vue.d.ts +2 -0
- package/dist/compat/es/sources.vue.js +2 -0
- package/dist/compat/es/sources.vue2.js +2 -0
- package/dist/compat/es/stream-reducer.d.ts +1 -0
- package/dist/compat/es/stream-reducer.js +1 -0
- package/dist/compat/es/thought-chain/index.d.ts +2 -0
- package/dist/compat/es/thought-chain/index.js +2 -0
- package/dist/compat/es/thought-chain.vue.d.ts +2 -0
- package/dist/compat/es/thought-chain.vue.js +2 -0
- package/dist/compat/es/thought-chain.vue2.js +2 -0
- package/dist/compat/es/types.d.ts +1 -0
- package/dist/compat/es/welcome/index.d.ts +2 -0
- package/dist/compat/es/welcome/index.js +2 -0
- package/dist/compat/es/welcome.vue.d.ts +2 -0
- package/dist/compat/es/welcome.vue.js +2 -0
- package/dist/compat/es/welcome.vue2.js +2 -0
- package/dist/compat/lib/actions/index.d.ts +2 -0
- package/dist/compat/lib/actions/index.js +1 -0
- package/dist/compat/lib/actions.vue.d.ts +2 -0
- package/dist/compat/lib/actions.vue.js +1 -0
- package/dist/compat/lib/actions.vue2.js +1 -0
- package/dist/compat/lib/agent/index.d.ts +1 -0
- package/dist/compat/lib/agent/index.js +1 -0
- package/dist/compat/lib/agent/style.css +3241 -0
- package/dist/compat/lib/agent-execution.vue.d.ts +2 -0
- package/dist/compat/lib/agent-execution.vue.js +1 -0
- package/dist/compat/lib/agent-execution.vue2.js +1 -0
- package/dist/compat/lib/agent-workbench/index.d.ts +2 -0
- package/dist/compat/lib/agent-workbench/index.js +1 -0
- package/dist/compat/lib/agent-workbench/style.css +2423 -0
- package/dist/compat/lib/agent-workbench.vue.d.ts +2 -0
- package/dist/compat/lib/agent-workbench.vue.js +1 -0
- package/dist/compat/lib/agent-workbench.vue2.js +1 -0
- package/dist/compat/lib/attachments/index.d.ts +2 -0
- package/dist/compat/lib/attachments/index.js +1 -0
- package/dist/compat/lib/attachments.vue.d.ts +2 -0
- package/dist/compat/lib/attachments.vue.js +1 -0
- package/dist/compat/lib/attachments.vue2.js +1 -0
- package/dist/compat/lib/bubble/index.d.ts +2 -0
- package/dist/compat/lib/bubble/index.js +1 -0
- package/dist/compat/lib/bubble.vue.d.ts +2 -0
- package/dist/compat/lib/bubble.vue.js +1 -0
- package/dist/compat/lib/bubble.vue2.js +1 -0
- package/dist/compat/lib/chat/index.d.ts +1 -0
- package/dist/compat/lib/chat/index.js +1 -0
- package/dist/compat/lib/chat-panel/index.d.ts +2 -0
- package/dist/compat/lib/chat-panel/index.js +1 -0
- package/dist/compat/lib/chat-panel/style.css +591 -0
- package/dist/compat/lib/chat-panel.vue.d.ts +2 -0
- package/dist/compat/lib/chat-panel.vue.js +1 -0
- package/dist/compat/lib/chat-panel.vue2.js +1 -0
- package/dist/compat/lib/conversations/index.d.ts +2 -0
- package/dist/compat/lib/conversations/index.js +1 -0
- package/dist/compat/lib/conversations.vue.d.ts +2 -0
- package/dist/compat/lib/conversations.vue.js +1 -0
- package/dist/compat/lib/conversations.vue2.js +1 -0
- package/dist/compat/lib/form/index.d.ts +2 -0
- package/dist/compat/lib/form/index.js +1 -0
- package/dist/compat/lib/form/style.css +3175 -0
- package/dist/compat/lib/form-field.vue.d.ts +2 -0
- package/dist/compat/lib/form-field.vue.js +1 -0
- package/dist/compat/lib/form-field.vue2.js +1 -0
- package/dist/compat/lib/form-schema.d.ts +1 -0
- package/dist/compat/lib/form-schema.js +1 -0
- package/dist/compat/lib/form.vue.d.ts +2 -0
- package/dist/compat/lib/form.vue.js +1 -0
- package/dist/compat/lib/form.vue2.js +1 -0
- package/dist/compat/lib/full.d.ts +2 -0
- package/dist/compat/lib/full.js +1 -0
- package/dist/compat/lib/index.d.ts +2 -0
- package/dist/compat/lib/index.js +1 -0
- package/dist/compat/lib/package.json +6 -0
- package/dist/compat/lib/process/index.d.ts +2 -0
- package/dist/compat/lib/process/index.js +1 -0
- package/dist/compat/lib/process.vue.d.ts +2 -0
- package/dist/compat/lib/process.vue.js +1 -0
- package/dist/compat/lib/process.vue2.js +1 -0
- package/dist/compat/lib/prompts/index.d.ts +2 -0
- package/dist/compat/lib/prompts/index.js +1 -0
- package/dist/compat/lib/prompts.vue.d.ts +2 -0
- package/dist/compat/lib/prompts.vue.js +1 -0
- package/dist/compat/lib/prompts.vue2.js +1 -0
- package/dist/compat/lib/safe-markdown.d.ts +1 -0
- package/dist/compat/lib/safe-markdown.js +1 -0
- package/dist/compat/lib/sender/index.d.ts +2 -0
- package/dist/compat/lib/sender/index.js +1 -0
- package/dist/compat/lib/sender.vue.d.ts +2 -0
- package/dist/compat/lib/sender.vue.js +1 -0
- package/dist/compat/lib/sender.vue2.js +1 -0
- package/dist/compat/lib/sources/index.d.ts +2 -0
- package/dist/compat/lib/sources/index.js +1 -0
- package/dist/compat/lib/sources.vue.d.ts +2 -0
- package/dist/compat/lib/sources.vue.js +1 -0
- package/dist/compat/lib/sources.vue2.js +1 -0
- package/dist/compat/lib/stream-reducer.d.ts +1 -0
- package/dist/compat/lib/stream-reducer.js +1 -0
- package/dist/compat/lib/thought-chain/index.d.ts +2 -0
- package/dist/compat/lib/thought-chain/index.js +1 -0
- package/dist/compat/lib/thought-chain.vue.d.ts +2 -0
- package/dist/compat/lib/thought-chain.vue.js +1 -0
- package/dist/compat/lib/thought-chain.vue2.js +1 -0
- package/dist/compat/lib/types.d.ts +1 -0
- package/dist/compat/lib/welcome/index.d.ts +2 -0
- package/dist/compat/lib/welcome/index.js +1 -0
- package/dist/compat/lib/welcome.vue.d.ts +2 -0
- package/dist/compat/lib/welcome.vue.js +1 -0
- package/dist/compat/lib/welcome.vue2.js +1 -0
- package/{es → dist/esm}/agent-execution.vue.js +1 -1
- package/{es → dist/esm}/agent-workbench.vue.js +9 -6
- package/{es → dist/esm}/form-field.vue.js +53 -43
- package/{es → dist/esm}/form.vue.js +7 -6
- package/dist/esm/full.js +42 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/package.json +6 -0
- package/dist/styles/actions/style.css +36 -0
- package/dist/styles/agent/style.css +3241 -0
- package/dist/styles/agent-workbench/style.css +2423 -0
- package/dist/styles/attachments/style.css +62 -0
- package/dist/styles/bubble/style.css +241 -0
- package/dist/styles/chat-panel/style.css +591 -0
- package/dist/styles/conversations/style.css +48 -0
- package/dist/styles/form/style.css +3175 -0
- package/dist/styles/process/style.css +77 -0
- package/dist/styles/prompts/style.css +76 -0
- package/dist/styles/sender/style.css +88 -0
- package/dist/styles/sources/style.css +54 -0
- package/{lib/agent-workbench → dist/styles}/style.css +254 -0
- package/dist/styles/thought-chain/style.css +77 -0
- package/dist/styles/welcome/style.css +33 -0
- package/dist/types/full.d.ts +6 -0
- package/{lib → dist/types}/index.d.ts +1 -2
- package/package.json +111 -85
- package/es/agent/style.css +0 -308
- package/es/form/style.css +0 -242
- package/es/index.d.ts +0 -20
- package/es/index.js +0 -42
- package/es/package.json +0 -3
- package/lib/actions/index.d.ts +0 -2
- package/lib/actions.vue.d.ts +0 -34
- package/lib/agent/index.d.ts +0 -5
- package/lib/agent/style.css +0 -308
- package/lib/agent-execution.vue.d.ts +0 -106
- package/lib/agent-execution.vue.js +0 -1
- package/lib/agent-workbench/index.d.ts +0 -2
- package/lib/agent-workbench.vue.d.ts +0 -186
- package/lib/agent-workbench.vue.js +0 -1
- package/lib/attachments/index.d.ts +0 -2
- package/lib/attachments.vue.d.ts +0 -39
- package/lib/bubble/index.d.ts +0 -2
- package/lib/bubble.vue.d.ts +0 -27
- package/lib/chat/index.d.ts +0 -11
- package/lib/chat-panel/index.d.ts +0 -3
- package/lib/chat-panel.vue.d.ts +0 -108
- package/lib/conversations/index.d.ts +0 -2
- package/lib/conversations.vue.d.ts +0 -39
- package/lib/form/index.d.ts +0 -3
- package/lib/form/style.css +0 -242
- package/lib/form-field.vue.d.ts +0 -28
- package/lib/form-field.vue.js +0 -1
- package/lib/form-schema.d.ts +0 -73
- package/lib/form.vue.d.ts +0 -81
- package/lib/form.vue.js +0 -1
- package/lib/index.js +0 -1
- package/lib/package.json +0 -3
- package/lib/process/index.d.ts +0 -2
- package/lib/process.vue.d.ts +0 -30
- package/lib/prompts/index.d.ts +0 -2
- package/lib/prompts.vue.d.ts +0 -39
- package/lib/safe-markdown.d.ts +0 -3
- package/lib/sender/index.d.ts +0 -2
- package/lib/sender.vue.d.ts +0 -52
- package/lib/sources/index.d.ts +0 -2
- package/lib/sources.vue.d.ts +0 -30
- package/lib/stream-reducer.d.ts +0 -35
- package/lib/thought-chain/index.d.ts +0 -2
- package/lib/thought-chain.vue.d.ts +0 -30
- package/lib/types.d.ts +0 -203
- package/lib/welcome/index.d.ts +0 -2
- package/lib/welcome.vue.d.ts +0 -41
- /package/{lib → dist/cjs}/actions/index.js +0 -0
- /package/{lib → dist/cjs}/actions.vue.js +0 -0
- /package/{lib → dist/cjs}/actions.vue2.js +0 -0
- /package/{lib → dist/cjs}/agent/index.js +0 -0
- /package/{lib → dist/cjs}/agent-execution.vue2.js +0 -0
- /package/{lib → dist/cjs}/agent-workbench/index.js +0 -0
- /package/{lib → dist/cjs}/agent-workbench.vue2.js +0 -0
- /package/{lib → dist/cjs}/attachments/index.js +0 -0
- /package/{lib → dist/cjs}/attachments.vue.js +0 -0
- /package/{lib → dist/cjs}/attachments.vue2.js +0 -0
- /package/{lib → dist/cjs}/bubble/index.js +0 -0
- /package/{lib → dist/cjs}/bubble.vue.js +0 -0
- /package/{lib → dist/cjs}/bubble.vue2.js +0 -0
- /package/{lib → dist/cjs}/chat/index.js +0 -0
- /package/{lib → dist/cjs}/chat-panel/index.js +0 -0
- /package/{lib → dist/cjs}/chat-panel.vue.js +0 -0
- /package/{lib → dist/cjs}/chat-panel.vue2.js +0 -0
- /package/{lib → dist/cjs}/conversations/index.js +0 -0
- /package/{lib → dist/cjs}/conversations.vue.js +0 -0
- /package/{lib → dist/cjs}/conversations.vue2.js +0 -0
- /package/{lib → dist/cjs}/form/index.js +0 -0
- /package/{lib → dist/cjs}/form-field.vue2.js +0 -0
- /package/{lib → dist/cjs}/form-schema.js +0 -0
- /package/{lib → dist/cjs}/form.vue2.js +0 -0
- /package/{lib → dist/cjs}/process/index.js +0 -0
- /package/{lib → dist/cjs}/process.vue.js +0 -0
- /package/{lib → dist/cjs}/process.vue2.js +0 -0
- /package/{lib → dist/cjs}/prompts/index.js +0 -0
- /package/{lib → dist/cjs}/prompts.vue.js +0 -0
- /package/{lib → dist/cjs}/prompts.vue2.js +0 -0
- /package/{lib → dist/cjs}/safe-markdown.js +0 -0
- /package/{lib → dist/cjs}/sender/index.js +0 -0
- /package/{lib → dist/cjs}/sender.vue.js +0 -0
- /package/{lib → dist/cjs}/sender.vue2.js +0 -0
- /package/{lib → dist/cjs}/sources/index.js +0 -0
- /package/{lib → dist/cjs}/sources.vue.js +0 -0
- /package/{lib → dist/cjs}/sources.vue2.js +0 -0
- /package/{lib → dist/cjs}/stream-reducer.js +0 -0
- /package/{lib → dist/cjs}/thought-chain/index.js +0 -0
- /package/{lib → dist/cjs}/thought-chain.vue.js +0 -0
- /package/{lib → dist/cjs}/thought-chain.vue2.js +0 -0
- /package/{lib → dist/cjs}/welcome/index.js +0 -0
- /package/{lib → dist/cjs}/welcome.vue.js +0 -0
- /package/{lib → dist/cjs}/welcome.vue2.js +0 -0
- /package/{es → dist/compat/es}/actions/style.css +0 -0
- /package/{es → dist/compat/es}/attachments/style.css +0 -0
- /package/{es → dist/compat/es}/bubble/style.css +0 -0
- /package/{es/chat-panel → dist/compat/es/chat}/style.css +0 -0
- /package/{es → dist/compat/es}/conversations/style.css +0 -0
- /package/{es → dist/compat/es}/process/style.css +0 -0
- /package/{es → dist/compat/es}/prompts/style.css +0 -0
- /package/{es → dist/compat/es}/sender/style.css +0 -0
- /package/{es → dist/compat/es}/sources/style.css +0 -0
- /package/{es → dist/compat/es}/style.css +0 -0
- /package/{es → dist/compat/es}/thought-chain/style.css +0 -0
- /package/{es → dist/compat/es}/welcome/style.css +0 -0
- /package/{lib → dist/compat/lib}/actions/style.css +0 -0
- /package/{lib → dist/compat/lib}/attachments/style.css +0 -0
- /package/{lib → dist/compat/lib}/bubble/style.css +0 -0
- /package/{es → dist/compat/lib}/chat/style.css +0 -0
- /package/{lib → dist/compat/lib}/conversations/style.css +0 -0
- /package/{lib → dist/compat/lib}/process/style.css +0 -0
- /package/{lib → dist/compat/lib}/prompts/style.css +0 -0
- /package/{lib → dist/compat/lib}/sender/style.css +0 -0
- /package/{lib → dist/compat/lib}/sources/style.css +0 -0
- /package/{lib → dist/compat/lib}/style.css +0 -0
- /package/{lib → dist/compat/lib}/thought-chain/style.css +0 -0
- /package/{lib → dist/compat/lib}/welcome/style.css +0 -0
- /package/{es → dist/esm}/actions/index.js +0 -0
- /package/{es → dist/esm}/actions.vue.js +0 -0
- /package/{es → dist/esm}/actions.vue2.js +0 -0
- /package/{es → dist/esm}/agent/index.js +0 -0
- /package/{es → dist/esm}/agent-execution.vue2.js +0 -0
- /package/{es → dist/esm}/agent-workbench/index.js +0 -0
- /package/{es → dist/esm}/agent-workbench.vue2.js +0 -0
- /package/{es → dist/esm}/attachments/index.js +0 -0
- /package/{es → dist/esm}/attachments.vue.js +0 -0
- /package/{es → dist/esm}/attachments.vue2.js +0 -0
- /package/{es → dist/esm}/bubble/index.js +0 -0
- /package/{es → dist/esm}/bubble.vue.js +0 -0
- /package/{es → dist/esm}/bubble.vue2.js +0 -0
- /package/{es → dist/esm}/chat/index.js +0 -0
- /package/{es → dist/esm}/chat-panel/index.js +0 -0
- /package/{es → dist/esm}/chat-panel.vue.js +0 -0
- /package/{es → dist/esm}/chat-panel.vue2.js +0 -0
- /package/{es → dist/esm}/conversations/index.js +0 -0
- /package/{es → dist/esm}/conversations.vue.js +0 -0
- /package/{es → dist/esm}/conversations.vue2.js +0 -0
- /package/{es → dist/esm}/form/index.js +0 -0
- /package/{es → dist/esm}/form-field.vue2.js +0 -0
- /package/{es → dist/esm}/form-schema.js +0 -0
- /package/{es → dist/esm}/form.vue2.js +0 -0
- /package/{es → dist/esm}/process/index.js +0 -0
- /package/{es → dist/esm}/process.vue.js +0 -0
- /package/{es → dist/esm}/process.vue2.js +0 -0
- /package/{es → dist/esm}/prompts/index.js +0 -0
- /package/{es → dist/esm}/prompts.vue.js +0 -0
- /package/{es → dist/esm}/prompts.vue2.js +0 -0
- /package/{es → dist/esm}/safe-markdown.js +0 -0
- /package/{es → dist/esm}/sender/index.js +0 -0
- /package/{es → dist/esm}/sender.vue.js +0 -0
- /package/{es → dist/esm}/sender.vue2.js +0 -0
- /package/{es → dist/esm}/sources/index.js +0 -0
- /package/{es → dist/esm}/sources.vue.js +0 -0
- /package/{es → dist/esm}/sources.vue2.js +0 -0
- /package/{es → dist/esm}/stream-reducer.js +0 -0
- /package/{es → dist/esm}/thought-chain/index.js +0 -0
- /package/{es → dist/esm}/thought-chain.vue.js +0 -0
- /package/{es → dist/esm}/thought-chain.vue2.js +0 -0
- /package/{es → dist/esm}/welcome/index.js +0 -0
- /package/{es → dist/esm}/welcome.vue.js +0 -0
- /package/{es → dist/esm}/welcome.vue2.js +0 -0
- /package/{lib/chat-panel → dist/styles/chat}/style.css +0 -0
- /package/{es → dist/types}/actions/index.d.ts +0 -0
- /package/{es → dist/types}/actions.vue.d.ts +0 -0
- /package/{es → dist/types}/agent/index.d.ts +0 -0
- /package/{es → dist/types}/agent-execution.vue.d.ts +0 -0
- /package/{es → dist/types}/agent-workbench/index.d.ts +0 -0
- /package/{es → dist/types}/agent-workbench.vue.d.ts +0 -0
- /package/{es → dist/types}/attachments/index.d.ts +0 -0
- /package/{es → dist/types}/attachments.vue.d.ts +0 -0
- /package/{es → dist/types}/bubble/index.d.ts +0 -0
- /package/{es → dist/types}/bubble.vue.d.ts +0 -0
- /package/{es → dist/types}/chat/index.d.ts +0 -0
- /package/{es → dist/types}/chat-panel/index.d.ts +0 -0
- /package/{es → dist/types}/chat-panel.vue.d.ts +0 -0
- /package/{es → dist/types}/conversations/index.d.ts +0 -0
- /package/{es → dist/types}/conversations.vue.d.ts +0 -0
- /package/{es → dist/types}/form/index.d.ts +0 -0
- /package/{es → dist/types}/form-field.vue.d.ts +0 -0
- /package/{es → dist/types}/form-schema.d.ts +0 -0
- /package/{es → dist/types}/form.vue.d.ts +0 -0
- /package/{es → dist/types}/process/index.d.ts +0 -0
- /package/{es → dist/types}/process.vue.d.ts +0 -0
- /package/{es → dist/types}/prompts/index.d.ts +0 -0
- /package/{es → dist/types}/prompts.vue.d.ts +0 -0
- /package/{es → dist/types}/safe-markdown.d.ts +0 -0
- /package/{es → dist/types}/sender/index.d.ts +0 -0
- /package/{es → dist/types}/sender.vue.d.ts +0 -0
- /package/{es → dist/types}/sources/index.d.ts +0 -0
- /package/{es → dist/types}/sources.vue.d.ts +0 -0
- /package/{es → dist/types}/stream-reducer.d.ts +0 -0
- /package/{es → dist/types}/thought-chain/index.d.ts +0 -0
- /package/{es → dist/types}/thought-chain.vue.d.ts +0 -0
- /package/{es → dist/types}/types.d.ts +0 -0
- /package/{es → dist/types}/welcome/index.d.ts +0 -0
- /package/{es → dist/types}/welcome.vue.d.ts +0 -0
package/lib/form/style.css
DELETED
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
--aheart-ai-cyan: #0e7490;
|
|
3
|
-
--aheart-ai-cyan-strong: #0e7490;
|
|
4
|
-
--aheart-ai-brand-strong: #0958d9;
|
|
5
|
-
--aheart-ai-cyan-soft: #ecfeff;
|
|
6
|
-
--aheart-ai-line: #e4e7ec;
|
|
7
|
-
--aheart-ai-surface: #ffffff;
|
|
8
|
-
--aheart-ai-surface-subtle: #f8fafc;
|
|
9
|
-
--aheart-ai-text: #182230;
|
|
10
|
-
--aheart-ai-text-secondary: #667085;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.aheart-ai-visually-hidden {
|
|
14
|
-
position: absolute;
|
|
15
|
-
width: 1px;
|
|
16
|
-
height: 1px;
|
|
17
|
-
padding: 0;
|
|
18
|
-
margin: -1px;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
clip: rect(0, 0, 0, 0);
|
|
21
|
-
white-space: nowrap;
|
|
22
|
-
border: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.aheart-ai-form {
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
color: var(--aheart-color-text, var(--aheart-ai-text));
|
|
28
|
-
letter-spacing: 0;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.aheart-ai-form * {
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.aheart-ai-form {
|
|
36
|
-
display: grid;
|
|
37
|
-
gap: 20px;
|
|
38
|
-
inline-size: min(100%, 760px);
|
|
39
|
-
padding: clamp(18px, 4vw, 32px);
|
|
40
|
-
border: 1px solid var(--aheart-ai-line);
|
|
41
|
-
border-radius: 8px;
|
|
42
|
-
background: var(--aheart-ai-surface);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.aheart-ai-form__header {
|
|
46
|
-
display: grid;
|
|
47
|
-
gap: 5px;
|
|
48
|
-
padding-block-end: 18px;
|
|
49
|
-
border-block-end: 1px solid var(--aheart-ai-line);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.aheart-ai-form__header h2,
|
|
53
|
-
.aheart-ai-form__header p {
|
|
54
|
-
margin: 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.aheart-ai-form__header h2 {
|
|
58
|
-
color: var(--aheart-ai-text);
|
|
59
|
-
font-size: 20px;
|
|
60
|
-
line-height: 1.4;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.aheart-ai-form__header p {
|
|
64
|
-
color: var(--aheart-ai-text-secondary);
|
|
65
|
-
line-height: 1.6;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.aheart-ai-form__group {
|
|
69
|
-
display: grid;
|
|
70
|
-
gap: 16px;
|
|
71
|
-
min-inline-size: 0;
|
|
72
|
-
margin: 0;
|
|
73
|
-
padding: 0;
|
|
74
|
-
border: 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
fieldset.aheart-ai-form__group {
|
|
78
|
-
padding-block-start: 16px;
|
|
79
|
-
border-block-start: 1px solid var(--aheart-ai-line);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.aheart-ai-form__group legend {
|
|
83
|
-
display: grid;
|
|
84
|
-
gap: 3px;
|
|
85
|
-
inline-size: 100%;
|
|
86
|
-
padding: 0;
|
|
87
|
-
color: var(--aheart-ai-text);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.aheart-ai-form__group legend span {
|
|
91
|
-
font-weight: 650;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.aheart-ai-form__group legend small,
|
|
95
|
-
.aheart-ai-form__field-description {
|
|
96
|
-
color: var(--aheart-ai-text-secondary);
|
|
97
|
-
font-size: 12px;
|
|
98
|
-
line-height: 1.5;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.aheart-ai-form__field {
|
|
102
|
-
display: grid;
|
|
103
|
-
grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
|
|
104
|
-
column-gap: 18px;
|
|
105
|
-
row-gap: 6px;
|
|
106
|
-
align-items: start;
|
|
107
|
-
padding: 3px 0;
|
|
108
|
-
border-radius: 5px;
|
|
109
|
-
outline: none;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.aheart-ai-form__field:focus-visible {
|
|
113
|
-
box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.15);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.aheart-ai-form__field > label {
|
|
117
|
-
grid-column: 1;
|
|
118
|
-
grid-row: 1;
|
|
119
|
-
padding-block-start: 7px;
|
|
120
|
-
color: #344054;
|
|
121
|
-
font-weight: 550;
|
|
122
|
-
line-height: 1.5;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.aheart-ai-form__field-description {
|
|
126
|
-
grid-column: 1;
|
|
127
|
-
grid-row: 2;
|
|
128
|
-
margin: 0;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.aheart-ai-form__field > :not(label):not(.aheart-ai-form__field-description):not(.aheart-ai-form__field-error):not(.aheart-switch) {
|
|
132
|
-
grid-column: 2;
|
|
133
|
-
grid-row: 1 / span 2;
|
|
134
|
-
inline-size: 100%;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.aheart-ai-form__field > .aheart-switch {
|
|
138
|
-
grid-column: 2;
|
|
139
|
-
grid-row: 1 / span 2;
|
|
140
|
-
justify-self: start;
|
|
141
|
-
inline-size: fit-content;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.aheart-ai-form__required {
|
|
145
|
-
margin-inline-start: 3px;
|
|
146
|
-
color: var(--aheart-color-danger, #d92d20);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.aheart-ai-form__field-error {
|
|
150
|
-
grid-column: 2;
|
|
151
|
-
margin: 0;
|
|
152
|
-
color: var(--aheart-color-danger, #d92d20);
|
|
153
|
-
font-size: 12px;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.aheart-ai-form__field.is-error {
|
|
157
|
-
padding: 8px;
|
|
158
|
-
background: #fff7f6;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.aheart-ai-form__error-summary,
|
|
162
|
-
.aheart-ai-form__submit-error,
|
|
163
|
-
.aheart-ai-form__error {
|
|
164
|
-
border-inline-start: 3px solid var(--aheart-color-danger, #d92d20);
|
|
165
|
-
background: #fff7f6;
|
|
166
|
-
color: #912018;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.aheart-ai-form__error-summary {
|
|
170
|
-
display: grid;
|
|
171
|
-
gap: 8px;
|
|
172
|
-
padding: 12px 14px;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
.aheart-ai-form__error-summary ul,
|
|
176
|
-
.aheart-ai-form__error ul {
|
|
177
|
-
display: grid;
|
|
178
|
-
gap: 4px;
|
|
179
|
-
margin: 0;
|
|
180
|
-
padding-inline-start: 20px;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.aheart-ai-form__error-summary button {
|
|
184
|
-
padding: 0;
|
|
185
|
-
border: 0;
|
|
186
|
-
background: transparent;
|
|
187
|
-
color: inherit;
|
|
188
|
-
font: inherit;
|
|
189
|
-
text-decoration: underline;
|
|
190
|
-
cursor: pointer;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
.aheart-ai-form__submit-error {
|
|
194
|
-
margin: 0;
|
|
195
|
-
padding: 9px 12px;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
.aheart-ai-form__footer {
|
|
199
|
-
display: flex;
|
|
200
|
-
justify-content: flex-end;
|
|
201
|
-
padding-block-start: 16px;
|
|
202
|
-
border-block-start: 1px solid var(--aheart-ai-line);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.aheart-ai-form__error {
|
|
206
|
-
display: grid;
|
|
207
|
-
gap: 8px;
|
|
208
|
-
max-inline-size: 760px;
|
|
209
|
-
padding: 16px;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
@media (max-width: 760px) {
|
|
213
|
-
|
|
214
|
-
.aheart-ai-form {
|
|
215
|
-
padding: 18px 14px;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.aheart-ai-form__field {
|
|
219
|
-
grid-template-columns: minmax(0, 1fr);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
.aheart-ai-form__field > label,
|
|
223
|
-
.aheart-ai-form__field-description,
|
|
224
|
-
.aheart-ai-form__field > :not(label):not(.aheart-ai-form__field-description):not(.aheart-ai-form__field-error):not(.aheart-switch),
|
|
225
|
-
.aheart-ai-form__field > .aheart-switch,
|
|
226
|
-
.aheart-ai-form__field-error {
|
|
227
|
-
grid-column: 1;
|
|
228
|
-
grid-row: auto;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
.aheart-ai-form__field > label {
|
|
232
|
-
padding-block-start: 0;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
@media (prefers-reduced-motion: reduce) {
|
|
237
|
-
.aheart-ai-form * {
|
|
238
|
-
scroll-behavior: auto !important;
|
|
239
|
-
transition-duration: 0.01ms !important;
|
|
240
|
-
animation-duration: 0.01ms !important;
|
|
241
|
-
}
|
|
242
|
-
}
|
package/lib/form-field.vue.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { AIFormFieldV1 } from './form-schema';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
field: AIFormFieldV1;
|
|
4
|
-
value: unknown;
|
|
5
|
-
disabled?: boolean | undefined;
|
|
6
|
-
error?: string | undefined;
|
|
7
|
-
}>>, {
|
|
8
|
-
focus: () => void;
|
|
9
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
update: (value: unknown) => void;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
-
field: AIFormFieldV1;
|
|
13
|
-
value: unknown;
|
|
14
|
-
disabled?: boolean | undefined;
|
|
15
|
-
error?: string | undefined;
|
|
16
|
-
}>>> & Readonly<{
|
|
17
|
-
onUpdate?: ((value: unknown) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
|
-
export default _default;
|
|
20
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
21
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
22
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
23
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
24
|
-
} : {
|
|
25
|
-
type: import('vue').PropType<T[K]>;
|
|
26
|
-
required: true;
|
|
27
|
-
};
|
|
28
|
-
};
|
package/lib/form-field.vue.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("vue"),t=require("aheart-ui"),m=["data-field-key","aria-invalid","aria-describedby"],s=["id","for"],v={key:0,class:"aheart-ai-form__required","aria-hidden":"true"},B=["id"],V=["id"],U=l.defineComponent({__name:"form-field",props:{field:{},value:{},disabled:{type:Boolean},error:{}},emits:["update"],setup(e,{expose:f,emit:y}){const o=e,i=y,b=l.ref(),n=l.ref(),c=l.computed(()=>(o.field.options??[]).map(r=>({key:r.value,title:r.label,disabled:r.disabled}))),u=l.computed(()=>[o.field.description&&`${o.field.key}-description`,o.error&&`${o.field.key}-error`].filter(Boolean).join(" ")||void 0),k=l.computed(()=>o.field.type==="date-range"||o.field.type==="time-range"?`${o.field.key}-start`:o.field.key);return f({focus:()=>{var r,d;if(n.value){n.value.focus("start");return}(d=(r=b.value)==null?void 0:r.querySelector('input, button, [role="combobox"], [tabindex="0"]'))==null||d.focus({preventScroll:!0})}}),(r,d)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"fieldElement",ref:b,class:l.normalizeClass(["aheart-ai-form__field",{"is-error":!!e.error,"is-disabled":e.disabled}]),"data-field-key":e.field.key,"aria-invalid":e.error?"true":void 0,"aria-describedby":u.value,tabindex:"-1"},[l.createElementVNode("label",{id:`${e.field.key}-label`,for:k.value},[l.createTextVNode(l.toDisplayString(e.field.label)+" ",1),e.field.required?(l.openBlock(),l.createElementBlock("span",v,"*")):l.createCommentVNode("",!0)],8,s),e.field.description?(l.openBlock(),l.createElementBlock("p",{key:0,id:`${e.field.key}-description`,class:"aheart-ai-form__field-description"},l.toDisplayString(e.field.description),9,B)):l.createCommentVNode("",!0),e.field.type==="textarea"?(l.openBlock(),l.createBlock(l.unref(t.Textarea),{key:1,id:e.field.key,"aria-labelledby":`${e.field.key}-label`,"aria-describedby":u.value,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[0]||(d[0]=a=>i("update",a))},null,8,["id","aria-labelledby","aria-describedby","model-value","placeholder","disabled"])):e.field.type==="tree-select"?(l.openBlock(),l.createBlock(l.unref(t.TreeSelect),{key:2,id:e.field.key,"labelled-by":`${e.field.key}-label`,"model-value":e.value,"tree-data":c.value,multiple:Array.isArray(e.value),disabled:e.disabled,"onUpdate:modelValue":d[1]||(d[1]=a=>i("update",a))},null,8,["id","labelled-by","model-value","tree-data","multiple","disabled"])):e.field.type==="upload"?(l.openBlock(),l.createBlock(l.unref(t.Upload),{key:3,"file-list":e.value,disabled:e.disabled,"onUpdate:fileList":d[2]||(d[2]=a=>i("update",a))},null,8,["file-list","disabled"])):e.field.type==="radio"?(l.openBlock(),l.createBlock(l.unref(t.RadioGroup),{key:4,"model-value":e.value,options:e.field.options,disabled:e.disabled,"onUpdate:modelValue":d[3]||(d[3]=a=>i("update",a))},null,8,["model-value","options","disabled"])):e.field.type==="checkbox"?(l.openBlock(),l.createBlock(l.unref(t.CheckboxGroup),{key:5,"model-value":e.value,options:e.field.options,disabled:e.disabled,"onUpdate:modelValue":d[4]||(d[4]=a=>i("update",a))},null,8,["model-value","options","disabled"])):e.field.type==="select"?(l.openBlock(),l.createBlock(l.unref(t.Select),{key:6,id:e.field.key,"labelled-by":`${e.field.key}-label`,"model-value":e.value,disabled:e.disabled,options:e.field.options,"onUpdate:modelValue":d[5]||(d[5]=a=>i("update",a))},null,8,["id","labelled-by","model-value","disabled","options"])):e.field.type==="switch"?(l.openBlock(),l.createBlock(l.unref(t.Switch),{key:7,id:e.field.key,"model-value":!!e.value,disabled:e.disabled,"onUpdate:modelValue":d[6]||(d[6]=a=>i("update",a))},null,8,["id","model-value","disabled"])):e.field.type==="number"?(l.openBlock(),l.createBlock(l.unref(t.InputNumber),{key:8,id:e.field.key,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[7]||(d[7]=a=>i("update",a))},null,8,["id","model-value","placeholder","disabled"])):e.field.type==="date"?(l.openBlock(),l.createBlock(l.unref(t.DatePicker),{key:9,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":u.value,status:e.error?"error":void 0,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[8]||(d[8]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","placeholder","disabled"])):e.field.type==="date-range"?(l.openBlock(),l.createBlock(l.unref(t.DateRangePicker),{key:10,ref_key:"rangeControl",ref:n,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":u.value,status:e.error?"error":void 0,"model-value":e.value,disabled:e.disabled,"onUpdate:modelValue":d[9]||(d[9]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","disabled"])):e.field.type==="time"?(l.openBlock(),l.createBlock(l.unref(t.TimePicker),{key:11,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":u.value,status:e.error?"error":void 0,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"onUpdate:modelValue":d[10]||(d[10]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","placeholder","disabled"])):e.field.type==="time-range"?(l.openBlock(),l.createBlock(l.unref(t.TimeRangePicker),{key:12,ref_key:"rangeControl",ref:n,id:e.field.key,"labelled-by":`${e.field.key}-label`,"described-by":u.value,status:e.error?"error":void 0,"model-value":e.value,disabled:e.disabled,"onUpdate:modelValue":d[11]||(d[11]=a=>i("update",a))},null,8,["id","labelled-by","described-by","status","model-value","disabled"])):(l.openBlock(),l.createBlock(l.unref(t.Input),{key:13,id:e.field.key,"model-value":e.value,placeholder:e.field.placeholder,disabled:e.disabled,"aria-describedby":u.value,"onUpdate:modelValue":d[12]||(d[12]=a=>i("update",a))},null,8,["id","model-value","placeholder","disabled","aria-describedby"])),e.error?(l.openBlock(),l.createElementBlock("p",{key:14,id:`${e.field.key}-error`,class:"aheart-ai-form__field-error",role:"alert"},l.toDisplayString(e.error),9,V)):l.createCommentVNode("",!0)],10,m))}});exports.default=U;
|
package/lib/form-schema.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export declare const AI_FORM_FIELD_TYPES: readonly ["input", "textarea", "number", "select", "checkbox", "radio", "switch", "date", "date-range", "time", "time-range", "upload", "tree-select"];
|
|
2
|
-
export declare const AI_FORM_CONDITION_OPERATORS: readonly ["equals", "not-equals", "includes", "not-includes", "is-empty", "is-not-empty"];
|
|
3
|
-
export type AIFormFieldType = (typeof AI_FORM_FIELD_TYPES)[number];
|
|
4
|
-
export type AIFormConditionOperator = (typeof AI_FORM_CONDITION_OPERATORS)[number];
|
|
5
|
-
export interface AIFormCondition {
|
|
6
|
-
field: string;
|
|
7
|
-
operator: AIFormConditionOperator;
|
|
8
|
-
value?: string | number | boolean | string[];
|
|
9
|
-
}
|
|
10
|
-
export interface AIFormOption {
|
|
11
|
-
label: string;
|
|
12
|
-
value: string | number;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface AIFormGroupV1 {
|
|
16
|
-
key: string;
|
|
17
|
-
title: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface AIFormFieldV1 {
|
|
21
|
-
key: string;
|
|
22
|
-
label: string;
|
|
23
|
-
type: AIFormFieldType;
|
|
24
|
-
defaultValue?: unknown;
|
|
25
|
-
placeholder?: string;
|
|
26
|
-
description?: string;
|
|
27
|
-
group?: string;
|
|
28
|
-
required?: boolean;
|
|
29
|
-
options?: AIFormOption[];
|
|
30
|
-
visibleWhen?: AIFormCondition;
|
|
31
|
-
disabledWhen?: AIFormCondition;
|
|
32
|
-
rules?: AIFormRuleV1[];
|
|
33
|
-
dependencies?: string[];
|
|
34
|
-
preserve?: boolean;
|
|
35
|
-
}
|
|
36
|
-
export type AIFormRuleV1 = {
|
|
37
|
-
kind: 'range';
|
|
38
|
-
valueType: 'number' | 'length';
|
|
39
|
-
min?: number;
|
|
40
|
-
max?: number;
|
|
41
|
-
message?: string;
|
|
42
|
-
} | {
|
|
43
|
-
kind: 'format';
|
|
44
|
-
format: 'email' | 'url' | 'date' | 'time';
|
|
45
|
-
message?: string;
|
|
46
|
-
} | {
|
|
47
|
-
kind: 'compare';
|
|
48
|
-
field: string;
|
|
49
|
-
operator: 'equals' | 'not-equals' | 'greater-than' | 'greater-than-or-equal' | 'less-than' | 'less-than-or-equal';
|
|
50
|
-
message?: string;
|
|
51
|
-
} | {
|
|
52
|
-
kind: 'async';
|
|
53
|
-
validator: string;
|
|
54
|
-
message?: string;
|
|
55
|
-
};
|
|
56
|
-
export type AIFormAsyncValidator = (value: unknown, context: {
|
|
57
|
-
values: Readonly<Record<string, unknown>>;
|
|
58
|
-
field: AIFormFieldV1;
|
|
59
|
-
signal: AbortSignal;
|
|
60
|
-
}) => void | boolean | string | Promise<void | boolean | string>;
|
|
61
|
-
export interface AIFormSchemaV1 {
|
|
62
|
-
version: '1';
|
|
63
|
-
title?: string;
|
|
64
|
-
description?: string;
|
|
65
|
-
groups?: AIFormGroupV1[];
|
|
66
|
-
fields: AIFormFieldV1[];
|
|
67
|
-
}
|
|
68
|
-
export interface AIFormSchemaValidation {
|
|
69
|
-
valid: boolean;
|
|
70
|
-
errors: string[];
|
|
71
|
-
schema?: AIFormSchemaV1;
|
|
72
|
-
}
|
|
73
|
-
export declare const validateAIFormSchema: (schema: unknown) => AIFormSchemaValidation;
|
package/lib/form.vue.d.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { type AIFormAsyncValidator } from './form-schema';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
modelValue?: Record<string, unknown> | undefined;
|
|
4
|
-
schema: unknown;
|
|
5
|
-
disabled?: boolean | undefined;
|
|
6
|
-
submitting?: boolean | undefined;
|
|
7
|
-
submitText?: string | undefined;
|
|
8
|
-
submitError?: string | undefined;
|
|
9
|
-
validators?: Record<string, AIFormAsyncValidator> | undefined;
|
|
10
|
-
}>, {
|
|
11
|
-
modelValue: () => {};
|
|
12
|
-
disabled: boolean;
|
|
13
|
-
submitting: boolean;
|
|
14
|
-
submitText: string;
|
|
15
|
-
submitError: undefined;
|
|
16
|
-
validators: () => {};
|
|
17
|
-
}>>, {
|
|
18
|
-
validate: () => Promise<any>;
|
|
19
|
-
resetFields: () => void;
|
|
20
|
-
clearValidate: (names?: string[] | undefined) => void;
|
|
21
|
-
setFieldsErrors: (fields: {
|
|
22
|
-
name: string;
|
|
23
|
-
errors: string[];
|
|
24
|
-
}[]) => void;
|
|
25
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
-
submit: (value: Record<string, unknown>) => void;
|
|
27
|
-
"update:modelValue": (value: Record<string, unknown>) => void;
|
|
28
|
-
"schema-error": (errors: string[]) => void;
|
|
29
|
-
"validation-error": (errors: {
|
|
30
|
-
key: string;
|
|
31
|
-
message: string;
|
|
32
|
-
}[]) => void;
|
|
33
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
34
|
-
modelValue?: Record<string, unknown> | undefined;
|
|
35
|
-
schema: unknown;
|
|
36
|
-
disabled?: boolean | undefined;
|
|
37
|
-
submitting?: boolean | undefined;
|
|
38
|
-
submitText?: string | undefined;
|
|
39
|
-
submitError?: string | undefined;
|
|
40
|
-
validators?: Record<string, AIFormAsyncValidator> | undefined;
|
|
41
|
-
}>, {
|
|
42
|
-
modelValue: () => {};
|
|
43
|
-
disabled: boolean;
|
|
44
|
-
submitting: boolean;
|
|
45
|
-
submitText: string;
|
|
46
|
-
submitError: undefined;
|
|
47
|
-
validators: () => {};
|
|
48
|
-
}>>> & Readonly<{
|
|
49
|
-
onSubmit?: ((value: Record<string, unknown>) => any) | undefined;
|
|
50
|
-
"onUpdate:modelValue"?: ((value: Record<string, unknown>) => any) | undefined;
|
|
51
|
-
"onSchema-error"?: ((errors: string[]) => any) | undefined;
|
|
52
|
-
"onValidation-error"?: ((errors: {
|
|
53
|
-
key: string;
|
|
54
|
-
message: string;
|
|
55
|
-
}[]) => any) | undefined;
|
|
56
|
-
}>, {
|
|
57
|
-
disabled: boolean;
|
|
58
|
-
modelValue: Record<string, unknown>;
|
|
59
|
-
submitting: boolean;
|
|
60
|
-
submitText: string;
|
|
61
|
-
submitError: string;
|
|
62
|
-
validators: Record<string, AIFormAsyncValidator>;
|
|
63
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
|
-
export default _default;
|
|
65
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
66
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
67
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
68
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
69
|
-
} : {
|
|
70
|
-
type: import('vue').PropType<T[K]>;
|
|
71
|
-
required: true;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
type __VLS_WithDefaults<P, D> = {
|
|
75
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
76
|
-
default: D[K];
|
|
77
|
-
}> : P[K];
|
|
78
|
-
};
|
|
79
|
-
type __VLS_Prettify<T> = {
|
|
80
|
-
[K in keyof T]: T[K];
|
|
81
|
-
} & {};
|
package/lib/form.vue.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),T=require("aheart-ui"),ie=require("./form-field.vue.js"),ce=require("./form-schema.js"),ue={key:0,class:"aheart-ai-form__header"},de={key:0},me={key:1},fe={key:1,class:"aheart-ai-form__error-summary",role:"alert",tabindex:"-1"},pe=["onClick"],ye={key:0},he={key:0},ge={key:2,class:"aheart-ai-form__submit-error",role:"alert"},ve={class:"aheart-ai-form__footer"},be={key:1,class:"aheart-ai-form__error",role:"alert"},ke=a.defineComponent({name:"AAIForm",__name:"form",props:{modelValue:{default:()=>({})},schema:{},disabled:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},submitText:{default:"提交"},submitError:{default:void 0},validators:{default:()=>({})}},emits:["update:modelValue","submit","schema-error","validation-error"],setup(p,{expose:G,emit:H}){const u=p,V=H,c=a.computed(()=>{const e=ce.validateAIFormSchema(u.schema);if(!e.valid||!e.schema)return e;const t=e.schema.fields.flatMap(r=>(r.rules??[]).filter(o=>o.kind==="async"&&!(Object.prototype.hasOwnProperty.call(u.validators,o.validator)&&typeof u.validators[o.validator]=="function")).map(o=>`fields.${r.key}.rules.${o.validator} validator 不存在`));return t.length?{valid:!1,errors:[...e.errors,...t]}:e}),y=a.computed(()=>u.modelValue),h=a.computed(()=>{var e;return(((e=c.value.schema)==null?void 0:e.fields)??[]).reduce((t,r)=>{const o=Object.prototype.hasOwnProperty.call(y.value,r.key);return!o&&N.has(r.key)||(t[r.key]=o?y.value[r.key]:r.defaultValue),t},{...y.value})}),i=a.reactive({}),A=a.reactive({}),j=new Map,q=a.reactive({}),R=new Map,v=a.ref(),d=new Map,P=()=>{for(const e of d.values())e.abort();d.clear()},x=a.ref({}),N=a.reactive(new Set),g=new Set,B=new Map,b=new Map,k=new Map,Y=a.ref(!1);a.onMounted(()=>{Y.value=!0});const U=a.ref(!1),J=a.ref(0),_=a.ref(!1);a.watch(c,e=>{e.valid||V("schema-error",e.errors)},{immediate:!0}),a.watch(h,e=>{Object.keys(x.value).length||(x.value=O(e))},{immediate:!0,deep:!0}),a.watch(h,(e,t)=>{Object.keys(A).forEach(r=>{Object.prototype.hasOwnProperty.call(e,r)||delete A[r]}),Object.entries(e).forEach(([r,o])=>{const s=j.get(r);j.has(r)?E(o,s)&&(j.delete(r),delete i[r]):t&&!E(o,t[r])&&delete i[r],A[r]=O(o)})},{immediate:!0,deep:!0}),a.watch(y,e=>{for(const t of[...g]){const r=b.get(t),o=k.get(t),s=a.toRaw(e);if(s!==r){if(s!==r&&!E(s,o)){g.delete(t),B.delete(t),b.delete(t),k.delete(t);continue}Object.prototype.hasOwnProperty.call(e,t)?(g.delete(t),B.delete(t),b.delete(t),k.delete(t)):(N.add(t),g.delete(t),B.delete(t),b.delete(t),k.delete(t))}}},{deep:!0});const D=e=>{if(!e)return!0;const t=h.value[e.field];return e.operator==="equals"?t===e.value:e.operator==="not-equals"?t!==e.value:e.operator==="includes"?Array.isArray(t)?t.includes(e.value):String(t??"").includes(String(e.value??"")):e.operator==="not-includes"?Array.isArray(t)?!t.includes(e.value):!String(t??"").includes(String(e.value??"")):e.operator==="is-empty"?w(t):!w(t)},F=a.computed(()=>{var e;return((e=c.value.schema)==null?void 0:e.fields.filter(t=>D(t.visibleWhen)))??[]});a.watch(h,(e,t)=>{var l;const r=t??{},o={...y.value};let s=!1;for(const n of((l=c.value.schema)==null?void 0:l.fields)??[]){const m=W(n.visibleWhen,r),f=W(n.visibleWhen,e);f&&g.has(n.key)&&!N.has(n.key)&&(g.delete(n.key),B.delete(n.key),b.delete(n.key),k.delete(n.key)),m&&!f&&n.preserve===!1&&(delete o[n.key],g.add(n.key),B.set(n.key,Object.prototype.hasOwnProperty.call(y.value,n.key)),b.set(n.key,a.toRaw(y.value)),k.set(n.key,a.toRaw(o)),s=!0)}s&&V("update:modelValue",o)},{deep:!0}),a.watch(h,(e,t)=>{var o,s;const r=t??{};for(const l of((o=c.value.schema)==null?void 0:o.fields)??[]){const n=z(l);(!E(e[l.key],r[l.key])||n.some(f=>!E(e[f],r[f])))&&((s=d.get(l.key))==null||s.abort(),d.delete(l.key))}},{deep:!0}),a.watch(()=>u.schema,()=>{for(const e of d.values())e.abort();d.clear()});const W=(e,t)=>{if(!e)return!0;const r=t[e.field];return e.operator==="equals"?r===e.value:e.operator==="not-equals"?r!==e.value:e.operator==="is-empty"?w(r):e.operator==="is-not-empty"?!w(r):e.operator==="includes"?Array.isArray(r)?r.includes(e.value):String(r??"").includes(String(e.value??"")):Array.isArray(r)?!r.includes(e.value):!String(r??"").includes(String(e.value??""))},S=e=>u.disabled||u.submitting||!!(e.disabledWhen&&D(e.disabledWhen)),Q=a.computed(()=>{const e=c.value.schema;if(!e)return[];const t=(e.groups??[]).map(o=>({key:o.key,group:o,fields:F.value.filter(s=>s.group===o.key)})).filter(o=>o.fields.length>0),r=F.value.filter(o=>!o.group);return r.length&&t.push({key:"__ungrouped",fields:r}),t}),M=a.computed(()=>F.value.filter(e=>i[e.key]).map(e=>({key:e.key,message:i[e.key]})));a.watch([h,F],()=>{var t;const e=((t=c.value.schema)==null?void 0:t.fields)??[];Object.keys(i).forEach(r=>{const o=e.find(s=>s.key===r);(!o||!D(o.visibleWhen)||S(o))&&delete i[r]})});function w(e){return e==null||e===""||e===!1||Array.isArray(e)&&(e.length===0||e.every(t=>t==null||t===""))}function E(e,t){if(Object.is(e,t))return!0;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)&&e.length===t.length&&e.every((r,o)=>E(r,t[o]));if(e&&t&&typeof e=="object"&&typeof t=="object"){const r=e,o=t,s=Object.keys(r),l=Object.keys(o);return s.length===l.length&&s.every(n=>Object.prototype.hasOwnProperty.call(o,n)&&E(r[n],o[n]))}return!1}function O(e){return Array.isArray(e)?e.map(t=>O(t)):e&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype?Object.fromEntries(Object.entries(e).map(([t,r])=>[t,O(r)])):e}const X=(e,t)=>e.type==="date-range"||e.type==="time-range"?!Array.isArray(t)||t.length!==2||t.some(r=>r==null||r===""):w(t),Z=e=>{const t=h.value[e.key];if(t!==void 0)return t;if(e.type==="checkbox"||e.type==="upload")return[];if(!(e.type==="date-range"||e.type==="time-range"))return""},ee=e=>`${e.key}-${q[e.key]??0}`,te=(e,t)=>{t&&typeof t.focus=="function"?R.set(e,t):R.delete(e)},L=e=>{var t;return(t=R.get(e))==null?void 0:t.focus()},re=async(e,t)=>{j.set(e,t),V("update:modelValue",{...y.value,[e]:t}),await a.nextTick(),y.value[e]!==t&&(q[e]=(q[e]??0)+1)},ae=e=>{if(S(e))return[];const t=[];if(e.required&&!S(e)){const r=`${e.label}为必填项`;t.push({required:!0,message:r},{message:r,validator:(o,s)=>X(e,s)?r:void 0})}for(const r of e.rules??[])t.push(oe(e,r));return t},K=e=>{if(typeof e!="string"||!/^\d{4}-\d{2}-\d{2}$/.test(e))return!1;const[t,r,o]=e.split("-").map(Number),s=new Date(Date.UTC(t,r-1,o));return s.getUTCFullYear()===t&&s.getUTCMonth()===r-1&&s.getUTCDate()===o},I=e=>typeof e=="string"&&/^\d{2}:\d{2}:\d{2}$/.test(e)&&e.split(":").map(Number).every((t,r)=>r===0?t<24:t<60),oe=(e,t)=>({...t.kind==="format"&&t.format==="email"?{type:"email"}:{},...t.kind==="range"&&t.min!==void 0?{min:t.min}:{},...t.kind==="range"&&t.max!==void 0?{max:t.max}:{},message:t.message??`${e.label}校验失败`,validator:(r,o)=>{if(!e.required&&w(o))return;if(t.kind==="range"){const n=t.valueType==="number"?typeof o=="number"&&Number.isFinite(o)?o:void 0:typeof o=="string"||Array.isArray(o)?o.length:void 0;return n===void 0||t.min!==void 0&&n<t.min||t.max!==void 0&&n>t.max?t.message??`${e.label}范围不合法`:void 0}if(t.kind==="format")return typeof o!="string"?t.message??`${e.label}格式不合法`:(t.format==="email"?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(o):t.format==="url"?(()=>{try{const m=new URL(o);return m.protocol==="http:"||m.protocol==="https:"}catch{return!1}})():t.format==="date"?/^\d{4}-\d{2}-\d{2}$/.test(o)&&K(o):I(o))?void 0:t.message??`${e.label}格式不合法`;if(t.kind==="compare"){const n=h.value[t.field];if(!(typeof o==typeof n&&(typeof o=="number"?Number.isFinite(o)&&Number.isFinite(n):!0)))return t.message??`${e.label}与${t.field}类型不匹配`;if(["greater-than","greater-than-or-equal","less-than","less-than-or-equal"].includes(t.operator)){const C=$=>typeof $=="number"&&Number.isFinite($)?"number":K($)?"date":I($)?"time":void 0;if(!C(o)||!C(n)||C(o)!==C(n))return t.message??`${e.label}有序比较不合法`}return(t.operator==="equals"?o===n:t.operator==="not-equals"?o!==n:t.operator==="greater-than"?o>n:t.operator==="greater-than-or-equal"?o>=n:t.operator==="less-than"?o<n:o<=n)?void 0:t.message??`${e.label}比较不成立`}const s=d.get(e.key)??new AbortController;d.set(e.key,s);const l=Object.prototype.hasOwnProperty.call(u.validators,t.validator)&&typeof u.validators[t.validator]=="function"?u.validators[t.validator]:void 0;if(!l)return`${e.label}校验器不存在`;try{const n=l(o,{values:h.value,field:e,signal:s.signal}),m=f=>{if(!s.signal.aborted){if(f===!1)return t.message??`${e.label}校验失败`;if(typeof f=="string")return f}};return n&&typeof n.then=="function"?n.then(m):m(n)}catch(n){return s.signal.aborted?void 0:n instanceof Error?n.message:t.message??`${e.label}校验失败`}}}),se=()=>{var e,t;u.disabled||u.submitting||(_.value=!1,P(),(t=(e=v.value)==null?void 0:e.clearValidate)==null||t.call(e),Object.keys(i).forEach(r=>delete i[r]),U.value=!1)},z=e=>Array.from(new Set([...e.dependencies??[],...(e.rules??[]).filter(t=>t.kind==="compare").map(t=>t.field)])),ne=e=>{if(_.value){_.value=!1;return}u.disabled||u.submitting||U.value||V("submit",{...e})},le=e=>{if(_.value){_.value=!1;return}if(u.disabled||u.submitting)return;const t=e.errorFields.map(r=>{var n;const o=typeof r.name=="string"?r.name:String(r.name[0]),s=(n=c.value.schema)==null?void 0:n.fields.find(m=>m.key===o),l=r.errors[0]||`${(s==null?void 0:s.label)??o}为必填项`;return{key:o,message:l}}).filter(r=>F.value.some(o=>o.key===r.key)&&!S(c.value.schema.fields.find(o=>o.key===r.key)));t.forEach(r=>{i[r.key]=r.message}),t.length&&(V("validation-error",t),a.nextTick(()=>L(t[0].key)))};return G({validate:()=>{var e,t;return P(),Promise.resolve(((t=(e=v.value)==null?void 0:e.validate)==null?void 0:t.call(e))??{errorFields:[]}).then(r=>{var o;Object.keys(i).forEach(s=>delete i[s]);for(const s of r.errorFields??[]){const l=typeof s.name=="string"?s.name:String(s.name[0]);(o=s.errors)!=null&&o[0]&&(i[l]=s.errors[0])}return r})},resetFields:()=>{var t,r,o,s,l;for(const n of d.values())n.abort();d.clear(),N.clear(),g.clear(),B.clear(),b.clear(),k.clear(),J.value+=1,_.value=!0,Object.keys(i).forEach(n=>delete i[n]);const e=(((t=c.value.schema)==null?void 0:t.fields)??[]).map(n=>({name:n.key,errors:[]}));(o=(r=v.value)==null?void 0:r.clearValidate)==null||o.call(r),(l=(s=v.value)==null?void 0:s.setFieldsErrors)==null||l.call(s,e),Object.keys(i).forEach(n=>delete i[n]),V("update:modelValue",O(x.value))},clearValidate:e=>{var t,r;e?e.forEach(o=>delete i[o]):Object.keys(i).forEach(o=>delete i[o]),(r=(t=v.value)==null?void 0:t.clearValidate)==null||r.call(t,e)},setFieldsErrors:e=>{var t,r;e.forEach(o=>{o.errors[0]?i[o.name]=o.errors[0]:delete i[o.name]}),(r=(t=v.value)==null?void 0:t.setFieldsErrors)==null||r.call(t,e)}}),a.onBeforeUnmount(()=>{for(const e of d.values())e.abort()}),(e,t)=>c.value.valid&&c.value.schema?(a.openBlock(),a.createBlock(a.unref(T.Form),{key:0,ref_key:"formElement",ref:v,class:"aheart-ai-form",model:A,disabled:p.disabled||p.submitting,"required-mark":!1,layout:"vertical","aria-busy":p.submitting?"true":"false",onSubmit:se,onFinish:ne,onFinishFailed:le},{default:a.withCtx(()=>[c.value.schema.title||c.value.schema.description?(a.openBlock(),a.createElementBlock("header",ue,[c.value.schema.title?(a.openBlock(),a.createElementBlock("h2",de,a.toDisplayString(c.value.schema.title),1)):a.createCommentVNode("",!0),c.value.schema.description?(a.openBlock(),a.createElementBlock("p",me,a.toDisplayString(c.value.schema.description),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),M.value.length?(a.openBlock(),a.createElementBlock("div",fe,[a.createElementVNode("strong",null,"请解决 "+a.toDisplayString(M.value.length)+" 个校验问题",1),a.createElementVNode("ul",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(M.value,r=>(a.openBlock(),a.createElementBlock("li",{key:r.key},[a.createElementVNode("button",{type:"button",onClick:o=>L(r.key)},a.toDisplayString(r.message),9,pe)]))),128))])])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(Q.value,r=>{var o;return a.openBlock(),a.createBlock(a.resolveDynamicComponent(r.group?"fieldset":"section"),{key:r.key,class:"aheart-ai-form__group","data-group-key":(o=r.group)==null?void 0:o.key},{default:a.withCtx(()=>[r.group?(a.openBlock(),a.createElementBlock("legend",ye,[a.createElementVNode("span",null,a.toDisplayString(r.group.title),1),r.group.description?(a.openBlock(),a.createElementBlock("small",he,a.toDisplayString(r.group.description),1)):a.createCommentVNode("",!0)])):a.createCommentVNode("",!0),(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(r.fields,s=>(a.openBlock(),a.createBlock(a.unref(T.FormItem),{key:ee(s),name:s.key,rules:ae(s),dependencies:z(s),"no-style":""},{default:a.withCtx(()=>[a.createVNode(ie.default,{ref_for:!0,ref:l=>te(s.key,l),field:s,value:Z(s),disabled:S(s),error:i[s.key],onUpdate:l=>re(s.key,l)},null,8,["field","value","disabled","error","onUpdate"])]),_:2},1032,["name","rules","dependencies"]))),128))]),_:2},1032,["data-group-key"])}),128)),p.submitError?(a.openBlock(),a.createElementBlock("p",ge,a.toDisplayString(p.submitError),1)):a.createCommentVNode("",!0),a.createElementVNode("footer",ve,[a.createVNode(a.unref(T.Button),{"html-type":"submit",type:"primary",loading:p.submitting,disabled:p.disabled},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(p.submitText),1)]),_:1},8,["loading","disabled"])])]),_:1},8,["model","disabled","aria-busy"])):(a.openBlock(),a.createElementBlock("div",be,[t[0]||(t[0]=a.createElementVNode("strong",null,"表单配置无效",-1)),a.createElementVNode("ul",null,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(c.value.errors,r=>(a.openBlock(),a.createElementBlock("li",{key:r},a.toDisplayString(r),1))),128))])]))}});exports.default=ke;
|
package/lib/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./chat-panel.vue.js"),_=require("./actions.vue.js"),r=require("./attachments.vue.js"),n=require("./bubble.vue.js"),o=require("./conversations.vue.js"),c=require("./process.vue.js"),s=require("./prompts.vue.js"),a=require("./sender.vue.js"),A=require("./sources.vue.js"),l=require("./thought-chain.vue.js"),i=require("./welcome.vue.js"),I=require("./form.vue.js"),d=require("./agent-workbench.vue.js");;/* empty css */const t=require("./form-schema.js"),m=require("./stream-reducer.js"),v={install(e){e.component("AAIActions",_.default),e.component("AAIAgentWorkbench",d.default),e.component("AAIAttachments",r.default),e.component("AAIBubble",n.default),e.component("AAIChatPanel",u.default),e.component("AAIConversations",o.default),e.component("AAIForm",I.default),e.component("AAIProcess",c.default),e.component("AAIPrompts",s.default),e.component("AAISender",a.default),e.component("AAISources",A.default),e.component("AAIThoughtChain",l.default),e.component("AAIWelcome",i.default)}};exports.AIChatPanel=u.default;exports.AIActions=_.default;exports.AIAttachments=r.default;exports.AIBubble=n.default;exports.AIConversations=o.default;exports.AIProcess=c.default;exports.AIPrompts=s.default;exports.AISender=a.default;exports.AISources=A.default;exports.AIThoughtChain=l.default;exports.AIWelcome=i.default;exports.AIForm=I.default;exports.AIAgentWorkbench=d.default;exports.AI_FORM_CONDITION_OPERATORS=t.AI_FORM_CONDITION_OPERATORS;exports.AI_FORM_FIELD_TYPES=t.AI_FORM_FIELD_TYPES;exports.validateAIFormSchema=t.validateAIFormSchema;exports.createAIStreamReducer=m.createAIStreamReducer;exports.reduceAIStreamEvent=m.reduceAIStreamEvent;exports.default=v;
|
package/lib/package.json
DELETED
package/lib/process/index.d.ts
DELETED
package/lib/process.vue.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { AIProcessItem } from './types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
items?: AIProcessItem[] | undefined;
|
|
4
|
-
}>, {
|
|
5
|
-
items: () => never[];
|
|
6
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
-
items?: AIProcessItem[] | undefined;
|
|
8
|
-
}>, {
|
|
9
|
-
items: () => never[];
|
|
10
|
-
}>>> & Readonly<{}>, {
|
|
11
|
-
items: AIProcessItem[];
|
|
12
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
-
export default _default;
|
|
14
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
16
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
-
} : {
|
|
19
|
-
type: import('vue').PropType<T[K]>;
|
|
20
|
-
required: true;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
type __VLS_WithDefaults<P, D> = {
|
|
24
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
-
default: D[K];
|
|
26
|
-
}> : P[K];
|
|
27
|
-
};
|
|
28
|
-
type __VLS_Prettify<T> = {
|
|
29
|
-
[K in keyof T]: T[K];
|
|
30
|
-
} & {};
|
package/lib/prompts/index.d.ts
DELETED
package/lib/prompts.vue.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { AIPrompt } from './types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
prompts?: AIPrompt[] | undefined;
|
|
4
|
-
disabled?: boolean | undefined;
|
|
5
|
-
}>, {
|
|
6
|
-
prompts: () => never[];
|
|
7
|
-
disabled: boolean;
|
|
8
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
-
select: (prompt: AIPrompt) => void;
|
|
10
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
-
prompts?: AIPrompt[] | undefined;
|
|
12
|
-
disabled?: boolean | undefined;
|
|
13
|
-
}>, {
|
|
14
|
-
prompts: () => never[];
|
|
15
|
-
disabled: boolean;
|
|
16
|
-
}>>> & Readonly<{
|
|
17
|
-
onSelect?: ((prompt: AIPrompt) => any) | undefined;
|
|
18
|
-
}>, {
|
|
19
|
-
disabled: boolean;
|
|
20
|
-
prompts: AIPrompt[];
|
|
21
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
22
|
-
export default _default;
|
|
23
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
24
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
25
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
26
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
27
|
-
} : {
|
|
28
|
-
type: import('vue').PropType<T[K]>;
|
|
29
|
-
required: true;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
type __VLS_WithDefaults<P, D> = {
|
|
33
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
34
|
-
default: D[K];
|
|
35
|
-
}> : P[K];
|
|
36
|
-
};
|
|
37
|
-
type __VLS_Prettify<T> = {
|
|
38
|
-
[K in keyof T]: T[K];
|
|
39
|
-
} & {};
|
package/lib/safe-markdown.d.ts
DELETED
package/lib/sender/index.d.ts
DELETED
package/lib/sender.vue.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
-
modelValue?: string | undefined;
|
|
3
|
-
placeholder?: string | undefined;
|
|
4
|
-
disabled?: boolean | undefined;
|
|
5
|
-
loading?: boolean | undefined;
|
|
6
|
-
}>, {
|
|
7
|
-
modelValue: string;
|
|
8
|
-
placeholder: string;
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
loading: boolean;
|
|
11
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
-
submit: (content: string) => void;
|
|
13
|
-
stop: () => void;
|
|
14
|
-
"update:modelValue": (value: string) => void;
|
|
15
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
16
|
-
modelValue?: string | undefined;
|
|
17
|
-
placeholder?: string | undefined;
|
|
18
|
-
disabled?: boolean | undefined;
|
|
19
|
-
loading?: boolean | undefined;
|
|
20
|
-
}>, {
|
|
21
|
-
modelValue: string;
|
|
22
|
-
placeholder: string;
|
|
23
|
-
disabled: boolean;
|
|
24
|
-
loading: boolean;
|
|
25
|
-
}>>> & Readonly<{
|
|
26
|
-
onSubmit?: ((content: string) => any) | undefined;
|
|
27
|
-
onStop?: (() => any) | undefined;
|
|
28
|
-
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
29
|
-
}>, {
|
|
30
|
-
disabled: boolean;
|
|
31
|
-
loading: boolean;
|
|
32
|
-
placeholder: string;
|
|
33
|
-
modelValue: string;
|
|
34
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
35
|
-
export default _default;
|
|
36
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
37
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
38
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
39
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
40
|
-
} : {
|
|
41
|
-
type: import('vue').PropType<T[K]>;
|
|
42
|
-
required: true;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
type __VLS_WithDefaults<P, D> = {
|
|
46
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
47
|
-
default: D[K];
|
|
48
|
-
}> : P[K];
|
|
49
|
-
};
|
|
50
|
-
type __VLS_Prettify<T> = {
|
|
51
|
-
[K in keyof T]: T[K];
|
|
52
|
-
} & {};
|
package/lib/sources/index.d.ts
DELETED
package/lib/sources.vue.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { AISource } from './types';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
3
|
-
sources?: AISource[] | undefined;
|
|
4
|
-
}>, {
|
|
5
|
-
sources: () => never[];
|
|
6
|
-
}>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
7
|
-
sources?: AISource[] | undefined;
|
|
8
|
-
}>, {
|
|
9
|
-
sources: () => never[];
|
|
10
|
-
}>>> & Readonly<{}>, {
|
|
11
|
-
sources: AISource[];
|
|
12
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
-
export default _default;
|
|
14
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
15
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
16
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
17
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
18
|
-
} : {
|
|
19
|
-
type: import('vue').PropType<T[K]>;
|
|
20
|
-
required: true;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
type __VLS_WithDefaults<P, D> = {
|
|
24
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
25
|
-
default: D[K];
|
|
26
|
-
}> : P[K];
|
|
27
|
-
};
|
|
28
|
-
type __VLS_Prettify<T> = {
|
|
29
|
-
[K in keyof T]: T[K];
|
|
30
|
-
} & {};
|