@superinterface/react 2.0.4 → 2.0.6
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-u67QcaWg.d.cts → index-Dp6WTBGJ.d.cts} +1 -0
- package/dist/{index-u67QcaWg.d.ts → index-Dp6WTBGJ.d.ts} +1 -0
- package/dist/index.cjs +703 -531
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +42 -21
- package/dist/index.d.ts +42 -21
- package/dist/index.js +651 -483
- package/dist/index.js.map +1 -1
- package/dist/queryFns.cjs +15 -3
- package/dist/queryFns.cjs.map +1 -1
- package/dist/queryFns.d.cts +1 -1
- package/dist/queryFns.d.ts +1 -1
- package/dist/queryFns.js +15 -3
- package/dist/queryFns.js.map +1 -1
- package/package.json +5 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MessagesPage, Message } from './types/index.cjs';
|
|
3
3
|
import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
|
|
4
|
-
export { u as useSuperinterfaceContext, u as useThreadContext } from './index-
|
|
4
|
+
export { u as useSuperinterfaceContext, u as useThreadContext } from './index-Dp6WTBGJ.cjs';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { Dispatch, SetStateAction } from 'react';
|
|
7
7
|
import * as _tanstack_query_core_build_legacy_queryClient_Ho_z40Sw from '@tanstack/query-core/build/legacy/queryClient-Ho-z40Sw';
|
|
@@ -9,7 +9,7 @@ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query
|
|
|
9
9
|
import * as openai_resources_beta_threads_runs_runs from 'openai/resources/beta/threads/runs/runs';
|
|
10
10
|
import OpenAI from 'openai';
|
|
11
11
|
|
|
12
|
-
type Args$
|
|
12
|
+
type Args$6 = {
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
baseUrl?: string;
|
|
15
15
|
publicApiKey?: string;
|
|
@@ -21,14 +21,16 @@ type Args$7 = {
|
|
|
21
21
|
mutations?: UseMutationOptions;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
declare const SuperinterfaceProvider: ({ children, baseUrl, publicApiKey, variables, defaultOptions, }: Args$
|
|
24
|
+
declare const SuperinterfaceProvider: ({ children, baseUrl, publicApiKey, variables, defaultOptions, }: Args$6) => react_jsx_runtime.JSX.Element;
|
|
25
25
|
|
|
26
|
-
type Args$
|
|
26
|
+
type Args$5 = Args$6;
|
|
27
27
|
|
|
28
|
-
type Args$
|
|
28
|
+
type Args$4 = Args$5;
|
|
29
|
+
|
|
30
|
+
type Args$3 = Omit<Args$4, 'children'>;
|
|
29
31
|
declare const Thread: {
|
|
30
|
-
(props: Args$
|
|
31
|
-
Root: ({ children, ...rest }: Args$
|
|
32
|
+
(props: Args$3): react_jsx_runtime.JSX.Element;
|
|
33
|
+
Root: ({ children, ...rest }: Args$6) => react_jsx_runtime.JSX.Element;
|
|
32
34
|
Messages: {
|
|
33
35
|
({ children, style, }: {
|
|
34
36
|
children?: react.ReactNode;
|
|
@@ -222,6 +224,10 @@ declare const useMessages: () => {
|
|
|
222
224
|
fetchStatus: _tanstack_query_core_build_legacy_queryClient_Ho_z40Sw.a8;
|
|
223
225
|
};
|
|
224
226
|
|
|
227
|
+
declare const useMessageContext: () => {
|
|
228
|
+
message: Message | null;
|
|
229
|
+
};
|
|
230
|
+
|
|
225
231
|
declare const useLatestMessage: () => {
|
|
226
232
|
latestMessage: Message;
|
|
227
233
|
messages: Message[];
|
|
@@ -549,14 +555,14 @@ declare const AudioThreadDialog: {
|
|
|
549
555
|
};
|
|
550
556
|
};
|
|
551
557
|
|
|
552
|
-
type Args$
|
|
558
|
+
type Args$2 = {
|
|
553
559
|
children: React.ReactNode;
|
|
554
560
|
};
|
|
555
561
|
|
|
556
|
-
type Args$
|
|
562
|
+
type Args$1 = Omit<Args$2, 'children'>;
|
|
557
563
|
declare const AudioThread: {
|
|
558
|
-
(props: Args$
|
|
559
|
-
Root: ({ children, }: Args$
|
|
564
|
+
(props: Args$1): react_jsx_runtime.JSX.Element;
|
|
565
|
+
Root: ({ children, }: Args$2) => react_jsx_runtime.JSX.Element;
|
|
560
566
|
Visualization: () => react_jsx_runtime.JSX.Element;
|
|
561
567
|
Form: () => react_jsx_runtime.JSX.Element;
|
|
562
568
|
};
|
|
@@ -1181,16 +1187,23 @@ declare const useIsRunActive: () => {
|
|
|
1181
1187
|
fetchStatus: _tanstack_query_core_build_legacy_queryClient_Ho_z40Sw.a8;
|
|
1182
1188
|
};
|
|
1183
1189
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1190
|
+
declare const Suggestions: {
|
|
1191
|
+
({ children, }: {
|
|
1192
|
+
children: React.ReactNode;
|
|
1193
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
1194
|
+
Item: {
|
|
1195
|
+
({ suggestion, isDisabled, }: {
|
|
1196
|
+
suggestion: string;
|
|
1197
|
+
isDisabled: boolean;
|
|
1198
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1199
|
+
Content: ({ onClick, isDisabled, isPending, children, }: {
|
|
1200
|
+
onClick: () => void;
|
|
1201
|
+
isDisabled: boolean;
|
|
1202
|
+
isPending: boolean;
|
|
1203
|
+
children: react.ReactNode;
|
|
1204
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1205
|
+
};
|
|
1192
1206
|
};
|
|
1193
|
-
declare const Suggestion: ({ suggestion, }: Args$1) => react_jsx_runtime.JSX.Element;
|
|
1194
1207
|
|
|
1195
1208
|
declare const MarkdownContext: react.Context<{
|
|
1196
1209
|
remarkPlugins: any[];
|
|
@@ -1202,10 +1215,16 @@ declare const MarkdownContext: react.Context<{
|
|
|
1202
1215
|
ul: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1203
1216
|
ol: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1204
1217
|
li: ({ children }: react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>) => react_jsx_runtime.JSX.Element;
|
|
1218
|
+
pre: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLPreElement>, HTMLPreElement>) => react_jsx_runtime.JSX.Element;
|
|
1219
|
+
code: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>) => react_jsx_runtime.JSX.Element;
|
|
1205
1220
|
};
|
|
1206
1221
|
};
|
|
1207
1222
|
}>;
|
|
1208
1223
|
|
|
1224
|
+
declare const MarkdownProvider: ({ children, ...rest }: {
|
|
1225
|
+
children: React.ReactNode;
|
|
1226
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1227
|
+
|
|
1209
1228
|
declare const useMarkdownContext: () => {
|
|
1210
1229
|
remarkPlugins: any[];
|
|
1211
1230
|
rehypeReactOptions: {
|
|
@@ -1216,6 +1235,8 @@ declare const useMarkdownContext: () => {
|
|
|
1216
1235
|
ul: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1217
1236
|
ol: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1218
1237
|
li: ({ children }: react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>) => react_jsx_runtime.JSX.Element;
|
|
1238
|
+
pre: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLPreElement>, HTMLPreElement>) => react_jsx_runtime.JSX.Element;
|
|
1239
|
+
code: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>) => react_jsx_runtime.JSX.Element;
|
|
1219
1240
|
};
|
|
1220
1241
|
};
|
|
1221
1242
|
};
|
|
@@ -1236,4 +1257,4 @@ type Args = {
|
|
|
1236
1257
|
};
|
|
1237
1258
|
declare const FunctionBase: ({ fn, runStep, title, }: Args) => react_jsx_runtime.JSX.Element;
|
|
1238
1259
|
|
|
1239
|
-
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, FunctionBase, FunctionComponentsContext, MarkdownContext,
|
|
1260
|
+
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useCreateMessage, useCreateRun, useIsRunActive, useLatestMessage, useLatestRun, useLifecycle, useMarkdownContext, useMessageContext, useMessages, useRuns };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MessagesPage, Message } from './types/index.js';
|
|
3
3
|
import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
|
|
4
|
-
export { u as useSuperinterfaceContext, u as useThreadContext } from './index-
|
|
4
|
+
export { u as useSuperinterfaceContext, u as useThreadContext } from './index-Dp6WTBGJ.js';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import { Dispatch, SetStateAction } from 'react';
|
|
7
7
|
import * as _tanstack_query_core_build_legacy_queryClient_Ho_z40Sw from '@tanstack/query-core/build/legacy/queryClient-Ho-z40Sw';
|
|
@@ -9,7 +9,7 @@ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query
|
|
|
9
9
|
import * as openai_resources_beta_threads_runs_runs from 'openai/resources/beta/threads/runs/runs';
|
|
10
10
|
import OpenAI from 'openai';
|
|
11
11
|
|
|
12
|
-
type Args$
|
|
12
|
+
type Args$6 = {
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
baseUrl?: string;
|
|
15
15
|
publicApiKey?: string;
|
|
@@ -21,14 +21,16 @@ type Args$7 = {
|
|
|
21
21
|
mutations?: UseMutationOptions;
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
declare const SuperinterfaceProvider: ({ children, baseUrl, publicApiKey, variables, defaultOptions, }: Args$
|
|
24
|
+
declare const SuperinterfaceProvider: ({ children, baseUrl, publicApiKey, variables, defaultOptions, }: Args$6) => react_jsx_runtime.JSX.Element;
|
|
25
25
|
|
|
26
|
-
type Args$
|
|
26
|
+
type Args$5 = Args$6;
|
|
27
27
|
|
|
28
|
-
type Args$
|
|
28
|
+
type Args$4 = Args$5;
|
|
29
|
+
|
|
30
|
+
type Args$3 = Omit<Args$4, 'children'>;
|
|
29
31
|
declare const Thread: {
|
|
30
|
-
(props: Args$
|
|
31
|
-
Root: ({ children, ...rest }: Args$
|
|
32
|
+
(props: Args$3): react_jsx_runtime.JSX.Element;
|
|
33
|
+
Root: ({ children, ...rest }: Args$6) => react_jsx_runtime.JSX.Element;
|
|
32
34
|
Messages: {
|
|
33
35
|
({ children, style, }: {
|
|
34
36
|
children?: react.ReactNode;
|
|
@@ -222,6 +224,10 @@ declare const useMessages: () => {
|
|
|
222
224
|
fetchStatus: _tanstack_query_core_build_legacy_queryClient_Ho_z40Sw.a8;
|
|
223
225
|
};
|
|
224
226
|
|
|
227
|
+
declare const useMessageContext: () => {
|
|
228
|
+
message: Message | null;
|
|
229
|
+
};
|
|
230
|
+
|
|
225
231
|
declare const useLatestMessage: () => {
|
|
226
232
|
latestMessage: Message;
|
|
227
233
|
messages: Message[];
|
|
@@ -549,14 +555,14 @@ declare const AudioThreadDialog: {
|
|
|
549
555
|
};
|
|
550
556
|
};
|
|
551
557
|
|
|
552
|
-
type Args$
|
|
558
|
+
type Args$2 = {
|
|
553
559
|
children: React.ReactNode;
|
|
554
560
|
};
|
|
555
561
|
|
|
556
|
-
type Args$
|
|
562
|
+
type Args$1 = Omit<Args$2, 'children'>;
|
|
557
563
|
declare const AudioThread: {
|
|
558
|
-
(props: Args$
|
|
559
|
-
Root: ({ children, }: Args$
|
|
564
|
+
(props: Args$1): react_jsx_runtime.JSX.Element;
|
|
565
|
+
Root: ({ children, }: Args$2) => react_jsx_runtime.JSX.Element;
|
|
560
566
|
Visualization: () => react_jsx_runtime.JSX.Element;
|
|
561
567
|
Form: () => react_jsx_runtime.JSX.Element;
|
|
562
568
|
};
|
|
@@ -1181,16 +1187,23 @@ declare const useIsRunActive: () => {
|
|
|
1181
1187
|
fetchStatus: _tanstack_query_core_build_legacy_queryClient_Ho_z40Sw.a8;
|
|
1182
1188
|
};
|
|
1183
1189
|
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
};
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1190
|
+
declare const Suggestions: {
|
|
1191
|
+
({ children, }: {
|
|
1192
|
+
children: React.ReactNode;
|
|
1193
|
+
}): react_jsx_runtime.JSX.Element | null;
|
|
1194
|
+
Item: {
|
|
1195
|
+
({ suggestion, isDisabled, }: {
|
|
1196
|
+
suggestion: string;
|
|
1197
|
+
isDisabled: boolean;
|
|
1198
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1199
|
+
Content: ({ onClick, isDisabled, isPending, children, }: {
|
|
1200
|
+
onClick: () => void;
|
|
1201
|
+
isDisabled: boolean;
|
|
1202
|
+
isPending: boolean;
|
|
1203
|
+
children: react.ReactNode;
|
|
1204
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1205
|
+
};
|
|
1192
1206
|
};
|
|
1193
|
-
declare const Suggestion: ({ suggestion, }: Args$1) => react_jsx_runtime.JSX.Element;
|
|
1194
1207
|
|
|
1195
1208
|
declare const MarkdownContext: react.Context<{
|
|
1196
1209
|
remarkPlugins: any[];
|
|
@@ -1202,10 +1215,16 @@ declare const MarkdownContext: react.Context<{
|
|
|
1202
1215
|
ul: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1203
1216
|
ol: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1204
1217
|
li: ({ children }: react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>) => react_jsx_runtime.JSX.Element;
|
|
1218
|
+
pre: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLPreElement>, HTMLPreElement>) => react_jsx_runtime.JSX.Element;
|
|
1219
|
+
code: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>) => react_jsx_runtime.JSX.Element;
|
|
1205
1220
|
};
|
|
1206
1221
|
};
|
|
1207
1222
|
}>;
|
|
1208
1223
|
|
|
1224
|
+
declare const MarkdownProvider: ({ children, ...rest }: {
|
|
1225
|
+
children: React.ReactNode;
|
|
1226
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
1227
|
+
|
|
1209
1228
|
declare const useMarkdownContext: () => {
|
|
1210
1229
|
remarkPlugins: any[];
|
|
1211
1230
|
rehypeReactOptions: {
|
|
@@ -1216,6 +1235,8 @@ declare const useMarkdownContext: () => {
|
|
|
1216
1235
|
ul: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1217
1236
|
ol: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLUListElement>, HTMLUListElement>) => react_jsx_runtime.JSX.Element;
|
|
1218
1237
|
li: ({ children }: react.DetailedHTMLProps<react.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>) => react_jsx_runtime.JSX.Element;
|
|
1238
|
+
pre: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLPreElement>, HTMLPreElement>) => react_jsx_runtime.JSX.Element;
|
|
1239
|
+
code: ({ children }: react.DetailedHTMLProps<react.HTMLAttributes<HTMLElement>, HTMLElement>) => react_jsx_runtime.JSX.Element;
|
|
1219
1240
|
};
|
|
1220
1241
|
};
|
|
1221
1242
|
};
|
|
@@ -1236,4 +1257,4 @@ type Args = {
|
|
|
1236
1257
|
};
|
|
1237
1258
|
declare const FunctionBase: ({ fn, runStep, title, }: Args) => react_jsx_runtime.JSX.Element;
|
|
1238
1259
|
|
|
1239
|
-
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, FunctionBase, FunctionComponentsContext, MarkdownContext,
|
|
1260
|
+
export { AssistantAvatarContext, AssistantNameContext, AudioThread, AudioThreadDialog, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, useCreateMessage, useCreateRun, useIsRunActive, useLatestMessage, useLatestRun, useLifecycle, useMarkdownContext, useMessageContext, useMessages, useRuns };
|