sunpeak 0.6.4 → 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 +8 -4
- package/dist/style.css +440 -0
- package/package.json +1 -1
- package/template/dist/chatgpt/albums.js +1 -1
- package/template/dist/chatgpt/carousel.js +1 -1
- package/template/dist/chatgpt/counter.js +1 -1
- package/template/dist/chatgpt/map.js +3034 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Avatar.js +97 -0
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Avatar.js.map +7 -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 +1 -1
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Select.js +11 -11
- package/template/node_modules/.vite/deps/@openai_apps-sdk-ui_components_Textarea.js +3 -3
- package/template/node_modules/.vite/deps/_metadata.json +46 -34
- package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js → chunk-LR7NKCX5.js} +7 -7
- package/template/node_modules/.vite/deps/mapbox-gl.js +32835 -0
- package/template/node_modules/.vite/deps/mapbox-gl.js.map +7 -0
- package/template/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -1
- package/template/package.json +1 -0
- package/template/src/components/index.ts +1 -0
- package/template/src/components/map/index.ts +6 -0
- package/template/src/components/map/map-view.tsx +212 -0
- package/template/src/components/map/map.tsx +145 -0
- package/template/src/components/map/place-card.tsx +55 -0
- package/template/src/components/map/place-carousel.tsx +45 -0
- package/template/src/components/map/place-inspector.tsx +132 -0
- package/template/src/components/map/place-list.tsx +90 -0
- package/template/src/resources/index.ts +1 -0
- package/template/src/resources/map-resource.tsx +32 -0
- package/template/src/simulations/index.ts +2 -0
- package/template/src/simulations/map-simulation.ts +177 -0
- /package/template/node_modules/.vite/deps/{chunk-EVJ3DVH5.js.map → chunk-LR7NKCX5.js.map} +0 -0
package/bin/sunpeak.js
CHANGED
|
@@ -28,7 +28,7 @@ function checkPackageJson() {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
function parseResourcesInput(input) {
|
|
31
|
-
const VALID_RESOURCES = ['albums', 'carousel', 'counter'];
|
|
31
|
+
const VALID_RESOURCES = ['albums', 'carousel', 'counter', 'map'];
|
|
32
32
|
|
|
33
33
|
// If no input, return all resources
|
|
34
34
|
if (!input || input.trim() === '') {
|
|
@@ -60,6 +60,7 @@ function updateIndexFiles(targetDir, selectedResources) {
|
|
|
60
60
|
albums: { component: 'album', resourceClass: 'AlbumsResource', simulation: 'albums' },
|
|
61
61
|
carousel: { component: 'carousel', resourceClass: 'CarouselResource', simulation: 'carousel' },
|
|
62
62
|
counter: { component: null, resourceClass: 'CounterResource', simulation: 'counter' },
|
|
63
|
+
map: { component: 'map', resourceClass: 'MapResource', simulation: 'map' },
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
// Update components/index.ts
|
|
@@ -120,7 +121,9 @@ async function init(projectName, resourcesArg) {
|
|
|
120
121
|
resourcesInput = resourcesArg;
|
|
121
122
|
console.log(`☀️ 🏔️ Resources: ${resourcesArg}`);
|
|
122
123
|
} else {
|
|
123
|
-
resourcesInput = await prompt(
|
|
124
|
+
resourcesInput = await prompt(
|
|
125
|
+
'☀️ 🏔️ Resources (UIs) to include [albums, carousel, counter, map]: '
|
|
126
|
+
);
|
|
124
127
|
}
|
|
125
128
|
const selectedResources = parseResourcesInput(resourcesInput);
|
|
126
129
|
|
|
@@ -142,6 +145,7 @@ async function init(projectName, resourcesArg) {
|
|
|
142
145
|
albums: 'album',
|
|
143
146
|
carousel: 'carousel',
|
|
144
147
|
counter: null, // Counter doesn't have a component directory
|
|
148
|
+
map: 'map',
|
|
145
149
|
};
|
|
146
150
|
|
|
147
151
|
cpSync(templateDir, targetDir, {
|
|
@@ -155,7 +159,7 @@ async function init(projectName, resourcesArg) {
|
|
|
155
159
|
}
|
|
156
160
|
|
|
157
161
|
// Filter resource files based on selection
|
|
158
|
-
const VALID_RESOURCES = ['albums', 'carousel', 'counter'];
|
|
162
|
+
const VALID_RESOURCES = ['albums', 'carousel', 'counter', 'map'];
|
|
159
163
|
const excludedResources = VALID_RESOURCES.filter((r) => !selectedResources.includes(r));
|
|
160
164
|
|
|
161
165
|
for (const resource of excludedResources) {
|
|
@@ -272,7 +276,7 @@ Usage:
|
|
|
272
276
|
npx sunpeak new [name] [resources] Create a new project (no install needed)
|
|
273
277
|
pnpm dlx sunpeak new Alternative with pnpm
|
|
274
278
|
|
|
275
|
-
Resources: albums, carousel, counter (comma/space separated
|
|
279
|
+
Resources: albums, carousel, counter, map (comma/space separated)
|
|
276
280
|
Example: npx sunpeak new my-app "albums,carousel"
|
|
277
281
|
|
|
278
282
|
Inside your project, use npm scripts:
|