@coderline/alphatab 1.7.0-alpha.1575 → 1.7.0-alpha.1582

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 v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -48,4 +48,4 @@
48
48
  * @preserve
49
49
  * @license
50
50
  */
51
- import*as r from"./alphaTab.core.min.mjs";export*from"./alphaTab.core.min.mjs";r.Environment.isRunningInWorker?r.Environment.initializeWorker():r.Environment.isRunningInAudioWorklet?r.Environment.initializeAudioWorklet():r.Environment.initializeMain(e=>{if(r.Environment.webPlatform===r.WebPlatform.NodeJs)throw new r.AlphaTabError(r.AlphaTabErrorType.General,"Workers not yet supported in Node.js");if(r.Environment.webPlatform===r.WebPlatform.BrowserModule||r.Environment.isWebPackBundled||r.Environment.isViteBundled){r.Logger.debug("AlphaTab","Creating webworker");try{return new r.Environment.alphaTabWorker(new r.Environment.alphaTabUrl("./alphaTab.worker.min.mjs",import.meta.url),{type:"module"})}catch(e){r.Logger.debug("AlphaTab","ESM webworker construction with direct URL failed",e)}let o="";try{o=new r.Environment.alphaTabUrl("./alphaTab.worker.min.mjs",import.meta.url);const e=`import ${JSON.stringify(o)}`,t=new Blob([e],{type:"application/javascript"});return new Worker(URL.createObjectURL(t),{type:"module"})}catch(e){r.Logger.debug("AlphaTab","ESM webworker construction with blob import failed",o,e)}try{if(!e.core.scriptFile)throw new Error("Could not detect alphaTab script file");o=e.core.scriptFile;const r=`import ${JSON.stringify(e.core.scriptFile)}`,t=new Blob([r],{type:"application/javascript"});return new Worker(URL.createObjectURL(t),{type:"module"})}catch(o){r.Logger.debug("AlphaTab","ESM webworker construction with blob import failed",e.core.scriptFile,o)}}if(!e.core.scriptFile)throw new r.AlphaTabError(r.AlphaTabErrorType.General,"Could not detect alphaTab script file, cannot initialize renderer");try{r.Logger.debug("AlphaTab","Creating Blob worker");const o=`importScripts('${e.core.scriptFile}')`,t=new Blob([o],{type:"application/javascript"});return new Worker(URL.createObjectURL(t))}catch{return r.Logger.warning("Rendering","Could not create inline worker, fallback to normal worker"),new Worker(e.core.scriptFile)}},(e,o)=>{if(r.Environment.webPlatform===r.WebPlatform.NodeJs)throw new r.AlphaTabError(r.AlphaTabErrorType.General,"Audio Worklets not yet supported in Node.js");if(r.Environment.webPlatform===r.WebPlatform.BrowserModule||r.Environment.isWebPackBundled||r.Environment.isViteBundled){r.Logger.debug("AlphaTab","Creating Module worklet");return e.audioWorklet.addModule(new r.Environment.alphaTabUrl("./alphaTab.worklet.min.mjs",import.meta.url))}return r.Logger.debug("AlphaTab","Creating Script worklet"),e.audioWorklet.addModule(o.core.scriptFile)});
51
+ import*as r from"./alphaTab.core.min.mjs";export*from"./alphaTab.core.min.mjs";r.Environment.isRunningInWorker?r.Environment.initializeWorker():r.Environment.isRunningInAudioWorklet?r.Environment.initializeAudioWorklet():r.Environment.initializeMain(e=>{if(r.Environment.webPlatform===r.WebPlatform.NodeJs)throw new r.AlphaTabError(r.AlphaTabErrorType.General,"Workers not yet supported in Node.js");if(r.Environment.webPlatform===r.WebPlatform.BrowserModule||r.Environment.isWebPackBundled||r.Environment.isViteBundled){r.Logger.debug("AlphaTab","Creating webworker");try{return new r.Environment.alphaTabWorker(new r.Environment.alphaTabUrl("./alphaTab.worker.min.mjs",import.meta.url),{type:"module"})}catch(e){r.Logger.debug("AlphaTab","ESM webworker construction with direct URL failed",e)}let t="";try{t=new r.Environment.alphaTabUrl("./alphaTab.worker.min.mjs",import.meta.url);const e=`import ${JSON.stringify(t)}`,o=new Blob([e],{type:"application/javascript"});return new Worker(URL.createObjectURL(o),{type:"module"})}catch(e){r.Logger.debug("AlphaTab","ESM webworker construction with blob import failed",t,e)}try{if(!e.core.scriptFile)throw new Error("Could not detect alphaTab script file");t=e.core.scriptFile;const r=`import ${JSON.stringify(e.core.scriptFile)}`,o=new Blob([r],{type:"application/javascript"});return new Worker(URL.createObjectURL(o),{type:"module"})}catch(t){r.Logger.debug("AlphaTab","ESM webworker construction with blob import failed",e.core.scriptFile,t)}}if(!e.core.scriptFile)throw new r.AlphaTabError(r.AlphaTabErrorType.General,"Could not detect alphaTab script file, cannot initialize renderer");try{r.Logger.debug("AlphaTab","Creating Blob worker");const t=`importScripts('${e.core.scriptFile}')`,o=new Blob([t],{type:"application/javascript"});return new Worker(URL.createObjectURL(o))}catch{return r.Logger.warning("Rendering","Could not create inline worker, fallback to normal worker"),new Worker(e.core.scriptFile)}},(e,t)=>{if(r.Environment.webPlatform===r.WebPlatform.NodeJs)throw new r.AlphaTabError(r.AlphaTabErrorType.General,"Audio Worklets not yet supported in Node.js");if(r.Environment.webPlatform===r.WebPlatform.BrowserModule||r.Environment.isWebPackBundled||r.Environment.isViteBundled){r.Logger.debug("AlphaTab","Creating Module worklet");return e.audioWorklet.addModule(new r.Environment.alphaTabUrl("./alphaTab.worklet.min.mjs",import.meta.url))}return r.Logger.debug("AlphaTab","Creating Script worklet"),e.audioWorklet.addModule(t.core.scriptFile)});
package/dist/alphaTab.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Vite Plugin v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab Vite Plugin v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -1807,7 +1807,7 @@ function wrapEnvironmentHook(environment, hook) {
1807
1807
  return handler;
1808
1808
  }
1809
1809
  function injectEnvironmentInContext(context, environment) {
1810
- context.environment ?? (context.environment = environment);
1810
+ context.environment ??= environment;
1811
1811
  return context;
1812
1812
  }
1813
1813
  function injectSsrFlag(options, environment) {
@@ -2171,9 +2171,7 @@ function importMetaUrlPlugin(options) {
2171
2171
  return;
2172
2172
  }
2173
2173
  let s;
2174
- const alphaTabWorkerPattern =
2175
- // @ts-expect-error For the Vite plugin we expect newer node than for alphaTab itself (-> migrate to monorepo)
2176
- /\b(alphaTabWorker|alphaTabWorklet\.addModule)\s*\(\s*(new\s+[^ (]+alphaTabUrl\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/dg;
2174
+ const alphaTabWorkerPattern = /\b(alphaTabWorker|alphaTabWorklet\.addModule)\s*\(\s*(new\s+[^ (]+alphaTabUrl\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/dg;
2177
2175
  let match = alphaTabWorkerPattern.exec(code);
2178
2176
  while (match) {
2179
2177
  const workerType = getWorkerType(code, match);
@@ -2191,7 +2189,7 @@ function importMetaUrlPlugin(options) {
2191
2189
  match = alphaTabWorkerPattern.exec(code);
2192
2190
  continue;
2193
2191
  }
2194
- s ?? (s = new MagicString(code));
2192
+ s ??= new MagicString(code);
2195
2193
  const url = code.slice(match.indices[3][0] + 1, match.indices[3][1] - 1);
2196
2194
  let file = path.resolve(path.dirname(id), url);
2197
2195
  file =
@@ -2378,7 +2376,7 @@ function workerPlugin(options) {
2378
2376
 
2379
2377
  function alphaTab(options) {
2380
2378
  const plugins = [];
2381
- options ?? (options = {});
2379
+ options ??= {};
2382
2380
  plugins.push(importMetaUrlPlugin(options));
2383
2381
  plugins.push(workerPlugin(options));
2384
2382
  plugins.push(copyAssetsPlugin(options));
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab Vite Plugin v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab Vite Plugin v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -1782,7 +1782,7 @@ function wrapEnvironmentHook(environment, hook) {
1782
1782
  return handler;
1783
1783
  }
1784
1784
  function injectEnvironmentInContext(context, environment) {
1785
- context.environment ?? (context.environment = environment);
1785
+ context.environment ??= environment;
1786
1786
  return context;
1787
1787
  }
1788
1788
  function injectSsrFlag(options, environment) {
@@ -2146,9 +2146,7 @@ function importMetaUrlPlugin(options) {
2146
2146
  return;
2147
2147
  }
2148
2148
  let s;
2149
- const alphaTabWorkerPattern =
2150
- // @ts-expect-error For the Vite plugin we expect newer node than for alphaTab itself (-> migrate to monorepo)
2151
- /\b(alphaTabWorker|alphaTabWorklet\.addModule)\s*\(\s*(new\s+[^ (]+alphaTabUrl\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/dg;
2149
+ const alphaTabWorkerPattern = /\b(alphaTabWorker|alphaTabWorklet\.addModule)\s*\(\s*(new\s+[^ (]+alphaTabUrl\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*\))/dg;
2152
2150
  let match = alphaTabWorkerPattern.exec(code);
2153
2151
  while (match) {
2154
2152
  const workerType = getWorkerType(code, match);
@@ -2166,7 +2164,7 @@ function importMetaUrlPlugin(options) {
2166
2164
  match = alphaTabWorkerPattern.exec(code);
2167
2165
  continue;
2168
2166
  }
2169
- s ?? (s = new MagicString(code));
2167
+ s ??= new MagicString(code);
2170
2168
  const url = code.slice(match.indices[3][0] + 1, match.indices[3][1] - 1);
2171
2169
  let file = path__default.resolve(path__default.dirname(id), url);
2172
2170
  file =
@@ -2353,7 +2351,7 @@ function workerPlugin(options) {
2353
2351
 
2354
2352
  function alphaTab(options) {
2355
2353
  const plugins = [];
2356
- options ?? (options = {});
2354
+ options ??= {};
2357
2355
  plugins.push(importMetaUrlPlugin(options));
2358
2356
  plugins.push(workerPlugin(options));
2359
2357
  plugins.push(copyAssetsPlugin(options));
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab WebPack Plugin v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab WebPack Plugin v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -118,6 +118,7 @@ function isWorkerRuntime(runtime) {
118
118
 
119
119
  function injectWorkerRuntimeModule(webPackWithAlphaTab) {
120
120
  class AlphaTabWorkerRuntimeModule extends webPackWithAlphaTab.webpack.RuntimeModule {
121
+ static Key = 'AlphaTabWorkerRuntime';
121
122
  constructor() {
122
123
  super('alphaTab audio worker chunk loading', webPackWithAlphaTab.webpack.RuntimeModule.STAGE_BASIC);
123
124
  }
@@ -162,7 +163,6 @@ function injectWorkerRuntimeModule(webPackWithAlphaTab) {
162
163
  ]);
163
164
  }
164
165
  }
165
- AlphaTabWorkerRuntimeModule.Key = 'AlphaTabWorkerRuntime';
166
166
  webPackWithAlphaTab.alphaTab.registerWebWorkerRuntimeModule = (pluginName, compilation) => {
167
167
  compilation.hooks.runtimeRequirementInTree
168
168
  .for(AlphaTabWorkerRuntimeModule.Key)
@@ -316,6 +316,8 @@ function configureWebWorker(webPackWithAlphaTab, pluginName, options, compiler,
316
316
 
317
317
  function injectWebWorkerDependency(webPackWithAlphaTab) {
318
318
  class AlphaTabWebWorkerDependency extends webPackWithAlphaTab.webpack.dependencies.ModuleDependency {
319
+ publicPath;
320
+ _hashUpdate;
319
321
  constructor(request, range, publicPath) {
320
322
  super(request);
321
323
  this.range = range;
@@ -374,6 +376,7 @@ function injectWebWorkerDependency(webPackWithAlphaTab) {
374
376
 
375
377
  function injectWorkletRuntimeModule(webPackWithAlphaTab) {
376
378
  class AlphaTabWorkletStartRuntimeModule extends webPackWithAlphaTab.webpack.RuntimeModule {
379
+ static RuntimeGlobalWorkletGetStartupChunks = '__webpack_require__.wsc';
377
380
  constructor() {
378
381
  super('alphaTab audio worklet chunk lookup', webPackWithAlphaTab.webpack.RuntimeModule.STAGE_BASIC);
379
382
  }
@@ -407,7 +410,6 @@ function injectWorkletRuntimeModule(webPackWithAlphaTab) {
407
410
  ]);
408
411
  }
409
412
  }
410
- AlphaTabWorkletStartRuntimeModule.RuntimeGlobalWorkletGetStartupChunks = '__webpack_require__.wsc';
411
413
  webPackWithAlphaTab.alphaTab.RuntimeGlobalWorkletGetStartupChunks =
412
414
  AlphaTabWorkletStartRuntimeModule.RuntimeGlobalWorkletGetStartupChunks;
413
415
  webPackWithAlphaTab.alphaTab.registerWorkletRuntimeModule = (pluginName, compilation) => {
@@ -425,6 +427,8 @@ function injectWorkletDependency(webPackWithAlphaTab) {
425
427
  * to install chunks which have been added to the worklet via addModule before the bootstrap script starts.
426
428
  */
427
429
  class AlphaTabWorkletDependency extends webPackWithAlphaTab.webpack.dependencies.ModuleDependency {
430
+ publicPath;
431
+ _hashUpdate;
428
432
  constructor(url, range, publicPath) {
429
433
  super(url);
430
434
  this.range = range;
@@ -602,6 +606,8 @@ const makeCacheableWithContext = (fn) => {
602
606
  };
603
607
  const contextify = makeCacheableWithContext(_contextify);
604
608
  class AlphaTabWebPackPlugin {
609
+ _webPackWithAlphaTab;
610
+ options;
605
611
  constructor(options) {
606
612
  this.options = options ?? {};
607
613
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab WebPack Plugin v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab WebPack Plugin v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -92,6 +92,7 @@ function isWorkerRuntime(runtime) {
92
92
 
93
93
  function injectWorkerRuntimeModule(webPackWithAlphaTab) {
94
94
  class AlphaTabWorkerRuntimeModule extends webPackWithAlphaTab.webpack.RuntimeModule {
95
+ static Key = 'AlphaTabWorkerRuntime';
95
96
  constructor() {
96
97
  super('alphaTab audio worker chunk loading', webPackWithAlphaTab.webpack.RuntimeModule.STAGE_BASIC);
97
98
  }
@@ -136,7 +137,6 @@ function injectWorkerRuntimeModule(webPackWithAlphaTab) {
136
137
  ]);
137
138
  }
138
139
  }
139
- AlphaTabWorkerRuntimeModule.Key = 'AlphaTabWorkerRuntime';
140
140
  webPackWithAlphaTab.alphaTab.registerWebWorkerRuntimeModule = (pluginName, compilation) => {
141
141
  compilation.hooks.runtimeRequirementInTree
142
142
  .for(AlphaTabWorkerRuntimeModule.Key)
@@ -290,6 +290,8 @@ function configureWebWorker(webPackWithAlphaTab, pluginName, options, compiler,
290
290
 
291
291
  function injectWebWorkerDependency(webPackWithAlphaTab) {
292
292
  class AlphaTabWebWorkerDependency extends webPackWithAlphaTab.webpack.dependencies.ModuleDependency {
293
+ publicPath;
294
+ _hashUpdate;
293
295
  constructor(request, range, publicPath) {
294
296
  super(request);
295
297
  this.range = range;
@@ -348,6 +350,7 @@ function injectWebWorkerDependency(webPackWithAlphaTab) {
348
350
 
349
351
  function injectWorkletRuntimeModule(webPackWithAlphaTab) {
350
352
  class AlphaTabWorkletStartRuntimeModule extends webPackWithAlphaTab.webpack.RuntimeModule {
353
+ static RuntimeGlobalWorkletGetStartupChunks = '__webpack_require__.wsc';
351
354
  constructor() {
352
355
  super('alphaTab audio worklet chunk lookup', webPackWithAlphaTab.webpack.RuntimeModule.STAGE_BASIC);
353
356
  }
@@ -381,7 +384,6 @@ function injectWorkletRuntimeModule(webPackWithAlphaTab) {
381
384
  ]);
382
385
  }
383
386
  }
384
- AlphaTabWorkletStartRuntimeModule.RuntimeGlobalWorkletGetStartupChunks = '__webpack_require__.wsc';
385
387
  webPackWithAlphaTab.alphaTab.RuntimeGlobalWorkletGetStartupChunks =
386
388
  AlphaTabWorkletStartRuntimeModule.RuntimeGlobalWorkletGetStartupChunks;
387
389
  webPackWithAlphaTab.alphaTab.registerWorkletRuntimeModule = (pluginName, compilation) => {
@@ -399,6 +401,8 @@ function injectWorkletDependency(webPackWithAlphaTab) {
399
401
  * to install chunks which have been added to the worklet via addModule before the bootstrap script starts.
400
402
  */
401
403
  class AlphaTabWorkletDependency extends webPackWithAlphaTab.webpack.dependencies.ModuleDependency {
404
+ publicPath;
405
+ _hashUpdate;
402
406
  constructor(url, range, publicPath) {
403
407
  super(url);
404
408
  this.range = range;
@@ -576,6 +580,8 @@ const makeCacheableWithContext = (fn) => {
576
580
  };
577
581
  const contextify = makeCacheableWithContext(_contextify);
578
582
  class AlphaTabWebPackPlugin {
583
+ _webPackWithAlphaTab;
584
+ options;
579
585
  constructor(options) {
580
586
  this.options = options ?? {};
581
587
  }
@@ -1,7 +1,7 @@
1
1
  import type * as webpackTypes from 'webpack';
2
2
 
3
3
  export declare class AlphaTabWebPackPlugin {
4
- _webPackWithAlphaTab: webPackWithAlphaTab;
4
+ private _webPackWithAlphaTab;
5
5
  options: AlphaTabWebPackPluginOptions;
6
6
  constructor(options?: AlphaTabWebPackPluginOptions);
7
7
  apply(compiler: webpackTypes.Compiler): void;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -48,4 +48,4 @@
48
48
  * @preserve
49
49
  * @license
50
50
  */
51
- import*as r from"./alphaTab.core.min.mjs";r.Environment.initializeWorker();
51
+ import*as a from"./alphaTab.core.min.mjs";a.Environment.initializeWorker();
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
@@ -48,4 +48,4 @@
48
48
  * @preserve
49
49
  * @license
50
50
  */
51
- import*as i from"./alphaTab.core.min.mjs";i.Environment.initializeAudioWorklet();
51
+ import*as a from"./alphaTab.core.min.mjs";a.Environment.initializeAudioWorklet();
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * alphaTab v1.7.0-alpha.1575 (develop, build 1575)
2
+ * alphaTab v1.7.0-alpha.1582 (develop, build 1582)
3
3
  *
4
4
  * Copyright © 2025, Daniel Kuschny and Contributors, All rights reserved.
5
5
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coderline/alphatab",
3
- "version": "1.7.0-alpha.1575",
3
+ "version": "1.7.0-alpha.1582",
4
4
  "description": "alphaTab is a music notation and guitar tablature rendering library",
5
5
  "keywords": [
6
6
  "guitar",
@@ -58,13 +58,13 @@
58
58
  "test-accept-reference": "tsx scripts/accept-new-reference-files.ts"
59
59
  },
60
60
  "devDependencies": {
61
- "@biomejs/biome": "^2.2.5",
61
+ "@biomejs/biome": "^2.2.6",
62
62
  "@coderline/alphaskia": "^3.4.135",
63
63
  "@coderline/alphaskia-linux": "^3.4.135",
64
64
  "@coderline/alphaskia-windows": "^3.4.135",
65
65
  "@types/chai": "^5.2.2",
66
66
  "@types/mocha": "^10.0.10",
67
- "@types/node": "^24.7.2",
67
+ "@types/node": "^24.8.1",
68
68
  "assert": "^2.1.0",
69
69
  "chai": "^6.2.0",
70
70
  "chalk": "^5.6.2",
@@ -74,7 +74,7 @@
74
74
  "tslib": "^2.8.1",
75
75
  "tsx": "^4.20.6",
76
76
  "typescript": "^5.9.3",
77
- "vite": "^7.1.9",
77
+ "vite": "^7.1.11",
78
78
  "vite-plugin-static-copy": "^3.1.3"
79
79
  },
80
80
  "files": [