vexflow-native 1.8.0 → 1.9.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 (133) hide show
  1. package/README.md +33 -405
  2. package/lib/module/base/FontManager.js +2 -0
  3. package/lib/module/base/FontManager.js.map +1 -1
  4. package/lib/module/base/VexflowRecordingContext.js +2 -0
  5. package/lib/module/base/VexflowRecordingContext.js.map +1 -1
  6. package/lib/module/base/index.js +1 -0
  7. package/lib/module/base/index.js.map +1 -1
  8. package/lib/module/musicxml/MusicXmlParser/MeasureParser.js +24 -7
  9. package/lib/module/musicxml/MusicXmlParser/MeasureParser.js.map +1 -1
  10. package/lib/module/musicxml/MusicXmlParser/MusicXmlDirections.js +11 -3
  11. package/lib/module/musicxml/MusicXmlParser/MusicXmlDirections.js.map +1 -1
  12. package/lib/module/musicxml/MusicXmlParser/Spanners.js +21 -5
  13. package/lib/module/musicxml/MusicXmlParser/Spanners.js.map +1 -1
  14. package/lib/module/musicxml/MusicXmlParser/mappers.js +1 -1
  15. package/lib/module/musicxml/MusicXmlParser/mappers.js.map +1 -1
  16. package/lib/module/{state/constants.js → percussion/index.js} +3 -3
  17. package/lib/module/percussion/index.js.map +1 -0
  18. package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js +4 -0
  19. package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js.map +1 -1
  20. package/lib/module/renderer/fixedNoteSpacing.js +56 -0
  21. package/lib/module/renderer/fixedNoteSpacing.js.map +1 -0
  22. package/lib/module/renderer/index.js +1 -0
  23. package/lib/module/renderer/index.js.map +1 -1
  24. package/lib/module/renderer/itemLayout.js +108 -0
  25. package/lib/module/renderer/itemLayout.js.map +1 -0
  26. package/lib/module/renderer/measure.js +30 -106
  27. package/lib/module/renderer/measure.js.map +1 -1
  28. package/lib/module/renderer/measureBounds.js +73 -0
  29. package/lib/module/renderer/measureBounds.js.map +1 -0
  30. package/lib/module/renderer/measureModifiers.js +99 -0
  31. package/lib/module/renderer/measureModifiers.js.map +1 -0
  32. package/lib/module/renderer/noteModifiers.js +212 -0
  33. package/lib/module/renderer/noteModifiers.js.map +1 -0
  34. package/lib/module/renderer/render.js +33 -116
  35. package/lib/module/renderer/render.js.map +1 -1
  36. package/lib/module/renderer/scale.js +16 -2
  37. package/lib/module/renderer/scale.js.map +1 -1
  38. package/lib/module/renderer/scoreParsing.js +37 -199
  39. package/lib/module/renderer/scoreParsing.js.map +1 -1
  40. package/lib/module/renderer/stave.js +19 -3
  41. package/lib/module/renderer/stave.js.map +1 -1
  42. package/lib/module/renderer/useScoreRecording.js +10 -3
  43. package/lib/module/renderer/useScoreRecording.js.map +1 -1
  44. package/lib/module/renderer/vfKeys.js +72 -0
  45. package/lib/module/renderer/vfKeys.js.map +1 -0
  46. package/lib/module/state/index.js +1 -1
  47. package/lib/module/state/index.js.map +1 -1
  48. package/lib/typescript/src/base/FontManager.d.ts +1 -0
  49. package/lib/typescript/src/base/FontManager.d.ts.map +1 -1
  50. package/lib/typescript/src/base/VexflowRecordingContext.d.ts +1 -0
  51. package/lib/typescript/src/base/VexflowRecordingContext.d.ts.map +1 -1
  52. package/lib/typescript/src/base/index.d.ts +1 -0
  53. package/lib/typescript/src/base/index.d.ts.map +1 -1
  54. package/lib/typescript/src/musicxml/MusicXmlParser/InternalTypes.d.ts +4 -2
  55. package/lib/typescript/src/musicxml/MusicXmlParser/InternalTypes.d.ts.map +1 -1
  56. package/lib/typescript/src/musicxml/MusicXmlParser/MeasureParser.d.ts.map +1 -1
  57. package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlDirections.d.ts +6 -1
  58. package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlDirections.d.ts.map +1 -1
  59. package/lib/typescript/src/musicxml/MusicXmlParser/Spanners.d.ts +6 -1
  60. package/lib/typescript/src/musicxml/MusicXmlParser/Spanners.d.ts.map +1 -1
  61. package/lib/typescript/src/musicxml/MusicXmlParser/mappers.d.ts.map +1 -1
  62. package/lib/typescript/src/musicxml/index.d.ts +1 -0
  63. package/lib/typescript/src/musicxml/index.d.ts.map +1 -1
  64. package/lib/typescript/src/percussion/index.d.ts +4 -0
  65. package/lib/typescript/src/percussion/index.d.ts.map +1 -0
  66. package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts.map +1 -1
  67. package/lib/typescript/src/renderer/fixedNoteSpacing.d.ts +17 -0
  68. package/lib/typescript/src/renderer/fixedNoteSpacing.d.ts.map +1 -0
  69. package/lib/typescript/src/renderer/index.d.ts +2 -0
  70. package/lib/typescript/src/renderer/index.d.ts.map +1 -1
  71. package/lib/typescript/src/renderer/itemLayout.d.ts +23 -0
  72. package/lib/typescript/src/renderer/itemLayout.d.ts.map +1 -0
  73. package/lib/typescript/src/renderer/layout.d.ts +1 -1
  74. package/lib/typescript/src/renderer/layout.d.ts.map +1 -1
  75. package/lib/typescript/src/renderer/measure.d.ts +3 -6
  76. package/lib/typescript/src/renderer/measure.d.ts.map +1 -1
  77. package/lib/typescript/src/renderer/measureBounds.d.ts +13 -0
  78. package/lib/typescript/src/renderer/measureBounds.d.ts.map +1 -0
  79. package/lib/typescript/src/renderer/measureModifiers.d.ts +20 -0
  80. package/lib/typescript/src/renderer/measureModifiers.d.ts.map +1 -0
  81. package/lib/typescript/src/renderer/noteModifiers.d.ts +29 -0
  82. package/lib/typescript/src/renderer/noteModifiers.d.ts.map +1 -0
  83. package/lib/typescript/src/renderer/render.d.ts +2 -27
  84. package/lib/typescript/src/renderer/render.d.ts.map +1 -1
  85. package/lib/typescript/src/renderer/scale.d.ts.map +1 -1
  86. package/lib/typescript/src/renderer/scoreParsing.d.ts +14 -42
  87. package/lib/typescript/src/renderer/scoreParsing.d.ts.map +1 -1
  88. package/lib/typescript/src/renderer/stave.d.ts +2 -0
  89. package/lib/typescript/src/renderer/stave.d.ts.map +1 -1
  90. package/lib/typescript/src/renderer/types.d.ts +51 -2
  91. package/lib/typescript/src/renderer/types.d.ts.map +1 -1
  92. package/lib/typescript/src/renderer/useScoreRecording.d.ts +2 -2
  93. package/lib/typescript/src/renderer/useScoreRecording.d.ts.map +1 -1
  94. package/lib/typescript/src/renderer/vfKeys.d.ts +17 -0
  95. package/lib/typescript/src/renderer/vfKeys.d.ts.map +1 -0
  96. package/lib/typescript/src/state/index.d.ts +1 -1
  97. package/lib/typescript/src/state/index.d.ts.map +1 -1
  98. package/lib/typescript/src/state/types.d.ts +23 -5
  99. package/lib/typescript/src/state/types.d.ts.map +1 -1
  100. package/package.json +12 -2
  101. package/src/base/FontManager.ts +1 -0
  102. package/src/base/VexflowRecordingContext.ts +1 -0
  103. package/src/base/index.ts +1 -0
  104. package/src/musicxml/MusicXmlParser/InternalTypes.ts +5 -2
  105. package/src/musicxml/MusicXmlParser/MeasureParser.ts +36 -7
  106. package/src/musicxml/MusicXmlParser/MusicXmlDirections.ts +25 -8
  107. package/src/musicxml/MusicXmlParser/Spanners.ts +27 -4
  108. package/src/musicxml/MusicXmlParser/mappers.ts +7 -0
  109. package/src/musicxml/index.ts +1 -0
  110. package/src/percussion/index.ts +7 -0
  111. package/src/renderer/Layout/VerticalSpacing.ts +1 -1
  112. package/src/renderer/ScoreRenderer/ScoreRenderer.tsx +4 -0
  113. package/src/renderer/fixedNoteSpacing.ts +78 -0
  114. package/src/renderer/index.ts +8 -0
  115. package/src/renderer/itemLayout.ts +137 -0
  116. package/src/renderer/layout.ts +1 -1
  117. package/src/renderer/measure.tsx +84 -186
  118. package/src/renderer/measureBounds.ts +109 -0
  119. package/src/renderer/measureModifiers.ts +133 -0
  120. package/src/renderer/noteModifiers.ts +298 -0
  121. package/src/renderer/render.tsx +59 -169
  122. package/src/renderer/scale.ts +21 -1
  123. package/src/renderer/scoreParsing.tsx +77 -288
  124. package/src/renderer/stave.ts +22 -3
  125. package/src/renderer/types.ts +65 -2
  126. package/src/renderer/useScoreRecording.ts +11 -3
  127. package/src/renderer/vfKeys.ts +88 -0
  128. package/src/state/index.ts +1 -1
  129. package/src/state/types.ts +30 -5
  130. package/lib/module/state/constants.js.map +0 -1
  131. package/lib/typescript/src/state/constants.d.ts +0 -4
  132. package/lib/typescript/src/state/constants.d.ts.map +0 -1
  133. package/src/state/constants.ts +0 -4
@@ -1,4 +1,4 @@
1
- import type { Dynamic, GraceNote, Measure, NoteAttachment, ScoreDefaults, Slur, Staff, Tie, TupletGroup } from '../../state';
1
+ import type { DynamicAttachment, GraceNote, Measure, NoteAttachment, ScoreDefaults, Slur, Staff, Tie, TupletGroup } from '../../state';
2
2
  export type PartInfo = {
3
3
  id: string;
4
4
  name?: string;
@@ -17,6 +17,7 @@ export type PendingGraceNotes = {
17
17
  notes: GraceNote[];
18
18
  slash: boolean;
19
19
  };
20
+ export type PendingDynamic = Pick<DynamicAttachment, 'dynamic' | 'placement'>;
20
21
  export type ParserState = {
21
22
  scoreId: string;
22
23
  divisions: number;
@@ -25,7 +26,8 @@ export type ParserState = {
25
26
  ties: Tie[];
26
27
  slurs: Slur[];
27
28
  tuplets: TupletGroup[];
28
- pendingDynamics: Map<string, Dynamic[]>;
29
+ /** Keyed by MusicXML staff number; consumed by that staff's next note. */
30
+ pendingDynamics: Map<string, PendingDynamic[]>;
29
31
  /** Keyed by MusicXML voice name; consumed by that voice's next note. */
30
32
  pendingGraceNotes: Map<string, PendingGraceNotes>;
31
33
  activeTies: Map<string, ActiveSpanner>;
@@ -1 +1 @@
1
- {"version":3,"file":"InternalTypes.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/InternalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,OAAO,EACP,cAAc,EACd,aAAa,EACb,IAAI,EACJ,KAAK,EACL,GAAG,EACH,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IACnC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC;AAEF,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,CAAC;IACxB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IACxC,wEAAwE;IACxE,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;IAClD,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACxC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACzC,CAAC"}
1
+ {"version":3,"file":"InternalTypes.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/InternalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,cAAc,EACd,aAAa,EACb,IAAI,EACJ,KAAK,EACL,GAAG,EACH,WAAW,EACZ,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM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file":"MeasureParser.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/MeasureParser.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiB/D,OAAO,EAUL,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAQpB,wBAAgB,YAAY,CAC1B,OAAO,EAAE,UAAU,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,EAAE,EACpB,KAAK,EAAE,WAAW,QA2EnB"}
1
+ {"version":3,"file":"MeasureParser.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/MeasureParser.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAiB/D,OAAO,EAUL,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAQpB,wBAAgB,YAAY,CAC1B,OAAO,EAAE,UAAU,EACnB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,UAAU,EAAE,EACpB,KAAK,EAAE,WAAW,QAyFnB"}
@@ -1,5 +1,10 @@
1
1
  import type { Direction } from '../../state';
2
2
  import type { ParserState } from './InternalTypes';
3
3
  import { type XmlElement } from './XmlOrder';
4
- export declare function parseDirection(direction: XmlElement, state: ParserState): Direction[];
4
+ export type ParsedDirection = {
5
+ /** 0-based; unvalidated, NaN for a non-numeric `<staff>`. */
6
+ staffIndex: number;
7
+ directions: Direction[];
8
+ };
9
+ export declare function parseDirection(direction: XmlElement, state: ParserState): ParsedDirection;
5
10
  //# sourceMappingURL=MusicXmlDirections.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MusicXmlDirections.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/MusicXmlDirections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAkB,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,cAAc,CAC5B,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,WAAW,GACjB,SAAS,EAAE,CAoDb"}
1
+ {"version":3,"file":"MusicXmlDirections.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/MusicXmlDirections.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAS,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG;IAC5B,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,SAAS,EAAE,CAAC;CACzB,CAAC;AAEF,wBAAgB,cAAc,CAC5B,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,WAAW,GACjB,eAAe,CA+DjB"}
@@ -1,4 +1,9 @@
1
1
  import type { ParserState } from './InternalTypes';
2
2
  import { type XmlElement } from './XmlOrder';
3
- export declare function applyNoteAttachments(note: XmlElement, itemId: string, staffNumber: string, voiceId: string, state: ParserState): void;
3
+ /**
4
+ * `pitchIndex` is the chord-tone position of `note` inside its owner chord
5
+ * (undefined for a standalone note): a chord tone's articulation joins the
6
+ * owner's existing same-articulation attachment instead of adding a glyph.
7
+ */
8
+ export declare function applyNoteAttachments(note: XmlElement, itemId: string, staffNumber: string, voiceId: string, state: ParserState, pitchIndex?: number): void;
4
9
  //# sourceMappingURL=Spanners.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Spanners.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/Spanners.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,WAAW,QA0CnB"}
1
+ {"version":3,"file":"Spanners.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/Spanners.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAML,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,UAAU,EAChB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,WAAW,EAClB,UAAU,CAAC,EAAE,MAAM,QA2DpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,YAAY,EACZ,OAAO,EACP,IAAI,EACJ,OAAO,EAEP,YAAY,EACZ,UAAU,EACV,KAAK,EAEN,MAAM,aAAa,CAAC;AAErB,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAkDpB,wBAAgB,OAAO,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAyB9C;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,SAAU,GAAG,YAAY,CAa5E;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAyBxD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAYtE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,CAAC,EAAE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OAAO,EAAE,CAInE;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS,CAE1E;AAED,wBAAgB,0BAA0B,CACxC,SAAS,CAAC,EAAE,UAAU,GACrB,YAAY,EAAE,CAoBhB"}
@@ -1,2 +1,3 @@
1
1
  export { MusicXmlParseError, parseMusicXmlToScore, type ParseMusicXmlOptions, } from './MusicXmlParser';
2
+ export type { MusicXmlParseContext } from './MusicXmlParser/types';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/musicxml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/musicxml/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { Pitch } from '../state';
2
+ /** The pitch drawn on the single visible line of a `lines: 1` staff. */
3
+ export declare const ONE_LINE_STAFF_PITCH: Readonly<Pitch>;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/percussion/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,wEAAwE;AACxE,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,KAAK,CAG/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScoreRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/ScoreRenderer/ScoreRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,UAAU,CAAC;;AA2RlB,wBAAmC"}
1
+ {"version":3,"file":"ScoreRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/renderer/ScoreRenderer/ScoreRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,KAAK,EAGV,kBAAkB,EACnB,MAAM,UAAU,CAAC;;AA+RlB,wBAAmC"}
@@ -0,0 +1,17 @@
1
+ import { Stave } from 'vexflow';
2
+ import type { Formatter, Voice as VFVoice } from 'vexflow';
3
+ /**
4
+ * Re-positions every tick context at its time-proportional x inside the note
5
+ * area, overriding the formatter's duration-weighted spacing. Runs after
6
+ * `formatToStave` (the same post-format `setX` mechanism the formatter's own
7
+ * tuning uses), so beams, tuplets and modifiers pick the final positions up
8
+ * at draw time. The lattice follows VexFlow's own convention for its first
9
+ * tick: it starts at that context's left-modifier width (`totalLeftPx`), so a
10
+ * grace group or accidental on beat 1 hangs inside the note area instead of
11
+ * over the clef. The proportional span is clamped only by that inset and the
12
+ * LAST context's width — with a spacer voice on the lattice the latter is
13
+ * constant, so the mapping stays a pure function of time and of what hangs
14
+ * left of beat 1.
15
+ */
16
+ export declare function applyFixedNoteSpacing(formatter: Formatter, voices: VFVoice[], stave: Stave): void;
17
+ //# sourceMappingURL=fixedNoteSpacing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fixedNoteSpacing.d.ts","sourceRoot":"","sources":["../../../../src/renderer/fixedNoteSpacing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,SAAS,CAAC;AAE3D;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,OAAO,EAAE,EACjB,KAAK,EAAE,KAAK,QA0Db"}
@@ -1,5 +1,7 @@
1
1
  export { default as ScoreRenderer } from './ScoreRenderer';
2
2
  export * from './colorScheme';
3
3
  export * from './types';
4
+ export { Annotation, Articulation, Modifier, Ornament, StaveNote, } from 'vexflow';
5
+ export type { RenderContext } from 'vexflow';
4
6
  export { isVexflowNativeDebugEnabled, setVexflowNativeDebugEnabled, } from '../shared/debug';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AAExB,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/renderer/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,UAAU,EACV,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import type { VFVoiceNote } from './scoreParsing';
2
+ import type { ScoreItemBounds, ScoreItemLayout } from './types';
3
+ /**
4
+ * Union box of a drawn note's modifiers; must run after `draw()` because
5
+ * modifiers take their position from it. undefined without modifiers or when
6
+ * none could be measured.
7
+ */
8
+ export declare function computeModifierBounds(note: VFVoiceNote): ScoreItemBounds | undefined;
9
+ /**
10
+ * Center of a formatted note's visual notehead span. When the getters are
11
+ * missing (GhostNotes) the fallback is the center of a NOTIONAL notehead at
12
+ * the block's left edge, capped by the block width — so a `spacer` rest
13
+ * anchors where a real note's head would sit on the same tick, and external
14
+ * UI aligned to it does not hop when the note appears. Zero-width `hidden`
15
+ * rests keep anchoring at their tick x.
16
+ */
17
+ export declare function resolveItemHeadCenterX(note: VFVoiceNote, x: number, width: number): number;
18
+ /**
19
+ * Geometry of a drawn item; must run after `draw()` because modifiers only
20
+ * take their position there.
21
+ */
22
+ export declare function itemLayoutOf(note: VFVoiceNote, measureIndex: number): ScoreItemLayout;
23
+ //# sourceMappingURL=itemLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"itemLayout.d.ts","sourceRoot":"","sources":["../../../../src/renderer/itemLayout.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA4BhE;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,GAChB,eAAe,GAAG,SAAS,CAc7B;AAiCD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EACjB,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,GACZ,MAAM,CAgBR;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,IAAI,EAAE,WAAW,EACjB,YAAY,EAAE,MAAM,GACnB,eAAe,CAYjB"}
@@ -1,7 +1,7 @@
1
1
  import type { Score, Staff, StaffGroup } from '../state';
2
2
  import { type ResolvedMeasureState } from './scoreParsing';
3
3
  import type { MeasuredScore } from './measure';
4
- import type { StaffVerticalBounds } from './measure';
4
+ import type { StaffVerticalBounds } from './measureBounds';
5
5
  import type { RendererRect, RendererSize, RendererType, ScoreOptions } from './types';
6
6
  export interface MeasuredGroupMeasure {
7
7
  groupId: string;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Y,CAAC;IAC3B,WAAW,EAAE,YAAY,CAAC;IAC1B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,OAAO,EAAE,YAAY,EACrB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,YAAY,GACrB,eAAe,CAwDjB"}
@@ -1,9 +1,6 @@
1
1
  import type { Score } from '../state';
2
- import type { ScoreOptions } from './types';
3
- export interface StaffVerticalBounds {
4
- top: number;
5
- bottom: number;
6
- }
2
+ import type { ScoreItemHooks, ScoreOptions } from './types';
3
+ import type { StaffVerticalBounds } from './measureBounds';
7
4
  export interface MeasuredMeasure {
8
5
  groupId: string;
9
6
  measureIndex: number;
@@ -19,5 +16,5 @@ export interface MeasuredScore {
19
16
  /**
20
17
  * Measures each staff group by building VexFlow voices and estimating note width.
21
18
  */
22
- export declare function measureScore(score: Score, options: ScoreOptions): MeasuredScore;
19
+ export declare function measureScore(score: Score, options: ScoreOptions, { decorateItem }?: Pick<ScoreItemHooks, 'decorateItem'>): MeasuredScore;
23
20
  //# sourceMappingURL=measure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../../../src/renderer/measure.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,UAAU,CAAC;AAS7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAO5C,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,GACpB,aAAa,CA+Gf"}
1
+ {"version":3,"file":"measure.d.ts","sourceRoot":"","sources":["../../../../src/renderer/measure.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAS,MAAM,UAAU,CAAC;AAc7C,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQ3D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAYD;;GAEG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,YAAY,EACrB,EAAE,YAAY,EAAE,GAAE,IAAI,CAAC,cAAc,EAAE,cAAc,CAAM,GAC1D,aAAa,CAqHf"}
@@ -0,0 +1,13 @@
1
+ import type { VFVoiceNote } from './scoreParsing';
2
+ export interface StaffVerticalBounds {
3
+ top: number;
4
+ bottom: number;
5
+ }
6
+ /**
7
+ * Mutates the note (draws it against a no-op context and anchors unplaced
8
+ * modifiers); safe only because measurement voices are discarded and
9
+ * rendering builds fresh ones.
10
+ */
11
+ export declare function mergeNoteBounds(bounds: StaffVerticalBounds | undefined, note: VFVoiceNote): void;
12
+ export declare function mergeY(bounds: StaffVerticalBounds | undefined, y: number): void;
13
+ //# sourceMappingURL=measureBounds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measureBounds.d.ts","sourceRoot":"","sources":["../../../../src/renderer/measureBounds.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAChB;AA8BD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,mBAAmB,GAAG,SAAS,EACvC,IAAI,EAAE,WAAW,QA4ClB;AAOD,wBAAgB,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,QAOxE"}
@@ -0,0 +1,20 @@
1
+ import { type Stave } from 'vexflow';
2
+ import type { Barline, KeySignature, Measure } from '../state';
3
+ import type { ResolvedMeasureState } from './scoreParsing';
4
+ export interface ResolvedMeasureModifiers {
5
+ showClef: boolean;
6
+ showMeter: boolean;
7
+ showKeySignature: boolean;
8
+ startBarline: Barline;
9
+ endBarline: Barline;
10
+ }
11
+ /**
12
+ * Resolves the tri-state measure modifiers: `true` shows, `false` hides,
13
+ * `undefined` falls back to the default (clef on the first measure only,
14
+ * meter and key signature hidden, single barlines).
15
+ */
16
+ export declare function resolveMeasureModifiers(measure: Pick<Measure, 'leftModifiers' | 'rightModifiers'>, measureIndex: number): ResolvedMeasureModifiers;
17
+ export declare function applyMeasureModifiers(stave: Stave, modifiers: ResolvedMeasureModifiers, resolvedState: ResolvedMeasureState): Stave;
18
+ /** Major-key VexFlow spec for the key's accidentals, respelt enharmonically beyond 7 sharps/flats. */
19
+ export declare function keySignatureToVFSpec(keySignature: KeySignature): string;
20
+ //# sourceMappingURL=measureModifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measureModifiers.d.ts","sourceRoot":"","sources":["../../../../src/renderer/measureModifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAyB,MAAM,SAAS,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAW,YAAY,EAAE,OAAO,EAAQ,MAAM,UAAU,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;CACrB;AAwDD;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,eAAe,GAAG,gBAAgB,CAAC,EAC1D,YAAY,EAAE,MAAM,GACnB,wBAAwB,CAU1B;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,wBAAwB,EACnC,aAAa,EAAE,oBAAoB,GAClC,KAAK,CA+BP;AAED,sGAAsG;AACtG,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAOvE"}
@@ -0,0 +1,29 @@
1
+ import { StaveNote } from 'vexflow';
2
+ import type { StemmableNote } from 'vexflow';
3
+ import type { Articulation, Clef, Direction, DurationValue, NoteAttachment, Pitch } from '../state';
4
+ /**
5
+ * Maps library articulation names to VexFlow articulation codes.
6
+ */
7
+ export declare const ARTICULATION_TO_VF_CODE: Record<Articulation, string>;
8
+ /** `GhostNote`s have no glyphs, so their element box is the origin. */
9
+ export declare function hasNoteHeads(note: StemmableNote): note is StaveNote;
10
+ /**
11
+ * Applies the requested number of augmentation dots to a note.
12
+ */
13
+ export declare function applyDots(note: StaveNote, dots?: 0 | 1 | 2 | 3): void;
14
+ export declare function decorateStaveNote(note: StaveNote, pitches: readonly Pitch[], duration: DurationValue): void;
15
+ /** Every attachment a rest can carry: grace notes need a pitched owner. */
16
+ export declare function restAttachments(attachments: NoteAttachment[] | undefined): NoteAttachment[] | undefined;
17
+ /**
18
+ * Attaches the owner's marks to a VexFlow note in a fixed order regardless of
19
+ * the attachments' order: articulations, annotations, dynamics, lyrics (by
20
+ * verse), grace notes. Same-side marks stack outward in that order.
21
+ */
22
+ export declare function applyNoteModifiers(note: StaveNote, clef: Clef, attachments: NoteAttachment[] | undefined): void;
23
+ /**
24
+ * Draws each text direction of a measure on the voice's first drawn item,
25
+ * after that item's own marks; a voice of spacers draws none. Tempo
26
+ * directions are not drawn.
27
+ */
28
+ export declare function applyMeasureDirections(notes: readonly StemmableNote[], directions: readonly Direction[] | undefined): void;
29
+ //# sourceMappingURL=noteModifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noteModifiers.d.ts","sourceRoot":"","sources":["../../../../src/renderer/noteModifiers.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,SAAS,EAEV,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EACV,YAAY,EACZ,IAAI,EACJ,SAAS,EACT,aAAa,EAIb,cAAc,EACd,KAAK,EACN,MAAM,UAAU,CAAC;AAGlB;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAShE,CAAC;AA0CF,uEAAuE;AACvE,wBAAgB,YAAY,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,IAAI,SAAS,CAEnE;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,QAI9D;AAoCD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,SAAS,KAAK,EAAE,EACzB,QAAQ,EAAE,aAAa,QAKxB;AAED,2EAA2E;AAC3E,wBAAgB,eAAe,CAC7B,WAAW,EAAE,cAAc,EAAE,GAAG,SAAS,GACxC,cAAc,EAAE,GAAG,SAAS,CAE9B;AAYD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,IAAI,EACV,WAAW,EAAE,cAAc,EAAE,GAAG,SAAS,QA8D1C;AAsCD;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,SAAS,aAAa,EAAE,EAC/B,UAAU,EAAE,SAAS,SAAS,EAAE,GAAG,SAAS,QAyB7C"}
@@ -1,35 +1,10 @@
1
- import { Formatter, Stave, Voice as VFVoice } from 'vexflow';
2
1
  import type { VexflowRecordingContext } from '../base';
3
2
  import type { Score } from '../state';
4
3
  import type { ScoreLayoutPlan } from './layout';
5
- import type { ScoreItemsLayout, ScoreOptions } from './types';
6
- import type { VFVoiceNote } from './scoreParsing';
4
+ import type { ScoreItemHooks, ScoreItemsLayout, ScoreOptions } from './types';
7
5
  /**
8
6
  * Renders the score from a precomputed layout plan and returns the formatted
9
7
  * geometry of every rendered item and measure.
10
8
  */
11
- export declare function renderScore(ctx: VexflowRecordingContext, score: Score, layoutPlan: ScoreLayoutPlan, options: ScoreOptions): ScoreItemsLayout;
12
- /**
13
- * Re-positions every tick context at its time-proportional x inside the note
14
- * area, overriding the formatter's duration-weighted spacing. Runs after
15
- * `formatToStave` (the same post-format `setX` mechanism the formatter's own
16
- * tuning uses), so beams, tuplets and modifiers pick the final positions up
17
- * at draw time. The lattice follows VexFlow's own convention for its first
18
- * tick: it starts at that context's left-modifier width (`totalLeftPx`), so a
19
- * grace group or accidental on beat 1 hangs inside the note area instead of
20
- * over the clef. The proportional span is clamped only by that inset and the
21
- * LAST context's width — with a spacer voice on the lattice the latter is
22
- * constant, so the mapping stays a pure function of time and of what hangs
23
- * left of beat 1.
24
- */
25
- export declare function applyFixedNoteSpacing(formatter: Formatter, voices: VFVoice[], stave: Stave): void;
26
- /**
27
- * Center of a formatted note's visual notehead span. When the getters are
28
- * missing (GhostNotes) the fallback is the center of a NOTIONAL notehead at
29
- * the block's left edge, capped by the block width — so a `spacer` rest
30
- * anchors where a real note's head would sit on the same tick, and external
31
- * UI aligned to it does not hop when the note appears. Zero-width `hidden`
32
- * rests keep anchoring at their tick x.
33
- */
34
- export declare function resolveItemHeadCenterX(note: VFVoiceNote, x: number, width: number): number;
9
+ export declare function renderScore(ctx: VexflowRecordingContext, score: Score, layoutPlan: ScoreLayoutPlan, options: ScoreOptions, hooks?: ScoreItemHooks): ScoreItemsLayout;
35
10
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/renderer/render.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAkB,KAAK,IAAI,OAAO,EAAE,MAAM,SAAS,CAAC;AAG7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAEV,KAAK,EAGN,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,UAAU,CAAC;AAOlB,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;;GAGG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,uBAAuB,EAC5B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,eAAe,EAC3B,OAAO,EAAE,YAAY,GACpB,gBAAgB,CA2ClB;AAuBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,OAAO,EAAE,EACjB,KAAK,EAAE,KAAK,QA0Db;AA0ND;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EACjB,CAAC,EAAE,MAAM,EACT,KAAK,EAAE,MAAM,GACZ,MAAM,CAgBR"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/renderer/render.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,KAAK,EAEV,KAAK,EAGN,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAGV,eAAe,EAChB,MAAM,UAAU,CAAC;AAUlB,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG9E;;;GAGG;AACH,wBAAgB,WAAW,CACzB,GAAG,EAAE,uBAAuB,EAC5B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,eAAe,EAC3B,OAAO,EAAE,YAAY,EACrB,KAAK,GAAE,cAAmB,GACzB,gBAAgB,CA4ClB"}
@@ -1 +1 @@
1
- {"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../../../src/renderer/scale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE5E;;;;;;GAMG;AAEH;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE;IACvC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B,GAAG,MAAM,CAMT;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,MAAM,GACZ,YAAY,CAWd;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAS1E;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,gBAAgB,EAC7B,KAAK,EAAE,MAAM,GACZ,gBAAgB,CA+BlB"}
1
+ {"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../../../src/renderer/scale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EAEZ,gBAAgB,EACjB,MAAM,SAAS,CAAC;AAEjB;;;;;;GAMG;AAEH;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,CAAC,EAAE;IACvC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC7B,GAAG,MAAM,CAMT;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,MAAM,GACZ,YAAY,CAWd;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,YAAY,CAS1E;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,gBAAgB,EAC7B,KAAK,EAAE,MAAM,GACZ,gBAAgB,CAqClB"}
@@ -1,6 +1,7 @@
1
1
  import { Beam, Fraction as VFFraction, StaveNote, Tuplet, Voice as VFVoice } from 'vexflow';
2
2
  import type { StemmableNote } from 'vexflow';
3
- import type { Articulation, Clef, KeySignature, DurationValue, Meter, NoteAttachment, Notehead, Pitch, Score, Staff, StaffGroup, StaffLines, StemDirection, Tempo, TupletGroup, Voice, VoiceItem, VoiceTimingMode } from '../state';
3
+ import type { Clef, Direction, KeySignature, Meter, NoteAttachment, Score, Staff, StaffGroup, StemDirection, Tempo, TupletGroup, Voice, VoiceItem, VoiceTimingMode } from '../state';
4
+ import type { DecorateItem } from './types';
4
5
  export type StaffGroupLookup = {
5
6
  groupId: string;
6
7
  staffGroup?: StaffGroup;
@@ -20,51 +21,21 @@ export interface MakeVFVoiceOptions {
20
21
  * rebuilding it on every call.
21
22
  */
22
23
  attachmentsByOwner?: Map<string, NoteAttachment[]>;
23
- /** `Staff.lines`; on a one-line staff auto stems point up. */
24
- staffLines?: StaffLines;
24
+ /** Owning staff; on a one-line staff auto stems point up. */
25
+ staff?: Staff;
26
+ /** Measure directions drawn on this voice's first drawn item. */
27
+ directions?: Direction[];
28
+ itemContext?: {
29
+ decorateItem: DecorateItem;
30
+ staff: Staff;
31
+ measureIndex: number;
32
+ };
25
33
  }
26
- /**
27
- * Maps library notehead names to VexFlow key glyph codes.
28
- */
29
- export declare const NOTEHEAD_TO_VF_CODE: Record<Notehead, string>;
30
- /**
31
- * Maps library articulation names to VexFlow articulation codes.
32
- */
33
- export declare const ARTICULATION_TO_VF_CODE: Record<Articulation, string>;
34
+ type ItemDecorator = (item: VoiceItem, note: StaveNote, attachments: readonly NoteAttachment[]) => void;
34
35
  /**
35
36
  * Maps the library stem direction to the numeric VexFlow value.
36
37
  */
37
38
  export declare function toVFStemDirection(dir?: StemDirection): number | undefined;
38
- /**
39
- * Converts an internal pitch into the VexFlow key string format.
40
- */
41
- export declare function pitchToVFKey(pitch: Pitch): string;
42
- /**
43
- * Converts a duration into the VexFlow duration token, including rests.
44
- */
45
- export declare function durationToVF(duration: DurationValue, isRest?: boolean): string;
46
- /**
47
- * Applies the requested number of augmentation dots to a note.
48
- */
49
- export declare function applyDots(note: StaveNote, dots?: 0 | 1 | 2 | 3): void;
50
- /**
51
- * Adds pitch accidentals to the matching keys in a VexFlow note.
52
- */
53
- export declare function addPitchAccidentals(note: StaveNote, pitches: readonly Pitch[]): void;
54
- /**
55
- * Wraps each ghost pitch of a note in parentheses.
56
- */
57
- export declare function applyGhostParentheses(note: StaveNote, pitches: readonly Pitch[]): void;
58
- /**
59
- * Draws one accent above a note whose pitches carry the `accent` flag, unless
60
- * the owner already has an accent attachment.
61
- */
62
- export declare function applyPitchAccent(note: StaveNote, pitches: readonly Pitch[], attachments?: NoteAttachment[]): void;
63
- /**
64
- * Attaches the owner's articulation, annotation and grace-note modifiers to
65
- * a VexFlow note; dynamics and lyrics are drawn elsewhere.
66
- */
67
- export declare function applyNoteModifiers(note: StaveNote, clef: Clef, attachments: NoteAttachment[] | undefined): void;
68
39
  export declare function indexAttachmentsByOwner(score: Score): Map<string, NoteAttachment[]>;
69
40
  /**
70
41
  * Width a `spacer` rest reserves on its tick: an up-stem flagged note
@@ -80,7 +51,7 @@ export declare function noteheadWidth(): number;
80
51
  /**
81
52
  * Builds a VexFlow stave note from a score voice item and clef.
82
53
  */
83
- export declare function voiceItemToStaveNote(item: VoiceItem, clef: Clef, attachments?: NoteAttachment[]): VFVoiceNote;
54
+ export declare function voiceItemToStaveNote(item: VoiceItem, clef: Clef, attachments?: NoteAttachment[], decorate?: ItemDecorator): VFVoiceNote;
84
55
  /**
85
56
  * Beam groups for a meter: its explicit `beamGroups`, otherwise VexFlow's
86
57
  * conventional grouping for the time signature (quarters in x/4, dotted
@@ -116,4 +87,5 @@ export declare function buildMeasurementGroups(score: Score): StaffGroupLookup[]
116
87
  * Resolves a staff group lookup into the existing ordered score staves.
117
88
  */
118
89
  export declare function resolveGroupStaves(score: Score, group: StaffGroupLookup): Staff[];
90
+ export {};
119
91
  //# sourceMappingURL=scoreParsing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"scoreParsing.d.ts","sourceRoot":"","sources":["../../../../src/renderer/scoreParsing.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKL,IAAI,EAGJ,QAAQ,IAAI,UAAU,EAMtB,SAAS,EAET,MAAM,EACN,KAAK,IAAI,OAAO,EACjB,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,OAAO,KAAK,EACV,YAAY,EACZ,IAAI,EACJ,YAAY,EACZ,aAAa,EAEb,KAAK,EACL,cAAc,EACd,QAAQ,EACR,KAAK,EACL,KAAK,EACL,KAAK,EACL,UAA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,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,WAAW,EAAE,CAE7E;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,MAAM,CAUtD;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,GACX,oBAAoB,EAAE,CAmBxB;AAED;;GAEG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,OAAO,GAAE,kBAAuB,GAC/B;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAkFA;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB,EAAE,CAwBvE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,gBAAgB,GACtB,KAAK,EAAE,CAIT"}
@@ -6,4 +6,6 @@ import type { StaffLines } from '../state';
6
6
  * config.
7
7
  */
8
8
  export declare function applyStaffLines(stave: Stave, lines?: StaffLines): Stave;
9
+ /** Stroke centre y of every drawn line of a rendered stave, top to bottom. */
10
+ export declare function visibleLineYs(stave: Stave, lines?: StaffLines): number[];
9
11
  //# sourceMappingURL=stave.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stave.d.ts","sourceRoot":"","sources":["../../../../src/renderer/stave.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,KAAK,CAevE"}
1
+ {"version":3,"file":"stave.d.ts","sourceRoot":"","sources":["../../../../src/renderer/stave.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAe3C;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,KAAK,CAcvE;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,EAAE,CAIxE"}
@@ -1,7 +1,8 @@
1
1
  import type { SkTypefaceFontProvider } from '@shopify/react-native-skia';
2
2
  import type { SharedValue } from 'react-native-reanimated';
3
+ import type { RenderContext, StaveNote } from 'vexflow';
3
4
  import type { VexflowStyleOverride } from '../base';
4
- import type { Score } from '../state';
5
+ import type { Clef, NoteAttachment, Score, Staff, VoiceItem } from '../state';
5
6
  import type { ScoreColorScheme } from './colorScheme';
6
7
  export type RendererType = 'infiniteScore' | 'document' | 'documentEven';
7
8
  export type ScoreItemStyleOverride = VexflowStyleOverride;
@@ -40,7 +41,35 @@ export interface ScoreScrollGeometry {
40
41
  contentSize: RendererSize;
41
42
  maxScroll: number;
42
43
  }
43
- export interface ScoreRendererProps {
44
+ /** Where a voice item sits when its VexFlow note is built. */
45
+ export interface ScoreItemContext {
46
+ clef: Clef;
47
+ staff: Staff;
48
+ measureIndex: number;
49
+ /** For rests, the rest-eligible subset (everything but grace). */
50
+ attachments: readonly NoteAttachment[];
51
+ }
52
+ /**
53
+ * Called once per drawable item (not hidden/spacer rests) in BOTH the
54
+ * measurement and the drawing pass, after the item's own attachments are
55
+ * applied, before measure directions and before formatting, so added
56
+ * modifiers count in width and vertical bounds. Must be deterministic in its
57
+ * inputs; `note` is rebuilt on every pass.
58
+ */
59
+ export type DecorateItem = (item: VoiceItem, note: StaveNote, context: ScoreItemContext) => void;
60
+ /**
61
+ * Called in the drawing pass only, right after the note and its modifiers
62
+ * are drawn, inside the item's color group. `layout` is the item's geometry
63
+ * in content space — the space `ctx` draws in (VexFlow units before
64
+ * `render.scale`); `onItemsLayout` receives the same entry scaled to view
65
+ * space.
66
+ */
67
+ export type DrawItem = (ctx: RenderContext, item: VoiceItem, note: StaveNote, layout: Readonly<ScoreItemLayout>) => void;
68
+ export interface ScoreItemHooks {
69
+ decorateItem?: DecorateItem;
70
+ onDrawItem?: DrawItem;
71
+ }
72
+ export interface ScoreRendererProps extends ScoreItemHooks {
44
73
  score: Score;
45
74
  defaultFont: string;
46
75
  fontManager: SkTypefaceFontProvider;
@@ -144,6 +173,18 @@ export interface ScoreItemLayout {
144
173
  */
145
174
  headCenterX: number;
146
175
  measureIndex: number;
176
+ /**
177
+ * Union box of the item's drawn modifiers (articulations, annotations,
178
+ * dynamics, lyrics, grace notes, parentheses, accidentals, dots), in the
179
+ * same space as `x`. undefined when the item has no modifiers.
180
+ */
181
+ modifierBounds?: ScoreItemBounds;
182
+ }
183
+ export interface ScoreItemBounds {
184
+ left: number;
185
+ right: number;
186
+ top: number;
187
+ bottom: number;
147
188
  }
148
189
  /**
149
190
  * Geometry of one rendered stave of a measure. Entries of the same measure
@@ -171,6 +212,14 @@ export interface ScoreMeasureItemsLayout {
171
212
  staveLineTopY: number;
172
213
  /** Bottom edge of this stave's bottom staff line (hidden lines included). */
173
214
  staveLineBottomY: number;
215
+ /**
216
+ * Stroke centre y of each drawn line, top to bottom (5, 3 or 1 entries).
217
+ * On a five-line staff `visibleLineYs[0] === staveLineTopY` and the last
218
+ * entry is `staveLineBottomY - lineWidth`; with hidden lines
219
+ * `staveLineTopY`/`staveLineBottomY` still span the five-line geometry, so
220
+ * read the drawn line from here. Always emitted by the renderer.
221
+ */
222
+ visibleLineYs?: number[];
174
223
  }
175
224
  /**
176
225
  * Geometry of all rendered items keyed by item id, plus per-stave measure
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/renderer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,MAAM,YAAY,GAAG,eAAe,GAAG,UAAU,GAAG,cAAc,CAAC;AACzE,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AAC1D,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAC;AAE7E;2CAC2C;AAC3C,MAAM,MAAM,UAAU,GAAG,YAAY,GAAG,UAAU,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IACjC,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,UAAU,CAAC;IACjB,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,YAAY,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,M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IAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACvC,QAAQ,EAAE,uBAAuB,EAAE,CAAC;IACpC,WAAW,EAAE,YAAY,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa,EAAE,YAAY;CAAG;AAEpE,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG"}
@@ -4,7 +4,7 @@ import { type VexflowRecordingGroupIndex } from '../base/VexflowRecordingIndex';
4
4
  import type { Score } from '../state';
5
5
  import { type ScoreLayoutPlan } from './layout';
6
6
  import type { ResolvedScoreColorScheme } from './colorScheme';
7
- import type { RendererRect, RendererType, ScoreItemsLayout, ScoreOptions } from './types';
7
+ import type { RendererRect, RendererType, ScoreItemHooks, ScoreItemsLayout, ScoreOptions } from './types';
8
8
  export interface ScoreRecording {
9
9
  /** Recorded draw commands, content-space coordinates. */
10
10
  commands: readonly VexflowRecordingCommand[];
@@ -21,7 +21,7 @@ export interface ScoreRecording {
21
21
  /** Emitted geometry, already converted to view space. */
22
22
  itemsLayout: ScoreItemsLayout;
23
23
  }
24
- export declare function useScoreRecording({ defaultFont, enabled, fontManager, colorScheme, options, rendererType, score, viewport, }: {
24
+ export declare function useScoreRecording({ decorateItem, defaultFont, enabled, fontManager, colorScheme, onDrawItem, options, rendererType, score, viewport, }: ScoreItemHooks & {
25
25
  defaultFont: string;
26
26
  enabled?: boolean;
27
27
  fontManager: SkTypefaceFontProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"useScoreRecording.d.ts","sourceRoot":"","sources":["../../../../src/renderer/useScoreRecording.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4B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