@bhsd/codemirror-mediawiki 2.20.2 → 2.21.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 +13 -0
- package/dist/escape.d.ts +2 -1
- package/dist/hover.d.ts +19 -0
- package/dist/main.min.js +17 -17
- package/dist/matchTag.d.ts +2 -2
- package/dist/mw.min.js +20 -20
- package/dist/mwConfig.mjs +0 -4
- package/dist/openLinks.d.ts +2 -1
- package/dist/ref.d.ts +4 -6
- package/dist/signature.d.ts +3 -0
- package/dist/tree.d.ts +16 -0
- package/dist/wiki.min.js +20 -20
- 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 +29 -34
- package/mw/config.ts +0 -185
- package/src/linter.ts +0 -149
- package/src/static.ts +0 -62
package/dist/mwConfig.mjs
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
// ../code-standard/dist/index.mjs
|
|
2
2
|
var CDN = "https://testingcf.jsdelivr.net";
|
|
3
|
-
var textarea;
|
|
4
|
-
if (typeof document === "object") {
|
|
5
|
-
textarea = document.createElement("textarea");
|
|
6
|
-
}
|
|
7
3
|
var getObject = (key) => JSON.parse(String(localStorage.getItem(key)));
|
|
8
4
|
var setObject = (key, value) => {
|
|
9
5
|
localStorage.setItem(key, JSON.stringify(value));
|
package/dist/openLinks.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Extension } from '@codemirror/state';
|
|
2
2
|
import type { CodeMirror6 } from './codemirror';
|
|
3
3
|
export declare const isMac: boolean;
|
|
4
|
-
|
|
4
|
+
declare const _default: ({ langConfig }: CodeMirror6) => Extension;
|
|
5
|
+
export default _default;
|
package/dist/ref.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EditorView } from '@codemirror/view';
|
|
2
|
-
import type {
|
|
2
|
+
import type { Extension } from '@codemirror/state';
|
|
3
3
|
declare type Ranges = [number, number][];
|
|
4
4
|
/**
|
|
5
5
|
* 异步查找注释的内容
|
|
@@ -8,8 +8,6 @@ declare type Ranges = [number, number][];
|
|
|
8
8
|
* @param all 是否查找所有
|
|
9
9
|
* @param group 是否group属性
|
|
10
10
|
*/
|
|
11
|
-
export declare const findRef: (view: EditorView
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} | readonly import("@codemirror/state").Extension[])[];
|
|
15
|
-
export {};
|
|
11
|
+
export declare const findRef: (view: EditorView, target: string, all?: boolean, group?: boolean) => Promise<Ranges>;
|
|
12
|
+
declare const _default: Extension;
|
|
13
|
+
export default _default;
|
package/dist/tree.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as Monaco from 'monaco-editor';
|
|
2
|
+
import type { editor, Range as R } from 'monaco-editor';
|
|
3
|
+
import type { EditorView } from '@codemirror/view';
|
|
4
|
+
import type { AST } from 'wikiparser-node';
|
|
5
|
+
declare type Tree = Promise<AST> & {
|
|
6
|
+
docChanged?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const trees: WeakMap<EditorView | editor.ITextModel, Tree>;
|
|
9
|
+
/**
|
|
10
|
+
* 获取语法树
|
|
11
|
+
* @param model 键
|
|
12
|
+
* @param stage 解析阶段,现仅用于CodeMirror
|
|
13
|
+
*/
|
|
14
|
+
export declare const getTree: (model: editor.ITextModel | EditorView, stage?: number) => Tree;
|
|
15
|
+
export declare const fromPositions: (monaco: typeof Monaco, model: editor.ITextModel, ref: [number, number]) => R;
|
|
16
|
+
export {};
|