@coderline/alphatab 1.6.0-alpha.1415 → 1.6.0-alpha.1418

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.
@@ -473,11 +473,19 @@ export declare class AlphaTabApiBase<TSettings> {
473
473
  private _player;
474
474
  private _renderer;
475
475
  /**
476
- * The actual player mode which is currently active (e.g. allows determining whether a backing track or the synthesizer is active).
476
+ * The actual player mode which is currently active.
477
+ * @remarks
478
+ * Allows determining whether a backing track or the synthesizer is active in case automatic detection is enabled.
479
+ * @category Properties - Player
480
+ * @since 1.6.0
477
481
  */
478
482
  get actualPlayerMode(): PlayerMode;
479
483
  /**
480
- * Gets the UI facade to use for interacting with the user interface.
484
+ * The UI facade used for interacting with the user interface (like the browser).
485
+ * @remarks
486
+ * The implementation depends on the platform alphaTab is running in (e.g. the web version in the browser, WPF in .net etc.)
487
+ * @category Properties - Core
488
+ * @since 0.9.4
481
489
  */
482
490
  readonly uiFacade: IUiFacade<TSettings>;
483
491
  /**
@@ -4967,12 +4975,34 @@ export declare class CoreSettings {
4967
4975
  * where the Web Font files of [Bravura](https://github.com/steinbergmedia/bravura) are. Normally alphaTab expects
4968
4976
  * them to be in a `font` subfolder beside the script file. If this is not the case, this setting must be used to configure the path.
4969
4977
  * Alternatively also a global variable `ALPHATAB_FONT` can be set on the page before initializing alphaTab.
4978
+ *
4979
+ * Use {@link smuflFontSources} for more flexible font configuration.
4970
4980
  * @defaultValue `"${AlphaTabScriptFolder}/font/"`
4971
4981
  * @category Core - JavaScript Specific
4972
4982
  * @target web
4973
4983
  * @since 0.9.6
4974
4984
  */
4975
4985
  fontDirectory: string | null;
4986
+ /**
4987
+ * Defines the URLs from which to load the SMuFL compliant font files.
4988
+ * @remarks
4989
+ * These sources will be used to load and register the webfonts on the page so
4990
+ * they are available for rendering the music sheet. The sources can be set to any
4991
+ * CSS compatible URL which can be passed into `url()`.
4992
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src#url
4993
+ * @defaultValue Bravura files located at {@link fontDirectory} .
4994
+ * @category Core - JavaScript Specific
4995
+ * @target web
4996
+ * @since 1.6.0
4997
+ */
4998
+ smuflFontSources: Map<FontFileFormat, string> | null;
4999
+ /**
5000
+ * Builds the default SMuFL font sources for the usage with alphaTab in cases
5001
+ * where no custom {@link smuflFontSources} are provided.
5002
+ * @param fontDirectory The {@link fontDirectory} configured.
5003
+ * @target web
5004
+ */
5005
+ static buildDefaultSmuflFontSources(fontDirectory: string | null): Map<FontFileFormat, string>;
4976
5006
  /**
4977
5007
  * The full URL to the input file to be loaded.
4978
5008
  * @remarks
@@ -5121,12 +5151,27 @@ declare interface CoreSettingsJson {
5121
5151
  * where the Web Font files of [Bravura](https://github.com/steinbergmedia/bravura) are. Normally alphaTab expects
5122
5152
  * them to be in a `font` subfolder beside the script file. If this is not the case, this setting must be used to configure the path.
5123
5153
  * Alternatively also a global variable `ALPHATAB_FONT` can be set on the page before initializing alphaTab.
5154
+ *
5155
+ * Use {@link smuflFontSources} for more flexible font configuration.
5124
5156
  * @defaultValue `"${AlphaTabScriptFolder}/font/"`
5125
5157
  * @category Core - JavaScript Specific
5126
5158
  * @target web
5127
5159
  * @since 0.9.6
5128
5160
  */
5129
5161
  fontDirectory?: string | null;
5162
+ /**
5163
+ * Defines the URLs from which to load the SMuFL compliant font files.
5164
+ * @remarks
5165
+ * These sources will be used to load and register the webfonts on the page so
5166
+ * they are available for rendering the music sheet. The sources can be set to any
5167
+ * CSS compatible URL which can be passed into `url()`.
5168
+ * See https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src#url
5169
+ * @defaultValue Bravura files located at {@link fontDirectory} .
5170
+ * @category Core - JavaScript Specific
5171
+ * @target web
5172
+ * @since 1.6.0
5173
+ */
5174
+ smuflFontSources?: Map<FontFileFormat | keyof typeof FontFileFormat | Lowercase<keyof typeof FontFileFormat>, string>;
5130
5175
  /**
5131
5176
  * The full URL to the input file to be loaded.
5132
5177
  * @remarks
@@ -6169,7 +6214,6 @@ export declare class Environment {
6169
6214
  private static readonly StaffIdBeforeEndAlways;
6170
6215
  /* Excluded from this release type: MusicFontSize */
6171
6216
  /* Excluded from this release type: HighDpiFactor */
6172
- /* Excluded from this release type: createStyleElement */
6173
6217
  /**
6174
6218
  * @target web
6175
6219
  */
@@ -6195,7 +6239,6 @@ export declare class Environment {
6195
6239
  * @target web
6196
6240
  */
6197
6241
  static readonly fontDirectory: string | null;
6198
- /* Excluded from this release type: bravuraFontChecker */
6199
6242
  /**
6200
6243
  * @target web
6201
6244
  */
@@ -6498,8 +6541,39 @@ declare class Font {
6498
6541
  */
6499
6542
  static withFamilyList(families: string[], size: number, style?: FontStyle, weight?: FontWeight): Font;
6500
6543
  toCssString(scale?: number): string;
6501
- static fromJson(v: unknown): Font | null;
6502
- static toJson(font: Font): Map<string, unknown>;
6544
+ static fromJson(v: unknown): Font | undefined;
6545
+ static toJson(font: Font | undefined): Map<string, unknown> | undefined;
6546
+ }
6547
+
6548
+ /**
6549
+ * Lists the known file formats for font files.
6550
+ * @target web
6551
+ */
6552
+ export declare enum FontFileFormat {
6553
+ /**
6554
+ * .eot
6555
+ */
6556
+ EmbeddedOpenType = 0,
6557
+ /**
6558
+ * .woff
6559
+ */
6560
+ Woff = 1,
6561
+ /**
6562
+ * .woff2
6563
+ */
6564
+ Woff2 = 2,
6565
+ /**
6566
+ * .otf
6567
+ */
6568
+ OpenType = 3,
6569
+ /**
6570
+ * .ttf
6571
+ */
6572
+ TrueType = 4,
6573
+ /**
6574
+ * .svg
6575
+ */
6576
+ Svg = 5
6503
6577
  }
6504
6578
 
6505
6579
  /**
@@ -6514,21 +6588,6 @@ declare type FontJson = Font | string | {
6514
6588
  weight: FontWeight | keyof typeof FontWeight;
6515
6589
  };
6516
6590
 
6517
- /**
6518
- * This small utility helps to detect whether a particular font is already loaded.
6519
- * @target web
6520
- */
6521
- declare class FontLoadingChecker {
6522
- private _originalFamilies;
6523
- private _families;
6524
- private _isStarted;
6525
- isFontLoaded: boolean;
6526
- fontLoaded: IEventEmitterOfT<string>;
6527
- constructor(families: string[]);
6528
- checkForFontAvailability(): void;
6529
- private isFontAvailable;
6530
- }
6531
-
6532
6591
  /**
6533
6592
  * Describes the sizes of a font for measuring purposes.
6534
6593
  */
@@ -12058,6 +12117,7 @@ export declare namespace rendering {
12058
12117
  export declare class RenderingResources {
12059
12118
  private static sansFont;
12060
12119
  private static serifFont;
12120
+ /* Excluded from this release type: smuflFont */
12061
12121
  /**
12062
12122
  * The font to use for displaying the songs copyright information in the header of the music sheet.
12063
12123
  * @defaultValue `bold 12px Arial, sans-serif`
@@ -12200,6 +12260,7 @@ export declare class RenderingResources {
12200
12260
  * @target web
12201
12261
  */
12202
12262
  declare interface RenderingResourcesJson {
12263
+ /* Excluded from this release type: smuflFont */
12203
12264
  /**
12204
12265
  * The font to use for displaying the songs copyright information in the header of the music sheet.
12205
12266
  * @defaultValue `bold 12px Arial, sans-serif`
@@ -13477,7 +13538,7 @@ declare class SyncPointData {
13477
13538
  barOccurence: number;
13478
13539
  /**
13479
13540
  * The modified tempo at which the cursor should move (aka. the tempo played within the external audio track).
13480
- * This information is used together with the {@link originalTempo} to calculate how much faster/slower the
13541
+ * This information is used together with normal tempo changes to calculate how much faster/slower the
13481
13542
  * cursor playback is performed to align with the audio track.
13482
13543
  */
13483
13544
  modifiedTempo: number;
@@ -13490,6 +13551,7 @@ declare class SyncPointData {
13490
13551
 
13491
13552
  export declare namespace synth {
13492
13553
  export {
13554
+ AlphaSynthBase,
13493
13555
  AlphaSynth,
13494
13556
  CircularSampleBuffer,
13495
13557
  PlaybackRange,
@@ -13497,6 +13559,7 @@ export declare namespace synth {
13497
13559
  ISynthOutputDevice,
13498
13560
  IBackingTrackSynthOutput,
13499
13561
  IAlphaSynth,
13562
+ BackingTrackSyncPoint,
13500
13563
  PlayerState,
13501
13564
  PlayerStateChangedEventArgs,
13502
13565
  PlaybackRangeChangedEventArgs,