@gpichot/spectacle-deck 1.0.0 → 1.0.2
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/map.d.ts +3 -3
- package/components/styled.d.ts +20 -20
- package/index.cjs +445 -203
- package/index.mjs +444 -202
- 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 +2 -1
package/index.cjs
CHANGED
|
@@ -45,43 +45,331 @@ __export(src_exports, {
|
|
|
45
45
|
Timeline: () => Timeline,
|
|
46
46
|
TimelineItem: () => TimelineItem
|
|
47
47
|
});
|
|
48
|
-
var
|
|
48
|
+
var import_react19 = __toESM(require("react"));
|
|
49
|
+
var import_react20 = require("@mdx-js/react");
|
|
50
|
+
var import_spectacle9 = require("spectacle");
|
|
51
|
+
|
|
52
|
+
// src/layouts/CenteredLayout.tsx
|
|
53
|
+
var import_react2 = __toESM(require("react"));
|
|
54
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
49
55
|
|
|
50
|
-
//
|
|
51
|
-
var import_react = __toESM(require("react")
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
56
|
+
// src/layouts/utils.ts
|
|
57
|
+
var import_react = __toESM(require("react"));
|
|
58
|
+
var Margins = {
|
|
59
|
+
vertical: "4rem",
|
|
60
|
+
horizontal: "7rem",
|
|
61
|
+
horizontalInternal: "2rem"
|
|
62
|
+
};
|
|
63
|
+
function getHeading(children) {
|
|
64
|
+
const allChild = import_react.default.Children.toArray(children);
|
|
65
|
+
if (allChild.length === 0)
|
|
66
|
+
return [null, allChild];
|
|
67
|
+
const [candidate, ...rest] = allChild;
|
|
68
|
+
if (!import_react.default.isValidElement(candidate))
|
|
69
|
+
return [null, allChild];
|
|
70
|
+
if (["h2", "h3"].includes(candidate.props.originalType)) {
|
|
71
|
+
return [candidate, rest];
|
|
72
|
+
}
|
|
73
|
+
return [null, allChild];
|
|
74
|
+
}
|
|
75
|
+
function getCode(children) {
|
|
76
|
+
const allChild = import_react.default.Children.toArray(children);
|
|
77
|
+
if (allChild.length === 0)
|
|
78
|
+
return [null, allChild];
|
|
79
|
+
const index = allChild.findIndex((child) => {
|
|
80
|
+
if (!import_react.default.isValidElement(child))
|
|
81
|
+
return false;
|
|
82
|
+
return child.props.originalType === "pre";
|
|
83
|
+
});
|
|
84
|
+
if (index === -1)
|
|
85
|
+
return [null, allChild];
|
|
86
|
+
const candidate = allChild[index];
|
|
87
|
+
const rest = allChild.filter((_, i) => i !== index);
|
|
88
|
+
return [candidate, rest];
|
|
89
|
+
}
|
|
90
|
+
function getMatchingMdxType(children, mdxType) {
|
|
91
|
+
const allChild = import_react.default.Children.toArray(children);
|
|
92
|
+
const matchFn = (child) => {
|
|
93
|
+
if (!import_react.default.isValidElement(child))
|
|
94
|
+
return false;
|
|
95
|
+
if (typeof child.type !== "function")
|
|
96
|
+
return false;
|
|
97
|
+
if ("mdxType" in child.type === false)
|
|
98
|
+
return false;
|
|
99
|
+
return child.type.mdxType === mdxType;
|
|
100
|
+
};
|
|
101
|
+
const matches = allChild.filter(matchFn);
|
|
102
|
+
const rest = allChild.filter((child) => !matchFn(child));
|
|
103
|
+
return [matches, rest];
|
|
104
|
+
}
|
|
105
|
+
function getCodeChildren(children) {
|
|
106
|
+
const [code, rest] = getCode(children);
|
|
107
|
+
if (code)
|
|
108
|
+
return [code, rest];
|
|
109
|
+
const [codeStepper, rest2] = getMatchingMdxType(children, "CodeStepper");
|
|
110
|
+
if (codeStepper.length > 0)
|
|
111
|
+
return [codeStepper, rest2];
|
|
112
|
+
const [codes, rest3] = getMatchingMdxType(children, "FilePane");
|
|
113
|
+
return [codes, rest3];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// src/layouts/CenteredLayout.tsx
|
|
117
|
+
var CenteredLayoutContent = import_styled_components.default.div`
|
|
118
|
+
h2,
|
|
119
|
+
h3 {
|
|
120
|
+
}
|
|
121
|
+
`;
|
|
122
|
+
var CenteredLayout = (props) => {
|
|
123
|
+
const [heading, rest] = getHeading(props.children);
|
|
124
|
+
return /* @__PURE__ */ import_react2.default.createElement(
|
|
125
|
+
"div",
|
|
126
|
+
{
|
|
127
|
+
...props,
|
|
128
|
+
style: {
|
|
129
|
+
height: "100%",
|
|
130
|
+
display: "flex",
|
|
131
|
+
flexFlow: "column",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
justifyContent: "center",
|
|
134
|
+
margin: `0 ${Margins.horizontal}`
|
|
60
135
|
}
|
|
61
|
-
return { ...contextComponents, ...components };
|
|
62
136
|
},
|
|
63
|
-
|
|
137
|
+
rest,
|
|
138
|
+
/* @__PURE__ */ import_react2.default.createElement(
|
|
139
|
+
CenteredLayoutContent,
|
|
140
|
+
{
|
|
141
|
+
style: {
|
|
142
|
+
position: "absolute",
|
|
143
|
+
opacity: 0.8,
|
|
144
|
+
marginBottom: "2rem",
|
|
145
|
+
marginTop: "2rem",
|
|
146
|
+
bottom: 0
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
heading
|
|
150
|
+
)
|
|
151
|
+
);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// src/layouts/Default3Layout.tsx
|
|
155
|
+
var import_react3 = __toESM(require("react"));
|
|
156
|
+
var import_styled_components2 = __toESM(require("styled-components"));
|
|
157
|
+
function MultipleHexagons({ position }) {
|
|
158
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
159
|
+
"svg",
|
|
160
|
+
{
|
|
161
|
+
viewBox: `${position === "left" ? "0" : "2"} 0 12 20`,
|
|
162
|
+
width: "12",
|
|
163
|
+
height: "20",
|
|
164
|
+
fill: "none",
|
|
165
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
166
|
+
},
|
|
167
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
168
|
+
"path",
|
|
169
|
+
{
|
|
170
|
+
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",
|
|
171
|
+
fill: "#F49676"
|
|
172
|
+
}
|
|
173
|
+
),
|
|
174
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
175
|
+
"path",
|
|
176
|
+
{
|
|
177
|
+
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",
|
|
178
|
+
fill: "#F49676"
|
|
179
|
+
}
|
|
180
|
+
),
|
|
181
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
182
|
+
"path",
|
|
183
|
+
{
|
|
184
|
+
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",
|
|
185
|
+
fill: "#F49676"
|
|
186
|
+
}
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
189
|
+
"path",
|
|
190
|
+
{
|
|
191
|
+
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",
|
|
192
|
+
fill: "#F49676"
|
|
193
|
+
}
|
|
194
|
+
),
|
|
195
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
196
|
+
"path",
|
|
197
|
+
{
|
|
198
|
+
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",
|
|
199
|
+
fill: "#F49676"
|
|
200
|
+
}
|
|
201
|
+
),
|
|
202
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
203
|
+
"path",
|
|
204
|
+
{
|
|
205
|
+
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",
|
|
206
|
+
fill: "#F49676"
|
|
207
|
+
}
|
|
208
|
+
),
|
|
209
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
210
|
+
"path",
|
|
211
|
+
{
|
|
212
|
+
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",
|
|
213
|
+
fill: "#F49676"
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
217
|
+
"path",
|
|
218
|
+
{
|
|
219
|
+
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",
|
|
220
|
+
fill: "#F49676"
|
|
221
|
+
}
|
|
222
|
+
),
|
|
223
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
224
|
+
"path",
|
|
225
|
+
{
|
|
226
|
+
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",
|
|
227
|
+
fill: "#F49676"
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
231
|
+
"path",
|
|
232
|
+
{
|
|
233
|
+
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",
|
|
234
|
+
fill: "#F49676"
|
|
235
|
+
}
|
|
236
|
+
),
|
|
237
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
238
|
+
"path",
|
|
239
|
+
{
|
|
240
|
+
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",
|
|
241
|
+
fill: "#F49676"
|
|
242
|
+
}
|
|
243
|
+
),
|
|
244
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
245
|
+
"path",
|
|
246
|
+
{
|
|
247
|
+
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",
|
|
248
|
+
fill: "#F49676"
|
|
249
|
+
}
|
|
250
|
+
),
|
|
251
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
252
|
+
"path",
|
|
253
|
+
{
|
|
254
|
+
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",
|
|
255
|
+
fill: "#F49676"
|
|
256
|
+
}
|
|
257
|
+
),
|
|
258
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
259
|
+
"path",
|
|
260
|
+
{
|
|
261
|
+
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",
|
|
262
|
+
fill: "#F49676"
|
|
263
|
+
}
|
|
264
|
+
),
|
|
265
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
266
|
+
"path",
|
|
267
|
+
{
|
|
268
|
+
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",
|
|
269
|
+
fill: "#F49676"
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
273
|
+
"path",
|
|
274
|
+
{
|
|
275
|
+
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",
|
|
276
|
+
fill: "#F49676"
|
|
277
|
+
}
|
|
278
|
+
),
|
|
279
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
280
|
+
"path",
|
|
281
|
+
{
|
|
282
|
+
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",
|
|
283
|
+
fill: "#F49676"
|
|
284
|
+
}
|
|
285
|
+
),
|
|
286
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
287
|
+
"path",
|
|
288
|
+
{
|
|
289
|
+
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",
|
|
290
|
+
fill: "#F49676"
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
294
|
+
"path",
|
|
295
|
+
{
|
|
296
|
+
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",
|
|
297
|
+
fill: "#F49676"
|
|
298
|
+
}
|
|
299
|
+
),
|
|
300
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
301
|
+
"path",
|
|
302
|
+
{
|
|
303
|
+
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",
|
|
304
|
+
fill: "#F49676"
|
|
305
|
+
}
|
|
306
|
+
)
|
|
64
307
|
);
|
|
65
308
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
309
|
+
var Default3SideContainer = import_styled_components2.default.div`
|
|
310
|
+
svg {
|
|
311
|
+
height: 100%;
|
|
312
|
+
width: auto;
|
|
313
|
+
path {
|
|
314
|
+
fill: #ffffff22;
|
|
315
|
+
transition: fill 3s;
|
|
316
|
+
&:hover {
|
|
317
|
+
fill: #ffffffbb;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
72
320
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
321
|
+
`;
|
|
322
|
+
var Default2LayoutContainer = import_styled_components2.default.div`
|
|
323
|
+
h2,
|
|
324
|
+
h3 {
|
|
325
|
+
text-align: left;
|
|
326
|
+
color: white;
|
|
327
|
+
}
|
|
328
|
+
`;
|
|
329
|
+
var Default3Layout = ({
|
|
330
|
+
children,
|
|
331
|
+
position = "right"
|
|
332
|
+
}) => {
|
|
333
|
+
const isReversed = position === "left";
|
|
334
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
335
|
+
Default2LayoutContainer,
|
|
336
|
+
{
|
|
337
|
+
style: {
|
|
338
|
+
display: "flex",
|
|
339
|
+
position: "absolute",
|
|
340
|
+
flexDirection: isReversed ? "row-reverse" : "row",
|
|
341
|
+
inset: 0,
|
|
342
|
+
alignItems: "center"
|
|
343
|
+
}
|
|
344
|
+
},
|
|
345
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
346
|
+
Default3SideContainer,
|
|
347
|
+
{
|
|
348
|
+
style: {
|
|
349
|
+
flex: 1,
|
|
350
|
+
height: "100%",
|
|
351
|
+
padding: "2rem",
|
|
352
|
+
transform: isReversed ? "scale(2) translate(25%, 4%)" : "scale(2) translate(-25%, 15%)"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
/* @__PURE__ */ import_react3.default.createElement(MultipleHexagons, { position })
|
|
356
|
+
),
|
|
357
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
358
|
+
"div",
|
|
359
|
+
{
|
|
360
|
+
style: {
|
|
361
|
+
flex: 4,
|
|
362
|
+
marginLeft: isReversed ? Margins.horizontal : "2rem",
|
|
363
|
+
marginRight: isReversed ? "2rem" : Margins.horizontal
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
children
|
|
367
|
+
)
|
|
77
368
|
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// src/index.tsx
|
|
81
|
-
var import_spectacle9 = require("spectacle");
|
|
369
|
+
};
|
|
82
370
|
|
|
83
371
|
// src/layouts/MainSectionLayout.tsx
|
|
84
|
-
var
|
|
372
|
+
var import_react4 = __toESM(require("react"));
|
|
85
373
|
var import_spectacle = require("spectacle");
|
|
86
374
|
|
|
87
375
|
// src/front.png
|
|
@@ -91,7 +379,7 @@ var front_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA2QAAAfPCAYAA
|
|
|
91
379
|
var MainSectionLayout = ({
|
|
92
380
|
children
|
|
93
381
|
}) => {
|
|
94
|
-
return /* @__PURE__ */
|
|
382
|
+
return /* @__PURE__ */ import_react4.default.createElement(
|
|
95
383
|
import_spectacle.FlexBox,
|
|
96
384
|
{
|
|
97
385
|
height: "100%",
|
|
@@ -105,14 +393,14 @@ var MainSectionLayout = ({
|
|
|
105
393
|
bottom: 0
|
|
106
394
|
}
|
|
107
395
|
},
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ import_react4.default.createElement("div", { style: { paddingLeft: "8rem", flex: 1 } }, children),
|
|
397
|
+
/* @__PURE__ */ import_react4.default.createElement("div", { style: { flex: "0 0", height: "100%", paddingLeft: "5rem" } }, /* @__PURE__ */ import_react4.default.createElement("img", { src: front_default, alt: "Front", style: { height: "100%" } }))
|
|
110
398
|
);
|
|
111
399
|
};
|
|
112
400
|
|
|
113
401
|
// src/layouts/SectionLayout.tsx
|
|
114
|
-
var
|
|
115
|
-
var SectionLayout =
|
|
402
|
+
var import_styled_components3 = __toESM(require("styled-components"));
|
|
403
|
+
var SectionLayout = import_styled_components3.default.div`
|
|
116
404
|
display: flex;
|
|
117
405
|
flex-direction: row;
|
|
118
406
|
align-items: center;
|
|
@@ -126,12 +414,12 @@ var SectionLayout = import_styled_components.default.div`
|
|
|
126
414
|
`;
|
|
127
415
|
|
|
128
416
|
// src/layouts/SideCodeLayout.tsx
|
|
129
|
-
var
|
|
417
|
+
var import_react6 = __toESM(require("react"));
|
|
130
418
|
|
|
131
419
|
// src/layouts/columns.tsx
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
var DivWithHeading =
|
|
420
|
+
var import_react5 = __toESM(require("react"));
|
|
421
|
+
var import_styled_components4 = __toESM(require("styled-components"));
|
|
422
|
+
var DivWithHeading = import_styled_components4.default.div`
|
|
135
423
|
h2 {
|
|
136
424
|
margin-top: 0;
|
|
137
425
|
}
|
|
@@ -140,7 +428,7 @@ var DivWithHeading = import_styled_components2.default.div`
|
|
|
140
428
|
font-weight: 400;
|
|
141
429
|
}
|
|
142
430
|
`;
|
|
143
|
-
var ColumnsContainer = (0,
|
|
431
|
+
var ColumnsContainer = (0, import_styled_components4.default)(DivWithHeading)`
|
|
144
432
|
display: flex;
|
|
145
433
|
flex-direction: row;
|
|
146
434
|
position: absolute;
|
|
@@ -154,15 +442,15 @@ function ColumnsLayout({
|
|
|
154
442
|
children,
|
|
155
443
|
reverse
|
|
156
444
|
}) {
|
|
157
|
-
const childrenArray =
|
|
158
|
-
return /* @__PURE__ */
|
|
445
|
+
const childrenArray = import_react5.default.Children.toArray(children);
|
|
446
|
+
return /* @__PURE__ */ import_react5.default.createElement(
|
|
159
447
|
ColumnsContainer,
|
|
160
448
|
{
|
|
161
449
|
style: {
|
|
162
450
|
flexDirection: reverse ? "row-reverse" : "row"
|
|
163
451
|
}
|
|
164
452
|
},
|
|
165
|
-
childrenArray.map((child, i) => /* @__PURE__ */
|
|
453
|
+
childrenArray.map((child, i) => /* @__PURE__ */ import_react5.default.createElement(
|
|
166
454
|
"div",
|
|
167
455
|
{
|
|
168
456
|
key: i,
|
|
@@ -180,57 +468,9 @@ function ColumnsLayout({
|
|
|
180
468
|
);
|
|
181
469
|
}
|
|
182
470
|
|
|
183
|
-
// src/layouts/utils.ts
|
|
184
|
-
var import_react4 = __toESM(require("react"));
|
|
185
|
-
var Margins = {
|
|
186
|
-
vertical: "4rem",
|
|
187
|
-
horizontal: "7rem",
|
|
188
|
-
horizontalInternal: "2rem"
|
|
189
|
-
};
|
|
190
|
-
function getCode(children) {
|
|
191
|
-
const allChild = import_react4.default.Children.toArray(children);
|
|
192
|
-
if (allChild.length === 0)
|
|
193
|
-
return [null, allChild];
|
|
194
|
-
const index = allChild.findIndex((child) => {
|
|
195
|
-
if (!import_react4.default.isValidElement(child))
|
|
196
|
-
return false;
|
|
197
|
-
return child.props.originalType === "pre";
|
|
198
|
-
});
|
|
199
|
-
if (index === -1)
|
|
200
|
-
return [null, allChild];
|
|
201
|
-
const candidate = allChild[index];
|
|
202
|
-
const rest = allChild.filter((_, i) => i !== index);
|
|
203
|
-
return [candidate, rest];
|
|
204
|
-
}
|
|
205
|
-
function getMatchingMdxType(children, mdxType) {
|
|
206
|
-
const allChild = import_react4.default.Children.toArray(children);
|
|
207
|
-
const matchFn = (child) => {
|
|
208
|
-
if (!import_react4.default.isValidElement(child))
|
|
209
|
-
return false;
|
|
210
|
-
if (typeof child.type !== "function")
|
|
211
|
-
return false;
|
|
212
|
-
if ("mdxType" in child.type === false)
|
|
213
|
-
return false;
|
|
214
|
-
return child.type.mdxType === mdxType;
|
|
215
|
-
};
|
|
216
|
-
const matches = allChild.filter(matchFn);
|
|
217
|
-
const rest = allChild.filter((child) => !matchFn(child));
|
|
218
|
-
return [matches, rest];
|
|
219
|
-
}
|
|
220
|
-
function getCodeChildren(children) {
|
|
221
|
-
const [code, rest] = getCode(children);
|
|
222
|
-
if (code)
|
|
223
|
-
return [code, rest];
|
|
224
|
-
const [codeStepper, rest2] = getMatchingMdxType(children, "CodeStepper");
|
|
225
|
-
if (codeStepper.length > 0)
|
|
226
|
-
return [codeStepper, rest2];
|
|
227
|
-
const [codes, rest3] = getMatchingMdxType(children, "FilePane");
|
|
228
|
-
return [codes, rest3];
|
|
229
|
-
}
|
|
230
|
-
|
|
231
471
|
// src/layouts/SideCodeLayout.tsx
|
|
232
|
-
var
|
|
233
|
-
var CodeSide =
|
|
472
|
+
var import_styled_components5 = __toESM(require("styled-components"));
|
|
473
|
+
var CodeSide = import_styled_components5.default.div`
|
|
234
474
|
pre {
|
|
235
475
|
font-size: 0.9rem;
|
|
236
476
|
}
|
|
@@ -240,7 +480,7 @@ function SidedCodeLayout({
|
|
|
240
480
|
position = "right"
|
|
241
481
|
}) {
|
|
242
482
|
const [code, rest] = getCodeChildren(children);
|
|
243
|
-
return /* @__PURE__ */
|
|
483
|
+
return /* @__PURE__ */ import_react6.default.createElement(ColumnsLayout, { reverse: position === "left" }, /* @__PURE__ */ import_react6.default.createElement(
|
|
244
484
|
"div",
|
|
245
485
|
{
|
|
246
486
|
style: {
|
|
@@ -249,7 +489,7 @@ function SidedCodeLayout({
|
|
|
249
489
|
}
|
|
250
490
|
},
|
|
251
491
|
rest
|
|
252
|
-
), /* @__PURE__ */
|
|
492
|
+
), /* @__PURE__ */ import_react6.default.createElement(
|
|
253
493
|
CodeSide,
|
|
254
494
|
{
|
|
255
495
|
style: {
|
|
@@ -265,15 +505,15 @@ function SidedCodeLayout({
|
|
|
265
505
|
}
|
|
266
506
|
|
|
267
507
|
// src/layouts/SideImageLayout.tsx
|
|
268
|
-
var
|
|
269
|
-
var
|
|
508
|
+
var import_react8 = __toESM(require("react"));
|
|
509
|
+
var import_styled_components7 = __toESM(require("styled-components"));
|
|
270
510
|
|
|
271
511
|
// src/components/Image.tsx
|
|
272
|
-
var
|
|
512
|
+
var import_react7 = __toESM(require("react"));
|
|
273
513
|
|
|
274
514
|
// src/layouts/styled.ts
|
|
275
|
-
var
|
|
276
|
-
var SVGObject =
|
|
515
|
+
var import_styled_components6 = __toESM(require("styled-components"));
|
|
516
|
+
var SVGObject = import_styled_components6.default.object`
|
|
277
517
|
padding: 3rem 2rem;
|
|
278
518
|
box-sizing: border-box;
|
|
279
519
|
background-color: white;
|
|
@@ -283,7 +523,7 @@ var SVGObject = import_styled_components4.default.object`
|
|
|
283
523
|
function Image(props) {
|
|
284
524
|
const { src, height } = props;
|
|
285
525
|
if (!(src == null ? void 0 : src.endsWith(".svg"))) {
|
|
286
|
-
return /* @__PURE__ */
|
|
526
|
+
return /* @__PURE__ */ import_react7.default.createElement(
|
|
287
527
|
"img",
|
|
288
528
|
{
|
|
289
529
|
src,
|
|
@@ -296,7 +536,7 @@ function Image(props) {
|
|
|
296
536
|
}
|
|
297
537
|
);
|
|
298
538
|
}
|
|
299
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ import_react7.default.createElement(
|
|
300
540
|
SVGObject,
|
|
301
541
|
{
|
|
302
542
|
type: "image/svg+xml",
|
|
@@ -312,7 +552,7 @@ function Image(props) {
|
|
|
312
552
|
Image.mdxType = "Image";
|
|
313
553
|
|
|
314
554
|
// src/layouts/SideImageLayout.tsx
|
|
315
|
-
var DivWithHeading2 =
|
|
555
|
+
var DivWithHeading2 = import_styled_components7.default.div`
|
|
316
556
|
h2 {
|
|
317
557
|
margin-top: 0;
|
|
318
558
|
}
|
|
@@ -333,7 +573,7 @@ var SidedImageLayout = ({
|
|
|
333
573
|
console.error("No image provided for SidedImageLayout");
|
|
334
574
|
return null;
|
|
335
575
|
}
|
|
336
|
-
return /* @__PURE__ */
|
|
576
|
+
return /* @__PURE__ */ import_react8.default.createElement(
|
|
337
577
|
DivWithHeading2,
|
|
338
578
|
{
|
|
339
579
|
style: {
|
|
@@ -346,7 +586,7 @@ var SidedImageLayout = ({
|
|
|
346
586
|
top: 0
|
|
347
587
|
}
|
|
348
588
|
},
|
|
349
|
-
/* @__PURE__ */
|
|
589
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
|
350
590
|
"div",
|
|
351
591
|
{
|
|
352
592
|
style: {
|
|
@@ -359,7 +599,7 @@ var SidedImageLayout = ({
|
|
|
359
599
|
},
|
|
360
600
|
rest
|
|
361
601
|
),
|
|
362
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ import_react8.default.createElement(
|
|
363
603
|
"div",
|
|
364
604
|
{
|
|
365
605
|
style: {
|
|
@@ -371,19 +611,19 @@ var SidedImageLayout = ({
|
|
|
371
611
|
backgroundColor: "white"
|
|
372
612
|
}
|
|
373
613
|
},
|
|
374
|
-
component || /* @__PURE__ */
|
|
614
|
+
component || /* @__PURE__ */ import_react8.default.createElement(Image, { src: image })
|
|
375
615
|
)
|
|
376
616
|
);
|
|
377
617
|
};
|
|
378
618
|
|
|
379
619
|
// src/layouts/SideLayout.tsx
|
|
380
|
-
var
|
|
620
|
+
var import_react9 = __toESM(require("react"));
|
|
381
621
|
function SideLayout({
|
|
382
622
|
children,
|
|
383
623
|
position = "right"
|
|
384
624
|
}) {
|
|
385
625
|
const [side, rest] = getMatchingMdxType(children, "Side");
|
|
386
|
-
return /* @__PURE__ */
|
|
626
|
+
return /* @__PURE__ */ import_react9.default.createElement(ColumnsLayout, { reverse: position === "left" }, /* @__PURE__ */ import_react9.default.createElement("div", { style: { marginLeft: Margins.horizontal } }, rest), /* @__PURE__ */ import_react9.default.createElement(
|
|
387
627
|
"div",
|
|
388
628
|
{
|
|
389
629
|
style: {
|
|
@@ -403,6 +643,8 @@ function SideLayout({
|
|
|
403
643
|
// src/layouts/index.tsx
|
|
404
644
|
var layouts_default = {
|
|
405
645
|
mainSection: MainSectionLayout,
|
|
646
|
+
centered: CenteredLayout,
|
|
647
|
+
default3: Default3Layout,
|
|
406
648
|
sidedCode: SidedCodeLayout,
|
|
407
649
|
sidedImage: SidedImageLayout,
|
|
408
650
|
side: SideLayout,
|
|
@@ -435,11 +677,11 @@ var theme_default = {
|
|
|
435
677
|
};
|
|
436
678
|
|
|
437
679
|
// src/template.tsx
|
|
438
|
-
var
|
|
680
|
+
var import_react10 = __toESM(require("react"));
|
|
439
681
|
var import_spectacle2 = require("spectacle");
|
|
440
682
|
var template = ({ slideNumber, numberOfSlides }) => {
|
|
441
683
|
const percentage = slideNumber / numberOfSlides * 100;
|
|
442
|
-
return /* @__PURE__ */
|
|
684
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { style: { position: "absolute", bottom: 0, left: 0, right: 0 } }, /* @__PURE__ */ import_react10.default.createElement(import_spectacle2.Box, { padding: "0 0 0.5em 0.7em" }, /* @__PURE__ */ import_react10.default.createElement(import_spectacle2.FullScreen, null)), /* @__PURE__ */ import_react10.default.createElement("div", { style: { width: "100%", height: "4px", background: "#ffffff11" } }, /* @__PURE__ */ import_react10.default.createElement(
|
|
443
685
|
"div",
|
|
444
686
|
{
|
|
445
687
|
style: {
|
|
@@ -453,26 +695,26 @@ var template = ({ slideNumber, numberOfSlides }) => {
|
|
|
453
695
|
};
|
|
454
696
|
|
|
455
697
|
// src/components/map.tsx
|
|
456
|
-
var
|
|
698
|
+
var import_react13 = __toESM(require("react"));
|
|
457
699
|
var import_spectacle5 = require("spectacle");
|
|
458
700
|
|
|
459
701
|
// src/components/styled.tsx
|
|
460
|
-
var
|
|
702
|
+
var import_react11 = __toESM(require("react"));
|
|
461
703
|
var import_spectacle3 = require("spectacle");
|
|
462
|
-
var
|
|
463
|
-
var StyledImage = (0,
|
|
704
|
+
var import_styled_components8 = __toESM(require("styled-components"));
|
|
705
|
+
var StyledImage = (0, import_styled_components8.default)(import_spectacle3.Image)`
|
|
464
706
|
object-fit: contain;
|
|
465
707
|
max-height: 30vh;
|
|
466
708
|
max-width: 70vw;
|
|
467
709
|
`;
|
|
468
|
-
var Image2 = (props) => /* @__PURE__ */
|
|
469
|
-
var CustomHeading = (0,
|
|
710
|
+
var Image2 = (props) => /* @__PURE__ */ import_react11.default.createElement(import_spectacle3.FlexBox, { margin: "0 0", padding: "0 0" }, /* @__PURE__ */ import_react11.default.createElement(StyledImage, { ...props }));
|
|
711
|
+
var CustomHeading = (0, import_styled_components8.default)(import_spectacle3.Heading)`
|
|
470
712
|
strong {
|
|
471
713
|
color: #f49676;
|
|
472
714
|
font-weight: 500;
|
|
473
715
|
}
|
|
474
716
|
`;
|
|
475
|
-
var CustomQuote =
|
|
717
|
+
var CustomQuote = import_styled_components8.default.blockquote`
|
|
476
718
|
margin: 1rem 0;
|
|
477
719
|
padding-left: 1.5rem;
|
|
478
720
|
padding-top: 0;
|
|
@@ -483,7 +725,7 @@ var CustomQuote = import_styled_components6.default.blockquote`
|
|
|
483
725
|
padding: 0 !important;
|
|
484
726
|
}
|
|
485
727
|
`;
|
|
486
|
-
var InlineCode =
|
|
728
|
+
var InlineCode = import_styled_components8.default.code`
|
|
487
729
|
filter: brightness(1.05);
|
|
488
730
|
zoom: 1.1;
|
|
489
731
|
&:before,
|
|
@@ -492,12 +734,12 @@ var InlineCode = import_styled_components6.default.code`
|
|
|
492
734
|
font-size: 0.8em;
|
|
493
735
|
}
|
|
494
736
|
`;
|
|
495
|
-
var HeadingTwo =
|
|
737
|
+
var HeadingTwo = import_styled_components8.default.h2`
|
|
496
738
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
497
739
|
font-size: 55px;
|
|
498
740
|
font-weight: 400;
|
|
499
741
|
`;
|
|
500
|
-
var HeadingThree =
|
|
742
|
+
var HeadingThree = import_styled_components8.default.h3`
|
|
501
743
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
502
744
|
font-size: 40px;
|
|
503
745
|
font-weight: 400;
|
|
@@ -510,12 +752,12 @@ var HeadingThree = import_styled_components6.default.h3`
|
|
|
510
752
|
`;
|
|
511
753
|
|
|
512
754
|
// src/components/CodeStepper/CodeStepper.tsx
|
|
513
|
-
var
|
|
755
|
+
var import_react12 = __toESM(require("react"));
|
|
514
756
|
var import_react_is = __toESM(require("react-is"));
|
|
515
757
|
var import_react_syntax_highlighter = require("react-syntax-highlighter");
|
|
516
758
|
var import_gruvbox_dark = __toESM(require("react-syntax-highlighter/dist/cjs/styles/prism/gruvbox-dark"));
|
|
517
759
|
var import_spectacle4 = require("spectacle");
|
|
518
|
-
var
|
|
760
|
+
var import_styled_components9 = __toESM(require("styled-components"));
|
|
519
761
|
|
|
520
762
|
// src/components/CodeStepper/code-directives.ts
|
|
521
763
|
function range(start, end) {
|
|
@@ -580,7 +822,7 @@ function parseStepDirectives(directives) {
|
|
|
580
822
|
// src/components/CodeStepper/CodeStepper.tsx
|
|
581
823
|
var import_meta = {};
|
|
582
824
|
var Highlighter = import_react_syntax_highlighter.Prism;
|
|
583
|
-
var CodeContainer =
|
|
825
|
+
var CodeContainer = import_styled_components9.default.div`
|
|
584
826
|
pre {
|
|
585
827
|
padding: 1rem 0rem !important;
|
|
586
828
|
background-color: transparent !important;
|
|
@@ -601,7 +843,7 @@ var CodeContainer = import_styled_components7.default.div`
|
|
|
601
843
|
}
|
|
602
844
|
`;
|
|
603
845
|
function useCodeSteps(code) {
|
|
604
|
-
return
|
|
846
|
+
return import_react12.default.useMemo(() => {
|
|
605
847
|
const prefixes = code.match(/(?:\/\/|<!--) @.*\n/g) || [];
|
|
606
848
|
const prefixesLength = prefixes.reduce(
|
|
607
849
|
(acc, prefix) => acc + prefix.length,
|
|
@@ -621,8 +863,8 @@ function useCodeSteps(code) {
|
|
|
621
863
|
}, [code]);
|
|
622
864
|
}
|
|
623
865
|
function getCodeDetails(children) {
|
|
624
|
-
const child =
|
|
625
|
-
if (!
|
|
866
|
+
const child = import_react12.default.Children.toArray(children)[0];
|
|
867
|
+
if (!import_react12.default.isValidElement(child)) {
|
|
626
868
|
return {
|
|
627
869
|
language: "",
|
|
628
870
|
code: import_react_is.default.isFragment(child) ? "" : String(child || "")
|
|
@@ -640,7 +882,7 @@ function CodeWrapper({
|
|
|
640
882
|
hasName,
|
|
641
883
|
children
|
|
642
884
|
}) {
|
|
643
|
-
return /* @__PURE__ */
|
|
885
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
644
886
|
"div",
|
|
645
887
|
{
|
|
646
888
|
style: {
|
|
@@ -650,7 +892,7 @@ function CodeWrapper({
|
|
|
650
892
|
borderRadius: "4px"
|
|
651
893
|
}
|
|
652
894
|
},
|
|
653
|
-
name && /* @__PURE__ */
|
|
895
|
+
name && /* @__PURE__ */ import_react12.default.createElement(
|
|
654
896
|
"span",
|
|
655
897
|
{
|
|
656
898
|
style: {
|
|
@@ -667,7 +909,7 @@ function CodeWrapper({
|
|
|
667
909
|
name
|
|
668
910
|
),
|
|
669
911
|
children,
|
|
670
|
-
hasName && /* @__PURE__ */
|
|
912
|
+
hasName && /* @__PURE__ */ import_react12.default.createElement(
|
|
671
913
|
"span",
|
|
672
914
|
{
|
|
673
915
|
style: {
|
|
@@ -682,7 +924,7 @@ function CodeWrapper({
|
|
|
682
924
|
fontStyle: "italic"
|
|
683
925
|
}
|
|
684
926
|
},
|
|
685
|
-
stepName || /* @__PURE__ */
|
|
927
|
+
stepName || /* @__PURE__ */ import_react12.default.createElement("span", { style: { visibility: "hidden" } }, "Step")
|
|
686
928
|
)
|
|
687
929
|
);
|
|
688
930
|
}
|
|
@@ -691,7 +933,7 @@ function CodeStepper({
|
|
|
691
933
|
name,
|
|
692
934
|
...props
|
|
693
935
|
}) {
|
|
694
|
-
const { language, code } =
|
|
936
|
+
const { language, code } = import_react12.default.useMemo(() => {
|
|
695
937
|
return getCodeDetails(props.children);
|
|
696
938
|
}, [props.children]);
|
|
697
939
|
const {
|
|
@@ -701,21 +943,21 @@ function CodeStepper({
|
|
|
701
943
|
hasSteps,
|
|
702
944
|
hasName
|
|
703
945
|
} = useCodeSteps(code);
|
|
704
|
-
return /* @__PURE__ */
|
|
946
|
+
return /* @__PURE__ */ import_react12.default.createElement(CodeContainer, null, import_meta.env.DEV && Boolean(prefixes == null ? void 0 : prefixes.length) && /* @__PURE__ */ import_react12.default.createElement("div", { style: { position: "absolute", top: 0, opacity: 0.5, left: 0 } }, /* @__PURE__ */ import_react12.default.createElement(Highlighter, { language, style: import_gruvbox_dark.default }, prefixes.join(""))), /* @__PURE__ */ import_react12.default.createElement(
|
|
705
947
|
import_spectacle4.Stepper,
|
|
706
948
|
{
|
|
707
949
|
values: steps,
|
|
708
950
|
alwaysVisible: !hasSteps,
|
|
709
951
|
priority: priority ? priority + 1 : void 0
|
|
710
952
|
},
|
|
711
|
-
(step, _, isActive) => /* @__PURE__ */
|
|
953
|
+
(step, _, isActive) => /* @__PURE__ */ import_react12.default.createElement(
|
|
712
954
|
CodeWrapper,
|
|
713
955
|
{
|
|
714
956
|
name,
|
|
715
957
|
stepName: step == null ? void 0 : step.name,
|
|
716
958
|
hasName
|
|
717
959
|
},
|
|
718
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
719
961
|
Highlighter,
|
|
720
962
|
{
|
|
721
963
|
language,
|
|
@@ -765,7 +1007,7 @@ CodeStepper.mdxType = "CodeStepper";
|
|
|
765
1007
|
// src/components/map.tsx
|
|
766
1008
|
var componentsMap = {
|
|
767
1009
|
...import_spectacle5.mdxComponentMap,
|
|
768
|
-
inlineCode: (props) => /* @__PURE__ */
|
|
1010
|
+
inlineCode: (props) => /* @__PURE__ */ import_react13.default.createElement(
|
|
769
1011
|
InlineCode,
|
|
770
1012
|
{
|
|
771
1013
|
...props,
|
|
@@ -775,7 +1017,7 @@ var componentsMap = {
|
|
|
775
1017
|
}
|
|
776
1018
|
}
|
|
777
1019
|
),
|
|
778
|
-
table: (props) => /* @__PURE__ */
|
|
1020
|
+
table: (props) => /* @__PURE__ */ import_react13.default.createElement(
|
|
779
1021
|
"table",
|
|
780
1022
|
{
|
|
781
1023
|
...props,
|
|
@@ -786,7 +1028,7 @@ var componentsMap = {
|
|
|
786
1028
|
}
|
|
787
1029
|
}
|
|
788
1030
|
),
|
|
789
|
-
tr: (props) => /* @__PURE__ */
|
|
1031
|
+
tr: (props) => /* @__PURE__ */ import_react13.default.createElement(
|
|
790
1032
|
"tr",
|
|
791
1033
|
{
|
|
792
1034
|
...props,
|
|
@@ -798,7 +1040,7 @@ var componentsMap = {
|
|
|
798
1040
|
}
|
|
799
1041
|
}
|
|
800
1042
|
),
|
|
801
|
-
td: (props) => /* @__PURE__ */
|
|
1043
|
+
td: (props) => /* @__PURE__ */ import_react13.default.createElement(
|
|
802
1044
|
"td",
|
|
803
1045
|
{
|
|
804
1046
|
...props,
|
|
@@ -811,7 +1053,7 @@ var componentsMap = {
|
|
|
811
1053
|
}
|
|
812
1054
|
}
|
|
813
1055
|
),
|
|
814
|
-
h1: (props) => /* @__PURE__ */
|
|
1056
|
+
h1: (props) => /* @__PURE__ */ import_react13.default.createElement(
|
|
815
1057
|
CustomHeading,
|
|
816
1058
|
{
|
|
817
1059
|
fontSize: "h1",
|
|
@@ -826,15 +1068,15 @@ var componentsMap = {
|
|
|
826
1068
|
},
|
|
827
1069
|
props.children
|
|
828
1070
|
),
|
|
829
|
-
h2: (props) => /* @__PURE__ */
|
|
830
|
-
h3: (props) => /* @__PURE__ */
|
|
831
|
-
img: (props) => /* @__PURE__ */
|
|
1071
|
+
h2: (props) => /* @__PURE__ */ import_react13.default.createElement(HeadingTwo, null, props.children),
|
|
1072
|
+
h3: (props) => /* @__PURE__ */ import_react13.default.createElement(HeadingThree, { ...props }),
|
|
1073
|
+
img: (props) => /* @__PURE__ */ import_react13.default.createElement(Image2, { ...props }),
|
|
832
1074
|
pre: CodeStepper,
|
|
833
|
-
li: (props) => /* @__PURE__ */
|
|
834
|
-
Side: (props) => /* @__PURE__ */
|
|
1075
|
+
li: (props) => /* @__PURE__ */ import_react13.default.createElement("li", { ...props, style: { margin: "24px 0" } }),
|
|
1076
|
+
Side: (props) => /* @__PURE__ */ import_react13.default.createElement("div", { ...props }),
|
|
835
1077
|
p: (props) => {
|
|
836
1078
|
const Text = import_spectacle5.mdxComponentMap.p;
|
|
837
|
-
return /* @__PURE__ */
|
|
1079
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
838
1080
|
Text,
|
|
839
1081
|
{
|
|
840
1082
|
style: { margin: "8px 0", padding: "8px 0", lineHeight: "2rem" },
|
|
@@ -842,10 +1084,10 @@ var componentsMap = {
|
|
|
842
1084
|
}
|
|
843
1085
|
);
|
|
844
1086
|
},
|
|
845
|
-
blockquote: (props) => /* @__PURE__ */
|
|
1087
|
+
blockquote: (props) => /* @__PURE__ */ import_react13.default.createElement(CustomQuote, { ...props }),
|
|
846
1088
|
a: ({ children, ...props }) => {
|
|
847
1089
|
const domain = new URL(props.href || "").hostname;
|
|
848
|
-
return /* @__PURE__ */
|
|
1090
|
+
return /* @__PURE__ */ import_react13.default.createElement("a", { ...props, style: { color: "#f49676", textDecoration: "none" } }, children, " ", /* @__PURE__ */ import_react13.default.createElement(
|
|
849
1091
|
"small",
|
|
850
1092
|
{
|
|
851
1093
|
style: {
|
|
@@ -861,14 +1103,14 @@ var componentsMap = {
|
|
|
861
1103
|
var map_default = componentsMap;
|
|
862
1104
|
|
|
863
1105
|
// src/components/FilePane.tsx
|
|
864
|
-
var
|
|
1106
|
+
var import_react14 = __toESM(require("react"));
|
|
865
1107
|
function FilePane({
|
|
866
1108
|
name,
|
|
867
1109
|
children,
|
|
868
1110
|
priority,
|
|
869
1111
|
...divProps
|
|
870
1112
|
}) {
|
|
871
|
-
return
|
|
1113
|
+
return import_react14.default.isValidElement(children) ? import_react14.default.cloneElement(children, {
|
|
872
1114
|
// @ts-expect-error cloning
|
|
873
1115
|
priority,
|
|
874
1116
|
name
|
|
@@ -877,14 +1119,14 @@ function FilePane({
|
|
|
877
1119
|
FilePane.mdxType = "FilePane";
|
|
878
1120
|
|
|
879
1121
|
// src/components/ItemsColumn.tsx
|
|
880
|
-
var
|
|
1122
|
+
var import_react15 = __toESM(require("react"));
|
|
881
1123
|
var import_spectacle6 = require("spectacle");
|
|
882
|
-
var
|
|
1124
|
+
var import_styled_components10 = __toESM(require("styled-components"));
|
|
883
1125
|
var import_react_spring = require("react-spring");
|
|
884
1126
|
function ItemsColumn(divProps) {
|
|
885
1127
|
const { style, children, ...props } = divProps;
|
|
886
|
-
const childrenArray =
|
|
887
|
-
return /* @__PURE__ */
|
|
1128
|
+
const childrenArray = import_react15.default.Children.toArray(children);
|
|
1129
|
+
return /* @__PURE__ */ import_react15.default.createElement(import_spectacle6.Stepper, { values: childrenArray }, (value, step) => /* @__PURE__ */ import_react15.default.createElement(
|
|
888
1130
|
"div",
|
|
889
1131
|
{
|
|
890
1132
|
style: {
|
|
@@ -898,14 +1140,14 @@ function ItemsColumn(divProps) {
|
|
|
898
1140
|
},
|
|
899
1141
|
childrenArray.map((child, index) => {
|
|
900
1142
|
const isVisible = index <= step;
|
|
901
|
-
if (!
|
|
1143
|
+
if (!import_react15.default.isValidElement(child)) {
|
|
902
1144
|
return child;
|
|
903
1145
|
}
|
|
904
|
-
return /* @__PURE__ */
|
|
1146
|
+
return /* @__PURE__ */ import_react15.default.createElement(ItemColumnWrapper, { key: index, isVisible }, child);
|
|
905
1147
|
})
|
|
906
1148
|
));
|
|
907
1149
|
}
|
|
908
|
-
var ItemColumnWrapperStyled = (0,
|
|
1150
|
+
var ItemColumnWrapperStyled = (0, import_styled_components10.default)(import_react_spring.animated.div)`
|
|
909
1151
|
* {
|
|
910
1152
|
text-align: center !important;
|
|
911
1153
|
}
|
|
@@ -916,15 +1158,15 @@ function ItemColumnWrapper({
|
|
|
916
1158
|
...props
|
|
917
1159
|
}) {
|
|
918
1160
|
const styles = (0, import_react_spring.useSpring)({ opacity: isVisible ? 1 : 0 });
|
|
919
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ import_react15.default.createElement(ItemColumnWrapperStyled, { style: styles, ...props }, children);
|
|
920
1162
|
}
|
|
921
1163
|
|
|
922
1164
|
// src/components/HorizontalList.tsx
|
|
923
|
-
var
|
|
1165
|
+
var import_react16 = __toESM(require("react"));
|
|
924
1166
|
var import_react_spring2 = require("react-spring");
|
|
925
1167
|
var import_spectacle7 = require("spectacle");
|
|
926
|
-
var
|
|
927
|
-
var Container =
|
|
1168
|
+
var import_styled_components11 = __toESM(require("styled-components"));
|
|
1169
|
+
var Container = import_styled_components11.default.div`
|
|
928
1170
|
display: grid;
|
|
929
1171
|
grid-gap: 2rem;
|
|
930
1172
|
`;
|
|
@@ -932,8 +1174,8 @@ function HorizontalList({
|
|
|
932
1174
|
children,
|
|
933
1175
|
columns = 3
|
|
934
1176
|
}) {
|
|
935
|
-
const items =
|
|
936
|
-
return /* @__PURE__ */
|
|
1177
|
+
const items = import_react16.default.Children.toArray(children);
|
|
1178
|
+
return /* @__PURE__ */ import_react16.default.createElement(import_spectacle7.Stepper, { values: items }, (_, step) => /* @__PURE__ */ import_react16.default.createElement(
|
|
937
1179
|
Container,
|
|
938
1180
|
{
|
|
939
1181
|
style: {
|
|
@@ -941,10 +1183,10 @@ function HorizontalList({
|
|
|
941
1183
|
}
|
|
942
1184
|
},
|
|
943
1185
|
items.map((item, k) => {
|
|
944
|
-
if (!
|
|
1186
|
+
if (!import_react16.default.isValidElement(item)) {
|
|
945
1187
|
return item;
|
|
946
1188
|
}
|
|
947
|
-
return
|
|
1189
|
+
return import_react16.default.cloneElement(item, {
|
|
948
1190
|
// @ts-expect-error cloning
|
|
949
1191
|
position: k + 1,
|
|
950
1192
|
isVisible: k <= step,
|
|
@@ -954,12 +1196,12 @@ function HorizontalList({
|
|
|
954
1196
|
));
|
|
955
1197
|
}
|
|
956
1198
|
function Pill({ position }) {
|
|
957
|
-
return /* @__PURE__ */
|
|
1199
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
958
1200
|
"div",
|
|
959
1201
|
{
|
|
960
1202
|
style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 }
|
|
961
1203
|
},
|
|
962
|
-
/* @__PURE__ */
|
|
1204
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
963
1205
|
"svg",
|
|
964
1206
|
{
|
|
965
1207
|
width: "48",
|
|
@@ -968,14 +1210,14 @@ function Pill({ position }) {
|
|
|
968
1210
|
fill: "none",
|
|
969
1211
|
xmlns: "http://www.w3.org/2000/svg"
|
|
970
1212
|
},
|
|
971
|
-
/* @__PURE__ */
|
|
1213
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
972
1214
|
"path",
|
|
973
1215
|
{
|
|
974
1216
|
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",
|
|
975
1217
|
fill: "#ffffff"
|
|
976
1218
|
}
|
|
977
1219
|
),
|
|
978
|
-
/* @__PURE__ */
|
|
1220
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
979
1221
|
"text",
|
|
980
1222
|
{
|
|
981
1223
|
x: "9",
|
|
@@ -987,7 +1229,7 @@ function Pill({ position }) {
|
|
|
987
1229
|
},
|
|
988
1230
|
position
|
|
989
1231
|
),
|
|
990
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
991
1233
|
"path",
|
|
992
1234
|
{
|
|
993
1235
|
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",
|
|
@@ -997,12 +1239,12 @@ function Pill({ position }) {
|
|
|
997
1239
|
)
|
|
998
1240
|
);
|
|
999
1241
|
}
|
|
1000
|
-
var Item = (0,
|
|
1242
|
+
var Item = (0, import_styled_components11.default)(import_react_spring2.animated.div)`
|
|
1001
1243
|
display: flex;
|
|
1002
1244
|
flex-direction: column;
|
|
1003
1245
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1004
1246
|
`;
|
|
1005
|
-
var ItemHead =
|
|
1247
|
+
var ItemHead = import_styled_components11.default.div`
|
|
1006
1248
|
display: flex;
|
|
1007
1249
|
flex-direction: row;
|
|
1008
1250
|
font-size: 1.3rem;
|
|
@@ -1012,7 +1254,7 @@ var ItemHead = import_styled_components9.default.div`
|
|
|
1012
1254
|
margin: 0;
|
|
1013
1255
|
}
|
|
1014
1256
|
`;
|
|
1015
|
-
var ItemContent =
|
|
1257
|
+
var ItemContent = import_styled_components11.default.div`
|
|
1016
1258
|
> * {
|
|
1017
1259
|
font-size: 1rem;
|
|
1018
1260
|
padding: 4px !important;
|
|
@@ -1040,11 +1282,11 @@ function HorizontalListItem({
|
|
|
1040
1282
|
const opacityStyles = (0, import_react_spring2.useSpring)({
|
|
1041
1283
|
opacity: getItemOpacity({ isVisible, isLast })
|
|
1042
1284
|
});
|
|
1043
|
-
return /* @__PURE__ */
|
|
1285
|
+
return /* @__PURE__ */ import_react16.default.createElement(Item, { style: opacityStyles }, /* @__PURE__ */ import_react16.default.createElement(ItemHead, null, /* @__PURE__ */ import_react16.default.createElement(Pill, { position }), /* @__PURE__ */ import_react16.default.createElement("p", null, title)), /* @__PURE__ */ import_react16.default.createElement(ItemContent, null, children));
|
|
1044
1286
|
}
|
|
1045
1287
|
|
|
1046
1288
|
// src/components/Timeline.tsx
|
|
1047
|
-
var
|
|
1289
|
+
var import_react17 = __toESM(require("react"));
|
|
1048
1290
|
var import_react_spring3 = require("react-spring");
|
|
1049
1291
|
var import_classnames = __toESM(require("classnames"));
|
|
1050
1292
|
var import_spectacle8 = require("spectacle");
|
|
@@ -1054,13 +1296,13 @@ var Timeline_module_default = {};
|
|
|
1054
1296
|
|
|
1055
1297
|
// src/components/Timeline.tsx
|
|
1056
1298
|
function Timeline(props) {
|
|
1057
|
-
const children =
|
|
1058
|
-
return /* @__PURE__ */
|
|
1299
|
+
const children = import_react17.default.Children.toArray(props.children);
|
|
1300
|
+
return /* @__PURE__ */ import_react17.default.createElement(import_spectacle8.Stepper, { ...props, values: children, className: Timeline_module_default["timeline"] }, (value, step) => {
|
|
1059
1301
|
return children.map((child, index) => {
|
|
1060
|
-
if (!
|
|
1302
|
+
if (!import_react17.default.isValidElement(child)) {
|
|
1061
1303
|
return child;
|
|
1062
1304
|
}
|
|
1063
|
-
return
|
|
1305
|
+
return import_react17.default.cloneElement(child, {
|
|
1064
1306
|
// @ts-expect-error cloning
|
|
1065
1307
|
isPhantom: step < index,
|
|
1066
1308
|
isLast: step === index
|
|
@@ -1087,7 +1329,7 @@ function TimelineItem(props) {
|
|
|
1087
1329
|
opacity: getItemOpacity2({ isPhantom, isLast })
|
|
1088
1330
|
});
|
|
1089
1331
|
const colorStyles = (0, import_react_spring3.useSpring)({ opacity: isPhantom || isLast ? 1 : 0.15 });
|
|
1090
|
-
return /* @__PURE__ */
|
|
1332
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1091
1333
|
import_react_spring3.animated.div,
|
|
1092
1334
|
{
|
|
1093
1335
|
...rest,
|
|
@@ -1096,7 +1338,7 @@ function TimelineItem(props) {
|
|
|
1096
1338
|
...appearStyles
|
|
1097
1339
|
}
|
|
1098
1340
|
},
|
|
1099
|
-
/* @__PURE__ */
|
|
1341
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
1100
1342
|
"div",
|
|
1101
1343
|
{
|
|
1102
1344
|
className: (0, import_classnames.default)(
|
|
@@ -1104,21 +1346,21 @@ function TimelineItem(props) {
|
|
|
1104
1346
|
Timeline_module_default["timelineItemContentPhantom"]
|
|
1105
1347
|
)
|
|
1106
1348
|
},
|
|
1107
|
-
/* @__PURE__ */
|
|
1108
|
-
/* @__PURE__ */
|
|
1349
|
+
/* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title),
|
|
1350
|
+
/* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children)
|
|
1109
1351
|
),
|
|
1110
|
-
/* @__PURE__ */
|
|
1352
|
+
/* @__PURE__ */ import_react17.default.createElement(import_react_spring3.animated.div, { className: Timeline_module_default["timelineItemGuide"], style: colorStyles }, /* @__PURE__ */ import_react17.default.createElement(Hexagon, null), /* @__PURE__ */ import_react17.default.createElement(
|
|
1111
1353
|
import_react_spring3.animated.div,
|
|
1112
1354
|
{
|
|
1113
1355
|
className: Timeline_module_default["timelineItemGuideLine"],
|
|
1114
1356
|
style: guideLineProps
|
|
1115
1357
|
}
|
|
1116
1358
|
)),
|
|
1117
|
-
/* @__PURE__ */
|
|
1359
|
+
/* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemContent"] }, /* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemTitle"] }, title), /* @__PURE__ */ import_react17.default.createElement("div", { className: Timeline_module_default["timelineItemBody"] }, children))
|
|
1118
1360
|
);
|
|
1119
1361
|
}
|
|
1120
1362
|
function Hexagon() {
|
|
1121
|
-
return /* @__PURE__ */
|
|
1363
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1122
1364
|
"svg",
|
|
1123
1365
|
{
|
|
1124
1366
|
width: "18",
|
|
@@ -1127,14 +1369,14 @@ function Hexagon() {
|
|
|
1127
1369
|
fill: "none",
|
|
1128
1370
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1129
1371
|
},
|
|
1130
|
-
/* @__PURE__ */
|
|
1372
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
1131
1373
|
"path",
|
|
1132
1374
|
{
|
|
1133
1375
|
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",
|
|
1134
1376
|
fill: "#F49676"
|
|
1135
1377
|
}
|
|
1136
1378
|
),
|
|
1137
|
-
/* @__PURE__ */
|
|
1379
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
1138
1380
|
"path",
|
|
1139
1381
|
{
|
|
1140
1382
|
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",
|
|
@@ -1145,9 +1387,9 @@ function Hexagon() {
|
|
|
1145
1387
|
}
|
|
1146
1388
|
|
|
1147
1389
|
// src/components/IconBox.tsx
|
|
1148
|
-
var
|
|
1149
|
-
var
|
|
1150
|
-
var IconBoxContent =
|
|
1390
|
+
var import_react18 = __toESM(require("react"));
|
|
1391
|
+
var import_styled_components12 = __toESM(require("styled-components"));
|
|
1392
|
+
var IconBoxContent = import_styled_components12.default.div`
|
|
1151
1393
|
* {
|
|
1152
1394
|
margin: 0.2rem !important;
|
|
1153
1395
|
padding: 0 !important;
|
|
@@ -1157,7 +1399,7 @@ function IconBox({
|
|
|
1157
1399
|
children,
|
|
1158
1400
|
icon
|
|
1159
1401
|
}) {
|
|
1160
|
-
return /* @__PURE__ */
|
|
1402
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
1161
1403
|
"div",
|
|
1162
1404
|
{
|
|
1163
1405
|
style: {
|
|
@@ -1167,14 +1409,14 @@ function IconBox({
|
|
|
1167
1409
|
padding: "1rem 0"
|
|
1168
1410
|
}
|
|
1169
1411
|
},
|
|
1170
|
-
/* @__PURE__ */
|
|
1171
|
-
/* @__PURE__ */
|
|
1412
|
+
/* @__PURE__ */ import_react18.default.createElement("div", { style: { fontSize: 60 } }, icon),
|
|
1413
|
+
/* @__PURE__ */ import_react18.default.createElement(IconBoxContent, null, children)
|
|
1172
1414
|
);
|
|
1173
1415
|
}
|
|
1174
1416
|
|
|
1175
1417
|
// src/index.tsx
|
|
1176
1418
|
function PassThrough({ children }) {
|
|
1177
|
-
return /* @__PURE__ */
|
|
1419
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, children);
|
|
1178
1420
|
}
|
|
1179
1421
|
function Layout({
|
|
1180
1422
|
children,
|
|
@@ -1186,37 +1428,37 @@ function Layout({
|
|
|
1186
1428
|
console.warn(`Layout ${layout} not found`);
|
|
1187
1429
|
}
|
|
1188
1430
|
if (Layout2) {
|
|
1189
|
-
return /* @__PURE__ */
|
|
1431
|
+
return /* @__PURE__ */ import_react19.default.createElement(Layout2, { ...frontmatter }, children);
|
|
1190
1432
|
}
|
|
1191
|
-
return /* @__PURE__ */
|
|
1433
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.Fragment, null, children);
|
|
1192
1434
|
}
|
|
1193
1435
|
var componentsMap2 = {
|
|
1194
1436
|
...map_default,
|
|
1195
1437
|
wrapper: Layout
|
|
1196
1438
|
};
|
|
1197
1439
|
function Deck({ deck }) {
|
|
1198
|
-
|
|
1440
|
+
import_react19.default.useEffect(() => {
|
|
1199
1441
|
document.title = deck.metadata.title || "Untitled";
|
|
1200
1442
|
}, [deck.metadata.title]);
|
|
1201
|
-
return /* @__PURE__ */
|
|
1443
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_react19.default.StrictMode, null, /* @__PURE__ */ import_react19.default.createElement(import_react20.MDXProvider, { components: componentsMap2 }, /* @__PURE__ */ import_react19.default.createElement(import_spectacle9.Deck, { theme: theme_default, template }, deck.slides.map((slide, i) => {
|
|
1202
1444
|
const Component = slide.slideComponent;
|
|
1203
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ import_react19.default.createElement(import_spectacle9.Slide, { key: i }, /* @__PURE__ */ import_react19.default.createElement(Component, null));
|
|
1204
1446
|
}))));
|
|
1205
1447
|
}
|
|
1206
1448
|
function Danger({ children }) {
|
|
1207
|
-
return /* @__PURE__ */
|
|
1449
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { style: { color: "red" } }, children);
|
|
1208
1450
|
}
|
|
1209
1451
|
function Doc({ children }) {
|
|
1210
|
-
return /* @__PURE__ */
|
|
1452
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { style: { color: "blue" } }, children);
|
|
1211
1453
|
}
|
|
1212
1454
|
function Information({ children }) {
|
|
1213
|
-
return /* @__PURE__ */
|
|
1455
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { style: { color: "orange" } }, children);
|
|
1214
1456
|
}
|
|
1215
1457
|
function Success({ children }) {
|
|
1216
|
-
return /* @__PURE__ */
|
|
1458
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { style: { color: "green" } }, children);
|
|
1217
1459
|
}
|
|
1218
1460
|
function Side({ children }) {
|
|
1219
|
-
return /* @__PURE__ */
|
|
1461
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", null, children);
|
|
1220
1462
|
}
|
|
1221
1463
|
Side.mdxType = "Side";
|
|
1222
1464
|
|