vexflow-native 1.4.0 → 1.4.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/lib/module/base/FontManager.js +0 -0
- package/lib/module/base/FontManager.js.map +1 -1
- package/lib/module/base/VexflowRecordingIndex.js +13 -0
- package/lib/module/base/VexflowRecordingIndex.js.map +1 -0
- package/lib/module/base/VexflowRecordingReplay.js +58 -15
- package/lib/module/base/VexflowRecordingReplay.js.map +1 -1
- package/lib/module/base/index.js +2 -0
- package/lib/module/base/index.js.map +1 -1
- package/lib/module/renderer/ScoreRenderer/ScoreOverlayPicture.js +81 -0
- package/lib/module/renderer/ScoreRenderer/ScoreOverlayPicture.js.map +1 -0
- package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js +22 -151
- package/lib/module/renderer/ScoreRenderer/ScoreRenderer.js.map +1 -1
- package/lib/module/renderer/ScoreRenderer/index.js +2 -1
- package/lib/module/renderer/ScoreRenderer/index.js.map +1 -1
- package/lib/module/renderer/ScoreRenderer/utils.js +207 -0
- package/lib/module/renderer/ScoreRenderer/utils.js.map +1 -0
- package/lib/module/renderer/index.js +1 -0
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/useScoreRecording.js +9 -7
- package/lib/module/renderer/useScoreRecording.js.map +1 -1
- package/lib/module/shared/debug.js +24 -0
- package/lib/module/shared/debug.js.map +1 -0
- package/lib/typescript/src/base/FontManager.d.ts +3 -0
- package/lib/typescript/src/base/FontManager.d.ts.map +1 -1
- package/lib/typescript/src/base/VexflowRecordingIndex.d.ts +4 -0
- package/lib/typescript/src/base/VexflowRecordingIndex.d.ts.map +1 -0
- package/lib/typescript/src/base/VexflowRecordingReplay.d.ts +8 -1
- package/lib/typescript/src/base/VexflowRecordingReplay.d.ts.map +1 -1
- package/lib/typescript/src/base/index.d.ts +2 -0
- package/lib/typescript/src/base/index.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreOverlayPicture.d.ts +11 -0
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreOverlayPicture.d.ts.map +1 -0
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts +1 -17
- package/lib/typescript/src/renderer/ScoreRenderer/ScoreRenderer.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/index.d.ts +2 -1
- package/lib/typescript/src/renderer/ScoreRenderer/index.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts +34 -1
- package/lib/typescript/src/renderer/ScoreRenderer/types.d.ts.map +1 -1
- package/lib/typescript/src/renderer/ScoreRenderer/utils.d.ts +40 -0
- package/lib/typescript/src/renderer/ScoreRenderer/utils.d.ts.map +1 -0
- package/lib/typescript/src/renderer/index.d.ts +1 -0
- package/lib/typescript/src/renderer/index.d.ts.map +1 -1
- package/lib/typescript/src/renderer/useScoreRecording.d.ts +6 -0
- package/lib/typescript/src/renderer/useScoreRecording.d.ts.map +1 -1
- package/lib/typescript/src/shared/debug.d.ts +3 -0
- package/lib/typescript/src/shared/debug.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/base/FontManager.ts +0 -0
- package/src/base/VexflowRecordingIndex.ts +21 -0
- package/src/base/VexflowRecordingReplay.ts +103 -19
- package/src/base/index.ts +9 -0
- package/src/renderer/ScoreRenderer/ScoreOverlayPicture.tsx +118 -0
- package/src/renderer/ScoreRenderer/ScoreRenderer.tsx +43 -207
- package/src/renderer/ScoreRenderer/index.ts +2 -1
- package/src/renderer/ScoreRenderer/types.ts +47 -1
- package/src/renderer/ScoreRenderer/utils.ts +285 -0
- package/src/renderer/index.ts +5 -0
- package/src/renderer/useScoreRecording.ts +18 -9
- package/src/shared/debug.ts +27 -0
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Skia,
|
|
3
|
+
type SkPicture,
|
|
4
|
+
type SkTypefaceFontProvider,
|
|
5
|
+
type Transforms3d,
|
|
6
|
+
} from '@shopify/react-native-skia';
|
|
7
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
8
|
+
|
|
9
|
+
import FontManager from '../../base/FontManager';
|
|
10
|
+
import { renderVexflowRecordingCommands } from '../../base/VexflowRecordingReplay';
|
|
11
|
+
import { isVexflowNativeDebugEnabled } from '../../shared/debug';
|
|
12
|
+
import { insets, renderOptions, spacing } from '../constants';
|
|
13
|
+
import type {
|
|
14
|
+
RendererSize,
|
|
15
|
+
RendererType,
|
|
16
|
+
ScoreOptions,
|
|
17
|
+
ScoreRendererOptions,
|
|
18
|
+
Viewport,
|
|
19
|
+
} from '../types';
|
|
20
|
+
import { createVisibleViewport } from '../viewport';
|
|
21
|
+
import type {
|
|
22
|
+
CreateScorePictureParams,
|
|
23
|
+
OverlayDisposalState,
|
|
24
|
+
OverlayFontManagerSlot,
|
|
25
|
+
OverlayProfileState,
|
|
26
|
+
} from './types';
|
|
27
|
+
|
|
28
|
+
// The reanimated plugin rewrites 'worklet' function declarations into
|
|
29
|
+
// non-hoisted assignments, so nowMsWorklet must precede the worklets below
|
|
30
|
+
// that call it.
|
|
31
|
+
export function nowMsWorklet(): number {
|
|
32
|
+
'worklet';
|
|
33
|
+
|
|
34
|
+
return globalThis.performance?.now?.() ?? 0;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function nowMs(): number {
|
|
38
|
+
return globalThis.performance?.now?.() ?? Date.now();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function roundMs(value: number): number {
|
|
42
|
+
return Math.round(value * 10) / 10;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function withDefaultOptions(
|
|
46
|
+
options: ScoreRendererOptions
|
|
47
|
+
): ScoreOptions {
|
|
48
|
+
return {
|
|
49
|
+
insets: { ...insets, ...(options.insets || {}) },
|
|
50
|
+
spacing: { ...spacing, ...(options.spacing || {}) },
|
|
51
|
+
render: { ...renderOptions, ...(options.render || {}) },
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function createScorePicture({
|
|
56
|
+
contentSize,
|
|
57
|
+
defaultFont,
|
|
58
|
+
fontManager,
|
|
59
|
+
recordedCommands,
|
|
60
|
+
replayFontManager,
|
|
61
|
+
styleOverrides,
|
|
62
|
+
}: CreateScorePictureParams) {
|
|
63
|
+
try {
|
|
64
|
+
const start = nowMs();
|
|
65
|
+
const picture = createScorePictureWorklet({
|
|
66
|
+
contentSize,
|
|
67
|
+
defaultFont,
|
|
68
|
+
fontManager,
|
|
69
|
+
recordedCommands,
|
|
70
|
+
replayFontManager,
|
|
71
|
+
styleOverrides,
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
logScorePictureProfile({
|
|
75
|
+
commandCount: recordedCommands.length,
|
|
76
|
+
contentSize,
|
|
77
|
+
durationMs: nowMs() - start,
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return picture;
|
|
81
|
+
} catch (error) {
|
|
82
|
+
console.error('ScoreRenderer picture render failed', error);
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function createScorePictureWorklet({
|
|
88
|
+
contentSize,
|
|
89
|
+
defaultFont,
|
|
90
|
+
fontManager,
|
|
91
|
+
recordedCommands,
|
|
92
|
+
replayFontManager,
|
|
93
|
+
styleOverrides,
|
|
94
|
+
}: CreateScorePictureParams): SkPicture {
|
|
95
|
+
'worklet';
|
|
96
|
+
|
|
97
|
+
const recorder = Skia.PictureRecorder();
|
|
98
|
+
const canvas = recorder.beginRecording(
|
|
99
|
+
Skia.XYWHRect(0, 0, contentSize.width, contentSize.height)
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
renderVexflowRecordingCommands(
|
|
103
|
+
canvas,
|
|
104
|
+
recordedCommands,
|
|
105
|
+
fontManager,
|
|
106
|
+
defaultFont,
|
|
107
|
+
styleOverrides,
|
|
108
|
+
replayFontManager
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
return recorder.finishRecordingAsPicture();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Maps the content-space picture into the view. Skia applies the transform
|
|
116
|
+
* array right-to-left, so the trailing scale entry runs first and the
|
|
117
|
+
* translate entries then shift by the view-space scroll offset; `contentSize`
|
|
118
|
+
* must be the view-space content size.
|
|
119
|
+
*/
|
|
120
|
+
export function createPictureTransform(
|
|
121
|
+
scrollOffset: number,
|
|
122
|
+
rendererType: RendererType,
|
|
123
|
+
viewport: Viewport,
|
|
124
|
+
contentSize: RendererSize,
|
|
125
|
+
scale: number = 1
|
|
126
|
+
): Transforms3d {
|
|
127
|
+
'worklet';
|
|
128
|
+
|
|
129
|
+
const visibleViewport = createVisibleViewport(
|
|
130
|
+
scrollOffset,
|
|
131
|
+
rendererType,
|
|
132
|
+
viewport,
|
|
133
|
+
contentSize
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
const transform: Transforms3d = [
|
|
137
|
+
{
|
|
138
|
+
translateX: visibleViewport.x === 0 ? 0 : -visibleViewport.x,
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
translateY: visibleViewport.y === 0 ? 0 : -visibleViewport.y,
|
|
142
|
+
},
|
|
143
|
+
];
|
|
144
|
+
|
|
145
|
+
if (scale !== 1) {
|
|
146
|
+
transform.push({ scale });
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return transform;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Runtime-local lazy FontManager: worklets cannot copy a class instance into
|
|
154
|
+
* a closure, so each runtime constructs its own on first use and keeps it in
|
|
155
|
+
* the slot (slot contents never cross runtimes; only the initial `null` is
|
|
156
|
+
* serialized).
|
|
157
|
+
*/
|
|
158
|
+
export function getOverlayFontManager(
|
|
159
|
+
slot: SharedValue<OverlayFontManagerSlot>,
|
|
160
|
+
fontProvider: SkTypefaceFontProvider,
|
|
161
|
+
defaultFont: string
|
|
162
|
+
): FontManager {
|
|
163
|
+
'worklet';
|
|
164
|
+
|
|
165
|
+
const state = slot.value;
|
|
166
|
+
|
|
167
|
+
return (state.manager ??= new FontManager(fontProvider, defaultFont));
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
let emptyOverlayPicture: SkPicture | null = null;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Shared blank picture returned while no override matches. One per app,
|
|
174
|
+
* never disposed — PictureProps.picture is non-nullable and declarative Skia
|
|
175
|
+
* can't unmount from the UI thread, so an "empty" frame needs a real picture.
|
|
176
|
+
*/
|
|
177
|
+
export function getEmptyOverlayPicture(): SkPicture {
|
|
178
|
+
if (emptyOverlayPicture == null) {
|
|
179
|
+
const recorder = Skia.PictureRecorder();
|
|
180
|
+
recorder.beginRecording(Skia.XYWHRect(0, 0, 1, 1));
|
|
181
|
+
emptyOverlayPicture = recorder.finishRecordingAsPicture();
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return emptyOverlayPicture;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Two-generation deferred disposal: the retiring picture may still be
|
|
189
|
+
* referenced by the committed Picture node or a frame in flight, so only
|
|
190
|
+
* pictures two supersessions old are disposed. The shared blank picture never
|
|
191
|
+
* enters the ring (`next === null` marks an empty frame).
|
|
192
|
+
*/
|
|
193
|
+
export function retireOverlayPicture(
|
|
194
|
+
disposal: SharedValue<OverlayDisposalState>,
|
|
195
|
+
next: SkPicture | null
|
|
196
|
+
) {
|
|
197
|
+
'worklet';
|
|
198
|
+
|
|
199
|
+
if (typeof _WORKLET === 'undefined' || !_WORKLET) {
|
|
200
|
+
// The mapper's seed run happens on JS against a copy of the state; writes
|
|
201
|
+
// here would never be seen by the UI runtime, so skip tracking entirely
|
|
202
|
+
// (leaks at most one picture per mapper re-creation).
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const state = disposal.value;
|
|
207
|
+
|
|
208
|
+
if (state.prev != null) {
|
|
209
|
+
state.pending.push(state.prev);
|
|
210
|
+
|
|
211
|
+
while (state.pending.length > 2) {
|
|
212
|
+
state.pending.shift()?.dispose();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
state.prev = next;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export function disposeOverlayPictures(
|
|
220
|
+
disposal: SharedValue<OverlayDisposalState>
|
|
221
|
+
) {
|
|
222
|
+
'worklet';
|
|
223
|
+
|
|
224
|
+
const state = disposal.value;
|
|
225
|
+
|
|
226
|
+
for (const pending of state.pending) {
|
|
227
|
+
pending.dispose();
|
|
228
|
+
}
|
|
229
|
+
state.pending.length = 0;
|
|
230
|
+
|
|
231
|
+
state.prev?.dispose();
|
|
232
|
+
state.prev = null;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/** Throttled (≤1/s) UI-thread record timing; debug flag only. */
|
|
236
|
+
export function logOverlayProfile(
|
|
237
|
+
profile: SharedValue<OverlayProfileState>,
|
|
238
|
+
commandCount: number,
|
|
239
|
+
durationMs: number
|
|
240
|
+
) {
|
|
241
|
+
'worklet';
|
|
242
|
+
|
|
243
|
+
const stats = profile.value;
|
|
244
|
+
stats.count += 1;
|
|
245
|
+
|
|
246
|
+
if (durationMs > stats.maxMs) {
|
|
247
|
+
stats.maxMs = durationMs;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const now = nowMsWorklet();
|
|
251
|
+
|
|
252
|
+
if (now - stats.windowStartMs < 1000) {
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
console.info('[ScoreRenderer] overlay profile', {
|
|
257
|
+
commandCount,
|
|
258
|
+
maxMs: Math.round(stats.maxMs * 10) / 10,
|
|
259
|
+
count: stats.count,
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
stats.windowStartMs = now;
|
|
263
|
+
stats.maxMs = 0;
|
|
264
|
+
stats.count = 0;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function logScorePictureProfile({
|
|
268
|
+
commandCount,
|
|
269
|
+
contentSize,
|
|
270
|
+
durationMs,
|
|
271
|
+
}: {
|
|
272
|
+
commandCount: number;
|
|
273
|
+
contentSize: RendererSize;
|
|
274
|
+
durationMs: number;
|
|
275
|
+
}) {
|
|
276
|
+
if (!isVexflowNativeDebugEnabled()) {
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
console.info('[ScoreRenderer] picture profile', {
|
|
281
|
+
contentSize,
|
|
282
|
+
commandCount,
|
|
283
|
+
durationMs: roundMs(durationMs),
|
|
284
|
+
});
|
|
285
|
+
}
|
package/src/renderer/index.ts
CHANGED
|
@@ -3,7 +3,12 @@ import type { SkTypefaceFontProvider } from '@shopify/react-native-skia';
|
|
|
3
3
|
|
|
4
4
|
import type { VexflowRecordingCommand } from '../base';
|
|
5
5
|
import VexflowRecordingContext from '../base/VexflowRecordingContext';
|
|
6
|
+
import {
|
|
7
|
+
buildVexflowGroupIndex,
|
|
8
|
+
type VexflowRecordingGroupIndex,
|
|
9
|
+
} from '../base/VexflowRecordingIndex';
|
|
6
10
|
import type { Score } from '../state';
|
|
11
|
+
import { isVexflowNativeDebugEnabled } from '../shared/debug';
|
|
7
12
|
import { layoutScore, type ScoreLayoutPlan } from './layout';
|
|
8
13
|
import { measureScore } from './measure';
|
|
9
14
|
import { renderScore } from './render';
|
|
@@ -23,6 +28,11 @@ import type {
|
|
|
23
28
|
export interface ScoreRecording {
|
|
24
29
|
/** Recorded draw commands, content-space coordinates. */
|
|
25
30
|
commands: readonly VexflowRecordingCommand[];
|
|
31
|
+
/**
|
|
32
|
+
* `commands` bucketed by `groupId` so a style-override replay can redraw
|
|
33
|
+
* just the overridden items instead of the whole recording.
|
|
34
|
+
*/
|
|
35
|
+
groupIndex: VexflowRecordingGroupIndex;
|
|
26
36
|
/**
|
|
27
37
|
* Layout plan in content space; multiply its `contentSize` by the render
|
|
28
38
|
* scale for the view-space size that drives scrolling.
|
|
@@ -55,6 +65,7 @@ export function useScoreRecording({
|
|
|
55
65
|
if (!enabled) {
|
|
56
66
|
return {
|
|
57
67
|
commands: [],
|
|
68
|
+
groupIndex: {},
|
|
58
69
|
layoutPlan: createEmptyLayoutPlan(rendererType, viewport),
|
|
59
70
|
itemsLayout: createEmptyItemsLayout(viewport),
|
|
60
71
|
};
|
|
@@ -93,10 +104,12 @@ export function useScoreRecording({
|
|
|
93
104
|
|
|
94
105
|
const finishStart = nowMs();
|
|
95
106
|
const commands = ctx.finish();
|
|
107
|
+
const groupIndex = buildVexflowGroupIndex(commands);
|
|
96
108
|
const finishMs = nowMs() - finishStart;
|
|
97
109
|
|
|
98
110
|
logScoreRecordingProfile({
|
|
99
111
|
commandCount: commands.length,
|
|
112
|
+
groupCount: Object.keys(groupIndex).length,
|
|
100
113
|
contentSize: layoutPlan.contentSize,
|
|
101
114
|
finishMs,
|
|
102
115
|
layoutMs,
|
|
@@ -111,6 +124,7 @@ export function useScoreRecording({
|
|
|
111
124
|
|
|
112
125
|
return {
|
|
113
126
|
commands,
|
|
127
|
+
groupIndex,
|
|
114
128
|
layoutPlan,
|
|
115
129
|
itemsLayout,
|
|
116
130
|
};
|
|
@@ -155,6 +169,7 @@ function createEmptyLayoutPlan(
|
|
|
155
169
|
|
|
156
170
|
function logScoreRecordingProfile({
|
|
157
171
|
commandCount,
|
|
172
|
+
groupCount,
|
|
158
173
|
contentSize,
|
|
159
174
|
finishMs,
|
|
160
175
|
layoutMs,
|
|
@@ -167,6 +182,7 @@ function logScoreRecordingProfile({
|
|
|
167
182
|
viewport,
|
|
168
183
|
}: {
|
|
169
184
|
commandCount: number;
|
|
185
|
+
groupCount: number;
|
|
170
186
|
contentSize: { height: number; width: number };
|
|
171
187
|
finishMs: number;
|
|
172
188
|
layoutMs: number;
|
|
@@ -178,7 +194,7 @@ function logScoreRecordingProfile({
|
|
|
178
194
|
systemCount: number;
|
|
179
195
|
viewport: RendererRect;
|
|
180
196
|
}) {
|
|
181
|
-
if (!
|
|
197
|
+
if (!isVexflowNativeDebugEnabled()) {
|
|
182
198
|
return;
|
|
183
199
|
}
|
|
184
200
|
|
|
@@ -190,6 +206,7 @@ function logScoreRecordingProfile({
|
|
|
190
206
|
measureCount,
|
|
191
207
|
systemCount,
|
|
192
208
|
commandCount,
|
|
209
|
+
groupCount,
|
|
193
210
|
measureMs: roundMs(measureMs),
|
|
194
211
|
layoutMs: roundMs(layoutMs),
|
|
195
212
|
renderMs: roundMs(renderMs),
|
|
@@ -205,11 +222,3 @@ function nowMs(): number {
|
|
|
205
222
|
function roundMs(value: number): number {
|
|
206
223
|
return Math.round(value * 10) / 10;
|
|
207
224
|
}
|
|
208
|
-
|
|
209
|
-
function isDevBuild(): boolean {
|
|
210
|
-
if (typeof process !== 'undefined' && process.env?.NODE_ENV === 'test') {
|
|
211
|
-
return false;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
return typeof __DEV__ === 'undefined' ? false : __DEV__;
|
|
215
|
-
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runtime switch for the library's internal diagnostics (recording/replay
|
|
3
|
+
* profiling logs). Off by default so consumer dev builds stay quiet; any app
|
|
4
|
+
* (the example app included) can toggle it at runtime:
|
|
5
|
+
*
|
|
6
|
+
* import { setVexflowNativeDebugEnabled } from 'vexflow-native';
|
|
7
|
+
* setVexflowNativeDebugEnabled(true);
|
|
8
|
+
*
|
|
9
|
+
* `globalThis.VEXFLOW_NATIVE_DEBUG = true` set before the first log acts as
|
|
10
|
+
* the initial value until the setter is called.
|
|
11
|
+
*/
|
|
12
|
+
let debugEnabled: boolean | null = null;
|
|
13
|
+
|
|
14
|
+
export function setVexflowNativeDebugEnabled(enabled: boolean): void {
|
|
15
|
+
debugEnabled = enabled;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function isVexflowNativeDebugEnabled(): boolean {
|
|
19
|
+
if (debugEnabled !== null) {
|
|
20
|
+
return debugEnabled;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
(globalThis as { VEXFLOW_NATIVE_DEBUG?: unknown }).VEXFLOW_NATIVE_DEBUG ===
|
|
25
|
+
true
|
|
26
|
+
);
|
|
27
|
+
}
|