@asgard-js/react 0.1.15-canary.3 → 0.1.15-canary.4

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.
Files changed (25) hide show
  1. package/dist/components/chatbot/chatbot-body/conversation-message-renderer.d.ts.map +1 -1
  2. package/dist/components/chatbot/chatbot-footer/chatbot-footer.d.ts.map +1 -1
  3. package/dist/components/templates/index.d.ts +0 -3
  4. package/dist/components/templates/index.d.ts.map +1 -1
  5. package/dist/context/asgard-theme-context.d.ts +0 -6
  6. package/dist/context/asgard-theme-context.d.ts.map +1 -1
  7. package/dist/index.css +1 -1
  8. package/dist/index.js +12273 -12439
  9. package/dist/utils/file-validation.d.ts +36 -0
  10. package/dist/utils/file-validation.d.ts.map +1 -1
  11. package/package.json +2 -2
  12. package/dist/components/templates/audio-template/audio-template.d.ts +0 -9
  13. package/dist/components/templates/audio-template/audio-template.d.ts.map +0 -1
  14. package/dist/components/templates/audio-template/index.d.ts +0 -2
  15. package/dist/components/templates/audio-template/index.d.ts.map +0 -1
  16. package/dist/components/templates/location-template/index.d.ts +0 -2
  17. package/dist/components/templates/location-template/index.d.ts.map +0 -1
  18. package/dist/components/templates/location-template/location-card.d.ts +0 -18
  19. package/dist/components/templates/location-template/location-card.d.ts.map +0 -1
  20. package/dist/components/templates/location-template/location-template.d.ts +0 -9
  21. package/dist/components/templates/location-template/location-template.d.ts.map +0 -1
  22. package/dist/components/templates/video-template/index.d.ts +0 -2
  23. package/dist/components/templates/video-template/index.d.ts.map +0 -1
  24. package/dist/components/templates/video-template/video-template.d.ts +0 -9
  25. package/dist/components/templates/video-template/video-template.d.ts.map +0 -1
@@ -1,4 +1,40 @@
1
1
  export declare const SUPPORTED_IMAGE_TYPES: string[];
2
+ /**
3
+ * 上傳狀態
4
+ */
5
+ export type UploadStatus = 'pending' | 'uploading' | 'success' | 'error';
6
+ /**
7
+ * 可上傳的圖片
8
+ */
9
+ export interface UploadableImage {
10
+ /** 唯一識別碼 */
11
+ id: string;
12
+ /** 原始檔案 */
13
+ file: File;
14
+ /** 用於顯示縮圖的 Data URL */
15
+ previewUrl: string;
16
+ /** 上傳狀態 */
17
+ uploadStatus: UploadStatus;
18
+ /** 上傳成功後的 blobId */
19
+ blobId?: string;
20
+ /** 上傳失敗的錯誤訊息 */
21
+ error?: string;
22
+ }
23
+ /**
24
+ * 可上傳的文件
25
+ */
26
+ export interface UploadableDocument {
27
+ /** 唯一識別碼 */
28
+ id: string;
29
+ /** 原始檔案 */
30
+ file: File;
31
+ /** 上傳狀態 */
32
+ uploadStatus: UploadStatus;
33
+ /** 上傳成功後的 blobId */
34
+ blobId?: string;
35
+ /** 上傳失敗的錯誤訊息 */
36
+ error?: string;
37
+ }
2
38
  export declare const SUPPORTED_DOCUMENT_TYPES: string[];
3
39
  export declare const SUPPORTED_DOCUMENT_EXTENSIONS: string[];
4
40
  export declare const MAX_FILE_SIZE: number;
@@ -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;AAGzG,eAAO,MAAM,wBAAwB,UAoBpC,CAAC;AAGF,eAAO,MAAM,6BAA6B,UAgBzC,CAAC;AAEF,eAAO,MAAM,aAAa,QAAmB,CAAC;AAE9C,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,oBAAoB,CAsBlE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG;IAC5D,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAgBA;AAYD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,oBAAoB,CAyBrE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oBAAoB,CAsBlE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG;IAC5D,UAAU,EAAE,IAAI,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAgBA;AAYD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,GAAG,oBAAoB,CAyBrE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAE,GAAG;IAC/D,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.1.15-canary.3",
3
+ "version": "0.1.15-canary.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -48,7 +48,7 @@
48
48
  "vitest": "^1.6.0"
49
49
  },
50
50
  "peerDependencies": {
51
- "@asgard-js/core": "^0.1.15-canary.3",
51
+ "@asgard-js/core": "^0.1.15-canary.4",
52
52
  "react": "^18.0.0",
53
53
  "react-dom": "^18.0.0"
54
54
  },
@@ -1,9 +0,0 @@
1
- import { ConversationBotMessage } from '../../../../../core/src/index.ts';
2
- import { ReactNode } from 'react';
3
-
4
- interface AudioTemplateProps {
5
- message: ConversationBotMessage;
6
- }
7
- export declare function AudioTemplate(props: AudioTemplateProps): ReactNode;
8
- export {};
9
- //# sourceMappingURL=audio-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audio-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/audio-template/audio-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAI7C,OAAO,EAAE,sBAAsB,EAAwB,MAAM,iBAAiB,CAAC;AAI/E,UAAU,kBAAkB;IAC1B,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CA2ClE"}
@@ -1,2 +0,0 @@
1
- export * from './audio-template';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/audio-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './location-template';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/location-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
@@ -1,18 +0,0 @@
1
- import { LocationMessageTemplate } from '../../../../../core/src/index.ts';
2
- import { ReactNode, CSSProperties } from 'react';
3
-
4
- interface LocationCardProps {
5
- template: LocationMessageTemplate;
6
- customStyle?: {
7
- style?: CSSProperties;
8
- title?: {
9
- style?: CSSProperties;
10
- };
11
- description?: {
12
- style?: CSSProperties;
13
- };
14
- };
15
- }
16
- export declare function LocationCard(props: LocationCardProps): ReactNode;
17
- export {};
18
- //# sourceMappingURL=location-card.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"location-card.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/location-template/location-card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAG1D,UAAU,iBAAiB;IACzB,QAAQ,EAAE,uBAAuB,CAAC;IAClC,WAAW,CAAC,EAAE;QACZ,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,KAAK,CAAC,EAAE;YACN,KAAK,CAAC,EAAE,aAAa,CAAC;SACvB,CAAC;QACF,WAAW,CAAC,EAAE;YACZ,KAAK,CAAC,EAAE,aAAa,CAAC;SACvB,CAAC;KACH,CAAC;CACH;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA2DhE"}
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { ConversationBotMessage } from '../../../../../core/src/index.ts';
3
-
4
- interface LocationTemplateProps {
5
- message: ConversationBotMessage;
6
- }
7
- export declare function LocationTemplate(props: LocationTemplateProps): ReactNode;
8
- export {};
9
- //# sourceMappingURL=location-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"location-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/location-template/location-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA2B,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAOlC,UAAU,qBAAqB;IAC7B,OAAO,EAAE,sBAAsB,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,SAAS,CA4BxE"}
@@ -1,2 +0,0 @@
1
- export * from './video-template';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/video-template/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
@@ -1,9 +0,0 @@
1
- import { ConversationBotMessage } from '../../../../../core/src/index.ts';
2
- import { ReactNode } from 'react';
3
-
4
- interface VideoTemplateProps {
5
- message: ConversationBotMessage;
6
- }
7
- export declare function VideoTemplate(props: VideoTemplateProps): ReactNode;
8
- export {};
9
- //# sourceMappingURL=video-template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"video-template.d.ts","sourceRoot":"","sources":["../../../../src/components/templates/video-template/video-template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqD,MAAM,OAAO,CAAC;AAIrF,OAAO,EAAE,sBAAsB,EAAwB,MAAM,iBAAiB,CAAC;AAI/E,UAAU,kBAAkB;IAC1B,OAAO,EAAE,sBAAsB,CAAC;CACjC;AA4DD,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAyMlE"}