@gpichot/spectacle-deck 1.1.4 → 1.1.5
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/index.cjs +187 -211
- package/index.d.ts +1 -0
- package/index.mjs +185 -210
- package/layouts/QuoteLayout.d.ts +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.tsx
|
|
2
|
-
import
|
|
2
|
+
import React21 from "react";
|
|
3
3
|
import { MDXProvider } from "@mdx-js/react";
|
|
4
4
|
import { Deck as SpectacleDeck, Slide } from "spectacle";
|
|
5
5
|
|
|
@@ -16,6 +16,7 @@ var Margins = {
|
|
|
16
16
|
};
|
|
17
17
|
function getHeading(children) {
|
|
18
18
|
const allChild = React.Children.toArray(children);
|
|
19
|
+
console.log(allChild);
|
|
19
20
|
if (allChild.length === 0)
|
|
20
21
|
return [null, allChild];
|
|
21
22
|
const [candidate, ...rest] = allChild;
|
|
@@ -48,6 +49,8 @@ function getMatchingMdxType(children, mdxType) {
|
|
|
48
49
|
return false;
|
|
49
50
|
if (typeof child.type !== "function")
|
|
50
51
|
return false;
|
|
52
|
+
if (child.type.name === mdxType)
|
|
53
|
+
return true;
|
|
51
54
|
if ("mdxType" in child.type === false)
|
|
52
55
|
return false;
|
|
53
56
|
return child.type.mdxType === mdxType;
|
|
@@ -74,6 +77,7 @@ var CenteredLayoutContent = styled.div`
|
|
|
74
77
|
}
|
|
75
78
|
`;
|
|
76
79
|
var CenteredLayout = (props) => {
|
|
80
|
+
console.log(props);
|
|
77
81
|
const [heading, rest] = getHeading(props.children);
|
|
78
82
|
return /* @__PURE__ */ React2.createElement(
|
|
79
83
|
"div",
|
|
@@ -353,70 +357,24 @@ var MainSectionLayout = ({
|
|
|
353
357
|
};
|
|
354
358
|
|
|
355
359
|
// src/layouts/QuoteLayout.tsx
|
|
356
|
-
import React6 from "react";
|
|
357
|
-
import styled4 from "styled-components";
|
|
358
|
-
|
|
359
|
-
// src/layouts/BaseLayout.tsx
|
|
360
360
|
import React5 from "react";
|
|
361
361
|
import styled3 from "styled-components";
|
|
362
|
-
var DefaultLayoutHeading = styled3.div`
|
|
363
|
-
background-color: #ffffff11;
|
|
364
|
-
padding: 2rem 5rem;
|
|
365
|
-
margin-bottom: 1rem;
|
|
366
|
-
|
|
367
|
-
h2 {
|
|
368
|
-
margin: 0;
|
|
369
|
-
}
|
|
370
|
-
`;
|
|
371
|
-
var BaseLayout = ({
|
|
372
|
-
children,
|
|
373
|
-
title,
|
|
374
|
-
...otherProps
|
|
375
|
-
}) => {
|
|
376
|
-
return /* @__PURE__ */ React5.createElement(
|
|
377
|
-
"div",
|
|
378
|
-
{
|
|
379
|
-
...otherProps,
|
|
380
|
-
style: {
|
|
381
|
-
position: "absolute",
|
|
382
|
-
top: 0,
|
|
383
|
-
right: 0,
|
|
384
|
-
bottom: 0,
|
|
385
|
-
left: 0,
|
|
386
|
-
display: "flex",
|
|
387
|
-
flexDirection: "column",
|
|
388
|
-
marginBottom: "5rem"
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
title && /* @__PURE__ */ React5.createElement(DefaultLayoutHeading, null, title),
|
|
392
|
-
/* @__PURE__ */ React5.createElement(
|
|
393
|
-
"div",
|
|
394
|
-
{
|
|
395
|
-
style: {
|
|
396
|
-
display: "flex",
|
|
397
|
-
flexDirection: "column",
|
|
398
|
-
justifyContent: "center",
|
|
399
|
-
height: "100%",
|
|
400
|
-
padding: "0 4rem",
|
|
401
|
-
flex: 1
|
|
402
|
-
}
|
|
403
|
-
},
|
|
404
|
-
children
|
|
405
|
-
)
|
|
406
|
-
);
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
// src/layouts/QuoteLayout.tsx
|
|
410
362
|
function invariant(condition, message) {
|
|
411
363
|
if (!condition) {
|
|
412
364
|
throw new Error(message);
|
|
413
365
|
}
|
|
414
366
|
}
|
|
415
|
-
var QuoteBaseLayout =
|
|
367
|
+
var QuoteBaseLayout = styled3.div`
|
|
368
|
+
position: absolute;
|
|
369
|
+
inset: 0;
|
|
370
|
+
display: flex;
|
|
371
|
+
flex-flow: column nowrap;
|
|
372
|
+
justify-content: center;
|
|
416
373
|
.blockquote > * {
|
|
417
374
|
border-left: 0;
|
|
418
375
|
}
|
|
419
376
|
.blockquote {
|
|
377
|
+
text-align: justify;
|
|
420
378
|
position: relative;
|
|
421
379
|
}
|
|
422
380
|
.blockquote > :first-child {
|
|
@@ -424,9 +382,10 @@ var QuoteBaseLayout = styled4(BaseLayout)`
|
|
|
424
382
|
content: "“";
|
|
425
383
|
position: absolute;
|
|
426
384
|
font-size: 16rem;
|
|
427
|
-
left: -
|
|
385
|
+
left: -5rem;
|
|
428
386
|
font-family: serif;
|
|
429
|
-
top:
|
|
387
|
+
top: 50%;
|
|
388
|
+
transform: translateY(-50%);
|
|
430
389
|
color: #ffffff22;
|
|
431
390
|
}
|
|
432
391
|
&:after {
|
|
@@ -460,12 +419,11 @@ var QuoteBaseLayout = styled4(BaseLayout)`
|
|
|
460
419
|
function QuoteLayout({
|
|
461
420
|
children,
|
|
462
421
|
author,
|
|
463
|
-
|
|
422
|
+
sourceUrl
|
|
464
423
|
}) {
|
|
465
|
-
console.log(children);
|
|
466
424
|
const [blockquote, rest] = getMatchingMdxType(children, "blockquote");
|
|
467
425
|
invariant(rest, "QuoteLayout can only have one blockquote");
|
|
468
|
-
return /* @__PURE__ */
|
|
426
|
+
return /* @__PURE__ */ React5.createElement(QuoteBaseLayout, null, /* @__PURE__ */ React5.createElement(
|
|
469
427
|
"div",
|
|
470
428
|
{
|
|
471
429
|
style: {
|
|
@@ -474,28 +432,28 @@ function QuoteLayout({
|
|
|
474
432
|
alignItems: "flex-start",
|
|
475
433
|
justifyContent: "center",
|
|
476
434
|
textAlign: "center",
|
|
477
|
-
margin: "0
|
|
435
|
+
margin: "0 4rem 0 12rem"
|
|
478
436
|
}
|
|
479
437
|
},
|
|
480
|
-
/* @__PURE__ */
|
|
438
|
+
/* @__PURE__ */ React5.createElement(
|
|
481
439
|
"div",
|
|
482
440
|
{
|
|
483
441
|
style: {
|
|
484
442
|
flex: 1,
|
|
485
|
-
padding: "0
|
|
443
|
+
padding: "0 12rem 0 2rem",
|
|
486
444
|
boxSizing: "border-box"
|
|
487
445
|
},
|
|
488
446
|
className: "blockquote"
|
|
489
447
|
},
|
|
490
448
|
blockquote
|
|
491
449
|
),
|
|
492
|
-
/* @__PURE__ */
|
|
450
|
+
/* @__PURE__ */ React5.createElement("div", { className: "source", style: { flex: 1, padding: "0 4rem" } }, /* @__PURE__ */ React5.createElement("a", { href: sourceUrl, target: "_blank", rel: "noopener noreferrer" }, author))
|
|
493
451
|
));
|
|
494
452
|
}
|
|
495
453
|
|
|
496
454
|
// src/layouts/SectionLayout.tsx
|
|
497
|
-
import
|
|
498
|
-
var SectionLayout =
|
|
455
|
+
import styled4 from "styled-components";
|
|
456
|
+
var SectionLayout = styled4.div`
|
|
499
457
|
display: flex;
|
|
500
458
|
flex-direction: row;
|
|
501
459
|
align-items: center;
|
|
@@ -509,12 +467,12 @@ var SectionLayout = styled5.div`
|
|
|
509
467
|
`;
|
|
510
468
|
|
|
511
469
|
// src/layouts/SideCodeLayout.tsx
|
|
512
|
-
import
|
|
470
|
+
import React7 from "react";
|
|
513
471
|
|
|
514
472
|
// src/layouts/columns.tsx
|
|
515
|
-
import
|
|
516
|
-
import
|
|
517
|
-
var DivWithHeading =
|
|
473
|
+
import React6 from "react";
|
|
474
|
+
import styled5 from "styled-components";
|
|
475
|
+
var DivWithHeading = styled5.div`
|
|
518
476
|
h2 {
|
|
519
477
|
margin-top: 0;
|
|
520
478
|
}
|
|
@@ -523,7 +481,7 @@ var DivWithHeading = styled6.div`
|
|
|
523
481
|
font-weight: 400;
|
|
524
482
|
}
|
|
525
483
|
`;
|
|
526
|
-
var ColumnsContainer =
|
|
484
|
+
var ColumnsContainer = styled5(DivWithHeading)`
|
|
527
485
|
display: flex;
|
|
528
486
|
flex-direction: row;
|
|
529
487
|
position: absolute;
|
|
@@ -537,15 +495,15 @@ function ColumnsLayout({
|
|
|
537
495
|
children,
|
|
538
496
|
reverse
|
|
539
497
|
}) {
|
|
540
|
-
const childrenArray =
|
|
541
|
-
return /* @__PURE__ */
|
|
498
|
+
const childrenArray = React6.Children.toArray(children);
|
|
499
|
+
return /* @__PURE__ */ React6.createElement(
|
|
542
500
|
ColumnsContainer,
|
|
543
501
|
{
|
|
544
502
|
style: {
|
|
545
503
|
flexDirection: reverse ? "row-reverse" : "row"
|
|
546
504
|
}
|
|
547
505
|
},
|
|
548
|
-
childrenArray.map((child, i) => /* @__PURE__ */
|
|
506
|
+
childrenArray.map((child, i) => /* @__PURE__ */ React6.createElement(
|
|
549
507
|
"div",
|
|
550
508
|
{
|
|
551
509
|
key: i,
|
|
@@ -564,8 +522,8 @@ function ColumnsLayout({
|
|
|
564
522
|
}
|
|
565
523
|
|
|
566
524
|
// src/layouts/SideCodeLayout.tsx
|
|
567
|
-
import
|
|
568
|
-
var CodeSide =
|
|
525
|
+
import styled6 from "styled-components";
|
|
526
|
+
var CodeSide = styled6.div`
|
|
569
527
|
pre {
|
|
570
528
|
font-size: 0.9rem;
|
|
571
529
|
}
|
|
@@ -575,7 +533,7 @@ function SidedCodeLayout({
|
|
|
575
533
|
position = "right"
|
|
576
534
|
}) {
|
|
577
535
|
const [code, rest] = getCodeChildren(children);
|
|
578
|
-
return /* @__PURE__ */
|
|
536
|
+
return /* @__PURE__ */ React7.createElement(ColumnsLayout, { reverse: position === "left" }, /* @__PURE__ */ React7.createElement(
|
|
579
537
|
"div",
|
|
580
538
|
{
|
|
581
539
|
style: {
|
|
@@ -584,7 +542,7 @@ function SidedCodeLayout({
|
|
|
584
542
|
}
|
|
585
543
|
},
|
|
586
544
|
rest
|
|
587
|
-
), /* @__PURE__ */
|
|
545
|
+
), /* @__PURE__ */ React7.createElement(
|
|
588
546
|
CodeSide,
|
|
589
547
|
{
|
|
590
548
|
style: {
|
|
@@ -600,15 +558,15 @@ function SidedCodeLayout({
|
|
|
600
558
|
}
|
|
601
559
|
|
|
602
560
|
// src/layouts/SideImageLayout.tsx
|
|
603
|
-
import
|
|
604
|
-
import
|
|
561
|
+
import React9 from "react";
|
|
562
|
+
import styled8 from "styled-components";
|
|
605
563
|
|
|
606
564
|
// src/components/Image.tsx
|
|
607
|
-
import
|
|
565
|
+
import React8 from "react";
|
|
608
566
|
|
|
609
567
|
// src/layouts/styled.ts
|
|
610
|
-
import
|
|
611
|
-
var SVGObject =
|
|
568
|
+
import styled7 from "styled-components";
|
|
569
|
+
var SVGObject = styled7.object`
|
|
612
570
|
padding: 3rem 2rem;
|
|
613
571
|
box-sizing: border-box;
|
|
614
572
|
background-color: white;
|
|
@@ -616,22 +574,30 @@ var SVGObject = styled8.object`
|
|
|
616
574
|
|
|
617
575
|
// src/components/Image.tsx
|
|
618
576
|
function Image(props) {
|
|
619
|
-
const {
|
|
577
|
+
const {
|
|
578
|
+
src,
|
|
579
|
+
height,
|
|
580
|
+
width,
|
|
581
|
+
style: style2,
|
|
582
|
+
...otherProps
|
|
583
|
+
} = props;
|
|
620
584
|
if (!(src == null ? void 0 : src.endsWith(".svg"))) {
|
|
621
|
-
return /* @__PURE__ */
|
|
585
|
+
return /* @__PURE__ */ React8.createElement(
|
|
622
586
|
"img",
|
|
623
587
|
{
|
|
624
588
|
src,
|
|
625
|
-
|
|
589
|
+
...otherProps,
|
|
626
590
|
style: {
|
|
591
|
+
width,
|
|
627
592
|
height: height || "100%",
|
|
628
593
|
objectFit: "cover",
|
|
629
|
-
objectPosition: "center"
|
|
594
|
+
objectPosition: "center",
|
|
595
|
+
...style2
|
|
630
596
|
}
|
|
631
597
|
}
|
|
632
598
|
);
|
|
633
599
|
}
|
|
634
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ React8.createElement(
|
|
635
601
|
SVGObject,
|
|
636
602
|
{
|
|
637
603
|
type: "image/svg+xml",
|
|
@@ -639,7 +605,8 @@ function Image(props) {
|
|
|
639
605
|
style: {
|
|
640
606
|
height: height || "100%",
|
|
641
607
|
minWidth: "30vw",
|
|
642
|
-
width: "100%"
|
|
608
|
+
width: width || "100%",
|
|
609
|
+
...style2
|
|
643
610
|
}
|
|
644
611
|
}
|
|
645
612
|
);
|
|
@@ -647,7 +614,7 @@ function Image(props) {
|
|
|
647
614
|
Image.mdxType = "Image";
|
|
648
615
|
|
|
649
616
|
// src/layouts/SideImageLayout.tsx
|
|
650
|
-
var DivWithHeading2 =
|
|
617
|
+
var DivWithHeading2 = styled8.div`
|
|
651
618
|
h2 {
|
|
652
619
|
margin-top: 0;
|
|
653
620
|
}
|
|
@@ -668,7 +635,7 @@ var SidedImageLayout = ({
|
|
|
668
635
|
console.error("No image provided for SidedImageLayout");
|
|
669
636
|
return null;
|
|
670
637
|
}
|
|
671
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ React9.createElement(
|
|
672
639
|
DivWithHeading2,
|
|
673
640
|
{
|
|
674
641
|
style: {
|
|
@@ -681,7 +648,7 @@ var SidedImageLayout = ({
|
|
|
681
648
|
top: 0
|
|
682
649
|
}
|
|
683
650
|
},
|
|
684
|
-
/* @__PURE__ */
|
|
651
|
+
/* @__PURE__ */ React9.createElement(
|
|
685
652
|
"div",
|
|
686
653
|
{
|
|
687
654
|
style: {
|
|
@@ -694,7 +661,7 @@ var SidedImageLayout = ({
|
|
|
694
661
|
},
|
|
695
662
|
rest
|
|
696
663
|
),
|
|
697
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ React9.createElement(
|
|
698
665
|
"div",
|
|
699
666
|
{
|
|
700
667
|
style: {
|
|
@@ -706,19 +673,19 @@ var SidedImageLayout = ({
|
|
|
706
673
|
backgroundColor: "white"
|
|
707
674
|
}
|
|
708
675
|
},
|
|
709
|
-
component || /* @__PURE__ */
|
|
676
|
+
component || /* @__PURE__ */ React9.createElement(Image, { src: image })
|
|
710
677
|
)
|
|
711
678
|
);
|
|
712
679
|
};
|
|
713
680
|
|
|
714
681
|
// src/layouts/SideLayout.tsx
|
|
715
|
-
import
|
|
682
|
+
import React10 from "react";
|
|
716
683
|
function SideLayout({
|
|
717
684
|
children,
|
|
718
685
|
position = "right"
|
|
719
686
|
}) {
|
|
720
687
|
const [side, rest] = getMatchingMdxType(children, "Side");
|
|
721
|
-
return /* @__PURE__ */
|
|
688
|
+
return /* @__PURE__ */ React10.createElement(ColumnsLayout, { reverse: position === "left" }, /* @__PURE__ */ React10.createElement("div", { style: { marginLeft: Margins.horizontal } }, rest), /* @__PURE__ */ React10.createElement(
|
|
722
689
|
"div",
|
|
723
690
|
{
|
|
724
691
|
style: {
|
|
@@ -773,11 +740,11 @@ var theme_default = {
|
|
|
773
740
|
};
|
|
774
741
|
|
|
775
742
|
// src/template.tsx
|
|
776
|
-
import
|
|
743
|
+
import React11 from "react";
|
|
777
744
|
import { Box, FullScreen } from "spectacle";
|
|
778
745
|
var template = ({ slideNumber, numberOfSlides }) => {
|
|
779
746
|
const percentage = slideNumber / numberOfSlides * 100;
|
|
780
|
-
return /* @__PURE__ */
|
|
747
|
+
return /* @__PURE__ */ React11.createElement("div", { style: { position: "absolute", bottom: 0, left: 0, right: 0 } }, /* @__PURE__ */ React11.createElement(Box, { padding: "0 0 0.5em 0.7em" }, /* @__PURE__ */ React11.createElement(FullScreen, null)), /* @__PURE__ */ React11.createElement("div", { style: { width: "100%", height: "4px", background: "#ffffff11" } }, /* @__PURE__ */ React11.createElement(
|
|
781
748
|
"div",
|
|
782
749
|
{
|
|
783
750
|
style: {
|
|
@@ -791,31 +758,31 @@ var template = ({ slideNumber, numberOfSlides }) => {
|
|
|
791
758
|
};
|
|
792
759
|
|
|
793
760
|
// src/components/map.tsx
|
|
794
|
-
import
|
|
761
|
+
import React14 from "react";
|
|
795
762
|
import { mdxComponentMap } from "spectacle";
|
|
796
763
|
|
|
797
764
|
// src/components/styled.tsx
|
|
798
|
-
import
|
|
765
|
+
import React12 from "react";
|
|
799
766
|
import {
|
|
800
767
|
Link as SpectacleLink,
|
|
801
768
|
Image as SpectacleImage,
|
|
802
769
|
Heading,
|
|
803
770
|
FlexBox as FlexBox2
|
|
804
771
|
} from "spectacle";
|
|
805
|
-
import
|
|
806
|
-
var StyledImage =
|
|
772
|
+
import styled9 from "styled-components";
|
|
773
|
+
var StyledImage = styled9(SpectacleImage)`
|
|
807
774
|
object-fit: contain;
|
|
808
775
|
max-height: 30vh;
|
|
809
776
|
max-width: 70vw;
|
|
810
777
|
`;
|
|
811
|
-
var Image2 = (props) => /* @__PURE__ */
|
|
812
|
-
var CustomHeading =
|
|
778
|
+
var Image2 = (props) => /* @__PURE__ */ React12.createElement(FlexBox2, { margin: "0 0", padding: "0 0" }, /* @__PURE__ */ React12.createElement(StyledImage, { ...props }));
|
|
779
|
+
var CustomHeading = styled9(Heading)`
|
|
813
780
|
strong {
|
|
814
781
|
color: #f49676;
|
|
815
782
|
font-weight: 500;
|
|
816
783
|
}
|
|
817
784
|
`;
|
|
818
|
-
var CustomQuote =
|
|
785
|
+
var CustomQuote = styled9.blockquote`
|
|
819
786
|
margin: 1rem 0;
|
|
820
787
|
padding-left: 1.5rem;
|
|
821
788
|
padding-top: 0;
|
|
@@ -826,7 +793,7 @@ var CustomQuote = styled10.blockquote`
|
|
|
826
793
|
padding: 0 !important;
|
|
827
794
|
}
|
|
828
795
|
`;
|
|
829
|
-
var InlineCode =
|
|
796
|
+
var InlineCode = styled9.code`
|
|
830
797
|
filter: brightness(1.05);
|
|
831
798
|
zoom: 1.1;
|
|
832
799
|
&:before,
|
|
@@ -835,12 +802,12 @@ var InlineCode = styled10.code`
|
|
|
835
802
|
font-size: 0.8em;
|
|
836
803
|
}
|
|
837
804
|
`;
|
|
838
|
-
var HeadingTwo =
|
|
805
|
+
var HeadingTwo = styled9.h2`
|
|
839
806
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
840
807
|
font-size: 55px;
|
|
841
808
|
font-weight: 400;
|
|
842
809
|
`;
|
|
843
|
-
var HeadingThree =
|
|
810
|
+
var HeadingThree = styled9.h3`
|
|
844
811
|
font-family: Bitter, \"Helvetica Neue\", Helvetica, Arial, sans-serif;
|
|
845
812
|
font-size: 40px;
|
|
846
813
|
font-weight: 400;
|
|
@@ -853,12 +820,12 @@ var HeadingThree = styled10.h3`
|
|
|
853
820
|
`;
|
|
854
821
|
|
|
855
822
|
// src/components/CodeStepper/CodeStepper.tsx
|
|
856
|
-
import
|
|
823
|
+
import React13 from "react";
|
|
857
824
|
import ReactIs from "react-is";
|
|
858
825
|
import { Prism as SyntaxHighlighter } from "react-syntax-highlighter";
|
|
859
826
|
import { gruvboxDark } from "react-syntax-highlighter/dist/esm/styles/prism";
|
|
860
827
|
import { Stepper } from "spectacle";
|
|
861
|
-
import
|
|
828
|
+
import styled10 from "styled-components";
|
|
862
829
|
|
|
863
830
|
// src/components/CodeStepper/code-directives.ts
|
|
864
831
|
function range(start, end) {
|
|
@@ -922,7 +889,7 @@ function parseStepDirectives(directives) {
|
|
|
922
889
|
|
|
923
890
|
// src/components/CodeStepper/CodeStepper.tsx
|
|
924
891
|
var Highlighter = SyntaxHighlighter;
|
|
925
|
-
var CodeContainer =
|
|
892
|
+
var CodeContainer = styled10.div`
|
|
926
893
|
pre {
|
|
927
894
|
padding: 1rem 0rem !important;
|
|
928
895
|
background-color: transparent !important;
|
|
@@ -943,7 +910,7 @@ var CodeContainer = styled11.div`
|
|
|
943
910
|
}
|
|
944
911
|
`;
|
|
945
912
|
function useCodeSteps(code) {
|
|
946
|
-
return
|
|
913
|
+
return React13.useMemo(() => {
|
|
947
914
|
const prefixes = code.match(/(?:\/\/|<!--) @.*\n/g) || [];
|
|
948
915
|
const prefixesLength = prefixes.reduce(
|
|
949
916
|
(acc, prefix) => acc + prefix.length,
|
|
@@ -963,8 +930,8 @@ function useCodeSteps(code) {
|
|
|
963
930
|
}, [code]);
|
|
964
931
|
}
|
|
965
932
|
function getCodeDetails(children) {
|
|
966
|
-
const child =
|
|
967
|
-
if (!
|
|
933
|
+
const child = React13.Children.toArray(children)[0];
|
|
934
|
+
if (!React13.isValidElement(child)) {
|
|
968
935
|
return {
|
|
969
936
|
language: "",
|
|
970
937
|
code: ReactIs.isFragment(child) ? "" : String(child || "")
|
|
@@ -982,7 +949,7 @@ function CodeWrapper({
|
|
|
982
949
|
hasName,
|
|
983
950
|
children
|
|
984
951
|
}) {
|
|
985
|
-
return /* @__PURE__ */
|
|
952
|
+
return /* @__PURE__ */ React13.createElement(
|
|
986
953
|
"div",
|
|
987
954
|
{
|
|
988
955
|
style: {
|
|
@@ -992,7 +959,7 @@ function CodeWrapper({
|
|
|
992
959
|
borderRadius: "4px"
|
|
993
960
|
}
|
|
994
961
|
},
|
|
995
|
-
name && /* @__PURE__ */
|
|
962
|
+
name && /* @__PURE__ */ React13.createElement(
|
|
996
963
|
"span",
|
|
997
964
|
{
|
|
998
965
|
style: {
|
|
@@ -1009,7 +976,7 @@ function CodeWrapper({
|
|
|
1009
976
|
name
|
|
1010
977
|
),
|
|
1011
978
|
children,
|
|
1012
|
-
hasName && /* @__PURE__ */
|
|
979
|
+
hasName && /* @__PURE__ */ React13.createElement(
|
|
1013
980
|
"span",
|
|
1014
981
|
{
|
|
1015
982
|
style: {
|
|
@@ -1024,7 +991,7 @@ function CodeWrapper({
|
|
|
1024
991
|
fontStyle: "italic"
|
|
1025
992
|
}
|
|
1026
993
|
},
|
|
1027
|
-
stepName || /* @__PURE__ */
|
|
994
|
+
stepName || /* @__PURE__ */ React13.createElement("span", { style: { visibility: "hidden" } }, "Step")
|
|
1028
995
|
)
|
|
1029
996
|
);
|
|
1030
997
|
}
|
|
@@ -1033,7 +1000,7 @@ function CodeStepper({
|
|
|
1033
1000
|
name,
|
|
1034
1001
|
...props
|
|
1035
1002
|
}) {
|
|
1036
|
-
const { language, code } =
|
|
1003
|
+
const { language, code } = React13.useMemo(() => {
|
|
1037
1004
|
return getCodeDetails(props.children);
|
|
1038
1005
|
}, [props.children]);
|
|
1039
1006
|
const {
|
|
@@ -1043,21 +1010,21 @@ function CodeStepper({
|
|
|
1043
1010
|
hasSteps,
|
|
1044
1011
|
hasName
|
|
1045
1012
|
} = useCodeSteps(code);
|
|
1046
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ React13.createElement(CodeContainer, null, import.meta.env.DEV && false, /* @__PURE__ */ React13.createElement(
|
|
1047
1014
|
Stepper,
|
|
1048
1015
|
{
|
|
1049
1016
|
values: steps,
|
|
1050
1017
|
alwaysVisible: !hasSteps,
|
|
1051
1018
|
priority: priority ? priority + 1 : void 0
|
|
1052
1019
|
},
|
|
1053
|
-
(step, _, isActive) => /* @__PURE__ */
|
|
1020
|
+
(step, _, isActive) => /* @__PURE__ */ React13.createElement(
|
|
1054
1021
|
CodeWrapper,
|
|
1055
1022
|
{
|
|
1056
1023
|
name,
|
|
1057
1024
|
stepName: step == null ? void 0 : step.name,
|
|
1058
1025
|
hasName
|
|
1059
1026
|
},
|
|
1060
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ React13.createElement(
|
|
1061
1028
|
Highlighter,
|
|
1062
1029
|
{
|
|
1063
1030
|
language,
|
|
@@ -1107,7 +1074,7 @@ CodeStepper.mdxType = "CodeStepper";
|
|
|
1107
1074
|
// src/components/map.tsx
|
|
1108
1075
|
var componentsMap = {
|
|
1109
1076
|
...mdxComponentMap,
|
|
1110
|
-
inlineCode: (props) => /* @__PURE__ */
|
|
1077
|
+
inlineCode: (props) => /* @__PURE__ */ React14.createElement(
|
|
1111
1078
|
InlineCode,
|
|
1112
1079
|
{
|
|
1113
1080
|
...props,
|
|
@@ -1117,7 +1084,7 @@ var componentsMap = {
|
|
|
1117
1084
|
}
|
|
1118
1085
|
}
|
|
1119
1086
|
),
|
|
1120
|
-
table: (props) => /* @__PURE__ */
|
|
1087
|
+
table: (props) => /* @__PURE__ */ React14.createElement(
|
|
1121
1088
|
"table",
|
|
1122
1089
|
{
|
|
1123
1090
|
...props,
|
|
@@ -1128,7 +1095,7 @@ var componentsMap = {
|
|
|
1128
1095
|
}
|
|
1129
1096
|
}
|
|
1130
1097
|
),
|
|
1131
|
-
tr: (props) => /* @__PURE__ */
|
|
1098
|
+
tr: (props) => /* @__PURE__ */ React14.createElement(
|
|
1132
1099
|
"tr",
|
|
1133
1100
|
{
|
|
1134
1101
|
...props,
|
|
@@ -1140,7 +1107,7 @@ var componentsMap = {
|
|
|
1140
1107
|
}
|
|
1141
1108
|
}
|
|
1142
1109
|
),
|
|
1143
|
-
td: (props) => /* @__PURE__ */
|
|
1110
|
+
td: (props) => /* @__PURE__ */ React14.createElement(
|
|
1144
1111
|
"td",
|
|
1145
1112
|
{
|
|
1146
1113
|
...props,
|
|
@@ -1153,7 +1120,7 @@ var componentsMap = {
|
|
|
1153
1120
|
}
|
|
1154
1121
|
}
|
|
1155
1122
|
),
|
|
1156
|
-
h1: (props) => /* @__PURE__ */
|
|
1123
|
+
h1: (props) => /* @__PURE__ */ React14.createElement(
|
|
1157
1124
|
CustomHeading,
|
|
1158
1125
|
{
|
|
1159
1126
|
fontSize: "h1",
|
|
@@ -1169,15 +1136,15 @@ var componentsMap = {
|
|
|
1169
1136
|
},
|
|
1170
1137
|
props.children
|
|
1171
1138
|
),
|
|
1172
|
-
h2: (props) => /* @__PURE__ */
|
|
1173
|
-
h3: (props) => /* @__PURE__ */
|
|
1174
|
-
img: (props) => /* @__PURE__ */
|
|
1139
|
+
h2: (props) => /* @__PURE__ */ React14.createElement(HeadingTwo, null, props.children),
|
|
1140
|
+
h3: (props) => /* @__PURE__ */ React14.createElement(HeadingThree, { ...props }),
|
|
1141
|
+
img: (props) => /* @__PURE__ */ React14.createElement(Image2, { ...props }),
|
|
1175
1142
|
pre: CodeStepper,
|
|
1176
|
-
li: (props) => /* @__PURE__ */
|
|
1177
|
-
Side: (props) => /* @__PURE__ */
|
|
1143
|
+
li: (props) => /* @__PURE__ */ React14.createElement("li", { ...props, style: { margin: "24px 0" } }),
|
|
1144
|
+
Side: (props) => /* @__PURE__ */ React14.createElement("div", { ...props }),
|
|
1178
1145
|
p: (props) => {
|
|
1179
1146
|
const Text = mdxComponentMap.p;
|
|
1180
|
-
return /* @__PURE__ */
|
|
1147
|
+
return /* @__PURE__ */ React14.createElement(
|
|
1181
1148
|
Text,
|
|
1182
1149
|
{
|
|
1183
1150
|
style: { margin: "8px 0", padding: "8px 0", lineHeight: "2rem" },
|
|
@@ -1185,10 +1152,10 @@ var componentsMap = {
|
|
|
1185
1152
|
}
|
|
1186
1153
|
);
|
|
1187
1154
|
},
|
|
1188
|
-
blockquote: (props) => /* @__PURE__ */
|
|
1155
|
+
blockquote: (props) => /* @__PURE__ */ React14.createElement(CustomQuote, { ...props }),
|
|
1189
1156
|
a: ({ children, ...props }) => {
|
|
1190
1157
|
const domain = new URL(props.href || "").hostname;
|
|
1191
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ React14.createElement("a", { ...props, style: { color: "#f49676", textDecoration: "none" } }, children, " ", /* @__PURE__ */ React14.createElement(
|
|
1192
1159
|
"small",
|
|
1193
1160
|
{
|
|
1194
1161
|
style: {
|
|
@@ -1203,15 +1170,18 @@ var componentsMap = {
|
|
|
1203
1170
|
};
|
|
1204
1171
|
var map_default = componentsMap;
|
|
1205
1172
|
|
|
1173
|
+
// src/index.tsx
|
|
1174
|
+
export * from "spectacle";
|
|
1175
|
+
|
|
1206
1176
|
// src/components/FilePane.tsx
|
|
1207
|
-
import
|
|
1177
|
+
import React15 from "react";
|
|
1208
1178
|
function FilePane({
|
|
1209
1179
|
name,
|
|
1210
1180
|
children,
|
|
1211
1181
|
priority,
|
|
1212
1182
|
...divProps
|
|
1213
1183
|
}) {
|
|
1214
|
-
return
|
|
1184
|
+
return React15.isValidElement(children) ? React15.cloneElement(children, {
|
|
1215
1185
|
// @ts-expect-error cloning
|
|
1216
1186
|
priority,
|
|
1217
1187
|
name
|
|
@@ -1220,35 +1190,39 @@ function FilePane({
|
|
|
1220
1190
|
FilePane.mdxType = "FilePane";
|
|
1221
1191
|
|
|
1222
1192
|
// src/components/ItemsColumn.tsx
|
|
1223
|
-
import
|
|
1193
|
+
import React16 from "react";
|
|
1224
1194
|
import { Stepper as Stepper2 } from "spectacle";
|
|
1225
|
-
import
|
|
1195
|
+
import styled11 from "styled-components";
|
|
1226
1196
|
import { useSpring, animated } from "react-spring";
|
|
1227
1197
|
function ItemsColumn(divProps) {
|
|
1228
1198
|
const { style: style2, children, ...props } = divProps;
|
|
1229
|
-
const childrenArray =
|
|
1230
|
-
return /* @__PURE__ */
|
|
1199
|
+
const childrenArray = React16.Children.toArray(children);
|
|
1200
|
+
return /* @__PURE__ */ React16.createElement(Stepper2, { values: childrenArray }, (value, step) => /* @__PURE__ */ React16.createElement(
|
|
1231
1201
|
"div",
|
|
1232
1202
|
{
|
|
1233
1203
|
style: {
|
|
1234
1204
|
display: "flex",
|
|
1235
1205
|
flexDirection: "column",
|
|
1236
|
-
|
|
1206
|
+
justifyItems: "center",
|
|
1207
|
+
alignItems: "stretch",
|
|
1237
1208
|
height: "100%",
|
|
1209
|
+
rowGap: "2rem",
|
|
1238
1210
|
...style2
|
|
1239
1211
|
},
|
|
1240
1212
|
...props
|
|
1241
1213
|
},
|
|
1242
1214
|
childrenArray.map((child, index) => {
|
|
1243
1215
|
const isVisible = index <= step;
|
|
1244
|
-
if (!
|
|
1216
|
+
if (!React16.isValidElement(child)) {
|
|
1245
1217
|
return child;
|
|
1246
1218
|
}
|
|
1247
|
-
return /* @__PURE__ */
|
|
1219
|
+
return /* @__PURE__ */ React16.createElement(ItemColumnWrapper, { key: index, isVisible }, child);
|
|
1248
1220
|
})
|
|
1249
1221
|
));
|
|
1250
1222
|
}
|
|
1251
|
-
var ItemColumnWrapperStyled =
|
|
1223
|
+
var ItemColumnWrapperStyled = styled11(animated.div)`
|
|
1224
|
+
display: flex;
|
|
1225
|
+
justify-content: center;
|
|
1252
1226
|
* {
|
|
1253
1227
|
text-align: center !important;
|
|
1254
1228
|
}
|
|
@@ -1259,13 +1233,13 @@ function ItemColumnWrapper({
|
|
|
1259
1233
|
...props
|
|
1260
1234
|
}) {
|
|
1261
1235
|
const styles = useSpring({ opacity: isVisible ? 1 : 0 });
|
|
1262
|
-
return /* @__PURE__ */
|
|
1236
|
+
return /* @__PURE__ */ React16.createElement(ItemColumnWrapperStyled, { style: styles, ...props }, children);
|
|
1263
1237
|
}
|
|
1264
1238
|
|
|
1265
1239
|
// src/components/DocumentationItem.tsx
|
|
1266
|
-
import
|
|
1267
|
-
import
|
|
1268
|
-
var DocWrapper =
|
|
1240
|
+
import React17 from "react";
|
|
1241
|
+
import styled12 from "styled-components";
|
|
1242
|
+
var DocWrapper = styled12.div`
|
|
1269
1243
|
position: absolute;
|
|
1270
1244
|
bottom: 0;
|
|
1271
1245
|
right: 0;
|
|
@@ -1279,20 +1253,20 @@ var DocWrapper = styled13.div`
|
|
|
1279
1253
|
display: flex;
|
|
1280
1254
|
}
|
|
1281
1255
|
`;
|
|
1282
|
-
var DocContainer =
|
|
1256
|
+
var DocContainer = styled12.div`
|
|
1283
1257
|
margin: 2rem 1rem;
|
|
1284
1258
|
background-color: #333;
|
|
1285
1259
|
border: 1px solid #333;
|
|
1286
1260
|
padding: 0.5rem 1rem;
|
|
1287
1261
|
border-radius: 1.5rem;
|
|
1288
1262
|
`;
|
|
1289
|
-
var DocLink =
|
|
1263
|
+
var DocLink = styled12.a`
|
|
1290
1264
|
text-decoration: none;
|
|
1291
1265
|
font-weight: normal;
|
|
1292
1266
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1293
1267
|
color: #f49676;
|
|
1294
1268
|
`;
|
|
1295
|
-
var DocLinkItem =
|
|
1269
|
+
var DocLinkItem = styled12(DocLink)`
|
|
1296
1270
|
width: fit-content;
|
|
1297
1271
|
display: inline-block;
|
|
1298
1272
|
background-color: #333;
|
|
@@ -1301,7 +1275,7 @@ var DocLinkItem = styled13(DocLink)`
|
|
|
1301
1275
|
border-radius: 1.5rem;
|
|
1302
1276
|
margin: 0.25rem 0;
|
|
1303
1277
|
`;
|
|
1304
|
-
var DocContent =
|
|
1278
|
+
var DocContent = styled12.div`
|
|
1305
1279
|
display: flex;
|
|
1306
1280
|
flex-flow: column-reverse nowrap;
|
|
1307
1281
|
position: absolute;
|
|
@@ -1316,18 +1290,18 @@ function Doc({
|
|
|
1316
1290
|
link,
|
|
1317
1291
|
children
|
|
1318
1292
|
}) {
|
|
1319
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ React17.createElement(DocWrapper, null, /* @__PURE__ */ React17.createElement(DocContainer, null, children && /* @__PURE__ */ React17.createElement(DocContent, null, children), /* @__PURE__ */ React17.createElement("div", null, /* @__PURE__ */ React17.createElement(DocLink, { target: "_blank", rel: "noopener noreferrer", href: link }, label))));
|
|
1320
1294
|
}
|
|
1321
1295
|
function DocItem({ label, link }) {
|
|
1322
|
-
return /* @__PURE__ */
|
|
1296
|
+
return /* @__PURE__ */ React17.createElement(DocLinkItem, { target: "_blank", rel: "noopener noreferrer", href: link }, label);
|
|
1323
1297
|
}
|
|
1324
1298
|
|
|
1325
1299
|
// src/components/HorizontalList.tsx
|
|
1326
|
-
import
|
|
1300
|
+
import React18 from "react";
|
|
1327
1301
|
import { animated as animated2, useSpring as useSpring2 } from "react-spring";
|
|
1328
1302
|
import { Stepper as Stepper3 } from "spectacle";
|
|
1329
|
-
import
|
|
1330
|
-
var Container =
|
|
1303
|
+
import styled13 from "styled-components";
|
|
1304
|
+
var Container = styled13.div`
|
|
1331
1305
|
display: grid;
|
|
1332
1306
|
grid-gap: 2rem;
|
|
1333
1307
|
`;
|
|
@@ -1335,8 +1309,8 @@ function HorizontalList({
|
|
|
1335
1309
|
children,
|
|
1336
1310
|
columns = 3
|
|
1337
1311
|
}) {
|
|
1338
|
-
const items =
|
|
1339
|
-
return /* @__PURE__ */
|
|
1312
|
+
const items = React18.Children.toArray(children);
|
|
1313
|
+
return /* @__PURE__ */ React18.createElement(Stepper3, { values: items }, (_, step) => /* @__PURE__ */ React18.createElement(
|
|
1340
1314
|
Container,
|
|
1341
1315
|
{
|
|
1342
1316
|
style: {
|
|
@@ -1344,10 +1318,10 @@ function HorizontalList({
|
|
|
1344
1318
|
}
|
|
1345
1319
|
},
|
|
1346
1320
|
items.map((item, k) => {
|
|
1347
|
-
if (!
|
|
1321
|
+
if (!React18.isValidElement(item)) {
|
|
1348
1322
|
return item;
|
|
1349
1323
|
}
|
|
1350
|
-
return
|
|
1324
|
+
return React18.cloneElement(item, {
|
|
1351
1325
|
// @ts-expect-error cloning
|
|
1352
1326
|
position: k + 1,
|
|
1353
1327
|
isVisible: k <= step,
|
|
@@ -1357,12 +1331,12 @@ function HorizontalList({
|
|
|
1357
1331
|
));
|
|
1358
1332
|
}
|
|
1359
1333
|
function Pill({ position }) {
|
|
1360
|
-
return /* @__PURE__ */
|
|
1334
|
+
return /* @__PURE__ */ React18.createElement(
|
|
1361
1335
|
"div",
|
|
1362
1336
|
{
|
|
1363
1337
|
style: { width: 48, transform: "translate(-25%, -25%)", opacity: 0.9 }
|
|
1364
1338
|
},
|
|
1365
|
-
/* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ React18.createElement(
|
|
1366
1340
|
"svg",
|
|
1367
1341
|
{
|
|
1368
1342
|
width: "48",
|
|
@@ -1371,14 +1345,14 @@ function Pill({ position }) {
|
|
|
1371
1345
|
fill: "none",
|
|
1372
1346
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1373
1347
|
},
|
|
1374
|
-
/* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ React18.createElement(
|
|
1375
1349
|
"path",
|
|
1376
1350
|
{
|
|
1377
1351
|
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",
|
|
1378
1352
|
fill: "#ffffff"
|
|
1379
1353
|
}
|
|
1380
1354
|
),
|
|
1381
|
-
/* @__PURE__ */
|
|
1355
|
+
/* @__PURE__ */ React18.createElement(
|
|
1382
1356
|
"text",
|
|
1383
1357
|
{
|
|
1384
1358
|
x: "9",
|
|
@@ -1390,7 +1364,7 @@ function Pill({ position }) {
|
|
|
1390
1364
|
},
|
|
1391
1365
|
position
|
|
1392
1366
|
),
|
|
1393
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ React18.createElement(
|
|
1394
1368
|
"path",
|
|
1395
1369
|
{
|
|
1396
1370
|
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",
|
|
@@ -1400,12 +1374,12 @@ function Pill({ position }) {
|
|
|
1400
1374
|
)
|
|
1401
1375
|
);
|
|
1402
1376
|
}
|
|
1403
|
-
var Item =
|
|
1377
|
+
var Item = styled13(animated2.div)`
|
|
1404
1378
|
display: flex;
|
|
1405
1379
|
flex-direction: column;
|
|
1406
1380
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1407
1381
|
`;
|
|
1408
|
-
var ItemHead =
|
|
1382
|
+
var ItemHead = styled13.div`
|
|
1409
1383
|
display: flex;
|
|
1410
1384
|
flex-direction: row;
|
|
1411
1385
|
font-size: 1.3rem;
|
|
@@ -1415,7 +1389,7 @@ var ItemHead = styled14.div`
|
|
|
1415
1389
|
margin: 0;
|
|
1416
1390
|
}
|
|
1417
1391
|
`;
|
|
1418
|
-
var ItemContent =
|
|
1392
|
+
var ItemContent = styled13.div`
|
|
1419
1393
|
> * {
|
|
1420
1394
|
font-size: 1rem;
|
|
1421
1395
|
padding: 4px !important;
|
|
@@ -1443,31 +1417,31 @@ function HorizontalListItem({
|
|
|
1443
1417
|
const opacityStyles = useSpring2({
|
|
1444
1418
|
opacity: getItemOpacity({ isVisible, isLast })
|
|
1445
1419
|
});
|
|
1446
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ React18.createElement(Item, { style: opacityStyles }, /* @__PURE__ */ React18.createElement(ItemHead, null, /* @__PURE__ */ React18.createElement(Pill, { position }), /* @__PURE__ */ React18.createElement("p", null, title)), /* @__PURE__ */ React18.createElement(ItemContent, null, children));
|
|
1447
1421
|
}
|
|
1448
1422
|
|
|
1449
1423
|
// src/components/Timeline.tsx
|
|
1450
|
-
import
|
|
1424
|
+
import React19 from "react";
|
|
1451
1425
|
import { animated as animated3, useSpring as useSpring3 } from "react-spring";
|
|
1452
1426
|
import { Stepper as Stepper4 } from "spectacle";
|
|
1453
1427
|
|
|
1454
1428
|
// src/components/Timeline.styled.tsx
|
|
1455
|
-
import
|
|
1456
|
-
var TimelineItemContent =
|
|
1429
|
+
import styled14 from "styled-components";
|
|
1430
|
+
var TimelineItemContent = styled14.div`
|
|
1457
1431
|
display: flex;
|
|
1458
1432
|
padding: 0.7rem 0 1rem 12px;
|
|
1459
1433
|
`;
|
|
1460
|
-
var TimelineItemContentPhantom =
|
|
1434
|
+
var TimelineItemContentPhantom = styled14(TimelineItemContent)`
|
|
1461
1435
|
opacity: 0;
|
|
1462
1436
|
`;
|
|
1463
|
-
var TimelineItemBody =
|
|
1437
|
+
var TimelineItemBody = styled14.div`
|
|
1464
1438
|
&,
|
|
1465
1439
|
& > * {
|
|
1466
1440
|
font-size: 1.3rem !important;
|
|
1467
1441
|
color: #ffffff !important;
|
|
1468
1442
|
}
|
|
1469
1443
|
`;
|
|
1470
|
-
var TimelineItemTitle =
|
|
1444
|
+
var TimelineItemTitle = styled14.div`
|
|
1471
1445
|
font-family: Bitter, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
1472
1446
|
font-size: 1rem;
|
|
1473
1447
|
font-weight: bold;
|
|
@@ -1475,8 +1449,8 @@ var TimelineItemTitle = styled15.div`
|
|
|
1475
1449
|
`;
|
|
1476
1450
|
|
|
1477
1451
|
// src/components/Timeline.tsx
|
|
1478
|
-
import
|
|
1479
|
-
var TimelineItemStyled =
|
|
1452
|
+
import styled15 from "styled-components";
|
|
1453
|
+
var TimelineItemStyled = styled15(animated3.div)`
|
|
1480
1454
|
flex: 1;
|
|
1481
1455
|
flex-flow: column nowrap;
|
|
1482
1456
|
display: inline-flex;
|
|
@@ -1494,7 +1468,7 @@ var TimelineItemStyled = styled16(animated3.div)`
|
|
|
1494
1468
|
}
|
|
1495
1469
|
}
|
|
1496
1470
|
`;
|
|
1497
|
-
var TimelineItemGuide =
|
|
1471
|
+
var TimelineItemGuide = styled15(animated3.div)`
|
|
1498
1472
|
width: 100%;
|
|
1499
1473
|
padding-top: 2px;
|
|
1500
1474
|
display: flex;
|
|
@@ -1510,7 +1484,7 @@ var TimelineItemGuide = styled16(animated3.div)`
|
|
|
1510
1484
|
margin-right: 4px;
|
|
1511
1485
|
}
|
|
1512
1486
|
`;
|
|
1513
|
-
var TimelineItemGuideLine =
|
|
1487
|
+
var TimelineItemGuideLine = styled15(animated3.div)`
|
|
1514
1488
|
border-top: 4px solid #ffffff;
|
|
1515
1489
|
margin-right: 4px;
|
|
1516
1490
|
`;
|
|
@@ -1521,8 +1495,8 @@ var style = {
|
|
|
1521
1495
|
alignItems: "center"
|
|
1522
1496
|
};
|
|
1523
1497
|
function Timeline(props) {
|
|
1524
|
-
const children =
|
|
1525
|
-
return /* @__PURE__ */
|
|
1498
|
+
const children = React19.Children.toArray(props.children);
|
|
1499
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1526
1500
|
Stepper4,
|
|
1527
1501
|
{
|
|
1528
1502
|
...props,
|
|
@@ -1532,10 +1506,10 @@ function Timeline(props) {
|
|
|
1532
1506
|
},
|
|
1533
1507
|
(value, step) => {
|
|
1534
1508
|
return children.map((child, index) => {
|
|
1535
|
-
if (!
|
|
1509
|
+
if (!React19.isValidElement(child)) {
|
|
1536
1510
|
return child;
|
|
1537
1511
|
}
|
|
1538
|
-
return
|
|
1512
|
+
return React19.cloneElement(child, {
|
|
1539
1513
|
// @ts-expect-error cloning
|
|
1540
1514
|
isPhantom: step < index,
|
|
1541
1515
|
isLast: step === index
|
|
@@ -1563,7 +1537,7 @@ function TimelineItem(props) {
|
|
|
1563
1537
|
opacity: getItemOpacity2({ isPhantom, isLast })
|
|
1564
1538
|
});
|
|
1565
1539
|
const colorStyles = useSpring3({ opacity: isPhantom || isLast ? 1 : 0.15 });
|
|
1566
|
-
return /* @__PURE__ */
|
|
1540
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1567
1541
|
TimelineItemStyled,
|
|
1568
1542
|
{
|
|
1569
1543
|
...rest,
|
|
@@ -1571,13 +1545,13 @@ function TimelineItem(props) {
|
|
|
1571
1545
|
...appearStyles
|
|
1572
1546
|
}
|
|
1573
1547
|
},
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
/* @__PURE__ */
|
|
1548
|
+
/* @__PURE__ */ React19.createElement(TimelineItemContentPhantom, null, /* @__PURE__ */ React19.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React19.createElement(TimelineItemBody, null, children)),
|
|
1549
|
+
/* @__PURE__ */ React19.createElement(TimelineItemGuide, { style: colorStyles }, /* @__PURE__ */ React19.createElement(Hexagon, null), /* @__PURE__ */ React19.createElement(TimelineItemGuideLine, { style: guideLineProps })),
|
|
1550
|
+
/* @__PURE__ */ React19.createElement(TimelineItemContent, null, /* @__PURE__ */ React19.createElement(TimelineItemTitle, null, title), /* @__PURE__ */ React19.createElement(TimelineItemBody, null, children))
|
|
1577
1551
|
);
|
|
1578
1552
|
}
|
|
1579
1553
|
function Hexagon() {
|
|
1580
|
-
return /* @__PURE__ */
|
|
1554
|
+
return /* @__PURE__ */ React19.createElement(
|
|
1581
1555
|
"svg",
|
|
1582
1556
|
{
|
|
1583
1557
|
width: "18",
|
|
@@ -1586,14 +1560,14 @@ function Hexagon() {
|
|
|
1586
1560
|
fill: "none",
|
|
1587
1561
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1588
1562
|
},
|
|
1589
|
-
/* @__PURE__ */
|
|
1563
|
+
/* @__PURE__ */ React19.createElement(
|
|
1590
1564
|
"path",
|
|
1591
1565
|
{
|
|
1592
1566
|
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",
|
|
1593
1567
|
fill: "#F49676"
|
|
1594
1568
|
}
|
|
1595
1569
|
),
|
|
1596
|
-
/* @__PURE__ */
|
|
1570
|
+
/* @__PURE__ */ React19.createElement(
|
|
1597
1571
|
"path",
|
|
1598
1572
|
{
|
|
1599
1573
|
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",
|
|
@@ -1604,9 +1578,9 @@ function Hexagon() {
|
|
|
1604
1578
|
}
|
|
1605
1579
|
|
|
1606
1580
|
// src/components/IconBox.tsx
|
|
1607
|
-
import
|
|
1608
|
-
import
|
|
1609
|
-
var IconBoxContent =
|
|
1581
|
+
import React20 from "react";
|
|
1582
|
+
import styled16 from "styled-components";
|
|
1583
|
+
var IconBoxContent = styled16.div`
|
|
1610
1584
|
* {
|
|
1611
1585
|
margin: 0.2rem !important;
|
|
1612
1586
|
padding: 0 !important;
|
|
@@ -1616,7 +1590,7 @@ function IconBox({
|
|
|
1616
1590
|
children,
|
|
1617
1591
|
icon
|
|
1618
1592
|
}) {
|
|
1619
|
-
return /* @__PURE__ */
|
|
1593
|
+
return /* @__PURE__ */ React20.createElement(
|
|
1620
1594
|
"div",
|
|
1621
1595
|
{
|
|
1622
1596
|
style: {
|
|
@@ -1626,14 +1600,14 @@ function IconBox({
|
|
|
1626
1600
|
padding: "1rem 0"
|
|
1627
1601
|
}
|
|
1628
1602
|
},
|
|
1629
|
-
/* @__PURE__ */
|
|
1630
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ React20.createElement("div", { style: { fontSize: 60 } }, icon),
|
|
1604
|
+
/* @__PURE__ */ React20.createElement(IconBoxContent, null, children)
|
|
1631
1605
|
);
|
|
1632
1606
|
}
|
|
1633
1607
|
|
|
1634
1608
|
// src/index.tsx
|
|
1635
1609
|
function PassThrough({ children }) {
|
|
1636
|
-
return /* @__PURE__ */
|
|
1610
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, children);
|
|
1637
1611
|
}
|
|
1638
1612
|
function Layout({
|
|
1639
1613
|
children,
|
|
@@ -1641,48 +1615,49 @@ function Layout({
|
|
|
1641
1615
|
}) {
|
|
1642
1616
|
const layout = (frontmatter == null ? void 0 : frontmatter.layout) || "default";
|
|
1643
1617
|
const Layout2 = layout in layouts_default ? layouts_default[layout] : null;
|
|
1618
|
+
console.log(layout, Layout2);
|
|
1644
1619
|
if (layout && !Layout2) {
|
|
1645
1620
|
console.warn(`Layout ${layout} not found`);
|
|
1646
1621
|
}
|
|
1647
1622
|
if (Layout2) {
|
|
1648
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ React21.createElement(Layout2, { ...frontmatter }, children);
|
|
1649
1624
|
}
|
|
1650
|
-
return /* @__PURE__ */
|
|
1625
|
+
return /* @__PURE__ */ React21.createElement(React21.Fragment, null, children);
|
|
1651
1626
|
}
|
|
1652
1627
|
var componentsMap2 = {
|
|
1653
1628
|
...map_default,
|
|
1654
1629
|
wrapper: Layout
|
|
1655
1630
|
};
|
|
1656
1631
|
function Deck({ deck }) {
|
|
1657
|
-
|
|
1632
|
+
React21.useEffect(() => {
|
|
1658
1633
|
document.title = deck.metadata.title || "Untitled";
|
|
1659
1634
|
}, [deck.metadata.title]);
|
|
1660
|
-
return /* @__PURE__ */
|
|
1635
|
+
return /* @__PURE__ */ React21.createElement(React21.StrictMode, null, /* @__PURE__ */ React21.createElement(MDXProvider, { components: componentsMap2 }, /* @__PURE__ */ React21.createElement(SpectacleDeck, { theme: theme_default, template }, deck.slides.map((slide, i) => {
|
|
1661
1636
|
const Component = slide.slideComponent;
|
|
1662
|
-
return /* @__PURE__ */
|
|
1637
|
+
return /* @__PURE__ */ React21.createElement(Slide, { key: i }, /* @__PURE__ */ React21.createElement(Component, null));
|
|
1663
1638
|
}))));
|
|
1664
1639
|
}
|
|
1665
1640
|
function Danger({ children }) {
|
|
1666
|
-
return /* @__PURE__ */
|
|
1641
|
+
return /* @__PURE__ */ React21.createElement("div", { style: { color: "red" } }, children);
|
|
1667
1642
|
}
|
|
1668
1643
|
function Information({ children }) {
|
|
1669
|
-
return /* @__PURE__ */
|
|
1644
|
+
return /* @__PURE__ */ React21.createElement("div", { style: { color: "orange" } }, children);
|
|
1670
1645
|
}
|
|
1671
1646
|
function Success({ children }) {
|
|
1672
|
-
return /* @__PURE__ */
|
|
1647
|
+
return /* @__PURE__ */ React21.createElement("div", { style: { color: "green" } }, children);
|
|
1673
1648
|
}
|
|
1674
1649
|
function Warning({ children }) {
|
|
1675
|
-
return /* @__PURE__ */
|
|
1650
|
+
return /* @__PURE__ */ React21.createElement("div", { style: { color: "yellow" } }, children);
|
|
1676
1651
|
}
|
|
1677
1652
|
function Side({ children }) {
|
|
1678
|
-
return /* @__PURE__ */
|
|
1653
|
+
return /* @__PURE__ */ React21.createElement("div", null, children);
|
|
1679
1654
|
}
|
|
1680
1655
|
Side.mdxType = "Side";
|
|
1681
1656
|
function Documentation({ children }) {
|
|
1682
|
-
return /* @__PURE__ */
|
|
1657
|
+
return /* @__PURE__ */ React21.createElement("div", null, children);
|
|
1683
1658
|
}
|
|
1684
1659
|
function Box2({ children }) {
|
|
1685
|
-
return /* @__PURE__ */
|
|
1660
|
+
return /* @__PURE__ */ React21.createElement("div", null, children);
|
|
1686
1661
|
}
|
|
1687
1662
|
export {
|
|
1688
1663
|
Box2 as Box,
|