@asgard-js/react 0.2.61 → 0.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -25
- package/dist/components/chatbot/channel-title/channel-title.d.ts +5 -0
- package/dist/components/chatbot/channel-title/channel-title.d.ts.map +1 -0
- package/dist/components/chatbot/channel-title/index.d.ts +2 -0
- package/dist/components/chatbot/channel-title/index.d.ts.map +1 -0
- package/dist/components/chatbot/chatbot-body/chatbot-body.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot-body/conversation-message-renderer.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot-footer/chatbot-footer.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot-footer/document-upload-button.d.ts +1 -0
- package/dist/components/chatbot/chatbot-footer/document-upload-button.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot-footer/speech-input-button.d.ts +2 -0
- package/dist/components/chatbot/chatbot-footer/speech-input-button.d.ts.map +1 -1
- package/dist/components/chatbot/chatbot.d.ts +23 -0
- package/dist/components/chatbot/chatbot.d.ts.map +1 -1
- package/dist/components/chatbot/running-indicator/index.d.ts +2 -0
- package/dist/components/chatbot/running-indicator/index.d.ts.map +1 -0
- package/dist/components/chatbot/running-indicator/running-indicator.d.ts +8 -0
- package/dist/components/chatbot/running-indicator/running-indicator.d.ts.map +1 -0
- package/dist/components/chatbot/subagent-list/index.d.ts +2 -0
- package/dist/components/chatbot/subagent-list/index.d.ts.map +1 -0
- package/dist/components/chatbot/subagent-list/subagent-list.d.ts +10 -0
- package/dist/components/chatbot/subagent-list/subagent-list.d.ts.map +1 -0
- package/dist/components/chatbot/task-list/index.d.ts +2 -0
- package/dist/components/chatbot/task-list/index.d.ts.map +1 -0
- package/dist/components/chatbot/task-list/task-list.d.ts +10 -0
- package/dist/components/chatbot/task-list/task-list.d.ts.map +1 -0
- package/dist/components/templates/index.d.ts +1 -0
- package/dist/components/templates/index.d.ts.map +1 -1
- package/dist/components/templates/text-template/bot-typing-box.d.ts.map +1 -1
- package/dist/components/templates/text-template/index.d.ts +0 -1
- package/dist/components/templates/text-template/index.d.ts.map +1 -1
- package/dist/components/templates/thinking-block/index.d.ts +2 -0
- package/dist/components/templates/thinking-block/index.d.ts.map +1 -0
- package/dist/components/templates/thinking-block/thinking-block.d.ts +8 -0
- package/dist/components/templates/thinking-block/thinking-block.d.ts.map +1 -0
- package/dist/components/templates/tool-call-group/index.d.ts +1 -0
- package/dist/components/templates/tool-call-group/index.d.ts.map +1 -1
- package/dist/components/templates/tool-call-group/tool-call-group-template.d.ts.map +1 -1
- package/dist/components/templates/tool-call-group/tool-call-group.d.ts +20 -1
- package/dist/components/templates/tool-call-group/tool-call-group.d.ts.map +1 -1
- package/dist/components/templates/tool-call-group/tool-call-label.d.ts +32 -0
- package/dist/components/templates/tool-call-group/tool-call-label.d.ts.map +1 -0
- package/dist/context/asgard-service-context.d.ts +11 -1
- package/dist/context/asgard-service-context.d.ts.map +1 -1
- package/dist/context/asgard-template-context.d.ts +23 -0
- package/dist/context/asgard-template-context.d.ts.map +1 -1
- package/dist/context/asgard-theme-context.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-channel.d.ts +4 -0
- package/dist/hooks/use-channel.d.ts.map +1 -1
- package/dist/hooks/use-derived-state.d.ts +9 -0
- package/dist/hooks/use-derived-state.d.ts.map +1 -0
- package/dist/i18n.d.ts +6 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14740 -13825
- package/dist/utils/file-validation.d.ts +14 -4
- package/dist/utils/file-validation.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/templates/text-template/bot-typing-placeholder.d.ts +0 -8
- package/dist/components/templates/text-template/bot-typing-placeholder.d.ts.map +0 -1
|
@@ -42,19 +42,29 @@ export interface FileValidationResult {
|
|
|
42
42
|
isValid: boolean;
|
|
43
43
|
error?: string;
|
|
44
44
|
}
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
/**
|
|
46
|
+
* 計算實際允許的圖片 MIME 類型。未指定(或空陣列)時回傳完整預設清單;
|
|
47
|
+
* 指定時直接覆蓋為傳入的清單(原樣使用,可包含預設清單以外的類型)。
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveImageMimeTypes(allowedTypes?: string[]): string[];
|
|
50
|
+
/**
|
|
51
|
+
* 計算文件的 MIME 類型限制。未指定(或空陣列)時回傳 null 代表不限制(沿用
|
|
52
|
+
* 預設清單與副檔名 fallback);指定時直接覆蓋為傳入的清單(原樣使用)。
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveDocumentMimeTypes(allowedTypes?: string[]): string[] | null;
|
|
55
|
+
export declare function validateImageFile(file: File, allowedTypes?: string[]): FileValidationResult;
|
|
56
|
+
export declare function validateImageFiles(files: FileList | File[], allowedTypes?: string[]): {
|
|
47
57
|
validFiles: File[];
|
|
48
58
|
errors: string[];
|
|
49
59
|
};
|
|
50
60
|
/**
|
|
51
61
|
* 驗證單一文件檔案
|
|
52
62
|
*/
|
|
53
|
-
export declare function validateDocumentFile(file: File): FileValidationResult;
|
|
63
|
+
export declare function validateDocumentFile(file: File, allowedTypes?: string[]): FileValidationResult;
|
|
54
64
|
/**
|
|
55
65
|
* 驗證多個文件檔案
|
|
56
66
|
*/
|
|
57
|
-
export declare function validateDocumentFiles(files: FileList | File[]): {
|
|
67
|
+
export declare function validateDocumentFiles(files: FileList | File[], allowedTypes?: string[]): {
|
|
58
68
|
validFiles: File[];
|
|
59
69
|
errors: string[];
|
|
60
70
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-validation.d.ts","sourceRoot":"","sources":["../../src/utils/file-validation.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,UAAsE,CAAC;AAEzG;;GAEG;AACH,MAAM,MAAM,YAAY,GA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AC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,oBAAoB,CAoC9F;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,EACxB,YAAY,CAAC,EAAE,MAAM,EAAE,GACtB;IACD,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAgBA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgard-js/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.63",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"vite-plugin-svgr": "^4.3.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@asgard-js/core": "^0.2.
|
|
50
|
+
"@asgard-js/core": "^0.2.63",
|
|
51
51
|
"react": "^18.0.0 || ^19.0.0",
|
|
52
52
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
53
53
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bot-typing-placeholder.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/text-template/bot-typing-placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAI3C,UAAU,yBAAyB;IACjC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,SAAS,CAgChF"}
|