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.
- package/README.md +286 -11
- package/lib/module/base/FontManager.js +139 -0
- package/lib/module/base/FontManager.js.map +1 -0
- package/lib/module/base/TextMeasureContext.js +46 -0
- package/lib/module/base/TextMeasureContext.js.map +1 -0
- package/lib/module/base/VexflowCanvas.js +48 -0
- package/lib/module/base/VexflowCanvas.js.map +1 -0
- package/lib/module/base/VexflowColorScheme.js +16 -0
- package/lib/module/base/VexflowColorScheme.js.map +1 -0
- package/lib/module/base/VexflowRecordingContext.js +425 -0
- package/lib/module/base/VexflowRecordingContext.js.map +1 -0
- package/lib/module/base/VexflowRecordingReplay.js +140 -0
- package/lib/module/base/VexflowRecordingReplay.js.map +1 -0
- package/lib/module/base/VexflowRecordingTypes.js +4 -0
- package/lib/module/base/VexflowRecordingTypes.js.map +1 -0
- package/lib/module/base/index.js +8 -0
- package/lib/module/base/index.js.map +1 -0
- package/lib/module/base/setupVexflowReactNative.js +96 -0
- package/lib/module/base/setupVexflowReactNative.js.map +1 -0
- package/lib/module/base/types.js +4 -0
- package/lib/module/base/types.js.map +1 -0
- package/lib/module/base/utils.js +18 -0
- package/lib/module/base/utils.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/InternalTypes.js +4 -0
- package/lib/module/musicxml/MusicXmlParser/InternalTypes.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/MeasureParser.js +269 -0
- package/lib/module/musicxml/MusicXmlParser/MeasureParser.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/MusicXmlDirections.js +62 -0
- package/lib/module/musicxml/MusicXmlParser/MusicXmlDirections.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/MusicXmlTiming.js +124 -0
- package/lib/module/musicxml/MusicXmlParser/MusicXmlTiming.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/PartParser.js +41 -0
- package/lib/module/musicxml/MusicXmlParser/PartParser.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/Spanners.js +149 -0
- package/lib/module/musicxml/MusicXmlParser/Spanners.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/XmlOrder.js +106 -0
- package/lib/module/musicxml/MusicXmlParser/XmlOrder.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/index.js +110 -0
- package/lib/module/musicxml/MusicXmlParser/index.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/mappers.js +312 -0
- package/lib/module/musicxml/MusicXmlParser/mappers.js.map +1 -0
- package/lib/module/musicxml/MusicXmlParser/types.js +10 -0
- package/lib/module/musicxml/MusicXmlParser/types.js.map +1 -0
- package/lib/module/musicxml/index.js +4 -0
- package/lib/module/musicxml/index.js.map +1 -0
- package/lib/module/musicxml/testfiles/lg-8102429.xml +79620 -0
- package/lib/module/renderer/Layout/DocumentLayout.js +156 -0
- package/lib/module/renderer/Layout/DocumentLayout.js.map +1 -0
- package/lib/module/renderer/Layout/LayoutMetrics.js +13 -0
- package/lib/module/renderer/Layout/LayoutMetrics.js.map +1 -0
- package/lib/module/renderer/Layout/VerticalSpacing.js +69 -0
- package/lib/module/renderer/Layout/VerticalSpacing.js.map +1 -0
- package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js +232 -0
- package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js.map +1 -0
- package/lib/module/renderer/ScoreRenderer/ScoreScrollbar.js +108 -0
- package/lib/module/renderer/ScoreRenderer/ScoreScrollbar.js.map +1 -0
- package/lib/module/renderer/ScoreRenderer/index.js +7 -0
- package/lib/module/renderer/ScoreRenderer/index.js.map +1 -0
- package/lib/module/renderer/ScoreRenderer/types.js +4 -0
- package/lib/module/renderer/ScoreRenderer/types.js.map +1 -0
- package/lib/module/renderer/ScoreRenderer/useScoreScroll.js +77 -0
- package/lib/module/renderer/ScoreRenderer/useScoreScroll.js.map +1 -0
- package/lib/module/renderer/colorScheme.js +17 -0
- package/lib/module/renderer/colorScheme.js.map +1 -0
- package/lib/module/renderer/constants.js +18 -0
- package/lib/module/renderer/constants.js.map +1 -0
- package/lib/module/renderer/index.js +6 -0
- package/lib/module/renderer/index.js.map +1 -0
- package/lib/module/renderer/layout.js +153 -0
- package/lib/module/renderer/layout.js.map +1 -0
- package/lib/module/renderer/measure.js +202 -0
- package/lib/module/renderer/measure.js.map +1 -0
- package/lib/module/renderer/render.js +163 -0
- package/lib/module/renderer/render.js.map +1 -0
- package/lib/module/renderer/scoreParsing.js +230 -0
- package/lib/module/renderer/scoreParsing.js.map +1 -0
- package/lib/module/renderer/types.js +4 -0
- package/lib/module/renderer/types.js.map +1 -0
- package/lib/module/renderer/useScoreRecording.js +112 -0
- package/lib/module/renderer/useScoreRecording.js.map +1 -0
- package/lib/module/renderer/viewport.js +26 -0
- package/lib/module/renderer/viewport.js.map +1 -0
- package/lib/module/shared/Logger.js +67 -0
- package/lib/module/shared/Logger.js.map +1 -0
- package/lib/module/state/index.js +4 -0
- package/lib/module/state/index.js.map +1 -0
- package/lib/module/state/types.js +2 -0
- package/lib/module/state/types.js.map +1 -0
- package/lib/module/types.js +7 -0
- package/lib/module/types.js.map +1 -1
- package/lib/module/utils.js +42 -77
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/src/base/FontManager.d.ts +23 -0
- package/lib/typescript/src/base/FontManager.d.ts.map +1 -0
- package/lib/typescript/src/base/TextMeasureContext.d.ts +22 -0
- package/lib/typescript/src/base/TextMeasureContext.d.ts.map +1 -0
- package/lib/typescript/src/base/VexflowCanvas.d.ts +5 -0
- package/lib/typescript/src/base/VexflowCanvas.d.ts.map +1 -0
- package/lib/typescript/src/base/VexflowColorScheme.d.ts +7 -0
- package/lib/typescript/src/base/VexflowColorScheme.d.ts.map +1 -0
- package/lib/typescript/src/base/VexflowRecordingContext.d.ts +74 -0
- package/lib/typescript/src/base/VexflowRecordingContext.d.ts.map +1 -0
- package/lib/typescript/src/base/VexflowRecordingReplay.d.ts +4 -0
- package/lib/typescript/src/base/VexflowRecordingReplay.d.ts.map +1 -0
- package/lib/typescript/src/base/VexflowRecordingTypes.d.ts +94 -0
- package/lib/typescript/src/base/VexflowRecordingTypes.d.ts.map +1 -0
- package/lib/typescript/src/base/index.d.ts +6 -0
- package/lib/typescript/src/base/index.d.ts.map +1 -0
- package/lib/typescript/src/base/setupVexflowReactNative.d.ts +11 -0
- package/lib/typescript/src/base/setupVexflowReactNative.d.ts.map +1 -0
- package/lib/typescript/src/base/types.d.ts +13 -0
- package/lib/typescript/src/base/types.d.ts.map +1 -0
- package/lib/typescript/src/base/utils.d.ts +2 -0
- package/lib/typescript/src/base/utils.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/InternalTypes.d.ts +30 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/InternalTypes.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/MeasureParser.d.ts +4 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/MeasureParser.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlDirections.d.ts +5 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlDirections.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlTiming.d.ts +6 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/MusicXmlTiming.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/PartParser.d.ts +8 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/PartParser.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/Spanners.d.ts +4 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/Spanners.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/XmlOrder.d.ts +20 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/XmlOrder.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/index.d.ts +5 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/index.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/mappers.d.ts +15 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/mappers.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/types.d.ts +13 -0
- package/lib/typescript/src/musicxml/MusicXmlParser/types.d.ts.map +1 -0
- package/lib/typescript/src/musicxml/index.d.ts +2 -0
- package/lib/typescript/src/musicxml/index.d.ts.map +1 -0
- package/lib/typescript/src/renderer/Layout/DocumentLayout.d.ts +10 -0
- package/lib/typescript/src/renderer/Layout/DocumentLayout.d.ts.map +1 -0
- package/lib/typescript/src/renderer/Layout/LayoutMetrics.d.ts +6 -0
- package/lib/typescript/src/renderer/Layout/LayoutMetrics.d.ts.map +1 -0
- package/lib/typescript/src/renderer/Layout/VerticalSpacing.d.ts +9 -0
- package/lib/typescript/src/renderer/Layout/VerticalSpacing.d.ts.map +1 -0
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts +14 -0
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts.map +1 -0
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreScrollbar.d.ts +24 -0
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreScrollbar.d.ts.map +1 -0
- package/lib/typescript/src/renderer/ScoreRenderer/index.d.ts +5 -0
- package/lib/typescript/src/renderer/ScoreRenderer/index.d.ts.map +1 -0
- package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts +12 -0
- package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts.map +1 -0
- package/lib/typescript/src/renderer/ScoreRenderer/useScoreScroll.d.ts +13 -0
- package/lib/typescript/src/renderer/ScoreRenderer/useScoreScroll.d.ts.map +1 -0
- package/lib/typescript/src/renderer/colorScheme.d.ts +9 -0
- package/lib/typescript/src/renderer/colorScheme.d.ts.map +1 -0
- package/lib/typescript/src/renderer/constants.d.ts +5 -0
- package/lib/typescript/src/renderer/constants.d.ts.map +1 -0
- package/lib/typescript/src/renderer/index.d.ts +4 -0
- package/lib/typescript/src/renderer/index.d.ts.map +1 -0
- package/lib/typescript/src/renderer/layout.d.ts +56 -0
- package/lib/typescript/src/renderer/layout.d.ts.map +1 -0
- package/lib/typescript/src/renderer/measure.d.ts +23 -0
- package/lib/typescript/src/renderer/measure.d.ts.map +1 -0
- package/lib/typescript/src/renderer/render.d.ts +9 -0
- package/lib/typescript/src/renderer/render.d.ts.map +1 -0
- package/lib/typescript/src/renderer/scoreParsing.d.ts +76 -0
- package/lib/typescript/src/renderer/scoreParsing.d.ts.map +1 -0
- package/lib/typescript/src/renderer/types.d.ts +51 -0
- package/lib/typescript/src/renderer/types.d.ts.map +1 -0
- package/lib/typescript/src/renderer/useScoreRecording.d.ts +21 -0
- package/lib/typescript/src/renderer/useScoreRecording.d.ts.map +1 -0
- package/lib/typescript/src/renderer/viewport.d.ts +3 -0
- package/lib/typescript/src/renderer/viewport.d.ts.map +1 -0
- package/lib/typescript/src/shared/Logger.d.ts +18 -0
- package/lib/typescript/src/shared/Logger.d.ts.map +1 -0
- package/lib/typescript/src/state/index.d.ts +2 -0
- package/lib/typescript/src/state/index.d.ts.map +1 -0
- package/lib/typescript/src/state/types.d.ts +190 -0
- package/lib/typescript/src/state/types.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +0 -6
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts +0 -6
- package/lib/typescript/src/utils.d.ts.map +1 -1
- package/package.json +41 -13
- package/src/base/FontManager.ts +206 -0
- package/src/base/TextMeasureContext.ts +59 -0
- package/src/base/VexflowCanvas.tsx +60 -0
- package/src/base/VexflowColorScheme.ts +32 -0
- package/src/base/VexflowRecordingContext.ts +495 -0
- package/src/base/VexflowRecordingReplay.ts +211 -0
- package/src/base/VexflowRecordingTypes.ts +117 -0
- package/src/base/index.ts +6 -0
- package/src/base/setupVexflowReactNative.ts +124 -0
- package/src/base/types.ts +17 -0
- package/src/base/utils.ts +21 -0
- package/src/musicxml/MusicXmlParser/InternalTypes.ts +41 -0
- package/src/musicxml/MusicXmlParser/MeasureParser.ts +469 -0
- package/src/musicxml/MusicXmlParser/MusicXmlDirections.ts +84 -0
- package/src/musicxml/MusicXmlParser/MusicXmlTiming.ts +153 -0
- package/src/musicxml/MusicXmlParser/PartParser.ts +69 -0
- package/src/musicxml/MusicXmlParser/Spanners.ts +215 -0
- package/src/musicxml/MusicXmlParser/XmlOrder.ts +170 -0
- package/src/musicxml/MusicXmlParser/index.ts +144 -0
- package/src/musicxml/MusicXmlParser/mappers.ts +307 -0
- package/src/musicxml/MusicXmlParser/types.ts +24 -0
- package/src/musicxml/index.ts +5 -0
- package/src/musicxml/testfiles/lg-8102429.xml +79620 -0
- package/src/renderer/Layout/DocumentLayout.ts +240 -0
- package/src/renderer/Layout/LayoutMetrics.ts +21 -0
- package/src/renderer/Layout/VerticalSpacing.ts +122 -0
- package/src/renderer/ScoreRenderer/ScoreRenderer.tsx +310 -0
- package/src/renderer/ScoreRenderer/ScoreScrollbar.tsx +231 -0
- package/src/renderer/ScoreRenderer/index.ts +13 -0
- package/src/renderer/ScoreRenderer/types.ts +14 -0
- package/src/renderer/ScoreRenderer/useScoreScroll.ts +146 -0
- package/src/renderer/colorScheme.ts +28 -0
- package/src/renderer/constants.ts +19 -0
- package/src/renderer/index.ts +3 -0
- package/src/renderer/layout.ts +309 -0
- package/src/renderer/measure.tsx +304 -0
- package/src/renderer/render.tsx +281 -0
- package/src/renderer/scoreParsing.tsx +352 -0
- package/src/renderer/types.ts +60 -0
- package/src/renderer/useScoreRecording.ts +177 -0
- package/src/renderer/viewport.ts +45 -0
- package/src/shared/Logger.ts +85 -0
- package/src/state/index.ts +1 -0
- package/src/state/types.ts +295 -0
- package/src/types.ts +6 -6
- package/src/utils.tsx +32 -98
- package/lib/module/SkiaVexflowContext.js +0 -285
- package/lib/module/SkiaVexflowContext.js.map +0 -1
- package/lib/module/VexflowCanvas.js +0 -101
- package/lib/module/VexflowCanvas.js.map +0 -1
- package/lib/module/colorUtils.js +0 -34
- package/lib/module/colorUtils.js.map +0 -1
- package/lib/module/colorUtils.test.js +0 -37
- package/lib/module/colorUtils.test.js.map +0 -1
- package/lib/module/constants.js +0 -30
- package/lib/module/constants.js.map +0 -1
- package/lib/module/index.js +0 -8
- package/lib/module/index.js.map +0 -1
- package/lib/typescript/src/SkiaVexflowContext.d.ts +0 -101
- package/lib/typescript/src/SkiaVexflowContext.d.ts.map +0 -1
- package/lib/typescript/src/VexflowCanvas.d.ts +0 -15
- package/lib/typescript/src/VexflowCanvas.d.ts.map +0 -1
- package/lib/typescript/src/colorUtils.d.ts +0 -2
- package/lib/typescript/src/colorUtils.d.ts.map +0 -1
- package/lib/typescript/src/colorUtils.test.d.ts +0 -2
- package/lib/typescript/src/colorUtils.test.d.ts.map +0 -1
- package/lib/typescript/src/constants.d.ts +0 -21
- package/lib/typescript/src/constants.d.ts.map +0 -1
- package/lib/typescript/src/index.d.ts +0 -7
- package/lib/typescript/src/index.d.ts.map +0 -1
- package/src/SkiaVexflowContext.ts +0 -462
- package/src/VexflowCanvas.tsx +0 -140
- package/src/colorUtils.test.ts +0 -52
- package/src/colorUtils.ts +0 -55
- package/src/constants.tsx +0 -34
- package/src/index.ts +0 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["state/index.ts"],"mappings":";;AAAA,cAAc,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["state/types.ts"],"mappings":"","ignoreList":[]}
|
package/lib/module/types.js
CHANGED
package/lib/module/types.js.map
CHANGED
|
@@ -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":[]}
|
package/lib/module/utils.js
CHANGED
|
@@ -1,79 +1,44 @@
|
|
|
1
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
package/lib/module/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["utils.tsx"],"mappings":"AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;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 @@
|
|
|
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 @@
|
|
|
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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AKrC,UAAU;IAKV,YAAY,CAAC,aAAa,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IAK1D,aAAa;IAKb,GAAG,CAAC,MAAM,EAAE,OAAO;IAKnB,WAAW,CAAC,KAAK,EAAE,MAAM;;;;;;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":"AAA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7B,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 @@
|
|
|
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
|