Gathering detailed insights and metrics for @astrojs/micromark-extension-mdx-jsx
Gathering detailed insights and metrics for @astrojs/micromark-extension-mdx-jsx
micromark extension to support MDX or MDX.js JSX
npm install @astrojs/micromark-extension-mdx-jsx
Typescript
Module System
Node Version
NPM Version
77.3
Supply Chain
84.9
Quality
78.9
Maintenance
100
Vulnerability
100
License
JavaScript (91.88%)
HTML (8.12%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
1,681,773
Last Day
318
Last Week
1,878
Last Month
11,570
Last Year
244,289
NOASSERTION License
1 Stars
67 Commits
1 Forks
1 Watchers
1 Branches
3 Contributors
Updated on Jun 10, 2022
Minified
Minified + Gzipped
Latest Version
1.0.3
Package Id
@astrojs/micromark-extension-mdx-jsx@1.0.3
Unpacked Size
77.02 kB
Size
10.10 kB
File Count
23
NPM Version
8.5.5
Node Version
16.15.0
Cumulative downloads
Total Downloads
Last Day
-8.6%
318
Compared to previous day
Last Week
-20.1%
1,878
Compared to previous week
Last Month
-23.9%
11,570
Compared to previous month
Last Year
-53.7%
244,289
Compared to previous year
9
This fork is based on micromark/micromark-extension-mdx-jsx by the original author Titus Wormer.
The purpose of this fork is to provide extended MDX/JSX syntax support for the Astro website build tool. If you're not using Astro, you should probably use the original extension instead of this fork.
:
) preceded by whitespace start attribute names instead of local namesThe original code always treated colons inside JSX tags as a separator between a primary name and a local name, even if there was whitespace before the colon. Our forked version starts an attribute name instead of a local name if there is whitespace before the colon.
This leads to the following changes:
<input :placeholder="...">
is now treated as an input
element with an attribute named :placeholder
.
<input:placeholder="...">
, resulting in an element named input:placeholder
(with placeholder
being the local name of the element), and a syntax error due to the following unexpected value assignment ="..."
.<input disabled :placeholder="...">
is now treated as an input
element with two attributes named disabled
and :placeholder
.
<input disabled:placeholder="...">
, resulting in an input
element with only one attribute named disabled:placeholder
.As a result, these AlpineJS examples now work as expected:
1<input type="text" :placeholder="placeholder"> 2<input type="text" disabled :placeholder="placeholder"> 3<div :class="open ? '' : 'hidden'">Test</div> 4<div :style="true && { color: 'red' }">Test</div>
@
The original code did not allow attribute names to start with @
. Our forked version allows this.
As a result, these examples using the AlpineJS shorthand syntax for x-on:
now work as expected:
1<button @click="handleClick">Test</button>
.
)The original code did not allow attribute names to contain dots. Our forked version allows this.
As a result, in combination with our change that allows @
to start attribute names, these AlpineJS examples now work as expected:
1<button @click.once="console.log('I will only log once')">Test</button> 2<input @input.debounce="fetchResults"> 3<input @input.debounce.500ms="fetchResults"> 4<div @keyup.escape.window="...">Test</div>
No vulnerabilities found.
No security vulnerabilities found.