sunpeak 0.5.41 → 0.6.1

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 (28) hide show
  1. package/README.md +1 -0
  2. package/bin/commands/build.mjs +4 -4
  3. package/dist/chatgpt/globals.css +7 -0
  4. package/dist/index.cjs +75 -8
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.js +75 -8
  7. package/dist/index.js.map +1 -1
  8. package/dist/style.css +97 -11
  9. package/package.json +1 -1
  10. package/template/.sunpeak/dev.tsx +2 -2
  11. package/template/README.md +3 -3
  12. package/template/dist/chatgpt/albums.js +1 -1
  13. package/template/dist/chatgpt/carousel.js +1 -1
  14. package/template/dist/chatgpt/counter.js +1 -1
  15. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +2 -2
  16. package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +9 -9
  17. package/template/node_modules/.vite/deps/_metadata.json +22 -22
  18. package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js → chunk-DQAZDQU3.js} +5 -5
  19. package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
  20. package/template/src/components/index.ts +0 -1
  21. package/template/src/{components/resources → resources}/albums-resource.test.tsx +1 -1
  22. package/template/src/{components/resources → resources}/albums-resource.tsx +1 -1
  23. package/template/src/{components/resources → resources}/carousel-resource.test.tsx +2 -2
  24. package/template/src/{components/resources → resources}/carousel-resource.tsx +2 -2
  25. /package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js.map → chunk-DQAZDQU3.js.map} +0 -0
  26. /package/template/src/{components/resources → resources}/counter-resource.test.tsx +0 -0
  27. /package/template/src/{components/resources → resources}/counter-resource.tsx +0 -0
  28. /package/template/src/{components/resources → resources}/index.ts +0 -0
package/dist/style.css CHANGED
@@ -130,6 +130,7 @@
130
130
  --tracking-tight: var(--font-tracking-tight);
131
131
  --shadow-hairline: var(--shadow-hairline);
132
132
  --color-white: var(--white);
133
+ --color-black: var(--black);
133
134
  }
134
135
 
135
136
  :root, :where([data-theme]) {
@@ -3077,7 +3078,11 @@
3077
3078
  }
3078
3079
  }
3079
3080
 
3080
- @layer components;
3081
+ @layer components {
3082
+ :has(.sunpeak-simulator-root) :where([role="listbox"], [data-radix-select-content], [data-radix-popper-content-wrapper]) {
3083
+ z-index: 100 !important;
3084
+ }
3085
+ }
3081
3086
 
3082
3087
  @layer utilities {
3083
3088
  .pointer-events-auto {
@@ -3124,6 +3129,10 @@
3124
3129
  position: sticky;
3125
3130
  }
3126
3131
 
3132
+ .inset-0 {
3133
+ inset: calc(var(--spacing) * 0);
3134
+ }
3135
+
3127
3136
  .-start-2 {
3128
3137
  inset-inline-start: calc(var(--spacing) * -2);
3129
3138
  }
@@ -3156,8 +3165,12 @@
3156
3165
  top: 50%;
3157
3166
  }
3158
3167
 
3159
- .top-4 {
3160
- top: calc(var(--spacing) * 4);
3168
+ .top-12 {
3169
+ top: calc(var(--spacing) * 12);
3170
+ }
3171
+
3172
+ .top-18 {
3173
+ top: calc(var(--spacing) * 18);
3161
3174
  }
3162
3175
 
3163
3176
  .right-0 {
@@ -3188,6 +3201,10 @@
3188
3201
  z-index: 20;
3189
3202
  }
3190
3203
 
3204
+ .z-30 {
3205
+ z-index: 30;
3206
+ }
3207
+
3191
3208
  .z-40 {
3192
3209
  z-index: 40;
3193
3210
  }
@@ -3608,6 +3625,11 @@
3608
3625
  border-radius: var(--radius-xl);
3609
3626
  }
3610
3627
 
3628
+ .rounded-r-md {
3629
+ border-top-right-radius: var(--radius-md);
3630
+ border-bottom-right-radius: var(--radius-md);
3631
+ }
3632
+
3611
3633
  .border {
3612
3634
  border-style: var(--tw-border-style);
3613
3635
  border-width: 1px;
@@ -3618,6 +3640,11 @@
3618
3640
  border-width: 2px;
3619
3641
  }
3620
3642
 
3643
+ .border-t {
3644
+ border-top-style: var(--tw-border-style);
3645
+ border-top-width: 1px;
3646
+ }
3647
+
3621
3648
  .border-r {
3622
3649
  border-right-style: var(--tw-border-style);
3623
3650
  border-right-width: 1px;
@@ -3648,14 +3675,20 @@
3648
3675
  background-color: #3a3a3a;
3649
3676
  }
3650
3677
 
3651
- .bg-\[\#212121\] {
3652
- background-color: #212121;
3653
- }
3654
-
3655
3678
  .bg-\[var\(--color-background-primary-soft\)\] {
3656
3679
  background-color: var(--color-background-primary-soft);
3657
3680
  }
3658
3681
 
3682
+ .bg-black\/50 {
3683
+ background-color: var(--color-black);
3684
+ }
3685
+
3686
+ @supports (color: color-mix(in lab, red, red)) {
3687
+ .bg-black\/50 {
3688
+ background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
3689
+ }
3690
+ }
3691
+
3659
3692
  .bg-sidebar {
3660
3693
  background-color: var(--color-surface-secondary);
3661
3694
  }
@@ -3668,6 +3701,10 @@
3668
3701
  background-color: var(--color-surface-secondary);
3669
3702
  }
3670
3703
 
3704
+ .bg-white {
3705
+ background-color: var(--color-white);
3706
+ }
3707
+
3671
3708
  .bg-gradient-to-l {
3672
3709
  --tw-gradient-position: to left in oklab;
3673
3710
  background-image: linear-gradient(var(--tw-gradient-stops));
@@ -3695,6 +3732,10 @@
3695
3732
  padding: calc(var(--spacing) * 0);
3696
3733
  }
3697
3734
 
3735
+ .p-1 {
3736
+ padding: calc(var(--spacing) * 1);
3737
+ }
3738
+
3698
3739
  .p-1\.5 {
3699
3740
  padding: calc(var(--spacing) * 1.5);
3700
3741
  }
@@ -4014,8 +4055,41 @@
4014
4055
  }
4015
4056
 
4016
4057
  @media not all and (min-width: 768px) {
4017
- .max-md\:hidden {
4018
- display: none;
4058
+ .max-md\:fixed {
4059
+ position: fixed;
4060
+ }
4061
+
4062
+ .max-md\:inset-y-0 {
4063
+ inset-block: calc(var(--spacing) * 0);
4064
+ }
4065
+
4066
+ .max-md\:left-0 {
4067
+ left: calc(var(--spacing) * 0);
4068
+ }
4069
+
4070
+ .max-md\:z-\[100\] {
4071
+ z-index: 100;
4072
+ }
4073
+
4074
+ .max-md\:-translate-x-full {
4075
+ --tw-translate-x: -100%;
4076
+ translate: var(--tw-translate-x) var(--tw-translate-y);
4077
+ }
4078
+
4079
+ .max-md\:translate-x-0 {
4080
+ --tw-translate-x: calc(var(--spacing) * 0);
4081
+ translate: var(--tw-translate-x) var(--tw-translate-y);
4082
+ }
4083
+
4084
+ .max-md\:transition-transform {
4085
+ transition-property: transform, translate, scale, rotate;
4086
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
4087
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
4088
+ }
4089
+
4090
+ .max-md\:duration-300 {
4091
+ --tw-duration: .3s;
4092
+ transition-duration: .3s;
4019
4093
  }
4020
4094
  }
4021
4095
 
@@ -4056,12 +4130,20 @@
4056
4130
  }
4057
4131
 
4058
4132
  @media (min-width: 768px) {
4133
+ .md\:relative {
4134
+ position: relative;
4135
+ }
4136
+
4137
+ .md\:z-auto {
4138
+ z-index: auto;
4139
+ }
4140
+
4059
4141
  .md\:-mx-4 {
4060
4142
  margin-inline: calc(var(--spacing) * -4);
4061
4143
  }
4062
4144
 
4063
- .md\:flex {
4064
- display: flex;
4145
+ .md\:hidden {
4146
+ display: none;
4065
4147
  }
4066
4148
 
4067
4149
  .md\:p-10 {
@@ -4079,6 +4161,10 @@
4079
4161
  }
4080
4162
  }
4081
4163
 
4164
+ .dark\:bg-\[\#212121\]:where([data-theme="dark"], [data-theme="dark"] *) {
4165
+ background-color: #212121;
4166
+ }
4167
+
4082
4168
  .dark\:bg-\[\#303030\]:where([data-theme="dark"], [data-theme="dark"] *) {
4083
4169
  background-color: #303030;
4084
4170
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunpeak",
3
- "version": "0.5.41",
3
+ "version": "0.6.1",
4
4
  "description": "The ChatGPT App framework. Quickstart, build, & test your ChatGPT App locally!",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -6,7 +6,7 @@ import { StrictMode } from 'react';
6
6
  import { createRoot } from 'react-dom/client';
7
7
  import { ChatGPTSimulator, type Simulation } from 'sunpeak';
8
8
  import { SIMULATIONS } from '../src/simulations';
9
- import * as Resources from '../src/components/resources';
9
+ import * as Resources from '../src/resources';
10
10
  import '../src/styles/globals.css';
11
11
 
12
12
  /**
@@ -25,7 +25,7 @@ function getResourceComponentFromURI(uri: string): React.ComponentType {
25
25
  if (!component) {
26
26
  throw new Error(
27
27
  `Resource component "${componentName}" not found. ` +
28
- `Make sure it's exported from src/components/resources/index.ts`
28
+ `Make sure it's exported from src/resources/index.ts`
29
29
  );
30
30
  }
31
31
 
@@ -11,7 +11,7 @@ pnpm install
11
11
  pnpm dev
12
12
  ```
13
13
 
14
- That's it! Edit the resource files in [./src/components/resources/](./src/components/resources/) to build your resource UI.
14
+ That's it! Edit the resource files in [./src/resources/](./src/resources/) to build your resource UI.
15
15
 
16
16
  ## Commands
17
17
 
@@ -34,7 +34,7 @@ The template includes a minimal test setup with Vitest. You can add additional t
34
34
 
35
35
  **Do not customize (required by `sunpeak build`):**
36
36
 
37
- - `src/components/resources/` - Resource files must be here
37
+ - `src/resources/` - Resource files must be here
38
38
  - `src/index-resource.tsx` - Build template (must have `// RESOURCE_IMPORT` and `// RESOURCE_MOUNT` comments)
39
39
  - Resource file naming: `*-resource.tsx` (e.g., `counter-resource.tsx`)
40
40
 
@@ -87,7 +87,7 @@ This creates optimized builds in `dist/chatgpt/`:
87
87
  - `dist/chatgpt/counter.js`
88
88
  - `dist/chatgpt/albums.js`
89
89
  - `dist/chatgpt/carousel.js`
90
- - _(One .js file per resource in src/components/resources/)_
90
+ - _(One .js file per resource in src/resources/)_
91
91
 
92
92
  Each file is a self-contained bundle with CSS inlined. Host these files and reference them as resources in your production MCP server.
93
93