sunpeak 0.5.8 → 0.5.10
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/README.md +13 -11
- package/bin/sunpeak.js +3 -3
- package/dist/chatgpt/mock-openai.d.ts +7 -0
- package/dist/chatgpt/simple-sidebar.d.ts +38 -0
- package/dist/chatgpt/theme-provider.d.ts +2 -2
- package/dist/index.cjs +7733 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7734 -201
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.cjs +80 -106
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +80 -106
- package/dist/mcp/index.js.map +1 -1
- package/dist/style.css +2890 -315
- package/package.json +6 -5
- package/template/README.md +1 -0
- package/template/dev/main.tsx +6 -10
- package/template/package.json +5 -4
- package/template/scripts/build-all.mjs +19 -10
- package/template/scripts/validate.mjs +8 -2
- package/template/src/components/album/album-card.test.tsx +62 -0
- package/template/src/components/album/album-card.tsx +14 -16
- package/template/src/components/album/albums.test.tsx +88 -0
- package/template/src/components/album/albums.tsx +50 -64
- package/template/src/components/album/film-strip.test.tsx +64 -0
- package/template/src/components/album/film-strip.tsx +16 -16
- package/template/src/components/album/fullscreen-viewer.test.tsx +77 -0
- package/template/src/components/album/fullscreen-viewer.tsx +45 -50
- package/template/src/components/card/card.test.tsx +1 -4
- package/template/src/components/card/card.tsx +38 -46
- package/template/src/components/carousel/carousel.tsx +57 -67
- package/template/src/components/resources/{AlbumsResource.tsx → albums-resource.tsx} +5 -5
- package/template/src/components/resources/{CarouselResource.tsx → carousel-resource.tsx} +18 -18
- package/template/src/components/resources/{CounterResource.tsx → counter-resource.tsx} +11 -31
- package/template/src/components/resources/index.ts +3 -3
- package/template/src/simulations/albums-simulation.ts +71 -71
- package/template/src/simulations/carousel-simulation.ts +34 -34
- package/template/src/simulations/counter-simulation.ts +2 -2
- package/template/vite.config.build.ts +2 -2
- package/template/vite.config.ts +1 -1
- package/template/vitest.config.ts +1 -1
- package/dist/runtime/index.d.ts +0 -7
- /package/dist/{runtime → providers}/provider-detection.d.ts +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CounterResource } from './
|
|
2
|
-
export { AlbumsResource } from './
|
|
3
|
-
export { CarouselResource } from './
|
|
1
|
+
export { CounterResource } from './counter-resource';
|
|
2
|
+
export { AlbumsResource } from './albums-resource';
|
|
3
|
+
export { CarouselResource } from './carousel-resource';
|
|
@@ -6,114 +6,114 @@
|
|
|
6
6
|
const albumsData = {
|
|
7
7
|
albums: [
|
|
8
8
|
{
|
|
9
|
-
id:
|
|
10
|
-
title:
|
|
11
|
-
cover:
|
|
9
|
+
id: 'summer-escape',
|
|
10
|
+
title: 'Summer Slice',
|
|
11
|
+
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
12
12
|
photos: [
|
|
13
13
|
{
|
|
14
|
-
id:
|
|
15
|
-
title:
|
|
16
|
-
url:
|
|
14
|
+
id: 's1',
|
|
15
|
+
title: 'Waves',
|
|
16
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
id:
|
|
20
|
-
title:
|
|
21
|
-
url:
|
|
19
|
+
id: 's2',
|
|
20
|
+
title: 'Palm trees',
|
|
21
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-3.png',
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
|
-
id:
|
|
25
|
-
title:
|
|
26
|
-
url:
|
|
27
|
-
}
|
|
28
|
-
]
|
|
24
|
+
id: 's3',
|
|
25
|
+
title: 'Sunset',
|
|
26
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-6.png',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
id:
|
|
32
|
-
title:
|
|
33
|
-
cover:
|
|
31
|
+
id: 'city-lights',
|
|
32
|
+
title: 'Pepperoni Nights',
|
|
33
|
+
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-4.png',
|
|
34
34
|
photos: [
|
|
35
35
|
{
|
|
36
|
-
id:
|
|
37
|
-
title:
|
|
38
|
-
url:
|
|
36
|
+
id: 'c1',
|
|
37
|
+
title: 'Downtown',
|
|
38
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-5.png',
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
id:
|
|
42
|
-
title:
|
|
43
|
-
url:
|
|
41
|
+
id: 'c2',
|
|
42
|
+
title: 'Neon',
|
|
43
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
|
-
id:
|
|
47
|
-
title:
|
|
48
|
-
url:
|
|
49
|
-
}
|
|
50
|
-
]
|
|
46
|
+
id: 'c3',
|
|
47
|
+
title: 'Streets',
|
|
48
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
id:
|
|
54
|
-
title:
|
|
55
|
-
cover:
|
|
53
|
+
id: 'into-the-woods',
|
|
54
|
+
title: 'Truffle Forest',
|
|
55
|
+
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-3.png',
|
|
56
56
|
photos: [
|
|
57
57
|
{
|
|
58
|
-
id:
|
|
59
|
-
title:
|
|
60
|
-
url:
|
|
58
|
+
id: 'n1',
|
|
59
|
+
title: 'Forest path',
|
|
60
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-6.png',
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
|
-
id:
|
|
64
|
-
title:
|
|
65
|
-
url:
|
|
63
|
+
id: 'n2',
|
|
64
|
+
title: 'Misty',
|
|
65
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-4.png',
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
|
-
id:
|
|
69
|
-
title:
|
|
70
|
-
url:
|
|
71
|
-
}
|
|
72
|
-
]
|
|
68
|
+
id: 'n3',
|
|
69
|
+
title: 'Waterfall',
|
|
70
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-5.png',
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
id:
|
|
76
|
-
title:
|
|
77
|
-
cover:
|
|
75
|
+
id: 'pizza-tour',
|
|
76
|
+
title: 'Pizza tour',
|
|
77
|
+
cover: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
78
78
|
photos: [
|
|
79
79
|
{
|
|
80
|
-
id:
|
|
80
|
+
id: 'tonys-pizza-napoletana',
|
|
81
81
|
title: "Tony's Pizza Napoletana",
|
|
82
|
-
url:
|
|
82
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
|
-
id:
|
|
86
|
-
title:
|
|
87
|
-
url:
|
|
85
|
+
id: 'golden-boy-pizza',
|
|
86
|
+
title: 'Golden Boy Pizza',
|
|
87
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-3.png',
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
id:
|
|
91
|
-
title:
|
|
92
|
-
url:
|
|
90
|
+
id: 'pizzeria-delfina-mission',
|
|
91
|
+
title: 'Pizzeria Delfina (Mission)',
|
|
92
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-6.png',
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
|
-
id:
|
|
96
|
-
title:
|
|
97
|
-
url:
|
|
95
|
+
id: 'ragazza',
|
|
96
|
+
title: 'Ragazza',
|
|
97
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-4.png',
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
|
-
id:
|
|
101
|
-
title:
|
|
102
|
-
url:
|
|
100
|
+
id: 'del-popolo',
|
|
101
|
+
title: 'Del Popolo',
|
|
102
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-5.png',
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
|
-
id:
|
|
106
|
-
title:
|
|
107
|
-
url:
|
|
105
|
+
id: 'square-pie-guys',
|
|
106
|
+
title: 'Square Pie Guys',
|
|
107
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-1.png',
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
|
-
id:
|
|
111
|
-
title:
|
|
112
|
-
url:
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
}
|
|
116
|
-
]
|
|
110
|
+
id: 'zero-zero',
|
|
111
|
+
title: 'Zero Zero',
|
|
112
|
+
url: 'https://persistent.oaistatic.com/pizzaz/pizzaz-2.png',
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
117
|
};
|
|
118
118
|
|
|
119
119
|
export const albumsSimulation = {
|
|
@@ -127,7 +127,7 @@ export const albumsSimulation = {
|
|
|
127
127
|
title: 'Show Albums',
|
|
128
128
|
annotations: { readOnlyHint: true },
|
|
129
129
|
_meta: {
|
|
130
|
-
'openai/outputTemplate': 'ui://AlbumsResource
|
|
130
|
+
'openai/outputTemplate': 'ui://AlbumsResource',
|
|
131
131
|
'openai/toolInvocation/invoking': 'Loading albums',
|
|
132
132
|
'openai/toolInvocation/invoked': 'Album loaded',
|
|
133
133
|
'openai/widgetAccessible': true,
|
|
@@ -139,7 +139,7 @@ export const albumsSimulation = {
|
|
|
139
139
|
// resource.name is used as the simulation identifier
|
|
140
140
|
// resource.title is used as the simulation display label
|
|
141
141
|
resource: {
|
|
142
|
-
uri: 'ui://AlbumsResource
|
|
142
|
+
uri: 'ui://AlbumsResource',
|
|
143
143
|
name: 'albums',
|
|
144
144
|
title: 'Albums',
|
|
145
145
|
description: 'Show photo albums widget markup',
|
|
@@ -6,51 +6,51 @@
|
|
|
6
6
|
const placesData = {
|
|
7
7
|
places: [
|
|
8
8
|
{
|
|
9
|
-
id:
|
|
10
|
-
name:
|
|
9
|
+
id: '1',
|
|
10
|
+
name: 'Lady Bird Lake',
|
|
11
11
|
rating: 4.5,
|
|
12
|
-
category:
|
|
13
|
-
location:
|
|
14
|
-
image:
|
|
15
|
-
description:
|
|
12
|
+
category: 'Waterfront',
|
|
13
|
+
location: 'Austin',
|
|
14
|
+
image: 'https://images.unsplash.com/photo-1520950237264-dfe336995c34?w=400&h=400&fit=crop',
|
|
15
|
+
description: 'Scenic lake perfect for kayaking, paddleboarding, and trails.',
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
id:
|
|
19
|
-
name:
|
|
18
|
+
id: '2',
|
|
19
|
+
name: 'Texas State Capitol',
|
|
20
20
|
rating: 4.8,
|
|
21
|
-
category:
|
|
22
|
-
location:
|
|
23
|
-
image:
|
|
24
|
-
description:
|
|
21
|
+
category: 'Historic Site',
|
|
22
|
+
location: 'Austin',
|
|
23
|
+
image: 'https://images.unsplash.com/photo-1664231978322-4d0b45c7027b?w=400&h=400&fit=crop',
|
|
24
|
+
description: 'Stunning capitol building with free tours and beautiful grounds.',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
id:
|
|
28
|
-
name:
|
|
27
|
+
id: '3',
|
|
28
|
+
name: 'The Paramount Theatre',
|
|
29
29
|
rating: 4.7,
|
|
30
|
-
category:
|
|
31
|
-
location:
|
|
32
|
-
image:
|
|
33
|
-
description:
|
|
30
|
+
category: 'Architecture',
|
|
31
|
+
location: 'Austin',
|
|
32
|
+
image: 'https://images.unsplash.com/photo-1583097090970-4d3b940ea1a0?w=400&h=400&fit=crop',
|
|
33
|
+
description: 'Century-old performance and movie theatre in the heart of downtown Austin.',
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
id:
|
|
37
|
-
name:
|
|
36
|
+
id: '4',
|
|
37
|
+
name: 'Zilker Park',
|
|
38
38
|
rating: 4.7,
|
|
39
|
-
category:
|
|
40
|
-
location:
|
|
41
|
-
image:
|
|
42
|
-
description:
|
|
39
|
+
category: 'Park',
|
|
40
|
+
location: 'Austin',
|
|
41
|
+
image: 'https://images.unsplash.com/photo-1563828568124-f800803ba13c?w=400&h=400&fit=crop',
|
|
42
|
+
description: 'Popular park with trails, sports fields, and Barton Springs Pool.',
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
|
-
id:
|
|
46
|
-
name:
|
|
45
|
+
id: '5',
|
|
46
|
+
name: 'South Congress Avenue',
|
|
47
47
|
rating: 4.6,
|
|
48
|
-
category:
|
|
49
|
-
location:
|
|
50
|
-
image:
|
|
51
|
-
description:
|
|
52
|
-
}
|
|
53
|
-
]
|
|
48
|
+
category: 'Landmark',
|
|
49
|
+
location: 'Austin',
|
|
50
|
+
image: 'https://images.unsplash.com/photo-1588993608283-7f0eda4438be?w=400&h=400&fit=crop',
|
|
51
|
+
description: 'Vibrant street with unique shops, restaurants, and live music.',
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
export const carouselSimulation = {
|
|
@@ -64,7 +64,7 @@ export const carouselSimulation = {
|
|
|
64
64
|
title: 'Show Carousel',
|
|
65
65
|
annotations: { readOnlyHint: true },
|
|
66
66
|
_meta: {
|
|
67
|
-
'openai/outputTemplate': 'ui://CarouselResource
|
|
67
|
+
'openai/outputTemplate': 'ui://CarouselResource',
|
|
68
68
|
'openai/toolInvocation/invoking': 'Loading carousel',
|
|
69
69
|
'openai/toolInvocation/invoked': 'Carousel loaded',
|
|
70
70
|
'openai/widgetAccessible': true,
|
|
@@ -76,7 +76,7 @@ export const carouselSimulation = {
|
|
|
76
76
|
// resource.name is used as the simulation identifier
|
|
77
77
|
// resource.title is used as the simulation display label
|
|
78
78
|
resource: {
|
|
79
|
-
uri: 'ui://CarouselResource
|
|
79
|
+
uri: 'ui://CarouselResource',
|
|
80
80
|
name: 'carousel',
|
|
81
81
|
title: 'Carousel',
|
|
82
82
|
description: 'Show popular places to visit widget markup',
|
|
@@ -13,7 +13,7 @@ export const counterSimulation = {
|
|
|
13
13
|
title: 'Show Counter',
|
|
14
14
|
annotations: { readOnlyHint: true },
|
|
15
15
|
_meta: {
|
|
16
|
-
'openai/outputTemplate': 'ui://CounterResource
|
|
16
|
+
'openai/outputTemplate': 'ui://CounterResource',
|
|
17
17
|
'openai/toolInvocation/invoking': 'Counting beans',
|
|
18
18
|
'openai/toolInvocation/invoked': 'Beans counted',
|
|
19
19
|
'openai/widgetAccessible': true,
|
|
@@ -25,7 +25,7 @@ export const counterSimulation = {
|
|
|
25
25
|
// resource.name is used as the simulation identifier
|
|
26
26
|
// resource.title is used as the simulation display label
|
|
27
27
|
resource: {
|
|
28
|
-
uri: 'ui://CounterResource
|
|
28
|
+
uri: 'ui://CounterResource',
|
|
29
29
|
name: 'counter',
|
|
30
30
|
title: 'Counter',
|
|
31
31
|
description: 'Show a simple counter tool widget markup',
|
|
@@ -22,7 +22,7 @@ function inlineCssPlugin() {
|
|
|
22
22
|
|
|
23
23
|
// Find all .js files in the dist directory and inject CSS
|
|
24
24
|
const files = readdirSync(distDir);
|
|
25
|
-
files.forEach(file => {
|
|
25
|
+
files.forEach((file) => {
|
|
26
26
|
if (file.endsWith('.js')) {
|
|
27
27
|
const jsFile = path.join(distDir, file);
|
|
28
28
|
const js = readFileSync(jsFile, 'utf-8');
|
|
@@ -46,7 +46,7 @@ export default defineConfig({
|
|
|
46
46
|
alias: {
|
|
47
47
|
// In workspace dev mode, use local sunpeak source
|
|
48
48
|
...(isTemplate && {
|
|
49
|
-
|
|
49
|
+
sunpeak: parentSrc,
|
|
50
50
|
'~': parentSrc,
|
|
51
51
|
}),
|
|
52
52
|
},
|
package/template/vite.config.ts
CHANGED
package/dist/runtime/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Runtime utilities for widget environments.
|
|
3
|
-
*
|
|
4
|
-
* This module contains runtime-specific logic like provider detection
|
|
5
|
-
* that needs to know about concrete provider implementations.
|
|
6
|
-
*/
|
|
7
|
-
export { detectProvider, isProviderAvailable, resetProviderCache, } from './provider-detection';
|
|
File without changes
|