@shaimaababiker/embed 0.1.4 → 0.1.5
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/index.d.ts +31 -0
- package/package.json +1 -1
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
type AssistlyChatProps = {
|
|
4
|
+
chatbotId: number;
|
|
5
|
+
/** Origin of the Assistly deployment that hosts the chat API, e.g. https://chatbot-xi-rose-68.vercel.app */
|
|
6
|
+
origin: string;
|
|
7
|
+
/** Optional brand color for accents (tints the brass accent + online dot) */
|
|
8
|
+
primaryColor?: string;
|
|
9
|
+
/** Fires when the chat panel has mounted and is ready to receive input */
|
|
10
|
+
onReady?: () => void;
|
|
11
|
+
/** Fires if the chat fails to mount */
|
|
12
|
+
onError?: (err: Error) => void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Embeddable Assistly chat panel. Renders the full chat UI (intake form +
|
|
16
|
+
* active chat) inside whatever container the customer places it in. Talks
|
|
17
|
+
* directly to the Assistly API at `${origin}/api/...` — no iframe, no
|
|
18
|
+
* cross-origin cookie issues.
|
|
19
|
+
*
|
|
20
|
+
* Styling is inlined into the published JS bundle (esbuild `text` loader
|
|
21
|
+
* at build time, injected into <head> on mount). Consumers only need:
|
|
22
|
+
*
|
|
23
|
+
* import { AssistlyChat } from '@shaimaababiker/embed';
|
|
24
|
+
*
|
|
25
|
+
* Theme tokens are exposed as CSS variables on the root wrapper, e.g.
|
|
26
|
+
* `--assistly-brass`, `--assistly-ink`, `--assistly-paper`, so the host
|
|
27
|
+
* page can override them at any ancestor level.
|
|
28
|
+
*/
|
|
29
|
+
declare function AssistlyChat({ chatbotId, origin, primaryColor, onReady, onError, }: AssistlyChatProps): react_jsx_runtime.JSX.Element | null;
|
|
30
|
+
|
|
31
|
+
export { AssistlyChat, type AssistlyChatProps };
|
package/package.json
CHANGED