sunpeak 0.9.10 → 0.9.12
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 +1 -1
- package/dist/chatgpt/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/{simulator-url-wBi-pko3.js → simulator-url-BZBcq5tc.js} +9 -16
- package/dist/{simulator-url-wBi-pko3.js.map → simulator-url-BZBcq5tc.js.map} +1 -1
- package/dist/{simulator-url-oevkxbU4.cjs → simulator-url-D4tFBjeu.cjs} +10 -17
- package/dist/{simulator-url-oevkxbU4.cjs.map → simulator-url-D4tFBjeu.cjs.map} +1 -1
- package/package.json +1 -1
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.json +1 -1
- package/template/dist/map.json +1 -1
- package/template/dist/review.json +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +6 -6
- package/template/node_modules/.vite/deps/_metadata.json +25 -25
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
|
@@ -5653,7 +5653,7 @@ const useEscCloseStack = (listening, cb) => {
|
|
|
5653
5653
|
}, [id, listening, latestCallback]);
|
|
5654
5654
|
};
|
|
5655
5655
|
const __vite_import_meta_env__ = { "DEV": false, "MODE": "production" };
|
|
5656
|
-
const META_ENV = typeof { url: typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("simulator-url-
|
|
5656
|
+
const META_ENV = typeof { url: typeof document === "undefined" ? require("url").pathToFileURL(__filename).href : _documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === "SCRIPT" && _documentCurrentScript.src || new URL("simulator-url-D4tFBjeu.cjs", document.baseURI).href } !== "undefined" ? __vite_import_meta_env__ : void 0;
|
|
5657
5657
|
const NODE_ENV = typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.NODE_ENV) ? (_b = process.env) == null ? void 0 : _b.NODE_ENV : "production";
|
|
5658
5658
|
const isDev = NODE_ENV === "development" || !!(META_ENV == null ? void 0 : META_ENV.DEV);
|
|
5659
5659
|
const isJSDomLike = typeof navigator !== "undefined" && /(jsdom|happy-dom)/i.test(navigator.userAgent) || typeof globalThis.happyDOM === "object";
|
|
@@ -7627,14 +7627,14 @@ const SCREEN_WIDTHS = {
|
|
|
7627
7627
|
full: 1024
|
|
7628
7628
|
};
|
|
7629
7629
|
const ALLOWED_SCRIPT_ORIGINS = [
|
|
7630
|
-
"https://
|
|
7630
|
+
"https://sunpeak-prod-app-storage.s3.us-east-2.amazonaws.com",
|
|
7631
7631
|
"http://localhost",
|
|
7632
7632
|
"https://localhost",
|
|
7633
7633
|
"http://127.0.0.1",
|
|
7634
7634
|
"https://127.0.0.1"
|
|
7635
7635
|
];
|
|
7636
7636
|
const ALLOWED_PARENT_ORIGINS = [
|
|
7637
|
-
"https://
|
|
7637
|
+
"https://sandbox.sunpeakai.com",
|
|
7638
7638
|
"http://localhost",
|
|
7639
7639
|
"https://localhost",
|
|
7640
7640
|
"http://127.0.0.1",
|
|
@@ -8167,31 +8167,24 @@ function IframeResource({ scriptSrc, className, style, csp }) {
|
|
|
8167
8167
|
sendUpdate("openai:update");
|
|
8168
8168
|
}, [sendUpdate]);
|
|
8169
8169
|
const isValidScriptSrc = React.useMemo(() => isAllowedScriptSrc(scriptSrc), [scriptSrc]);
|
|
8170
|
-
const
|
|
8170
|
+
const htmlContent = React.useMemo(() => {
|
|
8171
8171
|
if (!isValidScriptSrc) {
|
|
8172
8172
|
console.error("[IframeResource] Script source not allowed:", scriptSrc);
|
|
8173
|
-
|
|
8174
|
-
const blob2 = new Blob([errorHtml], { type: "text/html" });
|
|
8175
|
-
return URL.createObjectURL(blob2);
|
|
8173
|
+
return `<!DOCTYPE html><html><body><h1>Error</h1><p>Script source not allowed.</p></body></html>`;
|
|
8176
8174
|
}
|
|
8177
8175
|
const absoluteScriptSrc = scriptSrc.startsWith("/") ? `${window.location.origin}${scriptSrc}` : scriptSrc;
|
|
8178
8176
|
const cspPolicy = generateCSP(csp, absoluteScriptSrc);
|
|
8179
8177
|
const bridgeScript = generateBridgeScript(ALLOWED_PARENT_ORIGINS);
|
|
8180
|
-
|
|
8178
|
+
return injectBridgeScript(
|
|
8181
8179
|
generateScriptHtml(absoluteScriptSrc, theme ?? "dark", cspPolicy),
|
|
8182
8180
|
bridgeScript
|
|
8183
8181
|
);
|
|
8184
|
-
const blob = new Blob([html], { type: "text/html" });
|
|
8185
|
-
return URL.createObjectURL(blob);
|
|
8186
8182
|
}, [scriptSrc, theme, isValidScriptSrc, csp]);
|
|
8187
|
-
React.useEffect(() => {
|
|
8188
|
-
return () => URL.revokeObjectURL(blobUrl);
|
|
8189
|
-
}, [blobUrl]);
|
|
8190
8183
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
8191
8184
|
"iframe",
|
|
8192
8185
|
{
|
|
8193
8186
|
ref: iframeRef,
|
|
8194
|
-
|
|
8187
|
+
srcDoc: htmlContent,
|
|
8195
8188
|
className,
|
|
8196
8189
|
style: {
|
|
8197
8190
|
border: "none",
|
|
@@ -8203,8 +8196,8 @@ function IframeResource({ scriptSrc, className, style, csp }) {
|
|
|
8203
8196
|
...style
|
|
8204
8197
|
},
|
|
8205
8198
|
title: "Resource Preview",
|
|
8206
|
-
sandbox: "allow-scripts",
|
|
8207
|
-
allow: "accelerometer 'none'; autoplay 'none'; camera 'none'; display-capture 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none';
|
|
8199
|
+
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
8200
|
+
allow: "local-network-access *; microphone *; midi *; accelerometer 'none'; autoplay 'none'; camera 'none'; display-capture 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none'; payment 'none'; publickey-credentials-get 'none'; usb 'none'; xr-spatial-tracking 'none'"
|
|
8208
8201
|
}
|
|
8209
8202
|
);
|
|
8210
8203
|
}
|
|
@@ -9202,4 +9195,4 @@ exports.useWidgetAPI = useWidgetAPI;
|
|
|
9202
9195
|
exports.useWidgetGlobal = useWidgetGlobal;
|
|
9203
9196
|
exports.useWidgetProps = useWidgetProps;
|
|
9204
9197
|
exports.useWidgetState = useWidgetState;
|
|
9205
|
-
//# sourceMappingURL=simulator-url-
|
|
9198
|
+
//# sourceMappingURL=simulator-url-D4tFBjeu.cjs.map
|