@gpichot/spectacle-deck 1.4.0 → 1.5.0

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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // src/index.tsx
2
2
  import { MDXProvider } from "@mdx-js/react";
3
- import React12 from "react";
3
+ import React15 from "react";
4
4
  import { Slide, Deck as SpectacleDeck } from "spectacle";
5
5
  import { createGlobalStyle } from "styled-components";
6
6
 
@@ -1548,13 +1548,335 @@ var theme_default = {
1548
1548
  space: [8, 16, 24]
1549
1549
  };
1550
1550
 
1551
+ // src/transitions.ts
1552
+ import {
1553
+ fadeTransition,
1554
+ slideTransition
1555
+ } from "spectacle";
1556
+ var dropTransition = {
1557
+ from: { transform: "translateY(-100%)", opacity: 0 },
1558
+ enter: { transform: "translateY(0%)", opacity: 1 },
1559
+ leave: { transform: "translateY(100%)", opacity: 0 }
1560
+ };
1561
+ var noneTransition = {
1562
+ from: { opacity: 1 },
1563
+ enter: { opacity: 1 },
1564
+ leave: { opacity: 0 }
1565
+ };
1566
+ var transitionMap = {
1567
+ fade: fadeTransition,
1568
+ slide: slideTransition,
1569
+ drop: dropTransition,
1570
+ none: noneTransition
1571
+ };
1572
+ function resolveTransition(name) {
1573
+ if (!name) return void 0;
1574
+ return transitionMap[name];
1575
+ }
1576
+
1551
1577
  // src/index.tsx
1552
1578
  export * from "spectacle";
1553
1579
 
1554
- // src/components/DocumentationItem.tsx
1580
+ // src/components/animations/AnimatedCounter.tsx
1581
+ import { animated, useSpring } from "@react-spring/web";
1582
+
1583
+ // src/components/animations/useInView.ts
1584
+ import React8 from "react";
1585
+ function useInView() {
1586
+ const ref = React8.useRef(null);
1587
+ const [isInView, setIsInView] = React8.useState(false);
1588
+ React8.useEffect(() => {
1589
+ const el = ref.current;
1590
+ if (!el) return;
1591
+ const observer = new IntersectionObserver(
1592
+ ([entry]) => {
1593
+ if (entry.isIntersecting) {
1594
+ setIsInView(true);
1595
+ observer.disconnect();
1596
+ }
1597
+ },
1598
+ { threshold: 0.1 }
1599
+ );
1600
+ observer.observe(el);
1601
+ return () => observer.disconnect();
1602
+ }, []);
1603
+ return [ref, isInView];
1604
+ }
1605
+
1606
+ // src/components/animations/AnimatedCounter.tsx
1607
+ import { jsx as jsx20 } from "react/jsx-runtime";
1608
+ function AnimatedCounter({
1609
+ to,
1610
+ from = 0,
1611
+ duration = 1500,
1612
+ delay = 0,
1613
+ decimals = 0,
1614
+ prefix = "",
1615
+ suffix = ""
1616
+ }) {
1617
+ const [ref, isInView] = useInView();
1618
+ const { value } = useSpring({
1619
+ value: isInView ? to : from,
1620
+ delay: isInView ? delay : 0,
1621
+ config: { duration }
1622
+ });
1623
+ return /* @__PURE__ */ jsx20(animated.span, { ref, style: { fontFamily: "var(--font-family)" }, children: value.to((v) => `${prefix}${v.toFixed(decimals)}${suffix}`) });
1624
+ }
1625
+
1626
+ // src/components/animations/FadeIn.tsx
1627
+ import { animated as animated2, useSpring as useSpring2 } from "@react-spring/web";
1628
+ import { jsx as jsx21 } from "react/jsx-runtime";
1629
+ function FadeIn({
1630
+ children,
1631
+ direction = "up",
1632
+ distance = 20,
1633
+ delay = 0,
1634
+ duration = 400
1635
+ }) {
1636
+ const [ref, isInView] = useInView();
1637
+ const translateMap = {
1638
+ up: `translateY(${distance}px)`,
1639
+ down: `translateY(-${distance}px)`,
1640
+ left: `translateX(${distance}px)`,
1641
+ right: `translateX(-${distance}px)`,
1642
+ none: "translate(0, 0)"
1643
+ };
1644
+ const styles = useSpring2({
1645
+ opacity: isInView ? 1 : 0,
1646
+ transform: isInView ? "translate(0, 0)" : translateMap[direction],
1647
+ delay: isInView ? delay : 0,
1648
+ config: { duration }
1649
+ });
1650
+ return /* @__PURE__ */ jsx21(animated2.div, { ref, style: styles, children });
1651
+ }
1652
+
1653
+ // src/components/animations/ProgressRing.tsx
1654
+ import { animated as animated3, useSpring as useSpring3 } from "@react-spring/web";
1655
+ import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1656
+ function ProgressRing({
1657
+ value,
1658
+ size = 120,
1659
+ strokeWidth = 8,
1660
+ color = "var(--color-secondary)",
1661
+ trackColor = "rgba(255,255,255,0.1)",
1662
+ duration = 1e3,
1663
+ delay = 0,
1664
+ children
1665
+ }) {
1666
+ const [ref, isInView] = useInView();
1667
+ const radius = (size - strokeWidth) / 2;
1668
+ const circumference = 2 * Math.PI * radius;
1669
+ const targetOffset = circumference - value / 100 * circumference;
1670
+ const { offset } = useSpring3({
1671
+ offset: isInView ? targetOffset : circumference,
1672
+ delay: isInView ? delay : 0,
1673
+ config: { duration }
1674
+ });
1675
+ return /* @__PURE__ */ jsxs15(
1676
+ "div",
1677
+ {
1678
+ ref,
1679
+ style: {
1680
+ position: "relative",
1681
+ width: size,
1682
+ height: size,
1683
+ display: "inline-flex",
1684
+ alignItems: "center",
1685
+ justifyContent: "center"
1686
+ },
1687
+ children: [
1688
+ /* @__PURE__ */ jsxs15(
1689
+ "svg",
1690
+ {
1691
+ width: size,
1692
+ height: size,
1693
+ style: { position: "absolute", transform: "rotate(-90deg)" },
1694
+ children: [
1695
+ /* @__PURE__ */ jsx22(
1696
+ "circle",
1697
+ {
1698
+ cx: size / 2,
1699
+ cy: size / 2,
1700
+ r: radius,
1701
+ fill: "none",
1702
+ stroke: trackColor,
1703
+ strokeWidth
1704
+ }
1705
+ ),
1706
+ /* @__PURE__ */ jsx22(
1707
+ animated3.circle,
1708
+ {
1709
+ cx: size / 2,
1710
+ cy: size / 2,
1711
+ r: radius,
1712
+ fill: "none",
1713
+ stroke: color,
1714
+ strokeWidth,
1715
+ strokeDasharray: circumference,
1716
+ strokeDashoffset: offset,
1717
+ strokeLinecap: "round"
1718
+ }
1719
+ )
1720
+ ]
1721
+ }
1722
+ ),
1723
+ children && /* @__PURE__ */ jsx22(
1724
+ "div",
1725
+ {
1726
+ style: {
1727
+ position: "relative",
1728
+ zIndex: 1,
1729
+ fontFamily: "var(--font-family)"
1730
+ },
1731
+ children
1732
+ }
1733
+ )
1734
+ ]
1735
+ }
1736
+ );
1737
+ }
1738
+
1739
+ // src/components/animations/ScaleIn.tsx
1740
+ import { animated as animated4, useSpring as useSpring4 } from "@react-spring/web";
1741
+ import { jsx as jsx23 } from "react/jsx-runtime";
1742
+ function ScaleIn({
1743
+ children,
1744
+ from = 0,
1745
+ delay = 0,
1746
+ duration = 400
1747
+ }) {
1748
+ const [ref, isInView] = useInView();
1749
+ const styles = useSpring4({
1750
+ opacity: isInView ? 1 : 0,
1751
+ transform: isInView ? "scale(1)" : `scale(${from})`,
1752
+ delay: isInView ? delay : 0,
1753
+ config: { duration }
1754
+ });
1755
+ return /* @__PURE__ */ jsx23(animated4.div, { ref, style: styles, children });
1756
+ }
1757
+
1758
+ // src/components/animations/Spotlight.tsx
1555
1759
  import styled13 from "styled-components";
1556
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
1557
- var DocWrapper = styled13.div`
1760
+ import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
1761
+ var Overlay2 = styled13.div`
1762
+ position: fixed;
1763
+ inset: 0;
1764
+ background: rgba(0, 0, 0, ${(p) => p.$active ? p.$dimOpacity : 0});
1765
+ pointer-events: ${(p) => p.$active ? "auto" : "none"};
1766
+ transition: background 0.4s ease;
1767
+ z-index: 99;
1768
+ `;
1769
+ var Content = styled13.div`
1770
+ position: relative;
1771
+ z-index: ${(p) => p.$active ? 100 : "auto"};
1772
+ `;
1773
+ function Spotlight({
1774
+ children,
1775
+ active = true,
1776
+ dimOpacity = 0.7
1777
+ }) {
1778
+ return /* @__PURE__ */ jsxs16(Fragment2, { children: [
1779
+ /* @__PURE__ */ jsx24(Overlay2, { $active: active, $dimOpacity: dimOpacity }),
1780
+ /* @__PURE__ */ jsx24(Content, { $active: active, children })
1781
+ ] });
1782
+ }
1783
+
1784
+ // src/components/animations/StaggerChildren.tsx
1785
+ import { animated as animated5, useSprings } from "@react-spring/web";
1786
+ import React9 from "react";
1787
+ import { jsx as jsx25 } from "react/jsx-runtime";
1788
+ function StaggerChildren({
1789
+ children,
1790
+ stagger = 100,
1791
+ delay = 0,
1792
+ duration = 400,
1793
+ direction = "up",
1794
+ distance = 20
1795
+ }) {
1796
+ const [ref, isInView] = useInView();
1797
+ const items = React9.Children.toArray(children);
1798
+ const translateMap = {
1799
+ up: `translateY(${distance}px)`,
1800
+ down: `translateY(-${distance}px)`,
1801
+ left: `translateX(${distance}px)`,
1802
+ right: `translateX(-${distance}px)`,
1803
+ none: "translate(0, 0)"
1804
+ };
1805
+ const springs = useSprings(
1806
+ items.length,
1807
+ items.map((_, i) => ({
1808
+ opacity: isInView ? 1 : 0,
1809
+ transform: isInView ? "translate(0, 0)" : translateMap[direction],
1810
+ delay: isInView ? delay + i * stagger : 0,
1811
+ config: { duration }
1812
+ }))
1813
+ );
1814
+ return /* @__PURE__ */ jsx25("div", { ref, children: springs.map((style2, i) => /* @__PURE__ */ jsx25(animated5.div, { style: style2, children: items[i] }, i)) });
1815
+ }
1816
+
1817
+ // src/components/animations/TypeWriter.tsx
1818
+ import React10 from "react";
1819
+ import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
1820
+ function extractText(node) {
1821
+ if (typeof node === "string") return node;
1822
+ if (typeof node === "number") return String(node);
1823
+ if (!node) return "";
1824
+ if (Array.isArray(node)) return node.map(extractText).join("");
1825
+ if (React10.isValidElement(node)) {
1826
+ const props = node.props;
1827
+ return extractText(props.children);
1828
+ }
1829
+ return "";
1830
+ }
1831
+ function TypeWriter({
1832
+ children,
1833
+ speed = 50,
1834
+ delay = 0,
1835
+ cursor = true
1836
+ }) {
1837
+ const text = extractText(children);
1838
+ const [ref, isInView] = useInView();
1839
+ const [displayed, setDisplayed] = React10.useState("");
1840
+ const [done, setDone] = React10.useState(false);
1841
+ React10.useEffect(() => {
1842
+ if (!isInView) return;
1843
+ let index = 0;
1844
+ setDisplayed("");
1845
+ setDone(false);
1846
+ const timeout = setTimeout(() => {
1847
+ const interval = setInterval(() => {
1848
+ if (index < text.length) {
1849
+ setDisplayed(text.slice(0, index + 1));
1850
+ index++;
1851
+ } else {
1852
+ setDone(true);
1853
+ clearInterval(interval);
1854
+ }
1855
+ }, speed);
1856
+ return () => clearInterval(interval);
1857
+ }, delay);
1858
+ return () => clearTimeout(timeout);
1859
+ }, [text, speed, delay, isInView]);
1860
+ return /* @__PURE__ */ jsxs17("span", { ref, style: { fontFamily: "var(--font-family)" }, children: [
1861
+ displayed,
1862
+ cursor && /* @__PURE__ */ jsx26(
1863
+ "span",
1864
+ {
1865
+ style: {
1866
+ borderRight: "2px solid currentColor",
1867
+ marginLeft: 1,
1868
+ animation: done ? "pestacle-blink 1s step-end infinite" : "none"
1869
+ },
1870
+ children: /* @__PURE__ */ jsx26("style", { children: `@keyframes pestacle-blink { 50% { opacity: 0; } }` })
1871
+ }
1872
+ )
1873
+ ] });
1874
+ }
1875
+
1876
+ // src/components/DocumentationItem.tsx
1877
+ import styled14 from "styled-components";
1878
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
1879
+ var DocWrapper = styled14.div`
1558
1880
  position: absolute;
1559
1881
  bottom: 0;
1560
1882
  right: 0;
@@ -1568,20 +1890,20 @@ var DocWrapper = styled13.div`
1568
1890
  display: flex;
1569
1891
  }
1570
1892
  `;
1571
- var DocContainer = styled13.div`
1893
+ var DocContainer = styled14.div`
1572
1894
  margin: 2rem 1rem;
1573
1895
  background-color: #333;
1574
1896
  border: 1px solid #333;
1575
1897
  padding: 0.5rem 1rem;
1576
1898
  border-radius: 1.5rem;
1577
1899
  `;
1578
- var DocLink = styled13.a`
1900
+ var DocLink = styled14.a`
1579
1901
  text-decoration: none;
1580
1902
  font-weight: normal;
1581
1903
  font-family: var(--font-family);
1582
1904
  color: var(--color-secondary);
1583
1905
  `;
1584
- var DocLinkItem = styled13(DocLink)`
1906
+ var DocLinkItem = styled14(DocLink)`
1585
1907
  width: fit-content;
1586
1908
  display: inline-block;
1587
1909
  background-color: #333;
@@ -1590,7 +1912,7 @@ var DocLinkItem = styled13(DocLink)`
1590
1912
  border-radius: 1.5rem;
1591
1913
  margin: 0.25rem 0;
1592
1914
  `;
1593
- var DocContent = styled13.div`
1915
+ var DocContent = styled14.div`
1594
1916
  display: flex;
1595
1917
  flex-flow: column-reverse nowrap;
1596
1918
  position: absolute;
@@ -1605,24 +1927,24 @@ function Doc({
1605
1927
  link,
1606
1928
  children
1607
1929
  }) {
1608
- return /* @__PURE__ */ jsx20(DocWrapper, { children: /* @__PURE__ */ jsxs15(DocContainer, { children: [
1609
- children && /* @__PURE__ */ jsx20(DocContent, { children }),
1610
- /* @__PURE__ */ jsx20("div", { children: /* @__PURE__ */ jsx20(DocLink, { target: "_blank", rel: "noopener noreferrer", href: link, children: label }) })
1930
+ return /* @__PURE__ */ jsx27(DocWrapper, { children: /* @__PURE__ */ jsxs18(DocContainer, { children: [
1931
+ children && /* @__PURE__ */ jsx27(DocContent, { children }),
1932
+ /* @__PURE__ */ jsx27("div", { children: /* @__PURE__ */ jsx27(DocLink, { target: "_blank", rel: "noopener noreferrer", href: link, children: label }) })
1611
1933
  ] }) });
1612
1934
  }
1613
1935
  function DocItem({ label, link }) {
1614
- return /* @__PURE__ */ jsx20(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link, children: label });
1936
+ return /* @__PURE__ */ jsx27(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link, children: label });
1615
1937
  }
1616
1938
 
1617
1939
  // src/components/FilePane.tsx
1618
- import React8 from "react";
1940
+ import React11 from "react";
1619
1941
  function FilePane({
1620
1942
  name,
1621
1943
  children,
1622
1944
  priority,
1623
1945
  ...divProps
1624
1946
  }) {
1625
- return React8.isValidElement(children) ? React8.cloneElement(children, {
1947
+ return React11.isValidElement(children) ? React11.cloneElement(children, {
1626
1948
  // @ts-expect-error cloning
1627
1949
  priority,
1628
1950
  name
@@ -1631,12 +1953,12 @@ function FilePane({
1631
1953
  FilePane.mdxType = "FilePane";
1632
1954
 
1633
1955
  // src/components/HorizontalList.tsx
1634
- import { animated, useSpring } from "@react-spring/web";
1635
- import React9 from "react";
1956
+ import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
1957
+ import React12 from "react";
1636
1958
  import { Stepper as Stepper2 } from "spectacle";
1637
- import styled14 from "styled-components";
1638
- import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
1639
- var Container = styled14.div`
1959
+ import styled15 from "styled-components";
1960
+ import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
1961
+ var Container = styled15.div`
1640
1962
  display: grid;
1641
1963
  grid-gap: 2rem;
1642
1964
  `;
@@ -1644,18 +1966,18 @@ function HorizontalList({
1644
1966
  children,
1645
1967
  columns = 3
1646
1968
  }) {
1647
- const items = React9.Children.toArray(children);
1648
- return /* @__PURE__ */ jsx21(Stepper2, { values: items, children: (_, step) => /* @__PURE__ */ jsx21(
1969
+ const items = React12.Children.toArray(children);
1970
+ return /* @__PURE__ */ jsx28(Stepper2, { values: items, children: (_, step) => /* @__PURE__ */ jsx28(
1649
1971
  Container,
1650
1972
  {
1651
1973
  style: {
1652
1974
  gridTemplateColumns: `repeat(${columns}, 1fr)`
1653
1975
  },
1654
1976
  children: items.map((item, k) => {
1655
- if (!React9.isValidElement(item)) {
1977
+ if (!React12.isValidElement(item)) {
1656
1978
  return item;
1657
1979
  }
1658
- return React9.cloneElement(item, {
1980
+ return React12.cloneElement(item, {
1659
1981
  // @ts-expect-error cloning
1660
1982
  position: k + 1,
1661
1983
  isVisible: k <= step,
@@ -1666,11 +1988,11 @@ function HorizontalList({
1666
1988
  ) });
1667
1989
  }
1668
1990
  function Pill({ position }) {
1669
- return /* @__PURE__ */ jsx21(
1991
+ return /* @__PURE__ */ jsx28(
1670
1992
  "div",
1671
1993
  {
1672
1994
  style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 },
1673
- children: /* @__PURE__ */ jsxs16(
1995
+ children: /* @__PURE__ */ jsxs19(
1674
1996
  "svg",
1675
1997
  {
1676
1998
  width: "48",
@@ -1679,14 +2001,14 @@ function Pill({ position }) {
1679
2001
  fill: "none",
1680
2002
  xmlns: "http://www.w3.org/2000/svg",
1681
2003
  children: [
1682
- /* @__PURE__ */ jsx21(
2004
+ /* @__PURE__ */ jsx28(
1683
2005
  "path",
1684
2006
  {
1685
2007
  d: "M8.64717 20L0 15.0094V5.00134L8.64717 0L17.289 5.00134V15.0094L8.64717 20ZM1.48222 14.141L8.64717 18.2846L15.8068 14.141V5.85902L8.64717 1.71536L1.48222 5.85902V14.141Z",
1686
2008
  fill: "#ffffff"
1687
2009
  }
1688
2010
  ),
1689
- /* @__PURE__ */ jsx21(
2011
+ /* @__PURE__ */ jsx28(
1690
2012
  "text",
1691
2013
  {
1692
2014
  x: "9",
@@ -1698,7 +2020,7 @@ function Pill({ position }) {
1698
2020
  children: position
1699
2021
  }
1700
2022
  ),
1701
- /* @__PURE__ */ jsx21(
2023
+ /* @__PURE__ */ jsx28(
1702
2024
  "path",
1703
2025
  {
1704
2026
  d: "M 8.758 16.01 L 3.549 13.004 L 3.549 6.975 L 8.758 3.963 L 13.964 6.975 L 13.964 13.004 L 8.758 16.01 Z",
@@ -1711,12 +2033,12 @@ function Pill({ position }) {
1711
2033
  }
1712
2034
  );
1713
2035
  }
1714
- var Item = styled14(animated.div)`
2036
+ var Item = styled15(animated6.div)`
1715
2037
  display: flex;
1716
2038
  flex-direction: column;
1717
2039
  font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1718
2040
  `;
1719
- var ItemHead = styled14.div`
2041
+ var ItemHead = styled15.div`
1720
2042
  display: flex;
1721
2043
  flex-direction: row;
1722
2044
  font-size: 1.3rem;
@@ -1726,7 +2048,7 @@ var ItemHead = styled14.div`
1726
2048
  margin: 0;
1727
2049
  }
1728
2050
  `;
1729
- var ItemContent = styled14.div`
2051
+ var ItemContent = styled15.div`
1730
2052
  > * {
1731
2053
  font-size: 1rem;
1732
2054
  padding: 4px !important;
@@ -1749,22 +2071,22 @@ function HorizontalListItem({
1749
2071
  isVisible,
1750
2072
  isLast
1751
2073
  }) {
1752
- const opacityStyles = useSpring({
2074
+ const opacityStyles = useSpring5({
1753
2075
  opacity: getItemOpacity({ isVisible, isLast })
1754
2076
  });
1755
- return /* @__PURE__ */ jsxs16(Item, { style: opacityStyles, children: [
1756
- /* @__PURE__ */ jsxs16(ItemHead, { children: [
1757
- /* @__PURE__ */ jsx21(Pill, { position }),
1758
- /* @__PURE__ */ jsx21("p", { children: title })
2077
+ return /* @__PURE__ */ jsxs19(Item, { style: opacityStyles, children: [
2078
+ /* @__PURE__ */ jsxs19(ItemHead, { children: [
2079
+ /* @__PURE__ */ jsx28(Pill, { position }),
2080
+ /* @__PURE__ */ jsx28("p", { children: title })
1759
2081
  ] }),
1760
- /* @__PURE__ */ jsx21(ItemContent, { children })
2082
+ /* @__PURE__ */ jsx28(ItemContent, { children })
1761
2083
  ] });
1762
2084
  }
1763
2085
 
1764
2086
  // src/components/IconBox.tsx
1765
- import styled15 from "styled-components";
1766
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
1767
- var IconBoxContent = styled15.div`
2087
+ import styled16 from "styled-components";
2088
+ import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
2089
+ var IconBoxContent = styled16.div`
1768
2090
  * {
1769
2091
  margin: 0.2rem !important;
1770
2092
  padding: 0 !important;
@@ -1774,7 +2096,7 @@ function IconBox({
1774
2096
  children,
1775
2097
  icon
1776
2098
  }) {
1777
- return /* @__PURE__ */ jsxs17(
2099
+ return /* @__PURE__ */ jsxs20(
1778
2100
  "div",
1779
2101
  {
1780
2102
  style: {
@@ -1784,23 +2106,23 @@ function IconBox({
1784
2106
  padding: "1rem 0"
1785
2107
  },
1786
2108
  children: [
1787
- /* @__PURE__ */ jsx22("div", { style: { fontSize: 60 }, children: icon }),
1788
- /* @__PURE__ */ jsx22(IconBoxContent, { children })
2109
+ /* @__PURE__ */ jsx29("div", { style: { fontSize: 60 }, children: icon }),
2110
+ /* @__PURE__ */ jsx29(IconBoxContent, { children })
1789
2111
  ]
1790
2112
  }
1791
2113
  );
1792
2114
  }
1793
2115
 
1794
2116
  // src/components/ItemsColumn.tsx
1795
- import { animated as animated2, useSpring as useSpring2 } from "@react-spring/web";
1796
- import React10 from "react";
2117
+ import { animated as animated7, useSpring as useSpring6 } from "@react-spring/web";
2118
+ import React13 from "react";
1797
2119
  import { Stepper as Stepper3 } from "spectacle";
1798
- import styled16 from "styled-components";
1799
- import { jsx as jsx23 } from "react/jsx-runtime";
2120
+ import styled17 from "styled-components";
2121
+ import { jsx as jsx30 } from "react/jsx-runtime";
1800
2122
  function ItemsColumn(divProps) {
1801
2123
  const { style: style2, children, ...props } = divProps;
1802
- const childrenArray = React10.Children.toArray(children);
1803
- return /* @__PURE__ */ jsx23(Stepper3, { values: childrenArray, children: (_value, step) => /* @__PURE__ */ jsx23(
2124
+ const childrenArray = React13.Children.toArray(children);
2125
+ return /* @__PURE__ */ jsx30(Stepper3, { values: childrenArray, children: (_value, step) => /* @__PURE__ */ jsx30(
1804
2126
  "div",
1805
2127
  {
1806
2128
  style: {
@@ -1815,15 +2137,15 @@ function ItemsColumn(divProps) {
1815
2137
  ...props,
1816
2138
  children: childrenArray.map((child, index) => {
1817
2139
  const isVisible = index <= step;
1818
- if (!React10.isValidElement(child)) {
2140
+ if (!React13.isValidElement(child)) {
1819
2141
  return child;
1820
2142
  }
1821
- return /* @__PURE__ */ jsx23(ItemColumnWrapper, { isVisible, children: child }, index);
2143
+ return /* @__PURE__ */ jsx30(ItemColumnWrapper, { isVisible, children: child }, index);
1822
2144
  })
1823
2145
  }
1824
2146
  ) });
1825
2147
  }
1826
- var ItemColumnWrapperStyled = styled16(animated2.div)`
2148
+ var ItemColumnWrapperStyled = styled17(animated7.div)`
1827
2149
  display: flex;
1828
2150
  justify-content: center;
1829
2151
  * {
@@ -1835,33 +2157,33 @@ function ItemColumnWrapper({
1835
2157
  isVisible,
1836
2158
  ...props
1837
2159
  }) {
1838
- const styles = useSpring2({ opacity: isVisible ? 1 : 0 });
1839
- return /* @__PURE__ */ jsx23(ItemColumnWrapperStyled, { style: styles, ...props, children });
2160
+ const styles = useSpring6({ opacity: isVisible ? 1 : 0 });
2161
+ return /* @__PURE__ */ jsx30(ItemColumnWrapperStyled, { style: styles, ...props, children });
1840
2162
  }
1841
2163
 
1842
2164
  // src/components/Timeline.tsx
1843
- import { animated as animated3, useSpring as useSpring3 } from "@react-spring/web";
1844
- import React11 from "react";
2165
+ import { animated as animated8, useSpring as useSpring7 } from "@react-spring/web";
2166
+ import React14 from "react";
1845
2167
  import { Stepper as Stepper4 } from "spectacle";
1846
- import styled18 from "styled-components";
2168
+ import styled19 from "styled-components";
1847
2169
 
1848
2170
  // src/components/Timeline.styled.tsx
1849
- import styled17 from "styled-components";
1850
- var TimelineItemContent = styled17.div`
2171
+ import styled18 from "styled-components";
2172
+ var TimelineItemContent = styled18.div`
1851
2173
  display: flex;
1852
2174
  padding: 0.7rem 0 1rem 12px;
1853
2175
  `;
1854
- var TimelineItemContentPhantom = styled17(TimelineItemContent)`
2176
+ var TimelineItemContentPhantom = styled18(TimelineItemContent)`
1855
2177
  opacity: 0;
1856
2178
  `;
1857
- var TimelineItemBody = styled17.div`
2179
+ var TimelineItemBody = styled18.div`
1858
2180
  &,
1859
2181
  & > * {
1860
2182
  font-size: 1.3rem !important;
1861
2183
  color: #ffffff !important;
1862
2184
  }
1863
2185
  `;
1864
- var TimelineItemTitle = styled17.div`
2186
+ var TimelineItemTitle = styled18.div`
1865
2187
  font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1866
2188
  font-size: 1rem;
1867
2189
  font-weight: bold;
@@ -1869,8 +2191,8 @@ var TimelineItemTitle = styled17.div`
1869
2191
  `;
1870
2192
 
1871
2193
  // src/components/Timeline.tsx
1872
- import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
1873
- var TimelineItemStyled = styled18(animated3.div)`
2194
+ import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
2195
+ var TimelineItemStyled = styled19(animated8.div)`
1874
2196
  flex: 1;
1875
2197
  flex-flow: column nowrap;
1876
2198
  display: inline-flex;
@@ -1888,7 +2210,7 @@ var TimelineItemStyled = styled18(animated3.div)`
1888
2210
  }
1889
2211
  }
1890
2212
  `;
1891
- var TimelineItemGuide = styled18(animated3.div)`
2213
+ var TimelineItemGuide = styled19(animated8.div)`
1892
2214
  width: 100%;
1893
2215
  padding-top: 2px;
1894
2216
  display: flex;
@@ -1904,7 +2226,7 @@ var TimelineItemGuide = styled18(animated3.div)`
1904
2226
  margin-right: 4px;
1905
2227
  }
1906
2228
  `;
1907
- var TimelineItemGuideLine = styled18(animated3.div)`
2229
+ var TimelineItemGuideLine = styled19(animated8.div)`
1908
2230
  border-top: 4px solid #ffffff;
1909
2231
  margin-right: 4px;
1910
2232
  `;
@@ -1915,8 +2237,8 @@ var style = {
1915
2237
  alignItems: "center"
1916
2238
  };
1917
2239
  function Timeline(props) {
1918
- const children = React11.Children.toArray(props.children);
1919
- return /* @__PURE__ */ jsx24(
2240
+ const children = React14.Children.toArray(props.children);
2241
+ return /* @__PURE__ */ jsx31(
1920
2242
  Stepper4,
1921
2243
  {
1922
2244
  ...props,
@@ -1925,10 +2247,10 @@ function Timeline(props) {
1925
2247
  inactiveStyle: style,
1926
2248
  children: (_value, step) => {
1927
2249
  return children.map((child, index) => {
1928
- if (!React11.isValidElement(child)) {
2250
+ if (!React14.isValidElement(child)) {
1929
2251
  return child;
1930
2252
  }
1931
- return React11.cloneElement(child, {
2253
+ return React14.cloneElement(child, {
1932
2254
  // @ts-expect-error cloning
1933
2255
  isPhantom: step < index,
1934
2256
  isLast: step === index
@@ -1948,14 +2270,14 @@ function getItemOpacity2({
1948
2270
  }
1949
2271
  function TimelineItem(props) {
1950
2272
  const { children, title, isPhantom, isLast, ...rest } = props;
1951
- const guideLineProps = useSpring3({
2273
+ const guideLineProps = useSpring7({
1952
2274
  width: isPhantom || isLast ? "0%" : "100%"
1953
2275
  });
1954
- const appearStyles = useSpring3({
2276
+ const appearStyles = useSpring7({
1955
2277
  opacity: getItemOpacity2({ isPhantom, isLast })
1956
2278
  });
1957
- const colorStyles = useSpring3({ opacity: isPhantom || isLast ? 1 : 0.15 });
1958
- return /* @__PURE__ */ jsxs18(
2279
+ const colorStyles = useSpring7({ opacity: isPhantom || isLast ? 1 : 0.15 });
2280
+ return /* @__PURE__ */ jsxs21(
1959
2281
  TimelineItemStyled,
1960
2282
  {
1961
2283
  ...rest,
@@ -1963,24 +2285,24 @@ function TimelineItem(props) {
1963
2285
  ...appearStyles
1964
2286
  },
1965
2287
  children: [
1966
- /* @__PURE__ */ jsxs18(TimelineItemContentPhantom, { children: [
1967
- /* @__PURE__ */ jsx24(TimelineItemTitle, { children: title }),
1968
- /* @__PURE__ */ jsx24(TimelineItemBody, { children })
2288
+ /* @__PURE__ */ jsxs21(TimelineItemContentPhantom, { children: [
2289
+ /* @__PURE__ */ jsx31(TimelineItemTitle, { children: title }),
2290
+ /* @__PURE__ */ jsx31(TimelineItemBody, { children })
1969
2291
  ] }),
1970
- /* @__PURE__ */ jsxs18(TimelineItemGuide, { style: colorStyles, children: [
1971
- /* @__PURE__ */ jsx24(Hexagon, {}),
1972
- /* @__PURE__ */ jsx24(TimelineItemGuideLine, { style: guideLineProps })
2292
+ /* @__PURE__ */ jsxs21(TimelineItemGuide, { style: colorStyles, children: [
2293
+ /* @__PURE__ */ jsx31(Hexagon, {}),
2294
+ /* @__PURE__ */ jsx31(TimelineItemGuideLine, { style: guideLineProps })
1973
2295
  ] }),
1974
- /* @__PURE__ */ jsxs18(TimelineItemContent, { children: [
1975
- /* @__PURE__ */ jsx24(TimelineItemTitle, { children: title }),
1976
- /* @__PURE__ */ jsx24(TimelineItemBody, { children })
2296
+ /* @__PURE__ */ jsxs21(TimelineItemContent, { children: [
2297
+ /* @__PURE__ */ jsx31(TimelineItemTitle, { children: title }),
2298
+ /* @__PURE__ */ jsx31(TimelineItemBody, { children })
1977
2299
  ] })
1978
2300
  ]
1979
2301
  }
1980
2302
  );
1981
2303
  }
1982
2304
  function Hexagon() {
1983
- return /* @__PURE__ */ jsxs18(
2305
+ return /* @__PURE__ */ jsxs21(
1984
2306
  "svg",
1985
2307
  {
1986
2308
  width: "18",
@@ -1989,14 +2311,14 @@ function Hexagon() {
1989
2311
  fill: "none",
1990
2312
  xmlns: "http://www.w3.org/2000/svg",
1991
2313
  children: [
1992
- /* @__PURE__ */ jsx24(
2314
+ /* @__PURE__ */ jsx31(
1993
2315
  "path",
1994
2316
  {
1995
2317
  d: "M8.64717 20L0 15.0094V5.00134L8.64717 0L17.289 5.00134V15.0094L8.64717 20ZM1.48222 14.141L8.64717 18.2846L15.8068 14.141V5.85902L8.64717 1.71536L1.48222 5.85902V14.141Z",
1996
2318
  fill: "#F49676"
1997
2319
  }
1998
2320
  ),
1999
- /* @__PURE__ */ jsx24(
2321
+ /* @__PURE__ */ jsx31(
2000
2322
  "path",
2001
2323
  {
2002
2324
  d: "M 8.758 16.01 L 3.549 13.004 L 3.549 6.975 L 8.758 3.963 L 13.964 6.975 L 13.964 13.004 L 8.758 16.01 Z",
@@ -2009,9 +2331,9 @@ function Hexagon() {
2009
2331
  }
2010
2332
 
2011
2333
  // src/index.tsx
2012
- import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
2334
+ import { Fragment as Fragment3, jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
2013
2335
  function PassThrough({ children }) {
2014
- return /* @__PURE__ */ jsx25(Fragment2, { children });
2336
+ return /* @__PURE__ */ jsx32(Fragment3, { children });
2015
2337
  }
2016
2338
  var layouts = layouts_default;
2017
2339
  var componentsMap2 = {
@@ -2021,12 +2343,13 @@ var componentsMap2 = {
2021
2343
  function Deck({
2022
2344
  deck,
2023
2345
  theme,
2024
- layouts: layouts2 = layouts_default
2346
+ layouts: layouts2 = layouts_default,
2347
+ transition
2025
2348
  }) {
2026
- React12.useEffect(() => {
2349
+ React15.useEffect(() => {
2027
2350
  document.title = deck.metadata.title || "Untitled";
2028
2351
  }, [deck.metadata.title]);
2029
- const mergedTheme = React12.useMemo(() => {
2352
+ const mergedTheme = React15.useMemo(() => {
2030
2353
  const fonts = {
2031
2354
  ...theme_default.fonts,
2032
2355
  ...theme.themeTokens.fonts ?? {}
@@ -2037,7 +2360,7 @@ function Deck({
2037
2360
  fonts
2038
2361
  };
2039
2362
  }, [theme]);
2040
- const GlobalStyle = React12.useMemo(() => {
2363
+ const GlobalStyle = React15.useMemo(() => {
2041
2364
  const cssVariables = createCssVariables(theme.themeTokens.colors);
2042
2365
  return createGlobalStyle`
2043
2366
  :root {
@@ -2046,43 +2369,56 @@ function Deck({
2046
2369
  }
2047
2370
  `;
2048
2371
  }, [theme, mergedTheme]);
2049
- return /* @__PURE__ */ jsx25(React12.StrictMode, { children: /* @__PURE__ */ jsx25(PestacleProvider, { layouts: layouts2, children: /* @__PURE__ */ jsxs19(MDXProvider, { components: componentsMap2, children: [
2050
- /* @__PURE__ */ jsx25(GlobalStyle, {}),
2051
- /* @__PURE__ */ jsx25(SpectacleDeck, { theme: mergedTheme, template, children: deck.slides.map((slide, i) => {
2052
- const Component = slide.slideComponent;
2053
- return /* @__PURE__ */ jsx25(Slide, { children: /* @__PURE__ */ jsx25(Component, {}) }, i);
2054
- }) })
2372
+ return /* @__PURE__ */ jsx32(React15.StrictMode, { children: /* @__PURE__ */ jsx32(PestacleProvider, { layouts: layouts2, children: /* @__PURE__ */ jsxs22(MDXProvider, { components: componentsMap2, children: [
2373
+ /* @__PURE__ */ jsx32(GlobalStyle, {}),
2374
+ /* @__PURE__ */ jsx32(
2375
+ SpectacleDeck,
2376
+ {
2377
+ theme: mergedTheme,
2378
+ template,
2379
+ transition: resolveTransition(transition),
2380
+ children: deck.slides.map((slide, i) => {
2381
+ var _a;
2382
+ const Component = slide.slideComponent;
2383
+ const slideTransitionName = (_a = slide.metadata) == null ? void 0 : _a.transition;
2384
+ const slideTransition2 = resolveTransition(slideTransitionName);
2385
+ return /* @__PURE__ */ jsx32(Slide, { transition: slideTransition2, children: /* @__PURE__ */ jsx32(Component, {}) }, i);
2386
+ })
2387
+ }
2388
+ )
2055
2389
  ] }) }) });
2056
2390
  }
2057
2391
  function Danger({ children }) {
2058
- return /* @__PURE__ */ jsx25("div", { style: { color: "red" }, children });
2392
+ return /* @__PURE__ */ jsx32("div", { style: { color: "red" }, children });
2059
2393
  }
2060
2394
  function Information({ children }) {
2061
- return /* @__PURE__ */ jsx25("div", { style: { color: "orange" }, children });
2395
+ return /* @__PURE__ */ jsx32("div", { style: { color: "orange" }, children });
2062
2396
  }
2063
2397
  function Success({ children }) {
2064
- return /* @__PURE__ */ jsx25("div", { style: { color: "green" }, children });
2398
+ return /* @__PURE__ */ jsx32("div", { style: { color: "green" }, children });
2065
2399
  }
2066
2400
  function Warning({ children }) {
2067
- return /* @__PURE__ */ jsx25("div", { style: { color: "yellow" }, children });
2401
+ return /* @__PURE__ */ jsx32("div", { style: { color: "yellow" }, children });
2068
2402
  }
2069
2403
  function Side({ children }) {
2070
- return /* @__PURE__ */ jsx25("div", { children });
2404
+ return /* @__PURE__ */ jsx32("div", { children });
2071
2405
  }
2072
2406
  Side.mdxType = "Side";
2073
2407
  function Documentation({ children }) {
2074
- return /* @__PURE__ */ jsx25("div", { children });
2408
+ return /* @__PURE__ */ jsx32("div", { children });
2075
2409
  }
2076
2410
  function Box2({ children }) {
2077
- return /* @__PURE__ */ jsx25("div", { children });
2411
+ return /* @__PURE__ */ jsx32("div", { children });
2078
2412
  }
2079
2413
  export {
2414
+ AnimatedCounter,
2080
2415
  Box2 as Box,
2081
2416
  Danger,
2082
2417
  Deck,
2083
2418
  Doc,
2084
2419
  DocItem,
2085
2420
  Documentation,
2421
+ FadeIn,
2086
2422
  FilePane,
2087
2423
  HorizontalList,
2088
2424
  HorizontalListItem,
@@ -2092,10 +2428,18 @@ export {
2092
2428
  ItemsColumn,
2093
2429
  Mermaid,
2094
2430
  PassThrough,
2431
+ ProgressRing,
2432
+ ScaleIn,
2095
2433
  Side,
2434
+ Spotlight,
2435
+ StaggerChildren,
2096
2436
  Success,
2097
2437
  Timeline,
2098
2438
  TimelineItem,
2439
+ TypeWriter,
2099
2440
  Warning,
2100
- layouts
2441
+ dropTransition,
2442
+ layouts,
2443
+ noneTransition,
2444
+ resolveTransition
2101
2445
  };