sunpeak 0.5.8 → 0.5.9
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 +12 -10
- package/bin/sunpeak.js +3 -3
- package/dist/chatgpt/theme-provider.d.ts +2 -2
- package/dist/index.cjs +5 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -14
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.cjs +80 -106
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +80 -106
- package/dist/mcp/index.js.map +1 -1
- package/package.json +2 -1
- package/template/README.md +1 -0
- package/template/dev/main.tsx +6 -10
- package/template/package.json +1 -0
- package/template/scripts/build-all.mjs +19 -10
- package/template/scripts/validate.mjs +6 -0
- package/template/src/components/album/album-card.test.tsx +62 -0
- package/template/src/components/album/album-card.tsx +14 -16
- package/template/src/components/album/albums.test.tsx +88 -0
- package/template/src/components/album/albums.tsx +50 -64
- package/template/src/components/album/film-strip.test.tsx +64 -0
- package/template/src/components/album/film-strip.tsx +16 -16
- package/template/src/components/album/fullscreen-viewer.test.tsx +77 -0
- package/template/src/components/album/fullscreen-viewer.tsx +45 -50
- package/template/src/components/card/card.test.tsx +1 -4
- package/template/src/components/card/card.tsx +38 -46
- package/template/src/components/carousel/carousel.tsx +57 -67
- package/template/src/components/resources/{AlbumsResource.tsx → albums-resource.tsx} +5 -5
- package/template/src/components/resources/{CarouselResource.tsx → carousel-resource.tsx} +18 -18
- package/template/src/components/resources/{CounterResource.tsx → counter-resource.tsx} +11 -31
- package/template/src/components/resources/index.ts +3 -3
- package/template/src/simulations/albums-simulation.ts +71 -71
- package/template/src/simulations/carousel-simulation.ts +34 -34
- package/template/src/simulations/counter-simulation.ts +2 -2
- package/template/vite.config.build.ts +2 -2
- package/template/vite.config.ts +1 -1
- package/template/vitest.config.ts +1 -1
- package/dist/runtime/index.d.ts +0 -7
- /package/dist/{runtime → providers}/provider-detection.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -218,15 +218,11 @@ function SidebarSelect({ value, onChange, options, placeholder }) {
|
|
|
218
218
|
break;
|
|
219
219
|
case "ArrowDown":
|
|
220
220
|
event.preventDefault();
|
|
221
|
-
setHighlightedIndex(
|
|
222
|
-
(prev) => prev < options.length - 1 ? prev + 1 : 0
|
|
223
|
-
);
|
|
221
|
+
setHighlightedIndex((prev) => prev < options.length - 1 ? prev + 1 : 0);
|
|
224
222
|
break;
|
|
225
223
|
case "ArrowUp":
|
|
226
224
|
event.preventDefault();
|
|
227
|
-
setHighlightedIndex(
|
|
228
|
-
(prev) => prev > 0 ? prev - 1 : options.length - 1
|
|
229
|
-
);
|
|
225
|
+
setHighlightedIndex((prev) => prev > 0 ? prev - 1 : options.length - 1);
|
|
230
226
|
break;
|
|
231
227
|
case "Enter":
|
|
232
228
|
event.preventDefault();
|
|
@@ -3366,9 +3362,7 @@ function matchMediaQuery(query) {
|
|
|
3366
3362
|
function createMediaQueryFn(query) {
|
|
3367
3363
|
return () => matchMediaQuery(query);
|
|
3368
3364
|
}
|
|
3369
|
-
const prefersReducedMotion = createMediaQueryFn(
|
|
3370
|
-
"(prefers-reduced-motion: reduce)"
|
|
3371
|
-
);
|
|
3365
|
+
const prefersReducedMotion = createMediaQueryFn("(prefers-reduced-motion: reduce)");
|
|
3372
3366
|
const isPrimarilyTouchDevice = createMediaQueryFn("(pointer: coarse)");
|
|
3373
3367
|
const isHoverAvailable = createMediaQueryFn("(hover: hover)");
|
|
3374
3368
|
const SCREEN_WIDTHS = {
|
|
@@ -3597,9 +3591,7 @@ function applyDocumentTheme(theme) {
|
|
|
3597
3591
|
htmlTag.setAttribute("data-theme", theme);
|
|
3598
3592
|
htmlTag.style.colorScheme = theme;
|
|
3599
3593
|
}
|
|
3600
|
-
const ThemeProviderContext = React.createContext(
|
|
3601
|
-
void 0
|
|
3602
|
-
);
|
|
3594
|
+
const ThemeProviderContext = React.createContext(void 0);
|
|
3603
3595
|
function ThemeProvider({
|
|
3604
3596
|
children,
|
|
3605
3597
|
defaultTheme = "light",
|
|
@@ -3624,8 +3616,7 @@ function ThemeProvider({
|
|
|
3624
3616
|
}
|
|
3625
3617
|
const useThemeContext = () => {
|
|
3626
3618
|
const context = React.useContext(ThemeProviderContext);
|
|
3627
|
-
if (context === void 0)
|
|
3628
|
-
throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
3619
|
+
if (context === void 0) throw new Error("useThemeContext must be used within a ThemeProvider");
|
|
3629
3620
|
return context;
|
|
3630
3621
|
};
|
|
3631
3622
|
const DEFAULT_THEME = "dark";
|