@lunora/react 1.0.0-alpha.18 → 1.0.0-alpha.19
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/index.mjs +14 -14
- package/dist/packem_shared/{AuthLoading-DtKgZT2Z.mjs → AuthLoading-DezUWNB2.mjs} +1 -1
- package/dist/packem_shared/{LunoraProvider-D38Xp16l.mjs → LunoraProvider-BsuiW4Lk.mjs} +3 -2
- package/dist/packem_shared/{hydratePreloaded-cgaz74Yz.mjs → hydratePreloaded-Dsf9YuII.mjs} +1 -1
- package/dist/packem_shared/{use-paginated-core-DTh_UVIg.mjs → use-paginated-core-CWSzk1J1.mjs} +1 -1
- package/dist/packem_shared/{useAuth-CNUKtOOp.mjs → useAuth-BSutjJaa.mjs} +1 -1
- package/dist/packem_shared/{useAuthState-BiGhtSCs.mjs → useAuthState-CyF35qZR.mjs} +1 -1
- package/dist/packem_shared/{useConnectionStatus-DRSY9ldm.mjs → useConnectionStatus-PJ7vyCHy.mjs} +1 -1
- package/dist/packem_shared/{useFlag-B5NFNmRD.mjs → useFlag-hhoN_xYA.mjs} +1 -1
- package/dist/packem_shared/{useInfiniteQuery-DTYi5Rvm.mjs → useInfiniteQuery-Dy42_srs.mjs} +1 -1
- package/dist/packem_shared/{useMutation-CrvMXRsk.mjs → useMutation-BeqeIjTr.mjs} +1 -1
- package/dist/packem_shared/{usePaginatedQuery-CQeffZuZ.mjs → usePaginatedQuery-Tx-B3mAP.mjs} +1 -1
- package/dist/packem_shared/{usePresence-D7jLuxj0.mjs → usePresence-DC8VIyLB.mjs} +1 -1
- package/dist/packem_shared/{useQuery-gLcqxzly.mjs → useQuery-_fTR6DCQ.mjs} +1 -1
- package/dist/packem_shared/{useStream-BqZeZE3w.mjs → useStream-DFuryaIC.mjs} +1 -1
- package/dist/packem_shared/{useSubscription-i78qwMed.mjs → useSubscription-D38Jdyr8.mjs} +1 -1
- package/package.json +4 -3
package/dist/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { AuthLoading, Authenticated, Unauthenticated } from './packem_shared/AuthLoading-
|
|
3
|
-
export { useAuthState } from './packem_shared/useAuthState-
|
|
4
|
-
export { LunoraProvider, useLunora } from './packem_shared/LunoraProvider-
|
|
2
|
+
export { AuthLoading, Authenticated, Unauthenticated } from './packem_shared/AuthLoading-DezUWNB2.mjs';
|
|
3
|
+
export { useAuthState } from './packem_shared/useAuthState-CyF35qZR.mjs';
|
|
4
|
+
export { LunoraProvider, useLunora } from './packem_shared/LunoraProvider-BsuiW4Lk.mjs';
|
|
5
5
|
export { CheckoutButton, CustomerPortalButton, useCheckout } from './packem_shared/CheckoutButton-DUite8jJ.mjs';
|
|
6
6
|
export { lunoraQueryOptions } from './packem_shared/lunoraQueryOptions-C3uwOTMW.mjs';
|
|
7
|
-
export { default as useAuth } from './packem_shared/useAuth-
|
|
8
|
-
export { default as useConnectionStatus } from './packem_shared/useConnectionStatus-
|
|
9
|
-
export { useFlag, useFlags } from './packem_shared/useFlag-
|
|
10
|
-
export { default as useInfiniteQuery } from './packem_shared/useInfiniteQuery-
|
|
11
|
-
export { useMutation } from './packem_shared/useMutation-
|
|
7
|
+
export { default as useAuth } from './packem_shared/useAuth-BSutjJaa.mjs';
|
|
8
|
+
export { default as useConnectionStatus } from './packem_shared/useConnectionStatus-PJ7vyCHy.mjs';
|
|
9
|
+
export { useFlag, useFlags } from './packem_shared/useFlag-hhoN_xYA.mjs';
|
|
10
|
+
export { default as useInfiniteQuery } from './packem_shared/useInfiniteQuery-Dy42_srs.mjs';
|
|
11
|
+
export { useMutation } from './packem_shared/useMutation-BeqeIjTr.mjs';
|
|
12
12
|
export { useMutator } from './packem_shared/useMutator-IIrLtDiM.mjs';
|
|
13
|
-
export { usePaginatedQuery } from './packem_shared/usePaginatedQuery-
|
|
14
|
-
export { hydratePreloaded, default as usePreloadedQuery } from './packem_shared/hydratePreloaded-
|
|
15
|
-
export { usePresence } from './packem_shared/usePresence-
|
|
16
|
-
export { default as useQuery } from './packem_shared/useQuery-
|
|
13
|
+
export { usePaginatedQuery } from './packem_shared/usePaginatedQuery-Tx-B3mAP.mjs';
|
|
14
|
+
export { hydratePreloaded, default as usePreloadedQuery } from './packem_shared/hydratePreloaded-Dsf9YuII.mjs';
|
|
15
|
+
export { usePresence } from './packem_shared/usePresence-DC8VIyLB.mjs';
|
|
16
|
+
export { default as useQuery } from './packem_shared/useQuery-_fTR6DCQ.mjs';
|
|
17
17
|
export { useRateLimit } from './packem_shared/useRateLimit-DTEffQEi.mjs';
|
|
18
|
-
export { useStream } from './packem_shared/useStream-
|
|
19
|
-
export { default as useSubscription } from './packem_shared/useSubscription-
|
|
18
|
+
export { useStream } from './packem_shared/useStream-DFuryaIC.mjs';
|
|
19
|
+
export { default as useSubscription } from './packem_shared/useSubscription-D38Jdyr8.mjs';
|
|
20
20
|
export { getErrorCode, getRetryAfterMs, isConflictError, isForbiddenError, isRateLimitedError, isUnauthorizedError } from '@lunora/client';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
|
+
import { LunoraError } from '@lunora/errors';
|
|
3
4
|
import { QueryClientContext, QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
4
5
|
import { use, useState, createContext } from 'react';
|
|
5
6
|
import { jsxDEV } from 'react/jsx-dev-runtime';
|
|
@@ -37,7 +38,7 @@ const LunoraProvider = (t0) => {
|
|
|
37
38
|
const [internalClient] = useState(t1);
|
|
38
39
|
const effectiveClient = queryClient ?? parentQueryClient ?? internalClient;
|
|
39
40
|
if (!effectiveClient) {
|
|
40
|
-
throw new
|
|
41
|
+
throw new LunoraError("INTERNAL", "LunoraProvider: failed to resolve a QueryClient");
|
|
41
42
|
}
|
|
42
43
|
let t2;
|
|
43
44
|
if ($[3] !== children || $[4] !== client) {
|
|
@@ -72,7 +73,7 @@ const LunoraProvider = (t0) => {
|
|
|
72
73
|
const useLunora = () => {
|
|
73
74
|
const client = use(LunoraContext);
|
|
74
75
|
if (!client) {
|
|
75
|
-
throw new
|
|
76
|
+
throw new LunoraError("INTERNAL", "useLunora must be used inside <LunoraProvider />");
|
|
76
77
|
}
|
|
77
78
|
return client;
|
|
78
79
|
};
|
|
@@ -3,7 +3,7 @@ import { c } from 'react/compiler-runtime';
|
|
|
3
3
|
import { useQueryClient, useQuery } from '@tanstack/react-query';
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
import { g as getSubscriptionRegistry } from './cache-BFlsXmup.mjs';
|
|
6
|
-
import { useLunora } from './LunoraProvider-
|
|
6
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
7
7
|
import { s as serializeQueryKey, l as lunoraQueryKey } from './query-key-BmCbgidV.mjs';
|
|
8
8
|
|
|
9
9
|
const usePreloadedQuery = function(preloaded) {
|
package/dist/packem_shared/{use-paginated-core-DTh_UVIg.mjs → use-paginated-core-CWSzk1J1.mjs}
RENAMED
|
@@ -3,7 +3,7 @@ import { initialPages, rebalance, derivePaginationStatus, applyLoadMore } from '
|
|
|
3
3
|
import { useQueryClient } from '@tanstack/react-query';
|
|
4
4
|
import { useRef, useReducer, useState, useEffect, useCallback } from 'react';
|
|
5
5
|
import { g as getSubscriptionRegistry } from './cache-BFlsXmup.mjs';
|
|
6
|
-
import { useLunora } from './LunoraProvider-
|
|
6
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
7
7
|
import { s as serializeQueryKey, l as lunoraQueryKey } from './query-key-BmCbgidV.mjs';
|
|
8
8
|
|
|
9
9
|
const useLazyRef = function(create) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
3
|
import { useSyncExternalStore } from 'react';
|
|
4
|
-
import { useLunora } from './LunoraProvider-
|
|
4
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
5
5
|
|
|
6
6
|
const stores = /* @__PURE__ */ new WeakMap();
|
|
7
7
|
const createStore = (client) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
3
|
import { useSyncExternalStore } from 'react';
|
|
4
|
-
import useAuth from './useAuth-
|
|
4
|
+
import useAuth from './useAuth-BSutjJaa.mjs';
|
|
5
5
|
|
|
6
6
|
const subscribe = () => () => void 0;
|
|
7
7
|
const useAuthState = () => {
|
package/dist/packem_shared/{useConnectionStatus-DRSY9ldm.mjs → useConnectionStatus-PJ7vyCHy.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
3
|
import { useSyncExternalStore } from 'react';
|
|
4
|
-
import { useLunora } from './LunoraProvider-
|
|
4
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
5
5
|
|
|
6
6
|
const useConnectionStatus = () => {
|
|
7
7
|
const $ = c(4);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
3
|
import { useState, useRef, useEffect } from 'react';
|
|
4
|
-
import { useLunora } from './LunoraProvider-
|
|
4
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
5
5
|
import { s as stableStringify } from './stable-key-CGp4e2Ux.mjs';
|
|
6
6
|
|
|
7
7
|
const FLAGS_EVAL_PATH = "__lunora_flags__:eval";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
3
|
import { useRef, useEffect } from 'react';
|
|
4
|
-
import { u as usePaginatedCore } from './use-paginated-core-
|
|
4
|
+
import { u as usePaginatedCore } from './use-paginated-core-CWSzk1J1.mjs';
|
|
5
5
|
|
|
6
6
|
const useInfiniteQuery = (function_, args, options) => {
|
|
7
7
|
const $ = c(15);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMutation as useMutation$1 } from '@tanstack/react-query';
|
|
3
3
|
import { useRef, useState, useCallback } from 'react';
|
|
4
|
-
import { useLunora } from './LunoraProvider-
|
|
4
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
5
5
|
|
|
6
6
|
const useMutation = (function_) => {
|
|
7
7
|
const client = useLunora();
|
package/dist/packem_shared/{usePaginatedQuery-CQeffZuZ.mjs → usePaginatedQuery-Tx-B3mAP.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
|
-
import { u as usePaginatedCore } from './use-paginated-core-
|
|
3
|
+
import { u as usePaginatedCore } from './use-paginated-core-CWSzk1J1.mjs';
|
|
4
4
|
|
|
5
5
|
const usePaginatedQuery = (function_, args, options) => {
|
|
6
6
|
const $ = c(7);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useMemo, useState, useRef, useEffect, useCallback } from 'react';
|
|
3
|
-
import { useLunora } from './LunoraProvider-
|
|
3
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
4
4
|
|
|
5
5
|
const makeSessionId = () => {
|
|
6
6
|
if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
|
|
@@ -3,7 +3,7 @@ import { c } from 'react/compiler-runtime';
|
|
|
3
3
|
import { useQueryClient, useQuery as useQuery$1 } from '@tanstack/react-query';
|
|
4
4
|
import { useEffect } from 'react';
|
|
5
5
|
import { g as getSubscriptionRegistry } from './cache-BFlsXmup.mjs';
|
|
6
|
-
import { useLunora } from './LunoraProvider-
|
|
6
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
7
7
|
import { s as serializeQueryKey, l as lunoraQueryKey } from './query-key-BmCbgidV.mjs';
|
|
8
8
|
|
|
9
9
|
const useQuery = (function_, args, t0) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { useReducer, useRef, useEffect } from 'react';
|
|
3
|
-
import { useLunora } from './LunoraProvider-
|
|
3
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
4
4
|
import { s as stableStringify } from './stable-key-CGp4e2Ux.mjs';
|
|
5
5
|
|
|
6
6
|
const reducer = function(state, action) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { c } from 'react/compiler-runtime';
|
|
3
3
|
import { createQuerySubscription } from '@lunora/client/query';
|
|
4
4
|
import { useState, useRef, useEffect } from 'react';
|
|
5
|
-
import { useLunora } from './LunoraProvider-
|
|
5
|
+
import { useLunora } from './LunoraProvider-BsuiW4Lk.mjs';
|
|
6
6
|
import { s as stableStringify } from './stable-key-CGp4e2Ux.mjs';
|
|
7
7
|
|
|
8
8
|
const useSubscription = (function_, args, t0) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/react",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.19",
|
|
4
4
|
"description": "React hooks for Lunora: useQuery, useMutation, useSubscription, and useAuth",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -49,8 +49,9 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@lunora/client": "1.0.0-alpha.
|
|
53
|
-
"@lunora/
|
|
52
|
+
"@lunora/client": "1.0.0-alpha.17",
|
|
53
|
+
"@lunora/errors": "1.0.0-alpha.1",
|
|
54
|
+
"@lunora/ratelimit": "1.0.0-alpha.4"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
57
|
"@tanstack/react-query": "^5.101.0",
|