sunpeak 0.5.24 → 0.5.25
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/package.json +1 -4
- package/template/.sunpeak/dev.tsx +48 -2
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +6 -6
- package/template/node_modules/.vite/deps/_metadata.json +23 -23
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/dist/dev/entry.d.ts +0 -0
- package/src/dev/entry.tsx +0 -55
- package/src/vite-env.d.ts +0 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunpeak",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.25",
|
|
4
4
|
"description": "The MCP App SDK. Quickstart, build, & test your ChatGPT App locally!",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"default": "./dist/mcp/index.js"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
"./dev/entry": "./src/dev/entry.tsx",
|
|
29
28
|
"./mcp/entry": "./dist/mcp/entry.js",
|
|
30
29
|
"./package.json": "./package.json"
|
|
31
30
|
},
|
|
@@ -35,8 +34,6 @@
|
|
|
35
34
|
"files": [
|
|
36
35
|
"dist",
|
|
37
36
|
"bin",
|
|
38
|
-
"src/dev",
|
|
39
|
-
"src/vite-env.d.ts",
|
|
40
37
|
"template",
|
|
41
38
|
"README.md"
|
|
42
39
|
],
|
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Bootstrap file for Sunpeak dev server
|
|
3
|
-
* This file
|
|
3
|
+
* This file bootstraps the ChatGPT simulator for development
|
|
4
4
|
*/
|
|
5
|
-
import '
|
|
5
|
+
import { StrictMode } from 'react';
|
|
6
|
+
import { createRoot } from 'react-dom/client';
|
|
7
|
+
import { ChatGPTSimulator, type Simulation } from 'sunpeak';
|
|
8
|
+
import { SIMULATIONS } from '../src/simulations';
|
|
9
|
+
import * as Resources from '../src/components/resources';
|
|
10
|
+
import '../src/styles/globals.css';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Extract the resource component name from a URI
|
|
14
|
+
* Example: 'ui://CounterResource' -> 'CounterResource'
|
|
15
|
+
*/
|
|
16
|
+
function getResourceComponentFromURI(uri: string): React.ComponentType {
|
|
17
|
+
const match = uri.match(/^ui:\/\/(.+)$/);
|
|
18
|
+
if (!match) {
|
|
19
|
+
throw new Error(`Invalid resource URI format: ${uri}. Expected format: ui://ComponentName`);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const componentName = match[1];
|
|
23
|
+
const component = Resources[componentName as keyof typeof Resources];
|
|
24
|
+
|
|
25
|
+
if (!component) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
`Resource component "${componentName}" not found. ` +
|
|
28
|
+
`Make sure it's exported from src/components/resources/index.ts`
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return component as React.ComponentType;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Package the resource component with the simulation
|
|
36
|
+
const simulations: Simulation[] = Object.values(
|
|
37
|
+
SIMULATIONS as Record<string, Omit<Simulation, 'resourceComponent'>>
|
|
38
|
+
).map((simulation) => ({
|
|
39
|
+
...simulation,
|
|
40
|
+
resourceComponent: getResourceComponentFromURI(simulation.resource.uri),
|
|
41
|
+
}));
|
|
42
|
+
|
|
43
|
+
// Read app config from package.json or use defaults
|
|
44
|
+
const appName = import.meta.env?.VITE_APP_NAME || 'Sunpeak App';
|
|
45
|
+
const appIcon = import.meta.env?.VITE_APP_ICON || '🌄';
|
|
46
|
+
|
|
47
|
+
createRoot(document.getElementById('root')!).render(
|
|
48
|
+
<StrictMode>
|
|
49
|
+
<ChatGPTSimulator simulations={simulations} appName={appName} appIcon={appIcon} />
|
|
50
|
+
</StrictMode>
|
|
51
|
+
);
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
handlePressableMouseEnter,
|
|
6
6
|
waitForAnimationFrame
|
|
7
7
|
} from "./chunk-BAG6OO6S.js";
|
|
8
|
+
import "./chunk-EGRHWZRV.js";
|
|
8
9
|
import {
|
|
9
10
|
dist_exports4 as dist_exports
|
|
10
11
|
} from "./chunk-SGWD4VEU.js";
|
|
11
12
|
import "./chunk-KFGKZMLK.js";
|
|
12
|
-
import "./chunk-EGRHWZRV.js";
|
|
13
13
|
import {
|
|
14
14
|
clsx_default
|
|
15
15
|
} from "./chunk-CNYJBM5F.js";
|
|
@@ -12,12 +12,6 @@ import {
|
|
|
12
12
|
toCssVariables,
|
|
13
13
|
waitForAnimationFrame
|
|
14
14
|
} from "./chunk-BAG6OO6S.js";
|
|
15
|
-
import {
|
|
16
|
-
dist_exports,
|
|
17
|
-
dist_exports3 as dist_exports2,
|
|
18
|
-
dist_exports5 as dist_exports3
|
|
19
|
-
} from "./chunk-SGWD4VEU.js";
|
|
20
|
-
import "./chunk-KFGKZMLK.js";
|
|
21
15
|
import {
|
|
22
16
|
Check_default,
|
|
23
17
|
ChevronDownVector_default,
|
|
@@ -33,6 +27,12 @@ import {
|
|
|
33
27
|
o
|
|
34
28
|
} from "./chunk-QPJAV452.js";
|
|
35
29
|
import "./chunk-EGRHWZRV.js";
|
|
30
|
+
import {
|
|
31
|
+
dist_exports,
|
|
32
|
+
dist_exports3 as dist_exports2,
|
|
33
|
+
dist_exports5 as dist_exports3
|
|
34
|
+
} from "./chunk-SGWD4VEU.js";
|
|
35
|
+
import "./chunk-KFGKZMLK.js";
|
|
36
36
|
import {
|
|
37
37
|
clsx_default
|
|
38
38
|
} from "./chunk-CNYJBM5F.js";
|
|
@@ -7,103 +7,103 @@
|
|
|
7
7
|
"react": {
|
|
8
8
|
"src": "../../../../node_modules/.pnpm/react@19.2.0/node_modules/react/index.js",
|
|
9
9
|
"file": "react.js",
|
|
10
|
-
"fileHash": "
|
|
10
|
+
"fileHash": "ad60bcbd",
|
|
11
11
|
"needsInterop": true
|
|
12
12
|
},
|
|
13
13
|
"react-dom": {
|
|
14
14
|
"src": "../../../../node_modules/.pnpm/react-dom@19.2.0_react@19.2.0/node_modules/react-dom/index.js",
|
|
15
15
|
"file": "react-dom.js",
|
|
16
|
-
"fileHash": "
|
|
16
|
+
"fileHash": "673263e9",
|
|
17
17
|
"needsInterop": true
|
|
18
18
|
},
|
|
19
19
|
"react/jsx-dev-runtime": {
|
|
20
20
|
"src": "../../../../node_modules/.pnpm/react@19.2.0/node_modules/react/jsx-dev-runtime.js",
|
|
21
21
|
"file": "react_jsx-dev-runtime.js",
|
|
22
|
-
"fileHash": "
|
|
22
|
+
"fileHash": "e0329ade",
|
|
23
23
|
"needsInterop": true
|
|
24
24
|
},
|
|
25
25
|
"react/jsx-runtime": {
|
|
26
26
|
"src": "../../../../node_modules/.pnpm/react@19.2.0/node_modules/react/jsx-runtime.js",
|
|
27
27
|
"file": "react_jsx-runtime.js",
|
|
28
|
-
"fileHash": "
|
|
28
|
+
"fileHash": "c89cf29d",
|
|
29
29
|
"needsInterop": true
|
|
30
30
|
},
|
|
31
31
|
"@openai/apps-sdk-ui/components/Button": {
|
|
32
32
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Button/index.js",
|
|
33
33
|
"file": "@openai_apps-sdk-ui_components_Button.js",
|
|
34
|
-
"fileHash": "
|
|
34
|
+
"fileHash": "dc3e4259",
|
|
35
35
|
"needsInterop": false
|
|
36
36
|
},
|
|
37
37
|
"@openai/apps-sdk-ui/components/Checkbox": {
|
|
38
38
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Checkbox/index.js",
|
|
39
39
|
"file": "@openai_apps-sdk-ui_components_Checkbox.js",
|
|
40
|
-
"fileHash": "
|
|
40
|
+
"fileHash": "a38670b1",
|
|
41
41
|
"needsInterop": false
|
|
42
42
|
},
|
|
43
43
|
"@openai/apps-sdk-ui/components/Icon": {
|
|
44
44
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Icon/index.js",
|
|
45
45
|
"file": "@openai_apps-sdk-ui_components_Icon.js",
|
|
46
|
-
"fileHash": "
|
|
46
|
+
"fileHash": "11f51b73",
|
|
47
47
|
"needsInterop": false
|
|
48
48
|
},
|
|
49
49
|
"@openai/apps-sdk-ui/components/Input": {
|
|
50
50
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Input/index.js",
|
|
51
51
|
"file": "@openai_apps-sdk-ui_components_Input.js",
|
|
52
|
-
"fileHash": "
|
|
52
|
+
"fileHash": "a6c29f36",
|
|
53
53
|
"needsInterop": false
|
|
54
54
|
},
|
|
55
55
|
"@openai/apps-sdk-ui/components/SegmentedControl": {
|
|
56
56
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/SegmentedControl/index.js",
|
|
57
57
|
"file": "@openai_apps-sdk-ui_components_SegmentedControl.js",
|
|
58
|
-
"fileHash": "
|
|
58
|
+
"fileHash": "8319a966",
|
|
59
59
|
"needsInterop": false
|
|
60
60
|
},
|
|
61
61
|
"@openai/apps-sdk-ui/components/Select": {
|
|
62
62
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Select/index.js",
|
|
63
63
|
"file": "@openai_apps-sdk-ui_components_Select.js",
|
|
64
|
-
"fileHash": "
|
|
64
|
+
"fileHash": "415d0e10",
|
|
65
65
|
"needsInterop": false
|
|
66
66
|
},
|
|
67
67
|
"@openai/apps-sdk-ui/components/Textarea": {
|
|
68
68
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/components/Textarea/index.js",
|
|
69
69
|
"file": "@openai_apps-sdk-ui_components_Textarea.js",
|
|
70
|
-
"fileHash": "
|
|
70
|
+
"fileHash": "3fa337b3",
|
|
71
71
|
"needsInterop": false
|
|
72
72
|
},
|
|
73
73
|
"@openai/apps-sdk-ui/theme": {
|
|
74
74
|
"src": "../../../../node_modules/.pnpm/@openai+apps-sdk-ui@0.2.0_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._60630c8dcc43ec213b3e346c9e26579b/node_modules/@openai/apps-sdk-ui/dist/es/lib/theme.js",
|
|
75
75
|
"file": "@openai_apps-sdk-ui_theme.js",
|
|
76
|
-
"fileHash": "
|
|
76
|
+
"fileHash": "ac987937",
|
|
77
77
|
"needsInterop": false
|
|
78
78
|
},
|
|
79
79
|
"clsx": {
|
|
80
80
|
"src": "../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs",
|
|
81
81
|
"file": "clsx.js",
|
|
82
|
-
"fileHash": "
|
|
82
|
+
"fileHash": "839c10d3",
|
|
83
83
|
"needsInterop": false
|
|
84
84
|
},
|
|
85
85
|
"embla-carousel-react": {
|
|
86
86
|
"src": "../../../../node_modules/.pnpm/embla-carousel-react@8.6.0_react@19.2.0/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js",
|
|
87
87
|
"file": "embla-carousel-react.js",
|
|
88
|
-
"fileHash": "
|
|
88
|
+
"fileHash": "2c4d0a37",
|
|
89
89
|
"needsInterop": false
|
|
90
90
|
},
|
|
91
91
|
"embla-carousel-wheel-gestures": {
|
|
92
92
|
"src": "../../../../node_modules/.pnpm/embla-carousel-wheel-gestures@8.1.0_embla-carousel@8.6.0/node_modules/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.esm.js",
|
|
93
93
|
"file": "embla-carousel-wheel-gestures.js",
|
|
94
|
-
"fileHash": "
|
|
94
|
+
"fileHash": "f9e24ae7",
|
|
95
95
|
"needsInterop": false
|
|
96
96
|
},
|
|
97
97
|
"react-dom/client": {
|
|
98
98
|
"src": "../../../../node_modules/.pnpm/react-dom@19.2.0_react@19.2.0/node_modules/react-dom/client.js",
|
|
99
99
|
"file": "react-dom_client.js",
|
|
100
|
-
"fileHash": "
|
|
100
|
+
"fileHash": "1bd06eee",
|
|
101
101
|
"needsInterop": true
|
|
102
102
|
},
|
|
103
103
|
"tailwind-merge": {
|
|
104
104
|
"src": "../../../../node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs",
|
|
105
105
|
"file": "tailwind-merge.js",
|
|
106
|
-
"fileHash": "
|
|
106
|
+
"fileHash": "fb2d54c6",
|
|
107
107
|
"needsInterop": false
|
|
108
108
|
}
|
|
109
109
|
},
|
|
@@ -117,12 +117,6 @@
|
|
|
117
117
|
"chunk-BAG6OO6S": {
|
|
118
118
|
"file": "chunk-BAG6OO6S.js"
|
|
119
119
|
},
|
|
120
|
-
"chunk-SGWD4VEU": {
|
|
121
|
-
"file": "chunk-SGWD4VEU.js"
|
|
122
|
-
},
|
|
123
|
-
"chunk-KFGKZMLK": {
|
|
124
|
-
"file": "chunk-KFGKZMLK.js"
|
|
125
|
-
},
|
|
126
120
|
"chunk-XB525PXG": {
|
|
127
121
|
"file": "chunk-XB525PXG.js"
|
|
128
122
|
},
|
|
@@ -135,6 +129,12 @@
|
|
|
135
129
|
"chunk-EGRHWZRV": {
|
|
136
130
|
"file": "chunk-EGRHWZRV.js"
|
|
137
131
|
},
|
|
132
|
+
"chunk-SGWD4VEU": {
|
|
133
|
+
"file": "chunk-SGWD4VEU.js"
|
|
134
|
+
},
|
|
135
|
+
"chunk-KFGKZMLK": {
|
|
136
|
+
"file": "chunk-KFGKZMLK.js"
|
|
137
|
+
},
|
|
138
138
|
"chunk-CNYJBM5F": {
|
|
139
139
|
"file": "chunk-CNYJBM5F.js"
|
|
140
140
|
},
|
package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.0.13","results":[[":src/components/
|
|
1
|
+
{"version":"4.0.13","results":[[":src/components/album/fullscreen-viewer.test.tsx",{"duration":260.31835799999953,"failed":false}],[":src/components/album/albums.test.tsx",{"duration":348.7602830000001,"failed":false}],[":src/components/resources/carousel-resource.test.tsx",{"duration":252.86561500000016,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":63.213138999999956,"failed":false}],[":src/components/resources/counter-resource.test.tsx",{"duration":344.55251799999996,"failed":false}],[":src/components/resources/albums-resource.test.tsx",{"duration":298.1546329999999,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":484.87700800000016,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":369.82878800000026,"failed":false}],[":src/components/card/card.test.tsx",{"duration":57.1538579999999,"failed":false}]]}
|
package/dist/dev/entry.d.ts
DELETED
|
File without changes
|
package/src/dev/entry.tsx
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal development server entry point
|
|
3
|
-
* This file is imported by Vite and bootstraps the ChatGPT simulator
|
|
4
|
-
*/
|
|
5
|
-
import { StrictMode } from 'react';
|
|
6
|
-
import { createRoot } from 'react-dom/client';
|
|
7
|
-
import { ChatGPTSimulator, type Simulation } from 'sunpeak';
|
|
8
|
-
|
|
9
|
-
// Dynamically import user's simulations and resources using Vite's resolution
|
|
10
|
-
// @ts-expect-error - These are resolved from the user's project via Vite aliases
|
|
11
|
-
import { SIMULATIONS } from '/src/simulations';
|
|
12
|
-
// @ts-expect-error - Resolved from user's project
|
|
13
|
-
import * as Resources from '/src/components/resources';
|
|
14
|
-
import '/src/styles/globals.css';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Extract the resource component name from a URI
|
|
18
|
-
* Example: 'ui://CounterResource' -> 'CounterResource'
|
|
19
|
-
*/
|
|
20
|
-
function getResourceComponentFromURI(uri: string): React.ComponentType {
|
|
21
|
-
const match = uri.match(/^ui:\/\/(.+)$/);
|
|
22
|
-
if (!match) {
|
|
23
|
-
throw new Error(`Invalid resource URI format: ${uri}. Expected format: ui://ComponentName`);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const componentName = match[1];
|
|
27
|
-
const component = Resources[componentName as keyof typeof Resources];
|
|
28
|
-
|
|
29
|
-
if (!component) {
|
|
30
|
-
throw new Error(
|
|
31
|
-
`Resource component "${componentName}" not found. ` +
|
|
32
|
-
`Make sure it's exported from src/components/resources/index.ts`
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return component as React.ComponentType;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Package the resource component with the simulation
|
|
40
|
-
const simulations: Simulation[] = Object.values(
|
|
41
|
-
SIMULATIONS as Record<string, Omit<Simulation, 'resourceComponent'>>
|
|
42
|
-
).map((simulation) => ({
|
|
43
|
-
...simulation,
|
|
44
|
-
resourceComponent: getResourceComponentFromURI(simulation.resource.uri),
|
|
45
|
-
}));
|
|
46
|
-
|
|
47
|
-
// Read app config from package.json or use defaults
|
|
48
|
-
const appName = import.meta.env?.VITE_APP_NAME || 'Sunpeak App';
|
|
49
|
-
const appIcon = import.meta.env?.VITE_APP_ICON || '🌄';
|
|
50
|
-
|
|
51
|
-
createRoot(document.getElementById('root')!).render(
|
|
52
|
-
<StrictMode>
|
|
53
|
-
<ChatGPTSimulator simulations={simulations} appName={appName} appIcon={appIcon} />
|
|
54
|
-
</StrictMode>
|
|
55
|
-
);
|