@pickaxeproject/react 6.22.0 → 6.23.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 (65) hide show
  1. package/dist/cjs/common/responseArtifactSnapshot.js +1 -0
  2. package/dist/cjs/common/responseArtifactStyles.js +1 -0
  3. package/dist/cjs/common/responseArtifactSvg.js +101 -0
  4. package/dist/cjs/common/responseArtifactWordImages.js +1 -0
  5. package/dist/cjs/common/responseDownload.js +1 -0
  6. package/dist/cjs/common/responseDownloadArtifacts.js +1 -0
  7. package/dist/cjs/common/responseDownloadDocx.js +1 -0
  8. package/dist/cjs/common/responseDownloadHtml.js +1 -0
  9. package/dist/cjs/common/responseInteractiveArtifactHtml.js +1 -0
  10. package/dist/cjs/common/responseMermaid.js +1 -0
  11. package/dist/cjs/common/responseStandaloneSvg.js +1 -0
  12. package/dist/cjs/components/Pickaxe/Chat/index.js +1 -1
  13. package/dist/cjs/components/Pickaxe/Form/index.js +1 -1
  14. package/dist/cjs/components/Pickaxe/Provider.js +1 -1
  15. package/dist/cjs/components/Pickaxe/common/PickaxeDownloadButton.js +1 -0
  16. package/dist/cjs/components/Pickaxe/common/PickaxeEmbedHead.js +1 -1
  17. package/dist/cjs/components/Pickaxe/common/PickaxeMCPButton.js +1 -1
  18. package/dist/cjs/components/Pickaxe/common/PickaxeMessageActions.js +1 -1
  19. package/dist/cjs/src/common/responseArtifactSnapshot.d.ts +1 -0
  20. package/dist/cjs/src/common/responseArtifactStyles.d.ts +4 -0
  21. package/dist/cjs/src/common/responseArtifactSvg.d.ts +2 -0
  22. package/dist/cjs/src/common/responseArtifactWordImages.d.ts +2 -0
  23. package/dist/cjs/src/common/responseDownload.d.ts +6 -0
  24. package/dist/cjs/src/common/responseDownloadArtifacts.d.ts +8 -0
  25. package/dist/cjs/src/common/responseDownloadDocx.d.ts +6 -0
  26. package/dist/cjs/src/common/responseDownloadHtml.d.ts +11 -0
  27. package/dist/cjs/src/common/responseInteractiveArtifactHtml.d.ts +11 -0
  28. package/dist/cjs/src/common/responseMermaid.d.ts +2 -0
  29. package/dist/cjs/src/common/responseStandaloneSvg.d.ts +5 -0
  30. package/dist/cjs/src/components/Pickaxe/Provider.d.ts +4 -1
  31. package/dist/cjs/src/components/Pickaxe/common/PickaxeDownloadButton.d.ts +8 -0
  32. package/dist/cjs/src/hooks/pickaxe/usePickaxeContext.d.ts +1 -0
  33. package/dist/esm/common/responseArtifactSnapshot.js +1 -0
  34. package/dist/esm/common/responseArtifactStyles.js +1 -0
  35. package/dist/esm/common/responseArtifactSvg.js +101 -0
  36. package/dist/esm/common/responseArtifactWordImages.js +1 -0
  37. package/dist/esm/common/responseDownload.js +1 -0
  38. package/dist/esm/common/responseDownloadArtifacts.js +1 -0
  39. package/dist/esm/common/responseDownloadDocx.js +1 -0
  40. package/dist/esm/common/responseDownloadHtml.js +1 -0
  41. package/dist/esm/common/responseInteractiveArtifactHtml.js +1 -0
  42. package/dist/esm/common/responseMermaid.js +1 -0
  43. package/dist/esm/common/responseStandaloneSvg.js +1 -0
  44. package/dist/esm/components/Pickaxe/Chat/index.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/PickaxeDownloadButton.js +1 -0
  48. package/dist/esm/components/Pickaxe/common/PickaxeEmbedHead.js +1 -1
  49. package/dist/esm/components/Pickaxe/common/PickaxeMCPButton.js +1 -1
  50. package/dist/esm/components/Pickaxe/common/PickaxeMessageActions.js +1 -1
  51. package/dist/esm/src/common/responseArtifactSnapshot.d.ts +1 -0
  52. package/dist/esm/src/common/responseArtifactStyles.d.ts +4 -0
  53. package/dist/esm/src/common/responseArtifactSvg.d.ts +2 -0
  54. package/dist/esm/src/common/responseArtifactWordImages.d.ts +2 -0
  55. package/dist/esm/src/common/responseDownload.d.ts +6 -0
  56. package/dist/esm/src/common/responseDownloadArtifacts.d.ts +8 -0
  57. package/dist/esm/src/common/responseDownloadDocx.d.ts +6 -0
  58. package/dist/esm/src/common/responseDownloadHtml.d.ts +11 -0
  59. package/dist/esm/src/common/responseInteractiveArtifactHtml.d.ts +11 -0
  60. package/dist/esm/src/common/responseMermaid.d.ts +2 -0
  61. package/dist/esm/src/common/responseStandaloneSvg.d.ts +5 -0
  62. package/dist/esm/src/components/Pickaxe/Provider.d.ts +4 -1
  63. package/dist/esm/src/components/Pickaxe/common/PickaxeDownloadButton.d.ts +8 -0
  64. package/dist/esm/src/hooks/pickaxe/usePickaxeContext.d.ts +1 -0
  65. package/package.json +4 -2
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Converts prepared response text into a standalone, static HTML document.
3
+ * Does not mount the chat renderer, run response scripts, or fetch linked content.
4
+ * Code fences stay literal; only the export gets these stricter HTML rules.
5
+ */
6
+ export declare const createResponseDownloadHtml: (text: string) => string;
7
+ /** All assembled content, including artifact snapshots, crosses this boundary. */
8
+ export declare const createResponseDownloadDocument: (rendered: string, preserveArtifactStyles?: boolean) => string;
9
+ /** Opens a print copy from the user's click without changing the live response. */
10
+ export declare const printResponseDownloadHtml: (text: string) => Promise<void>;
11
+ export declare const printResponseDownloadDocument: (html: string, reservedWindow?: Window) => Promise<void>;
@@ -0,0 +1,11 @@
1
+ export type InteractiveArtifactFrame = {
2
+ placeholder: string;
3
+ title: string;
4
+ content: string;
5
+ };
6
+ /**
7
+ * HTML downloads only. Assemble frames AFTER sanitizing the outer message, so
8
+ * response markup cannot create frames or executable code in the parent page.
9
+ * srcdoc is serialized as an attribute, never interpolated into raw HTML.
10
+ */
11
+ export declare const embedInteractiveArtifacts: (sanitizedDocument: string, artifacts: InteractiveArtifactFrame[]) => string;
@@ -0,0 +1,2 @@
1
+ /** Render with diagram-local settings; never reinitialize the preview's Mermaid instance. */
2
+ export declare const createResponseMermaidImage: (content: string, title: string) => Promise<string>;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Standalone SVGs are decoded as images, never mounted as executable documents.
3
+ * Return an inert PNG that the existing HTML/PDF/Word paths can all embed.
4
+ */
5
+ export declare const createResponseSvgImage: (content: string, title: string) => Promise<string>;
@@ -35,6 +35,7 @@ export type PickaxeMisc = {
35
35
  isTitle: boolean;
36
36
  isDescription: boolean;
37
37
  isHistory?: boolean;
38
+ isResponseDownload?: boolean;
38
39
  };
39
40
  type ValidationStatus = "loading" | "success" | "login_required" | "upgrade_required" | "access_denied" | "stripe_checkout";
40
41
  export type PickaxeDeploymentEmbedType = "inline" | "fab" | "popup" | "chat-input" | "direct-link";
@@ -111,6 +112,7 @@ type PickaxeContextType = {
111
112
  isRtl: boolean;
112
113
  isEmbed: boolean;
113
114
  mcpEnabled: boolean;
115
+ mcpGuestId?: string;
114
116
  isDropShadow: boolean;
115
117
  allowGuestUsage: boolean;
116
118
  persistActiveConversation: boolean;
@@ -164,6 +166,7 @@ export interface IPickaxeProviderProps {
164
166
  isRtl?: boolean;
165
167
  isEmbed?: boolean;
166
168
  mcpEnabled?: boolean;
169
+ mcpGuestId?: string;
167
170
  studioSessionToken?: string | null;
168
171
  isDropShadow?: boolean;
169
172
  allowGuestUsage?: boolean;
@@ -174,5 +177,5 @@ export interface IPickaxeProviderProps {
174
177
  onSessionIdChange?: (sessionId: string) => void;
175
178
  }
176
179
  export declare const PickaxeContext: import("react").Context<PickaxeContextType>;
177
- export declare const PickaxeProvider: ({ children, origin, sender: _sender, senderType: _senderType, deploymentId, portalId, deploymentType, deploymentDimensions, deploymentMisc, styles, colors, limits, misc, translations, artifact, responsiveBy, locale, opacity, forceMobile, disableHtml, disableJs, disableCss, loadFont, isRtl, isEmbed, mcpEnabled, studioSessionToken, isDropShadow, allowGuestUsage, persistActiveConversation, preventInitialSessionId, onUpgrade, onGenerateComplete, onSessionIdChange, }: IPickaxeProviderProps) => import("react/jsx-runtime").JSX.Element;
180
+ export declare const PickaxeProvider: ({ children, origin, sender: _sender, senderType: _senderType, deploymentId, portalId, deploymentType, deploymentDimensions, deploymentMisc, styles, colors, limits, misc, translations, artifact, responsiveBy, locale, opacity, forceMobile, disableHtml, disableJs, disableCss, loadFont, isRtl, isEmbed, mcpEnabled, mcpGuestId, studioSessionToken, isDropShadow, allowGuestUsage, persistActiveConversation, preventInitialSessionId, onUpgrade, onGenerateComplete, onSessionIdChange, }: IPickaxeProviderProps) => import("react/jsx-runtime").JSX.Element;
178
181
  export {};
@@ -0,0 +1,8 @@
1
+ interface PickaxeDownloadButtonProps {
2
+ color: string;
3
+ /** Prepared response text; Markdown and HTML source are preserved. */
4
+ text: string;
5
+ disabled?: boolean;
6
+ }
7
+ declare const PickaxeDownloadButton: ({ color, text, disabled, }: PickaxeDownloadButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default PickaxeDownloadButton;
@@ -38,6 +38,7 @@ export declare const usePickaxeContext: () => {
38
38
  isRtl: boolean;
39
39
  isEmbed: boolean;
40
40
  mcpEnabled: boolean;
41
+ mcpGuestId?: string | undefined;
41
42
  isDropShadow: boolean;
42
43
  allowGuestUsage: boolean;
43
44
  persistActiveConversation: boolean;
package/package.json CHANGED
@@ -1,12 +1,14 @@
1
1
  {
2
2
  "name": "@pickaxeproject/react",
3
- "version": "6.22.0",
3
+ "version": "6.23.0",
4
4
  "description": "Client utility library for Pickaxe",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/pickaxeproject/v2-pickaxe-react.git"
8
8
  },
9
- "sideEffects": false,
9
+ "sideEffects": [
10
+ "./dist/**/node_modules/**/vscode-jsonrpc/lib/common/events.js"
11
+ ],
10
12
  "exports": {
11
13
  ".": {
12
14
  "import": "./dist/esm/index.js",