@sylergydigital/issue-pin-sdk 0.6.7 → 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 +6 -0
- package/dist/index.cjs +14 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@sylergydigital/issue-pin-sdk` are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.6.9] - 2026-04-15
|
|
6
|
+
|
|
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.
|
|
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.
|
|
10
|
+
|
|
5
11
|
## [0.6.6] - 2026-04-15
|
|
6
12
|
|
|
7
13
|
### Fixed
|
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) {
|
|
@@ -496,7 +487,8 @@ function FeedbackProvider({
|
|
|
496
487
|
method: "POST",
|
|
497
488
|
headers: {
|
|
498
489
|
"Content-Type": "application/json",
|
|
499
|
-
Authorization: `Bearer ${autoIdentity.accessToken}
|
|
490
|
+
Authorization: `Bearer ${autoIdentity.accessToken}`,
|
|
491
|
+
apikey: resolved.supabaseAnonKey
|
|
500
492
|
},
|
|
501
493
|
body: JSON.stringify({
|
|
502
494
|
apiKey: config.apiKey,
|
|
@@ -514,7 +506,17 @@ function FeedbackProvider({
|
|
|
514
506
|
return;
|
|
515
507
|
}
|
|
516
508
|
window.open(`${baseUrl}${threadPath}`, "_blank", "noopener,noreferrer");
|
|
517
|
-
}, [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");
|
|
518
520
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
519
521
|
FeedbackProviderInner,
|
|
520
522
|
{
|