[mod] update to node lts v22
This commit is contained in:
parent
0d80764174
commit
b102be8db6
6 changed files with 152 additions and 96 deletions
121
package-lock.json
generated
121
package-lock.json
generated
|
|
@ -5,23 +5,23 @@
|
|||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "^6.8.1",
|
||||
"@codemirror/commands": "^6.10.0",
|
||||
"@codemirror/lang-javascript": "^6.2.4",
|
||||
"@codemirror/lang-markdown": "^6.3.4",
|
||||
"@codemirror/lang-markdown": "^6.5.0",
|
||||
"@codemirror/lang-xml": "^6.1.0",
|
||||
"@codemirror/language-data": "^6.5.1",
|
||||
"@codemirror/legacy-modes": "^6.5.1",
|
||||
"@codemirror/lint": "^6.8.5",
|
||||
"@codemirror/lsp-client": "^6.1.1",
|
||||
"@codemirror/language-data": "^6.5.2",
|
||||
"@codemirror/legacy-modes": "^6.5.2",
|
||||
"@codemirror/lint": "^6.9.1",
|
||||
"@codemirror/lsp-client": "^6.2.0",
|
||||
"@codemirror/search": "^6.5.11",
|
||||
"@codemirror/theme-one-dark": "^6.1.0",
|
||||
"@codemirror/view": "^6.38.1",
|
||||
"@codemirror/theme-one-dark": "^6.1.3",
|
||||
"@codemirror/view": "^6.38.6",
|
||||
"@replit/codemirror-minimap": "^0.5.2",
|
||||
"@zenfs/core": "^2.4.2",
|
||||
"@zenfs/dom": "^1.1.7",
|
||||
"ace-builds": "^1.43.2",
|
||||
"ace-linters": "^1.8.3",
|
||||
"beercss": "^3.12.3"
|
||||
"@zenfs/dom": "^1.2.5",
|
||||
"ace-builds": "^1.43.4",
|
||||
"ace-linters": "^1.8.5",
|
||||
"beercss": "^3.12.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
|
|
@ -32,9 +32,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@codemirror/autocomplete": {
|
||||
"version": "6.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.19.0.tgz",
|
||||
"integrity": "sha512-61Hfv3cF07XvUxNeC3E7jhG8XNi1Yom1G0lRC936oLnlF+jrbrv8rc/J98XlYzcsAoTVupfsf5fLej1aI8kyIg==",
|
||||
"version": "6.19.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.19.1.tgz",
|
||||
"integrity": "sha512-q6NenYkEy2fn9+JyjIxMWcNjzTL/IhwqfzOut1/G3PrIFkrbl4AL7Wkse5tLrQUUyqGoAKU5+Pi5jnnXxH5HGw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
|
|
@ -44,9 +44,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@codemirror/commands": {
|
||||
"version": "6.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.9.0.tgz",
|
||||
"integrity": "sha512-454TVgjhO6cMufsyyGN70rGIfJxJEjcqjBG2x2Y03Y/+Fm99d3O/Kv1QDYWuG6hvxsgmjXmBuATikIIYvERX+w==",
|
||||
"version": "6.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.10.0.tgz",
|
||||
"integrity": "sha512-2xUIc5mHXQzT16JnyOFkh8PvfeXuIut3pslWGfsGOhxP/lpgRm9HOl/mpzLErgt5mXDovqA0d11P21gofRLb9w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
|
|
@ -147,6 +147,19 @@
|
|||
"@lezer/javascript": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-jinja": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-jinja/-/lang-jinja-6.0.0.tgz",
|
||||
"integrity": "sha512-47MFmRcR8UAxd8DReVgj7WJN1WSAMT7OJnewwugZM4XiHWkOjgJQqvEM1NpMj9ALMPyxmlziEI1opH9IaEvmaw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/lang-html": "^6.0.0",
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@lezer/common": "^1.2.0",
|
||||
"@lezer/highlight": "^1.2.0",
|
||||
"@lezer/lr": "^1.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-json": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz",
|
||||
|
|
@ -187,9 +200,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@codemirror/lang-markdown": {
|
||||
"version": "6.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.4.0.tgz",
|
||||
"integrity": "sha512-ZeArR54seh4laFbUTVy0ZmQgO+C/cxxlW4jEoQMhL3HALScBpZBeZcLzrQmJsTEx4is9GzOe0bFAke2B1KZqeA==",
|
||||
"version": "6.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.5.0.tgz",
|
||||
"integrity": "sha512-0K40bZ35jpHya6FriukbgaleaqzBLZfOh7HuzqbMxBXkbYMJDxfF39c23xOgxFezR+3G+tR2/Mup+Xk865OMvw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.7.1",
|
||||
|
|
@ -334,9 +347,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@codemirror/language-data": {
|
||||
"version": "6.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language-data/-/language-data-6.5.1.tgz",
|
||||
"integrity": "sha512-0sWxeUSNlBr6OmkqybUTImADFUP0M3P0IiSde4nc24bz/6jIYzqYSgkOSLS+CBIoW1vU8Q9KUWXscBXeoMVC9w==",
|
||||
"version": "6.5.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language-data/-/language-data-6.5.2.tgz",
|
||||
"integrity": "sha512-CPkWBKrNS8stYbEU5kwBwTf3JB1kghlbh4FSAwzGW2TEscdeHHH4FGysREW86Mqnj3Qn09s0/6Ea/TutmoTobg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/lang-angular": "^0.1.0",
|
||||
|
|
@ -346,6 +359,7 @@
|
|||
"@codemirror/lang-html": "^6.0.0",
|
||||
"@codemirror/lang-java": "^6.0.0",
|
||||
"@codemirror/lang-javascript": "^6.0.0",
|
||||
"@codemirror/lang-jinja": "^6.0.0",
|
||||
"@codemirror/lang-json": "^6.0.0",
|
||||
"@codemirror/lang-less": "^6.0.0",
|
||||
"@codemirror/lang-liquid": "^6.0.0",
|
||||
|
|
@ -373,9 +387,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@codemirror/lint": {
|
||||
"version": "6.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.0.tgz",
|
||||
"integrity": "sha512-wZxW+9XDytH3SKvS8cQzMyQCaaazH8XL1EMHleHe00wVzsv7NBQKVW2yzEHrRhmM7ZOhVdItPbvlRBvMp9ej7A==",
|
||||
"version": "6.9.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.1.tgz",
|
||||
"integrity": "sha512-te7To1EQHePBQQzasDKWmK2xKINIXpk+xAiSYr9ZN+VB4KaT+/Hi2PEkeErTk5BV3PTz1TLyQL4MtJfPkKZ9sw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
|
|
@ -384,9 +398,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@codemirror/lsp-client": {
|
||||
"version": "6.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lsp-client/-/lsp-client-6.1.2.tgz",
|
||||
"integrity": "sha512-ZmrIGhXJq7QXKy9er2enVZ9aSjDx9N9x/AByTsLYpoM01VBeo4MN9JvwjyiG7m36TFUHkHO/qY/hN8AvDjU7UQ==",
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lsp-client/-/lsp-client-6.2.0.tgz",
|
||||
"integrity": "sha512-RHUgJCiuthJpIqXefsr1fKNWarC0tBLQ7anh2UynVRYhXHXt0OwP/pIGcMUOMCVVuKB/tmy//2Yp7WbLKorksA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.18.6",
|
||||
|
|
@ -533,9 +547,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@lezer/highlight": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.2.tgz",
|
||||
"integrity": "sha512-z8TQwaBXXQIvG6i2g3e9cgMwUUXu9Ib7jo2qRRggdhwKpM56Dw3PM3wmexn+EGaaOZ7az0K7sjc3/gcGW7sz7A==",
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz",
|
||||
"integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@lezer/common": "^1.3.0"
|
||||
|
|
@ -725,9 +739,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@rollup/plugin-typescript": {
|
||||
"version": "12.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.4.tgz",
|
||||
"integrity": "sha512-s5Hx+EtN60LMlDBvl5f04bEiFZmAepk27Q+mr85L/00zPDn1jtzlTV6FWn81MaIwqfWzKxmOJrBWHU6vtQyedQ==",
|
||||
"version": "12.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.3.0.tgz",
|
||||
"integrity": "sha512-7DP0/p7y3t67+NabT9f8oTBFE6gGkto4SA6Np2oudYmZE/m1dt8RB0SjL1msMxFpLo631qjRCcBlAbq1ml/Big==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -1140,21 +1154,21 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@zenfs/dom": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/@zenfs/dom/-/dom-1.1.7.tgz",
|
||||
"integrity": "sha512-16FlIIBCeWEGr/As+1eRLZw0w2IDQAbXiVzFQqrfw7R2yd60jUpeiT6JYzsyzX2jChDcNg3sQ5cvnj2hPZgs8w==",
|
||||
"license": "MIT",
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/@zenfs/dom/-/dom-1.2.5.tgz",
|
||||
"integrity": "sha512-DdQzmROGvgen3JmBVdovnaIyAexPPlCNJ5Tb0e48N8W9TQJA5IuVsBgohBKGwDiGEDPquEMxzoycFD4RC6kjzA==",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
"node": ">= 22"
|
||||
},
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/james-pre"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@zenfs/core": "^2.1.0",
|
||||
"@zenfs/core": "^2.3.11",
|
||||
"kerium": "^1.3.4",
|
||||
"utilium": "^2.0.0"
|
||||
"utilium": "^2.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
|
|
@ -1176,9 +1190,9 @@
|
|||
"license": "BSD-3-Clause"
|
||||
},
|
||||
"node_modules/ace-linters": {
|
||||
"version": "1.8.4",
|
||||
"resolved": "https://registry.npmjs.org/ace-linters/-/ace-linters-1.8.4.tgz",
|
||||
"integrity": "sha512-hcJvFeXxStKx1OW4BGPmf8HcQup3+TUhe84UNLkxem2SicrxbbkRwKYV0VHmjOcCWj0gymPnsCl3X8h/09ALlw==",
|
||||
"version": "1.8.5",
|
||||
"resolved": "https://registry.npmjs.org/ace-linters/-/ace-linters-1.8.5.tgz",
|
||||
"integrity": "sha512-obRrUTmPez9odXVTeP8QvNSvVGbWxlrYF2+kFsq2MfCfzwWZxo5P7Y9Z/uLDDsAs1yyzKEDaIbUr7UYyeEAUcg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"vscode-languageserver-protocol": "^3.17.5",
|
||||
|
|
@ -1574,9 +1588,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.30.19",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz",
|
||||
"integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==",
|
||||
"version": "0.30.21",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",
|
||||
"integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
@ -2033,9 +2047,9 @@
|
|||
"license": "MIT"
|
||||
},
|
||||
"node_modules/utilium": {
|
||||
"version": "2.5.3",
|
||||
"resolved": "https://registry.npmjs.org/utilium/-/utilium-2.5.3.tgz",
|
||||
"integrity": "sha512-iJ4JVfjNGKJEcYYv5deZ/4cOQtBFZEzfpgA6BX0Qva2ax73Uy2LBbbDKVQQorZxUtq3EHdX01p94oc78/8SEew==",
|
||||
"version": "2.5.7",
|
||||
"resolved": "https://registry.npmjs.org/utilium/-/utilium-2.5.7.tgz",
|
||||
"integrity": "sha512-8F/HW+6g4v6k3yYR1bhSG+OVnoxjbuZeelLa4IyyNdwFaqGj8HpxKdOQf07xmB2jWIuUs1sq2wXcsqiERRWvEA==",
|
||||
"license": "LGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"eventemitter3": "^5.0.1"
|
||||
|
|
@ -2043,6 +2057,9 @@
|
|||
"bin": {
|
||||
"lice": "scripts/lice.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://github.com/sponsors/james-pre"
|
||||
|
|
|
|||
24
package.json
24
package.json
|
|
@ -1,22 +1,22 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"@codemirror/commands": "^6.8.1",
|
||||
"@codemirror/commands": "^6.10.0",
|
||||
"@codemirror/lang-javascript": "^6.2.4",
|
||||
"@codemirror/lang-markdown": "^6.3.4",
|
||||
"@codemirror/lang-markdown": "^6.5.0",
|
||||
"@codemirror/lang-xml": "^6.1.0",
|
||||
"@codemirror/language-data": "^6.5.1",
|
||||
"@codemirror/legacy-modes": "^6.5.1",
|
||||
"@codemirror/lint": "^6.8.5",
|
||||
"@codemirror/lsp-client": "^6.1.1",
|
||||
"@codemirror/language-data": "^6.5.2",
|
||||
"@codemirror/legacy-modes": "^6.5.2",
|
||||
"@codemirror/lint": "^6.9.1",
|
||||
"@codemirror/lsp-client": "^6.2.0",
|
||||
"@codemirror/search": "^6.5.11",
|
||||
"@codemirror/theme-one-dark": "^6.1.0",
|
||||
"@codemirror/view": "^6.38.1",
|
||||
"@codemirror/theme-one-dark": "^6.1.3",
|
||||
"@codemirror/view": "^6.38.6",
|
||||
"@replit/codemirror-minimap": "^0.5.2",
|
||||
"@zenfs/core": "^2.4.2",
|
||||
"@zenfs/dom": "^1.1.7",
|
||||
"ace-builds": "^1.43.2",
|
||||
"ace-linters": "^1.8.3",
|
||||
"beercss": "^3.12.3"
|
||||
"@zenfs/dom": "^1.2.5",
|
||||
"ace-builds": "^1.43.4",
|
||||
"ace-linters": "^1.8.5",
|
||||
"beercss": "^3.12.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||
|
|
|
|||
|
|
@ -19,14 +19,15 @@ as element(*){
|
|||
:concrete to abstract: simplify by omitting elements with only one child
|
||||
:)
|
||||
declare function ast:flatten($input as element()) as element() {
|
||||
if (1=count($input/*)) then ast:flatten($input/*)
|
||||
if (1=count($input/*))
|
||||
then ast:flatten($input/*)
|
||||
else element {node-name($input) }
|
||||
{$input/@*,
|
||||
for $child in $input/node()
|
||||
return
|
||||
if ($child instance of element())
|
||||
then ast:flatten($child)
|
||||
else $child
|
||||
if ($child instance of element())
|
||||
then ast:flatten($child)
|
||||
else $child
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -16684,6 +16684,7 @@ var lsp = (function (exports) {
|
|||
diagnostics = diagnosticFilter(diagnostics, state);
|
||||
let sorted = diagnostics.slice().sort((a, b) => a.from - b.from || a.to - b.to);
|
||||
let deco = new RangeSetBuilder(), active = [], pos = 0;
|
||||
let scan = state.doc.iter(), scanPos = 0;
|
||||
for (let i = 0;;) {
|
||||
let next = i == sorted.length ? null : sorted[i];
|
||||
if (!next && !active.length)
|
||||
|
|
@ -16711,8 +16712,30 @@ var lsp = (function (exports) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
let widget = false;
|
||||
if (active.some(d => d.from == from && d.to == to)) {
|
||||
widget = from == to;
|
||||
if (!widget && to - from < 10) {
|
||||
let behind = from - (scanPos + scan.value.length);
|
||||
if (behind > 0) {
|
||||
scan.next(behind);
|
||||
scanPos = from;
|
||||
}
|
||||
for (let check = from;;) {
|
||||
if (check >= to) {
|
||||
widget = true;
|
||||
break;
|
||||
}
|
||||
if (!scan.lineBreak && scanPos + scan.value.length > check)
|
||||
break;
|
||||
check = scanPos + scan.value.length;
|
||||
scanPos += scan.value.length;
|
||||
scan.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
let sev = maxSeverity(active);
|
||||
if (active.some(d => d.from == d.to || (d.from == d.to - 1 && state.doc.lineAt(d.from).to == d.from))) {
|
||||
if (widget) {
|
||||
deco.add(from, from, Decoration.widget({
|
||||
widget: new DiagnosticWidget(sev),
|
||||
diagnostics: active.slice()
|
||||
|
|
@ -19464,7 +19487,7 @@ var lsp = (function (exports) {
|
|||
combine(a, b) {
|
||||
let cur, root, take;
|
||||
while (a || b) {
|
||||
if (!a || a.depth > b.depth) {
|
||||
if (!a || b && a.depth >= b.depth) {
|
||||
take = b;
|
||||
b = b.next;
|
||||
}
|
||||
|
|
@ -19472,6 +19495,8 @@ var lsp = (function (exports) {
|
|||
take = a;
|
||||
a = a.next;
|
||||
}
|
||||
if (cur && cur.mode == take.mode && !take.context && !cur.context)
|
||||
continue;
|
||||
let copy = new Rule(take.tags, take.mode, take.context);
|
||||
if (cur)
|
||||
cur.next = copy;
|
||||
|
|
@ -24221,7 +24246,7 @@ var lsp = (function (exports) {
|
|||
}
|
||||
}
|
||||
|
||||
const completionConfig = /*@__PURE__*/Facet.define({
|
||||
const completionConfig$1 = /*@__PURE__*/Facet.define({
|
||||
combine(configs) {
|
||||
return combineConfig(configs, {
|
||||
activateOnTyping: true,
|
||||
|
|
@ -24363,7 +24388,7 @@ var lsp = (function (exports) {
|
|||
this.currentClass = "";
|
||||
let cState = view.state.field(stateField);
|
||||
let { options, selected } = cState.open;
|
||||
let config = view.state.facet(completionConfig);
|
||||
let config = view.state.facet(completionConfig$1);
|
||||
this.optionContent = optionContent(config);
|
||||
this.optionClass = config.optionClass;
|
||||
this.tooltipClass = config.tooltipClass;
|
||||
|
|
@ -24383,7 +24408,7 @@ var lsp = (function (exports) {
|
|||
});
|
||||
this.dom.addEventListener("focusout", (e) => {
|
||||
let state = view.state.field(this.stateField, false);
|
||||
if (state && state.tooltip && view.state.facet(completionConfig).closeOnBlur &&
|
||||
if (state && state.tooltip && view.state.facet(completionConfig$1).closeOnBlur &&
|
||||
e.relatedTarget != view.contentDOM)
|
||||
view.dispatch({ effects: closeCompletionEffect.of(null) });
|
||||
});
|
||||
|
|
@ -24407,7 +24432,7 @@ var lsp = (function (exports) {
|
|||
if (cState != prevState) {
|
||||
let { options, selected, disabled } = cState.open;
|
||||
if (!prevState.open || prevState.open.options != options) {
|
||||
this.range = rangeAroundSelected(options.length, selected, update.state.facet(completionConfig).maxRenderedOptions);
|
||||
this.range = rangeAroundSelected(options.length, selected, update.state.facet(completionConfig$1).maxRenderedOptions);
|
||||
this.showOptions(options, cState.id);
|
||||
}
|
||||
this.updateSel();
|
||||
|
|
@ -24435,10 +24460,11 @@ var lsp = (function (exports) {
|
|||
updateSel() {
|
||||
let cState = this.view.state.field(this.stateField), open = cState.open;
|
||||
if (open.selected > -1 && open.selected < this.range.from || open.selected >= this.range.to) {
|
||||
this.range = rangeAroundSelected(open.options.length, open.selected, this.view.state.facet(completionConfig).maxRenderedOptions);
|
||||
this.range = rangeAroundSelected(open.options.length, open.selected, this.view.state.facet(completionConfig$1).maxRenderedOptions);
|
||||
this.showOptions(open.options, cState.id);
|
||||
}
|
||||
if (this.updateSelectedOption(open.selected)) {
|
||||
let newSel = this.updateSelectedOption(open.selected);
|
||||
if (newSel) {
|
||||
this.destroyInfo();
|
||||
let { completion } = open.options[open.selected];
|
||||
let { info } = completion;
|
||||
|
|
@ -24455,6 +24481,7 @@ var lsp = (function (exports) {
|
|||
}
|
||||
else {
|
||||
this.addInfoPane(infoResult, completion);
|
||||
newSel.setAttribute("aria-describedby", this.info.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -24462,6 +24489,7 @@ var lsp = (function (exports) {
|
|||
this.destroyInfo();
|
||||
let wrap = this.info = document.createElement("div");
|
||||
wrap.className = "cm-tooltip cm-completionInfo";
|
||||
wrap.id = "cm-completionInfo-" + Math.floor(Math.random() * 0xffff).toString(16);
|
||||
if (content.nodeType != null) {
|
||||
wrap.appendChild(content);
|
||||
this.infoDestroy = null;
|
||||
|
|
@ -24487,8 +24515,10 @@ var lsp = (function (exports) {
|
|||
}
|
||||
}
|
||||
else {
|
||||
if (opt.hasAttribute("aria-selected"))
|
||||
if (opt.hasAttribute("aria-selected")) {
|
||||
opt.removeAttribute("aria-selected");
|
||||
opt.removeAttribute("aria-describedby");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (set)
|
||||
|
|
@ -24510,7 +24540,7 @@ var lsp = (function (exports) {
|
|||
if (selRect.top > Math.min(space.bottom, listRect.bottom) - 10 ||
|
||||
selRect.bottom < Math.max(space.top, listRect.top) + 10)
|
||||
return null;
|
||||
return this.view.state.facet(completionConfig).positionInfo(this.view, listRect, selRect, infoRect, space, this.dom);
|
||||
return this.view.state.facet(completionConfig$1).positionInfo(this.view, listRect, selRect, infoRect, space, this.dom);
|
||||
}
|
||||
placeInfo(pos) {
|
||||
if (this.info) {
|
||||
|
|
@ -24614,7 +24644,7 @@ var lsp = (function (exports) {
|
|||
sections.push(typeof section == "string" ? { name } : section);
|
||||
}
|
||||
};
|
||||
let conf = state.facet(completionConfig);
|
||||
let conf = state.facet(completionConfig$1);
|
||||
for (let a of active)
|
||||
if (a.hasResult()) {
|
||||
let getMatch = a.result.getMatch;
|
||||
|
|
@ -24690,7 +24720,7 @@ var lsp = (function (exports) {
|
|||
let options = sortOptions(active, state);
|
||||
if (!options.length)
|
||||
return prev && active.some(a => a.isPending) ? prev.setDisabled() : null;
|
||||
let selected = state.facet(completionConfig).selectOnOpen ? 0 : -1;
|
||||
let selected = state.facet(completionConfig$1).selectOnOpen ? 0 : -1;
|
||||
if (prev && prev.selected != selected && prev.selected != -1) {
|
||||
let selectedValue = prev.options[prev.selected].completion;
|
||||
for (let i = 0; i < options.length; i++)
|
||||
|
|
@ -24722,7 +24752,7 @@ var lsp = (function (exports) {
|
|||
return new CompletionState(none, "cm-ac-" + Math.floor(Math.random() * 2e6).toString(36), null);
|
||||
}
|
||||
update(tr) {
|
||||
let { state } = tr, conf = state.facet(completionConfig);
|
||||
let { state } = tr, conf = state.facet(completionConfig$1);
|
||||
let sources = conf.override ||
|
||||
state.languageDataAt("autocomplete", cur(state)).map(asSource);
|
||||
let active = sources.map(source => {
|
||||
|
|
@ -24909,7 +24939,7 @@ var lsp = (function (exports) {
|
|||
return (view) => {
|
||||
let cState = view.state.field(completionState, false);
|
||||
if (!cState || !cState.open || cState.open.disabled ||
|
||||
Date.now() - cState.open.timestamp < view.state.facet(completionConfig).interactionDelay)
|
||||
Date.now() - cState.open.timestamp < view.state.facet(completionConfig$1).interactionDelay)
|
||||
return false;
|
||||
let step = 1, tooltip;
|
||||
if (by == "page" && (tooltip = getTooltip(view, cState.open.tooltip)))
|
||||
|
|
@ -24931,7 +24961,7 @@ var lsp = (function (exports) {
|
|||
const acceptCompletion = (view) => {
|
||||
let cState = view.state.field(completionState, false);
|
||||
if (view.state.readOnly || !cState || !cState.open || cState.open.selected < 0 || cState.open.disabled ||
|
||||
Date.now() - cState.open.timestamp < view.state.facet(completionConfig).interactionDelay)
|
||||
Date.now() - cState.open.timestamp < view.state.facet(completionConfig$1).interactionDelay)
|
||||
return false;
|
||||
return applyCompletion(view, cState.open.options[cState.open.selected]);
|
||||
};
|
||||
|
|
@ -24981,7 +25011,7 @@ var lsp = (function (exports) {
|
|||
}
|
||||
update(update) {
|
||||
let cState = update.state.field(completionState);
|
||||
let conf = update.state.facet(completionConfig);
|
||||
let conf = update.state.facet(completionConfig$1);
|
||||
if (!update.selectionSet && !update.docChanged && update.startState.field(completionState) == cState)
|
||||
return;
|
||||
let doesReset = update.transactions.some(tr => {
|
||||
|
|
@ -25032,7 +25062,7 @@ var lsp = (function (exports) {
|
|||
this.startQuery(active);
|
||||
}
|
||||
if (this.running.length && cState.open && cState.open.disabled)
|
||||
this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(completionConfig).updateSyncTime);
|
||||
this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(completionConfig$1).updateSyncTime);
|
||||
}
|
||||
startQuery(active) {
|
||||
let { state } = this.view, pos = cur(state);
|
||||
|
|
@ -25053,7 +25083,7 @@ var lsp = (function (exports) {
|
|||
if (this.running.every(q => q.done !== undefined))
|
||||
this.accept();
|
||||
else if (this.debounceAccept < 0)
|
||||
this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(completionConfig).updateSyncTime);
|
||||
this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(completionConfig$1).updateSyncTime);
|
||||
}
|
||||
// For each finished query in this.running, try to create a result
|
||||
// or, if appropriate, restart the query.
|
||||
|
|
@ -25063,7 +25093,7 @@ var lsp = (function (exports) {
|
|||
clearTimeout(this.debounceAccept);
|
||||
this.debounceAccept = -1;
|
||||
let updated = [];
|
||||
let conf = this.view.state.facet(completionConfig), cState = this.view.state.field(completionState);
|
||||
let conf = this.view.state.facet(completionConfig$1), cState = this.view.state.field(completionState);
|
||||
for (let i = 0; i < this.running.length; i++) {
|
||||
let query = this.running[i];
|
||||
if (query.done === undefined)
|
||||
|
|
@ -25106,7 +25136,7 @@ var lsp = (function (exports) {
|
|||
eventHandlers: {
|
||||
blur(event) {
|
||||
let state = this.view.state.field(completionState, false);
|
||||
if (state && state.tooltip && this.view.state.facet(completionConfig).closeOnBlur) {
|
||||
if (state && state.tooltip && this.view.state.facet(completionConfig$1).closeOnBlur) {
|
||||
let dialog = state.open && getTooltip(this.view, state.open.tooltip);
|
||||
if (!dialog || !dialog.dom.contains(event.relatedTarget))
|
||||
setTimeout(() => this.view.dispatch({ effects: closeCompletionEffect.of(null) }), 10);
|
||||
|
|
@ -25771,7 +25801,7 @@ var lsp = (function (exports) {
|
|||
return [
|
||||
commitCharacters,
|
||||
completionState,
|
||||
completionConfig.of(config),
|
||||
completionConfig$1.of(config),
|
||||
completionPlugin,
|
||||
completionKeymapExt,
|
||||
baseTheme
|
||||
|
|
@ -25799,7 +25829,7 @@ var lsp = (function (exports) {
|
|||
{ key: "PageUp", run: /*@__PURE__*/moveCompletionSelection(false, "page") },
|
||||
{ key: "Enter", run: acceptCompletion }
|
||||
];
|
||||
const completionKeymapExt = /*@__PURE__*/Prec.highest(/*@__PURE__*/keymap.computeN([completionConfig], state => state.facet(completionConfig).defaultKeymap ? [completionKeymap] : []));
|
||||
const completionKeymapExt = /*@__PURE__*/Prec.highest(/*@__PURE__*/keymap.computeN([completionConfig$1], state => state.facet(completionConfig$1).defaultKeymap ? [completionKeymap] : []));
|
||||
|
||||
/**
|
||||
* marked v15.0.12 - a markdown parser
|
||||
|
|
@ -28784,14 +28814,21 @@ ${text}</tr>
|
|||
source.
|
||||
*/
|
||||
function serverCompletion(config = {}) {
|
||||
let result;
|
||||
if (config.override) {
|
||||
return autocompletion({ override: [serverCompletionSource] });
|
||||
result = [autocompletion({ override: [serverCompletionSource] })];
|
||||
}
|
||||
else {
|
||||
let data = [{ autocomplete: serverCompletionSource }];
|
||||
return [autocompletion(), EditorState.languageData.of(() => data)];
|
||||
result = [autocompletion(), EditorState.languageData.of(() => data)];
|
||||
}
|
||||
if (config.validFor)
|
||||
result.push(completionConfig.of({ validFor: config.validFor }));
|
||||
return result;
|
||||
}
|
||||
const completionConfig = /*@__PURE__*/Facet.define({
|
||||
combine: results => results.length ? results[0] : { validFor: null }
|
||||
});
|
||||
function getCompletions(plugin, pos, context, abort) {
|
||||
if (plugin.client.hasCapability("completionProvider") === false)
|
||||
return Promise.resolve(null);
|
||||
|
|
@ -28842,13 +28879,14 @@ ${text}</tr>
|
|||
triggerCharacter: triggerChar,
|
||||
triggerKind: context.explicit ? 1 /* Invoked */ : 2 /* TriggerCharacter */
|
||||
}, context).then(result => {
|
||||
var _a;
|
||||
var _a, _b;
|
||||
if (!result)
|
||||
return null;
|
||||
if (Array.isArray(result))
|
||||
result = { items: result };
|
||||
let { from, to } = completionResultRange(context, result);
|
||||
let defaultCommitChars = (_a = result.itemDefaults) === null || _a === void 0 ? void 0 : _a.commitCharacters;
|
||||
let config = context.state.facet(completionConfig);
|
||||
return {
|
||||
from, to,
|
||||
options: result.items.map(item => {
|
||||
|
|
@ -28871,7 +28909,7 @@ ${text}</tr>
|
|||
return option;
|
||||
}),
|
||||
commitCharacters: defaultCommitChars,
|
||||
validFor: prefixRegexp(result.items),
|
||||
validFor: (_b = config.validFor) !== null && _b !== void 0 ? _b : prefixRegexp(result.items),
|
||||
map: (result, changes) => ({ ...result, from: changes.mapPos(result.from) }),
|
||||
};
|
||||
}, err => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue