@coderline/alphatab-monaco 1.8.0-alpha.1632 → 1.8.0-alpha.1636
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/dist/alphaTab.monaco.mjs +1 -1
- package/dist/alphatex.mjs +1 -1
- package/dist/lsp.mjs +19 -11
- package/dist/lspMonacoMappings.mjs +1 -1
- package/dist/textmate.mjs +1 -1
- package/dist/types.mjs +1 -1
- package/dist/worker.mjs +38 -2
- package/package.json +3 -3
package/dist/alphaTab.monaco.mjs
CHANGED
package/dist/alphatex.mjs
CHANGED
package/dist/lsp.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* alphaTab Monaco v1.8.0-alpha.
|
|
2
|
+
* alphaTab Monaco v1.8.0-alpha.1636 (develop, build 1636)
|
|
3
3
|
*
|
|
4
4
|
* Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
|
|
5
5
|
*
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
* @license
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { monacoToLspContentChange,
|
|
14
|
+
import { monacoToLspContentChange, monacoToLspCompletionItem, lspToMonacoCompletionItem, monacoToLspCompletionTriggerKind, lspToMonacoHover, monacoToLspSignatureHelp, monacoToLspSignatureHelpTriggerKind, lspToMonacoSignatureHelp, lspToMonacoMarker } from './lspMonacoMappings.mjs';
|
|
15
15
|
import * as monaco from 'monaco-editor';
|
|
16
|
-
import { PositionEncodingKind, InitializeRequest, DidOpenTextDocumentNotification, DidChangeTextDocumentNotification,
|
|
16
|
+
import { PositionEncodingKind, InitializeRequest, DidOpenTextDocumentNotification, DidChangeTextDocumentNotification, CompletionResolveRequest, CompletionRequest, HoverRequest, SignatureHelpRequest, DocumentDiagnosticRequest } from 'vscode-languageserver-protocol';
|
|
17
17
|
import { BrowserMessageReader, BrowserMessageWriter, createProtocolConnection } from 'vscode-languageserver-protocol/browser';
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -100,13 +100,25 @@ async function basicEditorLspIntegration(editor, languageServerWorker, info) {
|
|
|
100
100
|
version: model.getVersionId()
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
|
-
|
|
104
|
-
setupDiagnostics(editor, connection);
|
|
103
|
+
setupDocumentHandlingAndDiagnostics(editor, documentUri, connection);
|
|
105
104
|
setupCompletion(documentUri, info.languageId, connection, initResponse);
|
|
106
105
|
setupHover(documentUri, info.languageId, connection, initResponse);
|
|
107
106
|
setupSignatureHelp(documentUri, info.languageId, connection, initResponse);
|
|
108
107
|
}
|
|
109
|
-
function
|
|
108
|
+
function setupDocumentHandlingAndDiagnostics(editor, documentUri, connection) {
|
|
109
|
+
async function updateDiagnostics() {
|
|
110
|
+
const params = {
|
|
111
|
+
textDocument: {
|
|
112
|
+
uri: documentUri
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const result = await connection.sendRequest(DocumentDiagnosticRequest.type, params);
|
|
116
|
+
if (result.kind === 'unchanged') {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
monaco.editor.setModelMarkers(editor.getModel(), 'lsp', result.items.map(lspToMonacoMarker));
|
|
120
|
+
}
|
|
121
|
+
updateDiagnostics();
|
|
110
122
|
editor.onDidChangeModelContent(async (e) => {
|
|
111
123
|
await connection.sendNotification(DidChangeTextDocumentNotification.type, {
|
|
112
124
|
textDocument: {
|
|
@@ -115,11 +127,7 @@ function setupDocumentHandling(editor, documentUri, connection) {
|
|
|
115
127
|
},
|
|
116
128
|
contentChanges: e.changes.map(monacoToLspContentChange)
|
|
117
129
|
});
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
function setupDiagnostics(editor, connection) {
|
|
121
|
-
connection.onNotification(PublishDiagnosticsNotification.type, e => {
|
|
122
|
-
monaco.editor.setModelMarkers(editor.getModel(), 'lsp', e.diagnostics.map(lspToMonacoMarker));
|
|
130
|
+
await updateDiagnostics();
|
|
123
131
|
});
|
|
124
132
|
}
|
|
125
133
|
function setupHover(documentUri, languageId, connection, initResponse) {
|
package/dist/textmate.mjs
CHANGED
package/dist/types.mjs
CHANGED
package/dist/worker.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* alphaTab Monaco v1.8.0-alpha.
|
|
2
|
+
* alphaTab Monaco v1.8.0-alpha.1636 (develop, build 1636)
|
|
3
3
|
*
|
|
4
4
|
* Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
|
|
5
5
|
*
|
|
@@ -5042,6 +5042,41 @@ const db = {
|
|
|
5042
5042
|
examples: ``
|
|
5043
5043
|
};
|
|
5044
5044
|
|
|
5045
|
+
const extendBarLines = {
|
|
5046
|
+
tag: '\\extendBarLines',
|
|
5047
|
+
snippet: '\\extendBarLines',
|
|
5048
|
+
shortDescription: `Extend the bar lines across staves in the same system.`,
|
|
5049
|
+
signatures: [
|
|
5050
|
+
{
|
|
5051
|
+
parameters: []
|
|
5052
|
+
}
|
|
5053
|
+
],
|
|
5054
|
+
examples: `
|
|
5055
|
+
\\extendBarLines
|
|
5056
|
+
\\track "Piano1"
|
|
5057
|
+
\\staff {score}
|
|
5058
|
+
\\instrument piano
|
|
5059
|
+
C4 D4 E4 F4
|
|
5060
|
+
\\staff {score}
|
|
5061
|
+
\\clef f4 C3 D3 E3 F3
|
|
5062
|
+
\\track "Piano2"
|
|
5063
|
+
\\staff {score}
|
|
5064
|
+
\\instrument piano
|
|
5065
|
+
C4 D4 E4 F4
|
|
5066
|
+
\\track "Flute 1"
|
|
5067
|
+
\\staff { score }
|
|
5068
|
+
\\instrument flute
|
|
5069
|
+
C4 D4 E4 F4
|
|
5070
|
+
\\track "Flute 2"
|
|
5071
|
+
\\staff { score }
|
|
5072
|
+
\\instrument flute
|
|
5073
|
+
\\clef f4 C3 D3 E3 F3
|
|
5074
|
+
\\track "Guitar 1"
|
|
5075
|
+
\\staff { score tabs }
|
|
5076
|
+
0.3.4 2.3.4 5.3.4 7.3.4
|
|
5077
|
+
`
|
|
5078
|
+
};
|
|
5079
|
+
|
|
5045
5080
|
const instrumentMeta = {
|
|
5046
5081
|
tag: '\\instrument',
|
|
5047
5082
|
snippet: '\\instrument "$1"$0',
|
|
@@ -5054,7 +5089,7 @@ const instrumentMeta = {
|
|
|
5054
5089
|
};
|
|
5055
5090
|
|
|
5056
5091
|
const structuralMetaData = metadata(track, staff, voice);
|
|
5057
|
-
const scoreMetaData = metadata(title, subtitle, artist, album, words, music, wordsAndMusic, copyright, copyright2, instructions, notices, tab, systemsLayout, defaultSystemsLayout, showDynamics, hideDynamics, useSystemSignSeparator, multiBarRest, bracketExtendMode, singleTrackTrackNamePolicy, multiTrackTrackNamePolicy, firstSystemTrackNameMode, otherSystemsTrackNameMode, firstSystemTrackNameOrientation, otherSystemsTrackNameOrientation);
|
|
5092
|
+
const scoreMetaData = metadata(title, subtitle, artist, album, words, music, wordsAndMusic, copyright, copyright2, instructions, notices, tab, systemsLayout, defaultSystemsLayout, showDynamics, hideDynamics, useSystemSignSeparator, multiBarRest, bracketExtendMode, singleTrackTrackNamePolicy, multiTrackTrackNamePolicy, firstSystemTrackNameMode, otherSystemsTrackNameMode, firstSystemTrackNameOrientation, otherSystemsTrackNameOrientation, extendBarLines);
|
|
5058
5093
|
const staffMetaData = metadata(tuning, chord, capo, lyrics, articulation, displayTranspose, transpose, instrumentMeta);
|
|
5059
5094
|
const barMetaData = metadata(ts, ro, rc, ae, ks, clef, ottava, tempo, tf, ac, section, jump, ft, simile, barlineLeft, barlineRight, scale, width, sync, accidentals, spd, sph, spu, db);
|
|
5060
5095
|
const allMetadata = new Map([
|
|
@@ -5225,6 +5260,7 @@ function nodeTypesToTypeDocs(parameter) {
|
|
|
5225
5260
|
|
|
5226
5261
|
const topLevelCompletions = [
|
|
5227
5262
|
...createMetaDataDocCompletions(structuralMetaData),
|
|
5263
|
+
...createMetaDataDocCompletions(staffMetaData),
|
|
5228
5264
|
...createMetaDataDocCompletions(scoreMetaData),
|
|
5229
5265
|
...createMetaDataDocCompletions(barMetaData)
|
|
5230
5266
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coderline/alphatab-monaco",
|
|
3
|
-
"version": "1.8.0-alpha.
|
|
3
|
+
"version": "1.8.0-alpha.1636",
|
|
4
4
|
"description": "A Monaco editor integration for alphaTab providing coding assistance for alphaTex.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"guitar",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"test": "mocha"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@coderline/alphatab": "^1.8.0-alpha.
|
|
35
|
-
"@coderline/alphatab-language-server": "^1.8.0-alpha.
|
|
34
|
+
"@coderline/alphatab": "^1.8.0-alpha.1636",
|
|
35
|
+
"@coderline/alphatab-language-server": "^1.8.0-alpha.1636",
|
|
36
36
|
"monaco-editor": "^0.54.0",
|
|
37
37
|
"vscode-languageserver-types": "^3.17.5",
|
|
38
38
|
"vscode-oniguruma": "^2.0.1",
|