{"name":"micromark-factory-mdx-expression","version":"1.0.0-alpha.1","keywords":["micromark","factory","mdx","expression"],"author":{"url":"https://wooorm.com","name":"Titus Wormer","email":"tituswormer@gmail.com"},"license":"MIT","_id":"micromark-factory-mdx-expression@1.0.0-alpha.1","maintainers":[{"name":"wooorm","email":"tituswormer@gmail.com"}],"contributors":[{"url":"https://wooorm.com","name":"Titus Wormer","email":"tituswormer@gmail.com"}],"homepage":"https://github.com/micromark/micromark-extension-mdx-expression/tree/main#readme","bugs":{"url":"https://github.com/micromark/micromark-extension-mdx-expression/issues"},"xo":false,"dist":{"shasum":"6c42e5973d3f0f49c237d2f4b1f9624daf826803","tarball":"http://registry-npm.ywwl.com/micromark-factory-mdx-expression/download/micromark-factory-mdx-expression-1.0.0-alpha.1.tgz","fileCount":6,"integrity":"sha512-6JUEANNARvw/6ODkB4y+ysNIV6iDcEDPHHJc5jYdsHq/DC64SXqhsdR5SO8GWjDfi5nYrItuNeNqz/o2aIEYRg==","signatures":[{"sig":"MEUCIA45arPSvTxYlT9ladtaO1jYsnL3YtySt+813t3C6ZIgAiEAsf1qiXhOuru9b1h6mjgieFqR8YpchYOO6LdjjT5GRQ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwJaSCRA9TVsSAnZWagAA9mYP+QF6yJnDZFEE60lBxnq9\nHgM7STmR5G/0IkQRJlBUawaz+LHQ/ynzzI91I+QoAPh2y0MyA3aGO6ve0TOb\nsGsB4YbajWqb+J6tIVZiaHWvzPT+bbfRKS8xNQONGjLNqxXz5jgPUYExETWj\n89jLoiVomIFkX2MXZZSVTXheClGNCqVyKbBDqAPC+5g8H52I9u/SGDqDTN3n\nkhuscLUNexqvVc/S5HXN3C1nSHGj1uV17eDDJn8r2ASHeDqw+9FqgTIHtfCN\ne53ipXbJI+F2jTPjDQrX0uFMWXL6qSy8F2pTa/4fQ5TZcfAn9Pq7OG1xs7LE\nJsw4+Tu5GKP3Rma32JXc5/rlI2+DrkUa1qjFp41rSvrFp1Awq5H10F8+gf1W\nVy8Lnf5b3PN3GHEHmz3/pSCzsWLFryX08z3fY8PkhWzWingN+zEf4XyFZ1Gq\nWgrLtVb/fBjL2MGHjyEPup3s0/KJcD6Usa569LjNPN61G/PSSowdcac9VYle\nI4xPiYBk8LhkLBQ2vmlFxVJKHBtLz7S3bc+OpRH72c9HVyFC+SZfhiKoPRIL\nYBUq0d4hnBNL7w31bxKIbn0YOHxNd3K+vC1T213ZHiNDrF26B+IO6hcHCQG/\npzOxiKwG2wAKLhvjLxy2hwiC6RhTbGSRys6FtWr1NWqCzdOp5m3DHqaqYJsh\nhETz\r\n=fPgt\r\n-----END PGP SIGNATURE-----\r\n","size":4149,"noattachment":false,"key":"/micromark-factory-mdx-expression/-/micromark-factory-mdx-expression-1.0.0-alpha.1.tgz"},"main":"index.js","type":"module","types":"dev/index.d.ts","exports":{"default":"./index.js","development":"./dev/index.js"},"funding":[{"url":"https://github.com/sponsors/unifiedjs","type":"GitHub Sponsors"},{"url":"https://opencollective.com/unified","type":"OpenCollective"}],"scripts":{"build":"rimraf \"*.d.ts\" \"{dev/,lib/}**/*.d.ts\" && tsc && micromark-build && type-coverage"},"_npmUser":{"name":"wooorm","email":"tituswormer@gmail.com"},"repository":{"url":"git+https://github.com/micromark/micromark-extension-mdx-expression.git#main","type":"git"},"_npmVersion":"7.15.1","description":"micromark factory to parse MDX expressions (found in JSX attributes, flow, text)","directories":{},"sideEffects":false,"_nodeVersion":"16.2.0","dependencies":{"vfile-message":"^3.0.0","micromark-util-types":"1.0.0-alpha.2","micromark-util-symbol":"^1.0.0-alpha.2","micromark-util-character":"^1.0.0-alpha.2","micromark-factory-whitespace":"^1.0.0-alpha.2","micromark-util-events-to-acorn":"^1.0.0-alpha.1","unist-util-position-from-estree":"^1.0.0"},"typeCoverage":{"detail":true,"strict":true,"atLeast":100,"ignoreCatch":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/micromark-factory-mdx-expression_1.0.0-alpha.1_1623234194580_0.07857321252663496","host":"s3://npm-registry-packages"},"readme":"# micromark-factory-mdx-expression\n\n[![Build][build-badge]][build]\n[![Coverage][coverage-badge]][coverage]\n[![Downloads][downloads-badge]][downloads]\n[![Size][size-badge]][size]\n[![Sponsors][sponsors-badge]][opencollective]\n[![Backers][backers-badge]][opencollective]\n[![Chat][chat-badge]][chat]\n\n[micromark][] factory to parse MDX expressions (found in JSX attributes, flow,\ntext).\n\n## Contents\n\n* [Install](#install)\n* [Use](#use)\n* [API](#api)\n  * [`factoryMdxExpression(…)`](#factorymdxexpression)\n* [Types](#types)\n* [Compatibility](#compatibility)\n* [Security](#security)\n* [Contribute](#contribute)\n* [License](#license)\n\n## Install\n\nThis package is [ESM only][esm].\nIn Node.js (version 16+), install with [npm][]:\n\n```sh\nnpm install micromark-factory-mdx-expression\n```\n\nIn Deno with [`esm.sh`][esmsh]:\n\n```js\nimport {factoryMdxExpression} from 'https://esm.sh/micromark-factory-mdx-expression@2'\n```\n\nIn browsers with [`esm.sh`][esmsh]:\n\n```html\n<script type=\"module\">\n  import {factoryMdxExpression} from 'https://esm.sh/micromark-factory-mdx-expression@2?bundle'\n</script>\n```\n\n## Use\n\n```js\nimport {ok as assert} from 'devlop'\nimport {factoryMdxExpression} from 'micromark-factory-mdx-expression'\nimport {codes} from 'micromark-util-symbol'\n\n// A micromark tokenizer that uses the factory:\n/** @type {Tokenizer} */\nfunction tokenizeFlowExpression(effects, ok, nok) {\n  return start\n\n  // …\n\n  /** @type {State} */\n  function start(code) {\n    assert(code === codes.leftCurlyBrace, 'expected `{`')\n    return factoryMdxExpression.call(\n      self,\n      effects,\n      factorySpace(effects, after, types.whitespace),\n      'mdxFlowExpression',\n      'mdxFlowExpressionMarker',\n      'mdxFlowExpressionChunk',\n      acorn,\n      acornOptions,\n      addResult,\n      spread,\n      allowEmpty\n    )(code)\n  }\n\n  // …\n}\n```\n\n## API\n\nThis module exports the identifier\n[`factoryMdxExpression`][api-factory-mdx-expression].\nThere is no default export.\n\nThe export map supports the [`development` condition][development].\nRun `node --conditions development module.js` to get instrumented dev code.\nWithout this condition, production code is loaded.\n\n### `factoryMdxExpression(…)`\n\n###### Parameters\n\n* `effects` (`Effects`)\n  — context\n* `ok` (`State`)\n  — state switched to when successful\n* `type` (`string`)\n  — token type for whole (`{}`)\n* `markerType` (`string`)\n  — token type for the markers (`{`, `}`)\n* `chunkType` (`string`)\n  — token type for the value (`1`)\n* `acorn` (`Acorn`)\n  — object with `acorn.parse` and `acorn.parseExpressionAt`\n* `acornOptions` ([`AcornOptions`][acorn-options])\n  — configuration for acorn\n* `boolean` (`addResult`, default: `false`)\n  — add `estree` to token\n* `boolean` (`spread`, default: `false`)\n  — support a spread (`{...a}`) only\n* `boolean` (`allowEmpty`, default: `false`)\n  — support an empty expression\n* `boolean` (`allowLazy`, default: `false`)\n  — support lazy continuation of an expression\n\n###### Returns\n\n`State`.\n\n## Types\n\nThis package is fully typed with [TypeScript][].\nIt exports the additional types [`Acorn`][acorn] and\n[`AcornOptions`][acorn-options].\n\n## Compatibility\n\nProjects maintained by the unified collective are compatible with maintained\nversions of Node.js.\n\nWhen we cut a new major release, we drop support for unmaintained versions of\nNode.\nThis means we try to keep the current release line,\n`micromark-factory-mdx-expression@^2`, compatible with Node.js 16.\n\nThis package works with `micromark` version `3` and later.\n\n## Security\n\nThis package is safe.\n\n## Contribute\n\nSee [`contributing.md`][contributing] in [`micromark/.github`][health] for ways\nto get started.\nSee [`support.md`][support] for ways to get help.\n\nThis project has a [code of conduct][coc].\nBy interacting with this repository, organisation, or community you agree to\nabide by its terms.\n\n## License\n\n[MIT][license] © [Titus Wormer][author]\n\n<!-- Definitions -->\n\n[acorn]: https://github.com/acornjs/acorn\n\n[acorn-options]: https://github.com/acornjs/acorn/blob/96c721dbf89d0ccc3a8c7f39e69ef2a6a3c04dfa/acorn/dist/acorn.d.ts#L16\n\n[api-factory-mdx-expression]: #micromark-factory-mdx-expression\n\n[author]: https://wooorm.com\n\n[backers-badge]: https://opencollective.com/unified/backers/badge.svg\n\n[build]: https://github.com/micromark/micromark-extension-mdx-expression/actions\n\n[build-badge]: https://github.com/micromark/micromark-extension-mdx-expression/workflows/main/badge.svg\n\n[chat]: https://github.com/micromark/micromark/discussions\n\n[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg\n\n[coc]: https://github.com/micromark/.github/blob/main/code-of-conduct.md\n\n[contributing]: https://github.com/micromark/.github/blob/main/contributing.md\n\n[coverage]: https://codecov.io/github/micromark/micromark-extension-mdx-expression\n\n[coverage-badge]: https://img.shields.io/codecov/c/github/micromark/micromark-extension-mdx-expression.svg\n\n[development]: https://nodejs.org/api/packages.html#packages_resolving_user_conditions\n\n[downloads]: https://www.npmjs.com/package/micromark-factory-mdx-expression\n\n[downloads-badge]: https://img.shields.io/npm/dm/micromark-factory-mdx-expression.svg\n\n[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c\n\n[esmsh]: https://esm.sh\n\n[health]: https://github.com/micromark/.github\n\n[license]: https://github.com/micromark/micromark-extension-mdx-expression/blob/main/license\n\n[micromark]: https://github.com/micromark/micromark\n\n[npm]: https://docs.npmjs.com/cli/install\n\n[opencollective]: https://opencollective.com/unified\n\n[size]: https://bundlejs.com/?q=micromark-factory-mdx-expression\n\n[size-badge]: https://img.shields.io/badge/dynamic/json?label=minzipped%20size&query=$.size.compressedSize&url=https://deno.bundlejs.com/?q=micromark-factory-mdx-expression\n\n[sponsors-badge]: https://opencollective.com/unified/sponsors/badge.svg\n\n[support]: https://github.com/micromark/.github/blob/main/support.md\n\n[typescript]: https://www.typescriptlang.org\n","publish_time":1623234194964,"_cnpm_publish_time":1623234194964,"dist-tags":{"latest":"2.0.3","next":"1.0.0-alpha.1"}}