@coderline/alphatab-language-server 1.9.0-alpha.1891 → 1.9.0-alpha.1963
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/common.mjs +324 -17
- package/dist/common.mjs.map +1 -1
- package/dist/index.browser.min.mjs +1 -1
- package/dist/index.browser.mjs +1 -1
- package/dist/index.node.min.mjs +1 -1
- package/dist/index.node.mjs +1 -1
- package/dist/server/browser.min.mjs +1 -1
- package/dist/server/browser.mjs +1 -1
- package/dist/server/node.min.mjs +1 -1
- package/dist/server/node.mjs +1 -1
- package/dist/src.mjs +1 -1
- package/package.json +10 -10
package/dist/common.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* alphaTab Language Server v1.9.0-alpha.
|
|
2
|
+
* alphaTab Language Server v1.9.0-alpha.1963 (develop, build 1963)
|
|
3
3
|
*
|
|
4
4
|
* Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
|
|
5
5
|
*
|
|
@@ -30,7 +30,7 @@ var ac = {
|
|
|
30
30
|
\\ks D \\ts 24 16 \\ac r.16 6.3 7.3 9.3 7.3 6.3 | r.16 5.4 7.4 9.4 7.4 5.4 6.3.4{d} 9.6.16 10.6 12.6 10.6 9.6 14.6.4{d} r.16
|
|
31
31
|
`
|
|
32
32
|
};
|
|
33
|
-
alphaTab.model.WhammyType, alphaTab.model.BendStyle, alphaTab.model.GraceType, alphaTab.model.FermataType, alphaTab.importer.alphaTex.AlphaTexAccidentalMode, alphaTab.importer.alphaTex.AlphaTexVoiceMode, alphaTab.model.NoteAccidentalMode, alphaTab.model.BarreShape, alphaTab.model.Ottavia, alphaTab.model.Rasgueado, alphaTab.model.DynamicValue, alphaTab.model.BracketExtendMode, alphaTab.model.TrackNamePolicy, alphaTab.model.TrackNameOrientation, alphaTab.model.TrackNameMode, alphaTab.model.TuningDisplayMode, alphaTab.platform.TextAlign, alphaTab.model.BendType, alphaTab.model.KeySignature, alphaTab.model.KeySignatureType, alphaTab.model.Clef, alphaTab.model.TripletFeel, alphaTab.model.BarLineStyle, alphaTab.model.SimileMark, alphaTab.model.Direction, alphaTab.model.TremoloPickingStyle, alphaTab.model.BarNumberDisplay;
|
|
33
|
+
alphaTab.model.WhammyType, alphaTab.model.BendStyle, alphaTab.model.GraceType, alphaTab.model.FermataType, alphaTab.importer.alphaTex.AlphaTexAccidentalMode, alphaTab.importer.alphaTex.AlphaTexVoiceMode, alphaTab.importer.alphaTex.AlphaTexStaffType, alphaTab.model.NoteAccidentalMode, alphaTab.model.BarreShape, alphaTab.model.Ottavia, alphaTab.model.Rasgueado, alphaTab.model.DynamicValue, alphaTab.model.BracketExtendMode, alphaTab.model.TrackNamePolicy, alphaTab.model.TrackNameOrientation, alphaTab.model.TrackNameMode, alphaTab.model.TuningDisplayMode, alphaTab.platform.TextAlign, alphaTab.model.BendType, alphaTab.model.KeySignature, alphaTab.model.KeySignatureType, alphaTab.model.Clef, alphaTab.model.TripletFeel, alphaTab.model.BarLineStyle, alphaTab.model.SimileMark, alphaTab.model.Direction, alphaTab.model.TremoloPickingStyle, alphaTab.model.BarNumberDisplay, alphaTab.model.StaffPlacement, alphaTab.model.SystemDisplay, alphaTab.TabRhythmMode;
|
|
34
34
|
var alphaTexMappedEnumMapping = {
|
|
35
35
|
WhammyType: {
|
|
36
36
|
None: null,
|
|
@@ -133,6 +133,24 @@ var alphaTexMappedEnumMapping = {
|
|
|
133
133
|
longDescription: "A new voice adds a new voice to the current bar only."
|
|
134
134
|
}
|
|
135
135
|
},
|
|
136
|
+
AlphaTexStaffType: {
|
|
137
|
+
Score: {
|
|
138
|
+
snippet: "score",
|
|
139
|
+
shortDescription: "Standard notation"
|
|
140
|
+
},
|
|
141
|
+
Tabs: {
|
|
142
|
+
snippet: "tabs",
|
|
143
|
+
shortDescription: "Guitar tablature"
|
|
144
|
+
},
|
|
145
|
+
Slash: {
|
|
146
|
+
snippet: "slash",
|
|
147
|
+
shortDescription: "Slash notation"
|
|
148
|
+
},
|
|
149
|
+
Numbered: {
|
|
150
|
+
snippet: "numbered",
|
|
151
|
+
shortDescription: "Numbered notation (Jianpu)"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
136
154
|
NoteAccidentalMode: {
|
|
137
155
|
Default: {
|
|
138
156
|
snippet: "default",
|
|
@@ -892,6 +910,44 @@ var alphaTexMappedEnumMapping = {
|
|
|
892
910
|
snippet: "hide",
|
|
893
911
|
shortDescription: "Hide"
|
|
894
912
|
}
|
|
913
|
+
},
|
|
914
|
+
StaffPlacement: {
|
|
915
|
+
AllStaves: {
|
|
916
|
+
snippet: "allStaves",
|
|
917
|
+
shortDescription: "All staves"
|
|
918
|
+
},
|
|
919
|
+
Primary: {
|
|
920
|
+
snippet: "primary",
|
|
921
|
+
shortDescription: "Only the primary (topmost) staff"
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
SystemDisplay: {
|
|
925
|
+
AllSystems: {
|
|
926
|
+
snippet: "allSystems",
|
|
927
|
+
shortDescription: "All systems"
|
|
928
|
+
},
|
|
929
|
+
FirstSystemOnly: {
|
|
930
|
+
snippet: "firstSystemOnly",
|
|
931
|
+
shortDescription: "Only the first system"
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
TabRhythmMode: {
|
|
935
|
+
Hidden: {
|
|
936
|
+
snippet: "hidden",
|
|
937
|
+
shortDescription: "Hidden"
|
|
938
|
+
},
|
|
939
|
+
ShowWithBeams: {
|
|
940
|
+
snippet: "showWithBeams",
|
|
941
|
+
shortDescription: "Individual beams per beat"
|
|
942
|
+
},
|
|
943
|
+
ShowWithBars: {
|
|
944
|
+
snippet: "showWithBars",
|
|
945
|
+
shortDescription: "Connected bars like standard notation"
|
|
946
|
+
},
|
|
947
|
+
Automatic: {
|
|
948
|
+
snippet: "automatic",
|
|
949
|
+
shortDescription: "Shown if no standard notation is shown"
|
|
950
|
+
}
|
|
895
951
|
}
|
|
896
952
|
};
|
|
897
953
|
function enumParameter(type) {
|
|
@@ -1372,7 +1428,7 @@ var sync = {
|
|
|
1372
1428
|
{
|
|
1373
1429
|
name: "millisecondOffset",
|
|
1374
1430
|
shortDescription: "The absolute millisecond offset within the external media",
|
|
1375
|
-
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.
|
|
1431
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.RequiredAsFloat,
|
|
1376
1432
|
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number
|
|
1377
1433
|
},
|
|
1378
1434
|
{
|
|
@@ -2382,6 +2438,33 @@ function properties(...props) {
|
|
|
2382
2438
|
function metadata(...metadata) {
|
|
2383
2439
|
return new Map(metadata.map((t) => [t.tag.toLowerCase(), t]));
|
|
2384
2440
|
}
|
|
2441
|
+
/**
|
|
2442
|
+
* Creates the signatures for a boolean-like value: no value (= true), `true|false`, `"true"|"false"` or `1|0`.
|
|
2443
|
+
*/
|
|
2444
|
+
function booleanSignatures(name, shortDescription, trueDescription, falseDescription) {
|
|
2445
|
+
const overload = (type, t, f, quote) => ({ parameters: [{
|
|
2446
|
+
name,
|
|
2447
|
+
shortDescription,
|
|
2448
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
|
|
2449
|
+
type,
|
|
2450
|
+
values: [{
|
|
2451
|
+
name: t,
|
|
2452
|
+
snippet: `${quote}${t}${quote}`,
|
|
2453
|
+
shortDescription: trueDescription
|
|
2454
|
+
}, {
|
|
2455
|
+
name: f,
|
|
2456
|
+
snippet: `${quote}${f}${quote}`,
|
|
2457
|
+
shortDescription: falseDescription
|
|
2458
|
+
}]
|
|
2459
|
+
}] });
|
|
2460
|
+
const types = alphaTab.importer.alphaTex.AlphaTexNodeType;
|
|
2461
|
+
return [
|
|
2462
|
+
{ parameters: [] },
|
|
2463
|
+
overload(types.String, "true", "false", "\""),
|
|
2464
|
+
overload(types.Ident, "true", "false", ""),
|
|
2465
|
+
overload(types.Number, "1", "0", "")
|
|
2466
|
+
];
|
|
2467
|
+
}
|
|
2385
2468
|
//#endregion
|
|
2386
2469
|
//#region ../alphatex/src/metadata/staff/chord.ts
|
|
2387
2470
|
var chord = {
|
|
@@ -4226,7 +4309,7 @@ var ah = {
|
|
|
4226
4309
|
shortDescription: "The harmonic value",
|
|
4227
4310
|
longDescription: harmonicValueDocs,
|
|
4228
4311
|
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
|
|
4229
|
-
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.
|
|
4312
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
|
|
4230
4313
|
}] }],
|
|
4231
4314
|
examples: `
|
|
4232
4315
|
C4 {volume 8} D4 E4 {tempo 16} F4
|
|
@@ -4342,7 +4425,7 @@ var fh = {
|
|
|
4342
4425
|
shortDescription: "The harmonic value",
|
|
4343
4426
|
longDescription: harmonicValueDocs,
|
|
4344
4427
|
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
|
|
4345
|
-
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.
|
|
4428
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
|
|
4346
4429
|
}] }],
|
|
4347
4430
|
examples: `
|
|
4348
4431
|
:8 3.3{fh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
|
|
@@ -4517,7 +4600,7 @@ var ph = {
|
|
|
4517
4600
|
shortDescription: "The harmonic value",
|
|
4518
4601
|
longDescription: harmonicValueDocs,
|
|
4519
4602
|
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
|
|
4520
|
-
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.
|
|
4603
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
|
|
4521
4604
|
}] }],
|
|
4522
4605
|
examples: `
|
|
4523
4606
|
:8 3.3{nh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
|
|
@@ -4592,7 +4675,7 @@ var sh = {
|
|
|
4592
4675
|
shortDescription: "The harmonic value",
|
|
4593
4676
|
longDescription: harmonicValueDocs,
|
|
4594
4677
|
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
|
|
4595
|
-
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.
|
|
4678
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
|
|
4596
4679
|
}] }],
|
|
4597
4680
|
examples: `
|
|
4598
4681
|
:8 3.3{nh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
|
|
@@ -4734,11 +4817,33 @@ var string = {
|
|
|
4734
4817
|
property: "string",
|
|
4735
4818
|
snippet: "string",
|
|
4736
4819
|
shortDescription: "Show String Number",
|
|
4737
|
-
longDescription:
|
|
4738
|
-
|
|
4739
|
-
|
|
4820
|
+
longDescription: `
|
|
4821
|
+
Adds an annotation showing the string number of the note above the staff.
|
|
4822
|
+
|
|
4823
|
+
For fretted notes the string is taken from the note value (\`fret.string\`).
|
|
4824
|
+
For pitched notes the string number can be specified explicitly (e.g. string indications in classical guitar music).
|
|
4825
|
+
It is only shown as annotation and has no effect on the playback.
|
|
4826
|
+
`,
|
|
4827
|
+
signatures: [{
|
|
4828
|
+
description: "Show the string number of a fretted note",
|
|
4829
|
+
parameters: []
|
|
4830
|
+
}, {
|
|
4831
|
+
description: "Show the given string number on a pitched note",
|
|
4832
|
+
parameters: [{
|
|
4833
|
+
name: "string",
|
|
4834
|
+
shortDescription: "The string number (1 is the highest string)",
|
|
4835
|
+
longDescription: "The string number to show. Like for fretted notes 1 is the highest string. On staves without tuning a standard 6 string instrument is assumed. Only allowed on pitched notes.",
|
|
4836
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
|
|
4837
|
+
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number
|
|
4838
|
+
}]
|
|
4839
|
+
}],
|
|
4840
|
+
examples: [`
|
|
4740
4841
|
3.3{string} 3.4{string} 3.5{string}
|
|
4741
|
-
`
|
|
4842
|
+
`, `
|
|
4843
|
+
\\tuning piano
|
|
4844
|
+
.
|
|
4845
|
+
a4{string 1} c4{string 2} g3{string 3} e3{string 4}
|
|
4846
|
+
`]
|
|
4742
4847
|
};
|
|
4743
4848
|
//#endregion
|
|
4744
4849
|
//#region ../alphatex/src/properties/note/t.ts
|
|
@@ -4804,7 +4909,7 @@ var th = {
|
|
|
4804
4909
|
shortDescription: "The harmonic value",
|
|
4805
4910
|
longDescription: harmonicValueDocs,
|
|
4806
4911
|
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
|
|
4807
|
-
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.
|
|
4912
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
|
|
4808
4913
|
}] }],
|
|
4809
4914
|
examples: `
|
|
4810
4915
|
:8 3.3{nh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
|
|
@@ -5270,11 +5375,211 @@ var restDisplayPitch = {
|
|
|
5270
5375
|
`
|
|
5271
5376
|
};
|
|
5272
5377
|
//#endregion
|
|
5378
|
+
//#region ../alphatex/src/metadata/bar/barNumber.ts
|
|
5379
|
+
var barNumber = {
|
|
5380
|
+
tag: "\\barNumber",
|
|
5381
|
+
snippet: "\\barNumber ${1:1}$0",
|
|
5382
|
+
shortDescription: "Sets the bar number display.",
|
|
5383
|
+
signatures: [{ parameters: [{
|
|
5384
|
+
name: "text",
|
|
5385
|
+
shortDescription: "THe custom text shown instead of the number",
|
|
5386
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
|
|
5387
|
+
type: alphaTab.importer.alphaTex.AlphaTexNodeType.String,
|
|
5388
|
+
allowAllStringTypes: true
|
|
5389
|
+
}] }, { parameters: [{
|
|
5390
|
+
name: "number",
|
|
5391
|
+
shortDescription: "The new number (affects subsequent counting)",
|
|
5392
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
|
|
5393
|
+
type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
|
|
5394
|
+
allowAllStringTypes: true
|
|
5395
|
+
}] }],
|
|
5396
|
+
examples: [{ tex: `
|
|
5397
|
+
// anacrusis (no number)
|
|
5398
|
+
\\ac
|
|
5399
|
+
C4.1
|
|
5400
|
+
|
|
|
5401
|
+
// standard bar number 1
|
|
5402
|
+
C4
|
|
5403
|
+
|
|
|
5404
|
+
// custom text instead of bar number 2
|
|
5405
|
+
\\barNumber "Hello"
|
|
5406
|
+
C4
|
|
5407
|
+
|
|
|
5408
|
+
// a jump to 10
|
|
5409
|
+
\\barNumber 10
|
|
5410
|
+
C4
|
|
5411
|
+
|
|
|
5412
|
+
// now becomes 11 after the customization before
|
|
5413
|
+
C4
|
|
5414
|
+
` }]
|
|
5415
|
+
};
|
|
5416
|
+
//#endregion
|
|
5417
|
+
//#region ../alphatex/src/staffDisplay.ts
|
|
5418
|
+
/**
|
|
5419
|
+
* Creates the signatures selecting the staff types to which the staff display properties apply.
|
|
5420
|
+
*/
|
|
5421
|
+
function staffDisplayTargetSignatures() {
|
|
5422
|
+
return [{ parameters: [{
|
|
5423
|
+
name: "staffTypes",
|
|
5424
|
+
shortDescription: "The staff types to which the properties apply. If omitted, every property applies to all staff types supporting it.",
|
|
5425
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.ValueListWithoutParenthesis,
|
|
5426
|
+
...enumParameter("AlphaTexStaffType")
|
|
5427
|
+
}] }];
|
|
5428
|
+
}
|
|
5429
|
+
function enumSignatures(name, shortDescription, type) {
|
|
5430
|
+
return [{ parameters: [{
|
|
5431
|
+
name,
|
|
5432
|
+
shortDescription,
|
|
5433
|
+
parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
|
|
5434
|
+
...enumParameter(type)
|
|
5435
|
+
}] }];
|
|
5436
|
+
}
|
|
5437
|
+
function staffDisplayExample(tag, level, props) {
|
|
5438
|
+
const meta = `${tag} { ${props} }`;
|
|
5439
|
+
const bars = [
|
|
5440
|
+
"\\ks D 3.3.4 r 3.3 3.3",
|
|
5441
|
+
"3.3.4 3.3 r 3.3",
|
|
5442
|
+
"\\ts (3 4) \\ks A 3.3.4 3.3 r",
|
|
5443
|
+
"3.3.4 r 3.3"
|
|
5444
|
+
];
|
|
5445
|
+
if (level === "bar") bars[2] = `${meta} ${bars[2]}`;
|
|
5446
|
+
return {
|
|
5447
|
+
options: { display: { layoutMode: "Parchment" } },
|
|
5448
|
+
tex: [
|
|
5449
|
+
level === "score" ? meta : "",
|
|
5450
|
+
"\\track { defaultSystemsLayout 2 }",
|
|
5451
|
+
" \\staff {score tabs}",
|
|
5452
|
+
level === "staff" ? ` ${meta}` : "",
|
|
5453
|
+
` ${bars.join(" | ")}`
|
|
5454
|
+
].filter((l) => l.length > 0).join("\n")
|
|
5455
|
+
};
|
|
5456
|
+
}
|
|
5457
|
+
/**
|
|
5458
|
+
* The elements configured via `<prefix>Visibility`, `<prefix>Placement` and `<prefix>Systems`:
|
|
5459
|
+
* prefix, name, supported staff types, available on bar level.
|
|
5460
|
+
*/
|
|
5461
|
+
var staffDisplayElements = [
|
|
5462
|
+
[
|
|
5463
|
+
"clef",
|
|
5464
|
+
"clef",
|
|
5465
|
+
"`score`, `tabs`",
|
|
5466
|
+
true
|
|
5467
|
+
],
|
|
5468
|
+
[
|
|
5469
|
+
"ks",
|
|
5470
|
+
"key signature",
|
|
5471
|
+
"`score`, `slash`",
|
|
5472
|
+
true
|
|
5473
|
+
],
|
|
5474
|
+
[
|
|
5475
|
+
"ts",
|
|
5476
|
+
"time signature",
|
|
5477
|
+
"`score`, `tabs`, `slash`, `numbered`",
|
|
5478
|
+
true
|
|
5479
|
+
],
|
|
5480
|
+
[
|
|
5481
|
+
"rests",
|
|
5482
|
+
"rests",
|
|
5483
|
+
"`tabs`",
|
|
5484
|
+
false
|
|
5485
|
+
]
|
|
5486
|
+
];
|
|
5487
|
+
/**
|
|
5488
|
+
* Creates the properties of a staff display tag. Every tag gets own definitions as the definitions
|
|
5489
|
+
* are prepared in place and the examples use the tag.
|
|
5490
|
+
*/
|
|
5491
|
+
function staffDisplayProperties(tag, level) {
|
|
5492
|
+
const prop = (property, shortDescription, signatures, value) => ({
|
|
5493
|
+
property,
|
|
5494
|
+
snippet: `${property} $0`,
|
|
5495
|
+
shortDescription,
|
|
5496
|
+
signatures,
|
|
5497
|
+
examples: staffDisplayExample(tag, level, `${property} ${value}`)
|
|
5498
|
+
});
|
|
5499
|
+
const props = [];
|
|
5500
|
+
for (const [prefix, name, staffTypes, barLevel] of staffDisplayElements) {
|
|
5501
|
+
if (level === "bar" && !barLevel) continue;
|
|
5502
|
+
const supported = `Supported staff types: ${staffTypes}.`;
|
|
5503
|
+
props.push(prop(`${prefix}Visibility`, `Show or hide the ${name}. ${supported}`, booleanSignatures("visibility", `Whether the ${name} is shown`, `Show the ${name}`, `Hide the ${name}`), "false"), prop(`${prefix}Placement`, `Show the ${name} on all staves or only on the primary (topmost) staff. ${supported}`, enumSignatures("placement", `On which staves the ${name} is shown`, "StaffPlacement"), "primary"), prop(`${prefix}Systems`, `Show the ${name} on all systems or only on the first system. ${supported}`, enumSignatures("systems", `On which systems the ${name} is shown`, "SystemDisplay"), "firstSystemOnly"));
|
|
5504
|
+
}
|
|
5505
|
+
props.push(prop("barNumber", "Set how bar numbers are shown. Supported staff types: all.", enumSignatures("mode", "The mode to use", "BarNumberDisplay"), "allBars"));
|
|
5506
|
+
if (level !== "bar") props.push(prop("rhythm", "Set how the rhythm notation is shown. Supported staff types: `tabs`.", enumSignatures("mode", "The mode to use", "TabRhythmMode"), "showWithBeams"));
|
|
5507
|
+
return properties(...props);
|
|
5508
|
+
}
|
|
5509
|
+
//#endregion
|
|
5510
|
+
//#region ../alphatex/src/metadata/score/defaultStaffDisplay.ts
|
|
5511
|
+
var defaultStaffDisplay = {
|
|
5512
|
+
tag: "\\defaultStaffDisplay",
|
|
5513
|
+
snippet: "\\defaultStaffDisplay $1 {$2}$0",
|
|
5514
|
+
shortDescription: "Sets how elements are displayed on the staves of the whole song.",
|
|
5515
|
+
longDescription: `
|
|
5516
|
+
Defines the song-wide display of elements like clefs, key signatures, time signatures, rests and bar numbers.
|
|
5517
|
+
|
|
5518
|
+
The arguments select the staff types to which the properties apply. If no staff types are specified, every property applies to all staff types supporting the related element.
|
|
5519
|
+
|
|
5520
|
+
All properties are optional. Properties which are not specified keep their default. The values can be overridden per staff with [\`\\staffDisplay\`](https://alphatab.net/docs/alphatex/staff-metadata#staffdisplay) and per bar with [\`\\barDisplay\`](https://alphatab.net/docs/alphatex/bar-metadata#bardisplay).
|
|
5521
|
+
`,
|
|
5522
|
+
signatures: staffDisplayTargetSignatures(),
|
|
5523
|
+
examples: `
|
|
5524
|
+
\\defaultStaffDisplay { clefPlacement primary }
|
|
5525
|
+
\\defaultStaffDisplay tabs { tsVisibility true tsPlacement allStaves }
|
|
5526
|
+
\\track
|
|
5527
|
+
\\staff {score tabs}
|
|
5528
|
+
3.3.4 3.3 3.3 3.3 | 3.3 3.3 3.3 3.3
|
|
5529
|
+
`,
|
|
5530
|
+
properties: staffDisplayProperties("\\defaultStaffDisplay", "score")
|
|
5531
|
+
};
|
|
5532
|
+
//#endregion
|
|
5533
|
+
//#region ../alphatex/src/metadata/staff/staffDisplay.ts
|
|
5534
|
+
var staffDisplay = {
|
|
5535
|
+
tag: "\\staffDisplay",
|
|
5536
|
+
snippet: "\\staffDisplay $1 {$2}$0",
|
|
5537
|
+
shortDescription: "Sets how elements are displayed on the current staff.",
|
|
5538
|
+
longDescription: `
|
|
5539
|
+
Defines the display of elements like clefs, key signatures, time signatures, rests and bar numbers for the current staff.
|
|
5540
|
+
|
|
5541
|
+
The arguments select the staff types to which the properties apply. If no staff types are specified, every property applies to all staff types supporting the related element.
|
|
5542
|
+
|
|
5543
|
+
All properties are optional. Properties which are not specified are inherited from [\`\\defaultStaffDisplay\`](https://alphatab.net/docs/alphatex/score-metadata#defaultstaffdisplay). The values can be overridden per bar with [\`\\barDisplay\`](https://alphatab.net/docs/alphatex/bar-metadata#bardisplay).
|
|
5544
|
+
`,
|
|
5545
|
+
signatures: staffDisplayTargetSignatures(),
|
|
5546
|
+
examples: `
|
|
5547
|
+
\\track
|
|
5548
|
+
\\staff {score tabs}
|
|
5549
|
+
\\staffDisplay tabs { tsPlacement allStaves rhythm showWithBeams }
|
|
5550
|
+
3.3.4 3.3 3.3 3.3 | 3.3 3.3 3.3 3.3
|
|
5551
|
+
`,
|
|
5552
|
+
properties: staffDisplayProperties("\\staffDisplay", "staff")
|
|
5553
|
+
};
|
|
5554
|
+
//#endregion
|
|
5555
|
+
//#region ../alphatex/src/metadata/bar/barDisplay.ts
|
|
5556
|
+
var barDisplay = {
|
|
5557
|
+
tag: "\\barDisplay",
|
|
5558
|
+
snippet: "\\barDisplay $1 {$2}$0",
|
|
5559
|
+
shortDescription: "Sets how elements are displayed on the current bar.",
|
|
5560
|
+
longDescription: `
|
|
5561
|
+
Defines the display of elements like clefs, key signatures, time signatures and bar numbers for the current bar.
|
|
5562
|
+
|
|
5563
|
+
The arguments select the staff types to which the properties apply. If no staff types are specified, every property applies to all staff types supporting the related element.
|
|
5564
|
+
|
|
5565
|
+
All properties are optional. Properties which are not specified are inherited from [\`\\staffDisplay\`](https://alphatab.net/docs/alphatex/staff-metadata#staffdisplay) and [\`\\defaultStaffDisplay\`](https://alphatab.net/docs/alphatex/score-metadata#defaultstaffdisplay). The values only apply to the bar they are specified on.
|
|
5566
|
+
`,
|
|
5567
|
+
signatures: staffDisplayTargetSignatures(),
|
|
5568
|
+
examples: `
|
|
5569
|
+
\\track
|
|
5570
|
+
\\staff {score tabs}
|
|
5571
|
+
\\ks D 3.3.4 3.3 3.3 3.3 |
|
|
5572
|
+
\\barDisplay score { ksVisibility false } \\ks A 3.3 3.3 3.3 3.3 |
|
|
5573
|
+
3.3 3.3 3.3 3.3
|
|
5574
|
+
`,
|
|
5575
|
+
properties: staffDisplayProperties("\\barDisplay", "bar")
|
|
5576
|
+
};
|
|
5577
|
+
//#endregion
|
|
5273
5578
|
//#region ../alphatex/src/definitions.ts
|
|
5274
5579
|
var structuralMetaData = metadata(track, staff, voice);
|
|
5275
|
-
var scoreMetaData = metadata(title, subtitle, artist, album, words, music, wordsAndMusic, copyright, copyright2, instructions, notices, tab, systemsLayout, defaultSystemsLayout, showDynamics, hideDynamics, useSystemSignSeparator, tuningDisplayMode, multiBarRest, bracketExtendMode, singleTrackTrackNamePolicy, multiTrackTrackNamePolicy, firstSystemTrackNameMode, otherSystemsTrackNameMode, firstSystemTrackNameOrientation, otherSystemsTrackNameOrientation, extendBarLines, chordDiagramsInScore, hideEmptyStaves, hideEmptyStavesInFirstSystem, showSingleStaffBrackets, defaultBarNumberDisplay);
|
|
5276
|
-
var staffMetaData = metadata(tuning, chord, capo, lyrics, articulation, displayTranspose, transpose, instrumentMeta);
|
|
5277
|
-
var 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, voiceMode, barNumberDisplay, beaming);
|
|
5580
|
+
var scoreMetaData = metadata(title, subtitle, artist, album, words, music, wordsAndMusic, copyright, copyright2, instructions, notices, tab, systemsLayout, defaultSystemsLayout, showDynamics, hideDynamics, useSystemSignSeparator, tuningDisplayMode, multiBarRest, bracketExtendMode, singleTrackTrackNamePolicy, multiTrackTrackNamePolicy, firstSystemTrackNameMode, otherSystemsTrackNameMode, firstSystemTrackNameOrientation, otherSystemsTrackNameOrientation, extendBarLines, chordDiagramsInScore, hideEmptyStaves, hideEmptyStavesInFirstSystem, showSingleStaffBrackets, defaultBarNumberDisplay, defaultStaffDisplay);
|
|
5581
|
+
var staffMetaData = metadata(tuning, chord, capo, lyrics, articulation, displayTranspose, transpose, instrumentMeta, staffDisplay);
|
|
5582
|
+
var 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, voiceMode, barNumberDisplay, beaming, barNumber, barDisplay);
|
|
5278
5583
|
var allMetadata = new Map([
|
|
5279
5584
|
...structuralMetaData.entries(),
|
|
5280
5585
|
...scoreMetaData.entries(),
|
|
@@ -5573,8 +5878,10 @@ function createMetaDataCompletions(barIndex, metaData, offset, endOfMetaData) {
|
|
|
5573
5878
|
}));
|
|
5574
5879
|
}
|
|
5575
5880
|
return completions;
|
|
5576
|
-
} else if (offset >= metaData.end.offset)
|
|
5577
|
-
|
|
5881
|
+
} else if (offset >= metaData.end.offset) {
|
|
5882
|
+
if (barIndex === 0) completions.push(...topLevelCompletions);
|
|
5883
|
+
else completions.push(...createMetaDataDocCompletions(structuralMetaData), ...createMetaDataDocCompletions(barMetaData));
|
|
5884
|
+
}
|
|
5578
5885
|
const metaDataDocs = allMetadata.get(`\\${metaData.tag.tag.text.toLowerCase()}`);
|
|
5579
5886
|
if (!metaDataDocs) return completions;
|
|
5580
5887
|
const endOfArguments = metaData.arguments?.closeParenthesis?.start?.offset ?? metaData.arguments?.end?.offset ?? metaData.properties?.start?.offset ?? endOfMetaData;
|