@quartz-community/remark-obsidian 0.1.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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.js +1775 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Quartz Community
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Literal, Parent, Root } from 'mdast';
|
|
2
|
+
import { Extension } from 'micromark-util-types';
|
|
3
|
+
import { Extension as Extension$1 } from 'mdast-util-from-markdown';
|
|
4
|
+
import { Options } from 'mdast-util-to-markdown';
|
|
5
|
+
|
|
6
|
+
interface Wikilink extends Literal {
|
|
7
|
+
type: "wikilink";
|
|
8
|
+
value: string;
|
|
9
|
+
embedded: boolean;
|
|
10
|
+
path: string;
|
|
11
|
+
heading: string;
|
|
12
|
+
alias: string;
|
|
13
|
+
}
|
|
14
|
+
interface Highlight extends Parent {
|
|
15
|
+
type: "highlight";
|
|
16
|
+
}
|
|
17
|
+
interface Comment extends Literal {
|
|
18
|
+
type: "comment";
|
|
19
|
+
}
|
|
20
|
+
interface Tag extends Literal {
|
|
21
|
+
type: "tag";
|
|
22
|
+
}
|
|
23
|
+
declare module "mdast" {
|
|
24
|
+
interface ListItemData {
|
|
25
|
+
taskChar?: string;
|
|
26
|
+
}
|
|
27
|
+
interface RootContentMap {
|
|
28
|
+
wikilink: Wikilink;
|
|
29
|
+
highlight: Highlight;
|
|
30
|
+
comment: Comment;
|
|
31
|
+
tag: Tag;
|
|
32
|
+
}
|
|
33
|
+
interface PhrasingContentMap {
|
|
34
|
+
wikilink: Wikilink;
|
|
35
|
+
highlight: Highlight;
|
|
36
|
+
comment: Comment;
|
|
37
|
+
tag: Tag;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
declare module "micromark-util-types" {
|
|
41
|
+
interface TokenTypeMap {
|
|
42
|
+
wikilink: "wikilink";
|
|
43
|
+
wikilinkMarker: "wikilinkMarker";
|
|
44
|
+
wikilinkEmbedMarker: "wikilinkEmbedMarker";
|
|
45
|
+
wikilinkPath: "wikilinkPath";
|
|
46
|
+
wikilinkHeadingMarker: "wikilinkHeadingMarker";
|
|
47
|
+
wikilinkHeading: "wikilinkHeading";
|
|
48
|
+
wikilinkAliasMarker: "wikilinkAliasMarker";
|
|
49
|
+
wikilinkAlias: "wikilinkAlias";
|
|
50
|
+
highlight: "highlight";
|
|
51
|
+
highlightMarker: "highlightMarker";
|
|
52
|
+
highlightContent: "highlightContent";
|
|
53
|
+
comment: "comment";
|
|
54
|
+
commentMarker: "commentMarker";
|
|
55
|
+
commentContent: "commentContent";
|
|
56
|
+
tag: "tag";
|
|
57
|
+
tagMarker: "tagMarker";
|
|
58
|
+
tagContent: "tagContent";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
declare function wikilinkSyntax(): Extension;
|
|
63
|
+
|
|
64
|
+
declare function highlightSyntax(): Extension;
|
|
65
|
+
|
|
66
|
+
declare function commentSyntax(): Extension;
|
|
67
|
+
|
|
68
|
+
declare function tagSyntax(): Extension;
|
|
69
|
+
|
|
70
|
+
declare function wikilinkFromMarkdown(): Extension$1;
|
|
71
|
+
|
|
72
|
+
declare function highlightFromMarkdown(): Extension$1;
|
|
73
|
+
|
|
74
|
+
declare function commentFromMarkdown(): Extension$1;
|
|
75
|
+
|
|
76
|
+
declare function tagFromMarkdown(): Extension$1;
|
|
77
|
+
|
|
78
|
+
declare function wikilinkToMarkdown(): Options;
|
|
79
|
+
|
|
80
|
+
declare function highlightToMarkdown(): Options;
|
|
81
|
+
|
|
82
|
+
declare function commentToMarkdown(): Options;
|
|
83
|
+
|
|
84
|
+
declare function tagToMarkdown(): Options;
|
|
85
|
+
|
|
86
|
+
declare function customTaskCharTransform(tree: Root, source?: string): void;
|
|
87
|
+
|
|
88
|
+
interface RemarkObsidianOptions {
|
|
89
|
+
wikilinks?: boolean;
|
|
90
|
+
highlights?: boolean;
|
|
91
|
+
comments?: boolean;
|
|
92
|
+
tags?: boolean;
|
|
93
|
+
customTaskChars?: boolean;
|
|
94
|
+
math?: boolean;
|
|
95
|
+
}
|
|
96
|
+
declare function remarkObsidian(userOpts?: RemarkObsidianOptions): undefined | ((tree: Root, file: any) => void);
|
|
97
|
+
|
|
98
|
+
export { type Comment, type Highlight, type RemarkObsidianOptions, type Tag, type Wikilink, commentFromMarkdown, commentSyntax, commentToMarkdown, customTaskCharTransform, remarkObsidian as default, highlightFromMarkdown, highlightSyntax, highlightToMarkdown, tagFromMarkdown, tagSyntax, tagToMarkdown, wikilinkFromMarkdown, wikilinkSyntax, wikilinkToMarkdown };
|