Repository navigation
Expand file tree
/
Copy pathmdx-components.tsx
More file actions
137 lines (134 loc) · 3.65 KB
/
Copy pathmdx-components.tsx
File metadata and controls
137 lines (134 loc) · 3.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
import type { MDXComponents } from "mdx/types";
import { AlgorithmCard } from "@/components/learn/AlgorithmCard";
import { BuyMeCoffee } from "@/components/learn/BuyMeCoffee";
import { CompanyBoard } from "@/components/learn/CompanyBoard";
import { Contact } from "@/components/learn/Contact";
import { CrossSheetMap } from "@/components/learn/CrossSheetMap";
import { DataCampExercise } from "@/components/learn/DataCampExercise";
import { DrillDeck } from "@/components/learn/DrillDeck";
import { Figure } from "@/components/learn/Figure";
import { FileCode } from "@/components/learn/FileCode";
import { MathDrillDeck } from "@/components/learn/MathDrillDeck";
import { MockInterview } from "@/components/learn/MockInterview";
import { PhaseMap } from "@/components/learn/PhaseMap";
import { ProblemLadder } from "@/components/learn/ProblemLadder";
import { Quiz } from "@/components/learn/Quiz";
import { SheetTracker } from "@/components/learn/SheetTracker";
import { StudyPlanner } from "@/components/learn/StudyPlanner";
import { YoutuberCard } from "@/components/learn/YoutuberCard";
import { CardGrid, LinkCard } from "@/components/learn/StarlightPrimitives";
import { Callout, CalloutTitle, CalloutBody } from "@/components/learn/Aside";
/* Visualisation components, lazily loaded -- see components/learn/lazy-viz.tsx. */
import {
AnimatedShinyText,
ArrayStepper,
AutodiffGraph,
BorderBeam,
ComplexityChart,
DPTable,
DSUView,
DescentLab,
EigenLab,
ElimStepper,
GraphTraversal,
GridPathfinder,
HeapView,
HessianLab,
IntervalTimeline,
LinkedListRewire,
Marquee,
MatrixLab,
Meteors,
NormBall,
NumberTicker,
ProjectionLab,
RecursionTree,
SVDLab,
SegmentTreeView,
SpanExplorer,
Spotlight,
StackMachine,
StateMachineView,
SurfaceGrad,
TaylorLab,
TreeWalker,
TrieView,
} from "@/components/learn/lazy-viz";
/**
* Components available to every MDX page, without the page importing them.
*
* GENERATED by scripts/gen-mdx-components.mjs from
* migration/mdx-component-list.json. Add a component there, not here.
*
* The Astro build required each page to import what it used, which is why
* 1062 of the 1190 content files opened with an import line and a run of
* `../`. Supplying them here let the migration delete those lines instead of
* rewriting a thousand relative paths -- and an author adding a quiz to a new
* page no longer counts directories.
*
* Five components carried almost all of that coupling: DataCampExercise (792
* files), Quiz (595), Figure (292), FileCode (203), ProblemLadder (118).
*/
export function getMDXComponents(components?: MDXComponents): MDXComponents {
return {
AlgorithmCard,
BuyMeCoffee,
CompanyBoard,
Contact,
CrossSheetMap,
DataCampExercise,
DrillDeck,
Figure,
FileCode,
MathDrillDeck,
MockInterview,
PhaseMap,
ProblemLadder,
Quiz,
SheetTracker,
StudyPlanner,
YoutuberCard,
CardGrid,
LinkCard,
Callout,
CalloutTitle,
CalloutBody,
AnimatedShinyText,
ArrayStepper,
AutodiffGraph,
BorderBeam,
ComplexityChart,
DPTable,
DSUView,
DescentLab,
EigenLab,
ElimStepper,
GraphTraversal,
GridPathfinder,
HeapView,
HessianLab,
IntervalTimeline,
LinkedListRewire,
Marquee,
MatrixLab,
Meteors,
NormBall,
NumberTicker,
ProjectionLab,
RecursionTree,
SVDLab,
SegmentTreeView,
SpanExplorer,
Spotlight,
StackMachine,
StateMachineView,
SurfaceGrad,
TaylorLab,
TreeWalker,
TrieView,
/* content uses <Youtuber> for YoutuberCard */
Youtuber: YoutuberCard,
...components,
};
}
export default getMDXComponents;