sunpeak 0.5.39 → 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.
- package/README.md +1 -0
- package/bin/commands/build.mjs +4 -4
- package/dist/chatgpt/globals.css +7 -0
- package/dist/chatgpt/mock-openai.d.ts +2 -2
- package/dist/chatgpt/simple-sidebar.d.ts +2 -1
- package/dist/hooks/use-max-height.d.ts +1 -1
- package/dist/index.cjs +235 -150
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +235 -150
- package/dist/index.js.map +1 -1
- package/dist/providers/openai/types.d.ts +1 -1
- package/dist/providers/types.d.ts +1 -1
- package/dist/style.css +201 -38
- package/package.json +1 -1
- package/template/.sunpeak/dev.tsx +2 -2
- package/template/README.md +3 -3
- package/template/dist/chatgpt/albums.js +11 -11
- package/template/dist/chatgpt/carousel.js +2 -2
- package/template/dist/chatgpt/counter.js +7 -7
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +2 -2
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +9 -9
- package/template/node_modules/.vite/deps/_metadata.json +22 -22
- package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js → chunk-DQAZDQU3.js} +5 -5
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/src/components/album/albums.test.tsx +7 -2
- package/template/src/components/album/albums.tsx +1 -1
- package/template/src/components/album/fullscreen-viewer.test.tsx +12 -24
- package/template/src/components/album/fullscreen-viewer.tsx +30 -71
- package/template/src/components/carousel/carousel.tsx +1 -1
- package/template/src/components/index.ts +0 -1
- package/template/src/{components/resources → resources}/albums-resource.test.tsx +1 -1
- package/template/src/{components/resources → resources}/albums-resource.tsx +2 -1
- package/template/src/{components/resources → resources}/carousel-resource.test.tsx +2 -2
- package/template/src/{components/resources → resources}/carousel-resource.tsx +2 -2
- package/template/src/{components/resources → resources}/counter-resource.tsx +8 -0
- package/template/src/simulations/albums-simulation.ts +5 -1
- package/template/src/simulations/carousel-simulation.ts +5 -1
- package/template/src/simulations/counter-simulation.ts +6 -1
- package/template/src/simulations/widget-config.ts +42 -0
- /package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js.map → chunk-DQAZDQU3.js.map} +0 -0
- /package/template/src/{components/resources → resources}/counter-resource.test.tsx +0 -0
- /package/template/src/{components/resources → resources}/index.ts +0 -0
|
@@ -9,7 +9,7 @@ export type OpenAiGlobals<ToolInput = UnknownObject, ToolOutput = UnknownObject,
|
|
|
9
9
|
theme: Theme;
|
|
10
10
|
userAgent: UserAgent;
|
|
11
11
|
locale: string;
|
|
12
|
-
maxHeight: number;
|
|
12
|
+
maxHeight: number | undefined;
|
|
13
13
|
displayMode: DisplayMode;
|
|
14
14
|
safeArea: SafeArea;
|
|
15
15
|
view: View | null;
|
|
@@ -12,7 +12,7 @@ export type WidgetGlobals<ToolInput = UnknownObject, ToolOutput = UnknownObject,
|
|
|
12
12
|
theme: Theme;
|
|
13
13
|
userAgent: UserAgent;
|
|
14
14
|
locale: string;
|
|
15
|
-
maxHeight: number;
|
|
15
|
+
maxHeight: number | undefined;
|
|
16
16
|
displayMode: DisplayMode;
|
|
17
17
|
safeArea: SafeArea;
|
|
18
18
|
view: View | null;
|
package/dist/style.css
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
--tw-translate-x: 0;
|
|
6
6
|
--tw-translate-y: 0;
|
|
7
7
|
--tw-translate-z: 0;
|
|
8
|
+
--tw-rotate-x: initial;
|
|
9
|
+
--tw-rotate-y: initial;
|
|
10
|
+
--tw-rotate-z: initial;
|
|
11
|
+
--tw-skew-x: initial;
|
|
12
|
+
--tw-skew-y: initial;
|
|
8
13
|
--tw-pan-x: initial;
|
|
9
14
|
--tw-pan-y: initial;
|
|
10
15
|
--tw-pinch-zoom: initial;
|
|
@@ -125,6 +130,7 @@
|
|
|
125
130
|
--tracking-tight: var(--font-tracking-tight);
|
|
126
131
|
--shadow-hairline: var(--shadow-hairline);
|
|
127
132
|
--color-white: var(--white);
|
|
133
|
+
--color-black: var(--black);
|
|
128
134
|
}
|
|
129
135
|
|
|
130
136
|
:root, :where([data-theme]) {
|
|
@@ -3072,7 +3078,11 @@
|
|
|
3072
3078
|
}
|
|
3073
3079
|
}
|
|
3074
3080
|
|
|
3075
|
-
@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
|
+
}
|
|
3076
3086
|
|
|
3077
3087
|
@layer utilities {
|
|
3078
3088
|
.pointer-events-auto {
|
|
@@ -3127,6 +3137,22 @@
|
|
|
3127
3137
|
inset-inline-start: calc(var(--spacing) * -2);
|
|
3128
3138
|
}
|
|
3129
3139
|
|
|
3140
|
+
.start-0 {
|
|
3141
|
+
inset-inline-start: calc(var(--spacing) * 0);
|
|
3142
|
+
}
|
|
3143
|
+
|
|
3144
|
+
.start-4 {
|
|
3145
|
+
inset-inline-start: calc(var(--spacing) * 4);
|
|
3146
|
+
}
|
|
3147
|
+
|
|
3148
|
+
.end-0 {
|
|
3149
|
+
inset-inline-end: calc(var(--spacing) * 0);
|
|
3150
|
+
}
|
|
3151
|
+
|
|
3152
|
+
.end-4 {
|
|
3153
|
+
inset-inline-end: calc(var(--spacing) * 4);
|
|
3154
|
+
}
|
|
3155
|
+
|
|
3130
3156
|
.-top-1\.5 {
|
|
3131
3157
|
top: calc(var(--spacing) * -1.5);
|
|
3132
3158
|
}
|
|
@@ -3139,8 +3165,12 @@
|
|
|
3139
3165
|
top: 50%;
|
|
3140
3166
|
}
|
|
3141
3167
|
|
|
3142
|
-
.top-
|
|
3143
|
-
top: calc(var(--spacing) *
|
|
3168
|
+
.top-12 {
|
|
3169
|
+
top: calc(var(--spacing) * 12);
|
|
3170
|
+
}
|
|
3171
|
+
|
|
3172
|
+
.top-18 {
|
|
3173
|
+
top: calc(var(--spacing) * 18);
|
|
3144
3174
|
}
|
|
3145
3175
|
|
|
3146
3176
|
.right-0 {
|
|
@@ -3159,10 +3189,6 @@
|
|
|
3159
3189
|
left: calc(var(--spacing) * 0);
|
|
3160
3190
|
}
|
|
3161
3191
|
|
|
3162
|
-
.left-1\/2 {
|
|
3163
|
-
left: 50%;
|
|
3164
|
-
}
|
|
3165
|
-
|
|
3166
3192
|
.left-2 {
|
|
3167
3193
|
left: calc(var(--spacing) * 2);
|
|
3168
3194
|
}
|
|
@@ -3175,6 +3201,10 @@
|
|
|
3175
3201
|
z-index: 20;
|
|
3176
3202
|
}
|
|
3177
3203
|
|
|
3204
|
+
.z-30 {
|
|
3205
|
+
z-index: 30;
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3178
3208
|
.z-40 {
|
|
3179
3209
|
z-index: 40;
|
|
3180
3210
|
}
|
|
@@ -3223,8 +3253,8 @@
|
|
|
3223
3253
|
}
|
|
3224
3254
|
}
|
|
3225
3255
|
|
|
3226
|
-
.
|
|
3227
|
-
margin:
|
|
3256
|
+
.mx-0 {
|
|
3257
|
+
margin-inline: calc(var(--spacing) * 0);
|
|
3228
3258
|
}
|
|
3229
3259
|
|
|
3230
3260
|
.mx-auto {
|
|
@@ -3319,6 +3349,10 @@
|
|
|
3319
3349
|
height: calc(var(--spacing) * 12);
|
|
3320
3350
|
}
|
|
3321
3351
|
|
|
3352
|
+
.h-\[3\.25rem\] {
|
|
3353
|
+
height: 3.25rem;
|
|
3354
|
+
}
|
|
3355
|
+
|
|
3322
3356
|
.h-auto {
|
|
3323
3357
|
height: auto;
|
|
3324
3358
|
}
|
|
@@ -3367,10 +3401,18 @@
|
|
|
3367
3401
|
width: calc(var(--spacing) * 56);
|
|
3368
3402
|
}
|
|
3369
3403
|
|
|
3404
|
+
.w-auto {
|
|
3405
|
+
width: auto;
|
|
3406
|
+
}
|
|
3407
|
+
|
|
3370
3408
|
.w-full {
|
|
3371
3409
|
width: 100%;
|
|
3372
3410
|
}
|
|
3373
3411
|
|
|
3412
|
+
.max-w-\[40rem\] {
|
|
3413
|
+
max-width: 40rem;
|
|
3414
|
+
}
|
|
3415
|
+
|
|
3374
3416
|
.max-w-\[48rem\] {
|
|
3375
3417
|
max-width: 48rem;
|
|
3376
3418
|
}
|
|
@@ -3379,10 +3421,6 @@
|
|
|
3379
3421
|
max-width: 70%;
|
|
3380
3422
|
}
|
|
3381
3423
|
|
|
3382
|
-
.max-w-\[calc\(100vw-2rem\)\] {
|
|
3383
|
-
max-width: calc(100vw - 2rem);
|
|
3384
|
-
}
|
|
3385
|
-
|
|
3386
3424
|
.max-w-full {
|
|
3387
3425
|
max-width: 100%;
|
|
3388
3426
|
}
|
|
@@ -3415,16 +3453,15 @@
|
|
|
3415
3453
|
flex-grow: 1;
|
|
3416
3454
|
}
|
|
3417
3455
|
|
|
3418
|
-
.-translate-x-1\/2 {
|
|
3419
|
-
--tw-translate-x: calc(calc(1 / 2 * 100%) * -1);
|
|
3420
|
-
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3421
|
-
}
|
|
3422
|
-
|
|
3423
3456
|
.-translate-y-1\/2 {
|
|
3424
3457
|
--tw-translate-y: calc(calc(1 / 2 * 100%) * -1);
|
|
3425
3458
|
translate: var(--tw-translate-x) var(--tw-translate-y);
|
|
3426
3459
|
}
|
|
3427
3460
|
|
|
3461
|
+
.transform {
|
|
3462
|
+
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
3463
|
+
}
|
|
3464
|
+
|
|
3428
3465
|
.cursor-pointer {
|
|
3429
3466
|
cursor: pointer;
|
|
3430
3467
|
}
|
|
@@ -3548,10 +3585,6 @@
|
|
|
3548
3585
|
overflow: visible;
|
|
3549
3586
|
}
|
|
3550
3587
|
|
|
3551
|
-
.overflow-x-auto {
|
|
3552
|
-
overflow-x: auto;
|
|
3553
|
-
}
|
|
3554
|
-
|
|
3555
3588
|
.overflow-x-hidden {
|
|
3556
3589
|
overflow-x: hidden;
|
|
3557
3590
|
}
|
|
@@ -3592,6 +3625,11 @@
|
|
|
3592
3625
|
border-radius: var(--radius-xl);
|
|
3593
3626
|
}
|
|
3594
3627
|
|
|
3628
|
+
.rounded-r-md {
|
|
3629
|
+
border-top-right-radius: var(--radius-md);
|
|
3630
|
+
border-bottom-right-radius: var(--radius-md);
|
|
3631
|
+
}
|
|
3632
|
+
|
|
3595
3633
|
.border {
|
|
3596
3634
|
border-style: var(--tw-border-style);
|
|
3597
3635
|
border-width: 1px;
|
|
@@ -3602,6 +3640,11 @@
|
|
|
3602
3640
|
border-width: 2px;
|
|
3603
3641
|
}
|
|
3604
3642
|
|
|
3643
|
+
.border-t {
|
|
3644
|
+
border-top-style: var(--tw-border-style);
|
|
3645
|
+
border-top-width: 1px;
|
|
3646
|
+
}
|
|
3647
|
+
|
|
3605
3648
|
.border-r {
|
|
3606
3649
|
border-right-style: var(--tw-border-style);
|
|
3607
3650
|
border-right-width: 1px;
|
|
@@ -3632,14 +3675,20 @@
|
|
|
3632
3675
|
background-color: #3a3a3a;
|
|
3633
3676
|
}
|
|
3634
3677
|
|
|
3635
|
-
.bg-\[var\(--color-background-primary\)\] {
|
|
3636
|
-
background-color: var(--color-background-primary);
|
|
3637
|
-
}
|
|
3638
|
-
|
|
3639
3678
|
.bg-\[var\(--color-background-primary-soft\)\] {
|
|
3640
3679
|
background-color: var(--color-background-primary-soft);
|
|
3641
3680
|
}
|
|
3642
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
|
+
|
|
3643
3692
|
.bg-sidebar {
|
|
3644
3693
|
background-color: var(--color-surface-secondary);
|
|
3645
3694
|
}
|
|
@@ -3652,6 +3701,10 @@
|
|
|
3652
3701
|
background-color: var(--color-surface-secondary);
|
|
3653
3702
|
}
|
|
3654
3703
|
|
|
3704
|
+
.bg-white {
|
|
3705
|
+
background-color: var(--color-white);
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3655
3708
|
.bg-gradient-to-l {
|
|
3656
3709
|
--tw-gradient-position: to left in oklab;
|
|
3657
3710
|
background-image: linear-gradient(var(--tw-gradient-stops));
|
|
@@ -3679,6 +3732,10 @@
|
|
|
3679
3732
|
padding: calc(var(--spacing) * 0);
|
|
3680
3733
|
}
|
|
3681
3734
|
|
|
3735
|
+
.p-1 {
|
|
3736
|
+
padding: calc(var(--spacing) * 1);
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3682
3739
|
.p-1\.5 {
|
|
3683
3740
|
padding: calc(var(--spacing) * 1.5);
|
|
3684
3741
|
}
|
|
@@ -3903,13 +3960,13 @@
|
|
|
3903
3960
|
opacity: .6;
|
|
3904
3961
|
}
|
|
3905
3962
|
|
|
3906
|
-
.shadow-\[
|
|
3907
|
-
--tw-shadow: 0px 0px 0px 1px var(--tw-shadow-color,
|
|
3963
|
+
.shadow-\[0px_0px_0px_1px_\#fff3\,0px_4px_12px_rgba\(0\,0\,0\,0\.12\)\] {
|
|
3964
|
+
--tw-shadow: 0px 0px 0px 1px var(--tw-shadow-color, #fff3), 0px 4px 12px var(--tw-shadow-color, #0000001f);
|
|
3908
3965
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3909
3966
|
}
|
|
3910
3967
|
|
|
3911
|
-
.shadow-\[
|
|
3912
|
-
--tw-shadow: 0px 0px 0px 1px var(--tw-shadow-color,
|
|
3968
|
+
.shadow-\[0px_0px_0px_1px_\#fff3\,0px_6px_20px_rgba\(0\,0\,0\,0\.1\)\] {
|
|
3969
|
+
--tw-shadow: 0px 0px 0px 1px var(--tw-shadow-color, #fff3), 0px 6px 20px var(--tw-shadow-color, #0000001a);
|
|
3913
3970
|
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
3914
3971
|
}
|
|
3915
3972
|
|
|
@@ -3998,28 +4055,99 @@
|
|
|
3998
4055
|
}
|
|
3999
4056
|
|
|
4000
4057
|
@media not all and (min-width: 768px) {
|
|
4001
|
-
.max-md\:
|
|
4002
|
-
|
|
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;
|
|
4093
|
+
}
|
|
4094
|
+
}
|
|
4095
|
+
|
|
4096
|
+
@media not all and (min-width: 576px) {
|
|
4097
|
+
.max-sm\:-mx-\[1rem\] {
|
|
4098
|
+
margin-inline: -1rem;
|
|
4099
|
+
}
|
|
4100
|
+
|
|
4101
|
+
.max-sm\:w-\[100cqw\] {
|
|
4102
|
+
width: 100cqw;
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
.max-sm\:overflow-hidden {
|
|
4106
|
+
overflow: hidden;
|
|
4003
4107
|
}
|
|
4004
4108
|
}
|
|
4005
4109
|
|
|
4006
4110
|
@media (min-width: 576px) {
|
|
4111
|
+
.sm\:start-0 {
|
|
4112
|
+
inset-inline-start: calc(var(--spacing) * 0);
|
|
4113
|
+
}
|
|
4114
|
+
|
|
4115
|
+
.sm\:end-0 {
|
|
4116
|
+
inset-inline-end: calc(var(--spacing) * 0);
|
|
4117
|
+
}
|
|
4118
|
+
|
|
4119
|
+
.sm\:top-\[3\.25rem\] {
|
|
4120
|
+
top: 3.25rem;
|
|
4121
|
+
}
|
|
4122
|
+
|
|
4123
|
+
.sm\:w-full {
|
|
4124
|
+
width: 100%;
|
|
4125
|
+
}
|
|
4126
|
+
|
|
4007
4127
|
.sm\:rounded-3xl {
|
|
4008
4128
|
border-radius: var(--radius-3xl);
|
|
4009
4129
|
}
|
|
4010
4130
|
}
|
|
4011
4131
|
|
|
4012
4132
|
@media (min-width: 768px) {
|
|
4013
|
-
.md\:
|
|
4014
|
-
|
|
4133
|
+
.md\:relative {
|
|
4134
|
+
position: relative;
|
|
4015
4135
|
}
|
|
4016
4136
|
|
|
4017
|
-
.md\:
|
|
4018
|
-
|
|
4137
|
+
.md\:z-auto {
|
|
4138
|
+
z-index: auto;
|
|
4019
4139
|
}
|
|
4020
4140
|
|
|
4021
|
-
.md
|
|
4022
|
-
|
|
4141
|
+
.md\:-mx-4 {
|
|
4142
|
+
margin-inline: calc(var(--spacing) * -4);
|
|
4143
|
+
}
|
|
4144
|
+
|
|
4145
|
+
.md\:hidden {
|
|
4146
|
+
display: none;
|
|
4147
|
+
}
|
|
4148
|
+
|
|
4149
|
+
.md\:p-10 {
|
|
4150
|
+
padding: calc(var(--spacing) * 10);
|
|
4023
4151
|
}
|
|
4024
4152
|
|
|
4025
4153
|
.md\:pt-8 {
|
|
@@ -4027,6 +4155,16 @@
|
|
|
4027
4155
|
}
|
|
4028
4156
|
}
|
|
4029
4157
|
|
|
4158
|
+
@media (min-width: 1024px) {
|
|
4159
|
+
.lg\:max-w-\[48rem\] {
|
|
4160
|
+
max-width: 48rem;
|
|
4161
|
+
}
|
|
4162
|
+
}
|
|
4163
|
+
|
|
4164
|
+
.dark\:bg-\[\#212121\]:where([data-theme="dark"], [data-theme="dark"] *) {
|
|
4165
|
+
background-color: #212121;
|
|
4166
|
+
}
|
|
4167
|
+
|
|
4030
4168
|
.dark\:bg-\[\#303030\]:where([data-theme="dark"], [data-theme="dark"] *) {
|
|
4031
4169
|
background-color: #303030;
|
|
4032
4170
|
}
|
|
@@ -4059,6 +4197,31 @@
|
|
|
4059
4197
|
initial-value: 0;
|
|
4060
4198
|
}
|
|
4061
4199
|
|
|
4200
|
+
@property --tw-rotate-x {
|
|
4201
|
+
syntax: "*";
|
|
4202
|
+
inherits: false
|
|
4203
|
+
}
|
|
4204
|
+
|
|
4205
|
+
@property --tw-rotate-y {
|
|
4206
|
+
syntax: "*";
|
|
4207
|
+
inherits: false
|
|
4208
|
+
}
|
|
4209
|
+
|
|
4210
|
+
@property --tw-rotate-z {
|
|
4211
|
+
syntax: "*";
|
|
4212
|
+
inherits: false
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
@property --tw-skew-x {
|
|
4216
|
+
syntax: "*";
|
|
4217
|
+
inherits: false
|
|
4218
|
+
}
|
|
4219
|
+
|
|
4220
|
+
@property --tw-skew-y {
|
|
4221
|
+
syntax: "*";
|
|
4222
|
+
inherits: false
|
|
4223
|
+
}
|
|
4224
|
+
|
|
4062
4225
|
@property --tw-pan-x {
|
|
4063
4226
|
syntax: "*";
|
|
4064
4227
|
inherits: false
|
package/package.json
CHANGED
|
@@ -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/
|
|
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/
|
|
28
|
+
`Make sure it's exported from src/resources/index.ts`
|
|
29
29
|
);
|
|
30
30
|
}
|
|
31
31
|
|
package/template/README.md
CHANGED
|
@@ -11,7 +11,7 @@ pnpm install
|
|
|
11
11
|
pnpm dev
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
That's it! Edit the resource files in [./src/
|
|
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/
|
|
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/
|
|
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
|
|