ordify-chat-widget 1.0.44 → 1.0.46

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 (55) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +17 -13
  3. package/dist/components/AttachmentChips.d.ts +10 -0
  4. package/dist/components/AttachmentChips.d.ts.map +1 -0
  5. package/dist/components/AttachmentPicker.d.ts +16 -0
  6. package/dist/components/AttachmentPicker.d.ts.map +1 -0
  7. package/dist/components/ChatHeader.d.ts +13 -0
  8. package/dist/components/ChatHeader.d.ts.map +1 -0
  9. package/dist/components/Conversation.d.ts +22 -0
  10. package/dist/components/Conversation.d.ts.map +1 -0
  11. package/dist/components/EmbeddedChat.d.ts +9 -0
  12. package/dist/components/EmbeddedChat.d.ts.map +1 -0
  13. package/dist/components/FloatingChat.d.ts +9 -0
  14. package/dist/components/FloatingChat.d.ts.map +1 -0
  15. package/dist/components/Icons.d.ts +10 -0
  16. package/dist/components/Icons.d.ts.map +1 -0
  17. package/dist/components/InlineChat.d.ts +9 -0
  18. package/dist/components/InlineChat.d.ts.map +1 -0
  19. package/dist/components/MarkdownRenderer.d.ts +7 -0
  20. package/dist/components/MarkdownRenderer.d.ts.map +1 -0
  21. package/dist/components/OrdifyChat.d.ts +4 -0
  22. package/dist/components/OrdifyChat.d.ts.map +1 -0
  23. package/dist/components/ProfessionalInput.d.ts +15 -0
  24. package/dist/components/ProfessionalInput.d.ts.map +1 -0
  25. package/dist/components/ResizeHandle.d.ts +8 -0
  26. package/dist/components/ResizeHandle.d.ts.map +1 -0
  27. package/dist/components/SendIcon.d.ts +4 -0
  28. package/dist/components/SendIcon.d.ts.map +1 -0
  29. package/dist/components/WelcomeScreen.d.ts +11 -0
  30. package/dist/components/WelcomeScreen.d.ts.map +1 -0
  31. package/dist/components/styled/ChatComponents.d.ts +45 -0
  32. package/dist/components/styled/ChatComponents.d.ts.map +1 -0
  33. package/dist/hooks/useOrdifyChat.d.ts +4 -0
  34. package/dist/hooks/useOrdifyChat.d.ts.map +1 -0
  35. package/dist/hooks/useOrdifyConfig.d.ts +36 -0
  36. package/dist/hooks/useOrdifyConfig.d.ts.map +1 -0
  37. package/dist/hooks/useWidgetAttachmentStaging.d.ts +16 -0
  38. package/dist/hooks/useWidgetAttachmentStaging.d.ts.map +1 -0
  39. package/dist/index.cjs.js +1182 -0
  40. package/dist/index.d.ts +12 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.esm.js +4482 -0
  43. package/dist/ordify-chat-widget.standalone.js +458 -60
  44. package/dist/ordify-chat-widget.standalone.js.map +1 -1
  45. package/dist/standalone.d.ts +12 -0
  46. package/dist/standalone.d.ts.map +1 -0
  47. package/dist/types/index.d.ts +150 -0
  48. package/dist/types/index.d.ts.map +1 -0
  49. package/dist/utils/api.d.ts +26 -0
  50. package/dist/utils/api.d.ts.map +1 -0
  51. package/dist/utils/attachments.d.ts +6 -0
  52. package/dist/utils/attachments.d.ts.map +1 -0
  53. package/dist/utils/index.d.ts +5 -0
  54. package/dist/utils/index.d.ts.map +1 -0
  55. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.45] - 2026-05-04
9
+
10
+ ### Added
11
+ - **Widget attachments**: Optional `enableAttachments`, `maxAttachmentSizeMB`, `maxAttachments`, and `allowedAttachmentTypes` on `OrdifyConfig`. When enabled with a **publishable key**, users can attach documents and images (paperclip + drag/drop). Files upload to `POST /widget/attachments` and are sent as `attachments` on chat.
12
+ - **`uploadAttachment` on `useOrdifyChat`**: Programmatic upload using the same auth as the widget.
13
+ - **`Message.attachments`**: User bubbles can show attachment chips; history hydration maps server `attachments` when present.
14
+
15
+ ### Notes
16
+ - Embeds using **API key only** cannot use widget upload (picker stays off); use a publishable key for browser uploads.
17
+ - Configure a GCS lifecycle rule on the `widget_attachments/` prefix in your bucket for retention (ops).
18
+
8
19
  ## [1.0.27] - 2024-12-19
9
20
 
10
21
  ### Added
package/README.md CHANGED
@@ -16,13 +16,15 @@ Before integrating the chat widget, ensure you have:
16
16
 
17
17
  - **Node.js**: 18.0.0 or higher
18
18
  - **npm**: 9.0.0 or higher
19
- - **API Key**: Available in your Ordify dashboard (AccountSettings → API)
19
+ - **Publishable Key (`pk_live_...`)**: Create in Ordify dashboard (SettingsPublishable Keys)
20
20
  - **Agent ID**: Found in your agent configuration panel within the Ordify application
21
21
  - **React Application**: Compatible with React 18+ and modern build tools
22
22
 
23
23
 
24
24
  > **🚀 Try it live!** Visit [app.ordify.ai/widget-demo](https://app.ordify.ai/widget-demo) to see all chat modes in action.
25
25
 
26
+ > **Production Security:** Use `publishableKey`/`data-ordify-publishable-key` with allowed origins. Keep account `apiKey` for server-side use only.
27
+
26
28
  ## ✨ Features
27
29
 
28
30
  - 🚀 **Zero Configuration**: No CSS imports or additional setup required
@@ -65,7 +67,7 @@ function App() {
65
67
  return (
66
68
  <OrdifyChat
67
69
  agentId="your-agent-id"
68
- apiKey="your-api-key"
70
+ publishableKey="pk_live_..."
69
71
  apiBaseUrl="https://r.ordify.ai"
70
72
  chatName="AI Assistant"
71
73
  buttonText="Chat with us"
@@ -107,7 +109,7 @@ Load the standalone script from a CDN (use a version number to pin; replace `1.0
107
109
  <script>
108
110
  OrdifyChatWidget.mount(null, {
109
111
  agentId: "your-agent-id",
110
- apiKey: "your-api-key",
112
+ publishableKey: "pk_live_...",
111
113
  apiBaseUrl: "https://r.ordify.ai",
112
114
  mode: "floating",
113
115
  position: "bottom-right",
@@ -123,7 +125,7 @@ Load the standalone script from a CDN (use a version number to pin; replace `1.0
123
125
  <script>
124
126
  OrdifyChatWidget.mount(null, {
125
127
  agentId: "your-agent-id",
126
- apiKey: "your-api-key",
128
+ publishableKey: "pk_live_...",
127
129
  apiBaseUrl: "https://r.ordify.ai",
128
130
  buttonText: "Chat with us"
129
131
  });
@@ -142,7 +144,7 @@ Add a single script tag with `data-ordify-widget` and the required/optional data
142
144
  src="https://unpkg.com/ordify-chat-widget@1.0.38/dist/ordify-chat-widget.standalone.js"
143
145
  data-ordify-widget
144
146
  data-ordify-agent-id="your-agent-id"
145
- data-ordify-api-key="your-api-key"
147
+ data-ordify-publishable-key="pk_live_..."
146
148
  data-ordify-api-base-url="https://r.ordify.ai"
147
149
  data-ordify-button-text="Chat with us"
148
150
  data-ordify-chat-name="AI Assistant"
@@ -150,12 +152,13 @@ Add a single script tag with `data-ordify-widget` and the required/optional data
150
152
  ></script>
151
153
  ```
152
154
 
153
- **Supported data attributes (all optional except agent-id and api-key):**
155
+ **Supported data attributes (all optional except agent-id and one credential):**
154
156
 
155
157
  | Attribute | Description |
156
158
  |-----------|-------------|
157
159
  | `data-ordify-agent-id` | **Required.** Your Ordify agent ID. |
158
- | `data-ordify-api-key` | **Required.** Your API key. |
160
+ | `data-ordify-publishable-key` | Recommended. Your publishable key (`pk_live_...`) for browser embeds. |
161
+ | `data-ordify-api-key` | Legacy/deprecated for browser embeds. Prefer publishable key. |
159
162
  | `data-ordify-api-base-url` | API base URL (default: `https://r.ordify.ai`). |
160
163
  | `data-ordify-button-text` | Floating button label. |
161
164
  | `data-ordify-chat-name` | Chat header title. |
@@ -176,10 +179,10 @@ Add a single script tag with `data-ordify-widget` and the required/optional data
176
179
 
177
180
  **Where to put your API key and Agent ID**
178
181
 
179
- The widget does **not** use a separate config file. You put the Agent ID and API key in the same place as the script:
182
+ The widget does **not** use a separate config file. You put the Agent ID and credential in the same place as the script:
180
183
 
181
- - **Option 1 (script + mount):** In the inline snippet, replace `"your-agent-id"` and `"your-api-key"` with your real values. That snippet lives wherever you add it (theme header/footer or a plugin’s “custom code” field).
182
- - **Option 2 (data attributes):** In the script tag, set `data-ordify-agent-id="your-agent-id"` and `data-ordify-api-key="your-api-key"` (and optionally `data-ordify-api-base-url`). Again, that tag is added via theme or plugin.
184
+ - **Option 1 (script + mount):** In the inline snippet, replace `"your-agent-id"` and `"pk_live_..."` with your real values.
185
+ - **Option 2 (data attributes):** In the script tag, set `data-ordify-agent-id="your-agent-id"` and `data-ordify-publishable-key="pk_live_..."` (and optionally `data-ordify-api-base-url`).
183
186
 
184
187
  So the “config” is the snippet or script tag you paste; the credentials are inside it.
185
188
 
@@ -197,7 +200,7 @@ So the “config” is the snippet or script tag you paste; the credentials are
197
200
  ```tsx
198
201
  <OrdifyChat
199
202
  agentId="your-agent-id"
200
- apiKey="your-api-key"
203
+ publishableKey="pk_live_..."
201
204
  mode="floating"
202
205
  position="bottom-right"
203
206
  buttonText="AI Chat"
@@ -208,7 +211,7 @@ So the “config” is the snippet or script tag you paste; the credentials are
208
211
  ```tsx
209
212
  <OrdifyChat
210
213
  agentId="your-agent-id"
211
- apiKey="your-api-key"
214
+ publishableKey="pk_live_..."
212
215
  mode="embedded"
213
216
  height="500px"
214
217
  chatName="Support Assistant"
@@ -223,7 +226,8 @@ So the “config” is the snippet or script tag you paste; the credentials are
223
226
  | Option | Type | Default | Description |
224
227
  |--------|------|---------|-------------|
225
228
  | `agentId` | string | - | **Required** - Your Ordify agent ID |
226
- | `apiKey` | string | - | **Required** - Your API key |
229
+ | `publishableKey` | string | - | Recommended for browser embeds (`pk_live_...`) |
230
+ | `apiKey` | string | - | Legacy browser credential (supported for migration) |
227
231
  | `apiBaseUrl` | string | - | **Required** - API endpoint URL |
228
232
  | `chatName` | string | "Chat Assistant" | Title text in chat header |
229
233
  | `buttonText` | string | "AI Chat" | Text on floating button |
@@ -0,0 +1,10 @@
1
+ import { AttachmentItem } from '../types';
2
+
3
+ interface AttachmentChipsProps {
4
+ attachments: AttachmentItem[];
5
+ onRemove?: (id: string) => void;
6
+ readOnly?: boolean;
7
+ }
8
+ export declare function AttachmentChips({ attachments, onRemove, readOnly }: AttachmentChipsProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export {};
10
+ //# sourceMappingURL=AttachmentChips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentChips.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentChips.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AA8DxC,UAAU,oBAAoB;IAC5B,WAAW,EAAE,cAAc,EAAE,CAAA;IAC7B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,eAAe,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,kDA4BxF"}
@@ -0,0 +1,16 @@
1
+ import { AttachmentItem } from '../types';
2
+
3
+ interface AttachmentPickerProps {
4
+ disabled?: boolean;
5
+ integrated?: boolean;
6
+ maxFileBytes: number;
7
+ maxFiles: number;
8
+ allowedMime?: readonly string[];
9
+ currentCount: number;
10
+ uploadAttachment: (file: File) => Promise<AttachmentItem>;
11
+ onUploaded: (item: AttachmentItem) => void;
12
+ onError?: (message: string) => void;
13
+ }
14
+ export declare function AttachmentPicker({ disabled, integrated, maxFileBytes, maxFiles, allowedMime, currentCount, uploadAttachment, onUploaded, onError }: AttachmentPickerProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
16
+ //# sourceMappingURL=AttachmentPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AttachmentPicker.d.ts","sourceRoot":"","sources":["../../src/components/AttachmentPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAuFxC,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC/B,YAAY,EAAE,MAAM,CAAA;IACpB,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,cAAc,CAAC,CAAA;IACzD,UAAU,EAAE,CAAC,IAAI,EAAE,cAAc,KAAK,IAAI,CAAA;IAC1C,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAkB,EAClB,YAAY,EACZ,QAAQ,EACR,WAA0C,EAC1C,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,OAAO,EACR,EAAE,qBAAqB,2CA4EvB"}
@@ -0,0 +1,13 @@
1
+ interface ChatHeaderProps {
2
+ chatName?: string;
3
+ showMinimizeButton?: boolean;
4
+ showCloseButton?: boolean;
5
+ onClose?: () => void;
6
+ agentImage?: string;
7
+ className?: string;
8
+ primaryColor?: string;
9
+ showWelcomeScreen?: boolean;
10
+ }
11
+ export declare function ChatHeader({ chatName, showCloseButton, onClose, agentImage, className, primaryColor, showWelcomeScreen }: ChatHeaderProps): import("react/jsx-runtime").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=ChatHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatHeader.d.ts","sourceRoot":"","sources":["../../src/components/ChatHeader.tsx"],"names":[],"mappings":"AAIA,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;CAC5B;AAoID,wBAAgB,UAAU,CAAC,EACzB,QAA2B,EAC3B,eAAsB,EACtB,OAAO,EACP,UAAU,EACV,SAAS,EACT,YAAY,EACZ,iBAAyB,EAC1B,EAAE,eAAe,2CAiCjB"}
@@ -0,0 +1,22 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ConversationProps {
4
+ className?: string;
5
+ children: React.ReactNode;
6
+ style?: React.CSSProperties;
7
+ onDragOver?: React.DragEventHandler<HTMLDivElement>;
8
+ onDragLeave?: React.DragEventHandler<HTMLDivElement>;
9
+ onDrop?: React.DragEventHandler<HTMLDivElement>;
10
+ }
11
+ interface ConversationContentProps {
12
+ className?: string;
13
+ children: React.ReactNode;
14
+ }
15
+ interface ConversationScrollButtonProps {
16
+ className?: string;
17
+ }
18
+ export declare function Conversation({ className, children, style, onDragOver, onDragLeave, onDrop }: ConversationProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function ConversationContent({ className, children }: ConversationContentProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare function ConversationScrollButton({ className }: ConversationScrollButtonProps): false | import("react/jsx-runtime").JSX.Element;
21
+ export {};
22
+ //# sourceMappingURL=Conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../src/components/Conversation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,UAAU,iBAAiB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAC3B,UAAU,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAA;IACnD,WAAW,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAA;IACpD,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAA;CAChD;AAED,UAAU,wBAAwB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,UAAU,6BAA6B;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAoGD,wBAAgB,YAAY,CAAC,EAC3B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,WAAW,EACX,MAAM,EACP,EAAE,iBAAiB,2CAenB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,wBAAwB,2CAMpF;AAED,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,EAAE,6BAA6B,mDAkBpF"}
@@ -0,0 +1,9 @@
1
+ import { OrdifyConfig, UseOrdifyChatReturn } from '../types';
2
+
3
+ interface EmbeddedChatProps {
4
+ config: OrdifyConfig;
5
+ chat: UseOrdifyChatReturn;
6
+ }
7
+ export declare function EmbeddedChat({ config, chat }: EmbeddedChatProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=EmbeddedChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmbeddedChat.d.ts","sourceRoot":"","sources":["../../src/components/EmbeddedChat.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAiB3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CAoO/D"}
@@ -0,0 +1,9 @@
1
+ import { OrdifyConfig, UseOrdifyChatReturn } from '../types';
2
+
3
+ interface FloatingChatProps {
4
+ config: OrdifyConfig;
5
+ chat: UseOrdifyChatReturn;
6
+ }
7
+ export declare function FloatingChat({ config, chat }: FloatingChatProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=FloatingChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingChat.d.ts","sourceRoot":"","sources":["../../src/components/FloatingChat.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAoB3D,UAAU,iBAAiB;IACzB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,iBAAiB,2CA+Q/D"}
@@ -0,0 +1,10 @@
1
+ export declare function MessageSquareIcon({ size }: {
2
+ size?: number;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ export declare function ArrowDownIcon({ size }: {
5
+ size?: number;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ export declare function CloseIcon({ size }: {
8
+ size?: number;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=Icons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Icons.d.ts","sourceRoot":"","sources":["../../src/components/Icons.tsx"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,2CAgBjE;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,2CAiB7D;AAED,wBAAgB,SAAS,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,2CAiBzD"}
@@ -0,0 +1,9 @@
1
+ import { OrdifyConfig, UseOrdifyChatReturn } from '../types';
2
+
3
+ interface InlineChatProps {
4
+ config: OrdifyConfig;
5
+ chat: UseOrdifyChatReturn;
6
+ }
7
+ export declare function InlineChat({ config, chat }: InlineChatProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=InlineChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InlineChat.d.ts","sourceRoot":"","sources":["../../src/components/InlineChat.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAiB3D,UAAU,eAAe;IACvB,MAAM,EAAE,YAAY,CAAA;IACpB,IAAI,EAAE,mBAAmB,CAAA;CAC1B;AAED,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,eAAe,2CAiM3D"}
@@ -0,0 +1,7 @@
1
+ interface MarkdownRendererProps {
2
+ content: string;
3
+ className?: string;
4
+ }
5
+ export declare function MarkdownRenderer({ content, className }: MarkdownRendererProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=MarkdownRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../src/components/MarkdownRenderer.tsx"],"names":[],"mappings":"AA2CA,UAAU,qBAAqB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,qBAAqB,2CA8K7E"}
@@ -0,0 +1,4 @@
1
+ import { OrdifyConfig } from '../types';
2
+
3
+ export declare function OrdifyChat(props: OrdifyConfig): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=OrdifyChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrdifyChat.d.ts","sourceRoot":"","sources":["../../src/components/OrdifyChat.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAItC,wBAAgB,UAAU,CAAC,KAAK,EAAE,YAAY,2CAY7C"}
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+
3
+ interface ProfessionalInputProps {
4
+ value: string;
5
+ onChange: (value: string) => void;
6
+ onKeyDown: (e: React.KeyboardEvent) => void;
7
+ placeholder?: string;
8
+ disabled?: boolean;
9
+ className?: string;
10
+ maxLength?: number;
11
+ variant?: 'default' | 'composer';
12
+ }
13
+ export declare const ProfessionalInput: React.ForwardRefExoticComponent<ProfessionalInputProps & React.RefAttributes<HTMLTextAreaElement>>;
14
+ export {};
15
+ //# sourceMappingURL=ProfessionalInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProfessionalInput.d.ts","sourceRoot":"","sources":["../../src/components/ProfessionalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAA;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,CAAA;CACjC;AAED,eAAO,MAAM,iBAAiB,oGA4C5B,CAAA"}
@@ -0,0 +1,8 @@
1
+ interface ResizeHandleProps {
2
+ onResize: (deltaY: number) => void;
3
+ position?: 'top' | 'bottom';
4
+ className?: string;
5
+ }
6
+ export declare function ResizeHandle({ onResize, position, className }: ResizeHandleProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=ResizeHandle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResizeHandle.d.ts","sourceRoot":"","sources":["../../src/components/ResizeHandle.tsx"],"names":[],"mappings":"AAGA,UAAU,iBAAiB;IACzB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAwCD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,QAAmB,EAAE,SAAS,EAAE,EAAE,iBAAiB,2CAsC3F"}
@@ -0,0 +1,4 @@
1
+ export declare function SendIcon({ size }: {
2
+ size?: number;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=SendIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SendIcon.d.ts","sourceRoot":"","sources":["../../src/components/SendIcon.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,EAAE,IAAS,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,2CAiBxD"}
@@ -0,0 +1,11 @@
1
+ import { OrdifyConfig } from '../types';
2
+
3
+ interface WelcomeScreenProps {
4
+ config: OrdifyConfig;
5
+ onQuestionClick: (question: string) => void;
6
+ onSendMessage: (message: string) => void;
7
+ isLoading: boolean;
8
+ }
9
+ export declare function WelcomeScreen({ config, onQuestionClick, onSendMessage, isLoading }: WelcomeScreenProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=WelcomeScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WelcomeScreen.d.ts","sourceRoot":"","sources":["../../src/components/WelcomeScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AActC,UAAU,kBAAkB;IAC1B,MAAM,EAAE,YAAY,CAAA;IACpB,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,SAAS,EAAE,OAAO,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,kBAAkB,2CA8DtG"}
@@ -0,0 +1,45 @@
1
+ export declare const ChatWidget: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
+ export declare const ChatMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
+ $isUser: boolean;
4
+ }>> & string;
5
+ export declare const ComposerShell: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
+ export declare const ComposerToolbar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ export declare const ComposerInnerInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>> & string;
8
+ export declare const ChatInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
9
+ export declare const ProfessionalInput: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, never>> & string;
10
+ export declare const SendButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
11
+ export declare const ComposerSendButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
12
+ export declare const FloatingButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
13
+ $position?: string;
14
+ $primaryColor?: string;
15
+ }>> & string;
16
+ export declare const ChatWindow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
17
+ $position: string;
18
+ }>> & string;
19
+ export declare const ChatHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
20
+ primaryColor?: string;
21
+ }>> & string;
22
+ export declare const CloseButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
23
+ export declare const Conversation: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
24
+ export declare const LoadingDots: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
25
+ export declare const Timestamp: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
26
+ $isUser: boolean;
27
+ }>> & string;
28
+ export declare const ErrorMessage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
29
+ export declare const ResizeHandle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
30
+ $position: string;
31
+ }>> & string;
32
+ export declare const AgentAvatar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {
33
+ $size?: string;
34
+ }>> & string;
35
+ export declare const WelcomeScreenContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
36
+ $primaryColor?: string;
37
+ }>> & string;
38
+ export declare const WelcomeGreeting: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
39
+ export declare const WelcomeImage: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, never>> & string;
40
+ export declare const WelcomeQuestionsContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
41
+ export declare const QuestionButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {
42
+ $primaryColor?: string;
43
+ }>> & string;
44
+ export declare const WelcomeInputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
45
+ //# sourceMappingURL=ChatComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatComponents.d.ts","sourceRoot":"","sources":["../../../src/components/styled/ChatComponents.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,6NAqCtB,CAAA;AAGD,eAAO,MAAM,WAAW;aAAyB,OAAO;YAyCvD,CAAA;AAED,eAAO,MAAM,aAAa,6NAiCzB,CAAA;AAED,eAAO,MAAM,eAAe,6NAmB3B,CAAA;AAED,eAAO,MAAM,kBAAkB,+OA4C9B,CAAA;AAGD,eAAO,MAAM,SAAS,6NAiBrB,CAAA;AAGD,eAAO,MAAM,iBAAiB,+OA2D7B,CAAA;AAGD,eAAO,MAAM,UAAU,yOAyEtB,CAAA;AAED,eAAO,MAAM,kBAAkB,yOA+F9B,CAAA;AAgBD,eAAO,MAAM,cAAc;gBAA+B,MAAM;oBAAkB,MAAM;YA6DvF,CAAA;AAGD,eAAO,MAAM,UAAU;eAA2B,MAAM;YAsCvD,CAAA;AAGD,eAAO,MAAM,UAAU;mBAA+B,MAAM;YAqB3D,CAAA;AAGD,eAAO,MAAM,WAAW,yOAwBvB,CAAA;AAGD,eAAO,MAAM,YAAY,6NAqDxB,CAAA;AAGD,eAAO,MAAM,WAAW,6NA+BvB,CAAA;AAGD,eAAO,MAAM,SAAS;aAAyB,OAAO;YAYrD,CAAA;AAGD,eAAO,MAAM,YAAY,6NAUxB,CAAA;AAGD,eAAO,MAAM,YAAY;eAA2B,MAAM;YAwBzD,CAAA;AAGD,eAAO,MAAM,WAAW;YAAwB,MAAM;YAQrD,CAAA;AAID,eAAO,MAAM,sBAAsB;oBAAgC,MAAM;YAqCxE,CAAA;AAGD,eAAO,MAAM,eAAe,6NAc3B,CAAA;AAGD,eAAO,MAAM,YAAY,oOAQxB,CAAA;AAGD,eAAO,MAAM,yBAAyB,6NAOrC,CAAA;AAGD,eAAO,MAAM,cAAc;oBAAmC,MAAM;YAoDnE,CAAA;AAGD,eAAO,MAAM,qBAAqB,6NAgBjC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { OrdifyConfig, UseOrdifyChatReturn } from '../types';
2
+
3
+ export declare function useOrdifyChat(config: OrdifyConfig): UseOrdifyChatReturn;
4
+ //# sourceMappingURL=useOrdifyChat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOrdifyChat.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyChat.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2B,YAAY,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AA8BpF,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,mBAAmB,CA+XvE"}
@@ -0,0 +1,36 @@
1
+ import { OrdifyConfig } from '../types';
2
+
3
+ export declare function useOrdifyConfig(config: OrdifyConfig): {
4
+ agentId: string;
5
+ publishableKey: string | undefined;
6
+ apiKey: string | undefined;
7
+ apiBaseUrl: string;
8
+ mode: "floating" | "embedded";
9
+ position: "bottom-right" | "bottom-left" | "top-right" | "top-left";
10
+ theme: "light" | "dark" | "auto";
11
+ placeholder: string;
12
+ height: string | number;
13
+ className: string;
14
+ buttonStyle: import('react').CSSProperties;
15
+ chatWindowStyle: import('react').CSSProperties;
16
+ showHeader: boolean;
17
+ buttonText: string | undefined;
18
+ chatName: string | undefined;
19
+ primaryColor: string | undefined;
20
+ agentImage: string | undefined;
21
+ onMessage: ((message: import('../types').Message) => void) | undefined;
22
+ onError: ((error: Error) => void) | undefined;
23
+ onClose: (() => void) | undefined;
24
+ onSessionCreated: ((sessionId: string) => void) | undefined;
25
+ initialMessage: string | undefined;
26
+ initialContext: string | undefined;
27
+ sessionId: string | undefined;
28
+ quickQuestions: string[] | undefined;
29
+ welcomeMessage: string | undefined;
30
+ welcomeImage: string | undefined;
31
+ enableAttachments: boolean | undefined;
32
+ maxAttachmentSizeMB: number | undefined;
33
+ maxAttachments: number | undefined;
34
+ allowedAttachmentTypes: string[] | undefined;
35
+ };
36
+ //# sourceMappingURL=useOrdifyConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOrdifyConfig.d.ts","sourceRoot":"","sources":["../../src/hooks/useOrdifyConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAGtC,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoDnD"}
@@ -0,0 +1,16 @@
1
+ import { AttachmentItem, OrdifyConfig } from '../types';
2
+
3
+ export declare function useWidgetAttachmentStaging(config: OrdifyConfig, uploadAttachment: (file: File) => Promise<AttachmentItem>): {
4
+ enabled: boolean;
5
+ staged: AttachmentItem[];
6
+ attachmentError: string | null;
7
+ setAttachmentError: import('react').Dispatch<import('react').SetStateAction<string | null>>;
8
+ addFiles: (files: File[]) => Promise<void>;
9
+ appendStaged: (item: AttachmentItem) => void;
10
+ removeStaged: (id: string) => void;
11
+ clearStaged: () => void;
12
+ maxFiles: number;
13
+ maxBytes: number;
14
+ allowed: readonly string[];
15
+ };
16
+ //# sourceMappingURL=useWidgetAttachmentStaging.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWidgetAttachmentStaging.d.ts","sourceRoot":"","sources":["../../src/hooks/useWidgetAttachmentStaging.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAOtD,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,YAAY,EACpB,gBAAgB,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,cAAc,CAAC;;;;;sBAmBzC,IAAI,EAAE;yBA4Cb,cAAc;uBAfe,MAAM;;;;;EAwC7C"}