@bhsd/codemirror-mediawiki 2.25.6 → 2.27.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.6",
2
+ "version": "2.27.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.6",
2
+ "version": "2.27.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.6",
2
+ "version": "2.27.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.6",
3
+ "version": "2.27.0",
4
4
  "description": "Modified CodeMirror mode based on wikimedia/mediawiki-extensions-CodeMirror",
5
5
  "keywords": [
6
6
  "mediawiki",
@@ -31,27 +31,28 @@
31
31
  "scripts": {
32
32
  "prepublishOnly": "npm run build",
33
33
  "build:css": "esbuild ./css/index.css --bundle --minify --outfile=mediawiki.css",
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",
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 ./src/keybindings.ts --charset=utf8 --target=es2019 --format=esm --outdir=dist --out-extension:.js=.mjs && tsc --emitDeclarationOnly && cp dist/linter.d.ts dist/linter.d.mts && cp dist/keybindings.d.ts dist/keybindings.d.mts && mv dist/mwConfig.d.ts dist/mwConfig.d.mts && rm dist/*-page.d.ts",
35
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",
36
36
  "build:wiki": "esbuild ./mw/base.ts --charset=utf8 --bundle --minify --target=es2019 --format=iife --sourcemap --outfile=dist/wiki.min.js",
37
37
  "build:gh-page": "bash build.sh",
38
- "build:test": "tsc --project test/tsconfig.json && mocha test/dist/test/*.test.js && mocha --reporter=progress test/dist/test/test.js",
38
+ "build:test": "tsc --project test/tsconfig.json && npm test",
39
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",
40
40
  "lint:ts": "tsc --noEmit && tsc --project mw/tsconfig.json --noEmit && tsc --project test/tsconfig.json --noEmit && eslint --cache .",
41
41
  "lint:css": "stylelint **/*.css",
42
42
  "lint": "npm run lint:ts && npm run lint:css",
43
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",
44
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",
45
46
  "test:end": "pkill -x http-server",
46
47
  "test:real": "node test/dist/test/real.js"
47
48
  },
48
49
  "dependencies": {
49
- "@bhsd/common": "^0.11.0",
50
+ "@bhsd/common": "^0.12.0",
50
51
  "@codemirror/lint": "^6.8.5",
51
52
  "@codemirror/state": "^6.5.2",
52
53
  "@codemirror/view": "^6.36.8",
53
54
  "@lezer/common": "^1.2.3",
54
- "wikiparser-node": "^1.21.1"
55
+ "wikiparser-node": "^1.21.2"
55
56
  },
56
57
  "devDependencies": {
57
58
  "@bhsd/codemirror-css-color-picker": "^6.3.0",
@@ -84,7 +85,7 @@
84
85
  "eslint-plugin-regexp": "^2.7.0",
85
86
  "eslint-plugin-unicorn": "^56.0.1",
86
87
  "http-server": "^14.1.1",
87
- "luacheck-browserify": "^0.5.0",
88
+ "luacheck-browserify": "^0.5.1",
88
89
  "mocha": "^11.1.0",
89
90
  "monaco-editor": "^0.52.2",
90
91
  "stylelint": "^16.20.0",
package/dist/plugins.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import type { Extension } from '@codemirror/state';
2
- export { json as jsonLR } from '@codemirror/lang-json';
3
- export { css } from '@codemirror/legacy-modes/mode/css';
4
- export { javascript, json } from '@codemirror/legacy-modes/mode/javascript';
5
- export { lua } from '@codemirror/legacy-modes/mode/lua';
6
- export declare const javascriptLR: () => Extension;
7
- export declare const cssLR: () => Extension;