@copilotkit/react-core 0.2.0 → 0.4.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.
- package/.turbo/turbo-build.log +70 -12
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/dist/chunk-7IPFT6UY.mjs +115 -0
- package/dist/chunk-7IPFT6UY.mjs.map +1 -0
- package/dist/chunk-7TCGEDGA.mjs +19 -0
- package/dist/chunk-7TCGEDGA.mjs.map +1 -0
- package/dist/chunk-BVQRDAR7.mjs +3 -0
- package/dist/chunk-BVQRDAR7.mjs.map +1 -0
- package/dist/chunk-EFZPSZWO.mjs +3 -0
- package/dist/chunk-EFZPSZWO.mjs.map +1 -0
- package/dist/chunk-GJUAS6I7.mjs +80 -0
- package/dist/chunk-GJUAS6I7.mjs.map +1 -0
- package/dist/chunk-JD7BAH7U.mjs +3 -0
- package/dist/chunk-JD7BAH7U.mjs.map +1 -0
- package/dist/chunk-MRXNTQOX.mjs +55 -0
- package/dist/chunk-MRXNTQOX.mjs.map +1 -0
- package/dist/chunk-OMI7JPW5.mjs +30 -0
- package/dist/chunk-OMI7JPW5.mjs.map +1 -0
- package/dist/chunk-UABEP4UT.mjs +22 -0
- package/dist/chunk-UABEP4UT.mjs.map +1 -0
- package/dist/chunk-VNRDQJXW.mjs +3 -0
- package/dist/chunk-VNRDQJXW.mjs.map +1 -0
- package/dist/chunk-YVXQVXMS.mjs +111 -0
- package/dist/chunk-YVXQVXMS.mjs.map +1 -0
- package/dist/components/copilot-provider.d.ts +7 -0
- package/dist/components/copilot-provider.mjs +6 -0
- package/dist/components/copilot-provider.mjs.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.mjs +7 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/context/copilot-context.d.ts +19 -0
- package/dist/context/copilot-context.mjs +4 -0
- package/dist/context/copilot-context.mjs.map +1 -0
- package/dist/context/index.d.ts +6 -0
- package/dist/context/index.mjs +5 -0
- package/dist/context/index.mjs.map +1 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.mjs +8 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat.d.ts +18 -0
- package/dist/hooks/use-copilot-chat.mjs +5 -0
- package/dist/hooks/use-copilot-chat.mjs.map +1 -0
- package/dist/hooks/use-make-copilot-actionable.d.ts +5 -0
- package/dist/hooks/use-make-copilot-actionable.mjs +5 -0
- package/dist/hooks/use-make-copilot-actionable.mjs.map +1 -0
- package/dist/hooks/use-make-copilot-readable.d.ts +3 -0
- package/dist/hooks/use-make-copilot-readable.mjs +5 -0
- package/dist/hooks/use-make-copilot-readable.mjs.map +1 -0
- package/dist/hooks/use-tree.d.ts +17 -0
- package/dist/hooks/use-tree.mjs +4 -0
- package/dist/hooks/use-tree.mjs.map +1 -0
- package/dist/index.d.ts +10 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -0
- package/dist/types/annotated-function.d.ts +24 -0
- package/dist/types/annotated-function.mjs +3 -0
- package/dist/types/annotated-function.mjs.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.mjs +3 -0
- package/dist/types/index.mjs.map +1 -0
- package/package.json +17 -14
- package/src/components/copilot-provider.tsx +172 -0
- package/src/components/index.ts +1 -0
- package/src/context/copilot-context.tsx +33 -0
- package/src/context/index.ts +2 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/use-copilot-chat.ts +107 -0
- package/src/hooks/use-make-copilot-actionable.ts +35 -0
- package/src/hooks/use-make-copilot-readable.ts +23 -0
- package/src/hooks/use-tree.ts +170 -0
- package/src/index.tsx +4 -2
- package/src/types/annotated-function.ts +27 -0
- package/src/types/index.ts +2 -0
- package/tsup.config.ts +3 -4
- package/dist/chunk-KFCOT2YX.js +0 -26
- package/dist/hook.d.ts +0 -3
- package/dist/hook.js +0 -10
- package/dist/index.js +0 -10
- package/src/hook.tsx +0 -5
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { useMemo, useContext } from "react";
|
|
2
|
+
import {
|
|
3
|
+
CopilotContext,
|
|
4
|
+
CopilotContextParams,
|
|
5
|
+
} from "../context/copilot-context";
|
|
6
|
+
import { useChat } from "ai/react";
|
|
7
|
+
import { ChatRequestOptions, CreateMessage, Message } from "ai";
|
|
8
|
+
import { UseChatOptions } from "ai";
|
|
9
|
+
|
|
10
|
+
export interface UseCopilotChatOptions extends UseChatOptions {
|
|
11
|
+
makeSystemMessage?: (contextString: string) => string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface UseCopilotChatReturn {
|
|
15
|
+
visibleMessages: Message[];
|
|
16
|
+
append: (
|
|
17
|
+
message: Message | CreateMessage,
|
|
18
|
+
chatRequestOptions?: ChatRequestOptions
|
|
19
|
+
) => Promise<string | null | undefined>;
|
|
20
|
+
reload: (
|
|
21
|
+
chatRequestOptions?: ChatRequestOptions
|
|
22
|
+
) => Promise<string | null | undefined>;
|
|
23
|
+
stop: () => void;
|
|
24
|
+
isLoading: boolean;
|
|
25
|
+
input: string;
|
|
26
|
+
setInput: React.Dispatch<React.SetStateAction<string>>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function useCopilotChat({
|
|
30
|
+
makeSystemMessage,
|
|
31
|
+
...options
|
|
32
|
+
}: UseCopilotChatOptions): UseCopilotChatReturn {
|
|
33
|
+
const {
|
|
34
|
+
getContextString,
|
|
35
|
+
getChatCompletionFunctionDescriptions,
|
|
36
|
+
getFunctionCallHandler,
|
|
37
|
+
} = useContext(CopilotContext);
|
|
38
|
+
|
|
39
|
+
const systemMessage: Message = useMemo(() => {
|
|
40
|
+
const systemMessageMaker = makeSystemMessage || defaultSystemMessage;
|
|
41
|
+
const contextString = getContextString();
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
id: "system",
|
|
45
|
+
content: systemMessageMaker(contextString),
|
|
46
|
+
role: "system",
|
|
47
|
+
};
|
|
48
|
+
}, [getContextString, makeSystemMessage]);
|
|
49
|
+
|
|
50
|
+
const initialMessagesWithContext = [systemMessage].concat(
|
|
51
|
+
options.initialMessages || []
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
const functionDescriptions = useMemo(() => {
|
|
55
|
+
return getChatCompletionFunctionDescriptions();
|
|
56
|
+
}, [getChatCompletionFunctionDescriptions]);
|
|
57
|
+
|
|
58
|
+
const { messages, append, reload, stop, isLoading, input, setInput } =
|
|
59
|
+
useChat({
|
|
60
|
+
id: options.id,
|
|
61
|
+
initialMessages: initialMessagesWithContext,
|
|
62
|
+
experimental_onFunctionCall: getFunctionCallHandler(),
|
|
63
|
+
body: {
|
|
64
|
+
id: options.id,
|
|
65
|
+
previewToken,
|
|
66
|
+
copilotkit_manually_passed_function_descriptions: functionDescriptions,
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
const visibleMessages = messages.filter(
|
|
71
|
+
(message) => message.role === "user" || message.role === "assistant"
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
visibleMessages,
|
|
76
|
+
append,
|
|
77
|
+
reload,
|
|
78
|
+
stop,
|
|
79
|
+
isLoading,
|
|
80
|
+
input,
|
|
81
|
+
setInput,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const previewToken = "TODO123";
|
|
86
|
+
|
|
87
|
+
export function defaultSystemMessage(contextString: string): string {
|
|
88
|
+
return `
|
|
89
|
+
Please act as an efficient, competent, conscientious, and industrious professional assistant.
|
|
90
|
+
|
|
91
|
+
Help the user achieve their goals, and you do so in a way that is as efficient as possible, without unnecessary fluff, but also without sacrificing professionalism.
|
|
92
|
+
Always be polite and respectful, and prefer brevity over verbosity.
|
|
93
|
+
|
|
94
|
+
The user has provided you with the following context:
|
|
95
|
+
\`\`\`
|
|
96
|
+
${contextString}
|
|
97
|
+
\`\`\`
|
|
98
|
+
|
|
99
|
+
They have also provided you with functions you can call to initiate actions on their behalf, or functions you can call to receive more information.
|
|
100
|
+
|
|
101
|
+
Please assist them as best you can.
|
|
102
|
+
|
|
103
|
+
You can ask them for clarifying questions if needed, but don't be annoying about it. If you can reasonably 'fill in the blanks' yourself, do so.
|
|
104
|
+
|
|
105
|
+
If you would like to call a function, call it without saying anything else.
|
|
106
|
+
`;
|
|
107
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRef, useContext, useEffect, useMemo } from "react";
|
|
4
|
+
import { CopilotContext } from "../context/copilot-context";
|
|
5
|
+
import { AnnotatedFunction } from "../types/annotated-function";
|
|
6
|
+
import { nanoid } from "nanoid";
|
|
7
|
+
|
|
8
|
+
export function useMakeCopilotActionable<ActionInput extends any[]>(
|
|
9
|
+
annotatedFunction: AnnotatedFunction<ActionInput>,
|
|
10
|
+
dependencies: any[]
|
|
11
|
+
) {
|
|
12
|
+
const idRef = useRef(nanoid()); // generate a unique id
|
|
13
|
+
const { setEntryPoint, removeEntryPoint } = useContext(CopilotContext);
|
|
14
|
+
|
|
15
|
+
const memoizedAnnotatedFunction: AnnotatedFunction<ActionInput> = useMemo(
|
|
16
|
+
() => ({
|
|
17
|
+
name: annotatedFunction.name,
|
|
18
|
+
description: annotatedFunction.description,
|
|
19
|
+
argumentAnnotations: annotatedFunction.argumentAnnotations,
|
|
20
|
+
implementation: annotatedFunction.implementation,
|
|
21
|
+
}),
|
|
22
|
+
dependencies
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
setEntryPoint(
|
|
27
|
+
idRef.current,
|
|
28
|
+
memoizedAnnotatedFunction as AnnotatedFunction<any[]>
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
return () => {
|
|
32
|
+
removeEntryPoint(idRef.current);
|
|
33
|
+
};
|
|
34
|
+
}, [memoizedAnnotatedFunction, setEntryPoint, removeEntryPoint]);
|
|
35
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRef, useContext, useEffect } from "react";
|
|
4
|
+
import { CopilotContext } from "../context/copilot-context";
|
|
5
|
+
|
|
6
|
+
export function useMakeCopilotReadable(
|
|
7
|
+
information: string,
|
|
8
|
+
parentId?: string
|
|
9
|
+
): string | undefined {
|
|
10
|
+
const { addContext, removeContext } = useContext(CopilotContext);
|
|
11
|
+
const idRef = useRef<string>();
|
|
12
|
+
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const id = addContext(information, parentId);
|
|
15
|
+
idRef.current = id;
|
|
16
|
+
|
|
17
|
+
return () => {
|
|
18
|
+
removeContext(id);
|
|
19
|
+
};
|
|
20
|
+
}, [information, parentId, addContext, removeContext]);
|
|
21
|
+
|
|
22
|
+
return idRef.current;
|
|
23
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { nanoid } from "nanoid";
|
|
2
|
+
import { useReducer, useCallback } from "react";
|
|
3
|
+
|
|
4
|
+
export type TreeNodeId = string;
|
|
5
|
+
|
|
6
|
+
export interface TreeNode {
|
|
7
|
+
id: TreeNodeId;
|
|
8
|
+
value: string;
|
|
9
|
+
children: TreeNode[];
|
|
10
|
+
parentId?: TreeNodeId;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type Tree = TreeNode[];
|
|
14
|
+
|
|
15
|
+
export interface UseTreeReturn {
|
|
16
|
+
tree: Tree;
|
|
17
|
+
addElement: (value: string, parentId?: TreeNodeId) => TreeNodeId;
|
|
18
|
+
printTree: () => string;
|
|
19
|
+
removeElement: (id: TreeNodeId) => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const findNode = (nodes: Tree, id: TreeNodeId): TreeNode | undefined => {
|
|
23
|
+
for (const node of nodes) {
|
|
24
|
+
if (node.id === id) {
|
|
25
|
+
return node;
|
|
26
|
+
}
|
|
27
|
+
const result = findNode(node.children, id);
|
|
28
|
+
if (result) {
|
|
29
|
+
return result;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return undefined;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const removeNode = (nodes: Tree, id: TreeNodeId): Tree => {
|
|
36
|
+
return nodes.reduce((result: Tree, node) => {
|
|
37
|
+
if (node.id !== id) {
|
|
38
|
+
const newNode = { ...node, children: removeNode(node.children, id) };
|
|
39
|
+
result.push(newNode);
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}, []);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const addNode = (
|
|
46
|
+
nodes: Tree,
|
|
47
|
+
newNode: TreeNode,
|
|
48
|
+
parentId?: TreeNodeId
|
|
49
|
+
): Tree => {
|
|
50
|
+
if (!parentId) {
|
|
51
|
+
return [...nodes, newNode];
|
|
52
|
+
}
|
|
53
|
+
return nodes.map((node) => {
|
|
54
|
+
if (node.id === parentId) {
|
|
55
|
+
return { ...node, children: [...node.children, newNode] };
|
|
56
|
+
} else if (node.children.length) {
|
|
57
|
+
return { ...node, children: addNode(node.children, newNode, parentId) };
|
|
58
|
+
}
|
|
59
|
+
return node;
|
|
60
|
+
});
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const treeIndentationRepresentation = (
|
|
64
|
+
index: number,
|
|
65
|
+
indentLevel: number
|
|
66
|
+
): string => {
|
|
67
|
+
if (indentLevel === 0) {
|
|
68
|
+
return (index + 1).toString();
|
|
69
|
+
} else if (indentLevel === 1) {
|
|
70
|
+
return String.fromCharCode(65 + index); // 65 is the ASCII value for 'A'
|
|
71
|
+
} else if (indentLevel === 2) {
|
|
72
|
+
return String.fromCharCode(97 + index); // 97 is the ASCII value for 'a'
|
|
73
|
+
} else {
|
|
74
|
+
throw new Error("Indentation level not supported");
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const printNode = (node: TreeNode, prefix = "", indentLevel = 0): string => {
|
|
79
|
+
const indent = " ".repeat(3).repeat(indentLevel);
|
|
80
|
+
|
|
81
|
+
const prefixPlusIndentLength = prefix.length + indent.length;
|
|
82
|
+
const subsequentLinesPrefix = " ".repeat(prefixPlusIndentLength);
|
|
83
|
+
|
|
84
|
+
const valueLines = node.value.split("\n");
|
|
85
|
+
|
|
86
|
+
const outputFirstLine = `${indent}${prefix}${valueLines[0]}`;
|
|
87
|
+
const outputSubsequentLines = valueLines
|
|
88
|
+
.slice(1)
|
|
89
|
+
.map((line) => `${subsequentLinesPrefix}${line}`)
|
|
90
|
+
.join("\n");
|
|
91
|
+
|
|
92
|
+
let output = `${outputFirstLine}\n`;
|
|
93
|
+
if (outputSubsequentLines) {
|
|
94
|
+
output += `${outputSubsequentLines}\n`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
node.children.forEach(
|
|
98
|
+
(child, index) =>
|
|
99
|
+
(output += printNode(
|
|
100
|
+
child,
|
|
101
|
+
`${prefix}${treeIndentationRepresentation(index, indentLevel + 1)}. `,
|
|
102
|
+
indentLevel + 1
|
|
103
|
+
))
|
|
104
|
+
);
|
|
105
|
+
return output;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// Action types
|
|
109
|
+
type Action =
|
|
110
|
+
| { type: "ADD_NODE"; value: string; parentId?: string; id: string }
|
|
111
|
+
| { type: "REMOVE_NODE"; id: string };
|
|
112
|
+
|
|
113
|
+
// Reducer function
|
|
114
|
+
function treeReducer(state: Tree, action: Action): Tree {
|
|
115
|
+
switch (action.type) {
|
|
116
|
+
case "ADD_NODE": {
|
|
117
|
+
const { value, parentId, id: newNodeId } = action;
|
|
118
|
+
const newNode: TreeNode = {
|
|
119
|
+
id: newNodeId,
|
|
120
|
+
value,
|
|
121
|
+
children: [],
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
try {
|
|
125
|
+
return addNode(state, newNode, parentId);
|
|
126
|
+
} catch (error) {
|
|
127
|
+
console.error(`Error while adding node with id ${newNodeId}: ${error}`);
|
|
128
|
+
return state;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
case "REMOVE_NODE":
|
|
132
|
+
return removeNode(state, action.id);
|
|
133
|
+
default:
|
|
134
|
+
return state;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// useTree hook
|
|
139
|
+
const useTree = (): UseTreeReturn => {
|
|
140
|
+
const [tree, dispatch] = useReducer(treeReducer, []);
|
|
141
|
+
|
|
142
|
+
const addElement = useCallback(
|
|
143
|
+
(value: string, parentId?: string): TreeNodeId => {
|
|
144
|
+
const newNodeId = nanoid(); // Generate new ID outside of dispatch
|
|
145
|
+
dispatch({ type: "ADD_NODE", value, parentId, id: newNodeId });
|
|
146
|
+
return newNodeId; // Return the new ID
|
|
147
|
+
},
|
|
148
|
+
[]
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
const removeElement = useCallback((id: TreeNodeId): void => {
|
|
152
|
+
dispatch({ type: "REMOVE_NODE", id });
|
|
153
|
+
}, []);
|
|
154
|
+
|
|
155
|
+
const printTree = (): string => {
|
|
156
|
+
let output = "";
|
|
157
|
+
tree.forEach(
|
|
158
|
+
(node, index) =>
|
|
159
|
+
(output += printNode(
|
|
160
|
+
node,
|
|
161
|
+
`${treeIndentationRepresentation(index, 0)}. `
|
|
162
|
+
))
|
|
163
|
+
);
|
|
164
|
+
return output;
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
return { tree, addElement, printTree, removeElement };
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export default useTree;
|
package/src/index.tsx
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface AnnotatedFunctionSimpleArgument {
|
|
2
|
+
name: string;
|
|
3
|
+
type: "string" | "number" | "boolean" | "object"; // Add or change types according to your needs.
|
|
4
|
+
description: string;
|
|
5
|
+
required: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AnnotatedFunctionArrayArgument {
|
|
9
|
+
name: string;
|
|
10
|
+
type: "array";
|
|
11
|
+
items: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
description: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type AnnotatedFunctionArgument =
|
|
19
|
+
| AnnotatedFunctionSimpleArgument
|
|
20
|
+
| AnnotatedFunctionArrayArgument;
|
|
21
|
+
|
|
22
|
+
export interface AnnotatedFunction<Inputs extends any[]> {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
argumentAnnotations: AnnotatedFunctionArgument[];
|
|
26
|
+
implementation: (...args: Inputs) => Promise<void>;
|
|
27
|
+
}
|
package/tsup.config.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { defineConfig, Options } from "tsup";
|
|
2
2
|
|
|
3
3
|
export default defineConfig((options: Options) => ({
|
|
4
|
-
|
|
5
|
-
splitting: true,
|
|
6
|
-
entry: ["src/**/*.tsx"],
|
|
4
|
+
entry: ["src/**/*.{ts,tsx}"],
|
|
7
5
|
format: ["esm"],
|
|
8
6
|
dts: true,
|
|
9
|
-
minify:
|
|
7
|
+
minify: false,
|
|
10
8
|
clean: true,
|
|
11
9
|
external: ["react"],
|
|
10
|
+
sourcemap: true,
|
|
12
11
|
...options,
|
|
13
12
|
}));
|
package/dist/chunk-KFCOT2YX.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var t = require('react');
|
|
4
|
-
|
|
5
|
-
function _interopNamespaceDefault(e) {
|
|
6
|
-
var n = Object.create(null);
|
|
7
|
-
if (e) {
|
|
8
|
-
Object.keys(e).forEach(function (k) {
|
|
9
|
-
if (k !== 'default') {
|
|
10
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
11
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function () { return e[k]; }
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
n.default = e;
|
|
19
|
-
return Object.freeze(n);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
var t__namespace = /*#__PURE__*/_interopNamespaceDefault(t);
|
|
23
|
-
|
|
24
|
-
function u(){t__namespace.useState(0);}
|
|
25
|
-
|
|
26
|
-
exports.a = u;
|
package/dist/hook.d.ts
DELETED
package/dist/hook.js
DELETED
package/dist/index.js
DELETED