@coderline/alphatab-language-server 1.9.0-alpha.1883 → 1.9.0-alpha.1962

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Language Server v1.9.0-alpha.1883 (develop, build 1883)
2
+ * alphaTab Language Server v1.9.0-alpha.1962 (develop, build 1962)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -15,8 +15,6 @@ import { TextDocuments } from "vscode-languageserver";
15
15
  import { DocumentDiagnosticReportKind, PositionEncodingKind, TextDocumentSyncKind } from "vscode-languageserver-protocol";
16
16
  import { TextDocument } from "vscode-languageserver-textdocument";
17
17
  import { CompletionItemKind, DiagnosticSeverity, InsertTextFormat, ParameterInformation, SignatureInformation, TextEdit, uinteger } from "vscode-languageserver-types";
18
- import { BrowserMessageReader, BrowserMessageWriter, createConnection } from "vscode-languageserver/browser";
19
- import { ProposedFeatures, createConnection as createConnection$1 } from "vscode-languageserver/node";
20
18
  //#region ../alphatex/src/metadata/bar/ac.ts
21
19
  var ac = {
22
20
  tag: "\\ac",
@@ -32,7 +30,7 @@ var ac = {
32
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
33
31
  `
34
32
  };
35
- 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;
36
34
  var alphaTexMappedEnumMapping = {
37
35
  WhammyType: {
38
36
  None: null,
@@ -135,6 +133,24 @@ var alphaTexMappedEnumMapping = {
135
133
  longDescription: "A new voice adds a new voice to the current bar only."
136
134
  }
137
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
+ },
138
154
  NoteAccidentalMode: {
139
155
  Default: {
140
156
  snippet: "default",
@@ -894,6 +910,44 @@ var alphaTexMappedEnumMapping = {
894
910
  snippet: "hide",
895
911
  shortDescription: "Hide"
896
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
+ }
897
951
  }
898
952
  };
899
953
  function enumParameter(type) {
@@ -1374,7 +1428,7 @@ var sync = {
1374
1428
  {
1375
1429
  name: "millisecondOffset",
1376
1430
  shortDescription: "The absolute millisecond offset within the external media",
1377
- parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
1431
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.RequiredAsFloat,
1378
1432
  type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number
1379
1433
  },
1380
1434
  {
@@ -2384,6 +2438,33 @@ function properties(...props) {
2384
2438
  function metadata(...metadata) {
2385
2439
  return new Map(metadata.map((t) => [t.tag.toLowerCase(), t]));
2386
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
+ }
2387
2468
  //#endregion
2388
2469
  //#region ../alphatex/src/metadata/staff/chord.ts
2389
2470
  var chord = {
@@ -4228,7 +4309,7 @@ var ah = {
4228
4309
  shortDescription: "The harmonic value",
4229
4310
  longDescription: harmonicValueDocs,
4230
4311
  type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
4231
- parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Optional
4312
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
4232
4313
  }] }],
4233
4314
  examples: `
4234
4315
  C4 {volume 8} D4 E4 {tempo 16} F4
@@ -4344,7 +4425,7 @@ var fh = {
4344
4425
  shortDescription: "The harmonic value",
4345
4426
  longDescription: harmonicValueDocs,
4346
4427
  type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
4347
- parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Optional
4428
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
4348
4429
  }] }],
4349
4430
  examples: `
4350
4431
  :8 3.3{fh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
@@ -4519,7 +4600,7 @@ var ph = {
4519
4600
  shortDescription: "The harmonic value",
4520
4601
  longDescription: harmonicValueDocs,
4521
4602
  type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
4522
- parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Optional
4603
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
4523
4604
  }] }],
4524
4605
  examples: `
4525
4606
  :8 3.3{nh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
@@ -4594,7 +4675,7 @@ var sh = {
4594
4675
  shortDescription: "The harmonic value",
4595
4676
  longDescription: harmonicValueDocs,
4596
4677
  type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
4597
- parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Optional
4678
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
4598
4679
  }] }],
4599
4680
  examples: `
4600
4681
  :8 3.3{nh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
@@ -4736,11 +4817,33 @@ var string = {
4736
4817
  property: "string",
4737
4818
  snippet: "string",
4738
4819
  shortDescription: "Show String Number",
4739
- longDescription: "Adds an annotation showing the string number of the note above the staff.",
4740
- signatures: [{ parameters: [] }],
4741
- examples: `
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: [`
4742
4841
  3.3{string} 3.4{string} 3.5{string}
4743
- `
4842
+ `, `
4843
+ \\tuning piano
4844
+ .
4845
+ a4{string 1} c4{string 2} g3{string 3} e3{string 4}
4846
+ `]
4744
4847
  };
4745
4848
  //#endregion
4746
4849
  //#region ../alphatex/src/properties/note/t.ts
@@ -4806,7 +4909,7 @@ var th = {
4806
4909
  shortDescription: "The harmonic value",
4807
4910
  longDescription: harmonicValueDocs,
4808
4911
  type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number,
4809
- parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Optional
4912
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.OptionalAsFloat
4810
4913
  }] }],
4811
4914
  examples: `
4812
4915
  :8 3.3{nh} 3.3{ah} 3.3{ph} 3.3{th} 3.3{sh}
@@ -5272,11 +5375,211 @@ var restDisplayPitch = {
5272
5375
  `
5273
5376
  };
5274
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
5275
5578
  //#region ../alphatex/src/definitions.ts
5276
5579
  var structuralMetaData = metadata(track, staff, voice);
5277
- 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);
5278
- var staffMetaData = metadata(tuning, chord, capo, lyrics, articulation, displayTranspose, transpose, instrumentMeta);
5279
- 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);
5280
5583
  var allMetadata = new Map([
5281
5584
  ...structuralMetaData.entries(),
5282
5585
  ...scoreMetaData.entries(),
@@ -5575,8 +5878,10 @@ function createMetaDataCompletions(barIndex, metaData, offset, endOfMetaData) {
5575
5878
  }));
5576
5879
  }
5577
5880
  return completions;
5578
- } else if (offset >= metaData.end.offset) if (barIndex === 0) completions.push(...topLevelCompletions);
5579
- else completions.push(...createMetaDataDocCompletions(structuralMetaData), ...createMetaDataDocCompletions(barMetaData));
5881
+ } else if (offset >= metaData.end.offset) {
5882
+ if (barIndex === 0) completions.push(...topLevelCompletions);
5883
+ else completions.push(...createMetaDataDocCompletions(structuralMetaData), ...createMetaDataDocCompletions(barMetaData));
5884
+ }
5580
5885
  const metaDataDocs = allMetadata.get(`\\${metaData.tag.tag.text.toLowerCase()}`);
5581
5886
  if (!metaDataDocs) return completions;
5582
5887
  const endOfArguments = metaData.arguments?.closeParenthesis?.start?.offset ?? metaData.arguments?.end?.offset ?? metaData.properties?.start?.offset ?? endOfMetaData;
@@ -5995,7 +6300,7 @@ function signatureDefinitionToHelp(label, docs, signature) {
5995
6300
  return signatureDocs;
5996
6301
  }
5997
6302
  //#endregion
5998
- //#region src/server/index.ts
6303
+ //#region src/server/common.ts
5999
6304
  function startLanguageServer(serverConnection) {
6000
6305
  const documents = new TextDocuments(TextDocument);
6001
6306
  serverConnection.onInitialize((params) => {
@@ -6022,235 +6327,7 @@ function startLanguageServer(serverConnection) {
6022
6327
  documents.listen(serverConnection);
6023
6328
  serverConnection.listen();
6024
6329
  }
6025
- /**
6026
- * Starts a new language server communicating via WebWorker.
6027
- * @param readerPort The port used to reading incoming language server messages
6028
- * @param writerPort The port used to writer outgoing language server messages
6029
- */
6030
- function startWebWorkerLanguageServer(readerPort, writerPort) {
6031
- startLanguageServer(createConnection(new BrowserMessageReader(readerPort), new BrowserMessageWriter(writerPort)));
6032
- }
6033
- /**
6034
- * Starts a new language server communicating from a Node.js process with a parent Node.js.
6035
- */
6036
- function startNodeLanguageServer() {
6037
- startLanguageServer(createConnection$1(ProposedFeatures.all));
6038
- }
6039
- var alphatex_tmLanguage_default = {
6040
- $schema: "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
6041
- name: "alphaTex",
6042
- scopeName: "source.alphatex",
6043
- uuid: "1ebe68ca-6558-428e-a6af-90831f41e88e",
6044
- patterns: [{ "include": "#statements" }],
6045
- repository: {
6046
- "statements": { "patterns": [
6047
- { "include": "#string" },
6048
- { "include": "#comment" },
6049
- { "include": "#metadata" },
6050
- { "include": "#literal" },
6051
- { "include": "#expression" },
6052
- { "include": "#punctuation-pipe" },
6053
- { "include": "#punctuation-dot" },
6054
- { "include": "#punctuation-at" }
6055
- ] },
6056
- "string": { "patterns": [{ "include": "#qstring-single" }, { "include": "#qstring-double" }] },
6057
- "qstring-single": {
6058
- "name": "string.quoted.single.alphatex",
6059
- "begin": "'",
6060
- "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.alphatex" } },
6061
- "end": "(\\')|((?:[^\\\\\\n])$)",
6062
- "endCaptures": {
6063
- "1": { "name": "punctuation.definition.string.end.alphatex" },
6064
- "2": { "name": "invalid.illegal.newline.alphatex" }
6065
- },
6066
- "patterns": [{ "include": "#string-character-escape" }]
6067
- },
6068
- "qstring-double": {
6069
- "name": "string.quoted.double.alphatex",
6070
- "begin": "\"",
6071
- "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.alphatex" } },
6072
- "end": "(\")|((?:[^\\\\\\n])$)",
6073
- "endCaptures": {
6074
- "1": { "name": "punctuation.definition.string.end.alphatex" },
6075
- "2": { "name": "invalid.illegal.newline.alphatex" }
6076
- },
6077
- "patterns": [{ "include": "#string-character-escape" }]
6078
- },
6079
- "string-character-escape": {
6080
- "name": "constant.character.escape.alphatex",
6081
- "match": "\\\\(u[0-9A-Fa-f]{4}|.|$)"
6082
- },
6083
- "comment": { "patterns": [{
6084
- "name": "comment.block.alphatex",
6085
- "begin": "/\\*",
6086
- "beginCaptures": { "0": { "name": "punctuation.definition.comment.alphatex" } },
6087
- "end": "\\*/",
6088
- "endCaptures": { "0": { "name": "punctuation.definition.comment.alphatex" } }
6089
- }, {
6090
- "begin": "(^[ \\t]+)?(?=//)",
6091
- "beginCaptures": { "1": { "name": "punctuation.whitespace.comment.leading.alphatex" } },
6092
- "end": "(?=$)",
6093
- "patterns": [{
6094
- "name": "comment.line.double-slash.alphatex",
6095
- "begin": "//",
6096
- "beginCaptures": { "0": { "name": "punctuation.definition.comment.alphatex" } },
6097
- "end": "(?=$)"
6098
- }]
6099
- }] },
6100
- "literal": { "patterns": [{ "include": "#numeric-literal" }] },
6101
- "numeric-literal": {
6102
- "name": "constant.numeric.decimal.alphatex",
6103
- "match": "[0-9]+",
6104
- "captures": { "0": { "name": "constant.numeric.decimal.alphatex" } }
6105
- },
6106
- "expression": { "patterns": [
6107
- { "include": "#string" },
6108
- { "include": "#comment" },
6109
- { "include": "#literal" },
6110
- { "include": "#identifier" },
6111
- { "include": "#valueList" },
6112
- { "include": "#properties" },
6113
- { "include": "#punctuation" }
6114
- ] },
6115
- "valueList": {
6116
- "begin": "\\(",
6117
- "beginCaptures": { "0": { "name": "punctuation.definition.value-list.begin.js" } },
6118
- "end": "\\)",
6119
- "endCaptures": { "0": { "name": "punctuation.definition.value-list.end.js" } },
6120
- "patterns": [
6121
- { "include": "#string" },
6122
- { "include": "#comment" },
6123
- { "include": "#literal" },
6124
- { "include": "#identifier" }
6125
- ]
6126
- },
6127
- "properties": {
6128
- "begin": "\\{",
6129
- "beginCaptures": { "0": { "name": "punctuation.definition.properties.begin.js" } },
6130
- "end": "\\}",
6131
- "endCaptures": { "0": { "name": "punctuation.definition.properties.end.js" } },
6132
- "patterns": [
6133
- { "include": "#string" },
6134
- { "include": "#comment" },
6135
- { "include": "#literal" },
6136
- { "include": "#identifier" },
6137
- { "include": "#valueList" }
6138
- ]
6139
- },
6140
- "metadata": {
6141
- "name": "keyword.metadata.alphatex",
6142
- "match": "\\\\{1,2}[^\\s]+",
6143
- "captures": { "0": { "name": "keyword.metadata.alphatex" } }
6144
- },
6145
- "identifier": {
6146
- "name": "variable.identifier.alphatex",
6147
- "match": "[^@/\"'-\\.:\\(\\)\\{\\}\\|\\*\\\\\\s][^@/\"'\\.:\\(\\)\\{\\}\\|\\*\\\\\\s]+",
6148
- "captures": { "0": { "name": "variable.identifier.alphatex" } }
6149
- },
6150
- "punctuation": { "patterns": [
6151
- { "include": "#punctuation-dot" },
6152
- { "include": "#punctuation-pipe" },
6153
- { "include": "#punctuation-asterisk" },
6154
- { "include": "#punctuation-at" }
6155
- ] },
6156
- "punctuation-pipe": {
6157
- "name": "punctuation.bar.alphatex",
6158
- "match": "\\|"
6159
- },
6160
- "punctuation-dot": {
6161
- "name": "punctuation.dot.alphatex",
6162
- "match": "\\."
6163
- },
6164
- "punctuation-asterisk": {
6165
- "name": "punctuation.asterisk.alphatex",
6166
- "match": "\\*"
6167
- },
6168
- "punctuation-at": {
6169
- "name": "punctuation.at.alphatex",
6170
- "match": "@"
6171
- }
6172
- }
6173
- };
6174
- var language_configuration_default = {
6175
- comments: {
6176
- "lineComment": {
6177
- "comment": "//",
6178
- "noIndent": false
6179
- },
6180
- "blockComment": ["/*", "*/"]
6181
- },
6182
- brackets: [
6183
- ["{", "}"],
6184
- ["[", "]"],
6185
- ["(", ")"]
6186
- ],
6187
- autoClosingPairs: [
6188
- {
6189
- "open": "{",
6190
- "close": "}"
6191
- },
6192
- {
6193
- "open": "[",
6194
- "close": "]"
6195
- },
6196
- {
6197
- "open": "(",
6198
- "close": ")"
6199
- },
6200
- {
6201
- "open": "\"",
6202
- "close": "\""
6203
- },
6204
- {
6205
- "open": "'",
6206
- "close": "'"
6207
- }
6208
- ],
6209
- surroundingPairs: [
6210
- {
6211
- "open": "{",
6212
- "close": "}"
6213
- },
6214
- {
6215
- "open": "[",
6216
- "close": "]"
6217
- },
6218
- {
6219
- "open": "(",
6220
- "close": ")"
6221
- },
6222
- {
6223
- "open": "\"",
6224
- "close": "\""
6225
- },
6226
- {
6227
- "open": "'",
6228
- "close": "'"
6229
- }
6230
- ]
6231
- };
6232
- //#endregion
6233
- //#region src/index.ts
6234
- var documentation = {
6235
- structuralMetaData,
6236
- scoreMetaData,
6237
- staffMetaData,
6238
- barMetaData,
6239
- durationChangeProperties,
6240
- beatProperties,
6241
- noteProperties
6242
- };
6243
- /**
6244
- * The TextMate grammar definition as JSON encoded.
6245
- * Write this to a local json (e.g. alphatex.tmLanguage.json ) or pass it to any supported parser for further use.
6246
- */
6247
- var textMateGrammar = alphatex_tmLanguage_default;
6248
- /**
6249
- * The contents of a language-configuration.json to use in editors like VSCode.
6250
- */
6251
- var languageConfiguration = language_configuration_default;
6252
- if (import.meta.main) startNodeLanguageServer();
6253
6330
  //#endregion
6254
- export { documentation, languageConfiguration, startNodeLanguageServer, startWebWorkerLanguageServer, textMateGrammar };
6331
+ export { noteProperties as a, structuralMetaData as c, durationChangeProperties as i, barMetaData as n, scoreMetaData as o, beatProperties as r, staffMetaData as s, startLanguageServer as t };
6255
6332
 
6256
- //# sourceMappingURL=server.mjs.map
6333
+ //# sourceMappingURL=common.mjs.map