sunpeak 0.7.11 → 0.8.4

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.
Files changed (76) hide show
  1. package/README.md +2 -1
  2. package/bin/commands/deploy.mjs +18 -8
  3. package/bin/commands/dev.mjs +60 -4
  4. package/bin/commands/login.mjs +73 -55
  5. package/bin/commands/logout.mjs +26 -12
  6. package/bin/commands/mcp.mjs +1 -1
  7. package/bin/commands/pull.mjs +60 -39
  8. package/bin/commands/push.mjs +73 -49
  9. package/bin/commands/upgrade.mjs +203 -0
  10. package/bin/sunpeak.js +68 -35
  11. package/dist/chatgpt/chatgpt-simulator.d.ts +2 -1
  12. package/dist/index.cjs +13 -14
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.js +13 -14
  15. package/dist/index.js.map +1 -1
  16. package/dist/mcp/entry.cjs +41 -9
  17. package/dist/mcp/entry.cjs.map +1 -1
  18. package/dist/mcp/entry.js +42 -10
  19. package/dist/mcp/entry.js.map +1 -1
  20. package/dist/mcp/index.cjs +1 -1
  21. package/dist/mcp/index.js +1 -1
  22. package/dist/{server-CziiHU7V.cjs → server-B9YgCQdS.cjs} +3 -2
  23. package/dist/{server-CziiHU7V.cjs.map → server-B9YgCQdS.cjs.map} +1 -1
  24. package/dist/{server-D8kyzuiq.js → server-DVmTC-SF.js} +3 -2
  25. package/dist/{server-D8kyzuiq.js.map → server-DVmTC-SF.js.map} +1 -1
  26. package/dist/style.css +62 -0
  27. package/dist/types/simulation.d.ts +1 -1
  28. package/package.json +1 -1
  29. package/template/.sunpeak/dev.tsx +78 -15
  30. package/template/.sunpeak/vite-env.d.ts +1 -0
  31. package/template/README.md +35 -20
  32. package/template/dist/albums.js +1 -1
  33. package/template/dist/albums.json +3 -2
  34. package/template/dist/carousel.js +1 -1
  35. package/template/dist/carousel.json +3 -2
  36. package/template/dist/confirmation.js +49 -0
  37. package/template/dist/confirmation.json +16 -0
  38. package/template/dist/counter.js +1 -1
  39. package/template/dist/counter.json +7 -2
  40. package/template/dist/map.js +1 -1
  41. package/template/dist/map.json +6 -3
  42. package/template/node_modules/.vite/deps/_metadata.json +19 -19
  43. package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  44. package/template/src/components/map/map-view.test.tsx +1 -1
  45. package/template/src/components/map/map-view.tsx +1 -1
  46. package/template/src/components/map/map.tsx +1 -1
  47. package/template/src/components/map/place-card.test.tsx +1 -1
  48. package/template/src/components/map/place-card.tsx +1 -1
  49. package/template/src/components/map/place-carousel.test.tsx +1 -1
  50. package/template/src/components/map/place-carousel.tsx +1 -1
  51. package/template/src/components/map/place-inspector.test.tsx +1 -1
  52. package/template/src/components/map/place-inspector.tsx +1 -1
  53. package/template/src/components/map/place-list.test.tsx +1 -1
  54. package/template/src/components/map/place-list.tsx +1 -1
  55. package/template/src/components/map/types.ts +18 -0
  56. package/template/src/resources/albums-resource.json +1 -1
  57. package/template/src/resources/carousel-resource.json +1 -1
  58. package/template/src/resources/confirmation-resource.json +12 -0
  59. package/template/src/resources/confirmation-resource.tsx +479 -0
  60. package/template/src/resources/counter-resource.json +4 -1
  61. package/template/src/resources/index.ts +39 -4
  62. package/template/src/resources/map-resource.json +7 -2
  63. package/template/src/simulations/albums-show-simulation.json +131 -0
  64. package/template/src/simulations/carousel-show-simulation.json +68 -0
  65. package/template/src/simulations/confirmation-diff-simulation.json +80 -0
  66. package/template/src/simulations/confirmation-post-simulation.json +56 -0
  67. package/template/src/simulations/confirmation-purchase-simulation.json +88 -0
  68. package/template/src/simulations/counter-show-simulation.json +20 -0
  69. package/template/src/simulations/index.ts +17 -12
  70. package/template/src/simulations/map-show-simulation.json +123 -0
  71. package/template/src/vite-env.d.ts +1 -0
  72. package/template/tsconfig.json +1 -1
  73. package/template/src/simulations/albums-simulation.ts +0 -147
  74. package/template/src/simulations/carousel-simulation.ts +0 -84
  75. package/template/src/simulations/counter-simulation.ts +0 -34
  76. package/template/src/simulations/map-simulation.ts +0 -154
@@ -7,13 +7,16 @@
7
7
  "openai/widgetDomain": "https://sunpeak.ai",
8
8
  "openai/widgetCSP": {
9
9
  "connect_domains": [
10
- "https://api.mapbox.com"
10
+ "https://api.mapbox.com",
11
+ "https://events.mapbox.com"
11
12
  ],
12
13
  "resource_domains": [
13
14
  "https://*.oaistatic.com",
14
- "https://api.mapbox.com"
15
+ "https://cdn.openai.com",
16
+ "https://api.mapbox.com",
17
+ "https://events.mapbox.com"
15
18
  ]
16
19
  }
17
20
  },
18
- "uri": "ui://map-mjkeffk1"
21
+ "uri": "ui://map-mjszyos6"
19
22
  }
@@ -7,115 +7,115 @@
7
7
  "react": {
8
8
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/index.js",
9
9
  "file": "react.js",
10
- "fileHash": "8c524d9b",
10
+ "fileHash": "1adce65b",
11
11
  "needsInterop": true
12
12
  },
13
13
  "react-dom": {
14
14
  "src": "../../../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/index.js",
15
15
  "file": "react-dom.js",
16
- "fileHash": "8eeb19ea",
16
+ "fileHash": "5f4c05ee",
17
17
  "needsInterop": true
18
18
  },
19
19
  "react/jsx-dev-runtime": {
20
20
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-dev-runtime.js",
21
21
  "file": "react_jsx-dev-runtime.js",
22
- "fileHash": "dda2010f",
22
+ "fileHash": "db478c36",
23
23
  "needsInterop": true
24
24
  },
25
25
  "react/jsx-runtime": {
26
26
  "src": "../../../../node_modules/.pnpm/react@19.2.3/node_modules/react/jsx-runtime.js",
27
27
  "file": "react_jsx-runtime.js",
28
- "fileHash": "f7248748",
28
+ "fileHash": "4eccc71b",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Avatar/index.js",
33
33
  "file": "@openai_apps-sdk-ui_components_Avatar.js",
34
- "fileHash": "f388143b",
34
+ "fileHash": "db689388",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Button/index.js",
39
39
  "file": "@openai_apps-sdk-ui_components_Button.js",
40
- "fileHash": "0ea38e70",
40
+ "fileHash": "fb09cd35",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Checkbox/index.js",
45
45
  "file": "@openai_apps-sdk-ui_components_Checkbox.js",
46
- "fileHash": "e240ec98",
46
+ "fileHash": "9955d764",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Icon/index.js",
51
51
  "file": "@openai_apps-sdk-ui_components_Icon.js",
52
- "fileHash": "d32785b8",
52
+ "fileHash": "765cdd61",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Input/index.js",
57
57
  "file": "@openai_apps-sdk-ui_components_Input.js",
58
- "fileHash": "347dbcfc",
58
+ "fileHash": "a6d61b3a",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/SegmentedControl/index.js",
63
63
  "file": "@openai_apps-sdk-ui_components_SegmentedControl.js",
64
- "fileHash": "b4e29624",
64
+ "fileHash": "ab1e5838",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Select/index.js",
69
69
  "file": "@openai_apps-sdk-ui_components_Select.js",
70
- "fileHash": "54b9002d",
70
+ "fileHash": "02fa0bc6",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/components/Textarea/index.js",
75
75
  "file": "@openai_apps-sdk-ui_components_Textarea.js",
76
- "fileHash": "c2845cba",
76
+ "fileHash": "5efa173b",
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.1_@types+react-dom@19.2.3_@types+react@19.2.7__@types+react@19._90324f97b7190ccfdbe40a9e8bef3385/node_modules/@openai/apps-sdk-ui/dist/es/lib/theme.js",
81
81
  "file": "@openai_apps-sdk-ui_theme.js",
82
- "fileHash": "be140575",
82
+ "fileHash": "adf633fb",
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": "6a6afb72",
88
+ "fileHash": "f0393b05",
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.3/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js",
93
93
  "file": "embla-carousel-react.js",
94
- "fileHash": "74aac8d0",
94
+ "fileHash": "5aa6dc8a",
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": "b9d0faec",
100
+ "fileHash": "c63e155a",
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": "36999890",
106
+ "fileHash": "df535463",
107
107
  "needsInterop": true
108
108
  },
109
109
  "react-dom/client": {
110
110
  "src": "../../../../node_modules/.pnpm/react-dom@19.2.3_react@19.2.3/node_modules/react-dom/client.js",
111
111
  "file": "react-dom_client.js",
112
- "fileHash": "652a2f21",
112
+ "fileHash": "83056a21",
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": "723987a7",
118
+ "fileHash": "0b505b22",
119
119
  "needsInterop": false
120
120
  }
121
121
  },
@@ -1 +1 @@
1
- {"version":"4.0.16","results":[[":src/components/map/map-view.test.tsx",{"duration":79.46838099999991,"failed":false}],[":src/resources/carousel-resource.test.tsx",{"duration":240.08223399999997,"failed":false}],[":src/components/album/albums.test.tsx",{"duration":351.6345040000001,"failed":false}],[":src/resources/counter-resource.test.tsx",{"duration":258.20634500000006,"failed":false}],[":src/components/map/place-inspector.test.tsx",{"duration":455.4559690000001,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":285.58507099999997,"failed":false}],[":src/components/map/place-list.test.tsx",{"duration":139.77515300000005,"failed":false}],[":src/components/map/place-card.test.tsx",{"duration":345.87943299999984,"failed":false}],[":src/components/map/place-carousel.test.tsx",{"duration":488.85430199999996,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":74.7320749999999,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":66.59458199999995,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":251.85133800000017,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":481.2766650000001,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":336.58156400000007,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":89.424129,"failed":false}]]}
1
+ {"version":"4.0.16","results":[[":src/resources/carousel-resource.test.tsx",{"duration":255.92725199999995,"failed":false}],[":src/components/album/albums.test.tsx",{"duration":316.69233699999995,"failed":false}],[":src/resources/counter-resource.test.tsx",{"duration":296.34930299999996,"failed":false}],[":src/components/map/map-view.test.tsx",{"duration":74.30506199999991,"failed":false}],[":src/components/map/place-inspector.test.tsx",{"duration":401.9067449999998,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":275.725199,"failed":false}],[":src/components/map/place-list.test.tsx",{"duration":150.993152,"failed":false}],[":src/components/map/place-card.test.tsx",{"duration":324.07580099999996,"failed":false}],[":src/components/map/place-carousel.test.tsx",{"duration":391.78054900000006,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":70.01213700000017,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":71.646121,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":224.81713300000013,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":436.2063170000001,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":231.87361699999997,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":77.7521690000001,"failed":false}]]}
@@ -1,7 +1,7 @@
1
1
  import { render } from '@testing-library/react';
2
2
  import { describe, it, expect, vi, beforeEach } from 'vitest';
3
3
  import { MapView } from './map-view';
4
- import type { Place } from '../../simulations/map-simulation';
4
+ import type { Place } from './types';
5
5
 
6
6
  // Mock mapbox-gl
7
7
  vi.mock('mapbox-gl', () => ({
@@ -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/map-simulation';
6
+ import type { Place } from './types';
7
7
 
8
8
  // Public Mapbox token for demo purposes
9
9
  mapboxgl.accessToken =
@@ -13,7 +13,7 @@ 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, MapData } from '../../simulations/map-simulation';
16
+ import type { Place, MapData } from './types';
17
17
 
18
18
  export interface MapState extends Record<string, unknown> {
19
19
  selectedPlaceId?: string | null;
@@ -1,7 +1,7 @@
1
1
  import { render, screen, fireEvent } from '@testing-library/react';
2
2
  import { describe, it, expect, vi } from 'vitest';
3
3
  import { PlaceCard } from './place-card';
4
- import type { Place } from '../../simulations/map-simulation';
4
+ import type { Place } from './types';
5
5
 
6
6
  describe('PlaceCard', () => {
7
7
  const mockPlace: Place = {
@@ -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/map-simulation';
4
+ import type { Place } from './types';
5
5
 
6
6
  export type PlaceCardProps = {
7
7
  place: Place;
@@ -1,7 +1,7 @@
1
1
  import { render, screen, fireEvent } from '@testing-library/react';
2
2
  import { describe, it, expect, vi } from 'vitest';
3
3
  import { PlaceCarousel } from './place-carousel';
4
- import type { Place } from '../../simulations/map-simulation';
4
+ import type { Place } from './types';
5
5
 
6
6
  describe('PlaceCarousel', () => {
7
7
  const mockPlaces: 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/map-simulation';
5
+ import type { Place } from './types';
6
6
 
7
7
  export type PlaceCarouselProps = {
8
8
  places: Place[];
@@ -1,7 +1,7 @@
1
1
  import { render, screen, fireEvent } from '@testing-library/react';
2
2
  import { describe, it, expect, vi } from 'vitest';
3
3
  import { PlaceInspector } from './place-inspector';
4
- import type { Place } from '../../simulations/map-simulation';
4
+ import type { Place } from './types';
5
5
 
6
6
  describe('PlaceInspector', () => {
7
7
  const mockPlace: 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/map-simulation';
6
+ import type { Place } from './types';
7
7
 
8
8
  export type PlaceInspectorProps = {
9
9
  place: Place;
@@ -1,7 +1,7 @@
1
1
  import { render, screen, fireEvent } from '@testing-library/react';
2
2
  import { describe, it, expect, vi } from 'vitest';
3
3
  import { PlaceList } from './place-list';
4
- import type { Place } from '../../simulations/map-simulation';
4
+ import type { Place } from './types';
5
5
 
6
6
  describe('PlaceList', () => {
7
7
  const mockPlaces: Place[] = [
@@ -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/map-simulation';
5
+ import type { Place } from './types';
6
6
 
7
7
  export type PlaceListProps = {
8
8
  places: Place[];
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Types for map components
3
+ */
4
+
5
+ export interface Place {
6
+ id: string;
7
+ name: string;
8
+ coords: [number, number];
9
+ description: string;
10
+ city: string;
11
+ rating: number;
12
+ price: string;
13
+ thumbnail: string;
14
+ }
15
+
16
+ export interface MapData extends Record<string, unknown> {
17
+ places: Place[];
18
+ }
@@ -6,7 +6,7 @@
6
6
  "_meta": {
7
7
  "openai/widgetDomain": "https://sunpeak.ai",
8
8
  "openai/widgetCSP": {
9
- "resource_domains": ["https://*.oaistatic.com"]
9
+ "resource_domains": ["https://*.oaistatic.com", "https://cdn.openai.com"]
10
10
  }
11
11
  }
12
12
  }
@@ -6,7 +6,7 @@
6
6
  "_meta": {
7
7
  "openai/widgetDomain": "https://sunpeak.ai",
8
8
  "openai/widgetCSP": {
9
- "resource_domains": ["https://images.unsplash.com"]
9
+ "resource_domains": ["https://images.unsplash.com", "https://cdn.openai.com"]
10
10
  }
11
11
  }
12
12
  }
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "confirmation",
3
+ "title": "Confirmation",
4
+ "description": "Visualize and confirm a proposed set of changes or actions",
5
+ "mimeType": "text/html+skybridge",
6
+ "_meta": {
7
+ "openai/widgetDomain": "https://sunpeak.ai",
8
+ "openai/widgetCSP": {
9
+ "resource_domains": ["https://images.unsplash.com", "https://cdn.openai.com"]
10
+ }
11
+ }
12
+ }