@uthana/react 0.2.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.
Files changed (58) hide show
  1. package/dist/UthanaProvider.d.ts +24 -0
  2. package/dist/UthanaProvider.d.ts.map +1 -0
  3. package/dist/client.d.ts +15 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/hooks/characters.d.ts +36 -0
  6. package/dist/hooks/characters.d.ts.map +1 -0
  7. package/dist/hooks/index.d.ts +11 -0
  8. package/dist/hooks/index.d.ts.map +1 -0
  9. package/dist/hooks/jobs.d.ts +8 -0
  10. package/dist/hooks/jobs.d.ts.map +1 -0
  11. package/dist/hooks/motionDownloads.d.ts +8 -0
  12. package/dist/hooks/motionDownloads.d.ts.map +1 -0
  13. package/dist/hooks/motions.d.ts +14 -0
  14. package/dist/hooks/motions.d.ts.map +1 -0
  15. package/dist/hooks/org.d.ts +8 -0
  16. package/dist/hooks/org.d.ts.map +1 -0
  17. package/dist/hooks/ttm.d.ts +16 -0
  18. package/dist/hooks/ttm.d.ts.map +1 -0
  19. package/dist/hooks/useCharacters.d.ts +36 -0
  20. package/dist/hooks/useCharacters.d.ts.map +1 -0
  21. package/dist/hooks/useJobs.d.ts +8 -0
  22. package/dist/hooks/useJobs.d.ts.map +1 -0
  23. package/dist/hooks/useMotionDownloads.d.ts +8 -0
  24. package/dist/hooks/useMotionDownloads.d.ts.map +1 -0
  25. package/dist/hooks/useMotions.d.ts +14 -0
  26. package/dist/hooks/useMotions.d.ts.map +1 -0
  27. package/dist/hooks/useOrg.d.ts +8 -0
  28. package/dist/hooks/useOrg.d.ts.map +1 -0
  29. package/dist/hooks/useTtm.d.ts +16 -0
  30. package/dist/hooks/useTtm.d.ts.map +1 -0
  31. package/dist/hooks/useVtm.d.ts +11 -0
  32. package/dist/hooks/useVtm.d.ts.map +1 -0
  33. package/dist/hooks/vtm.d.ts +11 -0
  34. package/dist/hooks/vtm.d.ts.map +1 -0
  35. package/dist/index.cjs +431 -0
  36. package/dist/index.cjs.map +1 -0
  37. package/dist/index.d.cts +1825 -0
  38. package/dist/index.d.ts +1825 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +409 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/modules/characters.d.ts +262 -0
  43. package/dist/modules/characters.d.ts.map +1 -0
  44. package/dist/modules/index.d.ts +11 -0
  45. package/dist/modules/index.d.ts.map +1 -0
  46. package/dist/modules/jobs.d.ts +332 -0
  47. package/dist/modules/jobs.d.ts.map +1 -0
  48. package/dist/modules/motionDownloads.d.ts +332 -0
  49. package/dist/modules/motionDownloads.d.ts.map +1 -0
  50. package/dist/modules/motions.d.ts +511 -0
  51. package/dist/modules/motions.d.ts.map +1 -0
  52. package/dist/modules/org.d.ts +332 -0
  53. package/dist/modules/org.d.ts.map +1 -0
  54. package/dist/modules/ttm.d.ts +16 -0
  55. package/dist/modules/ttm.d.ts.map +1 -0
  56. package/dist/modules/vtm.d.ts +11 -0
  57. package/dist/modules/vtm.d.ts.map +1 -0
  58. package/package.json +46 -0
@@ -0,0 +1,332 @@
1
+ /**
2
+ * (c) Copyright 2026 Uthana, Inc. All Rights Reserved
3
+ */
4
+ /** Hook to get current user. */
5
+ export declare function useUthanaUser(): {
6
+ error: Error;
7
+ isError: true;
8
+ isPending: false;
9
+ isLoading: false;
10
+ isLoadingError: false;
11
+ isRefetchError: true;
12
+ isSuccess: false;
13
+ isPlaceholderData: false;
14
+ status: "error";
15
+ dataUpdatedAt: number;
16
+ errorUpdatedAt: number;
17
+ failureCount: number;
18
+ failureReason: Error | null;
19
+ errorUpdateCount: number;
20
+ isFetched: boolean;
21
+ isFetchedAfterMount: boolean;
22
+ isFetching: boolean;
23
+ isInitialLoading: boolean;
24
+ isPaused: boolean;
25
+ isRefetching: boolean;
26
+ isStale: boolean;
27
+ isEnabled: boolean;
28
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").User, Error>>;
29
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
30
+ promise: Promise<import("@uthana/client").User>;
31
+ user: import("@uthana/client").User | undefined;
32
+ } | {
33
+ error: null;
34
+ isError: false;
35
+ isPending: false;
36
+ isLoading: false;
37
+ isLoadingError: false;
38
+ isRefetchError: false;
39
+ isSuccess: true;
40
+ isPlaceholderData: false;
41
+ status: "success";
42
+ dataUpdatedAt: number;
43
+ errorUpdatedAt: number;
44
+ failureCount: number;
45
+ failureReason: Error | null;
46
+ errorUpdateCount: number;
47
+ isFetched: boolean;
48
+ isFetchedAfterMount: boolean;
49
+ isFetching: boolean;
50
+ isInitialLoading: boolean;
51
+ isPaused: boolean;
52
+ isRefetching: boolean;
53
+ isStale: boolean;
54
+ isEnabled: boolean;
55
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").User, Error>>;
56
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
57
+ promise: Promise<import("@uthana/client").User>;
58
+ user: import("@uthana/client").User | undefined;
59
+ } | {
60
+ error: Error;
61
+ isError: true;
62
+ isPending: false;
63
+ isLoading: false;
64
+ isLoadingError: true;
65
+ isRefetchError: false;
66
+ isSuccess: false;
67
+ isPlaceholderData: false;
68
+ status: "error";
69
+ dataUpdatedAt: number;
70
+ errorUpdatedAt: number;
71
+ failureCount: number;
72
+ failureReason: Error | null;
73
+ errorUpdateCount: number;
74
+ isFetched: boolean;
75
+ isFetchedAfterMount: boolean;
76
+ isFetching: boolean;
77
+ isInitialLoading: boolean;
78
+ isPaused: boolean;
79
+ isRefetching: boolean;
80
+ isStale: boolean;
81
+ isEnabled: boolean;
82
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").User, Error>>;
83
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
84
+ promise: Promise<import("@uthana/client").User>;
85
+ user: import("@uthana/client").User | undefined;
86
+ } | {
87
+ error: null;
88
+ isError: false;
89
+ isPending: true;
90
+ isLoading: true;
91
+ isLoadingError: false;
92
+ isRefetchError: false;
93
+ isSuccess: false;
94
+ isPlaceholderData: false;
95
+ status: "pending";
96
+ dataUpdatedAt: number;
97
+ errorUpdatedAt: number;
98
+ failureCount: number;
99
+ failureReason: Error | null;
100
+ errorUpdateCount: number;
101
+ isFetched: boolean;
102
+ isFetchedAfterMount: boolean;
103
+ isFetching: boolean;
104
+ isInitialLoading: boolean;
105
+ isPaused: boolean;
106
+ isRefetching: boolean;
107
+ isStale: boolean;
108
+ isEnabled: boolean;
109
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").User, Error>>;
110
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
111
+ promise: Promise<import("@uthana/client").User>;
112
+ user: import("@uthana/client").User | undefined;
113
+ } | {
114
+ error: null;
115
+ isError: false;
116
+ isPending: true;
117
+ isLoadingError: false;
118
+ isRefetchError: false;
119
+ isSuccess: false;
120
+ isPlaceholderData: false;
121
+ status: "pending";
122
+ dataUpdatedAt: number;
123
+ errorUpdatedAt: number;
124
+ failureCount: number;
125
+ failureReason: Error | null;
126
+ errorUpdateCount: number;
127
+ isFetched: boolean;
128
+ isFetchedAfterMount: boolean;
129
+ isFetching: boolean;
130
+ isLoading: boolean;
131
+ isInitialLoading: boolean;
132
+ isPaused: boolean;
133
+ isRefetching: boolean;
134
+ isStale: boolean;
135
+ isEnabled: boolean;
136
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").User, Error>>;
137
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
138
+ promise: Promise<import("@uthana/client").User>;
139
+ user: import("@uthana/client").User | undefined;
140
+ } | {
141
+ isError: false;
142
+ error: null;
143
+ isPending: false;
144
+ isLoading: false;
145
+ isLoadingError: false;
146
+ isRefetchError: false;
147
+ isSuccess: true;
148
+ isPlaceholderData: true;
149
+ status: "success";
150
+ dataUpdatedAt: number;
151
+ errorUpdatedAt: number;
152
+ failureCount: number;
153
+ failureReason: Error | null;
154
+ errorUpdateCount: number;
155
+ isFetched: boolean;
156
+ isFetchedAfterMount: boolean;
157
+ isFetching: boolean;
158
+ isInitialLoading: boolean;
159
+ isPaused: boolean;
160
+ isRefetching: boolean;
161
+ isStale: boolean;
162
+ isEnabled: boolean;
163
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").User, Error>>;
164
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
165
+ promise: Promise<import("@uthana/client").User>;
166
+ user: import("@uthana/client").User | undefined;
167
+ };
168
+ /** Hook to get current org. */
169
+ export declare function useUthanaOrg(): {
170
+ error: Error;
171
+ isError: true;
172
+ isPending: false;
173
+ isLoading: false;
174
+ isLoadingError: false;
175
+ isRefetchError: true;
176
+ isSuccess: false;
177
+ isPlaceholderData: false;
178
+ status: "error";
179
+ dataUpdatedAt: number;
180
+ errorUpdatedAt: number;
181
+ failureCount: number;
182
+ failureReason: Error | null;
183
+ errorUpdateCount: number;
184
+ isFetched: boolean;
185
+ isFetchedAfterMount: boolean;
186
+ isFetching: boolean;
187
+ isInitialLoading: boolean;
188
+ isPaused: boolean;
189
+ isRefetching: boolean;
190
+ isStale: boolean;
191
+ isEnabled: boolean;
192
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").Org, Error>>;
193
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
194
+ promise: Promise<import("@uthana/client").Org>;
195
+ org: import("@uthana/client").Org | undefined;
196
+ } | {
197
+ error: null;
198
+ isError: false;
199
+ isPending: false;
200
+ isLoading: false;
201
+ isLoadingError: false;
202
+ isRefetchError: false;
203
+ isSuccess: true;
204
+ isPlaceholderData: false;
205
+ status: "success";
206
+ dataUpdatedAt: number;
207
+ errorUpdatedAt: number;
208
+ failureCount: number;
209
+ failureReason: Error | null;
210
+ errorUpdateCount: number;
211
+ isFetched: boolean;
212
+ isFetchedAfterMount: boolean;
213
+ isFetching: boolean;
214
+ isInitialLoading: boolean;
215
+ isPaused: boolean;
216
+ isRefetching: boolean;
217
+ isStale: boolean;
218
+ isEnabled: boolean;
219
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").Org, Error>>;
220
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
221
+ promise: Promise<import("@uthana/client").Org>;
222
+ org: import("@uthana/client").Org | undefined;
223
+ } | {
224
+ error: Error;
225
+ isError: true;
226
+ isPending: false;
227
+ isLoading: false;
228
+ isLoadingError: true;
229
+ isRefetchError: false;
230
+ isSuccess: false;
231
+ isPlaceholderData: false;
232
+ status: "error";
233
+ dataUpdatedAt: number;
234
+ errorUpdatedAt: number;
235
+ failureCount: number;
236
+ failureReason: Error | null;
237
+ errorUpdateCount: number;
238
+ isFetched: boolean;
239
+ isFetchedAfterMount: boolean;
240
+ isFetching: boolean;
241
+ isInitialLoading: boolean;
242
+ isPaused: boolean;
243
+ isRefetching: boolean;
244
+ isStale: boolean;
245
+ isEnabled: boolean;
246
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").Org, Error>>;
247
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
248
+ promise: Promise<import("@uthana/client").Org>;
249
+ org: import("@uthana/client").Org | undefined;
250
+ } | {
251
+ error: null;
252
+ isError: false;
253
+ isPending: true;
254
+ isLoading: true;
255
+ isLoadingError: false;
256
+ isRefetchError: false;
257
+ isSuccess: false;
258
+ isPlaceholderData: false;
259
+ status: "pending";
260
+ dataUpdatedAt: number;
261
+ errorUpdatedAt: number;
262
+ failureCount: number;
263
+ failureReason: Error | null;
264
+ errorUpdateCount: number;
265
+ isFetched: boolean;
266
+ isFetchedAfterMount: boolean;
267
+ isFetching: boolean;
268
+ isInitialLoading: boolean;
269
+ isPaused: boolean;
270
+ isRefetching: boolean;
271
+ isStale: boolean;
272
+ isEnabled: boolean;
273
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").Org, Error>>;
274
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
275
+ promise: Promise<import("@uthana/client").Org>;
276
+ org: import("@uthana/client").Org | undefined;
277
+ } | {
278
+ error: null;
279
+ isError: false;
280
+ isPending: true;
281
+ isLoadingError: false;
282
+ isRefetchError: false;
283
+ isSuccess: false;
284
+ isPlaceholderData: false;
285
+ status: "pending";
286
+ dataUpdatedAt: number;
287
+ errorUpdatedAt: number;
288
+ failureCount: number;
289
+ failureReason: Error | null;
290
+ errorUpdateCount: number;
291
+ isFetched: boolean;
292
+ isFetchedAfterMount: boolean;
293
+ isFetching: boolean;
294
+ isLoading: boolean;
295
+ isInitialLoading: boolean;
296
+ isPaused: boolean;
297
+ isRefetching: boolean;
298
+ isStale: boolean;
299
+ isEnabled: boolean;
300
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").Org, Error>>;
301
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
302
+ promise: Promise<import("@uthana/client").Org>;
303
+ org: import("@uthana/client").Org | undefined;
304
+ } | {
305
+ isError: false;
306
+ error: null;
307
+ isPending: false;
308
+ isLoading: false;
309
+ isLoadingError: false;
310
+ isRefetchError: false;
311
+ isSuccess: true;
312
+ isPlaceholderData: true;
313
+ status: "success";
314
+ dataUpdatedAt: number;
315
+ errorUpdatedAt: number;
316
+ failureCount: number;
317
+ failureReason: Error | null;
318
+ errorUpdateCount: number;
319
+ isFetched: boolean;
320
+ isFetchedAfterMount: boolean;
321
+ isFetching: boolean;
322
+ isInitialLoading: boolean;
323
+ isPaused: boolean;
324
+ isRefetching: boolean;
325
+ isStale: boolean;
326
+ isEnabled: boolean;
327
+ refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@uthana/client").Org, Error>>;
328
+ fetchStatus: import("@tanstack/query-core").FetchStatus;
329
+ promise: Promise<import("@uthana/client").Org>;
330
+ org: import("@uthana/client").Org | undefined;
331
+ };
332
+ //# sourceMappingURL=org.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org.d.ts","sourceRoot":"","sources":["../../src/modules/org.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,gCAAgC;AAChC,wBAAgB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO5B;AAED,+BAA+B;AAC/B,wBAAgB,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAO3B"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * (c) Copyright 2026 Uthana, Inc. All Rights Reserved
3
+ */
4
+ import type { TtmModelType } from "@uthana/client";
5
+ /** Hook for text-to-motion mutations. */
6
+ export declare function useUthanaTtm(): import("@tanstack/react-query").UseMutationResult<import("@uthana/client").TextToMotionResult, Error, {
7
+ prompt: string;
8
+ model?: TtmModelType | null;
9
+ character_id?: string | null;
10
+ foot_ik?: boolean | null;
11
+ length?: number | null;
12
+ cfg_scale?: number | null;
13
+ seed?: number | null;
14
+ internal_ik?: boolean | null;
15
+ }, unknown>;
16
+ //# sourceMappingURL=ttm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ttm.d.ts","sourceRoot":"","sources":["../../src/modules/ttm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,yCAAyC;AACzC,wBAAgB,YAAY;YAId,MAAM;YACN,YAAY,GAAG,IAAI;mBACZ,MAAM,GAAG,IAAI;cAClB,OAAO,GAAG,IAAI;aACf,MAAM,GAAG,IAAI;gBACV,MAAM,GAAG,IAAI;WAClB,MAAM,GAAG,IAAI;kBACN,OAAO,GAAG,IAAI;YAGjC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * (c) Copyright 2026 Uthana, Inc. All Rights Reserved
3
+ */
4
+ import type { VtmModelType } from "@uthana/client";
5
+ /** Hook for video-to-motion mutations. */
6
+ export declare function useUthanaVtm(): import("@tanstack/react-query").UseMutationResult<import("@uthana/client").Job, Error, {
7
+ file: File | Blob | string;
8
+ motion_name?: string | null;
9
+ model?: VtmModelType | null;
10
+ }, unknown>;
11
+ //# sourceMappingURL=vtm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vtm.d.ts","sourceRoot":"","sources":["../../src/modules/vtm.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGnD,0CAA0C;AAC1C,wBAAgB,YAAY;UAIhB,IAAI,GAAG,IAAI,GAAG,MAAM;kBACZ,MAAM,GAAG,IAAI;YACnB,YAAY,GAAG,IAAI;YAGhC"}
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@uthana/react",
3
+ "version": "0.2.0",
4
+ "description": "React and react-query hooks for the Uthana API",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs",
13
+ "types": "./dist/index.d.ts"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "scripts": {
20
+ "build": "rollup -c rollup.config.mjs",
21
+ "dev": "rollup -c rollup.config.mjs --watch",
22
+ "test": "vitest run --root ../.. tests/test_hooks"
23
+ },
24
+ "dependencies": {
25
+ "@uthana/client": "^0.2.0",
26
+ "@tanstack/react-query": "^5.62.0",
27
+ "graffle": "next",
28
+ "graphql": "^16.9.0",
29
+ "react": "^18.3.1"
30
+ },
31
+ "devDependencies": {
32
+ "@types/react": "^18.3.12",
33
+ "typescript": "^5.7.2"
34
+ },
35
+ "peerDependencies": {
36
+ "react": ">=18"
37
+ },
38
+ "keywords": [
39
+ "uthana",
40
+ "react",
41
+ "react-query",
42
+ "graphql",
43
+ "motion"
44
+ ],
45
+ "license": "Apache-2.0"
46
+ }