artifactuse 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/bridge.d.ts +10 -5
- package/dist/core/index.d.ts +7 -4
- package/dist/{index-D02G7L_w.js → index-CNXX2Rp6.js} +1213 -1151
- package/dist/index.js +1 -1
- package/dist/react/index.js +2 -2
- package/dist/styles/components/social.css +10 -0
- package/dist/svelte/index.d.ts +21 -12
- package/dist/svelte/index.js +245 -245
- package/dist/vue/index.d.ts +14 -8
- package/dist/vue/index.js +83 -82
- package/dist/vue2/composables.d.ts +14 -8
- package/dist/vue2/index.js +204 -21
- package/package.json +1 -1
package/dist/core/bridge.d.ts
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Create bridge for panel iframe communication
|
|
3
|
+
*
|
|
4
|
+
* @param {string|string[]} initialOrigins - Initial allowed origin(s) for message verification
|
|
3
5
|
*/
|
|
4
|
-
export function createBridge(
|
|
6
|
+
export function createBridge(initialOrigins?: string | string[]): {
|
|
5
7
|
setIframe: (iframe: any) => void;
|
|
6
|
-
send: (action:
|
|
8
|
+
send: (action: string, data: any, requestId?: string, targetOrigin?: string) => string;
|
|
7
9
|
request: (action: any, data: any, timeout?: number) => Promise<any>;
|
|
8
10
|
on: (action: any, callback: any) => () => void;
|
|
9
11
|
off: (action: any, callback: any) => void;
|
|
10
|
-
loadArtifact: (artifact: any) =>
|
|
11
|
-
updateArtifact: (artifactId: any, updates: any) =>
|
|
12
|
+
loadArtifact: (artifact: any) => string;
|
|
13
|
+
updateArtifact: (artifactId: any, updates: any) => string;
|
|
12
14
|
requestSave: () => Promise<any>;
|
|
13
15
|
requestExport: (format?: string) => Promise<any>;
|
|
14
|
-
sendAIResponse: (response: any, requestId: any) =>
|
|
16
|
+
sendAIResponse: (response: any, requestId: any) => string;
|
|
15
17
|
destroy: () => void;
|
|
18
|
+
addAllowedOrigin: (origin: string) => void;
|
|
19
|
+
removeAllowedOrigin: (origin: string) => void;
|
|
20
|
+
getAllowedOrigins: () => string[];
|
|
16
21
|
readonly isReady: boolean;
|
|
17
22
|
readonly iframe: any;
|
|
18
23
|
};
|
package/dist/core/index.d.ts
CHANGED
|
@@ -75,16 +75,19 @@ export function createArtifactuse(userConfig?: {}): {
|
|
|
75
75
|
emit: (event: any, data: any) => void;
|
|
76
76
|
bridge: {
|
|
77
77
|
setIframe: (iframe: any) => void;
|
|
78
|
-
send: (action:
|
|
78
|
+
send: (action: string, data: any, requestId?: string, targetOrigin?: string) => string;
|
|
79
79
|
request: (action: any, data: any, timeout?: number) => Promise<any>;
|
|
80
80
|
on: (action: any, callback: any) => () => void;
|
|
81
81
|
off: (action: any, callback: any) => void;
|
|
82
|
-
loadArtifact: (artifact: any) =>
|
|
83
|
-
updateArtifact: (artifactId: any, updates: any) =>
|
|
82
|
+
loadArtifact: (artifact: any) => string;
|
|
83
|
+
updateArtifact: (artifactId: any, updates: any) => string;
|
|
84
84
|
requestSave: () => Promise<any>;
|
|
85
85
|
requestExport: (format?: string) => Promise<any>;
|
|
86
|
-
sendAIResponse: (response: any, requestId: any) =>
|
|
86
|
+
sendAIResponse: (response: any, requestId: any) => string;
|
|
87
87
|
destroy: () => void;
|
|
88
|
+
addAllowedOrigin: (origin: string) => void;
|
|
89
|
+
removeAllowedOrigin: (origin: string) => void;
|
|
90
|
+
getAllowedOrigins: () => string[];
|
|
88
91
|
readonly isReady: boolean;
|
|
89
92
|
readonly iframe: any;
|
|
90
93
|
};
|