Skip to content

Commit 578ddf3

Browse files
committed
Eject Pre component
1 parent 3567664 commit 578ddf3

File tree

8 files changed

+969
-38
lines changed

8 files changed

+969
-38
lines changed

src/_design-system/syntax/github-dark.json

Lines changed: 515 additions & 0 deletions
Large diffs are not rendered by default.

src/_design-system/syntax/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// @ts-check
2+
3+
import fs from "fs/promises"
4+
5+
const [dark, light] = await Promise.all([
6+
fs
7+
.readFile(new URL("./github-dark.json", import.meta.url), "utf-8")
8+
.then(JSON.parse),
9+
fs
10+
.readFile(new URL("./min-light.json", import.meta.url), "utf-8")
11+
.then(JSON.parse),
12+
])
13+
14+
export const syntaxHighlightingThemes = { light, dark }
Lines changed: 314 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,314 @@
1+
{
2+
"colors": {
3+
"activityBar.background": "#f6f6f6",
4+
"activityBar.foreground": "#9E9E9E",
5+
"activityBarBadge.background": "#616161",
6+
"badge.background": "#E0E0E0",
7+
"badge.foreground": "#616161",
8+
"button.background": "#757575",
9+
"button.hoverBackground": "#616161",
10+
"debugIcon.breakpointCurrentStackframeForeground": "#1976D2",
11+
"debugIcon.breakpointDisabledForeground": "#848484",
12+
"debugIcon.breakpointForeground": "#D32F2F",
13+
"debugIcon.breakpointStackframeForeground": "#1976D2",
14+
"debugIcon.continueForeground": "#6f42c1",
15+
"debugIcon.disconnectForeground": "#6f42c1",
16+
"debugIcon.pauseForeground": "#6f42c1",
17+
"debugIcon.restartForeground": "#1976D2",
18+
"debugIcon.startForeground": "#1976D2",
19+
"debugIcon.stepBackForeground": "#6f42c1",
20+
"debugIcon.stepIntoForeground": "#6f42c1",
21+
"debugIcon.stepOutForeground": "#6f42c1",
22+
"debugIcon.stepOverForeground": "#6f42c1",
23+
"debugIcon.stopForeground": "#1976D2",
24+
"diffEditor.insertedTextBackground": "#b7e7a44b",
25+
"diffEditor.removedTextBackground": "#e597af52",
26+
"editor.background": "#ffffff",
27+
"editor.foreground": "#212121",
28+
"editor.lineHighlightBorder": "#f2f2f2",
29+
"editorBracketMatch.background": "#E7F3FF",
30+
"editorBracketMatch.border": "#c8e1ff",
31+
"editorGroupHeader.tabsBackground": "#f6f6f6",
32+
"editorGroupHeader.tabsBorder": "#fff",
33+
"editorIndentGuide.background": "#EEE",
34+
"editorLineNumber.activeForeground": "#757575",
35+
"editorLineNumber.foreground": "#CCC",
36+
"editorSuggestWidget.background": "#F3F3F3",
37+
"extensionButton.prominentBackground": "#000000AA",
38+
"extensionButton.prominentHoverBackground": "#000000BB",
39+
"focusBorder": "#D0D0D0",
40+
"foreground": "#757575",
41+
"gitDecoration.ignoredResourceForeground": "#AAAAAA",
42+
"input.border": "#E9E9E9",
43+
"inputOption.activeBackground": "#EDEDED",
44+
"list.activeSelectionBackground": "#EEE",
45+
"list.activeSelectionForeground": "#212121",
46+
"list.focusBackground": "#ddd",
47+
"list.focusForeground": "#212121",
48+
"list.highlightForeground": "#212121",
49+
"list.inactiveSelectionBackground": "#E0E0E0",
50+
"list.inactiveSelectionForeground": "#212121",
51+
"panel.background": "#fff",
52+
"panel.border": "#f4f4f4",
53+
"panelTitle.activeBorder": "#fff",
54+
"panelTitle.inactiveForeground": "#BDBDBD",
55+
"peekView.border": "#E0E0E0",
56+
"peekViewEditor.background": "#f8f8f8",
57+
"pickerGroup.foreground": "#000",
58+
"progressBar.background": "#000",
59+
"scrollbar.shadow": "#FFF",
60+
"sideBar.background": "#f6f6f6",
61+
"sideBar.border": "#f6f6f6",
62+
"sideBarSectionHeader.background": "#EEE",
63+
"sideBarTitle.foreground": "#999",
64+
"statusBar.background": "#f6f6f6",
65+
"statusBar.border": "#f6f6f6",
66+
"statusBar.debuggingBackground": "#f6f6f6",
67+
"statusBar.foreground": "#7E7E7E",
68+
"statusBar.noFolderBackground": "#f6f6f6",
69+
"statusBarItem.prominentBackground": "#0000001a",
70+
"statusBarItem.remoteBackground": "#f6f6f600",
71+
"statusBarItem.remoteForeground": "#7E7E7E",
72+
"symbolIcon.classForeground": "#dd8500",
73+
"symbolIcon.constructorForeground": "#6f42c1",
74+
"symbolIcon.enumeratorForeground": "#dd8500",
75+
"symbolIcon.enumeratorMemberForeground": "#1976D2",
76+
"symbolIcon.eventForeground": "#dd8500",
77+
"symbolIcon.fieldForeground": "#1976D2",
78+
"symbolIcon.functionForeground": "#6f42c1",
79+
"symbolIcon.interfaceForeground": "#1976D2",
80+
"symbolIcon.methodForeground": "#6f42c1",
81+
"symbolIcon.variableForeground": "#1976D2",
82+
"tab.activeBorder": "#FFF",
83+
"tab.activeForeground": "#424242",
84+
"tab.border": "#f6f6f6",
85+
"tab.inactiveBackground": "#f6f6f6",
86+
"tab.inactiveForeground": "#BDBDBD",
87+
"tab.unfocusedActiveBorder": "#fff",
88+
"terminal.ansiBlack": "#333",
89+
"terminal.ansiBlue": "#e0e0e0",
90+
"terminal.ansiBrightBlack": "#a1a1a1",
91+
"terminal.ansiBrightBlue": "#6871ff",
92+
"terminal.ansiBrightCyan": "#57d9ad",
93+
"terminal.ansiBrightGreen": "#a3d900",
94+
"terminal.ansiBrightMagenta": "#a37acc",
95+
"terminal.ansiBrightRed": "#d6656a",
96+
"terminal.ansiBrightWhite": "#7E7E7E",
97+
"terminal.ansiBrightYellow": "#e7c547",
98+
"terminal.ansiCyan": "#4dbf99",
99+
"terminal.ansiGreen": "#77cc00",
100+
"terminal.ansiMagenta": "#9966cc",
101+
"terminal.ansiRed": "#D32F2F",
102+
"terminal.ansiWhite": "#c7c7c7",
103+
"terminal.ansiYellow": "#f29718",
104+
"terminal.background": "#fff",
105+
"textLink.activeForeground": "#000",
106+
"textLink.foreground": "#000",
107+
"titleBar.activeBackground": "#f6f6f6",
108+
"titleBar.border": "#FFFFFF00",
109+
"titleBar.inactiveBackground": "#f6f6f6"
110+
},
111+
"displayName": "Min Light",
112+
"name": "min-light",
113+
"tokenColors": [
114+
{
115+
"settings": {
116+
"foreground": "#24292eff"
117+
}
118+
},
119+
{
120+
"scope": [
121+
"keyword.operator.accessor",
122+
"meta.group.braces.round.function.arguments",
123+
"meta.template.expression",
124+
"markup.fenced_code meta.embedded.block",
125+
"punctuation.operation.graphql",
126+
"punctuation"
127+
],
128+
"settings": {
129+
"foreground": "#363A2C"
130+
}
131+
},
132+
{
133+
"scope": "emphasis",
134+
"settings": {
135+
"fontStyle": "italic"
136+
}
137+
},
138+
{
139+
"scope": ["strong", "markup.heading.markdown", "markup.bold.markdown"],
140+
"settings": {
141+
"fontStyle": "bold"
142+
}
143+
},
144+
{
145+
"scope": ["markup.italic.markdown"],
146+
"settings": {
147+
"fontStyle": "italic"
148+
}
149+
},
150+
{
151+
"scope": "meta.link.inline.markdown",
152+
"settings": {
153+
"fontStyle": "underline",
154+
"foreground": "#1976D2"
155+
}
156+
},
157+
{
158+
"scope": ["string", "markup.fenced_code", "markup.inline"],
159+
"settings": {
160+
"foreground": "#2b5581"
161+
}
162+
},
163+
{
164+
"scope": ["comment", "string.quoted.docstring.multi"],
165+
"settings": {
166+
"foreground": "#c2c3c5"
167+
}
168+
},
169+
{
170+
"scope": [
171+
"constant.numeric",
172+
"constant.language",
173+
"constant.other.placeholder",
174+
"constant.character.format.placeholder",
175+
"variable.language.this",
176+
"variable.other.object",
177+
"variable.other.class",
178+
"variable.other.constant",
179+
"meta.property-name",
180+
"meta.property-value",
181+
"support"
182+
],
183+
"settings": {
184+
"foreground": "#1976D2"
185+
}
186+
},
187+
{
188+
"scope": [
189+
"keyword",
190+
"storage.modifier",
191+
"storage.type",
192+
"storage.control.clojure",
193+
"entity.name.function.clojure",
194+
"entity.name.tag.yaml",
195+
"support.function.node",
196+
"support.type.property-name.json",
197+
"punctuation.separator.key-value",
198+
"punctuation.definition.template-expression"
199+
],
200+
"settings": {
201+
"foreground": "#E10198"
202+
}
203+
},
204+
{
205+
"scope": "variable.parameter.function",
206+
"settings": {
207+
"foreground": "#FF9800"
208+
}
209+
},
210+
{
211+
"scope": [
212+
"support.function",
213+
"entity.name.type",
214+
"entity.other.inherited-class",
215+
"meta.function-call",
216+
"meta.instance.constructor",
217+
"entity.other.attribute-name",
218+
"entity.name.function",
219+
"constant.keyword.clojure"
220+
],
221+
"settings": {
222+
"foreground": "#6f42c1"
223+
}
224+
},
225+
{
226+
"scope": [
227+
"entity.name.tag",
228+
"string.quoted",
229+
"string.regexp",
230+
"string.interpolated",
231+
"string.template",
232+
"string.unquoted.plain.out.yaml",
233+
"keyword.other.template"
234+
],
235+
"settings": {
236+
"foreground": "#609a06"
237+
}
238+
},
239+
{
240+
"scope": "token.info-token",
241+
"settings": {
242+
"foreground": "#316bcd"
243+
}
244+
},
245+
{
246+
"scope": "token.warn-token",
247+
"settings": {
248+
"foreground": "#cd9731"
249+
}
250+
},
251+
{
252+
"scope": "token.error-token",
253+
"settings": {
254+
"foreground": "#cd3131"
255+
}
256+
},
257+
{
258+
"scope": "token.debug-token",
259+
"settings": {
260+
"foreground": "#800080"
261+
}
262+
},
263+
{
264+
"scope": ["strong", "markup.heading.markdown", "markup.bold.markdown"],
265+
"settings": {
266+
"foreground": "#6f42c1"
267+
}
268+
},
269+
{
270+
"scope": [
271+
"punctuation.definition.arguments",
272+
"punctuation.definition.dict",
273+
"punctuation.separator",
274+
"meta.function-call.arguments"
275+
],
276+
"settings": {
277+
"foreground": "#212121"
278+
}
279+
},
280+
{
281+
"scope": [
282+
"markup.underline.link",
283+
"punctuation.definition.metadata.markdown"
284+
],
285+
"settings": {
286+
"foreground": "#609008"
287+
}
288+
},
289+
{
290+
"scope": ["beginning.punctuation.definition.list.markdown"],
291+
"settings": {
292+
"foreground": "#6f42c1"
293+
}
294+
},
295+
{
296+
"scope": [
297+
"punctuation.definition.string.begin.markdown",
298+
"punctuation.definition.string.end.markdown",
299+
"string.other.link.title.markdown",
300+
"string.other.link.description.markdown"
301+
],
302+
"settings": {
303+
"foreground": "#d32f2f"
304+
}
305+
},
306+
{
307+
"scope": ["variable.graphql"],
308+
"settings": {
309+
"foreground": "#E10198"
310+
}
311+
}
312+
],
313+
"type": "light"
314+
}

src/components/code-blocks/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
import { Code, Pre } from "nextra/components"
1+
import { Code } from "nextra/components"
2+
3+
import { Pre } from "@/components/pre"
24

35
import _CodeA from "./describe-your-data.mdx"
46
import _CodeB from "./ask-for-what-you-want.mdx"

src/components/index-page/graphql-advantages/precision.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { ComponentPropsWithoutRef, useEffect, useRef } from "react"
2-
import { Pre, Code } from "nextra/components"
2+
import { Code } from "nextra/components"
33
import { clsx } from "clsx"
44

5+
import { Pre } from "@/components/pre"
6+
57
import PredictableResult from "../../code-blocks/predictable-result.mdx"
68

79
import classes from "./precision.module.css"

0 commit comments

Comments
 (0)