obi-sdk 0.16.0 → 0.18.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 (58) hide show
  1. package/README.md +1 -1
  2. package/dist/index.js +62 -0
  3. package/dist/obi-sdk.standalone.iife.js +62 -2645
  4. package/dist/src/loader.d.ts +11 -0
  5. package/dist/src/mount.d.ts +1 -0
  6. package/dist/src/sdk.d.ts +77 -0
  7. package/dist/src/types.d.ts +12 -0
  8. package/dist/src/widget.d.ts +6 -0
  9. package/package.json +11 -29
  10. package/dist/core/config-logger.d.ts +0 -30
  11. package/dist/core/constants.d.ts +0 -1
  12. package/dist/core/index.d.ts +0 -3
  13. package/dist/core/init.d.ts +0 -1
  14. package/dist/core/types.d.ts +0 -46
  15. package/dist/empty-loader.d.ts +0 -5
  16. package/dist/index.d.ts +0 -2
  17. package/dist/loader.d.ts +0 -33
  18. package/dist/modular/chunks/index-0ae60d8f.js +0 -6
  19. package/dist/modular/chunks/index-0ae60d8f.js.map +0 -1
  20. package/dist/modular/chunks/obi-widget-1f912837.js +0 -22390
  21. package/dist/modular/chunks/obi-widget-1f912837.js.map +0 -1
  22. package/dist/modular/chunks/types-f38a47f6.js +0 -22431
  23. package/dist/modular/chunks/types-f38a47f6.js.map +0 -1
  24. package/dist/modular/core.js +0 -4086
  25. package/dist/modular/core.js.map +0 -1
  26. package/dist/modular/index.js +0 -361
  27. package/dist/modular/index.js.map +0 -1
  28. package/dist/modular/ui.js +0 -110
  29. package/dist/modular/ui.js.map +0 -1
  30. package/dist/obi-sdk.standalone.iife.js.map +0 -1
  31. package/dist/react.d.ts +0 -6
  32. package/dist/react.es.js +0 -32868
  33. package/dist/react.es.js.map +0 -1
  34. package/dist/react.umd.js +0 -2842
  35. package/dist/react.umd.js.map +0 -1
  36. package/dist/ui/components/audio-equalizer.d.ts +0 -21
  37. package/dist/ui/components/courses/course-modal.d.ts +0 -20
  38. package/dist/ui/components/courses/courses.d.ts +0 -31
  39. package/dist/ui/components/courses/index.d.ts +0 -1
  40. package/dist/ui/components/dot-loader.d.ts +0 -20
  41. package/dist/ui/components/icons.d.ts +0 -6
  42. package/dist/ui/components/index.d.ts +0 -10
  43. package/dist/ui/components/nav-icon.d.ts +0 -10
  44. package/dist/ui/components/navigation-bar.d.ts +0 -19
  45. package/dist/ui/components/obi-widget/index.d.ts +0 -1
  46. package/dist/ui/components/obi-widget/obi-widget.d.ts +0 -103
  47. package/dist/ui/components/obi-widget/user-update.test.d.ts +0 -1
  48. package/dist/ui/components/searching-loader.d.ts +0 -5
  49. package/dist/ui/components/status-widget.d.ts +0 -8
  50. package/dist/ui/index.d.ts +0 -1
  51. package/dist/utils/index.d.ts +0 -2
  52. package/dist/utils/storage.d.ts +0 -45
  53. package/index.d.ts +0 -8
  54. /package/dist/{test/setup.d.ts → src/empty.test.d.ts} +0 -0
  55. /package/dist/{ui/components/obi-widget/obi-widget.test.d.ts → src/index.d.ts} +0 -0
  56. /package/dist/{sentry.d.ts → src/sentry.d.ts} +0 -0
  57. /package/dist/{utils → src}/url-matcher.d.ts +0 -0
  58. /package/dist/{utils → src}/url-matcher.test.d.ts +0 -0
@@ -1,21 +0,0 @@
1
- import { LitElement } from "lit";
2
- interface VolumeData {
3
- speaker: "USER" | "ASSISTANT";
4
- volume: number;
5
- spectrum: number[];
6
- }
7
- export declare class AudioEqualizer extends LitElement {
8
- volume: VolumeData;
9
- private canvasRef;
10
- private barCount;
11
- private animationFrame;
12
- private primaryColor;
13
- static styles: import("lit").CSSResult;
14
- connectedCallback(): void;
15
- disconnectedCallback(): void;
16
- private startAnimation;
17
- private stopAnimation;
18
- private drawEqualizer;
19
- render(): import("lit").TemplateResult<1>;
20
- }
21
- export {};
@@ -1,20 +0,0 @@
1
- import { LitElement } from "lit";
2
- import { CourseData } from "./courses";
3
- import "./courses";
4
- export declare class CourseModal extends LitElement {
5
- static styles: import("lit").CSSResult;
6
- courses: CourseData[];
7
- loading: boolean;
8
- error: string;
9
- apiKey: string;
10
- onClose?: () => void;
11
- private apiBaseUrl;
12
- private selectedCourse;
13
- private agentName;
14
- private handleClose;
15
- private handleGetStarted;
16
- private fetchCourses;
17
- private handleCourseCardClick;
18
- connectedCallback(): void;
19
- render(): import("lit").TemplateResult<1>;
20
- }
@@ -1,31 +0,0 @@
1
- import { LitElement } from "lit";
2
- export type CourseData = {
3
- id: string;
4
- name: string;
5
- description: string;
6
- duration?: number;
7
- order?: number;
8
- agentName?: string;
9
- };
10
- export declare class Course extends LitElement {
11
- static styles: import("lit").CSSResult;
12
- id: string;
13
- name: string;
14
- description: string;
15
- duration: number;
16
- order: number;
17
- selected: boolean;
18
- constructor();
19
- private handleClick;
20
- render(): import("lit").TemplateResult<1>;
21
- }
22
- export declare class CourseList extends LitElement {
23
- static styles: import("lit").CSSResult;
24
- courses: CourseData[];
25
- selectedCourseId: string | null;
26
- loading: boolean;
27
- error: string;
28
- searchTerm: string;
29
- private handleSearch;
30
- render(): import("lit").TemplateResult<1>;
31
- }
@@ -1 +0,0 @@
1
- export * from "./course-modal";
@@ -1,20 +0,0 @@
1
- import { LitElement } from "lit";
2
- export declare class DotLoader extends LitElement {
3
- private activeDots;
4
- private numDots;
5
- private containerWidth;
6
- private dotSize;
7
- private bounceHeight;
8
- private animationDuration;
9
- private pauseDuration;
10
- private overlapFactor;
11
- private color;
12
- private timeoutIds;
13
- static styles: import("lit").CSSResult;
14
- connectedCallback(): void;
15
- disconnectedCallback(): void;
16
- private startAnimation;
17
- private stopAnimation;
18
- private animateSequence;
19
- render(): import("lit").TemplateResult<1>;
20
- }
@@ -1,6 +0,0 @@
1
- export declare const pauseIcon: import("lit").TemplateResult<1>;
2
- export declare const playIcon: import("lit").TemplateResult<1>;
3
- export declare const powerIcon: import("lit").TemplateResult<1>;
4
- export declare const closeIcon: import("lit").TemplateResult<1>;
5
- export declare const bookOpenIcon: import("lit").TemplateResult<1>;
6
- export declare const obiIcon: import("lit").TemplateResult<1>;
@@ -1,10 +0,0 @@
1
- export * from "./status-widget";
2
- export * from "./obi-widget";
3
- export * from "./audio-equalizer";
4
- export * from "./dot-loader";
5
- export * from "./nav-icon";
6
- export * from "./navigation-bar";
7
- export * from "./searching-loader";
8
- export * from "./courses/courses";
9
- export * from "./courses/course-modal";
10
- export declare function defineCustomElements(): void;
@@ -1,10 +0,0 @@
1
- import { LitElement } from "lit";
2
- export declare class NavIcon extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- id: string;
5
- isActive: boolean;
6
- isSpecial: boolean;
7
- onClick?: (id: string, isActive: boolean) => void;
8
- private handleClick;
9
- render(): import("lit").TemplateResult<1>;
10
- }
@@ -1,19 +0,0 @@
1
- import { SDKState } from "@obi/obi-session";
2
- import { LitElement } from "lit";
3
- import "./nav-icon";
4
- export declare class NavigationBar extends LitElement {
5
- static styles: import("lit").CSSResult;
6
- isActive: boolean;
7
- isScreenActive: boolean;
8
- position: {
9
- top: number;
10
- left: number;
11
- };
12
- currentState: SDKState;
13
- direction: "up" | "down";
14
- onItemSelect?: (id: string, isActive: boolean) => void;
15
- constructor();
16
- connectedCallback(): void;
17
- private handleIconClick;
18
- render(): import("lit").TemplateResult<1>;
19
- }
@@ -1 +0,0 @@
1
- export * from "./obi-widget";
@@ -1,103 +0,0 @@
1
- import { LitElement, nothing } from "lit";
2
- import "../navigation-bar";
3
- import "../courses";
4
- import "../audio-equalizer";
5
- import "../dot-loader";
6
- import "../searching-loader";
7
- import "@obi/obi-components";
8
- export declare class ObiWidget extends LitElement {
9
- private apiKey;
10
- private isActive;
11
- private linkOnlyAccess;
12
- private urlBlacklist;
13
- private position;
14
- private user;
15
- private state;
16
- private storedActiveState;
17
- private showCourseModal;
18
- private showSessionStartModal;
19
- private showShareMicModal;
20
- private micShareEnabled;
21
- private showOverviewModal;
22
- private showVoiceGuidanceModal;
23
- private voiceGuidanceEnabled;
24
- private selectedCourse;
25
- private isHovering;
26
- private navVisible;
27
- private activeSession;
28
- private volume;
29
- private databaseConfig;
30
- private configLoaded;
31
- private primaryColor;
32
- private sessionToken;
33
- private roomToken;
34
- private roomUrl;
35
- private boundSaveSessionData;
36
- private obiClient;
37
- private closeNavTimeoutRef;
38
- private researchingTimeoutRef;
39
- private urlCheckInterval;
40
- private currentUrl;
41
- constructor();
42
- private updateFromConfig;
43
- /**
44
- * Generate additional color variables based on the primary color
45
- */
46
- private generateColorVariables;
47
- static styles: import("lit").CSSResult;
48
- private removeSessionUrlParams;
49
- /**
50
- * Create a new ObiSession instance with common configuration
51
- */
52
- private createSession;
53
- /**
54
- * Set up common event listeners for a session
55
- */
56
- private setupSessionEventListeners;
57
- /**
58
- * Handle session creation failure
59
- */
60
- private handleSessionCreationFailure;
61
- private connectObi;
62
- private handleCloseModals;
63
- private handleCourseSelectEvent;
64
- private handleUrlSessionEvent;
65
- private handleSessionStart;
66
- private handleSessionModalStart;
67
- private handleSessionModalClose;
68
- private handleSessionModalError;
69
- private handleOverviewModalClose;
70
- private handleShareMicModalContinue;
71
- private handleShareMicModalClose;
72
- private handleVoiceGuidanceModalContinue;
73
- private handleVoiceGuidanceModalClose;
74
- /**
75
- * Check if there's an existing session stored in localStorage
76
- * and attempt to reconnect if a valid session is found
77
- */
78
- private checkExistingSession;
79
- /**
80
- * Clear session-related data from localStorage
81
- */
82
- private clearSessionStorage;
83
- /**
84
- * Handle URL changes to check if the new URL is blacklisted
85
- */
86
- private handleUrlChange;
87
- private saveSessionData;
88
- private sessionConnectionCheck;
89
- connectedCallback(): void;
90
- disconnectedCallback(): void;
91
- private handleConfigUpdate;
92
- private handleMouseEnter;
93
- private handleMouseLeave;
94
- /**
95
- * Terminate the session completely and clear storage
96
- * This is used when a user explicitly wants to end a session
97
- */
98
- private terminateSession;
99
- private handleItemSelect;
100
- private fetchDatabaseConfig;
101
- private applyFinalConfiguration;
102
- render(): import("lit").TemplateResult<1> | typeof nothing;
103
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import { LitElement } from "lit";
2
- export declare class SearchingLoader extends LitElement {
3
- static styles: import("lit").CSSResult;
4
- render(): import("lit").TemplateResult<1>;
5
- }
@@ -1,8 +0,0 @@
1
- import { SDKState } from "@obi/obi-session";
2
- import { LitElement } from "lit";
3
- export declare class ObiStatusWidget extends LitElement {
4
- state: SDKState;
5
- static styles: import("lit").CSSResult;
6
- render(): import("lit").TemplateResult<1>;
7
- private getStatusText;
8
- }
@@ -1 +0,0 @@
1
- export * from "./components";
@@ -1,2 +0,0 @@
1
- export * from "./storage";
2
- export * from "./url-matcher";
@@ -1,45 +0,0 @@
1
- /**
2
- * StorageManager provides namespaced access to browser localStorage
3
- * to prevent key conflicts with other applications.
4
- */
5
- import { SDKState } from "../core";
6
- export interface SessionData {
7
- sessionToken: string;
8
- roomToken: string;
9
- roomUrl: string;
10
- obiState: SDKState;
11
- sessionExpiry: string;
12
- }
13
- export declare class StorageManager {
14
- private namespace;
15
- /**
16
- * Create a new StorageManager with a specific namespace
17
- * @param namespace The namespace to prefix all keys with
18
- */
19
- constructor(namespace: string);
20
- /**
21
- * Get a value from localStorage with the namespace prefix
22
- * @param key The key to retrieve
23
- * @returns The stored value or null if not found
24
- */
25
- getItem(key: string): string | null;
26
- /**
27
- * Set a value in localStorage with the namespace prefix
28
- * @param key The key to set
29
- * @param value The value to store
30
- */
31
- setItem(key: string, value: string): void;
32
- /**
33
- * Remove a value from localStorage with the namespace prefix
34
- * @param key The key to remove
35
- */
36
- removeItem(key: string): void;
37
- /**
38
- * Clear all keys that belong to this namespace
39
- */
40
- clear(): void;
41
- }
42
- export declare const STORAGE_KEYS: {
43
- SESSION_DATA: string;
44
- };
45
- export declare const storage: StorageManager;
package/index.d.ts DELETED
@@ -1,8 +0,0 @@
1
- export {
2
- ObiAssistantConfig,
3
- EventType,
4
- SDKState,
5
- initObi,
6
- getLatestSDK,
7
- createLatestSession,
8
- } from "./src/types/sdk"
File without changes
File without changes
File without changes
File without changes