nuxt-convex-module 0.10.0 → 0.11.0
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 +21 -4
- package/dist/chunks/index.mjs +37 -15
- package/dist/devtools-client/_nuxt/BbiHJLbN.js +4 -0
- package/dist/devtools-client/_nuxt/entry.CfoJPZu4.css +1 -0
- package/dist/devtools-client/index.html +1 -1
- package/dist/module.d.mts +6 -6
- package/dist/module.json +1 -1
- package/dist/module.mjs +38 -10
- package/dist/runtime/auth0/vue/index.js +1 -1
- package/dist/runtime/better-auth/nuxt/middleware.js +2 -13
- package/dist/runtime/better-auth/nuxt/server-guard.d.ts +12 -0
- package/dist/runtime/better-auth/nuxt/server-guard.js +13 -0
- package/dist/runtime/better-auth/vue/auth-boundary.js +2 -2
- package/dist/runtime/better-auth/vue/client.d.ts +5 -357
- package/dist/runtime/better-auth/vue/use-better-auth.d.ts +4 -65
- package/dist/runtime/clerk/vue/index.js +1 -1
- package/dist/runtime/nuxt/composables/use-async-paginated-query.js +12 -12
- package/dist/runtime/nuxt/composables/use-async-query.d.ts +2 -2
- package/dist/runtime/nuxt/index.d.ts +6 -6
- package/dist/runtime/polar/vue/components.js +2 -2
- package/dist/runtime/vue/auth/helpers.js +4 -4
- package/dist/runtime/vue/client.d.ts +6 -6
- package/dist/runtime/vue/components/convex-image.js +1 -1
- package/dist/runtime/vue/composables/use-action.d.ts +3 -3
- package/dist/runtime/vue/composables/use-mutation.d.ts +4 -4
- package/dist/runtime/vue/composables/use-queries.d.ts +14 -7
- package/dist/runtime/vue/composables/use-query.d.ts +5 -5
- package/dist/runtime/vue/hydration.d.ts +3 -3
- package/dist/runtime/vue/index.d.ts +1 -1
- package/dist/runtime/vue/queries-observer.d.ts +9 -9
- package/package.json +26 -25
- package/dist/devtools-client/200.html +0 -1
- package/dist/devtools-client/404.html +0 -1
- package/dist/devtools-client/_nuxt/71bSMC-_.js +0 -2
- package/dist/devtools-client/_nuxt/BAaUCl_m.js +0 -1
- package/dist/devtools-client/_nuxt/BhmjAr2Q.js +0 -1
- package/dist/devtools-client/_nuxt/BmBQNDID.js +0 -1
- package/dist/devtools-client/_nuxt/C6YdTgGl.js +0 -2
- package/dist/devtools-client/_nuxt/CKakiU_h.js +0 -1
- package/dist/devtools-client/_nuxt/Cm7YqZQ-.js +0 -1
- package/dist/devtools-client/_nuxt/DQmVr-EY.js +0 -1
- package/dist/devtools-client/_nuxt/D_Rij7MD.js +0 -1
- package/dist/devtools-client/_nuxt/EZ4-8Xzm.js +0 -3
- package/dist/devtools-client/_nuxt/Kba0XpjH.js +0 -1
- package/dist/devtools-client/_nuxt/OVE7s6ty.js +0 -1
- package/dist/devtools-client/_nuxt/_Lf3mfPR.js +0 -1
- package/dist/devtools-client/_nuxt/builds/latest.json +0 -1
- package/dist/devtools-client/_nuxt/builds/meta/1734dcfa-caf6-447b-a68b-4dd3cf138875.json +0 -1
- package/dist/devtools-client/_nuxt/entry.HF8C6P11.css +0 -1
- package/dist/devtools-client/_nuxt/error-404.CLlwiMp-.css +0 -1
- package/dist/devtools-client/_nuxt/error-500.Bxr6fpDU.css +0 -1
- package/dist/devtools-client/_nuxt/queries.DNBUjWk2.css +0 -1
- package/dist/devtools-client/_nuxt/vZZlEX5A.js +0 -1
- package/dist/devtools-client/auth/index.html +0 -1
- package/dist/devtools-client/logs/index.html +0 -1
- package/dist/devtools-client/queries/index.html +0 -1
|
@@ -7,7 +7,7 @@ export function provideConvexAuthFromClerk(options = {}) {
|
|
|
7
7
|
const useAuth = options.useAuth ?? useClerkAuth;
|
|
8
8
|
return provideConvexAuth({ client, useAuth: () => useAuthFromClerk(useAuth) });
|
|
9
9
|
}
|
|
10
|
-
export const ConvexProviderWithClerk = defineComponent({
|
|
10
|
+
export const ConvexProviderWithClerk = /* @__PURE__ */ defineComponent({
|
|
11
11
|
name: "ConvexProviderWithClerk",
|
|
12
12
|
props: {
|
|
13
13
|
client: { type: Object, default: void 0 },
|
|
@@ -17,20 +17,20 @@ export function useAsyncPaginatedQuery(query, args, options) {
|
|
|
17
17
|
key,
|
|
18
18
|
async () => {
|
|
19
19
|
const currentArgs = toValue(args);
|
|
20
|
-
if (currentArgs
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
if (import.meta.server && currentArgs !== "skip") {
|
|
21
|
+
if (!deploymentUrl) {
|
|
22
|
+
throw new Error(
|
|
23
|
+
"`useAsyncPaginatedQuery` could not fetch during SSR: no Convex deployment URL is configured. Set NUXT_PUBLIC_CONVEX_URL or `convex.url` in nuxt.config."
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
const result2 = await fetchQuery(
|
|
27
|
+
query,
|
|
28
|
+
{ ...currentArgs, paginationOpts: { numItems: initialNumItems, cursor: null } },
|
|
29
|
+
{ token: await resolveToken(), url: deploymentUrl }
|
|
26
30
|
);
|
|
31
|
+
return { page: convexToJson(result2.page), isDone: result2.isDone };
|
|
27
32
|
}
|
|
28
|
-
|
|
29
|
-
query,
|
|
30
|
-
{ ...currentArgs, paginationOpts: { numItems: initialNumItems, cursor: null } },
|
|
31
|
-
{ token: await resolveToken(), url: deploymentUrl }
|
|
32
|
-
);
|
|
33
|
-
return { page: convexToJson(result2.page), isDone: result2.isDone };
|
|
33
|
+
return null;
|
|
34
34
|
},
|
|
35
35
|
{ server, lazy, deep: false, immediate: initialArgs !== "skip" }
|
|
36
36
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
2
|
-
import type { FunctionArgs, FunctionReference, FunctionReturnType } from 'convex/server';
|
|
2
|
+
import type { FunctionArgs, FunctionReference, FunctionReference_future, FunctionReturnType } from 'convex/server';
|
|
3
3
|
/**
|
|
4
4
|
* Request status of a {@link useAsyncQuery} call — mirrors Nuxt's
|
|
5
5
|
* `useAsyncData` statuses.
|
|
@@ -130,6 +130,6 @@ export type AsyncQueryData<T> = Pick<AsyncQueryReturn<T>, 'data' | 'error' | 'st
|
|
|
130
130
|
*
|
|
131
131
|
* @public
|
|
132
132
|
*/
|
|
133
|
-
export declare function useAsyncQuery<Query extends FunctionReference<'query'>>(query: Query, args?: MaybeRefOrGetter<FunctionArgs<Query> | 'skip'>, options?: AsyncQueryOptions): AsyncQueryReturn<FunctionReturnType<Query>>;
|
|
133
|
+
export declare function useAsyncQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, args?: MaybeRefOrGetter<FunctionArgs<Query> | 'skip'>, options?: AsyncQueryOptions): AsyncQueryReturn<FunctionReturnType<Query>>;
|
|
134
134
|
/** @public */
|
|
135
135
|
export declare const useConvexAsyncQuery: typeof useAsyncQuery;
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
*
|
|
41
41
|
* @module server
|
|
42
42
|
*/
|
|
43
|
-
import type { ArgsAndOptions, FunctionReference, FunctionReturnType } from 'convex/server';
|
|
43
|
+
import type { ArgsAndOptions, FunctionReference, FunctionReference_future, FunctionReturnType } from 'convex/server';
|
|
44
44
|
import type { Preloaded } from '../vue/index.js';
|
|
45
45
|
/**
|
|
46
46
|
* Options to {@link preloadQuery}, {@link fetchQuery}, {@link fetchMutation} and {@link fetchAction}.
|
|
@@ -85,7 +85,7 @@ export type NuxtOptions = {
|
|
|
85
85
|
*
|
|
86
86
|
* @public
|
|
87
87
|
*/
|
|
88
|
-
export declare function preloadQuery<Query extends FunctionReference<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<Preloaded<Query>>;
|
|
88
|
+
export declare function preloadQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<Preloaded<Query>>;
|
|
89
89
|
/**
|
|
90
90
|
* Returns the result of executing a query via {@link preloadQuery}.
|
|
91
91
|
*
|
|
@@ -94,7 +94,7 @@ export declare function preloadQuery<Query extends FunctionReference<'query'>>(q
|
|
|
94
94
|
*
|
|
95
95
|
* @public
|
|
96
96
|
*/
|
|
97
|
-
export declare function preloadedQueryResult<Query extends FunctionReference<'query'>>(preloaded: Preloaded<Query>): FunctionReturnType<Query>;
|
|
97
|
+
export declare function preloadedQueryResult<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(preloaded: Preloaded<Query>): FunctionReturnType<Query>;
|
|
98
98
|
/**
|
|
99
99
|
* Execute a Convex query function.
|
|
100
100
|
*
|
|
@@ -107,7 +107,7 @@ export declare function preloadedQueryResult<Query extends FunctionReference<'qu
|
|
|
107
107
|
*
|
|
108
108
|
* @public
|
|
109
109
|
*/
|
|
110
|
-
export declare function fetchQuery<Query extends FunctionReference<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<FunctionReturnType<Query>>;
|
|
110
|
+
export declare function fetchQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...args: ArgsAndOptions<Query, NuxtOptions>): Promise<FunctionReturnType<Query>>;
|
|
111
111
|
/**
|
|
112
112
|
* Execute a Convex mutation function.
|
|
113
113
|
*
|
|
@@ -120,7 +120,7 @@ export declare function fetchQuery<Query extends FunctionReference<'query'>>(que
|
|
|
120
120
|
*
|
|
121
121
|
* @public
|
|
122
122
|
*/
|
|
123
|
-
export declare function fetchMutation<Mutation extends FunctionReference<'mutation'>>(mutation: Mutation, ...args: ArgsAndOptions<Mutation, NuxtOptions>): Promise<FunctionReturnType<Mutation>>;
|
|
123
|
+
export declare function fetchMutation<Mutation extends FunctionReference<'mutation'> | FunctionReference_future<'mutation'>>(mutation: Mutation, ...args: ArgsAndOptions<Mutation, NuxtOptions>): Promise<FunctionReturnType<Mutation>>;
|
|
124
124
|
/**
|
|
125
125
|
* Execute a Convex action function.
|
|
126
126
|
*
|
|
@@ -133,4 +133,4 @@ export declare function fetchMutation<Mutation extends FunctionReference<'mutati
|
|
|
133
133
|
*
|
|
134
134
|
* @public
|
|
135
135
|
*/
|
|
136
|
-
export declare function fetchAction<Action extends FunctionReference<'action'>>(action: Action, ...args: ArgsAndOptions<Action, NuxtOptions>): Promise<FunctionReturnType<Action>>;
|
|
136
|
+
export declare function fetchAction<Action extends FunctionReference<'action'> | FunctionReference_future<'action'>>(action: Action, ...args: ArgsAndOptions<Action, NuxtOptions>): Promise<FunctionReturnType<Action>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, h, mergeProps, ref, watch } from "vue";
|
|
2
2
|
import { useAction } from "../../vue/composables/use-action.js";
|
|
3
3
|
import { useConvexNamespace } from "../../vue/provide.js";
|
|
4
|
-
export const CustomerPortalLink = defineComponent({
|
|
4
|
+
export const CustomerPortalLink = /* @__PURE__ */ defineComponent({
|
|
5
5
|
name: "CustomerPortalLink",
|
|
6
6
|
inheritAttrs: false,
|
|
7
7
|
props: {
|
|
@@ -34,7 +34,7 @@ export const CustomerPortalLink = defineComponent({
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
export const CheckoutLink = defineComponent({
|
|
37
|
+
export const CheckoutLink = /* @__PURE__ */ defineComponent({
|
|
38
38
|
name: "CheckoutLink",
|
|
39
39
|
inheritAttrs: false,
|
|
40
40
|
props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent } from "vue";
|
|
2
2
|
import { useConvexAuth } from "./index.js";
|
|
3
|
-
export const Authenticated = defineComponent({
|
|
3
|
+
export const Authenticated = /* @__PURE__ */ defineComponent({
|
|
4
4
|
name: "Authenticated",
|
|
5
5
|
setup(_, { slots }) {
|
|
6
6
|
const { isLoading, isAuthenticated } = useConvexAuth();
|
|
@@ -12,7 +12,7 @@ export const Authenticated = defineComponent({
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
|
-
export const Unauthenticated = defineComponent({
|
|
15
|
+
export const Unauthenticated = /* @__PURE__ */ defineComponent({
|
|
16
16
|
name: "Unauthenticated",
|
|
17
17
|
setup(_, { slots }) {
|
|
18
18
|
const { isLoading, isAuthenticated } = useConvexAuth();
|
|
@@ -24,7 +24,7 @@ export const Unauthenticated = defineComponent({
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
export const AuthLoading = defineComponent({
|
|
27
|
+
export const AuthLoading = /* @__PURE__ */ defineComponent({
|
|
28
28
|
name: "AuthLoading",
|
|
29
29
|
setup(_, { slots }) {
|
|
30
30
|
const { isLoading } = useConvexAuth();
|
|
@@ -36,7 +36,7 @@ export const AuthLoading = defineComponent({
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
export const AuthRefreshing = defineComponent({
|
|
39
|
+
export const AuthRefreshing = /* @__PURE__ */ defineComponent({
|
|
40
40
|
name: "AuthRefreshing",
|
|
41
41
|
setup(_, { slots }) {
|
|
42
42
|
const { isAuthenticated, isRefreshing } = useConvexAuth();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { InjectionKey } from 'vue';
|
|
2
2
|
import type { AuthTokenFetcher, BaseConvexClientOptions, ConnectionState, OptimisticUpdate, PaginationStatus, QueryJournal, QueryOptions } from 'convex/browser';
|
|
3
3
|
import type { Watch as ConvexWatch } from 'convex/react';
|
|
4
|
-
import type { ArgsAndOptions, FunctionArgs, FunctionReference, FunctionReturnType, OptionalRestArgs } from 'convex/server';
|
|
4
|
+
import type { ArgsAndOptions, FunctionArgs, FunctionReference, FunctionReference_future, FunctionReturnType, OptionalRestArgs } from 'convex/server';
|
|
5
5
|
import type { Value } from 'convex/values';
|
|
6
6
|
export type { AuthTokenFetcher, ConnectionState, OptimisticUpdate };
|
|
7
7
|
/**
|
|
@@ -147,7 +147,7 @@ export declare class ConvexVueClient {
|
|
|
147
147
|
*
|
|
148
148
|
* @returns The {@link Watch} object.
|
|
149
149
|
*/
|
|
150
|
-
watchQuery<Query extends FunctionReference<'query'>>(query: Query, ...argsAndOptions: ArgsAndOptions<Query, WatchQueryOptions>): Watch<FunctionReturnType<Query>>;
|
|
150
|
+
watchQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...argsAndOptions: ArgsAndOptions<Query, WatchQueryOptions>): Watch<FunctionReturnType<Query>>;
|
|
151
151
|
/**
|
|
152
152
|
* Indicates likely future interest in a query subscription.
|
|
153
153
|
*
|
|
@@ -160,7 +160,7 @@ export declare class ConvexVueClient {
|
|
|
160
160
|
* @param queryOptions - A query (function reference from an api object) and its args, plus
|
|
161
161
|
* an optional extendSubscriptionFor for how long to subscribe to the query.
|
|
162
162
|
*/
|
|
163
|
-
prewarmQuery<Query extends FunctionReference<'query'>>(queryOptions: QueryOptions<Query> & {
|
|
163
|
+
prewarmQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(queryOptions: QueryOptions<Query> & {
|
|
164
164
|
extendSubscriptionFor?: number;
|
|
165
165
|
}): void;
|
|
166
166
|
/**
|
|
@@ -173,7 +173,7 @@ export declare class ConvexVueClient {
|
|
|
173
173
|
* @param options - A {@link MutationOptions} options object for the mutation.
|
|
174
174
|
* @returns A promise of the mutation's result.
|
|
175
175
|
*/
|
|
176
|
-
mutation<Mutation extends FunctionReference<'mutation'>>(mutation: Mutation, ...argsAndOptions: ArgsAndOptions<Mutation, MutationOptions<FunctionArgs<Mutation>>>): Promise<FunctionReturnType<Mutation>>;
|
|
176
|
+
mutation<Mutation extends FunctionReference<'mutation'> | FunctionReference_future<'mutation'>>(mutation: Mutation, ...argsAndOptions: ArgsAndOptions<Mutation, MutationOptions<FunctionArgs<Mutation>>>): Promise<FunctionReturnType<Mutation>>;
|
|
177
177
|
/**
|
|
178
178
|
* Execute an action function.
|
|
179
179
|
*
|
|
@@ -183,7 +183,7 @@ export declare class ConvexVueClient {
|
|
|
183
183
|
* the arguments will be `{}`.
|
|
184
184
|
* @returns A promise of the action's result.
|
|
185
185
|
*/
|
|
186
|
-
action<Action extends FunctionReference<'action'>>(action: Action, ...args: OptionalRestArgs<Action>): Promise<FunctionReturnType<Action>>;
|
|
186
|
+
action<Action extends FunctionReference<'action'> | FunctionReference_future<'action'>>(action: Action, ...args: OptionalRestArgs<Action>): Promise<FunctionReturnType<Action>>;
|
|
187
187
|
/**
|
|
188
188
|
* Fetch a query result once.
|
|
189
189
|
*
|
|
@@ -196,7 +196,7 @@ export declare class ConvexVueClient {
|
|
|
196
196
|
* the arguments will be `{}`.
|
|
197
197
|
* @returns A promise of the query's result.
|
|
198
198
|
*/
|
|
199
|
-
query<Query extends FunctionReference<'query'>>(query: Query, ...args: OptionalRestArgs<Query>): Promise<FunctionReturnType<Query>>;
|
|
199
|
+
query<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...args: OptionalRestArgs<Query>): Promise<FunctionReturnType<Query>>;
|
|
200
200
|
/**
|
|
201
201
|
* Get the current {@link ConnectionState} between the client and the Convex
|
|
202
202
|
* deployment.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, h } from "vue";
|
|
2
2
|
import { useStorageUrl } from "../composables/use-storage-url.js";
|
|
3
|
-
export const ConvexImage = defineComponent({
|
|
3
|
+
export const ConvexImage = /* @__PURE__ */ defineComponent({
|
|
4
4
|
name: "ConvexImage",
|
|
5
5
|
inheritAttrs: false,
|
|
6
6
|
props: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { FunctionReference, FunctionReturnType, OptionalRestArgs } from 'convex/server';
|
|
1
|
+
import type { FunctionReference, FunctionReference_future, FunctionReturnType, OptionalRestArgs } from 'convex/server';
|
|
2
2
|
/**
|
|
3
3
|
* An interface to execute a Convex action on the server.
|
|
4
4
|
*
|
|
5
5
|
* @public
|
|
6
6
|
*/
|
|
7
|
-
export interface VueAction<Action extends FunctionReference<'action'>> {
|
|
7
|
+
export interface VueAction<Action extends FunctionReference<'action'> | FunctionReference_future<'action'>> {
|
|
8
8
|
/**
|
|
9
9
|
* Execute the function on the server, returning a `Promise` of its return value.
|
|
10
10
|
*
|
|
@@ -57,6 +57,6 @@ export interface VueAction<Action extends FunctionReference<'action'>> {
|
|
|
57
57
|
*
|
|
58
58
|
* @public
|
|
59
59
|
*/
|
|
60
|
-
export declare function useAction<Action extends FunctionReference<'action'>>(action: Action): VueAction<Action>;
|
|
60
|
+
export declare function useAction<Action extends FunctionReference<'action'> | FunctionReference_future<'action'>>(action: Action): VueAction<Action>;
|
|
61
61
|
/** @public */
|
|
62
62
|
export declare const useConvexAction: typeof useAction;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { OptimisticUpdate } from 'convex/browser';
|
|
2
|
-
import type { FunctionArgs, FunctionReference, FunctionReturnType, OptionalRestArgs } from 'convex/server';
|
|
2
|
+
import type { FunctionArgs, FunctionReference, FunctionReference_future, FunctionReturnType, OptionalRestArgs } from 'convex/server';
|
|
3
3
|
import { type ConvexVueClient } from '../client.js';
|
|
4
4
|
/**
|
|
5
5
|
* An interface to execute a Convex mutation function on the server.
|
|
6
6
|
*
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export interface VueMutation<Mutation extends FunctionReference<'mutation'>> {
|
|
9
|
+
export interface VueMutation<Mutation extends FunctionReference<'mutation'> | FunctionReference_future<'mutation'>> {
|
|
10
10
|
/**
|
|
11
11
|
* Execute the mutation on the server, returning a `Promise` of its return value.
|
|
12
12
|
*
|
|
@@ -37,7 +37,7 @@ export interface VueMutation<Mutation extends FunctionReference<'mutation'>> {
|
|
|
37
37
|
*/
|
|
38
38
|
withOptimisticUpdate<T extends OptimisticUpdate<FunctionArgs<Mutation>>>(optimisticUpdate: T & (ReturnType<T> extends Promise<any> ? 'Optimistic update handlers must be synchronous' : {})): VueMutation<Mutation>;
|
|
39
39
|
}
|
|
40
|
-
export declare function createMutation(mutationReference: FunctionReference<'mutation'>, client: ConvexVueClient, update?: OptimisticUpdate<any>): VueMutation<any>;
|
|
40
|
+
export declare function createMutation(mutationReference: FunctionReference<'mutation'> | FunctionReference_future<'mutation'>, client: ConvexVueClient, update?: OptimisticUpdate<any>): VueMutation<any>;
|
|
41
41
|
/**
|
|
42
42
|
* Construct a new {@link VueMutation}.
|
|
43
43
|
*
|
|
@@ -71,6 +71,6 @@ export declare function createMutation(mutationReference: FunctionReference<'mut
|
|
|
71
71
|
*
|
|
72
72
|
* @public
|
|
73
73
|
*/
|
|
74
|
-
export declare function useMutation<Mutation extends FunctionReference<'mutation'>>(mutation: Mutation): VueMutation<Mutation>;
|
|
74
|
+
export declare function useMutation<Mutation extends FunctionReference<'mutation'> | FunctionReference_future<'mutation'>>(mutation: Mutation): VueMutation<Mutation>;
|
|
75
75
|
/** @public */
|
|
76
76
|
export declare const useConvexMutation: typeof useMutation;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { Value } from 'convex/values';
|
|
1
2
|
import { type MaybeRefOrGetter, type ShallowRef } from 'vue';
|
|
2
|
-
import { type CreateWatch } from '../queries-observer.js';
|
|
3
|
-
import type {
|
|
3
|
+
import { type CreateWatch, type SubscribeToPaginatedQueryOptions } from '../queries-observer.js';
|
|
4
|
+
import type { FunctionReference, FunctionReference_future } from 'convex/server';
|
|
4
5
|
/**
|
|
5
6
|
* Load a variable number of reactive Convex queries.
|
|
6
7
|
*
|
|
@@ -9,9 +10,10 @@ import type { RequestForQueries } from 'convex/react';
|
|
|
9
10
|
* of queries without violating the rules of composables.
|
|
10
11
|
*
|
|
11
12
|
* This composable accepts an object whose keys are identifiers for each query and the
|
|
12
|
-
* values are objects of
|
|
13
|
-
* `query
|
|
14
|
-
* the
|
|
13
|
+
* values are objects of
|
|
14
|
+
* `{ query: FunctionReference | FunctionReference_future, args: Record<string, Value> }`.
|
|
15
|
+
* The `query` is a reference to the Convex query function to load, and the
|
|
16
|
+
* `args` are the arguments to that function.
|
|
15
17
|
*
|
|
16
18
|
* The composable returns an object that maps each identifier to the result of the query,
|
|
17
19
|
* `undefined` if the query is still loading, or an instance of `Error` if the query
|
|
@@ -52,11 +54,16 @@ import type { RequestForQueries } from 'convex/react';
|
|
|
52
54
|
*
|
|
53
55
|
* @public
|
|
54
56
|
*/
|
|
55
|
-
export declare function useQueries(queries: MaybeRefOrGetter<
|
|
57
|
+
export declare function useQueries(queries: MaybeRefOrGetter<RequestForQueriesCompat>): ShallowRef<Record<string, any | undefined | Error>>;
|
|
56
58
|
/**
|
|
57
59
|
* Internal version of `useQueries` that is exported for testing.
|
|
58
60
|
*/
|
|
59
|
-
export declare function useQueriesHelper(queries: MaybeRefOrGetter<
|
|
61
|
+
export declare function useQueriesHelper(queries: MaybeRefOrGetter<RequestForQueriesCompat>, createWatch: CreateWatch): ShallowRef<Record<string, any | undefined | Error>>;
|
|
60
62
|
export type { RequestForQueries } from 'convex/react';
|
|
63
|
+
type RequestForQueriesCompat = Record<string, {
|
|
64
|
+
query: FunctionReference<'query'> | FunctionReference_future<'query'>;
|
|
65
|
+
args: Record<string, Value>;
|
|
66
|
+
paginationOptions?: SubscribeToPaginatedQueryOptions;
|
|
67
|
+
}>;
|
|
61
68
|
/** @public */
|
|
62
69
|
export declare const useConvexQueries: typeof useQueries;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { FunctionArgs, FunctionReference } from 'convex/server';
|
|
1
|
+
import type { FunctionArgs, FunctionReference, FunctionReference_future, FunctionReturnType } from 'convex/server';
|
|
2
2
|
import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
3
3
|
import type { UseQueryResult as ConvexUseQueryResult } from 'convex/react';
|
|
4
|
-
export type OptionalRestArgsOrSkip<FuncRef extends FunctionReference<any>> = FuncRef
|
|
4
|
+
export type OptionalRestArgsOrSkip<FuncRef extends FunctionReference<any> | FunctionReference_future<any>> = FunctionArgs<FuncRef> extends Record<string, never> ? [args?: MaybeRefOrGetter<Record<string, never> | 'skip'>] : [args: MaybeRefOrGetter<FunctionArgs<FuncRef> | 'skip'>];
|
|
5
5
|
/**
|
|
6
6
|
* Result returned by object-form {@link useQuery_experimental}.
|
|
7
7
|
*
|
|
@@ -9,7 +9,7 @@ export type OptionalRestArgsOrSkip<FuncRef extends FunctionReference<any>> = Fun
|
|
|
9
9
|
* @experimental May change in a minor release — see STABILITY.md.
|
|
10
10
|
*/
|
|
11
11
|
export type UseQueryResult<QueryResult, ThrowOnError extends boolean = false> = ConvexUseQueryResult<QueryResult, ThrowOnError>;
|
|
12
|
-
type UseQueryOptions<Query extends FunctionReference<'query'>, ThrowOnError extends boolean> = {
|
|
12
|
+
type UseQueryOptions<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>, ThrowOnError extends boolean> = {
|
|
13
13
|
query: Query;
|
|
14
14
|
args: MaybeRefOrGetter<FunctionArgs<Query> | 'skip'>;
|
|
15
15
|
throwOnError?: ThrowOnError;
|
|
@@ -53,7 +53,7 @@ type UseQueryOptions<Query extends FunctionReference<'query'>, ThrowOnError exte
|
|
|
53
53
|
*
|
|
54
54
|
* @public
|
|
55
55
|
*/
|
|
56
|
-
export declare function useQuery<Query extends FunctionReference<'query'>>(query: Query, ...args: OptionalRestArgsOrSkip<Query>): ComputedRef<Query
|
|
56
|
+
export declare function useQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(query: Query, ...args: OptionalRestArgsOrSkip<Query>): ComputedRef<FunctionReturnType<Query> | undefined>;
|
|
57
57
|
/**
|
|
58
58
|
* Load a reactive query within a Vue component using an options object.
|
|
59
59
|
*
|
|
@@ -83,7 +83,7 @@ export declare function useQuery<Query extends FunctionReference<'query'>>(query
|
|
|
83
83
|
* @public
|
|
84
84
|
* @experimental May change in a minor release — see STABILITY.md.
|
|
85
85
|
*/
|
|
86
|
-
export declare function useQuery_experimental<Query extends FunctionReference<'query'>, ThrowOnError extends boolean = false>(options: UseQueryOptions<Query, ThrowOnError>): ComputedRef<UseQueryResult<Query
|
|
86
|
+
export declare function useQuery_experimental<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>, ThrowOnError extends boolean = false>(options: UseQueryOptions<Query, ThrowOnError>): ComputedRef<UseQueryResult<FunctionReturnType<Query>, ThrowOnError>>;
|
|
87
87
|
/** @public */
|
|
88
88
|
export declare const useConvexQuery: typeof useQuery;
|
|
89
89
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FunctionReference } from 'convex/server';
|
|
1
|
+
import type { FunctionReference, FunctionReference_future, FunctionReturnType } from 'convex/server';
|
|
2
2
|
import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
3
3
|
/**
|
|
4
4
|
* The preloaded query payload, which should be passed to a client component
|
|
@@ -6,7 +6,7 @@ import { type ComputedRef, type MaybeRefOrGetter } from 'vue';
|
|
|
6
6
|
*
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export type Preloaded<Query extends FunctionReference<'query'>> = {
|
|
9
|
+
export type Preloaded<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>> = {
|
|
10
10
|
__type: Query;
|
|
11
11
|
_name: string;
|
|
12
12
|
_argsJSON: string;
|
|
@@ -42,4 +42,4 @@ export type Preloaded<Query extends FunctionReference<'query'>> = {
|
|
|
42
42
|
*
|
|
43
43
|
* @public
|
|
44
44
|
*/
|
|
45
|
-
export declare function usePreloadedQuery<Query extends FunctionReference<'query'>>(preloadedQuery: MaybeRefOrGetter<Preloaded<Query>>): ComputedRef<Query
|
|
45
|
+
export declare function usePreloadedQuery<Query extends FunctionReference<'query'> | FunctionReference_future<'query'>>(preloadedQuery: MaybeRefOrGetter<Preloaded<Query>>): ComputedRef<FunctionReturnType<Query>>;
|
|
@@ -85,7 +85,7 @@ export { useConvexMutation } from './composables/use-mutation.js';
|
|
|
85
85
|
export { useConvexAction } from './composables/use-action.js';
|
|
86
86
|
export { type PaginatedWatch, type VueMutationOptions, type ConvexLogger, } from './client.js';
|
|
87
87
|
export type { ConnectionState, OptimisticUpdate, QueryJournal, } from 'convex/browser';
|
|
88
|
-
export type { FunctionReference, FunctionArgs, FunctionReturnType, OptionalRestArgs, ArgsAndOptions, } from 'convex/server';
|
|
88
|
+
export type { FunctionReference, FunctionReference_future, FunctionArgs, FunctionReturnType, OptionalRestArgs, ArgsAndOptions, } from 'convex/server';
|
|
89
89
|
export type { Value } from 'convex/values';
|
|
90
90
|
export { useUpload, useConvexUpload, uploadFile, type VueUpload, type UseUploadOptions, type UploadFileOptions, type GenerateUploadUrl, type StorageId, } from './composables/use-upload.js';
|
|
91
91
|
export { useUploadQueue, useConvexUploadQueue, type VueUploadQueue, type UseUploadQueueOptions, type UploadQueueItem, type UploadItemStatus, type EnqueueInput, } from './composables/use-upload-queue.js';
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { type Value } from 'convex/values';
|
|
2
2
|
import type { PaginatedWatch, Watch } from './client.js';
|
|
3
3
|
import type { QueryJournal } from 'convex/browser';
|
|
4
|
-
import { type FunctionReference } from 'convex/server';
|
|
5
|
-
import type { RequestForQueries } from './composables/use-queries.js';
|
|
4
|
+
import { type FunctionReference, type FunctionReference_future } from 'convex/server';
|
|
6
5
|
type PaginatedQueryResult<T> = NonNullable<ReturnType<PaginatedWatch<T>['localQueryResult']>>;
|
|
7
6
|
export interface SubscribeToPaginatedQueryOptions {
|
|
8
7
|
initialNumItems: number;
|
|
9
8
|
id: number;
|
|
10
9
|
}
|
|
11
10
|
type Identifier = string;
|
|
11
|
+
type RequestForQueriesCompat = Record<Identifier, {
|
|
12
|
+
query: FunctionReference<'query'> | FunctionReference_future<'query'>;
|
|
13
|
+
args: Record<string, Value>;
|
|
14
|
+
paginationOptions?: SubscribeToPaginatedQueryOptions;
|
|
15
|
+
}>;
|
|
12
16
|
export interface CreateWatch {
|
|
13
|
-
(query: FunctionReference<'query'>, args: Record<string, Value>, options: {
|
|
17
|
+
(query: FunctionReference<'query'> | FunctionReference_future<'query'>, args: Record<string, Value>, options: {
|
|
14
18
|
journal?: QueryJournal;
|
|
15
19
|
paginationOptions?: SubscribeToPaginatedQueryOptions;
|
|
16
20
|
}): Watch<Value> | PaginatedWatch<Value>;
|
|
@@ -25,13 +29,9 @@ export declare class QueriesObserver {
|
|
|
25
29
|
private queries;
|
|
26
30
|
private listeners;
|
|
27
31
|
constructor(createWatch: CreateWatch);
|
|
28
|
-
setQueries(newQueries:
|
|
29
|
-
query: FunctionReference<'query'>;
|
|
30
|
-
args: Record<string, Value>;
|
|
31
|
-
paginationOptions?: SubscribeToPaginatedQueryOptions;
|
|
32
|
-
}>): void;
|
|
32
|
+
setQueries(newQueries: RequestForQueriesCompat): void;
|
|
33
33
|
subscribe(listener: () => void): () => void;
|
|
34
|
-
getLocalResults(queries:
|
|
34
|
+
getLocalResults(queries: RequestForQueriesCompat): Record<Identifier, Value | undefined | Error | PaginatedQueryResult<Value>>;
|
|
35
35
|
setCreateWatch(createWatch: CreateWatch): void;
|
|
36
36
|
destroy(): void;
|
|
37
37
|
private addQuery;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "nuxt-convex-module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"description": "Connects a Nuxt app to a Convex backend: live queries, mutations, actions, pagination, file storage and SSR, auto-imported and typed against your deployment. The same Vue client runs without Nuxt; Better Auth, Clerk, Auth0 and Polar are opt-in.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"billing"
|
|
38
38
|
],
|
|
39
39
|
"type": "module",
|
|
40
|
+
"sideEffects": false,
|
|
40
41
|
"exports": {
|
|
41
42
|
"./package.json": "./package.json",
|
|
42
43
|
".": {
|
|
@@ -150,10 +151,9 @@
|
|
|
150
151
|
"node": ">=24.11.0"
|
|
151
152
|
},
|
|
152
153
|
"dependencies": {
|
|
153
|
-
"@nuxt/devtools-kit": "^3.4.2",
|
|
154
154
|
"@nuxt/kit": "^4.5.2",
|
|
155
155
|
"h3": "^1.15.11",
|
|
156
|
-
"
|
|
156
|
+
"std-env": "^4.2.0"
|
|
157
157
|
},
|
|
158
158
|
"peerDependencies": {
|
|
159
159
|
"@auth0/auth0-vue": ">=2.0.0",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"@convex-dev/polar": ">=0.9.0 <0.10.0",
|
|
163
163
|
"@polar-sh/checkout": ">=0.4.0",
|
|
164
164
|
"better-auth": "~1.6.11",
|
|
165
|
-
"convex": "^1.
|
|
165
|
+
"convex": "^1.46.0",
|
|
166
166
|
"nuxt-security": ">=2.6.0",
|
|
167
167
|
"vue": "^3.5.0"
|
|
168
168
|
},
|
|
@@ -191,45 +191,46 @@
|
|
|
191
191
|
},
|
|
192
192
|
"devDependencies": {
|
|
193
193
|
"@arethetypeswrong/cli": "^0.18.5",
|
|
194
|
-
"@auth0/auth0-vue": "^2.
|
|
195
|
-
"@clerk/vue": "2.5.
|
|
196
|
-
"@commitlint/cli": "^21.2.
|
|
197
|
-
"@commitlint/config-conventional": "^21.2.
|
|
194
|
+
"@auth0/auth0-vue": "^2.11.0",
|
|
195
|
+
"@clerk/vue": "2.5.10",
|
|
196
|
+
"@commitlint/cli": "^21.2.3",
|
|
197
|
+
"@commitlint/config-conventional": "^21.2.3",
|
|
198
198
|
"@convex-dev/better-auth": "^0.12.5",
|
|
199
199
|
"@convex-dev/polar": "^0.9.2",
|
|
200
200
|
"@nuxt/devtools": "^3.4.2",
|
|
201
|
+
"@nuxt/devtools-kit": "^3.4.2",
|
|
201
202
|
"@nuxt/eslint": "^1.17.0",
|
|
202
203
|
"@nuxt/eslint-config": "^1.17.0",
|
|
203
204
|
"@nuxt/module-builder": "^1.0.3",
|
|
204
205
|
"@nuxt/schema": "^4.5.2",
|
|
205
206
|
"@nuxt/test-utils": "^4.3.2",
|
|
206
207
|
"@polar-sh/checkout": "^0.4.1",
|
|
207
|
-
"@types/node": "^26.
|
|
208
|
-
"@types/ws": "^8.18.
|
|
209
|
-
"@unhead/vue": "^3.4.
|
|
210
|
-
"@vitest/coverage-v8": "^5.0.
|
|
211
|
-
"@vue/test-utils": "^2.5.
|
|
212
|
-
"better-auth": "~1.6.
|
|
208
|
+
"@types/node": "^26.6.3",
|
|
209
|
+
"@types/ws": "^8.18.2",
|
|
210
|
+
"@unhead/vue": "^3.4.2",
|
|
211
|
+
"@vitest/coverage-v8": "^5.0.3",
|
|
212
|
+
"@vue/test-utils": "^2.5.1",
|
|
213
|
+
"better-auth": "~1.6.33",
|
|
213
214
|
"changelogen": "^0.6.2",
|
|
214
|
-
"convex": "^1.
|
|
215
|
-
"eslint": "^10.
|
|
216
|
-
"fallow": "3.
|
|
215
|
+
"convex": "^1.46.0",
|
|
216
|
+
"eslint": "^10.11.0",
|
|
217
|
+
"fallow": "3.31.0",
|
|
217
218
|
"happy-dom": "^20.14.5",
|
|
218
219
|
"installed-check": "^11.0.0",
|
|
219
220
|
"nuxt": "^4.5.2",
|
|
220
221
|
"nuxt-security": "^2.6.0",
|
|
221
|
-
"pkg-pr-new": "^0.0.
|
|
222
|
+
"pkg-pr-new": "^0.0.90",
|
|
222
223
|
"playwright-core": "^1.63.0",
|
|
223
|
-
"portless": "0.15.
|
|
224
|
+
"portless": "0.15.7",
|
|
224
225
|
"publint": "^0.3.24",
|
|
225
|
-
"taze": "^21.
|
|
226
|
+
"taze": "^21.3.0",
|
|
226
227
|
"typedoc": "^0.28.20",
|
|
227
228
|
"typedoc-plugin-frontmatter": "^1.3.2",
|
|
228
|
-
"typedoc-plugin-markdown": "^4.13.
|
|
229
|
+
"typedoc-plugin-markdown": "^4.13.1",
|
|
229
230
|
"typescript": "~6.0.3",
|
|
230
|
-
"vitest": "^5.0.
|
|
231
|
+
"vitest": "^5.0.3",
|
|
231
232
|
"vue-tsc": "^3.3.11",
|
|
232
|
-
"ws": "^8.
|
|
233
|
+
"ws": "^8.22.0"
|
|
233
234
|
},
|
|
234
235
|
"publishConfig": {
|
|
235
236
|
"access": "public"
|
|
@@ -247,11 +248,11 @@
|
|
|
247
248
|
},
|
|
248
249
|
"scripts": {
|
|
249
250
|
"build": "nuxt-module-build build && pnpm run build:devtools-client",
|
|
250
|
-
"build:devtools-client": "
|
|
251
|
+
"build:devtools-client": "pnpm --filter nuxt-convex-module-devtools-client run generate",
|
|
251
252
|
"dev:prepare:lib": "nuxt-module-build build --stub && nuxt-module-build prepare",
|
|
252
253
|
"dev:prepare": "pnpm run dev:prepare:lib && nuxt prepare website",
|
|
253
254
|
"dev": "pnpm run dev:prepare && pnpm --dir website exec convex dev --start 'portless run --name nuxt-convex-module nuxt dev'",
|
|
254
|
-
"dev:devtools-client": "
|
|
255
|
+
"dev:devtools-client": "pnpm --filter nuxt-convex-module-devtools-client run dev",
|
|
255
256
|
"start": "pnpm run dev",
|
|
256
257
|
"lint": "eslint .",
|
|
257
258
|
"lint:fix": "eslint . --fix",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-convex-module/_nuxt/C6YdTgGl.js"}}</script><link rel="stylesheet" href="/__nuxt-convex-module/_nuxt/entry.HF8C6P11.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/C6YdTgGl.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/DQmVr-EY.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/EZ4-8Xzm.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/vZZlEX5A.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/BmBQNDID.js"><script type="module" src="/__nuxt-convex-module/_nuxt/C6YdTgGl.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__nuxt-convex-module/_nuxt/error-404.CLlwiMp-.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/BhmjAr2Q.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/D_Rij7MD.js"><link rel="prefetch" as="style" crossorigin href="/__nuxt-convex-module/_nuxt/error-500.Bxr6fpDU.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/_Lf3mfPR.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-convex-module",buildId:"1734dcfa-caf6-447b-a68b-4dd3cf138875",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1789568252378,false]</script></body></html>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><script type="importmap">{"imports":{"#entry":"/__nuxt-convex-module/_nuxt/C6YdTgGl.js"}}</script><link rel="stylesheet" href="/__nuxt-convex-module/_nuxt/entry.HF8C6P11.css" crossorigin><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/C6YdTgGl.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/DQmVr-EY.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/EZ4-8Xzm.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/vZZlEX5A.js"><link rel="modulepreload" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/BmBQNDID.js"><script type="module" src="/__nuxt-convex-module/_nuxt/C6YdTgGl.js" crossorigin></script><link rel="prefetch" as="style" crossorigin href="/__nuxt-convex-module/_nuxt/error-404.CLlwiMp-.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/BhmjAr2Q.js"><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/D_Rij7MD.js"><link rel="prefetch" as="style" crossorigin href="/__nuxt-convex-module/_nuxt/error-500.Bxr6fpDU.css"><link rel="prefetch" as="script" crossorigin href="/__nuxt-convex-module/_nuxt/_Lf3mfPR.js"></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{},app:{baseURL:"/__nuxt-convex-module",buildId:"1734dcfa-caf6-447b-a68b-4dd3cf138875",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script><script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1789568252378,false]</script></body></html>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{$ as e,B as t,E as n,F as r,M as i,P as a,V as o,_t as s,c,d as l,f as u,g as d,h as f,ht as p,i as m,l as h,t as g,u as _,v,x as y}from"./EZ4-8Xzm.js";import{a as b,o as x}from"./vZZlEX5A.js";import{n as S,t as C}from"./BmBQNDID.js";import{a as w,i as T,n as E,o as D,r as O,t as k}from"#entry";import{t as A}from"./CKakiU_h.js";var j=v({name:`NButton`,props:{to:String,icon:String,border:{type:Boolean,default:!0},disabled:Boolean,type:{type:String,default:`button`}},setup(e,{attrs:t,slots:n}){return()=>y(e.to?D:`button`,{to:e.to,...t,...!e.to&&{type:e.type},...e.disabled?{disabled:!0}:{tabindex:0},class:[e.border?`n-button-base active:n-button-active focus-visible:n-focus-base hover:n-button-hover`:``,n.default?``:`n-icon-button`,`n-button n-transition n-disabled:n-disabled`].join(` `)},{default:()=>[r(n,`icon`,{},()=>e.icon?[y(S,{icon:e.icon,class:n.default?`n-button-icon`:``})]:[]),r(n,`default`)]})}}),M=O(),N=[`innerHTML`],P=[`textContent`],F={__name:`NCodeBlock`,props:{code:{type:String,required:!0},lang:{type:String,required:!1},lines:{type:Boolean,required:!1,default:!0},inline:{type:Boolean,required:!1},grammarContextCode:{type:String,required:!1},transformRendered:{type:Function,required:!1}},emits:[`loaded`],setup(e,{emit:t}){let r=e,o=t,l=c(()=>{let e=r.lang===`text`?{code:r.code,supported:!1}:M.value?.devtools.renderCodeHighlight(r.code,r.lang,{grammarContextCode:r.grammarContextCode})||{code:r.code,supported:!1};return e.supported&&r.transformRendered&&(e.code=r.transformRendered(e.code)),e.supported&&n(()=>o(`loaded`)),e}),d=c(()=>[`n-code-block shiki`,r.lines&&!r.inline?`n-code-block-lines`:``]);return(t,n)=>e.lang&&l.value.supported?(i(),u(`pre`,{key:0,class:p(d.value)},[h(`code`,{innerHTML:l.value.code},null,8,N)],2)):(i(),u(`pre`,{key:1,class:p(d.value)},[h(`code`,null,[(i(!0),u(m,null,a(e.code.split(`
|
|
2
|
-
`),(e,t)=>(i(),u(m,{key:t},[h(`span`,{class:`line`,textContent:s(e)},null,8,P),n[0]||=h(`br`,null,null,-1)],64))),128))])],2))}},I={flex:`~ gap-3`,"items-center":``},L={__name:`NIconTitle`,props:{icon:{type:String,required:!1},text:{type:String,required:!1}},setup(e){return(t,n)=>(i(),u(`div`,I,[e.icon?(i(),u(`div`,{key:0,class:p(e.icon)},null,2)):l(``,!0),r(t.$slots,`default`,{},()=>[h(`div`,null,s(e.text),1)])]))}},R=[`open`],z={"text-base":``},B={key:0,"text-sm":``,op50:``},V=g({__name:`NSectionBlock`,props:{icon:{type:String,required:!1},text:{type:String,required:!1},description:{type:String,required:!1},containerClass:{type:String,required:!1,default:``},headerClass:{type:String,required:!1},collapse:{type:Boolean,required:!1,default:!0},open:{type:Boolean,required:!1,default:!0},padding:{type:[Boolean,String],required:!1,default:!0}},setup(n){let a=A(n,`open`,void 0,{passive:!0});function c(e){a.value=e.target.open}return(g,v)=>{let y=S,x=L;return i(),u(m,null,[h(`details`,{open:e(a),onToggle:c},[h(`summary`,{class:p([`cursor-pointer select-none p4 hover:bg-active`,n.collapse?``:`pointer-events-none`])},[d(x,{icon:n.icon,text:n.text,"text-xl":``,transition:``,class:p([e(a)?`op100`:`op60`,n.headerClass])},{default:t(()=>[h(`div`,null,[h(`div`,z,[r(g.$slots,`text`,{},()=>[f(s(n.text),1)],!0)]),n.description||g.$slots.description?(i(),u(`div`,B,[r(g.$slots,`description`,{},()=>[f(s(n.description),1)],!0)])):l(``,!0)]),v[0]||=h(`div`,{class:`flex-auto`},null,-1),r(g.$slots,`actions`,{},void 0,!0),n.collapse?(i(),_(y,{key:0,icon:`carbon-chevron-down`,class:`chevron`,"cursor-pointer":``,"place-self-start":``,"text-base":``,op75:``,transition:``,"duration-500":``})):l(``,!0)]),_:3},8,[`icon`,`text`,`class`])],2),v._lazyshow1||e(a)?(v._lazyshow1=!0,i(),u(m,null,[o(h(`div`,{class:p([`flex flex-col flex-gap2 pb6 pt2`,typeof n.padding==`string`?n.padding:n.padding?`px4`:``])},[r(g.$slots,`details`,{},void 0,!0),h(`div`,{class:p([n.containerClass,`mt1`])},[r(g.$slots,`default`,{},void 0,!0)],2),r(g.$slots,`footer`,{},void 0,!0)],2),[[b,e(a)]])],64)):l(`v-show-if`,!0)],40,R),v[1]||=h(`div`,{class:`x-divider`},null,-1)],64)}}},[[`__scopeId`,`data-v-36e420e5`]]),H={class:`font-mono text-xs op65`},U={class:`op50 text-xs whitespace-nowrap`},W={class:`flex flex-col gap-3 px4 pb4`},G={class:`font-mono text-xs bg-active rounded p2 flex flex-col gap-1`},K=Object.assign(v({__name:`QuerySubscription`,props:{query:{}},setup(n){function r(e){return e?new Date(e).toLocaleTimeString():`never`}function o(e){return JSON.stringify(e,null,2)??`undefined`}return(c,p)=>{let g=C,v=j,y=w,b=F,S=V;return i(),_(S,{text:n.query.udfPath,padding:!1,open:!1,icon:`carbon-data-share`},{description:t(()=>[h(`span`,H,s(JSON.stringify(n.query.args)),1)]),actions:t(()=>[n.query.paginated?(i(),_(g,{key:0,n:`blue`},{default:t(()=>[...p[1]||=[f(` paginated `,-1)]]),_:1})):l(``,!0),n.query.errorMessage?(i(),_(g,{key:1,n:`red`},{default:t(()=>[...p[2]||=[f(` error `,-1)]]),_:1})):l(``,!0),h(`span`,U,s(n.query.listenerCount)+` 👂 · `+s(n.query.updates)+` updates · `+s(r(n.query.lastUpdatedAt)),1),d(v,{n:`xs`,icon:`carbon-launch`,title:`Open source file in editor`,onClick:p[0]||=x(t=>(`openFunctionInEditor`in c?c.openFunctionInEditor:e(k))(n.query.udfPath),[`stop`])},{default:t(()=>[...p[3]||=[f(` source `,-1)]]),_:1})]),default:t(()=>[h(`div`,W,[n.query.errorMessage?(i(),_(y,{key:0,n:`red`,icon:`carbon-warning`},{default:t(()=>[f(s(n.query.errorMessage),1)]),_:1})):(i(),u(m,{key:1},[p[4]||=h(`div`,{class:`op50 text-xs`},` Result `,-1),d(b,{code:n.query.result===void 0?`// loading…`:o(n.query.result),lang:`json`,lines:!1,class:`max-h-80 of-auto`},null,8,[`code`])],64)),n.query.logs?.length?(i(),u(m,{key:2},[p[5]||=h(`div`,{class:`op50 text-xs`},` Server logs `,-1),h(`div`,G,[(i(!0),u(m,null,a(n.query.logs,(e,t)=>(i(),u(`div`,{key:t},s(e),1))),128))])],64)):l(``,!0)])]),_:1},8,[`text`])}}}),{__name:`QuerySubscription`}),q={class:`flex flex-col gap-2`},J=v({__name:`queries`,setup(n){let r=E();return(n,o)=>{let s=T,c=K;return i(),u(`div`,q,[e(r).queries.length?l(``,!0):(i(),_(s,{key:0},{default:t(()=>[...o[0]||=[h(`span`,{class:`op50`},`No active query subscriptions.`,-1)]]),_:1})),(i(!0),u(m,null,a(e(r).queries,e=>(i(),_(c,{key:e.token,query:e},null,8,[`query`]))),128))])}}});export{J as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as e,M as t,f as n,t as r}from"./EZ4-8Xzm.js";var i={},a={class:`n-card n-card-base`};function o(r,i){return t(),n(`div`,a,[e(r.$slots,`default`)])}var s=Object.assign(r(i,[[`render`,o]]),{__name:`NCard`});export{s as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,M as t,_t as n,f as r,g as i,h as a,l as o,t as s}from"./EZ4-8Xzm.js";import{t as c}from"./D_Rij7MD.js";import{o as l}from"#entry";var u={class:`antialiased bg-white dark:bg-[#020420] dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-[#020420] tracking-wide`},d={class:`max-w-520px text-center`},f=[`textContent`],p=[`textContent`],m=[`textContent`],h={class:`flex items-center justify-center w-full`},g=s({__name:`error-404`,props:{appName:{type:String,default:`Nuxt`},status:{type:Number,default:404},statusText:{type:String,default:`Page not found`},description:{type:String,default:`Sorry, the page you are looking for could not be found.`},backHome:{type:String,default:`Go back home`}},setup(s){let g=s;return c({title:`${g.status} - ${g.statusText} | ${g.appName}`,script:[{innerHTML:`!function(){let e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(let e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(let t of e)if("childList"===t.type)for(let e of t.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;let r=function(e){let r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),r.credentials="use-credentials"===e.crossOrigin?"include":"anonymous"===e.crossOrigin?"omit":"same-origin",r}(e);fetch(e.href,r)}}();`}],style:[{innerHTML:`*,:after,:before{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:after,:before{--un-content:""}html{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}h1,h2{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}h1,h2,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`}]}),(c,g)=>{let _=l;return t(),r(`div`,u,[o(`div`,d,[o(`h1`,{class:`font-semibold leading-none mb-4 sm:text-[110px] tabular-nums text-[80px]`,textContent:n(s.status)},null,8,f),o(`h2`,{class:`font-semibold mb-2 sm:text-3xl text-2xl`,textContent:n(s.statusText)},null,8,p),o(`p`,{class:`mb-4 px-2 text-[#64748B] text-md`,textContent:n(s.description)},null,8,m),o(`div`,h,[i(_,{to:`/`,class:`font-medium hover:text-[#00DC82] text-sm underline underline-offset-3`},{default:e(()=>[a(n(s.backHome),1)]),_:1})])])])}}},[[`__scopeId`,`data-v-3f48964f`]]);export{g as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as e,M as t,f as n,ht as r,t as i}from"./EZ4-8Xzm.js";var a={__name:`NIcon`,props:{icon:{type:String,required:!1}},setup(e){return(i,a)=>(t(),n(`div`,{class:r([`n-icon`,e.icon])},null,2))}},o={},s={class:`n-badge`};function c(r,i){return t(),n(`span`,s,[e(r.$slots,`default`)])}var l=Object.assign(i(o,[[`render`,c]]),{__name:`NBadge`});export{a as n,l as t};
|