@ottocode/web-sdk 0.1.271 → 0.1.272

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.
@@ -1 +1 @@
1
- {"version":3,"file":"useClientEvents.d.ts","sourceRoot":"","sources":["../../src/hooks/useClientEvents.ts"],"names":[],"mappings":"AAwPA,wBAAgB,eAAe,CAAC,eAAe,CAAC,EAAE,MAAM,UAqGvD"}
1
+ {"version":3,"file":"useClientEvents.d.ts","sourceRoot":"","sources":["../../src/hooks/useClientEvents.ts"],"names":[],"mappings":"AA4PA,wBAAgB,eAAe,CAAC,eAAe,CAAC,EAAE,MAAM,UA0GvD"}
package/dist/index.js CHANGED
@@ -16074,7 +16074,7 @@ var MessageThread = memo16(function MessageThread2({
16074
16074
  })
16075
16075
  }),
16076
16076
  /* @__PURE__ */ jsx69("div", {
16077
- className: density === "compact" ? "px-2 pt-3 pb-56" : compact ? "p-4 pb-56" : "p-6 pb-64",
16077
+ className: density === "compact" ? "px-2 pt-3 pb-80" : compact ? "p-4 pb-80" : "p-6 pb-96",
16078
16078
  children: /* @__PURE__ */ jsxs60("div", {
16079
16079
  className: contentWidthClass,
16080
16080
  children: [
@@ -29024,6 +29024,7 @@ function openNotificationTarget(notification) {
29024
29024
  function requestNotificationPermission() {
29025
29025
  return new Promise((resolve) => {
29026
29026
  let settled = false;
29027
+ let hasNativeRequest = false;
29027
29028
  const finish = (permission) => {
29028
29029
  if (settled)
29029
29030
  return;
@@ -29033,12 +29034,15 @@ function requestNotificationPermission() {
29033
29034
  try {
29034
29035
  const result = Notification.requestPermission(finish);
29035
29036
  if (result && typeof result.then === "function") {
29037
+ hasNativeRequest = true;
29036
29038
  result.then(finish).catch(() => finish());
29037
29039
  }
29038
29040
  } catch {
29039
29041
  finish();
29040
29042
  }
29041
- setTimeout(() => finish(), 1500);
29043
+ if (!hasNativeRequest) {
29044
+ setTimeout(() => finish(), 60000);
29045
+ }
29042
29046
  });
29043
29047
  }
29044
29048
  function showInAppNotification(notification) {
@@ -29196,6 +29200,8 @@ function useClientEvents(activeSessionId) {
29196
29200
  const currentPermission = Notification.permission;
29197
29201
  if (permission === "granted" || currentPermission === "granted") {
29198
29202
  toast.success("Browser notifications enabled.");
29203
+ } else if (permission === "default" && currentPermission === "default") {
29204
+ return;
29199
29205
  } else {
29200
29206
  toast.info("Browser notifications were not enabled.");
29201
29207
  }
@@ -30178,4 +30184,4 @@ export {
30178
30184
  API_BASE_URL
30179
30185
  };
30180
30186
 
30181
- //# debugId=460C949DC7DB049364756E2164756E21
30187
+ //# debugId=3EE48DC30C2598BF64756E2164756E21