@zveltio/vue 3.0.0-beta.108 → 3.0.0-beta.113
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.
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { type RealtimeRecordEvent } from '@zveltio/sdk';
|
|
2
|
+
export declare function useRealtime(baseUrl: string, collection: string, event: string | null,
|
|
3
|
+
/** `event.id` is always set; `event.data` only when the engine sends it. */
|
|
4
|
+
callback: (event: RealtimeRecordEvent) => void): void;
|
|
2
5
|
//# sourceMappingURL=useRealtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRealtime.d.ts","sourceRoot":"","sources":["../../src/composables/useRealtime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useRealtime.d.ts","sourceRoot":"","sources":["../../src/composables/useRealtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,mBAAmB,EAAmB,MAAM,cAAc,CAAC;AAEzE,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,IAAI;AACpB,4EAA4E;AAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,GAC7C,IAAI,CAoBN"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onMounted, onUnmounted } from 'vue';
|
|
2
2
|
import { ZveltioRealtime } from '@zveltio/sdk';
|
|
3
3
|
export function useRealtime(baseUrl, collection, event,
|
|
4
|
-
|
|
4
|
+
/** `event.id` is always set; `event.data` only when the engine sends it. */
|
|
5
5
|
callback) {
|
|
6
6
|
let realtime = null;
|
|
7
7
|
let unsub = null;
|
|
@@ -10,7 +10,6 @@ callback) {
|
|
|
10
10
|
return;
|
|
11
11
|
realtime = new ZveltioRealtime(baseUrl);
|
|
12
12
|
realtime.connect();
|
|
13
|
-
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
14
13
|
unsub = realtime.subscribe(collection, (data) => {
|
|
15
14
|
if (!event || data.event === event) {
|
|
16
15
|
callback(data);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zveltio/vue",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.113",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"test": "bun test"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@zveltio/sdk": "3.0.0-beta.
|
|
24
|
+
"@zveltio/sdk": "3.0.0-beta.113"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"vue": ">=3.3"
|