sunpeak 0.8.6 → 0.9.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/bin/commands/build.mjs +3 -3
- package/bin/commands/pull.mjs +2 -2
- package/bin/sunpeak.js +8 -6
- package/dist/chatgpt/chatgpt-simulator.d.ts +1 -2
- package/dist/chatgpt/index.cjs +9 -0
- package/dist/chatgpt/index.cjs.map +1 -0
- package/dist/chatgpt/index.d.ts +3 -1
- package/dist/chatgpt/index.js +9 -0
- package/dist/chatgpt/index.js.map +1 -0
- package/dist/chatgpt/simulator-url.d.ts +127 -0
- package/dist/index.cjs +39 -8448
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +58 -8466
- package/dist/index.js.map +1 -1
- package/dist/mcp/entry.cjs +2 -1
- package/dist/mcp/entry.cjs.map +1 -1
- package/dist/mcp/entry.js +2 -1
- package/dist/mcp/entry.js.map +1 -1
- package/dist/mcp/index.cjs +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/types.d.ts +3 -9
- package/dist/{server-DVmTC-SF.js → server-310A1k9o.js} +2 -2
- package/dist/{server-DVmTC-SF.js.map → server-310A1k9o.js.map} +1 -1
- package/dist/{server-B9YgCQdS.cjs → server-CSybLAYo.cjs} +2 -2
- package/dist/{server-B9YgCQdS.cjs.map → server-CSybLAYo.cjs.map} +1 -1
- package/dist/simulator-url-CG8lAAC3.cjs +8545 -0
- package/dist/simulator-url-CG8lAAC3.cjs.map +1 -0
- package/dist/simulator-url-CexnaL-e.js +8529 -0
- package/dist/simulator-url-CexnaL-e.js.map +1 -0
- package/dist/style.css +5872 -5894
- package/dist/types/simulation.d.ts +6 -32
- package/package.json +7 -3
- package/template/.sunpeak/dev.tsx +8 -7
- package/template/README.md +5 -5
- package/template/dist/albums.js +1 -1
- package/template/dist/albums.json +1 -1
- package/template/dist/carousel.js +1 -1
- package/template/dist/carousel.json +1 -1
- package/template/dist/map.js +1 -1
- package/template/dist/map.json +1 -1
- package/template/dist/review.js +2 -2
- package/template/dist/review.json +1 -1
- package/template/node_modules/.bin/playwright +21 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Button.js +3 -3
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_SegmentedControl.js +4 -4
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +20 -20
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +38 -38
- package/template/node_modules/.vite/deps/{chunk-SPYXUHEY.js → chunk-N6DVYEXK.js} +8 -8
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/package.json +3 -1
- package/template/playwright.config.ts +26 -0
- package/template/src/resources/index.ts +4 -4
- package/template/src/resources/map-resource.test.tsx +95 -0
- package/template/src/resources/review-resource.test.tsx +538 -0
- package/template/src/resources/review-resource.tsx +6 -1
- package/template/src/simulations/albums-show-simulation.json +1 -1
- package/template/src/simulations/carousel-show-simulation.json +1 -1
- package/template/src/simulations/map-show-simulation.json +1 -1
- package/template/src/simulations/review-diff-simulation.json +1 -1
- package/template/src/simulations/review-post-simulation.json +1 -1
- package/template/src/simulations/review-purchase-simulation.json +1 -1
- package/template/test-results/.last-run.json +4 -0
- package/template/tests/e2e/albums.spec.ts +120 -0
- package/template/tests/e2e/carousel.spec.ts +127 -0
- package/template/tests/e2e/map.spec.ts +188 -0
- package/template/tests/e2e/review.spec.ts +245 -0
- package/template/vitest.config.ts +1 -0
- package/template/dist/counter.js +0 -49
- package/template/dist/counter.json +0 -15
- package/template/src/resources/counter-resource.json +0 -12
- package/template/src/resources/counter-resource.test.tsx +0 -116
- package/template/src/resources/counter-resource.tsx +0 -101
- package/template/src/simulations/counter-show-simulation.json +0 -20
- /package/template/node_modules/.vite/deps/{chunk-SPYXUHEY.js.map → chunk-N6DVYEXK.js.map} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*|*MINGW*|*MSYS*)
|
|
6
|
+
if command -v cygpath > /dev/null 2>&1; then
|
|
7
|
+
basedir=`cygpath -w "$basedir"`
|
|
8
|
+
fi
|
|
9
|
+
;;
|
|
10
|
+
esac
|
|
11
|
+
|
|
12
|
+
if [ -z "$NODE_PATH" ]; then
|
|
13
|
+
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@playwright+test@1.57.0/node_modules/@playwright/test/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@playwright+test@1.57.0/node_modules/@playwright/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@playwright+test@1.57.0/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules"
|
|
14
|
+
else
|
|
15
|
+
export NODE_PATH="/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@playwright+test@1.57.0/node_modules/@playwright/test/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@playwright+test@1.57.0/node_modules/@playwright/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/@playwright+test@1.57.0/node_modules:/home/runner/work/sunpeak/sunpeak/node_modules/.pnpm/node_modules:$NODE_PATH"
|
|
16
|
+
fi
|
|
17
|
+
if [ -x "$basedir/node" ]; then
|
|
18
|
+
exec "$basedir/node" "$basedir/../@playwright/test/cli.js" "$@"
|
|
19
|
+
else
|
|
20
|
+
exec node "$basedir/../@playwright/test/cli.js" "$@"
|
|
21
|
+
fi
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
Button,
|
|
3
3
|
ButtonLink,
|
|
4
4
|
CopyButton
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-UM3ZGDFR.js";
|
|
5
|
+
} from "./chunk-N6DVYEXK.js";
|
|
7
6
|
import "./chunk-JAGHY6H6.js";
|
|
8
|
-
import "./chunk-DYQDWJMS.js";
|
|
9
7
|
import "./chunk-QPJAV452.js";
|
|
8
|
+
import "./chunk-DYQDWJMS.js";
|
|
10
9
|
import "./chunk-EGRHWZRV.js";
|
|
11
10
|
import "./chunk-CNYJBM5F.js";
|
|
11
|
+
import "./chunk-UM3ZGDFR.js";
|
|
12
12
|
import "./chunk-JGVISENQ.js";
|
|
13
13
|
import "./chunk-BUOVMFCD.js";
|
|
14
14
|
import "./chunk-ILHRZGIS.js";
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
dist_exports4 as dist_exports
|
|
3
|
-
} from "./chunk-TSEQUROC.js";
|
|
4
|
-
import "./chunk-XZTIOEPG.js";
|
|
5
1
|
import {
|
|
6
2
|
useResizeObserver
|
|
7
3
|
} from "./chunk-JAGHY6H6.js";
|
|
@@ -10,6 +6,10 @@ import {
|
|
|
10
6
|
waitForAnimationFrame
|
|
11
7
|
} from "./chunk-DYQDWJMS.js";
|
|
12
8
|
import "./chunk-EGRHWZRV.js";
|
|
9
|
+
import {
|
|
10
|
+
dist_exports4 as dist_exports
|
|
11
|
+
} from "./chunk-TSEQUROC.js";
|
|
12
|
+
import "./chunk-XZTIOEPG.js";
|
|
13
13
|
import {
|
|
14
14
|
clsx_default
|
|
15
15
|
} from "./chunk-CNYJBM5F.js";
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
dist_exports5 as dist_exports3
|
|
5
|
-
} from "./chunk-TSEQUROC.js";
|
|
6
|
-
import "./chunk-XZTIOEPG.js";
|
|
2
|
+
Input
|
|
3
|
+
} from "./chunk-2DZGWGIP.js";
|
|
7
4
|
import {
|
|
8
5
|
Button,
|
|
9
6
|
LoadingIndicator,
|
|
10
7
|
TransitionGroup
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import {
|
|
13
|
-
Check_default,
|
|
14
|
-
ChevronDownVector_default,
|
|
15
|
-
DropdownVector_default,
|
|
16
|
-
Info_default,
|
|
17
|
-
Search_default,
|
|
18
|
-
X_default
|
|
19
|
-
} from "./chunk-UM3ZGDFR.js";
|
|
8
|
+
} from "./chunk-N6DVYEXK.js";
|
|
20
9
|
import {
|
|
21
10
|
useTimeout
|
|
22
11
|
} from "./chunk-JAGHY6H6.js";
|
|
12
|
+
import {
|
|
13
|
+
o
|
|
14
|
+
} from "./chunk-QPJAV452.js";
|
|
23
15
|
import {
|
|
24
16
|
handlePressableMouseEnter,
|
|
25
17
|
preventDefaultHandler,
|
|
26
18
|
toCssVariables,
|
|
27
19
|
waitForAnimationFrame
|
|
28
20
|
} from "./chunk-DYQDWJMS.js";
|
|
29
|
-
import {
|
|
30
|
-
Input
|
|
31
|
-
} from "./chunk-2DZGWGIP.js";
|
|
32
|
-
import {
|
|
33
|
-
o
|
|
34
|
-
} from "./chunk-QPJAV452.js";
|
|
35
21
|
import "./chunk-EGRHWZRV.js";
|
|
22
|
+
import {
|
|
23
|
+
dist_exports,
|
|
24
|
+
dist_exports3 as dist_exports2,
|
|
25
|
+
dist_exports5 as dist_exports3
|
|
26
|
+
} from "./chunk-TSEQUROC.js";
|
|
27
|
+
import "./chunk-XZTIOEPG.js";
|
|
36
28
|
import {
|
|
37
29
|
clsx_default
|
|
38
30
|
} from "./chunk-CNYJBM5F.js";
|
|
31
|
+
import {
|
|
32
|
+
Check_default,
|
|
33
|
+
ChevronDownVector_default,
|
|
34
|
+
DropdownVector_default,
|
|
35
|
+
Info_default,
|
|
36
|
+
Search_default,
|
|
37
|
+
X_default
|
|
38
|
+
} from "./chunk-UM3ZGDFR.js";
|
|
39
39
|
import {
|
|
40
40
|
require_jsx_runtime
|
|
41
41
|
} from "./chunk-JGVISENQ.js";
|
|
@@ -1,155 +1,155 @@
|
|
|
1
1
|
{
|
|
2
|
-
"hash": "
|
|
2
|
+
"hash": "b74c9763",
|
|
3
3
|
"configHash": "f56e5903",
|
|
4
|
-
"lockfileHash": "
|
|
5
|
-
"browserHash": "
|
|
4
|
+
"lockfileHash": "8ed69ad2",
|
|
5
|
+
"browserHash": "238bb651",
|
|
6
6
|
"optimized": {
|
|
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": "
|
|
10
|
+
"fileHash": "8a2b29af",
|
|
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": "
|
|
16
|
+
"fileHash": "02e92ec7",
|
|
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": "
|
|
22
|
+
"fileHash": "5af9d5c8",
|
|
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": "
|
|
28
|
+
"fileHash": "f58e269f",
|
|
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": "
|
|
34
|
+
"fileHash": "0be1731c",
|
|
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": "
|
|
40
|
+
"fileHash": "0794a7a4",
|
|
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": "
|
|
46
|
+
"fileHash": "e9409941",
|
|
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": "
|
|
52
|
+
"fileHash": "33cf5a6a",
|
|
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": "
|
|
58
|
+
"fileHash": "6442a396",
|
|
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": "
|
|
64
|
+
"fileHash": "a4bb0813",
|
|
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": "
|
|
70
|
+
"fileHash": "b9f54262",
|
|
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": "
|
|
76
|
+
"fileHash": "bdab6c1c",
|
|
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": "
|
|
82
|
+
"fileHash": "78560b8d",
|
|
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": "7c6c6e97",
|
|
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": "
|
|
94
|
+
"fileHash": "a791d56c",
|
|
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": "456a567a",
|
|
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": "f1176d3b",
|
|
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": "
|
|
112
|
+
"fileHash": "e3385a5d",
|
|
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": "8c12c67d",
|
|
119
119
|
"needsInterop": false
|
|
120
120
|
}
|
|
121
121
|
},
|
|
122
122
|
"chunks": {
|
|
123
|
-
"chunk-
|
|
124
|
-
"file": "chunk-
|
|
125
|
-
},
|
|
126
|
-
"chunk-XZTIOEPG": {
|
|
127
|
-
"file": "chunk-XZTIOEPG.js"
|
|
128
|
-
},
|
|
129
|
-
"chunk-SPYXUHEY": {
|
|
130
|
-
"file": "chunk-SPYXUHEY.js"
|
|
123
|
+
"chunk-2DZGWGIP": {
|
|
124
|
+
"file": "chunk-2DZGWGIP.js"
|
|
131
125
|
},
|
|
132
|
-
"chunk-
|
|
133
|
-
"file": "chunk-
|
|
126
|
+
"chunk-N6DVYEXK": {
|
|
127
|
+
"file": "chunk-N6DVYEXK.js"
|
|
134
128
|
},
|
|
135
129
|
"chunk-JAGHY6H6": {
|
|
136
130
|
"file": "chunk-JAGHY6H6.js"
|
|
137
131
|
},
|
|
138
|
-
"chunk-DYQDWJMS": {
|
|
139
|
-
"file": "chunk-DYQDWJMS.js"
|
|
140
|
-
},
|
|
141
|
-
"chunk-2DZGWGIP": {
|
|
142
|
-
"file": "chunk-2DZGWGIP.js"
|
|
143
|
-
},
|
|
144
132
|
"chunk-QPJAV452": {
|
|
145
133
|
"file": "chunk-QPJAV452.js"
|
|
146
134
|
},
|
|
135
|
+
"chunk-DYQDWJMS": {
|
|
136
|
+
"file": "chunk-DYQDWJMS.js"
|
|
137
|
+
},
|
|
147
138
|
"chunk-EGRHWZRV": {
|
|
148
139
|
"file": "chunk-EGRHWZRV.js"
|
|
149
140
|
},
|
|
141
|
+
"chunk-TSEQUROC": {
|
|
142
|
+
"file": "chunk-TSEQUROC.js"
|
|
143
|
+
},
|
|
144
|
+
"chunk-XZTIOEPG": {
|
|
145
|
+
"file": "chunk-XZTIOEPG.js"
|
|
146
|
+
},
|
|
150
147
|
"chunk-CNYJBM5F": {
|
|
151
148
|
"file": "chunk-CNYJBM5F.js"
|
|
152
149
|
},
|
|
150
|
+
"chunk-UM3ZGDFR": {
|
|
151
|
+
"file": "chunk-UM3ZGDFR.js"
|
|
152
|
+
},
|
|
153
153
|
"chunk-JGVISENQ": {
|
|
154
154
|
"file": "chunk-JGVISENQ.js"
|
|
155
155
|
},
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Check_default,
|
|
3
|
-
Copy_default
|
|
4
|
-
} from "./chunk-UM3ZGDFR.js";
|
|
5
1
|
import {
|
|
6
2
|
useTimeout
|
|
7
3
|
} from "./chunk-JAGHY6H6.js";
|
|
4
|
+
import {
|
|
5
|
+
o
|
|
6
|
+
} from "./chunk-QPJAV452.js";
|
|
8
7
|
import {
|
|
9
8
|
handlePressableMouseEnter,
|
|
10
9
|
isDev,
|
|
@@ -16,12 +15,13 @@ import {
|
|
|
16
15
|
toTransformProperty,
|
|
17
16
|
waitForAnimationFrame
|
|
18
17
|
} from "./chunk-DYQDWJMS.js";
|
|
19
|
-
import {
|
|
20
|
-
o
|
|
21
|
-
} from "./chunk-QPJAV452.js";
|
|
22
18
|
import {
|
|
23
19
|
clsx_default
|
|
24
20
|
} from "./chunk-CNYJBM5F.js";
|
|
21
|
+
import {
|
|
22
|
+
Check_default,
|
|
23
|
+
Copy_default
|
|
24
|
+
} from "./chunk-UM3ZGDFR.js";
|
|
25
25
|
import {
|
|
26
26
|
require_jsx_runtime
|
|
27
27
|
} from "./chunk-JGVISENQ.js";
|
|
@@ -625,4 +625,4 @@ export {
|
|
|
625
625
|
ButtonLink,
|
|
626
626
|
CopyButton
|
|
627
627
|
};
|
|
628
|
-
//# sourceMappingURL=chunk-
|
|
628
|
+
//# sourceMappingURL=chunk-N6DVYEXK.js.map
|
package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"4.0.16","results":[[":src/resources/carousel-resource.test.tsx",{"duration":
|
|
1
|
+
{"version":"4.0.16","results":[[":src/resources/carousel-resource.test.tsx",{"duration":240.22361,"failed":false}],[":src/components/album/albums.test.tsx",{"duration":345.88829199999986,"failed":false}],[":src/resources/review-resource.test.tsx",{"duration":536.905929,"failed":false}],[":src/components/map/map-view.test.tsx",{"duration":56.95467699999995,"failed":false}],[":src/components/map/place-inspector.test.tsx",{"duration":419.31927799999994,"failed":false}],[":src/components/album/fullscreen-viewer.test.tsx",{"duration":230.5613269999999,"failed":false}],[":src/components/map/place-list.test.tsx",{"duration":137.19635000000017,"failed":false}],[":src/components/map/place-card.test.tsx",{"duration":369.79792799999996,"failed":false}],[":src/components/map/place-carousel.test.tsx",{"duration":451.7971869999999,"failed":false}],[":src/components/album/album-carousel.test.tsx",{"duration":108.27363300000002,"failed":false}],[":src/components/carousel/carousel.test.tsx",{"duration":88.2940570000003,"failed":false}],[":src/resources/map-resource.test.tsx",{"duration":267.9864110000001,"failed":false}],[":src/resources/albums-resource.test.tsx",{"duration":247.26545199999987,"failed":false}],[":src/components/album/album-card.test.tsx",{"duration":302.4231849999999,"failed":false}],[":src/components/album/film-strip.test.tsx",{"duration":447.1110639999997,"failed":false}],[":src/components/carousel/card.test.tsx",{"duration":79.15203599999995,"failed":false}]]}
|
package/template/package.json
CHANGED
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
"dev": "sunpeak dev",
|
|
8
8
|
"build": "sunpeak build",
|
|
9
9
|
"mcp": "sunpeak mcp",
|
|
10
|
-
"test": "vitest run"
|
|
10
|
+
"test": "vitest run",
|
|
11
|
+
"test:e2e": "playwright test"
|
|
11
12
|
},
|
|
12
13
|
"dependencies": {
|
|
13
14
|
"@openai/apps-sdk-ui": "^0.2.1",
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
"tailwind-merge": "^3.4.0"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
23
|
+
"@playwright/test": "^1.57.0",
|
|
22
24
|
"@tailwindcss/vite": "^4.1.18",
|
|
23
25
|
"@testing-library/jest-dom": "^6.9.1",
|
|
24
26
|
"@testing-library/react": "^16.3.1",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineConfig, devices } from '@playwright/test';
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
testDir: './tests/e2e',
|
|
5
|
+
fullyParallel: true,
|
|
6
|
+
forbidOnly: !!process.env.CI,
|
|
7
|
+
retries: process.env.CI ? 2 : 0,
|
|
8
|
+
workers: process.env.CI ? 1 : undefined,
|
|
9
|
+
reporter: 'list',
|
|
10
|
+
use: {
|
|
11
|
+
baseURL: 'http://localhost:6776',
|
|
12
|
+
trace: 'on-first-retry',
|
|
13
|
+
},
|
|
14
|
+
projects: [
|
|
15
|
+
{
|
|
16
|
+
name: 'chromium',
|
|
17
|
+
use: { ...devices['Desktop Chrome'] },
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
webServer: {
|
|
21
|
+
command: 'PORT=6776 pnpm dev',
|
|
22
|
+
url: 'http://localhost:6776',
|
|
23
|
+
reuseExistingServer: !process.env.CI,
|
|
24
|
+
timeout: 10000,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Auto-discovers and re-exports all resource components.
|
|
3
3
|
*
|
|
4
4
|
* Discovers all *-resource.tsx files and exports their component
|
|
5
|
-
* with a PascalCase name (e.g.,
|
|
5
|
+
* with a PascalCase name (e.g., review-resource.tsx -> ReviewResource).
|
|
6
6
|
*
|
|
7
7
|
* Supports both export styles:
|
|
8
8
|
* - Default export: export default MyComponent
|
|
9
|
-
* - Named export: export const
|
|
9
|
+
* - Named export: export const ReviewResource = ...
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
// Auto-discover all resource component files
|
|
@@ -16,12 +16,12 @@ const resourceModules = import.meta.glob('./*-resource.tsx', { eager: true });
|
|
|
16
16
|
const resources: Record<string, React.ComponentType> = {};
|
|
17
17
|
|
|
18
18
|
for (const [path, module] of Object.entries(resourceModules)) {
|
|
19
|
-
// Extract key from path: './
|
|
19
|
+
// Extract key from path: './review-resource.tsx' -> 'review'
|
|
20
20
|
const match = path.match(/\.\/(.+)-resource\.tsx$/);
|
|
21
21
|
const key = match?.[1];
|
|
22
22
|
if (!key) continue;
|
|
23
23
|
|
|
24
|
-
// Convert to PascalCase and append 'Resource': '
|
|
24
|
+
// Convert to PascalCase and append 'Resource': 'review' -> 'ReviewResource'
|
|
25
25
|
const pascalKey = key.charAt(0).toUpperCase() + key.slice(1);
|
|
26
26
|
const exportName = `${pascalKey}Resource`;
|
|
27
27
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { render } from '@testing-library/react';
|
|
2
|
+
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
3
|
+
import { MapResource } from './map-resource';
|
|
4
|
+
|
|
5
|
+
// Mock sunpeak hooks
|
|
6
|
+
let mockSafeArea: { insets: { top: number; bottom: number; left: number; right: number } } | null =
|
|
7
|
+
{
|
|
8
|
+
insets: { top: 0, bottom: 0, left: 0, right: 0 },
|
|
9
|
+
};
|
|
10
|
+
let mockMaxHeight: number | null = 600;
|
|
11
|
+
|
|
12
|
+
vi.mock('sunpeak', () => ({
|
|
13
|
+
useSafeArea: () => mockSafeArea,
|
|
14
|
+
useMaxHeight: () => mockMaxHeight,
|
|
15
|
+
}));
|
|
16
|
+
|
|
17
|
+
// Mock the Map component
|
|
18
|
+
vi.mock('../components/map/map', () => ({
|
|
19
|
+
Map: () => <div data-testid="map">Map Component</div>,
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
describe('MapResource', () => {
|
|
23
|
+
beforeEach(() => {
|
|
24
|
+
vi.clearAllMocks();
|
|
25
|
+
mockSafeArea = { insets: { top: 0, bottom: 0, left: 0, right: 0 } };
|
|
26
|
+
mockMaxHeight = 600;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
it('renders the Map component', () => {
|
|
30
|
+
const { getByTestId } = render(<MapResource />);
|
|
31
|
+
|
|
32
|
+
expect(getByTestId('map')).toBeInTheDocument();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('respects safe area insets', () => {
|
|
36
|
+
mockSafeArea = { insets: { top: 20, bottom: 30, left: 10, right: 15 } };
|
|
37
|
+
|
|
38
|
+
const { container } = render(<MapResource />);
|
|
39
|
+
const mainDiv = container.firstChild as HTMLElement;
|
|
40
|
+
|
|
41
|
+
expect(mainDiv).toHaveStyle({
|
|
42
|
+
paddingTop: '20px',
|
|
43
|
+
paddingBottom: '30px',
|
|
44
|
+
paddingLeft: '10px',
|
|
45
|
+
paddingRight: '15px',
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('respects maxHeight constraint', () => {
|
|
50
|
+
mockMaxHeight = 400;
|
|
51
|
+
|
|
52
|
+
const { container } = render(<MapResource />);
|
|
53
|
+
const mainDiv = container.firstChild as HTMLElement;
|
|
54
|
+
|
|
55
|
+
expect(mainDiv).toHaveStyle({
|
|
56
|
+
maxHeight: '400px',
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('handles null safe area', () => {
|
|
61
|
+
mockSafeArea = null;
|
|
62
|
+
|
|
63
|
+
const { container } = render(<MapResource />);
|
|
64
|
+
const mainDiv = container.firstChild as HTMLElement;
|
|
65
|
+
|
|
66
|
+
expect(mainDiv).toHaveStyle({
|
|
67
|
+
paddingTop: '0px',
|
|
68
|
+
paddingBottom: '0px',
|
|
69
|
+
paddingLeft: '0px',
|
|
70
|
+
paddingRight: '0px',
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it('handles null maxHeight', () => {
|
|
75
|
+
mockMaxHeight = null;
|
|
76
|
+
|
|
77
|
+
const { container } = render(<MapResource />);
|
|
78
|
+
const mainDiv = container.firstChild as HTMLElement;
|
|
79
|
+
|
|
80
|
+
// maxHeight should not be set when null
|
|
81
|
+
expect(mainDiv.style.maxHeight).toBe('');
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
it('forwards ref to the container div', () => {
|
|
85
|
+
const ref = vi.fn();
|
|
86
|
+
render(<MapResource ref={ref} />);
|
|
87
|
+
|
|
88
|
+
expect(ref).toHaveBeenCalled();
|
|
89
|
+
expect(ref.mock.calls[0][0]).toBeInstanceOf(HTMLDivElement);
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('has the correct displayName', () => {
|
|
93
|
+
expect(MapResource.displayName).toBe('MapResource');
|
|
94
|
+
});
|
|
95
|
+
});
|