@scorelabs/viewer 1.0.1

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 (83) hide show
  1. package/README.md +5 -0
  2. package/dist/android-chrome-192x192.png +0 -0
  3. package/dist/android-chrome-512x512.png +0 -0
  4. package/dist/apple-touch-icon.png +0 -0
  5. package/dist/audio/AudioPlayer.d.ts +54 -0
  6. package/dist/favicon-16x16.png +0 -0
  7. package/dist/favicon-32x32.png +0 -0
  8. package/dist/favicon-96x96.png +0 -0
  9. package/dist/favicon.ico +0 -0
  10. package/dist/favicon.svg +1 -0
  11. package/dist/importers/MusicXMLParser.d.ts +51 -0
  12. package/dist/importers/index.d.ts +6 -0
  13. package/dist/index.d.ts +2 -0
  14. package/dist/layouts/LayoutConfig.d.ts +62 -0
  15. package/dist/layouts/LayoutUtils.d.ts +10 -0
  16. package/dist/layouts/MeasureLayout.d.ts +20 -0
  17. package/dist/layouts/NoteLayout.d.ts +21 -0
  18. package/dist/layouts/ScoreLayout.d.ts +28 -0
  19. package/dist/layouts/StaffLayout.d.ts +26 -0
  20. package/dist/layouts/StaffSystemLayout.d.ts +18 -0
  21. package/dist/layouts/index.d.ts +6 -0
  22. package/dist/models/Instrument.d.ts +26 -0
  23. package/dist/models/Measure.d.ts +80 -0
  24. package/dist/models/Note.d.ts +122 -0
  25. package/dist/models/Part.d.ts +60 -0
  26. package/dist/models/Pitch.d.ts +45 -0
  27. package/dist/models/Score.d.ts +120 -0
  28. package/dist/models/Staff.d.ts +57 -0
  29. package/dist/models/__tests__/Note.test.d.ts +1 -0
  30. package/dist/models/__tests__/Pitch.test.d.ts +1 -0
  31. package/dist/models/index.d.ts +7 -0
  32. package/dist/models/types.d.ts +163 -0
  33. package/dist/new_score.json +112 -0
  34. package/dist/rendering/NoteRenderer.d.ts +52 -0
  35. package/dist/rendering/ScoreRenderer.d.ts +35 -0
  36. package/dist/rendering/StaffRenderer.d.ts +67 -0
  37. package/dist/rendering/glyphs/AccidentalGlyphs.d.ts +5 -0
  38. package/dist/rendering/glyphs/ClefGlyphs.d.ts +19 -0
  39. package/dist/rendering/glyphs/DecorationGlyphs.d.ts +11 -0
  40. package/dist/rendering/glyphs/NoteGlyphs.d.ts +19 -0
  41. package/dist/rendering/glyphs/RestGlyphs.d.ts +11 -0
  42. package/dist/rendering/glyphs/SignatureGlyphs.d.ts +11 -0
  43. package/dist/rendering/glyphs/index.d.ts +6 -0
  44. package/dist/rendering/index.d.ts +4 -0
  45. package/dist/satb.xml +4 -0
  46. package/dist/score-viewer.js +13234 -0
  47. package/dist/score-viewer.umd.cjs +145 -0
  48. package/dist/scores/canon_pachelbel.xml +4 -0
  49. package/dist/scores/el_cant_dels_ocells.xml +112 -0
  50. package/dist/scores/el_noi_de_la_mare.xml +102 -0
  51. package/dist/scores/els_segadors.xml +110 -0
  52. package/dist/scores/imported/forest.xml +161 -0
  53. package/dist/showcase.json +292 -0
  54. package/dist/site.webmanifest +21 -0
  55. package/dist/src/App.d.ts +1 -0
  56. package/dist/src/components/AboutDialog.d.ts +6 -0
  57. package/dist/src/components/ChordDialog.d.ts +8 -0
  58. package/dist/src/components/ClefDialog.d.ts +9 -0
  59. package/dist/src/components/FloatingToolbar.d.ts +26 -0
  60. package/dist/src/components/InstrumentsDialog.d.ts +22 -0
  61. package/dist/src/components/KeySignatureDialog.d.ts +9 -0
  62. package/dist/src/components/Logo.d.ts +6 -0
  63. package/dist/src/components/MenuBar.d.ts +20 -0
  64. package/dist/src/components/NoteInputToolbar.d.ts +101 -0
  65. package/dist/src/components/PageSetupDialog.d.ts +9 -0
  66. package/dist/src/components/ScoreCanvas.d.ts +49 -0
  67. package/dist/src/components/ScoreInfoDialog.d.ts +19 -0
  68. package/dist/src/components/ScoreLayoutDialog.d.ts +9 -0
  69. package/dist/src/components/TempoDialog.d.ts +11 -0
  70. package/dist/src/components/TextDialog.d.ts +10 -0
  71. package/dist/src/components/TimeSignatureDialog.d.ts +9 -0
  72. package/dist/src/components/TransposeDialog.d.ts +9 -0
  73. package/dist/src/components/VirtualKeyboard.d.ts +10 -0
  74. package/dist/src/exporters/MusicXMLExporter.d.ts +10 -0
  75. package/dist/src/hooks/useHistory.d.ts +14 -0
  76. package/dist/src/index.d.ts +24 -0
  77. package/dist/src/main.d.ts +1 -0
  78. package/dist/src/services/HarmonyService.d.ts +10 -0
  79. package/dist/src/services/VocalSynthesisService.d.ts +13 -0
  80. package/dist/src/utils/pdfToPng.d.ts +5 -0
  81. package/dist/web-app-manifest-192x192.png +0 -0
  82. package/dist/web-app-manifest-512x512.png +0 -0
  83. package/package.json +63 -0
@@ -0,0 +1,11 @@
1
+ import { Duration } from '../../models/types';
2
+ /**
3
+ * Draw a rest symbol
4
+ */
5
+ export declare function drawRest(ctx: CanvasRenderingContext2D, x: number, y: number, // Middle line Y
6
+ duration: Duration, staffLineSpacing: number, color?: string): void;
7
+ /**
8
+ * Draw a multi-measure rest (thick horizontal bar with measure count)
9
+ */
10
+ export declare function drawMultiMeasureRest(ctx: CanvasRenderingContext2D, x: number, y: number, // Middle line Y
11
+ width: number, measureCount: number, staffLineSpacing: number, musicFont?: 'Standard' | 'Jazz'): void;
@@ -0,0 +1,11 @@
1
+ import { Clef } from '../../models/types';
2
+ /**
3
+ * Draw time signature
4
+ */
5
+ export declare function drawTimeSignature(ctx: CanvasRenderingContext2D, x: number, y: number, // Middle line Y
6
+ beats: number, beatType: number, staffLineSpacing: number, musicFont?: 'Standard' | 'Jazz'): void;
7
+ /**
8
+ * Draw key signature accidentals
9
+ */
10
+ export declare function drawKeySignature(ctx: CanvasRenderingContext2D, x: number, y: number, // Middle line Y
11
+ fifths: number, clef: Clef, staffLineSpacing: number): void;
@@ -0,0 +1,6 @@
1
+ export * from './ClefGlyphs';
2
+ export * from './NoteGlyphs';
3
+ export * from './RestGlyphs';
4
+ export * from './AccidentalGlyphs';
5
+ export * from './SignatureGlyphs';
6
+ export * from './DecorationGlyphs';
@@ -0,0 +1,4 @@
1
+ export * from './glyphs';
2
+ export * from './StaffRenderer';
3
+ export * from './NoteRenderer';
4
+ export * from './ScoreRenderer';
package/dist/satb.xml ADDED
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0 Partwise//EN"
3
+ "http://www.musicxml.org/dtds/partwise.dtd">
4
+ <score-partwise version="2.0"><work><work-title/></work><identification><creator type="composer"/><creator type="lyricist"/><rights/><encoding><software>Noteflight version 0.4</software><encoding-date>2026-02-02</encoding-date><supports attribute="new-system" element="print" type="no" value="no"/><supports attribute="new-page" element="print" type="no" value="no"/></encoding></identification><defaults><scaling><millimeters>2.1166666679999997</millimeters><tenths>10</tenths></scaling><page-layout><page-height>1320</page-height><page-width>1020</page-width><page-margins type="both"><left-margin>59.583333333333336</left-margin><right-margin>56.66666666666667</right-margin><top-margin>96.66666666666667</top-margin><bottom-margin>80</bottom-margin></page-margins></page-layout><system-layout><system-margins><left-margin>59.583333333333336</left-margin><right-margin>26.666666666666668</right-margin></system-margins><system-distance>55</system-distance><top-system-distance>108.33333333333334</top-system-distance></system-layout><staff-layout><staff-distance>50</staff-distance></staff-layout></defaults><part-list><part-group number="1" type="start"><group-symbol>bracket</group-symbol></part-group><score-part id="P1"><part-name>Soprano</part-name><part-abbreviation>Sop.</part-abbreviation><score-instrument id="P1I1"><instrument-name>Soprano</instrument-name><instrument-sound>voice.vocals</instrument-sound></score-instrument><midi-instrument id="P1I1"><midi-channel>1</midi-channel><midi-program>54</midi-program></midi-instrument></score-part><score-part id="P2"><part-name>Alto</part-name><part-abbreviation>Alto</part-abbreviation><score-instrument id="P2I1"><instrument-name>Alto</instrument-name><instrument-sound>voice.vocals</instrument-sound></score-instrument><midi-instrument id="P2I1"><midi-channel>2</midi-channel><midi-program>53</midi-program></midi-instrument></score-part><score-part id="P3"><part-name>Tenor</part-name><part-abbreviation>Ten.</part-abbreviation><score-instrument id="P3I1"><instrument-name>Tenor</instrument-name><instrument-sound>voice.vocals</instrument-sound></score-instrument><midi-instrument id="P3I1"><midi-channel>3</midi-channel><midi-program>54</midi-program></midi-instrument></score-part><score-part id="P4"><part-name>Bass</part-name><part-abbreviation>Bass</part-abbreviation><score-instrument id="P4I1"><instrument-name>Bass</instrument-name><instrument-sound>voice.vocals</instrument-sound></score-instrument><midi-instrument id="P4I1"><midi-channel>4</midi-channel><midi-program>54</midi-program></midi-instrument></score-part></part-list><part id="P1"><measure number="1"><attributes><divisions>64</divisions><key><fifths>0</fifths><mode>major</mode></key><time print-object="yes"><beats>4</beats><beat-type>4</beat-type></time><clef number="1"><sign>G</sign><line>2</line></clef></attributes><direction placement="above"><direction-type><metronome print-object="no"><beat-unit>quarter</beat-unit><per-minute>120</per-minute></metronome></direction-type><sound tempo="120"/></direction><direction placement="above"><direction-type><metronome print-object="yes"><beat-unit>quarter</beat-unit><per-minute>120</per-minute></metronome></direction-type><sound tempo="120"/></direction><note><pitch><step>C</step><octave>5</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note><note><pitch><step>B</step><octave>4</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note><note><pitch><step>E</step><octave>4</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note><note><pitch><step>A</step><octave>4</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note></measure><measure number="2"><attributes/><note><pitch><step>G</step><octave>4</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note><note><pitch><step>C</step><octave>4</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note><note><pitch><step>D</step><octave>4</octave></pitch><duration>128</duration><voice>1</voice><type>half</type></note></measure><measure number="3"><attributes/><note><pitch><step>E</step><octave>4</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note><note><pitch><step>F</step><octave>4</octave></pitch><duration>128</duration><voice>1</voice><type>half</type></note><note><rest/><duration>64</duration><voice>1</voice><type>quarter</type></note></measure><measure number="4"><attributes/><note><pitch><step>G</step><octave>4</octave></pitch><duration>64</duration><voice>1</voice><type>quarter</type></note><note><pitch><step>C</step><octave>5</octave></pitch><duration>128</duration><voice>1</voice><type>half</type></note><note><rest/><duration>64</duration><voice>1</voice><type>quarter</type></note><barline location="right"><bar-style>light-heavy</bar-style></barline></measure></part><part id="P2"><measure number="1"><attributes><divisions>64</divisions><key><fifths>0</fifths><mode>major</mode></key><time print-object="yes"><beats>4</beats><beat-type>4</beat-type></time><clef number="1"><sign>G</sign><line>2</line></clef></attributes><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="2"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="3"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="4"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note><barline location="right"><bar-style>light-heavy</bar-style></barline></measure></part><part id="P3"><measure number="1"><attributes><divisions>64</divisions><key><fifths>0</fifths><mode>major</mode></key><time print-object="yes"><beats>4</beats><beat-type>4</beat-type></time><clef number="1"><sign>G</sign><line>2</line><clef-octave-change>-1</clef-octave-change></clef></attributes><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="2"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="3"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="4"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note><barline location="right"><bar-style>light-heavy</bar-style></barline></measure></part><part id="P4"><measure number="1"><attributes><divisions>64</divisions><key><fifths>0</fifths><mode>major</mode></key><time print-object="yes"><beats>4</beats><beat-type>4</beat-type></time><clef number="1"><sign>F</sign><line>4</line></clef></attributes><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="2"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="3"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note></measure><measure number="4"><attributes/><note><rest/><duration>256</duration><voice>1</voice><type>whole</type></note><barline location="right"><bar-style>light-heavy</bar-style></barline></measure></part></score-partwise>