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,425 @@
1
+ "use strict";
2
+
3
+ import { Platform } from 'react-native';
4
+ import { Element } from 'vexflow';
5
+ import FontManager from "./FontManager.js";
6
+ import TextMeasureContext from "./TextMeasureContext.js";
7
+ import { installVexflowReactNativeFallbacks } from "./setupVexflowReactNative.js";
8
+ import { resolveVexflowColor } from "./VexflowColorScheme.js";
9
+ const showSilentLogs = false;
10
+ const WidthScale = 3 / 4;
11
+ function logUnimplemented(methodName, isSilent = false) {
12
+ if (isSilent && !showSilentLogs) {
13
+ return;
14
+ }
15
+ console.log(`VexflowRecordingContext: Method "${methodName}" is not implemented yet.`);
16
+ }
17
+ export default class VexflowRecordingContext {
18
+ __workletClass = true;
19
+ commands = [];
20
+ fillPaint = {
21
+ color: '#000000'
22
+ };
23
+ strokePaint = {
24
+ color: '#000000',
25
+ strokeCap: 'butt',
26
+ strokeWidth: 1.5 * WidthScale
27
+ };
28
+ isFinished = false;
29
+ constructor(fontProvider, defaultFont, colorScheme) {
30
+ this.colorScheme = colorScheme;
31
+ this.fillPaint.color = resolveVexflowColor('black', colorScheme);
32
+ this.strokePaint.color = resolveVexflowColor('black', colorScheme);
33
+ this.fontManager = new FontManager(fontProvider, defaultFont);
34
+ this.textFontDescriptor = {
35
+ font: defaultFont
36
+ };
37
+ this.textFont = this.fontManager.createSkFont(defaultFont);
38
+ if (Platform.OS === 'ios' || Platform.OS === 'android') {
39
+ installVexflowReactNativeFallbacks();
40
+ this.textMeasurementContext = new TextMeasureContext(this);
41
+ Element.setTextMeasurementCanvas({
42
+ getContext: type => {
43
+ if (type === '2d') {
44
+ return this.textMeasurementContext;
45
+ }
46
+ return null;
47
+ }
48
+ });
49
+ } else {
50
+ const measurementCanvas = Element.getTextMeasurementCanvas();
51
+ this.textMeasurementContext = measurementCanvas?.getContext('2d');
52
+ }
53
+ }
54
+ getCurrentSkFont() {
55
+ return this.textFont;
56
+ }
57
+ getMeasurementContext() {
58
+ return this.textMeasurementContext;
59
+ }
60
+ finish() {
61
+ this.isFinished = true;
62
+ return this.commands.map(command => cloneCommand(command));
63
+ }
64
+ clear() {
65
+ this.pushCommand({
66
+ type: 'clear',
67
+ color: 'transparent'
68
+ });
69
+ return this;
70
+ }
71
+ setFillStyle(style) {
72
+ if (typeof style === 'string') {
73
+ this.fillPaint = {
74
+ ...this.fillPaint,
75
+ color: resolveVexflowColor(style, this.colorScheme)
76
+ };
77
+ return this;
78
+ }
79
+ logUnimplemented('setFillStyle (gradient or pattern)');
80
+ return this;
81
+ }
82
+ setBackgroundFillStyle(_style) {
83
+ logUnimplemented('setBackgroundFillStyle');
84
+ return this;
85
+ }
86
+ setStrokeStyle(style) {
87
+ this.strokePaint = {
88
+ ...this.strokePaint,
89
+ color: resolveVexflowColor(style, this.colorScheme)
90
+ };
91
+ return this;
92
+ }
93
+ setShadowColor(_color) {
94
+ logUnimplemented('setShadowColor');
95
+ return this;
96
+ }
97
+ setShadowBlur(_blur) {
98
+ logUnimplemented('setShadowBlur');
99
+ return this;
100
+ }
101
+ setLineWidth(width) {
102
+ this.strokePaint = {
103
+ ...this.strokePaint,
104
+ strokeWidth: width * WidthScale
105
+ };
106
+ return this;
107
+ }
108
+ setLineCap(cap) {
109
+ this.strokePaint = {
110
+ ...this.strokePaint,
111
+ strokeCap: normalizeLineCap(cap)
112
+ };
113
+ return this;
114
+ }
115
+ setLineDash(_dashPattern) {
116
+ logUnimplemented('setLineDash');
117
+ return this;
118
+ }
119
+ scale(x, y) {
120
+ this.pushCommand({
121
+ type: 'scale',
122
+ x,
123
+ y
124
+ });
125
+ return this;
126
+ }
127
+ translate(x, y) {
128
+ this.pushCommand({
129
+ type: 'translate',
130
+ x,
131
+ y
132
+ });
133
+ return this;
134
+ }
135
+ resize(_width, _height) {
136
+ logUnimplemented('resize');
137
+ return this;
138
+ }
139
+ rect(x, y, width, height) {
140
+ this.currentPath?.push({
141
+ type: 'addRect',
142
+ rect: makeRect(x, y, width, height)
143
+ });
144
+ return this;
145
+ }
146
+ fillRect(x, y, width, height) {
147
+ this.pushCommand({
148
+ type: 'fillRect',
149
+ rect: makeRect(x, y, width, height),
150
+ paint: clonePaint(this.fillPaint)
151
+ });
152
+ return this;
153
+ }
154
+ clearRect(x, y, width, height) {
155
+ this.pushCommand({
156
+ type: 'clearRect',
157
+ rect: makeRect(x, y, width, height)
158
+ });
159
+ return this;
160
+ }
161
+ clipRect(x, y, width, height) {
162
+ this.pushCommand({
163
+ type: 'clipRect',
164
+ rect: makeRect(x, y, width, height)
165
+ });
166
+ return this;
167
+ }
168
+ pointerRect(_x, _y, _width, _height) {
169
+ logUnimplemented('pointerRect', true);
170
+ return this;
171
+ }
172
+ beginPath() {
173
+ this.currentPath = [];
174
+ return this;
175
+ }
176
+ moveTo(x, y) {
177
+ this.currentPath?.push({
178
+ type: 'moveTo',
179
+ x,
180
+ y
181
+ });
182
+ return this;
183
+ }
184
+ lineTo(x, y) {
185
+ this.currentPath?.push({
186
+ type: 'lineTo',
187
+ x,
188
+ y
189
+ });
190
+ return this;
191
+ }
192
+ bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
193
+ this.currentPath?.push({
194
+ type: 'cubicTo',
195
+ cp1x,
196
+ cp1y,
197
+ cp2x,
198
+ cp2y,
199
+ x,
200
+ y
201
+ });
202
+ return this;
203
+ }
204
+ quadraticCurveTo(cpx, cpy, x, y) {
205
+ this.currentPath?.push({
206
+ type: 'quadTo',
207
+ cpx,
208
+ cpy,
209
+ x,
210
+ y
211
+ });
212
+ return this;
213
+ }
214
+ arc(x, y, radius, startAngle, endAngle, anticlockwise) {
215
+ const startDeg = startAngle * 180 / Math.PI;
216
+ const endDeg = endAngle * 180 / Math.PI;
217
+ const sweepDeg = anticlockwise ? startDeg - endDeg : endDeg - startDeg;
218
+ this.currentPath?.push({
219
+ type: 'addArc',
220
+ rect: makeRect(x - radius, y - radius, radius * 2, radius * 2),
221
+ startDegrees: startDeg,
222
+ sweepDegrees: sweepDeg
223
+ });
224
+ return this;
225
+ }
226
+ fill(_attributes) {
227
+ this.pushCommand({
228
+ type: 'fillPath',
229
+ path: this.cloneCurrentPath(),
230
+ paint: clonePaint(this.fillPaint)
231
+ });
232
+ return this;
233
+ }
234
+ stroke() {
235
+ this.pushCommand({
236
+ type: 'strokePath',
237
+ path: this.cloneCurrentPath(),
238
+ paint: clonePaint(this.strokePaint)
239
+ });
240
+ return this;
241
+ }
242
+ closePath() {
243
+ this.currentPath?.push({
244
+ type: 'close'
245
+ });
246
+ return this;
247
+ }
248
+ fillText(text, x, y) {
249
+ this.pushCommand({
250
+ type: 'fillText',
251
+ text,
252
+ x,
253
+ y,
254
+ paint: clonePaint(this.fillPaint),
255
+ font: cloneFont(this.textFontDescriptor)
256
+ });
257
+ return this;
258
+ }
259
+ save() {
260
+ this.pushCommand({
261
+ type: 'save'
262
+ });
263
+ return this;
264
+ }
265
+ restore() {
266
+ this.pushCommand({
267
+ type: 'restore'
268
+ });
269
+ return this;
270
+ }
271
+ openGroup(_cls, _id) {
272
+ logUnimplemented('openGroup', true);
273
+ return this;
274
+ }
275
+ closeGroup() {
276
+ logUnimplemented('closeGroup', true);
277
+ return this;
278
+ }
279
+ openRotation(_angleDegrees, _x, _y) {
280
+ logUnimplemented('openRotation');
281
+ return this;
282
+ }
283
+ closeRotation() {
284
+ logUnimplemented('closeRotation');
285
+ return this;
286
+ }
287
+ add(_child) {
288
+ logUnimplemented('add');
289
+ return this;
290
+ }
291
+ measureText(_text) {
292
+ logUnimplemented('measureText');
293
+ return {
294
+ x: 0,
295
+ y: 0,
296
+ width: 0,
297
+ height: 0
298
+ };
299
+ }
300
+ set fillStyle(style) {
301
+ this.setFillStyle(style);
302
+ }
303
+ get fillStyle() {
304
+ logUnimplemented('get fillStyle');
305
+ return '';
306
+ }
307
+ set strokeStyle(value) {
308
+ this.setStrokeStyle(value);
309
+ }
310
+ get strokeStyle() {
311
+ logUnimplemented('get strokeStyle');
312
+ return '';
313
+ }
314
+ setFont(font, size, weight, style) {
315
+ this.textFontDescriptor = {
316
+ font,
317
+ size,
318
+ weight,
319
+ style
320
+ };
321
+ this.textFont = this.fontManager.createSkFont(font, size, weight, style);
322
+ return this;
323
+ }
324
+ getFont() {
325
+ logUnimplemented('getFont');
326
+ return '';
327
+ }
328
+ set font(value) {
329
+ this.setFont(value);
330
+ }
331
+ get font() {
332
+ logUnimplemented('get font');
333
+ return '';
334
+ }
335
+ cloneCurrentPath() {
336
+ if (!this.currentPath) {
337
+ this.currentPath = [];
338
+ }
339
+ return this.currentPath.map(command => clonePathCommand(command));
340
+ }
341
+ pushCommand(command) {
342
+ if (this.isFinished) {
343
+ throw new Error('VexflowRecordingContext: Cannot record commands after finish() has been called.');
344
+ }
345
+ this.commands.push(command);
346
+ }
347
+ }
348
+ function makeRect(x, y, width, height) {
349
+ return {
350
+ x,
351
+ y,
352
+ width,
353
+ height
354
+ };
355
+ }
356
+ function normalizeLineCap(cap) {
357
+ if (cap === 'round' || cap === 'square') {
358
+ return cap;
359
+ }
360
+ return 'butt';
361
+ }
362
+ function clonePaint(paint) {
363
+ return {
364
+ ...paint
365
+ };
366
+ }
367
+ function cloneFont(font) {
368
+ return {
369
+ ...font,
370
+ font: typeof font.font === 'object' && font.font ? {
371
+ ...font.font
372
+ } : font.font
373
+ };
374
+ }
375
+ function clonePathCommand(command) {
376
+ if (command.type === 'addRect' || command.type === 'addArc') {
377
+ return {
378
+ ...command,
379
+ rect: {
380
+ ...command.rect
381
+ }
382
+ };
383
+ }
384
+ return {
385
+ ...command
386
+ };
387
+ }
388
+ function cloneCommand(command) {
389
+ switch (command.type) {
390
+ case 'fillRect':
391
+ return {
392
+ ...command,
393
+ rect: {
394
+ ...command.rect
395
+ },
396
+ paint: clonePaint(command.paint)
397
+ };
398
+ case 'fillPath':
399
+ case 'strokePath':
400
+ return {
401
+ ...command,
402
+ path: command.path.map(pathCommand => clonePathCommand(pathCommand)),
403
+ paint: clonePaint(command.paint)
404
+ };
405
+ case 'fillText':
406
+ return {
407
+ ...command,
408
+ paint: clonePaint(command.paint),
409
+ font: cloneFont(command.font)
410
+ };
411
+ case 'clipRect':
412
+ case 'clearRect':
413
+ return {
414
+ ...command,
415
+ rect: {
416
+ ...command.rect
417
+ }
418
+ };
419
+ default:
420
+ return {
421
+ ...command
422
+ };
423
+ }
424
+ }
425
+ //# sourceMappingURL=VexflowRecordingContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Platform","Element","FontManager","TextMeasureContext","installVexflowReactNativeFallbacks","resolveVexflowColor","showSilentLogs","WidthScale","logUnimplemented","methodName","isSilent","console","log","VexflowRecordingContext","__workletClass","commands","fillPaint","color","strokePaint","strokeCap","strokeWidth","isFinished","constructor","fontProvider","defaultFont","colorScheme","fontManager","textFontDescriptor","font","textFont","createSkFont","OS","textMeasurementContext","setTextMeasurementCanvas","getContext","type","measurementCanvas","getTextMeasurementCanvas","getCurrentSkFont","getMeasurementContext","finish","map","command","cloneCommand","clear","pushCommand","setFillStyle","style","setBackgroundFillStyle","_style","setStrokeStyle","setShadowColor","_color","setShadowBlur","_blur","setLineWidth","width","setLineCap","cap","normalizeLineCap","setLineDash","_dashPattern","scale","x","y","translate","resize","_width","_height","rect","height","currentPath","push","makeRect","fillRect","paint","clonePaint","clearRect","clipRect","pointerRect","_x","_y","beginPath","moveTo","lineTo","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","quadraticCurveTo","cpx","cpy","arc","radius","startAngle","endAngle","anticlockwise","startDeg","Math","PI","endDeg","sweepDeg","startDegrees","sweepDegrees","fill","_attributes","path","cloneCurrentPath","stroke","closePath","fillText","text","cloneFont","save","restore","openGroup","_cls","_id","closeGroup","openRotation","_angleDegrees","closeRotation","add","_child","measureText","_text","fillStyle","strokeStyle","value","setFont","size","weight","getFont","clonePathCommand","Error","pathCommand"],"sourceRoot":"../../../src","sources":["base/VexflowRecordingContext.ts"],"mappings":";;AAIA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,OAAO,QAA+C,SAAS;AAGxE,OAAOC,WAAW,MAAM,kBAAe;AACvC,OAAOC,kBAAkB,MAAM,yBAAsB;AACrD,SAASC,kCAAkC,QAAQ,8BAA2B;AAC9E,SACEC,mBAAmB,QAEd,yBAAsB;AAU7B,MAAMC,cAAc,GAAG,KAAK;AAE5B,MAAMC,UAAU,GAAG,CAAC,GAAG,CAAC;AAExB,SAASC,gBAAgBA,CAACC,UAAkB,EAAEC,QAAQ,GAAG,KAAK,EAAE;EAC9D,IAAIA,QAAQ,IAAI,CAACJ,cAAc,EAAE;IAC/B;EACF;EAEAK,OAAO,CAACC,GAAG,CACT,oCAAoCH,UAAU,2BAChD,CAAC;AACH;AAEA,eAAe,MAAMI,uBAAuB,CAAiC;EAC3EC,cAAc,GAAG,IAAI;EAEbC,QAAQ,GAA8B,EAAE;EAExCC,SAAS,GAA0B;IACzCC,KAAK,EAAE;EACT,CAAC;EACOC,WAAW,GAA0B;IAC3CD,KAAK,EAAE,SAAS;IAChBE,SAAS,EAAE,MAAM;IACjBC,WAAW,EAAE,GAAG,GAAGb;EACrB,CAAC;EAKOc,UAAU,GAAG,KAAK;EAG1BC,WAAWA,CACTC,YAAoC,EACpCC,WAAmB,EACnBC,WAAgC,EAChC;IACA,IAAI,CAACA,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACT,SAAS,CAACC,KAAK,GAAGZ,mBAAmB,CAAC,OAAO,EAAEoB,WAAW,CAAC;IAChE,IAAI,CAACP,WAAW,CAACD,KAAK,GAAGZ,mBAAmB,CAAC,OAAO,EAAEoB,WAAW,CAAC;IAClE,IAAI,CAACC,WAAW,GAAG,IAAIxB,WAAW,CAACqB,YAAY,EAAEC,WAAW,CAAC;IAC7D,IAAI,CAACG,kBAAkB,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AC;QACzBM,KAAK,EAAEC,UAAU,CAAClC,OAAO,CAACiC,KAAK;MACjC,CAAC;IACH,KAAK,UAAU;IACf,KAAK,YAAY;MACf,OAAO;QACL,GAAGjC,OAAO;QACViE,IAAI,EAAEjE,OAAO,CAACiE,IAAI,CAAClE,GAAG,CAAE+F,WAAW,IAAKF,gBAAgB,CAACE,WAAW,CAAC,CAAC;QACtE7D,KAAK,EAAEC,UAAU,CAAClC,OAAO,CAACiC,KAAK;MACjC,CAAC;IACH,KAAK,UAAU;MACb,OAAO;QACL,GAAGjC,OAAO;QACViC,KAAK,EAAEC,UAAU,CAAClC,OAAO,CAACiC,KAAK,CAAC;QAChC/C,IAAI,EAAEqF,SAAS,CAACvE,OAAO,CAACd,IAAI;MAC9B,CAAC;IACH,KAAK,UAAU;IACf,KAAK,WAAW;MACd,OAAO;QACL,GAAGc,OAAO;QACV2B,IAAI,EAAE;UAAE,GAAG3B,OAAO,CAAC2B;QAAK;MAC1B,CAAC;IACH;MACE,OAAO;QAAE,GAAG3B;MAAQ,CAAC;EACzB;AACF","ignoreList":[]}
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ import { BlendMode, ClipOp, PaintStyle, Skia, StrokeCap } from '@shopify/react-native-skia';
4
+ import FontManager from "./FontManager.js";
5
+ function toSkiaRect(rect) {
6
+ 'worklet';
7
+
8
+ return Skia.XYWHRect(rect.x, rect.y, rect.width, rect.height);
9
+ }
10
+ function mapRecordingLineCap(cap) {
11
+ 'worklet';
12
+
13
+ switch (cap) {
14
+ case 'round':
15
+ return StrokeCap.Round;
16
+ case 'square':
17
+ return StrokeCap.Square;
18
+ case 'butt':
19
+ default:
20
+ return StrokeCap.Butt;
21
+ }
22
+ }
23
+ function createFillPaint(paint) {
24
+ 'worklet';
25
+
26
+ const skPaint = Skia.Paint();
27
+ skPaint.setStyle(PaintStyle.Fill);
28
+ skPaint.setAntiAlias(true);
29
+ skPaint.setColor(Skia.Color(paint.color));
30
+ return skPaint;
31
+ }
32
+ function createStrokePaint(paint) {
33
+ 'worklet';
34
+
35
+ const skPaint = Skia.Paint();
36
+ skPaint.setStyle(PaintStyle.Stroke);
37
+ skPaint.setAntiAlias(true);
38
+ skPaint.setColor(Skia.Color(paint.color));
39
+ skPaint.setStrokeWidth(paint.strokeWidth ?? 1);
40
+ skPaint.setStrokeCap(mapRecordingLineCap(paint.strokeCap ?? 'butt'));
41
+ return skPaint;
42
+ }
43
+ function createClearPaint() {
44
+ 'worklet';
45
+
46
+ const clearPaint = Skia.Paint();
47
+ clearPaint.setBlendMode(BlendMode.Clear);
48
+ return clearPaint;
49
+ }
50
+ function createFont(fontManager, font) {
51
+ 'worklet';
52
+
53
+ return fontManager.createSkFont(font.font, font.size, font.weight, font.style);
54
+ }
55
+ function assertNever(value) {
56
+ throw new Error(`Unexpected Vexflow recording command: ${String(value)}`);
57
+ }
58
+ function applyPathCommand(builder, command) {
59
+ 'worklet';
60
+
61
+ switch (command.type) {
62
+ case 'moveTo':
63
+ builder.moveTo(command.x, command.y);
64
+ break;
65
+ case 'lineTo':
66
+ builder.lineTo(command.x, command.y);
67
+ break;
68
+ case 'cubicTo':
69
+ builder.cubicTo(command.cp1x, command.cp1y, command.cp2x, command.cp2y, command.x, command.y);
70
+ break;
71
+ case 'quadTo':
72
+ builder.quadTo(command.cpx, command.cpy, command.x, command.y);
73
+ break;
74
+ case 'addRect':
75
+ builder.addRect(toSkiaRect(command.rect));
76
+ break;
77
+ case 'addArc':
78
+ builder.addArc(toSkiaRect(command.rect), command.startDegrees, command.sweepDegrees);
79
+ break;
80
+ case 'close':
81
+ builder.close();
82
+ break;
83
+ default:
84
+ assertNever(command);
85
+ }
86
+ }
87
+ function buildPath(path) {
88
+ 'worklet';
89
+
90
+ const builder = Skia.PathBuilder.Make();
91
+ for (const command of path) {
92
+ applyPathCommand(builder, command);
93
+ }
94
+ return builder.build();
95
+ }
96
+ export function renderVexflowRecordingCommands(canvas, commands, fontProvider, defaultFont) {
97
+ 'worklet';
98
+
99
+ const fontManager = new FontManager(fontProvider, defaultFont);
100
+ for (const command of commands) {
101
+ switch (command.type) {
102
+ case 'clear':
103
+ canvas.clear(Skia.Color(command.color));
104
+ break;
105
+ case 'save':
106
+ canvas.save();
107
+ break;
108
+ case 'restore':
109
+ canvas.restore();
110
+ break;
111
+ case 'scale':
112
+ canvas.scale(command.x, command.y);
113
+ break;
114
+ case 'translate':
115
+ canvas.translate(command.x, command.y);
116
+ break;
117
+ case 'clipRect':
118
+ canvas.clipRect(toSkiaRect(command.rect), ClipOp.Intersect, true);
119
+ break;
120
+ case 'fillRect':
121
+ canvas.drawRect(toSkiaRect(command.rect), createFillPaint(command.paint));
122
+ break;
123
+ case 'clearRect':
124
+ canvas.drawRect(toSkiaRect(command.rect), createClearPaint());
125
+ break;
126
+ case 'fillPath':
127
+ canvas.drawPath(buildPath(command.path), createFillPaint(command.paint));
128
+ break;
129
+ case 'strokePath':
130
+ canvas.drawPath(buildPath(command.path), createStrokePaint(command.paint));
131
+ break;
132
+ case 'fillText':
133
+ canvas.drawText(command.text, command.x, command.y, createFillPaint(command.paint), createFont(fontManager, command.font));
134
+ break;
135
+ default:
136
+ assertNever(command);
137
+ }
138
+ }
139
+ }
140
+ //# sourceMappingURL=VexflowRecordingReplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BlendMode","ClipOp","PaintStyle","Skia","StrokeCap","FontManager","toSkiaRect","rect","XYWHRect","x","y","width","height","mapRecordingLineCap","cap","Round","Square","Butt","createFillPaint","paint","skPaint","Paint","setStyle","Fill","setAntiAlias","setColor","Color","color","createStrokePaint","Stroke","setStrokeWidth","strokeWidth","setStrokeCap","strokeCap","createClearPaint","clearPaint","setBlendMode","Clear","createFont","fontManager","font","createSkFont","size","weight","style","assertNever","value","Error","String","applyPathCommand","builder","command","type","moveTo","lineTo","cubicTo","cp1x","cp1y","cp2x","cp2y","quadTo","cpx","cpy","addRect","addArc","startDegrees","sweepDegrees","close","buildPath","path","PathBuilder","Make","build","renderVexflowRecordingCommands","canvas","commands","fontProvider","defaultFont","clear","save","restore","scale","translate","clipRect","Intersect","drawRect","drawPath","drawText","text"],"sourceRoot":"../../../src","sources":["base/VexflowRecordingReplay.ts"],"mappings":";;AAAA,SACEA,SAAS,EACTC,MAAM,EACNC,UAAU,EACVC,IAAI,EACJC,SAAS,QAKJ,4BAA4B;AAEnC,OAAOC,WAAW,MAAM,kBAAe;AAUvC,SAASC,UAAUA,CAACC,IAA0B,EAAE;EAC9C,SAAS;;EAET,OAAOJ,IAAI,CAACK,QAAQ,CAACD,IAAI,CAACE,CAAC,EAAEF,IAAI,CAACG,CAAC,EAAEH,IAAI,CAACI,KAAK,EAAEJ,IAAI,CAACK,MAAM,CAAC;AAC/D;AAEA,SAASC,mBAAmBA,CAACC,GAA4B,EAAa;EACpE,SAAS;;EAET,QAAQA,GAAG;IACT,KAAK,OAAO;MACV,OAAOV,SAAS,CAACW,KAAK;IACxB,KAAK,QAAQ;MACX,OAAOX,SAAS,CAACY,MAAM;IACzB,KAAK,MAAM;IACX;MACE,OAAOZ,SAAS,CAACa,IAAI;EACzB;AACF;AAEA,SAASC,eAAeA,CAACC,KAA4B,EAAW;EAC9D,SAAS;;EAET,MAAMC,OAAO,GAAGjB,IAAI,CAACkB,KAAK,CAAC,CAAC;EAC5BD,OAAO,CAACE,QAAQ,CAACpB,UAAU,CAACqB,IAAI,CAAC;EACjCH,OAAO,CAACI,YAAY,CAAC,IAAI,CAAC;EAC1BJ,OAAO,CAACK,QAAQ,CAACtB,IAAI,CAACuB,KAAK,CAACP,KAAK,CAACQ,KAAK,CAAC,CAAC;EAEzC,OAAOP,OAAO;AAChB;AAEA,SAASQ,iBAAiBA,CAACT,KAA4B,EAAW;EAChE,SAAS;;EAET,MAAMC,OAAO,GAAGjB,IAAI,CAACkB,KAAK,CAAC,CAAC;EAC5BD,OAAO,CAACE,QAAQ,CAACpB,UAAU,CAAC2B,MAAM,CAAC;EACnCT,OAAO,CAACI,YAAY,CAAC,IAAI,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AACiC,OAAO,CAAChC,KAAK,CAAC,EAC9BmB,UAAU,CAACC,WAAW,EAAEY,OAAO,CAACX,IAAI,CACtC,CAAC;QACD;MACF;QACEK,WAAW,CAACM,OAAO,CAAC;IACxB;EACF;AACF","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=VexflowRecordingTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["base/VexflowRecordingTypes.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ export { default as VexflowCanvas } from "./VexflowCanvas.js";
4
+ export { default as VexflowRecordingContext } from "./VexflowRecordingContext.js";
5
+ export * from "./VexflowColorScheme.js";
6
+ export * from "./VexflowRecordingTypes.js";
7
+ export * from "./types.js";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["default","VexflowCanvas","VexflowRecordingContext"],"sourceRoot":"../../../src","sources":["base/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,aAAa,QAAQ,oBAAiB;AAC1D,SAASD,OAAO,IAAIE,uBAAuB,QAAQ,8BAA2B;AAE9E,cAAc,yBAAsB;AACpC,cAAc,4BAAyB;AACvC,cAAc,YAAS","ignoreList":[]}