@readme/markdown 9.3.3 → 9.4.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/dist/lib/compile.d.ts +1 -1
- package/dist/lib/run.d.ts +1 -1
- package/dist/main.js +11 -11
- package/dist/main.node.js +11 -11
- package/dist/main.node.js.map +1 -1
- package/package.json +1 -1
package/dist/lib/compile.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export type CompileOpts = CompileOptions & {
|
|
|
5
5
|
missingComponents?: 'ignore' | 'throw';
|
|
6
6
|
useTailwind?: boolean;
|
|
7
7
|
};
|
|
8
|
-
declare const compile: (text: string, { components, missingComponents, copyButtons, useTailwind, ...opts }?: CompileOpts) =>
|
|
8
|
+
declare const compile: (text: string, { components, missingComponents, copyButtons, useTailwind, ...opts }?: CompileOpts) => string;
|
|
9
9
|
export default compile;
|
package/dist/lib/run.d.ts
CHANGED
|
@@ -11,5 +11,5 @@ export type RunOpts = Omit<RunOptions, 'Fragment'> & {
|
|
|
11
11
|
theme?: 'dark' | 'light';
|
|
12
12
|
variables?: Variables;
|
|
13
13
|
};
|
|
14
|
-
declare const run: (string: string, _opts?: RunOpts) =>
|
|
14
|
+
declare const run: (string: string, _opts?: RunOpts) => RMDXModule;
|
|
15
15
|
export default run;
|
package/dist/main.js
CHANGED
|
@@ -70306,8 +70306,8 @@ function core_createProcessor(options) {
|
|
|
70306
70306
|
* Promise to compiled file.
|
|
70307
70307
|
*/
|
|
70308
70308
|
function compile(vfileCompatible, compileOptions) {
|
|
70309
|
-
const {file, options} =
|
|
70310
|
-
return
|
|
70309
|
+
const {file, options} = resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
70310
|
+
return createProcessor(options).process(file)
|
|
70311
70311
|
}
|
|
70312
70312
|
|
|
70313
70313
|
/**
|
|
@@ -70323,8 +70323,8 @@ function compile(vfileCompatible, compileOptions) {
|
|
|
70323
70323
|
* Compiled file.
|
|
70324
70324
|
*/
|
|
70325
70325
|
function compileSync(vfileCompatible, compileOptions) {
|
|
70326
|
-
const {file, options} =
|
|
70327
|
-
return
|
|
70326
|
+
const {file, options} = resolve_file_and_options_resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
70327
|
+
return core_createProcessor(options).processSync(file)
|
|
70328
70328
|
}
|
|
70329
70329
|
|
|
70330
70330
|
;// ./errors/mdx-syntax-error.ts
|
|
@@ -73108,7 +73108,7 @@ const tocHastToMdx = (toc, components) => {
|
|
|
73108
73108
|
|
|
73109
73109
|
|
|
73110
73110
|
const { codeTabsTransformer: compile_codeTabsTransformer, ...transforms } = defaultTransforms;
|
|
73111
|
-
const compile_compile =
|
|
73111
|
+
const compile_compile = (text, { components = {}, missingComponents, copyButtons, useTailwind, ...opts } = {}) => {
|
|
73112
73112
|
const remarkPlugins = [
|
|
73113
73113
|
remarkFrontmatter,
|
|
73114
73114
|
remarkGfm,
|
|
@@ -73123,7 +73123,7 @@ const compile_compile = async (text, { components = {}, missingComponents, copyB
|
|
|
73123
73123
|
remarkPlugins.push([transform_tailwind, { components }]);
|
|
73124
73124
|
}
|
|
73125
73125
|
try {
|
|
73126
|
-
const vfile =
|
|
73126
|
+
const vfile = compileSync(text, {
|
|
73127
73127
|
outputFormat: 'function-body',
|
|
73128
73128
|
providerImportSource: '#',
|
|
73129
73129
|
remarkPlugins,
|
|
@@ -88551,7 +88551,7 @@ const makeUseMDXComponents = (more = {}) => {
|
|
|
88551
88551
|
|
|
88552
88552
|
|
|
88553
88553
|
|
|
88554
|
-
const run_run =
|
|
88554
|
+
const run_run = (string, _opts = {}) => {
|
|
88555
88555
|
const { Fragment } = jsx_runtime_namespaceObject;
|
|
88556
88556
|
const { components = {}, terms, variables, baseUrl, imports = {}, theme, copyButtons, ...opts } = _opts;
|
|
88557
88557
|
const tocsByTag = {};
|
|
@@ -88568,7 +88568,7 @@ const run_run = async (string, _opts = {}) => {
|
|
|
88568
88568
|
return memo;
|
|
88569
88569
|
}, {});
|
|
88570
88570
|
const exec = (text, { useMDXComponents = makeUseMdxComponents(exportedComponents) } = {}) => {
|
|
88571
|
-
return
|
|
88571
|
+
return runSync(text, {
|
|
88572
88572
|
...jsx_runtime_namespaceObject,
|
|
88573
88573
|
Fragment,
|
|
88574
88574
|
baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx",
|
|
@@ -88578,12 +88578,12 @@ const run_run = async (string, _opts = {}) => {
|
|
|
88578
88578
|
});
|
|
88579
88579
|
};
|
|
88580
88580
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
88581
|
-
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } =
|
|
88581
|
+
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } = exec(string);
|
|
88582
88582
|
let Toc;
|
|
88583
88583
|
const tocMdx = tocHastToMdx(toc, tocsByTag);
|
|
88584
88584
|
if (tocMdx) {
|
|
88585
|
-
const compiledToc =
|
|
88586
|
-
const tocModule =
|
|
88585
|
+
const compiledToc = lib_compile(tocMdx);
|
|
88586
|
+
const tocModule = exec(compiledToc, { useMDXComponents: () => ({ p: Fragment }) });
|
|
88587
88587
|
Toc = tocModule.default;
|
|
88588
88588
|
}
|
|
88589
88589
|
return {
|
package/dist/main.node.js
CHANGED
|
@@ -87216,8 +87216,8 @@ function core_createProcessor(options) {
|
|
|
87216
87216
|
* Promise to compiled file.
|
|
87217
87217
|
*/
|
|
87218
87218
|
function compile(vfileCompatible, compileOptions) {
|
|
87219
|
-
const {file, options} =
|
|
87220
|
-
return
|
|
87219
|
+
const {file, options} = resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
87220
|
+
return createProcessor(options).process(file)
|
|
87221
87221
|
}
|
|
87222
87222
|
|
|
87223
87223
|
/**
|
|
@@ -87233,8 +87233,8 @@ function compile(vfileCompatible, compileOptions) {
|
|
|
87233
87233
|
* Compiled file.
|
|
87234
87234
|
*/
|
|
87235
87235
|
function compileSync(vfileCompatible, compileOptions) {
|
|
87236
|
-
const {file, options} =
|
|
87237
|
-
return
|
|
87236
|
+
const {file, options} = resolve_file_and_options_resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
87237
|
+
return core_createProcessor(options).processSync(file)
|
|
87238
87238
|
}
|
|
87239
87239
|
|
|
87240
87240
|
;// ./errors/mdx-syntax-error.ts
|
|
@@ -90018,7 +90018,7 @@ const tocHastToMdx = (toc, components) => {
|
|
|
90018
90018
|
|
|
90019
90019
|
|
|
90020
90020
|
const { codeTabsTransformer: compile_codeTabsTransformer, ...transforms } = defaultTransforms;
|
|
90021
|
-
const compile_compile =
|
|
90021
|
+
const compile_compile = (text, { components = {}, missingComponents, copyButtons, useTailwind, ...opts } = {}) => {
|
|
90022
90022
|
const remarkPlugins = [
|
|
90023
90023
|
remarkFrontmatter,
|
|
90024
90024
|
remarkGfm,
|
|
@@ -90033,7 +90033,7 @@ const compile_compile = async (text, { components = {}, missingComponents, copyB
|
|
|
90033
90033
|
remarkPlugins.push([transform_tailwind, { components }]);
|
|
90034
90034
|
}
|
|
90035
90035
|
try {
|
|
90036
|
-
const vfile =
|
|
90036
|
+
const vfile = compileSync(text, {
|
|
90037
90037
|
outputFormat: 'function-body',
|
|
90038
90038
|
providerImportSource: '#',
|
|
90039
90039
|
remarkPlugins,
|
|
@@ -105461,7 +105461,7 @@ const makeUseMDXComponents = (more = {}) => {
|
|
|
105461
105461
|
|
|
105462
105462
|
|
|
105463
105463
|
|
|
105464
|
-
const run_run =
|
|
105464
|
+
const run_run = (string, _opts = {}) => {
|
|
105465
105465
|
const { Fragment } = jsx_runtime_namespaceObject;
|
|
105466
105466
|
const { components = {}, terms, variables, baseUrl, imports = {}, theme, copyButtons, ...opts } = _opts;
|
|
105467
105467
|
const tocsByTag = {};
|
|
@@ -105478,7 +105478,7 @@ const run_run = async (string, _opts = {}) => {
|
|
|
105478
105478
|
return memo;
|
|
105479
105479
|
}, {});
|
|
105480
105480
|
const exec = (text, { useMDXComponents = makeUseMdxComponents(exportedComponents) } = {}) => {
|
|
105481
|
-
return
|
|
105481
|
+
return runSync(text, {
|
|
105482
105482
|
...jsx_runtime_namespaceObject,
|
|
105483
105483
|
Fragment,
|
|
105484
105484
|
baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx",
|
|
@@ -105488,12 +105488,12 @@ const run_run = async (string, _opts = {}) => {
|
|
|
105488
105488
|
});
|
|
105489
105489
|
};
|
|
105490
105490
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
105491
|
-
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } =
|
|
105491
|
+
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } = exec(string);
|
|
105492
105492
|
let Toc;
|
|
105493
105493
|
const tocMdx = tocHastToMdx(toc, tocsByTag);
|
|
105494
105494
|
if (tocMdx) {
|
|
105495
|
-
const compiledToc =
|
|
105496
|
-
const tocModule =
|
|
105495
|
+
const compiledToc = lib_compile(tocMdx);
|
|
105496
|
+
const tocModule = exec(compiledToc, { useMDXComponents: () => ({ p: Fragment }) });
|
|
105497
105497
|
Toc = tocModule.default;
|
|
105498
105498
|
}
|
|
105499
105499
|
return {
|