sunpeak 0.20.53 → 0.20.56
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/inspect.mjs +43 -7
- package/bin/lib/sandbox-server.mjs +34 -5
- package/bin/lib/test/base-config.mjs +8 -1
- package/dist/chatgpt/index.cjs +1 -1
- package/dist/chatgpt/index.js +1 -1
- package/dist/claude/index.cjs +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/embed.css +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/inspector/index.cjs +1 -1
- package/dist/inspector/index.js +1 -1
- package/dist/{inspector-CEmRtVwc.js → inspector-BYuRWH6c.js} +35 -6
- package/dist/inspector-BYuRWH6c.js.map +1 -0
- package/dist/{inspector-BtYInER9.cjs → inspector-CoBJOqh4.cjs} +35 -6
- package/dist/inspector-CoBJOqh4.cjs.map +1 -0
- package/dist/sandbox-proxy.html +34 -5
- package/dist/style.css +27 -27
- package/package.json +17 -17
- package/template/dist/albums/albums.html +1 -1
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.html +1 -1
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.html +536 -492
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.html +1 -1
- package/template/dist/review/review.json +1 -1
- package/template/node_modules/.bin/vite +2 -2
- package/template/node_modules/.bin/vitest +2 -2
- package/template/node_modules/.vite/deps/_metadata.json +4 -4
- package/template/node_modules/.vite-mcp/deps/_metadata.json +22 -22
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js +32928 -31943
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/vitest.js +21 -21
- package/template/node_modules/.vite-mcp/deps/vitest.js.map +1 -1
- package/template/package.json +7 -7
- package/template/tests/e2e/albums.spec.ts +0 -26
- package/template/tests/e2e/carousel.spec.ts +7 -63
- package/template/tests/e2e/map.spec.ts +0 -28
- package/template/tests/e2e/review.spec.ts +8 -45
- package/dist/inspector-BtYInER9.cjs.map +0 -1
- package/dist/inspector-CEmRtVwc.js.map +0 -1
package/dist/sandbox-proxy.html
CHANGED
|
@@ -23,6 +23,15 @@ iframe { border: none; width: 100%; height: 100%; display: block; }
|
|
|
23
23
|
var platformScript = platform === 'chatgpt'
|
|
24
24
|
? "window.openai={uploadFile:function(f){console.log(\"[Inspector] uploadFile:\",f.name);return Promise.resolve({fileId:\"sim_file_\"+Date.now()})},getFileDownloadUrl:function(p){console.log(\"[Inspector] getFileDownloadUrl:\",p.fileId);return Promise.resolve({downloadUrl:\"https://inspector.local/files/\"+p.fileId})},requestModal:function(p){console.log(\"[Inspector] requestModal:\",JSON.stringify(p));return Promise.resolve()},requestCheckout:function(s){console.log(\"[Inspector] requestCheckout:\",JSON.stringify(s));return Promise.resolve({id:\"sim_order_\"+Date.now(),checkout_session_id:s.id||\"sim_session\",status:\"completed\"})},requestClose:function(){console.log(\"[Inspector] requestClose\")},requestDisplayMode:function(p){console.log(\"[Inspector] requestDisplayMode:\",p.mode);return Promise.resolve()},sendFollowUpMessage:function(p){console.log(\"[Inspector] sendFollowUpMessage:\",p.prompt)},openExternal:function(p){console.log(\"[Inspector] openExternal:\",p.href);try{var u=new URL(p.href);if(u.protocol!==\"http:\"&&u.protocol!==\"https:\"){console.warn(\"[Inspector] openExternal blocked non-http(s) URL:\",p.href);return}window.open(p.href,\"_blank\",\"noopener,noreferrer\")}catch(e){console.warn(\"[Inspector] openExternal blocked invalid URL:\",p.href)}}};"
|
|
25
25
|
: null;
|
|
26
|
+
var DEFAULT_INNER_SANDBOX =
|
|
27
|
+
'allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox';
|
|
28
|
+
var ALLOWED_INNER_SANDBOX_TOKENS = {
|
|
29
|
+
'allow-scripts': true,
|
|
30
|
+
'allow-same-origin': true,
|
|
31
|
+
'allow-forms': true,
|
|
32
|
+
'allow-popups': true,
|
|
33
|
+
'allow-popups-to-escape-sandbox': true
|
|
34
|
+
};
|
|
26
35
|
|
|
27
36
|
window.addEventListener('message', function(event) {
|
|
28
37
|
var data = event.data;
|
|
@@ -80,8 +89,7 @@ iframe { border: none; width: 100%; height: 100%; display: block; }
|
|
|
80
89
|
clearInterval(readyInterval);
|
|
81
90
|
if (innerFrame) innerFrame.remove();
|
|
82
91
|
innerFrame = document.createElement('iframe');
|
|
83
|
-
innerFrame.sandbox = p.sandbox
|
|
84
|
-
'allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox';
|
|
92
|
+
innerFrame.sandbox = sanitizeInnerSandbox(p.sandbox);
|
|
85
93
|
if (p.allow) innerFrame.allow = p.allow;
|
|
86
94
|
document.body.appendChild(innerFrame);
|
|
87
95
|
innerWindow = innerFrame.contentWindow;
|
|
@@ -94,13 +102,14 @@ iframe { border: none; width: 100%; height: 100%; display: block; }
|
|
|
94
102
|
}
|
|
95
103
|
|
|
96
104
|
function createInnerFrameWithSrc(p) {
|
|
105
|
+
var safeSrc = normalizeInnerSrc(p && p.src);
|
|
106
|
+
if (!safeSrc) return;
|
|
97
107
|
clearInterval(readyInterval);
|
|
98
108
|
if (innerFrame) innerFrame.remove();
|
|
99
109
|
innerFrame = document.createElement('iframe');
|
|
100
|
-
innerFrame.sandbox =
|
|
101
|
-
'allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox';
|
|
110
|
+
innerFrame.sandbox = DEFAULT_INNER_SANDBOX;
|
|
102
111
|
if (p.allow) innerFrame.allow = p.allow;
|
|
103
|
-
innerFrame.src =
|
|
112
|
+
innerFrame.src = safeSrc;
|
|
104
113
|
innerFrame.style.height = '100%';
|
|
105
114
|
if (p.theme) innerFrame.style.colorScheme = p.theme;
|
|
106
115
|
|
|
@@ -145,6 +154,26 @@ iframe { border: none; width: 100%; height: 100%; display: block; }
|
|
|
145
154
|
innerWindow = innerFrame.contentWindow;
|
|
146
155
|
}
|
|
147
156
|
|
|
157
|
+
function sanitizeInnerSandbox(value) {
|
|
158
|
+
if (typeof value !== 'string' || !value.trim()) return DEFAULT_INNER_SANDBOX;
|
|
159
|
+
var tokens = value.trim().split(/\s+/);
|
|
160
|
+
for (var i = 0; i < tokens.length; i++) {
|
|
161
|
+
if (!ALLOWED_INNER_SANDBOX_TOKENS[tokens[i]]) return DEFAULT_INNER_SANDBOX;
|
|
162
|
+
}
|
|
163
|
+
return tokens.join(' ');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
function normalizeInnerSrc(value) {
|
|
167
|
+
if (typeof value !== 'string') return null;
|
|
168
|
+
try {
|
|
169
|
+
var url = new URL(value, window.location.href);
|
|
170
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:') return null;
|
|
171
|
+
return url.toString();
|
|
172
|
+
} catch(e) {
|
|
173
|
+
return null;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
148
177
|
var PAINT_FENCE_SCRIPT = 'window.addEventListener("message",function(e){' +
|
|
149
178
|
'if(e.data&&e.data.method==="sunpeak/fence"){' +
|
|
150
179
|
'var fid=e.data.params&&e.data.params.fenceId;' +
|
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.3.
|
|
1
|
+
/*! tailwindcss v4.3.1 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties {
|
|
3
3
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|
|
@@ -418,15 +418,15 @@
|
|
|
418
418
|
}
|
|
419
419
|
|
|
420
420
|
.inset-0 {
|
|
421
|
-
inset:
|
|
421
|
+
inset: 0;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
.inset-x-0 {
|
|
425
|
-
inset-inline:
|
|
425
|
+
inset-inline: 0;
|
|
426
426
|
}
|
|
427
427
|
|
|
428
428
|
.inset-y-0 {
|
|
429
|
-
inset-block:
|
|
429
|
+
inset-block: 0;
|
|
430
430
|
}
|
|
431
431
|
|
|
432
432
|
.-start-2 {
|
|
@@ -454,7 +454,7 @@
|
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
.top-0 {
|
|
457
|
-
top:
|
|
457
|
+
top: 0;
|
|
458
458
|
}
|
|
459
459
|
|
|
460
460
|
.top-1\/2 {
|
|
@@ -490,7 +490,7 @@
|
|
|
490
490
|
}
|
|
491
491
|
|
|
492
492
|
.right-0 {
|
|
493
|
-
right:
|
|
493
|
+
right: 0;
|
|
494
494
|
}
|
|
495
495
|
|
|
496
496
|
.right-2 {
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
}
|
|
507
507
|
|
|
508
508
|
.bottom-0 {
|
|
509
|
-
bottom:
|
|
509
|
+
bottom: 0;
|
|
510
510
|
}
|
|
511
511
|
|
|
512
512
|
.bottom-2 {
|
|
@@ -522,7 +522,7 @@
|
|
|
522
522
|
}
|
|
523
523
|
|
|
524
524
|
.left-0 {
|
|
525
|
-
left:
|
|
525
|
+
left: 0;
|
|
526
526
|
}
|
|
527
527
|
|
|
528
528
|
.left-2 {
|
|
@@ -616,7 +616,7 @@
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
.mx-0 {
|
|
619
|
-
margin-inline:
|
|
619
|
+
margin-inline: 0;
|
|
620
620
|
}
|
|
621
621
|
|
|
622
622
|
.mx-auto {
|
|
@@ -636,7 +636,7 @@
|
|
|
636
636
|
}
|
|
637
637
|
|
|
638
638
|
.mt-1 {
|
|
639
|
-
margin-top:
|
|
639
|
+
margin-top: var(--spacing);
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
.mt-2 {
|
|
@@ -656,7 +656,7 @@
|
|
|
656
656
|
}
|
|
657
657
|
|
|
658
658
|
.mb-1 {
|
|
659
|
-
margin-bottom:
|
|
659
|
+
margin-bottom: var(--spacing);
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
.mb-2 {
|
|
@@ -668,7 +668,7 @@
|
|
|
668
668
|
}
|
|
669
669
|
|
|
670
670
|
.ml-1 {
|
|
671
|
-
margin-left:
|
|
671
|
+
margin-left: var(--spacing);
|
|
672
672
|
}
|
|
673
673
|
|
|
674
674
|
.line-clamp-2 {
|
|
@@ -816,7 +816,7 @@
|
|
|
816
816
|
}
|
|
817
817
|
|
|
818
818
|
.min-h-0 {
|
|
819
|
-
min-height:
|
|
819
|
+
min-height: 0;
|
|
820
820
|
}
|
|
821
821
|
|
|
822
822
|
.min-h-8 {
|
|
@@ -824,7 +824,7 @@
|
|
|
824
824
|
}
|
|
825
825
|
|
|
826
826
|
.w-1 {
|
|
827
|
-
width:
|
|
827
|
+
width: var(--spacing);
|
|
828
828
|
}
|
|
829
829
|
|
|
830
830
|
.w-2 {
|
|
@@ -920,7 +920,7 @@
|
|
|
920
920
|
}
|
|
921
921
|
|
|
922
922
|
.min-w-0 {
|
|
923
|
-
min-width:
|
|
923
|
+
min-width: 0;
|
|
924
924
|
}
|
|
925
925
|
|
|
926
926
|
.min-w-8 {
|
|
@@ -1055,7 +1055,7 @@
|
|
|
1055
1055
|
}
|
|
1056
1056
|
|
|
1057
1057
|
.gap-1 {
|
|
1058
|
-
gap:
|
|
1058
|
+
gap: var(--spacing);
|
|
1059
1059
|
}
|
|
1060
1060
|
|
|
1061
1061
|
.gap-1\.5 {
|
|
@@ -1082,8 +1082,8 @@
|
|
|
1082
1082
|
|
|
1083
1083
|
:where(.space-y-1 > :not(:last-child)) {
|
|
1084
1084
|
--tw-space-y-reverse: 0;
|
|
1085
|
-
margin-block-start: calc(
|
|
1086
|
-
margin-block-end: calc(
|
|
1085
|
+
margin-block-start: calc(var(--spacing) * var(--tw-space-y-reverse));
|
|
1086
|
+
margin-block-end: calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)));
|
|
1087
1087
|
}
|
|
1088
1088
|
|
|
1089
1089
|
:where(.space-y-2 > :not(:last-child)) {
|
|
@@ -1422,11 +1422,11 @@
|
|
|
1422
1422
|
}
|
|
1423
1423
|
|
|
1424
1424
|
.p-0 {
|
|
1425
|
-
padding:
|
|
1425
|
+
padding: 0;
|
|
1426
1426
|
}
|
|
1427
1427
|
|
|
1428
1428
|
.p-1 {
|
|
1429
|
-
padding:
|
|
1429
|
+
padding: var(--spacing);
|
|
1430
1430
|
}
|
|
1431
1431
|
|
|
1432
1432
|
.p-1\.5 {
|
|
@@ -1502,7 +1502,7 @@
|
|
|
1502
1502
|
}
|
|
1503
1503
|
|
|
1504
1504
|
.py-1 {
|
|
1505
|
-
padding-block:
|
|
1505
|
+
padding-block: var(--spacing);
|
|
1506
1506
|
}
|
|
1507
1507
|
|
|
1508
1508
|
.py-1\.5 {
|
|
@@ -1526,7 +1526,7 @@
|
|
|
1526
1526
|
}
|
|
1527
1527
|
|
|
1528
1528
|
.pt-0 {
|
|
1529
|
-
padding-top:
|
|
1529
|
+
padding-top: 0;
|
|
1530
1530
|
}
|
|
1531
1531
|
|
|
1532
1532
|
.pt-2 {
|
|
@@ -2032,11 +2032,11 @@
|
|
|
2032
2032
|
}
|
|
2033
2033
|
|
|
2034
2034
|
.max-md\:inset-y-0 {
|
|
2035
|
-
inset-block:
|
|
2035
|
+
inset-block: 0;
|
|
2036
2036
|
}
|
|
2037
2037
|
|
|
2038
2038
|
.max-md\:left-0 {
|
|
2039
|
-
left:
|
|
2039
|
+
left: 0;
|
|
2040
2040
|
}
|
|
2041
2041
|
|
|
2042
2042
|
.max-md\:z-\[100\] {
|
|
@@ -2053,7 +2053,7 @@
|
|
|
2053
2053
|
}
|
|
2054
2054
|
|
|
2055
2055
|
.max-md\:translate-x-0 {
|
|
2056
|
-
--tw-translate-x:
|
|
2056
|
+
--tw-translate-x: 0;
|
|
2057
2057
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
2058
2058
|
}
|
|
2059
2059
|
|
|
@@ -2197,7 +2197,7 @@
|
|
|
2197
2197
|
}
|
|
2198
2198
|
|
|
2199
2199
|
.xl\:mt-0 {
|
|
2200
|
-
margin-top:
|
|
2200
|
+
margin-top: 0;
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
2203
2203
|
.xl\:w-\[360px\] {
|
|
@@ -2218,7 +2218,7 @@
|
|
|
2218
2218
|
}
|
|
2219
2219
|
|
|
2220
2220
|
.xl\:px-0 {
|
|
2221
|
-
padding-inline:
|
|
2221
|
+
padding-inline: 0;
|
|
2222
2222
|
}
|
|
2223
2223
|
|
|
2224
2224
|
.xl\:shadow-xl {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunpeak",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.56",
|
|
4
4
|
"description": "App framework, testing framework, and inspector for MCP Apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -159,45 +159,45 @@
|
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
"dependencies": {
|
|
162
|
-
"@ai-sdk/anthropic": "^3.0.
|
|
163
|
-
"@ai-sdk/openai": "^3.0.
|
|
164
|
-
"@clack/prompts": "^1.
|
|
162
|
+
"@ai-sdk/anthropic": "^3.0.85",
|
|
163
|
+
"@ai-sdk/openai": "^3.0.73",
|
|
164
|
+
"@clack/prompts": "^1.6.0",
|
|
165
165
|
"@modelcontextprotocol/ext-apps": "^1.7.4",
|
|
166
166
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
167
167
|
"@vitejs/plugin-react": "^6.0.2",
|
|
168
|
-
"ai": "^6.0.
|
|
168
|
+
"ai": "^6.0.208",
|
|
169
169
|
"clsx": "^2.1.1",
|
|
170
|
-
"esbuild": "^0.28.
|
|
170
|
+
"esbuild": "^0.28.1",
|
|
171
171
|
"tailwind-merge": "^3.6.0",
|
|
172
172
|
"vite": "8.0.16",
|
|
173
173
|
"zod": "^4.4.3"
|
|
174
174
|
},
|
|
175
175
|
"devDependencies": {
|
|
176
|
-
"@playwright/test": "
|
|
177
|
-
"@tailwindcss/cli": "^4.3.
|
|
178
|
-
"@tailwindcss/vite": "^4.3.
|
|
176
|
+
"@playwright/test": "1.60.0",
|
|
177
|
+
"@tailwindcss/cli": "^4.3.1",
|
|
178
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
179
179
|
"@testing-library/jest-dom": "^6.9.1",
|
|
180
180
|
"@testing-library/react": "^16.3.2",
|
|
181
181
|
"@testing-library/user-event": "^14.6.1",
|
|
182
|
-
"@types/node": "^
|
|
182
|
+
"@types/node": "^26.0.0",
|
|
183
183
|
"@types/react": "^19.2.17",
|
|
184
184
|
"@types/react-dom": "^19.2.3",
|
|
185
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
186
|
-
"@typescript-eslint/parser": "^8.
|
|
185
|
+
"@typescript-eslint/eslint-plugin": "^8.61.1",
|
|
186
|
+
"@typescript-eslint/parser": "^8.61.1",
|
|
187
187
|
"eslint": "^9.39.4",
|
|
188
188
|
"eslint-config-prettier": "^10.1.8",
|
|
189
189
|
"eslint-plugin-react": "^7.37.5",
|
|
190
190
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
191
|
-
"happy-dom": "^20.10.
|
|
192
|
-
"prettier": "^3.8.
|
|
191
|
+
"happy-dom": "^20.10.6",
|
|
192
|
+
"prettier": "^3.8.4",
|
|
193
193
|
"react": "^19.2.7",
|
|
194
194
|
"react-dom": "^19.2.7",
|
|
195
|
-
"tailwindcss": "^4.3.
|
|
195
|
+
"tailwindcss": "^4.3.1",
|
|
196
196
|
"ts-node": "^10.9.2",
|
|
197
197
|
"tsx": "^4.22.4",
|
|
198
198
|
"typescript": "^6.0.3",
|
|
199
|
-
"vite-plugin-dts": "
|
|
200
|
-
"vitest": "^4.1.
|
|
199
|
+
"vite-plugin-dts": "5.0.1",
|
|
200
|
+
"vitest": "^4.1.9"
|
|
201
201
|
},
|
|
202
202
|
"repository": {
|
|
203
203
|
"type": "git",
|