diff --git a/apps/guide/contentlayer.config.ts b/apps/guide/contentlayer.config.ts index 22cd0488d..bd5f4afd5 100644 --- a/apps/guide/contentlayer.config.ts +++ b/apps/guide/contentlayer.config.ts @@ -6,7 +6,6 @@ import { defineDocumentType, makeSource } from 'contentlayer/source-files'; // import rehypeAutolinkHeadings from 'rehype-autolink-headings'; import rehypeSlug from 'rehype-slug'; import remarkGfm from 'remark-gfm'; -import themeGitHubDarkDimmed from './src/assets/github-dark-dimmed.json'; export const Content = defineDocumentType(() => ({ name: 'Content', @@ -68,7 +67,7 @@ export default makeSource({ contentDirPath: 'src/content', documentTypes: [Content], mdx: { - remarkPlugins: [remarkGfm, [remarkCodeHike, { theme: themeGitHubDarkDimmed, lineNumbers: true }]], + remarkPlugins: [remarkGfm, [remarkCodeHike, { theme: 'css-variables', lineNumbers: true }]], rehypePlugins: [ rehypeSlug, // [ diff --git a/apps/guide/package.json b/apps/guide/package.json index f8e8213b9..a441f2e17 100644 --- a/apps/guide/package.json +++ b/apps/guide/package.json @@ -43,7 +43,7 @@ }, "homepage": "https://discord.js.org", "dependencies": { - "@code-hike/mdx": "^0.8.1", + "@code-hike/mdx": "^0.7.5-next.0", "@discordjs/ui": "workspace:^", "@react-icons/all-files": "^4.1.0", "@vercel/analytics": "^0.1.11", diff --git a/apps/guide/src/app/layout.tsx b/apps/guide/src/app/layout.tsx index 9675e0373..f94a43fa5 100644 --- a/apps/guide/src/app/layout.tsx +++ b/apps/guide/src/app/layout.tsx @@ -9,6 +9,7 @@ import '@unocss/reset/tailwind-compat.css'; import '~/styles/unocss.css'; import '~/styles/cmdk.css'; import '@code-hike/mdx/styles.css'; +import '~/styles/ch.css'; import '~/styles/main.css'; export const metadata: Metadata = { diff --git a/apps/guide/src/assets/github-dark-dimmed.json b/apps/guide/src/assets/github-dark-dimmed.json deleted file mode 100644 index cace76bd8..000000000 --- a/apps/guide/src/assets/github-dark-dimmed.json +++ /dev/null @@ -1,597 +0,0 @@ -{ - "name": "github-dark-dimmed", - "colors": { - "focusBorder": "#316dca", - "foreground": "#adbac7", - "descriptionForeground": "#768390", - "errorForeground": "#e5534b", - "textLink.foreground": "#539bf5", - "textLink.activeForeground": "#539bf5", - "textBlockQuote.background": "#1c2128", - "textBlockQuote.border": "#444c56", - "textCodeBlock.background": "#636e7b66", - "textPreformat.foreground": "#768390", - "textSeparator.foreground": "#373e47", - "icon.foreground": "#768390", - "keybindingLabel.foreground": "#adbac7", - "button.background": "#347d39", - "button.foreground": "#ffffff", - "button.hoverBackground": "#46954a", - "button.secondaryBackground": "#3d444d", - "button.secondaryForeground": "#adbac7", - "button.secondaryHoverBackground": "#444c56", - "checkbox.background": "#2d333b", - "checkbox.border": "#444c56", - "dropdown.background": "#2d333b", - "dropdown.border": "#444c56", - "dropdown.foreground": "#adbac7", - "dropdown.listBackground": "#2d333b", - "input.background": "#22272e", - "input.border": "#444c56", - "input.foreground": "#adbac7", - "input.placeholderForeground": "#636e7b", - "badge.foreground": "#cdd9e5", - "badge.background": "#316dca", - "progressBar.background": "#316dca", - "titleBar.activeForeground": "#768390", - "titleBar.activeBackground": "#22272e", - "titleBar.inactiveForeground": "#768390", - "titleBar.inactiveBackground": "#1c2128", - "titleBar.border": "#444c56", - "activityBar.foreground": "#adbac7", - "activityBar.inactiveForeground": "#768390", - "activityBar.background": "#22272e", - "activityBarBadge.foreground": "#cdd9e5", - "activityBarBadge.background": "#316dca", - "activityBar.activeBorder": "#ec775c", - "activityBar.border": "#444c56", - "sideBar.foreground": "#adbac7", - "sideBar.background": "#1c2128", - "sideBar.border": "#444c56", - "sideBarTitle.foreground": "#adbac7", - "sideBarSectionHeader.foreground": "#adbac7", - "sideBarSectionHeader.background": "#1c2128", - "sideBarSectionHeader.border": "#444c56", - "list.hoverForeground": "#adbac7", - "list.inactiveSelectionForeground": "#adbac7", - "list.activeSelectionForeground": "#adbac7", - "list.hoverBackground": "#636e7b1a", - "list.inactiveSelectionBackground": "#636e7b66", - "list.activeSelectionBackground": "#636e7b66", - "list.focusForeground": "#adbac7", - "list.focusBackground": "#4184e426", - "list.inactiveFocusBackground": "#4184e426", - "list.highlightForeground": "#539bf5", - "tree.indentGuidesStroke": "#373e47", - "notificationCenterHeader.foreground": "#768390", - "notificationCenterHeader.background": "#2d333b", - "notifications.foreground": "#adbac7", - "notifications.background": "#2d333b", - "notifications.border": "#444c56", - "notificationsErrorIcon.foreground": "#e5534b", - "notificationsWarningIcon.foreground": "#c69026", - "notificationsInfoIcon.foreground": "#539bf5", - "pickerGroup.border": "#444c56", - "pickerGroup.foreground": "#768390", - "quickInput.background": "#2d333b", - "quickInput.foreground": "#adbac7", - "statusBar.foreground": "#768390", - "statusBar.background": "#22272e", - "statusBar.border": "#444c56", - "statusBar.focusBorder": "#316dca80", - "statusBar.noFolderBackground": "#22272e", - "statusBar.debuggingForeground": "#cdd9e5", - "statusBar.debuggingBackground": "#c93c37", - "statusBarItem.prominentBackground": "#636e7b66", - "statusBarItem.remoteForeground": "#adbac7", - "statusBarItem.remoteBackground": "#444c56", - "statusBarItem.hoverBackground": "#adbac714", - "statusBarItem.activeBackground": "#adbac71f", - "statusBarItem.focusBorder": "#316dca", - "editorGroupHeader.tabsBackground": "#1c2128", - "editorGroupHeader.tabsBorder": "#444c56", - "editorGroup.border": "#444c56", - "tab.activeForeground": "#adbac7", - "tab.inactiveForeground": "#768390", - "tab.inactiveBackground": "#1c2128", - "tab.activeBackground": "#22272e", - "tab.hoverBackground": "#22272e", - "tab.unfocusedHoverBackground": "#636e7b1a", - "tab.border": "#444c56", - "tab.unfocusedActiveBorderTop": "#444c56", - "tab.activeBorder": "#22272e", - "tab.unfocusedActiveBorder": "#22272e", - "tab.activeBorderTop": "#ec775c", - "breadcrumb.foreground": "#768390", - "breadcrumb.focusForeground": "#adbac7", - "breadcrumb.activeSelectionForeground": "#768390", - "breadcrumbPicker.background": "#2d333b", - "editor.foreground": "#adbac7", - "editor.background": "#22272e", - "editorWidget.background": "#2d333b", - "editor.foldBackground": "#636e7b1a", - "editor.lineHighlightBackground": "#636e7b1a", - "editorLineNumber.foreground": "#636e7b", - "editorLineNumber.activeForeground": "#adbac7", - "editorIndentGuide.background": "#adbac71f", - "editorIndentGuide.activeBackground": "#adbac73d", - "editorWhitespace.foreground": "#545d68", - "editorCursor.foreground": "#539bf5", - "editor.findMatchBackground": "#966600", - "editor.findMatchHighlightBackground": "#eac55f80", - "editor.linkedEditingBackground": "#539bf512", - "editor.selectionHighlightBackground": "#57ab5a40", - "editor.wordHighlightBackground": "#636e7b80", - "editor.wordHighlightBorder": "#636e7b99", - "editor.wordHighlightStrongBackground": "#636e7b4d", - "editor.wordHighlightStrongBorder": "#636e7b99", - "editorBracketMatch.background": "#57ab5a40", - "editorBracketMatch.border": "#57ab5a99", - "editorInlayHint.background": "#76839033", - "editorInlayHint.foreground": "#768390", - "editorInlayHint.typeBackground": "#76839033", - "editorInlayHint.typeForeground": "#768390", - "editorInlayHint.paramBackground": "#76839033", - "editorInlayHint.paramForeground": "#768390", - "editorGutter.modifiedBackground": "#ae7c1466", - "editorGutter.addedBackground": "#46954a66", - "editorGutter.deletedBackground": "#e5534b66", - "diffEditor.insertedLineBackground": "#347d3926", - "diffEditor.insertedTextBackground": "#57ab5a4d", - "diffEditor.removedLineBackground": "#c93c3726", - "diffEditor.removedTextBackground": "#f470674d", - "scrollbar.shadow": "#545d6833", - "scrollbarSlider.background": "#76839033", - "scrollbarSlider.hoverBackground": "#7683903d", - "scrollbarSlider.activeBackground": "#76839047", - "editorOverviewRuler.border": "#1c2128", - "minimapSlider.background": "#76839033", - "minimapSlider.hoverBackground": "#7683903d", - "minimapSlider.activeBackground": "#76839047", - "panel.background": "#1c2128", - "panel.border": "#444c56", - "panelTitle.activeBorder": "#ec775c", - "panelTitle.activeForeground": "#adbac7", - "panelTitle.inactiveForeground": "#768390", - "panelInput.border": "#444c56", - "debugIcon.breakpointForeground": "#e5534b", - "debugConsole.infoForeground": "#768390", - "debugConsole.warningForeground": "#c69026", - "debugConsole.errorForeground": "#ff938a", - "debugConsole.sourceForeground": "#daaa3f", - "debugConsoleInputIcon.foreground": "#b083f0", - "debugTokenExpression.name": "#6cb6ff", - "debugTokenExpression.value": "#96d0ff", - "debugTokenExpression.string": "#96d0ff", - "debugTokenExpression.boolean": "#6bc46d", - "debugTokenExpression.number": "#6bc46d", - "debugTokenExpression.error": "#ff938a", - "symbolIcon.arrayForeground": "#e0823d", - "symbolIcon.booleanForeground": "#539bf5", - "symbolIcon.classForeground": "#e0823d", - "symbolIcon.colorForeground": "#6cb6ff", - "symbolIcon.constructorForeground": "#dcbdfb", - "symbolIcon.enumeratorForeground": "#e0823d", - "symbolIcon.enumeratorMemberForeground": "#539bf5", - "symbolIcon.eventForeground": "#636e7b", - "symbolIcon.fieldForeground": "#e0823d", - "symbolIcon.fileForeground": "#c69026", - "symbolIcon.folderForeground": "#c69026", - "symbolIcon.functionForeground": "#b083f0", - "symbolIcon.interfaceForeground": "#e0823d", - "symbolIcon.keyForeground": "#539bf5", - "symbolIcon.keywordForeground": "#f47067", - "symbolIcon.methodForeground": "#b083f0", - "symbolIcon.moduleForeground": "#f47067", - "symbolIcon.namespaceForeground": "#f47067", - "symbolIcon.nullForeground": "#539bf5", - "symbolIcon.numberForeground": "#57ab5a", - "symbolIcon.objectForeground": "#e0823d", - "symbolIcon.operatorForeground": "#6cb6ff", - "symbolIcon.packageForeground": "#e0823d", - "symbolIcon.propertyForeground": "#e0823d", - "symbolIcon.referenceForeground": "#539bf5", - "symbolIcon.snippetForeground": "#539bf5", - "symbolIcon.stringForeground": "#6cb6ff", - "symbolIcon.structForeground": "#e0823d", - "symbolIcon.textForeground": "#6cb6ff", - "symbolIcon.typeParameterForeground": "#6cb6ff", - "symbolIcon.unitForeground": "#539bf5", - "symbolIcon.variableForeground": "#e0823d", - "symbolIcon.constantForeground": [ - "#b4f1b4", - "#8ddb8c", - "#6bc46d", - "#57ab5a", - "#46954a", - "#347d39", - "#2b6a30", - "#245829", - "#1b4721", - "#113417" - ], - "terminal.foreground": "#adbac7", - "terminal.ansiBlack": "#545d68", - "terminal.ansiRed": "#f47067", - "terminal.ansiGreen": "#57ab5a", - "terminal.ansiYellow": "#c69026", - "terminal.ansiBlue": "#539bf5", - "terminal.ansiMagenta": "#b083f0", - "terminal.ansiCyan": "#39c5cf", - "terminal.ansiWhite": "#909dab", - "terminal.ansiBrightBlack": "#636e7b", - "terminal.ansiBrightRed": "#ff938a", - "terminal.ansiBrightGreen": "#6bc46d", - "terminal.ansiBrightYellow": "#daaa3f", - "terminal.ansiBrightBlue": "#6cb6ff", - "terminal.ansiBrightMagenta": "#dcbdfb", - "terminal.ansiBrightCyan": "#56d4dd", - "terminal.ansiBrightWhite": "#cdd9e5", - "editorBracketHighlight.foreground1": "#6cb6ff", - "editorBracketHighlight.foreground2": "#6bc46d", - "editorBracketHighlight.foreground3": "#daaa3f", - "editorBracketHighlight.foreground4": "#ff938a", - "editorBracketHighlight.foreground5": "#fc8dc7", - "editorBracketHighlight.foreground6": "#dcbdfb", - "editorBracketHighlight.unexpectedBracket.foreground": "#768390", - "gitDecoration.addedResourceForeground": "#57ab5a", - "gitDecoration.modifiedResourceForeground": "#c69026", - "gitDecoration.deletedResourceForeground": "#e5534b", - "gitDecoration.untrackedResourceForeground": "#57ab5a", - "gitDecoration.ignoredResourceForeground": "#636e7b", - "gitDecoration.conflictingResourceForeground": "#cc6b2c", - "gitDecoration.submoduleResourceForeground": "#768390", - "debugToolBar.background": "#2d333b", - "editor.stackFrameHighlightBackground": "#ae7c1466", - "editor.focusedStackFrameHighlightBackground": "#46954a66", - "peekViewEditor.matchHighlightBackground": "#ae7c1466", - "peekViewResult.matchHighlightBackground": "#ae7c1466", - "peekViewEditor.background": "#636e7b1a", - "peekViewResult.background": "#22272e", - "settings.headerForeground": "#adbac7", - "settings.modifiedItemIndicator": "#ae7c1466", - "welcomePage.buttonBackground": "#373e47", - "welcomePage.buttonHoverBackground": "#444c56" - }, - "semanticHighlighting": true, - "tokenColors": [ - { - "scope": ["comment", "punctuation.definition.comment", "string.comment"], - "settings": { - "foreground": "#768390" - } - }, - { - "scope": ["constant.other.placeholder", "constant.character"], - "settings": { - "foreground": "#f47067" - } - }, - { - "scope": [ - "constant", - "entity.name.constant", - "variable.other.constant", - "variable.other.enummember", - "variable.language", - "entity" - ], - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": ["entity.name", "meta.export.default", "meta.definition.variable"], - "settings": { - "foreground": "#f69d50" - } - }, - { - "scope": [ - "variable.parameter.function", - "meta.jsx.children", - "meta.block", - "meta.tag.attributes", - "entity.name.constant", - "meta.object.member", - "meta.embedded.expression" - ], - "settings": { - "foreground": "#adbac7" - } - }, - { - "scope": "entity.name.function", - "settings": { - "foreground": "#dcbdfb" - } - }, - { - "scope": ["entity.name.tag", "support.class.component"], - "settings": { - "foreground": "#8ddb8c" - } - }, - { - "scope": "keyword", - "settings": { - "foreground": "#f47067" - } - }, - { - "scope": ["storage", "storage.type"], - "settings": { - "foreground": "#f47067" - } - }, - { - "scope": ["storage.modifier.package", "storage.modifier.import", "storage.type.java"], - "settings": { - "foreground": "#adbac7" - } - }, - { - "scope": ["string", "string punctuation.section.embedded source"], - "settings": { - "foreground": "#96d0ff" - } - }, - { - "scope": "support", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": "meta.property-name", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": "variable", - "settings": { - "foreground": "#f69d50" - } - }, - { - "scope": "variable.other", - "settings": { - "foreground": "#adbac7" - } - }, - { - "scope": "invalid.broken", - "settings": { - "fontStyle": "italic", - "foreground": "#ff938a" - } - }, - { - "scope": "invalid.deprecated", - "settings": { - "fontStyle": "italic", - "foreground": "#ff938a" - } - }, - { - "scope": "invalid.illegal", - "settings": { - "fontStyle": "italic", - "foreground": "#ff938a" - } - }, - { - "scope": "invalid.unimplemented", - "settings": { - "fontStyle": "italic", - "foreground": "#ff938a" - } - }, - { - "scope": "carriage-return", - "settings": { - "fontStyle": "italic underline", - "background": "#f47067", - "foreground": "#cdd9e5", - "content": "^M" - } - }, - { - "scope": "message.error", - "settings": { - "foreground": "#ff938a" - } - }, - { - "scope": "string variable", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": ["source.regexp", "string.regexp"], - "settings": { - "foreground": "#96d0ff" - } - }, - { - "scope": [ - "string.regexp.character-class", - "string.regexp constant.character.escape", - "string.regexp source.ruby.embedded", - "string.regexp string.regexp.arbitrary-repitition" - ], - "settings": { - "foreground": "#96d0ff" - } - }, - { - "scope": "string.regexp constant.character.escape", - "settings": { - "fontStyle": "bold", - "foreground": "#8ddb8c" - } - }, - { - "scope": "support.constant", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": "support.variable", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": "support.type.property-name.json", - "settings": { - "foreground": "#8ddb8c" - } - }, - { - "scope": "meta.module-reference", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": "punctuation.definition.list.begin.markdown", - "settings": { - "foreground": "#f69d50" - } - }, - { - "scope": ["markup.heading", "markup.heading entity.name"], - "settings": { - "fontStyle": "bold", - "foreground": "#6cb6ff" - } - }, - { - "scope": "markup.quote", - "settings": { - "foreground": "#8ddb8c" - } - }, - { - "scope": "markup.italic", - "settings": { - "fontStyle": "italic", - "foreground": "#adbac7" - } - }, - { - "scope": "markup.bold", - "settings": { - "fontStyle": "bold", - "foreground": "#adbac7" - } - }, - { - "scope": ["markup.underline"], - "settings": { - "fontStyle": "underline" - } - }, - { - "scope": ["markup.strikethrough"], - "settings": { - "fontStyle": "strikethrough" - } - }, - { - "scope": "markup.inline.raw", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": ["markup.deleted", "meta.diff.header.from-file", "punctuation.definition.deleted"], - "settings": { - "background": "#5d0f12", - "foreground": "#ff938a" - } - }, - { - "scope": ["punctuation.section.embedded"], - "settings": { - "foreground": "#f47067" - } - }, - { - "scope": ["markup.inserted", "meta.diff.header.to-file", "punctuation.definition.inserted"], - "settings": { - "background": "#113417", - "foreground": "#8ddb8c" - } - }, - { - "scope": ["markup.changed", "punctuation.definition.changed"], - "settings": { - "background": "#682d0f", - "foreground": "#f69d50" - } - }, - { - "scope": ["markup.ignored", "markup.untracked"], - "settings": { - "foreground": "#2d333b", - "background": "#6cb6ff" - } - }, - { - "scope": "meta.diff.range", - "settings": { - "foreground": "#dcbdfb", - "fontStyle": "bold" - } - }, - { - "scope": "meta.diff.header", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": "meta.separator", - "settings": { - "fontStyle": "bold", - "foreground": "#6cb6ff" - } - }, - { - "scope": "meta.output", - "settings": { - "foreground": "#6cb6ff" - } - }, - { - "scope": [ - "brackethighlighter.tag", - "brackethighlighter.curly", - "brackethighlighter.round", - "brackethighlighter.square", - "brackethighlighter.angle", - "brackethighlighter.quote" - ], - "settings": { - "foreground": "#768390" - } - }, - { - "scope": "brackethighlighter.unmatched", - "settings": { - "foreground": "#ff938a" - } - }, - { - "scope": ["constant.other.reference.link", "string.other.link"], - "settings": { - "foreground": "#96d0ff" - } - } - ] -} diff --git a/apps/guide/src/styles/ch.css b/apps/guide/src/styles/ch.css new file mode 100644 index 000000000..e52c043ec --- /dev/null +++ b/apps/guide/src/styles/ch.css @@ -0,0 +1,82 @@ +:root { + --shiki-color-text: #24292eff; + --shiki-color-background: #ffffff; + --shiki-token-constant: #1976d2; + --shiki-token-string: #6f42c1; + --shiki-token-comment: #c2c3c5; + --shiki-token-keyword: #d32f2f; + --shiki-token-parameter: #ff9800; + --shiki-token-function: #6f42c1; + --shiki-token-string-expression: #22863a; + --shiki-token-punctuation: #212121; + --shiki-token-link: #22863a; + + --ch-tabs-bg: #f6f6f6; + --ch-tab-border: #f6f6f6; + --ch-tab-active-border: #fff; + --ch-tab-active-bg: #24292eff; + --ch-tab-inactive-color: #bdbdbd; + --ch-tab-inactive-bg: #f6f6f6; + --ch-icon-text: #24292eff; +} + +.ch-code, +.ch-inline-code > code { + background: var(--shiki-color-background) !important; +} + +.ch-code { + color-scheme: light !important; +} + +.ch-code-multiline-mark { + background: rgba(253, 255, 0, 0.2) !important; +} + +.ch-codegroup .ch-editor-button, +.ch-codeblock .ch-code-button { + color: var(--ch-icon-text) !important; +} + +div.ch-editor-tab-active { + color: var(--ch-tab-active-color) !important; +} + +html.dark { + --shiki-color-text: #adbac7; + --shiki-color-background: #22272e; + --shiki-token-constant: #f47067; + --shiki-token-string: #96d0ff; + --shiki-token-comment: #768390; + --shiki-token-keyword: #f47067; + --shiki-token-parameter: #adbac7; + --shiki-token-function: #dcbdfb; + --shiki-token-string-expression: #8ddb8c; + --shiki-token-punctuation: #adbac7; + --shiki-token-link: #adbac7; + + --ch-tabs-bg: #1c2128; + --ch-tab-border: #444c56; + --ch-tab-active-border: #22272e; + --ch-tab-active-bg: #22272e; + --ch-tab-inactive-color: #768390; + --ch-tab-inactive-bg: #1c2128; + --ch-icon-text: #768390; +} + +.dark .ch-codegroup .ch-editor-button, +.ch-codeblock .ch-code-button { + color: var(--ch-icon-text) !important; +} + +.dark div.ch-editor-tab-active { + color: var(--ch-tab-active-color) !important; +} + +.dark .ch-code { + color-scheme: dark !important; +} + +.dark .ch-code-multiline-mark { + background: rgba(255, 255, 255, 0.043) !important; +} diff --git a/yarn.lock b/yarn.lock index dccbdf945..e3bc329e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1492,23 +1492,21 @@ __metadata: languageName: node linkType: hard -"@code-hike/lighter@npm:^0.5.2": - version: 0.5.2 - resolution: "@code-hike/lighter@npm:0.5.2" - checksum: 436e8da6cc19821d972c1a430fc80a0c5a3188a754dc0c0f03f96081e51e9fff1bec783e5c9d10242265c1e9a4910b7cc53b2b8a844408ba81ddf1a3f37f913b - languageName: node - linkType: hard - -"@code-hike/mdx@npm:^0.8.1": - version: 0.8.1 - resolution: "@code-hike/mdx@npm:0.8.1" +"@code-hike/mdx@npm:^0.7.5-next.0": + version: 0.7.5-next.0 + resolution: "@code-hike/mdx@npm:0.7.5-next.0" dependencies: - "@code-hike/lighter": ^0.5.2 + hast-util-to-estree: ^1.4.0 + is-plain-obj: ^3.0.0 node-fetch: ^2.0.0 + remark-rehype: ^8.1.0 shiki: ^0.10.1 + unified: ^9.2.2 + unist-util-visit: ^2.0.0 + unist-util-visit-parents: ^3.0.0 peerDependencies: react: ^16.8.3 || ^17 || ^18 - checksum: 32c3782335d2d88c2773d7850699780574df80b3c5494a805d1024d440782b33cc88e3e6ff6635074272caa30315be81ed404fa1aa7f626c9e107b80c4a65aa1 + checksum: 8f5fc6093ab1f6b1401ce2b1037e66a9b0c24bc76822a900f41bb0b56e6ca8074deb436131379757f49cae9eb5a4f530ed4c09e304d00b436bddd5285f1a71c9 languageName: node linkType: hard @@ -2071,7 +2069,7 @@ __metadata: version: 0.0.0-use.local resolution: "@discordjs/guide@workspace:apps/guide" dependencies: - "@code-hike/mdx": ^0.8.1 + "@code-hike/mdx": ^0.7.5-next.0 "@discordjs/ui": "workspace:^" "@next/bundle-analyzer": ^13.2.4 "@react-icons/all-files": ^4.1.0 @@ -5635,7 +5633,7 @@ __metadata: languageName: node linkType: hard -"@types/unist@npm:*, @types/unist@npm:^2.0.0": +"@types/unist@npm:*, @types/unist@npm:^2.0.0, @types/unist@npm:^2.0.2": version: 2.0.6 resolution: "@types/unist@npm:2.0.6" checksum: 25cb860ff10dde48b54622d58b23e66214211a61c84c0f15f88d38b61aa1b53d4d46e42b557924a93178c501c166aa37e28d7f6d994aba13d24685326272d5db @@ -7296,6 +7294,13 @@ __metadata: languageName: node linkType: hard +"bail@npm:^1.0.0": + version: 1.0.5 + resolution: "bail@npm:1.0.5" + checksum: 6c334940d7eaa4e656a12fb12407b6555649b6deb6df04270fa806e0da82684ebe4a4e47815b271c794b40f8d6fa286e0c248b14ddbabb324a917fab09b7301a + languageName: node + linkType: hard + "bail@npm:^2.0.0": version: 2.0.2 resolution: "bail@npm:2.0.2" @@ -8331,6 +8336,13 @@ __metadata: languageName: node linkType: hard +"comma-separated-tokens@npm:^1.0.0": + version: 1.0.8 + resolution: "comma-separated-tokens@npm:1.0.8" + checksum: 0adcb07174fa4d08cf0f5c8e3aec40a36b5ff0c2c720e5e23f50fe02e6789d1d00a67036c80e0c1e1539f41d3e7f0101b074039dd833b4e4a59031b659d6ca0d + languageName: node + linkType: hard + "comma-separated-tokens@npm:^2.0.0": version: 2.0.3 resolution: "comma-separated-tokens@npm:2.0.3" @@ -11069,6 +11081,13 @@ __metadata: languageName: node linkType: hard +"estree-util-attach-comments@npm:^1.0.0": + version: 1.0.0 + resolution: "estree-util-attach-comments@npm:1.0.0" + checksum: 8a3279dd859afa168d8832f5d88c6b6f62a0997fb30ebce0090f15ef216246bf17d88bbd10f3b404937ff096be63218ecf551e4966eec572d0dc8d527454ff02 + languageName: node + linkType: hard + "estree-util-attach-comments@npm:^2.0.0": version: 2.1.1 resolution: "estree-util-attach-comments@npm:2.1.1" @@ -11089,7 +11108,7 @@ __metadata: languageName: node linkType: hard -"estree-util-is-identifier-name@npm:^1.0.0": +"estree-util-is-identifier-name@npm:^1.0.0, estree-util-is-identifier-name@npm:^1.1.0": version: 1.1.0 resolution: "estree-util-is-identifier-name@npm:1.1.0" checksum: ec55a74708b2fdac7de8d5a1dd82caf36783993608f11b8bc0dcd3b426746ccf21ee7da86ab94e4500c292dc1dde48b7ce65e5dc41f3dc4363a499ea15db32cc @@ -12695,6 +12714,23 @@ __metadata: languageName: node linkType: hard +"hast-util-to-estree@npm:^1.4.0": + version: 1.4.0 + resolution: "hast-util-to-estree@npm:1.4.0" + dependencies: + comma-separated-tokens: ^1.0.0 + estree-util-attach-comments: ^1.0.0 + estree-util-is-identifier-name: ^1.1.0 + hast-util-whitespace: ^1.0.0 + property-information: ^5.0.0 + space-separated-tokens: ^1.0.0 + style-to-object: ^0.3.0 + unist-util-position: ^3.1.0 + zwitch: ^1.0.0 + checksum: 00eb3e0b807fced6452b690751b8122a438bd0f761965a9c9d6580d58384b9be0a71e772d47e755507d6158b5f263e736a53acd3d16ad28cf9c624b7c82792e1 + languageName: node + linkType: hard + "hast-util-to-estree@npm:^2.0.0": version: 2.3.2 resolution: "hast-util-to-estree@npm:2.3.2" @@ -12760,6 +12796,13 @@ __metadata: languageName: node linkType: hard +"hast-util-whitespace@npm:^1.0.0": + version: 1.0.4 + resolution: "hast-util-whitespace@npm:1.0.4" + checksum: b7f4a1942bc78239a6fe4741aca34e3e7f84487e15e2cd2b6ca07bbba3055571763d877d7c077d7a2a029ede7500bc50a62af7b6dfe88e0644b16228b91dee0d + languageName: node + linkType: hard + "hast-util-whitespace@npm:^2.0.0": version: 2.0.1 resolution: "hast-util-whitespace@npm:2.0.1" @@ -13560,7 +13603,7 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:2.1.0": +"is-plain-obj@npm:2.1.0, is-plain-obj@npm:^2.0.0": version: 2.1.0 resolution: "is-plain-obj@npm:2.1.0" checksum: cec9100678b0a9fe0248a81743041ed990c2d4c99f893d935545cfbc42876cbe86d207f3b895700c690ad2fa520e568c44afc1605044b535a7820c1d40e38daa @@ -15483,6 +15526,15 @@ __metadata: languageName: node linkType: hard +"mdast-util-definitions@npm:^4.0.0": + version: 4.0.0 + resolution: "mdast-util-definitions@npm:4.0.0" + dependencies: + unist-util-visit: ^2.0.0 + checksum: 2325f20b82b3fb8cb5fda77038ee0bbdd44f82cfca7c48a854724b58bc1fe5919630a3ce7c45e210726df59d46c881d020b2da7a493bfd1ee36eb2bbfef5d78e + languageName: node + linkType: hard + "mdast-util-definitions@npm:^5.0.0": version: 5.1.2 resolution: "mdast-util-definitions@npm:5.1.2" @@ -15703,6 +15755,22 @@ __metadata: languageName: node linkType: hard +"mdast-util-to-hast@npm:^10.2.0": + version: 10.2.0 + resolution: "mdast-util-to-hast@npm:10.2.0" + dependencies: + "@types/mdast": ^3.0.0 + "@types/unist": ^2.0.0 + mdast-util-definitions: ^4.0.0 + mdurl: ^1.0.0 + unist-builder: ^2.0.0 + unist-util-generated: ^1.0.0 + unist-util-position: ^3.0.0 + unist-util-visit: ^2.0.0 + checksum: 72df2dd9bfa2d07b4750a333444f82e0f3752dae75b6e300cf0a716407a185eb75095a54ecad90cbd6f6d133b20dea8844ff76c1ea78612550de170b43d4fa85 + languageName: node + linkType: hard + "mdast-util-to-hast@npm:^11.0.0": version: 11.3.0 resolution: "mdast-util-to-hast@npm:11.3.0" @@ -18436,6 +18504,15 @@ __metadata: languageName: node linkType: hard +"property-information@npm:^5.0.0": + version: 5.6.0 + resolution: "property-information@npm:5.6.0" + dependencies: + xtend: ^4.0.0 + checksum: fcf87c6542e59a8bbe31ca0b3255a4a63ac1059b01b04469680288998bcfa97f341ca989566adbb63975f4d85339030b82320c324a511532d390910d1c583893 + languageName: node + linkType: hard + "property-information@npm:^6.0.0": version: 6.2.0 resolution: "property-information@npm:6.2.0" @@ -19334,6 +19411,15 @@ __metadata: languageName: node linkType: hard +"remark-rehype@npm:^8.1.0": + version: 8.1.0 + resolution: "remark-rehype@npm:8.1.0" + dependencies: + mdast-util-to-hast: ^10.2.0 + checksum: e1152464cfa83c14b570b1cb85eb9b3667795b5bed2f6b16d1c6e96c369816b07945a3c04eb0e1fd57a19cc1837969527d0056d5b6d179f1290688db2a7e2c5f + languageName: node + linkType: hard + "remark-rehype@npm:^9.0.0": version: 9.1.0 resolution: "remark-rehype@npm:9.1.0" @@ -20266,6 +20352,13 @@ __metadata: languageName: node linkType: hard +"space-separated-tokens@npm:^1.0.0": + version: 1.1.5 + resolution: "space-separated-tokens@npm:1.1.5" + checksum: 8ef68f1cfa8ccad316b7f8d0df0919d0f1f6d32101e8faeee34ea3a923ce8509c1ad562f57388585ee4951e92d27afa211ed0a077d3d5995b5ba9180331be708 + languageName: node + linkType: hard + "space-separated-tokens@npm:^2.0.0": version: 2.0.2 resolution: "space-separated-tokens@npm:2.0.2" @@ -20786,6 +20879,15 @@ __metadata: languageName: node linkType: hard +"style-to-object@npm:^0.3.0": + version: 0.3.0 + resolution: "style-to-object@npm:0.3.0" + dependencies: + inline-style-parser: 0.1.1 + checksum: 4d7084015207f2a606dfc10c29cb5ba569f2fe8005551df7396110dd694d6ff650f2debafa95bd5d147dfb4ca50f57868e2a7f91bf5d11ef734fe7ccbd7abf59 + languageName: node + linkType: hard + "style-to-object@npm:^0.4.1": version: 0.4.1 resolution: "style-to-object@npm:0.4.1" @@ -21347,6 +21449,13 @@ __metadata: languageName: node linkType: hard +"trough@npm:^1.0.0": + version: 1.0.5 + resolution: "trough@npm:1.0.5" + checksum: d6c8564903ed00e5258bab92134b020724dbbe83148dc72e4bf6306c03ed8843efa1bcc773fa62410dd89161ecb067432dd5916501793508a9506cacbc408e25 + languageName: node + linkType: hard + "trough@npm:^2.0.0": version: 2.1.0 resolution: "trough@npm:2.1.0" @@ -22125,6 +22234,20 @@ __metadata: languageName: node linkType: hard +"unified@npm:^9.2.2": + version: 9.2.2 + resolution: "unified@npm:9.2.2" + dependencies: + bail: ^1.0.0 + extend: ^3.0.0 + is-buffer: ^2.0.0 + is-plain-obj: ^2.0.0 + trough: ^1.0.0 + vfile: ^4.0.0 + checksum: 7c24461be7de4145939739ce50d18227c5fbdf9b3bc5a29dabb1ce26dd3e8bd4a1c385865f6f825f3b49230953ee8b591f23beab3bb3643e3e9dc37aa8a089d5 + languageName: node + linkType: hard + "unique-filename@npm:^1.1.1": version: 1.1.1 resolution: "unique-filename@npm:1.1.1" @@ -22188,6 +22311,13 @@ __metadata: languageName: node linkType: hard +"unist-builder@npm:^2.0.0": + version: 2.0.3 + resolution: "unist-builder@npm:2.0.3" + checksum: e946fdf77dbfc320feaece137ce4959ae2da6614abd1623bd39512dc741a9d5f313eb2ba79f8887d941365dccddec7fef4e953827475e392bf49b45336f597f6 + languageName: node + linkType: hard + "unist-builder@npm:^3.0.0": version: 3.0.1 resolution: "unist-builder@npm:3.0.1" @@ -22197,6 +22327,13 @@ __metadata: languageName: node linkType: hard +"unist-util-generated@npm:^1.0.0": + version: 1.1.6 + resolution: "unist-util-generated@npm:1.1.6" + checksum: 86239ff88a08800d52198f2f0e15911f05bab2dad17cef95550f7c2728f15ebb0344694fcc3101d05762d88adaf86cb85aa7a3300fedabd0b6d7d00b41cdcb7f + languageName: node + linkType: hard + "unist-util-generated@npm:^2.0.0": version: 2.0.1 resolution: "unist-util-generated@npm:2.0.1" @@ -22204,6 +22341,13 @@ __metadata: languageName: node linkType: hard +"unist-util-is@npm:^4.0.0": + version: 4.1.0 + resolution: "unist-util-is@npm:4.1.0" + checksum: 726484cd2adc9be75a939aeedd48720f88294899c2e4a3143da413ae593f2b28037570730d5cf5fd910ff41f3bc1501e3d636b6814c478d71126581ef695f7ea + languageName: node + linkType: hard + "unist-util-is@npm:^5.0.0": version: 5.2.1 resolution: "unist-util-is@npm:5.2.1" @@ -22222,6 +22366,13 @@ __metadata: languageName: node linkType: hard +"unist-util-position@npm:^3.0.0, unist-util-position@npm:^3.1.0": + version: 3.1.0 + resolution: "unist-util-position@npm:3.1.0" + checksum: 10b3952e32a1ffabbecad41c3946237f7059f5bb6436796da05531a285f50b97e4f37cfc2f7164676d041063f40fe1ad92fbb8ca38d3ae8747328ebe738d738f + languageName: node + linkType: hard + "unist-util-position@npm:^4.0.0": version: 4.0.4 resolution: "unist-util-position@npm:4.0.4" @@ -22241,6 +22392,15 @@ __metadata: languageName: node linkType: hard +"unist-util-stringify-position@npm:^2.0.0": + version: 2.0.3 + resolution: "unist-util-stringify-position@npm:2.0.3" + dependencies: + "@types/unist": ^2.0.2 + checksum: f755cadc959f9074fe999578a1a242761296705a7fe87f333a37c00044de74ab4b184b3812989a57d4cd12211f0b14ad397b327c3a594c7af84361b1c25a7f09 + languageName: node + linkType: hard + "unist-util-stringify-position@npm:^3.0.0": version: 3.0.3 resolution: "unist-util-stringify-position@npm:3.0.3" @@ -22250,6 +22410,16 @@ __metadata: languageName: node linkType: hard +"unist-util-visit-parents@npm:^3.0.0": + version: 3.1.1 + resolution: "unist-util-visit-parents@npm:3.1.1" + dependencies: + "@types/unist": ^2.0.0 + unist-util-is: ^4.0.0 + checksum: 1170e397dff88fab01e76d5154981666eb0291019d2462cff7a2961a3e76d3533b42eaa16b5b7e2d41ad42a5ea7d112301458283d255993e660511387bf67bc3 + languageName: node + linkType: hard + "unist-util-visit-parents@npm:^5.0.0, unist-util-visit-parents@npm:^5.1.1": version: 5.1.3 resolution: "unist-util-visit-parents@npm:5.1.3" @@ -22260,6 +22430,17 @@ __metadata: languageName: node linkType: hard +"unist-util-visit@npm:^2.0.0": + version: 2.0.3 + resolution: "unist-util-visit@npm:2.0.3" + dependencies: + "@types/unist": ^2.0.0 + unist-util-is: ^4.0.0 + unist-util-visit-parents: ^3.0.0 + checksum: 1fe19d500e212128f96d8c3cfa3312846e586b797748a1fd195fe6479f06bc90a6f6904deb08eefc00dd58e83a1c8a32fb8677252d2273ad7a5e624525b69b8f + languageName: node + linkType: hard + "unist-util-visit@npm:^4.0.0, unist-util-visit@npm:~4.1.0": version: 4.1.2 resolution: "unist-util-visit@npm:4.1.2" @@ -22545,6 +22726,16 @@ __metadata: languageName: node linkType: hard +"vfile-message@npm:^2.0.0": + version: 2.0.4 + resolution: "vfile-message@npm:2.0.4" + dependencies: + "@types/unist": ^2.0.0 + unist-util-stringify-position: ^2.0.0 + checksum: 1bade499790f46ca5aba04bdce07a1e37c2636a8872e05cf32c26becc912826710b7eb063d30c5754fdfaeedc8a7658e78df10b3bc535c844890ec8a184f5643 + languageName: node + linkType: hard + "vfile-message@npm:^3.0.0": version: 3.1.4 resolution: "vfile-message@npm:3.1.4" @@ -22555,6 +22746,18 @@ __metadata: languageName: node linkType: hard +"vfile@npm:^4.0.0": + version: 4.2.1 + resolution: "vfile@npm:4.2.1" + dependencies: + "@types/unist": ^2.0.0 + is-buffer: ^2.0.0 + unist-util-stringify-position: ^2.0.0 + vfile-message: ^2.0.0 + checksum: ee5726e10d170472cde778fc22e0f7499caa096eb85babea5d0ce0941455b721037ee1c9e6ae506ca2803250acd313d0f464328ead0b55cfe7cb6315f1b462d6 + languageName: node + linkType: hard + "vfile@npm:^5.0.0, vfile@npm:^5.3.0, vfile@npm:^5.3.2, vfile@npm:^5.3.6": version: 5.3.7 resolution: "vfile@npm:5.3.7" @@ -23174,7 +23377,7 @@ __metadata: languageName: node linkType: hard -"xtend@npm:~4.0.1": +"xtend@npm:^4.0.0, xtend@npm:~4.0.1": version: 4.0.2 resolution: "xtend@npm:4.0.2" checksum: ac5dfa738b21f6e7f0dd6e65e1b3155036d68104e67e5d5d1bde74892e327d7e5636a076f625599dc394330a731861e87343ff184b0047fef1360a7ec0a5a36a @@ -23382,6 +23585,13 @@ __metadata: languageName: node linkType: hard +"zwitch@npm:^1.0.0": + version: 1.0.5 + resolution: "zwitch@npm:1.0.5" + checksum: 28a1bebacab3bc60150b6b0a2ba1db2ad033f068e81f05e4892ec0ea13ae63f5d140a1d692062ac0657840c8da076f35b94433b5f1c329d7803b247de80f064a + languageName: node + linkType: hard + "zwitch@npm:^2.0.0, zwitch@npm:^2.0.4": version: 2.0.4 resolution: "zwitch@npm:2.0.4"