@chatwidgetai/chat-widget 0.2.3 → 0.2.4

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 (34) hide show
  1. package/dist/actions/google-calendar-appointment/component.d.ts +6 -0
  2. package/dist/actions/google-calendar-appointment/component.d.ts.map +1 -0
  3. package/dist/actions/google-calendar-appointment/handler.d.ts +2 -0
  4. package/dist/actions/google-calendar-appointment/handler.d.ts.map +1 -0
  5. package/dist/actions/google-calendar-appointment/index.d.ts +3 -0
  6. package/dist/actions/google-calendar-appointment/index.d.ts.map +1 -0
  7. package/dist/actions/index.d.ts +3 -0
  8. package/dist/actions/index.d.ts.map +1 -0
  9. package/dist/actions/registry.d.ts +24 -0
  10. package/dist/actions/registry.d.ts.map +1 -0
  11. package/dist/ai-chat-widget.umd.js +803 -300
  12. package/dist/ai-chat-widget.umd.js.map +1 -1
  13. package/dist/api/client.d.ts +8 -20
  14. package/dist/api/client.d.ts.map +1 -1
  15. package/dist/components/ChatWidget.d.ts.map +1 -1
  16. package/dist/components/ChatWindow.d.ts.map +1 -1
  17. package/dist/components/Message.d.ts.map +1 -1
  18. package/dist/components/MessageList.d.ts.map +1 -1
  19. package/dist/components/ToolMessageGroup.d.ts.map +1 -1
  20. package/dist/hooks/useChat.d.ts.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.esm.js +803 -300
  24. package/dist/index.esm.js.map +1 -1
  25. package/dist/index.js +803 -300
  26. package/dist/index.js.map +1 -1
  27. package/dist/types/index.d.ts +86 -40
  28. package/dist/types/index.d.ts.map +1 -1
  29. package/dist/umd.d.ts +2 -1
  30. package/dist/umd.d.ts.map +1 -1
  31. package/dist/utils/sse-parser.d.ts +2 -0
  32. package/dist/utils/sse-parser.d.ts.map +1 -0
  33. package/dist/utils/storage.d.ts.map +1 -1
  34. package/package.json +1 -1
@@ -0,0 +1,6 @@
1
+ import { JSX } from "react";
2
+ import { ConversationMessage } from "../../types";
3
+ export declare function GoogleCalendarAppointmentCard({ message }: {
4
+ message: ConversationMessage;
5
+ }): JSX.Element | null;
6
+ //# sourceMappingURL=component.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/actions/google-calendar-appointment/component.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAqClD,wBAAgB,6BAA6B,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,mBAAmB,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,GAAG,IAAI,CAyL/G"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/actions/google-calendar-appointment/handler.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import "./handler";
2
+ import "./styles.css";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/google-calendar-appointment/index.tsx"],"names":[],"mappings":"AAEA,OAAO,WAAW,CAAC;AACnB,OAAO,cAAc,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./registry";
2
+ import "./google-calendar-appointment";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/actions/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,OAAO,+BAA+B,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { ReactElement } from "react";
2
+ import { ConversationMessage, JsonValue } from "../types";
3
+ export type ActionInput = Record<string, JsonValue>;
4
+ export type ActionState = Record<string, JsonValue>;
5
+ export type ActionContext = {
6
+ widgetId: string;
7
+ conversationId: string;
8
+ toolCallId: string;
9
+ actionId: string;
10
+ implementation: string;
11
+ };
12
+ export type FrontendActionHandler = (input: ActionInput, state: ActionState, context: ActionContext) => Promise<ActionState>;
13
+ export type ActionRenderer = (message: ConversationMessage) => ReactElement | null;
14
+ export type ActionResumeCallback = (state: ActionState) => Promise<void>;
15
+ export declare const frontendActionHandlers: Record<string, FrontendActionHandler>;
16
+ export declare const actionRenderers: Record<string, ActionRenderer>;
17
+ export declare function getFrontendActionHandler(implementation: string): FrontendActionHandler | undefined;
18
+ export declare function getActionRenderer(implementation: string): ActionRenderer | undefined;
19
+ export declare function getActionPrompt(implementation: string): string;
20
+ export declare function waitForActionState(toolCallId: string): Promise<ActionState>;
21
+ export declare function resolveActionState(toolCallId: string, state: ActionState): void;
22
+ export declare function registerActionResumeCallback(toolCallId: string, callback: ActionResumeCallback): void;
23
+ export declare function unregisterActionResumeCallback(toolCallId: string): void;
24
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/actions/registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1D,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AACpD,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;AAEpD,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,CAClC,KAAK,EAAE,WAAW,EAClB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