@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/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 +468 -118
- package/index.d.ts +5 -1
- package/index.mjs +463 -110
- package/layouts/FullImageLayout.d.ts +2 -2
- 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_react16 = require("@mdx-js/react");
|
|
65
|
+
var import_react17 = __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) {
|
|
@@ -518,6 +528,11 @@ var HeadingTwo = import_styled_components2.default.h2`
|
|
|
518
528
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
519
529
|
font-size: 55px;
|
|
520
530
|
font-weight: 400;
|
|
531
|
+
|
|
532
|
+
strong {
|
|
533
|
+
color: var(--color-secondary);
|
|
534
|
+
font-weight: 500;
|
|
535
|
+
}
|
|
521
536
|
`;
|
|
522
537
|
var HeadingThree = import_styled_components2.default.h3`
|
|
523
538
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
@@ -1056,6 +1071,7 @@ var Default3Layout = ({
|
|
|
1056
1071
|
};
|
|
1057
1072
|
|
|
1058
1073
|
// src/layouts/FullImageLayout.tsx
|
|
1074
|
+
var import_react7 = __toESM(require("react"));
|
|
1059
1075
|
var import_styled_components6 = __toESM(require("styled-components"));
|
|
1060
1076
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1061
1077
|
var Overlay = import_styled_components6.default.div`
|
|
@@ -1082,6 +1098,9 @@ function FullImageLayout({
|
|
|
1082
1098
|
position = "bottom",
|
|
1083
1099
|
dim = 0.4
|
|
1084
1100
|
}) {
|
|
1101
|
+
const [images, rest] = getMatchingMdxType(children, "Image");
|
|
1102
|
+
const firstImage = images[0];
|
|
1103
|
+
const backgroundImage = image || (import_react7.default.isValidElement(firstImage) ? firstImage.props.src : void 0);
|
|
1085
1104
|
const justifyMap = {
|
|
1086
1105
|
top: "flex-start",
|
|
1087
1106
|
center: "center",
|
|
@@ -1101,7 +1120,7 @@ function FullImageLayout({
|
|
|
1101
1120
|
style: {
|
|
1102
1121
|
position: "absolute",
|
|
1103
1122
|
inset: 0,
|
|
1104
|
-
backgroundImage: `url(${
|
|
1123
|
+
backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
|
|
1105
1124
|
backgroundSize: "cover",
|
|
1106
1125
|
backgroundPosition: "center"
|
|
1107
1126
|
}
|
|
@@ -1117,7 +1136,7 @@ function FullImageLayout({
|
|
|
1117
1136
|
}
|
|
1118
1137
|
}
|
|
1119
1138
|
),
|
|
1120
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Overlay, { style: { justifyContent: justifyMap[position] }, children })
|
|
1139
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Overlay, { style: { justifyContent: justifyMap[position] }, children: firstImage ? rest : children })
|
|
1121
1140
|
]
|
|
1122
1141
|
}
|
|
1123
1142
|
);
|
|
@@ -1271,7 +1290,7 @@ var SectionLayout = import_styled_components8.default.div`
|
|
|
1271
1290
|
var import_styled_components10 = __toESM(require("styled-components"));
|
|
1272
1291
|
|
|
1273
1292
|
// src/layouts/columns.tsx
|
|
1274
|
-
var
|
|
1293
|
+
var import_react8 = __toESM(require("react"));
|
|
1275
1294
|
var import_styled_components9 = __toESM(require("styled-components"));
|
|
1276
1295
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1277
1296
|
var DivWithHeading = import_styled_components9.default.div`
|
|
@@ -1297,7 +1316,7 @@ function ColumnsLayout({
|
|
|
1297
1316
|
children,
|
|
1298
1317
|
reverse
|
|
1299
1318
|
}) {
|
|
1300
|
-
const childrenArray =
|
|
1319
|
+
const childrenArray = import_react8.default.Children.toArray(children);
|
|
1301
1320
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1302
1321
|
ColumnsContainer,
|
|
1303
1322
|
{
|
|
@@ -1596,13 +1615,332 @@ var theme_default = {
|
|
|
1596
1615
|
space: [8, 16, 24]
|
|
1597
1616
|
};
|
|
1598
1617
|
|
|
1618
|
+
// src/transitions.ts
|
|
1619
|
+
var import_spectacle7 = require("spectacle");
|
|
1620
|
+
var dropTransition = {
|
|
1621
|
+
from: { transform: "translateY(-100%)", opacity: 0 },
|
|
1622
|
+
enter: { transform: "translateY(0%)", opacity: 1 },
|
|
1623
|
+
leave: { transform: "translateY(100%)", opacity: 0 }
|
|
1624
|
+
};
|
|
1625
|
+
var noneTransition = {
|
|
1626
|
+
from: { opacity: 1 },
|
|
1627
|
+
enter: { opacity: 1 },
|
|
1628
|
+
leave: { opacity: 0 }
|
|
1629
|
+
};
|
|
1630
|
+
var transitionMap = {
|
|
1631
|
+
fade: import_spectacle7.fadeTransition,
|
|
1632
|
+
slide: import_spectacle7.slideTransition,
|
|
1633
|
+
drop: dropTransition,
|
|
1634
|
+
none: noneTransition
|
|
1635
|
+
};
|
|
1636
|
+
function resolveTransition(name) {
|
|
1637
|
+
if (!name) return void 0;
|
|
1638
|
+
return transitionMap[name];
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1599
1641
|
// src/index.tsx
|
|
1600
1642
|
__reExport(src_exports, require("spectacle"));
|
|
1601
1643
|
|
|
1602
|
-
// src/components/
|
|
1603
|
-
var
|
|
1644
|
+
// src/components/animations/AnimatedCounter.tsx
|
|
1645
|
+
var import_web = require("@react-spring/web");
|
|
1646
|
+
|
|
1647
|
+
// src/components/animations/useInView.ts
|
|
1648
|
+
var import_react9 = __toESM(require("react"));
|
|
1649
|
+
function useInView() {
|
|
1650
|
+
const ref = import_react9.default.useRef(null);
|
|
1651
|
+
const [isInView, setIsInView] = import_react9.default.useState(false);
|
|
1652
|
+
import_react9.default.useEffect(() => {
|
|
1653
|
+
const el = ref.current;
|
|
1654
|
+
if (!el) return;
|
|
1655
|
+
const observer = new IntersectionObserver(
|
|
1656
|
+
([entry]) => {
|
|
1657
|
+
if (entry.isIntersecting) {
|
|
1658
|
+
setIsInView(true);
|
|
1659
|
+
observer.disconnect();
|
|
1660
|
+
}
|
|
1661
|
+
},
|
|
1662
|
+
{ threshold: 0.1 }
|
|
1663
|
+
);
|
|
1664
|
+
observer.observe(el);
|
|
1665
|
+
return () => observer.disconnect();
|
|
1666
|
+
}, []);
|
|
1667
|
+
return [ref, isInView];
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
// src/components/animations/AnimatedCounter.tsx
|
|
1604
1671
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1605
|
-
|
|
1672
|
+
function AnimatedCounter({
|
|
1673
|
+
to,
|
|
1674
|
+
from = 0,
|
|
1675
|
+
duration = 1500,
|
|
1676
|
+
delay = 0,
|
|
1677
|
+
decimals = 0,
|
|
1678
|
+
prefix = "",
|
|
1679
|
+
suffix = ""
|
|
1680
|
+
}) {
|
|
1681
|
+
const [ref, isInView] = useInView();
|
|
1682
|
+
const { value } = (0, import_web.useSpring)({
|
|
1683
|
+
value: isInView ? to : from,
|
|
1684
|
+
delay: isInView ? delay : 0,
|
|
1685
|
+
config: { duration }
|
|
1686
|
+
});
|
|
1687
|
+
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}`) });
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
// src/components/animations/FadeIn.tsx
|
|
1691
|
+
var import_web2 = require("@react-spring/web");
|
|
1692
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1693
|
+
function FadeIn({
|
|
1694
|
+
children,
|
|
1695
|
+
direction = "up",
|
|
1696
|
+
distance = 20,
|
|
1697
|
+
delay = 0,
|
|
1698
|
+
duration = 400
|
|
1699
|
+
}) {
|
|
1700
|
+
const [ref, isInView] = useInView();
|
|
1701
|
+
const translateMap = {
|
|
1702
|
+
up: `translateY(${distance}px)`,
|
|
1703
|
+
down: `translateY(-${distance}px)`,
|
|
1704
|
+
left: `translateX(${distance}px)`,
|
|
1705
|
+
right: `translateX(-${distance}px)`,
|
|
1706
|
+
none: "translate(0, 0)"
|
|
1707
|
+
};
|
|
1708
|
+
const styles = (0, import_web2.useSpring)({
|
|
1709
|
+
opacity: isInView ? 1 : 0,
|
|
1710
|
+
transform: isInView ? "translate(0, 0)" : translateMap[direction],
|
|
1711
|
+
delay: isInView ? delay : 0,
|
|
1712
|
+
config: { duration }
|
|
1713
|
+
});
|
|
1714
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_web2.animated.div, { ref, style: styles, children });
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
// src/components/animations/ProgressRing.tsx
|
|
1718
|
+
var import_web3 = require("@react-spring/web");
|
|
1719
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1720
|
+
function ProgressRing({
|
|
1721
|
+
value,
|
|
1722
|
+
size = 120,
|
|
1723
|
+
strokeWidth = 8,
|
|
1724
|
+
color = "var(--color-secondary)",
|
|
1725
|
+
trackColor = "rgba(255,255,255,0.1)",
|
|
1726
|
+
duration = 1e3,
|
|
1727
|
+
delay = 0,
|
|
1728
|
+
children
|
|
1729
|
+
}) {
|
|
1730
|
+
const [ref, isInView] = useInView();
|
|
1731
|
+
const radius = (size - strokeWidth) / 2;
|
|
1732
|
+
const circumference = 2 * Math.PI * radius;
|
|
1733
|
+
const targetOffset = circumference - value / 100 * circumference;
|
|
1734
|
+
const { offset } = (0, import_web3.useSpring)({
|
|
1735
|
+
offset: isInView ? targetOffset : circumference,
|
|
1736
|
+
delay: isInView ? delay : 0,
|
|
1737
|
+
config: { duration }
|
|
1738
|
+
});
|
|
1739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1740
|
+
"div",
|
|
1741
|
+
{
|
|
1742
|
+
ref,
|
|
1743
|
+
style: {
|
|
1744
|
+
position: "relative",
|
|
1745
|
+
width: size,
|
|
1746
|
+
height: size,
|
|
1747
|
+
display: "inline-flex",
|
|
1748
|
+
alignItems: "center",
|
|
1749
|
+
justifyContent: "center"
|
|
1750
|
+
},
|
|
1751
|
+
children: [
|
|
1752
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
|
|
1753
|
+
"svg",
|
|
1754
|
+
{
|
|
1755
|
+
width: size,
|
|
1756
|
+
height: size,
|
|
1757
|
+
style: { position: "absolute", transform: "rotate(-90deg)" },
|
|
1758
|
+
children: [
|
|
1759
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1760
|
+
"circle",
|
|
1761
|
+
{
|
|
1762
|
+
cx: size / 2,
|
|
1763
|
+
cy: size / 2,
|
|
1764
|
+
r: radius,
|
|
1765
|
+
fill: "none",
|
|
1766
|
+
stroke: trackColor,
|
|
1767
|
+
strokeWidth
|
|
1768
|
+
}
|
|
1769
|
+
),
|
|
1770
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1771
|
+
import_web3.animated.circle,
|
|
1772
|
+
{
|
|
1773
|
+
cx: size / 2,
|
|
1774
|
+
cy: size / 2,
|
|
1775
|
+
r: radius,
|
|
1776
|
+
fill: "none",
|
|
1777
|
+
stroke: color,
|
|
1778
|
+
strokeWidth,
|
|
1779
|
+
strokeDasharray: circumference,
|
|
1780
|
+
strokeDashoffset: offset,
|
|
1781
|
+
strokeLinecap: "round"
|
|
1782
|
+
}
|
|
1783
|
+
)
|
|
1784
|
+
]
|
|
1785
|
+
}
|
|
1786
|
+
),
|
|
1787
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1788
|
+
"div",
|
|
1789
|
+
{
|
|
1790
|
+
style: {
|
|
1791
|
+
position: "relative",
|
|
1792
|
+
zIndex: 1,
|
|
1793
|
+
fontFamily: "var(--font-family)"
|
|
1794
|
+
},
|
|
1795
|
+
children
|
|
1796
|
+
}
|
|
1797
|
+
)
|
|
1798
|
+
]
|
|
1799
|
+
}
|
|
1800
|
+
);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
// src/components/animations/ScaleIn.tsx
|
|
1804
|
+
var import_web4 = require("@react-spring/web");
|
|
1805
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1806
|
+
function ScaleIn({
|
|
1807
|
+
children,
|
|
1808
|
+
from = 0,
|
|
1809
|
+
delay = 0,
|
|
1810
|
+
duration = 400
|
|
1811
|
+
}) {
|
|
1812
|
+
const [ref, isInView] = useInView();
|
|
1813
|
+
const styles = (0, import_web4.useSpring)({
|
|
1814
|
+
opacity: isInView ? 1 : 0,
|
|
1815
|
+
transform: isInView ? "scale(1)" : `scale(${from})`,
|
|
1816
|
+
delay: isInView ? delay : 0,
|
|
1817
|
+
config: { duration }
|
|
1818
|
+
});
|
|
1819
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_web4.animated.div, { ref, style: styles, children });
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
// src/components/animations/Spotlight.tsx
|
|
1823
|
+
var import_styled_components13 = __toESM(require("styled-components"));
|
|
1824
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1825
|
+
var Overlay2 = import_styled_components13.default.div`
|
|
1826
|
+
position: fixed;
|
|
1827
|
+
inset: 0;
|
|
1828
|
+
background: rgba(0, 0, 0, ${(p) => p.$active ? p.$dimOpacity : 0});
|
|
1829
|
+
pointer-events: ${(p) => p.$active ? "auto" : "none"};
|
|
1830
|
+
transition: background 0.4s ease;
|
|
1831
|
+
z-index: 99;
|
|
1832
|
+
`;
|
|
1833
|
+
var Content = import_styled_components13.default.div`
|
|
1834
|
+
position: relative;
|
|
1835
|
+
z-index: ${(p) => p.$active ? 100 : "auto"};
|
|
1836
|
+
`;
|
|
1837
|
+
function Spotlight({
|
|
1838
|
+
children,
|
|
1839
|
+
active = true,
|
|
1840
|
+
dimOpacity = 0.7
|
|
1841
|
+
}) {
|
|
1842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
|
|
1843
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Overlay2, { $active: active, $dimOpacity: dimOpacity }),
|
|
1844
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Content, { $active: active, children })
|
|
1845
|
+
] });
|
|
1846
|
+
}
|
|
1847
|
+
|
|
1848
|
+
// src/components/animations/StaggerChildren.tsx
|
|
1849
|
+
var import_web5 = require("@react-spring/web");
|
|
1850
|
+
var import_react10 = __toESM(require("react"));
|
|
1851
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1852
|
+
function StaggerChildren({
|
|
1853
|
+
children,
|
|
1854
|
+
stagger = 100,
|
|
1855
|
+
delay = 0,
|
|
1856
|
+
duration = 400,
|
|
1857
|
+
direction = "up",
|
|
1858
|
+
distance = 20
|
|
1859
|
+
}) {
|
|
1860
|
+
const [ref, isInView] = useInView();
|
|
1861
|
+
const items = import_react10.default.Children.toArray(children);
|
|
1862
|
+
const translateMap = {
|
|
1863
|
+
up: `translateY(${distance}px)`,
|
|
1864
|
+
down: `translateY(-${distance}px)`,
|
|
1865
|
+
left: `translateX(${distance}px)`,
|
|
1866
|
+
right: `translateX(-${distance}px)`,
|
|
1867
|
+
none: "translate(0, 0)"
|
|
1868
|
+
};
|
|
1869
|
+
const springs = (0, import_web5.useSprings)(
|
|
1870
|
+
items.length,
|
|
1871
|
+
items.map((_, i) => ({
|
|
1872
|
+
opacity: isInView ? 1 : 0,
|
|
1873
|
+
transform: isInView ? "translate(0, 0)" : translateMap[direction],
|
|
1874
|
+
delay: isInView ? delay + i * stagger : 0,
|
|
1875
|
+
config: { duration }
|
|
1876
|
+
}))
|
|
1877
|
+
);
|
|
1878
|
+
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)) });
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
// src/components/animations/TypeWriter.tsx
|
|
1882
|
+
var import_react11 = __toESM(require("react"));
|
|
1883
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1884
|
+
function extractText(node) {
|
|
1885
|
+
if (typeof node === "string") return node;
|
|
1886
|
+
if (typeof node === "number") return String(node);
|
|
1887
|
+
if (!node) return "";
|
|
1888
|
+
if (Array.isArray(node)) return node.map(extractText).join("");
|
|
1889
|
+
if (import_react11.default.isValidElement(node)) {
|
|
1890
|
+
const props = node.props;
|
|
1891
|
+
return extractText(props.children);
|
|
1892
|
+
}
|
|
1893
|
+
return "";
|
|
1894
|
+
}
|
|
1895
|
+
function TypeWriter({
|
|
1896
|
+
children,
|
|
1897
|
+
speed = 50,
|
|
1898
|
+
delay = 0,
|
|
1899
|
+
cursor = true
|
|
1900
|
+
}) {
|
|
1901
|
+
const text = extractText(children);
|
|
1902
|
+
const [ref, isInView] = useInView();
|
|
1903
|
+
const [displayed, setDisplayed] = import_react11.default.useState("");
|
|
1904
|
+
const [done, setDone] = import_react11.default.useState(false);
|
|
1905
|
+
import_react11.default.useEffect(() => {
|
|
1906
|
+
if (!isInView) return;
|
|
1907
|
+
let index = 0;
|
|
1908
|
+
setDisplayed("");
|
|
1909
|
+
setDone(false);
|
|
1910
|
+
const timeout = setTimeout(() => {
|
|
1911
|
+
const interval = setInterval(() => {
|
|
1912
|
+
if (index < text.length) {
|
|
1913
|
+
setDisplayed(text.slice(0, index + 1));
|
|
1914
|
+
index++;
|
|
1915
|
+
} else {
|
|
1916
|
+
setDone(true);
|
|
1917
|
+
clearInterval(interval);
|
|
1918
|
+
}
|
|
1919
|
+
}, speed);
|
|
1920
|
+
return () => clearInterval(interval);
|
|
1921
|
+
}, delay);
|
|
1922
|
+
return () => clearTimeout(timeout);
|
|
1923
|
+
}, [text, speed, delay, isInView]);
|
|
1924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { ref, style: { fontFamily: "var(--font-family)" }, children: [
|
|
1925
|
+
displayed,
|
|
1926
|
+
cursor && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1927
|
+
"span",
|
|
1928
|
+
{
|
|
1929
|
+
style: {
|
|
1930
|
+
borderRight: "2px solid currentColor",
|
|
1931
|
+
marginLeft: 1,
|
|
1932
|
+
animation: done ? "pestacle-blink 1s step-end infinite" : "none"
|
|
1933
|
+
},
|
|
1934
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: `@keyframes pestacle-blink { 50% { opacity: 0; } }` })
|
|
1935
|
+
}
|
|
1936
|
+
)
|
|
1937
|
+
] });
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
// src/components/DocumentationItem.tsx
|
|
1941
|
+
var import_styled_components14 = __toESM(require("styled-components"));
|
|
1942
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1943
|
+
var DocWrapper = import_styled_components14.default.div`
|
|
1606
1944
|
position: absolute;
|
|
1607
1945
|
bottom: 0;
|
|
1608
1946
|
right: 0;
|
|
@@ -1616,20 +1954,20 @@ var DocWrapper = import_styled_components13.default.div`
|
|
|
1616
1954
|
display: flex;
|
|
1617
1955
|
}
|
|
1618
1956
|
`;
|
|
1619
|
-
var DocContainer =
|
|
1957
|
+
var DocContainer = import_styled_components14.default.div`
|
|
1620
1958
|
margin: 2rem 1rem;
|
|
1621
1959
|
background-color: #333;
|
|
1622
1960
|
border: 1px solid #333;
|
|
1623
1961
|
padding: 0.5rem 1rem;
|
|
1624
1962
|
border-radius: 1.5rem;
|
|
1625
1963
|
`;
|
|
1626
|
-
var DocLink =
|
|
1964
|
+
var DocLink = import_styled_components14.default.a`
|
|
1627
1965
|
text-decoration: none;
|
|
1628
1966
|
font-weight: normal;
|
|
1629
1967
|
font-family: var(--font-family);
|
|
1630
1968
|
color: var(--color-secondary);
|
|
1631
1969
|
`;
|
|
1632
|
-
var DocLinkItem = (0,
|
|
1970
|
+
var DocLinkItem = (0, import_styled_components14.default)(DocLink)`
|
|
1633
1971
|
width: fit-content;
|
|
1634
1972
|
display: inline-block;
|
|
1635
1973
|
background-color: #333;
|
|
@@ -1638,7 +1976,7 @@ var DocLinkItem = (0, import_styled_components13.default)(DocLink)`
|
|
|
1638
1976
|
border-radius: 1.5rem;
|
|
1639
1977
|
margin: 0.25rem 0;
|
|
1640
1978
|
`;
|
|
1641
|
-
var DocContent =
|
|
1979
|
+
var DocContent = import_styled_components14.default.div`
|
|
1642
1980
|
display: flex;
|
|
1643
1981
|
flex-flow: column-reverse nowrap;
|
|
1644
1982
|
position: absolute;
|
|
@@ -1653,24 +1991,24 @@ function Doc({
|
|
|
1653
1991
|
link,
|
|
1654
1992
|
children
|
|
1655
1993
|
}) {
|
|
1656
|
-
return /* @__PURE__ */ (0,
|
|
1657
|
-
children && /* @__PURE__ */ (0,
|
|
1658
|
-
/* @__PURE__ */ (0,
|
|
1994
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DocWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DocContainer, { children: [
|
|
1995
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DocContent, { children }),
|
|
1996
|
+
/* @__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
1997
|
] }) });
|
|
1660
1998
|
}
|
|
1661
1999
|
function DocItem({ label, link }) {
|
|
1662
|
-
return /* @__PURE__ */ (0,
|
|
2000
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link, children: label });
|
|
1663
2001
|
}
|
|
1664
2002
|
|
|
1665
2003
|
// src/components/FilePane.tsx
|
|
1666
|
-
var
|
|
2004
|
+
var import_react12 = __toESM(require("react"));
|
|
1667
2005
|
function FilePane({
|
|
1668
2006
|
name,
|
|
1669
2007
|
children,
|
|
1670
2008
|
priority,
|
|
1671
2009
|
...divProps
|
|
1672
2010
|
}) {
|
|
1673
|
-
return
|
|
2011
|
+
return import_react12.default.isValidElement(children) ? import_react12.default.cloneElement(children, {
|
|
1674
2012
|
// @ts-expect-error cloning
|
|
1675
2013
|
priority,
|
|
1676
2014
|
name
|
|
@@ -1679,12 +2017,12 @@ function FilePane({
|
|
|
1679
2017
|
FilePane.mdxType = "FilePane";
|
|
1680
2018
|
|
|
1681
2019
|
// src/components/HorizontalList.tsx
|
|
1682
|
-
var
|
|
1683
|
-
var
|
|
1684
|
-
var
|
|
1685
|
-
var
|
|
1686
|
-
var
|
|
1687
|
-
var Container =
|
|
2020
|
+
var import_web6 = require("@react-spring/web");
|
|
2021
|
+
var import_react13 = __toESM(require("react"));
|
|
2022
|
+
var import_spectacle8 = require("spectacle");
|
|
2023
|
+
var import_styled_components15 = __toESM(require("styled-components"));
|
|
2024
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2025
|
+
var Container = import_styled_components15.default.div`
|
|
1688
2026
|
display: grid;
|
|
1689
2027
|
grid-gap: 2rem;
|
|
1690
2028
|
`;
|
|
@@ -1692,18 +2030,18 @@ function HorizontalList({
|
|
|
1692
2030
|
children,
|
|
1693
2031
|
columns = 3
|
|
1694
2032
|
}) {
|
|
1695
|
-
const items =
|
|
1696
|
-
return /* @__PURE__ */ (0,
|
|
2033
|
+
const items = import_react13.default.Children.toArray(children);
|
|
2034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_spectacle8.Stepper, { values: items, children: (_, step) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1697
2035
|
Container,
|
|
1698
2036
|
{
|
|
1699
2037
|
style: {
|
|
1700
2038
|
gridTemplateColumns: `repeat(${columns}, 1fr)`
|
|
1701
2039
|
},
|
|
1702
2040
|
children: items.map((item, k) => {
|
|
1703
|
-
if (!
|
|
2041
|
+
if (!import_react13.default.isValidElement(item)) {
|
|
1704
2042
|
return item;
|
|
1705
2043
|
}
|
|
1706
|
-
return
|
|
2044
|
+
return import_react13.default.cloneElement(item, {
|
|
1707
2045
|
// @ts-expect-error cloning
|
|
1708
2046
|
position: k + 1,
|
|
1709
2047
|
isVisible: k <= step,
|
|
@@ -1714,11 +2052,11 @@ function HorizontalList({
|
|
|
1714
2052
|
) });
|
|
1715
2053
|
}
|
|
1716
2054
|
function Pill({ position }) {
|
|
1717
|
-
return /* @__PURE__ */ (0,
|
|
2055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1718
2056
|
"div",
|
|
1719
2057
|
{
|
|
1720
2058
|
style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 },
|
|
1721
|
-
children: /* @__PURE__ */ (0,
|
|
2059
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1722
2060
|
"svg",
|
|
1723
2061
|
{
|
|
1724
2062
|
width: "48",
|
|
@@ -1727,14 +2065,14 @@ function Pill({ position }) {
|
|
|
1727
2065
|
fill: "none",
|
|
1728
2066
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1729
2067
|
children: [
|
|
1730
|
-
/* @__PURE__ */ (0,
|
|
2068
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1731
2069
|
"path",
|
|
1732
2070
|
{
|
|
1733
2071
|
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
2072
|
fill: "#ffffff"
|
|
1735
2073
|
}
|
|
1736
2074
|
),
|
|
1737
|
-
/* @__PURE__ */ (0,
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1738
2076
|
"text",
|
|
1739
2077
|
{
|
|
1740
2078
|
x: "9",
|
|
@@ -1746,7 +2084,7 @@ function Pill({ position }) {
|
|
|
1746
2084
|
children: position
|
|
1747
2085
|
}
|
|
1748
2086
|
),
|
|
1749
|
-
/* @__PURE__ */ (0,
|
|
2087
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1750
2088
|
"path",
|
|
1751
2089
|
{
|
|
1752
2090
|
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 +2097,12 @@ function Pill({ position }) {
|
|
|
1759
2097
|
}
|
|
1760
2098
|
);
|
|
1761
2099
|
}
|
|
1762
|
-
var Item = (0,
|
|
2100
|
+
var Item = (0, import_styled_components15.default)(import_web6.animated.div)`
|
|
1763
2101
|
display: flex;
|
|
1764
2102
|
flex-direction: column;
|
|
1765
2103
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1766
2104
|
`;
|
|
1767
|
-
var ItemHead =
|
|
2105
|
+
var ItemHead = import_styled_components15.default.div`
|
|
1768
2106
|
display: flex;
|
|
1769
2107
|
flex-direction: row;
|
|
1770
2108
|
font-size: 1.3rem;
|
|
@@ -1774,7 +2112,7 @@ var ItemHead = import_styled_components14.default.div`
|
|
|
1774
2112
|
margin: 0;
|
|
1775
2113
|
}
|
|
1776
2114
|
`;
|
|
1777
|
-
var ItemContent =
|
|
2115
|
+
var ItemContent = import_styled_components15.default.div`
|
|
1778
2116
|
> * {
|
|
1779
2117
|
font-size: 1rem;
|
|
1780
2118
|
padding: 4px !important;
|
|
@@ -1797,22 +2135,22 @@ function HorizontalListItem({
|
|
|
1797
2135
|
isVisible,
|
|
1798
2136
|
isLast
|
|
1799
2137
|
}) {
|
|
1800
|
-
const opacityStyles = (0,
|
|
2138
|
+
const opacityStyles = (0, import_web6.useSpring)({
|
|
1801
2139
|
opacity: getItemOpacity({ isVisible, isLast })
|
|
1802
2140
|
});
|
|
1803
|
-
return /* @__PURE__ */ (0,
|
|
1804
|
-
/* @__PURE__ */ (0,
|
|
1805
|
-
/* @__PURE__ */ (0,
|
|
1806
|
-
/* @__PURE__ */ (0,
|
|
2141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(Item, { style: opacityStyles, children: [
|
|
2142
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(ItemHead, { children: [
|
|
2143
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Pill, { position }),
|
|
2144
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { children: title })
|
|
1807
2145
|
] }),
|
|
1808
|
-
/* @__PURE__ */ (0,
|
|
2146
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ItemContent, { children })
|
|
1809
2147
|
] });
|
|
1810
2148
|
}
|
|
1811
2149
|
|
|
1812
2150
|
// src/components/IconBox.tsx
|
|
1813
|
-
var
|
|
1814
|
-
var
|
|
1815
|
-
var IconBoxContent =
|
|
2151
|
+
var import_styled_components16 = __toESM(require("styled-components"));
|
|
2152
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2153
|
+
var IconBoxContent = import_styled_components16.default.div`
|
|
1816
2154
|
* {
|
|
1817
2155
|
margin: 0.2rem !important;
|
|
1818
2156
|
padding: 0 !important;
|
|
@@ -1822,7 +2160,7 @@ function IconBox({
|
|
|
1822
2160
|
children,
|
|
1823
2161
|
icon
|
|
1824
2162
|
}) {
|
|
1825
|
-
return /* @__PURE__ */ (0,
|
|
2163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
1826
2164
|
"div",
|
|
1827
2165
|
{
|
|
1828
2166
|
style: {
|
|
@@ -1832,23 +2170,23 @@ function IconBox({
|
|
|
1832
2170
|
padding: "1rem 0"
|
|
1833
2171
|
},
|
|
1834
2172
|
children: [
|
|
1835
|
-
/* @__PURE__ */ (0,
|
|
1836
|
-
/* @__PURE__ */ (0,
|
|
2173
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { fontSize: 60 }, children: icon }),
|
|
2174
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconBoxContent, { children })
|
|
1837
2175
|
]
|
|
1838
2176
|
}
|
|
1839
2177
|
);
|
|
1840
2178
|
}
|
|
1841
2179
|
|
|
1842
2180
|
// src/components/ItemsColumn.tsx
|
|
1843
|
-
var
|
|
1844
|
-
var
|
|
1845
|
-
var
|
|
1846
|
-
var
|
|
1847
|
-
var
|
|
2181
|
+
var import_web7 = require("@react-spring/web");
|
|
2182
|
+
var import_react14 = __toESM(require("react"));
|
|
2183
|
+
var import_spectacle9 = require("spectacle");
|
|
2184
|
+
var import_styled_components17 = __toESM(require("styled-components"));
|
|
2185
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
1848
2186
|
function ItemsColumn(divProps) {
|
|
1849
2187
|
const { style: style2, children, ...props } = divProps;
|
|
1850
|
-
const childrenArray =
|
|
1851
|
-
return /* @__PURE__ */ (0,
|
|
2188
|
+
const childrenArray = import_react14.default.Children.toArray(children);
|
|
2189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_spectacle9.Stepper, { values: childrenArray, children: (_value, step) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
1852
2190
|
"div",
|
|
1853
2191
|
{
|
|
1854
2192
|
style: {
|
|
@@ -1863,15 +2201,15 @@ function ItemsColumn(divProps) {
|
|
|
1863
2201
|
...props,
|
|
1864
2202
|
children: childrenArray.map((child, index) => {
|
|
1865
2203
|
const isVisible = index <= step;
|
|
1866
|
-
if (!
|
|
2204
|
+
if (!import_react14.default.isValidElement(child)) {
|
|
1867
2205
|
return child;
|
|
1868
2206
|
}
|
|
1869
|
-
return /* @__PURE__ */ (0,
|
|
2207
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ItemColumnWrapper, { isVisible, children: child }, index);
|
|
1870
2208
|
})
|
|
1871
2209
|
}
|
|
1872
2210
|
) });
|
|
1873
2211
|
}
|
|
1874
|
-
var ItemColumnWrapperStyled = (0,
|
|
2212
|
+
var ItemColumnWrapperStyled = (0, import_styled_components17.default)(import_web7.animated.div)`
|
|
1875
2213
|
display: flex;
|
|
1876
2214
|
justify-content: center;
|
|
1877
2215
|
* {
|
|
@@ -1883,33 +2221,33 @@ function ItemColumnWrapper({
|
|
|
1883
2221
|
isVisible,
|
|
1884
2222
|
...props
|
|
1885
2223
|
}) {
|
|
1886
|
-
const styles = (0,
|
|
1887
|
-
return /* @__PURE__ */ (0,
|
|
2224
|
+
const styles = (0, import_web7.useSpring)({ opacity: isVisible ? 1 : 0 });
|
|
2225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ItemColumnWrapperStyled, { style: styles, ...props, children });
|
|
1888
2226
|
}
|
|
1889
2227
|
|
|
1890
2228
|
// src/components/Timeline.tsx
|
|
1891
|
-
var
|
|
1892
|
-
var
|
|
1893
|
-
var
|
|
1894
|
-
var
|
|
2229
|
+
var import_web8 = require("@react-spring/web");
|
|
2230
|
+
var import_react15 = __toESM(require("react"));
|
|
2231
|
+
var import_spectacle10 = require("spectacle");
|
|
2232
|
+
var import_styled_components19 = __toESM(require("styled-components"));
|
|
1895
2233
|
|
|
1896
2234
|
// src/components/Timeline.styled.tsx
|
|
1897
|
-
var
|
|
1898
|
-
var TimelineItemContent =
|
|
2235
|
+
var import_styled_components18 = __toESM(require("styled-components"));
|
|
2236
|
+
var TimelineItemContent = import_styled_components18.default.div`
|
|
1899
2237
|
display: flex;
|
|
1900
2238
|
padding: 0.7rem 0 1rem 12px;
|
|
1901
2239
|
`;
|
|
1902
|
-
var TimelineItemContentPhantom = (0,
|
|
2240
|
+
var TimelineItemContentPhantom = (0, import_styled_components18.default)(TimelineItemContent)`
|
|
1903
2241
|
opacity: 0;
|
|
1904
2242
|
`;
|
|
1905
|
-
var TimelineItemBody =
|
|
2243
|
+
var TimelineItemBody = import_styled_components18.default.div`
|
|
1906
2244
|
&,
|
|
1907
2245
|
& > * {
|
|
1908
2246
|
font-size: 1.3rem !important;
|
|
1909
2247
|
color: #ffffff !important;
|
|
1910
2248
|
}
|
|
1911
2249
|
`;
|
|
1912
|
-
var TimelineItemTitle =
|
|
2250
|
+
var TimelineItemTitle = import_styled_components18.default.div`
|
|
1913
2251
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1914
2252
|
font-size: 1rem;
|
|
1915
2253
|
font-weight: bold;
|
|
@@ -1917,8 +2255,8 @@ var TimelineItemTitle = import_styled_components17.default.div`
|
|
|
1917
2255
|
`;
|
|
1918
2256
|
|
|
1919
2257
|
// src/components/Timeline.tsx
|
|
1920
|
-
var
|
|
1921
|
-
var TimelineItemStyled = (0,
|
|
2258
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2259
|
+
var TimelineItemStyled = (0, import_styled_components19.default)(import_web8.animated.div)`
|
|
1922
2260
|
flex: 1;
|
|
1923
2261
|
flex-flow: column nowrap;
|
|
1924
2262
|
display: inline-flex;
|
|
@@ -1936,7 +2274,7 @@ var TimelineItemStyled = (0, import_styled_components18.default)(import_web3.ani
|
|
|
1936
2274
|
}
|
|
1937
2275
|
}
|
|
1938
2276
|
`;
|
|
1939
|
-
var TimelineItemGuide = (0,
|
|
2277
|
+
var TimelineItemGuide = (0, import_styled_components19.default)(import_web8.animated.div)`
|
|
1940
2278
|
width: 100%;
|
|
1941
2279
|
padding-top: 2px;
|
|
1942
2280
|
display: flex;
|
|
@@ -1952,7 +2290,7 @@ var TimelineItemGuide = (0, import_styled_components18.default)(import_web3.anim
|
|
|
1952
2290
|
margin-right: 4px;
|
|
1953
2291
|
}
|
|
1954
2292
|
`;
|
|
1955
|
-
var TimelineItemGuideLine = (0,
|
|
2293
|
+
var TimelineItemGuideLine = (0, import_styled_components19.default)(import_web8.animated.div)`
|
|
1956
2294
|
border-top: 4px solid #ffffff;
|
|
1957
2295
|
margin-right: 4px;
|
|
1958
2296
|
`;
|
|
@@ -1963,9 +2301,9 @@ var style = {
|
|
|
1963
2301
|
alignItems: "center"
|
|
1964
2302
|
};
|
|
1965
2303
|
function Timeline(props) {
|
|
1966
|
-
const children =
|
|
1967
|
-
return /* @__PURE__ */ (0,
|
|
1968
|
-
|
|
2304
|
+
const children = import_react15.default.Children.toArray(props.children);
|
|
2305
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2306
|
+
import_spectacle10.Stepper,
|
|
1969
2307
|
{
|
|
1970
2308
|
...props,
|
|
1971
2309
|
values: children,
|
|
@@ -1973,10 +2311,10 @@ function Timeline(props) {
|
|
|
1973
2311
|
inactiveStyle: style,
|
|
1974
2312
|
children: (_value, step) => {
|
|
1975
2313
|
return children.map((child, index) => {
|
|
1976
|
-
if (!
|
|
2314
|
+
if (!import_react15.default.isValidElement(child)) {
|
|
1977
2315
|
return child;
|
|
1978
2316
|
}
|
|
1979
|
-
return
|
|
2317
|
+
return import_react15.default.cloneElement(child, {
|
|
1980
2318
|
// @ts-expect-error cloning
|
|
1981
2319
|
isPhantom: step < index,
|
|
1982
2320
|
isLast: step === index
|
|
@@ -1996,14 +2334,14 @@ function getItemOpacity2({
|
|
|
1996
2334
|
}
|
|
1997
2335
|
function TimelineItem(props) {
|
|
1998
2336
|
const { children, title, isPhantom, isLast, ...rest } = props;
|
|
1999
|
-
const guideLineProps = (0,
|
|
2337
|
+
const guideLineProps = (0, import_web8.useSpring)({
|
|
2000
2338
|
width: isPhantom || isLast ? "0%" : "100%"
|
|
2001
2339
|
});
|
|
2002
|
-
const appearStyles = (0,
|
|
2340
|
+
const appearStyles = (0, import_web8.useSpring)({
|
|
2003
2341
|
opacity: getItemOpacity2({ isPhantom, isLast })
|
|
2004
2342
|
});
|
|
2005
|
-
const colorStyles = (0,
|
|
2006
|
-
return /* @__PURE__ */ (0,
|
|
2343
|
+
const colorStyles = (0, import_web8.useSpring)({ opacity: isPhantom || isLast ? 1 : 0.15 });
|
|
2344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2007
2345
|
TimelineItemStyled,
|
|
2008
2346
|
{
|
|
2009
2347
|
...rest,
|
|
@@ -2011,24 +2349,24 @@ function TimelineItem(props) {
|
|
|
2011
2349
|
...appearStyles
|
|
2012
2350
|
},
|
|
2013
2351
|
children: [
|
|
2014
|
-
/* @__PURE__ */ (0,
|
|
2015
|
-
/* @__PURE__ */ (0,
|
|
2016
|
-
/* @__PURE__ */ (0,
|
|
2352
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TimelineItemContentPhantom, { children: [
|
|
2353
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemTitle, { children: title }),
|
|
2354
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemBody, { children })
|
|
2017
2355
|
] }),
|
|
2018
|
-
/* @__PURE__ */ (0,
|
|
2019
|
-
/* @__PURE__ */ (0,
|
|
2020
|
-
/* @__PURE__ */ (0,
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TimelineItemGuide, { style: colorStyles, children: [
|
|
2357
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Hexagon, {}),
|
|
2358
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemGuideLine, { style: guideLineProps })
|
|
2021
2359
|
] }),
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2024
|
-
/* @__PURE__ */ (0,
|
|
2360
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(TimelineItemContent, { children: [
|
|
2361
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemTitle, { children: title }),
|
|
2362
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(TimelineItemBody, { children })
|
|
2025
2363
|
] })
|
|
2026
2364
|
]
|
|
2027
2365
|
}
|
|
2028
2366
|
);
|
|
2029
2367
|
}
|
|
2030
2368
|
function Hexagon() {
|
|
2031
|
-
return /* @__PURE__ */ (0,
|
|
2369
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2032
2370
|
"svg",
|
|
2033
2371
|
{
|
|
2034
2372
|
width: "18",
|
|
@@ -2037,14 +2375,14 @@ function Hexagon() {
|
|
|
2037
2375
|
fill: "none",
|
|
2038
2376
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2039
2377
|
children: [
|
|
2040
|
-
/* @__PURE__ */ (0,
|
|
2378
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2041
2379
|
"path",
|
|
2042
2380
|
{
|
|
2043
2381
|
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
2382
|
fill: "#F49676"
|
|
2045
2383
|
}
|
|
2046
2384
|
),
|
|
2047
|
-
/* @__PURE__ */ (0,
|
|
2385
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2048
2386
|
"path",
|
|
2049
2387
|
{
|
|
2050
2388
|
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 +2395,9 @@ function Hexagon() {
|
|
|
2057
2395
|
}
|
|
2058
2396
|
|
|
2059
2397
|
// src/index.tsx
|
|
2060
|
-
var
|
|
2398
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2061
2399
|
function PassThrough({ children }) {
|
|
2062
|
-
return /* @__PURE__ */ (0,
|
|
2400
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, { children });
|
|
2063
2401
|
}
|
|
2064
2402
|
var layouts = layouts_default;
|
|
2065
2403
|
var componentsMap2 = {
|
|
@@ -2069,12 +2407,13 @@ var componentsMap2 = {
|
|
|
2069
2407
|
function Deck({
|
|
2070
2408
|
deck,
|
|
2071
2409
|
theme,
|
|
2072
|
-
layouts: layouts2 = layouts_default
|
|
2410
|
+
layouts: layouts2 = layouts_default,
|
|
2411
|
+
transition
|
|
2073
2412
|
}) {
|
|
2074
|
-
|
|
2413
|
+
import_react17.default.useEffect(() => {
|
|
2075
2414
|
document.title = deck.metadata.title || "Untitled";
|
|
2076
2415
|
}, [deck.metadata.title]);
|
|
2077
|
-
const mergedTheme =
|
|
2416
|
+
const mergedTheme = import_react17.default.useMemo(() => {
|
|
2078
2417
|
const fonts = {
|
|
2079
2418
|
...theme_default.fonts,
|
|
2080
2419
|
...theme.themeTokens.fonts ?? {}
|
|
@@ -2085,44 +2424,55 @@ function Deck({
|
|
|
2085
2424
|
fonts
|
|
2086
2425
|
};
|
|
2087
2426
|
}, [theme]);
|
|
2088
|
-
const GlobalStyle =
|
|
2427
|
+
const GlobalStyle = import_react17.default.useMemo(() => {
|
|
2089
2428
|
const cssVariables = createCssVariables(theme.themeTokens.colors);
|
|
2090
|
-
return
|
|
2429
|
+
return import_styled_components20.createGlobalStyle`
|
|
2091
2430
|
:root {
|
|
2092
2431
|
${cssVariables}
|
|
2093
2432
|
--font-family: ${mergedTheme.fonts.text}
|
|
2094
2433
|
}
|
|
2095
2434
|
`;
|
|
2096
2435
|
}, [theme, mergedTheme]);
|
|
2097
|
-
return /* @__PURE__ */ (0,
|
|
2098
|
-
/* @__PURE__ */ (0,
|
|
2099
|
-
/* @__PURE__ */ (0,
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react17.default.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(PestacleProvider, { layouts: layouts2, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react16.MDXProvider, { components: componentsMap2, children: [
|
|
2437
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(GlobalStyle, {}),
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2439
|
+
import_spectacle11.Deck,
|
|
2440
|
+
{
|
|
2441
|
+
theme: mergedTheme,
|
|
2442
|
+
template,
|
|
2443
|
+
transition: resolveTransition(transition),
|
|
2444
|
+
children: deck.slides.map((slide, i) => {
|
|
2445
|
+
var _a;
|
|
2446
|
+
const Component = slide.slideComponent;
|
|
2447
|
+
const slideTransitionName = (_a = slide.metadata) == null ? void 0 : _a.transition;
|
|
2448
|
+
const slideTransition2 = resolveTransition(slideTransitionName);
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_spectacle11.Slide, { transition: slideTransition2, children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Component, {}) }, i);
|
|
2450
|
+
})
|
|
2451
|
+
}
|
|
2452
|
+
)
|
|
2103
2453
|
] }) }) });
|
|
2104
2454
|
}
|
|
2105
2455
|
function Danger({ children }) {
|
|
2106
|
-
return /* @__PURE__ */ (0,
|
|
2456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "red" }, children });
|
|
2107
2457
|
}
|
|
2108
2458
|
function Information({ children }) {
|
|
2109
|
-
return /* @__PURE__ */ (0,
|
|
2459
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "orange" }, children });
|
|
2110
2460
|
}
|
|
2111
2461
|
function Success({ children }) {
|
|
2112
|
-
return /* @__PURE__ */ (0,
|
|
2462
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "green" }, children });
|
|
2113
2463
|
}
|
|
2114
2464
|
function Warning({ children }) {
|
|
2115
|
-
return /* @__PURE__ */ (0,
|
|
2465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { color: "yellow" }, children });
|
|
2116
2466
|
}
|
|
2117
2467
|
function Side({ children }) {
|
|
2118
|
-
return /* @__PURE__ */ (0,
|
|
2468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children });
|
|
2119
2469
|
}
|
|
2120
2470
|
Side.mdxType = "Side";
|
|
2121
2471
|
function Documentation({ children }) {
|
|
2122
|
-
return /* @__PURE__ */ (0,
|
|
2472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children });
|
|
2123
2473
|
}
|
|
2124
2474
|
function Box2({ children }) {
|
|
2125
|
-
return /* @__PURE__ */ (0,
|
|
2475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { children });
|
|
2126
2476
|
}
|
|
2127
2477
|
|
|
2128
2478
|
// <stdin>
|