@readme/markdown 7.4.1 → 7.4.2

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <img align="right" width="26%" src="https://owlbertsio-resized.s3.amazonaws.com/Reading.psd.full.png">
4
4
 
5
- ReadMe's flavored Markdown parser and MDX rendering engine. <img align=center src=https://github.com/readmeio/markdown/workflows/CI/badge.svg alt="RDMD CI Status">
5
+ ReadMe's MDX rendering engine and custom component collection. <img align=center src=https://github.com/readmeio/markdown/workflows/CI/badge.svg alt="RDMD CI Status">
6
6
 
7
7
  ```
8
8
  npm install --save @readme/markdown
@@ -21,14 +21,12 @@ export default ({ body }) => <div className="markdown-body">{run(compile(body))}
21
21
 
22
22
  #### `compile`
23
23
 
24
- Compiles mdx to js. A wrapper around [`mdx.compile`](https://mdxjs.com/packages/mdx/#compilefile-options)
25
-
26
- You usually only need this when calling `run` as well. It's been left as a seperate step as a potential caching opportunity.
24
+ Compiles MDX to JS. Essentially a wrapper around [`mdx.compile`](https://mdxjs.com/packages/mdx/#compilefile-options). You usually only need this when calling `run` as well. It's been left as a seperate step as a potential caching opportunity.
27
25
 
28
26
  ###### Parameters
29
27
 
30
- - `string` (`string`) -- An mdx document
31
- - `opts` ([`CompileOpts`](#compileopts), optional) -- configuration
28
+ - `string` (`string`) -- an MDX document
29
+ - `opts` ([`CompileOpts`](#compileopts), optional) -- a configuration object
32
30
 
33
31
  ###### Returns
34
32
 
@@ -36,10 +34,8 @@ compiled code (`string`)
36
34
 
37
35
  #### `run`
38
36
 
39
- Run compiled code. A wrapper around [`mdx.run`](https://mdxjs.com/packages/mdx/#runcode-options)
40
-
41
37
  > [!CAUTION]
42
- > This `eval`'s JavaScript.
38
+ > **This will `eval` the compiled MDX**! Essentially a wrapper around [`mdx.run`](https://mdxjs.com/packages/mdx/#runcode-options).
43
39
 
44
40
  ###### Parameters
45
41
 
@@ -64,17 +60,11 @@ Parses mdx to an hast.
64
60
 
65
61
  #### `plain`
66
62
 
67
- Parses mdx to a plain string.
68
-
69
- > [!WARNING]
70
- > This **does** not `eval` the doc.
63
+ Parses mdx to a plain string. (This **does** not `eval` the doc.)
71
64
 
72
65
  #### `tags`
73
66
 
74
- Returns a list of tag names from the doc.
75
-
76
- > [!WARNING]
77
- > This **does** not `eval` the doc.
67
+ Returns a list of tag names from the doc. (This **does** not `eval` the doc.)
78
68
 
79
69
  #### `utils`
80
70
 
@@ -86,10 +76,10 @@ Extends [`CompileOptions`](https://mdxjs.com/packages/mdx/#compileoptions)
86
76
 
87
77
  ###### Additional Properties
88
78
 
89
- - `lazyImages` (`boolean`, optional) -- Load images lazily.
90
- - `safeMode` (`boolean`, optional) -- Extract script tags from `HTMLBlock`s
91
- - `components` (`Record<string, string>`, optional) -- An object of tag names to mdx.
92
- - `copyButtons` (`Boolean`, optional) — Automatically insert a button to copy a block of text to the clipboard. Currently used on `<code>` elements.
79
+ - `lazyImages` (`boolean`, optional) -- load images lazily
80
+ - `safeMode` (`boolean`, optional) -- extract script tags from `HTMLBlock`s
81
+ - `components` (`Record<string, string>`, optional) -- an object of tag names to mdx.
82
+ - `copyButtons` (`Boolean`, optional) — add a copy button to code blocks
93
83
 
94
84
  ### `RunOpts`
95
85
 
@@ -97,24 +87,22 @@ Extends [`RunOptions`](https://mdxjs.com/packages/mdx/#runoptions)
97
87
 
98
88
  ###### Additional Properties
99
89
 
100
- - `components` (`Record<string, MDXModule>`, optional) -- An object of tag names to executed components.
101
- - `imports` (`Record<string, unknown>`, optional) -- An object of modules to import.
90
+ - `components` (`Record<string, MDXModule>`, optional) -- a set of custom MDX components
91
+ - `imports` (`Record<string, unknown>`, optional) -- an set of modules to import globally
102
92
  - `terms` (`GlossaryTerm[]`, optional)
103
- - `variables` (`Variables`, optional) -- An object containing [user variables}(https://github.com/readmeio/variable).
93
+ - `variables` (`Variables`, optional) -- an object containing [user variables](https://github.com/readmeio/variable)
104
94
 
105
95
  ### `RMDXModule`
106
96
 
107
97
  ###### Properties
108
98
 
109
- - `default` (`() => MDXContent`) -- The mdx douments default export
110
- - `toc` (`HastHeading[]`) -- A list of headings in the document
111
- - `Toc` (`() => MDCContent`) -- A table of contents component
99
+ - `default` (`() => MDXContent`) -- the MDX douments default export
100
+ - `toc` (`HastHeading[]`) -- a list of headings in the document
101
+ - `Toc` (`() => MDCContent`) -- a table of contents component
112
102
 
113
103
  ## Flavored Syntax
114
104
 
115
- ~~Our old editor rendered "Magic Block" components from a custom, JSON-based syntax. To provide seamless backwards-compatibility, our new processor ships with built in support for parsing this old format, and transpiles it straight in to our new, flavored Markdown.~~
116
-
117
- We've also sprinkled a bit of our own syntactic sugar on top to let you supercharge your docs. [**Learn more about ReadMe's flavored syntax!**](https://docs.readme.com/rdmd/docs/syntax-extensions)
105
+ We've also sprinkled a bit of our own custom components in to help you supercharge your docs. [**Learn more about ReadMe's new MDX engine!**](https://docs.readme.com/rdmd/page/mdx-engine)
118
106
 
119
107
  ## Local Development
120
108
 
@@ -131,8 +119,3 @@ If you make changes to the docs or how the markdown is rendered, you may need to
131
119
  ```
132
120
  make updateSnapshot
133
121
  ```
134
-
135
- ## Credits
136
-
137
- - **License**: MIT
138
- - **Authors**: [Dom Harrington](https://github.com/domharrington/), [Rafe Goldberg](https://github.com/rafegoldberg)
@@ -16,7 +16,7 @@ interface ImageProps {
16
16
 
17
17
  const Image = (Props: ImageProps) => {
18
18
  const {
19
- align = 'center',
19
+ align = '',
20
20
  alt = '',
21
21
  border = false,
22
22
  caption,
@@ -75,7 +75,7 @@ const Image = (Props: ImageProps) => {
75
75
  width={width}
76
76
  height={height}
77
77
  title={title}
78
- className={`img img-align-center${border ? ' border' : ''}`}
78
+ className={`img img-align-center ${border ? 'border' : ''}`}
79
79
  alt={alt}
80
80
  loading={lazy ? 'lazy' : 'eager'}
81
81
  />
@@ -101,7 +101,7 @@ const Image = (Props: ImageProps) => {
101
101
  width={width}
102
102
  height={height}
103
103
  title={title}
104
- className={`img img-align-${align}${border ? ' border' : ''}`}
104
+ className={`img ${align ? `img-align-${align}` : ''} ${border ? 'border' : ''}`}
105
105
  alt={alt}
106
106
  loading={lazy ? 'lazy' : 'eager'}
107
107
  />
@@ -37,10 +37,8 @@
37
37
  &[alt~='align-left'] {
38
38
  @extend %img-align-left;
39
39
  }
40
-
41
- &[width='80%'],
40
+ &[align='middle'], // hack to fix Firefox; see: https://stackoverflow.com/a/45901819/1341949
42
41
  &[align='center'],
43
- &[align='middle'],
44
42
  &[alt~='align-center'] {
45
43
  @extend %img-align-center;
46
44
  }
package/dist/main.css CHANGED
@@ -390,4 +390,4 @@ span.CodeMirror-selectedtext { background: none; }
390
390
  z-index: 1;
391
391
  }
392
392
 
393
- .markdown-body img[align=right],.markdown-body img[alt~=align-right]{float:right;margin-left:.75rem}.markdown-body img[align=left],.markdown-body img[alt~=align-left]{float:left;margin-right:.75rem}.markdown-body>img,.markdown-body figure>img,.markdown-body img[width="80%"],.markdown-body img[align=center],.markdown-body img[align=middle],.markdown-body img[alt~=align-center]{display:block}.markdown-body img{border-style:none;box-sizing:content-box;display:inline-block;margin-left:auto;margin-right:auto;max-width:100%;outline:none !important;vertical-align:middle}.markdown-body img[width=smart]{max-height:450px;max-width:100%;width:auto}.markdown-body img.border{border:1px solid rgba(0,0,0,.2)}.markdown-body figure{margin:15px auto}.markdown-body figure figcaption{font-size:.93em;font-style:italic;margin-top:8px;text-align:center}.markdown-body figure .img{display:block}.markdown-body .lightbox.open{align-items:center;background:rgba(255,255,255,.966);display:flex;flex-flow:nowrap column;height:100vh;justify-content:flex-start;left:0;margin-bottom:0;margin-top:0;overflow:hidden;overflow-y:scroll;position:fixed;top:0;user-select:none;width:100vw;z-index:9999999}.markdown-body .lightbox.open::after{content:"";cursor:pointer;display:inline-block;font:normal normal normal 2em/1 FontAwesome;font-size:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;opacity:1;position:fixed;right:1em;text-rendering:auto;top:1em;transform:translate(0, 0);transform:scale(1.5);transition:.3s .3s ease-in}.markdown-body .lightbox.open:not(.open)::after{opacity:0;transform:scale(0)}.markdown-body .lightbox.open .lightbox-inner{align-items:center;box-sizing:content-box;display:inline-flex;justify-content:center;margin:auto;min-height:calc(100vh + 8px);padding:0;position:relative}.markdown-body .lightbox.open img{height:auto !important;max-height:97.5vh !important;max-width:97.5vw !important;min-width:unset !important;width:auto !important}.markdown-body .lightbox.open img.border,.markdown-body .lightbox.open img:not([src$=".png"]):not([src$=".svg"]):not([src$=".jp2"]):not([src$=".tiff"]){box-shadow:0 .5em 3em -1em rgba(0,0,0,.2)}.markdown-body .lightbox.open img[src$=svg]{display:block !important;height:66vw !important;max-width:100% !important;min-width:200px !important;width:42vw !important}.markdown-body table{display:table;border-collapse:collapse;border-spacing:0;width:100%;color:var(--table-text)}.markdown-body table thead{color:var(--table-head-text, inherit)}.markdown-body table thead tr{background:var(--table-head, #f6f8fa)}.markdown-body table tr{background-color:var(--table-row, #fff)}.markdown-body table tr+tr{border-top:1px solid var(--table-edges, #dfe2e5)}.markdown-body table th,.markdown-body table thead td{font-weight:600}.markdown-body table th:empty,.markdown-body table thead td:empty{padding:0}.markdown-body table td,.markdown-body table th{padding:0;color:inherit;vertical-align:middle;border:1px solid var(--table-edges, #dfe2e5);padding:6px 13px}.markdown-body table td>:first-child,.markdown-body table td>:only-child,.markdown-body table th>:first-child,.markdown-body table th>:only-child{margin-top:0 !important}.markdown-body table td>:last-child,.markdown-body table td>:only-child,.markdown-body table th>:last-child,.markdown-body table th>:only-child{margin-bottom:0 !important}.markdown-body table:not(.plain) tr:nth-child(2n){background-color:var(--table-stripe, #fbfcfd)}.markdown-body .rdmd-table{display:block;position:relative}.markdown-body .rdmd-table-inner{box-sizing:content-box;min-width:100%;overflow:auto;width:100%}.markdown-body .rdmd-table table{border:1px solid var(--table-edges, #dfe2e5)}.markdown-body .rdmd-table table:only-child{margin:0 !important}.markdown-body .rdmd-table table:only-child thead th{background:inherit}.markdown-body .rdmd-table table:only-child td:last-child,.markdown-body .rdmd-table table:only-child th:last-child{border-right:none}.markdown-body .rdmd-table table:only-child thead tr,.markdown-body .rdmd-table table:only-child thead th:last-child{box-shadow:3px 0 0 var(--table-head)}.toc-list .glossary-tooltip{pointer-events:none}.markdown-body{--font-size: 90%}.markdown-body code,.markdown-body kbd,.markdown-body pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-family:var(--md-code-font, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace);font-size:1em}.markdown-body code,.markdown-body pre{font-size:12px}.markdown-body pre{margin-bottom:0;margin-top:0}.markdown-body code{background-color:#f6f8fa;background-color:var(--md-code-background, #f6f8fa);border-radius:3px;color:var(--md-code-text);font-size:var(--font-size);margin:0;padding:.2em .4em}.markdown-body code>div[class*=cm-]{display:inherit}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{background:0 0;border:0;font-size:100%;margin:0;padding:0;white-space:pre;word-break:normal}.markdown-body pre{background-color:#f6f8fa;background-color:var(--md-code-background, #f6f8fa);color:inherit;color:var(--md-code-text, inherit);border-radius:3px;border-radius:var(--markdown-radius, 3px);border-radius:var(--md-code-radius, var(--markdown-radius, 3px));font-size:var(--font-size);line-height:1.45;overflow:auto;padding:1em}.markdown-body pre code.theme-dark{background-color:#242e34;background-color:var(--md-code-background, #242e34)}.markdown-body pre code{background-color:rgba(0,0,0,0);border:0;display:inline;line-height:inherit;margin:0;max-width:auto;overflow:visible;padding:0;word-wrap:normal}.markdown-body kbd{background-color:#f6f8fa;background-color:var(--d-code-background, #f6f8fa);border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;display:inline-block;font-size:11px;line-height:10px;padding:3px 5px;vertical-align:middle}.markdown-body button.rdmd-code-copy{display:none !important}.markdown-body button.rdmd-code-copy{-webkit-appearance:unset;margin:.5em .6em 0 0;padding:.25em .7em;cursor:copy;font:inherit;color:inherit;color:var(--md-code-text, inherit);border:none;border-radius:3px;outline:none !important;background:inherit;background:var(--md-code-background, inherit);box-shadow:inset 0 0 0 1px rgba(170,170,170,.66),-1px 2px 6px -3px rgba(0,0,0,.1);transition:.15s ease-out}.markdown-body button.rdmd-code-copy:not(:hover):before,.markdown-body button.rdmd-code-copy:not(:hover):after{opacity:.66}.markdown-body button.rdmd-code-copy:hover:not(:active){box-shadow:inset 0 0 0 1px rgba(139,139,139,.75),-1px 2px 6px -3px rgba(0,0,0,.2)}.markdown-body button.rdmd-code-copy:active{box-shadow:inset 0 0 0 1px rgba(139,139,139,.5),inset 1px 4px 6px -2px rgba(0,0,0,.175)}.markdown-body button.rdmd-code-copy:active:before,.markdown-body button.rdmd-code-copy:active:after{opacity:.75}.markdown-body button.rdmd-code-copy:before,.markdown-body button.rdmd-code-copy:after{display:inline-block;font:normal normal normal 1em/1 "Font Awesome 5 Free","FontAwesome";text-rendering:auto;-webkit-font-smoothing:antialiased;line-height:2;font-family:"ReadMe-Icons";font-variant-ligatures:discretionary-ligatures;font-feature-settings:"liga"}.markdown-body button.rdmd-code-copy:before{content:"";font-weight:800;transition:.3s .15s ease}.markdown-body button.rdmd-code-copy:after{content:"" !important;font-weight:900 !important;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.33);opacity:0 !important;transition:.3s 0s ease}.markdown-body button.rdmd-code-copy_copied{pointer-events:none}.markdown-body button.rdmd-code-copy_copied,.markdown-body button.rdmd-code-copy_copied *{color:green !important;color:var(--md-code-text, green) !important;opacity:1}.markdown-body button.rdmd-code-copy_copied:before{transition:.3s 0s ease;transform:scale(0.33);opacity:0 !important}.markdown-body button.rdmd-code-copy_copied:after{transition:.3s .15s ease;transform:translate(-50%, -50%) scale(1);opacity:1 !important}.markdown-body pre{position:relative}.markdown-body pre>code{background:inherit}.markdown-body pre>code.theme-dark{color:#fff}.markdown-body pre button.rdmd-code-copy{display:inline-block !important;position:absolute;right:0;top:0}.markdown-body pre{overflow:hidden;padding:0}.markdown-body pre>code{display:block !important;overflow:auto;padding:1em;max-height:90vh}.markdown-body pre:hover button.rdmd-code-copy:not(:hover){transition-delay:.4s}.markdown-body pre:not(:hover) button.rdmd-code-copy:not(.rdmd-code-copy_copied){opacity:0 !important}.CodeTabs{color:#333;color:var(--md-code-text, #333);border-radius:var(--md-code-radius, var(--markdown-radius, 3px)) !important;overflow:hidden}.CodeTabs.theme-dark{color:#fff;color:var(--md-code-text, white)}.CodeTabs.theme-dark .CodeTabs-toolbar{background:#373737;background:var(--md-code-tabs, #373737)}.CodeTabs-toolbar{background:#ebedef;background:var(--md-code-tabs, #ebedef);display:flex;flex-flow:row nowrap;overflow:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}.CodeTabs-toolbar::-webkit-scrollbar{display:none}.CodeTabs-toolbar button{white-space:nowrap;transition:.123s ease;-webkit-appearance:none;appearance:none;display:inline-block;line-height:2;padding:.5em 1em;border:none;background:rgba(0,0,0,0);outline:none;color:inherit;font:inherit;font-size:.75em;cursor:pointer}.CodeTabs.CodeTabs_initial .CodeTabs-toolbar button:first-child,.CodeTabs-toolbar button.CodeTabs_active{background:#f6f8fa;background:var(--md-code-background, #F6F8FA);color:#000;color:var(--md-code-text, black);pointer-events:none}.CodeTabs.theme-dark.CodeTabs_initial .CodeTabs-toolbar button:first-child,.CodeTabs.theme-dark .CodeTabs-toolbar button.CodeTabs_active{background:#242e34;background:var(--md-code-background, #242E34);color:#fff;color:var(--md-code-text, white)}.CodeTabs-toolbar button:not(.CodeTabs_active):hover{background:rgba(0,0,0,.075)}.CodeTabs pre{border-radius:0 0 var(--md-code-radius, var(--markdown-radius, 3px)) var(--md-code-radius, var(--markdown-radius, 3px)) !important;background:#f6f8fa;background:var(--md-code-background, #F6F8FA);margin-bottom:0}.CodeTabs pre:not(.CodeTabs_active){display:none}.CodeTabs.theme-dark pre{background:#242e34;background:var(--md-code-background, #242E34)}.CodeTabs.CodeTabs_initial pre:first-child{display:block}.callout{--emoji: 1em;--icon-font: FontAwesome;border-top-right-radius:var(--markdown-radius);border-bottom-right-radius:var(--markdown-radius)}.callout.callout{--background: #f8f8f9;--border: #8b939c}.callout.callout{background:var(--background);border-color:var(--border);color:var(--text);padding:1.33rem}.callout.callout_info{--background: #e3edf2;--title: #46b8da;--border: #5bc0de}.callout.callout_warn,.callout.callout_warning{--background: #fcf8f2;--title: #eea236;--border: #f0ad4e}.callout.callout_ok,.callout.callout_okay,.callout.callout_success{--background: #f3f8f3;--title: #489e49;--border: #50af51}.callout.callout_err,.callout.callout_error{--background: #fdf7f7;--title: #d43f3a;--border: #d9534f}.callout.callout>*{margin-left:1.33rem;position:relative}.callout.callout ul,.callout.callout ol{padding-left:1.3em}.callout.callout a{color:inherit}.callout.callout hr{border-color:var(--border, var(--markdown-edge, #eee))}.callout.callout blockquote{color:var(--text);border-color:var(--border);border-width:3px;padding:0 0 0 .8em}.callout.callout .callout-heading{color:var(--title, --text);font-family:var(--markdown-title-font);font-size:1.25em;font-weight:var(--markdown-title-weight, 600);line-height:1.25;margin-bottom:calc(1.33rem*.5)}.callout.callout .callout-heading:only-child{margin-bottom:0}.callout.callout .callout-heading.empty{float:left;margin-top:calc(1.33rem*.5)}.callout.callout .callout-heading.empty .callout-icon{line-height:0}.callout.callout .callout-heading>*{color:inherit;margin:0}.callout.callout .callout-heading:before{position:absolute;right:100%;width:2.4em;text-align:center;font:normal normal normal 1em/1 FontAwesome}.callout.callout .callout-icon{float:left;margin-left:calc(-1.33rem - .5em);margin-right:-0.25rem}.callout-icon{font-size:var(--emoji, 0);color:var(--icon-color, inherit) !important}.callout-icon:before{content:var(--icon);font-family:var(--icon-font);font-size:var(--icon-size, 1rem);font-weight:var(--icon-weight, 400);position:absolute;top:50%;transform:translate(-50%, -50%);display:inline-block;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rdmdCallouts--useIconFont .callout{--emoji: unset}.rdmdCallouts--useIconFont .callout_okay{--icon: ""}.rdmdCallouts--useIconFont .callout_info{--icon: ""}.rdmdCallouts--useIconFont .callout_warn{--icon: ""}.rdmdCallouts--useIconFont .callout_error{--icon: ""}.rdmdCallouts--useIconFont .callout_default{--emoji: 1rem}.heading.heading{display:flex;justify-content:flex-start;align-items:center;position:relative}.heading.heading .heading-text{flex:1 100%}.heading.heading .heading-anchor-deprecated{position:absolute;top:0}.heading.heading .heading-anchor{top:-1rem !important}.heading.heading .heading-anchor,.heading.heading .heading-anchor-icon{position:absolute !important;display:inline !important;order:-1;right:100%;top:unset !important;margin-right:-0.8rem;padding:.8rem .2rem .8rem 0 !important;font-size:.8rem !important;text-decoration:none;color:inherit;transform:translateX(-100%);transition:.2s ease}.heading.heading .heading-anchor:hover,.heading.heading .heading-anchor-icon:hover{opacity:1}.heading.heading:not(:hover) .heading-anchor-icon{opacity:0}.markdown-body .embed{padding:15px;color:var(--md-code-text, inherit);border-radius:var(--md-code-radius, var(--markdown-radius, 3px));border-radius:3px;background:rgba(0,0,0,0);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);transition:.3s ease}.markdown-body .embed:hover{background:var(--md-code-background, #f6f8fa);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.markdown-body>.embed_hasImg:nth-of-type(odd){margin-right:30px;padding-right:0}.markdown-body>.embed_hasImg:nth-of-type(odd) .embed-link{flex-direction:row-reverse}.markdown-body>.embed_hasImg:nth-of-type(odd) .embed-img{margin-left:.88em;margin-right:-30px;box-shadow:-0.3em .3em .9em -0.3em rgba(0,0,0,.15)}.markdown-body>.embed_hasImg:nth-of-type(even){margin-left:30px;padding-left:0}.markdown-body>.embed_hasImg:nth-of-type(even) .embed-img{margin-left:-30px}.markdown-body .embed:empty{display:none}.markdown-body .embed-media{display:flex;justify-content:center}.markdown-body .embed-media>:only-child{flex:1;margin:-15px;border-radius:0 !important}.markdown-body .embed-link{display:flex;align-items:center;color:var(--markdown-text, #333);text-decoration:none !important}.markdown-body .embed-body{flex:1;line-height:1.3}.markdown-body .embed-body,.markdown-body .embed-body .embed-title{font-size:1.15em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.markdown-body .embed-body .embed-provider{display:block;text-decoration-color:rgba(0,0,0,0) !important;opacity:.88}.markdown-body .embed-body-url{opacity:.75}.markdown-body .embed-provider{font-size:.8em;line-height:1.6;transition:.2 ease}.markdown-body .embed-provider code:only-child{display:block;width:100%;font-size:1.15em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:rgba(0,0,0,0);margin:0;padding:0;font-size:inherit !important}.markdown-body .embed-provider code{opacity:.8}.markdown-body .embed-img{width:5em;max-width:5em;margin:0 .88em 0 0;padding:4px;background:#fff;border:1px solid rgba(0,0,0,.15);border-radius:3px;transition:inherit;box-shadow:.3em .3em .9em -0.3em rgba(0,0,0,.15)}.markdown-body .embed:not(:hover) .embed-img{box-shadow:0 .25em 1em -0.5em rgba(0,0,0,.133)}.markdown-body .embed:hover .embed-img{border:1px solid rgba(0,0,0,.2)}.markdown-body .embed-favicon{width:12px !important;height:12px !important;margin-top:4px;margin-right:6px;margin-bottom:12px}.GlossaryItem-trigger{border-bottom:1px solid #737c83;border-style:dotted;border-top:none;border-left:none;border-right:none;cursor:pointer}.GlossaryItem-tooltip-content{--Glossary-bg: var(--color-bg-page, var(--white));--Glossary-color: var(--color-text-default, var(--gray20));--Glossary-shadow: var( --box-shadow-menu-light, 0 5px 10px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.025), 0 1px 3px rgba(0, 0, 0, 0.025) );background-color:var(--Glossary-bg);border:1px solid var(--color-border-default, rgba(0, 0, 0, 0.1));border-radius:var(--border-radius);box-shadow:var(--Glossary-shadow);color:var(--Glossary-color);font-size:15px;font-weight:400;line-height:1.5;padding:15px;text-align:left;width:350px}[data-color-mode=dark] .GlossaryItem-tooltip-content{--Glossary-bg: var(--gray15);--Glossary-color: var(--color-text-default, var(--white));--Glossary-shadow: var( --box-shadow-menu-dark, 0 1px 3px rgba(0, 0, 0, 0.025), 0 2px 6px rgba(0, 0, 0, 0.025), 0 5px 10px rgba(0, 0, 0, 0.05) )}@media(prefers-color-scheme: dark){[data-color-mode=auto] .GlossaryItem-tooltip-content{--Glossary-bg: var(--Tooltip-bg, var(--gray0));--Glossary-color: var(--color-text-default, var(--white));--Glossary-shadow: var( --box-shadow-menu-dark, 0 1px 3px rgba(0, 0, 0, 0.025), 0 2px 6px rgba(0, 0, 0, 0.025), 0 5px 10px rgba(0, 0, 0, 0.05) )}}.GlossaryItem-term{font-style:italic}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}:root{--markdown-text: inherit;--markdown-title: inherit;--markdown-title-font: inherit;--markdown-font: inherit;--markdown-font-size: inherit;--markdown-line-height: 1.5}.field-description,.markdown-body{color:var(--markdown-text);font-family:var(--markdown-font);line-height:var(--markdown-line-height);position:relative;text-size-adjust:100%;word-wrap:break-word;font-size:var(--markdown-font-size, 14px)}.field-description::before,.field-description::after,.markdown-body::before,.markdown-body::after{content:"";display:table}.field-description::after,.markdown-body::after{clear:both}.field-description ul,.markdown-body ul{list-style:initial}.field-description .anchor,.markdown-body .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.field-description .anchor:focus,.markdown-body .anchor:focus{outline:0}.field-description h1:hover .anchor,.field-description h2:hover .anchor,.field-description h3:hover .anchor,.field-description h4:hover .anchor,.field-description h5:hover .anchor,.field-description h6:hover .anchor,.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.field-description details,.markdown-body details{display:block}.field-description summary,.markdown-body summary{display:list-item}.field-description a,.markdown-body a{transition:.15s ease}.field-description a:hover,.markdown-body a:hover{text-decoration:underline}.field-description a:active,.field-description a:hover,.markdown-body a:active,.markdown-body a:hover{outline-width:0}.field-description a:not([href]),.markdown-body a:not([href]){color:inherit;text-decoration:none}.field-description strong,.markdown-body strong{font-weight:inherit;font-weight:bolder}.field-description h1,.markdown-body h1{font-size:2em;margin:.67em 0}.field-description hr,.markdown-body hr{background:rgba(0,0,0,0);border-bottom:1px solid var(--markdown-edge, #dfe2e5);border-width:0 0 1px;box-sizing:content-box;height:0;margin:15px 0;overflow:hidden}.field-description hr::before,.field-description hr::after,.markdown-body hr::before,.markdown-body hr::after{content:"";display:table}.field-description hr::after,.markdown-body hr::after{clear:both}.field-description input,.markdown-body input{font:inherit;margin:0}.field-description input,.markdown-body input{overflow:visible}.field-description [type=checkbox],.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.field-description *,.markdown-body *{box-sizing:border-box}.field-description input,.markdown-body input{font-family:inherit;font-size:inherit;line-height:inherit}.field-description strong,.markdown-body strong{font-weight:600}.field-description details summary,.markdown-body details summary{cursor:pointer}.field-description h1,.field-description h2,.field-description h3,.field-description h4,.field-description h5,.field-description h6,.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{color:var(--markdown-title);font-family:var(--markdown-title-font);font-size:var(--markdown-title-size);font-weight:var(--markdown-title-weight, 600);line-height:1.25;margin-bottom:var(--markdown-title-marginBottom, 1rem);margin-top:var(--markdown-title-marginTop, 1em)}.field-description h1,.markdown-body h1{font-size:1.75em;font-size:var(--markdown-title-size, 1.75em)}.field-description h2,.markdown-body h2{font-size:1.5em;font-size:var(--markdown-title-size, 1.5em)}.field-description h1,.markdown-body h1{font-weight:700;font-weight:var(--markdown-title-weight, 700)}.field-description h2,.markdown-body h2{font-weight:600;font-weight:var(--markdown-title-weight, 600)}.field-description h3,.field-description h4,.markdown-body h3,.markdown-body h4{font-weight:600;font-weight:var(--markdown-title-weight, 600)}.field-description h3,.markdown-body h3{font-size:1.25em;font-size:var(--markdown-title-size, 1.25em)}.field-description h4,.markdown-body h4{font-size:1em;font-size:var(--markdown-title-size, 1em)}.field-description h5,.field-description h6,.markdown-body h5,.markdown-body h6{font-weight:600;font-weight:var(--markdown-title-weight, 600)}.field-description h5,.markdown-body h5{font-size:.875em;font-size:var(--markdown-title-size, 0.875em)}.field-description h6,.markdown-body h6{color:var(--markdown-title, #6a737d);font-size:.85em;font-size:var(--markdown-title-size, 0.85em)}.field-description p,.field-description .p,.markdown-body p,.markdown-body .p{margin-bottom:10px;margin-top:0}.field-description blockquote,.markdown-body blockquote{margin:0}.field-description ol,.field-description ul,.markdown-body ol,.markdown-body ul{margin-bottom:0;margin-top:0;padding-left:0}.field-description ol ol,.field-description ul ol,.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.field-description ol ol ol,.field-description ol ul ol,.field-description ul ol ol,.field-description ul ul ol,.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.field-description dd,.markdown-body dd{margin-left:0}.field-description input::-webkit-inner-spin-button,.field-description input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button,.markdown-body input::-webkit-outer-spin-button{appearance:none;appearance:none;margin:0}.field-description>:first-child,.markdown-body>:first-child{margin-top:0 !important}.field-description>:last-child,.markdown-body>:last-child{margin-bottom:0 !important}.field-description blockquote,.field-description dl,.field-description ol,.field-description p,.field-description pre,.field-description table,.field-description ul,.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-bottom:15px;margin-top:0}.field-description blockquote,.markdown-body blockquote{border-left:.25em solid #dfe2e5;color:#6a737d;display:block;padding:0 1em}.field-description blockquote>:first-child,.markdown-body blockquote>:first-child{margin-top:0}.field-description blockquote>:last-child,.markdown-body blockquote>:last-child{margin-bottom:0}.field-description ol,.field-description ul,.markdown-body ol,.markdown-body ul{padding-left:2em}.field-description ol ol,.field-description ol ul,.field-description ul ol,.field-description ul ul,.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-bottom:0;margin-top:0}.field-description li,.markdown-body li{clear:both;word-wrap:break-all}.field-description li>p,.markdown-body li>p{margin-top:1em}.field-description li+li,.markdown-body li+li{margin-top:.25em}.field-description dl,.markdown-body dl{padding:0}.field-description dl dt,.markdown-body dl dt{font-size:1em;font-style:italic;font-weight:600;margin-top:1em;padding:0}.field-description dl dd,.markdown-body dl dd{margin-bottom:1em;padding:0 1em}.field-description :checked+.radio-label,.markdown-body :checked+.radio-label{border-color:var(--project-color-primary);position:relative;z-index:1}.field-description .task-list-item,.markdown-body .task-list-item{list-style-type:none}.field-description .task-list-item+.task-list-item,.markdown-body .task-list-item+.task-list-item{margin-top:3px}.field-description .task-list-item input,.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.field-description p.blank-line,.markdown-body p.blank-line{height:1.5em}.field-description h5,.field-description h6,.markdown-body h5,.markdown-body h6{font-size:.9em}.field-description blockquote h1:last-child,.field-description blockquote h2:last-child,.markdown-body blockquote h1:last-child,.markdown-body blockquote h2:last-child{border-bottom:0}.field-description>*,.markdown-body>*{margin-bottom:15px !important;margin-top:15px}.field-description .task-list-item input,.markdown-body .task-list-item input{margin:0 .5em .25em -1.25em}.field-description a[href],.field-description a:not([href=""]),.markdown-body a[href],.markdown-body a:not([href=""]){text-decoration:underline}
393
+ .markdown-body img[align=right],.markdown-body img[alt~=align-right]{float:right;margin-left:.75rem}.markdown-body img[align=left],.markdown-body img[alt~=align-left]{float:left;margin-right:.75rem}.markdown-body>img,.markdown-body figure>img,.markdown-body img[align=middle],.markdown-body img[align=center],.markdown-body img[alt~=align-center]{display:block}.markdown-body img{border-style:none;box-sizing:content-box;display:inline-block;margin-left:auto;margin-right:auto;max-width:100%;outline:none !important;vertical-align:middle}.markdown-body img[width=smart]{max-height:450px;max-width:100%;width:auto}.markdown-body img.border{border:1px solid rgba(0,0,0,.2)}.markdown-body figure{margin:15px auto}.markdown-body figure figcaption{font-size:.93em;font-style:italic;margin-top:8px;text-align:center}.markdown-body figure .img{display:block}.markdown-body .lightbox.open{align-items:center;background:rgba(255,255,255,.966);display:flex;flex-flow:nowrap column;height:100vh;justify-content:flex-start;left:0;margin-bottom:0;margin-top:0;overflow:hidden;overflow-y:scroll;position:fixed;top:0;user-select:none;width:100vw;z-index:9999999}.markdown-body .lightbox.open::after{content:"";cursor:pointer;display:inline-block;font:normal normal normal 2em/1 FontAwesome;font-size:inherit;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;opacity:1;position:fixed;right:1em;text-rendering:auto;top:1em;transform:translate(0, 0);transform:scale(1.5);transition:.3s .3s ease-in}.markdown-body .lightbox.open:not(.open)::after{opacity:0;transform:scale(0)}.markdown-body .lightbox.open .lightbox-inner{align-items:center;box-sizing:content-box;display:inline-flex;justify-content:center;margin:auto;min-height:calc(100vh + 8px);padding:0;position:relative}.markdown-body .lightbox.open img{height:auto !important;max-height:97.5vh !important;max-width:97.5vw !important;min-width:unset !important;width:auto !important}.markdown-body .lightbox.open img.border,.markdown-body .lightbox.open img:not([src$=".png"]):not([src$=".svg"]):not([src$=".jp2"]):not([src$=".tiff"]){box-shadow:0 .5em 3em -1em rgba(0,0,0,.2)}.markdown-body .lightbox.open img[src$=svg]{display:block !important;height:66vw !important;max-width:100% !important;min-width:200px !important;width:42vw !important}.markdown-body table{display:table;border-collapse:collapse;border-spacing:0;width:100%;color:var(--table-text)}.markdown-body table thead{color:var(--table-head-text, inherit)}.markdown-body table thead tr{background:var(--table-head, #f6f8fa)}.markdown-body table tr{background-color:var(--table-row, #fff)}.markdown-body table tr+tr{border-top:1px solid var(--table-edges, #dfe2e5)}.markdown-body table th,.markdown-body table thead td{font-weight:600}.markdown-body table th:empty,.markdown-body table thead td:empty{padding:0}.markdown-body table td,.markdown-body table th{padding:0;color:inherit;vertical-align:middle;border:1px solid var(--table-edges, #dfe2e5);padding:6px 13px}.markdown-body table td>:first-child,.markdown-body table td>:only-child,.markdown-body table th>:first-child,.markdown-body table th>:only-child{margin-top:0 !important}.markdown-body table td>:last-child,.markdown-body table td>:only-child,.markdown-body table th>:last-child,.markdown-body table th>:only-child{margin-bottom:0 !important}.markdown-body table:not(.plain) tr:nth-child(2n){background-color:var(--table-stripe, #fbfcfd)}.markdown-body .rdmd-table{display:block;position:relative}.markdown-body .rdmd-table-inner{box-sizing:content-box;min-width:100%;overflow:auto;width:100%}.markdown-body .rdmd-table table{border:1px solid var(--table-edges, #dfe2e5)}.markdown-body .rdmd-table table:only-child{margin:0 !important}.markdown-body .rdmd-table table:only-child thead th{background:inherit}.markdown-body .rdmd-table table:only-child td:last-child,.markdown-body .rdmd-table table:only-child th:last-child{border-right:none}.markdown-body .rdmd-table table:only-child thead tr,.markdown-body .rdmd-table table:only-child thead th:last-child{box-shadow:3px 0 0 var(--table-head)}.toc-list .glossary-tooltip{pointer-events:none}.markdown-body{--font-size: 90%}.markdown-body code,.markdown-body kbd,.markdown-body pre{font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace;font-family:var(--md-code-font, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace);font-size:1em}.markdown-body code,.markdown-body pre{font-size:12px}.markdown-body pre{margin-bottom:0;margin-top:0}.markdown-body code{background-color:#f6f8fa;background-color:var(--md-code-background, #f6f8fa);border-radius:3px;color:var(--md-code-text);font-size:var(--font-size);margin:0;padding:.2em .4em}.markdown-body code>div[class*=cm-]{display:inherit}.markdown-body pre{word-wrap:normal}.markdown-body pre>code{background:0 0;border:0;font-size:100%;margin:0;padding:0;white-space:pre;word-break:normal}.markdown-body pre{background-color:#f6f8fa;background-color:var(--md-code-background, #f6f8fa);color:inherit;color:var(--md-code-text, inherit);border-radius:3px;border-radius:var(--markdown-radius, 3px);border-radius:var(--md-code-radius, var(--markdown-radius, 3px));font-size:var(--font-size);line-height:1.45;overflow:auto;padding:1em}.markdown-body pre code.theme-dark{background-color:#242e34;background-color:var(--md-code-background, #242e34)}.markdown-body pre code{background-color:rgba(0,0,0,0);border:0;display:inline;line-height:inherit;margin:0;max-width:auto;overflow:visible;padding:0;word-wrap:normal}.markdown-body kbd{background-color:#f6f8fa;background-color:var(--d-code-background, #f6f8fa);border:1px solid #d1d5da;border-bottom-color:#c6cbd1;border-radius:3px;box-shadow:inset 0 -1px 0 #c6cbd1;color:#444d56;display:inline-block;font-size:11px;line-height:10px;padding:3px 5px;vertical-align:middle}.markdown-body button.rdmd-code-copy{display:none !important}.markdown-body button.rdmd-code-copy{-webkit-appearance:unset;margin:.5em .6em 0 0;padding:.25em .7em;cursor:copy;font:inherit;color:inherit;color:var(--md-code-text, inherit);border:none;border-radius:3px;outline:none !important;background:inherit;background:var(--md-code-background, inherit);box-shadow:inset 0 0 0 1px rgba(170,170,170,.66),-1px 2px 6px -3px rgba(0,0,0,.1);transition:.15s ease-out}.markdown-body button.rdmd-code-copy:not(:hover):before,.markdown-body button.rdmd-code-copy:not(:hover):after{opacity:.66}.markdown-body button.rdmd-code-copy:hover:not(:active){box-shadow:inset 0 0 0 1px rgba(139,139,139,.75),-1px 2px 6px -3px rgba(0,0,0,.2)}.markdown-body button.rdmd-code-copy:active{box-shadow:inset 0 0 0 1px rgba(139,139,139,.5),inset 1px 4px 6px -2px rgba(0,0,0,.175)}.markdown-body button.rdmd-code-copy:active:before,.markdown-body button.rdmd-code-copy:active:after{opacity:.75}.markdown-body button.rdmd-code-copy:before,.markdown-body button.rdmd-code-copy:after{display:inline-block;font:normal normal normal 1em/1 "Font Awesome 5 Free","FontAwesome";text-rendering:auto;-webkit-font-smoothing:antialiased;line-height:2;font-family:"ReadMe-Icons";font-variant-ligatures:discretionary-ligatures;font-feature-settings:"liga"}.markdown-body button.rdmd-code-copy:before{content:"";font-weight:800;transition:.3s .15s ease}.markdown-body button.rdmd-code-copy:after{content:"" !important;font-weight:900 !important;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.33);opacity:0 !important;transition:.3s 0s ease}.markdown-body button.rdmd-code-copy_copied{pointer-events:none}.markdown-body button.rdmd-code-copy_copied,.markdown-body button.rdmd-code-copy_copied *{color:green !important;color:var(--md-code-text, green) !important;opacity:1}.markdown-body button.rdmd-code-copy_copied:before{transition:.3s 0s ease;transform:scale(0.33);opacity:0 !important}.markdown-body button.rdmd-code-copy_copied:after{transition:.3s .15s ease;transform:translate(-50%, -50%) scale(1);opacity:1 !important}.markdown-body pre{position:relative}.markdown-body pre>code{background:inherit}.markdown-body pre>code.theme-dark{color:#fff}.markdown-body pre button.rdmd-code-copy{display:inline-block !important;position:absolute;right:0;top:0}.markdown-body pre{overflow:hidden;padding:0}.markdown-body pre>code{display:block !important;overflow:auto;padding:1em;max-height:90vh}.markdown-body pre:hover button.rdmd-code-copy:not(:hover){transition-delay:.4s}.markdown-body pre:not(:hover) button.rdmd-code-copy:not(.rdmd-code-copy_copied){opacity:0 !important}.CodeTabs{color:#333;color:var(--md-code-text, #333);border-radius:var(--md-code-radius, var(--markdown-radius, 3px)) !important;overflow:hidden}.CodeTabs.theme-dark{color:#fff;color:var(--md-code-text, white)}.CodeTabs.theme-dark .CodeTabs-toolbar{background:#373737;background:var(--md-code-tabs, #373737)}.CodeTabs-toolbar{background:#ebedef;background:var(--md-code-tabs, #ebedef);display:flex;flex-flow:row nowrap;overflow:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch}.CodeTabs-toolbar::-webkit-scrollbar{display:none}.CodeTabs-toolbar button{white-space:nowrap;transition:.123s ease;-webkit-appearance:none;appearance:none;display:inline-block;line-height:2;padding:.5em 1em;border:none;background:rgba(0,0,0,0);outline:none;color:inherit;font:inherit;font-size:.75em;cursor:pointer}.CodeTabs.CodeTabs_initial .CodeTabs-toolbar button:first-child,.CodeTabs-toolbar button.CodeTabs_active{background:#f6f8fa;background:var(--md-code-background, #F6F8FA);color:#000;color:var(--md-code-text, black);pointer-events:none}.CodeTabs.theme-dark.CodeTabs_initial .CodeTabs-toolbar button:first-child,.CodeTabs.theme-dark .CodeTabs-toolbar button.CodeTabs_active{background:#242e34;background:var(--md-code-background, #242E34);color:#fff;color:var(--md-code-text, white)}.CodeTabs-toolbar button:not(.CodeTabs_active):hover{background:rgba(0,0,0,.075)}.CodeTabs pre{border-radius:0 0 var(--md-code-radius, var(--markdown-radius, 3px)) var(--md-code-radius, var(--markdown-radius, 3px)) !important;background:#f6f8fa;background:var(--md-code-background, #F6F8FA);margin-bottom:0}.CodeTabs pre:not(.CodeTabs_active){display:none}.CodeTabs.theme-dark pre{background:#242e34;background:var(--md-code-background, #242E34)}.CodeTabs.CodeTabs_initial pre:first-child{display:block}.callout{--emoji: 1em;--icon-font: FontAwesome;border-top-right-radius:var(--markdown-radius);border-bottom-right-radius:var(--markdown-radius)}.callout.callout{--background: #f8f8f9;--border: #8b939c}.callout.callout{background:var(--background);border-color:var(--border);color:var(--text);padding:1.33rem}.callout.callout_info{--background: #e3edf2;--title: #46b8da;--border: #5bc0de}.callout.callout_warn,.callout.callout_warning{--background: #fcf8f2;--title: #eea236;--border: #f0ad4e}.callout.callout_ok,.callout.callout_okay,.callout.callout_success{--background: #f3f8f3;--title: #489e49;--border: #50af51}.callout.callout_err,.callout.callout_error{--background: #fdf7f7;--title: #d43f3a;--border: #d9534f}.callout.callout>*{margin-left:1.33rem;position:relative}.callout.callout ul,.callout.callout ol{padding-left:1.3em}.callout.callout a{color:inherit}.callout.callout hr{border-color:var(--border, var(--markdown-edge, #eee))}.callout.callout blockquote{color:var(--text);border-color:var(--border);border-width:3px;padding:0 0 0 .8em}.callout.callout .callout-heading{color:var(--title, --text);font-family:var(--markdown-title-font);font-size:1.25em;font-weight:var(--markdown-title-weight, 600);line-height:1.25;margin-bottom:calc(1.33rem*.5)}.callout.callout .callout-heading:only-child{margin-bottom:0}.callout.callout .callout-heading.empty{float:left;margin-top:calc(1.33rem*.5)}.callout.callout .callout-heading.empty .callout-icon{line-height:0}.callout.callout .callout-heading>*{color:inherit;margin:0}.callout.callout .callout-heading:before{position:absolute;right:100%;width:2.4em;text-align:center;font:normal normal normal 1em/1 FontAwesome}.callout.callout .callout-icon{float:left;margin-left:calc(-1.33rem - .5em);margin-right:-0.25rem}.callout-icon{font-size:var(--emoji, 0);color:var(--icon-color, inherit) !important}.callout-icon:before{content:var(--icon);font-family:var(--icon-font);font-size:var(--icon-size, 1rem);font-weight:var(--icon-weight, 400);position:absolute;top:50%;transform:translate(-50%, -50%);display:inline-block;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.rdmdCallouts--useIconFont .callout{--emoji: unset}.rdmdCallouts--useIconFont .callout_okay{--icon: ""}.rdmdCallouts--useIconFont .callout_info{--icon: ""}.rdmdCallouts--useIconFont .callout_warn{--icon: ""}.rdmdCallouts--useIconFont .callout_error{--icon: ""}.rdmdCallouts--useIconFont .callout_default{--emoji: 1rem}.heading.heading{display:flex;justify-content:flex-start;align-items:center;position:relative}.heading.heading .heading-text{flex:1 100%}.heading.heading .heading-anchor-deprecated{position:absolute;top:0}.heading.heading .heading-anchor{top:-1rem !important}.heading.heading .heading-anchor,.heading.heading .heading-anchor-icon{position:absolute !important;display:inline !important;order:-1;right:100%;top:unset !important;margin-right:-0.8rem;padding:.8rem .2rem .8rem 0 !important;font-size:.8rem !important;text-decoration:none;color:inherit;transform:translateX(-100%);transition:.2s ease}.heading.heading .heading-anchor:hover,.heading.heading .heading-anchor-icon:hover{opacity:1}.heading.heading:not(:hover) .heading-anchor-icon{opacity:0}.markdown-body .embed{padding:15px;color:var(--md-code-text, inherit);border-radius:var(--md-code-radius, var(--markdown-radius, 3px));border-radius:3px;background:rgba(0,0,0,0);box-shadow:inset 0 0 0 1px rgba(0,0,0,.15);transition:.3s ease}.markdown-body .embed:hover{background:var(--md-code-background, #f6f8fa);box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.markdown-body>.embed_hasImg:nth-of-type(odd){margin-right:30px;padding-right:0}.markdown-body>.embed_hasImg:nth-of-type(odd) .embed-link{flex-direction:row-reverse}.markdown-body>.embed_hasImg:nth-of-type(odd) .embed-img{margin-left:.88em;margin-right:-30px;box-shadow:-0.3em .3em .9em -0.3em rgba(0,0,0,.15)}.markdown-body>.embed_hasImg:nth-of-type(even){margin-left:30px;padding-left:0}.markdown-body>.embed_hasImg:nth-of-type(even) .embed-img{margin-left:-30px}.markdown-body .embed:empty{display:none}.markdown-body .embed-media{display:flex;justify-content:center}.markdown-body .embed-media>:only-child{flex:1;margin:-15px;border-radius:0 !important}.markdown-body .embed-link{display:flex;align-items:center;color:var(--markdown-text, #333);text-decoration:none !important}.markdown-body .embed-body{flex:1;line-height:1.3}.markdown-body .embed-body,.markdown-body .embed-body .embed-title{font-size:1.15em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.markdown-body .embed-body .embed-provider{display:block;text-decoration-color:rgba(0,0,0,0) !important;opacity:.88}.markdown-body .embed-body-url{opacity:.75}.markdown-body .embed-provider{font-size:.8em;line-height:1.6;transition:.2 ease}.markdown-body .embed-provider code:only-child{display:block;width:100%;font-size:1.15em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:rgba(0,0,0,0);margin:0;padding:0;font-size:inherit !important}.markdown-body .embed-provider code{opacity:.8}.markdown-body .embed-img{width:5em;max-width:5em;margin:0 .88em 0 0;padding:4px;background:#fff;border:1px solid rgba(0,0,0,.15);border-radius:3px;transition:inherit;box-shadow:.3em .3em .9em -0.3em rgba(0,0,0,.15)}.markdown-body .embed:not(:hover) .embed-img{box-shadow:0 .25em 1em -0.5em rgba(0,0,0,.133)}.markdown-body .embed:hover .embed-img{border:1px solid rgba(0,0,0,.2)}.markdown-body .embed-favicon{width:12px !important;height:12px !important;margin-top:4px;margin-right:6px;margin-bottom:12px}.GlossaryItem-trigger{border-bottom:1px solid #737c83;border-style:dotted;border-top:none;border-left:none;border-right:none;cursor:pointer}.GlossaryItem-tooltip-content{--Glossary-bg: var(--color-bg-page, var(--white));--Glossary-color: var(--color-text-default, var(--gray20));--Glossary-shadow: var( --box-shadow-menu-light, 0 5px 10px rgba(0, 0, 0, 0.05), 0 2px 6px rgba(0, 0, 0, 0.025), 0 1px 3px rgba(0, 0, 0, 0.025) );background-color:var(--Glossary-bg);border:1px solid var(--color-border-default, rgba(0, 0, 0, 0.1));border-radius:var(--border-radius);box-shadow:var(--Glossary-shadow);color:var(--Glossary-color);font-size:15px;font-weight:400;line-height:1.5;padding:15px;text-align:left;width:350px}[data-color-mode=dark] .GlossaryItem-tooltip-content{--Glossary-bg: var(--gray15);--Glossary-color: var(--color-text-default, var(--white));--Glossary-shadow: var( --box-shadow-menu-dark, 0 1px 3px rgba(0, 0, 0, 0.025), 0 2px 6px rgba(0, 0, 0, 0.025), 0 5px 10px rgba(0, 0, 0, 0.05) )}@media(prefers-color-scheme: dark){[data-color-mode=auto] .GlossaryItem-tooltip-content{--Glossary-bg: var(--Tooltip-bg, var(--gray0));--Glossary-color: var(--color-text-default, var(--white));--Glossary-shadow: var( --box-shadow-menu-dark, 0 1px 3px rgba(0, 0, 0, 0.025), 0 2px 6px rgba(0, 0, 0, 0.025), 0 5px 10px rgba(0, 0, 0, 0.05) )}}.GlossaryItem-term{font-style:italic}.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}:root{--markdown-text: inherit;--markdown-title: inherit;--markdown-title-font: inherit;--markdown-font: inherit;--markdown-font-size: inherit;--markdown-line-height: 1.5}.field-description,.markdown-body{color:var(--markdown-text);font-family:var(--markdown-font);line-height:var(--markdown-line-height);position:relative;text-size-adjust:100%;word-wrap:break-word;font-size:var(--markdown-font-size, 14px)}.field-description::before,.field-description::after,.markdown-body::before,.markdown-body::after{content:"";display:table}.field-description::after,.markdown-body::after{clear:both}.field-description ul,.markdown-body ul{list-style:initial}.field-description .anchor,.markdown-body .anchor{float:left;line-height:1;margin-left:-20px;padding-right:4px}.field-description .anchor:focus,.markdown-body .anchor:focus{outline:0}.field-description h1:hover .anchor,.field-description h2:hover .anchor,.field-description h3:hover .anchor,.field-description h4:hover .anchor,.field-description h5:hover .anchor,.field-description h6:hover .anchor,.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.field-description details,.markdown-body details{display:block}.field-description summary,.markdown-body summary{display:list-item}.field-description a,.markdown-body a{transition:.15s ease}.field-description a:hover,.markdown-body a:hover{text-decoration:underline}.field-description a:active,.field-description a:hover,.markdown-body a:active,.markdown-body a:hover{outline-width:0}.field-description a:not([href]),.markdown-body a:not([href]){color:inherit;text-decoration:none}.field-description strong,.markdown-body strong{font-weight:inherit;font-weight:bolder}.field-description h1,.markdown-body h1{font-size:2em;margin:.67em 0}.field-description hr,.markdown-body hr{background:rgba(0,0,0,0);border-bottom:1px solid var(--markdown-edge, #dfe2e5);border-width:0 0 1px;box-sizing:content-box;height:0;margin:15px 0;overflow:hidden}.field-description hr::before,.field-description hr::after,.markdown-body hr::before,.markdown-body hr::after{content:"";display:table}.field-description hr::after,.markdown-body hr::after{clear:both}.field-description input,.markdown-body input{font:inherit;margin:0}.field-description input,.markdown-body input{overflow:visible}.field-description [type=checkbox],.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.field-description *,.markdown-body *{box-sizing:border-box}.field-description input,.markdown-body input{font-family:inherit;font-size:inherit;line-height:inherit}.field-description strong,.markdown-body strong{font-weight:600}.field-description details summary,.markdown-body details summary{cursor:pointer}.field-description h1,.field-description h2,.field-description h3,.field-description h4,.field-description h5,.field-description h6,.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{color:var(--markdown-title);font-family:var(--markdown-title-font);font-size:var(--markdown-title-size);font-weight:var(--markdown-title-weight, 600);line-height:1.25;margin-bottom:var(--markdown-title-marginBottom, 1rem);margin-top:var(--markdown-title-marginTop, 1em)}.field-description h1,.markdown-body h1{font-size:1.75em;font-size:var(--markdown-title-size, 1.75em)}.field-description h2,.markdown-body h2{font-size:1.5em;font-size:var(--markdown-title-size, 1.5em)}.field-description h1,.markdown-body h1{font-weight:700;font-weight:var(--markdown-title-weight, 700)}.field-description h2,.markdown-body h2{font-weight:600;font-weight:var(--markdown-title-weight, 600)}.field-description h3,.field-description h4,.markdown-body h3,.markdown-body h4{font-weight:600;font-weight:var(--markdown-title-weight, 600)}.field-description h3,.markdown-body h3{font-size:1.25em;font-size:var(--markdown-title-size, 1.25em)}.field-description h4,.markdown-body h4{font-size:1em;font-size:var(--markdown-title-size, 1em)}.field-description h5,.field-description h6,.markdown-body h5,.markdown-body h6{font-weight:600;font-weight:var(--markdown-title-weight, 600)}.field-description h5,.markdown-body h5{font-size:.875em;font-size:var(--markdown-title-size, 0.875em)}.field-description h6,.markdown-body h6{color:var(--markdown-title, #6a737d);font-size:.85em;font-size:var(--markdown-title-size, 0.85em)}.field-description p,.field-description .p,.markdown-body p,.markdown-body .p{margin-bottom:10px;margin-top:0}.field-description blockquote,.markdown-body blockquote{margin:0}.field-description ol,.field-description ul,.markdown-body ol,.markdown-body ul{margin-bottom:0;margin-top:0;padding-left:0}.field-description ol ol,.field-description ul ol,.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.field-description ol ol ol,.field-description ol ul ol,.field-description ul ol ol,.field-description ul ul ol,.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.field-description dd,.markdown-body dd{margin-left:0}.field-description input::-webkit-inner-spin-button,.field-description input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button,.markdown-body input::-webkit-outer-spin-button{appearance:none;appearance:none;margin:0}.field-description>:first-child,.markdown-body>:first-child{margin-top:0 !important}.field-description>:last-child,.markdown-body>:last-child{margin-bottom:0 !important}.field-description blockquote,.field-description dl,.field-description ol,.field-description p,.field-description pre,.field-description table,.field-description ul,.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-bottom:15px;margin-top:0}.field-description blockquote,.markdown-body blockquote{border-left:.25em solid #dfe2e5;color:#6a737d;display:block;padding:0 1em}.field-description blockquote>:first-child,.markdown-body blockquote>:first-child{margin-top:0}.field-description blockquote>:last-child,.markdown-body blockquote>:last-child{margin-bottom:0}.field-description ol,.field-description ul,.markdown-body ol,.markdown-body ul{padding-left:2em}.field-description ol ol,.field-description ol ul,.field-description ul ol,.field-description ul ul,.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-bottom:0;margin-top:0}.field-description li,.markdown-body li{clear:both;word-wrap:break-all}.field-description li>p,.markdown-body li>p{margin-top:1em}.field-description li+li,.markdown-body li+li{margin-top:.25em}.field-description dl,.markdown-body dl{padding:0}.field-description dl dt,.markdown-body dl dt{font-size:1em;font-style:italic;font-weight:600;margin-top:1em;padding:0}.field-description dl dd,.markdown-body dl dd{margin-bottom:1em;padding:0 1em}.field-description :checked+.radio-label,.markdown-body :checked+.radio-label{border-color:var(--project-color-primary);position:relative;z-index:1}.field-description .task-list-item,.markdown-body .task-list-item{list-style-type:none}.field-description .task-list-item+.task-list-item,.markdown-body .task-list-item+.task-list-item{margin-top:3px}.field-description .task-list-item input,.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.field-description p.blank-line,.markdown-body p.blank-line{height:1.5em}.field-description h5,.field-description h6,.markdown-body h5,.markdown-body h6{font-size:.9em}.field-description blockquote h1:last-child,.field-description blockquote h2:last-child,.markdown-body blockquote h1:last-child,.markdown-body blockquote h2:last-child{border-bottom:0}.field-description>*,.markdown-body>*{margin-bottom:15px !important;margin-top:15px}.field-description .task-list-item input,.markdown-body .task-list-item input{margin:0 .5em .25em -1.25em}.field-description a[href],.field-description a:not([href=""]),.markdown-body a[href],.markdown-body a:not([href=""]){text-decoration:underline}
package/dist/main.js CHANGED
@@ -13735,7 +13735,7 @@ const CreateHeading = (depth) => (props) => external_amd_react_commonjs_react_co
13735
13735
  ;// CONCATENATED MODULE: ./components/Image/index.tsx
13736
13736
 
13737
13737
  const Image = (Props) => {
13738
- const { align = 'center', alt = '', border = false, caption, className = '', height = 'auto', src, title = '', width = 'auto', lazy = true, children, } = Props;
13738
+ const { align = '', alt = '', border = false, caption, className = '', height = 'auto', src, title = '', width = 'auto', lazy = true, children, } = Props;
13739
13739
  const [lightbox, setLightbox] = external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.useState(false);
13740
13740
  if (className === 'emoji') {
13741
13741
  return external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, alt: alt, loading: lazy ? 'lazy' : 'eager' });
@@ -13766,12 +13766,12 @@ const Image = (Props) => {
13766
13766
  return (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("figure", null,
13767
13767
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { "aria-label": alt, className: `img lightbox ${lightbox ? 'open' : 'closed'}`, onClick: toggle, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 },
13768
13768
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "lightbox-inner" },
13769
- external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img img-align-center${border ? ' border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }),
13769
+ external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img img-align-center ${border ? 'border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }),
13770
13770
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("figcaption", null, children || caption)))));
13771
13771
  }
13772
13772
  return (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { "aria-label": alt, className: `img lightbox ${lightbox ? 'open' : 'closed'}`, onClick: toggle, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 },
13773
13773
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "lightbox-inner" },
13774
- external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img img-align-${align}${border ? ' border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }))));
13774
+ external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img ${align ? `img-align-${align}` : ''} ${border ? 'border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }))));
13775
13775
  };
13776
13776
  /* harmony default export */ const components_Image = (Image);
13777
13777
 
@@ -47860,7 +47860,17 @@ const embedTransformer = () => {
47860
47860
  };
47861
47861
  /* harmony default export */ const transform_embeds = (embedTransformer);
47862
47862
 
47863
+ ;// CONCATENATED MODULE: ./lib/mdast.ts
47864
+
47865
+ const mdast = (text, opts = {}) => {
47866
+ const processor = ast_processor(opts);
47867
+ const tree = processor.parse(text);
47868
+ return processor.runSync(tree);
47869
+ };
47870
+ /* harmony default export */ const lib_mdast = (mdast);
47871
+
47863
47872
  ;// CONCATENATED MODULE: ./processor/utils.ts
47873
+
47864
47874
  /**
47865
47875
  * Formats the hProperties of a node as a string, so they can be compiled back into JSX/MDX.
47866
47876
  * This currently sets all the values to a string since we process/compile the MDX on the fly
@@ -47987,13 +47997,37 @@ const reformatHTML = (html, indent = 2) => {
47987
47997
  };
47988
47998
  const toAttributes = (object, keys = []) => {
47989
47999
  let attributes = [];
47990
- Object.entries(object).forEach(([name, value]) => {
47991
- if (keys.length > 0 && !keys.includes(name))
48000
+ Object.entries(object).forEach(([name, v]) => {
48001
+ if ((keys.length > 0 && !keys.includes(name)) || typeof v === 'undefined')
47992
48002
  return;
48003
+ let value;
48004
+ if (typeof v === 'string') {
48005
+ value = v;
48006
+ }
48007
+ else {
48008
+ /* values can be null, undefined, string, or a expression, eg:
48009
+ *
48010
+ * ```
48011
+ * <Image src="..." border={false} size={width - 20} />
48012
+ * ```
48013
+ *
48014
+ * Parsing the expression seems to only be done by the library
48015
+ * `mdast-util-mdx-jsx`, and so the most straight forward way to parse
48016
+ * the expression and get the appropriate AST is with our `mdast`
48017
+ * function.
48018
+ */
48019
+ const proxy = lib_mdast(`{${v}}`);
48020
+ const data = proxy.children[0].data;
48021
+ value = {
48022
+ type: 'mdxJsxAttributeValueExpression',
48023
+ value: v.toString(),
48024
+ data,
48025
+ };
48026
+ }
47993
48027
  attributes.push({
47994
48028
  type: 'mdxJsxAttribute',
47995
48029
  name,
47996
- value: value,
48030
+ value,
47997
48031
  });
47998
48032
  });
47999
48033
  return attributes;
@@ -78108,15 +78142,6 @@ const compile_compile = (text, _a = {}) => {
78108
78142
  };
78109
78143
  /* harmony default export */ const lib_compile = (compile_compile);
78110
78144
 
78111
- ;// CONCATENATED MODULE: ./lib/mdast.ts
78112
-
78113
- const mdast = (text, opts = {}) => {
78114
- const processor = ast_processor(opts);
78115
- const tree = processor.parse(text);
78116
- return processor.runSync(tree);
78117
- };
78118
- /* harmony default export */ const lib_mdast = (mdast);
78119
-
78120
78145
  ;// CONCATENATED MODULE: ./lib/hast.ts
78121
78146
 
78122
78147
 
package/dist/main.node.js CHANGED
@@ -13159,7 +13159,7 @@ const CreateHeading = (depth) => (props) => external_amd_react_commonjs_react_co
13159
13159
  ;// CONCATENATED MODULE: ./components/Image/index.tsx
13160
13160
 
13161
13161
  const Image = (Props) => {
13162
- const { align = 'center', alt = '', border = false, caption, className = '', height = 'auto', src, title = '', width = 'auto', lazy = true, children, } = Props;
13162
+ const { align = '', alt = '', border = false, caption, className = '', height = 'auto', src, title = '', width = 'auto', lazy = true, children, } = Props;
13163
13163
  const [lightbox, setLightbox] = external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.useState(false);
13164
13164
  if (className === 'emoji') {
13165
13165
  return external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, alt: alt, loading: lazy ? 'lazy' : 'eager' });
@@ -13190,12 +13190,12 @@ const Image = (Props) => {
13190
13190
  return (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("figure", null,
13191
13191
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { "aria-label": alt, className: `img lightbox ${lightbox ? 'open' : 'closed'}`, onClick: toggle, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 },
13192
13192
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "lightbox-inner" },
13193
- external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img img-align-center${border ? ' border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }),
13193
+ external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img img-align-center ${border ? 'border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }),
13194
13194
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("figcaption", null, children || caption)))));
13195
13195
  }
13196
13196
  return (external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { "aria-label": alt, className: `img lightbox ${lightbox ? 'open' : 'closed'}`, onClick: toggle, onKeyDown: handleKeyDown, role: 'button', tabIndex: 0 },
13197
13197
  external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("span", { className: "lightbox-inner" },
13198
- external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img img-align-${align}${border ? ' border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }))));
13198
+ external_amd_react_commonjs_react_commonjs2_react_root_React_umd_react_.createElement("img", { src: src, width: width, height: height, title: title, className: `img ${align ? `img-align-${align}` : ''} ${border ? 'border' : ''}`, alt: alt, loading: lazy ? 'lazy' : 'eager' }))));
13199
13199
  };
13200
13200
  /* harmony default export */ const components_Image = (Image);
13201
13201
 
@@ -48847,7 +48847,17 @@ const embedTransformer = () => {
48847
48847
  };
48848
48848
  /* harmony default export */ const transform_embeds = (embedTransformer);
48849
48849
 
48850
+ ;// CONCATENATED MODULE: ./lib/mdast.ts
48851
+
48852
+ const mdast = (text, opts = {}) => {
48853
+ const processor = ast_processor(opts);
48854
+ const tree = processor.parse(text);
48855
+ return processor.runSync(tree);
48856
+ };
48857
+ /* harmony default export */ const lib_mdast = (mdast);
48858
+
48850
48859
  ;// CONCATENATED MODULE: ./processor/utils.ts
48860
+
48851
48861
  /**
48852
48862
  * Formats the hProperties of a node as a string, so they can be compiled back into JSX/MDX.
48853
48863
  * This currently sets all the values to a string since we process/compile the MDX on the fly
@@ -48974,13 +48984,37 @@ const reformatHTML = (html, indent = 2) => {
48974
48984
  };
48975
48985
  const toAttributes = (object, keys = []) => {
48976
48986
  let attributes = [];
48977
- Object.entries(object).forEach(([name, value]) => {
48978
- if (keys.length > 0 && !keys.includes(name))
48987
+ Object.entries(object).forEach(([name, v]) => {
48988
+ if ((keys.length > 0 && !keys.includes(name)) || typeof v === 'undefined')
48979
48989
  return;
48990
+ let value;
48991
+ if (typeof v === 'string') {
48992
+ value = v;
48993
+ }
48994
+ else {
48995
+ /* values can be null, undefined, string, or a expression, eg:
48996
+ *
48997
+ * ```
48998
+ * <Image src="..." border={false} size={width - 20} />
48999
+ * ```
49000
+ *
49001
+ * Parsing the expression seems to only be done by the library
49002
+ * `mdast-util-mdx-jsx`, and so the most straight forward way to parse
49003
+ * the expression and get the appropriate AST is with our `mdast`
49004
+ * function.
49005
+ */
49006
+ const proxy = lib_mdast(`{${v}}`);
49007
+ const data = proxy.children[0].data;
49008
+ value = {
49009
+ type: 'mdxJsxAttributeValueExpression',
49010
+ value: v.toString(),
49011
+ data,
49012
+ };
49013
+ }
48980
49014
  attributes.push({
48981
49015
  type: 'mdxJsxAttribute',
48982
49016
  name,
48983
- value: value,
49017
+ value,
48984
49018
  });
48985
49019
  });
48986
49020
  return attributes;
@@ -79095,15 +79129,6 @@ const compile_compile = (text, _a = {}) => {
79095
79129
  };
79096
79130
  /* harmony default export */ const lib_compile = (compile_compile);
79097
79131
 
79098
- ;// CONCATENATED MODULE: ./lib/mdast.ts
79099
-
79100
- const mdast = (text, opts = {}) => {
79101
- const processor = ast_processor(opts);
79102
- const tree = processor.parse(text);
79103
- return processor.runSync(tree);
79104
- };
79105
- /* harmony default export */ const lib_mdast = (mdast);
79106
-
79107
79132
  ;// CONCATENATED MODULE: ./lib/hast.ts
79108
79133
 
79109
79134
 
@@ -1,6 +1,6 @@
1
- import { Node } from 'mdast';
2
- import { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx';
3
- import { MdxJsxAttribute } from 'mdast-util-mdx-jsx';
1
+ import type { Node } from 'mdast';
2
+ import type { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx';
3
+ import type { MdxJsxAttribute } from 'mdast-util-mdx-jsx';
4
4
  /**
5
5
  * Formats the hProperties of a node as a string, so they can be compiled back into JSX/MDX.
6
6
  * This currently sets all the values to a string since we process/compile the MDX on the fly
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@readme/markdown",
3
3
  "description": "ReadMe's React-based Markdown parser",
4
4
  "author": "Rafe Goldberg <rafe@readme.io>",
5
- "version": "7.4.1",
5
+ "version": "7.4.2",
6
6
  "main": "dist/main.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "browser": "dist/main.js",