@bhsd/codemirror-mediawiki 2.13.0 → 2.14.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/dist/codemirror.d.ts +13 -7
- package/dist/config.d.ts +9 -0
- package/dist/main.min.js +15 -15
- package/dist/mediawiki.d.ts +5 -205
- package/dist/mw.min.js +20 -20
- package/dist/static.d.ts +13 -7
- package/dist/token.d.ts +241 -0
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/mediawiki.css +16 -2
- package/package.json +15 -13
package/dist/codemirror.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { KeyBinding } from '@codemirror/view';
|
|
|
4
4
|
import type { Text } from '@codemirror/state';
|
|
5
5
|
import type { SyntaxNode } from '@lezer/common';
|
|
6
6
|
import type { Diagnostic } from '@codemirror/lint';
|
|
7
|
-
import type { MwConfig } from './
|
|
7
|
+
import type { MwConfig } from './token';
|
|
8
8
|
import type { DocRange } from './fold';
|
|
9
9
|
export { CDN };
|
|
10
10
|
export type { MwConfig };
|
|
@@ -94,18 +94,24 @@ export declare class CodeMirror6 {
|
|
|
94
94
|
* @todo 修正已有标签(`references`, `choose`, `combobox`, `gallery`),支持更多标签
|
|
95
95
|
*/
|
|
96
96
|
static mwTagModes: {
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
onlyinclude: string;
|
|
98
|
+
includeonly: string;
|
|
99
|
+
noinclude: string;
|
|
100
|
+
pre: string;
|
|
101
|
+
nowiki: string;
|
|
99
102
|
indicator: string;
|
|
100
103
|
poem: string;
|
|
101
104
|
ref: string;
|
|
102
105
|
references: string;
|
|
103
|
-
|
|
106
|
+
gallery: string;
|
|
107
|
+
poll: string;
|
|
108
|
+
tabs: string;
|
|
109
|
+
tab: string;
|
|
104
110
|
choose: string;
|
|
105
|
-
|
|
111
|
+
option: string;
|
|
106
112
|
combobox: string;
|
|
107
|
-
|
|
108
|
-
|
|
113
|
+
combooption: string;
|
|
114
|
+
inputbox: string;
|
|
109
115
|
};
|
|
110
116
|
/**
|
|
111
117
|
* 替换选中内容
|
package/dist/config.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ declare const modeConfig: {
|
|
|
18
18
|
* HTML tags that are only self-closing.
|
|
19
19
|
*/
|
|
20
20
|
voidHtmlTags: string[];
|
|
21
|
+
selfClosingTags: string[];
|
|
21
22
|
/**
|
|
22
23
|
* Mapping of MediaWiki-esque token identifiers to a standardized lezer highlighting tag.
|
|
23
24
|
* Values are one of the default highlighting tags.
|
|
@@ -30,6 +31,10 @@ declare const modeConfig: {
|
|
|
30
31
|
tokens: {
|
|
31
32
|
apostrophes: string;
|
|
32
33
|
comment: string;
|
|
34
|
+
convertBracket: string;
|
|
35
|
+
convertDelimiter: string;
|
|
36
|
+
convertFlag: string;
|
|
37
|
+
convertLang: string;
|
|
33
38
|
doubleUnderscore: string;
|
|
34
39
|
em: string;
|
|
35
40
|
error: string;
|
|
@@ -41,6 +46,7 @@ declare const modeConfig: {
|
|
|
41
46
|
extTagAttribute: string;
|
|
42
47
|
extTagBracket: string;
|
|
43
48
|
extTagName: string;
|
|
49
|
+
fileText: string;
|
|
44
50
|
freeExtLink: string;
|
|
45
51
|
freeExtLinkProtocol: string;
|
|
46
52
|
hr: string;
|
|
@@ -55,6 +61,7 @@ declare const modeConfig: {
|
|
|
55
61
|
linkText: string;
|
|
56
62
|
linkToSection: string;
|
|
57
63
|
list: string;
|
|
64
|
+
magicLink: string;
|
|
58
65
|
pageName: string;
|
|
59
66
|
parserFunction: string;
|
|
60
67
|
parserFunctionBracket: string;
|
|
@@ -71,6 +78,8 @@ declare const modeConfig: {
|
|
|
71
78
|
tableDefinition: string;
|
|
72
79
|
tableDelimiter: string;
|
|
73
80
|
tableDelimiter2: string;
|
|
81
|
+
tableTd: string;
|
|
82
|
+
tableTh: string;
|
|
74
83
|
template: string;
|
|
75
84
|
templateArgumentName: string;
|
|
76
85
|
templateBracket: string;
|