sunpeak 0.6.5 → 0.6.6
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/sunpeak.js +6 -6
- package/package.json +1 -1
- package/template/dist/chatgpt/{pizzaz.js → map.js} +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +19 -19
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/components/index.ts +1 -1
- package/template/src/components/{pizzaz → map}/index.ts +1 -1
- package/template/src/components/{pizzaz → map}/map-view.tsx +2 -2
- package/template/src/components/{pizzaz/pizzaz.tsx → map/map.tsx} +7 -7
- package/template/src/components/{pizzaz → map}/place-card.tsx +1 -1
- package/template/src/components/{pizzaz → map}/place-carousel.tsx +1 -1
- package/template/src/components/{pizzaz → map}/place-inspector.tsx +2 -2
- package/template/src/components/{pizzaz → map}/place-list.tsx +1 -1
- package/template/src/resources/index.ts +1 -1
- package/template/src/resources/{pizzaz-resource.tsx → map-resource.tsx} +5 -5
- package/template/src/simulations/index.ts +2 -2
- package/template/src/simulations/{pizzaz-simulation.ts → map-simulation.ts} +9 -9
|
@@ -7,115 +7,115 @@
|
|
|
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": "9756d72d",
|
|
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": "a63da1f0",
|
|
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": "5d910eda",
|
|
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": "8b4092f6",
|
|
29
29
|
"needsInterop": true
|
|
30
30
|
},
|
|
31
31
|
"@openai/apps-sdk-ui/components/Avatar": {
|
|
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/Avatar/index.js",
|
|
33
33
|
"file": "@openai_apps-sdk-ui_components_Avatar.js",
|
|
34
|
-
"fileHash": "
|
|
34
|
+
"fileHash": "c160e014",
|
|
35
35
|
"needsInterop": false
|
|
36
36
|
},
|
|
37
37
|
"@openai/apps-sdk-ui/components/Button": {
|
|
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/Button/index.js",
|
|
39
39
|
"file": "@openai_apps-sdk-ui_components_Button.js",
|
|
40
|
-
"fileHash": "
|
|
40
|
+
"fileHash": "67f50423",
|
|
41
41
|
"needsInterop": false
|
|
42
42
|
},
|
|
43
43
|
"@openai/apps-sdk-ui/components/Checkbox": {
|
|
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/Checkbox/index.js",
|
|
45
45
|
"file": "@openai_apps-sdk-ui_components_Checkbox.js",
|
|
46
|
-
"fileHash": "
|
|
46
|
+
"fileHash": "29b22e1b",
|
|
47
47
|
"needsInterop": false
|
|
48
48
|
},
|
|
49
49
|
"@openai/apps-sdk-ui/components/Icon": {
|
|
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/Icon/index.js",
|
|
51
51
|
"file": "@openai_apps-sdk-ui_components_Icon.js",
|
|
52
|
-
"fileHash": "
|
|
52
|
+
"fileHash": "a65a89dc",
|
|
53
53
|
"needsInterop": false
|
|
54
54
|
},
|
|
55
55
|
"@openai/apps-sdk-ui/components/Input": {
|
|
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/Input/index.js",
|
|
57
57
|
"file": "@openai_apps-sdk-ui_components_Input.js",
|
|
58
|
-
"fileHash": "
|
|
58
|
+
"fileHash": "efcd04ba",
|
|
59
59
|
"needsInterop": false
|
|
60
60
|
},
|
|
61
61
|
"@openai/apps-sdk-ui/components/SegmentedControl": {
|
|
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/SegmentedControl/index.js",
|
|
63
63
|
"file": "@openai_apps-sdk-ui_components_SegmentedControl.js",
|
|
64
|
-
"fileHash": "
|
|
64
|
+
"fileHash": "b7c8e52c",
|
|
65
65
|
"needsInterop": false
|
|
66
66
|
},
|
|
67
67
|
"@openai/apps-sdk-ui/components/Select": {
|
|
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/Select/index.js",
|
|
69
69
|
"file": "@openai_apps-sdk-ui_components_Select.js",
|
|
70
|
-
"fileHash": "
|
|
70
|
+
"fileHash": "b43c4297",
|
|
71
71
|
"needsInterop": false
|
|
72
72
|
},
|
|
73
73
|
"@openai/apps-sdk-ui/components/Textarea": {
|
|
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/components/Textarea/index.js",
|
|
75
75
|
"file": "@openai_apps-sdk-ui_components_Textarea.js",
|
|
76
|
-
"fileHash": "
|
|
76
|
+
"fileHash": "e6d46958",
|
|
77
77
|
"needsInterop": false
|
|
78
78
|
},
|
|
79
79
|
"@openai/apps-sdk-ui/theme": {
|
|
80
80
|
"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",
|
|
81
81
|
"file": "@openai_apps-sdk-ui_theme.js",
|
|
82
|
-
"fileHash": "
|
|
82
|
+
"fileHash": "8f9b13b1",
|
|
83
83
|
"needsInterop": false
|
|
84
84
|
},
|
|
85
85
|
"clsx": {
|
|
86
86
|
"src": "../../../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs",
|
|
87
87
|
"file": "clsx.js",
|
|
88
|
-
"fileHash": "
|
|
88
|
+
"fileHash": "b1cc3b7f",
|
|
89
89
|
"needsInterop": false
|
|
90
90
|
},
|
|
91
91
|
"embla-carousel-react": {
|
|
92
92
|
"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",
|
|
93
93
|
"file": "embla-carousel-react.js",
|
|
94
|
-
"fileHash": "
|
|
94
|
+
"fileHash": "62a93251",
|
|
95
95
|
"needsInterop": false
|
|
96
96
|
},
|
|
97
97
|
"embla-carousel-wheel-gestures": {
|
|
98
98
|
"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",
|
|
99
99
|
"file": "embla-carousel-wheel-gestures.js",
|
|
100
|
-
"fileHash": "
|
|
100
|
+
"fileHash": "368bd1a3",
|
|
101
101
|
"needsInterop": false
|
|
102
102
|
},
|
|
103
103
|
"mapbox-gl": {
|
|
104
104
|
"src": "../../../../node_modules/.pnpm/mapbox-gl@3.17.0/node_modules/mapbox-gl/dist/mapbox-gl.js",
|
|
105
105
|
"file": "mapbox-gl.js",
|
|
106
|
-
"fileHash": "
|
|
106
|
+
"fileHash": "e7ac33e5",
|
|
107
107
|
"needsInterop": true
|
|
108
108
|
},
|
|
109
109
|
"react-dom/client": {
|
|
110
110
|
"src": "../../../../node_modules/.pnpm/react-dom@19.2.0_react@19.2.0/node_modules/react-dom/client.js",
|
|
111
111
|
"file": "react-dom_client.js",
|
|
112
|
-
"fileHash": "
|
|
112
|
+
"fileHash": "400e60e6",
|
|
113
113
|
"needsInterop": true
|
|
114
114
|
},
|
|
115
115
|
"tailwind-merge": {
|
|
116
116
|
"src": "../../../../node_modules/.pnpm/tailwind-merge@3.4.0/node_modules/tailwind-merge/dist/bundle-mjs.mjs",
|
|
117
117
|
"file": "tailwind-merge.js",
|
|
118
|
-
"fileHash": "
|
|
118
|
+
"fileHash": "0e85aebb",
|
|
119
119
|
"needsInterop": false
|
|
120
120
|
}
|
|
121
121
|
},
|
package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.0.13","results":[[":src/
|
|
1
|
+
{"version":"4.0.13","results":[[":src/components/album/albums.test.tsx",{"duration":316.7086179999999,"failed":false}],[":src/resources/counter-resource.test.tsx",{"duration":261.19590900000003,"failed":false}],[":src/resources/carousel-resource.test.tsx",{"duration":254.1855129999999,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":87.29753299999993,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":260.2528709999997,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":90.40763599999991,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":251.03367500000013,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":483.4843430000001,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":253.79688199999987,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":57.731027999999924,"failed":false}]]}
|
|
@@ -3,7 +3,7 @@ import mapboxgl from 'mapbox-gl';
|
|
|
3
3
|
import 'mapbox-gl/dist/mapbox-gl.css';
|
|
4
4
|
import { useMaxHeight } from 'sunpeak';
|
|
5
5
|
import { cn } from '../../lib/index';
|
|
6
|
-
import type { Place } from '../../simulations/
|
|
6
|
+
import type { Place } from '../../simulations/map-simulation';
|
|
7
7
|
|
|
8
8
|
// Public Mapbox token for demo purposes
|
|
9
9
|
mapboxgl.accessToken =
|
|
@@ -79,7 +79,7 @@ export const MapView = React.forwardRef<HTMLDivElement, MapViewProps>(
|
|
|
79
79
|
if (typeof window === 'undefined') return 0;
|
|
80
80
|
|
|
81
81
|
const isXlUp = window.matchMedia && window.matchMedia('(min-width: 1280px)').matches;
|
|
82
|
-
const el = document.querySelector('.
|
|
82
|
+
const el = document.querySelector('.map-inspector');
|
|
83
83
|
const w = el ? el.getBoundingClientRect().width : 360;
|
|
84
84
|
const half = Math.round(w / 2);
|
|
85
85
|
|
|
@@ -13,19 +13,19 @@ import { PlaceList } from './place-list';
|
|
|
13
13
|
import { PlaceCarousel } from './place-carousel';
|
|
14
14
|
import { PlaceInspector } from './place-inspector';
|
|
15
15
|
import { MapView } from './map-view';
|
|
16
|
-
import type { Place,
|
|
16
|
+
import type { Place, MapData } from '../../simulations/map-simulation';
|
|
17
17
|
|
|
18
|
-
export interface
|
|
18
|
+
export interface MapState extends Record<string, unknown> {
|
|
19
19
|
selectedPlaceId?: string | null;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
export type
|
|
22
|
+
export type MapProps = {
|
|
23
23
|
className?: string;
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
export const
|
|
27
|
-
const data = useWidgetProps<
|
|
28
|
-
const [widgetState, setWidgetState] = useWidgetState<
|
|
26
|
+
export const Map = React.forwardRef<HTMLDivElement, MapProps>(({ className }, ref) => {
|
|
27
|
+
const data = useWidgetProps<MapData>(() => ({ places: [] }));
|
|
28
|
+
const [widgetState, setWidgetState] = useWidgetState<MapState>(() => ({
|
|
29
29
|
selectedPlaceId: null,
|
|
30
30
|
}));
|
|
31
31
|
const displayMode = useDisplayMode();
|
|
@@ -142,4 +142,4 @@ export const Pizzaz = React.forwardRef<HTMLDivElement, PizzazProps>(({ className
|
|
|
142
142
|
</div>
|
|
143
143
|
);
|
|
144
144
|
});
|
|
145
|
-
|
|
145
|
+
Map.displayName = 'Map';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Star } from '@openai/apps-sdk-ui/components/Icon';
|
|
3
3
|
import { cn } from '../../lib/index';
|
|
4
|
-
import type { Place } from '../../simulations/
|
|
4
|
+
import type { Place } from '../../simulations/map-simulation';
|
|
5
5
|
|
|
6
6
|
export type PlaceCardProps = {
|
|
7
7
|
place: Place;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
3
3
|
import { cn } from '../../lib/index';
|
|
4
4
|
import { PlaceCard } from './place-card';
|
|
5
|
-
import type { Place } from '../../simulations/
|
|
5
|
+
import type { Place } from '../../simulations/map-simulation';
|
|
6
6
|
|
|
7
7
|
export type PlaceCarouselProps = {
|
|
8
8
|
places: Place[];
|
|
@@ -3,7 +3,7 @@ import { Button } from '@openai/apps-sdk-ui/components/Button';
|
|
|
3
3
|
import { Avatar } from '@openai/apps-sdk-ui/components/Avatar';
|
|
4
4
|
import { X, Star } from '@openai/apps-sdk-ui/components/Icon';
|
|
5
5
|
import { cn } from '../../lib/index';
|
|
6
|
-
import type { Place } from '../../simulations/
|
|
6
|
+
import type { Place } from '../../simulations/map-simulation';
|
|
7
7
|
|
|
8
8
|
export type PlaceInspectorProps = {
|
|
9
9
|
place: Place;
|
|
@@ -37,7 +37,7 @@ export const PlaceInspector = React.forwardRef<HTMLDivElement, PlaceInspectorPro
|
|
|
37
37
|
<div
|
|
38
38
|
ref={ref}
|
|
39
39
|
className={cn(
|
|
40
|
-
'
|
|
40
|
+
'map-inspector absolute z-30 top-0 bottom-4 left-0 right-auto xl:left-auto xl:right-6 md:z-20 w-[340px] xl:w-[360px] xl:top-6 xl:bottom-8 pointer-events-auto',
|
|
41
41
|
'animate-in fade-in slide-in-from-left-2 xl:slide-in-from-right-2 duration-200',
|
|
42
42
|
className
|
|
43
43
|
)}
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Settings } from '@openai/apps-sdk-ui/components/Icon';
|
|
3
3
|
import { cn } from '../../lib/index';
|
|
4
4
|
import { PlaceCard } from './place-card';
|
|
5
|
-
import type { Place } from '../../simulations/
|
|
5
|
+
import type { Place } from '../../simulations/map-simulation';
|
|
6
6
|
|
|
7
7
|
export type PlaceListProps = {
|
|
8
8
|
places: Place[];
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useSafeArea, useMaxHeight } from 'sunpeak';
|
|
3
|
-
import {
|
|
3
|
+
import { Map } from '../components/map/map';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* Production-ready
|
|
6
|
+
* Production-ready Map Resource
|
|
7
7
|
*
|
|
8
8
|
* This resource displays a pizza restaurant finder with an interactive map,
|
|
9
9
|
* place listings, and detailed inspector view.
|
|
10
10
|
* Can be dropped into any production environment without changes.
|
|
11
11
|
*/
|
|
12
|
-
export const
|
|
12
|
+
export const MapResource = React.forwardRef<HTMLDivElement>((_props, ref) => {
|
|
13
13
|
const safeArea = useSafeArea();
|
|
14
14
|
const maxHeight = useMaxHeight();
|
|
15
15
|
|
|
@@ -25,8 +25,8 @@ export const PizzazResource = React.forwardRef<HTMLDivElement>((_props, ref) =>
|
|
|
25
25
|
maxHeight: maxHeight ?? undefined,
|
|
26
26
|
}}
|
|
27
27
|
>
|
|
28
|
-
<
|
|
28
|
+
<Map />
|
|
29
29
|
</div>
|
|
30
30
|
);
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
MapResource.displayName = 'MapResource';
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
import { counterSimulation } from './counter-simulation.js';
|
|
9
9
|
import { albumsSimulation } from './albums-simulation.js';
|
|
10
10
|
import { carouselSimulation } from './carousel-simulation.js';
|
|
11
|
-
import {
|
|
11
|
+
import { mapSimulation } from './map-simulation.js';
|
|
12
12
|
|
|
13
13
|
export const SIMULATIONS = {
|
|
14
14
|
counter: counterSimulation,
|
|
15
15
|
albums: albumsSimulation,
|
|
16
16
|
carousel: carouselSimulation,
|
|
17
|
-
|
|
17
|
+
map: mapSimulation,
|
|
18
18
|
} as const;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Server-safe configuration for the
|
|
2
|
+
* Server-safe configuration for the map simulation.
|
|
3
3
|
* This file contains only metadata and doesn't import React components or CSS.
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -16,11 +16,11 @@ export interface Place {
|
|
|
16
16
|
thumbnail: string;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export interface
|
|
19
|
+
export interface MapData extends Record<string, unknown> {
|
|
20
20
|
places: Place[];
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const mapData: MapData = {
|
|
24
24
|
places: [
|
|
25
25
|
{
|
|
26
26
|
id: 'nova-slice-lab',
|
|
@@ -125,7 +125,7 @@ const pizzazData: PizzazData = {
|
|
|
125
125
|
],
|
|
126
126
|
};
|
|
127
127
|
|
|
128
|
-
export const
|
|
128
|
+
export const mapSimulation = {
|
|
129
129
|
userMessage: 'Find pizza near me',
|
|
130
130
|
|
|
131
131
|
// MCP Tool protocol - official Tool type from MCP SDK used in ListTools response
|
|
@@ -136,7 +136,7 @@ export const pizzazSimulation = {
|
|
|
136
136
|
title: 'Find Pizza',
|
|
137
137
|
annotations: { readOnlyHint: true },
|
|
138
138
|
_meta: {
|
|
139
|
-
'openai/outputTemplate': 'ui://
|
|
139
|
+
'openai/outputTemplate': 'ui://MapResource',
|
|
140
140
|
'openai/toolInvocation/invoking': 'Finding pizza places',
|
|
141
141
|
'openai/toolInvocation/invoked': 'Found pizza places',
|
|
142
142
|
'openai/widgetAccessible': true,
|
|
@@ -148,9 +148,9 @@ export const pizzazSimulation = {
|
|
|
148
148
|
// resource.name is used as the simulation identifier
|
|
149
149
|
// resource.title is used as the simulation display label
|
|
150
150
|
resource: {
|
|
151
|
-
uri: 'ui://
|
|
152
|
-
name: '
|
|
153
|
-
title: '
|
|
151
|
+
uri: 'ui://MapResource',
|
|
152
|
+
name: 'map',
|
|
153
|
+
title: 'Map',
|
|
154
154
|
description: 'Pizza restaurant finder widget',
|
|
155
155
|
mimeType: 'text/html+skybridge',
|
|
156
156
|
_meta: {
|
|
@@ -171,7 +171,7 @@ export const pizzazSimulation = {
|
|
|
171
171
|
|
|
172
172
|
// MCP CallTool protocol - data for CallTool response
|
|
173
173
|
toolCall: {
|
|
174
|
-
structuredContent:
|
|
174
|
+
structuredContent: mapData,
|
|
175
175
|
_meta: {},
|
|
176
176
|
},
|
|
177
177
|
} as const;
|