@askly/widget 2.11.0 → 3.0.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 (46) hide show
  1. package/MIGRATION-3.0.md +58 -0
  2. package/README.md +87 -3
  3. package/dist/app/HelpTab-jjw4cF1_.js +1 -0
  4. package/dist/app/VoiceRecorder-CMc1Bz14.js +1 -0
  5. package/dist/app/askly-app.js +1 -0
  6. package/dist/app/shared-C0Z29aNi.js +1 -0
  7. package/dist/app/speech-8iAgRQFA.js +1 -0
  8. package/dist/index.esm.js +1 -1
  9. package/dist/index.umd.js +1 -1
  10. package/dist/loader.js +1 -0
  11. package/dist/types/app.d.ts +3 -0
  12. package/dist/types/core/api.d.ts +30 -0
  13. package/dist/types/core/config.d.ts +44 -0
  14. package/dist/types/core/html.d.ts +2 -0
  15. package/dist/{core → types/core}/speech.d.ts +2 -7
  16. package/dist/{core → types/core}/types.d.ts +1 -0
  17. package/dist/types/core/voice.d.ts +7 -0
  18. package/dist/types/index.d.ts +7 -0
  19. package/dist/types/loader/attrs.d.ts +4 -0
  20. package/dist/types/loader/core.d.ts +26 -0
  21. package/dist/types/widget-entry.d.ts +1 -0
  22. package/dist/{widget.d.ts → types/widget.d.ts} +1 -2
  23. package/dist/widget.js +1 -10
  24. package/package.json +32 -21
  25. package/dist/index.d.ts +0 -124
  26. /package/dist/{core → types/core}/events.d.ts +0 -0
  27. /package/dist/{core → types/core}/format.d.ts +0 -0
  28. /package/dist/{core → types/core}/greeting.d.ts +0 -0
  29. /package/dist/{core → types/core}/session.d.ts +0 -0
  30. /package/dist/{core → types/core}/storage.d.ts +0 -0
  31. /package/dist/{icons.d.ts → types/icons.d.ts} +0 -0
  32. /package/dist/{identity.d.ts → types/identity.d.ts} +0 -0
  33. /package/dist/{markdown.d.ts → types/markdown.d.ts} +0 -0
  34. /package/dist/{pathRules.d.ts → types/pathRules.d.ts} +0 -0
  35. /package/dist/{realtime.d.ts → types/realtime.d.ts} +0 -0
  36. /package/dist/{ui → types/ui}/ChatTerms.d.ts +0 -0
  37. /package/dist/{ui → types/ui}/Composer.d.ts +0 -0
  38. /package/dist/{ui → types/ui}/ConversationList.d.ts +0 -0
  39. /package/dist/{ui → types/ui}/ExploreTab.d.ts +0 -0
  40. /package/dist/{ui → types/ui}/GreetingBubble.d.ts +0 -0
  41. /package/dist/{ui → types/ui}/HelpTab.d.ts +0 -0
  42. /package/dist/{ui → types/ui}/Launcher.d.ts +0 -0
  43. /package/dist/{ui → types/ui}/MessageList.d.ts +0 -0
  44. /package/dist/{ui → types/ui}/NavTabs.d.ts +0 -0
  45. /package/dist/{ui → types/ui}/PanelHeader.d.ts +0 -0
  46. /package/dist/{ui → types/ui}/VoiceRecorder.d.ts +0 -0
@@ -0,0 +1,26 @@
1
+ export declare const ASKLY_API_BASE = "https://api.askly.co.in";
2
+ export declare const APP_FILE = "app/askly-app.js";
3
+ export interface LoaderOptions {
4
+ /** URL of the app module (`app/askly-app.js`). */
5
+ appUrl: string;
6
+ /** Tried when `appUrl` cannot be fetched (the versioned CDN copy). */
7
+ fallbackUrl?: string;
8
+ }
9
+ /** The queue the app replays. `v` lets a future app recognise an older stub. */
10
+ export interface AsklyStub {
11
+ q: Array<[string, any[]]> | null;
12
+ v: number;
13
+ _r: Array<() => void>;
14
+ _t: number;
15
+ _unpaint?: () => void;
16
+ [method: string]: any;
17
+ }
18
+ export declare function createLoader(initial: LoaderOptions): AsklyStub;
19
+ /**
20
+ * Where the loader's script came from, as the place to fetch the app from. A floating CDN
21
+ * tag (`@3`, `@latest`, none) is pinned to this exact version so the app and its chunks
22
+ * always come from one immutable path.
23
+ */
24
+ export declare function appUrlFromScript(src: string | null | undefined, version: string, fallback: string): string;
25
+ /** The <script> that loaded this file: `document.currentScript`, else the tag that names it. */
26
+ export declare function findLoaderScript(): HTMLScriptElement | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,3 @@
1
1
  import React from "react";
2
2
  import type { ChatWidgetProps } from "./core/types";
3
- import "./styles.css";
4
- export declare const ChatWidget: ({ orgId, organizationName: initialOrganizationName, themeColor: initialThemeColor, theme: initialTheme, position, orgServerRoute, enableVoiceChat: initialEnableVoiceChat, voiceInput: initialVoiceInput, welcomeMessage: initialWelcomeMessage, placeholderText, organizationLogo: initialOrganizationLogo, buttonIcon, buttonShape: initialButtonShape, autoOpen, greeting, showTimestamp, soundEnabled, soundVolume, poweredBy, userId, timestamp, signature, turnstileSiteKey, excludePaths, includePaths, configOverride, resetGeneration: initResetGeneration, onMessageSent, onMessageReceived, onChatOpened, onChatClosed, onEscalation, }: ChatWidgetProps) => React.JSX.Element | null;
3
+ export declare const ChatWidget: ({ orgId, organizationName: initialOrganizationName, themeColor: initialThemeColor, theme: initialTheme, position, orgServerRoute, enableVoiceChat: initialEnableVoiceChat, voiceInput: initialVoiceInput, welcomeMessage: initialWelcomeMessage, placeholderText, organizationLogo: initialOrganizationLogo, buttonIcon, buttonShape: initialButtonShape, autoOpen, greeting, showTimestamp, soundEnabled, soundVolume, poweredBy, userId, timestamp, signature, turnstileSiteKey, excludePaths, includePaths, configOverride, resetGeneration: initResetGeneration, greetingStartedAt, onMessageSent, onMessageReceived, onChatOpened, onChatClosed, onEscalation, }: ChatWidgetProps) => React.JSX.Element | null;