sunpeak 0.16.7 → 0.16.10
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/chatgpt/index.cjs +2 -2
- package/dist/chatgpt/index.js +2 -2
- package/dist/claude/index.cjs +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/{index-Bll1bszc.cjs → index-4ydX_boR.cjs} +2 -2
- package/dist/{index-Bll1bszc.cjs.map → index-4ydX_boR.cjs.map} +1 -1
- package/dist/{index-CaQmwZJc.cjs → index-BB4bUvhY.cjs} +2 -2
- package/dist/index-BB4bUvhY.cjs.map +1 -0
- package/dist/{index-CLcr8IyR.js → index-CuZnuVOT.js} +2 -2
- package/dist/index-CuZnuVOT.js.map +1 -0
- package/dist/{index-CACtnwu2.js → index-DrzvUEVi.js} +2 -2
- package/dist/{index-CACtnwu2.js.map → index-DrzvUEVi.js.map} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/dist/simulator/index.cjs +1 -1
- package/dist/simulator/index.js +1 -1
- package/dist/{simulator-B7rw83zP.js → simulator-CZewOh4c.js} +13 -2
- package/dist/{simulator-B7rw83zP.js.map → simulator-CZewOh4c.js.map} +1 -1
- package/dist/{simulator-DjZNa1MI.cjs → simulator-yk9BZ7Vl.cjs} +12 -1
- package/dist/{simulator-DjZNa1MI.cjs.map → simulator-yk9BZ7Vl.cjs.map} +1 -1
- package/package.json +1 -1
- package/template/src/resources/review/review.tsx +131 -19
- package/dist/index-CLcr8IyR.js.map +0 -1
- package/dist/index-CaQmwZJc.cjs.map +0 -1
|
@@ -7562,7 +7562,13 @@ function IframeResource({
|
|
|
7562
7562
|
}) {
|
|
7563
7563
|
const iframeRef = React.useRef(null);
|
|
7564
7564
|
const hostRef = React.useRef(null);
|
|
7565
|
+
const [loaded, setLoaded] = React.useState(false);
|
|
7565
7566
|
const resourceUrl = src ?? scriptSrc;
|
|
7567
|
+
const prevResourceUrl = React.useRef(resourceUrl);
|
|
7568
|
+
if (prevResourceUrl.current !== resourceUrl) {
|
|
7569
|
+
prevResourceUrl.current = resourceUrl;
|
|
7570
|
+
if (loaded) setLoaded(false);
|
|
7571
|
+
}
|
|
7566
7572
|
const hasReceivedSizeRef = React.useRef(false);
|
|
7567
7573
|
const displayModeRef = React.useRef(hostContext?.displayMode);
|
|
7568
7574
|
displayModeRef.current = hostContext?.displayMode;
|
|
@@ -7609,6 +7615,7 @@ function IframeResource({
|
|
|
7609
7615
|
} catch {
|
|
7610
7616
|
}
|
|
7611
7617
|
}
|
|
7618
|
+
setLoaded(true);
|
|
7612
7619
|
}, [src, injectOpenAIRuntime]);
|
|
7613
7620
|
React.useEffect(() => {
|
|
7614
7621
|
if (hostContext) {
|
|
@@ -7682,6 +7689,8 @@ function IframeResource({
|
|
|
7682
7689
|
...borderStyle,
|
|
7683
7690
|
background: "transparent",
|
|
7684
7691
|
colorScheme: hostContext?.theme === "light" ? "light dark" : "dark light",
|
|
7692
|
+
opacity: loaded ? 1 : 0,
|
|
7693
|
+
transition: loaded ? "opacity 100ms" : "none",
|
|
7685
7694
|
width: "100%",
|
|
7686
7695
|
// Start with minHeight to prevent collapse, but allow auto-resize to set actual height.
|
|
7687
7696
|
// Don't use height: 100% as it requires explicit height in parent chain.
|
|
@@ -7705,6 +7714,8 @@ function IframeResource({
|
|
|
7705
7714
|
...borderStyle,
|
|
7706
7715
|
background: "transparent",
|
|
7707
7716
|
colorScheme: hostContext?.theme === "light" ? "light dark" : "dark light",
|
|
7717
|
+
opacity: loaded ? 1 : 0,
|
|
7718
|
+
transition: loaded ? "opacity 100ms" : "none",
|
|
7708
7719
|
width: "100%",
|
|
7709
7720
|
// Start with minHeight to prevent collapse, but allow auto-resize to set actual height.
|
|
7710
7721
|
// Don't use height: 100% as it requires explicit height in parent chain.
|
|
@@ -8782,4 +8793,4 @@ exports.getRegisteredHosts = getRegisteredHosts;
|
|
|
8782
8793
|
exports.registerHostShell = registerHostShell;
|
|
8783
8794
|
exports.useSimulatorState = useSimulatorState;
|
|
8784
8795
|
exports.useThemeContext = useThemeContext;
|
|
8785
|
-
//# sourceMappingURL=simulator-
|
|
8796
|
+
//# sourceMappingURL=simulator-yk9BZ7Vl.cjs.map
|