@mirrordown/remd-sub 0.0.0 → 0.1.1
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 +52 -0
- package/README.md +81 -0
- package/dist/index.d.mts +28 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +89 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +39 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## 0.1.1
|
|
5
|
+
<sub>2026-06-25</sub>
|
|
6
|
+
|
|
7
|
+
- *(patch)*
|
|
8
|
+
fix: resolve `catalog:` protocol in published dependencies
|
|
9
|
+
|
|
10
|
+
0.1.0 was published with Yarn's `catalog:` specifier left literally in
|
|
11
|
+
`dependencies`/`devDependencies`, so consumers could not install the affected
|
|
12
|
+
packages. Packages are now packed with `yarn pack` (which resolves `catalog:`
|
|
13
|
+
to the concrete version ranges from `.yarnrc.yml`) before `npm publish`.
|
|
14
|
+
|
|
15
|
+
## 0.1.0
|
|
16
|
+
|
|
17
|
+
<sub>2026-06-23</sub>
|
|
18
|
+
|
|
19
|
+
- _(minor)_
|
|
20
|
+
|
|
21
|
+
# Initial release
|
|
22
|
+
|
|
23
|
+
First public release of the `@mirrordown/markdown` suite — a collection of markdown syntax extensions for the [unified](https://unifiedjs.com/) (remark/rehype) and [markdown-it](https://github.com/markdown-it/markdown-it) ecosystems.
|
|
24
|
+
|
|
25
|
+
## Packages
|
|
26
|
+
|
|
27
|
+
**Remark/rehype plugins** (`@mirrordown/remd-*`):
|
|
28
|
+
- `abbr` — abbreviation definitions that auto-expand matching text with `<abbr>` tooltips
|
|
29
|
+
- `attrs` — `{attrs}` syntax for adding HTML attributes to markdown elements
|
|
30
|
+
- `definition-list` — `<dl>`/`<dt>`/`<dd>` syntax from PHP Markdown Extra
|
|
31
|
+
- `del` — `~~strikethrough~~` rendered as `<del>` instead of `<s>`
|
|
32
|
+
- `github-alerts` — `> [!NOTE]` callout boxes matching GitHub's alert syntax
|
|
33
|
+
- `inline-svg` — inlines local `.svg` images into the HTML output with size/occurrence/sprite controls
|
|
34
|
+
- `ins` — `++inserted text++` rendered as `<ins>`
|
|
35
|
+
- `kbd` — `[[Ctrl]]+[[C]]` syntax for `<kbd>` keyboard input elements
|
|
36
|
+
- `mark` — `==highlighted text==` rendered as `<mark>`
|
|
37
|
+
- `ruby` — DenDen-ruby syntax (`{base|reading}`) for `<ruby>`/`<rt>`/`<rp>` annotations
|
|
38
|
+
- `steps` — numbered `@N. step` syntax for procedural guides
|
|
39
|
+
- `sub` — `~subscript~` rendered as `<sub>`
|
|
40
|
+
- `sup` — `^superscript^` rendered as `<sup>`
|
|
41
|
+
- `tabs` — `% Tab` syntax for tabbed content panels
|
|
42
|
+
- `unwrap-images` — lifts block-only images out of wrapping `<p>` tags
|
|
43
|
+
|
|
44
|
+
**Markdown-it plugins** (`@mirrordown/mdit-*`): same plugin set, ported for the markdown-it pipeline.
|
|
45
|
+
|
|
46
|
+
**VSCode extensions** (`markdown-*`): each plugin wrapped as a VSCode extension that contributes its syntax to the built-in markdown preview. (Publishing to the VSCode Marketplace is wired separately and is not part of this npm release.)
|
|
47
|
+
|
|
48
|
+
## Highlights
|
|
49
|
+
- Designed to work together — `attrs` understands custom container nodes from `tabs`/`steps`/`definition-list`/`github-alerts`, and `tabs`/`steps` nest bidirectionally.
|
|
50
|
+
- Type-aware: every package ships `.d.mts` declarations and externalizes `unist`/`mdast`/`hast` types so downstream consumers see compatible types.
|
|
51
|
+
- Tested: 880 tests covering every plugin's syntax, plus cross-plugin integration tests for nested constructs (tabs-in-steps, attrs-on-defList, github-alerts-with-attrs, etc.).
|
|
52
|
+
- Documented at [github.com/mirrordown/mirrordown](https://github.com/mirrordown/mirrordown).
|
package/README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# @mirrordown/remd-sub
|
|
2
|
+
|
|
3
|
+
> Part of [Mirrordown](https://github.com/mirrordown/mirrordown) — a suite of markdown syntax extensions for the unified and markdown-it ecosystems.
|
|
4
|
+
|
|
5
|
+
A remark/rehype (unified) plugin for the `sub` syntax extension.
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
The `sub` plugin renders `~text~` as an HTML `<sub>` element, representing subscript text.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<sub>text</sub>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Syntax
|
|
16
|
+
|
|
17
|
+
Wrap text in single tildes to render it as subscript:
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
The chemical formula for water is H~2~O.
|
|
21
|
+
|
|
22
|
+
Carbon dioxide is CO~2~.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```sh
|
|
28
|
+
npm install @mirrordown/remd-sub
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Unified
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
import { unified } from "unified";
|
|
35
|
+
import remarkParse from "remark-parse";
|
|
36
|
+
import remarkRehype from "remark-rehype";
|
|
37
|
+
import rehypeStringify from "rehype-stringify";
|
|
38
|
+
import { remarkSub } from "@mirrordown/remd-sub";
|
|
39
|
+
|
|
40
|
+
const processor = unified()
|
|
41
|
+
.use(remarkParse)
|
|
42
|
+
.use(remarkSub)
|
|
43
|
+
.use(remarkRehype)
|
|
44
|
+
.use(rehypeStringify);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Astro
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
// astro.config.ts
|
|
51
|
+
import { defineConfig } from "astro/config";
|
|
52
|
+
import { remarkSub } from "@mirrordown/remd-sub";
|
|
53
|
+
|
|
54
|
+
export default defineConfig({
|
|
55
|
+
markdown: {
|
|
56
|
+
remarkPlugins: [remarkSub]
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### VitePress
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
// .vitepress/config.ts
|
|
65
|
+
import { defineConfig } from "vitepress";
|
|
66
|
+
import { remarkSub } from "@mirrordown/remd-sub";
|
|
67
|
+
|
|
68
|
+
export default defineConfig({
|
|
69
|
+
markdown: {
|
|
70
|
+
remarkPlugins: [remarkSub]
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Documentation
|
|
76
|
+
|
|
77
|
+
Full documentation, more examples, and configuration options: [github.com/mirrordown/mirrordown](https://github.com/mirrordown/mirrordown) (dedicated docs site coming soon).
|
|
78
|
+
|
|
79
|
+
## License
|
|
80
|
+
|
|
81
|
+
MIT © [Drake Costa](https://saeris.gg)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Plugin } from "unified";
|
|
2
|
+
import { Data, Parent, PhrasingContent, Root } from "mdast";
|
|
3
|
+
|
|
4
|
+
//#region src/index.d.ts
|
|
5
|
+
interface SubscriptData extends Data {}
|
|
6
|
+
interface Subscript extends Parent {
|
|
7
|
+
type: `subscript`;
|
|
8
|
+
children: PhrasingContent[];
|
|
9
|
+
data?: SubscriptData | undefined;
|
|
10
|
+
}
|
|
11
|
+
declare module "mdast" {
|
|
12
|
+
interface PhrasingContentMap {
|
|
13
|
+
subscript: Subscript;
|
|
14
|
+
}
|
|
15
|
+
interface RootContentMap {
|
|
16
|
+
subscript: Subscript;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
declare const REGEX: RegExp;
|
|
20
|
+
declare const REGEX_GLOBAL: RegExp;
|
|
21
|
+
declare const REGEX_STARTING: RegExp;
|
|
22
|
+
declare const REGEX_STARTING_GLOBAL: RegExp;
|
|
23
|
+
declare const REGEX_ENDING: RegExp;
|
|
24
|
+
declare const REGEX_ENDING_GLOBAL: RegExp;
|
|
25
|
+
declare const remarkSub: Plugin<[], Root>;
|
|
26
|
+
//#endregion
|
|
27
|
+
export { REGEX, REGEX_ENDING, REGEX_ENDING_GLOBAL, REGEX_GLOBAL, REGEX_STARTING, REGEX_STARTING_GLOBAL, remarkSub };
|
|
28
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;;;UAUU,aAAA,SAAsB,IAAA;AAAA,UAEtB,SAAA,SAAkB,MAAA;EAC1B,IAAA;EACA,QAAA,EAAU,eAAA;EACV,IAAA,GAAO,aAAA;AAAA;AAAA;EAAA,UAIG,kBAAA;IACR,SAAA,EAAW,SAAA;EAAA;EAAA,UAGH,cAAA;IACR,SAAA,EAAW,SAAA;EAAA;AAAA;AAAA,cAIF,KAAA,EAAK,MAAA;AAAA,cACL,YAAA,EAAY,MAAA;AAAA,cAEZ,cAAA,EAAc,MAAA;AAAA,cACd,qBAAA,EAAqB,MAAA;AAAA,cAErB,YAAA,EAAY,MAAA;AAAA,cACZ,mBAAA,EAAmB,MAAA;AAAA,cAEnB,SAAA,EAAW,MAAA,KAAW,IAAA"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { visit } from "unist-util-visit";
|
|
2
|
+
import { findAllBetween } from "unist-util-find-between-all";
|
|
3
|
+
import { findAllBefore } from "unist-util-find-all-before";
|
|
4
|
+
import { findAllAfter } from "unist-util-find-all-after";
|
|
5
|
+
import { findAfter } from "unist-util-find-after";
|
|
6
|
+
import { u } from "unist-builder";
|
|
7
|
+
//#region src/index.ts
|
|
8
|
+
const REGEX = /~(?!\s)([\s\S]*?)(?<!\s)~/;
|
|
9
|
+
const REGEX_GLOBAL = /~(?!\s)([\s\S]*?)(?<!\s)~/g;
|
|
10
|
+
const REGEX_STARTING = /~(?!\s)/;
|
|
11
|
+
const REGEX_STARTING_GLOBAL = /~(?!\s)/g;
|
|
12
|
+
const REGEX_ENDING = /(?<!\s)~/;
|
|
13
|
+
const REGEX_ENDING_GLOBAL = /(?<!\s)~/g;
|
|
14
|
+
const remarkSub = () => {
|
|
15
|
+
const constructSubscriptNode = (children) => ({
|
|
16
|
+
type: `subscript`,
|
|
17
|
+
children,
|
|
18
|
+
data: { hName: `sub` }
|
|
19
|
+
});
|
|
20
|
+
const visitorFirst = (node, index, parent) => {
|
|
21
|
+
/* v8 ignore next */
|
|
22
|
+
if (!parent || typeof index === `undefined`) return;
|
|
23
|
+
if (!REGEX.test(node.value)) return;
|
|
24
|
+
const children = [];
|
|
25
|
+
const value = node.value;
|
|
26
|
+
let tempValue = ``;
|
|
27
|
+
let prevMatchIndex = 0;
|
|
28
|
+
let prevMatchLength = 0;
|
|
29
|
+
const matches = Array.from(value.matchAll(REGEX_GLOBAL));
|
|
30
|
+
for (const match of matches) {
|
|
31
|
+
const [matched, subscriptText] = match;
|
|
32
|
+
const mIndex = match.index;
|
|
33
|
+
const mLength = matched.length;
|
|
34
|
+
const textPartIndex = prevMatchIndex + prevMatchLength;
|
|
35
|
+
prevMatchIndex = mIndex;
|
|
36
|
+
prevMatchLength = mLength;
|
|
37
|
+
if (mIndex > textPartIndex) children.push(u(`text`, value.substring(textPartIndex, mIndex)));
|
|
38
|
+
children.push(constructSubscriptNode([{
|
|
39
|
+
type: `text`,
|
|
40
|
+
value: subscriptText.trim()
|
|
41
|
+
}]));
|
|
42
|
+
tempValue = value.slice(mIndex + mLength);
|
|
43
|
+
}
|
|
44
|
+
if (tempValue) children.push(u(`text`, tempValue));
|
|
45
|
+
if (children.length) parent.children.splice(index, 1, ...children);
|
|
46
|
+
};
|
|
47
|
+
const visitorSecond = (node, index, parent) => {
|
|
48
|
+
/* v8 ignore next */
|
|
49
|
+
if (!parent || typeof index === `undefined`) return;
|
|
50
|
+
if (!REGEX_STARTING.test(node.value)) return;
|
|
51
|
+
const openingNode = node;
|
|
52
|
+
const closingNode = findAfter(parent, openingNode, (n) => {
|
|
53
|
+
return n.type === `text` && REGEX_ENDING.test(n.value);
|
|
54
|
+
});
|
|
55
|
+
if (!closingNode) return;
|
|
56
|
+
const beforeChildren = findAllBefore(parent, openingNode);
|
|
57
|
+
const mainChildren = findAllBetween(parent, openingNode, closingNode);
|
|
58
|
+
const afterChildren = findAllAfter(parent, closingNode);
|
|
59
|
+
const value = openingNode.value;
|
|
60
|
+
const match = Array.from(value.matchAll(REGEX_STARTING_GLOBAL))[0];
|
|
61
|
+
const [matched] = match;
|
|
62
|
+
const mIndex = match.index;
|
|
63
|
+
const mLength = matched.length;
|
|
64
|
+
if (mIndex > 0) beforeChildren.push(u(`text`, value.substring(0, mIndex)));
|
|
65
|
+
if (value.length > mIndex + mLength) mainChildren.unshift(u(`text`, value.slice(mIndex + mLength)));
|
|
66
|
+
const value_ = closingNode.value;
|
|
67
|
+
const match_ = Array.from(value_.matchAll(REGEX_ENDING_GLOBAL))[0];
|
|
68
|
+
const [matched_] = match_;
|
|
69
|
+
const mIndex_ = match_.index;
|
|
70
|
+
const mLength_ = matched_.length;
|
|
71
|
+
if (mIndex_ > 0) mainChildren.push(u(`text`, value_.substring(0, mIndex_)));
|
|
72
|
+
if (value_.length > mIndex_ + mLength_) afterChildren.unshift(u(`text`, value_.slice(mIndex_ + mLength_)));
|
|
73
|
+
parent.children = [
|
|
74
|
+
...beforeChildren,
|
|
75
|
+
constructSubscriptNode(mainChildren),
|
|
76
|
+
...afterChildren
|
|
77
|
+
];
|
|
78
|
+
return index;
|
|
79
|
+
};
|
|
80
|
+
const transformer = (tree) => {
|
|
81
|
+
visit(tree, `text`, visitorFirst);
|
|
82
|
+
visit(tree, `text`, visitorSecond);
|
|
83
|
+
};
|
|
84
|
+
return transformer;
|
|
85
|
+
};
|
|
86
|
+
//#endregion
|
|
87
|
+
export { REGEX, REGEX_ENDING, REGEX_ENDING_GLOBAL, REGEX_GLOBAL, REGEX_STARTING, REGEX_STARTING_GLOBAL, remarkSub };
|
|
88
|
+
|
|
89
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { visit } from \"unist-util-visit\";\nimport type { Visitor, VisitorResult } from \"unist-util-visit\";\nimport type { Plugin, Transformer } from \"unified\";\nimport type { Data, Parent, PhrasingContent, Root, Text } from \"mdast\";\nimport { findAllBetween } from \"unist-util-find-between-all\";\nimport { findAllBefore } from \"unist-util-find-all-before\";\nimport { findAllAfter } from \"unist-util-find-all-after\";\nimport { findAfter } from \"unist-util-find-after\";\nimport { u } from \"unist-builder\";\n\ninterface SubscriptData extends Data {}\n\ninterface Subscript extends Parent {\n type: `subscript`;\n children: PhrasingContent[];\n data?: SubscriptData | undefined;\n}\n\ndeclare module \"mdast\" {\n interface PhrasingContentMap {\n subscript: Subscript;\n }\n\n interface RootContentMap {\n subscript: Subscript;\n }\n}\n\nexport const REGEX = /~(?!\\s)([\\s\\S]*?)(?<!\\s)~/;\nexport const REGEX_GLOBAL = /~(?!\\s)([\\s\\S]*?)(?<!\\s)~/g;\n\nexport const REGEX_STARTING = /~(?!\\s)/;\nexport const REGEX_STARTING_GLOBAL = /~(?!\\s)/g;\n\nexport const REGEX_ENDING = /(?<!\\s)~/;\nexport const REGEX_ENDING_GLOBAL = /(?<!\\s)~/g;\n\nexport const remarkSub: Plugin<[], Root> = () => {\n const constructSubscriptNode = (children: PhrasingContent[]): Subscript => ({\n type: `subscript`,\n children,\n data: { hName: `sub` }\n });\n\n const visitorFirst: Visitor<Text, Parent> = (\n node,\n index,\n parent\n ): VisitorResult => {\n /* v8 ignore next */\n if (!parent || typeof index === `undefined`) return;\n\n if (!REGEX.test(node.value)) return;\n\n const children: PhrasingContent[] = [];\n const value = node.value;\n let tempValue = ``;\n let prevMatchIndex = 0;\n let prevMatchLength = 0;\n\n const matches = Array.from(value.matchAll(REGEX_GLOBAL));\n\n for (const match of matches) {\n const [matched, subscriptText] = match;\n const mIndex = match.index;\n const mLength = matched.length;\n\n const textPartIndex = prevMatchIndex + prevMatchLength;\n\n prevMatchIndex = mIndex;\n prevMatchLength = mLength;\n\n if (mIndex > textPartIndex) {\n children.push(u(`text`, value.substring(textPartIndex, mIndex)));\n }\n\n children.push(\n constructSubscriptNode([{ type: `text`, value: subscriptText.trim() }])\n );\n\n tempValue = value.slice(mIndex + mLength);\n }\n\n if (tempValue) {\n children.push(u(`text`, tempValue));\n }\n\n if (children.length) parent.children.splice(index, 1, ...children);\n };\n\n const visitorSecond: Visitor<Text, Parent> = (\n node,\n index,\n parent\n ): VisitorResult => {\n /* v8 ignore next */\n if (!parent || typeof index === `undefined`) return;\n\n if (!REGEX_STARTING.test(node.value)) return;\n\n const openingNode = node;\n\n const closingNode = findAfter(parent, openingNode, (n): n is Text => {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n return n.type === `text` && REGEX_ENDING.test((n as Text).value);\n });\n\n if (!closingNode) return;\n\n // unist-util-find-all-* are generic over Parent; we know paragraph\n // siblings are PhrasingContent. The cast narrows the lib's `Node[]`\n // return to the concrete child type we know we're working with.\n /* oxlint-disable typescript/no-unsafe-type-assertion */\n const beforeChildren = findAllBefore(\n parent,\n openingNode\n ) as PhrasingContent[];\n const mainChildren = findAllBetween(\n parent,\n openingNode,\n closingNode\n ) as PhrasingContent[];\n const afterChildren = findAllAfter(\n parent,\n closingNode\n ) as PhrasingContent[];\n /* oxlint-enable typescript/no-unsafe-type-assertion */\n\n const value = openingNode.value;\n const match = Array.from(value.matchAll(REGEX_STARTING_GLOBAL))[0];\n const [matched] = match;\n const mIndex = match.index;\n const mLength = matched.length;\n\n if (mIndex > 0) {\n beforeChildren.push(u(`text`, value.substring(0, mIndex)));\n }\n\n if (value.length > mIndex + mLength) {\n mainChildren.unshift(u(`text`, value.slice(mIndex + mLength)));\n }\n\n const value_ = closingNode.value;\n const match_ = Array.from(value_.matchAll(REGEX_ENDING_GLOBAL))[0];\n const [matched_] = match_;\n const mIndex_ = match_.index;\n const mLength_ = matched_.length;\n\n if (mIndex_ > 0) {\n mainChildren.push(u(`text`, value_.substring(0, mIndex_)));\n }\n\n if (value_.length > mIndex_ + mLength_) {\n afterChildren.unshift(u(`text`, value_.slice(mIndex_ + mLength_)));\n }\n\n parent.children = [\n ...beforeChildren,\n constructSubscriptNode(mainChildren),\n ...afterChildren\n ];\n\n return index;\n };\n\n const transformer: Transformer<Root> = (tree) => {\n visit(tree, `text`, visitorFirst);\n visit(tree, `text`, visitorSecond);\n };\n\n return transformer;\n};\n"],"mappings":";;;;;;;AA4BA,MAAa,QAAQ;AACrB,MAAa,eAAe;AAE5B,MAAa,iBAAiB;AAC9B,MAAa,wBAAwB;AAErC,MAAa,eAAe;AAC5B,MAAa,sBAAsB;AAEnC,MAAa,kBAAoC;CAC/C,MAAM,0BAA0B,cAA4C;EAC1E,MAAM;EACN;EACA,MAAM,EAAE,OAAO,OAAO;EACvB;CAED,MAAM,gBACJ,MACA,OACA,WACkB;;AAElB,MAAI,CAAC,UAAU,OAAO,UAAU,YAAa;AAE7C,MAAI,CAAC,MAAM,KAAK,KAAK,MAAM,CAAE;EAE7B,MAAM,WAA8B,EAAE;EACtC,MAAM,QAAQ,KAAK;EACnB,IAAI,YAAY;EAChB,IAAI,iBAAiB;EACrB,IAAI,kBAAkB;EAEtB,MAAM,UAAU,MAAM,KAAK,MAAM,SAAS,aAAa,CAAC;AAExD,OAAK,MAAM,SAAS,SAAS;GAC3B,MAAM,CAAC,SAAS,iBAAiB;GACjC,MAAM,SAAS,MAAM;GACrB,MAAM,UAAU,QAAQ;GAExB,MAAM,gBAAgB,iBAAiB;AAEvC,oBAAiB;AACjB,qBAAkB;AAElB,OAAI,SAAS,cACX,UAAS,KAAK,EAAE,QAAQ,MAAM,UAAU,eAAe,OAAO,CAAC,CAAC;AAGlE,YAAS,KACP,uBAAuB,CAAC;IAAE,MAAM;IAAQ,OAAO,cAAc,MAAM;IAAE,CAAC,CAAC,CACxE;AAED,eAAY,MAAM,MAAM,SAAS,QAAQ;;AAG3C,MAAI,UACF,UAAS,KAAK,EAAE,QAAQ,UAAU,CAAC;AAGrC,MAAI,SAAS,OAAQ,QAAO,SAAS,OAAO,OAAO,GAAG,GAAG,SAAS;;CAGpE,MAAM,iBACJ,MACA,OACA,WACkB;;AAElB,MAAI,CAAC,UAAU,OAAO,UAAU,YAAa;AAE7C,MAAI,CAAC,eAAe,KAAK,KAAK,MAAM,CAAE;EAEtC,MAAM,cAAc;EAEpB,MAAM,cAAc,UAAU,QAAQ,cAAc,MAAiB;AAEnE,UAAO,EAAE,SAAS,UAAU,aAAa,KAAM,EAAW,MAAM;IAChE;AAEF,MAAI,CAAC,YAAa;EAMlB,MAAM,iBAAiB,cACrB,QACA,YACD;EACD,MAAM,eAAe,eACnB,QACA,aACA,YACD;EACD,MAAM,gBAAgB,aACpB,QACA,YACD;EAGD,MAAM,QAAQ,YAAY;EAC1B,MAAM,QAAQ,MAAM,KAAK,MAAM,SAAS,sBAAsB,CAAC,CAAC;EAChE,MAAM,CAAC,WAAW;EAClB,MAAM,SAAS,MAAM;EACrB,MAAM,UAAU,QAAQ;AAExB,MAAI,SAAS,EACX,gBAAe,KAAK,EAAE,QAAQ,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC;AAG5D,MAAI,MAAM,SAAS,SAAS,QAC1B,cAAa,QAAQ,EAAE,QAAQ,MAAM,MAAM,SAAS,QAAQ,CAAC,CAAC;EAGhE,MAAM,SAAS,YAAY;EAC3B,MAAM,SAAS,MAAM,KAAK,OAAO,SAAS,oBAAoB,CAAC,CAAC;EAChE,MAAM,CAAC,YAAY;EACnB,MAAM,UAAU,OAAO;EACvB,MAAM,WAAW,SAAS;AAE1B,MAAI,UAAU,EACZ,cAAa,KAAK,EAAE,QAAQ,OAAO,UAAU,GAAG,QAAQ,CAAC,CAAC;AAG5D,MAAI,OAAO,SAAS,UAAU,SAC5B,eAAc,QAAQ,EAAE,QAAQ,OAAO,MAAM,UAAU,SAAS,CAAC,CAAC;AAGpE,SAAO,WAAW;GAChB,GAAG;GACH,uBAAuB,aAAa;GACpC,GAAG;GACJ;AAED,SAAO;;CAGT,MAAM,eAAkC,SAAS;AAC/C,QAAM,MAAM,QAAQ,aAAa;AACjC,QAAM,MAAM,QAAQ,cAAc;;AAGpC,QAAO"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mirrordown/remd-sub",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Drake Costa <drake@saeris.io> (https://saeris.gg)",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/mirrordown/mirrordown.git"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"development": "./src/index.ts",
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
18
|
+
"import": "./dist/index.mjs"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"unist-builder": "^4.0.0",
|
|
23
|
+
"unist-util-find-after": "^5.0.0",
|
|
24
|
+
"unist-util-find-all-after": "^5.0.0",
|
|
25
|
+
"unist-util-find-all-before": "^5.0.0",
|
|
26
|
+
"unist-util-find-between-all": "^1.1.6",
|
|
27
|
+
"unist-util-visit": "^5.1.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/mdast": "^4.0.4",
|
|
31
|
+
"unified": "^11.0.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"unified": "^11.0.0"
|
|
35
|
+
},
|
|
36
|
+
"engines": {
|
|
37
|
+
"node": ">=24.0.0"
|
|
38
|
+
},
|
|
39
|
+
"bumpy": {
|
|
40
|
+
"buildCommand": "vp pack",
|
|
41
|
+
"publishCommand": [
|
|
42
|
+
"node ../../scripts/sync-jsr-version.mjs",
|
|
43
|
+
"yarn pack -o package.tgz",
|
|
44
|
+
"npm publish package.tgz --access public"
|
|
45
|
+
]
|
|
9
46
|
}
|
|
10
|
-
}
|
|
47
|
+
}
|