@stackable-labs/embeddables 1.43.2 → 1.43.3

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/react.js CHANGED
@@ -5,7 +5,7 @@ import * as xn from "react-dom";
5
5
  import ls from "react-dom";
6
6
  const Gc = () => {
7
7
  try {
8
- return "2eb2876d-301b-47f9-8a6c-71a1c6825cfe";
8
+ return "4ace3d44-2e3a-4b6f-8164-31c905e7cfa6";
9
9
  } catch {
10
10
  return "dev";
11
11
  }
@@ -11890,6 +11890,7 @@ const Rc = {
11890
11890
  const I = window.zE;
11891
11891
  I && I("messenger", "logoutUser");
11892
11892
  }, []), U = _e((I) => {
11893
+ console.log("[embeddables] Running sign lifecycle for user:", I.id);
11893
11894
  const { email: S, name: T } = I, A = { external_id: String(I.id) };
11894
11895
  (async () => {
11895
11896
  const O = await R({ ...A, email: S, name: T });
@@ -11907,10 +11908,14 @@ const Rc = {
11907
11908
  console.log(`[embeddables] Deferring sign lifecycle — waiting for identity:extend extensions: ${N.current.size}/${k.length} ready`), C.current = I;
11908
11909
  return;
11909
11910
  }
11910
- U(I);
11911
+ console.log("[embeddables] No identity:extend extensions (or all ready) — signing immediately"), U(I);
11911
11912
  }, [k, U]);
11912
11913
  le(() => {
11913
- if (s) {
11914
+ if (!v) {
11915
+ console.log("[embeddables] Identity effect skipped — extensions not loaded yet");
11916
+ return;
11917
+ }
11918
+ if (console.log("[embeddables] Identity effect running", { initialized: v, customerId: !!s, extendExtensions: k.length }), s) {
11914
11919
  console.log("[embeddables] Identity from props:", { customerId: s, customerEmail: a, customerName: i });
11915
11920
  const I = {
11916
11921
  authenticated: !0,
@@ -11930,8 +11935,8 @@ const Rc = {
11930
11935
  return;
11931
11936
  x((I) => I.authenticated ? (console.log("[embeddables] Customer props cleared, logging out"), B(), E("identity.logout", { authenticated: !1, user: null }), { authenticated: !1, user: null }) : I);
11932
11937
  }
11933
- }, [s, a, i, j, E, B]), le(() => {
11934
- if (s !== void 0)
11938
+ }, [v, s, a, i, k, j, E, B]), le(() => {
11939
+ if (!v || s !== void 0)
11935
11940
  return;
11936
11941
  const I = () => {
11937
11942
  const T = document.getElementById("stackable-identity");
@@ -11959,7 +11964,7 @@ const Rc = {
11959
11964
  I();
11960
11965
  const S = new MutationObserver(I);
11961
11966
  return S.observe(document.head, { childList: !0, subtree: !0 }), S.observe(document.body, { childList: !0, subtree: !0 }), () => S.disconnect();
11962
- }, [s, j, E, B]), le(() => {
11967
+ }, [v, s, j, E, B]), le(() => {
11963
11968
  if (!w.authenticated)
11964
11969
  return;
11965
11970
  const I = (S) => {