@bhsd/codemirror-mediawiki 2.0.7 → 2.0.9

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.
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @author MusikAnimal and others
3
+ * @license GPL-2.0-or-later
4
+ * @link https://gerrit.wikimedia.org/g/mediawiki/extensions/CodeMirror
5
+ */
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @author pastakhov, MusikAnimal and others
3
+ * @license GPL-2.0-or-later
4
+ * @link https://gerrit.wikimedia.org/g/mediawiki/extensions/CodeMirror
5
+ */
6
+ import { LanguageSupport } from '@codemirror/language';
7
+ export interface MwConfig {
8
+ urlProtocols: string;
9
+ tags: Record<string, true>;
10
+ tagModes: Record<string, string>;
11
+ functionSynonyms: [Record<string, string>, Record<string, string>];
12
+ doubleUnderscore: [Record<string, string>, Record<string, string>];
13
+ }
14
+ /**
15
+ * Gets a LanguageSupport instance for the MediaWiki mode.
16
+ */
17
+ export declare const mediawiki: (config: MwConfig) => LanguageSupport;
18
+ export declare const html: (config: MwConfig) => LanguageSupport;
@@ -0,0 +1,3 @@
1
+ export { css } from '@codemirror/legacy-modes/mode/css';
2
+ export { javascript } from '@codemirror/legacy-modes/mode/javascript';
3
+ export { lua } from '@codemirror/legacy-modes/mode/lua';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bhsd/codemirror-mediawiki",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "Modified CodeMirror mode based on wikimedia/mediawiki-extensions-CodeMirror",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -12,17 +12,19 @@
12
12
  },
13
13
  "license": "GPL-2.0",
14
14
  "files":[
15
- "dist/main.min.js",
16
- "mediawiki.css"
15
+ "/dist/",
16
+ "/mediawiki.css"
17
17
  ],
18
18
  "browser": "dist/main.min.js",
19
+ "main": "./dist/main.min.js",
20
+ "types": "./dist/codemirror.d.ts",
19
21
  "repository": {
20
22
  "type": "git",
21
23
  "url": "git+https://github.com/bhsd-harry/codemirror-mediawiki.git"
22
24
  },
23
25
  "scripts": {
24
26
  "start": "webpack --mode development",
25
- "build": "rm -rf dist/; webpack --mode production",
27
+ "build": "rm -rf dist/; webpack --mode production; tsc --emitDeclarationOnly",
26
28
  "lint": "tsc --noEmit && eslint --cache .",
27
29
  "test": "http-server -c-1 --cors"
28
30
  },
@@ -30,6 +32,7 @@
30
32
  "node": "20.9.0"
31
33
  },
32
34
  "devDependencies": {
35
+ "@codemirror/autocomplete": "^6.11.1",
33
36
  "@codemirror/commands": "^6.3.2",
34
37
  "@codemirror/language": "^6.9.3",
35
38
  "@codemirror/legacy-modes": "^6.3.3",