@bhsd/codemirror-mediawiki 2.25.5 → 2.26.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/i18n/en.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.25.5",
2
+ "version": "2.26.0",
3
3
  "lang": "en",
4
4
  "i18n-failed": "Failed to fetch the translation file in $1.",
5
5
  "title": "CodeMirror Addons",
package/i18n/zh-hans.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.25.5",
2
+ "version": "2.26.0",
3
3
  "lang": "zh-hans",
4
4
  "i18n-failed": "获取 $1 的语言文件失败。",
5
5
  "title": "CodeMirror插件",
package/i18n/zh-hant.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.25.5",
2
+ "version": "2.26.0",
3
3
  "lang": "zh-hant",
4
4
  "i18n-failed": "取得 $1 的語言檔案失敗。",
5
5
  "title": "CodeMirror外掛程式",
package/mediawiki.css CHANGED
@@ -1,4 +1,4 @@
1
- .cm-editor{background-color:#fff}.cm-editor .cm-lineNumbers .cm-gutterElement{text-align:end}.cm-panel .cm-textfield,.cm-panel .cm-button,.cm-panels>.cm-search.cm-panel label,.cm-panels>.cm-gotoLine.cm-panel label{font-size:inherit}.cm-tooltip-fold{cursor:pointer;line-height:1.2;padding:0 1px;opacity:.6}.cm-tooltip-fold:hover{opacity:1}.cm-tooltip-ref,.cm-tooltip-hover{padding:2px 5px;width:max-content;max-width:60vw}.cm-tooltip-ref{cursor:pointer;white-space:pre-wrap}.cm-tooltip-hover *{margin-top:0!important;margin-bottom:0!important}.cm-tooltip-hover>div{font-size:90%;line-height:1.4}.cm-tooltip-hover code{background-color:#e0e6eb;padding:.1em .4em;border-radius:.4em}#cm-preference>.oo-ui-window-frame{height:100%!important}#cm-preference .oo-ui-panelLayout{overflow:visible}#cm-preference .cm-editor{border:1.5px solid #dedede;border-radius:.3em}#cm-preference .oo-ui-checkboxMultioptionWidget.oo-ui-widget-disabled{display:none}.wikiEditor-ui-toolbar{z-index:7}.cm-mw-section--1,.cm-mw-section--1~*{font-size:1.8em;line-height:1.2em}.cm-mw-section--2,.cm-mw-section--2~*{font-size:1.5em;line-height:1.2em}.cm-mw-section--3~*,.cm-mw-section--4~*,.cm-mw-section--5~*,.cm-mw-section--6~*{font-weight:700}.cm-mw-section-header{color:#0076dd;font-weight:400}.cm-mw-error{color:#d73333}.cm-mw-pagename,.cm-mw-link-tosection,.cm-mw-extlink-protocol,.cm-mw-extlink,.cm-mw-free-extlink-protocol,.cm-mw-free-extlink,.cm-mw-magic-link{text-decoration:underline}.cm-mw-skipformatting{background-color:#86ceff4d}.cm-mw-redirect,.cm-mw-list{color:#0076dd;font-weight:700}.cm-mw-double-underscore,.cm-mw-signature,.cm-mw-hr{color:#0076dd;font-weight:700;background-color:#00000012}.cm-mw-comment{color:#7b8c8f;font-weight:400}.cm-mw-apostrophes{color:#0076dd}.cm-mw-template{font-weight:400}.cm-mw-template-name,.cm-mw-template-delimiter,.cm-mw-template-bracket{color:#80c;font-weight:700}.cm-mw-template-argument-name{color:#b0c;font-weight:400}.cm-mw-templatevariable{color:#ad9300;font-weight:400}.cm-mw-templatevariable-name,.cm-mw-templatevariable-bracket,.cm-mw-templatevariable-delimiter{color:#ac6600;font-weight:700}.cm-mw-parserfunction{font-weight:400}.cm-mw-parserfunction-name,.cm-mw-parserfunction-bracket,.cm-mw-parserfunction-delimiter{color:#a11;font-weight:700}.cm-mw-link-pagename,.cm-mw-link-bracket,.cm-mw-link-delimiter,.cm-mw-extlink,.cm-mw-free-extlink,.cm-mw-magic-link{color:#000aaa;font-weight:400}.cm-mw-image-parameter,.cm-mw-link-tosection{color:#006fe6;font-weight:400}.cm-mw-extlink-protocol,.cm-mw-free-extlink-protocol,.cm-mw-extlink-bracket{color:#000aaa;font-weight:700}.cm-mw-strong{font-weight:700}.cm-mw-em{font-style:italic}.cm-mw-exttag-name,.cm-mw-htmltag-name{color:#14866d;font-weight:700}.cm-mw-exttag-bracket,.cm-mw-exttag-attribute,.cm-mw-htmltag-bracket,.cm-mw-htmltag-attribute{color:#14866d;font-weight:400}.cm-mw-exttag-attribute-value,.cm-mw-htmltag-attribute-value{color:#179b1c;font-weight:400}.cm-mw-table-bracket,.cm-mw-table-delimiter{color:#d08;font-weight:700}.cm-mw-table-delimiter2,.cm-mw-table-definition{color:#d08;font-weight:400}.cm-mw-table-definition-value{color:#f500d4;font-weight:400}.cm-mw-table-th,.cm-mw-table-caption{font-weight:700}.cm-mw-convert-bracket,.cm-mw-convert-delimiter{color:#b68;font-weight:700}.cm-mw-convert-flag,.cm-mw-convert-lang{color:#b68}.cm-mw-entity{color:#00a1a1}.cm-mw-template-ground{background-color:#aa11110a}.cm-mw-template2-ground{background-color:#aa111114}.cm-mw-template3-ground{background-color:#aa11111f}.cm-mw-template-ext-ground,.cm-mw-ext-ground,.cm-mw-exttag{background-color:#7700aa0a}.cm-mw-template-ext2-ground,.cm-mw-ext2-ground{background-color:#7700aa14}.cm-mw-template-ext3-ground,.cm-mw-ext3-ground{background-color:#7700aa1f}.cm-mw-template-link-ground,.cm-mw-ext-link-ground,.cm-mw-link-ground{background-color:#2211990a}.cm-mw-template-ext-link-ground,.cm-mw-ext2-link-ground{background-color:#4d09a214}.cm-mw-template-ext2-link-ground,.cm-mw-ext3-link-ground{background-color:#5b06a41f}.cm-mw-template-ext3-link-ground{background-color:#6204a629}.cm-mw-template2-ext-ground{background-color:#91095e14}.cm-mw-template2-ext2-ground{background-color:#8806771f}.cm-mw-template2-ext3-ground{background-color:#84048429}.cm-mw-template2-link-ground{background-color:#66115514}.cm-mw-template2-ext-link-ground{background-color:#6c0b711f}.cm-mw-template2-ext2-link-ground{background-color:#6f098029}.cm-mw-template2-ext3-link-ground{background-color:#70078833}.cm-mw-template3-ext-ground{background-color:#990b441f}.cm-mw-template3-ext2-ground{background-color:#91095e29}.cm-mw-template3-ext3-ground{background-color:#8b076d33}.cm-mw-template3-link-ground{background-color:#7d113e1f}.cm-mw-template3-ext-link-ground{background-color:#7b0d5929}.cm-mw-template3-ext2-link-ground{background-color:#7a0a6933}.cm-mw-template3-ext3-link-ground{background-color:#7a09743d}.cm-mw-tag-pre,.cm-mw-tag-nowiki{background-color:#0000000a}.cm-bidi-isolate,.cm-editor[dir=rtl] .cm-mw-template-name{unicode-bidi:isolate}.cm-bidi-ltr{direction:ltr;display:inline-block}.cm-focused .cm-matchingTag{background-color:#328c8252}.cm-focused .cm-nonmatchingTag{background-color:#bb555545}.cm-inlay-hint{color:#969696;font-style:italic;-webkit-user-select:none;user-select:none}.cm-panel-status{line-height:1.4}.cm-panel-status>div{padding:0 .3em;display:table-cell}.cm-status-worker{user-select:none}.cm-status-worker>*{display:table-cell;white-space:nowrap}.cm-status-error,.cm-status-warning{padding-right:8px}.cm-status-worker-enabled .cm-status-error,.cm-status-worker-enabled .cm-status-warning{cursor:pointer}.cm-status-worker>*>div{display:inline-block;vertical-align:middle}.cm-status-worker>*>div:first-child{margin-right:4px;width:1em;height:1em}.cm-status-fix-disabled,.cm-status-fix-enabled{mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><g><path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7"></path></g></svg>');mask-size:100%;mask-repeat:no-repeat;mask-position:center}.cm-status-fix-disabled{background-color:#dadde3}.cm-status-fix-enabled{background-color:#ffce31;cursor:pointer}.cm-status-fix-menu{display:none;position:absolute;z-index:301;background-color:#f5f5f5;border:1px solid #ddd;border-radius:2px;box-shadow:0 2px 2px #00000040;outline:none;white-space:nowrap}.cm-status-fix-menu>div{padding:1px 5px;cursor:pointer}.cm-status-fix-menu>div:hover{background-color:#e2f2ff}.cm-status-message{border-left:1px solid #c8ccd1;border-right:1px solid #c8ccd1;width:100%}.cm-status-message .cm-diagnosticAction{padding-top:0;padding-bottom:0}.cm-status-line{white-space:nowrap}span.mtku{text-decoration:none}
1
+ .cm-editor{background-color:#fff}.cm-editor .cm-lineNumbers .cm-gutterElement{text-align:end}.cm-panel .cm-textfield,.cm-panel .cm-button,.cm-panels>.cm-search.cm-panel label,.cm-panels>.cm-gotoLine.cm-panel label{font-size:inherit}.cm-tooltip-fold{cursor:pointer;line-height:1.2;padding:0 1px;opacity:.6}.cm-tooltip-fold:hover{opacity:1}.cm-tooltip-ref,.cm-tooltip-hover{padding:2px 5px;width:max-content;max-width:60vw}.cm-tooltip-ref{cursor:pointer;white-space:pre-wrap}.cm-tooltip-hover *{margin-top:0!important;margin-bottom:0!important}.cm-tooltip-hover>div{font-size:90%;line-height:1.4}.cm-tooltip-hover code{background-color:#e0e6eb;padding:.1em .4em;border-radius:.4em}#cm-preference>.oo-ui-window-frame{height:100%!important}#cm-preference .oo-ui-panelLayout{overflow:visible}#cm-preference .cm-editor{border:1.5px solid #dedede;border-radius:.3em}#cm-preference .oo-ui-checkboxMultioptionWidget.oo-ui-widget-disabled{display:none}.wikiEditor-ui-toolbar{z-index:7}.cm-mw-section--1,.cm-mw-section--1~*{font-size:1.8em;line-height:1.2em}.cm-mw-section--2,.cm-mw-section--2~*{font-size:1.5em;line-height:1.2em}.cm-mw-section--3~*,.cm-mw-section--4~*,.cm-mw-section--5~*,.cm-mw-section--6~*{font-weight:700}.cm-mw-section-header{color:#0076dd;font-weight:400}.cm-mw-error{color:#d73333}.cm-mw-pagename,.cm-mw-link-tosection,.cm-mw-extlink-protocol,.cm-mw-extlink,.cm-mw-free-extlink-protocol,.cm-mw-free-extlink,.cm-mw-magic-link{text-decoration:underline}.cm-mw-skipformatting{background-color:#86ceff4d}.cm-mw-redirect,.cm-mw-list{color:#0076dd;font-weight:700}.cm-mw-double-underscore,.cm-mw-signature,.cm-mw-hr{color:#0076dd;font-weight:700;background-color:#00000012}.cm-mw-comment{color:#7b8c8f;font-weight:400}.cm-mw-apostrophes{color:#0076dd}.cm-mw-template{font-weight:400}.cm-mw-template-name,.cm-mw-template-delimiter,.cm-mw-template-bracket{color:#80c;font-weight:700}.cm-mw-template-argument-name{color:#b0c;font-weight:400}.cm-mw-templatevariable{color:#ad9300;font-weight:400}.cm-mw-templatevariable-name,.cm-mw-templatevariable-bracket,.cm-mw-templatevariable-delimiter{color:#ac6600;font-weight:700}.cm-mw-parserfunction{font-weight:400}.cm-mw-parserfunction-name,.cm-mw-parserfunction-bracket,.cm-mw-parserfunction-delimiter{color:#a11;font-weight:700}.cm-mw-link-pagename,.cm-mw-link-bracket,.cm-mw-link-delimiter,.cm-mw-file-delimiter,.cm-mw-extlink,.cm-mw-free-extlink,.cm-mw-magic-link{color:#000aaa;font-weight:400}.cm-mw-image-parameter,.cm-mw-link-tosection{color:#006fe6;font-weight:400}.cm-mw-extlink-protocol,.cm-mw-free-extlink-protocol,.cm-mw-extlink-bracket{color:#000aaa;font-weight:700}.cm-mw-strong{font-weight:700}.cm-mw-em{font-style:italic}.cm-mw-exttag-name,.cm-mw-htmltag-name{color:#14866d;font-weight:700}.cm-mw-exttag-bracket,.cm-mw-exttag-attribute,.cm-mw-htmltag-bracket,.cm-mw-htmltag-attribute{color:#14866d;font-weight:400}.cm-mw-exttag-attribute-value,.cm-mw-htmltag-attribute-value{color:#179b1c;font-weight:400}.cm-mw-table-bracket,.cm-mw-table-delimiter{color:#d08;font-weight:700}.cm-mw-table-delimiter2,.cm-mw-table-definition{color:#d08;font-weight:400}.cm-mw-table-definition-value{color:#f500d4;font-weight:400}.cm-mw-table-th,.cm-mw-table-caption{font-weight:700}.cm-mw-convert-bracket,.cm-mw-convert-delimiter{color:#b68;font-weight:700}.cm-mw-convert-flag,.cm-mw-convert-lang{color:#b68}.cm-mw-entity{color:#00a1a1}.cm-mw-template-ground{background-color:#aa11110a}.cm-mw-template2-ground{background-color:#aa111114}.cm-mw-template3-ground{background-color:#aa11111f}.cm-mw-template-ext-ground,.cm-mw-ext-ground,.cm-mw-exttag{background-color:#7700aa0a}.cm-mw-template-ext2-ground,.cm-mw-ext2-ground{background-color:#7700aa14}.cm-mw-template-ext3-ground,.cm-mw-ext3-ground{background-color:#7700aa1f}.cm-mw-template-link-ground,.cm-mw-ext-link-ground,.cm-mw-link-ground{background-color:#2211990a}.cm-mw-template-ext-link-ground,.cm-mw-ext2-link-ground{background-color:#4d09a214}.cm-mw-template-ext2-link-ground,.cm-mw-ext3-link-ground{background-color:#5b06a41f}.cm-mw-template-ext3-link-ground{background-color:#6204a629}.cm-mw-template2-ext-ground{background-color:#91095e14}.cm-mw-template2-ext2-ground{background-color:#8806771f}.cm-mw-template2-ext3-ground{background-color:#84048429}.cm-mw-template2-link-ground{background-color:#66115514}.cm-mw-template2-ext-link-ground{background-color:#6c0b711f}.cm-mw-template2-ext2-link-ground{background-color:#6f098029}.cm-mw-template2-ext3-link-ground{background-color:#70078833}.cm-mw-template3-ext-ground{background-color:#990b441f}.cm-mw-template3-ext2-ground{background-color:#91095e29}.cm-mw-template3-ext3-ground{background-color:#8b076d33}.cm-mw-template3-link-ground{background-color:#7d113e1f}.cm-mw-template3-ext-link-ground{background-color:#7b0d5929}.cm-mw-template3-ext2-link-ground{background-color:#7a0a6933}.cm-mw-template3-ext3-link-ground{background-color:#7a09743d}.cm-mw-tag-pre,.cm-mw-tag-nowiki{background-color:#0000000a}.cm-bidi-isolate,.cm-editor[dir=rtl] .cm-mw-template-name{unicode-bidi:isolate}.cm-bidi-ltr{direction:ltr;display:inline-block}.cm-focused .cm-matchingTag{background-color:#328c8252}.cm-focused .cm-nonmatchingTag{background-color:#bb555545}.cm-inlay-hint{color:#969696;font-style:italic;-webkit-user-select:none;user-select:none}.cm-panel-status{line-height:1.4}.cm-panel-status>div{padding:0 .3em;display:table-cell}.cm-status-worker{user-select:none}.cm-status-worker>*{display:table-cell;white-space:nowrap}.cm-status-error,.cm-status-warning{padding-right:8px}.cm-status-worker-enabled .cm-status-error,.cm-status-worker-enabled .cm-status-warning{cursor:pointer}.cm-status-worker>*>div{display:inline-block;vertical-align:middle}.cm-status-worker>*>div:first-child{margin-right:4px;width:1em;height:1em}.cm-status-fix-disabled,.cm-status-fix-enabled{mask-image:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><g><path d="M8 19a1 1 0 001 1h2a1 1 0 001-1v-1H8zm9-12a7 7 0 10-12 4.9S7 14 7 15v1a1 1 0 001 1h4a1 1 0 001-1v-1c0-1 2-3.1 2-3.1A7 7 0 0017 7"></path></g></svg>');mask-size:100%;mask-repeat:no-repeat;mask-position:center}.cm-status-fix-disabled{background-color:#dadde3}.cm-status-fix-enabled{background-color:#ffce31;cursor:pointer}.cm-status-fix-menu{display:none;position:absolute;z-index:301;background-color:#f5f5f5;border:1px solid #ddd;border-radius:2px;box-shadow:0 2px 2px #00000040;outline:none;white-space:nowrap}.cm-status-fix-menu>div{padding:1px 5px;cursor:pointer}.cm-status-fix-menu>div:hover{background-color:#e2f2ff}.cm-status-message{border-left:1px solid #c8ccd1;border-right:1px solid #c8ccd1;width:100%}.cm-status-message .cm-diagnosticAction{padding-top:0;padding-bottom:0}.cm-status-line{white-space:nowrap}span.mtku{text-decoration:none}
2
2
  /**
3
3
  * @author pastakhov and others
4
4
  * @license GPL-2.0-or-later
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bhsd/codemirror-mediawiki",
3
- "version": "2.25.5",
3
+ "version": "2.26.0",
4
4
  "description": "Modified CodeMirror mode based on wikimedia/mediawiki-extensions-CodeMirror",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -18,8 +18,6 @@
18
18
  "/dist/*.d.ts",
19
19
  "/dist/*.mjs",
20
20
  "/dist/*.d.mts",
21
- "!/dist/*-page.d.ts",
22
- "!/dist/parser.*",
23
21
  "/mediawiki.css"
24
22
  ],
25
23
  "browser": "dist/main.min.js",
@@ -33,30 +31,31 @@
33
31
  "scripts": {
34
32
  "prepublishOnly": "npm run build",
35
33
  "build:css": "esbuild ./css/index.css --bundle --minify --outfile=mediawiki.css",
36
- "build:core": "esbuild ./src/codemirror.ts --charset=utf8 --bundle --minify --target=es2019 --format=esm --sourcemap --outfile=dist/main.min.js && esbuild ./src/linter.ts --charset=utf8 --target=es2019 --format=esm --outfile=dist/linter.mjs && tsc --emitDeclarationOnly && cp dist/linter.d.ts dist/linter.d.mts && mv dist/mwConfig.d.ts dist/mwConfig.d.mts",
34
+ "build:core": "esbuild ./src/codemirror.ts --charset=utf8 --bundle --minify --target=es2019 --format=esm --sourcemap --outfile=dist/main.min.js && esbuild ./src/linter.ts --charset=utf8 --target=es2019 --format=esm --outfile=dist/linter.mjs && tsc --emitDeclarationOnly && cp dist/linter.d.ts dist/linter.d.mts && mv dist/mwConfig.d.ts dist/mwConfig.d.mts && rm dist/*-page.d.ts",
37
35
  "build:mw": "esbuild ./mw/base.ts --charset=utf8 --bundle --minify --target=es2019 --format=esm --outfile=dist/mw.min.js && esbuild ./mw/config.ts --charset=utf8 --bundle --target=es2019 --format=esm --outfile=dist/mwConfig.mjs",
38
36
  "build:wiki": "esbuild ./mw/base.ts --charset=utf8 --bundle --minify --target=es2019 --format=iife --sourcemap --outfile=dist/wiki.min.js",
39
37
  "build:gh-page": "bash build.sh",
40
- "build:test": "tsc --project test/tsconfig.json && mocha",
38
+ "build:test": "tsc --project test/tsconfig.json && npm test",
41
39
  "build": "npm run build:css && rm -rf dist/ && npm run build:core && npm run build:mw && npm run build:wiki && eslint --no-eslintrc -c .eslintrc.dist.cjs dist/*.js",
42
40
  "lint:ts": "tsc --noEmit && tsc --project mw/tsconfig.json --noEmit && tsc --project test/tsconfig.json --noEmit && eslint --cache .",
43
41
  "lint:css": "stylelint **/*.css",
44
42
  "lint": "npm run lint:ts && npm run lint:css",
45
43
  "prof": "node --prof test/dist/test/prof.js && node --prof-process isolate-0x*-v8.log > test/prof.txt && gsed -i '0,/Bottom up/d' test/prof.txt && rm isolate-0x*-v8.log",
46
44
  "server": "npm run test:end; http-server .. -c-1 --cors -s &",
45
+ "test": "mocha test/dist/test/*.test.js && mocha --reporter=progress test/dist/test/test.js",
47
46
  "test:end": "pkill -x http-server",
48
47
  "test:real": "node test/dist/test/real.js"
49
48
  },
50
49
  "dependencies": {
50
+ "@bhsd/common": "^0.12.0",
51
51
  "@codemirror/lint": "^6.8.5",
52
52
  "@codemirror/state": "^6.5.2",
53
- "@codemirror/view": "^6.36.5",
53
+ "@codemirror/view": "^6.36.8",
54
54
  "@lezer/common": "^1.2.3",
55
- "wikiparser-node": "^1.20.3"
55
+ "wikiparser-node": "^1.21.2"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@bhsd/codemirror-css-color-picker": "^6.3.0",
59
- "@bhsd/common": "^0.11.0",
60
59
  "@codemirror/autocomplete": "^6.18.6",
61
60
  "@codemirror/commands": "^6.8.1",
62
61
  "@codemirror/lang-css": "^6.3.1",
@@ -64,7 +63,7 @@
64
63
  "@codemirror/lang-json": "^6.0.1",
65
64
  "@codemirror/language": "^6.11.0",
66
65
  "@codemirror/legacy-modes": "^6.4.2",
67
- "@codemirror/search": "^6.5.10",
66
+ "@codemirror/search": "^6.5.11",
68
67
  "@lezer/highlight": "^1.2.1",
69
68
  "@stylistic/eslint-plugin": "^3.1.0",
70
69
  "@stylistic/stylelint-plugin": "^3.1.2",
@@ -82,8 +81,6 @@
82
81
  "eslint-plugin-eslint-comments": "^3.2.0",
83
82
  "eslint-plugin-jsdoc": "^50.6.3",
84
83
  "eslint-plugin-json-es": "^1.6.0",
85
- "eslint-plugin-markdown": "4.0.1",
86
- "eslint-plugin-n": "^17.15.1",
87
84
  "eslint-plugin-promise": "^7.2.1",
88
85
  "eslint-plugin-regexp": "^2.7.0",
89
86
  "eslint-plugin-unicorn": "^56.0.1",