@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/components/animations/AnimatedCounter.d.ts +18 -0
- package/components/animations/FadeIn.d.ts +14 -0
- package/components/animations/ProgressRing.d.ts +21 -0
- package/components/animations/ScaleIn.d.ts +12 -0
- package/components/animations/Spotlight.d.ts +10 -0
- package/components/animations/StaggerChildren.d.ts +16 -0
- package/components/animations/TypeWriter.d.ts +13 -0
- package/components/animations/index.d.ts +7 -0
- package/components/animations/useInView.d.ts +10 -0
- package/index.cjs +455 -114
- package/index.d.ts +5 -1
- package/index.mjs +450 -106
- package/package.json +1 -1
- package/transitions.d.ts +14 -0
package/index.cjs
CHANGED
|
@@ -29,12 +29,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
// src/index.tsx
|
|
30
30
|
var src_exports = {};
|
|
31
31
|
__export(src_exports, {
|
|
32
|
+
AnimatedCounter: () => AnimatedCounter,
|
|
32
33
|
Box: () => Box2,
|
|
33
34
|
Danger: () => Danger,
|
|
34
35
|
Deck: () => Deck,
|
|
35
36
|
Doc: () => Doc,
|
|
36
37
|
DocItem: () => DocItem,
|
|
37
38
|
Documentation: () => Documentation,
|
|
39
|
+
FadeIn: () => FadeIn,
|
|
38
40
|
FilePane: () => FilePane,
|
|
39
41
|
HorizontalList: () => HorizontalList,
|
|
40
42
|
HorizontalListItem: () => HorizontalListItem,
|
|
@@ -44,17 +46,25 @@ __export(src_exports, {
|
|
|
44
46
|
ItemsColumn: () => ItemsColumn,
|
|
45
47
|
Mermaid: () => Mermaid,
|
|
46
48
|
PassThrough: () => PassThrough,
|
|
49
|
+
ProgressRing: () => ProgressRing,
|
|
50
|
+
ScaleIn: () => ScaleIn,
|
|
47
51
|
Side: () => Side,
|
|
52
|
+
Spotlight: () => Spotlight,
|
|
53
|
+
StaggerChildren: () => StaggerChildren,
|
|
48
54
|
Success: () => Success,
|
|
49
55
|
Timeline: () => Timeline,
|
|
50
56
|
TimelineItem: () => TimelineItem,
|
|
57
|
+
TypeWriter: () => TypeWriter,
|
|
51
58
|
Warning: () => Warning,
|
|
52
|
-
|
|
59
|
+
dropTransition: () => dropTransition,
|
|
60
|
+
layouts: () => layouts,
|
|
61
|
+
noneTransition: () => noneTransition,
|
|
62
|
+
resolveTransition: () => resolveTransition
|
|
53
63
|
});
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
64
|
+
var import_react15 = require("@mdx-js/react");
|
|
65
|
+
var import_react16 = __toESM(require("react"));
|
|
66
|
+
var import_spectacle11 = require("spectacle");
|
|
67
|
+
var import_styled_components20 = require("styled-components");
|
|
58
68
|
|
|
59
69
|
// src/colors.ts
|
|
60
70
|
function extractColors(color) {
|
|
@@ -1596,13 +1606,332 @@ var theme_default = {
|
|
|
1596
1606
|
space: [8, 16, 24]
|
|
1597
1607
|
};
|
|
1598
1608
|
|
|
1609
|
+
// src/transitions.ts
|
|
1610
|
+
var import_spectacle7 = require("spectacle");
|
|
1611
|
+
var dropTransition = {
|
|
1612
|
+
from: { transform: "translateY(-100%)", opacity: 0 },
|
|
1613
|
+
enter: { transform: "translateY(0%)", opacity: 1 },
|
|
1614
|
+
leave: { transform: "translateY(100%)", opacity: 0 }
|
|
1615
|
+
};
|
|
1616
|
+
var noneTransition = {
|
|
1617
|
+
from: { opacity: 1 },
|
|
1618
|
+
enter: { opacity: 1 },
|
|
1619
|
+
leave: { opacity: 0 }
|
|
1620
|
+
};
|
|
1621
|
+
var transitionMap = {
|
|
1622
|
+
fade: import_spectacle7.fadeTransition,
|
|
1623
|
+
slide: import_spectacle7.slideTransition,
|
|
1624
|
+
drop: dropTransition,
|
|
1625
|
+
none: noneTransition
|
|
1626
|
+
};
|
|
1627
|
+
function resolveTransition(name) {
|
|
1628
|
+
if (!name) return void 0;
|
|
1629
|
+
return transitionMap[name];
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1599
1632
|
// src/index.tsx
|
|
1600
1633
|
__reExport(src_exports, require("spectacle"));
|
|
1601
1634
|
|
|
1602
|
-
// src/components/
|
|
1603
|
-
var
|
|
1635
|
+
// src/components/animations/AnimatedCounter.tsx
|
|
1636
|
+
var import_web = require("@react-spring/web");
|
|
1637
|
+
|
|
1638
|
+
// src/components/animations/useInView.ts
|
|
1639
|
+
var import_react8 = __toESM(require("react"));
|
|
1640
|
+
function useInView() {
|
|
1641
|
+
const ref = import_react8.default.useRef(null);
|
|
1642
|
+
const [isInView, setIsInView] = import_react8.default.useState(false);
|
|
1643
|
+
import_react8.default.useEffect(() => {
|
|
1644
|
+
const el = ref.current;
|
|
1645
|
+
if (!el) return;
|
|
1646
|
+
const observer = new IntersectionObserver(
|
|
1647
|
+
([entry]) => {
|
|
1648
|
+
if (entry.isIntersecting) {
|
|
1649
|
+
setIsInView(true);
|
|
1650
|
+
observer.disconnect();
|
|
1651
|
+
}
|
|
1652
|
+
},
|
|
1653
|
+
{ threshold: 0.1 }
|
|
1654
|
+
);
|
|
1655
|
+
observer.observe(el);
|
|
1656
|
+
return () => observer.disconnect();
|
|
1657
|
+
}, []);
|
|
1658
|
+
return [ref, isInView];
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
// src/components/animations/AnimatedCounter.tsx
|
|
1604
1662
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1605
|
-
|
|
1663
|
+
function AnimatedCounter({
|
|
1664
|
+
to,
|
|
1665
|
+
from = 0,
|
|
1666
|
+
duration = 1500,
|
|
1667
|
+
delay = 0,
|
|
1668
|
+
decimals = 0,
|
|
1669
|
+
prefix = "",
|
|
1670
|
+
suffix = ""
|
|
1671
|
+
}) {
|
|
1672
|
+
const [ref, isInView] = useInView();
|
|
1673
|
+
const { value } = (0, import_web.useSpring)({
|
|
1674
|
+
value: isInView ? to : from,
|
|
1675
|
+
delay: isInView ? delay : 0,
|
|
1676
|
+
config: { duration }
|
|
1677
|
+
});
|
|
1678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_web.animated.span, { ref, style: { fontFamily: "var(--font-family)" }, children: value.to((v) => `${prefix}${v.toFixed(decimals)}${suffix}`) });
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
// src/components/animations/FadeIn.tsx
|
|
1682
|
+
var import_web2 = require("@react-spring/web");
|
|
1683
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1684
|
+
function FadeIn({
|
|
1685
|
+
children,
|
|
1686
|
+
direction = "up",
|
|
1687
|
+
distance = 20,
|
|
1688
|
+
delay = 0,
|
|
1689
|
+
duration = 400
|
|
1690
|
+
}) {
|
|
1691
|
+
const [ref, isInView] = useInView();
|
|
1692
|
+
const translateMap = {
|
|
1693
|
+
up: `translateY(${distance}px)`,
|
|
1694
|
+
down: `translateY(-${distance}px)`,
|
|
1695
|
+
left: `translateX(${distance}px)`,
|
|
1696
|
+
right: `translateX(-${distance}px)`,
|
|
1697
|
+
none: "translate(0, 0)"
|
|
1698
|
+
};
|
|
1699
|
+
const styles = (0, import_web2.useSpring)({
|
|
1700
|
+
opacity: isInView ? 1 : 0,
|
|
1701
|
+
transform: isInView ? "translate(0, 0)" : translateMap[direction],
|
|
1702
|
+
delay: isInView ? delay : 0,
|
|
1703
|
+
config: { duration }
|
|
1704
|
+
});
|
|
1705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_web2.animated.div, { ref, style: styles, children });
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
// src/components/animations/ProgressRing.tsx
|
|
1709
|
+
var import_web3 = require("@react-spring/web");
|
|
1710
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1711
|
+
function ProgressRing({
|
|
1712
|
+
value,
|
|
1713
|
+
size = 120,
|
|
1714
|
+
strokeWidth = 8,
|
|
1715
|
+
color = "var(--color-secondary)",
|
|
1716
|
+
trackColor = "rgba(255,255,255,0.1)",
|
|
1717
|
+
duration = 1e3,
|
|
1718
|
+
delay = 0,
|
|
1719
|
+
children
|
|
1720
|
+
}) {
|
|
1721
|
+
const [ref, isInView] = useInView();
|
|
1722
|
+
const radius = (size - strokeWidth) / 2;
|
|
1723
|
+
const circumference = 2 * Math.PI * radius;
|
|
1724
|
+
const targetOffset = circumference - value / 100 * circumference;
|
|
1725
|
+
const { offset } = (0, import_web3.useSpring)({
|
|
1726
|
+
offset: isInView ? targetOffset : circumference,
|
|
1727
|
+
delay: isInView ? delay : 0,
|
|
1728
|
+
config: { duration }
|
|
1729
|
+
});
|
|
1730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1731
|
+
"div",
|
|
1732
|
+
{
|
|
1733
|
+
ref,
|
|
1734
|
+
style: {
|
|
1735
|
+
position: "relative",
|
|
1736
|
+
width: size,
|
|
1737
|
+
height: size,
|
|
1738
|
+
display: "inline-flex",
|
|
1739
|
+
alignItems: "center",
|
|
1740
|
+
justifyContent: "center"
|
|
1741
|
+
},
|
|
1742
|
+
children: [
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1744
|
+
"svg",
|
|
1745
|
+
{
|
|
1746
|
+
width: size,
|
|
1747
|
+
height: size,
|
|
1748
|
+
style: { position: "absolute", transform: "rotate(-90deg)" },
|
|
1749
|
+
children: [
|
|
1750
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1751
|
+
"circle",
|
|
1752
|
+
{
|
|
1753
|
+
cx: size / 2,
|
|
1754
|
+
cy: size / 2,
|
|
1755
|
+
r: radius,
|
|
1756
|
+
fill: "none",
|
|
1757
|
+
stroke: trackColor,
|
|
1758
|
+
strokeWidth
|
|
1759
|
+
}
|
|
1760
|
+
),
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1762
|
+
import_web3.animated.circle,
|
|
1763
|
+
{
|
|
1764
|
+
cx: size / 2,
|
|
1765
|
+
cy: size / 2,
|
|
1766
|
+
r: radius,
|
|
1767
|
+
fill: "none",
|
|
1768
|
+
stroke: color,
|
|
1769
|
+
strokeWidth,
|
|
1770
|
+
strokeDasharray: circumference,
|
|
1771
|
+
strokeDashoffset: offset,
|
|
1772
|
+
strokeLinecap: "round"
|
|
1773
|
+
}
|
|
1774
|
+
)
|
|
1775
|
+
]
|
|
1776
|
+
}
|
|
1777
|
+
),
|
|
1778
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1779
|
+
"div",
|
|
1780
|
+
{
|
|
1781
|
+
style: {
|
|
1782
|
+
position: "relative",
|
|
1783
|
+
zIndex: 1,
|
|
1784
|
+
fontFamily: "var(--font-family)"
|
|
1785
|
+
},
|
|
1786
|
+
children
|
|
1787
|
+
}
|
|
1788
|
+
)
|
|
1789
|
+
]
|
|
1790
|
+
}
|
|
1791
|
+
);
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
// src/components/animations/ScaleIn.tsx
|
|
1795
|
+
var import_web4 = require("@react-spring/web");
|
|
1796
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1797
|
+
function ScaleIn({
|
|
1798
|
+
children,
|
|
1799
|
+
from = 0,
|
|
1800
|
+
delay = 0,
|
|
1801
|
+
duration = 400
|
|
1802
|
+
}) {
|
|
1803
|
+
const [ref, isInView] = useInView();
|
|
1804
|
+
const styles = (0, import_web4.useSpring)({
|
|
1805
|
+
opacity: isInView ? 1 : 0,
|
|
1806
|
+
transform: isInView ? "scale(1)" : `scale(${from})`,
|
|
1807
|
+
delay: isInView ? delay : 0,
|
|
1808
|
+
config: { duration }
|
|
1809
|
+
});
|
|
1810
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_web4.animated.div, { ref, style: styles, children });
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
// src/components/animations/Spotlight.tsx
|
|
1814
|
+
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1815
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1816
|
+
var Overlay2 = import_styled_components13.default.div`
|
|
1817
|
+
position: fixed;
|
|
1818
|
+
inset: 0;
|
|
1819
|
+
background: rgba(0, 0, 0, ${(p) => p.$active ? p.$dimOpacity : 0});
|
|
1820
|
+
pointer-events: ${(p) => p.$active ? "auto" : "none"};
|
|
1821
|
+
transition: background 0.4s ease;
|
|
1822
|
+
z-index: 99;
|
|
1823
|
+
`;
|
|
1824
|
+
var Content = import_styled_components13.default.div`
|
|
1825
|
+
position: relative;
|
|
1826
|
+
z-index: ${(p) => p.$active ? 100 : "auto"};
|
|
1827
|
+
`;
|
|
1828
|
+
function Spotlight({
|
|
1829
|
+
children,
|
|
1830
|
+
active = true,
|
|
1831
|
+
dimOpacity = 0.7
|
|
1832
|
+
}) {
|
|
1833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1834
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Overlay2, { $active: active, $dimOpacity: dimOpacity }),
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Content, { $active: active, children })
|
|
1836
|
+
] });
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
// src/components/animations/StaggerChildren.tsx
|
|
1840
|
+
var import_web5 = require("@react-spring/web");
|
|
1841
|
+
var import_react9 = __toESM(require("react"));
|
|
1842
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1843
|
+
function StaggerChildren({
|
|
1844
|
+
children,
|
|
1845
|
+
stagger = 100,
|
|
1846
|
+
delay = 0,
|
|
1847
|
+
duration = 400,
|
|
1848
|
+
direction = "up",
|
|
1849
|
+
distance = 20
|
|
1850
|
+
}) {
|
|
1851
|
+
const [ref, isInView] = useInView();
|
|
1852
|
+
const items = import_react9.default.Children.toArray(children);
|
|
1853
|
+
const translateMap = {
|
|
1854
|
+
up: `translateY(${distance}px)`,
|
|
1855
|
+
down: `translateY(-${distance}px)`,
|
|
1856
|
+
left: `translateX(${distance}px)`,
|
|
1857
|
+
right: `translateX(-${distance}px)`,
|
|
1858
|
+
none: "translate(0, 0)"
|
|
1859
|
+
};
|
|
1860
|
+
const springs = (0, import_web5.useSprings)(
|
|
1861
|
+
items.length,
|
|
1862
|
+
items.map((_, i) => ({
|
|
1863
|
+
opacity: isInView ? 1 : 0,
|
|
1864
|
+
transform: isInView ? "translate(0, 0)" : translateMap[direction],
|
|
1865
|
+
delay: isInView ? delay + i * stagger : 0,
|
|
1866
|
+
config: { duration }
|
|
1867
|
+
}))
|
|
1868
|
+
);
|
|
1869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref, children: springs.map((style2, i) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_web5.animated.div, { style: style2, children: items[i] }, i)) });
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
// src/components/animations/TypeWriter.tsx
|
|
1873
|
+
var import_react10 = __toESM(require("react"));
|
|
1874
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1875
|
+
function extractText(node) {
|
|
1876
|
+
if (typeof node === "string") return node;
|
|
1877
|
+
if (typeof node === "number") return String(node);
|
|
1878
|
+
if (!node) return "";
|
|
1879
|
+
if (Array.isArray(node)) return node.map(extractText).join("");
|
|
1880
|
+
if (import_react10.default.isValidElement(node)) {
|
|
1881
|
+
const props = node.props;
|
|
1882
|
+
return extractText(props.children);
|
|
1883
|
+
}
|
|
1884
|
+
return "";
|
|
1885
|
+
}
|
|
1886
|
+
function TypeWriter({
|
|
1887
|
+
children,
|
|
1888
|
+
speed = 50,
|
|
1889
|
+
delay = 0,
|
|
1890
|
+
cursor = true
|
|
1891
|
+
}) {
|
|
1892
|
+
const text = extractText(children);
|
|
1893
|
+
const [ref, isInView] = useInView();
|
|
1894
|
+
const [displayed, setDisplayed] = import_react10.default.useState("");
|
|
1895
|
+
const [done, setDone] = import_react10.default.useState(false);
|
|
1896
|
+
import_react10.default.useEffect(() => {
|
|
1897
|
+
if (!isInView) return;
|
|
1898
|
+
let index = 0;
|
|
1899
|
+
setDisplayed("");
|
|
1900
|
+
setDone(false);
|
|
1901
|
+
const timeout = setTimeout(() => {
|
|
1902
|
+
const interval = setInterval(() => {
|
|
1903
|
+
if (index < text.length) {
|
|
1904
|
+
setDisplayed(text.slice(0, index + 1));
|
|
1905
|
+
index++;
|
|
1906
|
+
} else {
|
|
1907
|
+
setDone(true);
|
|
1908
|
+
clearInterval(interval);
|
|
1909
|
+
}
|
|
1910
|
+
}, speed);
|
|
1911
|
+
return () => clearInterval(interval);
|
|
1912
|
+
}, delay);
|
|
1913
|
+
return () => clearTimeout(timeout);
|
|
1914
|
+
}, [text, speed, delay, isInView]);
|
|
1915
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { ref, style: { fontFamily: "var(--font-family)" }, children: [
|
|
1916
|
+
displayed,
|
|
1917
|
+
cursor && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1918
|
+
"span",
|
|
1919
|
+
{
|
|
1920
|
+
style: {
|
|
1921
|
+
borderRight: "2px solid currentColor",
|
|
1922
|
+
marginLeft: 1,
|
|
1923
|
+
animation: done ? "pestacle-blink 1s step-end infinite" : "none"
|
|
1924
|
+
},
|
|
1925
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: `@keyframes pestacle-blink { 50% { opacity: 0; } }` })
|
|
1926
|
+
}
|
|
1927
|
+
)
|
|
1928
|
+
] });
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
// src/components/DocumentationItem.tsx
|
|
1932
|
+
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1933
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1934
|
+
var DocWrapper = import_styled_components14.default.div`
|
|
1606
1935
|
position: absolute;
|
|
1607
1936
|
bottom: 0;
|
|
1608
1937
|
right: 0;
|
|
@@ -1616,20 +1945,20 @@ var DocWrapper = import_styled_components13.default.div`
|
|
|
1616
1945
|
display: flex;
|
|
1617
1946
|
}
|
|
1618
1947
|
`;
|
|
1619
|
-
var DocContainer =
|
|
1948
|
+
var DocContainer = import_styled_components14.default.div`
|
|
1620
1949
|
margin: 2rem 1rem;
|
|
1621
1950
|
background-color: #333;
|
|
1622
1951
|
border: 1px solid #333;
|
|
1623
1952
|
padding: 0.5rem 1rem;
|
|
1624
1953
|
border-radius: 1.5rem;
|
|
1625
1954
|
`;
|
|
1626
|
-
var DocLink =
|
|
1955
|
+
var DocLink = import_styled_components14.default.a`
|
|
1627
1956
|
text-decoration: none;
|
|
1628
1957
|
font-weight: normal;
|
|
1629
1958
|
font-family: var(--font-family);
|
|
1630
1959
|
color: var(--color-secondary);
|
|
1631
1960
|
`;
|
|
1632
|
-
var DocLinkItem = (0,
|
|
1961
|
+
var DocLinkItem = (0, import_styled_components14.default)(DocLink)`
|
|
1633
1962
|
width: fit-content;
|
|
1634
1963
|
display: inline-block;
|
|
1635
1964
|
background-color: #333;
|
|
@@ -1638,7 +1967,7 @@ var DocLinkItem = (0, import_styled_components13.default)(DocLink)`
|
|
|
1638
1967
|
border-radius: 1.5rem;
|
|
1639
1968
|
margin: 0.25rem 0;
|
|
1640
1969
|
`;
|
|
1641
|
-
var DocContent =
|
|
1970
|
+
var DocContent = import_styled_components14.default.div`
|
|
1642
1971
|
display: flex;
|
|
1643
1972
|
flex-flow: column-reverse nowrap;
|
|
1644
1973
|
position: absolute;
|
|
@@ -1653,24 +1982,24 @@ function Doc({
|
|
|
1653
1982
|
link,
|
|
1654
1983
|
children
|
|
1655
1984
|
}) {
|
|
1656
|
-
return /* @__PURE__ */ (0,
|
|
1657
|
-
children && /* @__PURE__ */ (0,
|
|
1658
|
-
/* @__PURE__ */ (0,
|
|
1985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DocWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DocContainer, { children: [
|
|
1986
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DocContent, { children }),
|
|
1987
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DocLink, { target: "_blank", rel: "noopener noreferrer", href: link, children: label }) })
|
|
1659
1988
|
] }) });
|
|
1660
1989
|
}
|
|
1661
1990
|
function DocItem({ label, link }) {
|
|
1662
|
-
return /* @__PURE__ */ (0,
|
|
1991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link, children: label });
|
|
1663
1992
|
}
|
|
1664
1993
|
|
|
1665
1994
|
// src/components/FilePane.tsx
|
|
1666
|
-
var
|
|
1995
|
+
var import_react11 = __toESM(require("react"));
|
|
1667
1996
|
function FilePane({
|
|
1668
1997
|
name,
|
|
1669
1998
|
children,
|
|
1670
1999
|
priority,
|
|
1671
2000
|
...divProps
|
|
1672
2001
|
}) {
|
|
1673
|
-
return
|
|
2002
|
+
return import_react11.default.isValidElement(children) ? import_react11.default.cloneElement(children, {
|
|
1674
2003
|
// @ts-expect-error cloning
|
|
1675
2004
|
priority,
|
|
1676
2005
|
name
|
|
@@ -1679,12 +2008,12 @@ function FilePane({
|
|
|
1679
2008
|
FilePane.mdxType = "FilePane";
|
|
1680
2009
|
|
|
1681
2010
|
// src/components/HorizontalList.tsx
|
|
1682
|
-
var
|
|
1683
|
-
var
|
|
1684
|
-
var
|
|
1685
|
-
var
|
|
1686
|
-
var
|
|
1687
|
-
var Container =
|
|
2011
|
+
var import_web6 = require("@react-spring/web");
|
|
2012
|
+
var import_react12 = __toESM(require("react"));
|
|
2013
|
+
var import_spectacle8 = require("spectacle");
|
|
2014
|
+
var import_styled_components15 = __toESM(require("styled-components"));
|
|
2015
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2016
|
+
var Container = import_styled_components15.default.div`
|
|
1688
2017
|
display: grid;
|
|
1689
2018
|
grid-gap: 2rem;
|
|
1690
2019
|
`;
|
|
@@ -1692,18 +2021,18 @@ function HorizontalList({
|
|
|
1692
2021
|
children,
|
|
1693
2022
|
columns = 3
|
|
1694
2023
|
}) {
|
|
1695
|
-
const items =
|
|
1696
|
-
return /* @__PURE__ */ (0,
|
|
2024
|
+
const items = import_react12.default.Children.toArray(children);
|
|
2025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_spectacle8.Stepper, { values: items, children: (_, step) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1697
2026
|
Container,
|
|
1698
2027
|
{
|
|
1699
2028
|
style: {
|
|
1700
2029
|
gridTemplateColumns: `repeat(${columns}, 1fr)`
|
|
1701
2030
|
},
|
|
1702
2031
|
children: items.map((item, k) => {
|
|
1703
|
-
if (!
|
|
2032
|
+
if (!import_react12.default.isValidElement(item)) {
|
|
1704
2033
|
return item;
|
|
1705
2034
|
}
|
|
1706
|
-
return
|
|
2035
|
+
return import_react12.default.cloneElement(item, {
|
|
1707
2036
|
// @ts-expect-error cloning
|
|
1708
2037
|
position: k + 1,
|
|
1709
2038
|
isVisible: k <= step,
|
|
@@ -1714,11 +2043,11 @@ function HorizontalList({
|
|
|
1714
2043
|
) });
|
|
1715
2044
|
}
|
|
1716
2045
|
function Pill({ position }) {
|
|
1717
|
-
return /* @__PURE__ */ (0,
|
|
2046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1718
2047
|
"div",
|
|
1719
2048
|
{
|
|
1720
2049
|
style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 },
|
|
1721
|
-
children: /* @__PURE__ */ (0,
|
|
2050
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1722
2051
|
"svg",
|
|
1723
2052
|
{
|
|
1724
2053
|
width: "48",
|
|
@@ -1727,14 +2056,14 @@ function Pill({ position }) {
|
|
|
1727
2056
|
fill: "none",
|
|
1728
2057
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1729
2058
|
children: [
|
|
1730
|
-
/* @__PURE__ */ (0,
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1731
2060
|
"path",
|
|
1732
2061
|
{
|
|
1733
2062
|
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",
|
|
1734
2063
|
fill: "#ffffff"
|
|
1735
2064
|
}
|
|
1736
2065
|
),
|
|
1737
|
-
/* @__PURE__ */ (0,
|
|
2066
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1738
2067
|
"text",
|
|
1739
2068
|
{
|
|
1740
2069
|
x: "9",
|
|
@@ -1746,7 +2075,7 @@ function Pill({ position }) {
|
|
|
1746
2075
|
children: position
|
|
1747
2076
|
}
|
|
1748
2077
|
),
|
|
1749
|
-
/* @__PURE__ */ (0,
|
|
2078
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1750
2079
|
"path",
|
|
1751
2080
|
{
|
|
1752
2081
|
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",
|
|
@@ -1759,12 +2088,12 @@ function Pill({ position }) {
|
|
|
1759
2088
|
}
|
|
1760
2089
|
);
|
|
1761
2090
|
}
|
|
1762
|
-
var Item = (0,
|
|
2091
|
+
var Item = (0, import_styled_components15.default)(import_web6.animated.div)`
|
|
1763
2092
|
display: flex;
|
|
1764
2093
|
flex-direction: column;
|
|
1765
2094
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1766
2095
|
`;
|
|
1767
|
-
var ItemHead =
|
|
2096
|
+
var ItemHead = import_styled_components15.default.div`
|
|
1768
2097
|
display: flex;
|
|
1769
2098
|
flex-direction: row;
|
|
1770
2099
|
font-size: 1.3rem;
|
|
@@ -1774,7 +2103,7 @@ var ItemHead = import_styled_components14.default.div`
|
|
|
1774
2103
|
margin: 0;
|
|
1775
2104
|
}
|
|
1776
2105
|
`;
|
|
1777
|
-
var ItemContent =
|
|
2106
|
+
var ItemContent = import_styled_components15.default.div`
|
|
1778
2107
|
> * {
|
|
1779
2108
|
font-size: 1rem;
|
|
1780
2109
|
padding: 4px !important;
|
|
@@ -1797,22 +2126,22 @@ function HorizontalListItem({
|
|
|
1797
2126
|
isVisible,
|
|
1798
2127
|
isLast
|
|
1799
2128
|
}) {
|
|
1800
|
-
const opacityStyles = (0,
|
|
2129
|
+
const opacityStyles = (0, import_web6.useSpring)({
|
|
1801
2130
|
opacity: getItemOpacity({ isVisible, isLast })
|
|
1802
2131
|
});
|
|
1803
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
-
/* @__PURE__ */ (0,
|
|
1805
|
-
/* @__PURE__ */ (0,
|
|
1806
|
-
/* @__PURE__ */ (0,
|
|
2132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Item, { style: opacityStyles, children: [
|
|
2133
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ItemHead, { children: [
|
|
2134
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Pill, { position }),
|
|
2135
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: title })
|
|
1807
2136
|
] }),
|
|
1808
|
-
/* @__PURE__ */ (0,
|
|
2137
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ItemContent, { children })
|
|
1809
2138
|
] });
|
|
1810
2139
|
}
|
|
1811
2140
|
|
|
1812
2141
|
// src/components/IconBox.tsx
|
|
1813
|
-
var
|
|
1814
|
-
var
|
|
1815
|
-
var IconBoxContent =
|
|
2142
|
+
var import_styled_components16 = __toESM(require("styled-components"));
|
|
2143
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2144
|
+
var IconBoxContent = import_styled_components16.default.div`
|
|
1816
2145
|
* {
|
|
1817
2146
|
margin: 0.2rem !important;
|
|
1818
2147
|
padding: 0 !important;
|
|
@@ -1822,7 +2151,7 @@ function IconBox({
|
|
|
1822
2151
|
children,
|
|
1823
2152
|
icon
|
|
1824
2153
|
}) {
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
2154
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1826
2155
|
"div",
|
|
1827
2156
|
{
|
|
1828
2157
|
style: {
|
|
@@ -1832,23 +2161,23 @@ function IconBox({
|
|
|
1832
2161
|
padding: "1rem 0"
|
|
1833
2162
|
},
|
|
1834
2163
|
children: [
|
|
1835
|
-
/* @__PURE__ */ (0,
|
|
1836
|
-
/* @__PURE__ */ (0,
|
|
2164
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { fontSize: 60 }, children: icon }),
|
|
2165
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconBoxContent, { children })
|
|
1837
2166
|
]
|
|
1838
2167
|
}
|
|
1839
2168
|
);
|
|
1840
2169
|
}
|
|
1841
2170
|
|
|
1842
2171
|
// src/components/ItemsColumn.tsx
|
|
1843
|
-
var
|
|
1844
|
-
var
|
|
1845
|
-
var
|
|
1846
|
-
var
|
|
1847
|
-
var
|
|
2172
|
+
var import_web7 = require("@react-spring/web");
|
|
2173
|
+
var import_react13 = __toESM(require("react"));
|
|
2174
|
+
var import_spectacle9 = require("spectacle");
|
|
2175
|
+
var import_styled_components17 = __toESM(require("styled-components"));
|
|
2176
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1848
2177
|
function ItemsColumn(divProps) {
|
|
1849
2178
|
const { style: style2, children, ...props } = divProps;
|
|
1850
|
-
const childrenArray =
|
|
1851
|
-
return /* @__PURE__ */ (0,
|
|
2179
|
+
const childrenArray = import_react13.default.Children.toArray(children);
|
|
2180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_spectacle9.Stepper, { values: childrenArray, children: (_value, step) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1852
2181
|
"div",
|
|
1853
2182
|
{
|
|
1854
2183
|
style: {
|
|
@@ -1863,15 +2192,15 @@ function ItemsColumn(divProps) {
|
|
|
1863
2192
|
...props,
|
|
1864
2193
|
children: childrenArray.map((child, index) => {
|
|
1865
2194
|
const isVisible = index <= step;
|
|
1866
|
-
if (!
|
|
2195
|
+
if (!import_react13.default.isValidElement(child)) {
|
|
1867
2196
|
return child;
|
|
1868
2197
|
}
|
|
1869
|
-
return /* @__PURE__ */ (0,
|
|
2198
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ItemColumnWrapper, { isVisible, children: child }, index);
|
|
1870
2199
|
})
|
|
1871
2200
|
}
|
|
1872
2201
|
) });
|
|
1873
2202
|
}
|
|
1874
|
-
var ItemColumnWrapperStyled = (0,
|
|
2203
|
+
var ItemColumnWrapperStyled = (0, import_styled_components17.default)(import_web7.animated.div)`
|
|
1875
2204
|
display: flex;
|
|
1876
2205
|
justify-content: center;
|
|
1877
2206
|
* {
|
|
@@ -1883,33 +2212,33 @@ function ItemColumnWrapper({
|
|
|
1883
2212
|
isVisible,
|
|
1884
2213
|
...props
|
|
1885
2214
|
}) {
|
|
1886
|
-
const styles = (0,
|
|
1887
|
-
return /* @__PURE__ */ (0,
|
|
2215
|
+
const styles = (0, import_web7.useSpring)({ opacity: isVisible ? 1 : 0 });
|
|
2216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ItemColumnWrapperStyled, { style: styles, ...props, children });
|
|
1888
2217
|
}
|
|
1889
2218
|
|
|
1890
2219
|
// src/components/Timeline.tsx
|
|
1891
|
-
var
|
|
1892
|
-
var
|
|
1893
|
-
var
|
|
1894
|
-
var
|
|
2220
|
+
var import_web8 = require("@react-spring/web");
|
|
2221
|
+
var import_react14 = __toESM(require("react"));
|
|
2222
|
+
var import_spectacle10 = require("spectacle");
|
|
2223
|
+
var import_styled_components19 = __toESM(require("styled-components"));
|
|
1895
2224
|
|
|
1896
2225
|
// src/components/Timeline.styled.tsx
|
|
1897
|
-
var
|
|
1898
|
-
var TimelineItemContent =
|
|
2226
|
+
var import_styled_components18 = __toESM(require("styled-components"));
|
|
2227
|
+
var TimelineItemContent = import_styled_components18.default.div`
|
|
1899
2228
|
display: flex;
|
|
1900
2229
|
padding: 0.7rem 0 1rem 12px;
|
|
1901
2230
|
`;
|
|
1902
|
-
var TimelineItemContentPhantom = (0,
|
|
2231
|
+
var TimelineItemContentPhantom = (0, import_styled_components18.default)(TimelineItemContent)`
|
|
1903
2232
|
opacity: 0;
|
|
1904
2233
|
`;
|
|
1905
|
-
var TimelineItemBody =
|
|
2234
|
+
var TimelineItemBody = import_styled_components18.default.div`
|
|
1906
2235
|
&,
|
|
1907
2236
|
& > * {
|
|
1908
2237
|
font-size: 1.3rem !important;
|
|
1909
2238
|
color: #ffffff !important;
|
|
1910
2239
|
}
|
|
1911
2240
|
`;
|
|
1912
|
-
var TimelineItemTitle =
|
|
2241
|
+
var TimelineItemTitle = import_styled_components18.default.div`
|
|
1913
2242
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1914
2243
|
font-size: 1rem;
|
|
1915
2244
|
font-weight: bold;
|
|
@@ -1917,8 +2246,8 @@ var TimelineItemTitle = import_styled_components17.default.div`
|
|
|
1917
2246
|
`;
|
|
1918
2247
|
|
|
1919
2248
|
// src/components/Timeline.tsx
|
|
1920
|
-
var
|
|
1921
|
-
var TimelineItemStyled = (0,
|
|
2249
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2250
|
+
var TimelineItemStyled = (0, import_styled_components19.default)(import_web8.animated.div)`
|
|
1922
2251
|
flex: 1;
|
|
1923
2252
|
flex-flow: column nowrap;
|
|
1924
2253
|
display: inline-flex;
|
|
@@ -1936,7 +2265,7 @@ var TimelineItemStyled = (0, import_styled_components18.default)(import_web3.ani
|
|
|
1936
2265
|
}
|
|
1937
2266
|
}
|
|
1938
2267
|
`;
|
|
1939
|
-
var TimelineItemGuide = (0,
|
|
2268
|
+
var TimelineItemGuide = (0, import_styled_components19.default)(import_web8.animated.div)`
|
|
1940
2269
|
width: 100%;
|
|
1941
2270
|
padding-top: 2px;
|
|
1942
2271
|
display: flex;
|
|
@@ -1952,7 +2281,7 @@ var TimelineItemGuide = (0, import_styled_components18.default)(import_web3.anim
|
|
|
1952
2281
|
margin-right: 4px;
|
|
1953
2282
|
}
|
|
1954
2283
|
`;
|
|
1955
|
-
var TimelineItemGuideLine = (0,
|
|
2284
|
+
var TimelineItemGuideLine = (0, import_styled_components19.default)(import_web8.animated.div)`
|
|
1956
2285
|
border-top: 4px solid #ffffff;
|
|
1957
2286
|
margin-right: 4px;
|
|
1958
2287
|
`;
|
|
@@ -1963,9 +2292,9 @@ var style = {
|
|
|
1963
2292
|
alignItems: "center"
|
|
1964
2293
|
};
|
|
1965
2294
|
function Timeline(props) {
|
|
1966
|
-
const children =
|
|
1967
|
-
return /* @__PURE__ */ (0,
|
|
1968
|
-
|
|
2295
|
+
const children = import_react14.default.Children.toArray(props.children);
|
|
2296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2297
|
+
import_spectacle10.Stepper,
|
|
1969
2298
|
{
|
|
1970
2299
|
...props,
|
|
1971
2300
|
values: children,
|
|
@@ -1973,10 +2302,10 @@ function Timeline(props) {
|
|
|
1973
2302
|
inactiveStyle: style,
|
|
1974
2303
|
children: (_value, step) => {
|
|
1975
2304
|
return children.map((child, index) => {
|
|
1976
|
-
if (!
|
|
2305
|
+
if (!import_react14.default.isValidElement(child)) {
|
|
1977
2306
|
return child;
|
|
1978
2307
|
}
|
|
1979
|
-
return
|
|
2308
|
+
return import_react14.default.cloneElement(child, {
|
|
1980
2309
|
// @ts-expect-error cloning
|
|
1981
2310
|
isPhantom: step < index,
|
|
1982
2311
|
isLast: step === index
|
|
@@ -1996,14 +2325,14 @@ function getItemOpacity2({
|
|
|
1996
2325
|
}
|
|
1997
2326
|
function TimelineItem(props) {
|
|
1998
2327
|
const { children, title, isPhantom, isLast, ...rest } = props;
|
|
1999
|
-
const guideLineProps = (0,
|
|
2328
|
+
const guideLineProps = (0, import_web8.useSpring)({
|
|
2000
2329
|
width: isPhantom || isLast ? "0%" : "100%"
|
|
2001
2330
|
});
|
|
2002
|
-
const appearStyles = (0,
|
|
2331
|
+
const appearStyles = (0, import_web8.useSpring)({
|
|
2003
2332
|
opacity: getItemOpacity2({ isPhantom, isLast })
|
|
2004
2333
|
});
|
|
2005
|
-
const colorStyles = (0,
|
|
2006
|
-
return /* @__PURE__ */ (0,
|
|
2334
|
+
const colorStyles = (0, import_web8.useSpring)({ opacity: isPhantom || isLast ? 1 : 0.15 });
|
|
2335
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2007
2336
|
TimelineItemStyled,
|
|
2008
2337
|
{
|
|
2009
2338
|
...rest,
|
|
@@ -2011,24 +2340,24 @@ function TimelineItem(props) {
|
|
|
2011
2340
|
...appearStyles
|
|
2012
2341
|
},
|
|
2013
2342
|
children: [
|
|
2014
|
-
/* @__PURE__ */ (0,
|
|
2015
|
-
/* @__PURE__ */ (0,
|
|
2016
|
-
/* @__PURE__ */ (0,
|
|
2343
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TimelineItemContentPhantom, { children: [
|
|
2344
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemTitle, { children: title }),
|
|
2345
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemBody, { children })
|
|
2017
2346
|
] }),
|
|
2018
|
-
/* @__PURE__ */ (0,
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2347
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TimelineItemGuide, { style: colorStyles, children: [
|
|
2348
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Hexagon, {}),
|
|
2349
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemGuideLine, { style: guideLineProps })
|
|
2021
2350
|
] }),
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2351
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TimelineItemContent, { children: [
|
|
2352
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemTitle, { children: title }),
|
|
2353
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemBody, { children })
|
|
2025
2354
|
] })
|
|
2026
2355
|
]
|
|
2027
2356
|
}
|
|
2028
2357
|
);
|
|
2029
2358
|
}
|
|
2030
2359
|
function Hexagon() {
|
|
2031
|
-
return /* @__PURE__ */ (0,
|
|
2360
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2032
2361
|
"svg",
|
|
2033
2362
|
{
|
|
2034
2363
|
width: "18",
|
|
@@ -2037,14 +2366,14 @@ function Hexagon() {
|
|
|
2037
2366
|
fill: "none",
|
|
2038
2367
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2039
2368
|
children: [
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2041
2370
|
"path",
|
|
2042
2371
|
{
|
|
2043
2372
|
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",
|
|
2044
2373
|
fill: "#F49676"
|
|
2045
2374
|
}
|
|
2046
2375
|
),
|
|
2047
|
-
/* @__PURE__ */ (0,
|
|
2376
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2048
2377
|
"path",
|
|
2049
2378
|
{
|
|
2050
2379
|
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",
|
|
@@ -2057,9 +2386,9 @@ function Hexagon() {
|
|
|
2057
2386
|
}
|
|
2058
2387
|
|
|
2059
2388
|
// src/index.tsx
|
|
2060
|
-
var
|
|
2389
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2061
2390
|
function PassThrough({ children }) {
|
|
2062
|
-
return /* @__PURE__ */ (0,
|
|
2391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children });
|
|
2063
2392
|
}
|
|
2064
2393
|
var layouts = layouts_default;
|
|
2065
2394
|
var componentsMap2 = {
|
|
@@ -2069,12 +2398,13 @@ var componentsMap2 = {
|
|
|
2069
2398
|
function Deck({
|
|
2070
2399
|
deck,
|
|
2071
2400
|
theme,
|
|
2072
|
-
layouts: layouts2 = layouts_default
|
|
2401
|
+
layouts: layouts2 = layouts_default,
|
|
2402
|
+
transition
|
|
2073
2403
|
}) {
|
|
2074
|
-
|
|
2404
|
+
import_react16.default.useEffect(() => {
|
|
2075
2405
|
document.title = deck.metadata.title || "Untitled";
|
|
2076
2406
|
}, [deck.metadata.title]);
|
|
2077
|
-
const mergedTheme =
|
|
2407
|
+
const mergedTheme = import_react16.default.useMemo(() => {
|
|
2078
2408
|
const fonts = {
|
|
2079
2409
|
...theme_default.fonts,
|
|
2080
2410
|
...theme.themeTokens.fonts ?? {}
|
|
@@ -2085,44 +2415,55 @@ function Deck({
|
|
|
2085
2415
|
fonts
|
|
2086
2416
|
};
|
|
2087
2417
|
}, [theme]);
|
|
2088
|
-
const GlobalStyle =
|
|
2418
|
+
const GlobalStyle = import_react16.default.useMemo(() => {
|
|
2089
2419
|
const cssVariables = createCssVariables(theme.themeTokens.colors);
|
|
2090
|
-
return
|
|
2420
|
+
return import_styled_components20.createGlobalStyle`
|
|
2091
2421
|
:root {
|
|
2092
2422
|
${cssVariables}
|
|
2093
2423
|
--font-family: ${mergedTheme.fonts.text}
|
|
2094
2424
|
}
|
|
2095
2425
|
`;
|
|
2096
2426
|
}, [theme, mergedTheme]);
|
|
2097
|
-
return /* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2427
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react16.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PestacleProvider, { layouts: layouts2, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react15.MDXProvider, { components: componentsMap2, children: [
|
|
2428
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(GlobalStyle, {}),
|
|
2429
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2430
|
+
import_spectacle11.Deck,
|
|
2431
|
+
{
|
|
2432
|
+
theme: mergedTheme,
|
|
2433
|
+
template,
|
|
2434
|
+
transition: resolveTransition(transition),
|
|
2435
|
+
children: deck.slides.map((slide, i) => {
|
|
2436
|
+
var _a;
|
|
2437
|
+
const Component = slide.slideComponent;
|
|
2438
|
+
const slideTransitionName = (_a = slide.metadata) == null ? void 0 : _a.transition;
|
|
2439
|
+
const slideTransition2 = resolveTransition(slideTransitionName);
|
|
2440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_spectacle11.Slide, { transition: slideTransition2, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Component, {}) }, i);
|
|
2441
|
+
})
|
|
2442
|
+
}
|
|
2443
|
+
)
|
|
2103
2444
|
] }) }) });
|
|
2104
2445
|
}
|
|
2105
2446
|
function Danger({ children }) {
|
|
2106
|
-
return /* @__PURE__ */ (0,
|
|
2447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "red" }, children });
|
|
2107
2448
|
}
|
|
2108
2449
|
function Information({ children }) {
|
|
2109
|
-
return /* @__PURE__ */ (0,
|
|
2450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "orange" }, children });
|
|
2110
2451
|
}
|
|
2111
2452
|
function Success({ children }) {
|
|
2112
|
-
return /* @__PURE__ */ (0,
|
|
2453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "green" }, children });
|
|
2113
2454
|
}
|
|
2114
2455
|
function Warning({ children }) {
|
|
2115
|
-
return /* @__PURE__ */ (0,
|
|
2456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "yellow" }, children });
|
|
2116
2457
|
}
|
|
2117
2458
|
function Side({ children }) {
|
|
2118
|
-
return /* @__PURE__ */ (0,
|
|
2459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children });
|
|
2119
2460
|
}
|
|
2120
2461
|
Side.mdxType = "Side";
|
|
2121
2462
|
function Documentation({ children }) {
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2463
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children });
|
|
2123
2464
|
}
|
|
2124
2465
|
function Box2({ children }) {
|
|
2125
|
-
return /* @__PURE__ */ (0,
|
|
2466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children });
|
|
2126
2467
|
}
|
|
2127
2468
|
|
|
2128
2469
|
// <stdin>
|