wikiparser-node 1.9.3 → 1.10.0-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.
Files changed (171) hide show
  1. package/bundle/bundle.min.js +38 -0
  2. package/config/enwiki.json +3 -815
  3. package/config/llwiki.json +3 -36
  4. package/config/moegirl.json +3 -45
  5. package/config/zhwiki.json +3 -467
  6. package/extensions/dist/base.js +64 -0
  7. package/extensions/dist/editor.js +159 -0
  8. package/extensions/dist/highlight.js +58 -0
  9. package/extensions/dist/lint.js +72 -0
  10. package/extensions/editor.css +64 -0
  11. package/extensions/ui.css +144 -0
  12. package/package.json +32 -22
  13. package/config/.schema.json +0 -181
  14. package/dist/addon/table.js +0 -486
  15. package/dist/addon/token.js +0 -240
  16. package/dist/addon/transclude.js +0 -185
  17. package/dist/base.d.ts +0 -79
  18. package/dist/base.js +0 -39
  19. package/dist/index.d.ts +0 -31
  20. package/dist/index.js +0 -231
  21. package/dist/internal.d.ts +0 -46
  22. package/dist/lib/element.d.ts +0 -125
  23. package/dist/lib/element.js +0 -374
  24. package/dist/lib/node.d.ts +0 -168
  25. package/dist/lib/node.js +0 -472
  26. package/dist/lib/range.d.ts +0 -105
  27. package/dist/lib/range.js +0 -406
  28. package/dist/lib/ranges.d.ts +0 -28
  29. package/dist/lib/ranges.js +0 -126
  30. package/dist/lib/rect.d.ts +0 -18
  31. package/dist/lib/rect.js +0 -34
  32. package/dist/lib/text.d.ts +0 -55
  33. package/dist/lib/text.js +0 -351
  34. package/dist/lib/title.d.ts +0 -40
  35. package/dist/lib/title.js +0 -197
  36. package/dist/mixin/attributesParent.d.ts +0 -49
  37. package/dist/mixin/attributesParent.js +0 -82
  38. package/dist/mixin/fixed.d.ts +0 -5
  39. package/dist/mixin/fixed.js +0 -32
  40. package/dist/mixin/flagsParent.d.ts +0 -41
  41. package/dist/mixin/flagsParent.js +0 -60
  42. package/dist/mixin/hidden.d.ts +0 -6
  43. package/dist/mixin/hidden.js +0 -34
  44. package/dist/mixin/magicLinkParent.d.ts +0 -19
  45. package/dist/mixin/magicLinkParent.js +0 -43
  46. package/dist/mixin/singleLine.d.ts +0 -5
  47. package/dist/mixin/singleLine.js +0 -27
  48. package/dist/mixin/sol.d.ts +0 -5
  49. package/dist/mixin/sol.js +0 -44
  50. package/dist/mixin/syntax.d.ts +0 -8
  51. package/dist/mixin/syntax.js +0 -48
  52. package/dist/parser/braces.js +0 -150
  53. package/dist/parser/commentAndExt.js +0 -79
  54. package/dist/parser/converter.js +0 -39
  55. package/dist/parser/externalLinks.js +0 -37
  56. package/dist/parser/hrAndDoubleUnderscore.js +0 -42
  57. package/dist/parser/html.js +0 -38
  58. package/dist/parser/links.js +0 -101
  59. package/dist/parser/list.js +0 -97
  60. package/dist/parser/magicLinks.js +0 -53
  61. package/dist/parser/quotes.js +0 -67
  62. package/dist/parser/redirect.js +0 -26
  63. package/dist/parser/selector.js +0 -393
  64. package/dist/parser/table.js +0 -123
  65. package/dist/src/arg.d.ts +0 -51
  66. package/dist/src/arg.js +0 -214
  67. package/dist/src/atom.d.ts +0 -14
  68. package/dist/src/atom.js +0 -52
  69. package/dist/src/attribute.d.ts +0 -64
  70. package/dist/src/attribute.js +0 -486
  71. package/dist/src/attributes.d.ts +0 -102
  72. package/dist/src/attributes.js +0 -355
  73. package/dist/src/converter.d.ts +0 -28
  74. package/dist/src/converter.js +0 -137
  75. package/dist/src/converterFlags.d.ts +0 -80
  76. package/dist/src/converterFlags.js +0 -242
  77. package/dist/src/converterRule.d.ts +0 -71
  78. package/dist/src/converterRule.js +0 -212
  79. package/dist/src/extLink.d.ts +0 -36
  80. package/dist/src/extLink.js +0 -194
  81. package/dist/src/gallery.d.ts +0 -47
  82. package/dist/src/gallery.js +0 -142
  83. package/dist/src/heading.d.ts +0 -40
  84. package/dist/src/heading.js +0 -186
  85. package/dist/src/hidden.d.ts +0 -9
  86. package/dist/src/hidden.js +0 -80
  87. package/dist/src/html.d.ts +0 -57
  88. package/dist/src/html.js +0 -335
  89. package/dist/src/imageParameter.d.ts +0 -58
  90. package/dist/src/imageParameter.js +0 -247
  91. package/dist/src/imagemap.d.ts +0 -47
  92. package/dist/src/imagemap.js +0 -146
  93. package/dist/src/imagemapLink.d.ts +0 -31
  94. package/dist/src/imagemapLink.js +0 -97
  95. package/dist/src/index.d.ts +0 -131
  96. package/dist/src/index.js +0 -746
  97. package/dist/src/link/base.d.ts +0 -45
  98. package/dist/src/link/base.js +0 -226
  99. package/dist/src/link/category.d.ts +0 -22
  100. package/dist/src/link/category.js +0 -34
  101. package/dist/src/link/file.d.ts +0 -96
  102. package/dist/src/link/file.js +0 -276
  103. package/dist/src/link/galleryImage.d.ts +0 -29
  104. package/dist/src/link/galleryImage.js +0 -132
  105. package/dist/src/link/index.d.ts +0 -51
  106. package/dist/src/link/index.js +0 -136
  107. package/dist/src/link/redirectTarget.d.ts +0 -36
  108. package/dist/src/link/redirectTarget.js +0 -98
  109. package/dist/src/magicLink.d.ts +0 -60
  110. package/dist/src/magicLink.js +0 -273
  111. package/dist/src/nested.d.ts +0 -40
  112. package/dist/src/nested.js +0 -106
  113. package/dist/src/nowiki/base.d.ts +0 -30
  114. package/dist/src/nowiki/base.js +0 -89
  115. package/dist/src/nowiki/comment.d.ts +0 -14
  116. package/dist/src/nowiki/comment.js +0 -124
  117. package/dist/src/nowiki/dd.d.ts +0 -8
  118. package/dist/src/nowiki/dd.js +0 -26
  119. package/dist/src/nowiki/doubleUnderscore.d.ts +0 -15
  120. package/dist/src/nowiki/doubleUnderscore.js +0 -97
  121. package/dist/src/nowiki/hr.d.ts +0 -5
  122. package/dist/src/nowiki/hr.js +0 -65
  123. package/dist/src/nowiki/index.d.ts +0 -14
  124. package/dist/src/nowiki/index.js +0 -31
  125. package/dist/src/nowiki/list.d.ts +0 -16
  126. package/dist/src/nowiki/list.js +0 -111
  127. package/dist/src/nowiki/listBase.d.ts +0 -5
  128. package/dist/src/nowiki/listBase.js +0 -61
  129. package/dist/src/nowiki/noinclude.d.ts +0 -6
  130. package/dist/src/nowiki/noinclude.js +0 -71
  131. package/dist/src/nowiki/quote.d.ts +0 -14
  132. package/dist/src/nowiki/quote.js +0 -130
  133. package/dist/src/onlyinclude.d.ts +0 -13
  134. package/dist/src/onlyinclude.js +0 -58
  135. package/dist/src/paramTag/index.d.ts +0 -30
  136. package/dist/src/paramTag/index.js +0 -78
  137. package/dist/src/paramTag/inputbox.d.ts +0 -8
  138. package/dist/src/paramTag/inputbox.js +0 -22
  139. package/dist/src/parameter.d.ts +0 -60
  140. package/dist/src/parameter.js +0 -261
  141. package/dist/src/pre.d.ts +0 -28
  142. package/dist/src/pre.js +0 -60
  143. package/dist/src/redirect.d.ts +0 -30
  144. package/dist/src/redirect.js +0 -122
  145. package/dist/src/syntax.d.ts +0 -17
  146. package/dist/src/syntax.js +0 -87
  147. package/dist/src/table/base.d.ts +0 -28
  148. package/dist/src/table/base.js +0 -81
  149. package/dist/src/table/index.d.ts +0 -230
  150. package/dist/src/table/index.js +0 -495
  151. package/dist/src/table/td.d.ts +0 -72
  152. package/dist/src/table/td.js +0 -364
  153. package/dist/src/table/tr.d.ts +0 -30
  154. package/dist/src/table/tr.js +0 -59
  155. package/dist/src/table/trBase.d.ts +0 -49
  156. package/dist/src/table/trBase.js +0 -156
  157. package/dist/src/tagPair/ext.d.ts +0 -29
  158. package/dist/src/tagPair/ext.js +0 -204
  159. package/dist/src/tagPair/include.d.ts +0 -33
  160. package/dist/src/tagPair/include.js +0 -126
  161. package/dist/src/tagPair/index.d.ts +0 -23
  162. package/dist/src/tagPair/index.js +0 -128
  163. package/dist/src/transclude.d.ts +0 -159
  164. package/dist/src/transclude.js +0 -582
  165. package/dist/util/constants.js +0 -25
  166. package/dist/util/debug.js +0 -95
  167. package/dist/util/diff.js +0 -83
  168. package/dist/util/lint.js +0 -32
  169. package/dist/util/string.js +0 -60
  170. package/errors/README +0 -1
  171. package/printed/README +0 -1
@@ -1,45 +0,0 @@
1
- import Parser from '../../index';
2
- import { Token } from '../index';
3
- import { AtomToken } from '../atom';
4
- import type { LintError } from '../../base';
5
- import type { Title } from '../../lib/title';
6
- /**
7
- * 内链
8
- * @classdesc `{childNodes: [AtomToken, ...Token]}`
9
- */
10
- export declare abstract class LinkBaseToken extends Token {
11
- #private;
12
- readonly name: string;
13
- abstract get type(): 'link' | 'category' | 'file' | 'gallery-image' | 'imagemap-image' | 'redirect-target';
14
- readonly childNodes: readonly [AtomToken, ...Token[]];
15
- abstract get firstChild(): AtomToken;
16
- abstract get lastChild(): Token;
17
- abstract get children(): [AtomToken, ...Token[]];
18
- abstract get firstElementChild(): AtomToken;
19
- abstract get lastElementChild(): Token;
20
- /** 完整链接 */
21
- get link(): string | Title;
22
- set link(link: string);
23
- /** fragment */
24
- get fragment(): string | undefined;
25
- set fragment(fragment: string | undefined);
26
- /**
27
- * @param link 链接标题
28
- * @param linkText 链接显示文字
29
- * @param delimiter `|`
30
- */
31
- constructor(link: string, linkText?: string, config?: Parser.Config, accum?: Token[], delimiter?: string);
32
- cloneNode(this: this & {
33
- constructor: new (...args: any[]) => unknown;
34
- }): this;
35
- /**
36
- * 设置链接目标
37
- * @param link 链接目标
38
- */
39
- setTarget(link: string): void;
40
- /**
41
- * 设置链接显示文字
42
- * @param linkStr 链接显示文字
43
- */
44
- setLinkText(linkStr?: string): void;
45
- }
@@ -1,226 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LinkBaseToken = void 0;
4
- const lint_1 = require("../../util/lint");
5
- const rect_1 = require("../../lib/rect");
6
- const constants_1 = require("../../util/constants");
7
- const debug_1 = require("../../util/debug");
8
- const index_1 = require("../../index");
9
- const index_2 = require("../index");
10
- const atom_1 = require("../atom");
11
- /* NOT FOR BROWSER */
12
- const fileTypes = new Set(['file', 'gallery-image', 'imagemap-image']);
13
- /* NOT FOR BROWSER END */
14
- /**
15
- * 内链
16
- * @classdesc `{childNodes: [AtomToken, ...Token]}`
17
- */
18
- class LinkBaseToken extends index_2.Token {
19
- #bracket = true;
20
- #delimiter;
21
- #title;
22
- /** 完整链接 */
23
- get link() {
24
- return this.#title;
25
- }
26
- set link(link) {
27
- this.setTarget(link);
28
- }
29
- /** fragment */
30
- get fragment() {
31
- return this.#title.fragment;
32
- }
33
- set fragment(fragment) {
34
- if (fragment === undefined) {
35
- this.setTarget(this.name);
36
- }
37
- }
38
- /* NOT FOR BROWSER END */
39
- /**
40
- * @param link 链接标题
41
- * @param linkText 链接显示文字
42
- * @param delimiter `|`
43
- */
44
- constructor(link, linkText, config = index_1.default.getConfig(), accum = [], delimiter = '|') {
45
- super(undefined, config, accum, {
46
- AtomToken: 0, Token: 1,
47
- });
48
- this.insertAt(new atom_1.AtomToken(link, 'link-target', config, accum, {
49
- 'Stage-2': ':', '!ExtToken': '', '!HeadingToken': '',
50
- }));
51
- if (linkText !== undefined) {
52
- const inner = new index_2.Token(linkText, config, accum, {
53
- 'Stage-5': ':', QuoteToken: ':', ConverterToken: ':',
54
- });
55
- inner.type = 'link-text';
56
- inner.setAttribute('stage', constants_1.MAX_STAGE - 1);
57
- this.insertAt(inner);
58
- }
59
- this.#delimiter = delimiter;
60
- /* NOT FOR BROWSER */
61
- this.protectChildren(0);
62
- }
63
- /** @private */
64
- afterBuild() {
65
- this.#title = this.getTitle();
66
- if (this.#delimiter.includes('\0')) {
67
- this.#delimiter = this.buildFromStr(this.#delimiter, constants_1.BuildMethod.String);
68
- }
69
- this.setAttribute('name', this.#title.title);
70
- super.afterBuild();
71
- /* NOT FOR BROWSER */
72
- const /** @implements */ linkListener = (e, data) => {
73
- const { prevTarget } = e;
74
- if (prevTarget?.type === 'link-target') {
75
- const name = prevTarget.text(), titleObj = this.getTitle(), { title, interwiki, ns, valid } = titleObj;
76
- if (!valid) {
77
- (0, debug_1.undo)(e, data);
78
- throw new Error(`Invalid link target: ${name}`);
79
- }
80
- else if (this.type === 'category' && (interwiki || ns !== 14)
81
- || fileTypes.has(this.type) && (interwiki || ns !== 6)) {
82
- (0, debug_1.undo)(e, data);
83
- throw new Error(`${this.type === 'category' ? 'Category' : 'File'} link cannot change namespace: ${name}`);
84
- }
85
- else if (this.type === 'link'
86
- && !interwiki
87
- && (ns === 6 || ns === 14)
88
- && !name.trim().startsWith(':')) {
89
- const { firstChild } = prevTarget;
90
- if (firstChild?.type === 'text') {
91
- firstChild.insertData(0, ':');
92
- }
93
- else {
94
- prevTarget.prepend(':');
95
- }
96
- }
97
- this.#title = titleObj;
98
- this.setAttribute('name', title);
99
- }
100
- };
101
- this.addEventListener(['remove', 'insert', 'replace', 'text'], linkListener);
102
- }
103
- /** @private */
104
- setAttribute(key, value) {
105
- if (key === 'bracket') {
106
- this.#bracket = value;
107
- }
108
- else if (key === 'title') {
109
- this.#title = value;
110
- }
111
- else {
112
- super.setAttribute(key, value);
113
- }
114
- }
115
- /** @private */
116
- toString() {
117
- const str = super.toString(this.#delimiter);
118
- return this.#bracket ? `[[${str}]]` : str;
119
- }
120
- /** @private */
121
- text() {
122
- const str = super.text('|');
123
- return this.#bracket ? `[[${str}]]` : str;
124
- }
125
- /** @private */
126
- getAttribute(key) {
127
- if (key === 'title') {
128
- return this.#title;
129
- }
130
- return key === 'padding' ? 2 : super.getAttribute(key);
131
- }
132
- /** @private */
133
- getGaps(i) {
134
- return i === 0 ? this.#delimiter.length : 1;
135
- }
136
- /** @private */
137
- lint(start = this.getAbsoluteIndex(), re) {
138
- const errors = super.lint(start, re), { childNodes: [target, linkText], type: linkType } = this, { encoded, fragment } = this.#title, rect = new rect_1.BoundingRect(this, start);
139
- if (target.childNodes.some(({ type }) => type === 'template')) {
140
- errors.push((0, lint_1.generateForChild)(target, rect, 'unknown-page', 'template in an internal link target', 'warning'));
141
- }
142
- if (encoded) {
143
- errors.push((0, lint_1.generateForChild)(target, rect, 'url-encoding', 'unnecessary URL encoding in an internal link'));
144
- }
145
- if (linkType === 'link' || linkType === 'category') {
146
- const textNode = linkText?.childNodes.find((c) => c.type === 'text' && c.data.includes('|'));
147
- if (textNode) {
148
- const e = (0, lint_1.generateForChild)(linkText, rect, 'pipe-like', 'additional "|" in the link text', 'warning');
149
- e.suggestions = [
150
- {
151
- desc: 'escape',
152
- range: [
153
- e.startIndex + textNode.getRelativeIndex(),
154
- e.startIndex + textNode.getRelativeIndex() + textNode.data.length,
155
- ],
156
- text: textNode.data.replace(/\|/gu, '|'),
157
- },
158
- ];
159
- errors.push(e);
160
- }
161
- }
162
- if (linkType !== 'link' && linkType !== 'redirect-target' && fragment !== undefined) {
163
- const e = (0, lint_1.generateForChild)(target, rect, 'no-ignored', 'useless fragment'), textNode = target.childNodes.find((c) => c.type === 'text' && c.data.includes('#'));
164
- if (textNode) {
165
- e.fix = {
166
- range: [e.startIndex + textNode.getRelativeIndex() + textNode.data.indexOf('#'), e.endIndex],
167
- text: '',
168
- };
169
- }
170
- errors.push(e);
171
- }
172
- return errors;
173
- }
174
- /** @private */
175
- getTitle(halfParsed) {
176
- return this.normalizeTitle(this.firstChild.text(), 0, halfParsed, true, true);
177
- }
178
- /** @private */
179
- print() {
180
- return super.print(this.#bracket ? { pre: '[[', post: ']]', sep: this.#delimiter } : { sep: this.#delimiter });
181
- }
182
- /* NOT FOR BROWSER */
183
- cloneNode() {
184
- const [link, ...linkText] = this.cloneChildNodes();
185
- return debug_1.Shadow.run(() => {
186
- const token = new this.constructor('', undefined, this.getAttribute('config'));
187
- token.firstChild.safeReplaceWith(link);
188
- token.append(...linkText);
189
- return token;
190
- });
191
- }
192
- /**
193
- * 设置链接目标
194
- * @param link 链接目标
195
- */
196
- setTarget(link) {
197
- const config = this.getAttribute('config'), { childNodes } = index_1.default.parse(link, this.getAttribute('include'), 2, config), token = debug_1.Shadow.run(() => new atom_1.AtomToken(undefined, 'link-target', config, [], {
198
- 'Stage-2': ':', '!ExtToken': '', '!HeadingToken': '',
199
- }));
200
- token.append(...childNodes);
201
- this.firstChild.safeReplaceWith(token);
202
- }
203
- /**
204
- * 设置链接显示文字
205
- * @param linkStr 链接显示文字
206
- */
207
- setLinkText(linkStr) {
208
- if (linkStr === undefined) {
209
- this.childNodes[1]?.remove();
210
- return;
211
- }
212
- const root = index_1.default.parse(linkStr, this.getAttribute('include'), undefined, this.getAttribute('config'));
213
- if (this.length === 1) {
214
- root.type = 'link-text';
215
- root.setAttribute('acceptable', {
216
- 'Stage-5': ':', QuoteToken: ':', ConverterToken: ':',
217
- });
218
- this.insertAt(root);
219
- }
220
- else {
221
- this.lastChild.replaceChildren(...root.childNodes);
222
- }
223
- }
224
- }
225
- exports.LinkBaseToken = LinkBaseToken;
226
- constants_1.classes['LinkBaseToken'] = __filename;
@@ -1,22 +0,0 @@
1
- import { LinkBaseToken } from './base';
2
- import type { Title } from '../../lib/title';
3
- import type { Token, AtomToken } from '../../internal';
4
- /**
5
- * 分类
6
- * @classdesc `{childNodes: [AtomToken, ?Token]}`
7
- */
8
- export declare abstract class CategoryToken extends LinkBaseToken {
9
- readonly childNodes: readonly [AtomToken] | readonly [AtomToken, Token];
10
- abstract get children(): [AtomToken] | [AtomToken, Token];
11
- abstract get link(): Title;
12
- abstract set link(link: string);
13
- get type(): 'category';
14
- /** 分类排序关键字 */
15
- get sortkey(): string | undefined;
16
- set sortkey(text: string | undefined);
17
- /**
18
- * 设置排序关键字
19
- * @param text 排序关键字
20
- */
21
- setSortkey(text?: string): void;
22
- }
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CategoryToken = void 0;
4
- const string_1 = require("../../util/string");
5
- const constants_1 = require("../../util/constants");
6
- const base_1 = require("./base");
7
- /**
8
- * 分类
9
- * @classdesc `{childNodes: [AtomToken, ?Token]}`
10
- */
11
- class CategoryToken extends base_1.LinkBaseToken {
12
- /* NOT FOR BROWSER END */
13
- get type() {
14
- return 'category';
15
- }
16
- /* NOT FOR BROWSER */
17
- /** 分类排序关键字 */
18
- get sortkey() {
19
- const { childNodes: [, child] } = this;
20
- return child && (0, string_1.decodeHtml)(child.text());
21
- }
22
- set sortkey(text) {
23
- this.setSortkey(text);
24
- }
25
- /**
26
- * 设置排序关键字
27
- * @param text 排序关键字
28
- */
29
- setSortkey(text) {
30
- this.setLinkText(text);
31
- }
32
- }
33
- exports.CategoryToken = CategoryToken;
34
- constants_1.classes['CategoryToken'] = __filename;
@@ -1,96 +0,0 @@
1
- import Parser from '../../index';
2
- import { LinkBaseToken } from './base';
3
- import { ImageParameterToken } from '../imageParameter';
4
- import type { Title } from '../../lib/title';
5
- import type { LintError } from '../../base';
6
- import type { Token, AtomToken } from '../../internal';
7
- /**
8
- * 图片
9
- * @classdesc `{childNodes: [AtomToken, ...ImageParameterToken]}`
10
- */
11
- export declare abstract class FileToken extends LinkBaseToken {
12
- #private;
13
- readonly childNodes: readonly [AtomToken, ...ImageParameterToken[]];
14
- abstract get lastChild(): AtomToken | ImageParameterToken;
15
- abstract get children(): [AtomToken, ...ImageParameterToken[]];
16
- abstract get lastElementChild(): AtomToken | ImageParameterToken;
17
- get type(): 'file' | 'gallery-image' | 'imagemap-image';
18
- /** 扩展名 */
19
- get extension(): string | undefined;
20
- /** 图片链接 */
21
- get link(): string | Title;
22
- set link(value: string);
23
- /** 图片大小 */
24
- get size(): {
25
- width: string;
26
- height: string;
27
- } | undefined;
28
- set size(size: {
29
- width: string;
30
- height: string;
31
- } | undefined);
32
- /** 图片宽度 */
33
- get width(): string | undefined;
34
- set width(width: string | undefined);
35
- /** 图片高度 */
36
- get height(): string | undefined;
37
- set height(height: string | undefined);
38
- /**
39
- * @param link 文件名
40
- * @param text 图片参数
41
- * @param delimiter `|`
42
- */
43
- constructor(link: string, text?: string, config?: Parser.Config, accum?: Token[], delimiter?: string);
44
- /** 获取所有图片参数节点 */
45
- getAllArgs(): ImageParameterToken[];
46
- /**
47
- * 获取指定图片参数
48
- * @param key 参数名
49
- */
50
- getArgs(key: string): ImageParameterToken[];
51
- /** 获取图片框架属性参数节点 */
52
- getFrameArgs(): ImageParameterToken[];
53
- /** 获取图片水平对齐参数节点 */
54
- getHorizAlignArgs(): ImageParameterToken[];
55
- /** 获取图片垂直对齐参数节点 */
56
- getVertAlignArgs(): ImageParameterToken[];
57
- /**
58
- * 获取生效的指定图片参数
59
- * @param key 参数名
60
- */
61
- getArg(key: string): ImageParameterToken | undefined;
62
- /**
63
- * 获取生效的指定图片参数值
64
- * @param key 参数名
65
- */
66
- getValue(key: string): string | true | undefined;
67
- /**
68
- * 是否具有指定图片参数
69
- * @param key 参数名
70
- */
71
- hasArg(key: string): boolean;
72
- /**
73
- * 移除指定图片参数
74
- * @param key 参数名
75
- */
76
- removeArg(key: string): void;
77
- /** 获取图片参数名 */
78
- getKeys(): Set<string>;
79
- /**
80
- * 获取指定的图片参数值
81
- * @param key 参数名
82
- */
83
- getValues(key: string): (string | true)[];
84
- /**
85
- * 设置图片参数
86
- * @param key 参数名
87
- * @param value 参数值
88
- * @throws `RangeError` 未定义的图片参数
89
- */
90
- setValue(key: string, value?: string | boolean): void;
91
- /**
92
- * @override
93
- * @throws `Error` 不适用于图片
94
- */
95
- setLinkText(): never;
96
- }