obi-sdk 0.6.6 → 0.6.8

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.
@@ -0,0 +1,6 @@
1
+ import { O } from "./obi-widget-46e82ee8.js";
2
+ import "./types-e0297e7b.js";
3
+ export {
4
+ O as ObiWidget
5
+ };
6
+ //# sourceMappingURL=index-fa4a7611.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-fa4a7611.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -481,6 +481,11 @@ class ObiClient {
481
481
  body: data
482
482
  });
483
483
  }
484
+ async getPlanVideoUrl(id) {
485
+ return await this.client.GET("/plans/{id}/video-url", {
486
+ params: { path: { id } }
487
+ });
488
+ }
484
489
  // Sessions
485
490
  async listSessions(token) {
486
491
  return await this.client.GET("/sessions", {
@@ -16511,6 +16516,7 @@ CourseList.styles = i$4`
16511
16516
  padding: 12px 0px;
16512
16517
  flex: 1 0 0;
16513
16518
  align-self: stretch;
16519
+ min-height: 364px; /* Ensure minimum 2 rows: 2 * 180px + 4px gap */
16514
16520
  }
16515
16521
 
16516
16522
  @media (max-width: 767px) {
@@ -16571,6 +16577,7 @@ class CourseModal extends i$1 {
16571
16577
  this.apiKey = "";
16572
16578
  this.apiBaseUrl = "";
16573
16579
  this.selectedCourse = null;
16580
+ this.agentName = "";
16574
16581
  }
16575
16582
  handleClose() {
16576
16583
  if (this.onClose) {
@@ -16594,13 +16601,20 @@ class CourseModal extends i$1 {
16594
16601
  this.loading = true;
16595
16602
  const raw_response = await fetch(`${this.apiBaseUrl}/sessions?token=${this.apiKey}`);
16596
16603
  const response = await raw_response.json();
16597
- const mappedCourses = response.sessions?.map((session) => ({
16598
- id: session.uuid,
16599
- name: session.onboarding_plan.name,
16600
- description: session.onboarding_plan.description,
16601
- duration: session.onboarding_plan.duration
16602
- }));
16604
+ let agentName = "";
16605
+ const mappedCourses = response.sessions?.map((session) => {
16606
+ if (!agentName) {
16607
+ agentName = session.onboarding_plan.product.agent_name;
16608
+ }
16609
+ return {
16610
+ id: session.uuid,
16611
+ name: session.onboarding_plan.name,
16612
+ description: session.onboarding_plan.description,
16613
+ duration: session.onboarding_plan.duration
16614
+ };
16615
+ });
16603
16616
  const filteredCourses = mappedCourses.filter((course) => !!course.name);
16617
+ this.agentName = agentName || "Obi";
16604
16618
  this.courses = [...filteredCourses];
16605
16619
  this.requestUpdate();
16606
16620
  } catch (err) {
@@ -16635,8 +16649,15 @@ class CourseModal extends i$1 {
16635
16649
  <div class="header">
16636
16650
  <div class="icon">${obiIcon}</div>
16637
16651
  <div class="title-section">
16638
- <h1>Give Obi a try!</h1>
16639
- <p class="subtitle">Pick a tour, share your screen, and Obi will take it from there.</p>
16652
+ ${this.loading ? x`
16653
+ <div class="skeleton skeleton-title"></div>
16654
+ <div class="skeleton skeleton-subtitle"></div>
16655
+ ` : x`
16656
+ <h1>Give ${this.agentName} a try!</h1>
16657
+ <p class="subtitle">
16658
+ Pick a tour, share your screen, and ${this.agentName} will take it from there.
16659
+ </p>
16660
+ `}
16640
16661
  </div>
16641
16662
  <button class="close-button" aria-label="Close course modal" @click=${this.handleClose}>
16642
16663
  <svg
@@ -16701,7 +16722,7 @@ class CourseModal extends i$1 {
16701
16722
  CourseModal.styles = i$4`
16702
16723
  :host {
16703
16724
  display: block;
16704
- font-family: "Syne", sans-serif;
16725
+ font-family: "Satoshi", sans-serif;
16705
16726
  }
16706
16727
 
16707
16728
  .backdrop {
@@ -16890,6 +16911,33 @@ CourseModal.styles = i$4`
16890
16911
  margin: 0;
16891
16912
  text-align: center;
16892
16913
  }
16914
+
16915
+ .skeleton {
16916
+ background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
16917
+ background-size: 200% 100%;
16918
+ animation: loading 1.5s infinite;
16919
+ border-radius: 4px;
16920
+ }
16921
+
16922
+ @keyframes loading {
16923
+ 0% {
16924
+ background-position: 200% 0;
16925
+ }
16926
+ 100% {
16927
+ background-position: -200% 0;
16928
+ }
16929
+ }
16930
+
16931
+ .skeleton-title {
16932
+ height: 32px;
16933
+ width: 60%;
16934
+ margin-bottom: 12px;
16935
+ }
16936
+
16937
+ .skeleton-subtitle {
16938
+ height: 20px;
16939
+ width: 80%;
16940
+ }
16893
16941
  `;
16894
16942
  __decorateClass$4([
16895
16943
  n$2({ type: Array })
@@ -16912,6 +16960,9 @@ __decorateClass$4([
16912
16960
  __decorateClass$4([
16913
16961
  r$1()
16914
16962
  ], CourseModal.prototype, "selectedCourse", 2);
16963
+ __decorateClass$4([
16964
+ r$1()
16965
+ ], CourseModal.prototype, "agentName", 2);
16915
16966
  if (!customElements.get("obi-course-modal")) {
16916
16967
  customElements.define("obi-course-modal", CourseModal);
16917
16968
  }
@@ -18202,7 +18253,7 @@ ObiWidget.styles = i$4`
18202
18253
  }
18203
18254
 
18204
18255
  h1 {
18205
- font-family: "Syne", sans-serif;
18256
+ font-family: "Satoshi", sans-serif;
18206
18257
  }
18207
18258
 
18208
18259
  /* Position-specific styles */
@@ -18406,4 +18457,4 @@ export {
18406
18457
  withSentryAsyncHandler as w,
18407
18458
  x
18408
18459
  };
18409
- //# sourceMappingURL=obi-widget-94e8c026.js.map
18460
+ //# sourceMappingURL=obi-widget-46e82ee8.js.map