vexflow-native 0.1.0 → 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 (259) hide show
  1. package/README.md +286 -11
  2. package/lib/module/base/FontManager.js +139 -0
  3. package/lib/module/base/FontManager.js.map +1 -0
  4. package/lib/module/base/TextMeasureContext.js +46 -0
  5. package/lib/module/base/TextMeasureContext.js.map +1 -0
  6. package/lib/module/base/VexflowCanvas.js +48 -0
  7. package/lib/module/base/VexflowCanvas.js.map +1 -0
  8. package/lib/module/base/VexflowColorScheme.js +16 -0
  9. package/lib/module/base/VexflowColorScheme.js.map +1 -0
  10. package/lib/module/base/VexflowRecordingContext.js +425 -0
  11. package/lib/module/base/VexflowRecordingContext.js.map +1 -0
  12. package/lib/module/base/VexflowRecordingReplay.js +140 -0
  13. package/lib/module/base/VexflowRecordingReplay.js.map +1 -0
  14. package/lib/module/base/VexflowRecordingTypes.js +4 -0
  15. package/lib/module/base/VexflowRecordingTypes.js.map +1 -0
  16. package/lib/module/base/index.js +8 -0
  17. package/lib/module/base/index.js.map +1 -0
  18. package/lib/module/base/setupVexflowReactNative.js +96 -0
  19. package/lib/module/base/setupVexflowReactNative.js.map +1 -0
  20. package/lib/module/base/types.js +4 -0
  21. package/lib/module/base/types.js.map +1 -0
  22. package/lib/module/base/utils.js +18 -0
  23. package/lib/module/base/utils.js.map +1 -0
  24. package/lib/module/musicxml/MusicXmlParser/InternalTypes.js +4 -0
  25. package/lib/module/musicxml/MusicXmlParser/InternalTypes.js.map +1 -0
  26. package/lib/module/musicxml/MusicXmlParser/MeasureParser.js +269 -0
  27. package/lib/module/musicxml/MusicXmlParser/MeasureParser.js.map +1 -0
  28. package/lib/module/musicxml/MusicXmlParser/MusicXmlDirections.js +62 -0
  29. package/lib/module/musicxml/MusicXmlParser/MusicXmlDirections.js.map +1 -0
  30. package/lib/module/musicxml/MusicXmlParser/MusicXmlTiming.js +124 -0
  31. package/lib/module/musicxml/MusicXmlParser/MusicXmlTiming.js.map +1 -0
  32. package/lib/module/musicxml/MusicXmlParser/PartParser.js +41 -0
  33. package/lib/module/musicxml/MusicXmlParser/PartParser.js.map +1 -0
  34. package/lib/module/musicxml/MusicXmlParser/Spanners.js +149 -0
  35. package/lib/module/musicxml/MusicXmlParser/Spanners.js.map +1 -0
  36. package/lib/module/musicxml/MusicXmlParser/XmlOrder.js +106 -0
  37. package/lib/module/musicxml/MusicXmlParser/XmlOrder.js.map +1 -0
  38. package/lib/module/musicxml/MusicXmlParser/index.js +110 -0
  39. package/lib/module/musicxml/MusicXmlParser/index.js.map +1 -0
  40. package/lib/module/musicxml/MusicXmlParser/mappers.js +312 -0
  41. package/lib/module/musicxml/MusicXmlParser/mappers.js.map +1 -0
  42. package/lib/module/musicxml/MusicXmlParser/types.js +10 -0
  43. package/lib/module/musicxml/MusicXmlParser/types.js.map +1 -0
  44. package/lib/module/musicxml/index.js +4 -0
  45. package/lib/module/musicxml/index.js.map +1 -0
  46. package/lib/module/musicxml/testfiles/lg-8102429.xml +79620 -0
  47. package/lib/module/renderer/Layout/DocumentLayout.js +156 -0
  48. package/lib/module/renderer/Layout/DocumentLayout.js.map +1 -0
  49. package/lib/module/renderer/Layout/LayoutMetrics.js +13 -0
  50. package/lib/module/renderer/Layout/LayoutMetrics.js.map +1 -0
  51. package/lib/module/renderer/Layout/VerticalSpacing.js +69 -0
  52. package/lib/module/renderer/Layout/VerticalSpacing.js.map +1 -0
  53. package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js +232 -0
  54. package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js.map +1 -0
  55. package/lib/module/renderer/ScoreRenderer/ScoreScrollbar.js +108 -0
  56. package/lib/module/renderer/ScoreRenderer/ScoreScrollbar.js.map +1 -0
  57. package/lib/module/renderer/ScoreRenderer/index.js +7 -0
  58. package/lib/module/renderer/ScoreRenderer/index.js.map +1 -0
  59. package/lib/module/renderer/ScoreRenderer/types.js +4 -0
  60. package/lib/module/renderer/ScoreRenderer/types.js.map +1 -0
  61. package/lib/module/renderer/ScoreRenderer/useScoreScroll.js +77 -0
  62. package/lib/module/renderer/ScoreRenderer/useScoreScroll.js.map +1 -0
  63. package/lib/module/renderer/colorScheme.js +17 -0
  64. package/lib/module/renderer/colorScheme.js.map +1 -0
  65. package/lib/module/renderer/constants.js +18 -0
  66. package/lib/module/renderer/constants.js.map +1 -0
  67. package/lib/module/renderer/index.js +6 -0
  68. package/lib/module/renderer/index.js.map +1 -0
  69. package/lib/module/renderer/layout.js +153 -0
  70. package/lib/module/renderer/layout.js.map +1 -0
  71. package/lib/module/renderer/measure.js +202 -0
  72. package/lib/module/renderer/measure.js.map +1 -0
  73. package/lib/module/renderer/render.js +163 -0
  74. package/lib/module/renderer/render.js.map +1 -0
  75. package/lib/module/renderer/scoreParsing.js +230 -0
  76. package/lib/module/renderer/scoreParsing.js.map +1 -0
  77. package/lib/module/renderer/types.js +4 -0
  78. package/lib/module/renderer/types.js.map +1 -0
  79. package/lib/module/renderer/useScoreRecording.js +112 -0
  80. package/lib/module/renderer/useScoreRecording.js.map +1 -0
  81. package/lib/module/renderer/viewport.js +26 -0
  82. package/lib/module/renderer/viewport.js.map +1 -0
  83. package/lib/module/shared/Logger.js +67 -0
  84. package/lib/module/shared/Logger.js.map +1 -0
  85. package/lib/module/state/index.js +4 -0
  86. package/lib/module/state/index.js.map +1 -0
  87. package/lib/module/state/types.js +2 -0
  88. package/lib/module/state/types.js.map +1 -0
  89. package/lib/module/types.js +7 -0
  90. package/lib/module/types.js.map +1 -1
  91. package/lib/module/utils.js +42 -77
  92. package/lib/module/utils.js.map +1 -1
  93. package/lib/typescript/src/base/FontManager.d.ts +23 -0
  94. package/lib/typescript/src/base/FontManager.d.ts.map +1 -0
  95. package/lib/typescript/src/base/TextMeasureContext.d.ts +22 -0
  96. package/lib/typescript/src/base/TextMeasureContext.d.ts.map +1 -0
  97. package/lib/typescript/src/base/VexflowCanvas.d.ts +5 -0
  98. package/lib/typescript/src/base/VexflowCanvas.d.ts.map +1 -0
  99. package/lib/typescript/src/base/VexflowColorScheme.d.ts +7 -0
  100. package/lib/typescript/src/base/VexflowColorScheme.d.ts.map +1 -0
  101. package/lib/typescript/src/base/VexflowRecordingContext.d.ts +74 -0
  102. package/lib/typescript/src/base/VexflowRecordingContext.d.ts.map +1 -0
  103. package/lib/typescript/src/base/VexflowRecordingReplay.d.ts +4 -0
  104. package/lib/typescript/src/base/VexflowRecordingReplay.d.ts.map +1 -0
  105. package/lib/typescript/src/base/VexflowRecordingTypes.d.ts +94 -0
  106. package/lib/typescript/src/base/VexflowRecordingTypes.d.ts.map +1 -0
  107. package/lib/typescript/src/base/index.d.ts +6 -0
  108. package/lib/typescript/src/base/index.d.ts.map +1 -0
  109. package/lib/typescript/src/base/setupVexflowReactNative.d.ts +11 -0
  110. package/lib/typescript/src/base/setupVexflowReactNative.d.ts.map +1 -0
  111. package/lib/typescript/src/base/types.d.ts +13 -0
  112. package/lib/typescript/src/base/types.d.ts.map +1 -0
  113. package/lib/typescript/src/base/utils.d.ts +2 -0
  114. package/lib/typescript/src/base/utils.d.ts.map +1 -0
  115. package/lib/typescript/src/musicxml/MusicXmlParser/InternalTypes.d.ts +30 -0
  116. package/lib/typescript/src/musicxml/MusicXmlParser/InternalTypes.d.ts.map +1 -0
  117. package/lib/typescript/src/musicxml/MusicXmlParser/MeasureParser.d.ts +4 -0
  118. package/lib/typescript/src/musicxml/MusicXmlParser/MeasureParser.d.ts.map +1 -0
  119. package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlDirections.d.ts +5 -0
  120. package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlDirections.d.ts.map +1 -0
  121. package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlTiming.d.ts +6 -0
  122. package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlTiming.d.ts.map +1 -0
  123. package/lib/typescript/src/musicxml/MusicXmlParser/PartParser.d.ts +8 -0
  124. package/lib/typescript/src/musicxml/MusicXmlParser/PartParser.d.ts.map +1 -0
  125. package/lib/typescript/src/musicxml/MusicXmlParser/Spanners.d.ts +4 -0
  126. package/lib/typescript/src/musicxml/MusicXmlParser/Spanners.d.ts.map +1 -0
  127. package/lib/typescript/src/musicxml/MusicXmlParser/XmlOrder.d.ts +20 -0
  128. package/lib/typescript/src/musicxml/MusicXmlParser/XmlOrder.d.ts.map +1 -0
  129. package/lib/typescript/src/musicxml/MusicXmlParser/index.d.ts +5 -0
  130. package/lib/typescript/src/musicxml/MusicXmlParser/index.d.ts.map +1 -0
  131. package/lib/typescript/src/musicxml/MusicXmlParser/mappers.d.ts +15 -0
  132. package/lib/typescript/src/musicxml/MusicXmlParser/mappers.d.ts.map +1 -0
  133. package/lib/typescript/src/musicxml/MusicXmlParser/types.d.ts +13 -0
  134. package/lib/typescript/src/musicxml/MusicXmlParser/types.d.ts.map +1 -0
  135. package/lib/typescript/src/musicxml/index.d.ts +2 -0
  136. package/lib/typescript/src/musicxml/index.d.ts.map +1 -0
  137. package/lib/typescript/src/renderer/Layout/DocumentLayout.d.ts +10 -0
  138. package/lib/typescript/src/renderer/Layout/DocumentLayout.d.ts.map +1 -0
  139. package/lib/typescript/src/renderer/Layout/LayoutMetrics.d.ts +6 -0
  140. package/lib/typescript/src/renderer/Layout/LayoutMetrics.d.ts.map +1 -0
  141. package/lib/typescript/src/renderer/Layout/VerticalSpacing.d.ts +9 -0
  142. package/lib/typescript/src/renderer/Layout/VerticalSpacing.d.ts.map +1 -0
  143. package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts +14 -0
  144. package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts.map +1 -0
  145. package/lib/typescript/src/renderer/ScoreRenderer/ScoreScrollbar.d.ts +24 -0
  146. package/lib/typescript/src/renderer/ScoreRenderer/ScoreScrollbar.d.ts.map +1 -0
  147. package/lib/typescript/src/renderer/ScoreRenderer/index.d.ts +5 -0
  148. package/lib/typescript/src/renderer/ScoreRenderer/index.d.ts.map +1 -0
  149. package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts +12 -0
  150. package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts.map +1 -0
  151. package/lib/typescript/src/renderer/ScoreRenderer/useScoreScroll.d.ts +13 -0
  152. package/lib/typescript/src/renderer/ScoreRenderer/useScoreScroll.d.ts.map +1 -0
  153. package/lib/typescript/src/renderer/colorScheme.d.ts +9 -0
  154. package/lib/typescript/src/renderer/colorScheme.d.ts.map +1 -0
  155. package/lib/typescript/src/renderer/constants.d.ts +5 -0
  156. package/lib/typescript/src/renderer/constants.d.ts.map +1 -0
  157. package/lib/typescript/src/renderer/index.d.ts +4 -0
  158. package/lib/typescript/src/renderer/index.d.ts.map +1 -0
  159. package/lib/typescript/src/renderer/layout.d.ts +56 -0
  160. package/lib/typescript/src/renderer/layout.d.ts.map +1 -0
  161. package/lib/typescript/src/renderer/measure.d.ts +23 -0
  162. package/lib/typescript/src/renderer/measure.d.ts.map +1 -0
  163. package/lib/typescript/src/renderer/render.d.ts +9 -0
  164. package/lib/typescript/src/renderer/render.d.ts.map +1 -0
  165. package/lib/typescript/src/renderer/scoreParsing.d.ts +76 -0
  166. package/lib/typescript/src/renderer/scoreParsing.d.ts.map +1 -0
  167. package/lib/typescript/src/renderer/types.d.ts +51 -0
  168. package/lib/typescript/src/renderer/types.d.ts.map +1 -0
  169. package/lib/typescript/src/renderer/useScoreRecording.d.ts +21 -0
  170. package/lib/typescript/src/renderer/useScoreRecording.d.ts.map +1 -0
  171. package/lib/typescript/src/renderer/viewport.d.ts +3 -0
  172. package/lib/typescript/src/renderer/viewport.d.ts.map +1 -0
  173. package/lib/typescript/src/shared/Logger.d.ts +18 -0
  174. package/lib/typescript/src/shared/Logger.d.ts.map +1 -0
  175. package/lib/typescript/src/state/index.d.ts +2 -0
  176. package/lib/typescript/src/state/index.d.ts.map +1 -0
  177. package/lib/typescript/src/state/types.d.ts +190 -0
  178. package/lib/typescript/src/state/types.d.ts.map +1 -0
  179. package/lib/typescript/src/types.d.ts +0 -6
  180. package/lib/typescript/src/types.d.ts.map +1 -1
  181. package/lib/typescript/src/utils.d.ts +0 -6
  182. package/lib/typescript/src/utils.d.ts.map +1 -1
  183. package/package.json +41 -13
  184. package/src/base/FontManager.ts +206 -0
  185. package/src/base/TextMeasureContext.ts +59 -0
  186. package/src/base/VexflowCanvas.tsx +60 -0
  187. package/src/base/VexflowColorScheme.ts +32 -0
  188. package/src/base/VexflowRecordingContext.ts +495 -0
  189. package/src/base/VexflowRecordingReplay.ts +211 -0
  190. package/src/base/VexflowRecordingTypes.ts +117 -0
  191. package/src/base/index.ts +6 -0
  192. package/src/base/setupVexflowReactNative.ts +124 -0
  193. package/src/base/types.ts +17 -0
  194. package/src/base/utils.ts +21 -0
  195. package/src/musicxml/MusicXmlParser/InternalTypes.ts +41 -0
  196. package/src/musicxml/MusicXmlParser/MeasureParser.ts +469 -0
  197. package/src/musicxml/MusicXmlParser/MusicXmlDirections.ts +84 -0
  198. package/src/musicxml/MusicXmlParser/MusicXmlTiming.ts +153 -0
  199. package/src/musicxml/MusicXmlParser/PartParser.ts +69 -0
  200. package/src/musicxml/MusicXmlParser/Spanners.ts +215 -0
  201. package/src/musicxml/MusicXmlParser/XmlOrder.ts +170 -0
  202. package/src/musicxml/MusicXmlParser/index.ts +144 -0
  203. package/src/musicxml/MusicXmlParser/mappers.ts +307 -0
  204. package/src/musicxml/MusicXmlParser/types.ts +24 -0
  205. package/src/musicxml/index.ts +5 -0
  206. package/src/musicxml/testfiles/lg-8102429.xml +79620 -0
  207. package/src/renderer/Layout/DocumentLayout.ts +240 -0
  208. package/src/renderer/Layout/LayoutMetrics.ts +21 -0
  209. package/src/renderer/Layout/VerticalSpacing.ts +122 -0
  210. package/src/renderer/ScoreRenderer/ScoreRenderer.tsx +310 -0
  211. package/src/renderer/ScoreRenderer/ScoreScrollbar.tsx +231 -0
  212. package/src/renderer/ScoreRenderer/index.ts +13 -0
  213. package/src/renderer/ScoreRenderer/types.ts +14 -0
  214. package/src/renderer/ScoreRenderer/useScoreScroll.ts +146 -0
  215. package/src/renderer/colorScheme.ts +28 -0
  216. package/src/renderer/constants.ts +19 -0
  217. package/src/renderer/index.ts +3 -0
  218. package/src/renderer/layout.ts +309 -0
  219. package/src/renderer/measure.tsx +304 -0
  220. package/src/renderer/render.tsx +281 -0
  221. package/src/renderer/scoreParsing.tsx +352 -0
  222. package/src/renderer/types.ts +60 -0
  223. package/src/renderer/useScoreRecording.ts +177 -0
  224. package/src/renderer/viewport.ts +45 -0
  225. package/src/shared/Logger.ts +85 -0
  226. package/src/state/index.ts +1 -0
  227. package/src/state/types.ts +295 -0
  228. package/src/types.ts +6 -6
  229. package/src/utils.tsx +32 -98
  230. package/lib/module/SkiaVexflowContext.js +0 -285
  231. package/lib/module/SkiaVexflowContext.js.map +0 -1
  232. package/lib/module/VexflowCanvas.js +0 -101
  233. package/lib/module/VexflowCanvas.js.map +0 -1
  234. package/lib/module/colorUtils.js +0 -34
  235. package/lib/module/colorUtils.js.map +0 -1
  236. package/lib/module/colorUtils.test.js +0 -37
  237. package/lib/module/colorUtils.test.js.map +0 -1
  238. package/lib/module/constants.js +0 -30
  239. package/lib/module/constants.js.map +0 -1
  240. package/lib/module/index.js +0 -8
  241. package/lib/module/index.js.map +0 -1
  242. package/lib/typescript/src/SkiaVexflowContext.d.ts +0 -101
  243. package/lib/typescript/src/SkiaVexflowContext.d.ts.map +0 -1
  244. package/lib/typescript/src/VexflowCanvas.d.ts +0 -15
  245. package/lib/typescript/src/VexflowCanvas.d.ts.map +0 -1
  246. package/lib/typescript/src/colorUtils.d.ts +0 -2
  247. package/lib/typescript/src/colorUtils.d.ts.map +0 -1
  248. package/lib/typescript/src/colorUtils.test.d.ts +0 -2
  249. package/lib/typescript/src/colorUtils.test.d.ts.map +0 -1
  250. package/lib/typescript/src/constants.d.ts +0 -21
  251. package/lib/typescript/src/constants.d.ts.map +0 -1
  252. package/lib/typescript/src/index.d.ts +0 -7
  253. package/lib/typescript/src/index.d.ts.map +0 -1
  254. package/src/SkiaVexflowContext.ts +0 -462
  255. package/src/VexflowCanvas.tsx +0 -140
  256. package/src/colorUtils.test.ts +0 -52
  257. package/src/colorUtils.ts +0 -55
  258. package/src/constants.tsx +0 -34
  259. package/src/index.ts +0 -8
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export * from "./types.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["state/index.ts"],"mappings":";;AAAA,cAAc,YAAS","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["state/types.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +1,9 @@
1
+ // export type LineCap = 'butt' | 'round' | 'square';
2
+ // export type LineJoin = 'miter' | 'round' | 'bevel';
3
+
4
+ // export type ParsedCssFont = {
5
+ // sizePx: number;
6
+ // family?: string;
7
+ // };
1
8
  "use strict";
2
9
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"AAAA;AACA;;AAEA;AACA;AACA;AACA;AAAA","ignoreList":[]}
@@ -1,79 +1,44 @@
1
- "use strict";
1
+ // import { PT_TO_PX } from './constants';
2
+ // import { type ParsedCssFont } from './types';
3
+
4
+ // export function toPxFontSize(size: number | string | undefined): number {
5
+ // if (size === undefined || size === null) return 12;
6
+
7
+ // if (typeof size === 'number' && Number.isFinite(size)) {
8
+ // return size * PT_TO_PX;
9
+ // }
10
+
11
+ // if (typeof size === 'string') {
12
+ // const match = size.trim().match(/^(\d+(?:\.\d+)?)(px|pt)?$/i);
13
+
14
+ // if (match) {
15
+ // const value = Number.parseFloat(match[1] || '12');
16
+ // const unit = match[2]?.toLowerCase();
17
+ // if (!unit || unit === 'px') return value;
18
+ // return value * PT_TO_PX;
19
+ // }
20
+ // }
21
+
22
+ // return 12;
23
+ // }
2
24
 
3
- import { Skia } from '@shopify/react-native-skia';
4
- import { fontCache, PT_TO_PX } from "./constants.js";
5
- export function getAdvanceWidth(font, text) {
6
- const glyphs = font.getGlyphIDs(text);
7
- const widths = font.getGlyphWidths(glyphs);
8
- return widths.reduce((sum, width) => sum + width, 0);
9
- }
10
- export function toPxFontSize(size) {
11
- if (size === undefined || size === null) return 12;
12
- if (typeof size === 'number' && Number.isFinite(size)) {
13
- return size * PT_TO_PX;
14
- }
15
- if (typeof size === 'string') {
16
- const match = size.trim().match(/^(\d+(?:\.\d+)?)(px|pt)?$/i);
17
- if (match) {
18
- const value = Number.parseFloat(match[1] || '12');
19
- const unit = match[2]?.toLowerCase();
20
- if (!unit || unit === 'px') return value;
21
- return value * PT_TO_PX;
22
- }
23
- }
24
- return 12;
25
- }
26
- export function parseCssFontShorthand(cssFont) {
27
- const sizeMatch = cssFont.match(/(\d+(?:\.\d+)?(?:px|pt))/i);
28
- if (!sizeMatch) {
29
- return {
30
- sizePx: 12
31
- };
32
- }
33
- const sizePx = toPxFontSize(sizeMatch[1]);
34
- const family = cssFont.slice((sizeMatch.index ?? 0) + (sizeMatch[1]?.length || 0)).trim();
35
- return {
36
- sizePx,
37
- family: family || undefined
38
- };
39
- }
40
- export function createFont(size, familyName, bravuraFont) {
41
- const fontSize = Number.isFinite(size) && size > 0 ? size : 12;
42
- const family = familyName?.trim();
43
- if (family?.toLowerCase().includes('bravura') && bravuraFont) {
44
- const cacheKey = `Bravura-${fontSize}`;
45
- const cached = fontCache.get(cacheKey);
46
- if (cached) return cached;
47
- const typeface = bravuraFont.getTypeface();
48
- if (typeface) {
49
- const font = Skia.Font(typeface, fontSize);
50
- fontCache.set(cacheKey, font);
51
- return font;
52
- }
53
- }
54
- const fontMgr = Skia.FontMgr.System();
55
- const requestedFamilies = family ? family.replace(/["']/g, '').split(',').map(part => part.trim()).filter(Boolean) : [];
56
- for (const requestedFamily of requestedFamilies) {
57
- const typeface = fontMgr.matchFamilyStyle(requestedFamily, {
58
- weight: 400,
59
- width: 5,
60
- slant: 0
61
- });
62
- if (typeface) {
63
- return Skia.Font(typeface, fontSize);
64
- }
65
- }
66
- for (let i = 0; i < fontMgr.countFamilies(); i++) {
67
- const systemFamily = fontMgr.getFamilyName(i);
68
- const typeface = fontMgr.matchFamilyStyle(systemFamily, {
69
- weight: 400,
70
- width: 5,
71
- slant: 0
72
- });
73
- if (typeface) {
74
- return Skia.Font(typeface, fontSize);
75
- }
76
- }
77
- throw new Error('Unable to create a Skia font.');
78
- }
25
+ // export function parseCssFontShorthand(cssFont: string): ParsedCssFont {
26
+ // const sizeMatch = cssFont.match(/(\d+(?:\.\d+)?(?:px|pt))/i);
27
+
28
+ // if (!sizeMatch) {
29
+ // return { sizePx: 12 };
30
+ // }
31
+
32
+ // const sizePx = toPxFontSize(sizeMatch[1]);
33
+
34
+ // const family = cssFont
35
+ // .slice((sizeMatch.index ?? 0) + (sizeMatch[1]?.length || 0))
36
+ // .trim();
37
+
38
+ // return {
39
+ // sizePx,
40
+ // family: family || undefined,
41
+ // };
42
+ // }
43
+ "use strict";
79
44
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["Skia","fontCache","PT_TO_PX","getAdvanceWidth","font","text","glyphs","getGlyphIDs","widths","getGlyphWidths","reduce","sum","width","toPxFontSize","size","undefined","Number","isFinite","match","trim","value","parseFloat","unit","toLowerCase","parseCssFontShorthand","cssFont","sizeMatch","sizePx","family","slice","index","length","createFont","familyName","bravuraFont","fontSize","includes","cacheKey","cached","get","typeface","getTypeface","Font","set","fontMgr","FontMgr","System","requestedFamilies","replace","split","map","part","filter","Boolean","requestedFamily","matchFamilyStyle","weight","slant","i","countFamilies","systemFamily","getFamilyName","Error"],"sourceRoot":"../../src","sources":["utils.tsx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AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAAA","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ import type { FontInfo } from 'vexflow';
2
+ import { FontWeight, FontSlant, FontWidth } from '@shopify/react-native-skia';
3
+ import type { SkFont, SkTypefaceFontProvider } from '@shopify/react-native-skia';
4
+ interface ResolvedFont {
5
+ family: string;
6
+ size: number;
7
+ weight: FontWeight;
8
+ slant: FontSlant;
9
+ width: FontWidth;
10
+ }
11
+ export default class FontManager {
12
+ __workletClass: boolean;
13
+ private fontProvider;
14
+ private defaultFontName;
15
+ constructor(fontProvider: SkTypefaceFontProvider, defaultFontName: string);
16
+ private isFamilyAvailable;
17
+ private getFamiliesFromFont;
18
+ private matchFontFamilyName;
19
+ resolveFontDescriptor(font?: string | FontInfo, size?: string | number, weight?: string | number, style?: string): ResolvedFont;
20
+ createSkFont(font?: string | FontInfo, size?: string | number, weight?: string | number, style?: string): SkFont;
21
+ }
22
+ export {};
23
+ //# sourceMappingURL=FontManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontManager.d.ts","sourceRoot":"","sources":["../../../../src/base/FontManager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EAEV,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,MAAM,EACN,sBAAsB,EACvB,MAAM,4BAA4B,CAAC;AAMpC,UAAU,YAAY;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;CAClB;AAuED,MAAM,CAAC,OAAO,OAAO,WAAW;IAC9B,cAAc,UAAQ;IAEtB,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,eAAe,CAAS;gBAEpB,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM;IAmBzE,OAAO,CAAC,iBAAiB;IAazB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,mBAAmB;IAgB3B,qBAAqB,CACnB,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,EACxB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,YAAY;IAYf,YAAY,CACV,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,EACxB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM,GACb,MAAM;CA0BV"}
@@ -0,0 +1,22 @@
1
+ import type VexflowRecordingContext from './VexflowRecordingContext';
2
+ declare class TextMeasureContext {
3
+ __workletClass: boolean;
4
+ private context;
5
+ private currentFont;
6
+ constructor(context: VexflowRecordingContext);
7
+ measureText(text: string): {
8
+ width: number;
9
+ actualBoundingBoxAscent: number;
10
+ actualBoundingBoxDescent: number;
11
+ fontBoundingBoxAscent: number;
12
+ fontBoundingBoxDescent: number;
13
+ actualBoundingBoxLeft: number;
14
+ actualBoundingBoxRight: number;
15
+ };
16
+ get(): string;
17
+ set(value: string): void;
18
+ get font(): string;
19
+ set font(value: string);
20
+ }
21
+ export default TextMeasureContext;
22
+ //# sourceMappingURL=TextMeasureContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextMeasureContext.d.ts","sourceRoot":"","sources":["../../../../src/base/TextMeasureContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,uBAAuB,MAAM,2BAA2B,CAAC;AAErE,cAAM,kBAAkB;IACtB,cAAc,UAAQ;IAEtB,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,WAAW,CAAM;gBAEb,OAAO,EAAE,uBAAuB;IAI5C,WAAW,CAAC,IAAI,EAAE,MAAM;;;;;;;;;IAmBxB,GAAG;IAIH,GAAG,CAAC,KAAK,EAAE,MAAM;IAKjB,IAAI,IAAI,IAIQ,MAAM,CAFrB;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;CACF;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { VexflowCanvasProps } from './types';
3
+ declare const VexflowCanvas: React.FC<VexflowCanvasProps>;
4
+ export default VexflowCanvas;
5
+ //# sourceMappingURL=VexflowCanvas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VexflowCanvas.d.ts","sourceRoot":"","sources":["../../../../src/base/VexflowCanvas.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIlD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqC/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ export interface VexflowColorScheme {
2
+ foreground?: string;
3
+ background?: string;
4
+ ledgerLine?: string;
5
+ }
6
+ export declare function resolveVexflowColor(style: string, colorScheme?: VexflowColorScheme): string;
7
+ //# sourceMappingURL=VexflowColorScheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VexflowColorScheme.d.ts","sourceRoot":"","sources":["../../../../src/base/VexflowColorScheme.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAKD,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,kBAAkB,GAC/B,MAAM,CAiBR"}
@@ -0,0 +1,74 @@
1
+ import { type SkFont, type SkTypefaceFontProvider } from '@shopify/react-native-skia';
2
+ import { RenderContext as VexflowRenderContext } from 'vexflow';
3
+ import type { FontInfo } from 'vexflow';
4
+ import TextMeasureContext from './TextMeasureContext';
5
+ import { type VexflowColorScheme } from './VexflowColorScheme';
6
+ import type { VexflowRecordingCommand } from './VexflowRecordingTypes';
7
+ export default class VexflowRecordingContext implements VexflowRenderContext {
8
+ __workletClass: boolean;
9
+ private commands;
10
+ private currentPath?;
11
+ private fillPaint;
12
+ private strokePaint;
13
+ private textFont;
14
+ private textFontDescriptor;
15
+ private fontManager;
16
+ private textMeasurementContext;
17
+ private isFinished;
18
+ private colorScheme?;
19
+ constructor(fontProvider: SkTypefaceFontProvider, defaultFont: string, colorScheme?: VexflowColorScheme);
20
+ getCurrentSkFont(): SkFont;
21
+ getMeasurementContext(): TextMeasureContext;
22
+ finish(): readonly VexflowRecordingCommand[];
23
+ clear(): this;
24
+ setFillStyle(style: string | unknown): this;
25
+ setBackgroundFillStyle(_style: string): this;
26
+ setStrokeStyle(style: string): this;
27
+ setShadowColor(_color: string): this;
28
+ setShadowBlur(_blur: number): this;
29
+ setLineWidth(width: number): this;
30
+ setLineCap(cap: string): this;
31
+ setLineDash(_dashPattern: number[]): this;
32
+ scale(x: number, y: number): this;
33
+ translate(x: number, y: number): this;
34
+ resize(_width: number, _height: number): this;
35
+ rect(x: number, y: number, width: number, height: number): this;
36
+ fillRect(x: number, y: number, width: number, height: number): this;
37
+ clearRect(x: number, y: number, width: number, height: number): this;
38
+ clipRect(x: number, y: number, width: number, height: number): this;
39
+ pointerRect(_x: number, _y: number, _width: number, _height: number): this;
40
+ beginPath(): this;
41
+ moveTo(x: number, y: number): this;
42
+ lineTo(x: number, y: number): this;
43
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this;
44
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this;
45
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean): this;
46
+ fill(_attributes?: unknown): this;
47
+ stroke(): this;
48
+ closePath(): this;
49
+ fillText(text: string, x: number, y: number): this;
50
+ save(): this;
51
+ restore(): this;
52
+ openGroup(_cls?: string, _id?: string): this;
53
+ closeGroup(): this;
54
+ openRotation(_angleDegrees: number, _x: number, _y: number): this;
55
+ closeRotation(): this;
56
+ add(_child: unknown): this;
57
+ measureText(_text: string): {
58
+ x: number;
59
+ y: number;
60
+ width: number;
61
+ height: number;
62
+ };
63
+ set fillStyle(style: string | unknown);
64
+ get fillStyle(): string | unknown;
65
+ set strokeStyle(value: string);
66
+ get strokeStyle(): string;
67
+ setFont(font?: string | FontInfo, size?: string | number, weight?: string | number, style?: string): this;
68
+ getFont(): string;
69
+ set font(value: string);
70
+ get font(): string;
71
+ private cloneCurrentPath;
72
+ private pushCommand;
73
+ }
74
+ //# sourceMappingURL=VexflowRecordingContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VexflowRecordingContext.d.ts","sourceRoot":"","sources":["../../../../src/base/VexflowRecordingContext.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,MAAM,EACX,KAAK,sBAAsB,EAC5B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAW,aAAa,IAAI,oBAAoB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EACV,uBAAuB,EAMxB,MAAM,yBAAyB,CAAC;AAgBjC,MAAM,CAAC,OAAO,OAAO,uBAAwB,YAAW,oBAAoB;IAC1E,cAAc,UAAQ;IAEtB,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,WAAW,CAAC,CAAgC;IACpD,OAAO,CAAC,SAAS,CAEf;IACF,OAAO,CAAC,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;;IAKzB,IAAI,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAEpC;IAED,IAAI,SAAS,IAJQ,MAAM,GAAG,OAAO,CAOpC;IAED,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAE5B;IAED,IAAI,WAAW,IAJQ,MAAM,CAO5B;IAED,OAAO,CACL,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,EACxB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EACtB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EACxB,KAAK,CAAC,EAAE,MAAM;IAOhB,OAAO;IAKP,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,EAErB;IAED,IAAI,IAAI,IAJQ,MAAM,CAOrB;IAED,OAAO,CAAC,gBAAgB;IAQxB,OAAO,CAAC,WAAW;CASpB"}
@@ -0,0 +1,4 @@
1
+ import { type SkCanvas, type SkTypefaceFontProvider } from '@shopify/react-native-skia';
2
+ import type { VexflowRecordingCommand } from './VexflowRecordingTypes';
3
+ export declare function renderVexflowRecordingCommands(canvas: SkCanvas, commands: readonly VexflowRecordingCommand[], fontProvider: SkTypefaceFontProvider, defaultFont: string): void;
4
+ //# sourceMappingURL=VexflowRecordingReplay.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VexflowRecordingReplay.d.ts","sourceRoot":"","sources":["../../../../src/base/VexflowRecordingReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,QAAQ,EAGb,KAAK,sBAAsB,EAC5B,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EACV,uBAAuB,EAMxB,MAAM,yBAAyB,CAAC;AA8HjC,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,QAAQ,EAChB,QAAQ,EAAE,SAAS,uBAAuB,EAAE,EAC5C,YAAY,EAAE,sBAAsB,EACpC,WAAW,EAAE,MAAM,QA4DpB"}
@@ -0,0 +1,94 @@
1
+ import type { FontInfo } from 'vexflow';
2
+ export type VexflowRecordingLineCap = 'butt' | 'round' | 'square';
3
+ export interface VexflowRecordingRect {
4
+ x: number;
5
+ y: number;
6
+ width: number;
7
+ height: number;
8
+ }
9
+ export interface VexflowRecordingPaint {
10
+ color: string;
11
+ strokeCap?: VexflowRecordingLineCap;
12
+ strokeWidth?: number;
13
+ }
14
+ export interface VexflowRecordingFont {
15
+ font?: string | FontInfo;
16
+ size?: string | number;
17
+ weight?: string | number;
18
+ style?: string;
19
+ }
20
+ export type VexflowRecordingPathCommand = {
21
+ type: 'moveTo';
22
+ x: number;
23
+ y: number;
24
+ } | {
25
+ type: 'lineTo';
26
+ x: number;
27
+ y: number;
28
+ } | {
29
+ type: 'cubicTo';
30
+ cp1x: number;
31
+ cp1y: number;
32
+ cp2x: number;
33
+ cp2y: number;
34
+ x: number;
35
+ y: number;
36
+ } | {
37
+ type: 'quadTo';
38
+ cpx: number;
39
+ cpy: number;
40
+ x: number;
41
+ y: number;
42
+ } | {
43
+ type: 'addRect';
44
+ rect: VexflowRecordingRect;
45
+ } | {
46
+ type: 'addArc';
47
+ rect: VexflowRecordingRect;
48
+ startDegrees: number;
49
+ sweepDegrees: number;
50
+ } | {
51
+ type: 'close';
52
+ };
53
+ export type VexflowRecordingCommand = {
54
+ type: 'clear';
55
+ color: string;
56
+ } | {
57
+ type: 'save';
58
+ } | {
59
+ type: 'restore';
60
+ } | {
61
+ type: 'scale';
62
+ x: number;
63
+ y: number;
64
+ } | {
65
+ type: 'translate';
66
+ x: number;
67
+ y: number;
68
+ } | {
69
+ type: 'clipRect';
70
+ rect: VexflowRecordingRect;
71
+ } | {
72
+ type: 'fillRect';
73
+ rect: VexflowRecordingRect;
74
+ paint: VexflowRecordingPaint;
75
+ } | {
76
+ type: 'clearRect';
77
+ rect: VexflowRecordingRect;
78
+ } | {
79
+ type: 'fillPath';
80
+ path: VexflowRecordingPathCommand[];
81
+ paint: VexflowRecordingPaint;
82
+ } | {
83
+ type: 'strokePath';
84
+ path: VexflowRecordingPathCommand[];
85
+ paint: VexflowRecordingPaint;
86
+ } | {
87
+ type: 'fillText';
88
+ text: string;
89
+ x: number;
90
+ y: number;
91
+ paint: VexflowRecordingPaint;
92
+ font: VexflowRecordingFont;
93
+ };
94
+ //# sourceMappingURL=VexflowRecordingTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"VexflowRecordingTypes.d.ts","sourceRoot":"","sources":["../../../../src/base/VexflowRecordingTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,uBAAuB,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,2BAA2B,GACnC;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,GACD;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,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AAE,qBAAqB,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,2BAA2B,EAAE,CAAC;IACpC,KAAK,EAAE,qBAAqB,CAAC;CAC9B,GACD;IACE,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,qBAAqB,CAAC;IAC7B,IAAI,EAAE,oBAAoB,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { default as VexflowCanvas } from './VexflowCanvas';
2
+ export { default as VexflowRecordingContext } from './VexflowRecordingContext';
3
+ export * from './VexflowColorScheme';
4
+ export * from './VexflowRecordingTypes';
5
+ export * from './types';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/base/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAE/E,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Font } from 'vexflow';
2
+ import type { FontInfo } from 'vexflow';
3
+ export declare function installVexflowReactNativeFallbacks(): void;
4
+ export declare function ensureVexflowTextMeasurementCanvas(): void;
5
+ declare function parseCssFontShorthand(cssFontShorthand: string): Required<FontInfo>;
6
+ export declare const __test__: {
7
+ originalFromCSSString: typeof Font.fromCSSString;
8
+ parseCssFontShorthand: typeof parseCssFontShorthand;
9
+ };
10
+ export {};
11
+ //# sourceMappingURL=setupVexflowReactNative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupVexflowReactNative.d.ts","sourceRoot":"","sources":["../../../../src/base/setupVexflowReactNative.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,IAAI,EAAE,MAAM,SAAS,CAAC;AAExC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA0BxC,wBAAgB,kCAAkC,IAAI,IAAI,CAoBzD;AAED,wBAAgB,kCAAkC,IAAI,IAAI,CA+BzD;AAED,iBAAS,qBAAqB,CAAC,gBAAgB,EAAE,MAAM,GAAG,QAAQ,CAAC,QAAQ,CAAC,CA0B3E;AAWD,eAAO,MAAM,QAAQ;;;CAGpB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { SkTypefaceFontProvider } from '@shopify/react-native-skia';
2
+ import type VexflowRecordingContext from './VexflowRecordingContext';
3
+ export interface OnDrawParams {
4
+ ctx: VexflowRecordingContext;
5
+ width: number;
6
+ height: number;
7
+ }
8
+ export interface VexflowCanvasProps {
9
+ onDraw: (params: OnDrawParams) => void;
10
+ fontManager: SkTypefaceFontProvider;
11
+ defaultFont: string;
12
+ }
13
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/base/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,uBAAuB,MAAM,2BAA2B,CAAC;AAErE,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,uBAAuB,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;IACpC,WAAW,EAAE,MAAM,CAAC;CAIrB"}
@@ -0,0 +1,2 @@
1
+ export declare function parseStyleToColor(style: string): string;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/base/utils.ts"],"names":[],"mappings":"AAUA,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAUvD"}
@@ -0,0 +1,30 @@
1
+ import type { Dynamic, Measure, NoteAttachment, ScoreDefaults, Slur, Staff, Tie, TupletGroup } from '../../state';
2
+ export type PartInfo = {
3
+ id: string;
4
+ name?: string;
5
+ };
6
+ export type StaffBuild = {
7
+ id: string;
8
+ name?: string;
9
+ order: number;
10
+ defaultClef?: Staff['defaultClef'];
11
+ measures: Measure[];
12
+ };
13
+ type ActiveSpanner = {
14
+ itemId: string;
15
+ };
16
+ export type ParserState = {
17
+ scoreId: string;
18
+ divisions: number;
19
+ defaults: ScoreDefaults;
20
+ attachments: NoteAttachment[];
21
+ ties: Tie[];
22
+ slurs: Slur[];
23
+ tuplets: TupletGroup[];
24
+ pendingDynamics: Map<string, Dynamic[]>;
25
+ activeTies: Map<string, ActiveSpanner>;
26
+ activeSlurs: Map<string, ActiveSpanner>;
27
+ activeTuplets: Map<string, TupletGroup>;
28
+ };
29
+ export {};
30
+ //# sourceMappingURL=InternalTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InternalTypes.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/InternalTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,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,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,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"}
@@ -0,0 +1,4 @@
1
+ import type { ParserState, StaffBuild } from './InternalTypes';
2
+ import { type XmlElement } from './XmlOrder';
3
+ export declare function parseMeasure(measure: XmlElement, measureIndex: number, staves: StaffBuild[], state: ParserState): void;
4
+ //# sourceMappingURL=MeasureParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MeasureParser.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/MeasureParser.ts"],"names":[],"mappings":"AAQA,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"}
@@ -0,0 +1,5 @@
1
+ import type { Direction } from '../../state';
2
+ import type { ParserState } from './InternalTypes';
3
+ import { type XmlElement } from './XmlOrder';
4
+ export declare function parseDirection(direction: XmlElement, state: ParserState): Direction[];
5
+ //# sourceMappingURL=MusicXmlDirections.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,6 @@
1
+ import type { DurationValue, Voice } from '../../state';
2
+ export declare function getMeasureDurationTicks(divisions: number, beats: number, beatUnit: number): number;
3
+ export declare function durationToTicks(duration: DurationValue, divisions: number): number;
4
+ export declare function inferDurationType(duration: number, divisions: number): "long" | "breve" | "w" | "h" | "q" | "8" | "16" | "32" | "64" | "128";
5
+ export declare function appendSpacerRests(voice: Voice, ticks: number, divisions: number): boolean;
6
+ //# sourceMappingURL=MusicXmlTiming.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MusicXmlTiming.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/MusicXmlTiming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAQ,KAAK,EAAE,MAAM,aAAa,CAAC;AAmB9D,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GACf,MAAM,CAER;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,MAAM,GAChB,MAAM,CAiBR;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,yEA+CpE;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GAChB,OAAO,CAuBT"}
@@ -0,0 +1,8 @@
1
+ import type { Staff, StaffGroup } from '../../state';
2
+ import type { PartInfo, ParserState } from './InternalTypes';
3
+ import { type XmlElement } from './XmlOrder';
4
+ export declare function parsePart(part: XmlElement, partInfo: PartInfo, orderOffset: number, state: ParserState): {
5
+ staves: Staff[];
6
+ staffGroups: StaffGroup[];
7
+ };
8
+ //# sourceMappingURL=PartParser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PartParser.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/PartParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAc,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAIL,KAAK,UAAU,EAChB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,SAAS,CACvB,IAAI,EAAE,UAAU,EAChB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,WAAW,GACjB;IAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,WAAW,EAAE,UAAU,EAAE,CAAA;CAAE,CA+ChD"}
@@ -0,0 +1,4 @@
1
+ import type { ParserState } from './InternalTypes';
2
+ import { type XmlElement } from './XmlOrder';
3
+ export declare function applyNoteAttachments(note: XmlElement, itemId: string, staffNumber: string, voiceId: string, state: ParserState): void;
4
+ //# sourceMappingURL=Spanners.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,20 @@
1
+ export type XmlAttributes = Record<string, string>;
2
+ export interface XmlElement {
3
+ name: string;
4
+ children: XmlElement[];
5
+ attributes: XmlAttributes;
6
+ text: string;
7
+ }
8
+ export declare function normalizeOrderedXml(nodes: unknown, path?: string): XmlElement[];
9
+ export declare function firstChild(element: XmlElement, name: string): XmlElement;
10
+ export declare function childrenNamed(element: XmlElement, name: string): XmlElement[];
11
+ export declare function optionalChild(element: XmlElement, name: string): XmlElement | undefined;
12
+ export declare function hasChild(element: XmlElement, name: string): boolean;
13
+ export declare function textOf(element: XmlElement): string;
14
+ export declare function childText(element: XmlElement, name: string): string | undefined;
15
+ export declare function requiredChildText(element: XmlElement, name: string): string;
16
+ export declare function attr(element: XmlElement, name: string): string | undefined;
17
+ export declare function numberText(element: XmlElement, name: string): number | undefined;
18
+ export declare function requiredNumberText(element: XmlElement, name: string): number;
19
+ export declare function parseNumber(value: string): number;
20
+ //# sourceMappingURL=XmlOrder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"XmlOrder.d.ts","sourceRoot":"","sources":["../../../../../src/musicxml/MusicXmlParser/XmlOrder.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEnD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvB,UAAU,EAAE,aAAa,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAQD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,SAAM,GAAG,UAAU,EAAE,CAQ5E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAUxE;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAE7E;AAED,wBAAgB,aAAa,CAC3B,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,GACX,UAAU,GAAG,SAAS,CAExB;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAElD;AAED,wBAAgB,SAAS,CACvB,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAGpB;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAU3E;AAED,wBAAgB,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE1E;AAED,wBAAgB,UAAU,CACxB,OAAO,EAAE,UAAU,EACnB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,SAAS,CAGpB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAU5E;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQjD"}
@@ -0,0 +1,5 @@
1
+ import type { Score } from '../../state';
2
+ import { type ParseMusicXmlOptions } from './types';
3
+ export declare function parseMusicXmlToScore(xml: string, options?: ParseMusicXmlOptions): Score;
4
+ export { MusicXmlParseError, type ParseMusicXmlOptions } from './types';
5
+ //# sourceMappingURL=index.d.ts.map