promptslide 0.2.4 → 0.2.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/dist/index.d.ts CHANGED
@@ -346,6 +346,44 @@ interface SlideFooterProps {
346
346
  }
347
347
  declare function SlideFooter({ slideNumber, totalSlides, variant }: SlideFooterProps): react_jsx_runtime.JSX.Element | null;
348
348
 
349
+ interface SlideRendererProps {
350
+ slides: SlideConfig[];
351
+ currentSlide: number;
352
+ animationStep: number;
353
+ totalSteps: number;
354
+ direction: NavigationDirection;
355
+ showAllAnimations: boolean;
356
+ transition?: SlideTransitionType;
357
+ directionalTransition?: boolean;
358
+ onTransitionComplete: () => void;
359
+ }
360
+ /**
361
+ * Renders a single slide with animated transitions.
362
+ * Extracted from SlideDeck so it can be reused in SlideEmbed and other contexts.
363
+ */
364
+ declare function SlideRenderer({ slides, currentSlide, animationStep, totalSteps, direction, showAllAnimations, transition, directionalTransition, onTransitionComplete }: SlideRendererProps): react_jsx_runtime.JSX.Element;
365
+
366
+ interface SlideEmbedProps {
367
+ slides: SlideConfig[];
368
+ transition?: SlideTransitionType;
369
+ directionalTransition?: boolean;
370
+ }
371
+ /**
372
+ * Headless slide viewer controlled via window.postMessage.
373
+ * Designed for embedding in an iframe (e.g. the registry editor preview).
374
+ *
375
+ * Inbound messages (parent → embed):
376
+ * { type: "navigate", data: { slide: number } }
377
+ * { type: "advance" }
378
+ * { type: "goBack" }
379
+ *
380
+ * Outbound messages (embed → parent):
381
+ * { type: "slideReady" }
382
+ * { type: "slideState", data: { currentSlide, totalSlides, animationStep, totalSteps, titles } }
383
+ * { type: "hmrUpdate" }
384
+ */
385
+ declare function SlideEmbed({ slides, transition, directionalTransition }: SlideEmbedProps): react_jsx_runtime.JSX.Element;
386
+
349
387
  interface SlideDeckProps {
350
388
  slides: SlideConfig[];
351
389
  transition?: SlideTransitionType;
@@ -374,4 +412,4 @@ declare class SlideErrorBoundary extends React$1.Component<SlideErrorBoundaryPro
374
412
 
375
413
  declare function cn(...inputs: ClassValue[]): string;
376
414
 
377
- 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, SlideErrorBoundary, SlideFooter, type SlideProps, SlideThemeProvider, type SlideTransitionConfig, type SlideTransitionType, type ThemeConfig, type UseSlideNavigationOptions, type UseSlideNavigationReturn, cn, createDirectionalVariants, directionalSlideX, directionalSlideY, getSlideTransition, getSlideVariants, useAnimationContext, useSlideNavigation, useTheme };
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, SlideFooter, 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
@@ -495,10 +495,8 @@ function SlideFooter({ slideNumber, totalSlides, variant = "default" }) {
495
495
  ] });
496
496
  }
497
497
 
498
- // src/core/slide-deck.tsx
499
- import { AnimatePresence, LayoutGroup, motion as motion3 } from "framer-motion";
500
- import { ChevronLeft, ChevronRight, Download, Grid3X3, List, Maximize, Monitor } from "lucide-react";
501
- import { useCallback as useCallback2, useEffect as useEffect2, useRef, useState as useState2 } from "react";
498
+ // src/core/slide-renderer.tsx
499
+ import { AnimatePresence, motion as motion3 } from "framer-motion";
502
500
 
503
501
  // src/core/slide-error-boundary.tsx
504
502
  import React from "react";
@@ -538,6 +536,167 @@ var SlideErrorBoundary = class extends React.Component {
538
536
  }
539
537
  };
540
538
 
539
+ // src/core/slide-renderer.tsx
540
+ import { jsx as jsx7 } from "react/jsx-runtime";
541
+ function SlideRenderer({
542
+ slides,
543
+ currentSlide,
544
+ animationStep,
545
+ totalSteps,
546
+ direction,
547
+ showAllAnimations,
548
+ transition,
549
+ directionalTransition,
550
+ onTransitionComplete
551
+ }) {
552
+ const currentSlideTransition = slides[currentSlide]?.transition;
553
+ const transitionType = currentSlideTransition ?? transition ?? DEFAULT_SLIDE_TRANSITION;
554
+ const isDirectional = directionalTransition ?? false;
555
+ const slideVariants = getSlideVariants(
556
+ { type: transitionType, directional: isDirectional },
557
+ direction
558
+ );
559
+ const CurrentSlideComponent = slides[currentSlide].component;
560
+ return /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx7(
561
+ motion3.div,
562
+ {
563
+ variants: slideVariants,
564
+ initial: "enter",
565
+ animate: "center",
566
+ exit: "exit",
567
+ transition: SLIDE_TRANSITION,
568
+ onAnimationComplete: (definition) => {
569
+ if (definition === "center") {
570
+ onTransitionComplete();
571
+ }
572
+ },
573
+ className: "absolute inset-0 h-full w-full",
574
+ children: /* @__PURE__ */ jsx7(
575
+ AnimationProvider,
576
+ {
577
+ currentStep: animationStep,
578
+ totalSteps,
579
+ showAllAnimations,
580
+ children: /* @__PURE__ */ jsx7(
581
+ SlideErrorBoundary,
582
+ {
583
+ slideIndex: currentSlide,
584
+ slideTitle: slides[currentSlide]?.title,
585
+ children: /* @__PURE__ */ jsx7(
586
+ CurrentSlideComponent,
587
+ {
588
+ slideNumber: currentSlide + 1,
589
+ totalSlides: slides.length
590
+ }
591
+ )
592
+ }
593
+ )
594
+ }
595
+ )
596
+ },
597
+ currentSlide
598
+ ) });
599
+ }
600
+
601
+ // src/core/slide-embed.tsx
602
+ import { useCallback as useCallback2, useEffect as useEffect2, useState as useState2 } from "react";
603
+ import { jsx as jsx8 } from "react/jsx-runtime";
604
+ function SlideEmbed({ slides, transition, directionalTransition }) {
605
+ const [scale, setScale] = useState2(1);
606
+ const {
607
+ currentSlide,
608
+ animationStep,
609
+ totalSteps,
610
+ direction,
611
+ showAllAnimations,
612
+ advance,
613
+ goBack,
614
+ goToSlide,
615
+ onTransitionComplete
616
+ } = useSlideNavigation({ slides });
617
+ useEffect2(() => {
618
+ const state = {
619
+ currentSlide,
620
+ totalSlides: slides.length,
621
+ animationStep,
622
+ totalSteps,
623
+ titles: slides.map((s) => s.title || "")
624
+ };
625
+ window.parent.postMessage({ type: "slideState", data: state }, "*");
626
+ }, [currentSlide, animationStep, totalSteps, slides]);
627
+ useEffect2(() => {
628
+ window.parent.postMessage({ type: "slideReady" }, "*");
629
+ }, []);
630
+ useEffect2(() => {
631
+ const hot = import.meta.hot;
632
+ if (hot) {
633
+ hot.on("vite:afterUpdate", () => {
634
+ window.parent.postMessage({ type: "hmrUpdate" }, "*");
635
+ });
636
+ }
637
+ }, []);
638
+ const handleMessage = useCallback2(
639
+ (event) => {
640
+ const { type, data } = event.data || {};
641
+ switch (type) {
642
+ case "navigate":
643
+ if (typeof data?.slide === "number") goToSlide(data.slide);
644
+ break;
645
+ case "advance":
646
+ advance();
647
+ break;
648
+ case "goBack":
649
+ goBack();
650
+ break;
651
+ }
652
+ },
653
+ [advance, goBack, goToSlide]
654
+ );
655
+ useEffect2(() => {
656
+ window.addEventListener("message", handleMessage);
657
+ return () => window.removeEventListener("message", handleMessage);
658
+ }, [handleMessage]);
659
+ useEffect2(() => {
660
+ const calculateScale = () => {
661
+ setScale(window.innerWidth / SLIDE_DIMENSIONS.width);
662
+ };
663
+ calculateScale();
664
+ window.addEventListener("resize", calculateScale);
665
+ return () => window.removeEventListener("resize", calculateScale);
666
+ }, []);
667
+ return /* @__PURE__ */ jsx8("div", { className: "flex h-screen w-screen items-center justify-center overflow-hidden bg-black", children: /* @__PURE__ */ jsx8(
668
+ "div",
669
+ {
670
+ className: "relative overflow-hidden bg-black",
671
+ style: {
672
+ width: SLIDE_DIMENSIONS.width,
673
+ height: SLIDE_DIMENSIONS.height,
674
+ transform: `scale(${scale})`,
675
+ transformOrigin: "center center"
676
+ },
677
+ children: /* @__PURE__ */ jsx8(
678
+ SlideRenderer,
679
+ {
680
+ slides,
681
+ currentSlide,
682
+ animationStep,
683
+ totalSteps,
684
+ direction,
685
+ showAllAnimations,
686
+ transition,
687
+ directionalTransition,
688
+ onTransitionComplete
689
+ }
690
+ )
691
+ }
692
+ ) });
693
+ }
694
+
695
+ // src/core/slide-deck.tsx
696
+ import { LayoutGroup } from "framer-motion";
697
+ import { ChevronLeft, ChevronRight, Download, Grid3X3, List, Maximize, Monitor } from "lucide-react";
698
+ import { useCallback as useCallback3, useEffect as useEffect3, useRef, useState as useState3 } from "react";
699
+
541
700
  // src/core/utils.ts
542
701
  import { clsx } from "clsx";
543
702
  import { twMerge } from "tailwind-merge";
@@ -546,16 +705,16 @@ function cn(...inputs) {
546
705
  }
547
706
 
548
707
  // src/core/slide-deck.tsx
549
- import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
708
+ import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
550
709
  function SlideExportView({ slides, slideIndex }) {
551
- const [ready, setReady] = useState2(false);
710
+ const [ready, setReady] = useState3(false);
552
711
  const clampedIndex = Math.max(0, Math.min(slideIndex, slides.length - 1));
553
712
  const slideConfig = slides[clampedIndex];
554
713
  const SlideComponent = slideConfig.component;
555
- useEffect2(() => {
714
+ useEffect3(() => {
556
715
  setReady(true);
557
716
  }, []);
558
- return /* @__PURE__ */ jsx7(
717
+ return /* @__PURE__ */ jsx9(
559
718
  "div",
560
719
  {
561
720
  "data-export-ready": ready ? "true" : void 0,
@@ -566,31 +725,31 @@ function SlideExportView({ slides, slideIndex }) {
566
725
  position: "relative",
567
726
  background: "black"
568
727
  },
569
- children: /* @__PURE__ */ jsx7(
728
+ children: /* @__PURE__ */ jsx9(
570
729
  AnimationProvider,
571
730
  {
572
731
  currentStep: slideConfig.steps,
573
732
  totalSteps: slideConfig.steps,
574
733
  showAllAnimations: true,
575
- children: /* @__PURE__ */ jsx7(SlideErrorBoundary, { slideIndex: clampedIndex, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx7(SlideComponent, { slideNumber: clampedIndex + 1, totalSlides: slides.length }) })
734
+ children: /* @__PURE__ */ jsx9(SlideErrorBoundary, { slideIndex: clampedIndex, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx9(SlideComponent, { slideNumber: clampedIndex + 1, totalSlides: slides.length }) })
576
735
  }
577
736
  )
578
737
  }
579
738
  );
580
739
  }
581
740
  function SlideDeck({ slides, transition, directionalTransition }) {
582
- const [exportParams] = useState2(() => {
741
+ const [exportParams] = useState3(() => {
583
742
  if (typeof window === "undefined") return null;
584
743
  const params = new URLSearchParams(window.location.search);
585
744
  if (params.get("export") !== "true") return null;
586
745
  return { slideIndex: parseInt(params.get("slide") || "0", 10) };
587
746
  });
588
747
  if (exportParams) {
589
- return /* @__PURE__ */ jsx7(SlideExportView, { slides, slideIndex: exportParams.slideIndex });
748
+ return /* @__PURE__ */ jsx9(SlideExportView, { slides, slideIndex: exportParams.slideIndex });
590
749
  }
591
- const [viewMode, setViewMode] = useState2("slide");
592
- const [isPresentationMode, setIsPresentationMode] = useState2(false);
593
- const [scale, setScale] = useState2(1);
750
+ const [viewMode, setViewMode] = useState3("slide");
751
+ const [isPresentationMode, setIsPresentationMode] = useState3(false);
752
+ const [scale, setScale] = useState3(1);
594
753
  const containerRef = useRef(null);
595
754
  const {
596
755
  currentSlide,
@@ -605,21 +764,21 @@ function SlideDeck({ slides, transition, directionalTransition }) {
605
764
  } = useSlideNavigation({
606
765
  slides
607
766
  });
608
- const togglePresentationMode = useCallback2(async () => {
767
+ const togglePresentationMode = useCallback3(async () => {
609
768
  if (!document.fullscreenElement) {
610
769
  await document.documentElement.requestFullscreen();
611
770
  } else {
612
771
  await document.exitFullscreen();
613
772
  }
614
773
  }, []);
615
- useEffect2(() => {
774
+ useEffect3(() => {
616
775
  const handleFullscreenChange = () => {
617
776
  setIsPresentationMode(!!document.fullscreenElement);
618
777
  };
619
778
  document.addEventListener("fullscreenchange", handleFullscreenChange);
620
779
  return () => document.removeEventListener("fullscreenchange", handleFullscreenChange);
621
780
  }, []);
622
- useEffect2(() => {
781
+ useEffect3(() => {
623
782
  const calculateScale = () => {
624
783
  if (!isPresentationMode) {
625
784
  setScale(1);
@@ -647,7 +806,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
647
806
  window.print();
648
807
  }, 100);
649
808
  };
650
- useEffect2(() => {
809
+ useEffect3(() => {
651
810
  const handleKeyDown = (e) => {
652
811
  if (e.key === "f" || e.key === "F") {
653
812
  togglePresentationMode();
@@ -669,16 +828,8 @@ function SlideDeck({ slides, transition, directionalTransition }) {
669
828
  window.addEventListener("keydown", handleKeyDown);
670
829
  return () => window.removeEventListener("keydown", handleKeyDown);
671
830
  }, [advance, goBack, viewMode, togglePresentationMode]);
672
- const currentSlideTransition = slides[currentSlide]?.transition;
673
- const transitionType = currentSlideTransition ?? transition ?? DEFAULT_SLIDE_TRANSITION;
674
- const isDirectional = directionalTransition ?? false;
675
- const slideVariants = getSlideVariants(
676
- { type: transitionType, directional: isDirectional },
677
- direction
678
- );
679
- const CurrentSlideComponent = slides[currentSlide].component;
680
831
  return /* @__PURE__ */ jsxs3("div", { className: "min-h-screen w-full bg-neutral-950 text-foreground", children: [
681
- /* @__PURE__ */ jsx7("style", { children: `
832
+ /* @__PURE__ */ jsx9("style", { children: `
682
833
  @media print {
683
834
  @page {
684
835
  size: 1920px 1080px;
@@ -707,7 +858,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
707
858
  isPresentationMode && "hidden"
708
859
  ),
709
860
  children: [
710
- /* @__PURE__ */ jsx7(
861
+ /* @__PURE__ */ jsx9(
711
862
  "button",
712
863
  {
713
864
  onClick: () => setViewMode("slide"),
@@ -716,10 +867,10 @@ function SlideDeck({ slides, transition, directionalTransition }) {
716
867
  viewMode === "slide" && "bg-neutral-800 text-white"
717
868
  ),
718
869
  title: "Presentation View",
719
- children: /* @__PURE__ */ jsx7(Monitor, { className: "h-4 w-4" })
870
+ children: /* @__PURE__ */ jsx9(Monitor, { className: "h-4 w-4" })
720
871
  }
721
872
  ),
722
- /* @__PURE__ */ jsx7(
873
+ /* @__PURE__ */ jsx9(
723
874
  "button",
724
875
  {
725
876
  onClick: () => setViewMode("list"),
@@ -728,10 +879,10 @@ function SlideDeck({ slides, transition, directionalTransition }) {
728
879
  viewMode === "list" && "bg-neutral-800 text-white"
729
880
  ),
730
881
  title: "List View",
731
- children: /* @__PURE__ */ jsx7(List, { className: "h-4 w-4" })
882
+ children: /* @__PURE__ */ jsx9(List, { className: "h-4 w-4" })
732
883
  }
733
884
  ),
734
- /* @__PURE__ */ jsx7(
885
+ /* @__PURE__ */ jsx9(
735
886
  "button",
736
887
  {
737
888
  onClick: () => setViewMode("grid"),
@@ -740,26 +891,26 @@ function SlideDeck({ slides, transition, directionalTransition }) {
740
891
  viewMode === "grid" && "bg-neutral-800 text-white"
741
892
  ),
742
893
  title: "Grid View",
743
- children: /* @__PURE__ */ jsx7(Grid3X3, { className: "h-4 w-4" })
894
+ children: /* @__PURE__ */ jsx9(Grid3X3, { className: "h-4 w-4" })
744
895
  }
745
896
  ),
746
- /* @__PURE__ */ jsx7("div", { className: "mx-1 w-px bg-neutral-800" }),
747
- /* @__PURE__ */ jsx7(
897
+ /* @__PURE__ */ jsx9("div", { className: "mx-1 w-px bg-neutral-800" }),
898
+ /* @__PURE__ */ jsx9(
748
899
  "button",
749
900
  {
750
901
  onClick: handleExportPdf,
751
902
  className: "rounded-md p-2 text-neutral-400 transition-colors hover:bg-neutral-800 hover:text-white",
752
903
  title: "Download PDF",
753
- children: /* @__PURE__ */ jsx7(Download, { className: "h-4 w-4" })
904
+ children: /* @__PURE__ */ jsx9(Download, { className: "h-4 w-4" })
754
905
  }
755
906
  ),
756
- /* @__PURE__ */ jsx7(
907
+ /* @__PURE__ */ jsx9(
757
908
  "button",
758
909
  {
759
910
  onClick: togglePresentationMode,
760
911
  className: "rounded-md p-2 text-neutral-400 transition-colors hover:bg-neutral-800 hover:text-white",
761
912
  title: "Present (F)",
762
- children: /* @__PURE__ */ jsx7(Maximize, { className: "h-4 w-4" })
913
+ children: /* @__PURE__ */ jsx9(Maximize, { className: "h-4 w-4" })
763
914
  }
764
915
  )
765
916
  ]
@@ -780,7 +931,7 @@ function SlideDeck({ slides, transition, directionalTransition }) {
780
931
  if (e.key === "Enter" || e.key === " ") advance();
781
932
  } : void 0,
782
933
  children: [
783
- /* @__PURE__ */ jsx7(LayoutGroup, { id: "slide-deck", children: isPresentationMode ? /* @__PURE__ */ jsx7(
934
+ /* @__PURE__ */ jsx9(LayoutGroup, { id: "slide-deck", children: isPresentationMode ? /* @__PURE__ */ jsx9(
784
935
  "div",
785
936
  {
786
937
  className: "pointer-events-none relative overflow-hidden bg-black",
@@ -790,92 +941,42 @@ function SlideDeck({ slides, transition, directionalTransition }) {
790
941
  transform: `scale(${scale})`,
791
942
  transformOrigin: "center center"
792
943
  },
793
- children: /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx7(
794
- motion3.div,
795
- {
796
- variants: slideVariants,
797
- initial: "enter",
798
- animate: "center",
799
- exit: "exit",
800
- transition: SLIDE_TRANSITION,
801
- onAnimationComplete: (definition) => {
802
- if (definition === "center") {
803
- onTransitionComplete();
804
- }
805
- },
806
- className: "absolute inset-0 h-full w-full",
807
- children: /* @__PURE__ */ jsx7(
808
- AnimationProvider,
809
- {
810
- currentStep: animationStep,
811
- totalSteps,
812
- showAllAnimations,
813
- children: /* @__PURE__ */ jsx7(
814
- SlideErrorBoundary,
815
- {
816
- slideIndex: currentSlide,
817
- slideTitle: slides[currentSlide]?.title,
818
- children: /* @__PURE__ */ jsx7(
819
- CurrentSlideComponent,
820
- {
821
- slideNumber: currentSlide + 1,
822
- totalSlides: slides.length
823
- }
824
- )
825
- }
826
- )
827
- }
828
- )
829
- },
830
- currentSlide
831
- ) })
832
- }
833
- ) : /* @__PURE__ */ jsx7("div", { className: "relative aspect-video w-full max-w-7xl overflow-hidden rounded-xl border border-neutral-800 bg-black shadow-2xl", children: /* @__PURE__ */ jsx7(AnimatePresence, { initial: false, children: /* @__PURE__ */ jsx7(
834
- motion3.div,
835
- {
836
- variants: slideVariants,
837
- initial: "enter",
838
- animate: "center",
839
- exit: "exit",
840
- transition: SLIDE_TRANSITION,
841
- onAnimationComplete: (definition) => {
842
- if (definition === "center") {
843
- onTransitionComplete();
844
- }
845
- },
846
- className: "absolute inset-0 h-full w-full",
847
- children: /* @__PURE__ */ jsx7(
848
- AnimationProvider,
944
+ children: /* @__PURE__ */ jsx9(
945
+ SlideRenderer,
849
946
  {
850
- currentStep: animationStep,
947
+ slides,
948
+ currentSlide,
949
+ animationStep,
851
950
  totalSteps,
951
+ direction,
852
952
  showAllAnimations,
853
- children: /* @__PURE__ */ jsx7(
854
- SlideErrorBoundary,
855
- {
856
- slideIndex: currentSlide,
857
- slideTitle: slides[currentSlide]?.title,
858
- children: /* @__PURE__ */ jsx7(
859
- CurrentSlideComponent,
860
- {
861
- slideNumber: currentSlide + 1,
862
- totalSlides: slides.length
863
- }
864
- )
865
- }
866
- )
953
+ transition,
954
+ directionalTransition,
955
+ onTransitionComplete
867
956
  }
868
957
  )
869
- },
870
- currentSlide
871
- ) }) }) }),
958
+ }
959
+ ) : /* @__PURE__ */ jsx9("div", { className: "relative aspect-video w-full max-w-7xl overflow-hidden rounded-xl border border-neutral-800 bg-black shadow-2xl", children: /* @__PURE__ */ jsx9(
960
+ SlideRenderer,
961
+ {
962
+ slides,
963
+ currentSlide,
964
+ animationStep,
965
+ totalSteps,
966
+ direction,
967
+ showAllAnimations,
968
+ transition,
969
+ directionalTransition,
970
+ onTransitionComplete
971
+ }
972
+ ) }) }),
872
973
  !isPresentationMode && /* @__PURE__ */ jsxs3("div", { className: "mt-6 flex items-center gap-4", children: [
873
- /* @__PURE__ */ jsx7(
974
+ /* @__PURE__ */ jsx9(
874
975
  "button",
875
976
  {
876
977
  onClick: goBack,
877
978
  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",
878
- children: /* @__PURE__ */ jsx7(ChevronLeft, { className: "h-5 w-5" })
979
+ children: /* @__PURE__ */ jsx9(ChevronLeft, { className: "h-5 w-5" })
879
980
  }
880
981
  ),
881
982
  /* @__PURE__ */ jsxs3("div", { className: "flex min-w-[4rem] flex-col items-center", children: [
@@ -884,26 +985,26 @@ function SlideDeck({ slides, transition, directionalTransition }) {
884
985
  " / ",
885
986
  slides.length
886
987
  ] }),
887
- slides[currentSlide]?.title && /* @__PURE__ */ jsx7("span", { className: "mt-0.5 text-xs text-neutral-600", children: slides[currentSlide].title })
988
+ slides[currentSlide]?.title && /* @__PURE__ */ jsx9("span", { className: "mt-0.5 text-xs text-neutral-600", children: slides[currentSlide].title })
888
989
  ] }),
889
- /* @__PURE__ */ jsx7(
990
+ /* @__PURE__ */ jsx9(
890
991
  "button",
891
992
  {
892
993
  onClick: advance,
893
994
  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",
894
- children: /* @__PURE__ */ jsx7(ChevronRight, { className: "h-5 w-5" })
995
+ children: /* @__PURE__ */ jsx9(ChevronRight, { className: "h-5 w-5" })
895
996
  }
896
997
  )
897
998
  ] })
898
999
  ]
899
1000
  }
900
1001
  ),
901
- viewMode === "grid" && /* @__PURE__ */ jsx7("div", { className: "mx-auto max-w-7xl p-8 pt-16 print:hidden", children: /* @__PURE__ */ jsx7("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4", children: slides.map((slideConfig, index) => {
1002
+ viewMode === "grid" && /* @__PURE__ */ jsx9("div", { className: "mx-auto max-w-7xl p-8 pt-16 print:hidden", children: /* @__PURE__ */ jsx9("div", { className: "grid grid-cols-2 gap-4 md:grid-cols-3 lg:grid-cols-4", children: slides.map((slideConfig, index) => {
902
1003
  const SlideComponent = slideConfig.component;
903
1004
  const prevSection = index > 0 ? slides[index - 1]?.section : void 0;
904
1005
  const showSectionHeader = slideConfig.section && slideConfig.section !== prevSection;
905
1006
  return /* @__PURE__ */ jsxs3("div", { className: showSectionHeader ? "col-span-full" : void 0, children: [
906
- showSectionHeader && /* @__PURE__ */ jsx7("h3", { className: "mt-4 mb-3 text-xs font-bold tracking-[0.2em] text-neutral-500 uppercase first:mt-0", children: slideConfig.section }),
1007
+ showSectionHeader && /* @__PURE__ */ jsx9("h3", { className: "mt-4 mb-3 text-xs font-bold tracking-[0.2em] text-neutral-500 uppercase first:mt-0", children: slideConfig.section }),
907
1008
  /* @__PURE__ */ jsxs3(
908
1009
  "button",
909
1010
  {
@@ -913,22 +1014,30 @@ function SlideDeck({ slides, transition, directionalTransition }) {
913
1014
  },
914
1015
  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",
915
1016
  children: [
916
- /* @__PURE__ */ jsx7(
1017
+ /* @__PURE__ */ jsx9(
917
1018
  "div",
918
1019
  {
919
1020
  className: "h-full w-full origin-top-left scale-[0.25]",
920
1021
  style: { width: "400%", height: "400%" },
921
- children: /* @__PURE__ */ jsx7(SlideErrorBoundary, { slideIndex: index, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx7(SlideComponent, { slideNumber: index + 1, totalSlides: slides.length }) })
1022
+ children: /* @__PURE__ */ jsx9(
1023
+ AnimationProvider,
1024
+ {
1025
+ currentStep: slideConfig.steps,
1026
+ totalSteps: slideConfig.steps,
1027
+ showAllAnimations: true,
1028
+ children: /* @__PURE__ */ jsx9(SlideErrorBoundary, { slideIndex: index, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx9(SlideComponent, { slideNumber: index + 1, totalSlides: slides.length }) })
1029
+ }
1030
+ )
922
1031
  }
923
1032
  ),
924
- /* @__PURE__ */ jsx7("div", { className: "absolute inset-0 bg-black/0 transition-colors group-hover:bg-black/20" }),
925
- /* @__PURE__ */ jsx7("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 })
1033
+ /* @__PURE__ */ jsx9("div", { className: "absolute inset-0 bg-black/0 transition-colors group-hover:bg-black/20" }),
1034
+ /* @__PURE__ */ jsx9("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 })
926
1035
  ]
927
1036
  }
928
1037
  )
929
1038
  ] }, index);
930
1039
  }) }) }),
931
- /* @__PURE__ */ jsx7(
1040
+ /* @__PURE__ */ jsx9(
932
1041
  "div",
933
1042
  {
934
1043
  className: cn(
@@ -936,19 +1045,19 @@ function SlideDeck({ slides, transition, directionalTransition }) {
936
1045
  "print:m-0 print:block print:max-w-none print:p-0",
937
1046
  viewMode === "list" ? "block" : "hidden print:block"
938
1047
  ),
939
- children: /* @__PURE__ */ jsx7("div", { className: "grid grid-cols-1 gap-8 print:block", children: slides.map((slideConfig, index) => {
1048
+ children: /* @__PURE__ */ jsx9("div", { className: "grid grid-cols-1 gap-8 print:block", children: slides.map((slideConfig, index) => {
940
1049
  const SlideComponent = slideConfig.component;
941
- return /* @__PURE__ */ jsx7(
1050
+ return /* @__PURE__ */ jsx9(
942
1051
  "div",
943
1052
  {
944
1053
  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",
945
- children: /* @__PURE__ */ jsx7("div", { className: "h-full w-full print:h-[720px] print:w-[1280px] print:origin-top-left print:scale-[1.5]", children: /* @__PURE__ */ jsx7(
1054
+ children: /* @__PURE__ */ jsx9("div", { className: "h-full w-full print:h-[720px] print:w-[1280px] print:origin-top-left print:scale-[1.5]", children: /* @__PURE__ */ jsx9(
946
1055
  AnimationProvider,
947
1056
  {
948
1057
  currentStep: slideConfig.steps,
949
1058
  totalSteps: slideConfig.steps,
950
1059
  showAllAnimations: true,
951
- children: /* @__PURE__ */ jsx7(SlideErrorBoundary, { slideIndex: index, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx7(SlideComponent, { slideNumber: index + 1, totalSlides: slides.length }) })
1060
+ children: /* @__PURE__ */ jsx9(SlideErrorBoundary, { slideIndex: index, slideTitle: slideConfig.title, children: /* @__PURE__ */ jsx9(SlideComponent, { slideNumber: index + 1, totalSlides: slides.length }) })
952
1061
  }
953
1062
  ) })
954
1063
  },
@@ -987,8 +1096,10 @@ export {
987
1096
  STEP_ANIMATION_DURATION,
988
1097
  STEP_TRANSITION,
989
1098
  SlideDeck,
1099
+ SlideEmbed,
990
1100
  SlideErrorBoundary,
991
1101
  SlideFooter,
1102
+ SlideRenderer,
992
1103
  SlideThemeProvider,
993
1104
  cn,
994
1105
  createDirectionalVariants,