@gpichot/spectacle-deck 1.0.1 → 1.0.3
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/Timeline.styled.d.ts +1633 -0
- package/components/map.d.ts +3 -3
- package/components/styled.d.ts +20 -20
- package/index.cjs +513 -199
- package/index.mjs +512 -198
- package/layouts/CenteredLayout.d.ts +2 -0
- package/layouts/Default3Layout.d.ts +5 -0
- package/layouts/SectionLayout.d.ts +5 -5
- package/layouts/index.d.ts +10 -5
- package/layouts/styled.d.ts +5 -5
- package/layouts/utils.d.ts +1 -0
- package/package.json +1 -2
- package/index.css +0 -61
package/index.mjs
CHANGED
|
@@ -1,10 +1,329 @@
|
|
|
1
1
|
// src/index.tsx
|
|
2
|
-
import
|
|
2
|
+
import React19 from "react";
|
|
3
3
|
import { MDXProvider } from "@mdx-js/react";
|
|
4
4
|
import { Deck as SpectacleDeck, Slide } from "spectacle";
|
|
5
5
|
|
|
6
|
-
// src/layouts/
|
|
6
|
+
// src/layouts/CenteredLayout.tsx
|
|
7
|
+
import React2 from "react";
|
|
8
|
+
import styled from "styled-components";
|
|
9
|
+
|
|
10
|
+
// src/layouts/utils.ts
|
|
7
11
|
import React from "react";
|
|
12
|
+
var Margins = {
|
|
13
|
+
vertical: "4rem",
|
|
14
|
+
horizontal: "7rem",
|
|
15
|
+
horizontalInternal: "2rem"
|
|
16
|
+
};
|
|
17
|
+
function getHeading(children) {
|
|
18
|
+
const allChild = React.Children.toArray(children);
|
|
19
|
+
if (allChild.length === 0)
|
|
20
|
+
return [null, allChild];
|
|
21
|
+
const [candidate, ...rest] = allChild;
|
|
22
|
+
if (!React.isValidElement(candidate))
|
|
23
|
+
return [null, allChild];
|
|
24
|
+
if (["h2", "h3"].includes(candidate.props.originalType)) {
|
|
25
|
+
return [candidate, rest];
|
|
26
|
+
}
|
|
27
|
+
return [null, allChild];
|
|
28
|
+
}
|
|
29
|
+
function getCode(children) {
|
|
30
|
+
const allChild = React.Children.toArray(children);
|
|
31
|
+
if (allChild.length === 0)
|
|
32
|
+
return [null, allChild];
|
|
33
|
+
const index = allChild.findIndex((child) => {
|
|
34
|
+
if (!React.isValidElement(child))
|
|
35
|
+
return false;
|
|
36
|
+
return child.props.originalType === "pre";
|
|
37
|
+
});
|
|
38
|
+
if (index === -1)
|
|
39
|
+
return [null, allChild];
|
|
40
|
+
const candidate = allChild[index];
|
|
41
|
+
const rest = allChild.filter((_, i) => i !== index);
|
|
42
|
+
return [candidate, rest];
|
|
43
|
+
}
|
|
44
|
+
function getMatchingMdxType(children, mdxType) {
|
|
45
|
+
const allChild = React.Children.toArray(children);
|
|
46
|
+
const matchFn = (child) => {
|
|
47
|
+
if (!React.isValidElement(child))
|
|
48
|
+
return false;
|
|
49
|
+
if (typeof child.type !== "function")
|
|
50
|
+
return false;
|
|
51
|
+
if ("mdxType" in child.type === false)
|
|
52
|
+
return false;
|
|
53
|
+
return child.type.mdxType === mdxType;
|
|
54
|
+
};
|
|
55
|
+
const matches = allChild.filter(matchFn);
|
|
56
|
+
const rest = allChild.filter((child) => !matchFn(child));
|
|
57
|
+
return [matches, rest];
|
|
58
|
+
}
|
|
59
|
+
function getCodeChildren(children) {
|
|
60
|
+
const [code, rest] = getCode(children);
|
|
61
|
+
if (code)
|
|
62
|
+
return [code, rest];
|
|
63
|
+
const [codeStepper, rest2] = getMatchingMdxType(children, "CodeStepper");
|
|
64
|
+
if (codeStepper.length > 0)
|
|
65
|
+
return [codeStepper, rest2];
|
|
66
|
+
const [codes, rest3] = getMatchingMdxType(children, "FilePane");
|
|
67
|
+
return [codes, rest3];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/layouts/CenteredLayout.tsx
|
|
71
|
+
var CenteredLayoutContent = styled.div`
|
|
72
|
+
h2,
|
|
73
|
+
h3 {
|
|
74
|
+
}
|
|
75
|
+
`;
|
|
76
|
+
var CenteredLayout = (props) => {
|
|
77
|
+
const [heading, rest] = getHeading(props.children);
|
|
78
|
+
return /* @__PURE__ */ React2.createElement(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
...props,
|
|
82
|
+
style: {
|
|
83
|
+
height: "100%",
|
|
84
|
+
display: "flex",
|
|
85
|
+
flexFlow: "column",
|
|
86
|
+
alignItems: "center",
|
|
87
|
+
justifyContent: "center",
|
|
88
|
+
margin: `0 ${Margins.horizontal}`
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
rest,
|
|
92
|
+
/* @__PURE__ */ React2.createElement(
|
|
93
|
+
CenteredLayoutContent,
|
|
94
|
+
{
|
|
95
|
+
style: {
|
|
96
|
+
position: "absolute",
|
|
97
|
+
opacity: 0.8,
|
|
98
|
+
marginBottom: "2rem",
|
|
99
|
+
marginTop: "2rem",
|
|
100
|
+
bottom: 0
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
heading
|
|
104
|
+
)
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
// src/layouts/Default3Layout.tsx
|
|
109
|
+
import React3 from "react";
|
|
110
|
+
import styled2 from "styled-components";
|
|
111
|
+
function MultipleHexagons({ position }) {
|
|
112
|
+
return /* @__PURE__ */ React3.createElement(
|
|
113
|
+
"svg",
|
|
114
|
+
{
|
|
115
|
+
viewBox: `${position === "left" ? "0" : "2"} 0 12 20`,
|
|
116
|
+
width: "12",
|
|
117
|
+
height: "20",
|
|
118
|
+
fill: "none",
|
|
119
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
120
|
+
},
|
|
121
|
+
/* @__PURE__ */ React3.createElement(
|
|
122
|
+
"path",
|
|
123
|
+
{
|
|
124
|
+
d: "M 3.913 5.381 L 2.063 4.314 L 2.063 2.173 L 3.913 1.103 L 5.761 2.173 L 5.761 4.314 L 3.913 5.381 Z M 2.38 4.128 L 3.913 5.014 L 5.444 4.128 L 5.444 2.356 L 3.913 1.47 L 2.38 2.356 L 2.38 4.128 Z",
|
|
125
|
+
fill: "#F49676"
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ React3.createElement(
|
|
129
|
+
"path",
|
|
130
|
+
{
|
|
131
|
+
d: "M 8.047 5.401 L 6.197 4.334 L 6.197 2.193 L 8.047 1.123 L 9.895 2.193 L 9.895 4.334 L 8.047 5.401 Z M 6.514 4.148 L 8.047 5.034 L 9.578 4.148 L 9.578 2.376 L 8.047 1.49 L 6.514 2.376 L 6.514 4.148 Z",
|
|
132
|
+
fill: "#F49676"
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
/* @__PURE__ */ React3.createElement(
|
|
136
|
+
"path",
|
|
137
|
+
{
|
|
138
|
+
d: "M 8.071 4.548 L 6.956 3.905 L 6.956 2.615 L 8.071 1.97 L 9.184 2.615 L 9.184 3.905 L 8.071 4.548 Z",
|
|
139
|
+
fill: "#F49676"
|
|
140
|
+
}
|
|
141
|
+
),
|
|
142
|
+
/* @__PURE__ */ React3.createElement(
|
|
143
|
+
"path",
|
|
144
|
+
{
|
|
145
|
+
d: "M 5.982 8.898 L 4.132 7.831 L 4.132 5.69 L 5.982 4.62 L 7.83 5.69 L 7.83 7.831 L 5.982 8.898 Z M 4.449 7.645 L 5.982 8.531 L 7.513 7.645 L 7.513 5.873 L 5.982 4.987 L 4.449 5.873 L 4.449 7.645 Z",
|
|
146
|
+
fill: "#F49676"
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ React3.createElement(
|
|
150
|
+
"path",
|
|
151
|
+
{
|
|
152
|
+
d: "M 6.006 8.045 L 4.891 7.402 L 4.891 6.112 L 6.006 5.467 L 7.119 6.112 L 7.119 7.402 L 6.006 8.045 Z",
|
|
153
|
+
fill: "#F49676"
|
|
154
|
+
}
|
|
155
|
+
),
|
|
156
|
+
/* @__PURE__ */ React3.createElement(
|
|
157
|
+
"path",
|
|
158
|
+
{
|
|
159
|
+
d: "M 8.056 12.323 L 6.206 11.256 L 6.206 9.115 L 8.056 8.045 L 9.904 9.115 L 9.904 11.256 L 8.056 12.323 Z M 6.523 11.07 L 8.056 11.956 L 9.587 11.07 L 9.587 9.298 L 8.056 8.412 L 6.523 9.298 L 6.523 11.07 Z",
|
|
160
|
+
fill: "#F49676"
|
|
161
|
+
}
|
|
162
|
+
),
|
|
163
|
+
/* @__PURE__ */ React3.createElement(
|
|
164
|
+
"path",
|
|
165
|
+
{
|
|
166
|
+
d: "M 8.08 11.47 L 6.965 10.827 L 6.965 9.537 L 8.08 8.892 L 9.193 9.537 L 9.193 10.827 L 8.08 11.47 Z",
|
|
167
|
+
fill: "#F49676"
|
|
168
|
+
}
|
|
169
|
+
),
|
|
170
|
+
/* @__PURE__ */ React3.createElement(
|
|
171
|
+
"path",
|
|
172
|
+
{
|
|
173
|
+
d: "M 10.101 8.878 L 8.251 7.811 L 8.251 5.67 L 10.101 4.6 L 11.949 5.67 L 11.949 7.811 L 10.101 8.878 Z M 8.568 7.625 L 10.101 8.511 L 11.632 7.625 L 11.632 5.853 L 10.101 4.967 L 8.568 5.853 L 8.568 7.625 Z",
|
|
174
|
+
fill: "#F49676"
|
|
175
|
+
}
|
|
176
|
+
),
|
|
177
|
+
/* @__PURE__ */ React3.createElement(
|
|
178
|
+
"path",
|
|
179
|
+
{
|
|
180
|
+
d: "M 10.125 8.025 L 9.01 7.382 L 9.01 6.092 L 10.125 5.447 L 11.238 6.092 L 11.238 7.382 L 10.125 8.025 Z",
|
|
181
|
+
fill: "#F49676"
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
/* @__PURE__ */ React3.createElement(
|
|
185
|
+
"path",
|
|
186
|
+
{
|
|
187
|
+
d: "M 12.077 12.301 L 10.227 11.234 L 10.227 9.093 L 12.077 8.023 L 13.925 9.093 L 13.925 11.234 L 12.077 12.301 Z M 10.544 11.048 L 12.077 11.934 L 13.608 11.048 L 13.608 9.276 L 12.077 8.39 L 10.544 9.276 L 10.544 11.048 Z",
|
|
188
|
+
fill: "#F49676"
|
|
189
|
+
}
|
|
190
|
+
),
|
|
191
|
+
/* @__PURE__ */ React3.createElement(
|
|
192
|
+
"path",
|
|
193
|
+
{
|
|
194
|
+
d: "M 12.101 11.448 L 10.986 10.805 L 10.986 9.515 L 12.101 8.87 L 13.214 9.515 L 13.214 10.805 L 12.101 11.448 Z",
|
|
195
|
+
fill: "#F49676"
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ React3.createElement(
|
|
199
|
+
"path",
|
|
200
|
+
{
|
|
201
|
+
d: "M 10.062 15.781 L 8.212 14.714 L 8.212 12.573 L 10.062 11.503 L 11.91 12.573 L 11.91 14.714 L 10.062 15.781 Z M 8.529 14.528 L 10.062 15.414 L 11.593 14.528 L 11.593 12.756 L 10.062 11.87 L 8.529 12.756 L 8.529 14.528 Z",
|
|
202
|
+
fill: "#F49676"
|
|
203
|
+
}
|
|
204
|
+
),
|
|
205
|
+
/* @__PURE__ */ React3.createElement(
|
|
206
|
+
"path",
|
|
207
|
+
{
|
|
208
|
+
d: "M 8.029 19.193 L 6.179 18.126 L 6.179 15.985 L 8.029 14.915 L 9.877 15.985 L 9.877 18.126 L 8.029 19.193 Z M 6.496 17.94 L 8.029 18.826 L 9.56 17.94 L 9.56 16.168 L 8.029 15.282 L 6.496 16.168 L 6.496 17.94 Z",
|
|
209
|
+
fill: "#F49676"
|
|
210
|
+
}
|
|
211
|
+
),
|
|
212
|
+
/* @__PURE__ */ React3.createElement(
|
|
213
|
+
"path",
|
|
214
|
+
{
|
|
215
|
+
d: "M 6.068 15.716 L 4.218 14.649 L 4.218 12.508 L 6.068 11.438 L 7.916 12.508 L 7.916 14.649 L 6.068 15.716 Z M 4.535 14.463 L 6.068 15.349 L 7.599 14.463 L 7.599 12.691 L 6.068 11.805 L 4.535 12.691 L 4.535 14.463 Z",
|
|
216
|
+
fill: "#F49676"
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ React3.createElement(
|
|
220
|
+
"path",
|
|
221
|
+
{
|
|
222
|
+
d: "M 6.092 14.863 L 4.977 14.22 L 4.977 12.93 L 6.092 12.285 L 7.205 12.93 L 7.205 14.22 L 6.092 14.863 Z",
|
|
223
|
+
fill: "#F49676"
|
|
224
|
+
}
|
|
225
|
+
),
|
|
226
|
+
/* @__PURE__ */ React3.createElement(
|
|
227
|
+
"path",
|
|
228
|
+
{
|
|
229
|
+
d: "M 4.011 12.393 L 2.161 11.326 L 2.161 9.185 L 4.011 8.115 L 5.859 9.185 L 5.859 11.326 L 4.011 12.393 Z M 2.478 11.14 L 4.011 12.026 L 5.542 11.14 L 5.542 9.368 L 4.011 8.482 L 2.478 9.368 L 2.478 11.14 Z",
|
|
230
|
+
fill: "#F49676"
|
|
231
|
+
}
|
|
232
|
+
),
|
|
233
|
+
/* @__PURE__ */ React3.createElement(
|
|
234
|
+
"path",
|
|
235
|
+
{
|
|
236
|
+
d: "M 2.083 15.773 L 0.233 14.706 L 0.233 12.565 L 2.083 11.495 L 3.931 12.565 L 3.931 14.706 L 2.083 15.773 Z M 0.55 14.52 L 2.083 15.406 L 3.614 14.52 L 3.614 12.748 L 2.083 11.862 L 0.55 12.748 L 0.55 14.52 Z",
|
|
237
|
+
fill: "#F49676"
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ React3.createElement(
|
|
241
|
+
"path",
|
|
242
|
+
{
|
|
243
|
+
d: "M 2.107 14.92 L 0.992 14.277 L 0.992 12.987 L 2.107 12.342 L 3.22 12.987 L 3.22 14.277 L 2.107 14.92 Z",
|
|
244
|
+
fill: "#F49676"
|
|
245
|
+
}
|
|
246
|
+
),
|
|
247
|
+
/* @__PURE__ */ React3.createElement(
|
|
248
|
+
"path",
|
|
249
|
+
{
|
|
250
|
+
d: "M 3.966 19.231 L 2.116 18.164 L 2.116 16.023 L 3.966 14.953 L 5.814 16.023 L 5.814 18.164 L 3.966 19.231 Z M 2.433 17.978 L 3.966 18.864 L 5.497 17.978 L 5.497 16.206 L 3.966 15.32 L 2.433 16.206 L 2.433 17.978 Z",
|
|
251
|
+
fill: "#F49676"
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
/* @__PURE__ */ React3.createElement(
|
|
255
|
+
"path",
|
|
256
|
+
{
|
|
257
|
+
d: "M 3.99 18.378 L 2.875 17.735 L 2.875 16.445 L 3.99 15.8 L 5.103 16.445 L 5.103 17.735 L 3.99 18.378 Z",
|
|
258
|
+
fill: "#F49676"
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
var Default3SideContainer = styled2.div`
|
|
264
|
+
svg {
|
|
265
|
+
height: 100%;
|
|
266
|
+
width: auto;
|
|
267
|
+
path {
|
|
268
|
+
fill: #ffffff22;
|
|
269
|
+
transition: fill 3s;
|
|
270
|
+
&:hover {
|
|
271
|
+
fill: #ffffffbb;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
`;
|
|
276
|
+
var Default2LayoutContainer = styled2.div`
|
|
277
|
+
h2,
|
|
278
|
+
h3 {
|
|
279
|
+
text-align: left;
|
|
280
|
+
color: white;
|
|
281
|
+
}
|
|
282
|
+
`;
|
|
283
|
+
var Default3Layout = ({
|
|
284
|
+
children,
|
|
285
|
+
position = "right"
|
|
286
|
+
}) => {
|
|
287
|
+
const isReversed = position === "left";
|
|
288
|
+
return /* @__PURE__ */ React3.createElement(
|
|
289
|
+
Default2LayoutContainer,
|
|
290
|
+
{
|
|
291
|
+
style: {
|
|
292
|
+
display: "flex",
|
|
293
|
+
position: "absolute",
|
|
294
|
+
flexDirection: isReversed ? "row-reverse" : "row",
|
|
295
|
+
inset: 0,
|
|
296
|
+
alignItems: "center"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
/* @__PURE__ */ React3.createElement(
|
|
300
|
+
Default3SideContainer,
|
|
301
|
+
{
|
|
302
|
+
style: {
|
|
303
|
+
flex: 1,
|
|
304
|
+
height: "100%",
|
|
305
|
+
padding: "2rem",
|
|
306
|
+
transform: isReversed ? "scale(2) translate(25%, 4%)" : "scale(2) translate(-25%, 15%)"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
/* @__PURE__ */ React3.createElement(MultipleHexagons, { position })
|
|
310
|
+
),
|
|
311
|
+
/* @__PURE__ */ React3.createElement(
|
|
312
|
+
"div",
|
|
313
|
+
{
|
|
314
|
+
style: {
|
|
315
|
+
flex: 4,
|
|
316
|
+
marginLeft: isReversed ? Margins.horizontal : "2rem",
|
|
317
|
+
marginRight: isReversed ? "2rem" : Margins.horizontal
|
|
318
|
+
}
|
|
319
|
+
},
|
|
320
|
+
children
|
|
321
|
+
)
|
|
322
|
+
);
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
// src/layouts/MainSectionLayout.tsx
|
|
326
|
+
import React4 from "react";
|
|
8
327
|
import { FlexBox } from "spectacle";
|
|
9
328
|
|
|
10
329
|
// src/front.png
|
|
@@ -14,7 +333,7 @@ var front_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2QAAAfPCAYAA
|
|
|
14
333
|
var MainSectionLayout = ({
|
|
15
334
|
children
|
|
16
335
|
}) => {
|
|
17
|
-
return /* @__PURE__ */
|
|
336
|
+
return /* @__PURE__ */ React4.createElement(
|
|
18
337
|
FlexBox,
|
|
19
338
|
{
|
|
20
339
|
height: "100%",
|
|
@@ -28,14 +347,14 @@ var MainSectionLayout = ({
|
|
|
28
347
|
bottom: 0
|
|
29
348
|
}
|
|
30
349
|
},
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ React4.createElement("div", { style: { paddingLeft: "8rem", flex: 1 } }, children),
|
|
351
|
+
/* @__PURE__ */ React4.createElement("div", { style: { flex: "0 0", height: "100%", paddingLeft: "5rem" } }, /* @__PURE__ */ React4.createElement("img", { src: front_default, alt: "Front", style: { height: "100%" } }))
|
|
33
352
|
);
|
|
34
353
|
};
|
|
35
354
|
|
|
36
355
|
// src/layouts/SectionLayout.tsx
|
|
37
|
-
import
|
|
38
|
-
var SectionLayout =
|
|
356
|
+
import styled3 from "styled-components";
|
|
357
|
+
var SectionLayout = styled3.div`
|
|
39
358
|
display: flex;
|
|
40
359
|
flex-direction: row;
|
|
41
360
|
align-items: center;
|
|
@@ -49,12 +368,12 @@ var SectionLayout = styled.div`
|
|
|
49
368
|
`;
|
|
50
369
|
|
|
51
370
|
// src/layouts/SideCodeLayout.tsx
|
|
52
|
-
import
|
|
371
|
+
import React6 from "react";
|
|
53
372
|
|
|
54
373
|
// src/layouts/columns.tsx
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
var DivWithHeading =
|
|
374
|
+
import React5 from "react";
|
|
375
|
+
import styled4 from "styled-components";
|
|
376
|
+
var DivWithHeading = styled4.div`
|
|
58
377
|
h2 {
|
|
59
378
|
margin-top: 0;
|
|
60
379
|
}
|
|
@@ -63,7 +382,7 @@ var DivWithHeading = styled2.div`
|
|
|
63
382
|
font-weight: 400;
|
|
64
383
|
}
|
|
65
384
|
`;
|
|
66
|
-
var ColumnsContainer =
|
|
385
|
+
var ColumnsContainer = styled4(DivWithHeading)`
|
|
67
386
|
display: flex;
|
|
68
387
|
flex-direction: row;
|
|
69
388
|
position: absolute;
|
|
@@ -77,15 +396,15 @@ function ColumnsLayout({
|
|
|
77
396
|
children,
|
|
78
397
|
reverse
|
|
79
398
|
}) {
|
|
80
|
-
const childrenArray =
|
|
81
|
-
return /* @__PURE__ */
|
|
399
|
+
const childrenArray = React5.Children.toArray(children);
|
|
400
|
+
return /* @__PURE__ */ React5.createElement(
|
|
82
401
|
ColumnsContainer,
|
|
83
402
|
{
|
|
84
403
|
style: {
|
|
85
404
|
flexDirection: reverse ? "row-reverse" : "row"
|
|
86
405
|
}
|
|
87
406
|
},
|
|
88
|
-
childrenArray.map((child, i) => /* @__PURE__ */
|
|
407
|
+
childrenArray.map((child, i) => /* @__PURE__ */ React5.createElement(
|
|
89
408
|
"div",
|
|
90
409
|
{
|
|
91
410
|
key: i,
|
|
@@ -103,57 +422,9 @@ function ColumnsLayout({
|
|
|
103
422
|
);
|
|
104
423
|
}
|
|
105
424
|
|
|
106
|
-
// src/layouts/utils.ts
|
|
107
|
-
import React3 from "react";
|
|
108
|
-
var Margins = {
|
|
109
|
-
vertical: "4rem",
|
|
110
|
-
horizontal: "7rem",
|
|
111
|
-
horizontalInternal: "2rem"
|
|
112
|
-
};
|
|
113
|
-
function getCode(children) {
|
|
114
|
-
const allChild = React3.Children.toArray(children);
|
|
115
|
-
if (allChild.length === 0)
|
|
116
|
-
return [null, allChild];
|
|
117
|
-
const index = allChild.findIndex((child) => {
|
|
118
|
-
if (!React3.isValidElement(child))
|
|
119
|
-
return false;
|
|
120
|
-
return child.props.originalType === "pre";
|
|
121
|
-
});
|
|
122
|
-
if (index === -1)
|
|
123
|
-
return [null, allChild];
|
|
124
|
-
const candidate = allChild[index];
|
|
125
|
-
const rest = allChild.filter((_, i) => i !== index);
|
|
126
|
-
return [candidate, rest];
|
|
127
|
-
}
|
|
128
|
-
function getMatchingMdxType(children, mdxType) {
|
|
129
|
-
const allChild = React3.Children.toArray(children);
|
|
130
|
-
const matchFn = (child) => {
|
|
131
|
-
if (!React3.isValidElement(child))
|
|
132
|
-
return false;
|
|
133
|
-
if (typeof child.type !== "function")
|
|
134
|
-
return false;
|
|
135
|
-
if ("mdxType" in child.type === false)
|
|
136
|
-
return false;
|
|
137
|
-
return child.type.mdxType === mdxType;
|
|
138
|
-
};
|
|
139
|
-
const matches = allChild.filter(matchFn);
|
|
140
|
-
const rest = allChild.filter((child) => !matchFn(child));
|
|
141
|
-
return [matches, rest];
|
|
142
|
-
}
|
|
143
|
-
function getCodeChildren(children) {
|
|
144
|
-
const [code, rest] = getCode(children);
|
|
145
|
-
if (code)
|
|
146
|
-
return [code, rest];
|
|
147
|
-
const [codeStepper, rest2] = getMatchingMdxType(children, "CodeStepper");
|
|
148
|
-
if (codeStepper.length > 0)
|
|
149
|
-
return [codeStepper, rest2];
|
|
150
|
-
const [codes, rest3] = getMatchingMdxType(children, "FilePane");
|
|
151
|
-
return [codes, rest3];
|
|
152
|
-
}
|
|
153
|
-
|
|
154
425
|
// src/layouts/SideCodeLayout.tsx
|
|
155
|
-
import
|
|
156
|
-
var CodeSide =
|
|
426
|
+
import styled5 from "styled-components";
|
|
427
|
+
var CodeSide = styled5.div`
|
|
157
428
|
pre {
|
|
158
429
|
font-size: 0.9rem;
|
|
159
430
|
}
|
|
@@ -163,7 +434,7 @@ function SidedCodeLayout({
|
|
|
163
434
|
position = "right"
|
|
164
435
|
}) {
|
|
165
436
|
const [code, rest] = getCodeChildren(children);
|
|
166
|
-
return /* @__PURE__ */
|
|
437
|
+
return /* @__PURE__ */ React6.createElement(ColumnsLayout, { reverse: position === "left" }, /* @__PURE__ */ React6.createElement(
|
|
167
438
|
"div",
|
|
168
439
|
{
|
|
169
440
|
style: {
|
|
@@ -172,7 +443,7 @@ function SidedCodeLayout({
|
|
|
172
443
|
}
|
|
173
444
|
},
|
|
174
445
|
rest
|
|
175
|
-
), /* @__PURE__ */
|
|
446
|
+
), /* @__PURE__ */ React6.createElement(
|
|
176
447
|
CodeSide,
|
|
177
448
|
{
|
|
178
449
|
style: {
|
|
@@ -188,15 +459,15 @@ function SidedCodeLayout({
|
|
|
188
459
|
}
|
|
189
460
|
|
|
190
461
|
// src/layouts/SideImageLayout.tsx
|
|
191
|
-
import
|
|
192
|
-
import
|
|
462
|
+
import React8 from "react";
|
|
463
|
+
import styled7 from "styled-components";
|
|
193
464
|
|
|
194
465
|
// src/components/Image.tsx
|
|
195
|
-
import
|
|
466
|
+
import React7 from "react";
|
|
196
467
|
|
|
197
468
|
// src/layouts/styled.ts
|
|
198
|
-
import
|
|
199
|
-
var SVGObject =
|
|
469
|
+
import styled6 from "styled-components";
|
|
470
|
+
var SVGObject = styled6.object`
|
|
200
471
|
padding: 3rem 2rem;
|
|
201
472
|
box-sizing: border-box;
|
|
202
473
|
background-color: white;
|
|
@@ -206,7 +477,7 @@ var SVGObject = styled4.object`
|
|
|
206
477
|
function Image(props) {
|
|
207
478
|
const { src, height } = props;
|
|
208
479
|
if (!(src == null ? void 0 : src.endsWith(".svg"))) {
|
|
209
|
-
return /* @__PURE__ */
|
|
480
|
+
return /* @__PURE__ */ React7.createElement(
|
|
210
481
|
"img",
|
|
211
482
|
{
|
|
212
483
|
src,
|
|
@@ -219,7 +490,7 @@ function Image(props) {
|
|
|
219
490
|
}
|
|
220
491
|
);
|
|
221
492
|
}
|
|
222
|
-
return /* @__PURE__ */
|
|
493
|
+
return /* @__PURE__ */ React7.createElement(
|
|
223
494
|
SVGObject,
|
|
224
495
|
{
|
|
225
496
|
type: "image/svg+xml",
|
|
@@ -235,7 +506,7 @@ function Image(props) {
|
|
|
235
506
|
Image.mdxType = "Image";
|
|
236
507
|
|
|
237
508
|
// src/layouts/SideImageLayout.tsx
|
|
238
|
-
var DivWithHeading2 =
|
|
509
|
+
var DivWithHeading2 = styled7.div`
|
|
239
510
|
h2 {
|
|
240
511
|
margin-top: 0;
|
|
241
512
|
}
|
|
@@ -256,7 +527,7 @@ var SidedImageLayout = ({
|
|
|
256
527
|
console.error("No image provided for SidedImageLayout");
|
|
257
528
|
return null;
|
|
258
529
|
}
|
|
259
|
-
return /* @__PURE__ */
|
|
530
|
+
return /* @__PURE__ */ React8.createElement(
|
|
260
531
|
DivWithHeading2,
|
|
261
532
|
{
|
|
262
533
|
style: {
|
|
@@ -269,7 +540,7 @@ var SidedImageLayout = ({
|
|
|
269
540
|
top: 0
|
|
270
541
|
}
|
|
271
542
|
},
|
|
272
|
-
/* @__PURE__ */
|
|
543
|
+
/* @__PURE__ */ React8.createElement(
|
|
273
544
|
"div",
|
|
274
545
|
{
|
|
275
546
|
style: {
|
|
@@ -282,7 +553,7 @@ var SidedImageLayout = ({
|
|
|
282
553
|
},
|
|
283
554
|
rest
|
|
284
555
|
),
|
|
285
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ React8.createElement(
|
|
286
557
|
"div",
|
|
287
558
|
{
|
|
288
559
|
style: {
|
|
@@ -294,19 +565,19 @@ var SidedImageLayout = ({
|
|
|
294
565
|
backgroundColor: "white"
|
|
295
566
|
}
|
|
296
567
|
},
|
|
297
|
-
component || /* @__PURE__ */
|
|
568
|
+
component || /* @__PURE__ */ React8.createElement(Image, { src: image })
|
|
298
569
|
)
|
|
299
570
|
);
|
|
300
571
|
};
|
|
301
572
|
|
|
302
573
|
// src/layouts/SideLayout.tsx
|
|
303
|
-
import
|
|
574
|
+
import React9 from "react";
|
|
304
575
|
function SideLayout({
|
|
305
576
|
children,
|
|
306
577
|
position = "right"
|
|
307
578
|
}) {
|
|
308
579
|
const [side, rest] = getMatchingMdxType(children, "Side");
|
|
309
|
-
return /* @__PURE__ */
|
|
580
|
+
return /* @__PURE__ */ React9.createElement(ColumnsLayout, { reverse: position === "left" }, /* @__PURE__ */ React9.createElement("div", { style: { marginLeft: Margins.horizontal } }, rest), /* @__PURE__ */ React9.createElement(
|
|
310
581
|
"div",
|
|
311
582
|
{
|
|
312
583
|
style: {
|
|
@@ -326,6 +597,8 @@ function SideLayout({
|
|
|
326
597
|
// src/layouts/index.tsx
|
|
327
598
|
var layouts_default = {
|
|
328
599
|
mainSection: MainSectionLayout,
|
|
600
|
+
centered: CenteredLayout,
|
|
601
|
+
default3: Default3Layout,
|
|
329
602
|
sidedCode: SidedCodeLayout,
|
|
330
603
|
sidedImage: SidedImageLayout,
|
|
331
604
|
side: SideLayout,
|
|
@@ -358,11 +631,11 @@ var theme_default = {
|
|
|
358
631
|
};
|
|
359
632
|
|
|
360
633
|
// src/template.tsx
|
|
361
|
-
import
|
|
634
|
+
import React10 from "react";
|
|
362
635
|
import { Box, FullScreen } from "spectacle";
|
|
363
636
|
var template = ({ slideNumber, numberOfSlides }) => {
|
|
364
637
|
const percentage = slideNumber / numberOfSlides * 100;
|
|
365
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ React10.createElement("div", { style: { position: "absolute", bottom: 0, left: 0, right: 0 } }, /* @__PURE__ */ React10.createElement(Box, { padding: "0 0 0.5em 0.7em" }, /* @__PURE__ */ React10.createElement(FullScreen, null)), /* @__PURE__ */ React10.createElement("div", { style: { width: "100%", height: "4px", background: "#ffffff11" } }, /* @__PURE__ */ React10.createElement(
|
|
366
639
|
"div",
|
|
367
640
|
{
|
|
368
641
|
style: {
|
|
@@ -376,31 +649,31 @@ var template = ({ slideNumber, numberOfSlides }) => {
|
|
|
376
649
|
};
|
|
377
650
|
|
|
378
651
|
// src/components/map.tsx
|
|
379
|
-
import
|
|
652
|
+
import React13 from "react";
|
|
380
653
|
import { mdxComponentMap } from "spectacle";
|
|
381
654
|
|
|
382
655
|
// src/components/styled.tsx
|
|
383
|
-
import
|
|
656
|
+
import React11 from "react";
|
|
384
657
|
import {
|
|
385
658
|
Link as SpectacleLink,
|
|
386
659
|
Image as SpectacleImage,
|
|
387
660
|
Heading,
|
|
388
661
|
FlexBox as FlexBox2
|
|
389
662
|
} from "spectacle";
|
|
390
|
-
import
|
|
391
|
-
var StyledImage =
|
|
663
|
+
import styled8 from "styled-components";
|
|
664
|
+
var StyledImage = styled8(SpectacleImage)`
|
|
392
665
|
object-fit: contain;
|
|
393
666
|
max-height: 30vh;
|
|
394
667
|
max-width: 70vw;
|
|
395
668
|
`;
|
|
396
|
-
var Image2 = (props) => /* @__PURE__ */
|
|
397
|
-
var CustomHeading =
|
|
669
|
+
var Image2 = (props) => /* @__PURE__ */ React11.createElement(FlexBox2, { margin: "0 0", padding: "0 0" }, /* @__PURE__ */ React11.createElement(StyledImage, { ...props }));
|
|
670
|
+
var CustomHeading = styled8(Heading)`
|
|
398
671
|
strong {
|
|
399
672
|
color: #f49676;
|
|
400
673
|
font-weight: 500;
|
|
401
674
|
}
|
|
402
675
|
`;
|
|
403
|
-
var CustomQuote =
|
|
676
|
+
var CustomQuote = styled8.blockquote`
|
|
404
677
|
margin: 1rem 0;
|
|
405
678
|
padding-left: 1.5rem;
|
|
406
679
|
padding-top: 0;
|
|
@@ -411,7 +684,7 @@ var CustomQuote = styled6.blockquote`
|
|
|
411
684
|
padding: 0 !important;
|
|
412
685
|
}
|
|
413
686
|
`;
|
|
414
|
-
var InlineCode =
|
|
687
|
+
var InlineCode = styled8.code`
|
|
415
688
|
filter: brightness(1.05);
|
|
416
689
|
zoom: 1.1;
|
|
417
690
|
&:before,
|
|
@@ -420,12 +693,12 @@ var InlineCode = styled6.code`
|
|
|
420
693
|
font-size: 0.8em;
|
|
421
694
|
}
|
|
422
695
|
`;
|
|
423
|
-
var HeadingTwo =
|
|
696
|
+
var HeadingTwo = styled8.h2`
|
|
424
697
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
425
698
|
font-size: 55px;
|
|
426
699
|
font-weight: 400;
|
|
427
700
|
`;
|
|
428
|
-
var HeadingThree =
|
|
701
|
+
var HeadingThree = styled8.h3`
|
|
429
702
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
430
703
|
font-size: 40px;
|
|
431
704
|
font-weight: 400;
|
|
@@ -438,12 +711,12 @@ var HeadingThree = styled6.h3`
|
|
|
438
711
|
`;
|
|
439
712
|
|
|
440
713
|
// src/components/CodeStepper/CodeStepper.tsx
|
|
441
|
-
import
|
|
714
|
+
import React12 from "react";
|
|
442
715
|
import ReactIs from "react-is";
|
|
443
716
|
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
444
717
|
import gruvboxDark from "react-syntax-highlighter/dist/cjs/styles/prism/gruvbox-dark";
|
|
445
718
|
import { Stepper } from "spectacle";
|
|
446
|
-
import
|
|
719
|
+
import styled9 from "styled-components";
|
|
447
720
|
|
|
448
721
|
// src/components/CodeStepper/code-directives.ts
|
|
449
722
|
function range(start, end) {
|
|
@@ -507,7 +780,7 @@ function parseStepDirectives(directives) {
|
|
|
507
780
|
|
|
508
781
|
// src/components/CodeStepper/CodeStepper.tsx
|
|
509
782
|
var Highlighter = SyntaxHighlighter;
|
|
510
|
-
var CodeContainer =
|
|
783
|
+
var CodeContainer = styled9.div`
|
|
511
784
|
pre {
|
|
512
785
|
padding: 1rem 0rem !important;
|
|
513
786
|
background-color: transparent !important;
|
|
@@ -528,7 +801,7 @@ var CodeContainer = styled7.div`
|
|
|
528
801
|
}
|
|
529
802
|
`;
|
|
530
803
|
function useCodeSteps(code) {
|
|
531
|
-
return
|
|
804
|
+
return React12.useMemo(() => {
|
|
532
805
|
const prefixes = code.match(/(?:\/\/|<!--) @.*\n/g) || [];
|
|
533
806
|
const prefixesLength = prefixes.reduce(
|
|
534
807
|
(acc, prefix) => acc + prefix.length,
|
|
@@ -548,8 +821,8 @@ function useCodeSteps(code) {
|
|
|
548
821
|
}, [code]);
|
|
549
822
|
}
|
|
550
823
|
function getCodeDetails(children) {
|
|
551
|
-
const child =
|
|
552
|
-
if (!
|
|
824
|
+
const child = React12.Children.toArray(children)[0];
|
|
825
|
+
if (!React12.isValidElement(child)) {
|
|
553
826
|
return {
|
|
554
827
|
language: "",
|
|
555
828
|
code: ReactIs.isFragment(child) ? "" : String(child || "")
|
|
@@ -567,7 +840,7 @@ function CodeWrapper({
|
|
|
567
840
|
hasName,
|
|
568
841
|
children
|
|
569
842
|
}) {
|
|
570
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ React12.createElement(
|
|
571
844
|
"div",
|
|
572
845
|
{
|
|
573
846
|
style: {
|
|
@@ -577,7 +850,7 @@ function CodeWrapper({
|
|
|
577
850
|
borderRadius: "4px"
|
|
578
851
|
}
|
|
579
852
|
},
|
|
580
|
-
name && /* @__PURE__ */
|
|
853
|
+
name && /* @__PURE__ */ React12.createElement(
|
|
581
854
|
"span",
|
|
582
855
|
{
|
|
583
856
|
style: {
|
|
@@ -594,7 +867,7 @@ function CodeWrapper({
|
|
|
594
867
|
name
|
|
595
868
|
),
|
|
596
869
|
children,
|
|
597
|
-
hasName && /* @__PURE__ */
|
|
870
|
+
hasName && /* @__PURE__ */ React12.createElement(
|
|
598
871
|
"span",
|
|
599
872
|
{
|
|
600
873
|
style: {
|
|
@@ -609,7 +882,7 @@ function CodeWrapper({
|
|
|
609
882
|
fontStyle: "italic"
|
|
610
883
|
}
|
|
611
884
|
},
|
|
612
|
-
stepName || /* @__PURE__ */
|
|
885
|
+
stepName || /* @__PURE__ */ React12.createElement("span", { style: { visibility: "hidden" } }, "Step")
|
|
613
886
|
)
|
|
614
887
|
);
|
|
615
888
|
}
|
|
@@ -618,7 +891,7 @@ function CodeStepper({
|
|
|
618
891
|
name,
|
|
619
892
|
...props
|
|
620
893
|
}) {
|
|
621
|
-
const { language, code } =
|
|
894
|
+
const { language, code } = React12.useMemo(() => {
|
|
622
895
|
return getCodeDetails(props.children);
|
|
623
896
|
}, [props.children]);
|
|
624
897
|
const {
|
|
@@ -628,21 +901,21 @@ function CodeStepper({
|
|
|
628
901
|
hasSteps,
|
|
629
902
|
hasName
|
|
630
903
|
} = useCodeSteps(code);
|
|
631
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ React12.createElement(CodeContainer, null, import.meta.env.DEV && Boolean(prefixes == null ? void 0 : prefixes.length) && /* @__PURE__ */ React12.createElement("div", { style: { position: "absolute", top: 0, opacity: 0.5, left: 0 } }, /* @__PURE__ */ React12.createElement(Highlighter, { language, style: gruvboxDark }, prefixes.join(""))), /* @__PURE__ */ React12.createElement(
|
|
632
905
|
Stepper,
|
|
633
906
|
{
|
|
634
907
|
values: steps,
|
|
635
908
|
alwaysVisible: !hasSteps,
|
|
636
909
|
priority: priority ? priority + 1 : void 0
|
|
637
910
|
},
|
|
638
|
-
(step, _, isActive) => /* @__PURE__ */
|
|
911
|
+
(step, _, isActive) => /* @__PURE__ */ React12.createElement(
|
|
639
912
|
CodeWrapper,
|
|
640
913
|
{
|
|
641
914
|
name,
|
|
642
915
|
stepName: step == null ? void 0 : step.name,
|
|
643
916
|
hasName
|
|
644
917
|
},
|
|
645
|
-
/* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ React12.createElement(
|
|
646
919
|
Highlighter,
|
|
647
920
|
{
|
|
648
921
|
language,
|
|
@@ -692,7 +965,7 @@ CodeStepper.mdxType = "CodeStepper";
|
|
|
692
965
|
// src/components/map.tsx
|
|
693
966
|
var componentsMap = {
|
|
694
967
|
...mdxComponentMap,
|
|
695
|
-
inlineCode: (props) => /* @__PURE__ */
|
|
968
|
+
inlineCode: (props) => /* @__PURE__ */ React13.createElement(
|
|
696
969
|
InlineCode,
|
|
697
970
|
{
|
|
698
971
|
...props,
|
|
@@ -702,7 +975,7 @@ var componentsMap = {
|
|
|
702
975
|
}
|
|
703
976
|
}
|
|
704
977
|
),
|
|
705
|
-
table: (props) => /* @__PURE__ */
|
|
978
|
+
table: (props) => /* @__PURE__ */ React13.createElement(
|
|
706
979
|
"table",
|
|
707
980
|
{
|
|
708
981
|
...props,
|
|
@@ -713,7 +986,7 @@ var componentsMap = {
|
|
|
713
986
|
}
|
|
714
987
|
}
|
|
715
988
|
),
|
|
716
|
-
tr: (props) => /* @__PURE__ */
|
|
989
|
+
tr: (props) => /* @__PURE__ */ React13.createElement(
|
|
717
990
|
"tr",
|
|
718
991
|
{
|
|
719
992
|
...props,
|
|
@@ -725,7 +998,7 @@ var componentsMap = {
|
|
|
725
998
|
}
|
|
726
999
|
}
|
|
727
1000
|
),
|
|
728
|
-
td: (props) => /* @__PURE__ */
|
|
1001
|
+
td: (props) => /* @__PURE__ */ React13.createElement(
|
|
729
1002
|
"td",
|
|
730
1003
|
{
|
|
731
1004
|
...props,
|
|
@@ -738,7 +1011,7 @@ var componentsMap = {
|
|
|
738
1011
|
}
|
|
739
1012
|
}
|
|
740
1013
|
),
|
|
741
|
-
h1: (props) => /* @__PURE__ */
|
|
1014
|
+
h1: (props) => /* @__PURE__ */ React13.createElement(
|
|
742
1015
|
CustomHeading,
|
|
743
1016
|
{
|
|
744
1017
|
fontSize: "h1",
|
|
@@ -753,15 +1026,15 @@ var componentsMap = {
|
|
|
753
1026
|
},
|
|
754
1027
|
props.children
|
|
755
1028
|
),
|
|
756
|
-
h2: (props) => /* @__PURE__ */
|
|
757
|
-
h3: (props) => /* @__PURE__ */
|
|
758
|
-
img: (props) => /* @__PURE__ */
|
|
1029
|
+
h2: (props) => /* @__PURE__ */ React13.createElement(HeadingTwo, null, props.children),
|
|
1030
|
+
h3: (props) => /* @__PURE__ */ React13.createElement(HeadingThree, { ...props }),
|
|
1031
|
+
img: (props) => /* @__PURE__ */ React13.createElement(Image2, { ...props }),
|
|
759
1032
|
pre: CodeStepper,
|
|
760
|
-
li: (props) => /* @__PURE__ */
|
|
761
|
-
Side: (props) => /* @__PURE__ */
|
|
1033
|
+
li: (props) => /* @__PURE__ */ React13.createElement("li", { ...props, style: { margin: "24px 0" } }),
|
|
1034
|
+
Side: (props) => /* @__PURE__ */ React13.createElement("div", { ...props }),
|
|
762
1035
|
p: (props) => {
|
|
763
1036
|
const Text = mdxComponentMap.p;
|
|
764
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ React13.createElement(
|
|
765
1038
|
Text,
|
|
766
1039
|
{
|
|
767
1040
|
style: { margin: "8px 0", padding: "8px 0", lineHeight: "2rem" },
|
|
@@ -769,10 +1042,10 @@ var componentsMap = {
|
|
|
769
1042
|
}
|
|
770
1043
|
);
|
|
771
1044
|
},
|
|
772
|
-
blockquote: (props) => /* @__PURE__ */
|
|
1045
|
+
blockquote: (props) => /* @__PURE__ */ React13.createElement(CustomQuote, { ...props }),
|
|
773
1046
|
a: ({ children, ...props }) => {
|
|
774
1047
|
const domain = new URL(props.href || "").hostname;
|
|
775
|
-
return /* @__PURE__ */
|
|
1048
|
+
return /* @__PURE__ */ React13.createElement("a", { ...props, style: { color: "#f49676", textDecoration: "none" } }, children, " ", /* @__PURE__ */ React13.createElement(
|
|
776
1049
|
"small",
|
|
777
1050
|
{
|
|
778
1051
|
style: {
|
|
@@ -788,14 +1061,14 @@ var componentsMap = {
|
|
|
788
1061
|
var map_default = componentsMap;
|
|
789
1062
|
|
|
790
1063
|
// src/components/FilePane.tsx
|
|
791
|
-
import
|
|
1064
|
+
import React14 from "react";
|
|
792
1065
|
function FilePane({
|
|
793
1066
|
name,
|
|
794
1067
|
children,
|
|
795
1068
|
priority,
|
|
796
1069
|
...divProps
|
|
797
1070
|
}) {
|
|
798
|
-
return
|
|
1071
|
+
return React14.isValidElement(children) ? React14.cloneElement(children, {
|
|
799
1072
|
// @ts-expect-error cloning
|
|
800
1073
|
priority,
|
|
801
1074
|
name
|
|
@@ -804,14 +1077,14 @@ function FilePane({
|
|
|
804
1077
|
FilePane.mdxType = "FilePane";
|
|
805
1078
|
|
|
806
1079
|
// src/components/ItemsColumn.tsx
|
|
807
|
-
import
|
|
1080
|
+
import React15 from "react";
|
|
808
1081
|
import { Stepper as Stepper2 } from "spectacle";
|
|
809
|
-
import
|
|
1082
|
+
import styled10 from "styled-components";
|
|
810
1083
|
import { useSpring, animated } from "react-spring";
|
|
811
1084
|
function ItemsColumn(divProps) {
|
|
812
1085
|
const { style, children, ...props } = divProps;
|
|
813
|
-
const childrenArray =
|
|
814
|
-
return /* @__PURE__ */
|
|
1086
|
+
const childrenArray = React15.Children.toArray(children);
|
|
1087
|
+
return /* @__PURE__ */ React15.createElement(Stepper2, { values: childrenArray }, (value, step) => /* @__PURE__ */ React15.createElement(
|
|
815
1088
|
"div",
|
|
816
1089
|
{
|
|
817
1090
|
style: {
|
|
@@ -825,14 +1098,14 @@ function ItemsColumn(divProps) {
|
|
|
825
1098
|
},
|
|
826
1099
|
childrenArray.map((child, index) => {
|
|
827
1100
|
const isVisible = index <= step;
|
|
828
|
-
if (!
|
|
1101
|
+
if (!React15.isValidElement(child)) {
|
|
829
1102
|
return child;
|
|
830
1103
|
}
|
|
831
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ React15.createElement(ItemColumnWrapper, { key: index, isVisible }, child);
|
|
832
1105
|
})
|
|
833
1106
|
));
|
|
834
1107
|
}
|
|
835
|
-
var ItemColumnWrapperStyled =
|
|
1108
|
+
var ItemColumnWrapperStyled = styled10(animated.div)`
|
|
836
1109
|
* {
|
|
837
1110
|
text-align: center !important;
|
|
838
1111
|
}
|
|
@@ -843,15 +1116,15 @@ function ItemColumnWrapper({
|
|
|
843
1116
|
...props
|
|
844
1117
|
}) {
|
|
845
1118
|
const styles = useSpring({ opacity: isVisible ? 1 : 0 });
|
|
846
|
-
return /* @__PURE__ */
|
|
1119
|
+
return /* @__PURE__ */ React15.createElement(ItemColumnWrapperStyled, { style: styles, ...props }, children);
|
|
847
1120
|
}
|
|
848
1121
|
|
|
849
1122
|
// src/components/HorizontalList.tsx
|
|
850
|
-
import
|
|
1123
|
+
import React16 from "react";
|
|
851
1124
|
import { animated as animated2, useSpring as useSpring2 } from "react-spring";
|
|
852
1125
|
import { Stepper as Stepper3 } from "spectacle";
|
|
853
|
-
import
|
|
854
|
-
var Container =
|
|
1126
|
+
import styled11 from "styled-components";
|
|
1127
|
+
var Container = styled11.div`
|
|
855
1128
|
display: grid;
|
|
856
1129
|
grid-gap: 2rem;
|
|
857
1130
|
`;
|
|
@@ -859,8 +1132,8 @@ function HorizontalList({
|
|
|
859
1132
|
children,
|
|
860
1133
|
columns = 3
|
|
861
1134
|
}) {
|
|
862
|
-
const items =
|
|
863
|
-
return /* @__PURE__ */
|
|
1135
|
+
const items = React16.Children.toArray(children);
|
|
1136
|
+
return /* @__PURE__ */ React16.createElement(Stepper3, { values: items }, (_, step) => /* @__PURE__ */ React16.createElement(
|
|
864
1137
|
Container,
|
|
865
1138
|
{
|
|
866
1139
|
style: {
|
|
@@ -868,10 +1141,10 @@ function HorizontalList({
|
|
|
868
1141
|
}
|
|
869
1142
|
},
|
|
870
1143
|
items.map((item, k) => {
|
|
871
|
-
if (!
|
|
1144
|
+
if (!React16.isValidElement(item)) {
|
|
872
1145
|
return item;
|
|
873
1146
|
}
|
|
874
|
-
return
|
|
1147
|
+
return React16.cloneElement(item, {
|
|
875
1148
|
// @ts-expect-error cloning
|
|
876
1149
|
position: k + 1,
|
|
877
1150
|
isVisible: k <= step,
|
|
@@ -881,12 +1154,12 @@ function HorizontalList({
|
|
|
881
1154
|
));
|
|
882
1155
|
}
|
|
883
1156
|
function Pill({ position }) {
|
|
884
|
-
return /* @__PURE__ */
|
|
1157
|
+
return /* @__PURE__ */ React16.createElement(
|
|
885
1158
|
"div",
|
|
886
1159
|
{
|
|
887
1160
|
style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 }
|
|
888
1161
|
},
|
|
889
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ React16.createElement(
|
|
890
1163
|
"svg",
|
|
891
1164
|
{
|
|
892
1165
|
width: "48",
|
|
@@ -895,14 +1168,14 @@ function Pill({ position }) {
|
|
|
895
1168
|
fill: "none",
|
|
896
1169
|
xmlns: "http://www.w3.org/2000/svg"
|
|
897
1170
|
},
|
|
898
|
-
/* @__PURE__ */
|
|
1171
|
+
/* @__PURE__ */ React16.createElement(
|
|
899
1172
|
"path",
|
|
900
1173
|
{
|
|
901
1174
|
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",
|
|
902
1175
|
fill: "#ffffff"
|
|
903
1176
|
}
|
|
904
1177
|
),
|
|
905
|
-
/* @__PURE__ */
|
|
1178
|
+
/* @__PURE__ */ React16.createElement(
|
|
906
1179
|
"text",
|
|
907
1180
|
{
|
|
908
1181
|
x: "9",
|
|
@@ -914,7 +1187,7 @@ function Pill({ position }) {
|
|
|
914
1187
|
},
|
|
915
1188
|
position
|
|
916
1189
|
),
|
|
917
|
-
/* @__PURE__ */
|
|
1190
|
+
/* @__PURE__ */ React16.createElement(
|
|
918
1191
|
"path",
|
|
919
1192
|
{
|
|
920
1193
|
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",
|
|
@@ -924,12 +1197,12 @@ function Pill({ position }) {
|
|
|
924
1197
|
)
|
|
925
1198
|
);
|
|
926
1199
|
}
|
|
927
|
-
var Item =
|
|
1200
|
+
var Item = styled11(animated2.div)`
|
|
928
1201
|
display: flex;
|
|
929
1202
|
flex-direction: column;
|
|
930
1203
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
931
1204
|
`;
|
|
932
|
-
var ItemHead =
|
|
1205
|
+
var ItemHead = styled11.div`
|
|
933
1206
|
display: flex;
|
|
934
1207
|
flex-direction: row;
|
|
935
1208
|
font-size: 1.3rem;
|
|
@@ -939,7 +1212,7 @@ var ItemHead = styled9.div`
|
|
|
939
1212
|
margin: 0;
|
|
940
1213
|
}
|
|
941
1214
|
`;
|
|
942
|
-
var ItemContent =
|
|
1215
|
+
var ItemContent = styled11.div`
|
|
943
1216
|
> * {
|
|
944
1217
|
font-size: 1rem;
|
|
945
1218
|
padding: 4px !important;
|
|
@@ -967,32 +1240,90 @@ function HorizontalListItem({
|
|
|
967
1240
|
const opacityStyles = useSpring2({
|
|
968
1241
|
opacity: getItemOpacity({ isVisible, isLast })
|
|
969
1242
|
});
|
|
970
|
-
return /* @__PURE__ */
|
|
1243
|
+
return /* @__PURE__ */ React16.createElement(Item, { style: opacityStyles }, /* @__PURE__ */ React16.createElement(ItemHead, null, /* @__PURE__ */ React16.createElement(Pill, { position }), /* @__PURE__ */ React16.createElement("p", null, title)), /* @__PURE__ */ React16.createElement(ItemContent, null, children));
|
|
971
1244
|
}
|
|
972
1245
|
|
|
973
1246
|
// src/components/Timeline.tsx
|
|
974
|
-
import
|
|
1247
|
+
import React17 from "react";
|
|
975
1248
|
import { animated as animated3, useSpring as useSpring3 } from "react-spring";
|
|
976
|
-
import classnames from "classnames";
|
|
977
1249
|
import { Stepper as Stepper4 } from "spectacle";
|
|
978
1250
|
|
|
979
|
-
// src/components/Timeline.
|
|
980
|
-
|
|
1251
|
+
// src/components/Timeline.styled.tsx
|
|
1252
|
+
import styled12 from "styled-components";
|
|
1253
|
+
var TimelineStyled = styled12.div`
|
|
1254
|
+
display: flex;
|
|
1255
|
+
position: relative;
|
|
1256
|
+
flex-flow: row nowrap;
|
|
1257
|
+
align-items: center;
|
|
1258
|
+
`;
|
|
1259
|
+
var TimelineItemContent = styled12.div`
|
|
1260
|
+
display: flex;
|
|
1261
|
+
padding: 0.7rem 0 1rem 12px;
|
|
1262
|
+
`;
|
|
1263
|
+
var TimelineItemContentPhantom = styled12(TimelineItemContent)`
|
|
1264
|
+
opacity: 0;
|
|
1265
|
+
`;
|
|
1266
|
+
var TimelineItemBody = styled12.div`
|
|
1267
|
+
&,
|
|
1268
|
+
& > * {
|
|
1269
|
+
font-size: 1.3rem !important;
|
|
1270
|
+
color: #ffffff !important;
|
|
1271
|
+
}
|
|
1272
|
+
`;
|
|
1273
|
+
var TimelineItemTitle = styled12.div`
|
|
1274
|
+
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1275
|
+
font-size: 1rem;
|
|
1276
|
+
font-weight: bold;
|
|
1277
|
+
color: #ffffffbb;
|
|
1278
|
+
`;
|
|
981
1279
|
|
|
982
1280
|
// src/components/Timeline.tsx
|
|
1281
|
+
import styled13, { css } from "styled-components";
|
|
1282
|
+
var TimelineItemStyled = styled13(animated3.div)`
|
|
1283
|
+
flex: 1;
|
|
1284
|
+
display: inline-flex;
|
|
1285
|
+
|
|
1286
|
+
${({ isOdd }) => isOdd && css`
|
|
1287
|
+
flex-direction: column;
|
|
1288
|
+
`}
|
|
1289
|
+
|
|
1290
|
+
${({ isEven }) => isEven && css`
|
|
1291
|
+
flex-direction: column-reverse;
|
|
1292
|
+
`}
|
|
1293
|
+
`;
|
|
1294
|
+
var TimelineItemGuide = styled13(animated3.div)`
|
|
1295
|
+
width: 100%;
|
|
1296
|
+
padding-top: 2px;
|
|
1297
|
+
display: flex;
|
|
1298
|
+
flex-flow: row;
|
|
1299
|
+
align-items: center;
|
|
1300
|
+
|
|
1301
|
+
svg {
|
|
1302
|
+
height: 28px;
|
|
1303
|
+
width: 28px;
|
|
1304
|
+
path {
|
|
1305
|
+
fill: #ffffff;
|
|
1306
|
+
}
|
|
1307
|
+
margin-right: 4px;
|
|
1308
|
+
}
|
|
1309
|
+
`;
|
|
1310
|
+
var TimelineItemGuideLine = styled13(animated3.div)`
|
|
1311
|
+
border-top: 4px solid #ffffff;
|
|
1312
|
+
margin-right: 4px;
|
|
1313
|
+
`;
|
|
983
1314
|
function Timeline(props) {
|
|
984
|
-
const children =
|
|
985
|
-
return /* @__PURE__ */
|
|
986
|
-
return children.map((child, index) => {
|
|
987
|
-
if (!
|
|
1315
|
+
const children = React17.Children.toArray(props.children);
|
|
1316
|
+
return /* @__PURE__ */ React17.createElement(Stepper4, { ...props, values: children }, (value, step) => {
|
|
1317
|
+
return /* @__PURE__ */ React17.createElement(TimelineStyled, null, children.map((child, index) => {
|
|
1318
|
+
if (!React17.isValidElement(child)) {
|
|
988
1319
|
return child;
|
|
989
1320
|
}
|
|
990
|
-
return
|
|
1321
|
+
return React17.cloneElement(child, {
|
|
991
1322
|
// @ts-expect-error cloning
|
|
992
1323
|
isPhantom: step < index,
|
|
993
1324
|
isLast: step === index
|
|
994
1325
|
});
|
|
995
|
-
});
|
|
1326
|
+
}));
|
|
996
1327
|
});
|
|
997
1328
|
}
|
|
998
1329
|
function getItemOpacity2({
|
|
@@ -1014,38 +1345,21 @@ function TimelineItem(props) {
|
|
|
1014
1345
|
opacity: getItemOpacity2({ isPhantom, isLast })
|
|
1015
1346
|
});
|
|
1016
1347
|
const colorStyles = useSpring3({ opacity: isPhantom || isLast ? 1 : 0.15 });
|
|
1017
|
-
return /* @__PURE__ */
|
|
1018
|
-
|
|
1348
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1349
|
+
TimelineItemStyled,
|
|
1019
1350
|
{
|
|
1020
1351
|
...rest,
|
|
1021
|
-
className: Timeline_module_default["timelineItem"],
|
|
1022
1352
|
style: {
|
|
1023
1353
|
...appearStyles
|
|
1024
1354
|
}
|
|
1025
1355
|
},
|
|
1026
|
-
/* @__PURE__ */
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
className: classnames(
|
|
1030
|
-
Timeline_module_default["timelineItemContent"],
|
|
1031
|
-
Timeline_module_default["timelineItemContentPhantom"]
|
|
1032
|
-
)
|
|
1033
|
-
},
|
|
1034
|
-
/* @__PURE__ */ React15.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title),
|
|
1035
|
-
/* @__PURE__ */ React15.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children)
|
|
1036
|
-
),
|
|
1037
|
-
/* @__PURE__ */ React15.createElement(animated3.div, { className: Timeline_module_default["timelineItemGuide"], style: colorStyles }, /* @__PURE__ */ React15.createElement(Hexagon, null), /* @__PURE__ */ React15.createElement(
|
|
1038
|
-
animated3.div,
|
|
1039
|
-
{
|
|
1040
|
-
className: Timeline_module_default["timelineItemGuideLine"],
|
|
1041
|
-
style: guideLineProps
|
|
1042
|
-
}
|
|
1043
|
-
)),
|
|
1044
|
-
/* @__PURE__ */ React15.createElement("div", { className: Timeline_module_default["timelineItemContent"] }, /* @__PURE__ */ React15.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title), /* @__PURE__ */ React15.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children))
|
|
1356
|
+
/* @__PURE__ */ React17.createElement(TimelineItemContentPhantom, null, /* @__PURE__ */ React17.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React17.createElement(TimelineItemBody, null, children)),
|
|
1357
|
+
/* @__PURE__ */ React17.createElement(TimelineItemGuide, { style: colorStyles }, /* @__PURE__ */ React17.createElement(Hexagon, null), /* @__PURE__ */ React17.createElement(TimelineItemGuideLine, { style: guideLineProps })),
|
|
1358
|
+
/* @__PURE__ */ React17.createElement(TimelineItemContent, null, /* @__PURE__ */ React17.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React17.createElement(TimelineItemBody, null, children))
|
|
1045
1359
|
);
|
|
1046
1360
|
}
|
|
1047
1361
|
function Hexagon() {
|
|
1048
|
-
return /* @__PURE__ */
|
|
1362
|
+
return /* @__PURE__ */ React17.createElement(
|
|
1049
1363
|
"svg",
|
|
1050
1364
|
{
|
|
1051
1365
|
width: "18",
|
|
@@ -1054,14 +1368,14 @@ function Hexagon() {
|
|
|
1054
1368
|
fill: "none",
|
|
1055
1369
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1056
1370
|
},
|
|
1057
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ React17.createElement(
|
|
1058
1372
|
"path",
|
|
1059
1373
|
{
|
|
1060
1374
|
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",
|
|
1061
1375
|
fill: "#F49676"
|
|
1062
1376
|
}
|
|
1063
1377
|
),
|
|
1064
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ React17.createElement(
|
|
1065
1379
|
"path",
|
|
1066
1380
|
{
|
|
1067
1381
|
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",
|
|
@@ -1072,9 +1386,9 @@ function Hexagon() {
|
|
|
1072
1386
|
}
|
|
1073
1387
|
|
|
1074
1388
|
// src/components/IconBox.tsx
|
|
1075
|
-
import
|
|
1076
|
-
import
|
|
1077
|
-
var IconBoxContent =
|
|
1389
|
+
import React18 from "react";
|
|
1390
|
+
import styled14 from "styled-components";
|
|
1391
|
+
var IconBoxContent = styled14.div`
|
|
1078
1392
|
* {
|
|
1079
1393
|
margin: 0.2rem !important;
|
|
1080
1394
|
padding: 0 !important;
|
|
@@ -1084,7 +1398,7 @@ function IconBox({
|
|
|
1084
1398
|
children,
|
|
1085
1399
|
icon
|
|
1086
1400
|
}) {
|
|
1087
|
-
return /* @__PURE__ */
|
|
1401
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1088
1402
|
"div",
|
|
1089
1403
|
{
|
|
1090
1404
|
style: {
|
|
@@ -1094,14 +1408,14 @@ function IconBox({
|
|
|
1094
1408
|
padding: "1rem 0"
|
|
1095
1409
|
}
|
|
1096
1410
|
},
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ React18.createElement("div", { style: { fontSize: 60 } }, icon),
|
|
1412
|
+
/* @__PURE__ */ React18.createElement(IconBoxContent, null, children)
|
|
1099
1413
|
);
|
|
1100
1414
|
}
|
|
1101
1415
|
|
|
1102
1416
|
// src/index.tsx
|
|
1103
1417
|
function PassThrough({ children }) {
|
|
1104
|
-
return /* @__PURE__ */
|
|
1418
|
+
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, children);
|
|
1105
1419
|
}
|
|
1106
1420
|
function Layout({
|
|
1107
1421
|
children,
|
|
@@ -1113,37 +1427,37 @@ function Layout({
|
|
|
1113
1427
|
console.warn(`Layout ${layout} not found`);
|
|
1114
1428
|
}
|
|
1115
1429
|
if (Layout2) {
|
|
1116
|
-
return /* @__PURE__ */
|
|
1430
|
+
return /* @__PURE__ */ React19.createElement(Layout2, { ...frontmatter }, children);
|
|
1117
1431
|
}
|
|
1118
|
-
return /* @__PURE__ */
|
|
1432
|
+
return /* @__PURE__ */ React19.createElement(React19.Fragment, null, children);
|
|
1119
1433
|
}
|
|
1120
1434
|
var componentsMap2 = {
|
|
1121
1435
|
...map_default,
|
|
1122
1436
|
wrapper: Layout
|
|
1123
1437
|
};
|
|
1124
1438
|
function Deck({ deck }) {
|
|
1125
|
-
|
|
1439
|
+
React19.useEffect(() => {
|
|
1126
1440
|
document.title = deck.metadata.title || "Untitled";
|
|
1127
1441
|
}, [deck.metadata.title]);
|
|
1128
|
-
return /* @__PURE__ */
|
|
1442
|
+
return /* @__PURE__ */ React19.createElement(React19.StrictMode, null, /* @__PURE__ */ React19.createElement(MDXProvider, { components: componentsMap2 }, /* @__PURE__ */ React19.createElement(SpectacleDeck, { theme: theme_default, template }, deck.slides.map((slide, i) => {
|
|
1129
1443
|
const Component = slide.slideComponent;
|
|
1130
|
-
return /* @__PURE__ */
|
|
1444
|
+
return /* @__PURE__ */ React19.createElement(Slide, { key: i }, /* @__PURE__ */ React19.createElement(Component, null));
|
|
1131
1445
|
}))));
|
|
1132
1446
|
}
|
|
1133
1447
|
function Danger({ children }) {
|
|
1134
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ React19.createElement("div", { style: { color: "red" } }, children);
|
|
1135
1449
|
}
|
|
1136
1450
|
function Doc({ children }) {
|
|
1137
|
-
return /* @__PURE__ */
|
|
1451
|
+
return /* @__PURE__ */ React19.createElement("div", { style: { color: "blue" } }, children);
|
|
1138
1452
|
}
|
|
1139
1453
|
function Information({ children }) {
|
|
1140
|
-
return /* @__PURE__ */
|
|
1454
|
+
return /* @__PURE__ */ React19.createElement("div", { style: { color: "orange" } }, children);
|
|
1141
1455
|
}
|
|
1142
1456
|
function Success({ children }) {
|
|
1143
|
-
return /* @__PURE__ */
|
|
1457
|
+
return /* @__PURE__ */ React19.createElement("div", { style: { color: "green" } }, children);
|
|
1144
1458
|
}
|
|
1145
1459
|
function Side({ children }) {
|
|
1146
|
-
return /* @__PURE__ */
|
|
1460
|
+
return /* @__PURE__ */ React19.createElement("div", null, children);
|
|
1147
1461
|
}
|
|
1148
1462
|
Side.mdxType = "Side";
|
|
1149
1463
|
export {
|