vexflow-native 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -2
- package/lib/module/base/FontManager.js +3 -5
- package/lib/module/base/FontManager.js.map +1 -1
- package/lib/module/base/VexflowCanvas.js +1 -1
- package/lib/module/base/VexflowCanvas.js.map +1 -1
- package/lib/module/base/VexflowRecordingContext.js.map +1 -1
- package/lib/module/base/VexflowRecordingReplay.js +1 -1
- package/lib/module/base/VexflowRecordingReplay.js.map +1 -1
- package/lib/module/renderer/ScoreRenderer/ScoreOverlayPicture.js +4 -3
- package/lib/module/renderer/ScoreRenderer/ScoreOverlayPicture.js.map +1 -1
- package/lib/module/renderer/ScoreRenderer/ScorePlayhead.js +1 -1
- package/lib/module/renderer/ScoreRenderer/ScorePlayhead.js.map +1 -1
- package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js +1 -1
- package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js.map +1 -1
- package/lib/module/renderer/ScoreRenderer/utils.js +1 -1
- package/lib/module/renderer/ScoreRenderer/utils.js.map +1 -1
- package/lib/typescript/src/base/FontManager.d.ts +2 -2
- package/lib/typescript/src/base/FontManager.d.ts.map +1 -1
- package/lib/typescript/src/base/VexflowRecordingContext.d.ts +1 -1
- package/lib/typescript/src/base/VexflowRecordingContext.d.ts.map +1 -1
- package/lib/typescript/src/base/VexflowRecordingReplay.d.ts +1 -1
- package/lib/typescript/src/base/VexflowRecordingReplay.d.ts.map +1 -1
- package/lib/typescript/src/base/types.d.ts +1 -1
- package/lib/typescript/src/base/types.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreOverlayPicture.d.ts +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreOverlayPicture.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/ScorePlayhead.d.ts +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/ScorePlayhead.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/utils.d.ts +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/utils.d.ts.map +1 -1
- package/lib/typescript/src/renderer/types.d.ts +1 -1
- package/lib/typescript/src/renderer/types.d.ts.map +1 -1
- package/lib/typescript/src/renderer/useScoreRecording.d.ts +1 -1
- package/lib/typescript/src/renderer/useScoreRecording.d.ts.map +1 -1
- package/package.json +20 -16
- package/src/base/FontManager.ts +4 -11
- package/src/base/TextMeasureContext.ts +1 -1
- package/src/base/VexflowCanvas.tsx +1 -1
- package/src/base/VexflowRecordingContext.ts +1 -4
- package/src/base/VexflowRecordingReplay.ts +1 -1
- package/src/base/types.ts +1 -1
- package/src/renderer/ScoreRenderer/ScoreOverlayPicture.tsx +4 -7
- package/src/renderer/ScoreRenderer/ScorePlayhead.tsx +1 -1
- package/src/renderer/ScoreRenderer/ScoreRenderer.tsx +1 -7
- package/src/renderer/ScoreRenderer/types.ts +1 -4
- package/src/renderer/ScoreRenderer/utils.ts +1 -1
- package/src/renderer/types.ts +1 -1
- package/src/renderer/useScoreRecording.ts +1 -1
- package/lib/module/musicxml/testfiles/lg-8102429.xml +0 -79620
- package/src/musicxml/testfiles/lg-8102429.xml +0 -79620
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SkTypefaceFontProvider } from '
|
|
1
|
+
import type { SkTypefaceFontProvider } from 'react-native-skia';
|
|
2
2
|
import type { SharedValue } from 'react-native-reanimated';
|
|
3
3
|
import type { RenderContext, StaveNote } from 'vexflow';
|
|
4
4
|
import type { VexflowStyleOverride } from '../base';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/renderer/types.ts"],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,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa,EAAE,YAAY;CAAG;AAEpE,MAAM,WAAW,eAAgB,SAAQ,YAAY;CAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SkTypefaceFontProvider } from '
|
|
1
|
+
import type { SkTypefaceFontProvider } from 'react-native-skia';
|
|
2
2
|
import type { VexflowRecordingCommand } from '../base';
|
|
3
3
|
import { type VexflowRecordingGroupIndex } from '../base/VexflowRecordingIndex';
|
|
4
4
|
import type { Score } from '../state';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScoreRecording.d.ts","sourceRoot":"","sources":["../../../../src/renderer/useScoreRecording.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useScoreRecording.d.ts","sourceRoot":"","sources":["../../../../src/renderer/useScoreRecording.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAQ7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,QAAQ,EAAE,SAAS,uBAAuB,EAAE,CAAC;IAC7C;;;OAGG;IACH,UAAU,EAAE,0BAA0B,CAAC;IACvC;;;OAGG;IACH,UAAU,EAAE,eAAe,CAAC;IAC5B,yDAAyD;IACzD,WAAW,EAAE,gBAAgB,CAAC;CAC/B;AAED,wBAAgB,iBAAiB,CAAC,EAChC,YAAY,EACZ,WAAW,EACX,OAAc,EACd,WAAW,EACX,WAAW,EACX,UAAU,EACV,OAAO,EACP,YAAY,EACZ,KAAK,EACL,QAAQ,GACT,EAAE,cAAc,GAAG;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,sBAAsB,CAAC;IACpC,WAAW,EAAE,wBAAwB,CAAC;IACtC,OAAO,EAAE,YAAY,CAAC;IACtB,YAAY,EAAE,YAAY,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;CACxB,GAAG,cAAc,CAmFjB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vexflow-native",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "React
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "React Native backend for rendering music notation using react-native-skia",
|
|
5
5
|
"main": "./lib/module/base/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/base/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
"@eslint/compat": "^1.3.2",
|
|
83
83
|
"@eslint/eslintrc": "^3.3.1",
|
|
84
84
|
"@eslint/js": "^9.35.0",
|
|
85
|
-
"@react-native/babel-preset": "0.
|
|
86
|
-
"@react-native/eslint-config": "0.
|
|
85
|
+
"@react-native/babel-preset": "0.86.3",
|
|
86
|
+
"@react-native/eslint-config": "0.86.3",
|
|
87
|
+
"@react-native/jest-preset": "0.86.3",
|
|
87
88
|
"@release-it/conventional-changelog": "^10.0.1",
|
|
88
|
-
"@shopify/react-native-skia": "2.6.2",
|
|
89
89
|
"@types/jest": "^29.5.14",
|
|
90
|
-
"@types/react": "
|
|
90
|
+
"@types/react": "~19.2.2",
|
|
91
91
|
"commitlint": "^19.8.1",
|
|
92
92
|
"del-cli": "^6.0.0",
|
|
93
93
|
"eslint": "^9.35.0",
|
|
@@ -96,12 +96,13 @@
|
|
|
96
96
|
"jest": "^29.7.0",
|
|
97
97
|
"lefthook": "^2.0.3",
|
|
98
98
|
"prettier": "^2.8.8",
|
|
99
|
-
"react": "19.
|
|
100
|
-
"react-native": "0.
|
|
99
|
+
"react": "19.2.3",
|
|
100
|
+
"react-native": "0.86.3",
|
|
101
101
|
"react-native-builder-bob": "^0.40.18",
|
|
102
|
-
"react-native-gesture-handler": "
|
|
103
|
-
"react-native-reanimated": "
|
|
104
|
-
"react-native-
|
|
102
|
+
"react-native-gesture-handler": "~2.32.0",
|
|
103
|
+
"react-native-reanimated": "4.5.1",
|
|
104
|
+
"react-native-skia": "3.0.3",
|
|
105
|
+
"react-native-worklets": "0.10.1",
|
|
105
106
|
"release-it": "^19.0.4",
|
|
106
107
|
"turbo": "^2.5.6",
|
|
107
108
|
"typedoc": "0.28.20",
|
|
@@ -109,12 +110,12 @@
|
|
|
109
110
|
"vexflow": "^5.0.0"
|
|
110
111
|
},
|
|
111
112
|
"peerDependencies": {
|
|
112
|
-
"@shopify/react-native-skia": "*",
|
|
113
113
|
"react": "*",
|
|
114
114
|
"react-native": "*",
|
|
115
115
|
"react-native-gesture-handler": "*",
|
|
116
|
-
"react-native-reanimated": "
|
|
117
|
-
"react-native-
|
|
116
|
+
"react-native-reanimated": ">=4.0.0",
|
|
117
|
+
"react-native-skia": ">=3.0.0",
|
|
118
|
+
"react-native-worklets": ">=0.7.0",
|
|
118
119
|
"vexflow": "*"
|
|
119
120
|
},
|
|
120
121
|
"workspaces": [
|
|
@@ -147,17 +148,20 @@
|
|
|
147
148
|
"useTabs": false
|
|
148
149
|
},
|
|
149
150
|
"jest": {
|
|
150
|
-
"preset": "react-native",
|
|
151
|
+
"preset": "@react-native/jest-preset",
|
|
151
152
|
"testMatch": [
|
|
152
153
|
"**/__tests__/**/*.test.[jt]s?(x)"
|
|
153
154
|
],
|
|
155
|
+
"moduleNameMapper": {
|
|
156
|
+
"^react-native-skia$": "<rootDir>/src/__tests__/skiaMock"
|
|
157
|
+
},
|
|
154
158
|
"modulePathIgnorePatterns": [
|
|
155
159
|
"<rootDir>/example/node_modules",
|
|
156
160
|
"<rootDir>/lib/",
|
|
157
161
|
"<rootDir>/prev-implementation/"
|
|
158
162
|
],
|
|
159
163
|
"testPathIgnorePatterns": [
|
|
160
|
-
"<rootDir>/example/",
|
|
164
|
+
"<rootDir>/example/(?!src/benchmark/)",
|
|
161
165
|
"<rootDir>/prev-implementation/"
|
|
162
166
|
]
|
|
163
167
|
},
|
package/src/base/FontManager.ts
CHANGED
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import type { FontInfo } from 'vexflow';
|
|
2
|
-
import {
|
|
3
|
-
FontWeight,
|
|
4
|
-
FontSlant,
|
|
5
|
-
FontWidth,
|
|
6
|
-
Skia,
|
|
7
|
-
} from '@shopify/react-native-skia';
|
|
2
|
+
import { FontWeight, FontSlant, FontWidth, Skia } from 'react-native-skia';
|
|
8
3
|
import type {
|
|
9
4
|
SkFont,
|
|
10
5
|
SkFontMgr,
|
|
11
6
|
SkTypeface,
|
|
12
7
|
SkTypefaceFontProvider,
|
|
13
|
-
} from '
|
|
8
|
+
} from 'react-native-skia';
|
|
14
9
|
|
|
15
10
|
// import Logger, { LogCategory } from '../shared/Logger';
|
|
16
11
|
|
|
@@ -99,10 +94,8 @@ export default class FontManager {
|
|
|
99
94
|
private fontProvider: SkTypefaceFontProvider;
|
|
100
95
|
private defaultFontName: string;
|
|
101
96
|
private familiesLower: string[];
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
// Skia host objects, which are shareable across reanimated runtimes (the
|
|
105
|
-
// provider itself already crosses the same way).
|
|
97
|
+
// Instances never cross runtimes; each runtime builds its own, so these
|
|
98
|
+
// caches are runtime-local.
|
|
106
99
|
private familyMatchCache: Record<string, string> = {};
|
|
107
100
|
private skFontCache: Record<string, SkFont> = {};
|
|
108
101
|
private systemFontMgr: SkFontMgr | null | undefined;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type SkFont,
|
|
3
|
-
type SkTypefaceFontProvider,
|
|
4
|
-
} from '@shopify/react-native-skia';
|
|
1
|
+
import { type SkFont, type SkTypefaceFontProvider } from 'react-native-skia';
|
|
5
2
|
import { Platform } from 'react-native';
|
|
6
3
|
import { Element, RenderContext as VexflowRenderContext } from 'vexflow';
|
|
7
4
|
import type { FontInfo } from 'vexflow';
|
package/src/base/types.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { useEffect, useMemo } from 'react';
|
|
2
|
-
import { Picture, type SkPicture } from '
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
useDerivedValue,
|
|
6
|
-
useSharedValue,
|
|
7
|
-
} from 'react-native-reanimated';
|
|
2
|
+
import { Picture, type SkPicture } from 'react-native-skia';
|
|
3
|
+
import { useDerivedValue, useSharedValue } from 'react-native-reanimated';
|
|
4
|
+
import { scheduleOnUI } from 'react-native-worklets';
|
|
8
5
|
|
|
9
6
|
import type { VexflowRecordingCommand } from '../../base';
|
|
10
7
|
import { isVexflowNativeDebugEnabled } from '../../shared/debug';
|
|
@@ -110,7 +107,7 @@ export default function ScoreOverlayPicture({
|
|
|
110
107
|
|
|
111
108
|
useEffect(() => {
|
|
112
109
|
return () => {
|
|
113
|
-
|
|
110
|
+
scheduleOnUI(disposeOverlayPictures, disposal);
|
|
114
111
|
};
|
|
115
112
|
}, [disposal]);
|
|
116
113
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { RoundedRect, Skia, type SkRRect } from '
|
|
2
|
+
import { RoundedRect, Skia, type SkRRect } from 'react-native-skia';
|
|
3
3
|
import { useDerivedValue, type SharedValue } from 'react-native-reanimated';
|
|
4
4
|
|
|
5
5
|
import type {
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
Canvas,
|
|
5
|
-
Group,
|
|
6
|
-
Picture,
|
|
7
|
-
Skia,
|
|
8
|
-
useCanvasRef,
|
|
9
|
-
} from '@shopify/react-native-skia';
|
|
3
|
+
import { Canvas, Group, Picture, Skia, useCanvasRef } from 'react-native-skia';
|
|
10
4
|
import { StyleSheet, View, type LayoutChangeEvent } from 'react-native';
|
|
11
5
|
import { GestureDetector } from 'react-native-gesture-handler';
|
|
12
6
|
import { useDerivedValue } from 'react-native-reanimated';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
SkPicture,
|
|
3
|
-
SkTypefaceFontProvider,
|
|
4
|
-
} from '@shopify/react-native-skia';
|
|
1
|
+
import type { SkPicture, SkTypefaceFontProvider } from 'react-native-skia';
|
|
5
2
|
import type { GestureType } from 'react-native-gesture-handler';
|
|
6
3
|
import type { SharedValue } from 'react-native-reanimated';
|
|
7
4
|
|
package/src/renderer/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import type { SkTypefaceFontProvider } from '
|
|
2
|
+
import type { SkTypefaceFontProvider } from 'react-native-skia';
|
|
3
3
|
|
|
4
4
|
import type { VexflowRecordingCommand } from '../base';
|
|
5
5
|
import VexflowRecordingContext from '../base/VexflowRecordingContext';
|