@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.
Files changed (75) hide show
  1. package/dist/cjs/common/utils.js +1 -1
  2. package/dist/cjs/components/EmbedPreview/ChatInput.js +1 -1
  3. package/dist/cjs/components/EmbedPreview/Popup.js +1 -1
  4. package/dist/cjs/components/Icons/email.svg.js +1 -0
  5. package/dist/cjs/components/Icons/lock.svg.js +1 -0
  6. package/dist/cjs/components/Pickaxe/Addons/Artifact/Renderer/index.js +1 -1
  7. package/dist/cjs/components/Pickaxe/Addons/Artifact/hooks/useArtifact.js +1 -1
  8. package/dist/cjs/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.js +1 -1
  9. package/dist/cjs/components/Pickaxe/Addons/Auth/Provider.js +1 -0
  10. package/dist/cjs/components/Pickaxe/Addons/Auth/hooks/useAuth.js +1 -0
  11. package/dist/cjs/components/Pickaxe/Addons/Auth/hooks/useAuthContext.js +1 -0
  12. package/dist/cjs/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.js +1 -0
  13. package/dist/cjs/components/Pickaxe/Addons/Auth/index.js +1 -0
  14. package/dist/cjs/components/Pickaxe/Chat/History/CustomMessage.js +1 -0
  15. package/dist/cjs/components/Pickaxe/Chat/History/index.js +1 -1
  16. package/dist/cjs/components/Pickaxe/Chat/Input.js +1 -1
  17. package/dist/cjs/components/Pickaxe/Chat/index.js +1 -1
  18. package/dist/cjs/components/Pickaxe/Form/Questions/Submit.js +1 -1
  19. package/dist/cjs/components/Pickaxe/Provider.js +1 -1
  20. package/dist/cjs/components/Pickaxe/common/PickaxeInput.js +1 -0
  21. package/dist/cjs/components/Pickaxe/common/PickaxeMarkdown/Components/Artifact/index.js +1 -1
  22. package/dist/cjs/components/Pickaxe/index.js +1 -1
  23. package/dist/cjs/hooks/pickaxe/useHistory.js +1 -1
  24. package/dist/cjs/hooks/pickaxe/useSubmit.js +1 -1
  25. package/dist/cjs/src/common/utils.d.ts +4 -0
  26. package/dist/cjs/src/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.d.ts +2 -0
  27. package/dist/cjs/src/components/Pickaxe/Addons/Auth/Provider.d.ts +24 -0
  28. package/dist/cjs/src/components/Pickaxe/Addons/Auth/hooks/useAuth.d.ts +3 -0
  29. package/dist/cjs/src/components/Pickaxe/Addons/Auth/hooks/useAuthContext.d.ts +16 -0
  30. package/dist/cjs/src/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.d.ts +14 -0
  31. package/dist/cjs/src/components/Pickaxe/Addons/Auth/index.d.ts +2 -0
  32. package/dist/cjs/src/components/Pickaxe/Chat/History/CustomMessage.d.ts +8 -0
  33. package/dist/cjs/src/components/Pickaxe/Chat/Input.d.ts +1 -1
  34. package/dist/cjs/src/components/Pickaxe/Provider.d.ts +3 -1
  35. package/dist/cjs/src/components/Pickaxe/common/PickaxeInput.d.ts +3 -0
  36. package/dist/cjs/src/hooks/pickaxe/usePickaxeContext.d.ts +1 -0
  37. package/dist/cjs/src/hooks/pickaxe/useSubmit.d.ts +1 -0
  38. package/dist/esm/common/utils.js +1 -1
  39. package/dist/esm/components/EmbedPreview/ChatInput.js +1 -1
  40. package/dist/esm/components/EmbedPreview/Popup.js +1 -1
  41. package/dist/esm/components/Icons/email.svg.js +1 -0
  42. package/dist/esm/components/Icons/lock.svg.js +1 -0
  43. package/dist/esm/components/Pickaxe/Addons/Artifact/Renderer/index.js +1 -1
  44. package/dist/esm/components/Pickaxe/Addons/Artifact/hooks/useArtifact.js +1 -1
  45. package/dist/esm/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.js +1 -1
  46. package/dist/esm/components/Pickaxe/Addons/Auth/Provider.js +1 -0
  47. package/dist/esm/components/Pickaxe/Addons/Auth/hooks/useAuth.js +1 -0
  48. package/dist/esm/components/Pickaxe/Addons/Auth/hooks/useAuthContext.js +1 -0
  49. package/dist/esm/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.js +1 -0
  50. package/dist/esm/components/Pickaxe/Addons/Auth/index.js +1 -0
  51. package/dist/esm/components/Pickaxe/Chat/History/CustomMessage.js +1 -0
  52. package/dist/esm/components/Pickaxe/Chat/History/index.js +1 -1
  53. package/dist/esm/components/Pickaxe/Chat/Input.js +1 -1
  54. package/dist/esm/components/Pickaxe/Chat/index.js +1 -1
  55. package/dist/esm/components/Pickaxe/Form/Questions/Submit.js +1 -1
  56. package/dist/esm/components/Pickaxe/Provider.js +1 -1
  57. package/dist/esm/components/Pickaxe/common/PickaxeInput.js +1 -0
  58. package/dist/esm/components/Pickaxe/common/PickaxeMarkdown/Components/Artifact/index.js +1 -1
  59. package/dist/esm/components/Pickaxe/index.js +1 -1
  60. package/dist/esm/hooks/pickaxe/useHistory.js +1 -1
  61. package/dist/esm/hooks/pickaxe/useSubmit.js +1 -1
  62. package/dist/esm/src/common/utils.d.ts +4 -0
  63. package/dist/esm/src/components/Pickaxe/Addons/Artifact/hooks/useArtifactData.d.ts +2 -0
  64. package/dist/esm/src/components/Pickaxe/Addons/Auth/Provider.d.ts +24 -0
  65. package/dist/esm/src/components/Pickaxe/Addons/Auth/hooks/useAuth.d.ts +3 -0
  66. package/dist/esm/src/components/Pickaxe/Addons/Auth/hooks/useAuthContext.d.ts +16 -0
  67. package/dist/esm/src/components/Pickaxe/Addons/Auth/hooks/useAuthVerify.d.ts +14 -0
  68. package/dist/esm/src/components/Pickaxe/Addons/Auth/index.d.ts +2 -0
  69. package/dist/esm/src/components/Pickaxe/Chat/History/CustomMessage.d.ts +8 -0
  70. package/dist/esm/src/components/Pickaxe/Chat/Input.d.ts +1 -1
  71. package/dist/esm/src/components/Pickaxe/Provider.d.ts +3 -1
  72. package/dist/esm/src/components/Pickaxe/common/PickaxeInput.d.ts +3 -0
  73. package/dist/esm/src/hooks/pickaxe/usePickaxeContext.d.ts +1 -0
  74. package/dist/esm/src/hooks/pickaxe/useSubmit.d.ts +1 -0
  75. 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,2 @@
1
+ declare const AuthPage: () => import("react/jsx-runtime").JSX.Element;
2
+ export default AuthPage;
@@ -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>;
@@ -5,6 +5,7 @@ type MutationParams = {
5
5
  documentIds?: string[];
6
6
  studioUserId?: string;
7
7
  embedUserId?: string;
8
+ embedSessionToken?: string;
8
9
  deploymentId?: string;
9
10
  pickaxe?: Partial<Pickaxe>;
10
11
  value?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pickaxeproject/react",
3
- "version": "3.3.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-pdf": "^2.0.1",
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-pdf": "^2.0.1",
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",