sunpeak 0.20.11 → 0.20.16
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/bin/commands/dev.mjs +3 -3
- package/bin/sunpeak.js +13 -8
- package/dist/chatgpt/index.cjs +1 -1
- package/dist/chatgpt/index.js +2 -2
- package/dist/claude/index.cjs +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/host/chatgpt/index.cjs +1 -1
- package/dist/host/chatgpt/index.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/inspector/index.cjs +1 -1
- package/dist/inspector/index.js +2 -2
- package/dist/{inspector-JirXykqh.js → inspector-BVYIkjfw.js} +110 -16
- package/dist/inspector-BVYIkjfw.js.map +1 -0
- package/dist/{inspector-CjEFyXqc.cjs → inspector-mL_Ysqj6.cjs} +110 -16
- package/dist/inspector-mL_Ysqj6.cjs.map +1 -0
- package/dist/mcp/index.cjs +13 -13
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +13 -13
- package/dist/mcp/index.js.map +1 -1
- package/dist/{protocol-VbxlTDik.js → protocol-C58brCtf.js} +51 -51
- package/dist/protocol-C58brCtf.js.map +1 -0
- package/dist/{protocol-WZSAhsV8.cjs → protocol-CFifOG2U.cjs} +51 -51
- package/dist/protocol-CFifOG2U.cjs.map +1 -0
- package/dist/{use-app-BEelk4Pj.cjs → use-app-BXVq24n8.cjs} +5 -5
- package/dist/{use-app-BEelk4Pj.cjs.map → use-app-BXVq24n8.cjs.map} +1 -1
- package/dist/{use-app-imsRg_Sq.js → use-app-L0OZBROc.js} +5 -5
- package/dist/{use-app-imsRg_Sq.js.map → use-app-L0OZBROc.js.map} +1 -1
- package/dist/{v4-81B3d_AO.cjs → v4-BtFbnniV.cjs} +1133 -403
- package/dist/v4-BtFbnniV.cjs.map +1 -0
- package/dist/{v4-zo4hA9Qs.js → v4-DfWETn4d.js} +1133 -403
- package/dist/v4-DfWETn4d.js.map +1 -0
- package/package.json +12 -12
- package/template/dist/albums/albums.html +42 -17
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.html +42 -17
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.html +337 -296
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.html +42 -17
- package/template/dist/review/review.json +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +3 -3
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +4 -4
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +3 -3
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +4 -4
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/_metadata.json +30 -30
- package/template/node_modules/.vite-mcp/deps/{external-B0TEY49X.js → external-BzlnL8_g.js} +1132 -403
- package/template/node_modules/.vite-mcp/deps/external-BzlnL8_g.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js +9470 -9295
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/{protocol-C6_cc6NO.js → protocol-Depaaj0Z.js} +6 -6
- package/template/node_modules/.vite-mcp/deps/{protocol-C6_cc6NO.js.map → protocol-Depaaj0Z.js.map} +1 -1
- package/template/node_modules/.vite-mcp/deps/{v4-Dqc4MOHZ.js → v4-3k5wOzJw.js} +4 -3
- package/template/node_modules/.vite-mcp/deps/v4-3k5wOzJw.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/zod.js +3 -3
- package/template/node_modules/.vite-mcp/deps/zod.js.map +1 -1
- package/template/package.json +2 -2
- package/dist/inspector-CjEFyXqc.cjs.map +0 -1
- package/dist/inspector-JirXykqh.js.map +0 -1
- package/dist/protocol-VbxlTDik.js.map +0 -1
- package/dist/protocol-WZSAhsV8.cjs.map +0 -1
- package/dist/v4-81B3d_AO.cjs.map +0 -1
- package/dist/v4-zo4hA9Qs.js.map +0 -1
- package/template/node_modules/.vite-mcp/deps/external-B0TEY49X.js.map +0 -1
- package/template/node_modules/.vite-mcp/deps/v4-Dqc4MOHZ.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-CoPdw6nB.cjs");
|
|
2
|
-
const require_protocol = require("./protocol-
|
|
3
|
-
const require_v4 = require("./v4-
|
|
2
|
+
const require_protocol = require("./protocol-CFifOG2U.cjs");
|
|
3
|
+
const require_v4 = require("./v4-BtFbnniV.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -810,7 +810,7 @@ registerHostShell({
|
|
|
810
810
|
}`
|
|
811
811
|
});
|
|
812
812
|
//#endregion
|
|
813
|
-
//#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.
|
|
813
|
+
//#region ../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.1_@modelcontextprotocol+sdk@1.29.0_zod@4.4.1__react-_92433c7acac2d73b76b395fab111ea67/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js
|
|
814
814
|
((X) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(X, { get: (Y, Z) => (typeof require < "u" ? require : Y)[Z] }) : X)(function(X) {
|
|
815
815
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
816
816
|
throw Error("Dynamic require of \"" + X + "\" is not supported");
|
|
@@ -2589,6 +2589,7 @@ function parseUrlParams() {
|
|
|
2589
2589
|
left: safeAreaLeft ? Number(safeAreaLeft) : 0,
|
|
2590
2590
|
right: safeAreaRight ? Number(safeAreaRight) : 0
|
|
2591
2591
|
} : void 0;
|
|
2592
|
+
const autoRun = params.get("autoRun") === "true" ? true : void 0;
|
|
2592
2593
|
return {
|
|
2593
2594
|
simulation,
|
|
2594
2595
|
tool,
|
|
@@ -2604,9 +2605,63 @@ function parseUrlParams() {
|
|
|
2604
2605
|
host: host ?? void 0,
|
|
2605
2606
|
prodResources,
|
|
2606
2607
|
sidebar,
|
|
2607
|
-
devOverlay
|
|
2608
|
+
devOverlay,
|
|
2609
|
+
autoRun
|
|
2608
2610
|
};
|
|
2609
2611
|
}
|
|
2612
|
+
var PREFS_KEY = "sunpeak-inspector-prefs";
|
|
2613
|
+
var VALID_THEMES = new Set(["light", "dark"]);
|
|
2614
|
+
var VALID_DISPLAY_MODES = new Set([
|
|
2615
|
+
"inline",
|
|
2616
|
+
"pip",
|
|
2617
|
+
"fullscreen"
|
|
2618
|
+
]);
|
|
2619
|
+
var VALID_PLATFORMS = new Set([
|
|
2620
|
+
"web",
|
|
2621
|
+
"desktop",
|
|
2622
|
+
"mobile"
|
|
2623
|
+
]);
|
|
2624
|
+
var VALID_SCREEN_WIDTHS = new Set([
|
|
2625
|
+
"mobile-s",
|
|
2626
|
+
"mobile-l",
|
|
2627
|
+
"tablet",
|
|
2628
|
+
"full"
|
|
2629
|
+
]);
|
|
2630
|
+
function sanitizeStoredPrefs(raw) {
|
|
2631
|
+
if (!raw || typeof raw !== "object") return {};
|
|
2632
|
+
const obj = raw;
|
|
2633
|
+
const prefs = {};
|
|
2634
|
+
if (typeof obj.theme === "string" && VALID_THEMES.has(obj.theme)) prefs.theme = obj.theme;
|
|
2635
|
+
if (typeof obj.locale === "string") prefs.locale = obj.locale;
|
|
2636
|
+
if (typeof obj.displayMode === "string" && VALID_DISPLAY_MODES.has(obj.displayMode)) prefs.displayMode = obj.displayMode;
|
|
2637
|
+
if (typeof obj.containerMaxHeight === "number" && Number.isFinite(obj.containerMaxHeight)) prefs.containerMaxHeight = obj.containerMaxHeight;
|
|
2638
|
+
if (typeof obj.containerMaxWidth === "number" && Number.isFinite(obj.containerMaxWidth)) prefs.containerMaxWidth = obj.containerMaxWidth;
|
|
2639
|
+
if (obj.safeAreaInsets && typeof obj.safeAreaInsets === "object") {
|
|
2640
|
+
const insets = obj.safeAreaInsets;
|
|
2641
|
+
if (typeof insets.top === "number" && typeof insets.bottom === "number" && typeof insets.left === "number" && typeof insets.right === "number") prefs.safeAreaInsets = {
|
|
2642
|
+
top: insets.top,
|
|
2643
|
+
bottom: insets.bottom,
|
|
2644
|
+
left: insets.left,
|
|
2645
|
+
right: insets.right
|
|
2646
|
+
};
|
|
2647
|
+
}
|
|
2648
|
+
if (typeof obj.activeHost === "string") prefs.activeHost = obj.activeHost;
|
|
2649
|
+
if (typeof obj.platform === "string" && VALID_PLATFORMS.has(obj.platform)) prefs.platform = obj.platform;
|
|
2650
|
+
if (typeof obj.hover === "boolean") prefs.hover = obj.hover;
|
|
2651
|
+
if (typeof obj.touch === "boolean") prefs.touch = obj.touch;
|
|
2652
|
+
if (typeof obj.screenWidth === "string" && VALID_SCREEN_WIDTHS.has(obj.screenWidth)) prefs.screenWidth = obj.screenWidth;
|
|
2653
|
+
return prefs;
|
|
2654
|
+
}
|
|
2655
|
+
function readStoredPrefs() {
|
|
2656
|
+
if (typeof window === "undefined") return {};
|
|
2657
|
+
try {
|
|
2658
|
+
const raw = localStorage.getItem(PREFS_KEY);
|
|
2659
|
+
if (!raw) return {};
|
|
2660
|
+
return sanitizeStoredPrefs(JSON.parse(raw));
|
|
2661
|
+
} catch {
|
|
2662
|
+
return {};
|
|
2663
|
+
}
|
|
2664
|
+
}
|
|
2610
2665
|
function useInspectorState({ simulations, defaultHost = "chatgpt" }) {
|
|
2611
2666
|
const simulationNames = Object.keys(simulations).filter((name) => simulations[name].resource).sort((a, b) => {
|
|
2612
2667
|
const simA = simulations[a];
|
|
@@ -2618,9 +2673,11 @@ function useInspectorState({ simulations, defaultHost = "chatgpt" }) {
|
|
|
2618
2673
|
return labelA.localeCompare(labelB);
|
|
2619
2674
|
});
|
|
2620
2675
|
const urlParams = (0, react.useMemo)(() => parseUrlParams(), []);
|
|
2621
|
-
const
|
|
2676
|
+
const autoRun = urlParams.autoRun === true;
|
|
2677
|
+
const storedPrefs = (0, react.useMemo)(() => autoRun ? {} : readStoredPrefs(), [autoRun]);
|
|
2678
|
+
const [screenWidth, setScreenWidth] = (0, react.useState)(storedPrefs.screenWidth ?? "full");
|
|
2622
2679
|
const isMobileWidth = (width) => width === "mobile-s" || width === "mobile-l";
|
|
2623
|
-
const [activeHost, setActiveHost] = (0, react.useState)(urlParams.host ?? defaultHost);
|
|
2680
|
+
const [activeHost, setActiveHost] = (0, react.useState)(urlParams.host ?? storedPrefs.activeHost ?? defaultHost);
|
|
2624
2681
|
const [selectedSimulationName, setSelectedSimulationName] = (0, react.useState)((0, react.useMemo)(() => {
|
|
2625
2682
|
const defaultName = simulationNames[0] ?? "";
|
|
2626
2683
|
if (!urlParams.simulation) return defaultName;
|
|
@@ -2631,23 +2688,60 @@ function useInspectorState({ simulations, defaultHost = "chatgpt" }) {
|
|
|
2631
2688
|
simulationNames
|
|
2632
2689
|
]));
|
|
2633
2690
|
const selectedSim = simulations[selectedSimulationName];
|
|
2634
|
-
const [theme, setTheme] = (0, react.useState)(urlParams.theme ?? DEFAULT_THEME);
|
|
2635
|
-
const [displayMode, _setDisplayMode] = (0, react.useState)(urlParams.displayMode ?? DEFAULT_DISPLAY_MODE);
|
|
2636
|
-
const [locale, setLocale] = (0, react.useState)(urlParams.locale ?? "en-US");
|
|
2691
|
+
const [theme, setTheme] = (0, react.useState)(urlParams.theme ?? storedPrefs.theme ?? DEFAULT_THEME);
|
|
2692
|
+
const [displayMode, _setDisplayMode] = (0, react.useState)(urlParams.displayMode ?? storedPrefs.displayMode ?? DEFAULT_DISPLAY_MODE);
|
|
2693
|
+
const [locale, setLocale] = (0, react.useState)(urlParams.locale ?? storedPrefs.locale ?? "en-US");
|
|
2637
2694
|
const [containerHeight, setContainerHeight] = (0, react.useState)(void 0);
|
|
2638
2695
|
const [containerWidth, setContainerWidth] = (0, react.useState)(void 0);
|
|
2639
|
-
const [containerMaxHeight, setContainerMaxHeight] = (0, react.useState)(urlParams.containerMaxHeight);
|
|
2640
|
-
const [containerMaxWidth, setContainerMaxWidth] = (0, react.useState)(urlParams.containerMaxWidth);
|
|
2641
|
-
const [platform, setPlatform] = (0, react.useState)(urlParams.platform ?? DEFAULT_PLATFORM);
|
|
2642
|
-
const [hover, setHover] = (0, react.useState)(urlParams.deviceCapabilities?.hover ?? true);
|
|
2643
|
-
const [touch, setTouch] = (0, react.useState)(urlParams.deviceCapabilities?.touch ?? false);
|
|
2644
|
-
const [safeAreaInsets, setSafeAreaInsets] = (0, react.useState)(urlParams.safeAreaInsets ?? {
|
|
2696
|
+
const [containerMaxHeight, setContainerMaxHeight] = (0, react.useState)(urlParams.containerMaxHeight ?? storedPrefs.containerMaxHeight);
|
|
2697
|
+
const [containerMaxWidth, setContainerMaxWidth] = (0, react.useState)(urlParams.containerMaxWidth ?? storedPrefs.containerMaxWidth);
|
|
2698
|
+
const [platform, setPlatform] = (0, react.useState)(urlParams.platform ?? storedPrefs.platform ?? DEFAULT_PLATFORM);
|
|
2699
|
+
const [hover, setHover] = (0, react.useState)(urlParams.deviceCapabilities?.hover ?? storedPrefs.hover ?? true);
|
|
2700
|
+
const [touch, setTouch] = (0, react.useState)(urlParams.deviceCapabilities?.touch ?? storedPrefs.touch ?? false);
|
|
2701
|
+
const [safeAreaInsets, setSafeAreaInsets] = (0, react.useState)(urlParams.safeAreaInsets ?? storedPrefs.safeAreaInsets ?? {
|
|
2645
2702
|
top: 0,
|
|
2646
2703
|
bottom: 0,
|
|
2647
2704
|
left: 0,
|
|
2648
2705
|
right: 0
|
|
2649
2706
|
});
|
|
2650
2707
|
const [timeZone, setTimeZone] = (0, react.useState)(() => Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
2708
|
+
const isFirstRender = (0, react.useRef)(true);
|
|
2709
|
+
(0, react.useEffect)(() => {
|
|
2710
|
+
if (isFirstRender.current) {
|
|
2711
|
+
isFirstRender.current = false;
|
|
2712
|
+
return;
|
|
2713
|
+
}
|
|
2714
|
+
if (autoRun) return;
|
|
2715
|
+
try {
|
|
2716
|
+
const prefs = {
|
|
2717
|
+
theme,
|
|
2718
|
+
locale,
|
|
2719
|
+
displayMode,
|
|
2720
|
+
containerMaxHeight,
|
|
2721
|
+
containerMaxWidth,
|
|
2722
|
+
safeAreaInsets,
|
|
2723
|
+
activeHost,
|
|
2724
|
+
platform,
|
|
2725
|
+
hover,
|
|
2726
|
+
touch,
|
|
2727
|
+
screenWidth
|
|
2728
|
+
};
|
|
2729
|
+
localStorage.setItem(PREFS_KEY, JSON.stringify(prefs));
|
|
2730
|
+
} catch {}
|
|
2731
|
+
}, [
|
|
2732
|
+
autoRun,
|
|
2733
|
+
theme,
|
|
2734
|
+
locale,
|
|
2735
|
+
displayMode,
|
|
2736
|
+
containerMaxHeight,
|
|
2737
|
+
containerMaxWidth,
|
|
2738
|
+
safeAreaInsets,
|
|
2739
|
+
activeHost,
|
|
2740
|
+
platform,
|
|
2741
|
+
hover,
|
|
2742
|
+
touch,
|
|
2743
|
+
screenWidth
|
|
2744
|
+
]);
|
|
2651
2745
|
const [measuredContentWidth, setMeasuredContentWidth] = (0, react.useState)(void 0);
|
|
2652
2746
|
const handleContentWidthChange = (0, react.useCallback)((width) => {
|
|
2653
2747
|
setMeasuredContentWidth(width);
|
|
@@ -4627,4 +4721,4 @@ Object.defineProperty(exports, "useThemeContext", {
|
|
|
4627
4721
|
}
|
|
4628
4722
|
});
|
|
4629
4723
|
|
|
4630
|
-
//# sourceMappingURL=inspector-
|
|
4724
|
+
//# sourceMappingURL=inspector-mL_Ysqj6.cjs.map
|