@bhsd/codemirror-mediawiki 3.6.4 → 3.6.6

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 CHANGED
@@ -134,7 +134,7 @@ import {
134
134
  registerJSON,
135
135
  registerLua,
136
136
  registerVue,
137
- } from 'https://unpkg.com/@bhsd/codemirror-mediawiki';
137
+ } from 'https://unpkg.com/@bhsd/codemirror-mediawiki/dist/main.min.js';
138
138
  ```
139
139
 
140
140
  or
@@ -165,7 +165,7 @@ const {
165
165
  registerJSON,
166
166
  registerLua,
167
167
  registerVue,
168
- } = await import('https://unpkg.com/@bhsd/codemirror-mediawiki');
168
+ } = await import('https://unpkg.com/@bhsd/codemirror-mediawiki/dist/main.min.js');
169
169
  ```
170
170
 
171
171
  </details>
@@ -73,6 +73,7 @@ export declare class CodeMirror6 {
73
73
  /**
74
74
  * Check if the editor enables a specific extension
75
75
  * @param name extension name
76
+ * @since 3.2.0
76
77
  */
77
78
  hasPreference(name: string): boolean;
78
79
  /**
@@ -144,14 +144,14 @@ export class CodeMirror6 {
144
144
  clearTimeout(timer);
145
145
  timer = setTimeout(() => {
146
146
  textarea.value = doc.toString();
147
- textarea.dispatchEvent(new Event('input'));
147
+ textarea.dispatchEvent(new InputEvent('input'));
148
148
  }, 400);
149
149
  if (!startDoc.toString().trim()) {
150
150
  this.setIndent(this.#indentStr);
151
151
  }
152
152
  }
153
153
  if (focusChanged) {
154
- textarea.dispatchEvent(new Event(this.#view.hasFocus ? 'focus' : 'blur'));
154
+ textarea.dispatchEvent(new FocusEvent(this.#view.hasFocus ? 'focus' : 'blur'));
155
155
  }
156
156
  }),
157
157
  ...readOnly
@@ -284,6 +284,7 @@ export class CodeMirror6 {
284
284
  /**
285
285
  * Check if the editor enables a specific extension
286
286
  * @param name extension name
287
+ * @since 3.2.0
287
288
  */
288
289
  hasPreference(name) {
289
290
  return this.#preferred.has(name);
package/dist/color.js CHANGED
@@ -25,7 +25,7 @@ export const discoverColors = (_, from, to, type, doc) => {
25
25
  from: from + start,
26
26
  to: from + end,
27
27
  };
28
- }).filter(Boolean);
28
+ }).filter(options => options !== null);
29
29
  };
30
30
  export default (([e, style] = []) => e
31
31
  ? [
package/dist/fold.d.ts CHANGED
@@ -23,4 +23,4 @@ export declare const mediaWikiFold: Extension;
23
23
  * 点击提示折叠模板参数
24
24
  * @param view
25
25
  */
26
- export declare const foldHandler: (view: EditorView) => (e: MouseEvent) => void;
26
+ export declare const foldHandler: (view: EditorView) => (e: PointerEvent) => void;
package/dist/lua.js CHANGED
@@ -108,6 +108,8 @@ const map = {
108
108
  isValidBuiltInCode: 2,
109
109
  isValidCode: 2,
110
110
  new: 2,
111
+ FALLBACK_MESSAGES: 1,
112
+ FALLBACK_STRICT: 1,
111
113
  },
112
114
  message: {
113
115
  new: 2,