@scalar/code-highlight 0.4.10 → 0.4.12

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.
@@ -1,2 +1 @@
1
- import { t as syntaxHighlight } from "../chunks/code.js";
2
- export { syntaxHighlight };
1
+ export { t as syntaxHighlight } from "../chunks/code.js";
package/dist/css/code.css CHANGED
@@ -1,3 +1,8 @@
1
+ /* Keep direct stylesheet consumers at the default spacing without competing with container overrides. */
2
+ :where(pre:has(> code.hljs)) {
3
+ line-height: var(--scalar-code-line-height, 1.4);
4
+ }
5
+
1
6
  .scalar-app {
2
7
  :where(code.hljs) * {
3
8
  font-size: inherit;
@@ -7,7 +12,6 @@
7
12
  word-spacing: normal;
8
13
  word-break: normal;
9
14
  word-wrap: normal;
10
- line-height: 1.4;
11
15
  tab-size: 4;
12
16
  }
13
17
  code.hljs {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as lowlightLanguageMappings, t as rehypeHighlight } from "./chunks/rehype-highlight.js";
2
- import { n as jsonYamlLanguages, r as basicLanguages, t as standardLanguages } from "./chunks/languages.js";
3
2
  import { t as syntaxHighlight } from "./chunks/code.js";
3
+ import { n as jsonYamlLanguages, r as basicLanguages, t as standardLanguages } from "./chunks/languages.js";
4
4
  import { a as textFromNode, n as htmlFromMarkdown, r as isHeading } from "./chunks/markdown.js";
5
5
  export { basicLanguages, htmlFromMarkdown, isHeading, jsonYamlLanguages, lowlightLanguageMappings, rehypeHighlight, standardLanguages, syntaxHighlight, textFromNode };
@@ -1,2 +1 @@
1
- import { n as jsonYamlLanguages, r as basicLanguages, t as standardLanguages } from "../chunks/languages.js";
2
- export { basicLanguages, jsonYamlLanguages, standardLanguages };
1
+ export { r as basicLanguages, n as jsonYamlLanguages, t as standardLanguages } from "../chunks/languages.js";
@@ -1,2 +1 @@
1
- import { a as textFromNode, i as splitContent, n as htmlFromMarkdown, r as isHeading, t as getHeadings } from "../chunks/markdown.js";
2
- export { getHeadings, htmlFromMarkdown, isHeading, splitContent, textFromNode };
1
+ export { t as getHeadings, n as htmlFromMarkdown, r as isHeading, i as splitContent, a as textFromNode } from "../chunks/markdown.js";
@@ -1,2 +1 @@
1
- import { t as rehypeAlert } from "../chunks/rehype-alert.js";
2
- export { rehypeAlert };
1
+ export { t as rehypeAlert } from "../chunks/rehype-alert.js";
@@ -1,2 +1 @@
1
- import { t as rehypeHighlight } from "../chunks/rehype-highlight.js";
2
- export { rehypeHighlight };
1
+ export { t as rehypeHighlight } from "../chunks/rehype-highlight.js";
package/package.json CHANGED
@@ -16,7 +16,7 @@
16
16
  "lowlight",
17
17
  "highlightjs"
18
18
  ],
19
- "version": "0.4.10",
19
+ "version": "0.4.12",
20
20
  "engines": {
21
21
  "node": ">=22"
22
22
  },
@@ -72,7 +72,7 @@
72
72
  "sideEffects": false,
73
73
  "dependencies": {
74
74
  "hast-util-to-text": "^4.0.2",
75
- "highlight.js": "^11.11.1",
75
+ "highlight.js": "^11.12.0",
76
76
  "lowlight": "^3.3.0",
77
77
  "rehype-external-links": "^3.0.0",
78
78
  "rehype-format": "^5.0.1",
@@ -88,11 +88,11 @@
88
88
  "unist-util-visit": "^5.1.0"
89
89
  },
90
90
  "devDependencies": {
91
- "@scalar/themes": "0.19.2",
92
- "@types/hast": "^3.0.4",
91
+ "@scalar/themes": "0.20.0",
92
+ "@types/hast": "^3.0.5",
93
93
  "@types/mdast": "^4.0.4",
94
94
  "vfile": "^6.0.3",
95
- "vite": "8.1.5"
95
+ "vite": "8.3.4"
96
96
  },
97
97
  "scripts": {
98
98
  "build": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly && tsc-alias -p tsconfig.build.json && shx cp -r src/css dist/css",