kenobi-js 0.1.35 → 0.1.36

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/browser/dist.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Kenobi SDK v0.1.33
2
+ * Kenobi SDK v0.1.35
3
3
  * (c) 2025 Kenobi.ai
4
4
  */
5
5
  "use strict";
@@ -1097,7 +1097,7 @@ var KenobiLib = (() => {
1097
1097
  xmlns: "http://www.w3.org/2000/svg",
1098
1098
  children: [
1099
1099
  /* @__PURE__ */ u3("circle", { cx: "446", cy: "450", r: "424", fill: "black" }),
1100
- /* @__PURE__ */ u3("circle", { cx: "450", cy: "450", r: "357", fill: "url(#paint0_linear_1_41)" }),
1100
+ /* @__PURE__ */ u3("circle", { cx: "450", cy: "450", r: "357", fill: "#E8E8E8" }),
1101
1101
  /* @__PURE__ */ u3(
1102
1102
  "ellipse",
1103
1103
  {
@@ -1108,22 +1108,7 @@ var KenobiLib = (() => {
1108
1108
  transform: "rotate(-46.2324 579.85 294.451)",
1109
1109
  fill: "black"
1110
1110
  }
1111
- ),
1112
- /* @__PURE__ */ u3("defs", { children: /* @__PURE__ */ u3(
1113
- "linearGradient",
1114
- {
1115
- id: "paint0_linear_1_41",
1116
- x1: "807",
1117
- y1: "93",
1118
- x2: "93",
1119
- y2: "807",
1120
- gradientUnits: "userSpaceOnUse",
1121
- children: [
1122
- /* @__PURE__ */ u3("stop", { "stop-color": "#FAFAFA" }),
1123
- /* @__PURE__ */ u3("stop", { offset: "1", "stop-color": "#CACACA" })
1124
- ]
1125
- }
1126
- ) })
1111
+ )
1127
1112
  ]
1128
1113
  }
1129
1114
  ), "LogoIcon");
@@ -1196,6 +1181,14 @@ var KenobiLib = (() => {
1196
1181
  /* Launcher dismiss button */
1197
1182
  .launcher .btn-dismiss.launcher-dismiss { top: -0.375rem; left: -0.375rem; width: 1.25rem; height: 1.25rem; opacity: 0; transition: opacity 0.2s ease-out, background-color 0.3s ease-out, color 0.3s ease-out; }
1198
1183
  .launcher:hover .btn-dismiss.launcher-dismiss { opacity: 1; }
1184
+ /* Launcher logo */
1185
+ .launcher-logo { width: 20px; height: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
1186
+ .launcher-logo svg { width: 20px; height: 20px; }
1187
+ /* Mobile: hide keyboard hints, show dismiss button */
1188
+ @media (max-width: 768px) {
1189
+ .launcher .kbd-hint { display: none; }
1190
+ .launcher .btn-dismiss.launcher-dismiss { opacity: 1; }
1191
+ }
1199
1192
  `;
1200
1193
  var useEnterExitAnimation = /* @__PURE__ */ __name((ref, isVisible, config) => {
1201
1194
  const hasEnteredRef = A2(false);
@@ -1680,14 +1673,27 @@ var KenobiLib = (() => {
1680
1673
  }, []);
1681
1674
  const clampedProgress = Math.max(0, Math.min(100, config.progressPct ?? 0));
1682
1675
  const displayedProgress = timerEnabled ? timerProgress : clampedProgress;
1676
+ const isContainerVisible = !!config.isVisible && mode === "card" && !isDismissed;
1677
+ const isLauncherVisible = !!config.isVisible && mode === "launcher" && !isDismissed;
1678
+ const isAnythingVisible = isContainerVisible || isLauncherVisible;
1683
1679
  return /* @__PURE__ */ u3(k, { children: [
1684
- /* @__PURE__ */ u3("div", { ref: backdropRef, class: "backdrop" }),
1680
+ /* @__PURE__ */ u3(
1681
+ "div",
1682
+ {
1683
+ ref: backdropRef,
1684
+ class: "backdrop",
1685
+ style: { display: isAnythingVisible ? "block" : "none" }
1686
+ }
1687
+ ),
1685
1688
  /* @__PURE__ */ u3(
1686
1689
  "div",
1687
1690
  {
1688
1691
  ref: containerRef,
1689
1692
  class: `container theme-${config.theme || "glass"} pos-${config.position || "top-center"}`,
1690
- style: getThemeStyles(config.customTheme),
1693
+ style: {
1694
+ ...getThemeStyles(config.customTheme),
1695
+ pointerEvents: isContainerVisible ? "auto" : "none"
1696
+ },
1691
1697
  onClick: () => !isOpen && !isPending && !isSuccess && setIsOpen(true),
1692
1698
  onMouseEnter: () => setIsHovering(true),
1693
1699
  onMouseLeave: () => setIsHovering(false),
@@ -1829,9 +1835,13 @@ var KenobiLib = (() => {
1829
1835
  {
1830
1836
  ref: launcherRef,
1831
1837
  class: `launcher theme-${config.theme || "glass"} pos-${config.position || "top-center"}`,
1832
- style: getThemeStyles(config.customTheme),
1838
+ style: {
1839
+ ...getThemeStyles(config.customTheme),
1840
+ pointerEvents: isLauncherVisible ? "auto" : "none"
1841
+ },
1833
1842
  onClick: (e3) => {
1834
1843
  e3.stopPropagation();
1844
+ setIsDismissed(false);
1835
1845
  setMode("card");
1836
1846
  setIsOpen(true);
1837
1847
  },
@@ -1851,20 +1861,7 @@ var KenobiLib = (() => {
1851
1861
  children: /* @__PURE__ */ u3(XMarkIcon, {})
1852
1862
  }
1853
1863
  ),
1854
- /* @__PURE__ */ u3(
1855
- "div",
1856
- {
1857
- style: {
1858
- display: "flex",
1859
- width: "20px",
1860
- height: "20px",
1861
- overflow: "hidden",
1862
- alignItems: "center",
1863
- justifyContent: "center"
1864
- },
1865
- children: /* @__PURE__ */ u3("div", { style: { transform: "scale(0.6)" }, children: /* @__PURE__ */ u3(LogoIcon, {}) })
1866
- }
1867
- ),
1864
+ /* @__PURE__ */ u3("div", { class: "launcher-logo", children: /* @__PURE__ */ u3(LogoIcon, {}) }),
1868
1865
  config.textOverrides?.launcherLabel || (hasHadSuccessRef.current ? "Personalize again" : "Personalize"),
1869
1866
  config.showKeyboardHints && /* @__PURE__ */ u3("div", { class: "kbd-hint visible", children: /* @__PURE__ */ u3("div", { class: "kbd-group", children: shortcutDisplay.map((k3, i3) => /* @__PURE__ */ u3("div", { class: "kbd", children: k3 }, i3)) }) })
1870
1867
  ]