@bhsd/codemirror-mediawiki 2.20.3 → 2.21.1
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 +13 -0
- package/dist/escape.d.ts +2 -1
- package/dist/hover.d.ts +25 -0
- package/dist/main.min.js +18 -18
- package/dist/matchTag.d.ts +2 -2
- package/dist/mw.min.js +23 -23
- package/dist/mwConfig.mjs +14 -7
- package/dist/openLinks.d.ts +2 -1
- package/dist/ref.d.ts +3 -15
- package/dist/signature.d.ts +3 -0
- package/dist/wiki.min.js +23 -23
- package/i18n/en.json +4 -2
- package/i18n/zh-hans.json +4 -2
- package/i18n/zh-hant.json +4 -2
- package/mediawiki.css +18 -3
- package/package.json +30 -35
- package/dist/openExtLinks.d.ts +0 -2
- package/mw/config.ts +0 -185
- package/src/linter.ts +0 -149
- package/src/static.ts +0 -62
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
- [escape](#escape)
|
|
48
48
|
- [tagMatching](#tagmatching)
|
|
49
49
|
- [refHover](#refhover)
|
|
50
|
+
- [hover](#hover)
|
|
50
51
|
- [openLinks](#openlinks)
|
|
51
52
|
- [Known issues](#known-issues)
|
|
52
53
|
- [Syntax Highlighting](#syntax-highlighting)
|
|
@@ -554,6 +555,18 @@ Matched or unmatched tags are highlighted in cyan or dark red when the cursor is
|
|
|
554
555
|
|
|
555
556
|
Show the content of the `<ref>` tag defined elsewhere when hovering.
|
|
556
557
|
|
|
558
|
+
## hover
|
|
559
|
+
|
|
560
|
+
*version added: 2.21.0*
|
|
561
|
+
|
|
562
|
+
Show the help information of a magic word when hovering.
|
|
563
|
+
|
|
564
|
+
## signatureHelp
|
|
565
|
+
|
|
566
|
+
*version added: 2.21.0*
|
|
567
|
+
|
|
568
|
+
Show the parser function signature when typing.
|
|
569
|
+
|
|
557
570
|
## openLinks
|
|
558
571
|
|
|
559
572
|
*version added: 2.19.6*
|
package/dist/escape.d.ts
CHANGED
package/dist/hover.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Tooltip, EditorView } from '@codemirror/view';
|
|
2
|
+
import type { Text } from '@codemirror/state';
|
|
3
|
+
import type { LanguageServiceBase } from 'wikiparser-node/extensions/typings';
|
|
4
|
+
import type { Position } from 'vscode-languageserver-types';
|
|
5
|
+
/**
|
|
6
|
+
* 获取当前编辑器的语言服务
|
|
7
|
+
* @param view EditorView 实例
|
|
8
|
+
*/
|
|
9
|
+
export declare const getLSP: (view: EditorView) => LanguageServiceBase | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* 将索引转换为位置
|
|
12
|
+
* @param doc Text 实例
|
|
13
|
+
* @param index 索引
|
|
14
|
+
*/
|
|
15
|
+
export declare const indexToPos: (doc: Text, index: number) => Position;
|
|
16
|
+
/**
|
|
17
|
+
* 将位置转换为索引
|
|
18
|
+
* @param doc Text 实例
|
|
19
|
+
* @param pos 位置
|
|
20
|
+
*/
|
|
21
|
+
export declare const posToIndex: (doc: Text, pos: Position) => number;
|
|
22
|
+
declare const _default: import("@codemirror/state").Extension & {
|
|
23
|
+
active: import("@codemirror/state").StateField<readonly Tooltip[]>;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|