@gpichot/spectacle-deck 1.4.0 → 1.6.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 React16 from "react";
4
4
  import { Slide, Deck as SpectacleDeck } from "spectacle";
5
5
  import { createGlobalStyle } from "styled-components";
6
6
 
@@ -470,6 +470,11 @@ var HeadingTwo = styled2.h2`
470
470
  font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
471
471
  font-size: 55px;
472
472
  font-weight: 400;
473
+
474
+ strong {
475
+ color: var(--color-secondary);
476
+ font-weight: 500;
477
+ }
473
478
  `;
474
479
  var HeadingThree = styled2.h3`
475
480
  font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
@@ -1008,6 +1013,7 @@ var Default3Layout = ({
1008
1013
  };
1009
1014
 
1010
1015
  // src/layouts/FullImageLayout.tsx
1016
+ import React7 from "react";
1011
1017
  import styled6 from "styled-components";
1012
1018
  import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1013
1019
  var Overlay = styled6.div`
@@ -1034,6 +1040,9 @@ function FullImageLayout({
1034
1040
  position = "bottom",
1035
1041
  dim = 0.4
1036
1042
  }) {
1043
+ const [images, rest] = getMatchingMdxType(children, "Image");
1044
+ const firstImage = images[0];
1045
+ const backgroundImage = image || (React7.isValidElement(firstImage) ? firstImage.props.src : void 0);
1037
1046
  const justifyMap = {
1038
1047
  top: "flex-start",
1039
1048
  center: "center",
@@ -1053,7 +1062,7 @@ function FullImageLayout({
1053
1062
  style: {
1054
1063
  position: "absolute",
1055
1064
  inset: 0,
1056
- backgroundImage: `url(${image})`,
1065
+ backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
1057
1066
  backgroundSize: "cover",
1058
1067
  backgroundPosition: "center"
1059
1068
  }
@@ -1069,7 +1078,7 @@ function FullImageLayout({
1069
1078
  }
1070
1079
  }
1071
1080
  ),
1072
- /* @__PURE__ */ jsx10(Overlay, { style: { justifyContent: justifyMap[position] }, children })
1081
+ /* @__PURE__ */ jsx10(Overlay, { style: { justifyContent: justifyMap[position] }, children: firstImage ? rest : children })
1073
1082
  ]
1074
1083
  }
1075
1084
  );
@@ -1223,7 +1232,7 @@ var SectionLayout = styled8.div`
1223
1232
  import styled10 from "styled-components";
1224
1233
 
1225
1234
  // src/layouts/columns.tsx
1226
- import React7 from "react";
1235
+ import React8 from "react";
1227
1236
  import styled9 from "styled-components";
1228
1237
  import { jsx as jsx13 } from "react/jsx-runtime";
1229
1238
  var DivWithHeading = styled9.div`
@@ -1249,7 +1258,7 @@ function ColumnsLayout({
1249
1258
  children,
1250
1259
  reverse
1251
1260
  }) {
1252
- const childrenArray = React7.Children.toArray(children);
1261
+ const childrenArray = React8.Children.toArray(children);
1253
1262
  return /* @__PURE__ */ jsx13(
1254
1263
  ColumnsContainer,
1255
1264
  {
@@ -1548,13 +1557,335 @@ var theme_default = {
1548
1557
  space: [8, 16, 24]
1549
1558
  };
1550
1559
 
1560
+ // src/transitions.ts
1561
+ import {
1562
+ fadeTransition,
1563
+ slideTransition
1564
+ } from "spectacle";
1565
+ var dropTransition = {
1566
+ from: { transform: "translateY(-100%)", opacity: 0 },
1567
+ enter: { transform: "translateY(0%)", opacity: 1 },
1568
+ leave: { transform: "translateY(100%)", opacity: 0 }
1569
+ };
1570
+ var noneTransition = {
1571
+ from: { opacity: 1 },
1572
+ enter: { opacity: 1 },
1573
+ leave: { opacity: 0 }
1574
+ };
1575
+ var transitionMap = {
1576
+ fade: fadeTransition,
1577
+ slide: slideTransition,
1578
+ drop: dropTransition,
1579
+ none: noneTransition
1580
+ };
1581
+ function resolveTransition(name) {
1582
+ if (!name) return void 0;
1583
+ return transitionMap[name];
1584
+ }
1585
+
1551
1586
  // src/index.tsx
1552
1587
  export * from "spectacle";
1553
1588
 
1554
- // src/components/DocumentationItem.tsx
1589
+ // src/components/animations/AnimatedCounter.tsx
1590
+ import { animated, useSpring } from "@react-spring/web";
1591
+
1592
+ // src/components/animations/useInView.ts
1593
+ import React9 from "react";
1594
+ function useInView() {
1595
+ const ref = React9.useRef(null);
1596
+ const [isInView, setIsInView] = React9.useState(false);
1597
+ React9.useEffect(() => {
1598
+ const el = ref.current;
1599
+ if (!el) return;
1600
+ const observer = new IntersectionObserver(
1601
+ ([entry]) => {
1602
+ if (entry.isIntersecting) {
1603
+ setIsInView(true);
1604
+ observer.disconnect();
1605
+ }
1606
+ },
1607
+ { threshold: 0.1 }
1608
+ );
1609
+ observer.observe(el);
1610
+ return () => observer.disconnect();
1611
+ }, []);
1612
+ return [ref, isInView];
1613
+ }
1614
+
1615
+ // src/components/animations/AnimatedCounter.tsx
1616
+ import { jsx as jsx20 } from "react/jsx-runtime";
1617
+ function AnimatedCounter({
1618
+ to,
1619
+ from = 0,
1620
+ duration = 1500,
1621
+ delay = 0,
1622
+ decimals = 0,
1623
+ prefix = "",
1624
+ suffix = ""
1625
+ }) {
1626
+ const [ref, isInView] = useInView();
1627
+ const { value } = useSpring({
1628
+ value: isInView ? to : from,
1629
+ delay: isInView ? delay : 0,
1630
+ config: { duration }
1631
+ });
1632
+ return /* @__PURE__ */ jsx20(animated.span, { ref, style: { fontFamily: "var(--font-family)" }, children: value.to((v) => `${prefix}${v.toFixed(decimals)}${suffix}`) });
1633
+ }
1634
+
1635
+ // src/components/animations/FadeIn.tsx
1636
+ import { animated as animated2, useSpring as useSpring2 } from "@react-spring/web";
1637
+ import { jsx as jsx21 } from "react/jsx-runtime";
1638
+ function FadeIn({
1639
+ children,
1640
+ direction = "up",
1641
+ distance = 20,
1642
+ delay = 0,
1643
+ duration = 400
1644
+ }) {
1645
+ const [ref, isInView] = useInView();
1646
+ const translateMap = {
1647
+ up: `translateY(${distance}px)`,
1648
+ down: `translateY(-${distance}px)`,
1649
+ left: `translateX(${distance}px)`,
1650
+ right: `translateX(-${distance}px)`,
1651
+ none: "translate(0, 0)"
1652
+ };
1653
+ const styles = useSpring2({
1654
+ opacity: isInView ? 1 : 0,
1655
+ transform: isInView ? "translate(0, 0)" : translateMap[direction],
1656
+ delay: isInView ? delay : 0,
1657
+ config: { duration }
1658
+ });
1659
+ return /* @__PURE__ */ jsx21(animated2.div, { ref, style: styles, children });
1660
+ }
1661
+
1662
+ // src/components/animations/ProgressRing.tsx
1663
+ import { animated as animated3, useSpring as useSpring3 } from "@react-spring/web";
1664
+ import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
1665
+ function ProgressRing({
1666
+ value,
1667
+ size = 120,
1668
+ strokeWidth = 8,
1669
+ color = "var(--color-secondary)",
1670
+ trackColor = "rgba(255,255,255,0.1)",
1671
+ duration = 1e3,
1672
+ delay = 0,
1673
+ children
1674
+ }) {
1675
+ const [ref, isInView] = useInView();
1676
+ const radius = (size - strokeWidth) / 2;
1677
+ const circumference = 2 * Math.PI * radius;
1678
+ const targetOffset = circumference - value / 100 * circumference;
1679
+ const { offset } = useSpring3({
1680
+ offset: isInView ? targetOffset : circumference,
1681
+ delay: isInView ? delay : 0,
1682
+ config: { duration }
1683
+ });
1684
+ return /* @__PURE__ */ jsxs15(
1685
+ "div",
1686
+ {
1687
+ ref,
1688
+ style: {
1689
+ position: "relative",
1690
+ width: size,
1691
+ height: size,
1692
+ display: "inline-flex",
1693
+ alignItems: "center",
1694
+ justifyContent: "center"
1695
+ },
1696
+ children: [
1697
+ /* @__PURE__ */ jsxs15(
1698
+ "svg",
1699
+ {
1700
+ width: size,
1701
+ height: size,
1702
+ style: { position: "absolute", transform: "rotate(-90deg)" },
1703
+ children: [
1704
+ /* @__PURE__ */ jsx22(
1705
+ "circle",
1706
+ {
1707
+ cx: size / 2,
1708
+ cy: size / 2,
1709
+ r: radius,
1710
+ fill: "none",
1711
+ stroke: trackColor,
1712
+ strokeWidth
1713
+ }
1714
+ ),
1715
+ /* @__PURE__ */ jsx22(
1716
+ animated3.circle,
1717
+ {
1718
+ cx: size / 2,
1719
+ cy: size / 2,
1720
+ r: radius,
1721
+ fill: "none",
1722
+ stroke: color,
1723
+ strokeWidth,
1724
+ strokeDasharray: circumference,
1725
+ strokeDashoffset: offset,
1726
+ strokeLinecap: "round"
1727
+ }
1728
+ )
1729
+ ]
1730
+ }
1731
+ ),
1732
+ children && /* @__PURE__ */ jsx22(
1733
+ "div",
1734
+ {
1735
+ style: {
1736
+ position: "relative",
1737
+ zIndex: 1,
1738
+ fontFamily: "var(--font-family)"
1739
+ },
1740
+ children
1741
+ }
1742
+ )
1743
+ ]
1744
+ }
1745
+ );
1746
+ }
1747
+
1748
+ // src/components/animations/ScaleIn.tsx
1749
+ import { animated as animated4, useSpring as useSpring4 } from "@react-spring/web";
1750
+ import { jsx as jsx23 } from "react/jsx-runtime";
1751
+ function ScaleIn({
1752
+ children,
1753
+ from = 0,
1754
+ delay = 0,
1755
+ duration = 400
1756
+ }) {
1757
+ const [ref, isInView] = useInView();
1758
+ const styles = useSpring4({
1759
+ opacity: isInView ? 1 : 0,
1760
+ transform: isInView ? "scale(1)" : `scale(${from})`,
1761
+ delay: isInView ? delay : 0,
1762
+ config: { duration }
1763
+ });
1764
+ return /* @__PURE__ */ jsx23(animated4.div, { ref, style: styles, children });
1765
+ }
1766
+
1767
+ // src/components/animations/Spotlight.tsx
1555
1768
  import styled13 from "styled-components";
1556
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
1557
- var DocWrapper = styled13.div`
1769
+ import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
1770
+ var Overlay2 = styled13.div`
1771
+ position: fixed;
1772
+ inset: 0;
1773
+ background: rgba(0, 0, 0, ${(p) => p.$active ? p.$dimOpacity : 0});
1774
+ pointer-events: ${(p) => p.$active ? "auto" : "none"};
1775
+ transition: background 0.4s ease;
1776
+ z-index: 99;
1777
+ `;
1778
+ var Content = styled13.div`
1779
+ position: relative;
1780
+ z-index: ${(p) => p.$active ? 100 : "auto"};
1781
+ `;
1782
+ function Spotlight({
1783
+ children,
1784
+ active = true,
1785
+ dimOpacity = 0.7
1786
+ }) {
1787
+ return /* @__PURE__ */ jsxs16(Fragment2, { children: [
1788
+ /* @__PURE__ */ jsx24(Overlay2, { $active: active, $dimOpacity: dimOpacity }),
1789
+ /* @__PURE__ */ jsx24(Content, { $active: active, children })
1790
+ ] });
1791
+ }
1792
+
1793
+ // src/components/animations/StaggerChildren.tsx
1794
+ import { animated as animated5, useSprings } from "@react-spring/web";
1795
+ import React10 from "react";
1796
+ import { jsx as jsx25 } from "react/jsx-runtime";
1797
+ function StaggerChildren({
1798
+ children,
1799
+ stagger = 100,
1800
+ delay = 0,
1801
+ duration = 400,
1802
+ direction = "up",
1803
+ distance = 20
1804
+ }) {
1805
+ const [ref, isInView] = useInView();
1806
+ const items = React10.Children.toArray(children);
1807
+ const translateMap = {
1808
+ up: `translateY(${distance}px)`,
1809
+ down: `translateY(-${distance}px)`,
1810
+ left: `translateX(${distance}px)`,
1811
+ right: `translateX(-${distance}px)`,
1812
+ none: "translate(0, 0)"
1813
+ };
1814
+ const springs = useSprings(
1815
+ items.length,
1816
+ items.map((_, i) => ({
1817
+ opacity: isInView ? 1 : 0,
1818
+ transform: isInView ? "translate(0, 0)" : translateMap[direction],
1819
+ delay: isInView ? delay + i * stagger : 0,
1820
+ config: { duration }
1821
+ }))
1822
+ );
1823
+ return /* @__PURE__ */ jsx25("div", { ref, children: springs.map((style2, i) => /* @__PURE__ */ jsx25(animated5.div, { style: style2, children: items[i] }, i)) });
1824
+ }
1825
+
1826
+ // src/components/animations/TypeWriter.tsx
1827
+ import React11 from "react";
1828
+ import { jsx as jsx26, jsxs as jsxs17 } from "react/jsx-runtime";
1829
+ function extractText(node) {
1830
+ if (typeof node === "string") return node;
1831
+ if (typeof node === "number") return String(node);
1832
+ if (!node) return "";
1833
+ if (Array.isArray(node)) return node.map(extractText).join("");
1834
+ if (React11.isValidElement(node)) {
1835
+ const props = node.props;
1836
+ return extractText(props.children);
1837
+ }
1838
+ return "";
1839
+ }
1840
+ function TypeWriter({
1841
+ children,
1842
+ speed = 50,
1843
+ delay = 0,
1844
+ cursor = true
1845
+ }) {
1846
+ const text = extractText(children);
1847
+ const [ref, isInView] = useInView();
1848
+ const [displayed, setDisplayed] = React11.useState("");
1849
+ const [done, setDone] = React11.useState(false);
1850
+ React11.useEffect(() => {
1851
+ if (!isInView) return;
1852
+ let index = 0;
1853
+ setDisplayed("");
1854
+ setDone(false);
1855
+ const timeout = setTimeout(() => {
1856
+ const interval = setInterval(() => {
1857
+ if (index < text.length) {
1858
+ setDisplayed(text.slice(0, index + 1));
1859
+ index++;
1860
+ } else {
1861
+ setDone(true);
1862
+ clearInterval(interval);
1863
+ }
1864
+ }, speed);
1865
+ return () => clearInterval(interval);
1866
+ }, delay);
1867
+ return () => clearTimeout(timeout);
1868
+ }, [text, speed, delay, isInView]);
1869
+ return /* @__PURE__ */ jsxs17("span", { ref, style: { fontFamily: "var(--font-family)" }, children: [
1870
+ displayed,
1871
+ cursor && /* @__PURE__ */ jsx26(
1872
+ "span",
1873
+ {
1874
+ style: {
1875
+ borderRight: "2px solid currentColor",
1876
+ marginLeft: 1,
1877
+ animation: done ? "pestacle-blink 1s step-end infinite" : "none"
1878
+ },
1879
+ children: /* @__PURE__ */ jsx26("style", { children: `@keyframes pestacle-blink { 50% { opacity: 0; } }` })
1880
+ }
1881
+ )
1882
+ ] });
1883
+ }
1884
+
1885
+ // src/components/DocumentationItem.tsx
1886
+ import styled14 from "styled-components";
1887
+ import { jsx as jsx27, jsxs as jsxs18 } from "react/jsx-runtime";
1888
+ var DocWrapper = styled14.div`
1558
1889
  position: absolute;
1559
1890
  bottom: 0;
1560
1891
  right: 0;
@@ -1568,20 +1899,20 @@ var DocWrapper = styled13.div`
1568
1899
  display: flex;
1569
1900
  }
1570
1901
  `;
1571
- var DocContainer = styled13.div`
1902
+ var DocContainer = styled14.div`
1572
1903
  margin: 2rem 1rem;
1573
1904
  background-color: #333;
1574
1905
  border: 1px solid #333;
1575
1906
  padding: 0.5rem 1rem;
1576
1907
  border-radius: 1.5rem;
1577
1908
  `;
1578
- var DocLink = styled13.a`
1909
+ var DocLink = styled14.a`
1579
1910
  text-decoration: none;
1580
1911
  font-weight: normal;
1581
1912
  font-family: var(--font-family);
1582
1913
  color: var(--color-secondary);
1583
1914
  `;
1584
- var DocLinkItem = styled13(DocLink)`
1915
+ var DocLinkItem = styled14(DocLink)`
1585
1916
  width: fit-content;
1586
1917
  display: inline-block;
1587
1918
  background-color: #333;
@@ -1590,7 +1921,7 @@ var DocLinkItem = styled13(DocLink)`
1590
1921
  border-radius: 1.5rem;
1591
1922
  margin: 0.25rem 0;
1592
1923
  `;
1593
- var DocContent = styled13.div`
1924
+ var DocContent = styled14.div`
1594
1925
  display: flex;
1595
1926
  flex-flow: column-reverse nowrap;
1596
1927
  position: absolute;
@@ -1605,24 +1936,24 @@ function Doc({
1605
1936
  link,
1606
1937
  children
1607
1938
  }) {
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 }) })
1939
+ return /* @__PURE__ */ jsx27(DocWrapper, { children: /* @__PURE__ */ jsxs18(DocContainer, { children: [
1940
+ children && /* @__PURE__ */ jsx27(DocContent, { children }),
1941
+ /* @__PURE__ */ jsx27("div", { children: /* @__PURE__ */ jsx27(DocLink, { target: "_blank", rel: "noopener noreferrer", href: link, children: label }) })
1611
1942
  ] }) });
1612
1943
  }
1613
1944
  function DocItem({ label, link }) {
1614
- return /* @__PURE__ */ jsx20(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link, children: label });
1945
+ return /* @__PURE__ */ jsx27(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link, children: label });
1615
1946
  }
1616
1947
 
1617
1948
  // src/components/FilePane.tsx
1618
- import React8 from "react";
1949
+ import React12 from "react";
1619
1950
  function FilePane({
1620
1951
  name,
1621
1952
  children,
1622
1953
  priority,
1623
1954
  ...divProps
1624
1955
  }) {
1625
- return React8.isValidElement(children) ? React8.cloneElement(children, {
1956
+ return React12.isValidElement(children) ? React12.cloneElement(children, {
1626
1957
  // @ts-expect-error cloning
1627
1958
  priority,
1628
1959
  name
@@ -1631,12 +1962,12 @@ function FilePane({
1631
1962
  FilePane.mdxType = "FilePane";
1632
1963
 
1633
1964
  // src/components/HorizontalList.tsx
1634
- import { animated, useSpring } from "@react-spring/web";
1635
- import React9 from "react";
1965
+ import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
1966
+ import React13 from "react";
1636
1967
  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`
1968
+ import styled15 from "styled-components";
1969
+ import { jsx as jsx28, jsxs as jsxs19 } from "react/jsx-runtime";
1970
+ var Container = styled15.div`
1640
1971
  display: grid;
1641
1972
  grid-gap: 2rem;
1642
1973
  `;
@@ -1644,18 +1975,18 @@ function HorizontalList({
1644
1975
  children,
1645
1976
  columns = 3
1646
1977
  }) {
1647
- const items = React9.Children.toArray(children);
1648
- return /* @__PURE__ */ jsx21(Stepper2, { values: items, children: (_, step) => /* @__PURE__ */ jsx21(
1978
+ const items = React13.Children.toArray(children);
1979
+ return /* @__PURE__ */ jsx28(Stepper2, { values: items, children: (_, step) => /* @__PURE__ */ jsx28(
1649
1980
  Container,
1650
1981
  {
1651
1982
  style: {
1652
1983
  gridTemplateColumns: `repeat(${columns}, 1fr)`
1653
1984
  },
1654
1985
  children: items.map((item, k) => {
1655
- if (!React9.isValidElement(item)) {
1986
+ if (!React13.isValidElement(item)) {
1656
1987
  return item;
1657
1988
  }
1658
- return React9.cloneElement(item, {
1989
+ return React13.cloneElement(item, {
1659
1990
  // @ts-expect-error cloning
1660
1991
  position: k + 1,
1661
1992
  isVisible: k <= step,
@@ -1666,11 +1997,11 @@ function HorizontalList({
1666
1997
  ) });
1667
1998
  }
1668
1999
  function Pill({ position }) {
1669
- return /* @__PURE__ */ jsx21(
2000
+ return /* @__PURE__ */ jsx28(
1670
2001
  "div",
1671
2002
  {
1672
2003
  style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 },
1673
- children: /* @__PURE__ */ jsxs16(
2004
+ children: /* @__PURE__ */ jsxs19(
1674
2005
  "svg",
1675
2006
  {
1676
2007
  width: "48",
@@ -1679,14 +2010,14 @@ function Pill({ position }) {
1679
2010
  fill: "none",
1680
2011
  xmlns: "http://www.w3.org/2000/svg",
1681
2012
  children: [
1682
- /* @__PURE__ */ jsx21(
2013
+ /* @__PURE__ */ jsx28(
1683
2014
  "path",
1684
2015
  {
1685
2016
  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
2017
  fill: "#ffffff"
1687
2018
  }
1688
2019
  ),
1689
- /* @__PURE__ */ jsx21(
2020
+ /* @__PURE__ */ jsx28(
1690
2021
  "text",
1691
2022
  {
1692
2023
  x: "9",
@@ -1698,7 +2029,7 @@ function Pill({ position }) {
1698
2029
  children: position
1699
2030
  }
1700
2031
  ),
1701
- /* @__PURE__ */ jsx21(
2032
+ /* @__PURE__ */ jsx28(
1702
2033
  "path",
1703
2034
  {
1704
2035
  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 +2042,12 @@ function Pill({ position }) {
1711
2042
  }
1712
2043
  );
1713
2044
  }
1714
- var Item = styled14(animated.div)`
2045
+ var Item = styled15(animated6.div)`
1715
2046
  display: flex;
1716
2047
  flex-direction: column;
1717
2048
  font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1718
2049
  `;
1719
- var ItemHead = styled14.div`
2050
+ var ItemHead = styled15.div`
1720
2051
  display: flex;
1721
2052
  flex-direction: row;
1722
2053
  font-size: 1.3rem;
@@ -1726,7 +2057,7 @@ var ItemHead = styled14.div`
1726
2057
  margin: 0;
1727
2058
  }
1728
2059
  `;
1729
- var ItemContent = styled14.div`
2060
+ var ItemContent = styled15.div`
1730
2061
  > * {
1731
2062
  font-size: 1rem;
1732
2063
  padding: 4px !important;
@@ -1749,22 +2080,22 @@ function HorizontalListItem({
1749
2080
  isVisible,
1750
2081
  isLast
1751
2082
  }) {
1752
- const opacityStyles = useSpring({
2083
+ const opacityStyles = useSpring5({
1753
2084
  opacity: getItemOpacity({ isVisible, isLast })
1754
2085
  });
1755
- return /* @__PURE__ */ jsxs16(Item, { style: opacityStyles, children: [
1756
- /* @__PURE__ */ jsxs16(ItemHead, { children: [
1757
- /* @__PURE__ */ jsx21(Pill, { position }),
1758
- /* @__PURE__ */ jsx21("p", { children: title })
2086
+ return /* @__PURE__ */ jsxs19(Item, { style: opacityStyles, children: [
2087
+ /* @__PURE__ */ jsxs19(ItemHead, { children: [
2088
+ /* @__PURE__ */ jsx28(Pill, { position }),
2089
+ /* @__PURE__ */ jsx28("p", { children: title })
1759
2090
  ] }),
1760
- /* @__PURE__ */ jsx21(ItemContent, { children })
2091
+ /* @__PURE__ */ jsx28(ItemContent, { children })
1761
2092
  ] });
1762
2093
  }
1763
2094
 
1764
2095
  // 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`
2096
+ import styled16 from "styled-components";
2097
+ import { jsx as jsx29, jsxs as jsxs20 } from "react/jsx-runtime";
2098
+ var IconBoxContent = styled16.div`
1768
2099
  * {
1769
2100
  margin: 0.2rem !important;
1770
2101
  padding: 0 !important;
@@ -1774,7 +2105,7 @@ function IconBox({
1774
2105
  children,
1775
2106
  icon
1776
2107
  }) {
1777
- return /* @__PURE__ */ jsxs17(
2108
+ return /* @__PURE__ */ jsxs20(
1778
2109
  "div",
1779
2110
  {
1780
2111
  style: {
@@ -1784,23 +2115,23 @@ function IconBox({
1784
2115
  padding: "1rem 0"
1785
2116
  },
1786
2117
  children: [
1787
- /* @__PURE__ */ jsx22("div", { style: { fontSize: 60 }, children: icon }),
1788
- /* @__PURE__ */ jsx22(IconBoxContent, { children })
2118
+ /* @__PURE__ */ jsx29("div", { style: { fontSize: 60 }, children: icon }),
2119
+ /* @__PURE__ */ jsx29(IconBoxContent, { children })
1789
2120
  ]
1790
2121
  }
1791
2122
  );
1792
2123
  }
1793
2124
 
1794
2125
  // src/components/ItemsColumn.tsx
1795
- import { animated as animated2, useSpring as useSpring2 } from "@react-spring/web";
1796
- import React10 from "react";
2126
+ import { animated as animated7, useSpring as useSpring6 } from "@react-spring/web";
2127
+ import React14 from "react";
1797
2128
  import { Stepper as Stepper3 } from "spectacle";
1798
- import styled16 from "styled-components";
1799
- import { jsx as jsx23 } from "react/jsx-runtime";
2129
+ import styled17 from "styled-components";
2130
+ import { jsx as jsx30 } from "react/jsx-runtime";
1800
2131
  function ItemsColumn(divProps) {
1801
2132
  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(
2133
+ const childrenArray = React14.Children.toArray(children);
2134
+ return /* @__PURE__ */ jsx30(Stepper3, { values: childrenArray, children: (_value, step) => /* @__PURE__ */ jsx30(
1804
2135
  "div",
1805
2136
  {
1806
2137
  style: {
@@ -1815,15 +2146,15 @@ function ItemsColumn(divProps) {
1815
2146
  ...props,
1816
2147
  children: childrenArray.map((child, index) => {
1817
2148
  const isVisible = index <= step;
1818
- if (!React10.isValidElement(child)) {
2149
+ if (!React14.isValidElement(child)) {
1819
2150
  return child;
1820
2151
  }
1821
- return /* @__PURE__ */ jsx23(ItemColumnWrapper, { isVisible, children: child }, index);
2152
+ return /* @__PURE__ */ jsx30(ItemColumnWrapper, { isVisible, children: child }, index);
1822
2153
  })
1823
2154
  }
1824
2155
  ) });
1825
2156
  }
1826
- var ItemColumnWrapperStyled = styled16(animated2.div)`
2157
+ var ItemColumnWrapperStyled = styled17(animated7.div)`
1827
2158
  display: flex;
1828
2159
  justify-content: center;
1829
2160
  * {
@@ -1835,33 +2166,33 @@ function ItemColumnWrapper({
1835
2166
  isVisible,
1836
2167
  ...props
1837
2168
  }) {
1838
- const styles = useSpring2({ opacity: isVisible ? 1 : 0 });
1839
- return /* @__PURE__ */ jsx23(ItemColumnWrapperStyled, { style: styles, ...props, children });
2169
+ const styles = useSpring6({ opacity: isVisible ? 1 : 0 });
2170
+ return /* @__PURE__ */ jsx30(ItemColumnWrapperStyled, { style: styles, ...props, children });
1840
2171
  }
1841
2172
 
1842
2173
  // src/components/Timeline.tsx
1843
- import { animated as animated3, useSpring as useSpring3 } from "@react-spring/web";
1844
- import React11 from "react";
2174
+ import { animated as animated8, useSpring as useSpring7 } from "@react-spring/web";
2175
+ import React15 from "react";
1845
2176
  import { Stepper as Stepper4 } from "spectacle";
1846
- import styled18 from "styled-components";
2177
+ import styled19 from "styled-components";
1847
2178
 
1848
2179
  // src/components/Timeline.styled.tsx
1849
- import styled17 from "styled-components";
1850
- var TimelineItemContent = styled17.div`
2180
+ import styled18 from "styled-components";
2181
+ var TimelineItemContent = styled18.div`
1851
2182
  display: flex;
1852
2183
  padding: 0.7rem 0 1rem 12px;
1853
2184
  `;
1854
- var TimelineItemContentPhantom = styled17(TimelineItemContent)`
2185
+ var TimelineItemContentPhantom = styled18(TimelineItemContent)`
1855
2186
  opacity: 0;
1856
2187
  `;
1857
- var TimelineItemBody = styled17.div`
2188
+ var TimelineItemBody = styled18.div`
1858
2189
  &,
1859
2190
  & > * {
1860
2191
  font-size: 1.3rem !important;
1861
2192
  color: #ffffff !important;
1862
2193
  }
1863
2194
  `;
1864
- var TimelineItemTitle = styled17.div`
2195
+ var TimelineItemTitle = styled18.div`
1865
2196
  font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
1866
2197
  font-size: 1rem;
1867
2198
  font-weight: bold;
@@ -1869,8 +2200,8 @@ var TimelineItemTitle = styled17.div`
1869
2200
  `;
1870
2201
 
1871
2202
  // src/components/Timeline.tsx
1872
- import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
1873
- var TimelineItemStyled = styled18(animated3.div)`
2203
+ import { jsx as jsx31, jsxs as jsxs21 } from "react/jsx-runtime";
2204
+ var TimelineItemStyled = styled19(animated8.div)`
1874
2205
  flex: 1;
1875
2206
  flex-flow: column nowrap;
1876
2207
  display: inline-flex;
@@ -1888,7 +2219,7 @@ var TimelineItemStyled = styled18(animated3.div)`
1888
2219
  }
1889
2220
  }
1890
2221
  `;
1891
- var TimelineItemGuide = styled18(animated3.div)`
2222
+ var TimelineItemGuide = styled19(animated8.div)`
1892
2223
  width: 100%;
1893
2224
  padding-top: 2px;
1894
2225
  display: flex;
@@ -1904,7 +2235,7 @@ var TimelineItemGuide = styled18(animated3.div)`
1904
2235
  margin-right: 4px;
1905
2236
  }
1906
2237
  `;
1907
- var TimelineItemGuideLine = styled18(animated3.div)`
2238
+ var TimelineItemGuideLine = styled19(animated8.div)`
1908
2239
  border-top: 4px solid #ffffff;
1909
2240
  margin-right: 4px;
1910
2241
  `;
@@ -1915,8 +2246,8 @@ var style = {
1915
2246
  alignItems: "center"
1916
2247
  };
1917
2248
  function Timeline(props) {
1918
- const children = React11.Children.toArray(props.children);
1919
- return /* @__PURE__ */ jsx24(
2249
+ const children = React15.Children.toArray(props.children);
2250
+ return /* @__PURE__ */ jsx31(
1920
2251
  Stepper4,
1921
2252
  {
1922
2253
  ...props,
@@ -1925,10 +2256,10 @@ function Timeline(props) {
1925
2256
  inactiveStyle: style,
1926
2257
  children: (_value, step) => {
1927
2258
  return children.map((child, index) => {
1928
- if (!React11.isValidElement(child)) {
2259
+ if (!React15.isValidElement(child)) {
1929
2260
  return child;
1930
2261
  }
1931
- return React11.cloneElement(child, {
2262
+ return React15.cloneElement(child, {
1932
2263
  // @ts-expect-error cloning
1933
2264
  isPhantom: step < index,
1934
2265
  isLast: step === index
@@ -1948,14 +2279,14 @@ function getItemOpacity2({
1948
2279
  }
1949
2280
  function TimelineItem(props) {
1950
2281
  const { children, title, isPhantom, isLast, ...rest } = props;
1951
- const guideLineProps = useSpring3({
2282
+ const guideLineProps = useSpring7({
1952
2283
  width: isPhantom || isLast ? "0%" : "100%"
1953
2284
  });
1954
- const appearStyles = useSpring3({
2285
+ const appearStyles = useSpring7({
1955
2286
  opacity: getItemOpacity2({ isPhantom, isLast })
1956
2287
  });
1957
- const colorStyles = useSpring3({ opacity: isPhantom || isLast ? 1 : 0.15 });
1958
- return /* @__PURE__ */ jsxs18(
2288
+ const colorStyles = useSpring7({ opacity: isPhantom || isLast ? 1 : 0.15 });
2289
+ return /* @__PURE__ */ jsxs21(
1959
2290
  TimelineItemStyled,
1960
2291
  {
1961
2292
  ...rest,
@@ -1963,24 +2294,24 @@ function TimelineItem(props) {
1963
2294
  ...appearStyles
1964
2295
  },
1965
2296
  children: [
1966
- /* @__PURE__ */ jsxs18(TimelineItemContentPhantom, { children: [
1967
- /* @__PURE__ */ jsx24(TimelineItemTitle, { children: title }),
1968
- /* @__PURE__ */ jsx24(TimelineItemBody, { children })
2297
+ /* @__PURE__ */ jsxs21(TimelineItemContentPhantom, { children: [
2298
+ /* @__PURE__ */ jsx31(TimelineItemTitle, { children: title }),
2299
+ /* @__PURE__ */ jsx31(TimelineItemBody, { children })
1969
2300
  ] }),
1970
- /* @__PURE__ */ jsxs18(TimelineItemGuide, { style: colorStyles, children: [
1971
- /* @__PURE__ */ jsx24(Hexagon, {}),
1972
- /* @__PURE__ */ jsx24(TimelineItemGuideLine, { style: guideLineProps })
2301
+ /* @__PURE__ */ jsxs21(TimelineItemGuide, { style: colorStyles, children: [
2302
+ /* @__PURE__ */ jsx31(Hexagon, {}),
2303
+ /* @__PURE__ */ jsx31(TimelineItemGuideLine, { style: guideLineProps })
1973
2304
  ] }),
1974
- /* @__PURE__ */ jsxs18(TimelineItemContent, { children: [
1975
- /* @__PURE__ */ jsx24(TimelineItemTitle, { children: title }),
1976
- /* @__PURE__ */ jsx24(TimelineItemBody, { children })
2305
+ /* @__PURE__ */ jsxs21(TimelineItemContent, { children: [
2306
+ /* @__PURE__ */ jsx31(TimelineItemTitle, { children: title }),
2307
+ /* @__PURE__ */ jsx31(TimelineItemBody, { children })
1977
2308
  ] })
1978
2309
  ]
1979
2310
  }
1980
2311
  );
1981
2312
  }
1982
2313
  function Hexagon() {
1983
- return /* @__PURE__ */ jsxs18(
2314
+ return /* @__PURE__ */ jsxs21(
1984
2315
  "svg",
1985
2316
  {
1986
2317
  width: "18",
@@ -1989,14 +2320,14 @@ function Hexagon() {
1989
2320
  fill: "none",
1990
2321
  xmlns: "http://www.w3.org/2000/svg",
1991
2322
  children: [
1992
- /* @__PURE__ */ jsx24(
2323
+ /* @__PURE__ */ jsx31(
1993
2324
  "path",
1994
2325
  {
1995
2326
  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
2327
  fill: "#F49676"
1997
2328
  }
1998
2329
  ),
1999
- /* @__PURE__ */ jsx24(
2330
+ /* @__PURE__ */ jsx31(
2000
2331
  "path",
2001
2332
  {
2002
2333
  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 +2340,9 @@ function Hexagon() {
2009
2340
  }
2010
2341
 
2011
2342
  // src/index.tsx
2012
- import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
2343
+ import { Fragment as Fragment3, jsx as jsx32, jsxs as jsxs22 } from "react/jsx-runtime";
2013
2344
  function PassThrough({ children }) {
2014
- return /* @__PURE__ */ jsx25(Fragment2, { children });
2345
+ return /* @__PURE__ */ jsx32(Fragment3, { children });
2015
2346
  }
2016
2347
  var layouts = layouts_default;
2017
2348
  var componentsMap2 = {
@@ -2021,12 +2352,13 @@ var componentsMap2 = {
2021
2352
  function Deck({
2022
2353
  deck,
2023
2354
  theme,
2024
- layouts: layouts2 = layouts_default
2355
+ layouts: layouts2 = layouts_default,
2356
+ transition
2025
2357
  }) {
2026
- React12.useEffect(() => {
2358
+ React16.useEffect(() => {
2027
2359
  document.title = deck.metadata.title || "Untitled";
2028
2360
  }, [deck.metadata.title]);
2029
- const mergedTheme = React12.useMemo(() => {
2361
+ const mergedTheme = React16.useMemo(() => {
2030
2362
  const fonts = {
2031
2363
  ...theme_default.fonts,
2032
2364
  ...theme.themeTokens.fonts ?? {}
@@ -2037,7 +2369,7 @@ function Deck({
2037
2369
  fonts
2038
2370
  };
2039
2371
  }, [theme]);
2040
- const GlobalStyle = React12.useMemo(() => {
2372
+ const GlobalStyle = React16.useMemo(() => {
2041
2373
  const cssVariables = createCssVariables(theme.themeTokens.colors);
2042
2374
  return createGlobalStyle`
2043
2375
  :root {
@@ -2046,43 +2378,56 @@ function Deck({
2046
2378
  }
2047
2379
  `;
2048
2380
  }, [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
- }) })
2381
+ return /* @__PURE__ */ jsx32(React16.StrictMode, { children: /* @__PURE__ */ jsx32(PestacleProvider, { layouts: layouts2, children: /* @__PURE__ */ jsxs22(MDXProvider, { components: componentsMap2, children: [
2382
+ /* @__PURE__ */ jsx32(GlobalStyle, {}),
2383
+ /* @__PURE__ */ jsx32(
2384
+ SpectacleDeck,
2385
+ {
2386
+ theme: mergedTheme,
2387
+ template,
2388
+ transition: resolveTransition(transition),
2389
+ children: deck.slides.map((slide, i) => {
2390
+ var _a;
2391
+ const Component = slide.slideComponent;
2392
+ const slideTransitionName = (_a = slide.metadata) == null ? void 0 : _a.transition;
2393
+ const slideTransition2 = resolveTransition(slideTransitionName);
2394
+ return /* @__PURE__ */ jsx32(Slide, { transition: slideTransition2, children: /* @__PURE__ */ jsx32(Component, {}) }, i);
2395
+ })
2396
+ }
2397
+ )
2055
2398
  ] }) }) });
2056
2399
  }
2057
2400
  function Danger({ children }) {
2058
- return /* @__PURE__ */ jsx25("div", { style: { color: "red" }, children });
2401
+ return /* @__PURE__ */ jsx32("div", { style: { color: "red" }, children });
2059
2402
  }
2060
2403
  function Information({ children }) {
2061
- return /* @__PURE__ */ jsx25("div", { style: { color: "orange" }, children });
2404
+ return /* @__PURE__ */ jsx32("div", { style: { color: "orange" }, children });
2062
2405
  }
2063
2406
  function Success({ children }) {
2064
- return /* @__PURE__ */ jsx25("div", { style: { color: "green" }, children });
2407
+ return /* @__PURE__ */ jsx32("div", { style: { color: "green" }, children });
2065
2408
  }
2066
2409
  function Warning({ children }) {
2067
- return /* @__PURE__ */ jsx25("div", { style: { color: "yellow" }, children });
2410
+ return /* @__PURE__ */ jsx32("div", { style: { color: "yellow" }, children });
2068
2411
  }
2069
2412
  function Side({ children }) {
2070
- return /* @__PURE__ */ jsx25("div", { children });
2413
+ return /* @__PURE__ */ jsx32("div", { children });
2071
2414
  }
2072
2415
  Side.mdxType = "Side";
2073
2416
  function Documentation({ children }) {
2074
- return /* @__PURE__ */ jsx25("div", { children });
2417
+ return /* @__PURE__ */ jsx32("div", { children });
2075
2418
  }
2076
2419
  function Box2({ children }) {
2077
- return /* @__PURE__ */ jsx25("div", { children });
2420
+ return /* @__PURE__ */ jsx32("div", { children });
2078
2421
  }
2079
2422
  export {
2423
+ AnimatedCounter,
2080
2424
  Box2 as Box,
2081
2425
  Danger,
2082
2426
  Deck,
2083
2427
  Doc,
2084
2428
  DocItem,
2085
2429
  Documentation,
2430
+ FadeIn,
2086
2431
  FilePane,
2087
2432
  HorizontalList,
2088
2433
  HorizontalListItem,
@@ -2092,10 +2437,18 @@ export {
2092
2437
  ItemsColumn,
2093
2438
  Mermaid,
2094
2439
  PassThrough,
2440
+ ProgressRing,
2441
+ ScaleIn,
2095
2442
  Side,
2443
+ Spotlight,
2444
+ StaggerChildren,
2096
2445
  Success,
2097
2446
  Timeline,
2098
2447
  TimelineItem,
2448
+ TypeWriter,
2099
2449
  Warning,
2100
- layouts
2450
+ dropTransition,
2451
+ layouts,
2452
+ noneTransition,
2453
+ resolveTransition
2101
2454
  };