@lunora/react 1.0.0-alpha.1 → 1.0.0-alpha.10
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 +2 -0
- package/__assets__/package-og.svg +1 -1
- package/dist/index.d.mts +60 -3
- package/dist/index.d.ts +60 -3
- package/dist/index.mjs +10 -8
- package/dist/packem_shared/{cache-CItk3fgN.mjs → cache-CAp1fVNL.mjs} +1 -1
- package/dist/packem_shared/{hydratePreloaded-BlFL9FGq.mjs → hydratePreloaded-B6OHn0eL.mjs} +2 -2
- package/dist/packem_shared/{lunoraQueryOptions-CsuWzjg1.mjs → lunoraQueryOptions-Cij4KWBK.mjs} +1 -1
- package/dist/packem_shared/query-key-B5eRQCbR.mjs +13 -0
- package/dist/packem_shared/stable-key-CaKZv9lp.mjs +30 -0
- package/dist/packem_shared/{use-paginated-core-CoOfcc-p.mjs → use-paginated-core-DP72UNWn.mjs} +25 -10
- package/dist/packem_shared/useFlag-Bg5DpkGv.mjs +224 -0
- package/dist/packem_shared/{useInfiniteQuery-MH0x4l8h.mjs → useInfiniteQuery-BBIDFXBN.mjs} +1 -1
- package/dist/packem_shared/useMutator-IIrLtDiM.mjs +47 -0
- package/dist/packem_shared/{usePaginatedQuery-D3PTDRGS.mjs → usePaginatedQuery-AQO3kdp1.mjs} +1 -1
- package/dist/packem_shared/{useQuery-C5S0W-7K.mjs → useQuery-EB74gtBJ.mjs} +3 -2
- package/dist/packem_shared/{useStream-BRY9nemd.mjs → useStream-MdYnWDL_.mjs} +1 -1
- package/dist/packem_shared/{useSubscription-CHMCjyQg.mjs → useSubscription-DSJuryrU.mjs} +1 -1
- package/dist/server.mjs +2 -2
- package/package.json +4 -4
- package/dist/packem_shared/query-key-C5rufkEE.mjs +0 -21
- /package/dist/packem_shared/{Authenticated-DtKgZT2Z.mjs → AuthLoading-DtKgZT2Z.mjs} +0 -0
package/dist/server.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createServerClient } from '@lunora/client/ssr';
|
|
2
2
|
export { createServerClient, deserializePreloaded, getServerSession, serializePreloaded } from '@lunora/client/ssr';
|
|
3
|
-
import { l as lunoraQueryKey } from './packem_shared/query-key-
|
|
4
|
-
export { lunoraQueryOptions } from './packem_shared/lunoraQueryOptions-
|
|
3
|
+
import { l as lunoraQueryKey } from './packem_shared/query-key-B5eRQCbR.mjs';
|
|
4
|
+
export { lunoraQueryOptions } from './packem_shared/lunoraQueryOptions-Cij4KWBK.mjs';
|
|
5
5
|
export { preloadQuery, preloadedQueryResult } from '@lunora/client';
|
|
6
6
|
export { HydrationBoundary, dehydrate } from '@tanstack/react-query';
|
|
7
7
|
|
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.10",
|
|
4
4
|
"description": "React hooks for Lunora: useQuery, useMutation, useSubscription, and useAuth",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"directory": "packages/react"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
-
"dist",
|
|
28
|
+
"./dist",
|
|
29
29
|
"README.md",
|
|
30
30
|
"LICENSE.md",
|
|
31
31
|
"__assets__"
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@lunora/client": "1.0.0-alpha.
|
|
53
|
-
"@lunora/ratelimit": "1.0.0-alpha.
|
|
52
|
+
"@lunora/client": "1.0.0-alpha.8",
|
|
53
|
+
"@lunora/ratelimit": "1.0.0-alpha.3"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"@tanstack/react-query": "^5.101.0",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const keyHash = (queryKey) => JSON.stringify(queryKey);
|
|
2
|
-
const stableStringify = (value) => {
|
|
3
|
-
if (value === null || typeof value !== "object") {
|
|
4
|
-
return JSON.stringify(value);
|
|
5
|
-
}
|
|
6
|
-
if (Array.isArray(value)) {
|
|
7
|
-
return `[${value.map((entry) => stableStringify(entry)).join(",")}]`;
|
|
8
|
-
}
|
|
9
|
-
const entries = Object.entries(value).toSorted(([a], [b]) => a.localeCompare(b));
|
|
10
|
-
return `{${entries.map(([key, value_]) => `${JSON.stringify(key)}:${stableStringify(value_)}`).join(",")}}`;
|
|
11
|
-
};
|
|
12
|
-
const lunoraQueryKey = (function_, args, shardKey) => [
|
|
13
|
-
"lunora",
|
|
14
|
-
function_.__lunoraRef,
|
|
15
|
-
args,
|
|
16
|
-
// eslint-disable-next-line unicorn/no-null -- this literal is part of the JSON-serialized query key TanStack hashes for dedup; `null` keeps a stable, distinct slot from an absent shardKey across renders.
|
|
17
|
-
shardKey ?? null
|
|
18
|
-
];
|
|
19
|
-
const serializeQueryKey = (queryKey) => keyHash(queryKey);
|
|
20
|
-
|
|
21
|
-
export { stableStringify as a, keyHash as k, lunoraQueryKey as l, serializeQueryKey as s };
|
|
File without changes
|