@tspro/web-music-score 5.0.0 → 5.2.0

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +16 -13
  3. package/dist/audio/index.d.mts +15 -2
  4. package/dist/audio/index.d.ts +16 -3
  5. package/dist/audio/index.js +37 -78
  6. package/dist/audio/index.mjs +34 -68
  7. package/dist/audio-cg/index.d.mts +6 -1
  8. package/dist/audio-cg/index.d.ts +6 -1
  9. package/dist/audio-cg/index.js +1 -1
  10. package/dist/audio-cg/index.mjs +3 -3
  11. package/dist/audio-synth/index.d.mts +15 -0
  12. package/dist/audio-synth/index.d.ts +15 -0
  13. package/dist/audio-synth/index.js +95 -0
  14. package/dist/audio-synth/index.mjs +58 -0
  15. package/dist/{chunk-AAL3CMRO.mjs → chunk-6S5BDSCM.mjs} +2 -2
  16. package/dist/{chunk-J3KU3U4W.mjs → chunk-LC5JMIVF.mjs} +2 -2
  17. package/dist/{chunk-EYFT3RWB.mjs → chunk-XUGM7SCC.mjs} +5 -6
  18. package/dist/core/index.js +2 -2
  19. package/dist/core/index.mjs +3 -3
  20. package/dist/{guitar-CaZJDA05.d.ts → guitar-BsSayRsH.d.ts} +1 -1
  21. package/dist/iife/audio-cg.global.js +9 -2
  22. package/dist/iife/index.global.js +11 -11
  23. package/dist/{music-objects-3Hxlkxy6.d.mts → music-objects-CB05XryE.d.mts} +121 -45
  24. package/dist/{music-objects-CI7IjsjE.d.ts → music-objects-CwPOlqFi.d.ts} +123 -47
  25. package/dist/{note-eA2xPPiG.d.ts → note-CgCIBwvR.d.ts} +1 -1
  26. package/dist/pieces/index.d.mts +1 -1
  27. package/dist/pieces/index.d.ts +3 -3
  28. package/dist/pieces/index.js +1 -1
  29. package/dist/pieces/index.mjs +2 -2
  30. package/dist/react-ui/index.d.mts +34 -15
  31. package/dist/react-ui/index.d.ts +38 -19
  32. package/dist/react-ui/index.js +41 -32
  33. package/dist/react-ui/index.mjs +42 -33
  34. package/dist/{scale-DGx3tJH4.d.ts → scale-CBW4eTz7.d.ts} +2 -2
  35. package/dist/score/index.d.mts +2 -2
  36. package/dist/score/index.d.ts +5 -5
  37. package/dist/score/index.js +1951 -1514
  38. package/dist/score/index.mjs +1664 -1226
  39. package/dist/{tempo-GrstpD9G.d.ts → tempo-DMt3iwz9.d.ts} +1 -1
  40. package/dist/theory/index.d.ts +6 -6
  41. package/dist/theory/index.js +3 -4
  42. package/dist/theory/index.mjs +3 -3
  43. package/package.json +12 -2
@@ -288,7 +288,7 @@ declare class Note {
288
288
  * @param b - Note b.
289
289
  * @returns - -1, 0 or 1.
290
290
  */
291
- static compareFunc(a: Note, b: Note): 1 | 0 | -1;
291
+ static compareFunc(a: Note, b: Note): 1 | -1 | 0;
292
292
  }
293
293
 
294
294
  export { type Accidental as A, DefaultPitchNotation as D, GuitarNoteLabel as G, Note as N, type ParsedNote as P, SymbolSet as S, type NoteLetter as a, PitchNotation as b, PitchNotationList as c, DefaultGuitarNoteLabel as d, GuitarNoteLabelList as e, validateGuitarNoteLabel as f, getPitchNotationName as g, validatePitchNotation as v };
@@ -1,4 +1,4 @@
1
- import { M as MDocument } from '../music-objects-3Hxlkxy6.mjs';
1
+ import { M as MDocument } from '../music-objects-CB05XryE.mjs';
2
2
  import '../note-eA2xPPiG.mjs';
3
3
  import '../tempo-dkctPkCS.mjs';
4
4
  import '@tspro/ts-utils-lib';
@@ -1,6 +1,6 @@
1
- import { M as MDocument } from '../music-objects-CI7IjsjE.js';
2
- import '../note-eA2xPPiG.js';
3
- import '../tempo-GrstpD9G.js';
1
+ import { M as MDocument } from '../music-objects-CwPOlqFi.js';
2
+ import '../note-CgCIBwvR.js';
3
+ import '../tempo-DMt3iwz9.js';
4
4
  import '@tspro/ts-utils-lib';
5
5
 
6
6
  /**
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  "use strict";
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,5 +1,5 @@
1
- /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
- import "../chunk-J3KU3U4W.mjs";
1
+ /* WebMusicScore v5.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
+ import "../chunk-LC5JMIVF.mjs";
3
3
 
4
4
  // src/pieces/frere-jacques.ts
5
5
  import { DocumentBuilder } from "@tspro/web-music-score/score";
@@ -3,7 +3,7 @@ import * as React from 'react';
3
3
  import { c as Scale, S as ScaleType } from '../scale-DQP3b9Zx.mjs';
4
4
  import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-eA2xPPiG.mjs';
5
5
  import { H as Handedness } from '../guitar-DdexKdN6.mjs';
6
- import { D as DivRect, M as MDocument, n as ScoreEventListener, p as MRenderer, q as MPlaybackButtons } from '../music-objects-3Hxlkxy6.mjs';
6
+ import { D as DivRect, M as MDocument, n as ScoreEventListener, p as MRenderer, q as MPlaybackButtons } from '../music-objects-CB05XryE.mjs';
7
7
  import '../tempo-dkctPkCS.mjs';
8
8
  import '@tspro/ts-utils-lib';
9
9
 
@@ -236,15 +236,18 @@ interface MusicScoreViewProps {
236
236
  * Music score view react component.
237
237
  * ```ts
238
238
  * // Using with React TSX/JSX
239
- * import * as Score from "@tspro/web-music-score/react";
240
- * import * as Pieces from "@tspro/web-music-score/pieces";
239
+ * import * as Score from "@tspro/web-music-score/score";
240
+ * import * as ScoreUI from "@tspro/web-music-score/react-ui";
241
241
  *
242
242
  * // Render function of react component.
243
243
  * render() {
244
- * const doc = Pieces.createFrereJacques();
244
+ * // Create document.
245
+ * const doc = new Score.DocumentBuilder()
246
+ * // Build document...
247
+ * .getDocument();
245
248
  *
246
249
  * return <>
247
- * <Score.MusicScoreView doc=\{doc\} />
250
+ * <ScoreUI.MusicScoreView doc={doc} />
248
251
  * </>;
249
252
  * }
250
253
  * ```
@@ -256,6 +259,10 @@ declare class MusicScoreView extends React.Component<MusicScoreViewProps, {}> {
256
259
  render(): react_jsx_runtime.JSX.Element;
257
260
  }
258
261
 
262
+ /**
263
+ * Playback buttons layout
264
+ * @deprecated - Use `PlaybackButtonsProps` properties `singlePlayStop`, `playStop` or `playPauseStop` instead.
265
+ */
259
266
  declare enum PlaybackButtonsLayout {
260
267
  PlayStopSingle = 0,
261
268
  PlayStop = 1,
@@ -263,7 +270,11 @@ declare enum PlaybackButtonsLayout {
263
270
  }
264
271
  interface PlaybackButtonsProps {
265
272
  doc: MDocument;
273
+ /** @deprecated - Use `singlePlayStop`, `playStop` or `playPauseStop` properties instead. */
266
274
  buttonLayout?: PlaybackButtonsLayout;
275
+ singlePlayStop?: boolean;
276
+ playStop?: boolean;
277
+ playPauseStop?: boolean;
267
278
  playLabel?: string;
268
279
  pauseLabel?: string;
269
280
  stopLabel?: string;
@@ -275,20 +286,28 @@ interface PlaybackButtonsState {
275
286
  * Usage:
276
287
  * ```ts
277
288
  * // Using with React TSX/JSX
278
- * import * as Score from "\@tspro/web-music-score/score";
279
- * import * as Pieces from "@tspro/web-music-score/pieces";
289
+ * import * as Score from "@tspro/web-music-score/score";
290
+ * import * as ScoreUI from "@tspro/web-music-score/react-ui";
291
+ *
292
+ * // Create document.
293
+ * const doc = new Score.DocumentBuilder()
294
+ * // Build document...
295
+ * .getDocument();
296
+ *
297
+ * // Create default playback buttons (play, pause and stop buttons).
298
+ * <ScoreUI.PlaybackButtons doc={doc} />
280
299
  *
281
- * // Create sample musicdocument.
282
- * const doc = Pieces.createFrereJacques();
300
+ * // Create playback buttons with single play/stop button.
301
+ * <ScoreUI.PlaybackButtons doc={doc} singlePlayStop />
283
302
  *
284
- * // Create default playback buttons
285
- * <Score.PlaybackButtons doc={doc} />
303
+ * // Create playback buttons with play and stop buttons.
304
+ * <ScoreUI.PlaybackButtons doc={doc} playStop />
286
305
  *
287
- * // Create playback buttons with custom play, pause and stop labels:
288
- * <Score.PlaybackButtons doc={doc} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" />
306
+ * // Create playback buttons with play, pause and stop buttons.
307
+ * <ScoreUI.PlaybackButtons doc={doc} playPauseStop />
289
308
  *
290
- * // Create playback buttons with different button layout.
291
- * <Score.PlaybackButtons doc={doc} buttonLayout={Score.PlaybackButtonsLayout.PlayStopSingle} />
309
+ * // You can also set custom play, pause and stop button labels.
310
+ * <ScoreUI.PlaybackButtons doc={doc} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" />
292
311
  * ```
293
312
  */
294
313
  declare class PlaybackButtons extends React.Component<PlaybackButtonsProps, PlaybackButtonsState> {
@@ -1,10 +1,10 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { c as Scale, S as ScaleType } from '../scale-DGx3tJH4.js';
4
- import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-eA2xPPiG.js';
5
- import { H as Handedness } from '../guitar-CaZJDA05.js';
6
- import { D as DivRect, M as MDocument, n as ScoreEventListener, p as MRenderer, q as MPlaybackButtons } from '../music-objects-CI7IjsjE.js';
7
- import '../tempo-GrstpD9G.js';
3
+ import { c as Scale, S as ScaleType } from '../scale-CBW4eTz7.js';
4
+ import { b as PitchNotation, G as GuitarNoteLabel, N as Note } from '../note-CgCIBwvR.js';
5
+ import { H as Handedness } from '../guitar-BsSayRsH.js';
6
+ import { D as DivRect, M as MDocument, n as ScoreEventListener, p as MRenderer, q as MPlaybackButtons } from '../music-objects-CwPOlqFi.js';
7
+ import '../tempo-DMt3iwz9.js';
8
8
  import '@tspro/ts-utils-lib';
9
9
 
10
10
  interface CircleOfFifthsProps {
@@ -236,15 +236,18 @@ interface MusicScoreViewProps {
236
236
  * Music score view react component.
237
237
  * ```ts
238
238
  * // Using with React TSX/JSX
239
- * import * as Score from "@tspro/web-music-score/react";
240
- * import * as Pieces from "@tspro/web-music-score/pieces";
239
+ * import * as Score from "@tspro/web-music-score/score";
240
+ * import * as ScoreUI from "@tspro/web-music-score/react-ui";
241
241
  *
242
242
  * // Render function of react component.
243
243
  * render() {
244
- * const doc = Pieces.createFrereJacques();
244
+ * // Create document.
245
+ * const doc = new Score.DocumentBuilder()
246
+ * // Build document...
247
+ * .getDocument();
245
248
  *
246
249
  * return <>
247
- * <Score.MusicScoreView doc=\{doc\} />
250
+ * <ScoreUI.MusicScoreView doc={doc} />
248
251
  * </>;
249
252
  * }
250
253
  * ```
@@ -256,6 +259,10 @@ declare class MusicScoreView extends React.Component<MusicScoreViewProps, {}> {
256
259
  render(): react_jsx_runtime.JSX.Element;
257
260
  }
258
261
 
262
+ /**
263
+ * Playback buttons layout
264
+ * @deprecated - Use `PlaybackButtonsProps` properties `singlePlayStop`, `playStop` or `playPauseStop` instead.
265
+ */
259
266
  declare enum PlaybackButtonsLayout {
260
267
  PlayStopSingle = 0,
261
268
  PlayStop = 1,
@@ -263,7 +270,11 @@ declare enum PlaybackButtonsLayout {
263
270
  }
264
271
  interface PlaybackButtonsProps {
265
272
  doc: MDocument;
273
+ /** @deprecated - Use `singlePlayStop`, `playStop` or `playPauseStop` properties instead. */
266
274
  buttonLayout?: PlaybackButtonsLayout;
275
+ singlePlayStop?: boolean;
276
+ playStop?: boolean;
277
+ playPauseStop?: boolean;
267
278
  playLabel?: string;
268
279
  pauseLabel?: string;
269
280
  stopLabel?: string;
@@ -275,20 +286,28 @@ interface PlaybackButtonsState {
275
286
  * Usage:
276
287
  * ```ts
277
288
  * // Using with React TSX/JSX
278
- * import * as Score from "\@tspro/web-music-score/score";
279
- * import * as Pieces from "@tspro/web-music-score/pieces";
289
+ * import * as Score from "@tspro/web-music-score/score";
290
+ * import * as ScoreUI from "@tspro/web-music-score/react-ui";
291
+ *
292
+ * // Create document.
293
+ * const doc = new Score.DocumentBuilder()
294
+ * // Build document...
295
+ * .getDocument();
296
+ *
297
+ * // Create default playback buttons (play, pause and stop buttons).
298
+ * <ScoreUI.PlaybackButtons doc={doc} />
280
299
  *
281
- * // Create sample musicdocument.
282
- * const doc = Pieces.createFrereJacques();
300
+ * // Create playback buttons with single play/stop button.
301
+ * <ScoreUI.PlaybackButtons doc={doc} singlePlayStop />
283
302
  *
284
- * // Create default playback buttons
285
- * <Score.PlaybackButtons doc={doc} />
303
+ * // Create playback buttons with play and stop buttons.
304
+ * <ScoreUI.PlaybackButtons doc={doc} playStop />
286
305
  *
287
- * // Create playback buttons with custom play, pause and stop labels:
288
- * <Score.PlaybackButtons doc={doc} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" />
306
+ * // Create playback buttons with play, pause and stop buttons.
307
+ * <ScoreUI.PlaybackButtons doc={doc} playPauseStop />
289
308
  *
290
- * // Create playback buttons with different button layout.
291
- * <Score.PlaybackButtons doc={doc} buttonLayout={Score.PlaybackButtonsLayout.PlayStopSingle} />
309
+ * // You can also set custom play, pause and stop button labels.
310
+ * <ScoreUI.PlaybackButtons doc={doc} playLabel="⏵" pauseLabel="⏸" stopLabel="⏹" />
292
311
  * ```
293
312
  */
294
313
  declare class PlaybackButtons extends React.Component<PlaybackButtonsProps, PlaybackButtonsState> {
@@ -1,4 +1,4 @@
1
- /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  "use strict";
3
3
  var __create = Object.create;
4
4
  var __defProp = Object.defineProperty;
@@ -621,7 +621,7 @@ var MusicScoreView = class extends React3.Component {
621
621
  this.renderer.draw();
622
622
  }
623
623
  };
624
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("canvas", { style: { position: "relative" }, ref: setCanvas, children: "Canvas error!" });
624
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("canvas", { style: { position: "relative" }, ref: setCanvas, children: "Your browser does not support the HTML canvas tag." });
625
625
  }
626
626
  };
627
627
 
@@ -649,37 +649,46 @@ var PlaybackButtons = class extends React4.Component {
649
649
  }
650
650
  }
651
651
  render() {
652
- let { buttonLayout, playLabel, pauseLabel, stopLabel } = this.props;
652
+ let { buttonLayout, singlePlayStop, playStop, playPauseStop, playLabel, pauseLabel, stopLabel } = this.props;
653
653
  let { controller } = this.state;
654
- buttonLayout = buttonLayout != null ? buttonLayout : 2 /* PlayPauseStop */;
655
- playLabel = playLabel != null ? playLabel : "Play";
656
- pauseLabel = pauseLabel != null ? pauseLabel : "Pause";
657
- stopLabel = stopLabel != null ? stopLabel : "Stop";
658
- if (buttonLayout === 0 /* PlayStopSingle */) {
659
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
660
- if (btn) controller.setPlayStopButton(btn, playLabel, stopLabel);
661
- } });
662
- } else if (buttonLayout === 1 /* PlayStop */) {
663
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "btn-group", children: [
664
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
665
- if (btn) controller.setPlayButton(btn, playLabel);
666
- } }),
667
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
668
- if (btn) controller.setStopButton(btn, stopLabel);
669
- } })
670
- ] });
671
- } else {
672
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "btn-group", children: [
673
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
674
- if (btn) controller.setPlayButton(btn, playLabel);
675
- } }),
676
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
677
- if (btn) controller.setPauseButton(btn, pauseLabel);
678
- } }),
679
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
680
- if (btn) controller.setStopButton(btn, stopLabel);
681
- } })
682
- ] });
654
+ playLabel != null ? playLabel : playLabel = "Play";
655
+ pauseLabel != null ? pauseLabel : pauseLabel = "Pause";
656
+ stopLabel != null ? stopLabel : stopLabel = "Stop";
657
+ if (singlePlayStop) buttonLayout = 0 /* PlayStopSingle */;
658
+ if (playStop) buttonLayout = 1 /* PlayStop */;
659
+ if (playPauseStop) buttonLayout = 2 /* PlayPauseStop */;
660
+ buttonLayout != null ? buttonLayout : buttonLayout = 2 /* PlayPauseStop */;
661
+ switch (buttonLayout) {
662
+ case 0 /* PlayStopSingle */:
663
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
664
+ if (btn) controller.setPlayStopButton(btn, playLabel, stopLabel);
665
+ } });
666
+ case 1 /* PlayStop */:
667
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "btn-group", children: [
668
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
669
+ if (btn) controller.setPlayButton(btn, playLabel);
670
+ } }),
671
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
672
+ if (btn) controller.setStopButton(btn, stopLabel);
673
+ } })
674
+ ] });
675
+ case 2 /* PlayPauseStop */:
676
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "btn-group", children: [
677
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
678
+ if (btn) controller.setPlayButton(btn, playLabel);
679
+ } }),
680
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
681
+ if (btn) controller.setPauseButton(btn, pauseLabel);
682
+ } }),
683
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: "btn btn-primary", ref: (btn) => {
684
+ if (btn) controller.setStopButton(btn, stopLabel);
685
+ } })
686
+ ] });
687
+ default:
688
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
689
+ "Invalid button layout: ",
690
+ buttonLayout
691
+ ] });
683
692
  }
684
693
  }
685
694
  };
@@ -1,7 +1,7 @@
1
- /* WebMusicScore v5.0.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
1
+ /* WebMusicScore v5.2.0 | (c) 2023 PahkaSoft | MIT License | Includes: Tone.js (MIT License) */
2
2
  import {
3
3
  __publicField
4
- } from "../chunk-J3KU3U4W.mjs";
4
+ } from "../chunk-LC5JMIVF.mjs";
5
5
 
6
6
  // src/react-ui/circle-of-fifths.tsx
7
7
  import * as React from "react";
@@ -580,7 +580,7 @@ var MusicScoreView = class extends React3.Component {
580
580
  this.renderer.draw();
581
581
  }
582
582
  };
583
- return /* @__PURE__ */ jsx3("canvas", { style: { position: "relative" }, ref: setCanvas, children: "Canvas error!" });
583
+ return /* @__PURE__ */ jsx3("canvas", { style: { position: "relative" }, ref: setCanvas, children: "Your browser does not support the HTML canvas tag." });
584
584
  }
585
585
  };
586
586
 
@@ -608,37 +608,46 @@ var PlaybackButtons = class extends React4.Component {
608
608
  }
609
609
  }
610
610
  render() {
611
- let { buttonLayout, playLabel, pauseLabel, stopLabel } = this.props;
611
+ let { buttonLayout, singlePlayStop, playStop, playPauseStop, playLabel, pauseLabel, stopLabel } = this.props;
612
612
  let { controller } = this.state;
613
- buttonLayout = buttonLayout != null ? buttonLayout : 2 /* PlayPauseStop */;
614
- playLabel = playLabel != null ? playLabel : "Play";
615
- pauseLabel = pauseLabel != null ? pauseLabel : "Pause";
616
- stopLabel = stopLabel != null ? stopLabel : "Stop";
617
- if (buttonLayout === 0 /* PlayStopSingle */) {
618
- return /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
619
- if (btn) controller.setPlayStopButton(btn, playLabel, stopLabel);
620
- } });
621
- } else if (buttonLayout === 1 /* PlayStop */) {
622
- return /* @__PURE__ */ jsxs("div", { className: "btn-group", children: [
623
- /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
624
- if (btn) controller.setPlayButton(btn, playLabel);
625
- } }),
626
- /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
627
- if (btn) controller.setStopButton(btn, stopLabel);
628
- } })
629
- ] });
630
- } else {
631
- return /* @__PURE__ */ jsxs("div", { className: "btn-group", children: [
632
- /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
633
- if (btn) controller.setPlayButton(btn, playLabel);
634
- } }),
635
- /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
636
- if (btn) controller.setPauseButton(btn, pauseLabel);
637
- } }),
638
- /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
639
- if (btn) controller.setStopButton(btn, stopLabel);
640
- } })
641
- ] });
613
+ playLabel != null ? playLabel : playLabel = "Play";
614
+ pauseLabel != null ? pauseLabel : pauseLabel = "Pause";
615
+ stopLabel != null ? stopLabel : stopLabel = "Stop";
616
+ if (singlePlayStop) buttonLayout = 0 /* PlayStopSingle */;
617
+ if (playStop) buttonLayout = 1 /* PlayStop */;
618
+ if (playPauseStop) buttonLayout = 2 /* PlayPauseStop */;
619
+ buttonLayout != null ? buttonLayout : buttonLayout = 2 /* PlayPauseStop */;
620
+ switch (buttonLayout) {
621
+ case 0 /* PlayStopSingle */:
622
+ return /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
623
+ if (btn) controller.setPlayStopButton(btn, playLabel, stopLabel);
624
+ } });
625
+ case 1 /* PlayStop */:
626
+ return /* @__PURE__ */ jsxs("div", { className: "btn-group", children: [
627
+ /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
628
+ if (btn) controller.setPlayButton(btn, playLabel);
629
+ } }),
630
+ /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
631
+ if (btn) controller.setStopButton(btn, stopLabel);
632
+ } })
633
+ ] });
634
+ case 2 /* PlayPauseStop */:
635
+ return /* @__PURE__ */ jsxs("div", { className: "btn-group", children: [
636
+ /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
637
+ if (btn) controller.setPlayButton(btn, playLabel);
638
+ } }),
639
+ /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
640
+ if (btn) controller.setPauseButton(btn, pauseLabel);
641
+ } }),
642
+ /* @__PURE__ */ jsx4("button", { className: "btn btn-primary", ref: (btn) => {
643
+ if (btn) controller.setStopButton(btn, stopLabel);
644
+ } })
645
+ ] });
646
+ default:
647
+ return /* @__PURE__ */ jsxs("div", { children: [
648
+ "Invalid button layout: ",
649
+ buttonLayout
650
+ ] });
642
651
  }
643
652
  }
644
653
  };
@@ -1,5 +1,5 @@
1
- import { N as Note, S as SymbolSet } from './note-eA2xPPiG.js';
2
- import { K as KeySignature } from './tempo-GrstpD9G.js';
1
+ import { N as Note, S as SymbolSet } from './note-CgCIBwvR.js';
2
+ import { K as KeySignature } from './tempo-DMt3iwz9.js';
3
3
 
4
4
  /** Interval direction type. */
5
5
  type IntervalDirection = "Unison" | "Ascending" | "Descending";
@@ -1,5 +1,5 @@
1
- import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, b as VerseNumber, L as LyricsOptions, c as StaffTabOrGroups, F as Fermata, d as Navigation, A as AnnotationText, e as Annotation, f as Label, C as Connective, g as TieType, h as NoteAnchor, i as VerticalPosition } from '../music-objects-3Hxlkxy6.mjs';
2
- export { aa as Arpeggio, a2 as Clef, D as DivRect, ae as DynamicsAnnotation, ac as LyricsAlign, ad as LyricsHyphen, s as MAccidental, u as MArpeggio, H as MBarLineLeft, G as MBarLineRight, v as MBeamGroup, t as MConnective, x as MEnding, a1 as MExtensionLine, y as MFermata, z as MHeader, B as MImage, a0 as MLyrics, E as MMeasure, J as MNoteGroup, q as MPlaybackButtons, o as MPlayer, p as MRenderer, P as MRest, U as MRhythmColumn, W as MScoreRow, Z as MSignature, _ as MSpecialText, X as MStaff, w as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, I as MStaffTabBarLine, Y as MTab, O as MTabNoteGroup, $ as MText, r as MusicInterface, ag as PlayState, ah as PlayStateChangeListener, k as ScoreEvent, n as ScoreEventListener, j as ScoreEventType, m as ScoreObjectEvent, l as ScoreStaffPosEvent, a3 as StaffConfig, ab as StaffTabOrGroup, a9 as Stem, a6 as StringNumber, a4 as TabConfig, af as TempoAnnotation, a7 as getStringNumbers, a8 as getVerseNumbers, a5 as getVoiceIds } from '../music-objects-3Hxlkxy6.mjs';
1
+ import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, b as VerseNumber, L as LyricsOptions, c as StaffTabOrGroups, F as Fermata, d as Navigation, A as AnnotationText, e as Annotation, f as Label, C as Connective, g as TieType, h as NoteAnchor, i as VerticalPosition } from '../music-objects-CB05XryE.mjs';
2
+ export { ad as Arpeggio, a5 as BaseConfig, a4 as Clef, D as DivRect, ah as DynamicsAnnotation, af as LyricsAlign, ag as LyricsHyphen, s as MAccidental, u as MArpeggio, H as MBarLineLeft, G as MBarLineRight, v as MBeamGroup, t as MConnective, x as MEnding, a3 as MExtensionLine, y as MFermata, z as MHeader, B as MImage, a2 as MLyrics, E as MMeasure, J as MNoteGroup, q as MPlaybackButtons, o as MPlayer, p as MRenderer, P as MRest, U as MRhythmColumn, W as MScoreRow, a0 as MSpecialText, X as MStaff, w as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, Z as MStaffSignature, I as MStaffTabBarLine, Y as MTab, O as MTabNoteGroup, $ as MTabRhythm, _ as MTabSignature, a1 as MText, r as MusicInterface, aj as PlayState, ak as PlayStateChangeListener, k as ScoreEvent, n as ScoreEventListener, j as ScoreEventType, m as ScoreObjectEvent, l as ScoreStaffPosEvent, a6 as StaffConfig, ae as StaffTabOrGroup, ac as Stem, a9 as StringNumber, a7 as TabConfig, ai as TempoAnnotation, aa as getStringNumbers, ab as getVerseNumbers, a8 as getVoiceIds } from '../music-objects-CB05XryE.mjs';
3
3
  import { N as Note } from '../note-eA2xPPiG.mjs';
4
4
  import { S as ScaleType, c as Scale } from '../scale-DQP3b9Zx.mjs';
5
5
  import { N as NoteLength, i as NoteLengthStr, K as KeySignature, b as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-dkctPkCS.mjs';
@@ -1,8 +1,8 @@
1
- import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, b as VerseNumber, L as LyricsOptions, c as StaffTabOrGroups, F as Fermata, d as Navigation, A as AnnotationText, e as Annotation, f as Label, C as Connective, g as TieType, h as NoteAnchor, i as VerticalPosition } from '../music-objects-CI7IjsjE.js';
2
- export { aa as Arpeggio, a2 as Clef, D as DivRect, ae as DynamicsAnnotation, ac as LyricsAlign, ad as LyricsHyphen, s as MAccidental, u as MArpeggio, H as MBarLineLeft, G as MBarLineRight, v as MBeamGroup, t as MConnective, x as MEnding, a1 as MExtensionLine, y as MFermata, z as MHeader, B as MImage, a0 as MLyrics, E as MMeasure, J as MNoteGroup, q as MPlaybackButtons, o as MPlayer, p as MRenderer, P as MRest, U as MRhythmColumn, W as MScoreRow, Z as MSignature, _ as MSpecialText, X as MStaff, w as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, I as MStaffTabBarLine, Y as MTab, O as MTabNoteGroup, $ as MText, r as MusicInterface, ag as PlayState, ah as PlayStateChangeListener, k as ScoreEvent, n as ScoreEventListener, j as ScoreEventType, m as ScoreObjectEvent, l as ScoreStaffPosEvent, a3 as StaffConfig, ab as StaffTabOrGroup, a9 as Stem, a6 as StringNumber, a4 as TabConfig, af as TempoAnnotation, a7 as getStringNumbers, a8 as getVerseNumbers, a5 as getVoiceIds } from '../music-objects-CI7IjsjE.js';
3
- import { N as Note } from '../note-eA2xPPiG.js';
4
- import { S as ScaleType, c as Scale } from '../scale-DGx3tJH4.js';
5
- import { N as NoteLength, i as NoteLengthStr, K as KeySignature, b as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-GrstpD9G.js';
1
+ import { N as NoteOptions, R as RestOptions, S as StaffPreset, a as ScoreConfiguration, M as MDocument, V as VoiceId, T as TupletOptions, b as VerseNumber, L as LyricsOptions, c as StaffTabOrGroups, F as Fermata, d as Navigation, A as AnnotationText, e as Annotation, f as Label, C as Connective, g as TieType, h as NoteAnchor, i as VerticalPosition } from '../music-objects-CwPOlqFi.js';
2
+ export { ad as Arpeggio, a5 as BaseConfig, a4 as Clef, D as DivRect, ah as DynamicsAnnotation, af as LyricsAlign, ag as LyricsHyphen, s as MAccidental, u as MArpeggio, H as MBarLineLeft, G as MBarLineRight, v as MBeamGroup, t as MConnective, x as MEnding, a3 as MExtensionLine, y as MFermata, z as MHeader, B as MImage, a2 as MLyrics, E as MMeasure, J as MNoteGroup, q as MPlaybackButtons, o as MPlayer, p as MRenderer, P as MRest, U as MRhythmColumn, W as MScoreRow, a0 as MSpecialText, X as MStaff, w as MStaffBeamGroup, K as MStaffNoteGroup, Q as MStaffRest, Z as MStaffSignature, I as MStaffTabBarLine, Y as MTab, O as MTabNoteGroup, $ as MTabRhythm, _ as MTabSignature, a1 as MText, r as MusicInterface, aj as PlayState, ak as PlayStateChangeListener, k as ScoreEvent, n as ScoreEventListener, j as ScoreEventType, m as ScoreObjectEvent, l as ScoreStaffPosEvent, a6 as StaffConfig, ae as StaffTabOrGroup, ac as Stem, a9 as StringNumber, a7 as TabConfig, ai as TempoAnnotation, aa as getStringNumbers, ab as getVerseNumbers, a8 as getVoiceIds } from '../music-objects-CwPOlqFi.js';
3
+ import { N as Note } from '../note-CgCIBwvR.js';
4
+ import { S as ScaleType, c as Scale } from '../scale-CBW4eTz7.js';
5
+ import { N as NoteLength, i as NoteLengthStr, K as KeySignature, b as TimeSignature, T as TimeSignatures, B as BeamGrouping, k as TupletRatio } from '../tempo-DMt3iwz9.js';
6
6
  import '@tspro/ts-utils-lib';
7
7
 
8
8
  /** Tuplet builder type. */