obi-sdk 0.3.11 → 0.3.13
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/modular/chunks/{obi-widget-dffef845.js → obi-widget-d7e7c6bf.js} +902 -138
- package/dist/modular/chunks/obi-widget-d7e7c6bf.js.map +1 -0
- package/dist/modular/index.js +1 -1
- package/dist/modular/ui.js +16 -153
- package/dist/modular/ui.js.map +1 -1
- package/dist/obi-sdk.es.js +901 -137
- package/dist/obi-sdk.es.js.map +1 -1
- package/dist/obi-sdk.standalone.iife.js +201 -43
- package/dist/obi-sdk.standalone.iife.js.map +1 -1
- package/dist/obi-sdk.umd.js +193 -35
- package/dist/obi-sdk.umd.js.map +1 -1
- package/dist/ui/components/audio-equalizer.d.ts +1 -0
- package/dist/ui/components/courses/course-modal.d.ts +0 -2
- package/dist/ui/components/courses/courses.d.ts +1 -4
- package/dist/ui/components/index.d.ts +0 -1
- package/dist/ui/components/obi-widget.d.ts +18 -0
- package/dist/ui/components/session-start-modal.d.ts +12 -0
- package/package.json +4 -2
- package/dist/modular/chunks/obi-widget-dffef845.js.map +0 -1
- package/dist/ui/components/control-panel.d.ts +0 -12
|
@@ -7,10 +7,8 @@ export declare class CourseModal extends LitElement {
|
|
|
7
7
|
loading: boolean;
|
|
8
8
|
error: string;
|
|
9
9
|
apiKey: string;
|
|
10
|
-
onCourseSelect?: (id: string) => void;
|
|
11
10
|
onClose?: () => void;
|
|
12
11
|
private apiBaseUrl;
|
|
13
|
-
private handleCourseSelect;
|
|
14
12
|
private handleClose;
|
|
15
13
|
private fetchCourses;
|
|
16
14
|
connectedCallback(): void;
|
|
@@ -3,7 +3,7 @@ export type CourseData = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
5
|
description: string;
|
|
6
|
-
imageSrc
|
|
6
|
+
imageSrc?: string;
|
|
7
7
|
};
|
|
8
8
|
export declare class Course extends LitElement {
|
|
9
9
|
static styles: import("lit").CSSResult;
|
|
@@ -11,7 +11,6 @@ export declare class Course extends LitElement {
|
|
|
11
11
|
name: string;
|
|
12
12
|
description: string;
|
|
13
13
|
imageSrc: string;
|
|
14
|
-
onSelect?: (id: string) => void;
|
|
15
14
|
private handleClick;
|
|
16
15
|
render(): import("lit").TemplateResult<1>;
|
|
17
16
|
}
|
|
@@ -20,7 +19,5 @@ export declare class CourseList extends LitElement {
|
|
|
20
19
|
courses: CourseData[];
|
|
21
20
|
loading: boolean;
|
|
22
21
|
error: string;
|
|
23
|
-
onCourseSelect?: (id: string) => void;
|
|
24
|
-
private handleCourseSelect;
|
|
25
22
|
render(): import("lit").TemplateResult<1>;
|
|
26
23
|
}
|
|
@@ -4,6 +4,7 @@ import "./courses";
|
|
|
4
4
|
import "./audio-equalizer";
|
|
5
5
|
import "./dot-loader";
|
|
6
6
|
import "./searching-loader";
|
|
7
|
+
import "./session-start-modal";
|
|
7
8
|
export declare class ObiWidget extends LitElement {
|
|
8
9
|
private apiKey;
|
|
9
10
|
private isActive;
|
|
@@ -12,6 +13,8 @@ export declare class ObiWidget extends LitElement {
|
|
|
12
13
|
private state;
|
|
13
14
|
private storedActiveState;
|
|
14
15
|
private showCourseModal;
|
|
16
|
+
private showSessionStartModal;
|
|
17
|
+
private selectedCourse;
|
|
15
18
|
private isHovering;
|
|
16
19
|
private navVisible;
|
|
17
20
|
private activeSession;
|
|
@@ -20,12 +23,27 @@ export declare class ObiWidget extends LitElement {
|
|
|
20
23
|
private roomToken;
|
|
21
24
|
private roomUrl;
|
|
22
25
|
private boundSaveSessionData;
|
|
26
|
+
private obiClient;
|
|
23
27
|
private closeNavTimeoutRef;
|
|
24
28
|
constructor();
|
|
25
29
|
private updateFromConfig;
|
|
26
30
|
static styles: import("lit").CSSResult;
|
|
27
31
|
private removeSessionFromUrl;
|
|
32
|
+
/**
|
|
33
|
+
* Create a new ObiSession instance with common configuration
|
|
34
|
+
*/
|
|
35
|
+
private createSession;
|
|
36
|
+
/**
|
|
37
|
+
* Set up common event listeners for a session
|
|
38
|
+
*/
|
|
39
|
+
private setupSessionEventListeners;
|
|
40
|
+
/**
|
|
41
|
+
* Handle session creation failure
|
|
42
|
+
*/
|
|
43
|
+
private handleSessionCreationFailure;
|
|
28
44
|
private connectObi;
|
|
45
|
+
private handleCourseSelectEvent;
|
|
46
|
+
private handleUrlSessionEvent;
|
|
29
47
|
private handleSessionStart;
|
|
30
48
|
/**
|
|
31
49
|
* Check if there's an existing session stored in localStorage
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import { CourseData } from "./courses/courses";
|
|
3
|
+
export declare class SessionStartModal extends LitElement {
|
|
4
|
+
static styles: import("lit").CSSResult;
|
|
5
|
+
session: CourseData;
|
|
6
|
+
onStart?: (sessionToken: string) => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
private handleStart;
|
|
9
|
+
private handleClose;
|
|
10
|
+
private handleBackdropClick;
|
|
11
|
+
render(): import("lit").TemplateResult<1>;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obi-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"description": "JavaScript SDK for Obi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/obi-sdk.umd.js",
|
|
@@ -28,7 +28,9 @@
|
|
|
28
28
|
"lit": "^3.0.0",
|
|
29
29
|
"ts-pattern": "^5.7.0",
|
|
30
30
|
"zod": "^3.22.0",
|
|
31
|
-
"@obi/obi-session": "0.2.
|
|
31
|
+
"@obi/obi-session": "0.2.6",
|
|
32
|
+
"@obi/obi-client": "0.1.0",
|
|
33
|
+
"@obi/url-params": "0.1.1"
|
|
32
34
|
},
|
|
33
35
|
"peerDependencies": {
|
|
34
36
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|