@sylergydigital/issue-pin-sdk 0.6.8 → 0.6.9

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/index.js CHANGED
@@ -427,17 +427,8 @@ function FeedbackProvider({
427
427
  skipFederation: config.skipFederation
428
428
  });
429
429
  const actorError = federationDone && !actorReady && (federationError || "Unable to link your identity yet. Please retry in a moment.") ? federationError || "Unable to link your identity yet. Please retry in a moment." : null;
430
- if (resolveError) {
431
- console.error("[EW SDK]", resolveError);
432
- return /* @__PURE__ */ jsx(Fragment, { children });
433
- }
434
- if (!resolved) {
435
- return /* @__PURE__ */ jsx(Fragment, { children });
436
- }
437
- const onModeChangeUnified = config.onModeChange ?? (config.onFeedbackActiveChange ? ((m) => config.onFeedbackActiveChange(m === "annotate")) : void 0);
438
- const controlledModeFromProps = config.mode !== void 0 ? config.mode : config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : void 0;
439
- const initialModeUncontrolled = config.mode ?? (config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : "view");
440
430
  const openThreadInDashboard = useCallback((threadId) => {
431
+ if (!resolved) return;
441
432
  const threadPath = `/threads/${threadId}`;
442
433
  const baseUrl = resolved.siteUrl?.replace(/\/+$/, "") || window.location.origin;
443
434
  if (config.apiKey && autoIdentity.accessToken) {
@@ -465,7 +456,17 @@ function FeedbackProvider({
465
456
  return;
466
457
  }
467
458
  window.open(`${baseUrl}${threadPath}`, "_blank", "noopener,noreferrer");
468
- }, [resolved.supabaseUrl, resolved.supabaseAnonKey, resolved.siteUrl, config.apiKey, autoIdentity.accessToken]);
459
+ }, [resolved, config.apiKey, autoIdentity.accessToken]);
460
+ if (resolveError) {
461
+ console.error("[EW SDK]", resolveError);
462
+ return /* @__PURE__ */ jsx(Fragment, { children });
463
+ }
464
+ if (!resolved) {
465
+ return /* @__PURE__ */ jsx(Fragment, { children });
466
+ }
467
+ const onModeChangeUnified = config.onModeChange ?? (config.onFeedbackActiveChange ? ((m) => config.onFeedbackActiveChange(m === "annotate")) : void 0);
468
+ const controlledModeFromProps = config.mode !== void 0 ? config.mode : config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : void 0;
469
+ const initialModeUncontrolled = config.mode ?? (config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : "view");
469
470
  return /* @__PURE__ */ jsx(
470
471
  FeedbackProviderInner,
471
472
  {