@scalar/code-highlight 0.4.3 → 0.4.6
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/CHANGELOG.md +26 -0
- package/README.md +1 -1
- package/dist/chunks/code.js +1 -1
- package/dist/chunks/code.js.map +1 -1
- package/dist/chunks/languages.js +611 -272
- package/dist/chunks/languages.js.map +1 -1
- package/dist/chunks/lib.js +99 -64
- package/dist/chunks/lib.js.map +1 -1
- package/dist/chunks/lib2.js +6 -1
- package/dist/chunks/lib2.js.map +1 -1
- package/dist/chunks/markdown.js +99 -32
- package/dist/chunks/markdown.js.map +1 -1
- package/dist/chunks/rehype-alert.js.map +1 -1
- package/dist/chunks/rehype-highlight.js +33 -8
- package/dist/chunks/rehype-highlight.js.map +1 -1
- package/dist/code/index.js +0 -1
- package/dist/index.js +1 -2
- package/dist/languages/standard.d.ts +1 -0
- package/dist/languages/standard.d.ts.map +1 -1
- package/dist/markdown/index.js +0 -1
- package/dist/markdown/markdown.d.ts +6 -5
- package/dist/markdown/markdown.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/code/index.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./chunks/lib.js";
|
|
1
|
+
import { a as lowlightLanguageMappings, t as rehypeHighlight } from "./chunks/rehype-highlight.js";
|
|
3
2
|
import { n as jsonYamlLanguages, r as basicLanguages, t as standardLanguages } from "./chunks/languages.js";
|
|
4
3
|
import { t as syntaxHighlight } from "./chunks/code.js";
|
|
5
4
|
import { a as textFromNode, n as htmlFromMarkdown, r as isHeading } from "./chunks/markdown.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../src/languages/standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"standard.d.ts","sourceRoot":"","sources":["../../src/languages/standard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAmD9C;;;;;;;;;;;;;;GAcG;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDiB,CAAA"}
|
package/dist/markdown/index.js
CHANGED
|
@@ -4,15 +4,16 @@ export type { Node } from 'mdast';
|
|
|
4
4
|
* Type-guard to check if a node is a heading.
|
|
5
5
|
*/
|
|
6
6
|
export declare const isHeading: (node: Node) => node is Heading;
|
|
7
|
-
|
|
8
|
-
* Take a Markdown string and generate HTML from it
|
|
9
|
-
*/
|
|
10
|
-
export declare function htmlFromMarkdown(markdown: string, options?: {
|
|
7
|
+
type HtmlFromMarkdownOptions = {
|
|
11
8
|
removeTags?: string[];
|
|
12
9
|
allowTags?: string[];
|
|
13
10
|
transform?: (node: Node) => Node;
|
|
14
11
|
transformType?: string;
|
|
15
|
-
}
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Take a Markdown string and generate HTML from it
|
|
15
|
+
*/
|
|
16
|
+
export declare function htmlFromMarkdown(markdown: string, options?: HtmlFromMarkdownOptions): string;
|
|
16
17
|
/**
|
|
17
18
|
* Find all headings of a specific type in a Markdown AST.
|
|
18
19
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown/markdown.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","sourceRoot":"","sources":["../../src/markdown/markdown.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAsD,IAAI,EAAE,eAAe,EAAE,MAAM,OAAO,CAAA;AAuB/G,YAAY,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAEjC;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,IAAI,KAAG,IAAI,IAAI,OAE9C,CAAA;AAiGD,KAAK,uBAAuB,GAAG;IAC7B,UAAU,CAAC,EAAE,MAAM,EAAE,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAA;IAChC,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB,CAAA;AA6GD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,uBAAuB,GAAG,MAAM,CA+B5F;AASD;;GAEG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,MAAU,GAChB;IACD,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CACd,EAAE,CAiBF;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,eAAe,GAAG,MAAM,CAUpE;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,YAgC5C"}
|
package/package.json
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"lowlight",
|
|
17
17
|
"highlightjs"
|
|
18
18
|
],
|
|
19
|
-
"version": "0.4.
|
|
19
|
+
"version": "0.4.6",
|
|
20
20
|
"engines": {
|
|
21
21
|
"node": ">=22"
|
|
22
22
|
},
|
|
@@ -91,8 +91,8 @@
|
|
|
91
91
|
"@types/hast": "^3.0.4",
|
|
92
92
|
"@types/mdast": "^4.0.4",
|
|
93
93
|
"vfile": "^6.0.3",
|
|
94
|
-
"vite": "8.
|
|
95
|
-
"@scalar/themes": "0.
|
|
94
|
+
"vite": "8.1.5",
|
|
95
|
+
"@scalar/themes": "0.18.0"
|
|
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",
|