@alauda/doom 0.23.5 → 1.0.0-next.0

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/lib/cli/index.js CHANGED
@@ -124,7 +124,6 @@ program
124
124
  const docDirectory = config.root;
125
125
  const runBuild = () => build({
126
126
  config,
127
- appDirectory: CWD,
128
127
  docDirectory,
129
128
  });
130
129
  await runBuild();
@@ -1,6 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { nodeTypes } from '@mdx-js/mdx';
4
+ import { pluginSass } from '@rsbuild/plugin-sass';
4
5
  import { pluginYaml } from '@rsbuild/plugin-yaml';
5
6
  import { addLeadingSlash, addTrailingSlash, normalizeSlash, removeLeadingSlash, } from '@rspress/core';
6
7
  import { logger } from '@rspress/shared/logger';
@@ -9,7 +10,7 @@ import { difference } from 'es-toolkit';
9
10
  import rehypeRaw from 'rehype-raw';
10
11
  import { cyan } from 'yoctocolors';
11
12
  import { autoTocPlugin } from '../plugins/auto-toc/index.js';
12
- import { apiPlugin, autoSidebarPlugin, createTransformerCallouts, directivesPlugin, globalPlugin, mermaidPlugin, permissionPlugin, replacePlugin, shikiPlugin, } from '../plugins/index.js';
13
+ import { apiPlugin, autoSidebarPlugin, createTransformerCallouts, directivesPlugin, globalPlugin, mermaidPlugin, permissionPlugin, replacePlugin, } from '../plugins/index.js';
13
14
  import { isExplicitlyUnversioned, UNVERSIONED, } from '../shared/index.js';
14
15
  import { pathExists, pkgResolve, resolveStaticConfig } from '../utils/index.js';
15
16
  import { CWD, DEFAULT_CONFIG_NAME, DEFAULT_EXTENSIONS, I18N_FILE, SITES_FILE, YAML_EXTENSIONS, } from './constants.js';
@@ -125,12 +126,22 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
125
126
  },
126
127
  markdown: {
127
128
  checkDeadLinks: true,
128
- highlightLanguages: [['jsonc', 'json']],
129
- mdxRs: false,
130
129
  rehypePlugins: [[rehypeRaw, { passThrough: nodeTypes }]],
131
- },
132
- ssg: {
133
- strict: true,
130
+ shiki: {
131
+ transformers: [
132
+ // builtin transformers
133
+ transformerMetaHighlight(),
134
+ transformerMetaWordHighlight(),
135
+ transformerNotationDiff(),
136
+ transformerNotationErrorLevel(),
137
+ transformerNotationFocus(),
138
+ transformerNotationHighlight(),
139
+ transformerNotationWordHighlight(),
140
+ transformerRemoveNotationEscape(),
141
+ // custom transformers
142
+ createTransformerCallouts(),
143
+ ],
144
+ },
134
145
  },
135
146
  themeConfig: {
136
147
  enableScrollToTop: true,
@@ -163,41 +174,12 @@ const getCommonConfig = async ({ config, root, configFilePath, base, version, do
163
174
  localBasePath,
164
175
  force,
165
176
  }),
166
- shikiPlugin({
167
- theme: config.shiki?.theme,
168
- langs: [
169
- 'dockerfile',
170
- 'dotenv',
171
- 'html',
172
- 'go',
173
- 'jsonc',
174
- 'mermaid',
175
- 'java',
176
- 'python',
177
- 'toml',
178
- ...(config.shiki?.langs ?? []),
179
- ],
180
- transformers: [
181
- // builtin transformers
182
- transformerMetaHighlight(),
183
- transformerMetaWordHighlight(),
184
- transformerNotationDiff(),
185
- transformerNotationErrorLevel(),
186
- transformerNotationFocus(),
187
- transformerNotationHighlight(),
188
- transformerNotationWordHighlight(),
189
- transformerRemoveNotationEscape(),
190
- // custom transformers
191
- createTransformerCallouts(),
192
- ...(config.shiki?.transformers ?? []),
193
- ],
194
- }),
195
177
  ],
196
178
  builderConfig: {
197
179
  dev: {
198
180
  lazyCompilation: lazy,
199
181
  },
200
- plugins: [pluginYaml()],
182
+ plugins: [pluginSass(), pluginYaml()],
201
183
  server: {
202
184
  open,
203
185
  },
@@ -18,7 +18,7 @@ export const remarkAutoToc = function () {
18
18
  {
19
19
  type: 'mdxJsxAttribute',
20
20
  name: 'className',
21
- value: 'doom-auto-toc',
21
+ value: 'doom-auto-toc rspress-toc-exclude',
22
22
  },
23
23
  ],
24
24
  children: [
@@ -2,6 +2,16 @@ import type { RspressPlugin } from '@rspress/core';
2
2
  export * from './normalize-img-src.js';
3
3
  export type * from './types.js';
4
4
  export * from './utils.js';
5
+ declare module 'unified' {
6
+ interface Data {
7
+ pageMeta: Record<string, unknown>;
8
+ }
9
+ }
10
+ declare module 'mdast' {
11
+ interface Data {
12
+ _mdxExplicitJsx?: boolean;
13
+ }
14
+ }
5
15
  export declare const replacePlugin: ({ lang, localBasePath, force, }: {
6
16
  lang: string | null;
7
17
  localBasePath: string;
@@ -1,4 +1,4 @@
1
- import type { Content } from 'mdast';
1
+ import type { RootContent } from 'mdast';
2
2
  import type { NormalizedReferenceSource } from './types.js';
3
3
  export interface NormalizeImgSrcOptions {
4
4
  refSource?: NormalizedReferenceSource;
@@ -13,4 +13,4 @@ export interface NormalizeImgSrcOptions {
13
13
  copy?: boolean;
14
14
  };
15
15
  }
16
- export declare const normalizeImgSrc: (content: Content, { refSource, localPublicBase, publicBase, sourceBase, targetBase, force, translating, }: NormalizeImgSrcOptions) => Content;
16
+ export declare const normalizeImgSrc: (content: RootContent, { refSource, localPublicBase, publicBase, sourceBase, targetBase, force, translating, }: NormalizeImgSrcOptions) => RootContent;
@@ -39,7 +39,7 @@ export const rehypeNormalizeLink = () => {
39
39
  if (node.tagName !== 'img') {
40
40
  return;
41
41
  }
42
- const { alt, src } = node.properties || {};
42
+ const { alt, src } = node.properties;
43
43
  if (typeof src !== 'string') {
44
44
  return;
45
45
  }
@@ -1,8 +1,8 @@
1
- import type { Content } from 'mdast';
1
+ import type { RootContent } from 'mdast';
2
2
  import type { NormalizedReferenceSource } from './types.js';
3
3
  export interface ResolveReferenceResult {
4
4
  publicBase: string;
5
5
  sourceBase: string;
6
- contents: Content[];
6
+ contents: RootContent[];
7
7
  }
8
8
  export declare const resolveReference: (localBasePath: string, localPublicBase: string, items: Record<string, NormalizedReferenceSource>, refName: string, force?: boolean) => Promise<ResolveReferenceResult | undefined>;
@@ -1,2 +1,2 @@
1
- import type { Content } from 'mdast';
2
- export declare const resolveRelease: (releaseTemplates: Record<string, string>, releaseQuery: string, lang: string) => Promise<Content | Content[] | undefined>;
1
+ import type { RootContent } from 'mdast';
2
+ export declare const resolveRelease: (releaseTemplates: Record<string, string>, releaseQuery: string, lang: string) => Promise<RootContent | RootContent[] | undefined>;
@@ -1,4 +1,4 @@
1
- import type { Root, YAML } from 'mdast';
1
+ import type { Root, Yaml } from 'mdast';
2
2
  import { type Options } from 'remark-stringify';
3
3
  import type { NormalizedReferenceSource, ReferenceItem } from './types.js';
4
4
  export declare const RELATIVE_URL_PATTERN: RegExp;
@@ -8,7 +8,7 @@ export declare const RELATIVE_URL_PATTERN: RegExp;
8
8
  export declare const extractTextAndId: (title: string) => string[];
9
9
  export declare const normalizeReferenceItems: (items?: ReferenceItem[]) => Record<string, NormalizedReferenceSource>;
10
10
  export declare const stringifySettings: Options;
11
- export declare const mdProcessor: import("unified").FrozenProcessor<Root, Root, Root, string>;
12
- export declare const mdxProcessor: import("unified").FrozenProcessor<Root, Root, Root, string>;
13
- export declare const getFrontmatterNode: (ast: Root) => YAML | undefined;
11
+ export declare const mdProcessor: import("unified").Processor<Root, undefined, undefined, Root, string>;
12
+ export declare const mdxProcessor: import("unified").Processor<Root, undefined, undefined, Root, string>;
13
+ export declare const getFrontmatterNode: (ast: Root) => Yaml | undefined;
14
14
  export declare const isCI: boolean;
@@ -1,19 +1 @@
1
- import type { RspressPlugin } from '@rspress/shared';
2
- import { type BuiltinLanguage, type BuiltinTheme, type ShikiTransformer, type SpecialLanguage } from 'shiki';
3
- export interface PluginShikiOptions {
4
- /**
5
- * Code highlighting theme, @see https://shiki.style/themes
6
- */
7
- theme?: BuiltinTheme | 'css-variables';
8
- /**
9
- * Code highlighting language, @see https://shiki.style/languages
10
- */
11
- langs?: Array<BuiltinLanguage | SpecialLanguage>;
12
- /**
13
- * Custom shiki transformer, @see https://shiki.style/guide/transformers
14
- */
15
- transformers?: ShikiTransformer[];
16
- }
17
- export declare const SHIKI_DEFAULT_HIGHLIGHT_LANGUAGES: BuiltinLanguage[];
18
- export declare function shikiPlugin({ theme, langs, transformers, }?: PluginShikiOptions): RspressPlugin;
19
1
  export * from './transformers/index.js';
@@ -1,53 +1 @@
1
- import { createCssVariablesTheme, } from 'shiki';
2
- import { getHighlighter } from './highlighter.js';
3
- import { rehypePluginShiki } from './rehypePlugin.js';
4
- import { SHIKI_TRANSFORMER_LINE_NUMBER, createTransformerLineNumber, } from './transformers/line-number.js';
5
- export const SHIKI_DEFAULT_HIGHLIGHT_LANGUAGES = [
6
- 'js',
7
- 'ts',
8
- 'jsx',
9
- 'tsx',
10
- 'json',
11
- 'css',
12
- 'scss',
13
- 'less',
14
- 'xml',
15
- 'diff',
16
- 'yaml',
17
- 'md',
18
- 'mdx',
19
- 'bash',
20
- ];
21
- const cssVariablesTheme = createCssVariablesTheme({
22
- name: 'css-variables',
23
- variablePrefix: '--shiki-',
24
- variableDefaults: {},
25
- fontStyle: true,
26
- });
27
- export function shikiPlugin({ theme = 'css-variables', langs = [], transformers = [], } = {}) {
28
- return {
29
- name: 'doom-shiki',
30
- async config(config) {
31
- config.markdown = config.markdown || {};
32
- // Shiki will be integrated by rehype plugin, so we should use the javascript version markdown compiler.
33
- config.markdown.mdxRs = false;
34
- config.markdown.codeHighlighter = 'shiki';
35
- config.markdown.rehypePlugins = config.markdown.rehypePlugins || [];
36
- if (config.markdown.showLineNumbers &&
37
- !transformers.some((transformerItem) => transformerItem.name === SHIKI_TRANSFORMER_LINE_NUMBER)) {
38
- transformers.push(createTransformerLineNumber());
39
- }
40
- const highlighter = await getHighlighter({
41
- themes: [cssVariablesTheme],
42
- langs: [...SHIKI_DEFAULT_HIGHLIGHT_LANGUAGES, ...langs],
43
- transformers,
44
- });
45
- config.markdown.rehypePlugins.push([
46
- rehypePluginShiki,
47
- { highlighter, theme },
48
- ]);
49
- return config;
50
- },
51
- };
52
- }
53
1
  export * from './transformers/index.js';
@@ -4,6 +4,6 @@ import { useState } from 'react';
4
4
  import { stringify } from 'yaml';
5
5
  export const JsonViewer = ({ value }) => {
6
6
  const [X] = useState(getCustomMDXComponent);
7
- return (_jsxs(Tabs, { children: [_jsx(Tab, { label: "yaml", children: _jsx(X.pre, { children: _jsx(X.code, { className: "language-yaml", codeHighlighter: "prism", children: stringify(value) }) }) }), _jsx(Tab, { label: "json", children: _jsx(X.pre, { children: _jsx(X.code, { className: "language-json", codeHighlighter: "prism", children: JSON.stringify(value, null, 2) }) }) })] }));
7
+ return (_jsxs(Tabs, { children: [_jsx(Tab, { label: "yaml", children: _jsx(X.pre, { children: _jsx(X.code, { className: "language-yaml", children: stringify(value) }) }) }), _jsx(Tab, { label: "json", children: _jsx(X.pre, { children: _jsx(X.code, { className: "language-json", children: JSON.stringify(value, null, 2) }) }) })] }));
8
8
  };
9
9
  export default JsonViewer;
package/lib/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Options } from '@cspell/eslint-plugin';
2
2
  import type { serve } from '@rspress/core';
3
- import type { ApiPluginOptions, AutoSidebarPluginOptions, PermissionPluginOptions, PluginShikiOptions, ReferenceItem, ReleaseNotesOptions } from './plugins/index.js';
3
+ import type { ApiPluginOptions, AutoSidebarPluginOptions, PermissionPluginOptions, ReferenceItem, ReleaseNotesOptions } from './plugins/index.js';
4
4
  import type { DoomSite } from './shared/index.js';
5
5
  export type BaseServeOptions = Parameters<typeof serve>[0];
6
6
  export type ServeOptions = Omit<BaseServeOptions, 'config'>;
@@ -41,7 +41,6 @@ declare module '@rspress/shared' {
41
41
  onlyIncludeRoutes?: string[];
42
42
  internalRoutes?: string[];
43
43
  translate?: TranslateOptions;
44
- shiki?: PluginShikiOptions;
45
44
  editRepoBaseUrl?: string;
46
45
  lint?: LintOptions;
47
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/doom",
3
- "version": "0.23.5",
3
+ "version": "1.0.0-next.0",
4
4
  "type": "module",
5
5
  "description": "Doctor Doom making docs.",
6
6
  "repository": "git+https://github.com/alauda/doom.git",
@@ -33,25 +33,26 @@
33
33
  "rspress-plugins"
34
34
  ],
35
35
  "dependencies": {
36
- "@cspell/eslint-plugin": "^9.0.1",
36
+ "@cspell/eslint-plugin": "^9.0.2",
37
37
  "@eslint-react/eslint-plugin": "^1.49.0",
38
38
  "@inquirer/prompts": "^7.5.1",
39
39
  "@openapi-contrib/openapi-schema-to-json-schema": "^5.1.0",
40
40
  "@playwright/browser-chromium": "^1.52.0",
41
+ "@rsbuild/plugin-sass": "^1.3.1",
41
42
  "@rsbuild/plugin-yaml": "^1.0.2",
42
- "@rspress/core": "1.44.0",
43
+ "@rspress/core": "2.0.0-beta.6",
43
44
  "@shikijs/transformers": "^3.4.2",
44
45
  "chokidar": "^4.0.3",
45
46
  "cli-progress": "^3.12.0",
46
47
  "clsx": "^2.1.1",
47
- "commander": "^13.1.0",
48
+ "commander": "^14.0.0",
48
49
  "ejs": "^3.1.10",
49
- "es-toolkit": "^1.37.2",
50
- "eslint": "^9.26.0",
50
+ "es-toolkit": "^1.38.0",
51
+ "eslint": "^9.27.0",
51
52
  "eslint-plugin-mdx": "^3.4.2",
52
53
  "html-tag-names": "^2.1.0",
53
- "mdast-util-mdx": "^2.0.1",
54
- "mdast-util-mdx-jsx": "^2.1.4",
54
+ "mdast-util-mdx": "^3.0.0",
55
+ "mdast-util-mdx-jsx": "^3.2.0",
55
56
  "mermaid": "^11.6.0",
56
57
  "openai": "^5.0.0-beta.0",
57
58
  "openapi-types": "^12.1.3",
@@ -60,13 +61,13 @@
60
61
  "pdf-merger-js": "^5.1.2",
61
62
  "picomatch": "^4.0.2",
62
63
  "playwright": "^1.52.0",
63
- "react-markdown": "^8.0.7",
64
- "rehype-raw": "^6.1.1",
65
- "remark-directive": "^2.0.1",
66
- "remark-frontmatter": "^4.0.1",
67
- "remark-gfm": "^3.0.1",
68
- "remark-mdx": "^2.3.0",
69
- "remark-stringify": "^10.0.3",
64
+ "react-markdown": "^10.1.0",
65
+ "rehype-raw": "^7.0.0",
66
+ "remark-directive": "^4.0.0",
67
+ "remark-frontmatter": "^5.0.0",
68
+ "remark-gfm": "^4.0.1",
69
+ "remark-mdx": "^3.1.0",
70
+ "remark-stringify": "^11.0.0",
70
71
  "shiki": "^3.4.2",
71
72
  "simple-git": "^3.27.0",
72
73
  "swagger2openapi": "^7.0.8",
@@ -1,7 +1,5 @@
1
1
  @use 'sass:color';
2
2
 
3
- @import url(./shiki.css);
4
-
5
3
  th,
6
4
  td {
7
5
  img {
@@ -1,5 +0,0 @@
1
- import { type BuiltinLanguage, type BuiltinTheme, type Highlighter, type BundledHighlighterOptions as ShikiHighlighterOptions, type ShikiTransformer } from 'shiki';
2
- export interface HighlighterOptions extends ShikiHighlighterOptions<BuiltinLanguage, BuiltinTheme> {
3
- transformers?: ShikiTransformer[];
4
- }
5
- export declare function getHighlighter(options: HighlighterOptions): Promise<Highlighter>;
@@ -1,15 +0,0 @@
1
- import { createHighlighter as createShikiHighlighter, } from 'shiki';
2
- export async function getHighlighter(options) {
3
- const highlighter = await createShikiHighlighter(options);
4
- const baseTransformers = options.transformers ?? [];
5
- return {
6
- ...highlighter,
7
- codeToHtml: (code, htmlOptions) => {
8
- const transformers = htmlOptions.transformers ?? [];
9
- return highlighter.codeToHtml(code, {
10
- ...htmlOptions,
11
- transformers: [...baseTransformers, ...transformers],
12
- });
13
- },
14
- };
15
- }
@@ -1,9 +0,0 @@
1
- import type { Root } from 'hast';
2
- import type { BuiltinTheme, Highlighter } from 'shiki';
3
- import type { Plugin } from 'unified';
4
- interface Options {
5
- highlighter: Highlighter;
6
- theme: BuiltinTheme;
7
- }
8
- export declare const rehypePluginShiki: Plugin<[Options], Root>;
9
- export {};
@@ -1,59 +0,0 @@
1
- import { logger } from '@rspress/shared/logger';
2
- import { fromHtml } from 'hast-util-from-html';
3
- import { visit } from 'unist-util-visit';
4
- // TODO: migrate to official @shikijs/rehype plugin after upgrading unified/remark/rehype packages
5
- export const rehypePluginShiki = ({ highlighter, theme }) => (tree) => {
6
- visit(tree, 'element', (node, index, parent) => {
7
- // <pre><code>...</code></pre>
8
- if (node.tagName === 'pre' &&
9
- node.children[0]?.type === 'element' &&
10
- node.children[0].tagName === 'code') {
11
- const codeNode = node.children[0];
12
- const codeContent = codeNode.children[0].value;
13
- const codeClassName = codeNode.properties?.className?.toString() || '';
14
- const codeMeta = codeNode.properties?.meta?.toString() || '';
15
- // for example: language-js {1,2,3-5}
16
- const lang = codeClassName.split(' ')[0].split('-')[1];
17
- if (!lang) {
18
- return;
19
- }
20
- let highlightedCode;
21
- try {
22
- highlightedCode = highlighter.codeToHtml(codeContent, {
23
- lang,
24
- theme,
25
- meta: {
26
- __raw: codeMeta,
27
- },
28
- });
29
- }
30
- catch (err) {
31
- logger.error(`render with \`${lang}\` results error`, err);
32
- logger.warn('fallback to `plaintext`');
33
- highlightedCode = highlighter.codeToHtml(codeContent, {
34
- lang: 'plaintext',
35
- theme,
36
- meta: {
37
- __raw: codeMeta,
38
- },
39
- });
40
- }
41
- const fragmentAst = fromHtml(highlightedCode, { fragment: true });
42
- const preElement = fragmentAst.children[0];
43
- const codeElement = preElement.children[0];
44
- codeElement.properties.className = `language-${lang}`;
45
- codeElement.properties.meta = codeMeta;
46
- const codeLines = codeElement.children;
47
- // Strip the final empty span
48
- const lastLine = codeLines[codeLines.length - 1];
49
- if (lastLine.children.length === 0) {
50
- codeLines.pop();
51
- }
52
- parent?.children.splice(index, 1, {
53
- type: 'element',
54
- tagName: 'pre',
55
- children: fragmentAst.children,
56
- });
57
- }
58
- });
59
- };
package/styles/shiki.css DELETED
@@ -1,119 +0,0 @@
1
- /**
2
- * Custom shiki code block theme
3
- * reference: https://github.com/shikijs/shiki/blob/main/docs/themes.md
4
- * -------------------------------------------------------------------------- */
5
-
6
- :root {
7
- --shiki-foreground: #414141;
8
- --shiki-background: transparent;
9
- --shiki-token-constant: #1976d2;
10
- --shiki-token-string: #31a94d;
11
- --shiki-token-comment: rgb(182, 180, 180);
12
- --shiki-token-keyword: #cf2727;
13
- --shiki-token-parameter: #f59403;
14
- --shiki-token-function: #7041c8;
15
- --shiki-token-string-expression: #218438;
16
- --shiki-token-punctuation: #242323;
17
- --shiki-token-link: #22863a;
18
- }
19
-
20
- .dark {
21
- --shiki-foreground: #cac7c7;
22
- --shiki-token-constant: #6fb0fa;
23
- --shiki-token-string: #f9a86e;
24
- --shiki-token-comment: #6a727b;
25
- --shiki-token-keyword: #f47481;
26
- --shiki-token-parameter: #ff9800;
27
- --shiki-token-function: #ae8eeb;
28
- --shiki-token-string-expression: #4fb74d;
29
- --shiki-token-punctuation: #bbbbbb;
30
- --shiki-token-link: #f9a76d;
31
- }
32
-
33
- .rspress-doc span.line {
34
- padding: 0 1.25rem;
35
- }
36
-
37
- .diff,
38
- .code-line-highlighted {
39
- transition: background-color 0.5s;
40
- padding: 0 20px;
41
- width: 100%;
42
- display: inline-block;
43
- position: relative;
44
- }
45
-
46
- .diff.add::after {
47
- content: '+';
48
- position: absolute;
49
- left: 10px;
50
- color: #3dd68c;
51
- }
52
-
53
- .diff.remove::after {
54
- content: '-';
55
- position: absolute;
56
- left: 10px;
57
- color: #cb7676;
58
- }
59
-
60
- .has-diff div[class*='language-'] .diff.add {
61
- background-color: rgba(16, 185, 129, 0.16);
62
- border-left: 1px solid #10b981;
63
- padding: 0 20px 0 19px;
64
- }
65
-
66
- div[class*='language-'] code .diff.remove {
67
- background-color: rgba(244, 63, 94, 0.16);
68
- border-left: 1px solid #f43f5e;
69
- padding: 0 20px 0 19px;
70
- }
71
-
72
- .has-highlight div[class*='language-'] .line.highlighted {
73
- background-color: rgba(101, 117, 133, 0.16);
74
- }
75
-
76
- .has-highlight div[class*='language-'] .line.highlighted.error {
77
- background-color: rgba(244, 63, 94, 0.16);
78
- }
79
-
80
- .has-highlight div[class*='language-'] .line.highlighted.warning {
81
- background-color: rgba(234, 179, 8, 0.16);
82
- }
83
-
84
- .has-focused div[class*='language-'] .line:not(.focused) {
85
- filter: blur(0.095rem);
86
- opacity: 0.4;
87
- transition:
88
- filter 0.35s,
89
- opacity 0.35s;
90
- }
91
-
92
- .has-focused:hover div[class*='language-'] .line:not(.focused) {
93
- filter: blur(0);
94
- opacity: 1;
95
- }
96
-
97
- .has-line-number code {
98
- counter-reset: step;
99
- counter-increment: step 0;
100
- }
101
-
102
- .has-line-number code .line-number::before {
103
- content: counter(step);
104
- counter-increment: step;
105
- width: 15px;
106
- margin-right: 15px;
107
- display: inline-block;
108
- text-align: right;
109
- color: rgba(115, 138, 148, 0.4);
110
- }
111
-
112
- .line .highlighted-word {
113
- background-color: var(--rp-c-text-code-bg);
114
- border: 1px solid var(--rp-c-divider);
115
- color: var(--rp-c-text-code);
116
- padding: 1px 3px;
117
- margin: -1px -3px;
118
- border-radius: 4px;
119
- }