@yozora/tokenizer-admonition 2.0.2-alpha.0 → 2.0.3
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 +1 -1
- package/README.md +45 -45
- package/lib/types/index.d.ts +40 -5
- package/package.json +9 -9
- package/lib/types/match.d.ts +0 -11
- package/lib/types/parse.d.ts +0 -3
- package/lib/types/tokenizer.d.ts +0 -13
- package/lib/types/types.d.ts +0 -14
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2020-
|
|
3
|
+
Copyright (c) 2020-2022 guanghechen (me.guanghechen@gmail.com)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<header>
|
|
4
4
|
<h1 align="center">
|
|
5
|
-
<a href="https://github.com/yozorajs/yozora/tree/
|
|
5
|
+
<a href="https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/admonition#readme">@yozora/tokenizer-admonition</a>
|
|
6
6
|
</h1>
|
|
7
7
|
<div align="center">
|
|
8
8
|
<a href="https://www.npmjs.com/package/@yozora/tokenizer-admonition">
|
|
@@ -244,53 +244,53 @@ export interface Admonition extends Parent<'admonition'> {
|
|
|
244
244
|
|
|
245
245
|
[live-examples]: https://yozora.guanghechen.com/docs/package/tokenizer-admonition#live-examples
|
|
246
246
|
[docpage]: https://yozora.guanghechen.com/docs/package/tokenizer-admonition
|
|
247
|
-
[homepage]: https://github.com/yozorajs/yozora/tree/
|
|
247
|
+
[homepage]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/admonition#readme
|
|
248
248
|
[gfm-spec]: https://github.github.com/gfm
|
|
249
249
|
[mdast-homepage]: https://github.com/syntax-tree/mdast
|
|
250
250
|
|
|
251
|
-
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/
|
|
252
|
-
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/
|
|
253
|
-
[@yozora/character]: https://github.com/yozorajs/yozora/tree/
|
|
254
|
-
[@yozora/eslint-config]: https://github.com/yozorajs/yozora/tree/
|
|
255
|
-
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/
|
|
256
|
-
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
257
|
-
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/
|
|
258
|
-
[@yozora/jest-for-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
259
|
-
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/
|
|
260
|
-
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/
|
|
261
|
-
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/
|
|
262
|
-
[@yozora/template-tokenizer]: https://github.com/yozorajs/yozora/tree/
|
|
263
|
-
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/
|
|
264
|
-
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/
|
|
265
|
-
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/
|
|
266
|
-
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/
|
|
267
|
-
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/
|
|
268
|
-
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/
|
|
269
|
-
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/
|
|
270
|
-
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/
|
|
271
|
-
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/
|
|
272
|
-
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/
|
|
273
|
-
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/
|
|
274
|
-
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/
|
|
275
|
-
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/
|
|
276
|
-
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/
|
|
277
|
-
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/
|
|
278
|
-
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/
|
|
279
|
-
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/
|
|
280
|
-
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/
|
|
281
|
-
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/
|
|
282
|
-
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/
|
|
283
|
-
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/
|
|
284
|
-
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/
|
|
285
|
-
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/
|
|
286
|
-
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/
|
|
287
|
-
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/
|
|
288
|
-
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/
|
|
289
|
-
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/
|
|
290
|
-
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/
|
|
291
|
-
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/
|
|
292
|
-
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/
|
|
293
|
-
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/
|
|
251
|
+
[@yozora/ast]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/ast#readme
|
|
252
|
+
[@yozora/ast-util]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/ast-util#readme
|
|
253
|
+
[@yozora/character]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/character#readme
|
|
254
|
+
[@yozora/eslint-config]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/eslint-config#readme
|
|
255
|
+
[@yozora/core-parser]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/core-parser#readme
|
|
256
|
+
[@yozora/core-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/core-tokenizer#readme
|
|
257
|
+
[@yozora/invariant]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/invariant#readme
|
|
258
|
+
[@yozora/jest-for-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/jest-for-tokenizer#readme
|
|
259
|
+
[@yozora/parser]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser#readme
|
|
260
|
+
[@yozora/parser-gfm]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser-gfm#readme
|
|
261
|
+
[@yozora/parser-gfm-ex]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/parser-gfm-ex#readme
|
|
262
|
+
[@yozora/template-tokenizer]: https://github.com/yozorajs/yozora/tree/release-2.x.x/packages/template-tokenizer#readme
|
|
263
|
+
[@yozora/tokenizer-admonition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/admonition#readme
|
|
264
|
+
[@yozora/tokenizer-autolink]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/autolink#readme
|
|
265
|
+
[@yozora/tokenizer-autolink-extension]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/autolink-extension#readme
|
|
266
|
+
[@yozora/tokenizer-blockquote]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/blockquote#readme
|
|
267
|
+
[@yozora/tokenizer-break]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/break#readme
|
|
268
|
+
[@yozora/tokenizer-definition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/definition#readme
|
|
269
|
+
[@yozora/tokenizer-delete]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/delete#readme
|
|
270
|
+
[@yozora/tokenizer-ecma-import]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/ecma-import#readme
|
|
271
|
+
[@yozora/tokenizer-emphasis]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/emphasis#readme
|
|
272
|
+
[@yozora/tokenizer-fenced-block]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/fenced-block#readme
|
|
273
|
+
[@yozora/tokenizer-fenced-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/fenced-code#readme
|
|
274
|
+
[@yozora/tokenizer-footnote]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote#readme
|
|
275
|
+
[@yozora/tokenizer-footnote-definition]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote-definition#readme
|
|
276
|
+
[@yozora/tokenizer-footnote-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/footnote-reference#readme
|
|
277
|
+
[@yozora/tokenizer-heading]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/heading#readme
|
|
278
|
+
[@yozora/tokenizer-html-block]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/html-block#readme
|
|
279
|
+
[@yozora/tokenizer-html-inline]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/html-inline#readme
|
|
280
|
+
[@yozora/tokenizer-image]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/image#readme
|
|
281
|
+
[@yozora/tokenizer-image-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/image-reference#readme
|
|
282
|
+
[@yozora/tokenizer-indented-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/indented-code#readme
|
|
283
|
+
[@yozora/tokenizer-inline-code]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-code#readme
|
|
284
|
+
[@yozora/tokenizer-inline-math]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/inline-math#readme
|
|
285
|
+
[@yozora/tokenizer-link]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/link#readme
|
|
286
|
+
[@yozora/tokenizer-link-reference]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/link-reference#readme
|
|
287
|
+
[@yozora/tokenizer-list]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/list#readme
|
|
288
|
+
[@yozora/tokenizer-math]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/math#readme
|
|
289
|
+
[@yozora/tokenizer-paragraph]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/paragraph#readme
|
|
290
|
+
[@yozora/tokenizer-setext-heading]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/setext-heading#readme
|
|
291
|
+
[@yozora/tokenizer-table]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/table#readme
|
|
292
|
+
[@yozora/tokenizer-text]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/text#readme
|
|
293
|
+
[@yozora/tokenizer-thematic-break]: https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/thematic-break#readme
|
|
294
294
|
|
|
295
295
|
[@yozora/react-admonition]: https://github.com/yozorajs/yozora-react/tree/main/packages/admonition#readme
|
|
296
296
|
[@yozora/react-blockquote]: https://github.com/yozorajs/yozora-react/tree/main/packages/blockquote#readme
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { IYastBlockToken, IBaseBlockTokenizerProps, IMatchBlockHookCreator, IParseBlockHookCreator, IBlockTokenizer } from '@yozora/core-tokenizer';
|
|
2
|
+
import { AdmonitionType, Admonition } from '@yozora/ast';
|
|
3
|
+
import FencedBlockTokenizer, { IFencedBlockToken, IFencedBlockHookContext } from '@yozora/tokenizer-fenced-block';
|
|
4
|
+
|
|
5
|
+
declare type T = AdmonitionType;
|
|
6
|
+
declare type INode = Admonition;
|
|
7
|
+
declare const uniqueName = "@yozora/tokenizer-admonition";
|
|
8
|
+
interface IToken extends IFencedBlockToken<T> {
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
children?: IYastBlockToken[];
|
|
13
|
+
}
|
|
14
|
+
declare type IThis = IFencedBlockHookContext<T>;
|
|
15
|
+
declare type ITokenizerProps = Partial<IBaseBlockTokenizerProps>;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A code fence is a sequence of at least three consecutive backtick characters
|
|
19
|
+
* (`) or tildes (~). (Tildes and backticks cannot be mixed.) A fenced code
|
|
20
|
+
* block begins with a code fence, indented no more than three spaces.
|
|
21
|
+
*
|
|
22
|
+
* @see https://github.com/syntax-tree/mdast#code
|
|
23
|
+
* @see https://github.github.com/gfm/#code-fence
|
|
24
|
+
*/
|
|
25
|
+
declare const match: IMatchBlockHookCreator<T, IToken, IThis>;
|
|
26
|
+
|
|
27
|
+
declare const parse: IParseBlockHookCreator<T, IToken, INode, IThis>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Lexical Analyzer for Admonition.
|
|
31
|
+
* @see https://github.com/syntax-tree/mdast#code
|
|
32
|
+
* @see https://github.github.com/gfm/#code-fence
|
|
33
|
+
*/
|
|
34
|
+
declare class AdmonitionTokenizer extends FencedBlockTokenizer<T, INode, IThis> implements IBlockTokenizer<T, IToken, INode, IThis> {
|
|
35
|
+
constructor(props?: ITokenizerProps);
|
|
36
|
+
readonly match: IMatchBlockHookCreator<T, IToken, IThis>;
|
|
37
|
+
readonly parse: IParseBlockHookCreator<T, IToken, INode, IThis>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export { AdmonitionTokenizer, uniqueName as AdmonitionTokenizerName, IThis as IAdmonitionHookContext, IToken as IAdmonitionToken, ITokenizerProps as IAdmonitionTokenizerProps, match as admonitionMatch, parse as admonitionParse, AdmonitionTokenizer as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yozora/tokenizer-admonition",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Tokenizer for processing admonitions",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "guanghechen",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://github.com/yozorajs/yozora.git",
|
|
12
12
|
"directory": "tokenizers/admonition"
|
|
13
13
|
},
|
|
14
|
-
"homepage": "https://
|
|
14
|
+
"homepage": "https://github.com/yozorajs/yozora/tree/release-2.x.x/tokenizers/admonition",
|
|
15
15
|
"keywords": [
|
|
16
16
|
"yozora",
|
|
17
17
|
"markdown",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"source": "src/index.ts",
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": ">= 16.0.0"
|
|
28
28
|
},
|
|
29
29
|
"files": [
|
|
30
30
|
"lib/",
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
],
|
|
38
38
|
"scripts": {
|
|
39
39
|
"build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.js",
|
|
40
|
-
"prebuild": "rimraf lib/
|
|
40
|
+
"prebuild": "rimraf lib/",
|
|
41
41
|
"prepublishOnly": "cross-env ROLLUP_SHOULD_SOURCEMAP=false yarn build",
|
|
42
42
|
"test": "cross-env TS_NODE_FILES=true jest --config ../../jest.config.js --rootDir ."
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@yozora/ast": "^2.0.
|
|
46
|
-
"@yozora/character": "^2.0.
|
|
47
|
-
"@yozora/core-tokenizer": "^2.0.
|
|
48
|
-
"@yozora/tokenizer-fenced-block": "^2.0.
|
|
45
|
+
"@yozora/ast": "^2.0.3",
|
|
46
|
+
"@yozora/character": "^2.0.3",
|
|
47
|
+
"@yozora/core-tokenizer": "^2.0.3",
|
|
48
|
+
"@yozora/tokenizer-fenced-block": "^2.0.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "8cc8f95cfebc8d752bc3272cdd24965f540c130b"
|
|
51
51
|
}
|
package/lib/types/match.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { IMatchBlockHookCreator } from '@yozora/core-tokenizer';
|
|
2
|
-
import type { IThis, IToken, T } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* A code fence is a sequence of at least three consecutive backtick characters
|
|
5
|
-
* (`) or tildes (~). (Tildes and backticks cannot be mixed.) A fenced code
|
|
6
|
-
* block begins with a code fence, indented no more than three spaces.
|
|
7
|
-
*
|
|
8
|
-
* @see https://github.com/syntax-tree/mdast#code
|
|
9
|
-
* @see https://github.github.com/gfm/#code-fence
|
|
10
|
-
*/
|
|
11
|
-
export declare const match: IMatchBlockHookCreator<T, IToken, IThis>;
|
package/lib/types/parse.d.ts
DELETED
package/lib/types/tokenizer.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { IBlockTokenizer, IMatchBlockHookCreator, IParseBlockHookCreator } from '@yozora/core-tokenizer';
|
|
2
|
-
import FencedBlockTokenizer from '@yozora/tokenizer-fenced-block';
|
|
3
|
-
import type { INode, IThis, IToken, ITokenizerProps, T } from './types';
|
|
4
|
-
/**
|
|
5
|
-
* Lexical Analyzer for Admonition.
|
|
6
|
-
* @see https://github.com/syntax-tree/mdast#code
|
|
7
|
-
* @see https://github.github.com/gfm/#code-fence
|
|
8
|
-
*/
|
|
9
|
-
export declare class AdmonitionTokenizer extends FencedBlockTokenizer<T, INode, IThis> implements IBlockTokenizer<T, IToken, INode, IThis> {
|
|
10
|
-
constructor(props?: ITokenizerProps);
|
|
11
|
-
readonly match: IMatchBlockHookCreator<T, IToken, IThis>;
|
|
12
|
-
readonly parse: IParseBlockHookCreator<T, IToken, INode, IThis>;
|
|
13
|
-
}
|
package/lib/types/types.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Admonition, AdmonitionType } from '@yozora/ast';
|
|
2
|
-
import type { IBaseBlockTokenizerProps, IYastBlockToken } from '@yozora/core-tokenizer';
|
|
3
|
-
import type { IFencedBlockHookContext, IFencedBlockToken } from '@yozora/tokenizer-fenced-block';
|
|
4
|
-
export declare type T = AdmonitionType;
|
|
5
|
-
export declare type INode = Admonition;
|
|
6
|
-
export declare const uniqueName = "@yozora/tokenizer-admonition";
|
|
7
|
-
export interface IToken extends IFencedBlockToken<T> {
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
children?: IYastBlockToken[];
|
|
12
|
-
}
|
|
13
|
-
export declare type IThis = IFencedBlockHookContext<T>;
|
|
14
|
-
export declare type ITokenizerProps = Partial<IBaseBlockTokenizerProps>;
|