@readme/markdown 14.10.2 → 14.11.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/components/Embed/index.tsx +4 -1
- package/components/Embed/normalizeYouTubeUrl.ts +41 -0
- package/dist/components/Embed/normalizeYouTubeUrl.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/micromark/mdx-component/syntax.d.ts +7 -6
- package/dist/lib/micromark/mdx-expression-lenient/index.d.ts +1 -0
- package/dist/lib/micromark/mdx-expression-lenient/syntax.d.ts +2 -0
- package/dist/main.js +276 -247
- package/dist/main.node.js +276 -247
- package/dist/main.node.js.map +1 -1
- package/dist/processor/transform/mdxish/components/inline-html.d.ts +6 -5
- package/dist/processor/transform/mdxish/remove-jsx-comments.d.ts +11 -0
- package/dist/processor/transform/mdxish/resolve-esm-imports.d.ts +13 -0
- package/dist/render-fixture.node.js +276 -247
- package/dist/render-fixture.node.js.map +1 -1
- package/package.json +2 -2
- package/dist/processor/transform/mdxish/preprocess-jsx-expressions.d.ts +0 -23
|
@@ -7,14 +7,15 @@ import type { Plugin } from 'unified';
|
|
|
7
7
|
* Runs after `mdxishComponentBlocks`, which skips paragraph-parented html
|
|
8
8
|
* nodes and leaves them for this pass. Two producers put html nodes inside
|
|
9
9
|
* paragraphs:
|
|
10
|
-
* 1. The `mdxComponent` text tokenizer, for lowercase tags
|
|
11
|
-
*
|
|
10
|
+
* 1. The `mdxComponent` text tokenizer, for lowercase tags and inline
|
|
11
|
+
* PascalCase components (Anchor, Glossary) with `{…}` attribute
|
|
12
|
+
* expressions (e.g. `<a href={url}>here</a>`, `<Anchor href={url}>x</Anchor>`).
|
|
12
13
|
* 2. CommonMark's built-in html-text tokenizer, for PascalCase components
|
|
13
14
|
* (e.g. a single html node for self-closing `<C />`).
|
|
14
15
|
*
|
|
15
|
-
* Eligibility mirrors `mdxishComponentBlocks`:
|
|
16
|
-
*
|
|
17
|
-
* `<a href="x">` stays as an html node for rehype-raw.
|
|
16
|
+
* Eligibility mirrors `mdxishComponentBlocks`: a tag only promotes when it
|
|
17
|
+
* carries an expression attribute and isn't a non-inline PascalCase component;
|
|
18
|
+
* plain inline HTML like `<a href="x">` stays as an html node for rehype-raw.
|
|
18
19
|
*/
|
|
19
20
|
declare const mdxishInlineMdxHtmlBlocks: Plugin<[{
|
|
20
21
|
safeMode?: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes JSX-style comments (e.g., { /* comment *\/ }) from content.
|
|
3
|
+
*
|
|
4
|
+
* `@param` content
|
|
5
|
+
* `@returns` Content with JSX comments removed
|
|
6
|
+
* `@example`
|
|
7
|
+
* ```typescript
|
|
8
|
+
* removeJSXComments('Text {/* comment *\/} more text') // => 'Text more text'
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function removeJSXComments(content: string): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ImportDeclaration } from 'estree';
|
|
2
|
+
export type ModuleRegistry = Record<string, unknown>;
|
|
3
|
+
export declare const defaultModuleRegistry: ModuleRegistry;
|
|
4
|
+
/**
|
|
5
|
+
* Turn `import` declarations into a flat map of binding → value.
|
|
6
|
+
*
|
|
7
|
+
* A "binding" is a mapping of a local name to the value of it in the module exports
|
|
8
|
+
* Example: `import { useState } from 'react'` yields `{ useState: React.useState }`.
|
|
9
|
+
*
|
|
10
|
+
* Unsupported specifiers are skipped with a warning rather than throwing, so a
|
|
11
|
+
* single unknown import can't break the rest of the document.
|
|
12
|
+
*/
|
|
13
|
+
export declare const collectImportValues: (importDeclarations: ImportDeclaration[], registry?: ModuleRegistry) => Record<string, unknown>;
|