@bhsd/codemirror-mediawiki 2.2.3 → 2.3.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 +4 -0
- package/dist/fold.d.ts +11 -0
- package/dist/main.min.js +12 -12
- package/dist/main.min.js.map +4 -4
- package/dist/mw.min.js +1 -1
- package/dist/mw.min.js.map +3 -3
- package/i18n/en.json +5 -2
- package/i18n/zh-hans.json +5 -2
- package/i18n/zh-hant.json +5 -2
- package/mw/base.ts +8 -4
- package/mw/msg.ts +50 -5
- package/mw/preference.ts +1 -0
- package/package.json +2 -1
- package/src/codemirror.ts +18 -4
- package/src/fold.ts +128 -0
package/README.md
CHANGED
|
@@ -196,6 +196,8 @@ cm.prefer([
|
|
|
196
196
|
'allowMultipleSelections',
|
|
197
197
|
'bracketMatching',
|
|
198
198
|
'closeBrackets',
|
|
199
|
+
'escape',
|
|
200
|
+
'fold',
|
|
199
201
|
'highlightActiveLine',
|
|
200
202
|
'highlightSpecialChars',
|
|
201
203
|
'highlightWhitespace',
|
|
@@ -205,6 +207,8 @@ cm.prefer({
|
|
|
205
207
|
allowMultipleSelections: false,
|
|
206
208
|
bracketMatching: false,
|
|
207
209
|
closeBrackets: false,
|
|
210
|
+
escape: false,
|
|
211
|
+
fold: false,
|
|
208
212
|
highlightActiveLine: false,
|
|
209
213
|
highlightSpecialChars: false,
|
|
210
214
|
highlightWhitespace: false,
|
package/dist/fold.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EditorView } from '@codemirror/view';
|
|
2
|
+
import { StateField } from '@codemirror/state';
|
|
3
|
+
import type { Tooltip } from '@codemirror/view';
|
|
4
|
+
/**
|
|
5
|
+
* 寻找匹配的括号并折叠
|
|
6
|
+
* @param view EditorView
|
|
7
|
+
*/
|
|
8
|
+
export declare const fold: (view: EditorView) => boolean;
|
|
9
|
+
export declare const cursorTooltipField: StateField<Tooltip | null>;
|
|
10
|
+
export declare const cursorTooltipTheme: import("@codemirror/state").Extension;
|
|
11
|
+
export declare const handler: (view: EditorView) => (e: MouseEvent) => void;
|