@zveltio/vue 3.0.0-beta.5 → 3.0.0-beta.70
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 +52 -27
- package/dist/composables/useAuth.d.ts.map +1 -1
- package/dist/composables/useAuth.js +2 -0
- package/dist/composables/useCollection.d.ts +2 -2
- package/dist/composables/useCollection.d.ts.map +1 -1
- package/dist/composables/useCollection.js +8 -3
- package/dist/composables/useRealtime.d.ts.map +1 -1
- package/dist/composables/useRealtime.js +4 -1
- package/dist/composables/useRecord.d.ts +2 -2
- package/dist/composables/useRecord.d.ts.map +1 -1
- package/dist/composables/useRecord.js +11 -6
- package/dist/composables/useSyncCollection.d.ts.map +1 -1
- package/dist/composables/useSyncCollection.js +1 -0
- package/dist/types.d.ts +1 -8
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -12,16 +12,16 @@ bun add @zveltio/vue @zveltio/sdk
|
|
|
12
12
|
|
|
13
13
|
## Setup
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Create a client and register the plugin:
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
import { createApp } from 'vue';
|
|
19
|
-
import { ZveltioPlugin } from '@zveltio/vue';
|
|
19
|
+
import { ZveltioPlugin, createZveltioClient } from '@zveltio/vue';
|
|
20
20
|
import App from './App.vue';
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const client = createZveltioClient({ baseUrl: 'https://your-engine.example.com' });
|
|
23
|
+
|
|
24
|
+
createApp(App).use(ZveltioPlugin, { client }).mount('#app');
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## Composables
|
|
@@ -30,20 +30,25 @@ createApp(App)
|
|
|
30
30
|
|
|
31
31
|
```vue
|
|
32
32
|
<script setup lang="ts">
|
|
33
|
+
import { useRoute } from 'vue-router';
|
|
33
34
|
import { useCollection, useRecord } from '@zveltio/vue';
|
|
34
35
|
|
|
35
|
-
const { data, loading, error,
|
|
36
|
+
const { data, loading, error, refetch } = useCollection('products', {
|
|
36
37
|
filter: { status: 'active' },
|
|
37
|
-
sort: '
|
|
38
|
+
sort: 'created_at',
|
|
39
|
+
order: 'desc',
|
|
38
40
|
limit: 20,
|
|
39
41
|
});
|
|
40
42
|
|
|
41
|
-
|
|
43
|
+
// Pass a getter or ref to re-fetch when the id changes; a plain string is read once.
|
|
44
|
+
const route = useRoute();
|
|
45
|
+
const { data: product } = useRecord('products', () => route.params.id as string);
|
|
42
46
|
</script>
|
|
43
47
|
|
|
44
48
|
<template>
|
|
45
49
|
<div v-if="loading">Loading...</div>
|
|
46
|
-
<
|
|
50
|
+
<p v-else-if="error">{{ error.message }}</p>
|
|
51
|
+
<ProductCard v-for="p in data ?? []" :key="p.id" :product="p" />
|
|
47
52
|
</template>
|
|
48
53
|
```
|
|
49
54
|
|
|
@@ -51,31 +56,42 @@ const { data: product } = useRecord('products', 'id-123');
|
|
|
51
56
|
|
|
52
57
|
```vue
|
|
53
58
|
<script setup lang="ts">
|
|
59
|
+
import { ref } from 'vue';
|
|
54
60
|
import { useRealtime } from '@zveltio/vue';
|
|
55
61
|
|
|
56
|
-
const
|
|
57
|
-
// event.value: { action: 'create'|'update'|'delete', record: {...} } | null
|
|
58
|
-
</script>
|
|
62
|
+
const orders = ref<any[]>([]);
|
|
59
63
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
useRealtime(
|
|
65
|
+
'https://your-engine.example.com',
|
|
66
|
+
'orders',
|
|
67
|
+
'insert', // 'insert' | 'update' | 'delete', or null for every event
|
|
68
|
+
(event) => orders.value.unshift(event.data),
|
|
69
|
+
);
|
|
70
|
+
</script>
|
|
63
71
|
```
|
|
64
72
|
|
|
65
|
-
|
|
73
|
+
The socket authenticates with the session cookie, so the engine must be same-site
|
|
74
|
+
with your app (or behind the same reverse proxy).
|
|
75
|
+
|
|
76
|
+
### Offline sync
|
|
66
77
|
|
|
67
78
|
```vue
|
|
68
79
|
<script setup lang="ts">
|
|
69
80
|
import { useSyncCollection, useSyncStatus } from '@zveltio/vue';
|
|
70
81
|
|
|
71
|
-
const {
|
|
72
|
-
|
|
82
|
+
const { data } = useSyncCollection('products', {
|
|
83
|
+
realtimeUrl: 'https://your-engine.example.com',
|
|
84
|
+
syncInterval: 30_000,
|
|
85
|
+
});
|
|
86
|
+
const { status } = useSyncStatus();
|
|
73
87
|
</script>
|
|
74
88
|
|
|
75
89
|
<template>
|
|
76
|
-
<Banner v-if="
|
|
90
|
+
<Banner v-if="status.status === 'offline'">
|
|
91
|
+
Offline — {{ status.pendingCount }} changes waiting
|
|
92
|
+
</Banner>
|
|
77
93
|
<div
|
|
78
|
-
v-for="p in
|
|
94
|
+
v-for="p in data ?? []"
|
|
79
95
|
:key="p.id"
|
|
80
96
|
:style="{ opacity: p._syncStatus === 'pending' ? 0.6 : 1 }"
|
|
81
97
|
>
|
|
@@ -84,48 +100,57 @@ const { isOnline } = useSyncStatus();
|
|
|
84
100
|
</template>
|
|
85
101
|
```
|
|
86
102
|
|
|
103
|
+
Pass a `SyncManager` to `useSyncStatus(syncManager)` to see its pending queue;
|
|
104
|
+
without one it reports only the browser's online state.
|
|
105
|
+
|
|
87
106
|
### Auth
|
|
88
107
|
|
|
89
108
|
```vue
|
|
90
109
|
<script setup lang="ts">
|
|
91
110
|
import { useAuth } from '@zveltio/vue';
|
|
92
111
|
|
|
93
|
-
const { user,
|
|
112
|
+
const { user, loading, login, logout } = useAuth();
|
|
94
113
|
</script>
|
|
95
114
|
|
|
96
115
|
<template>
|
|
97
116
|
<div v-if="loading" />
|
|
98
|
-
<button v-else-if="!user" @click="
|
|
117
|
+
<button v-else-if="!user" @click="login(email, password)">Sign In</button>
|
|
99
118
|
<div v-else>
|
|
100
119
|
{{ user.email }}
|
|
101
|
-
<button @click="
|
|
120
|
+
<button @click="logout">Sign Out</button>
|
|
102
121
|
</div>
|
|
103
122
|
</template>
|
|
104
123
|
```
|
|
105
124
|
|
|
125
|
+
`session` and `signup(email, password, name)` are returned as well.
|
|
126
|
+
|
|
106
127
|
### Storage
|
|
107
128
|
|
|
108
129
|
```vue
|
|
109
130
|
<script setup lang="ts">
|
|
110
131
|
import { useStorage } from '@zveltio/vue';
|
|
111
132
|
|
|
112
|
-
const {
|
|
133
|
+
const props = defineProps<{ folderId?: string }>();
|
|
134
|
+
const { upload, uploading, error } = useStorage();
|
|
113
135
|
|
|
114
136
|
async function handleFile(e: Event) {
|
|
115
137
|
const file = (e.target as HTMLInputElement).files?.[0];
|
|
116
138
|
if (file) {
|
|
117
|
-
const
|
|
118
|
-
console.log('Uploaded:', url);
|
|
139
|
+
const stored = await upload(file, props.folderId);
|
|
140
|
+
console.log('Uploaded:', stored.url);
|
|
119
141
|
}
|
|
120
142
|
}
|
|
121
143
|
</script>
|
|
122
144
|
|
|
123
145
|
<template>
|
|
124
146
|
<input type="file" @change="handleFile" :disabled="uploading" />
|
|
125
|
-
<
|
|
147
|
+
<p v-if="error">{{ error.message }}</p>
|
|
126
148
|
</template>
|
|
127
149
|
```
|
|
128
150
|
|
|
151
|
+
`list(folderId?)` and `remove(fileId)` are returned as well. The folder argument is a
|
|
152
|
+
folder **id**; omit it for the root.
|
|
153
|
+
|
|
129
154
|
## Links
|
|
130
155
|
|
|
131
156
|
- [Documentation](https://zveltio.com/docs)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/composables/useAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/C,wBAAgB,OAAO,IAAI;
|
|
1
|
+
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../src/composables/useAuth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAM/C,wBAAgB,OAAO,IAAI;IAEzB,IAAI,EAAE,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IAEtB,OAAO,EAAE,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,CAAC;IACzB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACzB,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E,CAqEA"}
|
|
@@ -6,7 +6,9 @@ export function useAuth() {
|
|
|
6
6
|
const client = inject(ZVELTIO_CLIENT_KEY);
|
|
7
7
|
if (!client)
|
|
8
8
|
throw new Error('useAuth must be used within ZveltioPlugin');
|
|
9
|
+
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
9
10
|
const user = ref(null);
|
|
11
|
+
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
10
12
|
const session = ref(null);
|
|
11
13
|
const loading = ref(true);
|
|
12
14
|
const error = ref(null);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from 'vue';
|
|
2
2
|
import { type CollectionOptions } from '@zveltio/sdk';
|
|
3
|
-
export declare function useCollection<T = any>(collectionName: string, options?: CollectionOptions): {
|
|
3
|
+
export declare function useCollection<T = any>(collectionName: string, options?: MaybeRefOrGetter<CollectionOptions | undefined>): {
|
|
4
4
|
data: Ref<T[] | null>;
|
|
5
5
|
loading: Ref<boolean>;
|
|
6
6
|
error: Ref<Error | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCollection.d.ts","sourceRoot":"","sources":["../../src/composables/useCollection.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useCollection.d.ts","sourceRoot":"","sources":["../../src/composables/useCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAEtF,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKvE,wBAAgB,aAAa,CAAC,CAAC,GAAG,GAAG,EACnC,cAAc,EAAE,MAAM,EAGtB,OAAO,CAAC,EAAE,gBAAgB,CAAC,iBAAiB,GAAG,SAAS,CAAC,GACxD;IACD,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CAwBA"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { ref, onMounted } from 'vue';
|
|
1
|
+
import { ref, onMounted, watch, toValue } from 'vue';
|
|
2
2
|
import { inject } from 'vue';
|
|
3
3
|
import { fetchCollection } from '@zveltio/sdk';
|
|
4
4
|
import { ZVELTIO_CLIENT_KEY } from '../plugin.js';
|
|
5
|
-
|
|
5
|
+
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
6
|
+
export function useCollection(collectionName,
|
|
7
|
+
// A ref or getter re-fetches when the options change, as `@zveltio/react`'s
|
|
8
|
+
// `useCollection` does; a plain object is read once.
|
|
9
|
+
options) {
|
|
6
10
|
const client = inject(ZVELTIO_CLIENT_KEY);
|
|
7
11
|
if (!client)
|
|
8
12
|
throw new Error('useCollection must be used within ZveltioPlugin');
|
|
@@ -13,7 +17,7 @@ export function useCollection(collectionName, options) {
|
|
|
13
17
|
loading.value = true;
|
|
14
18
|
error.value = null;
|
|
15
19
|
try {
|
|
16
|
-
data.value = await fetchCollection(client, collectionName, options);
|
|
20
|
+
data.value = await fetchCollection(client, collectionName, toValue(options));
|
|
17
21
|
}
|
|
18
22
|
catch (err) {
|
|
19
23
|
error.value = err instanceof Error ? err : new Error(String(err));
|
|
@@ -23,5 +27,6 @@ export function useCollection(collectionName, options) {
|
|
|
23
27
|
}
|
|
24
28
|
};
|
|
25
29
|
onMounted(load);
|
|
30
|
+
watch(() => JSON.stringify(toValue(options)), load);
|
|
26
31
|
return { data, loading, error, refetch: load };
|
|
27
32
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRealtime.d.ts","sourceRoot":"","sources":["../../src/composables/useRealtime.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"useRealtime.d.ts","sourceRoot":"","sources":["../../src/composables/useRealtime.ts"],"names":[],"mappings":"AAGA,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,GAAG,IAAI,EAEpB,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,GAC5B,IAAI,CAqBN"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { onMounted, onUnmounted } from 'vue';
|
|
2
2
|
import { ZveltioRealtime } from '@zveltio/sdk';
|
|
3
|
-
export function useRealtime(baseUrl, collection, event,
|
|
3
|
+
export function useRealtime(baseUrl, collection, event,
|
|
4
|
+
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
5
|
+
callback) {
|
|
4
6
|
let realtime = null;
|
|
5
7
|
let unsub = null;
|
|
6
8
|
onMounted(() => {
|
|
@@ -8,6 +10,7 @@ export function useRealtime(baseUrl, collection, event, callback) {
|
|
|
8
10
|
return;
|
|
9
11
|
realtime = new ZveltioRealtime(baseUrl);
|
|
10
12
|
realtime.connect();
|
|
13
|
+
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
11
14
|
unsub = realtime.subscribe(collection, (data) => {
|
|
12
15
|
if (!event || data.event === event) {
|
|
13
16
|
callback(data);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type Ref } from 'vue';
|
|
2
|
-
export declare function useRecord<T = any>(collectionName: string, id: string | null | undefined): {
|
|
1
|
+
import { type MaybeRefOrGetter, type Ref } from 'vue';
|
|
2
|
+
export declare function useRecord<T = any>(collectionName: string, id: MaybeRefOrGetter<string | null | undefined>): {
|
|
3
3
|
data: Ref<T | null>;
|
|
4
4
|
loading: Ref<boolean>;
|
|
5
5
|
error: Ref<Error | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRecord.d.ts","sourceRoot":"","sources":["../../src/composables/useRecord.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"useRecord.d.ts","sourceRoot":"","sources":["../../src/composables/useRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,gBAAgB,EAAE,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAOtF,wBAAgB,SAAS,CAAC,CAAC,GAAG,GAAG,EAC/B,cAAc,EAAE,MAAM,EAGtB,EAAE,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,GAC9C;IACD,IAAI,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IACpB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IACtB,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IACzB,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B,CA8BA"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import { ref, onMounted, watch } from 'vue';
|
|
1
|
+
import { ref, onMounted, watch, toValue } from 'vue';
|
|
2
2
|
import { inject } from 'vue';
|
|
3
3
|
import { fetchRecord } from '@zveltio/sdk';
|
|
4
4
|
import { ZVELTIO_CLIENT_KEY } from '../plugin.js';
|
|
5
|
-
|
|
5
|
+
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
6
|
+
export function useRecord(collectionName,
|
|
7
|
+
// A plain string cannot change after setup; pass a ref or getter to follow
|
|
8
|
+
// a route param the way `@zveltio/react`'s `useRecord` follows its prop.
|
|
9
|
+
id) {
|
|
6
10
|
const client = inject(ZVELTIO_CLIENT_KEY);
|
|
7
11
|
if (!client)
|
|
8
12
|
throw new Error('useRecord must be used within ZveltioPlugin');
|
|
9
13
|
const data = ref(null);
|
|
10
|
-
const loading = ref(!!id);
|
|
14
|
+
const loading = ref(!!toValue(id));
|
|
11
15
|
const error = ref(null);
|
|
12
16
|
const load = async () => {
|
|
13
|
-
|
|
17
|
+
const current = toValue(id);
|
|
18
|
+
if (!current) {
|
|
14
19
|
data.value = null;
|
|
15
20
|
loading.value = false;
|
|
16
21
|
return;
|
|
@@ -18,7 +23,7 @@ export function useRecord(collectionName, id) {
|
|
|
18
23
|
loading.value = true;
|
|
19
24
|
error.value = null;
|
|
20
25
|
try {
|
|
21
|
-
data.value = await fetchRecord(client, collectionName,
|
|
26
|
+
data.value = await fetchRecord(client, collectionName, current);
|
|
22
27
|
}
|
|
23
28
|
catch (err) {
|
|
24
29
|
error.value = err instanceof Error ? err : new Error(String(err));
|
|
@@ -28,6 +33,6 @@ export function useRecord(collectionName, id) {
|
|
|
28
33
|
}
|
|
29
34
|
};
|
|
30
35
|
onMounted(load);
|
|
31
|
-
watch(() => id, load);
|
|
36
|
+
watch(() => toValue(id), load);
|
|
32
37
|
return { data, loading, error, refetch: load };
|
|
33
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSyncCollection.d.ts","sourceRoot":"","sources":["../../src/composables/useSyncCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAM5D,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"useSyncCollection.d.ts","sourceRoot":"","sources":["../../src/composables/useSyncCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,GAAG,EAAE,MAAM,KAAK,CAAC;AAM5D,MAAM,WAAW,wBAAwB;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAGD,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,GAAG,EACvC,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,wBAAwB,GACjC;IAAE,IAAI,EAAE,GAAG,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAA;CAAE,CAgC5E"}
|
|
@@ -2,6 +2,7 @@ import { ref, onMounted, onUnmounted } from 'vue';
|
|
|
2
2
|
import { SyncManager } from '@zveltio/sdk';
|
|
3
3
|
import { inject } from 'vue';
|
|
4
4
|
import { ZVELTIO_CLIENT_KEY } from '../plugin.js';
|
|
5
|
+
// biome-ignore lint/suspicious/noExplicitAny: legacy any; tracked in hardening plan item H-01
|
|
5
6
|
export function useSyncCollection(collectionName, options) {
|
|
6
7
|
const client = inject(ZVELTIO_CLIENT_KEY);
|
|
7
8
|
if (!client)
|
package/dist/types.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
export
|
|
2
|
-
filter?: Record<string, any>;
|
|
3
|
-
sort?: string;
|
|
4
|
-
order?: 'asc' | 'desc';
|
|
5
|
-
limit?: number;
|
|
6
|
-
page?: number;
|
|
7
|
-
search?: string;
|
|
8
|
-
}
|
|
1
|
+
export type { CollectionOptions } from '@zveltio/sdk';
|
|
9
2
|
export interface SyncStatus {
|
|
10
3
|
status: 'online' | 'offline' | 'syncing';
|
|
11
4
|
pendingCount: number;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;IACzC,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
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.70",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -15,19 +15,20 @@
|
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
17
|
"scripts": {
|
|
18
|
-
"build": "tsc",
|
|
18
|
+
"build": "tsc -p tsconfig.build.json",
|
|
19
19
|
"dev": "tsc --watch",
|
|
20
|
-
"typecheck": "tsc --noEmit"
|
|
20
|
+
"typecheck": "tsc --noEmit",
|
|
21
|
+
"test": "bun test"
|
|
21
22
|
},
|
|
22
23
|
"dependencies": {
|
|
23
|
-
"@zveltio/sdk": "3.0.0-beta.
|
|
24
|
+
"@zveltio/sdk": "3.0.0-beta.70"
|
|
24
25
|
},
|
|
25
26
|
"peerDependencies": {
|
|
26
27
|
"vue": ">=3.3"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
|
-
"
|
|
30
|
-
"
|
|
30
|
+
"typescript": "^5.4.0",
|
|
31
|
+
"vue": "^3.5.42"
|
|
31
32
|
},
|
|
32
33
|
"repository": {
|
|
33
34
|
"type": "git",
|