@bhsd/codemirror-mediawiki 2.25.5 → 2.26.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/README.md +31 -7
- package/dist/bidi.d.ts +2 -1
- package/dist/color.d.ts +4 -1
- package/dist/config.d.ts +1 -0
- package/dist/fold.d.ts +9 -1
- package/dist/main.min.js +16 -16
- package/dist/mw.min.js +20 -20
- package/dist/openLinks.d.ts +3 -0
- package/dist/token.d.ts +4 -2
- package/dist/wiki.min.js +20 -20
- package/i18n/en.json +1 -1
- package/i18n/zh-hans.json +1 -1
- package/i18n/zh-hant.json +1 -1
- package/mediawiki.css +1 -1
- package/package.json +8 -11
package/dist/openLinks.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
1
2
|
import type { Extension } from '@codemirror/state';
|
|
2
3
|
import type { CodeMirror6 } from './codemirror';
|
|
4
|
+
import type { MwConfig } from './token';
|
|
3
5
|
export declare const isMac: boolean;
|
|
6
|
+
export declare const mouseEventListener: (e: MouseEvent, view: EditorView, langConfig: MwConfig | undefined) => string | undefined;
|
|
4
7
|
declare const _default: ({ langConfig }: CodeMirror6) => Extension;
|
|
5
8
|
export default _default;
|
package/dist/token.d.ts
CHANGED
|
@@ -88,7 +88,7 @@ export declare class MediaWiki {
|
|
|
88
88
|
};
|
|
89
89
|
readonly hiddenTable: Record<string, Tag>;
|
|
90
90
|
readonly permittedHtmlTags: Set<string | undefined>;
|
|
91
|
-
readonly
|
|
91
|
+
readonly voidHtmlTags: Set<string>;
|
|
92
92
|
readonly urlProtocols: RegExp;
|
|
93
93
|
readonly linkRegex: RegExp;
|
|
94
94
|
readonly fileRegex: RegExp;
|
|
@@ -130,7 +130,7 @@ export declare class MediaWiki {
|
|
|
130
130
|
eatApostrophes(obj: Pick<State, 'bold' | 'italic'>): Tokenizer<string | false>;
|
|
131
131
|
eatExternalLinkProtocol({ length }: string, free?: boolean): Tokenizer;
|
|
132
132
|
inExternalLink(text?: boolean): Tokenizer;
|
|
133
|
-
|
|
133
|
+
eatFreeExternalLink(this: void, stream: StringStream, state: State): Style;
|
|
134
134
|
inLink(file: boolean, section?: boolean): Tokenizer;
|
|
135
135
|
inLinkText(file: boolean, gallery?: boolean): Tokenizer;
|
|
136
136
|
toEatImageParameter(stream: StringStream, state: State): void;
|
|
@@ -142,6 +142,8 @@ export declare class MediaWiki {
|
|
|
142
142
|
inTableCell(style: string, needAttr?: boolean, firstLine?: boolean): Tokenizer;
|
|
143
143
|
inSectionHeader(str: string): Tokenizer;
|
|
144
144
|
get inComment(): Tokenizer;
|
|
145
|
+
eatExtTag(tagname: string, isCloseTag: boolean, state: State): string;
|
|
146
|
+
eatHtmlTag(tagname: string, isCloseTag: boolean, state: State): string;
|
|
145
147
|
eatTagName(name: string, isCloseTag?: boolean, isHtmlTag?: boolean): Tokenizer;
|
|
146
148
|
inHtmlTagAttribute(name: string, quote?: string): Tokenizer;
|
|
147
149
|
inExtTagAttribute(name: string, quote?: string, isLang?: boolean, isPage?: boolean): Tokenizer;
|