[mod] reorg bundles

This commit is contained in:
Andy Bunce 2025-08-25 16:23:51 +01:00
parent c875f70fb4
commit 5ffd6c7630
14 changed files with 611 additions and 199 deletions

View file

@ -102,6 +102,19 @@ function debouncedChangeListener({ delay = 750, onChange }) {
}, delay);
}
});
}
export { createEditorState, createEditorView, openSearchPanel, openLintPanel, languageServerSupport, baseExts, simpleWebSocketTransport, linter, LSPPlugin, setDiagnostics, xqLinter, LSPClient,debouncedChangeListener };
};
function listCommands(view) {
const commands = new Map();
const keymaps = view.state.facet(keymap);
for (let km of keymaps) {
for (let binding of km) {
if (binding.run && binding.run.name ) {
commands.set(binding.run.name ,{key:binding.key,fn:binding.run});
}
}
}
return commands;
};
export { createEditorState, createEditorView, openSearchPanel, openLintPanel, languageServerSupport, baseExts, simpleWebSocketTransport, linter, LSPPlugin, setDiagnostics, xqLinter, LSPClient,debouncedChangeListener,listCommands };

495
package-lock.json generated
View file

@ -9,6 +9,7 @@
"@codemirror/lang-javascript": "^6.1.1",
"@codemirror/lang-markdown": "^6.3.4",
"@codemirror/lang-xml": "^6.1.0",
"@codemirror/language-data": "^6.5.1",
"@codemirror/lint": "^6.8.5",
"@codemirror/lsp-client": "^6.0.0",
"@codemirror/search": "^6.2.3",
@ -49,6 +50,30 @@
"@lezer/common": "^1.1.0"
}
},
"node_modules/@codemirror/lang-angular": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/@codemirror/lang-angular/-/lang-angular-0.1.4.tgz",
"integrity": "sha512-oap+gsltb/fzdlTQWD6BFF4bSLKcDnlxDsLdePiJpCVNKWXSTAbiiQeYI3UmES+BLAdkmIC1WjyztC1pi/bX4g==",
"license": "MIT",
"dependencies": {
"@codemirror/lang-html": "^6.0.0",
"@codemirror/lang-javascript": "^6.1.2",
"@codemirror/language": "^6.0.0",
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.3.3"
}
},
"node_modules/@codemirror/lang-cpp": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/@codemirror/lang-cpp/-/lang-cpp-6.0.3.tgz",
"integrity": "sha512-URM26M3vunFFn9/sm6rzqrBzDgfWuDixp85uTY49wKudToc2jTHUrKIGGKs+QWND+YLofNNZpxcNGRynFJfvgA==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@lezer/cpp": "^1.0.0"
}
},
"node_modules/@codemirror/lang-css": {
"version": "6.3.1",
"resolved": "https://registry.npmjs.org/@codemirror/lang-css/-/lang-css-6.3.1.tgz",
@ -62,6 +87,19 @@
"@lezer/css": "^1.1.7"
}
},
"node_modules/@codemirror/lang-go": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/@codemirror/lang-go/-/lang-go-6.0.1.tgz",
"integrity": "sha512-7fNvbyNylvqCphW9HD6WFnRpcDjr+KXX/FgqXy5H5ZS0eC5edDljukm/yNgYkwTsgp2busdod50AOTIy6Jikfg==",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/language": "^6.6.0",
"@codemirror/state": "^6.0.0",
"@lezer/common": "^1.0.0",
"@lezer/go": "^1.0.0"
}
},
"node_modules/@codemirror/lang-html": {
"version": "6.4.9",
"resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.9.tgz",
@ -79,6 +117,16 @@
"@lezer/html": "^1.3.0"
}
},
"node_modules/@codemirror/lang-java": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-java/-/lang-java-6.0.2.tgz",
"integrity": "sha512-m5Nt1mQ/cznJY7tMfQTJchmrjdjQ71IDs+55d1GAa8DGaB8JXWsVCkVT284C3RTASaY43YknrK2X3hPO/J3MOQ==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@lezer/java": "^1.0.0"
}
},
"node_modules/@codemirror/lang-javascript": {
"version": "6.2.4",
"resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.2.4.tgz",
@ -94,6 +142,45 @@
"@lezer/javascript": "^1.0.0"
}
},
"node_modules/@codemirror/lang-json": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-json/-/lang-json-6.0.2.tgz",
"integrity": "sha512-x2OtO+AvwEHrEwR0FyyPtfDUiloG3rnVTSZV1W8UteaLL8/MajQd8DpvUb2YVzC+/T18aSDv0H9mu+xw0EStoQ==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@lezer/json": "^1.0.0"
}
},
"node_modules/@codemirror/lang-less": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-less/-/lang-less-6.0.2.tgz",
"integrity": "sha512-EYdQTG22V+KUUk8Qq582g7FMnCZeEHsyuOJisHRft/mQ+ZSZ2w51NupvDUHiqtsOy7It5cHLPGfHQLpMh9bqpQ==",
"license": "MIT",
"dependencies": {
"@codemirror/lang-css": "^6.2.0",
"@codemirror/language": "^6.0.0",
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@codemirror/lang-liquid": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/@codemirror/lang-liquid/-/lang-liquid-6.3.0.tgz",
"integrity": "sha512-fY1YsUExcieXRTsCiwX/bQ9+PbCTA/Fumv7C7mTUZHoFkibfESnaXwpr2aKH6zZVwysEunsHHkaIpM/pl3xETQ==",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/lang-html": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@codemirror/view": "^6.0.0",
"@lezer/common": "^1.0.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.3.1"
}
},
"node_modules/@codemirror/lang-markdown": {
"version": "6.3.4",
"resolved": "https://registry.npmjs.org/@codemirror/lang-markdown/-/lang-markdown-6.3.4.tgz",
@ -109,6 +196,95 @@
"@lezer/markdown": "^1.0.0"
}
},
"node_modules/@codemirror/lang-php": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-php/-/lang-php-6.0.2.tgz",
"integrity": "sha512-ZKy2v1n8Fc8oEXj0Th0PUMXzQJ0AIR6TaZU+PbDHExFwdu+guzOA4jmCHS1Nz4vbFezwD7LyBdDnddSJeScMCA==",
"license": "MIT",
"dependencies": {
"@codemirror/lang-html": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@lezer/common": "^1.0.0",
"@lezer/php": "^1.0.0"
}
},
"node_modules/@codemirror/lang-python": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/@codemirror/lang-python/-/lang-python-6.2.1.tgz",
"integrity": "sha512-IRjC8RUBhn9mGR9ywecNhB51yePWCGgvHfY1lWN/Mrp3cKuHr0isDKia+9HnvhiWNnMpbGhWrkhuWOc09exRyw==",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.3.2",
"@codemirror/language": "^6.8.0",
"@codemirror/state": "^6.0.0",
"@lezer/common": "^1.2.1",
"@lezer/python": "^1.1.4"
}
},
"node_modules/@codemirror/lang-rust": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-rust/-/lang-rust-6.0.2.tgz",
"integrity": "sha512-EZaGjCUegtiU7kSMvOfEZpaCReowEf3yNidYu7+vfuGTm9ow4mthAparY5hisJqOHmJowVH3Upu+eJlUji6qqA==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@lezer/rust": "^1.0.0"
}
},
"node_modules/@codemirror/lang-sass": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-sass/-/lang-sass-6.0.2.tgz",
"integrity": "sha512-l/bdzIABvnTo1nzdY6U+kPAC51czYQcOErfzQ9zSm9D8GmNPD0WTW8st/CJwBTPLO8jlrbyvlSEcN20dc4iL0Q==",
"license": "MIT",
"dependencies": {
"@codemirror/lang-css": "^6.2.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@lezer/common": "^1.0.2",
"@lezer/sass": "^1.0.0"
}
},
"node_modules/@codemirror/lang-sql": {
"version": "6.9.1",
"resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.9.1.tgz",
"integrity": "sha512-ecSk3gm/mlINcURMcvkCZmXgdzPSq8r/yfCtTB4vgqGGIbBC2IJIAy7GqYTy5pgBEooTVmHP2GZK6Z7h63CDGg==",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@codemirror/lang-vue": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/@codemirror/lang-vue/-/lang-vue-0.1.3.tgz",
"integrity": "sha512-QSKdtYTDRhEHCfo5zOShzxCmqKJvgGrZwDQSdbvCRJ5pRLWBS7pD/8e/tH44aVQT6FKm0t6RVNoSUWHOI5vNug==",
"license": "MIT",
"dependencies": {
"@codemirror/lang-html": "^6.0.0",
"@codemirror/lang-javascript": "^6.1.2",
"@codemirror/language": "^6.0.0",
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.3.1"
}
},
"node_modules/@codemirror/lang-wast": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-wast/-/lang-wast-6.0.2.tgz",
"integrity": "sha512-Imi2KTpVGm7TKuUkqyJ5NRmeFWF7aMpNiwHnLQe0x9kmrxElndyH0K6H/gXtWwY6UshMRAhpENsgfpSwsgmC6Q==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0",
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@codemirror/lang-xml": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/@codemirror/lang-xml/-/lang-xml-6.1.0.tgz",
@ -123,6 +299,21 @@
"@lezer/xml": "^1.0.0"
}
},
"node_modules/@codemirror/lang-yaml": {
"version": "6.1.2",
"resolved": "https://registry.npmjs.org/@codemirror/lang-yaml/-/lang-yaml-6.1.2.tgz",
"integrity": "sha512-dxrfG8w5Ce/QbT7YID7mWZFKhdhsaTNOYjOkSIMt1qmC4VQnXSDSYVHHHn8k6kJUfIhtLo8t1JJgltlxWdsITw==",
"license": "MIT",
"dependencies": {
"@codemirror/autocomplete": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/state": "^6.0.0",
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.2.0",
"@lezer/lr": "^1.0.0",
"@lezer/yaml": "^1.0.0"
}
},
"node_modules/@codemirror/language": {
"version": "6.11.3",
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.11.3.tgz",
@ -137,6 +328,45 @@
"style-mod": "^4.0.0"
}
},
"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==",
"license": "MIT",
"dependencies": {
"@codemirror/lang-angular": "^0.1.0",
"@codemirror/lang-cpp": "^6.0.0",
"@codemirror/lang-css": "^6.0.0",
"@codemirror/lang-go": "^6.0.0",
"@codemirror/lang-html": "^6.0.0",
"@codemirror/lang-java": "^6.0.0",
"@codemirror/lang-javascript": "^6.0.0",
"@codemirror/lang-json": "^6.0.0",
"@codemirror/lang-less": "^6.0.0",
"@codemirror/lang-liquid": "^6.0.0",
"@codemirror/lang-markdown": "^6.0.0",
"@codemirror/lang-php": "^6.0.0",
"@codemirror/lang-python": "^6.0.0",
"@codemirror/lang-rust": "^6.0.0",
"@codemirror/lang-sass": "^6.0.0",
"@codemirror/lang-sql": "^6.0.0",
"@codemirror/lang-vue": "^0.1.1",
"@codemirror/lang-wast": "^6.0.0",
"@codemirror/lang-xml": "^6.0.0",
"@codemirror/lang-yaml": "^6.0.0",
"@codemirror/language": "^6.0.0",
"@codemirror/legacy-modes": "^6.4.0"
}
},
"node_modules/@codemirror/legacy-modes": {
"version": "6.5.1",
"resolved": "https://registry.npmjs.org/@codemirror/legacy-modes/-/legacy-modes-6.5.1.tgz",
"integrity": "sha512-DJYQQ00N1/KdESpZV7jg9hafof/iBNp9h7TYo1SLMk86TWl9uDsVdho2dzd81K+v4retmK6mdC7WpuOQDytQqw==",
"license": "MIT",
"dependencies": {
"@codemirror/language": "^6.0.0"
}
},
"node_modules/@codemirror/lint": {
"version": "6.8.5",
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.8.5.tgz",
@ -263,6 +493,17 @@
"integrity": "sha512-w7ojc8ejBqr2REPsWxJjrMFsA/ysDCFICn8zEOR9mrqzOu2amhITYuLD8ag6XZf0CFXDrhKqw7+tW8cX66NaDA==",
"license": "MIT"
},
"node_modules/@lezer/cpp": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@lezer/cpp/-/cpp-1.1.3.tgz",
"integrity": "sha512-ykYvuFQKGsRi6IcE+/hCSGUhb/I4WPjd3ELhEblm2wS2cOznDFzO+ubK2c+ioysOnlZ3EduV+MVQFCPzAIoY3w==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/css": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.0.tgz",
@ -274,6 +515,17 @@
"@lezer/lr": "^1.3.0"
}
},
"node_modules/@lezer/go": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@lezer/go/-/go-1.0.1.tgz",
"integrity": "sha512-xToRsYxwsgJNHTgNdStpcvmbVuKxTapV0dM0wey1geMMRc9aggoVyKgzYp41D2/vVOx+Ii4hmE206kvxIXBVXQ==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.3.0"
}
},
"node_modules/@lezer/highlight": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.1.tgz",
@ -294,6 +546,17 @@
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/java": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@lezer/java/-/java-1.1.3.tgz",
"integrity": "sha512-yHquUfujwg6Yu4Fd1GNHCvidIvJwi/1Xu2DaKl/pfWIA2c1oXkVvawH3NyXhCaFx4OdlYBVX5wvz2f7Aoa/4Xw==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/javascript": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.1.tgz",
@ -305,6 +568,17 @@
"@lezer/lr": "^1.3.0"
}
},
"node_modules/@lezer/json": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@lezer/json/-/json-1.0.3.tgz",
"integrity": "sha512-BP9KzdF9Y35PDpv04r0VeSTKDeox5vVr3efE7eBbx3r4s3oNLfunchejZhjArmeieBH+nVOpgIiBJpEAv8ilqQ==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/lr": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.2.tgz",
@ -324,6 +598,50 @@
"@lezer/highlight": "^1.0.0"
}
},
"node_modules/@lezer/php": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/@lezer/php/-/php-1.0.4.tgz",
"integrity": "sha512-D2dJ0t8Z28/G1guztRczMFvPDUqzeMLSQbdWQmaiHV7urc8NlEOnjYk9UrZ531OcLiRxD4Ihcbv7AsDpNKDRaQ==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.1.0"
}
},
"node_modules/@lezer/python": {
"version": "1.1.18",
"resolved": "https://registry.npmjs.org/@lezer/python/-/python-1.1.18.tgz",
"integrity": "sha512-31FiUrU7z9+d/ElGQLJFXl+dKOdx0jALlP3KEOsGTex8mvj+SoE1FgItcHWK/axkxCHGUSpqIHt6JAWfWu9Rhg==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/rust": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@lezer/rust/-/rust-1.0.2.tgz",
"integrity": "sha512-Lz5sIPBdF2FUXcWeCu1//ojFAZqzTQNRga0aYv6dYXqJqPfMdCAI0NzajWUd4Xijj1IKJLtjoXRPMvTKWBcqKg==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/sass": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@lezer/sass/-/sass-1.1.0.tgz",
"integrity": "sha512-3mMGdCTUZ/84ArHOuXWQr37pnf7f+Nw9ycPUeKX+wu19b7pSMcZGLbaXwvD2APMBDOGxPmpK/O6S1v1EvLoqgQ==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/xml": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@lezer/xml/-/xml-1.0.6.tgz",
@ -335,6 +653,17 @@
"@lezer/lr": "^1.0.0"
}
},
"node_modules/@lezer/yaml": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@lezer/yaml/-/yaml-1.0.3.tgz",
"integrity": "sha512-GuBLekbw9jDBDhGur82nuwkxKQ+a3W5H0GfaAthDXcAu+XdpS43VlnxA9E9hllkpSP5ellRDKjLLj7Lu9Wr6xA==",
"license": "MIT",
"dependencies": {
"@lezer/common": "^1.2.0",
"@lezer/highlight": "^1.0.0",
"@lezer/lr": "^1.4.0"
}
},
"node_modules/@marijn/find-cluster-break": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.2.tgz",
@ -417,9 +746,9 @@
}
},
"node_modules/@rollup/rollup-android-arm-eabi": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.48.0.tgz",
"integrity": "sha512-aVzKH922ogVAWkKiyKXorjYymz2084zrhrZRXtLrA5eEx5SO8Dj0c/4FpCHZyn7MKzhW2pW4tK28vVr+5oQ2xw==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.48.1.tgz",
"integrity": "sha512-rGmb8qoG/zdmKoYELCBwu7vt+9HxZ7Koos3pD0+sH5fR3u3Wb/jGcpnqxcnWsPEKDUyzeLSqksN8LJtgXjqBYw==",
"cpu": [
"arm"
],
@ -431,9 +760,9 @@
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.48.0.tgz",
"integrity": "sha512-diOdQuw43xTa1RddAFbhIA8toirSzFMcnIg8kvlzRbK26xqEnKJ/vqQnghTAajy2Dcy42v+GMPMo6jq67od+Dw==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.48.1.tgz",
"integrity": "sha512-4e9WtTxrk3gu1DFE+imNJr4WsL13nWbD/Y6wQcyku5qadlKHY3OQ3LJ/INrrjngv2BJIHnIzbqMk1GTAC2P8yQ==",
"cpu": [
"arm64"
],
@ -445,9 +774,9 @@
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.48.0.tgz",
"integrity": "sha512-QhR2KA18fPlJWFefySJPDYZELaVqIUVnYgAOdtJ+B/uH96CFg2l1TQpX19XpUMWUqMyIiyY45wje8K6F4w4/CA==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.48.1.tgz",
"integrity": "sha512-+XjmyChHfc4TSs6WUQGmVf7Hkg8ferMAE2aNYYWjiLzAS/T62uOsdfnqv+GHRjq7rKRnYh4mwWb4Hz7h/alp8A==",
"cpu": [
"arm64"
],
@ -459,9 +788,9 @@
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.48.0.tgz",
"integrity": "sha512-Q9RMXnQVJ5S1SYpNSTwXDpoQLgJ/fbInWOyjbCnnqTElEyeNvLAB3QvG5xmMQMhFN74bB5ZZJYkKaFPcOG8sGg==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.48.1.tgz",
"integrity": "sha512-upGEY7Ftw8M6BAJyGwnwMw91rSqXTcOKZnnveKrVWsMTF8/k5mleKSuh7D4v4IV1pLxKAk3Tbs0Lo9qYmii5mQ==",
"cpu": [
"x64"
],
@ -473,9 +802,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.48.0.tgz",
"integrity": "sha512-3jzOhHWM8O8PSfyft+ghXZfBkZawQA0PUGtadKYxFqpcYlOYjTi06WsnYBsbMHLawr+4uWirLlbhcYLHDXR16w==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.48.1.tgz",
"integrity": "sha512-P9ViWakdoynYFUOZhqq97vBrhuvRLAbN/p2tAVJvhLb8SvN7rbBnJQcBu8e/rQts42pXGLVhfsAP0k9KXWa3nQ==",
"cpu": [
"arm64"
],
@ -487,9 +816,9 @@
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.48.0.tgz",
"integrity": "sha512-NcD5uVUmE73C/TPJqf78hInZmiSBsDpz3iD5MF/BuB+qzm4ooF2S1HfeTChj5K4AV3y19FFPgxonsxiEpy8v/A==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.48.1.tgz",
"integrity": "sha512-VLKIwIpnBya5/saccM8JshpbxfyJt0Dsli0PjXozHwbSVaHTvWXJH1bbCwPXxnMzU4zVEfgD1HpW3VQHomi2AQ==",
"cpu": [
"x64"
],
@ -501,9 +830,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.48.0.tgz",
"integrity": "sha512-JWnrj8qZgLWRNHr7NbpdnrQ8kcg09EBBq8jVOjmtlB3c8C6IrynAJSMhMVGME4YfTJzIkJqvSUSVJRqkDnu/aA==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.48.1.tgz",
"integrity": "sha512-3zEuZsXfKaw8n/yF7t8N6NNdhyFw3s8xJTqjbTDXlipwrEHo4GtIKcMJr5Ed29leLpB9AugtAQpAHW0jvtKKaQ==",
"cpu": [
"arm"
],
@ -515,9 +844,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.48.0.tgz",
"integrity": "sha512-9xu92F0TxuMH0tD6tG3+GtngwdgSf8Bnz+YcsPG91/r5Vgh5LNofO48jV55priA95p3c92FLmPM7CvsVlnSbGQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.48.1.tgz",
"integrity": "sha512-leo9tOIlKrcBmmEypzunV/2w946JeLbTdDlwEZ7OnnsUyelZ72NMnT4B2vsikSgwQifjnJUbdXzuW4ToN1wV+Q==",
"cpu": [
"arm"
],
@ -529,9 +858,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.48.0.tgz",
"integrity": "sha512-NLtvJB5YpWn7jlp1rJiY0s+G1Z1IVmkDuiywiqUhh96MIraC0n7XQc2SZ1CZz14shqkM+XN2UrfIo7JB6UufOA==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.48.1.tgz",
"integrity": "sha512-Vy/WS4z4jEyvnJm+CnPfExIv5sSKqZrUr98h03hpAMbE2aI0aD2wvK6GiSe8Gx2wGp3eD81cYDpLLBqNb2ydwQ==",
"cpu": [
"arm64"
],
@ -543,9 +872,9 @@
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.48.0.tgz",
"integrity": "sha512-QJ4hCOnz2SXgCh+HmpvZkM+0NSGcZACyYS8DGbWn2PbmA0e5xUk4bIP8eqJyNXLtyB4gZ3/XyvKtQ1IFH671vQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.48.1.tgz",
"integrity": "sha512-x5Kzn7XTwIssU9UYqWDB9VpLpfHYuXw5c6bJr4Mzv9kIv242vmJHbI5PJJEnmBYitUIfoMCODDhR7KoZLot2VQ==",
"cpu": [
"arm64"
],
@ -557,9 +886,9 @@
]
},
"node_modules/@rollup/rollup-linux-loongarch64-gnu": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.48.0.tgz",
"integrity": "sha512-Pk0qlGJnhILdIC5zSKQnprFjrGmjfDM7TPZ0FKJxRkoo+kgMRAg4ps1VlTZf8u2vohSicLg7NP+cA5qE96PaFg==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.48.1.tgz",
"integrity": "sha512-yzCaBbwkkWt/EcgJOKDUdUpMHjhiZT/eDktOPWvSRpqrVE04p0Nd6EGV4/g7MARXXeOqstflqsKuXVM3H9wOIQ==",
"cpu": [
"loong64"
],
@ -571,9 +900,9 @@
]
},
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.48.0.tgz",
"integrity": "sha512-/dNFc6rTpoOzgp5GKoYjT6uLo8okR/Chi2ECOmCZiS4oqh3mc95pThWma7Bgyk6/WTEvjDINpiBCuecPLOgBLQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.48.1.tgz",
"integrity": "sha512-UK0WzWUjMAJccHIeOpPhPcKBqax7QFg47hwZTp6kiMhQHeOYJeaMwzeRZe1q5IiTKsaLnHu9s6toSYVUlZ2QtQ==",
"cpu": [
"ppc64"
],
@ -585,9 +914,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.48.0.tgz",
"integrity": "sha512-YBwXsvsFI8CVA4ej+bJF2d9uAeIiSkqKSPQNn0Wyh4eMDY4wxuSp71BauPjQNCKK2tD2/ksJ7uhJ8X/PVY9bHQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.48.1.tgz",
"integrity": "sha512-3NADEIlt+aCdCbWVZ7D3tBjBX1lHpXxcvrLt/kdXTiBrOds8APTdtk2yRL2GgmnSVeX4YS1JIf0imFujg78vpw==",
"cpu": [
"riscv64"
],
@ -599,9 +928,9 @@
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.48.0.tgz",
"integrity": "sha512-FI3Rr2aGAtl1aHzbkBIamsQyuauYtTF9SDUJ8n2wMXuuxwchC3QkumZa1TEXYIv/1AUp1a25Kwy6ONArvnyeVQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.48.1.tgz",
"integrity": "sha512-euuwm/QTXAMOcyiFCcrx0/S2jGvFlKJ2Iro8rsmYL53dlblp3LkUQVFzEidHhvIPPvcIsxDhl2wkBE+I6YVGzA==",
"cpu": [
"riscv64"
],
@ -613,9 +942,9 @@
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.48.0.tgz",
"integrity": "sha512-Dx7qH0/rvNNFmCcIRe1pyQ9/H0XO4v/f0SDoafwRYwc2J7bJZ5N4CHL/cdjamISZ5Cgnon6iazAVRFlxSoHQnQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.48.1.tgz",
"integrity": "sha512-w8mULUjmPdWLJgmTYJx/W6Qhln1a+yqvgwmGXcQl2vFBkWsKGUBRbtLRuKJUln8Uaimf07zgJNxOhHOvjSQmBQ==",
"cpu": [
"s390x"
],
@ -627,9 +956,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.48.0.tgz",
"integrity": "sha512-GUdZKTeKBq9WmEBzvFYuC88yk26vT66lQV8D5+9TgkfbewhLaTHRNATyzpQwwbHIfJvDJ3N9WJ90wK/uR3cy3Q==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.48.1.tgz",
"integrity": "sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==",
"cpu": [
"x64"
],
@ -641,9 +970,9 @@
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.48.0.tgz",
"integrity": "sha512-ao58Adz/v14MWpQgYAb4a4h3fdw73DrDGtaiF7Opds5wNyEQwtO6M9dBh89nke0yoZzzaegq6J/EXs7eBebG8A==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.48.1.tgz",
"integrity": "sha512-2Gu29SkFh1FfTRuN1GR1afMuND2GKzlORQUP3mNMJbqdndOg7gNsa81JnORctazHRokiDzQ5+MLE5XYmZW5VWg==",
"cpu": [
"x64"
],
@ -655,9 +984,9 @@
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.48.0.tgz",
"integrity": "sha512-kpFno46bHtjZVdRIOxqaGeiABiToo2J+st7Yce+aiAoo1H0xPi2keyQIP04n2JjDVuxBN6bSz9R6RdTK5hIppw==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.48.1.tgz",
"integrity": "sha512-6kQFR1WuAO50bxkIlAVeIYsz3RUx+xymwhTo9j94dJ+kmHe9ly7muH23sdfWduD0BA8pD9/yhonUvAjxGh34jQ==",
"cpu": [
"arm64"
],
@ -669,9 +998,9 @@
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.48.0.tgz",
"integrity": "sha512-rFYrk4lLk9YUTIeihnQMiwMr6gDhGGSbWThPEDfBoU/HdAtOzPXeexKi7yU8jO+LWRKnmqPN9NviHQf6GDwBcQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.48.1.tgz",
"integrity": "sha512-RUyZZ/mga88lMI3RlXFs4WQ7n3VyU07sPXmMG7/C1NOi8qisUg57Y7LRarqoGoAiopmGmChUhSwfpvQ3H5iGSQ==",
"cpu": [
"ia32"
],
@ -683,9 +1012,9 @@
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.48.0.tgz",
"integrity": "sha512-sq0hHLTgdtwOPDB5SJOuaoHyiP1qSwg+71TQWk8iDS04bW1wIE0oQ6otPiRj2ZvLYNASLMaTp8QRGUVZ+5OL5A==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.48.1.tgz",
"integrity": "sha512-8a/caCUN4vkTChxkaIJcMtwIVcBhi4X2PQRoT+yCK3qRYaZ7cURrmJFL5Ux9H9RaMIXj9RuihckdmkBX3zZsgg==",
"cpu": [
"x64"
],
@ -1199,9 +1528,9 @@
}
},
"node_modules/rollup": {
"version": "4.48.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.48.0.tgz",
"integrity": "sha512-BXHRqK1vyt9XVSEHZ9y7xdYtuYbwVod2mLwOMFP7t/Eqoc1pHRlG/WdV2qNeNvZHRQdLedaFycljaYYM96RqJQ==",
"version": "4.48.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.48.1.tgz",
"integrity": "sha512-jVG20NvbhTYDkGAty2/Yh7HK6/q3DGSRH4o8ALKGArmMuaauM9kLfoMZ+WliPwA5+JHr2lTn3g557FxBV87ifg==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -1215,26 +1544,26 @@
"npm": ">=8.0.0"
},
"optionalDependencies": {
"@rollup/rollup-android-arm-eabi": "4.48.0",
"@rollup/rollup-android-arm64": "4.48.0",
"@rollup/rollup-darwin-arm64": "4.48.0",
"@rollup/rollup-darwin-x64": "4.48.0",
"@rollup/rollup-freebsd-arm64": "4.48.0",
"@rollup/rollup-freebsd-x64": "4.48.0",
"@rollup/rollup-linux-arm-gnueabihf": "4.48.0",
"@rollup/rollup-linux-arm-musleabihf": "4.48.0",
"@rollup/rollup-linux-arm64-gnu": "4.48.0",
"@rollup/rollup-linux-arm64-musl": "4.48.0",
"@rollup/rollup-linux-loongarch64-gnu": "4.48.0",
"@rollup/rollup-linux-ppc64-gnu": "4.48.0",
"@rollup/rollup-linux-riscv64-gnu": "4.48.0",
"@rollup/rollup-linux-riscv64-musl": "4.48.0",
"@rollup/rollup-linux-s390x-gnu": "4.48.0",
"@rollup/rollup-linux-x64-gnu": "4.48.0",
"@rollup/rollup-linux-x64-musl": "4.48.0",
"@rollup/rollup-win32-arm64-msvc": "4.48.0",
"@rollup/rollup-win32-ia32-msvc": "4.48.0",
"@rollup/rollup-win32-x64-msvc": "4.48.0",
"@rollup/rollup-android-arm-eabi": "4.48.1",
"@rollup/rollup-android-arm64": "4.48.1",
"@rollup/rollup-darwin-arm64": "4.48.1",
"@rollup/rollup-darwin-x64": "4.48.1",
"@rollup/rollup-freebsd-arm64": "4.48.1",
"@rollup/rollup-freebsd-x64": "4.48.1",
"@rollup/rollup-linux-arm-gnueabihf": "4.48.1",
"@rollup/rollup-linux-arm-musleabihf": "4.48.1",
"@rollup/rollup-linux-arm64-gnu": "4.48.1",
"@rollup/rollup-linux-arm64-musl": "4.48.1",
"@rollup/rollup-linux-loongarch64-gnu": "4.48.1",
"@rollup/rollup-linux-ppc64-gnu": "4.48.1",
"@rollup/rollup-linux-riscv64-gnu": "4.48.1",
"@rollup/rollup-linux-riscv64-musl": "4.48.1",
"@rollup/rollup-linux-s390x-gnu": "4.48.1",
"@rollup/rollup-linux-x64-gnu": "4.48.1",
"@rollup/rollup-linux-x64-musl": "4.48.1",
"@rollup/rollup-win32-arm64-msvc": "4.48.1",
"@rollup/rollup-win32-ia32-msvc": "4.48.1",
"@rollup/rollup-win32-x64-msvc": "4.48.1",
"fsevents": "~2.3.2"
}
},

View file

@ -4,6 +4,7 @@
"@codemirror/lang-javascript": "^6.1.1",
"@codemirror/lang-markdown": "^6.3.4",
"@codemirror/lang-xml": "^6.1.0",
"@codemirror/language-data": "^6.5.1",
"@codemirror/lint": "^6.8.5",
"@codemirror/lsp-client": "^6.0.0",
"@codemirror/search": "^6.2.3",
@ -22,11 +23,8 @@
"scripts": {
"build": "rollup src/index.js -m true -f iife -o dist/cm6.bundle.js -p node-resolve,tla --output.name cm6",
"build-cm": "rollup bundles/src/lsp.js -m true -f iife -o webapp/static/clients/codemirror/lsp.bundle.js -p node-resolve,tla --output.name lsp",
"min-cm": "cd webapp/static/clients/codemirror && npx minify lsp.bundle.js > lsp.bundle.min.js ",
"min": "cd dist && npx minify cm6.bundle.js > cm6.bundle.min.js && npx minify lsp.bundle.js > lsp.bundle.min.js",
"javac":"cd bundles/grammar && javac -cp %BASEX12%\\BaseX.jar -d build xq4.java && cd build && jar cf ../../../webapp/custom/xq4.jar . "
"javac": "cd bundles/grammar && javac -cp %BASEX12%\\BaseX.jar -d build xq4.java && cd build && jar cf ../../../webapp/custom/xq4.jar . "
}
}

View file

@ -72,8 +72,9 @@
</div>
<div class="col flex-grow-1" style="overflow: auto;">
<div >
<div class="navbar py-0 bg-light">
<div class="btn-group mr-2" role="group" aria-label="First group">
<label for="file">File:</label>
<input id="iFile" type="url" value="file:///some/file.xqm" />
<select id="language">
@ -83,13 +84,7 @@
<option value="xml">xml</option>
</select>
<label for="symbols">Symbols:</label><select id="symbols" disabled="disabled"></select>
<!-- <div class="btn-group mr-2" role="group" aria-label="First group">
<button type="button" class="btn btn-secondary">1</button>
<button type="button" class="btn btn-secondary">2</button>
<button type="button" class="btn btn-secondary">3</button>
<button type="button" class="btn btn-secondary">4</button>
</div> -->
</div>
<div class="btn-group btn-group-sm " role="group" aria-label="Second group">
<button id="search" type="button" class="btn btn-light"><i class="bi bi-search"></i></button>
<button id="lint" type="button" class="btn btn-light"><i class="bi bi-info-square"></i></button>
@ -98,7 +93,7 @@
</button>
</div>
<div class="btn-group" role="group" aria-label="Third group">
<button type="button" class="btn btn-light" title="Format"><i
<button id="format" type="button" class="btn btn-light" title="Format"><i
class="bi bi-justify-left"></i></button>
<button type="button" class="btn btn-light" popovertarget="popSettings" title="Settings">

View file

@ -27524,80 +27524,6 @@ ${text}</tr>
return line.from + pos.character;
}
const lspTheme = /*@__PURE__*/EditorView.baseTheme({
".cm-lsp-documentation": {
padding: "0 7px",
"& p, & pre": {
margin: "2px 0"
}
},
".cm-lsp-signature-tooltip": {
padding: "2px 6px",
borderRadius: "2.5px",
position: "relative",
maxWidth: "30em",
maxHeight: "10em",
overflowY: "scroll",
"& .cm-lsp-documentation": {
padding: "0",
fontSize: "80%",
},
"& .cm-lsp-signature-num": {
fontFamily: "monospace",
position: "absolute",
left: "2px", top: "4px",
fontSize: "70%",
lineHeight: "1.3"
},
"& .cm-lsp-signature": {
fontFamily: "monospace",
textIndent: "1em hanging",
},
"& .cm-lsp-active-parameter": {
fontWeight: "bold"
},
},
".cm-lsp-signature-multiple": {
paddingLeft: "1.5em"
},
".cm-panel.cm-lsp-rename-panel": {
padding: "2px 6px 4px",
position: "relative",
"& label": { fontSize: "80%" },
"& [name=close]": {
position: "absolute",
top: "0", bottom: "0",
right: "4px",
backgroundColor: "inherit",
border: "none",
font: "inherit",
padding: "0"
}
},
".cm-lsp-message button[type=submit]": {
display: "block"
},
".cm-lsp-reference-panel": {
fontFamily: "monospace",
whiteSpace: "pre",
padding: "3px 6px",
maxHeight: "120px",
overflow: "auto",
"& .cm-lsp-reference-file": {
fontWeight: "bold",
},
"& .cm-lsp-reference": {
cursor: "pointer",
"&[aria-selected]": {
backgroundColor: "#0077ee44"
},
},
"& .cm-lsp-reference-line": {
opacity: "0.7",
},
},
});
/**
A plugin that connects a given editor to a language server client.
*/
@ -27618,6 +27544,7 @@ ${text}</tr>
languageID = lang ? lang.name : "";
}
client.workspace.openFile(uri, languageID, view);
this.syncedDoc = view.state.doc;
this.unsyncedChanges = ChangeSet.empty(view.state.doc.length);
}
/**
@ -27658,6 +27585,7 @@ ${text}</tr>
only be called by a [workspace](https://codemirror.net/6/docs/ref/#lsp-client.Workspace).
*/
clear() {
this.syncedDoc = this.view.state.doc;
this.unsyncedChanges = ChangeSet.empty(this.view.state.doc.length);
}
/**
@ -27680,20 +27608,11 @@ ${text}</tr>
return view.plugin(lspPlugin);
}
/**
Create an editor extension that connects that editor to the
given LSP client. This extension is necessary to use LSP-related
functionality exported by this package. Creating an editor with
this plugin will cause
[`openFile`](https://codemirror.net/6/docs/ref/#lsp-client.Workspace.openFile) to be called on the
workspace.
By default, the language ID given to the server for this file is
derived from the editor's language configuration via
[`Language.name`](https://codemirror.net/6/docs/ref/#language.Language.name). You can pass in
a specific ID as a third parameter.
Deprecated. Use
[`LSPClient.plugin`](https://codemirror.net/6/docs/ref/#lsp-client.LSPClient.plugin) instead.
*/
static create(client, fileURI, languageID) {
return [lspPlugin.of({ client, uri: fileURI, languageID }), lspTheme];
return client.plugin(fileURI, languageID);
}
}
const lspPlugin = /*@__PURE__*/ViewPlugin.fromClass(LSPPlugin);
@ -27822,6 +27741,80 @@ ${text}</tr>
}
}
const lspTheme = /*@__PURE__*/EditorView.baseTheme({
".cm-lsp-documentation": {
padding: "0 7px",
"& p, & pre": {
margin: "2px 0"
}
},
".cm-lsp-signature-tooltip": {
padding: "2px 6px",
borderRadius: "2.5px",
position: "relative",
maxWidth: "30em",
maxHeight: "10em",
overflowY: "scroll",
"& .cm-lsp-documentation": {
padding: "0",
fontSize: "80%",
},
"& .cm-lsp-signature-num": {
fontFamily: "monospace",
position: "absolute",
left: "2px", top: "4px",
fontSize: "70%",
lineHeight: "1.3"
},
"& .cm-lsp-signature": {
fontFamily: "monospace",
textIndent: "1em hanging",
},
"& .cm-lsp-active-parameter": {
fontWeight: "bold"
},
},
".cm-lsp-signature-multiple": {
paddingLeft: "1.5em"
},
".cm-panel.cm-lsp-rename-panel": {
padding: "2px 6px 4px",
position: "relative",
"& label": { fontSize: "80%" },
"& [name=close]": {
position: "absolute",
top: "0", bottom: "0",
right: "4px",
backgroundColor: "inherit",
border: "none",
font: "inherit",
padding: "0"
}
},
".cm-lsp-message button[type=submit]": {
display: "block"
},
".cm-lsp-reference-panel": {
fontFamily: "monospace",
whiteSpace: "pre",
padding: "3px 6px",
maxHeight: "120px",
overflow: "auto",
"& .cm-lsp-reference-file": {
fontWeight: "bold",
},
"& .cm-lsp-reference": {
cursor: "pointer",
"&[aria-selected]": {
backgroundColor: "#0077ee44"
},
},
"& .cm-lsp-reference-line": {
opacity: "0.7",
},
},
});
class Request {
constructor(id, params, timeout) {
this.id = id;
@ -27870,7 +27863,11 @@ ${text}</tr>
implementation: {},
typeDefinition: {},
references: {},
diagnostic: {},
},
window: {
showMessage: {}
}
};
/**
A workspace mapping is used to track changes made to open
@ -27991,10 +27988,21 @@ ${text}</tr>
*/
this.serverCapabilities = null;
this.supportSync = -1;
/**
@internal
*/
this.extensions = [];
this.receiveMessage = this.receiveMessage.bind(this);
this.initializing = new Promise((resolve, reject) => this.init = { resolve, reject });
this.timeout = (_a = config.timeout) !== null && _a !== void 0 ? _a : 3000;
this.workspace = config.workspace ? config.workspace(this) : new DefaultWorkspace(this);
if (config.extensions)
for (let ext of config.extensions) {
if (Array.isArray(ext) || ext.extension)
this.extensions.push(ext);
else if (ext.editorExtension)
this.extensions.push(ext.editorExtension);
}
}
/**
Whether this client is connected (has a transport).
@ -28011,11 +28019,18 @@ ${text}</tr>
this.transport.unsubscribe(this.receiveMessage);
this.transport = transport;
transport.subscribe(this.receiveMessage);
let capabilities = clientCapabilities;
if (this.config.extensions)
for (let ext of this.config.extensions) {
let { clientCapabilities } = ext;
if (clientCapabilities)
capabilities = mergeCapabilities(capabilities, clientCapabilities);
}
this.requestInner("initialize", {
processId: null,
clientInfo: { name: "@codemirror/lsp-client" },
rootUri: this.config.rootUri || null,
capabilities: clientCapabilities
capabilities
}).promise.then(resp => {
var _a;
this.serverCapabilities = resp.capabilities;
@ -28038,6 +28053,30 @@ ${text}</tr>
this.workspace.disconnected();
}
/**
Create a plugin for this client, to add to an editor
configuration. This extension is necessary to use LSP-related
functionality exported by this package. The returned extension
will include the editor
extensions included in this client's
[configuration](https://codemirror.net/6/docs/ref/#lsp-client.LSPClientConfig.extensions).
Creating an editor with this plugin will cause
[`openFile`](https://codemirror.net/6/docs/ref/#lsp-client.Workspace.openFile) to be called on the
workspace.
By default, the language ID given to the server for this file is
derived from the editor's language configuration via
[`Language.name`](https://codemirror.net/6/docs/ref/#language.Language.name). You can pass in
a specific ID as a third parameter.
*/
plugin(fileURI, languageID) {
return [
lspPlugin.of({ client: this, uri: fileURI, languageID }),
lspTheme,
this.extensions
];
}
/**
Send a `textDocument/didOpen` notification to the server.
*/
didOpen(file) {
@ -28078,6 +28117,13 @@ ${text}</tr>
let handler = (_a = this.config.notificationHandlers) === null || _a === void 0 ? void 0 : _a[value.method];
if (handler && handler(this, value.params))
return;
if (this.config.extensions)
for (let ext of this.config.extensions) {
let { notificationHandlers } = ext;
let handler = notificationHandlers === null || notificationHandlers === void 0 ? void 0 : notificationHandlers[value.method];
if (handler && handler(this, value.params))
return;
}
let deflt = defaultNotificationHandlers[value.method];
if (deflt)
deflt(this, value.params);
@ -28214,6 +28260,20 @@ ${text}</tr>
});
return events.reverse();
}
function mergeCapabilities(base, add) {
if (add == null)
return base;
if (typeof base != "object" || typeof add != "object")
return add;
let result = {};
let baseProps = Object.keys(base), addProps = Object.keys(add);
for (let prop of baseProps)
result[prop] = addProps.indexOf(prop) > -1 ? mergeCapabilities(base[prop], add[prop]) : base[prop];
for (let prop of addProps)
if (baseProps.indexOf(prop) < 0)
result[prop] = add[prop];
return result;
}
/**
Register the [language server completion
@ -29072,11 +29132,15 @@ ${text}</tr>
/**
Returns an extension that enables the [LSP
plugin](https://codemirror.net/6/docs/ref/#lsp-client.LSPPlugin) and all other features provided by
this package. You can also pick and choose individual extensions
from the exports. In that case, make sure to also include
[`LSPPlugin.create`](https://codemirror.net/6/docs/ref/#lsp-client.LSPPlugin^create) in your
extensions, or the others will not work.
plugin](https://codemirror.net/6/docs/ref/#lsp-client.LSPPlugin) as well as LSP based
autocompletion, hover tooltips, and signature help, along with the
keymaps for reformatting, renaming symbols, jumping to definition,
and finding references.
This function is deprecated. Prefer to directly use
[`LSPPlugin.create`](https://codemirror.net/6/docs/ref/#lsp-client.LSPPlugin^create) and either add
the extensions you need directly, or configure them in the client
via [`languageServerExtensions`](https://codemirror.net/6/docs/ref/#lsp-client.languageServerExtensions).
*/
function languageServerSupport(client, uri, languageID) {
return [
@ -29084,7 +29148,7 @@ ${text}</tr>
serverCompletion(),
hoverTooltips(),
keymap.of([...formatKeymap, ...renameKeymap, ...jumpToDefinitionKeymap, ...findReferencesKeymap]),
signatureHelp()
signatureHelp(),
];
}
@ -31449,12 +31513,10 @@ ${text}</tr>
if (update.docChanged) {
const currentContent = update.state.doc.toString();
// Clear previous timeout
if (timeoutId) {
clearTimeout(timeoutId);
}
// Set new timeout
timeoutId = setTimeout(() => {
if (currentContent !== lastContent) {
lastContent = currentContent;
@ -31464,6 +31526,18 @@ ${text}</tr>
}
});
}
function listCommands(view) {
const commands = new Map();
const keymaps = view.state.facet(keymap);
for (let km of keymaps) {
for (let binding of km) {
if (binding.run && binding.run.name ) {
commands.set(binding.run.name ,{key:binding.key,fn:binding.run});
}
}
}
return commands;
}
exports.LSPClient = LSPClient;
exports.LSPPlugin = LSPPlugin;
@ -31473,6 +31547,7 @@ ${text}</tr>
exports.debouncedChangeListener = debouncedChangeListener;
exports.languageServerSupport = languageServerSupport;
exports.linter = linter;
exports.listCommands = listCommands;
exports.openLintPanel = openLintPanel;
exports.openSearchPanel = openSearchPanel;
exports.setDiagnostics = setDiagnostics;

File diff suppressed because one or more lines are too long

View file

@ -22,9 +22,11 @@ document.getElementById("connect").onclick = e => {
e.preventDefault()
connect()
};
document.getElementById("search").onclick = e => {
lsp.openSearchPanel(view);
};
$("search").onclick = e => lsp.openSearchPanel(view);
$("format").onclick = e => console.log("CMDS",lsp.listCommands(view));
document.getElementById("lint").onclick = async e => {
console.log("word", view.state.wordAt(1));
const ser = document.getElementById("iServer").value;