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
package/dist/chatgpt/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const simulatorUrl = require("../simulator-url-
|
|
3
|
+
const simulatorUrl = require("../simulator-url-D4tFBjeu.cjs");
|
|
4
4
|
exports.ChatGPTSimulator = simulatorUrl.ChatGPTSimulator;
|
|
5
5
|
exports.IframeResource = simulatorUrl.IframeResource;
|
|
6
6
|
exports.ThemeProvider = simulatorUrl.ThemeProvider;
|
package/dist/chatgpt/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const simulatorUrl = require("./simulator-url-
|
|
3
|
+
const simulatorUrl = require("./simulator-url-D4tFBjeu.cjs");
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const discovery = require("./discovery-a4WId9PC.cjs");
|
|
6
6
|
function _interopNamespaceDefault(e) {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as clsx } from "./simulator-url-
|
|
2
|
-
import { C, I, S, T, c, v, s, q, i, r, w, t, e, f, g, h, j, u, k, l, m, n, d, b, o, p } from "./simulator-url-
|
|
1
|
+
import { a as clsx } from "./simulator-url-BZBcq5tc.js";
|
|
2
|
+
import { C, I, S, T, c, v, s, q, i, r, w, t, e, f, g, h, j, u, k, l, m, n, d, b, o, p } from "./simulator-url-BZBcq5tc.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { i as i2, d as d2, h as h2, c as c2, b as b2, e as e2, a, f as f2, g as g2, t as t2 } from "./discovery-ft3cd2dW.js";
|
|
5
5
|
const MOBILE_BREAKPOINT = 768;
|
|
@@ -7609,14 +7609,14 @@ const SCREEN_WIDTHS = {
|
|
|
7609
7609
|
full: 1024
|
|
7610
7610
|
};
|
|
7611
7611
|
const ALLOWED_SCRIPT_ORIGINS = [
|
|
7612
|
-
"https://
|
|
7612
|
+
"https://sunpeak-prod-app-storage.s3.us-east-2.amazonaws.com",
|
|
7613
7613
|
"http://localhost",
|
|
7614
7614
|
"https://localhost",
|
|
7615
7615
|
"http://127.0.0.1",
|
|
7616
7616
|
"https://127.0.0.1"
|
|
7617
7617
|
];
|
|
7618
7618
|
const ALLOWED_PARENT_ORIGINS = [
|
|
7619
|
-
"https://
|
|
7619
|
+
"https://sandbox.sunpeakai.com",
|
|
7620
7620
|
"http://localhost",
|
|
7621
7621
|
"https://localhost",
|
|
7622
7622
|
"http://127.0.0.1",
|
|
@@ -8149,31 +8149,24 @@ function IframeResource({ scriptSrc, className, style, csp }) {
|
|
|
8149
8149
|
sendUpdate("openai:update");
|
|
8150
8150
|
}, [sendUpdate]);
|
|
8151
8151
|
const isValidScriptSrc = useMemo(() => isAllowedScriptSrc(scriptSrc), [scriptSrc]);
|
|
8152
|
-
const
|
|
8152
|
+
const htmlContent = useMemo(() => {
|
|
8153
8153
|
if (!isValidScriptSrc) {
|
|
8154
8154
|
console.error("[IframeResource] Script source not allowed:", scriptSrc);
|
|
8155
|
-
|
|
8156
|
-
const blob2 = new Blob([errorHtml], { type: "text/html" });
|
|
8157
|
-
return URL.createObjectURL(blob2);
|
|
8155
|
+
return `<!DOCTYPE html><html><body><h1>Error</h1><p>Script source not allowed.</p></body></html>`;
|
|
8158
8156
|
}
|
|
8159
8157
|
const absoluteScriptSrc = scriptSrc.startsWith("/") ? `${window.location.origin}${scriptSrc}` : scriptSrc;
|
|
8160
8158
|
const cspPolicy = generateCSP(csp, absoluteScriptSrc);
|
|
8161
8159
|
const bridgeScript = generateBridgeScript(ALLOWED_PARENT_ORIGINS);
|
|
8162
|
-
|
|
8160
|
+
return injectBridgeScript(
|
|
8163
8161
|
generateScriptHtml(absoluteScriptSrc, theme ?? "dark", cspPolicy),
|
|
8164
8162
|
bridgeScript
|
|
8165
8163
|
);
|
|
8166
|
-
const blob = new Blob([html], { type: "text/html" });
|
|
8167
|
-
return URL.createObjectURL(blob);
|
|
8168
8164
|
}, [scriptSrc, theme, isValidScriptSrc, csp]);
|
|
8169
|
-
useEffect(() => {
|
|
8170
|
-
return () => URL.revokeObjectURL(blobUrl);
|
|
8171
|
-
}, [blobUrl]);
|
|
8172
8165
|
return /* @__PURE__ */ jsx(
|
|
8173
8166
|
"iframe",
|
|
8174
8167
|
{
|
|
8175
8168
|
ref: iframeRef,
|
|
8176
|
-
|
|
8169
|
+
srcDoc: htmlContent,
|
|
8177
8170
|
className,
|
|
8178
8171
|
style: {
|
|
8179
8172
|
border: "none",
|
|
@@ -8185,8 +8178,8 @@ function IframeResource({ scriptSrc, className, style, csp }) {
|
|
|
8185
8178
|
...style
|
|
8186
8179
|
},
|
|
8187
8180
|
title: "Resource Preview",
|
|
8188
|
-
sandbox: "allow-scripts",
|
|
8189
|
-
allow: "accelerometer 'none'; autoplay 'none'; camera 'none'; display-capture 'none'; geolocation 'none'; gyroscope 'none'; magnetometer 'none';
|
|
8181
|
+
sandbox: "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox",
|
|
8182
|
+
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'"
|
|
8190
8183
|
}
|
|
8191
8184
|
);
|
|
8192
8185
|
}
|
|
@@ -9186,4 +9179,4 @@ export {
|
|
|
9186
9179
|
getAPI as v,
|
|
9187
9180
|
resetProviderCache as w
|
|
9188
9181
|
};
|
|
9189
|
-
//# sourceMappingURL=simulator-url-
|
|
9182
|
+
//# sourceMappingURL=simulator-url-BZBcq5tc.js.map
|