@pickaxeproject/react 3.9.0 → 3.10.1

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 (71) hide show
  1. package/dist/cjs/components/EmbedPreview/FAB.js +1 -1
  2. package/dist/cjs/components/EmbedPreview/Inline.js +1 -1
  3. package/dist/cjs/components/EmbedPreview/Popup.js +1 -1
  4. package/dist/cjs/components/Icons/message-clock.svg.js +1 -0
  5. package/dist/cjs/components/Pickaxe/Addons/Auth/index.js +1 -1
  6. package/dist/cjs/components/Pickaxe/Chat/History/index.js +1 -1
  7. package/dist/cjs/components/Pickaxe/Chat/Input.js +1 -1
  8. package/dist/cjs/components/Pickaxe/Form/History/Container.js +1 -1
  9. package/dist/cjs/components/Pickaxe/Form/History/Item.js +1 -1
  10. package/dist/cjs/components/Pickaxe/Form/NewChat.js +1 -1
  11. package/dist/cjs/components/Pickaxe/Form/Questions/Submit.js +1 -1
  12. package/dist/cjs/components/Pickaxe/Form/index.js +1 -1
  13. package/dist/cjs/components/Pickaxe/Provider.js +1 -1
  14. package/dist/cjs/components/Pickaxe/common/PickaxeBranding.js +1 -1
  15. package/dist/cjs/components/Pickaxe/common/PickaxeEmbedHead.js +1 -0
  16. package/dist/cjs/components/Pickaxe/common/PickaxeHistoryButton.js +1 -0
  17. package/dist/cjs/components/Pickaxe/common/PickaxeSimpleButton.js +1 -1
  18. package/dist/cjs/components/Pickaxe/common/PickaxeSkeleton.js +1 -1
  19. package/dist/cjs/hooks/core/usePressed.js +1 -0
  20. package/dist/cjs/hooks/pickaxe/useHistory.js +1 -1
  21. package/dist/cjs/node_modules/.pnpm/cose-base@1.0.3/node_modules/cose-base/cose-base.js +1 -1
  22. package/dist/cjs/node_modules/.pnpm/cose-base@2.2.0/node_modules/cose-base/cose-base.js +1 -1
  23. package/dist/cjs/node_modules/.pnpm/layout-base@1.0.2/node_modules/layout-base/layout-base.js +1 -1
  24. package/dist/cjs/node_modules/.pnpm/layout-base@2.0.1/node_modules/layout-base/layout-base.js +1 -1
  25. package/dist/cjs/src/components/EmbedPreview/Popup.d.ts +1 -1
  26. package/dist/cjs/src/components/Pickaxe/Form/NewChat.d.ts +1 -2
  27. package/dist/cjs/src/components/Pickaxe/Provider.d.ts +2 -0
  28. package/dist/cjs/src/components/Pickaxe/common/PickaxeBranding.d.ts +2 -2
  29. package/dist/cjs/src/components/Pickaxe/common/PickaxeEmbedHead.d.ts +9 -0
  30. package/dist/cjs/src/components/Pickaxe/common/PickaxeHistoryButton.d.ts +6 -0
  31. package/dist/cjs/src/components/Pickaxe/common/PickaxeSimpleButton.d.ts +8 -2
  32. package/dist/cjs/src/hooks/core/usePressed.d.ts +5 -0
  33. package/dist/cjs/src/hooks/pickaxe/usePickaxeContext.d.ts +2 -0
  34. package/dist/esm/components/EmbedPreview/FAB.js +1 -1
  35. package/dist/esm/components/EmbedPreview/Inline.js +1 -1
  36. package/dist/esm/components/EmbedPreview/Popup.js +1 -1
  37. package/dist/esm/components/Icons/message-clock.svg.js +1 -0
  38. package/dist/esm/components/Pickaxe/Addons/Auth/index.js +1 -1
  39. package/dist/esm/components/Pickaxe/Chat/History/index.js +1 -1
  40. package/dist/esm/components/Pickaxe/Chat/Input.js +1 -1
  41. package/dist/esm/components/Pickaxe/Form/History/Container.js +1 -1
  42. package/dist/esm/components/Pickaxe/Form/History/Item.js +1 -1
  43. package/dist/esm/components/Pickaxe/Form/NewChat.js +1 -1
  44. package/dist/esm/components/Pickaxe/Form/Questions/Submit.js +1 -1
  45. package/dist/esm/components/Pickaxe/Form/index.js +1 -1
  46. package/dist/esm/components/Pickaxe/Provider.js +1 -1
  47. package/dist/esm/components/Pickaxe/common/PickaxeBranding.js +1 -1
  48. package/dist/esm/components/Pickaxe/common/PickaxeEmbedHead.js +1 -0
  49. package/dist/esm/components/Pickaxe/common/PickaxeHistoryButton.js +1 -0
  50. package/dist/esm/components/Pickaxe/common/PickaxeSimpleButton.js +1 -1
  51. package/dist/esm/components/Pickaxe/common/PickaxeSkeleton.js +1 -1
  52. package/dist/esm/hooks/core/usePressed.js +1 -0
  53. package/dist/esm/hooks/pickaxe/useHistory.js +1 -1
  54. package/dist/esm/node_modules/.pnpm/cose-base@1.0.3/node_modules/cose-base/cose-base.js +1 -1
  55. package/dist/esm/node_modules/.pnpm/cose-base@2.2.0/node_modules/cose-base/cose-base.js +1 -1
  56. package/dist/esm/node_modules/.pnpm/layout-base@1.0.2/node_modules/layout-base/layout-base.js +1 -1
  57. package/dist/esm/node_modules/.pnpm/layout-base@2.0.1/node_modules/layout-base/layout-base.js +1 -1
  58. package/dist/esm/src/components/EmbedPreview/Popup.d.ts +1 -1
  59. package/dist/esm/src/components/Pickaxe/Form/NewChat.d.ts +1 -2
  60. package/dist/esm/src/components/Pickaxe/Provider.d.ts +2 -0
  61. package/dist/esm/src/components/Pickaxe/common/PickaxeBranding.d.ts +2 -2
  62. package/dist/esm/src/components/Pickaxe/common/PickaxeEmbedHead.d.ts +9 -0
  63. package/dist/esm/src/components/Pickaxe/common/PickaxeHistoryButton.d.ts +6 -0
  64. package/dist/esm/src/components/Pickaxe/common/PickaxeSimpleButton.d.ts +8 -2
  65. package/dist/esm/src/hooks/core/usePressed.d.ts +5 -0
  66. package/dist/esm/src/hooks/pickaxe/usePickaxeContext.d.ts +2 -0
  67. package/package.json +1 -1
  68. package/dist/cjs/components/Pickaxe/common/PickaxeCompactHead.js +0 -1
  69. package/dist/cjs/src/components/Pickaxe/common/PickaxeCompactHead.d.ts +0 -7
  70. package/dist/esm/components/Pickaxe/common/PickaxeCompactHead.js +0 -1
  71. package/dist/esm/src/components/Pickaxe/common/PickaxeCompactHead.d.ts +0 -7
@@ -0,0 +1,6 @@
1
+ interface PickaxeHistoryButtonProps {
2
+ tip?: string;
3
+ onClick: () => void;
4
+ }
5
+ declare const PickaxeHistoryButton: ({ tip, onClick }: PickaxeHistoryButtonProps) => import("react/jsx-runtime").JSX.Element;
6
+ export default PickaxeHistoryButton;
@@ -1,10 +1,16 @@
1
- import type { ReactNode } from "react";
1
+ import type { CSSProperties, ReactNode } from "react";
2
2
  interface PickaxeSimpleButtonProps {
3
3
  color?: string;
4
4
  children: ReactNode;
5
5
  className?: string;
6
+ style?: CSSProperties;
7
+ reversed?: boolean;
6
8
  isForceColor?: boolean;
7
9
  onClick?: () => void;
10
+ onMouseDown?: () => void;
11
+ onMouseUp?: () => void;
12
+ onMouseEnter?: () => void;
13
+ onMouseLeave?: () => void;
8
14
  }
9
- declare const PickaxeSimpleButton: ({ color, children, className, isForceColor, onClick, }: PickaxeSimpleButtonProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const PickaxeSimpleButton: ({ color, children, className, style, reversed, isForceColor, onClick, ...props }: PickaxeSimpleButtonProps) => import("react/jsx-runtime").JSX.Element;
10
16
  export default PickaxeSimpleButton;
@@ -0,0 +1,5 @@
1
+ export declare const usePressed: () => {
2
+ isActive: boolean;
3
+ onMouseDown: () => void;
4
+ onMouseUp: () => void;
5
+ };
@@ -1,6 +1,7 @@
1
1
  export declare const usePickaxeContext: () => {
2
2
  formId: string;
3
3
  chatId: string;
4
+ lastChatId: string;
4
5
  sessionId: string;
5
6
  userId: string;
6
7
  studioUserId: string;
@@ -30,6 +31,7 @@ export declare const usePickaxeContext: () => {
30
31
  isEmailLogin: boolean;
31
32
  setFormId: import("../../types/common").SetState<string>;
32
33
  setChatId: import("../../types/common").SetState<string>;
34
+ setLastChatId: import("../../types/common").SetState<string>;
33
35
  setSessionId: import("../../types/common").SetState<string>;
34
36
  setPickaxe: import("../../types/common").SetState<import("../../types/pickaxe").LimitedPickaxe | null>;
35
37
  setIsFontLoaded: import("../../types/common").SetState<boolean>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pickaxeproject/react",
3
- "version": "3.9.0",
3
+ "version": "3.10.1",
4
4
  "description": "Client utility library for Pickaxe",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),i=require("react"),s=require("../../../hooks/pickaxe/usePickaxeContext.js"),t=require("../../../hooks/studio/useStyleFontSize.js"),l=require("./PickaxeIcon.js"),r=require("./PickaxeBranding.js"),a=require("../../../common/cn.js");exports.default=({className:o,iconClassName:c,onIconClick:n})=>{const{pickaxe:u,misc:d,deploymentType:p}=s.usePickaxeContext(),x=t.useStyleFontSize(),m=i.useMemo((()=>({title:(null==u?void 0:u.formtitle)||"",description:(null==u?void 0:u.formdescription)||""})),[u]);return d.isTitle||d.isDescription||!d.isWhiteLabel?e.jsxs("div",Object.assign({className:a.default("flex h-[56px] items-center justify-between gap-4",o)},{children:[e.jsxs("div",Object.assign({className:"flex items-center gap-4"},{children:[d.isProfileImage&&e.jsx(l.default,Object.assign({src:null==u?void 0:u.coverphoto,alt:`${null==u?void 0:u.formtitle}'s Profile Picture`,width:32,height:32,className:a.default("shrink-0 h-[32px] w-[32px] rounded-full",c,!!n&&"cursor-pointer")},n&&{onClick:n})),d.isTitle&&e.jsx("p",Object.assign({className:a.default(x.b1)},{children:m.title}))]})),!d.isWhiteLabel&&e.jsx(r.default,{className:a.default("flex","popup"===p&&"p-0 pr-12"),animateHover:!0})]})):null};
@@ -1,7 +0,0 @@
1
- interface PickaxeCompactHeadProps {
2
- className?: string;
3
- iconClassName?: string;
4
- onIconClick?: () => void;
5
- }
6
- declare const PickaxeCompactHead: ({ className, iconClassName, onIconClick, }: PickaxeCompactHeadProps) => import("react/jsx-runtime").JSX.Element | null;
7
- export default PickaxeCompactHead;
@@ -1 +0,0 @@
1
- import{jsxs as e,jsx as i}from"react/jsx-runtime";import{useMemo as s}from"react";import{usePickaxeContext as t}from"../../../hooks/pickaxe/usePickaxeContext.js";import{useStyleFontSize as o}from"../../../hooks/studio/useStyleFontSize.js";import r from"./PickaxeIcon.js";import l from"./PickaxeBranding.js";import c from"../../../common/cn.js";const n=({className:n,iconClassName:a,onIconClick:m})=>{const{pickaxe:p,misc:d,deploymentType:f}=t(),u=o(),h=s((()=>({title:(null==p?void 0:p.formtitle)||"",description:(null==p?void 0:p.formdescription)||""})),[p]);return d.isTitle||d.isDescription||!d.isWhiteLabel?e("div",Object.assign({className:c("flex h-[56px] items-center justify-between gap-4",n)},{children:[e("div",Object.assign({className:"flex items-center gap-4"},{children:[d.isProfileImage&&i(r,Object.assign({src:null==p?void 0:p.coverphoto,alt:`${null==p?void 0:p.formtitle}'s Profile Picture`,width:32,height:32,className:c("shrink-0 h-[32px] w-[32px] rounded-full",a,!!m&&"cursor-pointer")},m&&{onClick:m})),d.isTitle&&i("p",Object.assign({className:c(u.b1)},{children:h.title}))]})),!d.isWhiteLabel&&i(l,{className:c("flex","popup"===f&&"p-0 pr-12"),animateHover:!0})]})):null};export{n as default};
@@ -1,7 +0,0 @@
1
- interface PickaxeCompactHeadProps {
2
- className?: string;
3
- iconClassName?: string;
4
- onIconClick?: () => void;
5
- }
6
- declare const PickaxeCompactHead: ({ className, iconClassName, onIconClick, }: PickaxeCompactHeadProps) => import("react/jsx-runtime").JSX.Element | null;
7
- export default PickaxeCompactHead;