@mirrordown/preset-remark 0.1.0 → 0.3.0
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/CHANGELOG.md +18 -0
- package/README.md +30 -25
- package/dist/index.d.mts +7 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +3 -0
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## 0.3.0
|
|
6
|
+
<sub>2026-10-28</sub>
|
|
7
|
+
|
|
8
|
+
- *(minor)*
|
|
9
|
+
Add `tabIcons`, on by default like every other feature: tab labels get the icon their text matches or a `[!keyword]` marker names. The presets' stylesheets include its styles.
|
|
10
|
+
|
|
11
|
+
## 0.2.0
|
|
12
|
+
<sub>2026-10-28</sub>
|
|
13
|
+
|
|
14
|
+
- *(minor)*
|
|
15
|
+
Add `mermaidPele`, on by default like every other feature: ` ```mermaid ` code blocks render to inline SVG with Pele, and the presets' stylesheets include its theme. With remark, stringify with `allowDangerousHtml: true` (Astro already does); in Astro, leave `mermaid` out of highlighting with `syntaxHighlight: { type: "shiki", excludeLangs: ["mermaid"] }`, since Astro highlights code blocks before the plugins run.
|
|
16
|
+
- *(minor)*
|
|
17
|
+
Add `caption`, on by default like every other feature: a `~:` line right after a block captions it, wrapping the block in a `<figure>`. The presets' stylesheets include its styles.
|
|
18
|
+
- *(patch)*
|
|
19
|
+
Captioned lightbox images: a lightbox image (`!`) followed by a `~:` caption is now the figure's content, so its trigger sits directly in the `<figure>` without unwrap-images. The lightbox plugins take a `caption` option (off by default) that shows a captioned image's caption under it in the dialog; repeated images share one dialog, which shows the first caption any of them has. The presets pass lightbox options through (`lightbox: { caption: true }`). The lightbox READMEs are now generated from its guide.
|
|
20
|
+
|
|
3
21
|
## 0.1.0
|
|
4
22
|
<sub>2026-10-28</sub>
|
|
5
23
|
|
package/README.md
CHANGED
|
@@ -26,6 +26,8 @@ import { mirrordown } from "@mirrordown/preset-remark";
|
|
|
26
26
|
|
|
27
27
|
export default defineConfig({
|
|
28
28
|
markdown: {
|
|
29
|
+
// Astro highlights code before the plugins run; mermaid diagrams render instead.
|
|
30
|
+
syntaxHighlight: { type: "shiki", excludeLangs: ["mermaid"] },
|
|
29
31
|
processor: unified(mirrordown())
|
|
30
32
|
}
|
|
31
33
|
});
|
|
@@ -51,12 +53,12 @@ const processor = unified()
|
|
|
51
53
|
.use(remarkPlugins)
|
|
52
54
|
.use(remarkRehype, remarkRehypeOptions)
|
|
53
55
|
.use(rehypePlugins)
|
|
54
|
-
.use(rehypeStringify);
|
|
56
|
+
.use(rehypeStringify, { allowDangerousHtml: true });
|
|
55
57
|
```
|
|
56
58
|
|
|
57
59
|
### Styles
|
|
58
60
|
|
|
59
|
-
Tabs, steps, alerts, spoilers, the lightbox
|
|
61
|
+
Tabs, steps, alerts, spoilers, the lightbox, heading anchors, captions and diagrams ship stylesheets. Import them all at once:
|
|
60
62
|
|
|
61
63
|
```ts
|
|
62
64
|
import "@mirrordown/preset-remark/styles.css";
|
|
@@ -74,32 +76,35 @@ mirrordown({
|
|
|
74
76
|
});
|
|
75
77
|
```
|
|
76
78
|
|
|
77
|
-
| Option | Syntax
|
|
78
|
-
| ------------------- |
|
|
79
|
-
| `gfm` | tables, `~~strike~~`, task lists
|
|
80
|
-
| `abbr` | `*[HTML]: HyperText…`
|
|
81
|
-
| `attrs` | `{.class #id}`
|
|
82
|
-
| `autolinkHeadings` | anchor links on headings
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `
|
|
95
|
-
| `
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
99
|
-
| `
|
|
79
|
+
| Option | Syntax | Plugin |
|
|
80
|
+
| ------------------- | ------------------------------------------- | ------------------------------------- |
|
|
81
|
+
| `gfm` | tables, `~~strike~~`, task lists | `remark-gfm` |
|
|
82
|
+
| `abbr` | `*[HTML]: HyperText…` | `@mirrordown/remd-abbr` |
|
|
83
|
+
| `attrs` | `{.class #id}` | `@mirrordown/remd-attrs` |
|
|
84
|
+
| `autolinkHeadings` | anchor links on headings | `@mirrordown/remd-autolink-headings` |
|
|
85
|
+
| `caption` | `~: caption` after a block | `@mirrordown/remd-caption` |
|
|
86
|
+
| `definitionList` | `Term` / `: Definition` | `@mirrordown/remd-definition-list` |
|
|
87
|
+
| `del` | `--deleted--` | `@mirrordown/remd-del` |
|
|
88
|
+
| `githubAlerts` | `> [!NOTE]` | `@mirrordown/remd-github-alerts` |
|
|
89
|
+
| `ins` | `++inserted++` | `@mirrordown/remd-ins` |
|
|
90
|
+
| `kbd` | `[[Ctrl]]` | `@mirrordown/remd-kbd` |
|
|
91
|
+
| `lightbox` | `!` | `@mirrordown/remd-lightbox` |
|
|
92
|
+
| `mark` | `==highlight==` | `@mirrordown/remd-mark` |
|
|
93
|
+
| `mermaidPele` | ` ```mermaid ` diagrams, rendered with Pele | `@mirrordown/remd-mermaid-pele` |
|
|
94
|
+
| `ruby` | `{漢字\|かんじ}` | `@mirrordown/remd-ruby` |
|
|
95
|
+
| `sectionize` | headings wrapped in `<section>` | `@mirrordown/remd-sectionize` |
|
|
96
|
+
| `slug` | heading ids | `@mirrordown/remd-slug` |
|
|
97
|
+
| `spoiler` | `\|\|spoiler\|\|` | `@mirrordown/remd-spoiler` |
|
|
98
|
+
| `squeezeParagraphs` | empty paragraphs removed | `@mirrordown/remd-squeeze-paragraphs` |
|
|
99
|
+
| `steps` | `@1. Step` | `@mirrordown/remd-steps` |
|
|
100
|
+
| `sub` | `~subscript~` | `@mirrordown/remd-sub` |
|
|
101
|
+
| `sup` | `^superscript^` | `@mirrordown/remd-sup` |
|
|
102
|
+
| `tabs` | `% Tab` | `@mirrordown/remd-tabs` |
|
|
103
|
+
| `unwrapImages` | images not wrapped in `<p>` | `@mirrordown/remd-unwrap-images` |
|
|
100
104
|
|
|
101
105
|
## Notes
|
|
102
106
|
|
|
107
|
+
- **Diagrams are raw HTML.** `mermaidPele` replaces each diagram's code block with Pele's `<svg>` as a `raw` node, so it reaches the HTML exactly as Pele wrote it. Stringify with `allowDangerousHtml: true`, as above (Astro already does), or the diagrams come out as escaped text.
|
|
103
108
|
- **GFM is included.** The preset adds `remark-gfm` with single-tilde strikethrough off, so `~text~` is subscript and `~~text~~` is strikethrough. It returns `gfm: false` so a processor that adds its own GFM, like Astro's, doesn't add it again with single-tilde strikethrough on. Set `gfm: false` in the options to leave GFM out.
|
|
104
109
|
- **Smart punctuation stays off.** The preset returns `smartypants: false`: smart quotes and dashes would rewrite text that `del` and `attrs` read. To turn it on anyway, override it: `unified({ ...mirrordown(), smartypants: true })`.
|
|
105
110
|
- **`inline-svg` is not included.** It reads SVG files from disk and runs asynchronously; add [`@mirrordown/remd-inline-svg`](https://github.com/mirrordown/mirrordown/tree/main/packages/remd-inline-svg) to `rehypePlugins` yourself where that fits.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { AttrsOptions } from "@mirrordown/remd-attrs";
|
|
2
2
|
import { AutolinkHeadingsOptions } from "@mirrordown/remd-autolink-headings";
|
|
3
3
|
import { AlertOptions } from "@mirrordown/remd-github-alerts";
|
|
4
|
+
import { LightboxOptions } from "@mirrordown/remd-lightbox";
|
|
5
|
+
import { RehypeMermaidPeleOptions } from "@mirrordown/remd-mermaid-pele";
|
|
4
6
|
import { RubyOptions } from "@mirrordown/remd-ruby";
|
|
5
7
|
import { SlugOptions } from "@mirrordown/remd-slug";
|
|
6
8
|
import { StepsOptions } from "@mirrordown/remd-steps";
|
|
7
9
|
import { TabsOptions } from "@mirrordown/remd-tabs";
|
|
10
|
+
import { TabIconsOptions } from "@mirrordown/remd-tab-icons";
|
|
8
11
|
import { Root } from "hast";
|
|
9
12
|
import { Root as Root$1 } from "mdast";
|
|
10
13
|
import { Handler } from "mdast-util-to-hast";
|
|
@@ -16,13 +19,15 @@ export interface MirrordownOptions {
|
|
|
16
19
|
abbr?: boolean;
|
|
17
20
|
attrs?: boolean | AttrsOptions;
|
|
18
21
|
autolinkHeadings?: boolean | AutolinkHeadingsOptions;
|
|
22
|
+
caption?: boolean;
|
|
19
23
|
definitionList?: boolean;
|
|
20
24
|
del?: boolean;
|
|
21
25
|
githubAlerts?: boolean | AlertOptions;
|
|
22
26
|
ins?: boolean;
|
|
23
27
|
kbd?: boolean;
|
|
24
|
-
lightbox?: boolean;
|
|
28
|
+
lightbox?: boolean | LightboxOptions;
|
|
25
29
|
mark?: boolean;
|
|
30
|
+
mermaidPele?: boolean | RehypeMermaidPeleOptions;
|
|
26
31
|
ruby?: boolean | RubyOptions;
|
|
27
32
|
sectionize?: boolean;
|
|
28
33
|
slug?: boolean | SlugOptions;
|
|
@@ -32,6 +37,7 @@ export interface MirrordownOptions {
|
|
|
32
37
|
sub?: boolean;
|
|
33
38
|
sup?: boolean;
|
|
34
39
|
tabs?: boolean | TabsOptions;
|
|
40
|
+
tabIcons?: boolean | TabIconsOptions;
|
|
35
41
|
unwrapImages?: boolean;
|
|
36
42
|
}
|
|
37
43
|
/**
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":["MdastRoot","HastRoot"],"sources":["../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":["MdastRoot","HastRoot"],"sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;;;;iBAyDiB;;EAEf;EACA;EACA,kBAAkB;EAClB,6BAA6B;EAC7B;EACA;EACA;EACA,yBAAyB;EACzB;EACA;EACA,qBAAqB;EACrB;EACA,wBAAwB;EACxB,iBAAiB;EACjB;EACA,iBAAiB;EACjB;EACA;EACA,kBAAkB;EAClB;EACA;EACA,iBAAiB;EACjB,qBAAqB;EACrB;;;;;YAMU,YAAY,aAAaA,SAAYC,QAG/C,cAAc,SAAS,cAAc;;;;iBAKtB;EACf,eAAe,MAAM,YAAYD;EACjC,eAAe,MAAM,YAAYC;EACjC;IAAgB,UAAU,eAAe;;EACzC;EACA;;;;;qBAMW,aACX,UAAS,sBACR"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import remarkGfm from "remark-gfm";
|
|
2
2
|
import { remarkAbbr } from "@mirrordown/remd-abbr";
|
|
3
3
|
import { remarkAttrs } from "@mirrordown/remd-attrs";
|
|
4
|
+
import { remarkCaption } from "@mirrordown/remd-caption";
|
|
4
5
|
import { rehypeAutolinkHeadings } from "@mirrordown/remd-autolink-headings";
|
|
5
6
|
import { defListHastHandlers, remarkDefinitionList } from "@mirrordown/remd-definition-list";
|
|
6
7
|
import { remarkDel } from "@mirrordown/remd-del";
|
|
@@ -9,6 +10,7 @@ import { remarkIns } from "@mirrordown/remd-ins";
|
|
|
9
10
|
import { remarkKbd } from "@mirrordown/remd-kbd";
|
|
10
11
|
import { rehypeLightbox } from "@mirrordown/remd-lightbox";
|
|
11
12
|
import { remarkMark } from "@mirrordown/remd-mark";
|
|
13
|
+
import { rehypeMermaidPele } from "@mirrordown/remd-mermaid-pele";
|
|
12
14
|
import { remarkRuby } from "@mirrordown/remd-ruby";
|
|
13
15
|
import { rehypeSectionize } from "@mirrordown/remd-sectionize";
|
|
14
16
|
import { rehypeSlug } from "@mirrordown/remd-slug";
|
|
@@ -18,6 +20,7 @@ import { remarkSteps, stepsHastHandlers } from "@mirrordown/remd-steps";
|
|
|
18
20
|
import { remarkSub } from "@mirrordown/remd-sub";
|
|
19
21
|
import { remarkSup } from "@mirrordown/remd-sup";
|
|
20
22
|
import { remarkTabs, tabsHastHandlers } from "@mirrordown/remd-tabs";
|
|
23
|
+
import { rehypeTabIcons } from "@mirrordown/remd-tab-icons";
|
|
21
24
|
import { rehypeUnwrapImages } from "@mirrordown/remd-unwrap-images";
|
|
22
25
|
// src/index.ts
|
|
23
26
|
/**
|
|
@@ -43,13 +46,16 @@ const mirrordown = (options = {}) => {
|
|
|
43
46
|
...on(options.sub, remarkSub),
|
|
44
47
|
...on(options.sup, remarkSup),
|
|
45
48
|
...configured(options.tabs, remarkTabs),
|
|
46
|
-
...configured(options.attrs, remarkAttrs)
|
|
49
|
+
...configured(options.attrs, remarkAttrs),
|
|
50
|
+
...on(options.caption, remarkCaption)
|
|
47
51
|
],
|
|
48
52
|
rehypePlugins: [
|
|
53
|
+
...configured(options.mermaidPele, rehypeMermaidPele),
|
|
54
|
+
...configured(options.tabIcons, rehypeTabIcons),
|
|
49
55
|
...on(options.sectionize, rehypeSectionize),
|
|
50
56
|
...configured(options.slug, rehypeSlug),
|
|
51
57
|
...configured(options.autolinkHeadings, rehypeAutolinkHeadings),
|
|
52
|
-
...
|
|
58
|
+
...configured(options.lightbox, rehypeLightbox),
|
|
53
59
|
...on(options.unwrapImages, rehypeUnwrapImages),
|
|
54
60
|
...on(options.squeezeParagraphs, rehypeSqueezeParagraphs)
|
|
55
61
|
],
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Root as HastRoot } from \"hast\";\nimport type { Root as MdastRoot } from \"mdast\";\nimport type { Handler } from \"mdast-util-to-hast\";\nimport remarkGfm from \"remark-gfm\";\nimport type { Plugin } from \"unified\";\nimport { remarkAbbr } from \"@mirrordown/remd-abbr\";\nimport { remarkAttrs, type AttrsOptions } from \"@mirrordown/remd-attrs\";\nimport {\n rehypeAutolinkHeadings,\n type AutolinkHeadingsOptions\n} from \"@mirrordown/remd-autolink-headings\";\nimport {\n remarkDefinitionList,\n defListHastHandlers\n} from \"@mirrordown/remd-definition-list\";\nimport { remarkDel } from \"@mirrordown/remd-del\";\nimport {\n remarkGithubAlerts,\n githubAlertsHastHandlers,\n type AlertOptions\n} from \"@mirrordown/remd-github-alerts\";\nimport { remarkIns } from \"@mirrordown/remd-ins\";\nimport { remarkKbd } from \"@mirrordown/remd-kbd\";\nimport {
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import type { Root as HastRoot } from \"hast\";\nimport type { Root as MdastRoot } from \"mdast\";\nimport type { Handler } from \"mdast-util-to-hast\";\nimport remarkGfm from \"remark-gfm\";\nimport type { Plugin } from \"unified\";\nimport { remarkAbbr } from \"@mirrordown/remd-abbr\";\nimport { remarkAttrs, type AttrsOptions } from \"@mirrordown/remd-attrs\";\nimport { remarkCaption } from \"@mirrordown/remd-caption\";\nimport {\n rehypeAutolinkHeadings,\n type AutolinkHeadingsOptions\n} from \"@mirrordown/remd-autolink-headings\";\nimport {\n remarkDefinitionList,\n defListHastHandlers\n} from \"@mirrordown/remd-definition-list\";\nimport { remarkDel } from \"@mirrordown/remd-del\";\nimport {\n remarkGithubAlerts,\n githubAlertsHastHandlers,\n type AlertOptions\n} from \"@mirrordown/remd-github-alerts\";\nimport { remarkIns } from \"@mirrordown/remd-ins\";\nimport { remarkKbd } from \"@mirrordown/remd-kbd\";\nimport {\n rehypeLightbox,\n type LightboxOptions\n} from \"@mirrordown/remd-lightbox\";\nimport { remarkMark } from \"@mirrordown/remd-mark\";\nimport {\n rehypeMermaidPele,\n type RehypeMermaidPeleOptions\n} from \"@mirrordown/remd-mermaid-pele\";\nimport { remarkRuby, type RubyOptions } from \"@mirrordown/remd-ruby\";\nimport { rehypeSectionize } from \"@mirrordown/remd-sectionize\";\nimport { rehypeSlug, type SlugOptions } from \"@mirrordown/remd-slug\";\nimport { remarkSpoiler, spoilerHastHandlers } from \"@mirrordown/remd-spoiler\";\nimport { rehypeSqueezeParagraphs } from \"@mirrordown/remd-squeeze-paragraphs\";\nimport {\n remarkSteps,\n stepsHastHandlers,\n type StepsOptions\n} from \"@mirrordown/remd-steps\";\nimport { remarkSub } from \"@mirrordown/remd-sub\";\nimport { remarkSup } from \"@mirrordown/remd-sup\";\nimport {\n remarkTabs,\n tabsHastHandlers,\n type TabsOptions\n} from \"@mirrordown/remd-tabs\";\nimport {\n rehypeTabIcons,\n type TabIconsOptions\n} from \"@mirrordown/remd-tab-icons\";\nimport { rehypeUnwrapImages } from \"@mirrordown/remd-unwrap-images\";\n\n/** Every feature is on by default: `false` turns one off, an options object configures it. */\nexport interface MirrordownOptions {\n /** GitHub Flavored Markdown through `remark-gfm`, with single-tilde strikethrough off so `~sub~` is subscript. */\n gfm?: boolean;\n abbr?: boolean;\n attrs?: boolean | AttrsOptions;\n autolinkHeadings?: boolean | AutolinkHeadingsOptions;\n caption?: boolean;\n definitionList?: boolean;\n del?: boolean;\n githubAlerts?: boolean | AlertOptions;\n ins?: boolean;\n kbd?: boolean;\n lightbox?: boolean | LightboxOptions;\n mark?: boolean;\n mermaidPele?: boolean | RehypeMermaidPeleOptions;\n ruby?: boolean | RubyOptions;\n sectionize?: boolean;\n slug?: boolean | SlugOptions;\n spoiler?: boolean;\n squeezeParagraphs?: boolean;\n steps?: boolean | StepsOptions;\n sub?: boolean;\n sup?: boolean;\n tabs?: boolean | TabsOptions;\n tabIcons?: boolean | TabIconsOptions;\n unwrapImages?: boolean;\n}\n\n/**\n * A plugin, alone or with its options. Narrower than unified's `PluggableList` (no presets or processors), so the lists also fit processors that only take plugins, such as Astro's `unified()`.\n */\nexport type PluginEntry<Tree extends MdastRoot | HastRoot> =\n // `any[]` parameters, as in the hosts' own plugin types: each plugin takes its own options.\n // oxlint-disable-next-line typescript/no-explicit-any\n Plugin<any[], Tree> | [Plugin<any[], Tree>, unknown];\n\n/**\n * The suite as unified pipeline pieces, in the shape Astro's `unified()` processor takes. `gfm` and `smartypants` are `false` for processors that add their own: GFM is already in `remarkPlugins`, configured for `~sub~`, and smart punctuation would rewrite the delimiters some plugins read.\n */\nexport interface MirrordownPreset {\n remarkPlugins: Array<PluginEntry<MdastRoot>>;\n rehypePlugins: Array<PluginEntry<HastRoot>>;\n remarkRehype: { handlers: Record<string, Handler> };\n gfm: false;\n smartypants: false;\n}\n\n/**\n * The full Mirrordown suite for remark and rehype. `inline-svg` is not included: it reads files from disk and runs asynchronously, so add `@mirrordown/remd-inline-svg` to `rehypePlugins` yourself where that fits.\n */\nexport const mirrordown = (\n options: MirrordownOptions = {}\n): MirrordownPreset => {\n // A plugin with options: `true` (or unset) uses its defaults.\n const configured = <O extends object, T extends MdastRoot | HastRoot>(\n setting: boolean | O | undefined,\n plugin: Plugin<[O?], T>\n ): Array<PluginEntry<T>> =>\n setting === false\n ? []\n : setting === true || setting === undefined\n ? [plugin]\n : [[plugin, setting]];\n const on = <T extends MdastRoot | HastRoot>(\n setting: boolean | undefined,\n plugin: Plugin<[], T>\n ): Array<PluginEntry<T>> => (setting === false ? [] : [plugin]);\n const handlers = (\n setting: unknown,\n map: Record<string, Handler>\n ): Record<string, Handler> => (setting === false ? {} : map);\n\n const gfm: Array<PluginEntry<MdastRoot>> =\n options.gfm === false ? [] : [[remarkGfm, { singleTilde: false }]];\n\n return {\n remarkPlugins: [\n ...gfm,\n ...on(options.abbr, remarkAbbr),\n ...on(options.definitionList, remarkDefinitionList),\n ...on(options.del, remarkDel),\n ...configured(options.githubAlerts, remarkGithubAlerts),\n ...on(options.ins, remarkIns),\n ...on(options.kbd, remarkKbd),\n ...on(options.mark, remarkMark),\n ...configured(options.ruby, remarkRuby),\n ...configured(options.steps, remarkSteps),\n ...on(options.spoiler, remarkSpoiler),\n ...on(options.sub, remarkSub),\n ...on(options.sup, remarkSup),\n ...configured(options.tabs, remarkTabs),\n // Attrs last, as markdown-it applies them after parsing: step titles, tab labels and the other plugins' nodes exist by then.\n ...configured(options.attrs, remarkAttrs),\n // After attrs and the containers: attributes ending a caption go on its figure.\n ...on(options.caption, remarkCaption)\n ],\n rehypePlugins: [\n // First, so the plugins after it see the diagrams' <svg>.\n ...configured(options.mermaidPele, rehypeMermaidPele),\n ...configured(options.tabIcons, rehypeTabIcons),\n ...on(options.sectionize, rehypeSectionize),\n ...configured(options.slug, rehypeSlug),\n ...configured(options.autolinkHeadings, rehypeAutolinkHeadings),\n ...configured(options.lightbox, rehypeLightbox),\n ...on(options.unwrapImages, rehypeUnwrapImages),\n ...on(options.squeezeParagraphs, rehypeSqueezeParagraphs)\n ],\n remarkRehype: {\n handlers: {\n ...handlers(options.definitionList, defListHastHandlers),\n ...handlers(options.githubAlerts, githubAlertsHastHandlers),\n ...handlers(options.steps, stepsHastHandlers),\n ...handlers(options.spoiler, spoilerHastHandlers),\n ...handlers(options.tabs, tabsHastHandlers)\n }\n },\n gfm: false,\n smartypants: false\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2GA,MAAa,cACX,UAA6B,CAAC,MACT;CAErB,MAAM,cACJ,SACA,WAEA,YAAY,QACR,CAAC,IACD,YAAY,QAAQ,YAAY,KAAA,IAC9B,CAAC,MAAM,IACP,CAAC,CAAC,QAAQ,OAAO,CAAC;CAC1B,MAAM,MACJ,SACA,WAC2B,YAAY,QAAQ,CAAC,IAAI,CAAC,MAAM;CAC7D,MAAM,YACJ,SACA,QAC6B,YAAY,QAAQ,CAAC,IAAI;CAKxD,OAAO;EACL,eAAe;GACb,GAJF,QAAQ,QAAQ,QAAQ,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,aAAa,MAAM,CAAC,CAAC;GAK/D,GAAG,GAAG,QAAQ,MAAM,UAAU;GAC9B,GAAG,GAAG,QAAQ,gBAAgB,oBAAoB;GAClD,GAAG,GAAG,QAAQ,KAAK,SAAS;GAC5B,GAAG,WAAW,QAAQ,cAAc,kBAAkB;GACtD,GAAG,GAAG,QAAQ,KAAK,SAAS;GAC5B,GAAG,GAAG,QAAQ,KAAK,SAAS;GAC5B,GAAG,GAAG,QAAQ,MAAM,UAAU;GAC9B,GAAG,WAAW,QAAQ,MAAM,UAAU;GACtC,GAAG,WAAW,QAAQ,OAAO,WAAW;GACxC,GAAG,GAAG,QAAQ,SAAS,aAAa;GACpC,GAAG,GAAG,QAAQ,KAAK,SAAS;GAC5B,GAAG,GAAG,QAAQ,KAAK,SAAS;GAC5B,GAAG,WAAW,QAAQ,MAAM,UAAU;GAEtC,GAAG,WAAW,QAAQ,OAAO,WAAW;GAExC,GAAG,GAAG,QAAQ,SAAS,aAAa;EACtC;EACA,eAAe;GAEb,GAAG,WAAW,QAAQ,aAAa,iBAAiB;GACpD,GAAG,WAAW,QAAQ,UAAU,cAAc;GAC9C,GAAG,GAAG,QAAQ,YAAY,gBAAgB;GAC1C,GAAG,WAAW,QAAQ,MAAM,UAAU;GACtC,GAAG,WAAW,QAAQ,kBAAkB,sBAAsB;GAC9D,GAAG,WAAW,QAAQ,UAAU,cAAc;GAC9C,GAAG,GAAG,QAAQ,cAAc,kBAAkB;GAC9C,GAAG,GAAG,QAAQ,mBAAmB,uBAAuB;EAC1D;EACA,cAAc,EACZ,UAAU;GACR,GAAG,SAAS,QAAQ,gBAAgB,mBAAmB;GACvD,GAAG,SAAS,QAAQ,cAAc,wBAAwB;GAC1D,GAAG,SAAS,QAAQ,OAAO,iBAAiB;GAC5C,GAAG,SAAS,QAAQ,SAAS,mBAAmB;GAChD,GAAG,SAAS,QAAQ,MAAM,gBAAgB;EAC5C,EACF;EACA,KAAK;EACL,aAAa;CACf;AACF"}
|
package/dist/styles.css
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/* Every Mirrordown remark/rehype plugin's stylesheet, so one import styles the whole suite. */
|
|
2
2
|
@import "@mirrordown/remd-autolink-headings/autolink-headings.css";
|
|
3
|
+
@import "@mirrordown/remd-caption/caption.css";
|
|
3
4
|
@import "@mirrordown/remd-github-alerts/github-alerts.css";
|
|
4
5
|
@import "@mirrordown/remd-lightbox/lightbox.css";
|
|
6
|
+
@import "@mirrordown/remd-mermaid-pele/mermaid-pele.css";
|
|
5
7
|
@import "@mirrordown/remd-spoiler/spoiler.css";
|
|
6
8
|
@import "@mirrordown/remd-steps/steps.css";
|
|
7
9
|
@import "@mirrordown/remd-tabs/tabs.css";
|
|
10
|
+
@import "@mirrordown/remd-tab-icons/tab-icons.css";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirrordown/preset-remark",
|
|
3
3
|
"description": "The full Mirrordown suite for remark/rehype (unified) in one call.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Drake Costa <drake@saeris.io> (https://saeris.gg)",
|
|
7
7
|
"repository": {
|
|
@@ -22,24 +22,27 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@mirrordown/remd-abbr": "^0.1.4",
|
|
25
|
-
"@mirrordown/remd-attrs": "^0.2.
|
|
25
|
+
"@mirrordown/remd-attrs": "^0.2.1",
|
|
26
26
|
"@mirrordown/remd-autolink-headings": "^0.1.1",
|
|
27
|
+
"@mirrordown/remd-caption": "^0.1.0",
|
|
27
28
|
"@mirrordown/remd-definition-list": "^0.2.1",
|
|
28
29
|
"@mirrordown/remd-del": "^0.1.4",
|
|
29
30
|
"@mirrordown/remd-github-alerts": "^0.2.0",
|
|
30
31
|
"@mirrordown/remd-ins": "^0.1.4",
|
|
31
32
|
"@mirrordown/remd-kbd": "^0.1.4",
|
|
32
|
-
"@mirrordown/remd-lightbox": "^0.
|
|
33
|
+
"@mirrordown/remd-lightbox": "^0.2.0",
|
|
33
34
|
"@mirrordown/remd-mark": "^0.1.4",
|
|
35
|
+
"@mirrordown/remd-mermaid-pele": "^0.1.0",
|
|
34
36
|
"@mirrordown/remd-ruby": "^0.1.4",
|
|
35
37
|
"@mirrordown/remd-sectionize": "^0.1.1",
|
|
36
38
|
"@mirrordown/remd-slug": "^0.1.1",
|
|
37
39
|
"@mirrordown/remd-spoiler": "^0.1.1",
|
|
38
40
|
"@mirrordown/remd-squeeze-paragraphs": "^0.1.1",
|
|
39
|
-
"@mirrordown/remd-steps": "^0.1.
|
|
41
|
+
"@mirrordown/remd-steps": "^0.1.5",
|
|
40
42
|
"@mirrordown/remd-sub": "^0.2.0",
|
|
41
43
|
"@mirrordown/remd-sup": "^0.2.0",
|
|
42
|
-
"@mirrordown/remd-
|
|
44
|
+
"@mirrordown/remd-tab-icons": "^0.1.0",
|
|
45
|
+
"@mirrordown/remd-tabs": "^0.2.2",
|
|
43
46
|
"@mirrordown/remd-unwrap-images": "^0.1.4",
|
|
44
47
|
"mdast-util-to-hast": "^13.0.0",
|
|
45
48
|
"remark-gfm": "^4.0.1"
|