@gpichot/spectacle-deck 1.8.0 → 1.11.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/SkipStepsShortcut.d.ts +5 -0
- package/index.cjs +240 -139
- package/index.d.ts +7 -0
- package/index.mjs +199 -98
- package/layouts/FullImageLayout.d.ts +2 -1
- package/layouts/TwoColumnLayout.d.ts +4 -0
- package/layouts/index.d.ts +2 -0
- package/package.json +9 -1
package/index.cjs
CHANGED
|
@@ -31,6 +31,7 @@ var src_exports = {};
|
|
|
31
31
|
__export(src_exports, {
|
|
32
32
|
AnimatedCounter: () => AnimatedCounter,
|
|
33
33
|
Box: () => Box2,
|
|
34
|
+
Column: () => Column,
|
|
34
35
|
Danger: () => Danger,
|
|
35
36
|
Deck: () => Deck,
|
|
36
37
|
Doc: () => Doc,
|
|
@@ -61,9 +62,9 @@ __export(src_exports, {
|
|
|
61
62
|
noneTransition: () => noneTransition,
|
|
62
63
|
resolveTransition: () => resolveTransition
|
|
63
64
|
});
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
65
|
+
var import_react17 = require("@mdx-js/react");
|
|
66
|
+
var import_react18 = __toESM(require("react"));
|
|
67
|
+
var import_spectacle12 = require("spectacle");
|
|
67
68
|
var import_styled_components20 = require("styled-components");
|
|
68
69
|
|
|
69
70
|
// src/colors.ts
|
|
@@ -1080,7 +1081,7 @@ var Overlay = import_styled_components6.default.div`
|
|
|
1080
1081
|
display: flex;
|
|
1081
1082
|
flex-flow: column nowrap;
|
|
1082
1083
|
justify-content: flex-end;
|
|
1083
|
-
padding: 4rem 6rem;
|
|
1084
|
+
padding: ${(props) => props.$padding || "4rem 6rem"};
|
|
1084
1085
|
z-index: 1;
|
|
1085
1086
|
|
|
1086
1087
|
h1,
|
|
@@ -1096,10 +1097,11 @@ function FullImageLayout({
|
|
|
1096
1097
|
children,
|
|
1097
1098
|
image,
|
|
1098
1099
|
position = "bottom",
|
|
1099
|
-
dim = 0
|
|
1100
|
+
dim = 0,
|
|
1100
1101
|
fit = "cover",
|
|
1101
1102
|
backgroundColor,
|
|
1102
|
-
margin
|
|
1103
|
+
margin,
|
|
1104
|
+
padding
|
|
1103
1105
|
}) {
|
|
1104
1106
|
const [images, rest] = getMatchingMdxType(children, "Image");
|
|
1105
1107
|
const firstImage = images[0];
|
|
@@ -1127,12 +1129,14 @@ function FullImageLayout({
|
|
|
1127
1129
|
backgroundSize: fit,
|
|
1128
1130
|
backgroundPosition: "center",
|
|
1129
1131
|
backgroundRepeat: "no-repeat",
|
|
1132
|
+
backgroundOrigin: padding ? "content-box" : void 0,
|
|
1130
1133
|
backgroundColor,
|
|
1131
|
-
margin
|
|
1134
|
+
margin,
|
|
1135
|
+
padding
|
|
1132
1136
|
}
|
|
1133
1137
|
}
|
|
1134
1138
|
),
|
|
1135
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1139
|
+
dim > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1136
1140
|
"div",
|
|
1137
1141
|
{
|
|
1138
1142
|
style: {
|
|
@@ -1142,7 +1146,14 @@ function FullImageLayout({
|
|
|
1142
1146
|
}
|
|
1143
1147
|
}
|
|
1144
1148
|
),
|
|
1145
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1149
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1150
|
+
Overlay,
|
|
1151
|
+
{
|
|
1152
|
+
$padding: padding,
|
|
1153
|
+
style: { justifyContent: justifyMap[position] },
|
|
1154
|
+
children: firstImage ? rest : children
|
|
1155
|
+
}
|
|
1156
|
+
)
|
|
1146
1157
|
]
|
|
1147
1158
|
}
|
|
1148
1159
|
);
|
|
@@ -1535,6 +1546,58 @@ function SideLayout({
|
|
|
1535
1546
|
] });
|
|
1536
1547
|
}
|
|
1537
1548
|
|
|
1549
|
+
// src/layouts/TwoColumnLayout.tsx
|
|
1550
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1551
|
+
function TwoColumnLayout({ children }) {
|
|
1552
|
+
const [heading, rest] = getHeading(children);
|
|
1553
|
+
const [columnContent, leftContent] = getMatchingMdxType(rest, "Column");
|
|
1554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1555
|
+
"div",
|
|
1556
|
+
{
|
|
1557
|
+
style: {
|
|
1558
|
+
position: "absolute",
|
|
1559
|
+
top: 0,
|
|
1560
|
+
right: 0,
|
|
1561
|
+
bottom: 0,
|
|
1562
|
+
left: 0,
|
|
1563
|
+
display: "flex",
|
|
1564
|
+
flexDirection: "column",
|
|
1565
|
+
marginBottom: "5rem"
|
|
1566
|
+
},
|
|
1567
|
+
children: [
|
|
1568
|
+
heading && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1569
|
+
"div",
|
|
1570
|
+
{
|
|
1571
|
+
style: {
|
|
1572
|
+
backgroundColor: "#ffffff11",
|
|
1573
|
+
padding: "2rem 5rem",
|
|
1574
|
+
marginBottom: "1rem"
|
|
1575
|
+
},
|
|
1576
|
+
children: heading
|
|
1577
|
+
}
|
|
1578
|
+
),
|
|
1579
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
1580
|
+
"div",
|
|
1581
|
+
{
|
|
1582
|
+
style: {
|
|
1583
|
+
display: "flex",
|
|
1584
|
+
flexDirection: "row",
|
|
1585
|
+
flex: 1,
|
|
1586
|
+
gap: "2rem",
|
|
1587
|
+
padding: `0 ${Margins.horizontal}`,
|
|
1588
|
+
alignItems: "center"
|
|
1589
|
+
},
|
|
1590
|
+
children: [
|
|
1591
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { flex: 1 }, children: leftContent }),
|
|
1592
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { style: { flex: 1 }, children: columnContent })
|
|
1593
|
+
]
|
|
1594
|
+
}
|
|
1595
|
+
)
|
|
1596
|
+
]
|
|
1597
|
+
}
|
|
1598
|
+
);
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1538
1601
|
// src/layouts/index.tsx
|
|
1539
1602
|
var layouts_default = {
|
|
1540
1603
|
mainSection: MainSectionLayout,
|
|
@@ -1546,11 +1609,42 @@ var layouts_default = {
|
|
|
1546
1609
|
side: SideLayout,
|
|
1547
1610
|
section: SectionLayout,
|
|
1548
1611
|
fullImage: FullImageLayout,
|
|
1549
|
-
bigNumber: BigNumberLayout
|
|
1612
|
+
bigNumber: BigNumberLayout,
|
|
1613
|
+
twoColumn: TwoColumnLayout
|
|
1550
1614
|
};
|
|
1551
1615
|
|
|
1616
|
+
// src/SkipStepsShortcut.tsx
|
|
1617
|
+
var import_react9 = require("react");
|
|
1618
|
+
var import_spectacle6 = require("spectacle");
|
|
1619
|
+
function SkipStepsShortcut() {
|
|
1620
|
+
const {
|
|
1621
|
+
skipTo,
|
|
1622
|
+
activeView: { slideIndex },
|
|
1623
|
+
slideCount
|
|
1624
|
+
} = (0, import_react9.useContext)(import_spectacle6.DeckContext);
|
|
1625
|
+
(0, import_spectacle6.useMousetrap)(
|
|
1626
|
+
{
|
|
1627
|
+
"shift+right": () => {
|
|
1628
|
+
if (slideIndex < slideCount - 1) {
|
|
1629
|
+
skipTo({ slideIndex: slideIndex + 1, stepIndex: 0 });
|
|
1630
|
+
}
|
|
1631
|
+
},
|
|
1632
|
+
"shift+left": () => {
|
|
1633
|
+
if (slideIndex > 0) {
|
|
1634
|
+
skipTo({
|
|
1635
|
+
slideIndex: slideIndex - 1,
|
|
1636
|
+
stepIndex: null
|
|
1637
|
+
});
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
},
|
|
1641
|
+
[slideIndex, slideCount, skipTo]
|
|
1642
|
+
);
|
|
1643
|
+
return null;
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1552
1646
|
// src/SlideWrapper.tsx
|
|
1553
|
-
var
|
|
1647
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1554
1648
|
function SlideWrapper({
|
|
1555
1649
|
children,
|
|
1556
1650
|
frontmatter
|
|
@@ -1564,22 +1658,22 @@ function SlideWrapper({
|
|
|
1564
1658
|
);
|
|
1565
1659
|
}
|
|
1566
1660
|
if (Layout) {
|
|
1567
|
-
return /* @__PURE__ */ (0,
|
|
1661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Layout, { ...frontmatter, children });
|
|
1568
1662
|
}
|
|
1569
|
-
return /* @__PURE__ */ (0,
|
|
1663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children });
|
|
1570
1664
|
}
|
|
1571
1665
|
|
|
1572
1666
|
// src/template.tsx
|
|
1573
|
-
var
|
|
1574
|
-
var
|
|
1667
|
+
var import_spectacle7 = require("spectacle");
|
|
1668
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1575
1669
|
var template = ({
|
|
1576
1670
|
slideNumber,
|
|
1577
1671
|
numberOfSlides
|
|
1578
1672
|
}) => {
|
|
1579
1673
|
const percentage = slideNumber / numberOfSlides * 100;
|
|
1580
|
-
return /* @__PURE__ */ (0,
|
|
1581
|
-
/* @__PURE__ */ (0,
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { position: "absolute", bottom: 0, left: 0, right: 0 }, children: [
|
|
1675
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_spectacle7.Box, { padding: "0 0 0.5em 0.7em", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_spectacle7.FullScreen, {}) }),
|
|
1676
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { style: { width: "100%", height: "4px", background: "#ffffff11" }, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1583
1677
|
"div",
|
|
1584
1678
|
{
|
|
1585
1679
|
style: {
|
|
@@ -1622,7 +1716,7 @@ var theme_default = {
|
|
|
1622
1716
|
};
|
|
1623
1717
|
|
|
1624
1718
|
// src/transitions.ts
|
|
1625
|
-
var
|
|
1719
|
+
var import_spectacle8 = require("spectacle");
|
|
1626
1720
|
var dropTransition = {
|
|
1627
1721
|
from: { transform: "translateY(-100%)", opacity: 0 },
|
|
1628
1722
|
enter: { transform: "translateY(0%)", opacity: 1 },
|
|
@@ -1634,8 +1728,8 @@ var noneTransition = {
|
|
|
1634
1728
|
leave: { opacity: 0 }
|
|
1635
1729
|
};
|
|
1636
1730
|
var transitionMap = {
|
|
1637
|
-
fade:
|
|
1638
|
-
slide:
|
|
1731
|
+
fade: import_spectacle8.fadeTransition,
|
|
1732
|
+
slide: import_spectacle8.slideTransition,
|
|
1639
1733
|
drop: dropTransition,
|
|
1640
1734
|
none: noneTransition
|
|
1641
1735
|
};
|
|
@@ -1651,11 +1745,11 @@ __reExport(src_exports, require("spectacle"));
|
|
|
1651
1745
|
var import_web = require("@react-spring/web");
|
|
1652
1746
|
|
|
1653
1747
|
// src/components/animations/useInView.ts
|
|
1654
|
-
var
|
|
1748
|
+
var import_react10 = __toESM(require("react"));
|
|
1655
1749
|
function useInView() {
|
|
1656
|
-
const ref =
|
|
1657
|
-
const [isInView, setIsInView] =
|
|
1658
|
-
|
|
1750
|
+
const ref = import_react10.default.useRef(null);
|
|
1751
|
+
const [isInView, setIsInView] = import_react10.default.useState(false);
|
|
1752
|
+
import_react10.default.useEffect(() => {
|
|
1659
1753
|
const el = ref.current;
|
|
1660
1754
|
if (!el) return;
|
|
1661
1755
|
const observer = new IntersectionObserver(
|
|
@@ -1674,7 +1768,7 @@ function useInView() {
|
|
|
1674
1768
|
}
|
|
1675
1769
|
|
|
1676
1770
|
// src/components/animations/AnimatedCounter.tsx
|
|
1677
|
-
var
|
|
1771
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1678
1772
|
function AnimatedCounter({
|
|
1679
1773
|
to,
|
|
1680
1774
|
from = 0,
|
|
@@ -1690,12 +1784,12 @@ function AnimatedCounter({
|
|
|
1690
1784
|
delay: isInView ? delay : 0,
|
|
1691
1785
|
config: { duration }
|
|
1692
1786
|
});
|
|
1693
|
-
return /* @__PURE__ */ (0,
|
|
1787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_web.animated.span, { ref, style: { fontFamily: "var(--font-family)" }, children: value.to((v) => `${prefix}${v.toFixed(decimals)}${suffix}`) });
|
|
1694
1788
|
}
|
|
1695
1789
|
|
|
1696
1790
|
// src/components/animations/FadeIn.tsx
|
|
1697
1791
|
var import_web2 = require("@react-spring/web");
|
|
1698
|
-
var
|
|
1792
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1699
1793
|
function FadeIn({
|
|
1700
1794
|
children,
|
|
1701
1795
|
direction = "up",
|
|
@@ -1717,12 +1811,12 @@ function FadeIn({
|
|
|
1717
1811
|
delay: isInView ? delay : 0,
|
|
1718
1812
|
config: { duration }
|
|
1719
1813
|
});
|
|
1720
|
-
return /* @__PURE__ */ (0,
|
|
1814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_web2.animated.div, { ref, style: styles, children });
|
|
1721
1815
|
}
|
|
1722
1816
|
|
|
1723
1817
|
// src/components/animations/ProgressRing.tsx
|
|
1724
1818
|
var import_web3 = require("@react-spring/web");
|
|
1725
|
-
var
|
|
1819
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1726
1820
|
function ProgressRing({
|
|
1727
1821
|
value,
|
|
1728
1822
|
size = 120,
|
|
@@ -1742,7 +1836,7 @@ function ProgressRing({
|
|
|
1742
1836
|
delay: isInView ? delay : 0,
|
|
1743
1837
|
config: { duration }
|
|
1744
1838
|
});
|
|
1745
|
-
return /* @__PURE__ */ (0,
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1746
1840
|
"div",
|
|
1747
1841
|
{
|
|
1748
1842
|
ref,
|
|
@@ -1755,14 +1849,14 @@ function ProgressRing({
|
|
|
1755
1849
|
justifyContent: "center"
|
|
1756
1850
|
},
|
|
1757
1851
|
children: [
|
|
1758
|
-
/* @__PURE__ */ (0,
|
|
1852
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1759
1853
|
"svg",
|
|
1760
1854
|
{
|
|
1761
1855
|
width: size,
|
|
1762
1856
|
height: size,
|
|
1763
1857
|
style: { position: "absolute", transform: "rotate(-90deg)" },
|
|
1764
1858
|
children: [
|
|
1765
|
-
/* @__PURE__ */ (0,
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1766
1860
|
"circle",
|
|
1767
1861
|
{
|
|
1768
1862
|
cx: size / 2,
|
|
@@ -1773,7 +1867,7 @@ function ProgressRing({
|
|
|
1773
1867
|
strokeWidth
|
|
1774
1868
|
}
|
|
1775
1869
|
),
|
|
1776
|
-
/* @__PURE__ */ (0,
|
|
1870
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1777
1871
|
import_web3.animated.circle,
|
|
1778
1872
|
{
|
|
1779
1873
|
cx: size / 2,
|
|
@@ -1790,7 +1884,7 @@ function ProgressRing({
|
|
|
1790
1884
|
]
|
|
1791
1885
|
}
|
|
1792
1886
|
),
|
|
1793
|
-
children && /* @__PURE__ */ (0,
|
|
1887
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1794
1888
|
"div",
|
|
1795
1889
|
{
|
|
1796
1890
|
style: {
|
|
@@ -1808,7 +1902,7 @@ function ProgressRing({
|
|
|
1808
1902
|
|
|
1809
1903
|
// src/components/animations/ScaleIn.tsx
|
|
1810
1904
|
var import_web4 = require("@react-spring/web");
|
|
1811
|
-
var
|
|
1905
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1812
1906
|
function ScaleIn({
|
|
1813
1907
|
children,
|
|
1814
1908
|
from = 0,
|
|
@@ -1822,12 +1916,12 @@ function ScaleIn({
|
|
|
1822
1916
|
delay: isInView ? delay : 0,
|
|
1823
1917
|
config: { duration }
|
|
1824
1918
|
});
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
1919
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_web4.animated.div, { ref, style: styles, children });
|
|
1826
1920
|
}
|
|
1827
1921
|
|
|
1828
1922
|
// src/components/animations/Spotlight.tsx
|
|
1829
1923
|
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1830
|
-
var
|
|
1924
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1831
1925
|
var Overlay2 = import_styled_components13.default.div`
|
|
1832
1926
|
position: fixed;
|
|
1833
1927
|
inset: 0;
|
|
@@ -1845,16 +1939,16 @@ function Spotlight({
|
|
|
1845
1939
|
active = true,
|
|
1846
1940
|
dimOpacity = 0.7
|
|
1847
1941
|
}) {
|
|
1848
|
-
return /* @__PURE__ */ (0,
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
1942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Overlay2, { $active: active, $dimOpacity: dimOpacity }),
|
|
1944
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(Content, { $active: active, children })
|
|
1851
1945
|
] });
|
|
1852
1946
|
}
|
|
1853
1947
|
|
|
1854
1948
|
// src/components/animations/StaggerChildren.tsx
|
|
1855
1949
|
var import_web5 = require("@react-spring/web");
|
|
1856
|
-
var
|
|
1857
|
-
var
|
|
1950
|
+
var import_react11 = __toESM(require("react"));
|
|
1951
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1858
1952
|
function StaggerChildren({
|
|
1859
1953
|
children,
|
|
1860
1954
|
stagger = 100,
|
|
@@ -1864,7 +1958,7 @@ function StaggerChildren({
|
|
|
1864
1958
|
distance = 20
|
|
1865
1959
|
}) {
|
|
1866
1960
|
const [ref, isInView] = useInView();
|
|
1867
|
-
const items =
|
|
1961
|
+
const items = import_react11.default.Children.toArray(children);
|
|
1868
1962
|
const translateMap = {
|
|
1869
1963
|
up: `translateY(${distance}px)`,
|
|
1870
1964
|
down: `translateY(-${distance}px)`,
|
|
@@ -1881,18 +1975,18 @@ function StaggerChildren({
|
|
|
1881
1975
|
config: { duration }
|
|
1882
1976
|
}))
|
|
1883
1977
|
);
|
|
1884
|
-
return /* @__PURE__ */ (0,
|
|
1978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, children: springs.map((style2, i) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_web5.animated.div, { style: style2, children: items[i] }, i)) });
|
|
1885
1979
|
}
|
|
1886
1980
|
|
|
1887
1981
|
// src/components/animations/TypeWriter.tsx
|
|
1888
|
-
var
|
|
1889
|
-
var
|
|
1982
|
+
var import_react12 = __toESM(require("react"));
|
|
1983
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1890
1984
|
function extractText(node) {
|
|
1891
1985
|
if (typeof node === "string") return node;
|
|
1892
1986
|
if (typeof node === "number") return String(node);
|
|
1893
1987
|
if (!node) return "";
|
|
1894
1988
|
if (Array.isArray(node)) return node.map(extractText).join("");
|
|
1895
|
-
if (
|
|
1989
|
+
if (import_react12.default.isValidElement(node)) {
|
|
1896
1990
|
const props = node.props;
|
|
1897
1991
|
return extractText(props.children);
|
|
1898
1992
|
}
|
|
@@ -1906,9 +2000,9 @@ function TypeWriter({
|
|
|
1906
2000
|
}) {
|
|
1907
2001
|
const text = extractText(children);
|
|
1908
2002
|
const [ref, isInView] = useInView();
|
|
1909
|
-
const [displayed, setDisplayed] =
|
|
1910
|
-
const [done, setDone] =
|
|
1911
|
-
|
|
2003
|
+
const [displayed, setDisplayed] = import_react12.default.useState("");
|
|
2004
|
+
const [done, setDone] = import_react12.default.useState(false);
|
|
2005
|
+
import_react12.default.useEffect(() => {
|
|
1912
2006
|
if (!isInView) return;
|
|
1913
2007
|
let index = 0;
|
|
1914
2008
|
setDisplayed("");
|
|
@@ -1927,9 +2021,9 @@ function TypeWriter({
|
|
|
1927
2021
|
}, delay);
|
|
1928
2022
|
return () => clearTimeout(timeout);
|
|
1929
2023
|
}, [text, speed, delay, isInView]);
|
|
1930
|
-
return /* @__PURE__ */ (0,
|
|
2024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { ref, style: { fontFamily: "var(--font-family)" }, children: [
|
|
1931
2025
|
displayed,
|
|
1932
|
-
cursor && /* @__PURE__ */ (0,
|
|
2026
|
+
cursor && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1933
2027
|
"span",
|
|
1934
2028
|
{
|
|
1935
2029
|
style: {
|
|
@@ -1937,7 +2031,7 @@ function TypeWriter({
|
|
|
1937
2031
|
marginLeft: 1,
|
|
1938
2032
|
animation: done ? "pestacle-blink 1s step-end infinite" : "none"
|
|
1939
2033
|
},
|
|
1940
|
-
children: /* @__PURE__ */ (0,
|
|
2034
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("style", { children: `@keyframes pestacle-blink { 50% { opacity: 0; } }` })
|
|
1941
2035
|
}
|
|
1942
2036
|
)
|
|
1943
2037
|
] });
|
|
@@ -1945,7 +2039,7 @@ function TypeWriter({
|
|
|
1945
2039
|
|
|
1946
2040
|
// src/components/DocumentationItem.tsx
|
|
1947
2041
|
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1948
|
-
var
|
|
2042
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1949
2043
|
var DocWrapper = import_styled_components14.default.div`
|
|
1950
2044
|
position: absolute;
|
|
1951
2045
|
bottom: 0;
|
|
@@ -1997,18 +2091,18 @@ function Doc({
|
|
|
1997
2091
|
link,
|
|
1998
2092
|
children
|
|
1999
2093
|
}) {
|
|
2000
|
-
return /* @__PURE__ */ (0,
|
|
2001
|
-
children && /* @__PURE__ */ (0,
|
|
2002
|
-
/* @__PURE__ */ (0,
|
|
2094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DocWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(DocContainer, { children: [
|
|
2095
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DocContent, { children }),
|
|
2096
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DocLink, { target: "_blank", rel: "noopener noreferrer", href: link, children: label }) })
|
|
2003
2097
|
] }) });
|
|
2004
2098
|
}
|
|
2005
2099
|
function DocItem({ label, link }) {
|
|
2006
|
-
return /* @__PURE__ */ (0,
|
|
2100
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link, children: label });
|
|
2007
2101
|
}
|
|
2008
2102
|
|
|
2009
2103
|
// src/components/FilePane.tsx
|
|
2010
|
-
var
|
|
2011
|
-
var
|
|
2104
|
+
var import_react13 = __toESM(require("react"));
|
|
2105
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2012
2106
|
function FilePane({
|
|
2013
2107
|
name,
|
|
2014
2108
|
children,
|
|
@@ -2016,13 +2110,13 @@ function FilePane({
|
|
|
2016
2110
|
minWidth,
|
|
2017
2111
|
...divProps
|
|
2018
2112
|
}) {
|
|
2019
|
-
const content =
|
|
2113
|
+
const content = import_react13.default.isValidElement(children) ? import_react13.default.cloneElement(children, {
|
|
2020
2114
|
// @ts-expect-error cloning
|
|
2021
2115
|
priority,
|
|
2022
2116
|
name
|
|
2023
2117
|
}) : children;
|
|
2024
2118
|
if (minWidth) {
|
|
2025
|
-
return /* @__PURE__ */ (0,
|
|
2119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { ...divProps, style: { minWidth, ...divProps.style }, children: content });
|
|
2026
2120
|
}
|
|
2027
2121
|
return content;
|
|
2028
2122
|
}
|
|
@@ -2030,10 +2124,10 @@ FilePane.mdxType = "FilePane";
|
|
|
2030
2124
|
|
|
2031
2125
|
// src/components/HorizontalList.tsx
|
|
2032
2126
|
var import_web6 = require("@react-spring/web");
|
|
2033
|
-
var
|
|
2034
|
-
var
|
|
2127
|
+
var import_react14 = __toESM(require("react"));
|
|
2128
|
+
var import_spectacle9 = require("spectacle");
|
|
2035
2129
|
var import_styled_components15 = __toESM(require("styled-components"));
|
|
2036
|
-
var
|
|
2130
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2037
2131
|
var Container = import_styled_components15.default.div`
|
|
2038
2132
|
display: grid;
|
|
2039
2133
|
grid-gap: 2rem;
|
|
@@ -2042,18 +2136,18 @@ function HorizontalList({
|
|
|
2042
2136
|
children,
|
|
2043
2137
|
columns = 3
|
|
2044
2138
|
}) {
|
|
2045
|
-
const items =
|
|
2046
|
-
return /* @__PURE__ */ (0,
|
|
2139
|
+
const items = import_react14.default.Children.toArray(children);
|
|
2140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_spectacle9.Stepper, { values: items, children: (_, step) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2047
2141
|
Container,
|
|
2048
2142
|
{
|
|
2049
2143
|
style: {
|
|
2050
2144
|
gridTemplateColumns: `repeat(${columns}, 1fr)`
|
|
2051
2145
|
},
|
|
2052
2146
|
children: items.map((item, k) => {
|
|
2053
|
-
if (!
|
|
2147
|
+
if (!import_react14.default.isValidElement(item)) {
|
|
2054
2148
|
return item;
|
|
2055
2149
|
}
|
|
2056
|
-
return
|
|
2150
|
+
return import_react14.default.cloneElement(item, {
|
|
2057
2151
|
// @ts-expect-error cloning
|
|
2058
2152
|
position: k + 1,
|
|
2059
2153
|
isVisible: k <= step,
|
|
@@ -2064,11 +2158,11 @@ function HorizontalList({
|
|
|
2064
2158
|
) });
|
|
2065
2159
|
}
|
|
2066
2160
|
function Pill({ position }) {
|
|
2067
|
-
return /* @__PURE__ */ (0,
|
|
2161
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2068
2162
|
"div",
|
|
2069
2163
|
{
|
|
2070
2164
|
style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 },
|
|
2071
|
-
children: /* @__PURE__ */ (0,
|
|
2165
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2072
2166
|
"svg",
|
|
2073
2167
|
{
|
|
2074
2168
|
width: "48",
|
|
@@ -2077,14 +2171,14 @@ function Pill({ position }) {
|
|
|
2077
2171
|
fill: "none",
|
|
2078
2172
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2079
2173
|
children: [
|
|
2080
|
-
/* @__PURE__ */ (0,
|
|
2174
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2081
2175
|
"path",
|
|
2082
2176
|
{
|
|
2083
2177
|
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",
|
|
2084
2178
|
fill: "#ffffff"
|
|
2085
2179
|
}
|
|
2086
2180
|
),
|
|
2087
|
-
/* @__PURE__ */ (0,
|
|
2181
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2088
2182
|
"text",
|
|
2089
2183
|
{
|
|
2090
2184
|
x: "9",
|
|
@@ -2096,7 +2190,7 @@ function Pill({ position }) {
|
|
|
2096
2190
|
children: position
|
|
2097
2191
|
}
|
|
2098
2192
|
),
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2193
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2100
2194
|
"path",
|
|
2101
2195
|
{
|
|
2102
2196
|
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",
|
|
@@ -2150,18 +2244,18 @@ function HorizontalListItem({
|
|
|
2150
2244
|
const opacityStyles = (0, import_web6.useSpring)({
|
|
2151
2245
|
opacity: getItemOpacity({ isVisible, isLast })
|
|
2152
2246
|
});
|
|
2153
|
-
return /* @__PURE__ */ (0,
|
|
2154
|
-
/* @__PURE__ */ (0,
|
|
2155
|
-
/* @__PURE__ */ (0,
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(Item, { style: opacityStyles, children: [
|
|
2248
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ItemHead, { children: [
|
|
2249
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Pill, { position }),
|
|
2250
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { children: title })
|
|
2157
2251
|
] }),
|
|
2158
|
-
/* @__PURE__ */ (0,
|
|
2252
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ItemContent, { children })
|
|
2159
2253
|
] });
|
|
2160
2254
|
}
|
|
2161
2255
|
|
|
2162
2256
|
// src/components/IconBox.tsx
|
|
2163
2257
|
var import_styled_components16 = __toESM(require("styled-components"));
|
|
2164
|
-
var
|
|
2258
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2165
2259
|
var IconBoxContent = import_styled_components16.default.div`
|
|
2166
2260
|
* {
|
|
2167
2261
|
margin: 0.2rem !important;
|
|
@@ -2172,7 +2266,7 @@ function IconBox({
|
|
|
2172
2266
|
children,
|
|
2173
2267
|
icon
|
|
2174
2268
|
}) {
|
|
2175
|
-
return /* @__PURE__ */ (0,
|
|
2269
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2176
2270
|
"div",
|
|
2177
2271
|
{
|
|
2178
2272
|
style: {
|
|
@@ -2182,8 +2276,8 @@ function IconBox({
|
|
|
2182
2276
|
padding: "1rem 0"
|
|
2183
2277
|
},
|
|
2184
2278
|
children: [
|
|
2185
|
-
/* @__PURE__ */ (0,
|
|
2186
|
-
/* @__PURE__ */ (0,
|
|
2279
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { style: { fontSize: 60 }, children: icon }),
|
|
2280
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconBoxContent, { children })
|
|
2187
2281
|
]
|
|
2188
2282
|
}
|
|
2189
2283
|
);
|
|
@@ -2191,14 +2285,14 @@ function IconBox({
|
|
|
2191
2285
|
|
|
2192
2286
|
// src/components/ItemsColumn.tsx
|
|
2193
2287
|
var import_web7 = require("@react-spring/web");
|
|
2194
|
-
var
|
|
2195
|
-
var
|
|
2288
|
+
var import_react15 = __toESM(require("react"));
|
|
2289
|
+
var import_spectacle10 = require("spectacle");
|
|
2196
2290
|
var import_styled_components17 = __toESM(require("styled-components"));
|
|
2197
|
-
var
|
|
2291
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2198
2292
|
function ItemsColumn(divProps) {
|
|
2199
2293
|
const { style: style2, children, ...props } = divProps;
|
|
2200
|
-
const childrenArray =
|
|
2201
|
-
return /* @__PURE__ */ (0,
|
|
2294
|
+
const childrenArray = import_react15.default.Children.toArray(children);
|
|
2295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_spectacle10.Stepper, { values: childrenArray, children: (_value, step) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2202
2296
|
"div",
|
|
2203
2297
|
{
|
|
2204
2298
|
style: {
|
|
@@ -2213,10 +2307,10 @@ function ItemsColumn(divProps) {
|
|
|
2213
2307
|
...props,
|
|
2214
2308
|
children: childrenArray.map((child, index) => {
|
|
2215
2309
|
const isVisible = index <= step;
|
|
2216
|
-
if (!
|
|
2310
|
+
if (!import_react15.default.isValidElement(child)) {
|
|
2217
2311
|
return child;
|
|
2218
2312
|
}
|
|
2219
|
-
return /* @__PURE__ */ (0,
|
|
2313
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ItemColumnWrapper, { isVisible, children: child }, index);
|
|
2220
2314
|
})
|
|
2221
2315
|
}
|
|
2222
2316
|
) });
|
|
@@ -2234,13 +2328,13 @@ function ItemColumnWrapper({
|
|
|
2234
2328
|
...props
|
|
2235
2329
|
}) {
|
|
2236
2330
|
const styles = (0, import_web7.useSpring)({ opacity: isVisible ? 1 : 0 });
|
|
2237
|
-
return /* @__PURE__ */ (0,
|
|
2331
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ItemColumnWrapperStyled, { style: styles, ...props, children });
|
|
2238
2332
|
}
|
|
2239
2333
|
|
|
2240
2334
|
// src/components/Timeline.tsx
|
|
2241
2335
|
var import_web8 = require("@react-spring/web");
|
|
2242
|
-
var
|
|
2243
|
-
var
|
|
2336
|
+
var import_react16 = __toESM(require("react"));
|
|
2337
|
+
var import_spectacle11 = require("spectacle");
|
|
2244
2338
|
var import_styled_components19 = __toESM(require("styled-components"));
|
|
2245
2339
|
|
|
2246
2340
|
// src/components/Timeline.styled.tsx
|
|
@@ -2267,7 +2361,7 @@ var TimelineItemTitle = import_styled_components18.default.div`
|
|
|
2267
2361
|
`;
|
|
2268
2362
|
|
|
2269
2363
|
// src/components/Timeline.tsx
|
|
2270
|
-
var
|
|
2364
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2271
2365
|
var TimelineItemStyled = (0, import_styled_components19.default)(import_web8.animated.div)`
|
|
2272
2366
|
flex: 1;
|
|
2273
2367
|
flex-flow: column nowrap;
|
|
@@ -2314,21 +2408,21 @@ var style = {
|
|
|
2314
2408
|
};
|
|
2315
2409
|
function Timeline(props) {
|
|
2316
2410
|
const { activeIndex, ...rest } = props;
|
|
2317
|
-
const children =
|
|
2411
|
+
const children = import_react16.default.Children.toArray(rest.children);
|
|
2318
2412
|
if (activeIndex != null) {
|
|
2319
|
-
return /* @__PURE__ */ (0,
|
|
2320
|
-
if (!
|
|
2413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { ...rest, style: { ...style, ...rest.style }, children: children.map((child, index) => {
|
|
2414
|
+
if (!import_react16.default.isValidElement(child)) {
|
|
2321
2415
|
return child;
|
|
2322
2416
|
}
|
|
2323
|
-
return
|
|
2417
|
+
return import_react16.default.cloneElement(child, {
|
|
2324
2418
|
// @ts-expect-error cloning
|
|
2325
2419
|
isPhantom: activeIndex < index,
|
|
2326
2420
|
isLast: activeIndex === index
|
|
2327
2421
|
});
|
|
2328
2422
|
}) });
|
|
2329
2423
|
}
|
|
2330
|
-
return /* @__PURE__ */ (0,
|
|
2331
|
-
|
|
2424
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2425
|
+
import_spectacle11.Stepper,
|
|
2332
2426
|
{
|
|
2333
2427
|
...rest,
|
|
2334
2428
|
values: children,
|
|
@@ -2336,10 +2430,10 @@ function Timeline(props) {
|
|
|
2336
2430
|
inactiveStyle: style,
|
|
2337
2431
|
children: (_value, step) => {
|
|
2338
2432
|
return children.map((child, index) => {
|
|
2339
|
-
if (!
|
|
2433
|
+
if (!import_react16.default.isValidElement(child)) {
|
|
2340
2434
|
return child;
|
|
2341
2435
|
}
|
|
2342
|
-
return
|
|
2436
|
+
return import_react16.default.cloneElement(child, {
|
|
2343
2437
|
// @ts-expect-error cloning
|
|
2344
2438
|
isPhantom: step < index,
|
|
2345
2439
|
isLast: step === index
|
|
@@ -2366,7 +2460,7 @@ function TimelineItem(props) {
|
|
|
2366
2460
|
opacity: getItemOpacity2({ isPhantom, isLast })
|
|
2367
2461
|
});
|
|
2368
2462
|
const colorStyles = (0, import_web8.useSpring)({ opacity: isPhantom || isLast ? 1 : 0.15 });
|
|
2369
|
-
return /* @__PURE__ */ (0,
|
|
2463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2370
2464
|
TimelineItemStyled,
|
|
2371
2465
|
{
|
|
2372
2466
|
...rest,
|
|
@@ -2374,24 +2468,24 @@ function TimelineItem(props) {
|
|
|
2374
2468
|
...appearStyles
|
|
2375
2469
|
},
|
|
2376
2470
|
children: [
|
|
2377
|
-
/* @__PURE__ */ (0,
|
|
2378
|
-
/* @__PURE__ */ (0,
|
|
2379
|
-
/* @__PURE__ */ (0,
|
|
2471
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TimelineItemContentPhantom, { children: [
|
|
2472
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TimelineItemTitle, { children: title }),
|
|
2473
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TimelineItemBody, { children })
|
|
2380
2474
|
] }),
|
|
2381
|
-
/* @__PURE__ */ (0,
|
|
2382
|
-
/* @__PURE__ */ (0,
|
|
2383
|
-
/* @__PURE__ */ (0,
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TimelineItemGuide, { style: colorStyles, children: [
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Hexagon, {}),
|
|
2477
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TimelineItemGuideLine, { style: guideLineProps })
|
|
2384
2478
|
] }),
|
|
2385
|
-
/* @__PURE__ */ (0,
|
|
2386
|
-
/* @__PURE__ */ (0,
|
|
2387
|
-
/* @__PURE__ */ (0,
|
|
2479
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(TimelineItemContent, { children: [
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TimelineItemTitle, { children: title }),
|
|
2481
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(TimelineItemBody, { children })
|
|
2388
2482
|
] })
|
|
2389
2483
|
]
|
|
2390
2484
|
}
|
|
2391
2485
|
);
|
|
2392
2486
|
}
|
|
2393
2487
|
function Hexagon() {
|
|
2394
|
-
return /* @__PURE__ */ (0,
|
|
2488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2395
2489
|
"svg",
|
|
2396
2490
|
{
|
|
2397
2491
|
width: "18",
|
|
@@ -2400,14 +2494,14 @@ function Hexagon() {
|
|
|
2400
2494
|
fill: "none",
|
|
2401
2495
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2402
2496
|
children: [
|
|
2403
|
-
/* @__PURE__ */ (0,
|
|
2497
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2404
2498
|
"path",
|
|
2405
2499
|
{
|
|
2406
2500
|
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",
|
|
2407
2501
|
fill: "#F49676"
|
|
2408
2502
|
}
|
|
2409
2503
|
),
|
|
2410
|
-
/* @__PURE__ */ (0,
|
|
2504
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
2411
2505
|
"path",
|
|
2412
2506
|
{
|
|
2413
2507
|
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",
|
|
@@ -2420,9 +2514,9 @@ function Hexagon() {
|
|
|
2420
2514
|
}
|
|
2421
2515
|
|
|
2422
2516
|
// src/index.tsx
|
|
2423
|
-
var
|
|
2517
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2424
2518
|
function PassThrough({ children }) {
|
|
2425
|
-
return /* @__PURE__ */ (0,
|
|
2519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, { children });
|
|
2426
2520
|
}
|
|
2427
2521
|
var layouts = layouts_default;
|
|
2428
2522
|
var componentsMap2 = {
|
|
@@ -2435,10 +2529,10 @@ function Deck({
|
|
|
2435
2529
|
layouts: layouts2 = layouts_default,
|
|
2436
2530
|
transition
|
|
2437
2531
|
}) {
|
|
2438
|
-
|
|
2532
|
+
import_react18.default.useEffect(() => {
|
|
2439
2533
|
document.title = deck.metadata.title || "Untitled";
|
|
2440
2534
|
}, [deck.metadata.title]);
|
|
2441
|
-
const mergedTheme =
|
|
2535
|
+
const mergedTheme = import_react18.default.useMemo(() => {
|
|
2442
2536
|
const fonts = {
|
|
2443
2537
|
...theme_default.fonts,
|
|
2444
2538
|
...theme.themeTokens.fonts ?? {}
|
|
@@ -2449,7 +2543,7 @@ function Deck({
|
|
|
2449
2543
|
fonts
|
|
2450
2544
|
};
|
|
2451
2545
|
}, [theme]);
|
|
2452
|
-
const GlobalStyle =
|
|
2546
|
+
const GlobalStyle = import_react18.default.useMemo(() => {
|
|
2453
2547
|
const cssVariables = createCssVariables(theme.themeTokens.colors);
|
|
2454
2548
|
return import_styled_components20.createGlobalStyle`
|
|
2455
2549
|
:root {
|
|
@@ -2458,46 +2552,53 @@ function Deck({
|
|
|
2458
2552
|
}
|
|
2459
2553
|
`;
|
|
2460
2554
|
}, [theme, mergedTheme]);
|
|
2461
|
-
return /* @__PURE__ */ (0,
|
|
2462
|
-
/* @__PURE__ */ (0,
|
|
2463
|
-
/* @__PURE__ */ (0,
|
|
2464
|
-
|
|
2555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react18.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(PestacleProvider, { layouts: layouts2, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react17.MDXProvider, { components: componentsMap2, children: [
|
|
2556
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(GlobalStyle, {}),
|
|
2557
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2558
|
+
import_spectacle12.Deck,
|
|
2465
2559
|
{
|
|
2466
2560
|
theme: mergedTheme,
|
|
2467
2561
|
template,
|
|
2468
2562
|
transition: resolveTransition(transition),
|
|
2469
|
-
children:
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2563
|
+
children: [
|
|
2564
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(SkipStepsShortcut, {}),
|
|
2565
|
+
deck.slides.map((slide, i) => {
|
|
2566
|
+
var _a;
|
|
2567
|
+
const Component = slide.slideComponent;
|
|
2568
|
+
const slideTransitionName = (_a = slide.metadata) == null ? void 0 : _a.transition;
|
|
2569
|
+
const slideTransition2 = resolveTransition(slideTransitionName);
|
|
2570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_spectacle12.Slide, { transition: slideTransition2, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Component, {}) }, i);
|
|
2571
|
+
})
|
|
2572
|
+
]
|
|
2476
2573
|
}
|
|
2477
2574
|
)
|
|
2478
2575
|
] }) }) });
|
|
2479
2576
|
}
|
|
2480
2577
|
function Danger({ children }) {
|
|
2481
|
-
return /* @__PURE__ */ (0,
|
|
2578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { color: "red" }, children });
|
|
2482
2579
|
}
|
|
2483
2580
|
function Information({ children }) {
|
|
2484
|
-
return /* @__PURE__ */ (0,
|
|
2581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { color: "orange" }, children });
|
|
2485
2582
|
}
|
|
2486
2583
|
function Success({ children }) {
|
|
2487
|
-
return /* @__PURE__ */ (0,
|
|
2584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { color: "green" }, children });
|
|
2488
2585
|
}
|
|
2489
2586
|
function Warning({ children }) {
|
|
2490
|
-
return /* @__PURE__ */ (0,
|
|
2587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { color: "yellow" }, children });
|
|
2491
2588
|
}
|
|
2492
2589
|
function Side({ children }) {
|
|
2493
|
-
return /* @__PURE__ */ (0,
|
|
2590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children });
|
|
2494
2591
|
}
|
|
2495
2592
|
Side.mdxType = "Side";
|
|
2593
|
+
function Column({ children }) {
|
|
2594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children });
|
|
2595
|
+
}
|
|
2596
|
+
Column.mdxType = "Column";
|
|
2496
2597
|
function Documentation({ children }) {
|
|
2497
|
-
return /* @__PURE__ */ (0,
|
|
2598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children });
|
|
2498
2599
|
}
|
|
2499
2600
|
function Box2({ children }) {
|
|
2500
|
-
return /* @__PURE__ */ (0,
|
|
2601
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children });
|
|
2501
2602
|
}
|
|
2502
2603
|
|
|
2503
2604
|
// <stdin>
|