@superinterface/react 2.9.1 → 2.9.3
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.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -43
- package/dist/index.d.ts +43 -43
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +7 -6
package/dist/index.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { MessagesPage, SerializedMessage } from './types/index.cjs';
|
|
|
3
3
|
import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { Dispatch, SetStateAction } from 'react';
|
|
6
|
-
import * as
|
|
6
|
+
import * as _tanstack_query_core_build_legacy_queryClient_K0zFyarY from '@tanstack/query-core/build/legacy/queryClient-K0zFyarY';
|
|
7
7
|
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
8
8
|
import OpenAI from 'openai';
|
|
9
9
|
|
|
@@ -97,8 +97,8 @@ declare const useMessages: () => {
|
|
|
97
97
|
isRefetchError: true;
|
|
98
98
|
isSuccess: false;
|
|
99
99
|
status: "error";
|
|
100
|
-
fetchNextPage: (options?:
|
|
101
|
-
fetchPreviousPage: (options?:
|
|
100
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
101
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
102
102
|
hasNextPage: boolean;
|
|
103
103
|
hasPreviousPage: boolean;
|
|
104
104
|
isFetchingNextPage: boolean;
|
|
@@ -116,8 +116,8 @@ declare const useMessages: () => {
|
|
|
116
116
|
isPlaceholderData: boolean;
|
|
117
117
|
isRefetching: boolean;
|
|
118
118
|
isStale: boolean;
|
|
119
|
-
refetch: (options?:
|
|
120
|
-
fetchStatus:
|
|
119
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
120
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
121
121
|
} | {
|
|
122
122
|
messages: SerializedMessage[];
|
|
123
123
|
data: InfiniteData<TQueryFnData, unknown>;
|
|
@@ -129,8 +129,8 @@ declare const useMessages: () => {
|
|
|
129
129
|
isRefetchError: false;
|
|
130
130
|
isSuccess: true;
|
|
131
131
|
status: "success";
|
|
132
|
-
fetchNextPage: (options?:
|
|
133
|
-
fetchPreviousPage: (options?:
|
|
132
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
133
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
134
134
|
hasNextPage: boolean;
|
|
135
135
|
hasPreviousPage: boolean;
|
|
136
136
|
isFetchingNextPage: boolean;
|
|
@@ -148,8 +148,8 @@ declare const useMessages: () => {
|
|
|
148
148
|
isPlaceholderData: boolean;
|
|
149
149
|
isRefetching: boolean;
|
|
150
150
|
isStale: boolean;
|
|
151
|
-
refetch: (options?:
|
|
152
|
-
fetchStatus:
|
|
151
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
152
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
153
153
|
} | {
|
|
154
154
|
messages: SerializedMessage[];
|
|
155
155
|
data: undefined;
|
|
@@ -161,8 +161,8 @@ declare const useMessages: () => {
|
|
|
161
161
|
isRefetchError: false;
|
|
162
162
|
isSuccess: false;
|
|
163
163
|
status: "error";
|
|
164
|
-
fetchNextPage: (options?:
|
|
165
|
-
fetchPreviousPage: (options?:
|
|
164
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
165
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
166
166
|
hasNextPage: boolean;
|
|
167
167
|
hasPreviousPage: boolean;
|
|
168
168
|
isFetchingNextPage: boolean;
|
|
@@ -180,8 +180,8 @@ declare const useMessages: () => {
|
|
|
180
180
|
isPlaceholderData: boolean;
|
|
181
181
|
isRefetching: boolean;
|
|
182
182
|
isStale: boolean;
|
|
183
|
-
refetch: (options?:
|
|
184
|
-
fetchStatus:
|
|
183
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
184
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
185
185
|
} | {
|
|
186
186
|
messages: SerializedMessage[];
|
|
187
187
|
data: undefined;
|
|
@@ -193,8 +193,8 @@ declare const useMessages: () => {
|
|
|
193
193
|
isRefetchError: false;
|
|
194
194
|
isSuccess: false;
|
|
195
195
|
status: "pending";
|
|
196
|
-
fetchNextPage: (options?:
|
|
197
|
-
fetchPreviousPage: (options?:
|
|
196
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
197
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
198
198
|
hasNextPage: boolean;
|
|
199
199
|
hasPreviousPage: boolean;
|
|
200
200
|
isFetchingNextPage: boolean;
|
|
@@ -212,8 +212,8 @@ declare const useMessages: () => {
|
|
|
212
212
|
isPlaceholderData: boolean;
|
|
213
213
|
isRefetching: boolean;
|
|
214
214
|
isStale: boolean;
|
|
215
|
-
refetch: (options?:
|
|
216
|
-
fetchStatus:
|
|
215
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
216
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
217
217
|
} | {
|
|
218
218
|
messages: SerializedMessage[];
|
|
219
219
|
data: undefined;
|
|
@@ -224,8 +224,8 @@ declare const useMessages: () => {
|
|
|
224
224
|
isRefetchError: false;
|
|
225
225
|
isSuccess: false;
|
|
226
226
|
status: "pending";
|
|
227
|
-
fetchNextPage: (options?:
|
|
228
|
-
fetchPreviousPage: (options?:
|
|
227
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
228
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
229
229
|
hasNextPage: boolean;
|
|
230
230
|
hasPreviousPage: boolean;
|
|
231
231
|
isFetchingNextPage: boolean;
|
|
@@ -244,8 +244,8 @@ declare const useMessages: () => {
|
|
|
244
244
|
isPlaceholderData: boolean;
|
|
245
245
|
isRefetching: boolean;
|
|
246
246
|
isStale: boolean;
|
|
247
|
-
refetch: (options?:
|
|
248
|
-
fetchStatus:
|
|
247
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
248
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
249
249
|
};
|
|
250
250
|
|
|
251
251
|
declare const useMessageContext: () => {
|
|
@@ -255,7 +255,7 @@ declare const useMessageContext: () => {
|
|
|
255
255
|
declare const useLatestMessage: () => {
|
|
256
256
|
latestMessage: SerializedMessage;
|
|
257
257
|
messages: SerializedMessage[];
|
|
258
|
-
data:
|
|
258
|
+
data: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>;
|
|
259
259
|
error: Error;
|
|
260
260
|
isError: true;
|
|
261
261
|
isPending: false;
|
|
@@ -264,8 +264,8 @@ declare const useLatestMessage: () => {
|
|
|
264
264
|
isRefetchError: true;
|
|
265
265
|
isSuccess: false;
|
|
266
266
|
status: "error";
|
|
267
|
-
fetchNextPage: (options?:
|
|
268
|
-
fetchPreviousPage: (options?:
|
|
267
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
268
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
269
269
|
hasNextPage: boolean;
|
|
270
270
|
hasPreviousPage: boolean;
|
|
271
271
|
isFetchingNextPage: boolean;
|
|
@@ -283,12 +283,12 @@ declare const useLatestMessage: () => {
|
|
|
283
283
|
isPlaceholderData: boolean;
|
|
284
284
|
isRefetching: boolean;
|
|
285
285
|
isStale: boolean;
|
|
286
|
-
refetch: (options?:
|
|
287
|
-
fetchStatus:
|
|
286
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
287
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
288
288
|
} | {
|
|
289
289
|
latestMessage: SerializedMessage;
|
|
290
290
|
messages: SerializedMessage[];
|
|
291
|
-
data:
|
|
291
|
+
data: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>;
|
|
292
292
|
error: null;
|
|
293
293
|
isError: false;
|
|
294
294
|
isPending: false;
|
|
@@ -297,8 +297,8 @@ declare const useLatestMessage: () => {
|
|
|
297
297
|
isRefetchError: false;
|
|
298
298
|
isSuccess: true;
|
|
299
299
|
status: "success";
|
|
300
|
-
fetchNextPage: (options?:
|
|
301
|
-
fetchPreviousPage: (options?:
|
|
300
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
301
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
302
302
|
hasNextPage: boolean;
|
|
303
303
|
hasPreviousPage: boolean;
|
|
304
304
|
isFetchingNextPage: boolean;
|
|
@@ -316,8 +316,8 @@ declare const useLatestMessage: () => {
|
|
|
316
316
|
isPlaceholderData: boolean;
|
|
317
317
|
isRefetching: boolean;
|
|
318
318
|
isStale: boolean;
|
|
319
|
-
refetch: (options?:
|
|
320
|
-
fetchStatus:
|
|
319
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
320
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
321
321
|
} | {
|
|
322
322
|
latestMessage: SerializedMessage;
|
|
323
323
|
messages: SerializedMessage[];
|
|
@@ -330,8 +330,8 @@ declare const useLatestMessage: () => {
|
|
|
330
330
|
isRefetchError: false;
|
|
331
331
|
isSuccess: false;
|
|
332
332
|
status: "error";
|
|
333
|
-
fetchNextPage: (options?:
|
|
334
|
-
fetchPreviousPage: (options?:
|
|
333
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
334
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
335
335
|
hasNextPage: boolean;
|
|
336
336
|
hasPreviousPage: boolean;
|
|
337
337
|
isFetchingNextPage: boolean;
|
|
@@ -349,8 +349,8 @@ declare const useLatestMessage: () => {
|
|
|
349
349
|
isPlaceholderData: boolean;
|
|
350
350
|
isRefetching: boolean;
|
|
351
351
|
isStale: boolean;
|
|
352
|
-
refetch: (options?:
|
|
353
|
-
fetchStatus:
|
|
352
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
353
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
354
354
|
} | {
|
|
355
355
|
latestMessage: SerializedMessage;
|
|
356
356
|
messages: SerializedMessage[];
|
|
@@ -363,8 +363,8 @@ declare const useLatestMessage: () => {
|
|
|
363
363
|
isRefetchError: false;
|
|
364
364
|
isSuccess: false;
|
|
365
365
|
status: "pending";
|
|
366
|
-
fetchNextPage: (options?:
|
|
367
|
-
fetchPreviousPage: (options?:
|
|
366
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
367
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
368
368
|
hasNextPage: boolean;
|
|
369
369
|
hasPreviousPage: boolean;
|
|
370
370
|
isFetchingNextPage: boolean;
|
|
@@ -382,8 +382,8 @@ declare const useLatestMessage: () => {
|
|
|
382
382
|
isPlaceholderData: boolean;
|
|
383
383
|
isRefetching: boolean;
|
|
384
384
|
isStale: boolean;
|
|
385
|
-
refetch: (options?:
|
|
386
|
-
fetchStatus:
|
|
385
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
386
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
387
387
|
} | {
|
|
388
388
|
latestMessage: SerializedMessage;
|
|
389
389
|
messages: SerializedMessage[];
|
|
@@ -395,8 +395,8 @@ declare const useLatestMessage: () => {
|
|
|
395
395
|
isRefetchError: false;
|
|
396
396
|
isSuccess: false;
|
|
397
397
|
status: "pending";
|
|
398
|
-
fetchNextPage: (options?:
|
|
399
|
-
fetchPreviousPage: (options?:
|
|
398
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
399
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
400
400
|
hasNextPage: boolean;
|
|
401
401
|
hasPreviousPage: boolean;
|
|
402
402
|
isFetchingNextPage: boolean;
|
|
@@ -415,8 +415,8 @@ declare const useLatestMessage: () => {
|
|
|
415
415
|
isPlaceholderData: boolean;
|
|
416
416
|
isRefetching: boolean;
|
|
417
417
|
isStale: boolean;
|
|
418
|
-
refetch: (options?:
|
|
419
|
-
fetchStatus:
|
|
418
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
419
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
420
420
|
};
|
|
421
421
|
|
|
422
422
|
declare const useCreateMessage: ({ onError, }?: {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { MessagesPage, SerializedMessage } from './types/index.js';
|
|
|
3
3
|
import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { Dispatch, SetStateAction } from 'react';
|
|
6
|
-
import * as
|
|
6
|
+
import * as _tanstack_query_core_build_legacy_queryClient_K0zFyarY from '@tanstack/query-core/build/legacy/queryClient-K0zFyarY';
|
|
7
7
|
import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
|
|
8
8
|
import OpenAI from 'openai';
|
|
9
9
|
|
|
@@ -97,8 +97,8 @@ declare const useMessages: () => {
|
|
|
97
97
|
isRefetchError: true;
|
|
98
98
|
isSuccess: false;
|
|
99
99
|
status: "error";
|
|
100
|
-
fetchNextPage: (options?:
|
|
101
|
-
fetchPreviousPage: (options?:
|
|
100
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
101
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
102
102
|
hasNextPage: boolean;
|
|
103
103
|
hasPreviousPage: boolean;
|
|
104
104
|
isFetchingNextPage: boolean;
|
|
@@ -116,8 +116,8 @@ declare const useMessages: () => {
|
|
|
116
116
|
isPlaceholderData: boolean;
|
|
117
117
|
isRefetching: boolean;
|
|
118
118
|
isStale: boolean;
|
|
119
|
-
refetch: (options?:
|
|
120
|
-
fetchStatus:
|
|
119
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
120
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
121
121
|
} | {
|
|
122
122
|
messages: SerializedMessage[];
|
|
123
123
|
data: InfiniteData<TQueryFnData, unknown>;
|
|
@@ -129,8 +129,8 @@ declare const useMessages: () => {
|
|
|
129
129
|
isRefetchError: false;
|
|
130
130
|
isSuccess: true;
|
|
131
131
|
status: "success";
|
|
132
|
-
fetchNextPage: (options?:
|
|
133
|
-
fetchPreviousPage: (options?:
|
|
132
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
133
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
134
134
|
hasNextPage: boolean;
|
|
135
135
|
hasPreviousPage: boolean;
|
|
136
136
|
isFetchingNextPage: boolean;
|
|
@@ -148,8 +148,8 @@ declare const useMessages: () => {
|
|
|
148
148
|
isPlaceholderData: boolean;
|
|
149
149
|
isRefetching: boolean;
|
|
150
150
|
isStale: boolean;
|
|
151
|
-
refetch: (options?:
|
|
152
|
-
fetchStatus:
|
|
151
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
152
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
153
153
|
} | {
|
|
154
154
|
messages: SerializedMessage[];
|
|
155
155
|
data: undefined;
|
|
@@ -161,8 +161,8 @@ declare const useMessages: () => {
|
|
|
161
161
|
isRefetchError: false;
|
|
162
162
|
isSuccess: false;
|
|
163
163
|
status: "error";
|
|
164
|
-
fetchNextPage: (options?:
|
|
165
|
-
fetchPreviousPage: (options?:
|
|
164
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
165
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
166
166
|
hasNextPage: boolean;
|
|
167
167
|
hasPreviousPage: boolean;
|
|
168
168
|
isFetchingNextPage: boolean;
|
|
@@ -180,8 +180,8 @@ declare const useMessages: () => {
|
|
|
180
180
|
isPlaceholderData: boolean;
|
|
181
181
|
isRefetching: boolean;
|
|
182
182
|
isStale: boolean;
|
|
183
|
-
refetch: (options?:
|
|
184
|
-
fetchStatus:
|
|
183
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
184
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
185
185
|
} | {
|
|
186
186
|
messages: SerializedMessage[];
|
|
187
187
|
data: undefined;
|
|
@@ -193,8 +193,8 @@ declare const useMessages: () => {
|
|
|
193
193
|
isRefetchError: false;
|
|
194
194
|
isSuccess: false;
|
|
195
195
|
status: "pending";
|
|
196
|
-
fetchNextPage: (options?:
|
|
197
|
-
fetchPreviousPage: (options?:
|
|
196
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
197
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
198
198
|
hasNextPage: boolean;
|
|
199
199
|
hasPreviousPage: boolean;
|
|
200
200
|
isFetchingNextPage: boolean;
|
|
@@ -212,8 +212,8 @@ declare const useMessages: () => {
|
|
|
212
212
|
isPlaceholderData: boolean;
|
|
213
213
|
isRefetching: boolean;
|
|
214
214
|
isStale: boolean;
|
|
215
|
-
refetch: (options?:
|
|
216
|
-
fetchStatus:
|
|
215
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
216
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
217
217
|
} | {
|
|
218
218
|
messages: SerializedMessage[];
|
|
219
219
|
data: undefined;
|
|
@@ -224,8 +224,8 @@ declare const useMessages: () => {
|
|
|
224
224
|
isRefetchError: false;
|
|
225
225
|
isSuccess: false;
|
|
226
226
|
status: "pending";
|
|
227
|
-
fetchNextPage: (options?:
|
|
228
|
-
fetchPreviousPage: (options?:
|
|
227
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
228
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
229
229
|
hasNextPage: boolean;
|
|
230
230
|
hasPreviousPage: boolean;
|
|
231
231
|
isFetchingNextPage: boolean;
|
|
@@ -244,8 +244,8 @@ declare const useMessages: () => {
|
|
|
244
244
|
isPlaceholderData: boolean;
|
|
245
245
|
isRefetching: boolean;
|
|
246
246
|
isStale: boolean;
|
|
247
|
-
refetch: (options?:
|
|
248
|
-
fetchStatus:
|
|
247
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<InfiniteData<TQueryFnData, unknown>, Error>>;
|
|
248
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
249
249
|
};
|
|
250
250
|
|
|
251
251
|
declare const useMessageContext: () => {
|
|
@@ -255,7 +255,7 @@ declare const useMessageContext: () => {
|
|
|
255
255
|
declare const useLatestMessage: () => {
|
|
256
256
|
latestMessage: SerializedMessage;
|
|
257
257
|
messages: SerializedMessage[];
|
|
258
|
-
data:
|
|
258
|
+
data: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>;
|
|
259
259
|
error: Error;
|
|
260
260
|
isError: true;
|
|
261
261
|
isPending: false;
|
|
@@ -264,8 +264,8 @@ declare const useLatestMessage: () => {
|
|
|
264
264
|
isRefetchError: true;
|
|
265
265
|
isSuccess: false;
|
|
266
266
|
status: "error";
|
|
267
|
-
fetchNextPage: (options?:
|
|
268
|
-
fetchPreviousPage: (options?:
|
|
267
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
268
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
269
269
|
hasNextPage: boolean;
|
|
270
270
|
hasPreviousPage: boolean;
|
|
271
271
|
isFetchingNextPage: boolean;
|
|
@@ -283,12 +283,12 @@ declare const useLatestMessage: () => {
|
|
|
283
283
|
isPlaceholderData: boolean;
|
|
284
284
|
isRefetching: boolean;
|
|
285
285
|
isStale: boolean;
|
|
286
|
-
refetch: (options?:
|
|
287
|
-
fetchStatus:
|
|
286
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
287
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
288
288
|
} | {
|
|
289
289
|
latestMessage: SerializedMessage;
|
|
290
290
|
messages: SerializedMessage[];
|
|
291
|
-
data:
|
|
291
|
+
data: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>;
|
|
292
292
|
error: null;
|
|
293
293
|
isError: false;
|
|
294
294
|
isPending: false;
|
|
@@ -297,8 +297,8 @@ declare const useLatestMessage: () => {
|
|
|
297
297
|
isRefetchError: false;
|
|
298
298
|
isSuccess: true;
|
|
299
299
|
status: "success";
|
|
300
|
-
fetchNextPage: (options?:
|
|
301
|
-
fetchPreviousPage: (options?:
|
|
300
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
301
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
302
302
|
hasNextPage: boolean;
|
|
303
303
|
hasPreviousPage: boolean;
|
|
304
304
|
isFetchingNextPage: boolean;
|
|
@@ -316,8 +316,8 @@ declare const useLatestMessage: () => {
|
|
|
316
316
|
isPlaceholderData: boolean;
|
|
317
317
|
isRefetching: boolean;
|
|
318
318
|
isStale: boolean;
|
|
319
|
-
refetch: (options?:
|
|
320
|
-
fetchStatus:
|
|
319
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
320
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
321
321
|
} | {
|
|
322
322
|
latestMessage: SerializedMessage;
|
|
323
323
|
messages: SerializedMessage[];
|
|
@@ -330,8 +330,8 @@ declare const useLatestMessage: () => {
|
|
|
330
330
|
isRefetchError: false;
|
|
331
331
|
isSuccess: false;
|
|
332
332
|
status: "error";
|
|
333
|
-
fetchNextPage: (options?:
|
|
334
|
-
fetchPreviousPage: (options?:
|
|
333
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
334
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
335
335
|
hasNextPage: boolean;
|
|
336
336
|
hasPreviousPage: boolean;
|
|
337
337
|
isFetchingNextPage: boolean;
|
|
@@ -349,8 +349,8 @@ declare const useLatestMessage: () => {
|
|
|
349
349
|
isPlaceholderData: boolean;
|
|
350
350
|
isRefetching: boolean;
|
|
351
351
|
isStale: boolean;
|
|
352
|
-
refetch: (options?:
|
|
353
|
-
fetchStatus:
|
|
352
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
353
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
354
354
|
} | {
|
|
355
355
|
latestMessage: SerializedMessage;
|
|
356
356
|
messages: SerializedMessage[];
|
|
@@ -363,8 +363,8 @@ declare const useLatestMessage: () => {
|
|
|
363
363
|
isRefetchError: false;
|
|
364
364
|
isSuccess: false;
|
|
365
365
|
status: "pending";
|
|
366
|
-
fetchNextPage: (options?:
|
|
367
|
-
fetchPreviousPage: (options?:
|
|
366
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
367
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
368
368
|
hasNextPage: boolean;
|
|
369
369
|
hasPreviousPage: boolean;
|
|
370
370
|
isFetchingNextPage: boolean;
|
|
@@ -382,8 +382,8 @@ declare const useLatestMessage: () => {
|
|
|
382
382
|
isPlaceholderData: boolean;
|
|
383
383
|
isRefetching: boolean;
|
|
384
384
|
isStale: boolean;
|
|
385
|
-
refetch: (options?:
|
|
386
|
-
fetchStatus:
|
|
385
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
386
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
387
387
|
} | {
|
|
388
388
|
latestMessage: SerializedMessage;
|
|
389
389
|
messages: SerializedMessage[];
|
|
@@ -395,8 +395,8 @@ declare const useLatestMessage: () => {
|
|
|
395
395
|
isRefetchError: false;
|
|
396
396
|
isSuccess: false;
|
|
397
397
|
status: "pending";
|
|
398
|
-
fetchNextPage: (options?:
|
|
399
|
-
fetchPreviousPage: (options?:
|
|
398
|
+
fetchNextPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a9 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
399
|
+
fetchPreviousPage: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.aa | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.as<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
400
400
|
hasNextPage: boolean;
|
|
401
401
|
hasPreviousPage: boolean;
|
|
402
402
|
isFetchingNextPage: boolean;
|
|
@@ -415,8 +415,8 @@ declare const useLatestMessage: () => {
|
|
|
415
415
|
isPlaceholderData: boolean;
|
|
416
416
|
isRefetching: boolean;
|
|
417
417
|
isStale: boolean;
|
|
418
|
-
refetch: (options?:
|
|
419
|
-
fetchStatus:
|
|
418
|
+
refetch: (options?: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.a4 | undefined) => Promise<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.ak<_tanstack_query_core_build_legacy_queryClient_K0zFyarY.E<TQueryFnData, unknown>, Error>>;
|
|
419
|
+
fetchStatus: _tanstack_query_core_build_legacy_queryClient_K0zFyarY.ac;
|
|
420
420
|
};
|
|
421
421
|
|
|
422
422
|
declare const useCreateMessage: ({ onError, }?: {
|
package/dist/index.js
CHANGED
|
@@ -2764,7 +2764,7 @@ var useStatus = function(param) {
|
|
|
2764
2764
|
if (createMessageProps.isPending) return "creatingMessage";
|
|
2765
2765
|
if (messageAudioProps.paused || !messageAudioProps.isAudioPlayed) return "playerPaused";
|
|
2766
2766
|
if (messageAudioProps.playing || messageAudioProps.isPending) return "playing";
|
|
2767
|
-
if (!messageAudioProps.isReady) return "loading";
|
|
2767
|
+
if (!messageAudioProps.isAudioPlayed && !messageAudioProps.isReady) return "loading";
|
|
2768
2768
|
if (((_latestMessageProps_latestMessage = latestMessageProps.latestMessage) === null || _latestMessageProps_latestMessage === void 0 ? void 0 : _latestMessageProps_latestMessage.status) === "in_progress") return "creatingMessage";
|
|
2769
2769
|
if (recorderProps.status === "idle") return "idle";
|
|
2770
2770
|
if (recorderProps.status === "paused") return "recorderPaused";
|
|
@@ -2931,6 +2931,7 @@ var useRecorder = function(param) {
|
|
|
2931
2931
|
};
|
|
2932
2932
|
// src/hooks/audioThreads/useMessageAudio/index.ts
|
|
2933
2933
|
import { useMemo as useMemo12, useRef as useRef5, useState as useState4, useEffect as useEffect5 } from "react";
|
|
2934
|
+
import nlp from "compromise";
|
|
2934
2935
|
import { Howler } from "howler";
|
|
2935
2936
|
import { useAudioPlayer as useAudioPlayer2 } from "react-use-audio-player";
|
|
2936
2937
|
// src/hooks/audioThreads/useMessageAudio/lib/input.ts
|
|
@@ -2954,15 +2955,14 @@ var unsupportedNames = [
|
|
|
2954
2955
|
];
|
|
2955
2956
|
var isHtmlAudioSupported = !unsupportedNames.includes(((_detect = detect()) === null || _detect === void 0 ? void 0 : _detect.name) || "");
|
|
2956
2957
|
// src/hooks/audioThreads/useMessageAudio/index.ts
|
|
2957
|
-
var SPLIT_SENTENCE_REGEX = /[^\.\?!]+[\.\?!]/g;
|
|
2958
2958
|
var FULL_SENTENCE_REGEX = /[\.?!]$/;
|
|
2959
2959
|
var getMessageSentences = function(param) {
|
|
2960
2960
|
var messageId = param.messageId, input2 = param.input;
|
|
2961
|
-
var sentences = input2.
|
|
2961
|
+
var sentences = nlp(input2).sentences().json();
|
|
2962
2962
|
return sentences.map(function(sentence) {
|
|
2963
2963
|
return {
|
|
2964
2964
|
messageId: messageId,
|
|
2965
|
-
sentence: sentence
|
|
2965
|
+
sentence: sentence.text
|
|
2966
2966
|
};
|
|
2967
2967
|
});
|
|
2968
2968
|
};
|
|
@@ -3004,7 +3004,9 @@ var useMessageAudio = function(param) {
|
|
|
3004
3004
|
if (!firstUnplayedMessageSentence) {
|
|
3005
3005
|
return;
|
|
3006
3006
|
}
|
|
3007
|
-
var isFullSentence =
|
|
3007
|
+
var isFullSentence = isOptimistic({
|
|
3008
|
+
id: latestMessageProps.latestMessage.id
|
|
3009
|
+
}) || latestMessageProps.latestMessage.status !== "in_progress" || FULL_SENTENCE_REGEX.test(firstUnplayedMessageSentence.sentence);
|
|
3008
3010
|
if (!isFullSentence) return;
|
|
3009
3011
|
setIsPlaying(true);
|
|
3010
3012
|
setPlayedMessageSentences(function(prev) {
|