@coderline/alphatab-monaco 1.8.0-alpha.1669 → 1.8.0-alpha.1671

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 Monaco v1.8.0-alpha.1669 (develop, build 1669)
2
+ * alphaTab Monaco v1.8.0-alpha.1671 (develop, build 1671)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
package/dist/alphatex.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Monaco v1.8.0-alpha.1669 (develop, build 1669)
2
+ * alphaTab Monaco v1.8.0-alpha.1671 (develop, build 1671)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
package/dist/lsp.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Monaco v1.8.0-alpha.1669 (develop, build 1669)
2
+ * alphaTab Monaco v1.8.0-alpha.1671 (develop, build 1671)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Monaco v1.8.0-alpha.1669 (develop, build 1669)
2
+ * alphaTab Monaco v1.8.0-alpha.1671 (develop, build 1671)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
package/dist/textmate.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Monaco v1.8.0-alpha.1669 (develop, build 1669)
2
+ * alphaTab Monaco v1.8.0-alpha.1671 (develop, build 1671)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
package/dist/types.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Monaco v1.8.0-alpha.1669 (develop, build 1669)
2
+ * alphaTab Monaco v1.8.0-alpha.1671 (develop, build 1671)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
package/dist/worker.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Monaco v1.8.0-alpha.1669 (develop, build 1669)
2
+ * alphaTab Monaco v1.8.0-alpha.1671 (develop, build 1671)
3
3
  *
4
4
  * Copyright © 2026, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -60,7 +60,8 @@ const ac = {
60
60
  BarLineStyle: alphaTab.model.BarLineStyle,
61
61
  SimileMark: alphaTab.model.SimileMark,
62
62
  Direction: alphaTab.model.Direction,
63
- TremoloPickingStyle: alphaTab.model.TremoloPickingStyle
63
+ TremoloPickingStyle: alphaTab.model.TremoloPickingStyle,
64
+ BarNumberDisplay: alphaTab.model.BarNumberDisplay
64
65
  });
65
66
  const alphaTexMappedEnumMapping = {
66
67
  WhammyType: {
@@ -451,6 +452,11 @@ const alphaTexMappedEnumMapping = {
451
452
  TremoloPickingStyle: {
452
453
  Default: { snippet: 'default', shortDescription: 'Default tremolo' },
453
454
  BuzzRoll: { snippet: 'buzzRoll', shortDescription: 'Buzz roll tremolo' }
455
+ },
456
+ BarNumberDisplay: {
457
+ AllBars: { snippet: 'allBars', shortDescription: 'All bars' },
458
+ FirstOfSystem: { snippet: 'firstOfSystem', shortDescription: 'First bar of every system' },
459
+ Hide: { snippet: 'hide', shortDescription: 'Hide' }
454
460
  }
455
461
  };
456
462
  function enumParameter(type) {
@@ -5148,6 +5154,56 @@ const voiceMode = {
5148
5154
  ]
5149
5155
  };
5150
5156
 
5157
+ const defaultBarNumberDisplay = {
5158
+ tag: '\\defaultBarNumberDisplay',
5159
+ snippet: '\\defaultBarNumberDisplay ${1:allBars}$0',
5160
+ shortDescription: 'Sets the display mode for bar numbers on all bars.',
5161
+ signatures: [
5162
+ {
5163
+ parameters: [
5164
+ {
5165
+ name: 'mode',
5166
+ shortDescription: 'The mode to use',
5167
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
5168
+ ...enumParameter('BarNumberDisplay')
5169
+ }
5170
+ ]
5171
+ }
5172
+ ],
5173
+ examples: [
5174
+ {
5175
+ options: { display: { layoutMode: 'Parchment' } },
5176
+ tex: `
5177
+ \\defaultBarNumberDisplay allBars
5178
+ \\title "All Bars"
5179
+ \\track { defaultsystemslayout 3 }
5180
+ C4.1 | C4.1 | C4.1 |
5181
+ C4.1 | C4.1 | C4.1
5182
+ `
5183
+ },
5184
+ {
5185
+ options: { display: { layoutMode: 'Parchment' } },
5186
+ tex: `
5187
+ \\defaultBarNumberDisplay firstOfSystem
5188
+ \\title "First of System"
5189
+ \\track { defaultsystemslayout 3 }
5190
+ C4.1 | C4.1 | C4.1 |
5191
+ C4.1 | C4.1 | C4.1
5192
+ `
5193
+ },
5194
+ {
5195
+ options: { display: { layoutMode: 'Parchment' } },
5196
+ tex: `
5197
+ \\defaultBarNumberDisplay hide
5198
+ \\title "Hide"
5199
+ \\track { defaultsystemslayout 3 }
5200
+ C4.1 | C4.1 | C4.1 |
5201
+ C4.1 | C4.1 | C4.1
5202
+ `
5203
+ }
5204
+ ]
5205
+ };
5206
+
5151
5207
  const chordDiagramsInScore = {
5152
5208
  tag: '\\chordDiagramsInScore',
5153
5209
  snippet: '\\chordDiagramsInScore',
@@ -5301,10 +5357,105 @@ const instrumentMeta = {
5301
5357
  examples: ``
5302
5358
  };
5303
5359
 
5360
+ const barNumberDisplay = {
5361
+ tag: '\\barNumberDisplay',
5362
+ snippet: '\\barNumberDisplay ${1:allBars}$0',
5363
+ shortDescription: 'Sets the display mode for bar numbers.',
5364
+ signatures: [
5365
+ {
5366
+ parameters: [
5367
+ {
5368
+ name: 'mode',
5369
+ shortDescription: 'The mode to use',
5370
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
5371
+ ...enumParameter('BarNumberDisplay')
5372
+ }
5373
+ ]
5374
+ }
5375
+ ],
5376
+ examples: [
5377
+ {
5378
+ options: { display: { layoutMode: 'Parchment' } },
5379
+ tex: `
5380
+ \\defaultBarNumberDisplay hide
5381
+ \\track { defaultsystemslayout 3 }
5382
+ C4.1 | \\barNumberDisplay allBars C4.1 | C4.1 |
5383
+ \\barNumberDisplay firstOfSystem C4.1 | \\barNumberDisplay firstOfSystem C4.1 | C4.1
5384
+ `
5385
+ },
5386
+ {
5387
+ options: { display: { layoutMode: 'Parchment' } },
5388
+ tex: `
5389
+ \\defaultBarNumberDisplay firstOfSystem
5390
+ \\track { defaultsystemslayout 3 }
5391
+ C4.1 | \\barNumberDisplay allBars C4.1 | C4.1 |
5392
+ \\barNumberDisplay hide C4.1 | C4.1 | C4.1
5393
+ `
5394
+ }
5395
+ ]
5396
+ };
5397
+
5398
+ const beaming = {
5399
+ tag: '\\beaming',
5400
+ snippet: '\\beaming ($1 $2) $0',
5401
+ shortDescription: 'Set the time signature',
5402
+ longDescription: `
5403
+ Defines a custom beaming rule defining how beams of certain durations should be beamed.
5404
+
5405
+ To define how beats should be beamed we need 2 parts:
5406
+
5407
+ 1. A duration with which we splitup the bars
5408
+ 2. A list of group sizes defining how many split-parts should be beamed together.
5409
+
5410
+ The beaming rules go hand-in-hand with the time signature as the rules need to properly
5411
+ define the groups for the whole beat.
5412
+
5413
+ Let's take a simple example of a 4/4 time signature. If we want to ensure that the beats within the quarter notes are
5414
+ beamed together we can write variants like this:
5415
+
5416
+ a. \`\\beaming (4 1 1 1 1)\`
5417
+ b. \`\\beaming (8 2 2 2 2)\`
5418
+ c. \`\\beaming (16 4 4 4 4)\`
5419
+
5420
+ We slice the bar into 4, 8 or 16 parts. Then we add "groups" to those parts. If two beats start in the same group, they can be beamed together.
5421
+ Simple as that.
5422
+
5423
+ There are some common guidelines on how beaming "should be done" and alphaTab ships a wide range of defaults. But in case of more specialized time signatures,
5424
+ you can also customize the beaming as you need by slicing the bar and grouping the beats as needed.
5425
+ `,
5426
+ signatures: [
5427
+ {
5428
+ parameters: [
5429
+ {
5430
+ name: 'duration',
5431
+ shortDescription: 'The note duration defining the smallest group size',
5432
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.Required,
5433
+ type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number
5434
+ },
5435
+ {
5436
+ name: 'groups',
5437
+ shortDescription: 'For every group the number of notes contained in the group.',
5438
+ parseMode: alphaTab.importer.alphaTex.ArgumentListParseTypesMode.ValueListWithoutParenthesis,
5439
+ type: alphaTab.importer.alphaTex.AlphaTexNodeType.Number
5440
+ }
5441
+ ]
5442
+ }
5443
+ ],
5444
+ examples: `
5445
+ \\ts (4 4)
5446
+ \\beaming (8 4 2 2)
5447
+ C4.8 * 8 |
5448
+
5449
+ \\ts (4 4)
5450
+ \\beaming (8 4 4)
5451
+ C4.8 * 8
5452
+ `
5453
+ };
5454
+
5304
5455
  const structuralMetaData = metadata(track, staff, voice);
5305
- 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, chordDiagramsInScore, hideEmptyStaves, hideEmptyStavesInFirstSystem, showSingleStaffBrackets);
5456
+ 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, chordDiagramsInScore, hideEmptyStaves, hideEmptyStavesInFirstSystem, showSingleStaffBrackets, defaultBarNumberDisplay);
5306
5457
  const staffMetaData = metadata(tuning, chord, capo, lyrics, articulation, displayTranspose, transpose, instrumentMeta);
5307
- 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, voiceMode);
5458
+ 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, voiceMode, barNumberDisplay, beaming);
5308
5459
  const allMetadata = new Map([
5309
5460
  ...structuralMetaData.entries(),
5310
5461
  ...scoreMetaData.entries(),
@@ -5490,11 +5641,11 @@ function setupCompletion(connection, documents) {
5490
5641
  if (!bar) {
5491
5642
  return sortCompletions(createMetaDataCompletions(barIndex, undefined, offset, Number.MAX_SAFE_INTEGER), connection.console);
5492
5643
  }
5493
- const endOfBar = bar.pipe?.start.offset ??
5644
+ const endOfBar = bar.pipe?.start?.offset ??
5494
5645
  (barIndex === document.ast.bars.length - 1
5495
5646
  ? Number.MAX_SAFE_INTEGER
5496
5647
  : document.ast.bars[barIndex + 1].start.offset);
5497
- const endOfBarMetaData = bar.beats[0]?.start.offset ?? endOfBar;
5648
+ const endOfBarMetaData = bar.beats[0]?.start?.offset ?? endOfBar;
5498
5649
  const metaData = bar ? binaryNodeSearch(bar.metaData, offset, endOfBarMetaData) : undefined;
5499
5650
  if (metaData) {
5500
5651
  const metaDataIndex = bar.metaData.indexOf(metaData);
@@ -5550,14 +5701,14 @@ function createBeatCompletions(beat, offset, endOfBeat) {
5550
5701
  if (beat.durationChange &&
5551
5702
  beat.durationChange.start.offset < offset &&
5552
5703
  offset <= beat.durationChange.end.offset) {
5553
- const endOfDurationChange = beat.notes?.start.offset ?? endOfBeat;
5704
+ const endOfDurationChange = beat.notes?.start?.offset ?? endOfBeat;
5554
5705
  return createDurationChangeCompletions(beat.durationChange, offset, endOfDurationChange);
5555
5706
  }
5556
5707
  if (beat.notes && beat.notes.start.offset < offset && offset <= beat.notes.end.offset) {
5557
- const endOfNotes = beat.notes?.closeParenthesis?.start.offset ??
5558
- beat.durationDot?.start.offset ??
5559
- beat.beatEffects?.start.offset ??
5560
- beat.beatMultiplier?.start.offset ??
5708
+ const endOfNotes = beat.notes?.closeParenthesis?.start?.offset ??
5709
+ beat.durationDot?.start?.offset ??
5710
+ beat.beatEffects?.start?.offset ??
5711
+ beat.beatMultiplier?.start?.offset ??
5561
5712
  endOfBeat;
5562
5713
  const note = binaryNodeSearch(beat.notes.notes, offset, endOfNotes);
5563
5714
  if (note) {
@@ -5588,7 +5739,7 @@ function createBeatCompletions(beat, offset, endOfBeat) {
5588
5739
  })));
5589
5740
  }
5590
5741
  if (beat.beatEffects && beat.beatEffects.start.offset < offset && beat.beatEffects.end.offset) {
5591
- const endOfProperties = beat.beatEffects?.closeBrace?.start.offset ?? beat.beatMultiplier?.start.offset ?? endOfBeat;
5742
+ const endOfProperties = beat.beatEffects?.closeBrace?.start?.offset ?? beat.beatMultiplier?.start?.offset ?? endOfBeat;
5592
5743
  completions.splice(0, 0, ...createPropertiesCompletions(beat.beatEffects, offset, beatProperties, endOfProperties));
5593
5744
  }
5594
5745
  return completions;
@@ -5619,7 +5770,7 @@ function createDurationChangeCompletions(durationChange, offset, endOfDurationCh
5619
5770
  else if (durationChange.properties &&
5620
5771
  durationChange.properties.start.offset < offset &&
5621
5772
  durationChange.properties.end.offset) {
5622
- const endOfProperties = durationChange.properties?.closeBrace?.start.offset ?? endOfDurationChange;
5773
+ const endOfProperties = durationChange.properties?.closeBrace?.start?.offset ?? endOfDurationChange;
5623
5774
  completions.push(...createPropertiesCompletions(durationChange.properties, offset, durationChangeProperties, endOfProperties));
5624
5775
  }
5625
5776
  return completions;
@@ -5627,7 +5778,7 @@ function createDurationChangeCompletions(durationChange, offset, endOfDurationCh
5627
5778
  function createNoteCompletions(beat, note, offset, endOfNote) {
5628
5779
  const completions = [];
5629
5780
  if (note.noteEffects && note.noteEffects.start.offset < offset && note.noteEffects.end.offset) {
5630
- const endOfProperties = note.noteEffects.closeBrace?.start.offset ?? endOfNote;
5781
+ const endOfProperties = note.noteEffects.closeBrace?.start?.offset ?? endOfNote;
5631
5782
  if (beat.notes.notes.length === 1) {
5632
5783
  completions.splice(0, 0, ...createPropertiesCompletions(note.noteEffects, offset, beatProperties, endOfProperties));
5633
5784
  }
@@ -5741,13 +5892,13 @@ function createMetaDataCompletions(barIndex, metaData, offset, endOfMetaData) {
5741
5892
  if (!metaDataDocs) {
5742
5893
  return completions;
5743
5894
  }
5744
- const endOfArguments = metaData.arguments?.closeParenthesis?.start.offset ??
5745
- metaData.arguments?.end.offset ??
5746
- metaData.properties?.start.offset ??
5895
+ const endOfArguments = metaData.arguments?.closeParenthesis?.start?.offset ??
5896
+ metaData.arguments?.end?.offset ??
5897
+ metaData.properties?.start?.offset ??
5747
5898
  endOfMetaData;
5748
5899
  completions.splice(0, 0, ...createArgumentCompletions(metaDataDocs.signatures, metaData.arguments, offset, endOfArguments));
5749
5900
  if (metaDataDocs?.properties) {
5750
- const endOfProperties = metaData.properties?.closeBrace?.start.offset ?? endOfMetaData;
5901
+ const endOfProperties = metaData.properties?.closeBrace?.start?.offset ?? endOfMetaData;
5751
5902
  completions.splice(0, 0, ...createPropertiesCompletions(metaData.properties, offset, metaDataDocs.properties, endOfProperties));
5752
5903
  }
5753
5904
  return completions;
@@ -6192,7 +6343,7 @@ function createMetaDataSignatureHelp(metaData, offset) {
6192
6343
  if (!metaDataDocs) {
6193
6344
  return null;
6194
6345
  }
6195
- const endOfValues = metaData.arguments?.end.offset ?? metaData.properties?.start.offset ?? metaData.end.offset;
6346
+ const endOfValues = metaData.arguments?.end?.offset ?? metaData.properties?.start?.offset ?? metaData.end.offset;
6196
6347
  if (metaData.start.offset <= offset && offset < endOfValues) {
6197
6348
  return createArgumentsSignatureHelp(`\\${metaData.tag.tag.text}`, metaDataDocs, metaData.arguments, offset);
6198
6349
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderline/alphatab-monaco",
3
- "version": "1.8.0-alpha.1669",
3
+ "version": "1.8.0-alpha.1671",
4
4
  "description": "A Monaco editor integration for alphaTab providing coding assistance for alphaTex.",
5
5
  "keywords": [
6
6
  "guitar",
@@ -31,15 +31,15 @@
31
31
  "test": "mocha"
32
32
  },
33
33
  "dependencies": {
34
- "@coderline/alphatab": "^1.8.0-alpha.1669",
35
- "@coderline/alphatab-language-server": "^1.8.0-alpha.1669",
34
+ "@coderline/alphatab": "^1.8.0-alpha.1671",
35
+ "@coderline/alphatab-language-server": "^1.8.0-alpha.1671",
36
36
  "monaco-editor": "^0.55.1",
37
37
  "vscode-languageserver-types": "^3.17.5",
38
38
  "vscode-oniguruma": "^2.0.1",
39
39
  "vscode-textmate": "^9.3.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@biomejs/biome": "^2.2.6",
42
+ "@biomejs/biome": "^2.3.11",
43
43
  "@microsoft/api-extractor": "^7.55.2",
44
44
  "@types/chai": "^5.2.2",
45
45
  "@types/mocha": "^10.0.10",