@anvil-js/client 0.0.1
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/LICENSE +99 -0
- package/README.md +31 -0
- package/dist/chunk-DV6XOONA.js +41 -0
- package/dist/chunk-DV6XOONA.js.map +1 -0
- package/dist/chunk-WIGN6UED.js +728 -0
- package/dist/chunk-WIGN6UED.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/provider-2AIXk8yy.d.ts +15601 -0
- package/dist/react/index.d.ts +25 -0
- package/dist/react/index.js +16 -0
- package/dist/react/index.js.map +1 -0
- package/dist/schemas/index.d.ts +2584 -0
- package/dist/schemas/index.js +3 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/server.d.ts +3869 -0
- package/dist/server.js +492 -0
- package/dist/server.js.map +1 -0
- package/dist/ws/index.d.ts +298 -0
- package/dist/ws/index.js +608 -0
- package/dist/ws/index.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export { a as AnvilClientProvider, b as AnvilClientProviderProps, t as trpc, u as useAnvilClient } from '../provider-2AIXk8yy.js';
|
|
2
|
+
import '@tanstack/react-query';
|
|
3
|
+
import '@trpc/client';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '@trpc/server/unstable-core-do-not-import';
|
|
6
|
+
import '@trpc/react-query';
|
|
7
|
+
import '@trpc/server';
|
|
8
|
+
|
|
9
|
+
interface CurrentSession {
|
|
10
|
+
valid: boolean;
|
|
11
|
+
user?: {
|
|
12
|
+
uuid: string;
|
|
13
|
+
username: string;
|
|
14
|
+
displayName: string;
|
|
15
|
+
avatarUrl: string | null;
|
|
16
|
+
};
|
|
17
|
+
expiresAt?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const useCurrentSessionQuery: () => {
|
|
20
|
+
data: CurrentSession | undefined;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error: null;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { type CurrentSession, useCurrentSessionQuery as useCurrentSession };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { AnvilClientProvider, trpc, useAnvilClient } from '../chunk-DV6XOONA.js';
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
|
|
4
|
+
var useCurrentSessionQuery = () => {
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
}, []);
|
|
7
|
+
return {
|
|
8
|
+
data: void 0,
|
|
9
|
+
isLoading: false,
|
|
10
|
+
error: null
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { useCurrentSessionQuery as useCurrentSession };
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/react/hooks/useCurrentSession.ts"],"names":[],"mappings":";;;AASO,IAAM,yBAAyB,MAAM;AAE1C,EAAA,SAAA,CAAU,MAAM;AAAA,EAEhB,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,MAAA;AAAA,IACN,SAAA,EAAW,KAAA;AAAA,IACX,KAAA,EAAO;AAAA,GACT;AACF","file":"index.js","sourcesContent":["import { trpc } from '../provider';\nimport { useEffect } from 'react';\n\nexport interface CurrentSession {\n valid: boolean;\n user?: { uuid: string; username: string; displayName: string; avatarUrl: string | null };\n expiresAt?: string;\n}\n\nexport const useCurrentSessionQuery = () => {\n // Real procedure doesn't exist yet (Phase 5). Return a stable shape for now.\n useEffect(() => {\n /* no-op */\n }, []);\n\n return {\n data: undefined as CurrentSession | undefined,\n isLoading: false,\n error: null,\n };\n};\n\n// Re-export the trpc client for use in custom hooks\nexport { trpc };\n"]}
|