@pickaxeproject/react 3.3.3 → 3.5.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/dist/cjs/common/utils.js +1 -1
- package/dist/cjs/components/EmbedPreview/ChatInput.js +1 -1
- package/dist/cjs/components/EmbedPreview/Popup.js +1 -1
- package/dist/cjs/components/Icons/email.svg.js +1 -0
- package/dist/cjs/components/Icons/lock.svg.js +1 -0
- package/dist/cjs/components/Pickaxe/Addons/Artifact/Renderer/index.js +1 -1
- package/dist/cjs/components/Pickaxe/Addons/Artifact/hooks/useArtifact.js +1 -1
- package/dist/cjs/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.js +1 -1
- package/dist/cjs/components/Pickaxe/Addons/Auth/Provider.js +1 -0
- package/dist/cjs/components/Pickaxe/Addons/Auth/hooks/useAuth.js +1 -0
- package/dist/cjs/components/Pickaxe/Addons/Auth/hooks/useAuthContext.js +1 -0
- package/dist/cjs/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.js +1 -0
- package/dist/cjs/components/Pickaxe/Addons/Auth/index.js +1 -0
- package/dist/cjs/components/Pickaxe/Chat/History/CustomMessage.js +1 -0
- package/dist/cjs/components/Pickaxe/Chat/History/index.js +1 -1
- package/dist/cjs/components/Pickaxe/Chat/Input.js +1 -1
- package/dist/cjs/components/Pickaxe/Chat/index.js +1 -1
- package/dist/cjs/components/Pickaxe/Form/Questions/Submit.js +1 -1
- package/dist/cjs/components/Pickaxe/Provider.js +1 -1
- package/dist/cjs/components/Pickaxe/common/PickaxeInput.js +1 -0
- package/dist/cjs/components/Pickaxe/common/PickaxeMarkdown/Components/Artifact/index.js +1 -1
- package/dist/cjs/components/Pickaxe/index.js +1 -1
- package/dist/cjs/hooks/pickaxe/useHistory.js +1 -1
- package/dist/cjs/hooks/pickaxe/useSubmit.js +1 -1
- package/dist/cjs/src/common/utils.d.ts +4 -0
- package/dist/cjs/src/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.d.ts +2 -0
- package/dist/cjs/src/components/Pickaxe/Addons/Auth/Provider.d.ts +24 -0
- package/dist/cjs/src/components/Pickaxe/Addons/Auth/hooks/useAuth.d.ts +3 -0
- package/dist/cjs/src/components/Pickaxe/Addons/Auth/hooks/useAuthContext.d.ts +16 -0
- package/dist/cjs/src/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.d.ts +14 -0
- package/dist/cjs/src/components/Pickaxe/Addons/Auth/index.d.ts +2 -0
- package/dist/cjs/src/components/Pickaxe/Chat/History/CustomMessage.d.ts +8 -0
- package/dist/cjs/src/components/Pickaxe/Chat/Input.d.ts +1 -1
- package/dist/cjs/src/components/Pickaxe/Provider.d.ts +3 -1
- package/dist/cjs/src/components/Pickaxe/common/PickaxeInput.d.ts +3 -0
- package/dist/cjs/src/hooks/pickaxe/usePickaxeContext.d.ts +1 -0
- package/dist/cjs/src/hooks/pickaxe/useSubmit.d.ts +1 -0
- package/dist/esm/common/utils.js +1 -1
- package/dist/esm/components/EmbedPreview/ChatInput.js +1 -1
- package/dist/esm/components/EmbedPreview/Popup.js +1 -1
- package/dist/esm/components/Icons/email.svg.js +1 -0
- package/dist/esm/components/Icons/lock.svg.js +1 -0
- package/dist/esm/components/Pickaxe/Addons/Artifact/Renderer/index.js +1 -1
- package/dist/esm/components/Pickaxe/Addons/Artifact/hooks/useArtifact.js +1 -1
- package/dist/esm/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.js +1 -1
- package/dist/esm/components/Pickaxe/Addons/Auth/Provider.js +1 -0
- package/dist/esm/components/Pickaxe/Addons/Auth/hooks/useAuth.js +1 -0
- package/dist/esm/components/Pickaxe/Addons/Auth/hooks/useAuthContext.js +1 -0
- package/dist/esm/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.js +1 -0
- package/dist/esm/components/Pickaxe/Addons/Auth/index.js +1 -0
- package/dist/esm/components/Pickaxe/Chat/History/CustomMessage.js +1 -0
- package/dist/esm/components/Pickaxe/Chat/History/index.js +1 -1
- package/dist/esm/components/Pickaxe/Chat/Input.js +1 -1
- package/dist/esm/components/Pickaxe/Chat/index.js +1 -1
- package/dist/esm/components/Pickaxe/Form/Questions/Submit.js +1 -1
- package/dist/esm/components/Pickaxe/Provider.js +1 -1
- package/dist/esm/components/Pickaxe/common/PickaxeInput.js +1 -0
- package/dist/esm/components/Pickaxe/common/PickaxeMarkdown/Components/Artifact/index.js +1 -1
- package/dist/esm/components/Pickaxe/index.js +1 -1
- package/dist/esm/hooks/pickaxe/useHistory.js +1 -1
- package/dist/esm/hooks/pickaxe/useSubmit.js +1 -1
- package/dist/esm/src/common/utils.d.ts +4 -0
- package/dist/esm/src/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.d.ts +2 -0
- package/dist/esm/src/components/Pickaxe/Addons/Auth/Provider.d.ts +24 -0
- package/dist/esm/src/components/Pickaxe/Addons/Auth/hooks/useAuth.d.ts +3 -0
- package/dist/esm/src/components/Pickaxe/Addons/Auth/hooks/useAuthContext.d.ts +16 -0
- package/dist/esm/src/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.d.ts +14 -0
- package/dist/esm/src/components/Pickaxe/Addons/Auth/index.d.ts +2 -0
- package/dist/esm/src/components/Pickaxe/Chat/History/CustomMessage.d.ts +8 -0
- package/dist/esm/src/components/Pickaxe/Chat/Input.d.ts +1 -1
- package/dist/esm/src/components/Pickaxe/Provider.d.ts +3 -1
- package/dist/esm/src/components/Pickaxe/common/PickaxeInput.d.ts +3 -0
- package/dist/esm/src/hooks/pickaxe/usePickaxeContext.d.ts +1 -0
- package/dist/esm/src/hooks/pickaxe/useSubmit.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const useAuthContext: () => {
|
|
2
|
+
emailInput: string;
|
|
3
|
+
token: string | null;
|
|
4
|
+
isLoggedIn: boolean;
|
|
5
|
+
isLoggedOut: boolean;
|
|
6
|
+
isLoggingIn: boolean;
|
|
7
|
+
isSending: boolean;
|
|
8
|
+
isResendDisabled: boolean;
|
|
9
|
+
isSent: boolean;
|
|
10
|
+
setEmailInput: import("../../../../../types/common").SetState<string>;
|
|
11
|
+
setToken: import("../../../../../types/common").SetState<string | null>;
|
|
12
|
+
setIsLoggingIn: import("../../../../../types/common").SetState<boolean>;
|
|
13
|
+
setIsSending: import("../../../../../types/common").SetState<boolean>;
|
|
14
|
+
setIsResendDisabled: import("../../../../../types/common").SetState<boolean>;
|
|
15
|
+
setIsSent: import("../../../../../types/common").SetState<boolean>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { SetState } from "../../../../../types/common";
|
|
2
|
+
import { UseQueryResult } from "@tanstack/react-query";
|
|
3
|
+
type QueryResponse = {
|
|
4
|
+
success: boolean;
|
|
5
|
+
token: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
};
|
|
8
|
+
interface UseAuthVerifyQueryProps {
|
|
9
|
+
token: string;
|
|
10
|
+
enabled?: boolean;
|
|
11
|
+
setIsLoggingIn: SetState<boolean>;
|
|
12
|
+
}
|
|
13
|
+
export declare const useAuthVerify: ({ token, enabled, setIsLoggingIn, }: UseAuthVerifyQueryProps) => UseQueryResult<QueryResponse, Error>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { ChatRole } from "../../../../types/chat";
|
|
3
|
+
interface CustomMessageProps {
|
|
4
|
+
chatRole: ChatRole;
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const CustomMessage: ({ chatRole, children }: CustomMessageProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CustomMessage;
|
|
@@ -3,5 +3,5 @@ interface InputProps {
|
|
|
3
3
|
onFocus?: () => void;
|
|
4
4
|
onBlur?: () => void;
|
|
5
5
|
}
|
|
6
|
-
declare const Input: ({ isFocused, onFocus, onBlur }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const Input: ({ isFocused, onFocus, onBlur }: InputProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export default Input;
|
|
@@ -81,6 +81,7 @@ type PickaxeContextType = {
|
|
|
81
81
|
isRtl: boolean;
|
|
82
82
|
isEmbed: boolean;
|
|
83
83
|
isDropShadow: boolean;
|
|
84
|
+
isEmailLogin: boolean;
|
|
84
85
|
setFormId: SetState<string>;
|
|
85
86
|
setChatId: SetState<string>;
|
|
86
87
|
setSessionId: SetState<string>;
|
|
@@ -114,8 +115,9 @@ export interface IPickaxeProviderProps {
|
|
|
114
115
|
isRtl?: boolean;
|
|
115
116
|
isEmbed?: boolean;
|
|
116
117
|
isDropShadow?: boolean;
|
|
118
|
+
isEmailLogin?: boolean;
|
|
117
119
|
onGenerateComplete?: (responseId: string) => void;
|
|
118
120
|
}
|
|
119
121
|
export declare const PickaxeContext: import("react").Context<PickaxeContextType>;
|
|
120
|
-
export declare const PickaxeProvider: ({ children, userId, studioUserId, deploymentId, embedUserId, deploymentType, deploymentDimensions, deploymentMisc, styles, colors, limits, misc, translations, artifact, responsiveBy, forceMobile, disableHtml, disableJs, disableCss, loadFont, isRtl, isEmbed, isDropShadow, onGenerateComplete, }: IPickaxeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
122
|
+
export declare const PickaxeProvider: ({ children, userId, studioUserId, deploymentId, embedUserId, deploymentType, deploymentDimensions, deploymentMisc, styles, colors, limits, misc, translations, artifact, responsiveBy, forceMobile, disableHtml, disableJs, disableCss, loadFont, isRtl, isEmbed, isDropShadow, isEmailLogin, onGenerateComplete, }: IPickaxeProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
121
123
|
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type DetailedHTMLProps, type InputHTMLAttributes } from "react";
|
|
2
|
+
declare const PickaxeInput: import("react").ForwardRefExoticComponent<Omit<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
3
|
+
export default PickaxeInput;
|
|
@@ -27,6 +27,7 @@ export declare const usePickaxeContext: () => {
|
|
|
27
27
|
isRtl: boolean;
|
|
28
28
|
isEmbed: boolean;
|
|
29
29
|
isDropShadow: boolean;
|
|
30
|
+
isEmailLogin: boolean;
|
|
30
31
|
setFormId: import("../../types/common").SetState<string>;
|
|
31
32
|
setChatId: import("../../types/common").SetState<string>;
|
|
32
33
|
setSessionId: import("../../types/common").SetState<string>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pickaxeproject/react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Client utility library for Pickaxe",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"react-resizable-panels": "^3.0.3",
|
|
108
108
|
"react-syntax-highlighter": "^15.6.1",
|
|
109
109
|
"react-textarea-autosize": "^8.5.7",
|
|
110
|
-
"react-to-
|
|
110
|
+
"react-to-print": "^3.1.1",
|
|
111
111
|
"react-tooltip": "^5.28.0",
|
|
112
112
|
"react-virtualized-auto-sizer": "^1.0.25",
|
|
113
113
|
"rehype-katex": "^7.0.1",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
"react-markdown": "^9.0.3",
|
|
158
158
|
"react-syntax-highlighter": "^15.6.1",
|
|
159
159
|
"react-textarea-autosize": "^8.5.7",
|
|
160
|
-
"react-to-
|
|
160
|
+
"react-to-print": "^3.1.1",
|
|
161
161
|
"react-tooltip": "^5.28.0",
|
|
162
162
|
"react-virtualized-auto-sizer": "^1.0.25",
|
|
163
163
|
"rehype-katex": "^7.0.1",
|