@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/CHANGELOG.md +2 -1
- package/dist/index.cjs +12 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@sylergydigital/issue-pin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
-
## [0.6.
|
|
5
|
+
## [0.6.9] - 2026-04-15
|
|
6
6
|
|
|
7
7
|
### Fixed
|
|
8
|
+
- **React hooks violation in FeedbackProvider** — `openThreadInDashboard` `useCallback` was placed after conditional early returns, violating rules of hooks (React error #310). Moved hook above the returns with a `!resolved` guard inside the callback body.
|
|
8
9
|
- **SSO handoff missing `apikey` header** — the `external-sso-launch` fetch was rejected by the Supabase gateway with "No API key found in request". Now sends the resolved anon key in the `apikey` header.
|
|
9
10
|
|
|
10
11
|
## [0.6.6] - 2026-04-15
|
package/dist/index.cjs
CHANGED
|
@@ -477,17 +477,8 @@ function FeedbackProvider({
|
|
|
477
477
|
skipFederation: config.skipFederation
|
|
478
478
|
});
|
|
479
479
|
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;
|
|
480
|
-
if (resolveError) {
|
|
481
|
-
console.error("[EW SDK]", resolveError);
|
|
482
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
483
|
-
}
|
|
484
|
-
if (!resolved) {
|
|
485
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
486
|
-
}
|
|
487
|
-
const onModeChangeUnified = config.onModeChange ?? (config.onFeedbackActiveChange ? ((m) => config.onFeedbackActiveChange(m === "annotate")) : void 0);
|
|
488
|
-
const controlledModeFromProps = config.mode !== void 0 ? config.mode : config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : void 0;
|
|
489
|
-
const initialModeUncontrolled = config.mode ?? (config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : "view");
|
|
490
480
|
const openThreadInDashboard = (0, import_react2.useCallback)((threadId) => {
|
|
481
|
+
if (!resolved) return;
|
|
491
482
|
const threadPath = `/threads/${threadId}`;
|
|
492
483
|
const baseUrl = resolved.siteUrl?.replace(/\/+$/, "") || window.location.origin;
|
|
493
484
|
if (config.apiKey && autoIdentity.accessToken) {
|
|
@@ -515,7 +506,17 @@ function FeedbackProvider({
|
|
|
515
506
|
return;
|
|
516
507
|
}
|
|
517
508
|
window.open(`${baseUrl}${threadPath}`, "_blank", "noopener,noreferrer");
|
|
518
|
-
}, [resolved
|
|
509
|
+
}, [resolved, config.apiKey, autoIdentity.accessToken]);
|
|
510
|
+
if (resolveError) {
|
|
511
|
+
console.error("[EW SDK]", resolveError);
|
|
512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
513
|
+
}
|
|
514
|
+
if (!resolved) {
|
|
515
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children });
|
|
516
|
+
}
|
|
517
|
+
const onModeChangeUnified = config.onModeChange ?? (config.onFeedbackActiveChange ? ((m) => config.onFeedbackActiveChange(m === "annotate")) : void 0);
|
|
518
|
+
const controlledModeFromProps = config.mode !== void 0 ? config.mode : config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : void 0;
|
|
519
|
+
const initialModeUncontrolled = config.mode ?? (config.feedbackActive !== void 0 ? config.feedbackActive ? "annotate" : "view" : "view");
|
|
519
520
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
520
521
|
FeedbackProviderInner,
|
|
521
522
|
{
|