@duct-sdk/sdk 0.3.2 → 0.3.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/CHANGELOG.md +5 -0
- package/dist/adapters/react/shell.js +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Public release notes for the Duct SDK. Versioning follows [semver](https://semver.org).
|
|
4
4
|
|
|
5
|
+
## [0.3.3] — 2026-06-09
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Stable iframe `src`** — `userContext` is no longer embedded in the shell iframe URL; context is delivered via `DUCT_READY` postMessage instead. Prevents full iframe reloads when the host page navigates after a deeplink handoff.
|
|
9
|
+
|
|
5
10
|
## [0.3.2] — 2026-06-09
|
|
6
11
|
|
|
7
12
|
### Added
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
// ============================================================
|
|
5
5
|
"use client";
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
7
|
-
import React, { useEffect, useRef, useCallback, useState, } from "react";
|
|
7
|
+
import React, { useEffect, useRef, useCallback, useMemo, useState, } from "react";
|
|
8
8
|
import { resolveShellDimensions, } from "../../core/types.js";
|
|
9
9
|
/**
|
|
10
10
|
* Hook that polls the shell status endpoint once on mount.
|
|
@@ -135,7 +135,10 @@ export function DuctShell({ shellId, userContext, onTokenRequest, onNavigate, on
|
|
|
135
135
|
}, [readyCheck, shellId, shellHost]);
|
|
136
136
|
const controlled = open !== undefined;
|
|
137
137
|
const panelOpen = controlled ? open : isOpen;
|
|
138
|
-
|
|
138
|
+
// Keep iframe src stable across parent-page navigations (deeplink handoff).
|
|
139
|
+
// userContext is delivered via postMessage on DUCT_READY — embedding it in the
|
|
140
|
+
// URL would reload the iframe whenever the host page context changes.
|
|
141
|
+
const shellUrl = useMemo(() => buildShellUrl(shellHost, shellId), [shellHost, shellId]);
|
|
139
142
|
const shellOrigin = (() => {
|
|
140
143
|
try {
|
|
141
144
|
return new URL(shellHost).origin;
|