@duvandroid/react-blind-agents 0.1.0 → 0.2.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/next.d.mts CHANGED
@@ -1,32 +1,70 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
- interface BlindAgentsWidgetProps {
3
+ /** Common props shared by all widget types. */
4
+ interface BaseWidgetProps {
4
5
  /** Your Blind Agents public API key (ba_...) */
5
6
  apiKey: string;
7
+ /** Pre-filled WhatsApp number to skip identity verification */
8
+ userWhatsapp?: string;
9
+ /** Override the CDN base URL (useful for self-hosting) */
10
+ cdnBase?: string;
11
+ /** Script loading strategy @default "afterInteractive" */
12
+ strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';
13
+ /** Called once the script finishes loading */
14
+ onLoad?: () => void;
15
+ /** Called if the script fails to load */
16
+ onError?: (error: Error) => void;
17
+ }
18
+ /** Report / bug-reporter widget */
19
+ interface ReportWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {
6
20
  /** Accent color for the widget UI — any valid CSS color */
7
21
  primaryColor?: string;
8
22
  /** Title displayed in the widget panel header @default "Help Center" */
9
23
  title?: string;
10
24
  /** Label for the report button @default "Report an issue" */
11
25
  reportBtnText?: string;
12
- /** Emoji on the launcher floating button */
26
+ /** Emoji on the launcher floating button @default "🐛" */
13
27
  btnEmoji?: string;
14
28
  /** Tooltip on the launcher button */
15
29
  btnTooltip?: string;
16
30
  /** Text shown when there are no reports @default "No issues reported yet." */
17
31
  emptyText?: string;
18
- /** Pre-fill the user's WhatsApp number or email to skip identity verification */
19
- userWhatsapp?: string;
20
- /** Script loading strategy @default "afterInteractive" */
21
- strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';
22
- /** Override the CDN URL (useful for self-hosting) @default "https://cdn.blindagents.com/report.js" */
32
+ }
33
+ /** Webchat widget */
34
+ interface ChatWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {
35
+ /** The agent UUID to connect this chat to */
36
+ agentId?: string;
37
+ /** Accent color for the chat bubble and header */
38
+ primaryColor?: string;
39
+ }
40
+ /** Product guides widget */
41
+ interface GuideWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {
42
+ }
43
+ /** Root provider props — all children share this apiKey */
44
+ interface BlindAgentsProps extends BaseWidgetProps {
45
+ children: React.ReactNode;
46
+ }
47
+ /** @deprecated Use <BlindAgents apiKey="..."><BlindAgents.Report /></BlindAgents> instead */
48
+ interface BlindAgentsWidgetProps extends BaseWidgetProps {
49
+ primaryColor?: string;
50
+ title?: string;
51
+ reportBtnText?: string;
52
+ btnEmoji?: string;
53
+ btnTooltip?: string;
54
+ emptyText?: string;
55
+ /** @deprecated Prefer userWhatsapp */
23
56
  src?: string;
24
- /** Called once the script finishes loading */
25
- onLoad?: () => void;
26
- /** Called if the script fails to load */
27
- onError?: (error: Error) => void;
28
57
  }
29
58
 
30
- declare function BlindAgentsWidget({ apiKey, primaryColor, title, reportBtnText, btnEmoji, btnTooltip, emptyText, userWhatsapp, strategy, src, onLoad, onError, }: BlindAgentsWidgetProps): react_jsx_runtime.JSX.Element;
59
+ declare function BlindAgents({ apiKey, userWhatsapp, cdnBase, strategy, children, }: BlindAgentsProps): react_jsx_runtime.JSX.Element;
60
+ declare namespace BlindAgents {
61
+ var Report: ({ primaryColor, title, reportBtnText, btnEmoji, btnTooltip, emptyText, userWhatsapp: localWhatsapp, cdnBase: localCdn, strategy: localStrategy, onLoad, onError, }: ReportWidgetProps) => react_jsx_runtime.JSX.Element;
62
+ var Chat: ({ agentId, primaryColor, userWhatsapp: localWhatsapp, cdnBase: localCdn, strategy: localStrategy, onLoad, onError, }: ChatWidgetProps) => react_jsx_runtime.JSX.Element;
63
+ var Guide: ({ userWhatsapp: localWhatsapp, cdnBase: localCdn, strategy: localStrategy, onLoad, onError, }: GuideWidgetProps) => react_jsx_runtime.JSX.Element;
64
+ }
65
+ /** @deprecated Use <BlindAgents><BlindAgents.Report /></BlindAgents> */
66
+ declare function BlindAgentsWidget(props: ReportWidgetProps & {
67
+ apiKey: string;
68
+ }): react_jsx_runtime.JSX.Element;
31
69
 
32
- export { BlindAgentsWidget, type BlindAgentsWidgetProps };
70
+ export { BlindAgents, type BlindAgentsProps, BlindAgentsWidget, type BlindAgentsWidgetProps, type ChatWidgetProps, type GuideWidgetProps, type ReportWidgetProps };
package/dist/next.d.ts CHANGED
@@ -1,32 +1,70 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
 
3
- interface BlindAgentsWidgetProps {
3
+ /** Common props shared by all widget types. */
4
+ interface BaseWidgetProps {
4
5
  /** Your Blind Agents public API key (ba_...) */
5
6
  apiKey: string;
7
+ /** Pre-filled WhatsApp number to skip identity verification */
8
+ userWhatsapp?: string;
9
+ /** Override the CDN base URL (useful for self-hosting) */
10
+ cdnBase?: string;
11
+ /** Script loading strategy @default "afterInteractive" */
12
+ strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';
13
+ /** Called once the script finishes loading */
14
+ onLoad?: () => void;
15
+ /** Called if the script fails to load */
16
+ onError?: (error: Error) => void;
17
+ }
18
+ /** Report / bug-reporter widget */
19
+ interface ReportWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {
6
20
  /** Accent color for the widget UI — any valid CSS color */
7
21
  primaryColor?: string;
8
22
  /** Title displayed in the widget panel header @default "Help Center" */
9
23
  title?: string;
10
24
  /** Label for the report button @default "Report an issue" */
11
25
  reportBtnText?: string;
12
- /** Emoji on the launcher floating button */
26
+ /** Emoji on the launcher floating button @default "🐛" */
13
27
  btnEmoji?: string;
14
28
  /** Tooltip on the launcher button */
15
29
  btnTooltip?: string;
16
30
  /** Text shown when there are no reports @default "No issues reported yet." */
17
31
  emptyText?: string;
18
- /** Pre-fill the user's WhatsApp number or email to skip identity verification */
19
- userWhatsapp?: string;
20
- /** Script loading strategy @default "afterInteractive" */
21
- strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';
22
- /** Override the CDN URL (useful for self-hosting) @default "https://cdn.blindagents.com/report.js" */
32
+ }
33
+ /** Webchat widget */
34
+ interface ChatWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {
35
+ /** The agent UUID to connect this chat to */
36
+ agentId?: string;
37
+ /** Accent color for the chat bubble and header */
38
+ primaryColor?: string;
39
+ }
40
+ /** Product guides widget */
41
+ interface GuideWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {
42
+ }
43
+ /** Root provider props — all children share this apiKey */
44
+ interface BlindAgentsProps extends BaseWidgetProps {
45
+ children: React.ReactNode;
46
+ }
47
+ /** @deprecated Use <BlindAgents apiKey="..."><BlindAgents.Report /></BlindAgents> instead */
48
+ interface BlindAgentsWidgetProps extends BaseWidgetProps {
49
+ primaryColor?: string;
50
+ title?: string;
51
+ reportBtnText?: string;
52
+ btnEmoji?: string;
53
+ btnTooltip?: string;
54
+ emptyText?: string;
55
+ /** @deprecated Prefer userWhatsapp */
23
56
  src?: string;
24
- /** Called once the script finishes loading */
25
- onLoad?: () => void;
26
- /** Called if the script fails to load */
27
- onError?: (error: Error) => void;
28
57
  }
29
58
 
30
- declare function BlindAgentsWidget({ apiKey, primaryColor, title, reportBtnText, btnEmoji, btnTooltip, emptyText, userWhatsapp, strategy, src, onLoad, onError, }: BlindAgentsWidgetProps): react_jsx_runtime.JSX.Element;
59
+ declare function BlindAgents({ apiKey, userWhatsapp, cdnBase, strategy, children, }: BlindAgentsProps): react_jsx_runtime.JSX.Element;
60
+ declare namespace BlindAgents {
61
+ var Report: ({ primaryColor, title, reportBtnText, btnEmoji, btnTooltip, emptyText, userWhatsapp: localWhatsapp, cdnBase: localCdn, strategy: localStrategy, onLoad, onError, }: ReportWidgetProps) => react_jsx_runtime.JSX.Element;
62
+ var Chat: ({ agentId, primaryColor, userWhatsapp: localWhatsapp, cdnBase: localCdn, strategy: localStrategy, onLoad, onError, }: ChatWidgetProps) => react_jsx_runtime.JSX.Element;
63
+ var Guide: ({ userWhatsapp: localWhatsapp, cdnBase: localCdn, strategy: localStrategy, onLoad, onError, }: GuideWidgetProps) => react_jsx_runtime.JSX.Element;
64
+ }
65
+ /** @deprecated Use <BlindAgents><BlindAgents.Report /></BlindAgents> */
66
+ declare function BlindAgentsWidget(props: ReportWidgetProps & {
67
+ apiKey: string;
68
+ }): react_jsx_runtime.JSX.Element;
31
69
 
32
- export { BlindAgentsWidget, type BlindAgentsWidgetProps };
70
+ export { BlindAgents, type BlindAgentsProps, BlindAgentsWidget, type BlindAgentsWidgetProps, type ChatWidgetProps, type GuideWidgetProps, type ReportWidgetProps };
package/dist/next.js CHANGED
@@ -30,48 +30,130 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/next.ts
31
31
  var next_exports = {};
32
32
  __export(next_exports, {
33
+ BlindAgents: () => BlindAgents,
33
34
  BlindAgentsWidget: () => BlindAgentsWidget
34
35
  });
35
36
  module.exports = __toCommonJS(next_exports);
36
37
 
37
- // src/NextBlindAgentsWidget.tsx
38
+ // src/NextBlindAgents.tsx
39
+ var import_react2 = __toESM(require("react"));
38
40
  var import_script = __toESM(require("next/script"));
41
+
42
+ // src/context.ts
43
+ var import_react = require("react");
44
+
45
+ // src/types.ts
46
+ var CDN_BASE = "https://cdn.blindagents.com";
47
+
48
+ // src/context.ts
49
+ var BlindAgentsContext = (0, import_react.createContext)({
50
+ apiKey: "",
51
+ cdnBase: CDN_BASE,
52
+ strategy: "afterInteractive"
53
+ });
54
+
55
+ // src/NextBlindAgents.tsx
39
56
  var import_jsx_runtime = require("react/jsx-runtime");
40
- var CDN_DEFAULT = "https://cdn.blindagents.com/report.js";
41
- function BlindAgentsWidget({
42
- apiKey,
57
+ function Report({
43
58
  primaryColor,
44
59
  title,
45
60
  reportBtnText,
46
61
  btnEmoji,
47
62
  btnTooltip,
48
63
  emptyText,
49
- userWhatsapp,
50
- strategy = "afterInteractive",
51
- src = CDN_DEFAULT,
64
+ userWhatsapp: localWhatsapp,
65
+ cdnBase: localCdn,
66
+ strategy: localStrategy,
52
67
  onLoad,
53
68
  onError
54
69
  }) {
70
+ const ctx = import_react2.default.useContext(BlindAgentsContext);
71
+ const src = `${localCdn ?? ctx.cdnBase}/report.js`;
72
+ const wa = localWhatsapp ?? ctx.userWhatsapp ?? "";
55
73
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
74
  import_script.default,
57
75
  {
58
76
  src,
59
- strategy,
60
- "data-api-key": apiKey,
77
+ strategy: localStrategy ?? ctx.strategy,
78
+ "data-api-key": ctx.apiKey,
61
79
  "data-primary-color": primaryColor,
62
80
  "data-title": title,
63
81
  "data-report-btn-text": reportBtnText,
64
82
  "data-btn-emoji": btnEmoji,
65
83
  "data-btn-tooltip": btnTooltip,
66
84
  "data-empty-text": emptyText,
67
- "data-user-whatsapp": userWhatsapp ?? "",
85
+ "data-user-whatsapp": wa,
86
+ onLoad,
87
+ onError: onError ? () => onError(new Error(`Failed to load ${src}`)) : void 0
88
+ }
89
+ );
90
+ }
91
+ function Chat({
92
+ agentId,
93
+ primaryColor,
94
+ userWhatsapp: localWhatsapp,
95
+ cdnBase: localCdn,
96
+ strategy: localStrategy,
97
+ onLoad,
98
+ onError
99
+ }) {
100
+ const ctx = import_react2.default.useContext(BlindAgentsContext);
101
+ const src = `${localCdn ?? ctx.cdnBase}/chat.js`;
102
+ const wa = localWhatsapp ?? ctx.userWhatsapp ?? "";
103
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
104
+ import_script.default,
105
+ {
106
+ src,
107
+ strategy: localStrategy ?? ctx.strategy,
108
+ "data-api-key": ctx.apiKey,
109
+ "data-agent-id": agentId,
110
+ "data-primary-color": primaryColor,
111
+ "data-user-whatsapp": wa,
112
+ onLoad,
113
+ onError: onError ? () => onError(new Error(`Failed to load ${src}`)) : void 0
114
+ }
115
+ );
116
+ }
117
+ function Guide({
118
+ userWhatsapp: localWhatsapp,
119
+ cdnBase: localCdn,
120
+ strategy: localStrategy,
121
+ onLoad,
122
+ onError
123
+ }) {
124
+ const ctx = import_react2.default.useContext(BlindAgentsContext);
125
+ const src = `${localCdn ?? ctx.cdnBase}/guide.js`;
126
+ const wa = localWhatsapp ?? ctx.userWhatsapp ?? "";
127
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
128
+ import_script.default,
129
+ {
130
+ src,
131
+ strategy: localStrategy ?? ctx.strategy,
132
+ "data-api-key": ctx.apiKey,
133
+ "data-user-whatsapp": wa,
68
134
  onLoad,
69
135
  onError: onError ? () => onError(new Error(`Failed to load ${src}`)) : void 0
70
136
  }
71
137
  );
72
138
  }
139
+ function BlindAgents({
140
+ apiKey,
141
+ userWhatsapp,
142
+ cdnBase = CDN_BASE,
143
+ strategy = "afterInteractive",
144
+ children
145
+ }) {
146
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlindAgentsContext.Provider, { value: { apiKey, userWhatsapp, cdnBase, strategy }, children });
147
+ }
148
+ BlindAgents.Report = Report;
149
+ BlindAgents.Chat = Chat;
150
+ BlindAgents.Guide = Guide;
151
+ function BlindAgentsWidget(props) {
152
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlindAgents, { apiKey: props.apiKey, userWhatsapp: props.userWhatsapp, strategy: props.strategy, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Report, { ...props }) });
153
+ }
73
154
  // Annotate the CommonJS export names for ESM import in node:
74
155
  0 && (module.exports = {
156
+ BlindAgents,
75
157
  BlindAgentsWidget
76
158
  });
77
159
  //# sourceMappingURL=next.js.map
package/dist/next.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/next.ts","../src/NextBlindAgentsWidget.tsx"],"sourcesContent":["// Next.js entry (App Router + Pages Router)\n// Uses next/script for correct hydration and strategy support.\nexport { BlindAgentsWidget } from './NextBlindAgentsWidget';\nexport type { BlindAgentsWidgetProps } from './types';\n","'use client';\n\n// This file is only included in the `react-blind-agents/next` subpath entry.\n// It relies on `next/script` which is NOT available in plain React apps.\nimport Script from 'next/script';\nimport type { BlindAgentsWidgetProps } from './types';\n\nconst CDN_DEFAULT = 'https://cdn.blindagents.com/report.js';\n\nexport function BlindAgentsWidget({\n apiKey,\n primaryColor,\n title,\n reportBtnText,\n btnEmoji,\n btnTooltip,\n emptyText,\n userWhatsapp,\n strategy = 'afterInteractive',\n src = CDN_DEFAULT,\n onLoad,\n onError,\n}: BlindAgentsWidgetProps) {\n return (\n <Script\n src={src}\n strategy={strategy}\n data-api-key={apiKey}\n data-primary-color={primaryColor}\n data-title={title}\n data-report-btn-text={reportBtnText}\n data-btn-emoji={btnEmoji}\n data-btn-tooltip={btnTooltip}\n data-empty-text={emptyText}\n data-user-whatsapp={userWhatsapp ?? ''}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIA,oBAAmB;AAoBf;AAjBJ,IAAM,cAAc;AAEb,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,MAAM;AAAA,EACN;AAAA,EACA;AACF,GAA2B;AACzB,SACE;AAAA,IAAC,cAAAA;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,gBAAc;AAAA,MACd,sBAAoB;AAAA,MACpB,cAAY;AAAA,MACZ,wBAAsB;AAAA,MACtB,kBAAgB;AAAA,MAChB,oBAAkB;AAAA,MAClB,mBAAiB;AAAA,MACjB,sBAAoB,gBAAgB;AAAA,MACpC;AAAA,MACA,SAAS,UAAU,MAAM,QAAQ,IAAI,MAAM,kBAAkB,GAAG,EAAE,CAAC,IAAI;AAAA;AAAA,EACzE;AAEJ;","names":["Script"]}
1
+ {"version":3,"sources":["../src/next.ts","../src/NextBlindAgents.tsx","../src/context.ts","../src/types.ts"],"sourcesContent":["// Next.js entry (App Router + Pages Router)\n// Uses next/script for correct hydration and strategy support.\nexport { BlindAgents, BlindAgentsWidget } from './NextBlindAgents';\nexport type {\n BlindAgentsProps,\n ReportWidgetProps,\n ChatWidgetProps,\n GuideWidgetProps,\n BlindAgentsWidgetProps,\n} from './types';\n","'use client';\n\n// Next.js subpath entry uses next/script for correct strategy & hydration.\nimport React from 'react';\nimport Script from 'next/script';\nimport { BlindAgentsContext } from './context';\nimport type {\n BlindAgentsProps,\n ReportWidgetProps,\n ChatWidgetProps,\n GuideWidgetProps,\n} from './types';\nimport { CDN_BASE } from './types';\n\n// ── Widget sub-components ─────────────────────────────────────────────────────\n\nfunction Report({\n primaryColor,\n title,\n reportBtnText,\n btnEmoji,\n btnTooltip,\n emptyText,\n userWhatsapp: localWhatsapp,\n cdnBase: localCdn,\n strategy: localStrategy,\n onLoad,\n onError,\n}: ReportWidgetProps) {\n const ctx = React.useContext(BlindAgentsContext);\n const src = `${localCdn ?? ctx.cdnBase}/report.js`;\n const wa = localWhatsapp ?? ctx.userWhatsapp ?? '';\n\n return (\n <Script\n src={src}\n strategy={localStrategy ?? ctx.strategy}\n data-api-key={ctx.apiKey}\n data-primary-color={primaryColor}\n data-title={title}\n data-report-btn-text={reportBtnText}\n data-btn-emoji={btnEmoji}\n data-btn-tooltip={btnTooltip}\n data-empty-text={emptyText}\n data-user-whatsapp={wa}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n\nfunction Chat({\n agentId,\n primaryColor,\n userWhatsapp: localWhatsapp,\n cdnBase: localCdn,\n strategy: localStrategy,\n onLoad,\n onError,\n}: ChatWidgetProps) {\n const ctx = React.useContext(BlindAgentsContext);\n const src = `${localCdn ?? ctx.cdnBase}/chat.js`;\n const wa = localWhatsapp ?? ctx.userWhatsapp ?? '';\n\n return (\n <Script\n src={src}\n strategy={localStrategy ?? ctx.strategy}\n data-api-key={ctx.apiKey}\n data-agent-id={agentId}\n data-primary-color={primaryColor}\n data-user-whatsapp={wa}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n\nfunction Guide({\n userWhatsapp: localWhatsapp,\n cdnBase: localCdn,\n strategy: localStrategy,\n onLoad,\n onError,\n}: GuideWidgetProps) {\n const ctx = React.useContext(BlindAgentsContext);\n const src = `${localCdn ?? ctx.cdnBase}/guide.js`;\n const wa = localWhatsapp ?? ctx.userWhatsapp ?? '';\n\n return (\n <Script\n src={src}\n strategy={localStrategy ?? ctx.strategy}\n data-api-key={ctx.apiKey}\n data-user-whatsapp={wa}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n\n// ── Root provider ─────────────────────────────────────────────────────────────\n\nexport function BlindAgents({\n apiKey,\n userWhatsapp,\n cdnBase = CDN_BASE,\n strategy = 'afterInteractive',\n children,\n}: BlindAgentsProps) {\n return (\n <BlindAgentsContext.Provider value={{ apiKey, userWhatsapp, cdnBase, strategy }}>\n {children}\n </BlindAgentsContext.Provider>\n );\n}\n\nBlindAgents.Report = Report;\nBlindAgents.Chat = Chat;\nBlindAgents.Guide = Guide;\n\n// ── Legacy single-widget export (backwards compat) ───────────────────────────\n/** @deprecated Use <BlindAgents><BlindAgents.Report /></BlindAgents> */\nexport function BlindAgentsWidget(props: ReportWidgetProps & { apiKey: string }) {\n return (\n <BlindAgents apiKey={props.apiKey} userWhatsapp={props.userWhatsapp} strategy={props.strategy}>\n <Report {...props} />\n </BlindAgents>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { CDN_BASE } from './types';\n\nexport interface BlindAgentsContextValue {\n apiKey: string;\n userWhatsapp?: string;\n cdnBase: string;\n strategy: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';\n}\n\nexport const BlindAgentsContext = createContext<BlindAgentsContextValue>({\n apiKey: '',\n cdnBase: CDN_BASE,\n strategy: 'afterInteractive',\n});\n\nexport function useBlindAgents(): BlindAgentsContextValue {\n return useContext(BlindAgentsContext);\n}\n","const CDN_BASE = 'https://cdn.blindagents.com';\n\nexport { CDN_BASE };\n\n/** Common props shared by all widget types. */\nexport interface BaseWidgetProps {\n /** Your Blind Agents public API key (ba_...) */\n apiKey: string;\n /** Pre-filled WhatsApp number to skip identity verification */\n userWhatsapp?: string;\n /** Override the CDN base URL (useful for self-hosting) */\n cdnBase?: string;\n /** Script loading strategy @default \"afterInteractive\" */\n strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';\n /** Called once the script finishes loading */\n onLoad?: () => void;\n /** Called if the script fails to load */\n onError?: (error: Error) => void;\n}\n\n/** Report / bug-reporter widget */\nexport interface ReportWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {\n /** Accent color for the widget UI — any valid CSS color */\n primaryColor?: string;\n /** Title displayed in the widget panel header @default \"Help Center\" */\n title?: string;\n /** Label for the report button @default \"Report an issue\" */\n reportBtnText?: string;\n /** Emoji on the launcher floating button @default \"🐛\" */\n btnEmoji?: string;\n /** Tooltip on the launcher button */\n btnTooltip?: string;\n /** Text shown when there are no reports @default \"No issues reported yet.\" */\n emptyText?: string;\n}\n\n/** Webchat widget */\nexport interface ChatWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {\n /** The agent UUID to connect this chat to */\n agentId?: string;\n /** Accent color for the chat bubble and header */\n primaryColor?: string;\n}\n\n/** Product guides widget */\nexport interface GuideWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {\n // No additional props yet — the guide SDK reads config from the dashboard\n}\n\n/** Root provider props — all children share this apiKey */\nexport interface BlindAgentsProps extends BaseWidgetProps {\n children: React.ReactNode;\n}\n\n// ── Legacy single-widget props (kept for backwards compatibility) ──────────────\n/** @deprecated Use <BlindAgents apiKey=\"...\"><BlindAgents.Report /></BlindAgents> instead */\nexport interface BlindAgentsWidgetProps extends BaseWidgetProps {\n primaryColor?: string;\n title?: string;\n reportBtnText?: string;\n btnEmo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HANGED
@@ -1,40 +1,121 @@
1
- // src/NextBlindAgentsWidget.tsx
1
+ // src/NextBlindAgents.tsx
2
+ import React from "react";
2
3
  import Script from "next/script";
4
+
5
+ // src/context.ts
6
+ import { createContext, useContext } from "react";
7
+
8
+ // src/types.ts
9
+ var CDN_BASE = "https://cdn.blindagents.com";
10
+
11
+ // src/context.ts
12
+ var BlindAgentsContext = createContext({
13
+ apiKey: "",
14
+ cdnBase: CDN_BASE,
15
+ strategy: "afterInteractive"
16
+ });
17
+
18
+ // src/NextBlindAgents.tsx
3
19
  import { jsx } from "react/jsx-runtime";
4
- var CDN_DEFAULT = "https://cdn.blindagents.com/report.js";
5
- function BlindAgentsWidget({
6
- apiKey,
20
+ function Report({
7
21
  primaryColor,
8
22
  title,
9
23
  reportBtnText,
10
24
  btnEmoji,
11
25
  btnTooltip,
12
26
  emptyText,
13
- userWhatsapp,
14
- strategy = "afterInteractive",
15
- src = CDN_DEFAULT,
27
+ userWhatsapp: localWhatsapp,
28
+ cdnBase: localCdn,
29
+ strategy: localStrategy,
16
30
  onLoad,
17
31
  onError
18
32
  }) {
33
+ const ctx = React.useContext(BlindAgentsContext);
34
+ const src = `${localCdn ?? ctx.cdnBase}/report.js`;
35
+ const wa = localWhatsapp ?? ctx.userWhatsapp ?? "";
19
36
  return /* @__PURE__ */ jsx(
20
37
  Script,
21
38
  {
22
39
  src,
23
- strategy,
24
- "data-api-key": apiKey,
40
+ strategy: localStrategy ?? ctx.strategy,
41
+ "data-api-key": ctx.apiKey,
25
42
  "data-primary-color": primaryColor,
26
43
  "data-title": title,
27
44
  "data-report-btn-text": reportBtnText,
28
45
  "data-btn-emoji": btnEmoji,
29
46
  "data-btn-tooltip": btnTooltip,
30
47
  "data-empty-text": emptyText,
31
- "data-user-whatsapp": userWhatsapp ?? "",
48
+ "data-user-whatsapp": wa,
49
+ onLoad,
50
+ onError: onError ? () => onError(new Error(`Failed to load ${src}`)) : void 0
51
+ }
52
+ );
53
+ }
54
+ function Chat({
55
+ agentId,
56
+ primaryColor,
57
+ userWhatsapp: localWhatsapp,
58
+ cdnBase: localCdn,
59
+ strategy: localStrategy,
60
+ onLoad,
61
+ onError
62
+ }) {
63
+ const ctx = React.useContext(BlindAgentsContext);
64
+ const src = `${localCdn ?? ctx.cdnBase}/chat.js`;
65
+ const wa = localWhatsapp ?? ctx.userWhatsapp ?? "";
66
+ return /* @__PURE__ */ jsx(
67
+ Script,
68
+ {
69
+ src,
70
+ strategy: localStrategy ?? ctx.strategy,
71
+ "data-api-key": ctx.apiKey,
72
+ "data-agent-id": agentId,
73
+ "data-primary-color": primaryColor,
74
+ "data-user-whatsapp": wa,
32
75
  onLoad,
33
76
  onError: onError ? () => onError(new Error(`Failed to load ${src}`)) : void 0
34
77
  }
35
78
  );
36
79
  }
80
+ function Guide({
81
+ userWhatsapp: localWhatsapp,
82
+ cdnBase: localCdn,
83
+ strategy: localStrategy,
84
+ onLoad,
85
+ onError
86
+ }) {
87
+ const ctx = React.useContext(BlindAgentsContext);
88
+ const src = `${localCdn ?? ctx.cdnBase}/guide.js`;
89
+ const wa = localWhatsapp ?? ctx.userWhatsapp ?? "";
90
+ return /* @__PURE__ */ jsx(
91
+ Script,
92
+ {
93
+ src,
94
+ strategy: localStrategy ?? ctx.strategy,
95
+ "data-api-key": ctx.apiKey,
96
+ "data-user-whatsapp": wa,
97
+ onLoad,
98
+ onError: onError ? () => onError(new Error(`Failed to load ${src}`)) : void 0
99
+ }
100
+ );
101
+ }
102
+ function BlindAgents({
103
+ apiKey,
104
+ userWhatsapp,
105
+ cdnBase = CDN_BASE,
106
+ strategy = "afterInteractive",
107
+ children
108
+ }) {
109
+ return /* @__PURE__ */ jsx(BlindAgentsContext.Provider, { value: { apiKey, userWhatsapp, cdnBase, strategy }, children });
110
+ }
111
+ BlindAgents.Report = Report;
112
+ BlindAgents.Chat = Chat;
113
+ BlindAgents.Guide = Guide;
114
+ function BlindAgentsWidget(props) {
115
+ return /* @__PURE__ */ jsx(BlindAgents, { apiKey: props.apiKey, userWhatsapp: props.userWhatsapp, strategy: props.strategy, children: /* @__PURE__ */ jsx(Report, { ...props }) });
116
+ }
37
117
  export {
118
+ BlindAgents,
38
119
  BlindAgentsWidget
39
120
  };
40
121
  //# sourceMappingURL=next.mjs.map
package/dist/next.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/NextBlindAgentsWidget.tsx"],"sourcesContent":["'use client';\n\n// This file is only included in the `react-blind-agents/next` subpath entry.\n// It relies on `next/script` which is NOT available in plain React apps.\nimport Script from 'next/script';\nimport type { BlindAgentsWidgetProps } from './types';\n\nconst CDN_DEFAULT = 'https://cdn.blindagents.com/report.js';\n\nexport function BlindAgentsWidget({\n apiKey,\n primaryColor,\n title,\n reportBtnText,\n btnEmoji,\n btnTooltip,\n emptyText,\n userWhatsapp,\n strategy = 'afterInteractive',\n src = CDN_DEFAULT,\n onLoad,\n onError,\n}: BlindAgentsWidgetProps) {\n return (\n <Script\n src={src}\n strategy={strategy}\n data-api-key={apiKey}\n data-primary-color={primaryColor}\n data-title={title}\n data-report-btn-text={reportBtnText}\n data-btn-emoji={btnEmoji}\n data-btn-tooltip={btnTooltip}\n data-empty-text={emptyText}\n data-user-whatsapp={userWhatsapp ?? ''}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n"],"mappings":";AAIA,OAAO,YAAY;AAoBf;AAjBJ,IAAM,cAAc;AAEb,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,MAAM;AAAA,EACN;AAAA,EACA;AACF,GAA2B;AACzB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,gBAAc;AAAA,MACd,sBAAoB;AAAA,MACpB,cAAY;AAAA,MACZ,wBAAsB;AAAA,MACtB,kBAAgB;AAAA,MAChB,oBAAkB;AAAA,MAClB,mBAAiB;AAAA,MACjB,sBAAoB,gBAAgB;AAAA,MACpC;AAAA,MACA,SAAS,UAAU,MAAM,QAAQ,IAAI,MAAM,kBAAkB,GAAG,EAAE,CAAC,IAAI;AAAA;AAAA,EACzE;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../src/NextBlindAgents.tsx","../src/context.ts","../src/types.ts"],"sourcesContent":["'use client';\n\n// Next.js subpath entry uses next/script for correct strategy & hydration.\nimport React from 'react';\nimport Script from 'next/script';\nimport { BlindAgentsContext } from './context';\nimport type {\n BlindAgentsProps,\n ReportWidgetProps,\n ChatWidgetProps,\n GuideWidgetProps,\n} from './types';\nimport { CDN_BASE } from './types';\n\n// ── Widget sub-components ─────────────────────────────────────────────────────\n\nfunction Report({\n primaryColor,\n title,\n reportBtnText,\n btnEmoji,\n btnTooltip,\n emptyText,\n userWhatsapp: localWhatsapp,\n cdnBase: localCdn,\n strategy: localStrategy,\n onLoad,\n onError,\n}: ReportWidgetProps) {\n const ctx = React.useContext(BlindAgentsContext);\n const src = `${localCdn ?? ctx.cdnBase}/report.js`;\n const wa = localWhatsapp ?? ctx.userWhatsapp ?? '';\n\n return (\n <Script\n src={src}\n strategy={localStrategy ?? ctx.strategy}\n data-api-key={ctx.apiKey}\n data-primary-color={primaryColor}\n data-title={title}\n data-report-btn-text={reportBtnText}\n data-btn-emoji={btnEmoji}\n data-btn-tooltip={btnTooltip}\n data-empty-text={emptyText}\n data-user-whatsapp={wa}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n\nfunction Chat({\n agentId,\n primaryColor,\n userWhatsapp: localWhatsapp,\n cdnBase: localCdn,\n strategy: localStrategy,\n onLoad,\n onError,\n}: ChatWidgetProps) {\n const ctx = React.useContext(BlindAgentsContext);\n const src = `${localCdn ?? ctx.cdnBase}/chat.js`;\n const wa = localWhatsapp ?? ctx.userWhatsapp ?? '';\n\n return (\n <Script\n src={src}\n strategy={localStrategy ?? ctx.strategy}\n data-api-key={ctx.apiKey}\n data-agent-id={agentId}\n data-primary-color={primaryColor}\n data-user-whatsapp={wa}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n\nfunction Guide({\n userWhatsapp: localWhatsapp,\n cdnBase: localCdn,\n strategy: localStrategy,\n onLoad,\n onError,\n}: GuideWidgetProps) {\n const ctx = React.useContext(BlindAgentsContext);\n const src = `${localCdn ?? ctx.cdnBase}/guide.js`;\n const wa = localWhatsapp ?? ctx.userWhatsapp ?? '';\n\n return (\n <Script\n src={src}\n strategy={localStrategy ?? ctx.strategy}\n data-api-key={ctx.apiKey}\n data-user-whatsapp={wa}\n onLoad={onLoad}\n onError={onError ? () => onError(new Error(`Failed to load ${src}`)) : undefined}\n />\n );\n}\n\n// ── Root provider ─────────────────────────────────────────────────────────────\n\nexport function BlindAgents({\n apiKey,\n userWhatsapp,\n cdnBase = CDN_BASE,\n strategy = 'afterInteractive',\n children,\n}: BlindAgentsProps) {\n return (\n <BlindAgentsContext.Provider value={{ apiKey, userWhatsapp, cdnBase, strategy }}>\n {children}\n </BlindAgentsContext.Provider>\n );\n}\n\nBlindAgents.Report = Report;\nBlindAgents.Chat = Chat;\nBlindAgents.Guide = Guide;\n\n// ── Legacy single-widget export (backwards compat) ───────────────────────────\n/** @deprecated Use <BlindAgents><BlindAgents.Report /></BlindAgents> */\nexport function BlindAgentsWidget(props: ReportWidgetProps & { apiKey: string }) {\n return (\n <BlindAgents apiKey={props.apiKey} userWhatsapp={props.userWhatsapp} strategy={props.strategy}>\n <Report {...props} />\n </BlindAgents>\n );\n}\n","import { createContext, useContext } from 'react';\nimport { CDN_BASE } from './types';\n\nexport interface BlindAgentsContextValue {\n apiKey: string;\n userWhatsapp?: string;\n cdnBase: string;\n strategy: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';\n}\n\nexport const BlindAgentsContext = createContext<BlindAgentsContextValue>({\n apiKey: '',\n cdnBase: CDN_BASE,\n strategy: 'afterInteractive',\n});\n\nexport function useBlindAgents(): BlindAgentsContextValue {\n return useContext(BlindAgentsContext);\n}\n","const CDN_BASE = 'https://cdn.blindagents.com';\n\nexport { CDN_BASE };\n\n/** Common props shared by all widget types. */\nexport interface BaseWidgetProps {\n /** Your Blind Agents public API key (ba_...) */\n apiKey: string;\n /** Pre-filled WhatsApp number to skip identity verification */\n userWhatsapp?: string;\n /** Override the CDN base URL (useful for self-hosting) */\n cdnBase?: string;\n /** Script loading strategy @default \"afterInteractive\" */\n strategy?: 'afterInteractive' | 'lazyOnload' | 'beforeInteractive';\n /** Called once the script finishes loading */\n onLoad?: () => void;\n /** Called if the script fails to load */\n onError?: (error: Error) => void;\n}\n\n/** Report / bug-reporter widget */\nexport interface ReportWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {\n /** Accent color for the widget UI — any valid CSS color */\n primaryColor?: string;\n /** Title displayed in the widget panel header @default \"Help Center\" */\n title?: string;\n /** Label for the report button @default \"Report an issue\" */\n reportBtnText?: string;\n /** Emoji on the launcher floating button @default \"🐛\" */\n btnEmoji?: string;\n /** Tooltip on the launcher button */\n btnTooltip?: string;\n /** Text shown when there are no reports @default \"No issues reported yet.\" */\n emptyText?: string;\n}\n\n/** Webchat widget */\nexport interface ChatWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {\n /** The agent UUID to connect this chat to */\n agentId?: string;\n /** Accent color for the chat bubble and header */\n primaryColor?: string;\n}\n\n/** Product guides widget */\nexport interface GuideWidgetProps extends Omit<BaseWidgetProps, 'apiKey'> {\n // No additional props yet — the guide SDK reads config from the dashboard\n}\n\n/** Root provider props — all children share this apiKey */\nexport interface BlindAgentsProps extends BaseWidgetProps {\n children: React.ReactNode;\n}\n\n// ── Legacy single-widget props (kept for backwards compatibility) ──────────────\n/** @deprecated Use <BlindAgents apiKey=\"...\"><BlindAgents.Report /></BlindAgents> instead */\nexport interface BlindAgentsWidgetProps extends BaseWidgetProps {\n primaryColor?: string;\n title?: string;\n reportBtnText?: string;\n btnEmoji?: string;\n btnTooltip?: string;\n emptyText?: string;\n /** @deprecated Prefer userWhatsapp */\n src?: string;\n}\n"],"mappings":";AAGA,OAAO,WAAW;AAClB,OAAO,YAAY;;;ACJnB,SAAS,eAAe,kBAAkB;;;ACA1C,IAAM,WAAW;;;ADUV,IAAM,qBAAqB,cAAuC;AAAA,EACvE,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AACZ,CAAC;;;ADoBG;AAlBJ,SAAS,OAAO;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV;AAAA,EACA;AACF,GAAsB;AACpB,QAAM,MAAM,MAAM,WAAW,kBAAkB;AAC/C,QAAM,MAAM,GAAG,YAAY,IAAI,OAAO;AACtC,QAAM,KAAM,iBAAiB,IAAI,gBAAgB;AAEjD,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,UAAU,iBAAiB,IAAI;AAAA,MAC/B,gBAAc,IAAI;AAAA,MAClB,sBAAoB;AAAA,MACpB,cAAY;AAAA,MACZ,wBAAsB;AAAA,MACtB,kBAAgB;AAAA,MAChB,oBAAkB;AAAA,MAClB,mBAAiB;AAAA,MACjB,sBAAoB;AAAA,MACpB;AAAA,MACA,SAAS,UAAU,MAAM,QAAQ,IAAI,MAAM,kBAAkB,GAAG,EAAE,CAAC,IAAI;AAAA;AAAA,EACzE;AAEJ;AAEA,SAAS,KAAK;AAAA,EACZ;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AAAA,EACV;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,MAAM,MAAM,WAAW,kBAAkB;AAC/C,QAAM,MAAM,GAAG,YAAY,IAAI,OAAO;AACtC,QAAM,KAAM,iBAAiB,IAAI,gBAAgB;AAEjD,SACE;AAAA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
4
4
  "description": "React component for the Blind Agents pixel widget — bug reporter, webchat, and product guides.",
5
5
  "author": "Blind Agents <hola@blindagents.com>",
6
6
  "license": "MIT",
7
- "keywords": ["react", "blind-agents", "widget", "bug-reporter", "webchat", "next"],
7
+ "keywords": [
8
+ "react",
9
+ "blind-agents",
10
+ "widget",
11
+ "bug-reporter",
12
+ "webchat",
13
+ "next"
14
+ ],
8
15
  "main": "./dist/index.cjs",
9
16
  "module": "./dist/index.js",
10
17
  "types": "./dist/index.d.ts",