wikiparser-node 1.4.3 → 1.4.4-b
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/README.en.md +1 -1
- package/README.md +1 -1
- package/bundle/bundle.min.js +36 -0
- package/config/enwiki.json +1 -814
- package/config/llwiki.json +1 -35
- package/config/moegirl.json +1 -44
- package/config/zhwiki.json +1 -466
- package/extensions/dist/base.js +64 -0
- package/extensions/dist/editor.js +159 -0
- package/extensions/dist/highlight.js +59 -0
- package/extensions/dist/lint.js +48 -0
- package/extensions/editor.css +63 -0
- package/extensions/ui.css +141 -0
- package/i18n/zh-hans.json +1 -0
- package/i18n/zh-hant.json +1 -0
- package/package.json +28 -15
- package/config/.schema.json +0 -172
- package/dist/addon/table.d.ts +0 -6
- package/dist/addon/table.js +0 -564
- package/dist/base.d.ts +0 -58
- package/dist/index.d.ts +0 -30
- package/dist/index.js +0 -211
- package/dist/internal.d.ts +0 -44
- package/dist/lib/element.d.ts +0 -155
- package/dist/lib/element.js +0 -650
- package/dist/lib/node.d.ts +0 -146
- package/dist/lib/node.js +0 -428
- package/dist/lib/range.d.ts +0 -104
- package/dist/lib/range.js +0 -385
- package/dist/lib/ranges.d.ts +0 -26
- package/dist/lib/ranges.js +0 -118
- package/dist/lib/text.d.ts +0 -62
- package/dist/lib/text.js +0 -306
- package/dist/lib/title.d.ts +0 -38
- package/dist/lib/title.js +0 -164
- package/dist/mixin/attributesParent.d.ts +0 -50
- package/dist/mixin/attributesParent.js +0 -78
- package/dist/mixin/fixed.d.ts +0 -6
- package/dist/mixin/fixed.js +0 -30
- package/dist/mixin/flagsParent.d.ts +0 -72
- package/dist/mixin/flagsParent.js +0 -59
- package/dist/mixin/hidden.d.ts +0 -5
- package/dist/mixin/hidden.js +0 -24
- package/dist/mixin/magicLinkParent.d.ts +0 -40
- package/dist/mixin/magicLinkParent.js +0 -42
- package/dist/mixin/singleLine.d.ts +0 -6
- package/dist/mixin/singleLine.js +0 -26
- package/dist/mixin/sol.d.ts +0 -6
- package/dist/mixin/sol.js +0 -43
- package/dist/mixin/syntax.d.ts +0 -9
- package/dist/mixin/syntax.js +0 -50
- package/dist/parser/braces.js +0 -131
- package/dist/parser/commentAndExt.js +0 -90
- package/dist/parser/converter.js +0 -41
- package/dist/parser/externalLinks.js +0 -32
- package/dist/parser/hrAndDoubleUnderscore.js +0 -41
- package/dist/parser/html.js +0 -39
- package/dist/parser/links.js +0 -95
- package/dist/parser/list.js +0 -68
- package/dist/parser/magicLinks.js +0 -43
- package/dist/parser/quotes.js +0 -68
- package/dist/parser/selector.js +0 -162
- package/dist/parser/table.js +0 -124
- package/dist/src/arg.d.ts +0 -58
- package/dist/src/arg.js +0 -196
- package/dist/src/atom.d.ts +0 -12
- package/dist/src/atom.js +0 -27
- package/dist/src/attribute.d.ts +0 -69
- package/dist/src/attribute.js +0 -475
- package/dist/src/attributes.d.ts +0 -109
- package/dist/src/attributes.js +0 -346
- package/dist/src/converter.d.ts +0 -33
- package/dist/src/converter.js +0 -134
- package/dist/src/converterFlags.d.ts +0 -87
- package/dist/src/converterFlags.js +0 -226
- package/dist/src/converterRule.d.ts +0 -77
- package/dist/src/converterRule.js +0 -209
- package/dist/src/extLink.d.ts +0 -43
- package/dist/src/extLink.js +0 -186
- package/dist/src/gallery.d.ts +0 -54
- package/dist/src/gallery.js +0 -126
- package/dist/src/heading.d.ts +0 -47
- package/dist/src/heading.js +0 -190
- package/dist/src/hidden.d.ts +0 -7
- package/dist/src/hidden.js +0 -23
- package/dist/src/html.d.ts +0 -65
- package/dist/src/html.js +0 -335
- package/dist/src/imageParameter.d.ts +0 -65
- package/dist/src/imageParameter.js +0 -248
- package/dist/src/imagemap.d.ts +0 -56
- package/dist/src/imagemap.js +0 -150
- package/dist/src/imagemapLink.d.ts +0 -31
- package/dist/src/imagemapLink.js +0 -93
- package/dist/src/index.d.ts +0 -143
- package/dist/src/index.js +0 -803
- package/dist/src/link/base.d.ts +0 -52
- package/dist/src/link/base.js +0 -209
- package/dist/src/link/category.d.ts +0 -13
- package/dist/src/link/category.js +0 -28
- package/dist/src/link/file.d.ts +0 -96
- package/dist/src/link/file.js +0 -265
- package/dist/src/link/galleryImage.d.ts +0 -32
- package/dist/src/link/galleryImage.js +0 -157
- package/dist/src/link/index.d.ts +0 -56
- package/dist/src/link/index.js +0 -133
- package/dist/src/magicLink.d.ts +0 -59
- package/dist/src/magicLink.js +0 -199
- package/dist/src/nested.d.ts +0 -43
- package/dist/src/nested.js +0 -92
- package/dist/src/nowiki/base.d.ts +0 -31
- package/dist/src/nowiki/base.js +0 -93
- package/dist/src/nowiki/comment.d.ts +0 -25
- package/dist/src/nowiki/comment.js +0 -68
- package/dist/src/nowiki/dd.d.ts +0 -8
- package/dist/src/nowiki/dd.js +0 -24
- package/dist/src/nowiki/doubleUnderscore.d.ts +0 -18
- package/dist/src/nowiki/doubleUnderscore.js +0 -101
- package/dist/src/nowiki/hr.d.ts +0 -5
- package/dist/src/nowiki/hr.js +0 -63
- package/dist/src/nowiki/index.d.ts +0 -16
- package/dist/src/nowiki/index.js +0 -21
- package/dist/src/nowiki/list.d.ts +0 -16
- package/dist/src/nowiki/list.js +0 -97
- package/dist/src/nowiki/listBase.d.ts +0 -5
- package/dist/src/nowiki/listBase.js +0 -61
- package/dist/src/nowiki/noinclude.d.ts +0 -10
- package/dist/src/nowiki/noinclude.js +0 -23
- package/dist/src/nowiki/quote.d.ts +0 -14
- package/dist/src/nowiki/quote.js +0 -116
- package/dist/src/onlyinclude.d.ts +0 -16
- package/dist/src/onlyinclude.js +0 -57
- package/dist/src/paramTag/index.d.ts +0 -37
- package/dist/src/paramTag/index.js +0 -69
- package/dist/src/paramTag/inputbox.d.ts +0 -8
- package/dist/src/paramTag/inputbox.js +0 -22
- package/dist/src/parameter.d.ts +0 -70
- package/dist/src/parameter.js +0 -262
- package/dist/src/pre.d.ts +0 -28
- package/dist/src/pre.js +0 -55
- package/dist/src/syntax.d.ts +0 -20
- package/dist/src/syntax.js +0 -86
- package/dist/src/table/base.d.ts +0 -30
- package/dist/src/table/base.js +0 -132
- package/dist/src/table/index.d.ts +0 -233
- package/dist/src/table/index.js +0 -386
- package/dist/src/table/td.d.ts +0 -92
- package/dist/src/table/td.js +0 -337
- package/dist/src/table/tr.d.ts +0 -32
- package/dist/src/table/tr.js +0 -58
- package/dist/src/table/trBase.d.ts +0 -53
- package/dist/src/table/trBase.js +0 -154
- package/dist/src/tagPair/ext.d.ts +0 -32
- package/dist/src/tagPair/ext.js +0 -203
- package/dist/src/tagPair/include.d.ts +0 -35
- package/dist/src/tagPair/include.js +0 -63
- package/dist/src/tagPair/index.d.ts +0 -27
- package/dist/src/tagPair/index.js +0 -128
- package/dist/src/transclude.d.ts +0 -167
- package/dist/src/transclude.js +0 -710
- package/dist/util/constants.js +0 -113
- package/dist/util/debug.js +0 -88
- package/dist/util/diff.js +0 -82
- package/dist/util/lint.js +0 -30
- package/dist/util/string.js +0 -53
- package/errors/README +0 -1
- package/printed/README +0 -1
package/dist/src/index.d.ts
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { BuildMethod } from '../util/constants';
|
|
2
|
-
import { AstRange } from '../lib/range';
|
|
3
|
-
import Parser from '../index';
|
|
4
|
-
import { AstElement } from '../lib/element';
|
|
5
|
-
import { AstText } from '../lib/text';
|
|
6
|
-
import type { LintError } from '../base';
|
|
7
|
-
import type { Range } from '../lib/ranges';
|
|
8
|
-
import type { Title } from '../lib/title';
|
|
9
|
-
import type { AstNodes, IncludeToken, HtmlToken, ExtToken, TranscludeToken, CommentToken, FileToken, LinkToken, ExtLinkToken, MagicLinkToken, ImageParameterToken, ImagemapLinkToken } from '../internal';
|
|
10
|
-
import type { CaretPosition } from '../lib/node';
|
|
11
|
-
import type { TokenTypes } from '../util/constants';
|
|
12
|
-
declare type TagToken = IncludeToken | ExtToken | HtmlToken;
|
|
13
|
-
/**
|
|
14
|
-
* 所有节点的基类
|
|
15
|
-
* @classdesc `{childNodes: ...(AstText|Token)}`
|
|
16
|
-
*/
|
|
17
|
-
export declare class Token extends AstElement {
|
|
18
|
-
#private;
|
|
19
|
-
type: TokenTypes;
|
|
20
|
-
/** 所有图片,包括图库 */
|
|
21
|
-
get images(): FileToken[];
|
|
22
|
-
/** 所有内链、外链和自由外链 */
|
|
23
|
-
get links(): (LinkToken | ExtLinkToken | MagicLinkToken | ImageParameterToken | ImagemapLinkToken)[];
|
|
24
|
-
/** 所有模板和模块 */
|
|
25
|
-
get embeds(): TranscludeToken[];
|
|
26
|
-
/** @class */
|
|
27
|
-
constructor(wikitext?: string, config?: Parser.Config, accum?: Token[], acceptable?: Acceptable);
|
|
28
|
-
/**
|
|
29
|
-
* @override
|
|
30
|
-
* @param child 待插入的子节点
|
|
31
|
-
* @param i 插入位置
|
|
32
|
-
*/
|
|
33
|
-
insertAt(child: string, i?: number): AstText;
|
|
34
|
-
insertAt<T extends AstNodes>(child: T, i?: number): T;
|
|
35
|
-
/**
|
|
36
|
-
* 规范化页面标题
|
|
37
|
-
* @param title 标题(含或不含命名空间前缀)
|
|
38
|
-
* @param defaultNs 命名空间
|
|
39
|
-
* @param halfParsed 仅供内部使用
|
|
40
|
-
* @param decode 是否需要解码
|
|
41
|
-
* @param selfLink 是否允许selfLink
|
|
42
|
-
*/
|
|
43
|
-
normalizeTitle(title: string, defaultNs?: number, halfParsed?: boolean, decode?: boolean, selfLink?: boolean): Title;
|
|
44
|
-
/** @override */
|
|
45
|
-
lint(start?: number): LintError[];
|
|
46
|
-
/**
|
|
47
|
-
* @override
|
|
48
|
-
* @param i 移除位置
|
|
49
|
-
*/
|
|
50
|
-
removeAt(i: number): AstNodes;
|
|
51
|
-
/**
|
|
52
|
-
* 替换为同类节点
|
|
53
|
-
* @param token 待替换的节点
|
|
54
|
-
* @throws `Error` 不存在父节点
|
|
55
|
-
*/
|
|
56
|
-
safeReplaceWith(token: this): void;
|
|
57
|
-
/**
|
|
58
|
-
* 创建HTML注释
|
|
59
|
-
* @param data 注释内容
|
|
60
|
-
*/
|
|
61
|
-
createComment(data?: string): CommentToken;
|
|
62
|
-
/**
|
|
63
|
-
* 创建标签
|
|
64
|
-
* @param tagName 标签名
|
|
65
|
-
* @param options 选项
|
|
66
|
-
* @param options.selfClosing 是否自封闭
|
|
67
|
-
* @param options.closing 是否是闭合标签
|
|
68
|
-
* @throws `RangeError` 非法的标签名
|
|
69
|
-
*/
|
|
70
|
-
createElement(tagName: string, { selfClosing, closing }?: {
|
|
71
|
-
selfClosing?: boolean;
|
|
72
|
-
closing?: boolean;
|
|
73
|
-
}): TagToken;
|
|
74
|
-
/**
|
|
75
|
-
* 创建纯文本节点
|
|
76
|
-
* @param data 文本内容
|
|
77
|
-
*/
|
|
78
|
-
createTextNode(data?: string): AstText;
|
|
79
|
-
/** 创建AstRange对象 */
|
|
80
|
-
createRange(): AstRange;
|
|
81
|
-
/**
|
|
82
|
-
* 找到给定位置
|
|
83
|
-
* @param index 位置
|
|
84
|
-
*/
|
|
85
|
-
caretPositionFromIndex(index?: number): CaretPosition | undefined;
|
|
86
|
-
/**
|
|
87
|
-
* 找到给定位置
|
|
88
|
-
* @param x 列数
|
|
89
|
-
* @param y 行数
|
|
90
|
-
*/
|
|
91
|
-
caretPositionFromPoint(x: number, y: number): CaretPosition | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* 找到给定位置所在的最外层节点
|
|
94
|
-
* @param index 位置
|
|
95
|
-
*/
|
|
96
|
-
elementFromIndex(index?: number): AstNodes | undefined;
|
|
97
|
-
/**
|
|
98
|
-
* 找到给定位置所在的最外层节点
|
|
99
|
-
* @param x 列数
|
|
100
|
-
* @param y 行数
|
|
101
|
-
*/
|
|
102
|
-
elementFromPoint(x: number, y: number): AstNodes | undefined;
|
|
103
|
-
/**
|
|
104
|
-
* 找到给定位置所在的所有节点
|
|
105
|
-
* @param index 位置
|
|
106
|
-
*/
|
|
107
|
-
elementsFromIndex(index?: number): AstNodes[];
|
|
108
|
-
/**
|
|
109
|
-
* 找到给定位置所在的所有节点
|
|
110
|
-
* @param x 列数
|
|
111
|
-
* @param y 行数
|
|
112
|
-
*/
|
|
113
|
-
elementsFromPoint(x: number, y: number): AstNodes[];
|
|
114
|
-
/**
|
|
115
|
-
* 判断标题是否是跨维基链接
|
|
116
|
-
* @param title 标题
|
|
117
|
-
*/
|
|
118
|
-
isInterwiki(title: string): RegExpExecArray | null;
|
|
119
|
-
/** 深拷贝节点 */
|
|
120
|
-
cloneNode(): this;
|
|
121
|
-
/** 获取全部章节 */
|
|
122
|
-
sections(): (AstText | Token)[][] | undefined;
|
|
123
|
-
/**
|
|
124
|
-
* 获取指定章节
|
|
125
|
-
* @param n 章节序号
|
|
126
|
-
*/
|
|
127
|
-
section(n: number): (AstText | Token)[] | undefined;
|
|
128
|
-
/**
|
|
129
|
-
* 获取指定的外层HTML标签
|
|
130
|
-
* @param tag HTML标签名
|
|
131
|
-
* @throws `RangeError` 非法的标签或空标签
|
|
132
|
-
*/
|
|
133
|
-
findEnclosingHtml(tag?: string): AstRange | undefined;
|
|
134
|
-
/** 获取全部分类 */
|
|
135
|
-
getCategories(): [string, string | undefined][];
|
|
136
|
-
/** 重新解析单引号 */
|
|
137
|
-
redoQuotes(): void;
|
|
138
|
-
/** 解析部分魔术字 */
|
|
139
|
-
solveConst(): void;
|
|
140
|
-
/** 合并普通节点的普通子节点 */
|
|
141
|
-
flatten(): void;
|
|
142
|
-
}
|
|
143
|
-
export {};
|