@readme/markdown 9.3.3 → 9.4.1
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/components/Embed/index.tsx +1 -2
- package/dist/lib/compile.d.ts +1 -1
- package/dist/lib/run.d.ts +1 -1
- package/dist/main.js +12 -13
- package/dist/main.node.js +12 -13
- package/dist/main.node.js.map +1 -1
- package/package.json +1 -1
|
@@ -52,8 +52,7 @@ const Embed = ({
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (iframe) {
|
|
55
|
-
|
|
56
|
-
return <iframe {...attrs} src={url} style={{ border: 'none', display: 'flex', margin: 'auto' }} />;
|
|
55
|
+
return <iframe {...attrs} src={url} style={{ border: 'none', display: 'flex', margin: 'auto' }} title={title} />;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
if (!providerUrl && url)
|
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
|
@@ -12138,8 +12138,7 @@ const Embed = ({ lazy = true, url, html, providerName, providerUrl, title, ifram
|
|
|
12138
12138
|
}
|
|
12139
12139
|
}
|
|
12140
12140
|
if (iframe) {
|
|
12141
|
-
|
|
12142
|
-
return external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("iframe", { ...attrs, src: url, style: { border: 'none', display: 'flex', margin: 'auto' } });
|
|
12141
|
+
return external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("iframe", { ...attrs, src: url, style: { border: 'none', display: 'flex', margin: 'auto' }, title: title });
|
|
12143
12142
|
}
|
|
12144
12143
|
if (!providerUrl && url)
|
|
12145
12144
|
providerUrl = new URL(url).hostname
|
|
@@ -70306,8 +70305,8 @@ function core_createProcessor(options) {
|
|
|
70306
70305
|
* Promise to compiled file.
|
|
70307
70306
|
*/
|
|
70308
70307
|
function compile(vfileCompatible, compileOptions) {
|
|
70309
|
-
const {file, options} =
|
|
70310
|
-
return
|
|
70308
|
+
const {file, options} = resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
70309
|
+
return createProcessor(options).process(file)
|
|
70311
70310
|
}
|
|
70312
70311
|
|
|
70313
70312
|
/**
|
|
@@ -70323,8 +70322,8 @@ function compile(vfileCompatible, compileOptions) {
|
|
|
70323
70322
|
* Compiled file.
|
|
70324
70323
|
*/
|
|
70325
70324
|
function compileSync(vfileCompatible, compileOptions) {
|
|
70326
|
-
const {file, options} =
|
|
70327
|
-
return
|
|
70325
|
+
const {file, options} = resolve_file_and_options_resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
70326
|
+
return core_createProcessor(options).processSync(file)
|
|
70328
70327
|
}
|
|
70329
70328
|
|
|
70330
70329
|
;// ./errors/mdx-syntax-error.ts
|
|
@@ -73108,7 +73107,7 @@ const tocHastToMdx = (toc, components) => {
|
|
|
73108
73107
|
|
|
73109
73108
|
|
|
73110
73109
|
const { codeTabsTransformer: compile_codeTabsTransformer, ...transforms } = defaultTransforms;
|
|
73111
|
-
const compile_compile =
|
|
73110
|
+
const compile_compile = (text, { components = {}, missingComponents, copyButtons, useTailwind, ...opts } = {}) => {
|
|
73112
73111
|
const remarkPlugins = [
|
|
73113
73112
|
remarkFrontmatter,
|
|
73114
73113
|
remarkGfm,
|
|
@@ -73123,7 +73122,7 @@ const compile_compile = async (text, { components = {}, missingComponents, copyB
|
|
|
73123
73122
|
remarkPlugins.push([transform_tailwind, { components }]);
|
|
73124
73123
|
}
|
|
73125
73124
|
try {
|
|
73126
|
-
const vfile =
|
|
73125
|
+
const vfile = compileSync(text, {
|
|
73127
73126
|
outputFormat: 'function-body',
|
|
73128
73127
|
providerImportSource: '#',
|
|
73129
73128
|
remarkPlugins,
|
|
@@ -88551,7 +88550,7 @@ const makeUseMDXComponents = (more = {}) => {
|
|
|
88551
88550
|
|
|
88552
88551
|
|
|
88553
88552
|
|
|
88554
|
-
const run_run =
|
|
88553
|
+
const run_run = (string, _opts = {}) => {
|
|
88555
88554
|
const { Fragment } = jsx_runtime_namespaceObject;
|
|
88556
88555
|
const { components = {}, terms, variables, baseUrl, imports = {}, theme, copyButtons, ...opts } = _opts;
|
|
88557
88556
|
const tocsByTag = {};
|
|
@@ -88568,7 +88567,7 @@ const run_run = async (string, _opts = {}) => {
|
|
|
88568
88567
|
return memo;
|
|
88569
88568
|
}, {});
|
|
88570
88569
|
const exec = (text, { useMDXComponents = makeUseMdxComponents(exportedComponents) } = {}) => {
|
|
88571
|
-
return
|
|
88570
|
+
return runSync(text, {
|
|
88572
88571
|
...jsx_runtime_namespaceObject,
|
|
88573
88572
|
Fragment,
|
|
88574
88573
|
baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx",
|
|
@@ -88578,12 +88577,12 @@ const run_run = async (string, _opts = {}) => {
|
|
|
88578
88577
|
});
|
|
88579
88578
|
};
|
|
88580
88579
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
88581
|
-
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } =
|
|
88580
|
+
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } = exec(string);
|
|
88582
88581
|
let Toc;
|
|
88583
88582
|
const tocMdx = tocHastToMdx(toc, tocsByTag);
|
|
88584
88583
|
if (tocMdx) {
|
|
88585
|
-
const compiledToc =
|
|
88586
|
-
const tocModule =
|
|
88584
|
+
const compiledToc = lib_compile(tocMdx);
|
|
88585
|
+
const tocModule = exec(compiledToc, { useMDXComponents: () => ({ p: Fragment }) });
|
|
88587
88586
|
Toc = tocModule.default;
|
|
88588
88587
|
}
|
|
88589
88588
|
return {
|
package/dist/main.node.js
CHANGED
|
@@ -16507,8 +16507,7 @@ const Embed = ({ lazy = true, url, html, providerName, providerUrl, title, ifram
|
|
|
16507
16507
|
}
|
|
16508
16508
|
}
|
|
16509
16509
|
if (iframe) {
|
|
16510
|
-
|
|
16511
|
-
return external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("iframe", { ...attrs, src: url, style: { border: 'none', display: 'flex', margin: 'auto' } });
|
|
16510
|
+
return external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_default().createElement("iframe", { ...attrs, src: url, style: { border: 'none', display: 'flex', margin: 'auto' }, title: title });
|
|
16512
16511
|
}
|
|
16513
16512
|
if (!providerUrl && url)
|
|
16514
16513
|
providerUrl = new URL(url).hostname
|
|
@@ -87216,8 +87215,8 @@ function core_createProcessor(options) {
|
|
|
87216
87215
|
* Promise to compiled file.
|
|
87217
87216
|
*/
|
|
87218
87217
|
function compile(vfileCompatible, compileOptions) {
|
|
87219
|
-
const {file, options} =
|
|
87220
|
-
return
|
|
87218
|
+
const {file, options} = resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
87219
|
+
return createProcessor(options).process(file)
|
|
87221
87220
|
}
|
|
87222
87221
|
|
|
87223
87222
|
/**
|
|
@@ -87233,8 +87232,8 @@ function compile(vfileCompatible, compileOptions) {
|
|
|
87233
87232
|
* Compiled file.
|
|
87234
87233
|
*/
|
|
87235
87234
|
function compileSync(vfileCompatible, compileOptions) {
|
|
87236
|
-
const {file, options} =
|
|
87237
|
-
return
|
|
87235
|
+
const {file, options} = resolve_file_and_options_resolveFileAndOptions(vfileCompatible, compileOptions)
|
|
87236
|
+
return core_createProcessor(options).processSync(file)
|
|
87238
87237
|
}
|
|
87239
87238
|
|
|
87240
87239
|
;// ./errors/mdx-syntax-error.ts
|
|
@@ -90018,7 +90017,7 @@ const tocHastToMdx = (toc, components) => {
|
|
|
90018
90017
|
|
|
90019
90018
|
|
|
90020
90019
|
const { codeTabsTransformer: compile_codeTabsTransformer, ...transforms } = defaultTransforms;
|
|
90021
|
-
const compile_compile =
|
|
90020
|
+
const compile_compile = (text, { components = {}, missingComponents, copyButtons, useTailwind, ...opts } = {}) => {
|
|
90022
90021
|
const remarkPlugins = [
|
|
90023
90022
|
remarkFrontmatter,
|
|
90024
90023
|
remarkGfm,
|
|
@@ -90033,7 +90032,7 @@ const compile_compile = async (text, { components = {}, missingComponents, copyB
|
|
|
90033
90032
|
remarkPlugins.push([transform_tailwind, { components }]);
|
|
90034
90033
|
}
|
|
90035
90034
|
try {
|
|
90036
|
-
const vfile =
|
|
90035
|
+
const vfile = compileSync(text, {
|
|
90037
90036
|
outputFormat: 'function-body',
|
|
90038
90037
|
providerImportSource: '#',
|
|
90039
90038
|
remarkPlugins,
|
|
@@ -105461,7 +105460,7 @@ const makeUseMDXComponents = (more = {}) => {
|
|
|
105461
105460
|
|
|
105462
105461
|
|
|
105463
105462
|
|
|
105464
|
-
const run_run =
|
|
105463
|
+
const run_run = (string, _opts = {}) => {
|
|
105465
105464
|
const { Fragment } = jsx_runtime_namespaceObject;
|
|
105466
105465
|
const { components = {}, terms, variables, baseUrl, imports = {}, theme, copyButtons, ...opts } = _opts;
|
|
105467
105466
|
const tocsByTag = {};
|
|
@@ -105478,7 +105477,7 @@ const run_run = async (string, _opts = {}) => {
|
|
|
105478
105477
|
return memo;
|
|
105479
105478
|
}, {});
|
|
105480
105479
|
const exec = (text, { useMDXComponents = makeUseMdxComponents(exportedComponents) } = {}) => {
|
|
105481
|
-
return
|
|
105480
|
+
return runSync(text, {
|
|
105482
105481
|
...jsx_runtime_namespaceObject,
|
|
105483
105482
|
Fragment,
|
|
105484
105483
|
baseUrl: "file:///home/runner/work/markdown/markdown/lib/run.tsx",
|
|
@@ -105488,12 +105487,12 @@ const run_run = async (string, _opts = {}) => {
|
|
|
105488
105487
|
});
|
|
105489
105488
|
};
|
|
105490
105489
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
105491
|
-
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } =
|
|
105490
|
+
const { Toc: _Toc, toc, default: Content, stylesheet, ...exports } = exec(string);
|
|
105492
105491
|
let Toc;
|
|
105493
105492
|
const tocMdx = tocHastToMdx(toc, tocsByTag);
|
|
105494
105493
|
if (tocMdx) {
|
|
105495
|
-
const compiledToc =
|
|
105496
|
-
const tocModule =
|
|
105494
|
+
const compiledToc = lib_compile(tocMdx);
|
|
105495
|
+
const tocModule = exec(compiledToc, { useMDXComponents: () => ({ p: Fragment }) });
|
|
105497
105496
|
Toc = tocModule.default;
|
|
105498
105497
|
}
|
|
105499
105498
|
return {
|