This commit is contained in:
2024-03-22 03:47:51 +05:30
parent 8bcf3d211e
commit 89819f6fe2
28440 changed files with 3211033 additions and 2 deletions

13
node_modules/micromark-extension-mdx-md/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,13 @@
/**
* @typedef {import('micromark-util-types').Extension} Extension
*/
/**
* Create an extension for `micromark` to disable some CommonMark syntax (code
* (indented), autolinks, and HTML (flow and text)) for MDX.
*
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to disable
* some CommonMark syntax for MDX.
*/
export function mdxMd(): Extension
export type Extension = import('micromark-util-types').Extension

17
node_modules/micromark-extension-mdx-md/index.js generated vendored Normal file
View File

@@ -0,0 +1,17 @@
/**
* @typedef {import('micromark-util-types').Extension} Extension
*/
/**
* Create an extension for `micromark` to disable some CommonMark syntax (code
* (indented), autolinks, and HTML (flow and text)) for MDX.
*
* @returns {Extension}
* Extension for `micromark` that can be passed in `extensions` to disable
* some CommonMark syntax for MDX.
*/
export function mdxMd() {
return {
disable: {null: ['autolink', 'codeIndented', 'htmlFlow', 'htmlText']}
}
}

22
node_modules/micromark-extension-mdx-md/license generated vendored Normal file
View File

@@ -0,0 +1,22 @@
(The MIT License)
Copyright (c) 2020 Titus Wormer <tituswormer@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

78
node_modules/micromark-extension-mdx-md/package.json generated vendored Normal file
View File

@@ -0,0 +1,78 @@
{
"name": "micromark-extension-mdx-md",
"version": "2.0.0",
"description": "micromark extension to turn some markdown features off for MDX",
"license": "MIT",
"keywords": [
"micromark",
"micromark-extension",
"mdx",
"mdxjs",
"md",
"markdown",
"unified"
],
"repository": "micromark/micromark-extension-mdx-md",
"bugs": "https://github.com/micromark/micromark-extension-mdx-md/issues",
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
},
"author": "Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)",
"contributors": [
"Titus Wormer <tituswormer@gmail.com> (https://wooorm.com)"
],
"sideEffects": false,
"type": "module",
"exports": "./index.js",
"files": [
"index.d.ts",
"index.js"
],
"dependencies": {
"micromark-util-types": "^2.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"c8": "^8.0.0",
"micromark": "^4.0.0",
"prettier": "^2.0.0",
"remark-cli": "^11.0.0",
"remark-preset-wooorm": "^9.0.0",
"type-coverage": "^2.0.0",
"typescript": "^5.0.0",
"xo": "^0.54.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
"build": "tsc --build --clean && tsc --build && type-coverage",
"format": "remark . -qfo && prettier . -w --loglevel warn && xo --fix",
"test-api-prod": "node --conditions production test.js",
"test-api-dev": "node --conditions development test.js",
"test-api": "npm run test-api-dev && npm run test-api-prod",
"test-coverage": "c8 --100 --reporter lcov npm run test-api",
"test": "npm run build && npm run format && npm run test-coverage"
},
"prettier": {
"bracketSpacing": false,
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false
},
"remarkConfig": {
"plugins": [
"remark-preset-wooorm"
]
},
"typeCoverage": {
"atLeast": 100,
"detail": true,
"ignoreCatch": true,
"strict": true
},
"xo": {
"prettier": true
}
}

243
node_modules/micromark-extension-mdx-md/readme.md generated vendored Normal file
View File

@@ -0,0 +1,243 @@
# micromark-extension-mdx-md
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
[![Sponsors][sponsors-badge]][collective]
[![Backers][backers-badge]][collective]
[![Chat][chat-badge]][chat]
[micromark][] extension to turn some markdown features off for [MDX][mdxjs].
## Contents
* [What is this?](#what-is-this)
* [When to use this](#when-to-use-this)
* [Install](#install)
* [Use](#use)
* [API](#api)
* [`mdxMd()`](#mdxmd)
* [Authoring](#authoring)
* [Types](#types)
* [Compatibility](#compatibility)
* [Security](#security)
* [Related](#related)
* [Contribute](#contribute)
* [License](#license)
## What is this?
This package contains an extension to turn off some markdown constructs when
parsing.
## When to use this
This project is useful when you want to disable support for code (indented),
autolinks, and HTML (flow and text) in markdown.
You can use this extension when you are working with [`micromark`][micromark].
To support all MDX features, use
[`micromark-extension-mdxjs`][micromark-extension-mdxjs] instead.
All these packages are used in [`remark-mdx`][remark-mdx], which focusses on
making it easier to transform content by abstracting these internals away.
## Install
This package is [ESM only][esm].
In Node.js (version 16+), install with [npm][]:
```sh
npm install micromark-extension-mdx-md
```
In Deno with [`esm.sh`][esmsh]:
```js
import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@2'
```
In browsers with [`esm.sh`][esmsh]:
```html
<script type="module">
import {mdxMd} from 'https://esm.sh/micromark-extension-mdx-md@2?bundle'
</script>
```
## Use
```js
import {micromark} from 'micromark'
import {mdxMd} from 'micromark-extension-mdx-md'
const output = micromark('\ta', {extensions: [mdxMd()]})
console.log(output)
```
Yields:
```html
<p>a</p>
```
## API
This package exports the identifier [`mdxMd`][api-mdx-md].
There is no default export.
### `mdxMd()`
Create an extension for `micromark` to disable some CommonMark syntax (code
(indented), autolinks, and HTML (flow and text)) for MDX.
###### Returns
Extension for `micromark` that can be passed in `extensions` to disable some
CommonMark syntax for MDX ([`Extension`][micromark-extension]).
## Authoring
To improve authoring the new constructs MDX adds (ESM, expressions, and
JSX), some markdown features are turned off by this extension.
There are good alternatives.
###### Code (indented)
Use fenced code instead.
Change the following markdown:
```markdown
console.log(1)
```
…into:
````markdown
```js
console.log(1)
```
````
###### Autolinks
Use links (with a resource or a reference) instead.
Change the following markdown:
```markdown
<https://some-link-here.com>
```
…into:
```markdown
[descriptive text](https://and-the-link-here.com)
```
###### HTML (flow and text)
Use JSX instead: change `<img>` into `<img />`.
Not supporting HTML also means that HTML comments are not supported.
Use a comment in an empty expression instead.
Change `<!-- comment -->` into `{/* comment */}`.
## Types
This package is fully typed with [TypeScript][].
It exports no additional types.
## Compatibility
Projects maintained by the unified collective are compatible with maintained
versions of Node.js.
When we cut a new major release, we drop support for unmaintained versions of
Node.
This means we try to keep the current release line, `micromark-extension-mdx-md@^2`,
compatible with Node.js 16.
This package works with `micromark@^3`.
## Security
This package is safe.
## Related
* [`micromark-extension-mdxjs`][micromark-extension-mdxjs]
— support all of MDX
* [`remark-mdx`][remark-mdx]
— support all of MDX in remark
## Contribute
See [`contributing.md` in `micromark/.github`][contributing] for ways to get
started.
See [`support.md`][support] for ways to get help.
This project has a [code of conduct][coc].
By interacting with this repository, organization, or community you agree to
abide by its terms.
## License
[MIT][license] © [Titus Wormer][author]
<!-- Definitions -->
[build-badge]: https://github.com/micromark/micromark-extension-mdx-md/workflows/main/badge.svg
[build]: https://github.com/micromark/micromark-extension-mdx-md/actions
[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark-extension-mdx-md.svg
[coverage]: https://codecov.io/github/micromark/micromark-extension-mdx-md
[downloads-badge]: https://img.shields.io/npm/dm/micromark-extension-mdx-md.svg
[downloads]: https://www.npmjs.com/package/micromark-extension-mdx-md
[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-extension-mdx-md
[size]: https://bundlejs.com/?q=micromark-extension-mdx-md
[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg
[backers-badge]: https://opencollective.com/unified/backers/badge.svg
[collective]: https://opencollective.com/unified
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg
[chat]: https://github.com/micromark/micromark/discussions
[npm]: https://docs.npmjs.com/cli/install
[esmsh]: https://esm.sh
[license]: license
[author]: https://wooorm.com
[contributing]: https://github.com/micromark/.github/blob/main/contributing.md
[support]: https://github.com/micromark/.github/blob/main/support.md
[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[typescript]: https://www.typescriptlang.org
[mdxjs]: https://mdxjs.com
[micromark]: https://github.com/micromark/micromark
[micromark-extension]: https://github.com/micromark/micromark#syntaxextension
[micromark-extension-mdxjs]: https://github.com/micromark/micromark-extension-mdxjs
[remark-mdx]: https://mdxjs.com/packages/remark-mdx/
[api-mdx-md]: #mdxmd