promptslide 0.2.6 → 0.3.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/CHANGELOG.md +50 -0
- package/README.md +54 -0
- package/dist/index.d.ts +1 -9
- package/dist/index.js +58 -87
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
- package/src/commands/add.mjs +32 -7
- package/src/commands/create.mjs +12 -1
- package/src/commands/org.mjs +1 -1
- package/src/commands/publish.mjs +21 -71
- package/src/commands/update.mjs +1 -1
- package/src/core/index.ts +0 -3
- package/templates/default/AGENTS.md +0 -1
- package/templates/default/src/layouts/shared-footer.tsx +52 -0
- package/templates/default/src/layouts/slide-layout-centered.tsx +2 -1
- package/src/core/layouts/shared-footer.tsx +0 -43
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.1](https://github.com/prompticeu/promptslide/compare/promptslide-v0.3.0...promptslide-v0.3.1) (2026-03-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **cli:** track promptslide version on publish and warn on add ([#58](https://github.com/prompticeu/promptslide/issues/58)) ([503e1f0](https://github.com/prompticeu/promptslide/commit/503e1f0bdac8066fb047b001c4b07c7ff6d87b23))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* hoist deckBaseSlug to fix ReferenceError in publish command ([#56](https://github.com/prompticeu/promptslide/issues/56)) ([dd29c36](https://github.com/prompticeu/promptslide/commit/dd29c36ecd862d2e52844933478cb8ef652c0c23))
|
|
14
|
+
* include CHANGELOG.md in published npm packages ([#53](https://github.com/prompticeu/promptslide/issues/53)) ([8a38a55](https://github.com/prompticeu/promptslide/commit/8a38a5533b0ea41593eba901551b0815e9da0515))
|
|
15
|
+
|
|
16
|
+
## [0.3.0](https://github.com/prompticeu/promptslide/compare/promptslide-v0.2.6...promptslide-v0.3.0) (2026-03-07)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### ⚠ BREAKING CHANGES
|
|
20
|
+
|
|
21
|
+
* move SlideFooter from core to user-land layouts ([#47](https://github.com/prompticeu/promptslide/issues/47))
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* add theme system and reusable slide layouts ([#8](https://github.com/prompticeu/promptslide/issues/8)) ([b107f35](https://github.com/prompticeu/promptslide/commit/b107f35bb9bcc4edf9b171f5947e5e1d0ad8eb2a))
|
|
26
|
+
* **cli:** add --yes flag for non-interactive project scaffolding ([#21](https://github.com/prompticeu/promptslide/issues/21)) ([88d233f](https://github.com/prompticeu/promptslide/commit/88d233fc6f8cc970e4a13f1876cb5a2f06dd13b9))
|
|
27
|
+
* **cli:** add lockfile integrity with file hashing and tracking ([4c6238a](https://github.com/prompticeu/promptslide/commit/4c6238ad6e0cee85e3b918b4a120450262fedb7b))
|
|
28
|
+
* **cli:** add org management, preview image generation, and registry improvements ([a5d36eb](https://github.com/prompticeu/promptslide/commit/a5d36eb8d6dc6098f8bba2746aae711da16461fa))
|
|
29
|
+
* **cli:** add registry commands with lockfile integrity and file hashing ([72ba46e](https://github.com/prompticeu/promptslide/commit/72ba46eff408a28132b6318c0f7b78e7b6b203fe))
|
|
30
|
+
* **cli:** add SlideEmbed and /embed route ([#44](https://github.com/prompticeu/promptslide/issues/44)) ([3014ff8](https://github.com/prompticeu/promptslide/commit/3014ff8fdae6b1bbf8807c00f8c7410a78eff529))
|
|
31
|
+
* merge promptslide-core into promptslide package ([9248ed2](https://github.com/prompticeu/promptslide/commit/9248ed21d4a9d075d9246dd4b2892aa21c41eb0a))
|
|
32
|
+
* move SlideFooter from core to user-land layouts ([#47](https://github.com/prompticeu/promptslide/issues/47)) ([8beae61](https://github.com/prompticeu/promptslide/commit/8beae615f299d3601eedf9faabba38ae7b3ccf81))
|
|
33
|
+
* persist publish slug and add promptslide pull ([#45](https://github.com/prompticeu/promptslide/issues/45)) ([c6b3781](https://github.com/prompticeu/promptslide/commit/c6b37810c272d0ee62223d0362e09d7bb1d37eac))
|
|
34
|
+
* **registry:** add registry cli funcs ([cb3cc2e](https://github.com/prompticeu/promptslide/commit/cb3cc2eca14d9bfe17c24050e066102f83ae093c))
|
|
35
|
+
* show URL after publishing deck or slides ([#46](https://github.com/prompticeu/promptslide/issues/46)) ([25d9791](https://github.com/prompticeu/promptslide/commit/25d97914bb0d666e36756b851cd05fd69fe98a14))
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* add Windows support for browser open in login command ([3ac57bc](https://github.com/prompticeu/promptslide/commit/3ac57bc375e841a2ef711c1f040f6230b6f2870d))
|
|
41
|
+
* address PR review feedback — arg parsing, import path, and lockfile bugs ([9087a7e](https://github.com/prompticeu/promptslide/commit/9087a7ec001bab05544f401673af0b043d49e90c))
|
|
42
|
+
* build promptslide package and add development exports ([#12](https://github.com/prompticeu/promptslide/issues/12)) ([2e60766](https://github.com/prompticeu/promptslide/commit/2e60766bb41f3a72775bae196d4d7e89bd08897a))
|
|
43
|
+
* CLI security hardening and bug fixes ([52fa1af](https://github.com/prompticeu/promptslide/commit/52fa1af3b4392cdfbd5d673e7a7a9d43ac2db26c))
|
|
44
|
+
* grid view and studio broken by stale file: paths ([#43](https://github.com/prompticeu/promptslide/issues/43)) ([3f5c548](https://github.com/prompticeu/promptslide/commit/3f5c54892e05c5a12e6c7b6f473745e0e7adc8f1))
|
|
45
|
+
* prevent directory argument from being filtered out in create command ([#40](https://github.com/prompticeu/promptslide/issues/40)) ([c1ff8f5](https://github.com/prompticeu/promptslide/commit/c1ff8f5779f0e1687b0064f107ab8d64c753c35f))
|
|
46
|
+
* remove leftover optional chaining on storedFiles in update command ([ed10b3f](https://github.com/prompticeu/promptslide/commit/ed10b3fae1e761deee9b4d046b1af1c93c89cf4a))
|
|
47
|
+
* replace PROJECT_NAME placeholder in theme.ts during scaffolding ([#14](https://github.com/prompticeu/promptslide/issues/14)) ([62f03db](https://github.com/prompticeu/promptslide/commit/62f03db7da286562b574c91f406b800f145edafd))
|
|
48
|
+
* resolve all linting errors in CLI commands ([#50](https://github.com/prompticeu/promptslide/issues/50)) ([8e2a5e8](https://github.com/prompticeu/promptslide/commit/8e2a5e810786cb704e8b42e294bf695ca0e2f9dc))
|
|
49
|
+
* update default registry to promptslide.eu ([#35](https://github.com/prompticeu/promptslide/issues/35)) ([910dd62](https://github.com/prompticeu/promptslide/commit/910dd623c0b17786fe3fc8f15b4b8c94c2be80b6))
|
|
50
|
+
* vertically center content in SlideLayoutCentered layout ([#42](https://github.com/prompticeu/promptslide/issues/42)) ([f53851e](https://github.com/prompticeu/promptslide/commit/f53851ec4cab60b697a186d01f01c8cc6bd7d781))
|
package/README.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# promptslide
|
|
2
|
+
|
|
3
|
+
Vibe-code beautiful slide decks using your favorite coding agent.
|
|
4
|
+
|
|
5
|
+
PromptSlide is a local-first slide framework built with React, Tailwind CSS, and Framer Motion. Open your coding agent (Claude Code, Cursor, Windsurf, etc.), describe the slides you want in natural language, and watch them appear in real-time via Vite's hot module replacement.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bun create slides my-deck
|
|
11
|
+
cd my-deck
|
|
12
|
+
bun install
|
|
13
|
+
bun run dev
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Then open your coding agent and say:
|
|
17
|
+
|
|
18
|
+
> "Create me a 10-slide deck about AgenticRAG"
|
|
19
|
+
|
|
20
|
+
## CLI Commands
|
|
21
|
+
|
|
22
|
+
All commands are run via `npx promptslide <command>` (or `bunx promptslide <command>`).
|
|
23
|
+
|
|
24
|
+
| Command | Description |
|
|
25
|
+
| --------- | ---------------------------------------- |
|
|
26
|
+
| `create` | Scaffold a new slide deck project |
|
|
27
|
+
| `studio` | Start the dev server with hot reload |
|
|
28
|
+
| `build` | Build the deck for production |
|
|
29
|
+
| `preview` | Preview the production build |
|
|
30
|
+
| `add` | Add a slide to the current deck |
|
|
31
|
+
| `remove` | Remove a slide from the current deck |
|
|
32
|
+
| `list` | List all slides in the current deck |
|
|
33
|
+
| `publish` | Publish the deck to PromptSlide registry |
|
|
34
|
+
| `search` | Search published decks |
|
|
35
|
+
| `pull` | Pull a published deck |
|
|
36
|
+
|
|
37
|
+
## How It Works
|
|
38
|
+
|
|
39
|
+
1. **You describe** what you want in natural language
|
|
40
|
+
2. **Your coding agent** uses the [promptslide Skill](https://github.com/prompticeu/promptslide/tree/main/skills/promptslide) to understand the framework
|
|
41
|
+
3. **Agent creates** `.tsx` slide files in `src/slides/`
|
|
42
|
+
4. **Vite hot-reloads** -- slides appear instantly in your browser
|
|
43
|
+
5. **Present** in fullscreen or export to PDF
|
|
44
|
+
|
|
45
|
+
> The Skill is installed automatically when you run `promptslide create`. To install it manually: `npx skills add prompticeu/promptslide`
|
|
46
|
+
|
|
47
|
+
## Links
|
|
48
|
+
|
|
49
|
+
- [GitHub](https://github.com/prompticeu/promptslide)
|
|
50
|
+
- [create-slides](https://www.npmjs.com/package/create-slides) -- scaffolding shortcut
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -338,14 +338,6 @@ interface SlideThemeProviderProps {
|
|
|
338
338
|
*/
|
|
339
339
|
declare function SlideThemeProvider({ theme, children }: SlideThemeProviderProps): react_jsx_runtime.JSX.Element;
|
|
340
340
|
|
|
341
|
-
interface SlideFooterProps {
|
|
342
|
-
slideNumber: number;
|
|
343
|
-
totalSlides: number;
|
|
344
|
-
/** Use light text/logo for dark slide backgrounds */
|
|
345
|
-
variant?: "default" | "light";
|
|
346
|
-
}
|
|
347
|
-
declare function SlideFooter({ slideNumber, totalSlides, variant }: SlideFooterProps): react_jsx_runtime.JSX.Element | null;
|
|
348
|
-
|
|
349
341
|
interface SlideRendererProps {
|
|
350
342
|
slides: SlideConfig[];
|
|
351
343
|
currentSlide: number;
|
|
@@ -412,4 +404,4 @@ declare class SlideErrorBoundary extends React$1.Component<SlideErrorBoundaryPro
|
|
|
412
404
|
|
|
413
405
|
declare function cn(...inputs: ClassValue[]): string;
|
|
414
406
|
|
|
415
|
-
export { Animated, AnimatedGroup, AnimationProvider, type AnimationType, DEFAULT_SLIDE_TRANSITION, EASE_DEFAULT, EASE_IN, EASE_MORPH, EASE_OUT, ELEMENT_SLIDE_DISTANCE, MORPH_DURATION, MORPH_TRANSITION, Morph, MorphGroup, MorphItem, MorphText, type NavigationDirection, SLIDE_DIMENSIONS, SLIDE_DISTANCE, SLIDE_TRANSITION, SLIDE_TRANSITION_DURATION, SLIDE_VARIANTS, SPRING_BOUNCY, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER_DELAY, STEP_ANIMATION_DURATION, STEP_TRANSITION, type SlideComponent, type SlideConfig, SlideDeck, SlideEmbed, SlideErrorBoundary,
|
|
407
|
+
export { Animated, AnimatedGroup, AnimationProvider, type AnimationType, DEFAULT_SLIDE_TRANSITION, EASE_DEFAULT, EASE_IN, EASE_MORPH, EASE_OUT, ELEMENT_SLIDE_DISTANCE, MORPH_DURATION, MORPH_TRANSITION, Morph, MorphGroup, MorphItem, MorphText, type NavigationDirection, SLIDE_DIMENSIONS, SLIDE_DISTANCE, SLIDE_TRANSITION, SLIDE_TRANSITION_DURATION, SLIDE_VARIANTS, SPRING_BOUNCY, SPRING_SMOOTH, SPRING_SNAPPY, STAGGER_DELAY, STEP_ANIMATION_DURATION, STEP_TRANSITION, type SlideComponent, type SlideConfig, SlideDeck, SlideEmbed, SlideErrorBoundary, type SlideProps, SlideRenderer, type SlideRendererProps, SlideThemeProvider, type SlideTransitionConfig, type SlideTransitionType, type ThemeConfig, type UseSlideNavigationOptions, type UseSlideNavigationReturn, cn, createDirectionalVariants, directionalSlideX, directionalSlideY, getSlideTransition, getSlideVariants, useAnimationContext, useSlideNavigation, useTheme };
|
package/dist/index.js
CHANGED
|
@@ -467,40 +467,12 @@ function SlideThemeProvider({ theme, children }) {
|
|
|
467
467
|
return /* @__PURE__ */ jsx4(ThemeContext.Provider, { value: theme, children: /* @__PURE__ */ jsx4("div", { style: cssOverrides, className: "contents", children }) });
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
// src/core/layouts/shared-footer.tsx
|
|
471
|
-
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
472
|
-
function SlideFooter({ slideNumber, totalSlides, variant = "default" }) {
|
|
473
|
-
const theme = useTheme();
|
|
474
|
-
if (!theme) return null;
|
|
475
|
-
const logoUrl = variant === "light" ? theme.logo?.fullLight ?? theme.logo?.full : theme.logo?.full;
|
|
476
|
-
const textClass = variant === "light" ? "text-white/70" : "text-muted-foreground";
|
|
477
|
-
const nameClass = variant === "light" ? "text-white font-semibold" : "text-foreground font-semibold";
|
|
478
|
-
return /* @__PURE__ */ jsxs("div", { className: `mt-4 flex shrink-0 items-center justify-between text-sm ${textClass}`, children: [
|
|
479
|
-
/* @__PURE__ */ jsxs("div", { className: `flex items-center gap-3 tracking-tight ${nameClass}`, children: [
|
|
480
|
-
logoUrl && /* @__PURE__ */ jsx5(
|
|
481
|
-
"img",
|
|
482
|
-
{
|
|
483
|
-
src: logoUrl,
|
|
484
|
-
alt: `${theme.name} Logo`,
|
|
485
|
-
className: "h-8 w-auto"
|
|
486
|
-
}
|
|
487
|
-
),
|
|
488
|
-
/* @__PURE__ */ jsx5("span", { className: "text-lg", children: theme.name })
|
|
489
|
-
] }),
|
|
490
|
-
/* @__PURE__ */ jsxs("div", { className: "font-mono", children: [
|
|
491
|
-
slideNumber,
|
|
492
|
-
" / ",
|
|
493
|
-
totalSlides
|
|
494
|
-
] })
|
|
495
|
-
] });
|
|
496
|
-
}
|
|
497
|
-
|
|
498
470
|
// src/core/slide-renderer.tsx
|
|
499
471
|
import { AnimatePresence, motion as motion3 } from "framer-motion";
|
|
500
472
|
|
|
501
473
|
// src/core/slide-error-boundary.tsx
|
|
502
474
|
import React from "react";
|
|
503
|
-
import { jsx as
|
|
475
|
+
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
504
476
|
var SlideErrorBoundary = class extends React.Component {
|
|
505
477
|
constructor() {
|
|
506
478
|
super(...arguments);
|
|
@@ -518,18 +490,18 @@ var SlideErrorBoundary = class extends React.Component {
|
|
|
518
490
|
}
|
|
519
491
|
render() {
|
|
520
492
|
if (this.state.hasError) {
|
|
521
|
-
return /* @__PURE__ */
|
|
522
|
-
/* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex h-full w-full flex-col items-center justify-center bg-red-950/20 p-12", children: [
|
|
494
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4 text-lg font-semibold text-red-400", children: [
|
|
523
495
|
"Slide ",
|
|
524
496
|
this.props.slideIndex + 1,
|
|
525
497
|
" Error",
|
|
526
|
-
this.props.slideTitle && /* @__PURE__ */
|
|
498
|
+
this.props.slideTitle && /* @__PURE__ */ jsxs("span", { className: "ml-2 font-normal text-red-400/70", children: [
|
|
527
499
|
"(",
|
|
528
500
|
this.props.slideTitle,
|
|
529
501
|
")"
|
|
530
502
|
] })
|
|
531
503
|
] }),
|
|
532
|
-
/* @__PURE__ */
|
|
504
|
+
/* @__PURE__ */ jsx5("div", { className: "max-w-2xl text-center font-mono text-sm break-words text-red-300/80", children: this.state.error?.message ?? "Unknown error" })
|
|
533
505
|
] });
|
|
534
506
|
}
|
|
535
507
|
return this.props.children;
|
|
@@ -537,7 +509,7 @@ var SlideErrorBoundary = class extends React.Component {
|
|
|
537
509
|
};
|
|
538
510
|
|
|
539
511
|
// src/core/slide-renderer.tsx
|
|
540
|
-
import { jsx as
|
|
512
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
541
513
|
function SlideRenderer({
|
|
542
514
|
slides,
|
|
543
515
|
currentSlide,
|
|
@@ -557,7 +529,7 @@ function SlideRenderer({
|
|
|
557
529
|
direction
|
|
558
530
|
);
|
|
559
531
|
const CurrentSlideComponent = slides[currentSlide].component;
|
|
560
|
-
return /* @__PURE__ */
|
|
532
|
+
return /* @__PURE__ */ jsx6(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx6(
|
|
561
533
|
motion3.div,
|
|
562
534
|
{
|
|
563
535
|
variants: slideVariants,
|
|
@@ -571,18 +543,18 @@ function SlideRenderer({
|
|
|
571
543
|
}
|
|
572
544
|
},
|
|
573
545
|
className: "absolute inset-0 h-full w-full",
|
|
574
|
-
children: /* @__PURE__ */
|
|
546
|
+
children: /* @__PURE__ */ jsx6(
|
|
575
547
|
AnimationProvider,
|
|
576
548
|
{
|
|
577
549
|
currentStep: animationStep,
|
|
578
550
|
totalSteps,
|
|
579
551
|
showAllAnimations,
|
|
580
|
-
children: /* @__PURE__ */
|
|
552
|
+
children: /* @__PURE__ */ jsx6(
|
|
581
553
|
SlideErrorBoundary,
|
|
582
554
|
{
|
|
583
555
|
slideIndex: currentSlide,
|
|
584
556
|
slideTitle: slides[currentSlide]?.title,
|
|
585
|
-
children: /* @__PURE__ */
|
|
557
|
+
children: /* @__PURE__ */ jsx6(
|
|
586
558
|
CurrentSlideComponent,
|
|
587
559
|
{
|
|
588
560
|
slideNumber: currentSlide + 1,
|
|
@@ -600,7 +572,7 @@ function SlideRenderer({
|
|
|
600
572
|
|
|
601
573
|
// src/core/slide-embed.tsx
|
|
602
574
|
import { useCallback as useCallback2, useEffect as useEffect2, useState as useState2 } from "react";
|
|
603
|
-
import { jsx as
|
|
575
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
604
576
|
function SlideEmbed({ slides, transition, directionalTransition }) {
|
|
605
577
|
const [scale, setScale] = useState2(1);
|
|
606
578
|
const {
|
|
@@ -664,7 +636,7 @@ function SlideEmbed({ slides, transition, directionalTransition }) {
|
|
|
664
636
|
window.addEventListener("resize", calculateScale);
|
|
665
637
|
return () => window.removeEventListener("resize", calculateScale);
|
|
666
638
|
}, []);
|
|
667
|
-
return /* @__PURE__ */
|
|
639
|
+
return /* @__PURE__ */ jsx7("div", { className: "flex h-screen w-screen items-center justify-center overflow-hidden bg-black", children: /* @__PURE__ */ jsx7(
|
|
668
640
|
"div",
|
|
669
641
|
{
|
|
670
642
|
className: "relative overflow-hidden bg-black",
|
|
@@ -674,7 +646,7 @@ function SlideEmbed({ slides, transition, directionalTransition }) {
|
|
|
674
646
|
transform: `scale(${scale})`,
|
|
675
647
|
transformOrigin: "center center"
|
|
676
648
|
},
|
|
677
|
-
children: /* @__PURE__ */
|
|
649
|
+
children: /* @__PURE__ */ jsx7(
|
|
678
650
|
SlideRenderer,
|
|
679
651
|
{
|
|
680
652
|
slides,
|
|
@@ -705,7 +677,7 @@ function cn(...inputs) {
|
|
|
705
677
|
}
|
|
706
678
|
|
|
707
679
|
// src/core/slide-deck.tsx
|
|
708
|
-
import { jsx as
|
|
680
|
+
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
709
681
|
function SlideExportView({ slides, slideIndex }) {
|
|
710
682
|
const [ready, setReady] = useState3(false);
|
|
711
683
|
const clampedIndex = Math.max(0, Math.min(slideIndex, slides.length - 1));
|
|
@@ -714,7 +686,7 @@ function SlideExportView({ slides, slideIndex }) {
|
|
|
714
686
|
useEffect3(() => {
|
|
715
687
|
setReady(true);
|
|
716
688
|
}, []);
|
|
717
|
-
return /* @__PURE__ */
|
|
689
|
+
return /* @__PURE__ */ jsx8(
|
|
718
690
|
"div",
|
|
719
691
|
{
|
|
720
692
|
"data-export-ready": ready ? "true" : void 0,
|
|
@@ -725,13 +697,13 @@ function SlideExportView({ slides, slideIndex }) {
|
|
|
725
697
|
position: "relative",
|
|
726
698
|
background: "black"
|
|
727
699
|
},
|
|
728
|
-
children: /* @__PURE__ */
|
|
700
|
+
children: /* @__PURE__ */ jsx8(
|
|
729
701
|
AnimationProvider,
|
|
730
702
|
{
|
|
731
703
|
currentStep: slideConfig.steps,
|
|
732
704
|
totalSteps: slideConfig.steps,
|
|
733
705
|
showAllAnimations: true,
|
|
734
|
-
children: /* @__PURE__ */
|
|
706
|
+
children: /* @__PURE__ */ jsx8(SlideErrorBoundary, { slideIndex: clampedIndex, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx8(SlideComponent, { slideNumber: clampedIndex + 1, totalSlides: slides.length }) })
|
|
735
707
|
}
|
|
736
708
|
)
|
|
737
709
|
}
|
|
@@ -745,7 +717,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
745
717
|
return { slideIndex: parseInt(params.get("slide") || "0", 10) };
|
|
746
718
|
});
|
|
747
719
|
if (exportParams) {
|
|
748
|
-
return /* @__PURE__ */
|
|
720
|
+
return /* @__PURE__ */ jsx8(SlideExportView, { slides, slideIndex: exportParams.slideIndex });
|
|
749
721
|
}
|
|
750
722
|
const [viewMode, setViewMode] = useState3("slide");
|
|
751
723
|
const [isPresentationMode, setIsPresentationMode] = useState3(false);
|
|
@@ -828,8 +800,8 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
828
800
|
window.addEventListener("keydown", handleKeyDown);
|
|
829
801
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
830
802
|
}, [advance, goBack, viewMode, togglePresentationMode]);
|
|
831
|
-
return /* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
803
|
+
return /* @__PURE__ */ jsxs2("div", { className: "min-h-screen w-full bg-neutral-950 text-foreground", children: [
|
|
804
|
+
/* @__PURE__ */ jsx8("style", { children: `
|
|
833
805
|
@media print {
|
|
834
806
|
@page {
|
|
835
807
|
size: 1920px 1080px;
|
|
@@ -850,7 +822,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
850
822
|
}
|
|
851
823
|
}
|
|
852
824
|
` }),
|
|
853
|
-
/* @__PURE__ */
|
|
825
|
+
/* @__PURE__ */ jsxs2(
|
|
854
826
|
"div",
|
|
855
827
|
{
|
|
856
828
|
className: cn(
|
|
@@ -858,7 +830,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
858
830
|
isPresentationMode && "hidden"
|
|
859
831
|
),
|
|
860
832
|
children: [
|
|
861
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ jsx8(
|
|
862
834
|
"button",
|
|
863
835
|
{
|
|
864
836
|
onClick: () => setViewMode("slide"),
|
|
@@ -867,10 +839,10 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
867
839
|
viewMode === "slide" && "bg-neutral-800 text-white"
|
|
868
840
|
),
|
|
869
841
|
title: "Presentation View",
|
|
870
|
-
children: /* @__PURE__ */
|
|
842
|
+
children: /* @__PURE__ */ jsx8(Monitor, { className: "h-4 w-4" })
|
|
871
843
|
}
|
|
872
844
|
),
|
|
873
|
-
/* @__PURE__ */
|
|
845
|
+
/* @__PURE__ */ jsx8(
|
|
874
846
|
"button",
|
|
875
847
|
{
|
|
876
848
|
onClick: () => setViewMode("list"),
|
|
@@ -879,10 +851,10 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
879
851
|
viewMode === "list" && "bg-neutral-800 text-white"
|
|
880
852
|
),
|
|
881
853
|
title: "List View",
|
|
882
|
-
children: /* @__PURE__ */
|
|
854
|
+
children: /* @__PURE__ */ jsx8(List, { className: "h-4 w-4" })
|
|
883
855
|
}
|
|
884
856
|
),
|
|
885
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ jsx8(
|
|
886
858
|
"button",
|
|
887
859
|
{
|
|
888
860
|
onClick: () => setViewMode("grid"),
|
|
@@ -891,32 +863,32 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
891
863
|
viewMode === "grid" && "bg-neutral-800 text-white"
|
|
892
864
|
),
|
|
893
865
|
title: "Grid View",
|
|
894
|
-
children: /* @__PURE__ */
|
|
866
|
+
children: /* @__PURE__ */ jsx8(Grid3X3, { className: "h-4 w-4" })
|
|
895
867
|
}
|
|
896
868
|
),
|
|
897
|
-
/* @__PURE__ */
|
|
898
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ jsx8("div", { className: "mx-1 w-px bg-neutral-800" }),
|
|
870
|
+
/* @__PURE__ */ jsx8(
|
|
899
871
|
"button",
|
|
900
872
|
{
|
|
901
873
|
onClick: handleExportPdf,
|
|
902
874
|
className: "rounded-md p-2 text-neutral-400 transition-colors hover:bg-neutral-800 hover:text-white",
|
|
903
875
|
title: "Download PDF",
|
|
904
|
-
children: /* @__PURE__ */
|
|
876
|
+
children: /* @__PURE__ */ jsx8(Download, { className: "h-4 w-4" })
|
|
905
877
|
}
|
|
906
878
|
),
|
|
907
|
-
/* @__PURE__ */
|
|
879
|
+
/* @__PURE__ */ jsx8(
|
|
908
880
|
"button",
|
|
909
881
|
{
|
|
910
882
|
onClick: togglePresentationMode,
|
|
911
883
|
className: "rounded-md p-2 text-neutral-400 transition-colors hover:bg-neutral-800 hover:text-white",
|
|
912
884
|
title: "Present (F)",
|
|
913
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ jsx8(Maximize, { className: "h-4 w-4" })
|
|
914
886
|
}
|
|
915
887
|
)
|
|
916
888
|
]
|
|
917
889
|
}
|
|
918
890
|
),
|
|
919
|
-
viewMode === "slide" && /* @__PURE__ */
|
|
891
|
+
viewMode === "slide" && /* @__PURE__ */ jsxs2(
|
|
920
892
|
"div",
|
|
921
893
|
{
|
|
922
894
|
ref: containerRef,
|
|
@@ -931,7 +903,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
931
903
|
if (e.key === "Enter" || e.key === " ") advance();
|
|
932
904
|
} : void 0,
|
|
933
905
|
children: [
|
|
934
|
-
/* @__PURE__ */
|
|
906
|
+
/* @__PURE__ */ jsx8(LayoutGroup, { id: "slide-deck", children: isPresentationMode ? /* @__PURE__ */ jsx8(
|
|
935
907
|
"div",
|
|
936
908
|
{
|
|
937
909
|
className: "pointer-events-none relative overflow-hidden bg-black",
|
|
@@ -941,7 +913,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
941
913
|
transform: `scale(${scale})`,
|
|
942
914
|
transformOrigin: "center center"
|
|
943
915
|
},
|
|
944
|
-
children: /* @__PURE__ */
|
|
916
|
+
children: /* @__PURE__ */ jsx8(
|
|
945
917
|
SlideRenderer,
|
|
946
918
|
{
|
|
947
919
|
slides,
|
|
@@ -956,7 +928,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
956
928
|
}
|
|
957
929
|
)
|
|
958
930
|
}
|
|
959
|
-
) : /* @__PURE__ */
|
|
931
|
+
) : /* @__PURE__ */ jsx8("div", { className: "relative aspect-video w-full max-w-7xl overflow-hidden rounded-xl border border-neutral-800 bg-black shadow-2xl", children: /* @__PURE__ */ jsx8(
|
|
960
932
|
SlideRenderer,
|
|
961
933
|
{
|
|
962
934
|
slides,
|
|
@@ -970,42 +942,42 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
970
942
|
onTransitionComplete
|
|
971
943
|
}
|
|
972
944
|
) }) }),
|
|
973
|
-
!isPresentationMode && /* @__PURE__ */
|
|
974
|
-
/* @__PURE__ */
|
|
945
|
+
!isPresentationMode && /* @__PURE__ */ jsxs2("div", { className: "mt-6 flex items-center gap-4", children: [
|
|
946
|
+
/* @__PURE__ */ jsx8(
|
|
975
947
|
"button",
|
|
976
948
|
{
|
|
977
949
|
onClick: goBack,
|
|
978
950
|
className: "rounded-full border border-neutral-800 bg-black/50 p-2 text-neutral-400 backdrop-blur-sm transition-colors hover:bg-neutral-900 hover:text-white",
|
|
979
|
-
children: /* @__PURE__ */
|
|
951
|
+
children: /* @__PURE__ */ jsx8(ChevronLeft, { className: "h-5 w-5" })
|
|
980
952
|
}
|
|
981
953
|
),
|
|
982
|
-
/* @__PURE__ */
|
|
983
|
-
/* @__PURE__ */
|
|
954
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex min-w-[4rem] flex-col items-center", children: [
|
|
955
|
+
/* @__PURE__ */ jsxs2("span", { className: "font-mono text-sm text-neutral-500", children: [
|
|
984
956
|
currentSlide + 1,
|
|
985
957
|
" / ",
|
|
986
958
|
slides.length
|
|
987
959
|
] }),
|
|
988
|
-
slides[currentSlide]?.title && /* @__PURE__ */
|
|
960
|
+
slides[currentSlide]?.title && /* @__PURE__ */ jsx8("span", { className: "mt-0.5 text-xs text-neutral-600", children: slides[currentSlide].title })
|
|
989
961
|
] }),
|
|
990
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ jsx8(
|
|
991
963
|
"button",
|
|
992
964
|
{
|
|
993
965
|
onClick: advance,
|
|
994
966
|
className: "rounded-full border border-neutral-800 bg-black/50 p-2 text-neutral-400 backdrop-blur-sm transition-colors hover:bg-neutral-900 hover:text-white",
|
|
995
|
-
children: /* @__PURE__ */
|
|
967
|
+
children: /* @__PURE__ */ jsx8(ChevronRight, { className: "h-5 w-5" })
|
|
996
968
|
}
|
|
997
969
|
)
|
|
998
970
|
] })
|
|
999
971
|
]
|
|
1000
972
|
}
|
|
1001
973
|
),
|
|
1002
|
-
viewMode === "grid" && /* @__PURE__ */
|
|
974
|
+
viewMode === "grid" && /* @__PURE__ */ jsx8("div", { className: "mx-auto max-w-7xl p-8 pt-16 print:hidden", children: /* @__PURE__ */ jsx8("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4", children: slides.map((slideConfig, index) => {
|
|
1003
975
|
const SlideComponent = slideConfig.component;
|
|
1004
976
|
const prevSection = index > 0 ? slides[index - 1]?.section : void 0;
|
|
1005
977
|
const showSectionHeader = slideConfig.section && slideConfig.section !== prevSection;
|
|
1006
|
-
return /* @__PURE__ */
|
|
1007
|
-
showSectionHeader && /* @__PURE__ */
|
|
1008
|
-
/* @__PURE__ */
|
|
978
|
+
return /* @__PURE__ */ jsxs2("div", { className: showSectionHeader ? "col-span-full" : void 0, children: [
|
|
979
|
+
showSectionHeader && /* @__PURE__ */ jsx8("h3", { className: "mt-4 mb-3 text-xs font-bold tracking-[0.2em] text-neutral-500 uppercase first:mt-0", children: slideConfig.section }),
|
|
980
|
+
/* @__PURE__ */ jsxs2(
|
|
1009
981
|
"button",
|
|
1010
982
|
{
|
|
1011
983
|
onClick: () => {
|
|
@@ -1014,30 +986,30 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
1014
986
|
},
|
|
1015
987
|
className: "group relative aspect-video w-full overflow-hidden rounded-lg border border-neutral-800 bg-black shadow-sm transition-all hover:border-primary hover:shadow-lg hover:shadow-primary/10",
|
|
1016
988
|
children: [
|
|
1017
|
-
/* @__PURE__ */
|
|
989
|
+
/* @__PURE__ */ jsx8(
|
|
1018
990
|
"div",
|
|
1019
991
|
{
|
|
1020
992
|
className: "h-full w-full origin-top-left scale-[0.25]",
|
|
1021
993
|
style: { width: "400%", height: "400%" },
|
|
1022
|
-
children: /* @__PURE__ */
|
|
994
|
+
children: /* @__PURE__ */ jsx8(
|
|
1023
995
|
AnimationProvider,
|
|
1024
996
|
{
|
|
1025
997
|
currentStep: slideConfig.steps,
|
|
1026
998
|
totalSteps: slideConfig.steps,
|
|
1027
999
|
showAllAnimations: true,
|
|
1028
|
-
children: /* @__PURE__ */
|
|
1000
|
+
children: /* @__PURE__ */ jsx8(SlideErrorBoundary, { slideIndex: index, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx8(SlideComponent, { slideNumber: index + 1, totalSlides: slides.length }) })
|
|
1029
1001
|
}
|
|
1030
1002
|
)
|
|
1031
1003
|
}
|
|
1032
1004
|
),
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
1005
|
+
/* @__PURE__ */ jsx8("div", { className: "absolute inset-0 bg-black/0 transition-colors group-hover:bg-black/20" }),
|
|
1006
|
+
/* @__PURE__ */ jsx8("div", { className: "absolute bottom-2 left-2 rounded bg-black/70 px-2 py-1 text-xs font-medium text-white", children: slideConfig.title ? `${index + 1}. ${slideConfig.title}` : index + 1 })
|
|
1035
1007
|
]
|
|
1036
1008
|
}
|
|
1037
1009
|
)
|
|
1038
1010
|
] }, index);
|
|
1039
1011
|
}) }) }),
|
|
1040
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ jsx8(
|
|
1041
1013
|
"div",
|
|
1042
1014
|
{
|
|
1043
1015
|
className: cn(
|
|
@@ -1045,19 +1017,19 @@ function SlideDeck({ slides, transition, directionalTransition }) {
|
|
|
1045
1017
|
"print:m-0 print:block print:max-w-none print:p-0",
|
|
1046
1018
|
viewMode === "list" ? "block" : "hidden print:block"
|
|
1047
1019
|
),
|
|
1048
|
-
children: /* @__PURE__ */
|
|
1020
|
+
children: /* @__PURE__ */ jsx8("div", { className: "grid grid-cols-1 gap-8 print:block", children: slides.map((slideConfig, index) => {
|
|
1049
1021
|
const SlideComponent = slideConfig.component;
|
|
1050
|
-
return /* @__PURE__ */
|
|
1022
|
+
return /* @__PURE__ */ jsx8(
|
|
1051
1023
|
"div",
|
|
1052
1024
|
{
|
|
1053
1025
|
className: "aspect-video w-full overflow-hidden rounded-xl border border-neutral-800 bg-black shadow-sm print:relative print:m-0 print:h-[1080px] print:w-[1920px] print:break-after-page print:overflow-hidden print:rounded-none print:border-0 print:shadow-none",
|
|
1054
|
-
children: /* @__PURE__ */
|
|
1026
|
+
children: /* @__PURE__ */ jsx8("div", { className: "h-full w-full print:h-[720px] print:w-[1280px] print:origin-top-left print:scale-[1.5]", children: /* @__PURE__ */ jsx8(
|
|
1055
1027
|
AnimationProvider,
|
|
1056
1028
|
{
|
|
1057
1029
|
currentStep: slideConfig.steps,
|
|
1058
1030
|
totalSteps: slideConfig.steps,
|
|
1059
1031
|
showAllAnimations: true,
|
|
1060
|
-
children: /* @__PURE__ */
|
|
1032
|
+
children: /* @__PURE__ */ jsx8(SlideErrorBoundary, { slideIndex: index, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx8(SlideComponent, { slideNumber: index + 1, totalSlides: slides.length }) })
|
|
1061
1033
|
}
|
|
1062
1034
|
) })
|
|
1063
1035
|
},
|
|
@@ -1098,7 +1070,6 @@ export {
|
|
|
1098
1070
|
SlideDeck,
|
|
1099
1071
|
SlideEmbed,
|
|
1100
1072
|
SlideErrorBoundary,
|
|
1101
|
-
SlideFooter,
|
|
1102
1073
|
SlideRenderer,
|
|
1103
1074
|
SlideThemeProvider,
|
|
1104
1075
|
cn,
|