@readme/markdown 6.65.1 → 6.65.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/components/Callout/index.jsx +2 -2
- package/components/Callout/style.scss +4 -0
- package/components/Code/index.jsx +2 -0
- package/components/CodeTabs/index.jsx +15 -4
- package/dist/main.css +1 -1
- package/dist/main.js +33 -13
- package/dist/main.node.js +33 -13
- package/package.json +1 -1
|
@@ -8,10 +8,10 @@ const Callout = props => {
|
|
|
8
8
|
return (
|
|
9
9
|
// eslint-disable-next-line react/jsx-props-no-spreading, react/no-unknown-property
|
|
10
10
|
<blockquote {...attributes} className={`callout callout_${theme}`} theme={icon}>
|
|
11
|
-
<
|
|
11
|
+
<p className={`callout-heading${title ? '' : ' empty'}`}>
|
|
12
12
|
<span className="callout-icon">{icon}</span>
|
|
13
13
|
{title}
|
|
14
|
-
</
|
|
14
|
+
</p>
|
|
15
15
|
{content}
|
|
16
16
|
</blockquote>
|
|
17
17
|
);
|
|
@@ -74,6 +74,10 @@
|
|
|
74
74
|
|
|
75
75
|
.callout-heading {
|
|
76
76
|
color: var(--title, --text);
|
|
77
|
+
font-size: 1.25em; // match h3
|
|
78
|
+
font-family: var(--markdown-title-font); // match h3
|
|
79
|
+
font-weight: var(--markdown-title-weight, 600); // match h3
|
|
80
|
+
line-height: 1.25; // match h3
|
|
77
81
|
margin-bottom: calc(#{$l-offset} * 0.5);
|
|
78
82
|
|
|
79
83
|
&:only-child {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
const { uppercase } = require('@readme/syntax-highlighter');
|
|
2
2
|
const PropTypes = require('prop-types');
|
|
3
3
|
const React = require('react');
|
|
4
|
+
const { useState } = require('react');
|
|
4
5
|
|
|
5
6
|
const CodeTabs = props => {
|
|
6
7
|
const { children, theme } = props;
|
|
8
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
7
9
|
|
|
8
10
|
function handleClick({ target }, index) {
|
|
9
11
|
const $wrap = target.parentElement.parentElement;
|
|
@@ -14,23 +16,32 @@ const CodeTabs = props => {
|
|
|
14
16
|
const codeblocks = $wrap.querySelectorAll('pre');
|
|
15
17
|
codeblocks[index].classList.add('CodeTabs_active');
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
setActiveIndex(index);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
return (
|
|
21
23
|
<div className={`CodeTabs CodeTabs_initial theme-${theme}`}>
|
|
22
|
-
<div className="CodeTabs-toolbar">
|
|
24
|
+
<div className="CodeTabs-toolbar" role="tablist">
|
|
23
25
|
{children.map(({ props: pre }, i) => {
|
|
24
26
|
const { meta, lang } = pre.children[0].props;
|
|
25
27
|
/* istanbul ignore next */
|
|
26
28
|
return (
|
|
27
|
-
<button
|
|
29
|
+
<button
|
|
30
|
+
key={i}
|
|
31
|
+
aria-selected={activeIndex === i}
|
|
32
|
+
className={activeIndex === i ? 'CodeTabs_active' : ''}
|
|
33
|
+
onClick={e => handleClick(e, i)}
|
|
34
|
+
role="tab"
|
|
35
|
+
type="button"
|
|
36
|
+
>
|
|
28
37
|
{meta || `${!lang ? 'Text' : uppercase(lang)}`}
|
|
29
38
|
</button>
|
|
30
39
|
);
|
|
31
40
|
})}
|
|
32
41
|
</div>
|
|
33
|
-
<div className="CodeTabs-inner">
|
|
42
|
+
<div className="CodeTabs-inner" role="tabpanel">
|
|
43
|
+
{children}
|
|
44
|
+
</div>
|
|
34
45
|
</div>
|
|
35
46
|
);
|
|
36
47
|
};
|
package/dist/main.css
CHANGED
|
@@ -387,7 +387,7 @@ span.CodeMirror-selectedtext { background: none; }
|
|
|
387
387
|
z-index: 1;
|
|
388
388
|
}
|
|
389
389
|
|
|
390
|
-
.markdown-body img[align='right'],.markdown-body img[alt~='align-right']{float:right;margin-left:0.75rem}.markdown-body img[align='left'],.markdown-body img[alt~='align-left']{float:left;margin-right:0.75rem}.markdown-body img[width='80%'],.markdown-body img[align='center'],.markdown-body img[alt~='align-center'],.markdown-body>img,.markdown-body figure>img{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,0.2)}.markdown-body figure{margin:15px auto}.markdown-body figure figcaption{font-size:0.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,0.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:'\f00d';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:0.3s 0.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 0.5em 3em -1em rgba(0,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{border-collapse:collapse;border-spacing:0;color:var(--table-text);display:table;width:100%}.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{border:1px solid var(--table-edges, #dfe2e5);color:inherit;padding:6px 13px;vertical-align:middle}.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 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;word-wrap:normal}.markdown-body code{background-color:#f6f8fa;background-color:var(--md-code-background, #f6f8fa);border-radius:3px;color:var(--md-code-text);font-size:85%;margin:0;padding:0.2em 0.4em}.markdown-body code>div[class*='cm-']{display:inherit}.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:85%;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:transparent;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{appearance:unset;background:inherit;background:var(--md-code-background, inherit);border:none;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(170,170,170,0.66),-1px 2px 6px -3px rgba(0,0,0,0.1);color:inherit;color:var(--md-code-text, inherit);cursor:copy;display:none !important;font:inherit;margin:0.5em 0.6em 0 0;outline:none !important;padding:0.25em 0.7em;transition:0.15s ease-out}.markdown-body button.rdmd-code-copy:not(:hover)::before,.markdown-body button.rdmd-code-copy:not(:hover)::after{opacity:0.66}.markdown-body button.rdmd-code-copy:hover:not(:active){box-shadow:inset 0 0 0 1px rgba(139,139,139,0.75),-1px 2px 6px -3px rgba(0,0,0,0.2)}.markdown-body button.rdmd-code-copy:active{box-shadow:inset 0 0 0 1px rgba(139,139,139,0.5),inset 1px 4px 6px -2px rgba(0,0,0,0.175)}.markdown-body button.rdmd-code-copy:active::before,.markdown-body button.rdmd-code-copy:active::after{opacity:0.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;font-family:ReadMe-Icons;font-feature-settings:'liga';font-variant-ligatures:discretionary-ligatures;line-height:2;text-rendering:auto;-webkit-font-smoothing:antialiased}.markdown-body button.rdmd-code-copy::before{content:'\e6c9';font-weight:800;transition:0.3s 0.15s ease}.markdown-body button.rdmd-code-copy::after{content:'\e942' !important;font-weight:900 !important;left:50%;opacity:0 !important;position:absolute;top:50%;transform:translate(-50%, -50%) scale(0.33);transition:0.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{opacity:0 !important;transition:0.3s 0s ease;transform:scale(0.33)}.markdown-body button.rdmd-code-copy_copied::after{opacity:1 !important;transition:0.3s 0.15s ease;transform:translate(-50%, -50%) scale(1)}.markdown-body pre{position:relative}.markdown-body pre>code{background:inherit}.markdown-body pre>code.theme-dark{color:white}.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:0.4s}.markdown-body pre:not(:hover) button.rdmd-code-copy:not(.rdmd-code-copy_copied){opacity:0 !important}.CodeTabs{border-radius:var(--md-code-radius, var(--markdown-radius, 3px)) !important;color:#333;color:var(--md-code-text, #333);overflow:hidden}.CodeTabs.theme-dark{color:white;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;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow-x:auto}.CodeTabs-toolbar::-webkit-scrollbar{display:none}.CodeTabs-toolbar button{appearance:none;background:transparent;border:none;color:inherit;cursor:pointer;display:inline-block;font:inherit;font-size:0.75em;line-height:2;outline:none;padding:0.5em 1em;transition:0.123s ease;white-space:nowrap}.CodeTabs.CodeTabs_initial .CodeTabs-toolbar button:first-child,.CodeTabs-toolbar button.CodeTabs_active{background:#f6f8fa;background:var(--md-code-background, #f6f8fa);color:black;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:white;color:var(--md-code-text, white)}.CodeTabs-toolbar button:not(.CodeTabs_active):hover,.CodeTabs-toolbar button:not(.CodeTabs_active):active,.CodeTabs-toolbar button:not(.CodeTabs_active):focus{background:rgba(0,0,0,0.075)}.CodeTabs pre{background:var(--md-code-background, #f6f8fa);border-radius:0 0 var(--md-code-radius, var(--markdown-radius, 3px)) var(--md-code-radius, var(--markdown-radius, 3px)) !important;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;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 0.8em}.callout.callout .callout-heading{color:var(--title, --text);margin-bottom:calc(1.33rem * 0.5)}.callout.callout .callout-heading:only-child{margin-bottom:0}.callout.callout .callout-heading.empty{float:left;margin-top:calc(1.33rem * 0.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 - 0.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: '\f164'}.rdmdCallouts--useIconFont .callout_info{--icon: '\f05a'}.rdmdCallouts--useIconFont .callout_warn{--icon: '\f071'}.rdmdCallouts--useIconFont .callout_error{--icon: '\f06a'}.rdmdCallouts--useIconFont .callout_default{--emoji: 1rem}.heading.heading{align-items:center;display:flex;justify-content:flex-start;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{color:inherit;display:inline !important;font-size:0.8rem !important;margin-right:-0.8rem;order:-1;padding:0.8rem 0.2rem 0.8rem 0 !important;position:absolute !important;right:100%;text-decoration:none;top:unset !important;transform:translateX(-100%);transition:0.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{background:transparent;border-radius:3px;border-radius:var(--md-code-radius, var(--markdown-radius, 3px));box-shadow:inset 0 0 0 1px rgba(0,0,0,0.15);color:var(--md-code-text, inherit);padding:15px;transition:0.3s ease}.markdown-body .embed:hover{background:var(--md-code-background, #f6f8fa);box-shadow:inset 0 0 0 1px rgba(0,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{box-shadow:-0.3em 0.3em 0.9em -0.3em rgba(0,0,0,0.15);margin-left:0.88em;margin-right:-30px}.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{border-radius:0 !important;flex:1;margin:-15px}.markdown-body .embed-link{align-items:center;color:var(--markdown-text, #333);display:flex;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;text-overflow:ellipsis;white-space:nowrap}.markdown-body .embed-body .embed-provider{display:block;opacity:0.88;text-decoration-color:transparent !important}.markdown-body .embed-body-url{opacity:0.75}.markdown-body .embed-provider{font-size:0.8em;line-height:1.6;transition:0.2 ease}.markdown-body .embed-provider code{opacity:0.8}.markdown-body .embed-provider code:only-child{background:transparent;display:block;font-size:inherit !important;margin:0;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap;width:100%}.markdown-body .embed-img{background:white;border:1px solid rgba(0,0,0,0.15);border-radius:3px;box-shadow:0.3em 0.3em 0.9em -0.3em rgba(0,0,0,0.15);margin:0 0.88em 0 0;max-width:5em;padding:4px;transition:inherit;width:5em}.markdown-body .embed:not(:hover) .embed-img{box-shadow:0 0.25em 1em -0.5em rgba(0,0,0,0.133)}.markdown-body .embed:hover .embed-img{border:1px solid rgba(0,0,0,0.2)}.markdown-body .embed-favicon{height:12px !important;margin-bottom:12px;margin-right:6px;margin-top:4px;width:12px !important}.GlossaryItem-trigger{border-bottom:1px dotted #737c83;border-left:none;border-right:none;border-top:none;cursor:pointer}.GlossaryItem-tooltip-content{--GlossaryItem-bg: var(--color-bg-page, var(--white));--GlossaryItem-color: var(--color-text-default, var(--gray20));--GlossaryItem-shadow: var(
|
|
390
|
+
.markdown-body img[align='right'],.markdown-body img[alt~='align-right']{float:right;margin-left:0.75rem}.markdown-body img[align='left'],.markdown-body img[alt~='align-left']{float:left;margin-right:0.75rem}.markdown-body img[width='80%'],.markdown-body img[align='center'],.markdown-body img[alt~='align-center'],.markdown-body>img,.markdown-body figure>img{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,0.2)}.markdown-body figure{margin:15px auto}.markdown-body figure figcaption{font-size:0.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,0.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:'\f00d';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:0.3s 0.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 0.5em 3em -1em rgba(0,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{border-collapse:collapse;border-spacing:0;color:var(--table-text);display:table;width:100%}.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{border:1px solid var(--table-edges, #dfe2e5);color:inherit;padding:6px 13px;vertical-align:middle}.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 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;word-wrap:normal}.markdown-body code{background-color:#f6f8fa;background-color:var(--md-code-background, #f6f8fa);border-radius:3px;color:var(--md-code-text);font-size:85%;margin:0;padding:0.2em 0.4em}.markdown-body code>div[class*='cm-']{display:inherit}.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:85%;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:transparent;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{appearance:unset;background:inherit;background:var(--md-code-background, inherit);border:none;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(170,170,170,0.66),-1px 2px 6px -3px rgba(0,0,0,0.1);color:inherit;color:var(--md-code-text, inherit);cursor:copy;display:none !important;font:inherit;margin:0.5em 0.6em 0 0;outline:none !important;padding:0.25em 0.7em;transition:0.15s ease-out}.markdown-body button.rdmd-code-copy:not(:hover)::before,.markdown-body button.rdmd-code-copy:not(:hover)::after{opacity:0.66}.markdown-body button.rdmd-code-copy:hover:not(:active){box-shadow:inset 0 0 0 1px rgba(139,139,139,0.75),-1px 2px 6px -3px rgba(0,0,0,0.2)}.markdown-body button.rdmd-code-copy:active{box-shadow:inset 0 0 0 1px rgba(139,139,139,0.5),inset 1px 4px 6px -2px rgba(0,0,0,0.175)}.markdown-body button.rdmd-code-copy:active::before,.markdown-body button.rdmd-code-copy:active::after{opacity:0.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;font-family:ReadMe-Icons;font-feature-settings:'liga';font-variant-ligatures:discretionary-ligatures;line-height:2;text-rendering:auto;-webkit-font-smoothing:antialiased}.markdown-body button.rdmd-code-copy::before{content:'\e6c9';font-weight:800;transition:0.3s 0.15s ease}.markdown-body button.rdmd-code-copy::after{content:'\e942' !important;font-weight:900 !important;left:50%;opacity:0 !important;position:absolute;top:50%;transform:translate(-50%, -50%) scale(0.33);transition:0.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{opacity:0 !important;transition:0.3s 0s ease;transform:scale(0.33)}.markdown-body button.rdmd-code-copy_copied::after{opacity:1 !important;transition:0.3s 0.15s ease;transform:translate(-50%, -50%) scale(1)}.markdown-body pre{position:relative}.markdown-body pre>code{background:inherit}.markdown-body pre>code.theme-dark{color:white}.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:0.4s}.markdown-body pre:not(:hover) button.rdmd-code-copy:not(.rdmd-code-copy_copied){opacity:0 !important}.CodeTabs{border-radius:var(--md-code-radius, var(--markdown-radius, 3px)) !important;color:#333;color:var(--md-code-text, #333);overflow:hidden}.CodeTabs.theme-dark{color:white;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;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow-x:auto}.CodeTabs-toolbar::-webkit-scrollbar{display:none}.CodeTabs-toolbar button{appearance:none;background:transparent;border:none;color:inherit;cursor:pointer;display:inline-block;font:inherit;font-size:0.75em;line-height:2;outline:none;padding:0.5em 1em;transition:0.123s ease;white-space:nowrap}.CodeTabs.CodeTabs_initial .CodeTabs-toolbar button:first-child,.CodeTabs-toolbar button.CodeTabs_active{background:#f6f8fa;background:var(--md-code-background, #f6f8fa);color:black;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:white;color:var(--md-code-text, white)}.CodeTabs-toolbar button:not(.CodeTabs_active):hover,.CodeTabs-toolbar button:not(.CodeTabs_active):active,.CodeTabs-toolbar button:not(.CodeTabs_active):focus{background:rgba(0,0,0,0.075)}.CodeTabs pre{background:var(--md-code-background, #f6f8fa);border-radius:0 0 var(--md-code-radius, var(--markdown-radius, 3px)) var(--md-code-radius, var(--markdown-radius, 3px)) !important;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;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 0.8em}.callout.callout .callout-heading{color:var(--title, --text);font-size:1.25em;font-family:var(--markdown-title-font);font-weight:var(--markdown-title-weight, 600);line-height:1.25;margin-bottom:calc(1.33rem * 0.5)}.callout.callout .callout-heading:only-child{margin-bottom:0}.callout.callout .callout-heading.empty{float:left;margin-top:calc(1.33rem * 0.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 - 0.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: '\f164'}.rdmdCallouts--useIconFont .callout_info{--icon: '\f05a'}.rdmdCallouts--useIconFont .callout_warn{--icon: '\f071'}.rdmdCallouts--useIconFont .callout_error{--icon: '\f06a'}.rdmdCallouts--useIconFont .callout_default{--emoji: 1rem}.heading.heading{align-items:center;display:flex;justify-content:flex-start;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{color:inherit;display:inline !important;font-size:0.8rem !important;margin-right:-0.8rem;order:-1;padding:0.8rem 0.2rem 0.8rem 0 !important;position:absolute !important;right:100%;text-decoration:none;top:unset !important;transform:translateX(-100%);transition:0.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{background:transparent;border-radius:3px;border-radius:var(--md-code-radius, var(--markdown-radius, 3px));box-shadow:inset 0 0 0 1px rgba(0,0,0,0.15);color:var(--md-code-text, inherit);padding:15px;transition:0.3s ease}.markdown-body .embed:hover{background:var(--md-code-background, #f6f8fa);box-shadow:inset 0 0 0 1px rgba(0,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{box-shadow:-0.3em 0.3em 0.9em -0.3em rgba(0,0,0,0.15);margin-left:0.88em;margin-right:-30px}.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{border-radius:0 !important;flex:1;margin:-15px}.markdown-body .embed-link{align-items:center;color:var(--markdown-text, #333);display:flex;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;text-overflow:ellipsis;white-space:nowrap}.markdown-body .embed-body .embed-provider{display:block;opacity:0.88;text-decoration-color:transparent !important}.markdown-body .embed-body-url{opacity:0.75}.markdown-body .embed-provider{font-size:0.8em;line-height:1.6;transition:0.2 ease}.markdown-body .embed-provider code{opacity:0.8}.markdown-body .embed-provider code:only-child{background:transparent;display:block;font-size:inherit !important;margin:0;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap;width:100%}.markdown-body .embed-img{background:white;border:1px solid rgba(0,0,0,0.15);border-radius:3px;box-shadow:0.3em 0.3em 0.9em -0.3em rgba(0,0,0,0.15);margin:0 0.88em 0 0;max-width:5em;padding:4px;transition:inherit;width:5em}.markdown-body .embed:not(:hover) .embed-img{box-shadow:0 0.25em 1em -0.5em rgba(0,0,0,0.133)}.markdown-body .embed:hover .embed-img{border:1px solid rgba(0,0,0,0.2)}.markdown-body .embed-favicon{height:12px !important;margin-bottom:12px;margin-right:6px;margin-top:4px;width:12px !important}.GlossaryItem-trigger{border-bottom:1px dotted #737c83;border-left:none;border-right:none;border-top:none;cursor:pointer}.GlossaryItem-tooltip-content{--GlossaryItem-bg: var(--color-bg-page, var(--white));--GlossaryItem-color: var(--color-text-default, var(--gray20));--GlossaryItem-shadow: var(
|
|
391
391
|
--box-shadow-menu-light,
|
|
392
392
|
0 5px 10px rgba(0, 0, 0, 0.05),
|
|
393
393
|
0 2px 6px rgba(0, 0, 0, 0.025),
|
package/dist/main.js
CHANGED
|
@@ -7510,7 +7510,7 @@ var Callout = function Callout(props) {
|
|
|
7510
7510
|
React.createElement("blockquote", _extends({}, attributes, {
|
|
7511
7511
|
className: "callout callout_".concat(theme),
|
|
7512
7512
|
theme: icon
|
|
7513
|
-
}), /*#__PURE__*/React.createElement("
|
|
7513
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
7514
7514
|
className: "callout-heading".concat(title ? '' : ' empty')
|
|
7515
7515
|
}, /*#__PURE__*/React.createElement("span", {
|
|
7516
7516
|
className: "callout-icon"
|
|
@@ -7617,6 +7617,9 @@ function Code(props) {
|
|
|
7617
7617
|
"data-lang": language,
|
|
7618
7618
|
name: meta,
|
|
7619
7619
|
suppressHydrationWarning: true
|
|
7620
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
7621
|
+
,
|
|
7622
|
+
tabIndex: 0
|
|
7620
7623
|
}, codeContent));
|
|
7621
7624
|
}
|
|
7622
7625
|
function CreateCode(_ref2) {
|
|
@@ -7657,13 +7660,20 @@ module.exports = CreateCode;
|
|
|
7657
7660
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
7658
7661
|
|
|
7659
7662
|
var _extends = __webpack_require__(434);
|
|
7663
|
+
var _slicedToArray = __webpack_require__(7424);
|
|
7660
7664
|
var _require = __webpack_require__(3752),
|
|
7661
7665
|
uppercase = _require.uppercase;
|
|
7662
7666
|
var PropTypes = __webpack_require__(5697);
|
|
7663
7667
|
var React = __webpack_require__(4466);
|
|
7668
|
+
var _require2 = __webpack_require__(4466),
|
|
7669
|
+
useState = _require2.useState;
|
|
7664
7670
|
var CodeTabs = function CodeTabs(props) {
|
|
7665
7671
|
var children = props.children,
|
|
7666
7672
|
theme = props.theme;
|
|
7673
|
+
var _useState = useState(0),
|
|
7674
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7675
|
+
activeIndex = _useState2[0],
|
|
7676
|
+
setActiveIndex = _useState2[1];
|
|
7667
7677
|
function handleClick(_ref, index) {
|
|
7668
7678
|
var target = _ref.target;
|
|
7669
7679
|
var $wrap = target.parentElement.parentElement;
|
|
@@ -7674,12 +7684,13 @@ var CodeTabs = function CodeTabs(props) {
|
|
|
7674
7684
|
$wrap.classList.remove('CodeTabs_initial');
|
|
7675
7685
|
var codeblocks = $wrap.querySelectorAll('pre');
|
|
7676
7686
|
codeblocks[index].classList.add('CodeTabs_active');
|
|
7677
|
-
|
|
7687
|
+
setActiveIndex(index);
|
|
7678
7688
|
}
|
|
7679
7689
|
return /*#__PURE__*/React.createElement("div", {
|
|
7680
7690
|
className: "CodeTabs CodeTabs_initial theme-".concat(theme)
|
|
7681
7691
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7682
|
-
className: "CodeTabs-toolbar"
|
|
7692
|
+
className: "CodeTabs-toolbar",
|
|
7693
|
+
role: "tablist"
|
|
7683
7694
|
}, children.map(function (_ref2, i) {
|
|
7684
7695
|
var pre = _ref2.props;
|
|
7685
7696
|
var _pre$children$0$props = pre.children[0].props,
|
|
@@ -7688,13 +7699,17 @@ var CodeTabs = function CodeTabs(props) {
|
|
|
7688
7699
|
/* istanbul ignore next */
|
|
7689
7700
|
return /*#__PURE__*/React.createElement("button", {
|
|
7690
7701
|
key: i,
|
|
7702
|
+
"aria-selected": activeIndex === i,
|
|
7703
|
+
className: activeIndex === i ? 'CodeTabs_active' : '',
|
|
7691
7704
|
onClick: function onClick(e) {
|
|
7692
7705
|
return handleClick(e, i);
|
|
7693
7706
|
},
|
|
7707
|
+
role: "tab",
|
|
7694
7708
|
type: "button"
|
|
7695
7709
|
}, meta || "".concat(!lang ? 'Text' : uppercase(lang)));
|
|
7696
7710
|
})), /*#__PURE__*/React.createElement("div", {
|
|
7697
|
-
className: "CodeTabs-inner"
|
|
7711
|
+
className: "CodeTabs-inner",
|
|
7712
|
+
role: "tabpanel"
|
|
7698
7713
|
}, children));
|
|
7699
7714
|
};
|
|
7700
7715
|
CodeTabs.propTypes = {
|
|
@@ -8382,14 +8397,19 @@ module.exports = React.createContext([]);
|
|
|
8382
8397
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8383
8398
|
|
|
8384
8399
|
var React = __webpack_require__(4466);
|
|
8385
|
-
var
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8400
|
+
var CreateCodeTabs = __webpack_require__(6553);
|
|
8401
|
+
var createElement = function createElement(opts) {
|
|
8402
|
+
return (
|
|
8403
|
+
// eslint-disable-next-line react/display-name
|
|
8404
|
+
function (type, props) {
|
|
8405
|
+
// eslint-disable-next-line react/prop-types
|
|
8406
|
+
var rdmdType = type === 'div' && (props === null || props === void 0 ? void 0 : props.className) === 'code-tabs' ? CreateCodeTabs(opts) : type;
|
|
8407
|
+
for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
8408
|
+
children[_key - 2] = arguments[_key];
|
|
8409
|
+
}
|
|
8410
|
+
return React.createElement.apply(React, [rdmdType, props].concat(children));
|
|
8411
|
+
}
|
|
8412
|
+
);
|
|
8393
8413
|
};
|
|
8394
8414
|
module.exports = createElement;
|
|
8395
8415
|
|
|
@@ -34554,7 +34574,7 @@ function reactProcessor() {
|
|
|
34554
34574
|
var _opts3 = opts,
|
|
34555
34575
|
sanitize = _opts3.sanitize;
|
|
34556
34576
|
return htmlProcessor(_objectSpread({}, opts)).use(sectionAnchorId).use(rehypeReact, {
|
|
34557
|
-
createElement: createElement,
|
|
34577
|
+
createElement: createElement(opts),
|
|
34558
34578
|
Fragment: React.Fragment,
|
|
34559
34579
|
components: _objectSpread({
|
|
34560
34580
|
'code-tabs': CodeTabs(opts),
|
package/dist/main.node.js
CHANGED
|
@@ -7510,7 +7510,7 @@ var Callout = function Callout(props) {
|
|
|
7510
7510
|
React.createElement("blockquote", _extends({}, attributes, {
|
|
7511
7511
|
className: "callout callout_".concat(theme),
|
|
7512
7512
|
theme: icon
|
|
7513
|
-
}), /*#__PURE__*/React.createElement("
|
|
7513
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
7514
7514
|
className: "callout-heading".concat(title ? '' : ' empty')
|
|
7515
7515
|
}, /*#__PURE__*/React.createElement("span", {
|
|
7516
7516
|
className: "callout-icon"
|
|
@@ -7617,6 +7617,9 @@ function Code(props) {
|
|
|
7617
7617
|
"data-lang": language,
|
|
7618
7618
|
name: meta,
|
|
7619
7619
|
suppressHydrationWarning: true
|
|
7620
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
7621
|
+
,
|
|
7622
|
+
tabIndex: 0
|
|
7620
7623
|
}, codeContent));
|
|
7621
7624
|
}
|
|
7622
7625
|
function CreateCode(_ref2) {
|
|
@@ -7657,13 +7660,20 @@ module.exports = CreateCode;
|
|
|
7657
7660
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
7658
7661
|
|
|
7659
7662
|
var _extends = __webpack_require__(434);
|
|
7663
|
+
var _slicedToArray = __webpack_require__(7424);
|
|
7660
7664
|
var _require = __webpack_require__(6841),
|
|
7661
7665
|
uppercase = _require.uppercase;
|
|
7662
7666
|
var PropTypes = __webpack_require__(5697);
|
|
7663
7667
|
var React = __webpack_require__(4466);
|
|
7668
|
+
var _require2 = __webpack_require__(4466),
|
|
7669
|
+
useState = _require2.useState;
|
|
7664
7670
|
var CodeTabs = function CodeTabs(props) {
|
|
7665
7671
|
var children = props.children,
|
|
7666
7672
|
theme = props.theme;
|
|
7673
|
+
var _useState = useState(0),
|
|
7674
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
7675
|
+
activeIndex = _useState2[0],
|
|
7676
|
+
setActiveIndex = _useState2[1];
|
|
7667
7677
|
function handleClick(_ref, index) {
|
|
7668
7678
|
var target = _ref.target;
|
|
7669
7679
|
var $wrap = target.parentElement.parentElement;
|
|
@@ -7674,12 +7684,13 @@ var CodeTabs = function CodeTabs(props) {
|
|
|
7674
7684
|
$wrap.classList.remove('CodeTabs_initial');
|
|
7675
7685
|
var codeblocks = $wrap.querySelectorAll('pre');
|
|
7676
7686
|
codeblocks[index].classList.add('CodeTabs_active');
|
|
7677
|
-
|
|
7687
|
+
setActiveIndex(index);
|
|
7678
7688
|
}
|
|
7679
7689
|
return /*#__PURE__*/React.createElement("div", {
|
|
7680
7690
|
className: "CodeTabs CodeTabs_initial theme-".concat(theme)
|
|
7681
7691
|
}, /*#__PURE__*/React.createElement("div", {
|
|
7682
|
-
className: "CodeTabs-toolbar"
|
|
7692
|
+
className: "CodeTabs-toolbar",
|
|
7693
|
+
role: "tablist"
|
|
7683
7694
|
}, children.map(function (_ref2, i) {
|
|
7684
7695
|
var pre = _ref2.props;
|
|
7685
7696
|
var _pre$children$0$props = pre.children[0].props,
|
|
@@ -7688,13 +7699,17 @@ var CodeTabs = function CodeTabs(props) {
|
|
|
7688
7699
|
/* istanbul ignore next */
|
|
7689
7700
|
return /*#__PURE__*/React.createElement("button", {
|
|
7690
7701
|
key: i,
|
|
7702
|
+
"aria-selected": activeIndex === i,
|
|
7703
|
+
className: activeIndex === i ? 'CodeTabs_active' : '',
|
|
7691
7704
|
onClick: function onClick(e) {
|
|
7692
7705
|
return handleClick(e, i);
|
|
7693
7706
|
},
|
|
7707
|
+
role: "tab",
|
|
7694
7708
|
type: "button"
|
|
7695
7709
|
}, meta || "".concat(!lang ? 'Text' : uppercase(lang)));
|
|
7696
7710
|
})), /*#__PURE__*/React.createElement("div", {
|
|
7697
|
-
className: "CodeTabs-inner"
|
|
7711
|
+
className: "CodeTabs-inner",
|
|
7712
|
+
role: "tabpanel"
|
|
7698
7713
|
}, children));
|
|
7699
7714
|
};
|
|
7700
7715
|
CodeTabs.propTypes = {
|
|
@@ -8382,14 +8397,19 @@ module.exports = React.createContext([]);
|
|
|
8382
8397
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
8383
8398
|
|
|
8384
8399
|
var React = __webpack_require__(4466);
|
|
8385
|
-
var
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
|
|
8390
|
-
|
|
8391
|
-
|
|
8392
|
-
|
|
8400
|
+
var CreateCodeTabs = __webpack_require__(6553);
|
|
8401
|
+
var createElement = function createElement(opts) {
|
|
8402
|
+
return (
|
|
8403
|
+
// eslint-disable-next-line react/display-name
|
|
8404
|
+
function (type, props) {
|
|
8405
|
+
// eslint-disable-next-line react/prop-types
|
|
8406
|
+
var rdmdType = type === 'div' && (props === null || props === void 0 ? void 0 : props.className) === 'code-tabs' ? CreateCodeTabs(opts) : type;
|
|
8407
|
+
for (var _len = arguments.length, children = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
8408
|
+
children[_key - 2] = arguments[_key];
|
|
8409
|
+
}
|
|
8410
|
+
return React.createElement.apply(React, [rdmdType, props].concat(children));
|
|
8411
|
+
}
|
|
8412
|
+
);
|
|
8393
8413
|
};
|
|
8394
8414
|
module.exports = createElement;
|
|
8395
8415
|
|
|
@@ -34374,7 +34394,7 @@ function reactProcessor() {
|
|
|
34374
34394
|
var _opts3 = opts,
|
|
34375
34395
|
sanitize = _opts3.sanitize;
|
|
34376
34396
|
return htmlProcessor(_objectSpread({}, opts)).use(sectionAnchorId).use(rehypeReact, {
|
|
34377
|
-
createElement: createElement,
|
|
34397
|
+
createElement: createElement(opts),
|
|
34378
34398
|
Fragment: React.Fragment,
|
|
34379
34399
|
components: _objectSpread({
|
|
34380
34400
|
'code-tabs': CodeTabs(opts),
|
package/package.json
CHANGED