mdast-util-mdx-jsx
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -23,8 +23,8 @@ /** @return {FromMarkdownExtension} */ | ||
export type MdxJsxAttributeValueExpression = | ||
import('./complex-types').MdxJsxAttributeValueExpression | ||
export type MdxJsxAttribute = import('./complex-types').MdxJsxAttribute | ||
import('./complex-types.js').MdxJsxAttributeValueExpression | ||
export type MdxJsxAttribute = import('./complex-types.js').MdxJsxAttribute | ||
export type MdxJsxExpressionAttribute = | ||
import('./complex-types').MdxJsxExpressionAttribute | ||
export type MdxJsxFlowElement = import('./complex-types').MdxJsxFlowElement | ||
export type MdxJsxTextElement = import('./complex-types').MdxJsxTextElement | ||
import('./complex-types.js').MdxJsxExpressionAttribute | ||
export type MdxJsxFlowElement = import('./complex-types.js').MdxJsxFlowElement | ||
export type MdxJsxTextElement = import('./complex-types.js').MdxJsxTextElement | ||
export type Tag = { | ||
@@ -31,0 +31,0 @@ name: string | null |
@@ -13,7 +13,7 @@ /** | ||
* @typedef {import('estree-jsx').Program} Program | ||
* @typedef {import('./complex-types').MdxJsxAttributeValueExpression} MdxJsxAttributeValueExpression | ||
* @typedef {import('./complex-types').MdxJsxAttribute} MdxJsxAttribute | ||
* @typedef {import('./complex-types').MdxJsxExpressionAttribute} MdxJsxExpressionAttribute | ||
* @typedef {import('./complex-types').MdxJsxFlowElement} MdxJsxFlowElement | ||
* @typedef {import('./complex-types').MdxJsxTextElement} MdxJsxTextElement | ||
* @typedef {import('./complex-types.js').MdxJsxAttributeValueExpression} MdxJsxAttributeValueExpression | ||
* @typedef {import('./complex-types.js').MdxJsxAttribute} MdxJsxAttribute | ||
* @typedef {import('./complex-types.js').MdxJsxExpressionAttribute} MdxJsxExpressionAttribute | ||
* @typedef {import('./complex-types.js').MdxJsxFlowElement} MdxJsxFlowElement | ||
* @typedef {import('./complex-types.js').MdxJsxTextElement} MdxJsxTextElement | ||
* @typedef {{name: string|null, attributes: (MdxJsxAttribute|MdxJsxExpressionAttribute)[], close?: boolean, selfClosing?: boolean, start: Token['start'], end: Token['start']}} Tag | ||
@@ -20,0 +20,0 @@ * |
{ | ||
"name": "mdast-util-mdx-jsx", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "mdast extension to parse and serialize MDX or MDX.js JSX", | ||
@@ -56,4 +56,5 @@ "license": "MIT", | ||
"micromark-extension-mdx-jsx": "^1.0.0", | ||
"micromark-extension-mdx-md": "^1.0.0", | ||
"prettier": "^2.0.0", | ||
"remark-cli": "^10.0.0", | ||
"remark-cli": "^11.0.0", | ||
"remark-preset-wooorm": "^9.0.0", | ||
@@ -64,3 +65,3 @@ "rimraf": "^3.0.0", | ||
"typescript": "^4.0.0", | ||
"xo": "^0.47.0" | ||
"xo": "^0.50.0" | ||
}, | ||
@@ -83,3 +84,6 @@ "scripts": { | ||
"xo": { | ||
"prettier": true | ||
"prettier": true, | ||
"rules": { | ||
"@typescript-eslint/ban-types": "off" | ||
} | ||
}, | ||
@@ -86,0 +90,0 @@ "remarkConfig": { |
@@ -11,3 +11,3 @@ # mdast-util-mdx-jsx | ||
Extensions to parse and serialize JSX between mdast and markdown. | ||
[mdast][] extensions to parse and serialize [MDX][] JSX. | ||
@@ -35,4 +35,4 @@ ## Contents | ||
This package contains extensions that add support for the JSX syntax enabled by | ||
MDX to [`mdast-util-from-markdown`][mdast-util-from-markdown] and | ||
This package contains extensions that add support for the JSX syntax enabled | ||
by MDX to [`mdast-util-from-markdown`][mdast-util-from-markdown] and | ||
[`mdast-util-to-markdown`][mdast-util-to-markdown]. | ||
@@ -64,13 +64,13 @@ | ||
In Deno with [Skypack][]: | ||
In Deno with [`esm.sh`][esmsh]: | ||
```js | ||
import {mdxJsxFromMarkdown, mdxJsxToMarkdown} from 'https://cdn.skypack.dev/mdast-util-mdx-jsx@1?dts' | ||
import {mdxJsxFromMarkdown, mdxJsxToMarkdown} from 'https://esm.sh/mdast-util-mdx-jsx@2' | ||
``` | ||
In browsers with [Skypack][]: | ||
In browsers with [`esm.sh`][esmsh]: | ||
```html | ||
<script type="module"> | ||
import {mdxJsxFromMarkdown, mdxJsxToMarkdown} from 'https://cdn.skypack.dev/mdast-util-mdx-jsx@1?min' | ||
import {mdxJsxFromMarkdown, mdxJsxToMarkdown} from 'https://esm.sh/mdast-util-mdx-jsx@2?bundle' | ||
</script> | ||
@@ -211,3 +211,3 @@ ``` | ||
This package exports the following identifiers: `mdxJsxFromMarkdown`, | ||
This package exports the identifiers `mdxJsxFromMarkdown` and | ||
`mdxJsxToMarkdown`. | ||
@@ -221,5 +221,4 @@ There is no default export. | ||
When using [`micromark-extension-mdx-jsx`][micromark-extension-mdx-jsx] | ||
with `options.addResult`, nodes will have a `data.estree` field set to an | ||
[ESTree][]. | ||
When using the [syntax extension with `addResult`][micromark-extension-mdx-jsx], | ||
nodes will have a `data.estree` field set to an [ESTree][]. | ||
@@ -255,3 +254,3 @@ ### `mdxJsxToMarkdown(options?)` | ||
Try and wrap syntax as this width (`number`, default: `Infinity`). | ||
Try and wrap syntax at this width (`number`, default: `Infinity`). | ||
When set to a finite number (say, `80`), the formatter will print attributes on | ||
@@ -395,7 +394,5 @@ separate lines when a tag doesn’t fit on one line. | ||
This package is fully typed with [TypeScript][]. | ||
It exports the `MdxJsxAttributeValueExpression`, `MdxJsxAttribute`, | ||
`MdxJsxExpressionAttribute`, `MdxJsxFlowElement`, and `MdxJsxTextElement` types | ||
that represents the supported nodes. | ||
It also exports `ToMarkdownOptions`, which represents the structure of the | ||
respective options. | ||
It exports the additional types `MdxJsxAttributeValueExpression`, | ||
`MdxJsxAttribute`, `MdxJsxExpressionAttribute`, `MdxJsxFlowElement`, | ||
`MdxJsxTextElement`, and `ToMarkdownOptions`. | ||
@@ -407,3 +404,5 @@ It also registers the node types with `@types/mdast`. | ||
```js | ||
/** @typedef {import('mdast-util-mdx-jsx')} */ | ||
/** | ||
* @typedef {import('mdast-util-mdx-jsx')} | ||
*/ | ||
@@ -441,4 +440,4 @@ import {visit} from 'unist-util-visit' | ||
See [`contributing.md` in `syntax-tree/.github`][contributing] for ways to get | ||
started. | ||
See [`contributing.md`][contributing] in [`syntax-tree/.github`][health] for | ||
ways to get started. | ||
See [`support.md`][support] for ways to get help. | ||
@@ -482,3 +481,3 @@ | ||
[skypack]: https://www.skypack.dev | ||
[esmsh]: https://esm.sh | ||
@@ -489,8 +488,10 @@ [license]: license | ||
[contributing]: https://github.com/syntax-tree/.github/blob/HEAD/contributing.md | ||
[health]: https://github.com/syntax-tree/.github | ||
[support]: https://github.com/syntax-tree/.github/blob/HEAD/support.md | ||
[contributing]: https://github.com/syntax-tree/.github/blob/main/contributing.md | ||
[coc]: https://github.com/syntax-tree/.github/blob/HEAD/code-of-conduct.md | ||
[support]: https://github.com/syntax-tree/.github/blob/main/support.md | ||
[coc]: https://github.com/syntax-tree/.github/blob/main/code-of-conduct.md | ||
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c | ||
@@ -518,4 +519,2 @@ | ||
[remark-mdx]: https://github.com/mdx-js/mdx/tree/main/packages/remark-mdx | ||
[jsx]: https://facebook.github.io/jsx/ | ||
@@ -530,1 +529,5 @@ | ||
[mdast-util-to-markdown-resourcelink]: https://github.com/syntax-tree/mdast-util-to-markdown#optionsresourcelink | ||
[remark-mdx]: https://mdxjs.com/packages/remark-mdx/ | ||
[mdx]: https://mdxjs.com |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39991
521
14