sunpeak 0.13.7 → 0.13.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/chatgpt/conversation.d.ts +7 -1
- package/dist/chatgpt/iframe-resource.d.ts +8 -1
- package/dist/chatgpt/index.cjs +1 -1
- package/dist/chatgpt/index.js +1 -1
- package/dist/{index-B9MMk69u.cjs → index-BhfrUoaZ.cjs} +23 -14
- package/dist/index-BhfrUoaZ.cjs.map +1 -0
- package/dist/{index-DqOCq5r8.js → index-D6Z9ZDNT.js} +22 -13
- package/dist/index-D6Z9ZDNT.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/template/.sunpeak/resource-loader.html +0 -13
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.json +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +25 -25
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/dist/index-B9MMk69u.cjs.map +0 -1
- package/dist/index-DqOCq5r8.js.map +0 -1
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@modelcontextprotocol_ext-apps.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@modelcontextprotocol_ext-apps.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@modelcontextprotocol_ext-apps_app-bridge.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@modelcontextprotocol_ext-apps_app-bridge.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@modelcontextprotocol_ext-apps_react.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@modelcontextprotocol_ext-apps_react.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Avatar.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Avatar.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Button.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Button.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Checkbox.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Checkbox.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Icon.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Icon.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Input.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Input.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_SegmentedControl.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_SegmentedControl.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Select.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Select.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Textarea.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_components_Textarea.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_theme.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/@openai_apps-sdk-ui_theme.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-3FUH6LFP.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-3FUH6LFP.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-4EQ7FTMQ.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-4EQ7FTMQ.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-4WVD247F.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-4WVD247F.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-ABGJ7IDC.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-ABGJ7IDC.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-DP4XHQAG.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-DP4XHQAG.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-EGRHWZRV.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-EGRHWZRV.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-EHI2XMPP.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-EHI2XMPP.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-JWMBYPFX.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-JWMBYPFX.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-PZDCUP6P.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-PZDCUP6P.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-Q2RBUOJ3.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-Q2RBUOJ3.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-SPDZ46BB.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-SPDZ46BB.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-WEIC4XKX.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-WEIC4XKX.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-WSHFT23M.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-WSHFT23M.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-XQARMNNG.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/chunk-XQARMNNG.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/clsx.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/clsx.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/embla-carousel-react.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/embla-carousel-react.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/embla-carousel-wheel-gestures.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/embla-carousel-wheel-gestures.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/mapbox-gl.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/mapbox-gl.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/package.json +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react-dom.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react-dom.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react-dom_client.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react-dom_client.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react_jsx-dev-runtime.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react_jsx-dev-runtime.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react_jsx-runtime.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/react_jsx-runtime.js.map +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/tailwind-merge.js +0 -0
- /package/template/node_modules/.vite-mcp/{deps_temp_78ab0da5 → deps_temp_5401a2b9}/tailwind-merge.js.map +0 -0
|
@@ -7527,7 +7527,8 @@ function Conversation({
|
|
|
7527
7527
|
onRequestDisplayMode,
|
|
7528
7528
|
appName = "Sunpeak",
|
|
7529
7529
|
appIcon,
|
|
7530
|
-
userMessage = "What have you got for me today?"
|
|
7530
|
+
userMessage = "What have you got for me today?",
|
|
7531
|
+
isTransitioning = false
|
|
7531
7532
|
}) {
|
|
7532
7533
|
const isDesktop = platform2 === "desktop";
|
|
7533
7534
|
const containerWidth = screenWidth === "full" ? "100%" : `${SCREEN_WIDTHS[screenWidth]}px`;
|
|
@@ -7649,6 +7650,12 @@ function Conversation({
|
|
|
7649
7650
|
"div",
|
|
7650
7651
|
{
|
|
7651
7652
|
className: isPip ? "h-full w-full max-w-full overflow-auto bg-white dark:bg-[#212121]" : isFullscreen ? "h-full w-full max-w-full overflow-auto bg-surface" : "h-full w-full max-w-full bg-transparent",
|
|
7653
|
+
style: {
|
|
7654
|
+
opacity: isTransitioning ? 0 : 1,
|
|
7655
|
+
// Only animate the reveal — the hide must be instant
|
|
7656
|
+
// to prevent old content from being visible in the new layout.
|
|
7657
|
+
transition: isTransitioning ? "none" : "opacity 100ms"
|
|
7658
|
+
},
|
|
7652
7659
|
children
|
|
7653
7660
|
}
|
|
7654
7661
|
)
|
|
@@ -14431,13 +14438,11 @@ function IframeResource({
|
|
|
14431
14438
|
csp,
|
|
14432
14439
|
className,
|
|
14433
14440
|
style,
|
|
14441
|
+
onDisplayModeReady,
|
|
14434
14442
|
debugInjectState
|
|
14435
14443
|
}) {
|
|
14436
14444
|
const iframeRef = useRef(null);
|
|
14437
14445
|
const hostRef = useRef(null);
|
|
14438
|
-
const [readyDisplayMode, setReadyDisplayMode] = useState(
|
|
14439
|
-
hostContext?.displayMode
|
|
14440
|
-
);
|
|
14441
14446
|
const resourceUrl = src ?? scriptSrc;
|
|
14442
14447
|
const hasReceivedSizeRef = useRef(false);
|
|
14443
14448
|
const host = useMemo(
|
|
@@ -14451,7 +14456,7 @@ function IframeResource({
|
|
|
14451
14456
|
iframeRef.current.style.height = `${params.height}px`;
|
|
14452
14457
|
}
|
|
14453
14458
|
},
|
|
14454
|
-
onDisplayModeReady: (mode) =>
|
|
14459
|
+
onDisplayModeReady: (mode) => onDisplayModeReady?.(mode)
|
|
14455
14460
|
}),
|
|
14456
14461
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14457
14462
|
[]
|
|
@@ -14510,7 +14515,6 @@ function IframeResource({
|
|
|
14510
14515
|
const theme = hostContext?.theme ?? "dark";
|
|
14511
14516
|
return generateScriptHtml(absoluteScriptSrc, theme, cspPolicy);
|
|
14512
14517
|
}, [scriptSrc, isValidUrl, csp, hostContext?.theme]);
|
|
14513
|
-
const isTransitioning = hostContext?.displayMode !== readyDisplayMode;
|
|
14514
14518
|
if (src) {
|
|
14515
14519
|
if (!isValidUrl) {
|
|
14516
14520
|
console.error("[IframeResource] URL not allowed:", src);
|
|
@@ -14534,10 +14538,6 @@ function IframeResource({
|
|
|
14534
14538
|
// Start with minHeight to prevent collapse, but allow auto-resize to set actual height.
|
|
14535
14539
|
// Don't use height: 100% as it requires explicit height in parent chain.
|
|
14536
14540
|
minHeight: "200px",
|
|
14537
|
-
// Hide during display mode transitions; reveal with a short fade once
|
|
14538
|
-
// the iframe has committed its DOM for the new mode.
|
|
14539
|
-
opacity: isTransitioning ? 0 : 1,
|
|
14540
|
-
transition: isTransitioning ? "none" : "opacity 100ms",
|
|
14541
14541
|
...style
|
|
14542
14542
|
},
|
|
14543
14543
|
title: "Resource Preview",
|
|
@@ -14561,8 +14561,6 @@ function IframeResource({
|
|
|
14561
14561
|
// Start with minHeight to prevent collapse, but allow auto-resize to set actual height.
|
|
14562
14562
|
// Don't use height: 100% as it requires explicit height in parent chain.
|
|
14563
14563
|
minHeight: "200px",
|
|
14564
|
-
opacity: isTransitioning ? 0 : 1,
|
|
14565
|
-
transition: isTransitioning ? "none" : "opacity 100ms",
|
|
14566
14564
|
...style
|
|
14567
14565
|
},
|
|
14568
14566
|
title: "Resource Preview",
|
|
@@ -14688,6 +14686,12 @@ function ChatGPTSimulator({
|
|
|
14688
14686
|
_setDisplayMode(mode);
|
|
14689
14687
|
}
|
|
14690
14688
|
};
|
|
14689
|
+
const [readyDisplayMode, setReadyDisplayMode] = useState(
|
|
14690
|
+
urlParams.displayMode ?? DEFAULT_DISPLAY_MODE
|
|
14691
|
+
);
|
|
14692
|
+
const handleDisplayModeReady = useCallback((mode) => {
|
|
14693
|
+
setReadyDisplayMode(mode);
|
|
14694
|
+
}, []);
|
|
14691
14695
|
const hostContext = useMemo(
|
|
14692
14696
|
() => ({
|
|
14693
14697
|
theme,
|
|
@@ -14779,6 +14783,8 @@ function ChatGPTSimulator({
|
|
|
14779
14783
|
const resourceUrl = selectedSim?.resourceUrl;
|
|
14780
14784
|
const resourceScript = selectedSim?.resourceScript;
|
|
14781
14785
|
const csp = selectedSim ? extractResourceCSP(selectedSim.resource) : void 0;
|
|
14786
|
+
const hasIframeContent = !!(resourceUrl || resourceScript);
|
|
14787
|
+
const isTransitioning = hasIframeContent && displayMode !== readyDisplayMode;
|
|
14782
14788
|
let content;
|
|
14783
14789
|
if (resourceUrl) {
|
|
14784
14790
|
content = /* @__PURE__ */ jsx(
|
|
@@ -14792,6 +14798,7 @@ function ChatGPTSimulator({
|
|
|
14792
14798
|
onDisplayModeChange: handleDisplayModeChange,
|
|
14793
14799
|
onUpdateModelContext: handleUpdateModelContext
|
|
14794
14800
|
},
|
|
14801
|
+
onDisplayModeReady: handleDisplayModeReady,
|
|
14795
14802
|
debugInjectState: modelContext,
|
|
14796
14803
|
className: "h-full w-full"
|
|
14797
14804
|
}
|
|
@@ -14809,6 +14816,7 @@ function ChatGPTSimulator({
|
|
|
14809
14816
|
onDisplayModeChange: handleDisplayModeChange,
|
|
14810
14817
|
onUpdateModelContext: handleUpdateModelContext
|
|
14811
14818
|
},
|
|
14819
|
+
onDisplayModeReady: handleDisplayModeReady,
|
|
14812
14820
|
debugInjectState: modelContext,
|
|
14813
14821
|
className: "h-full w-full"
|
|
14814
14822
|
}
|
|
@@ -15034,6 +15042,7 @@ function ChatGPTSimulator({
|
|
|
15034
15042
|
appName,
|
|
15035
15043
|
appIcon,
|
|
15036
15044
|
userMessage: selectedSim?.userMessage,
|
|
15045
|
+
isTransitioning,
|
|
15037
15046
|
children: content
|
|
15038
15047
|
},
|
|
15039
15048
|
selectedSimulationName
|
|
@@ -15118,4 +15127,4 @@ export {
|
|
|
15118
15127
|
index as i,
|
|
15119
15128
|
useThemeContext as u
|
|
15120
15129
|
};
|
|
15121
|
-
//# sourceMappingURL=index-
|
|
15130
|
+
//# sourceMappingURL=index-D6Z9ZDNT.js.map
|