sunpeak 0.5.24 → 0.5.26
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/dist/chatgpt/albums.js +1 -1
- package/template/dist/chatgpt/carousel.js +1 -1
- package/template/dist/chatgpt/counter.js +1 -1
- package/template/node_modules/.vite/deps/_metadata.json +17 -17
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/styles/globals.css +2 -2
- package/dist/dev/entry.d.ts +0 -0
- package/src/dev/entry.tsx +0 -55
- package/src/vite-env.d.ts +0 -10
|
@@ -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": "3019505f",
|
|
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": "b03aba02",
|
|
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": "5265916d",
|
|
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": "804e9ef4",
|
|
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": "a0b97a04",
|
|
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": "3e754dda",
|
|
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": "79b6789e",
|
|
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": "0466a5c1",
|
|
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": "86373fca",
|
|
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": "594cf0f9",
|
|
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": "62e4032b",
|
|
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": "89b27cd6",
|
|
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": "ea05a8e3",
|
|
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": "75835449",
|
|
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": "f9d62af5",
|
|
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": "e410db63",
|
|
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": "4156f5f9",
|
|
107
107
|
"needsInterop": false
|
|
108
108
|
}
|
|
109
109
|
},
|
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/albums.test.tsx",{"duration":333.4603460000001,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":276.5646690000003,"failed":false}],[":src/components/resources/carousel-resource.test.tsx",{"duration":279.3730660000001,"failed":false}],[":src/components/resources/counter-resource.test.tsx",{"duration":292.8908690000003,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":84.78748799999994,"failed":false}],[":src/components/resources/albums-resource.test.tsx",{"duration":276.4778489999999,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":476.3106560000001,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":325.9198819999999,"failed":false}],[":src/components/card/card.test.tsx",{"duration":54.60983600000009,"failed":false}]]}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
@import "sunpeak/style.css";
|
|
4
4
|
|
|
5
5
|
/* Scan app-specific source files for Tailwind classes */
|
|
6
|
-
@source "
|
|
6
|
+
@source "../../src/**/*.{ts,tsx}";
|
|
7
7
|
|
|
8
8
|
/* Required for Tailwind to find class references in Apps SDK UI components. */
|
|
9
|
-
@source "
|
|
9
|
+
@source "../../node_modules/@openai/apps-sdk-ui";
|
|
10
10
|
|
|
11
11
|
/* Configure dark mode to use data-theme attribute (OpenAI SDK standard) */
|
|
12
12
|
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
|
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
|
-
);
|