@viritura/score-engine 0.1.1-next.19 → 0.1.1-next.21

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/dist/index.js CHANGED
@@ -1989,9 +1989,9 @@ function interpolateBeatAnchors(bounds, beat, endX) {
1989
1989
 
1990
1990
  // packages/score-engine/src/buildInfo.ts
1991
1991
  init_define_import_meta_env();
1992
- var PACKAGE_VERSION = "0.1.1-next.19", BUNDLE_WORKER_FILE = "score-engine.worker.js";
1992
+ var PACKAGE_VERSION = "0.1.1-next.21", BUNDLE_WORKER_FILE = "score-engine.worker.js";
1993
1993
  function buildCommit() {
1994
- return "b7a99e76b705e24e84f10f9c9ca94987ec52a1d1";
1994
+ return "598f70e938c9b71759ea78a64aa1e9f797d7d3c4";
1995
1995
  }
1996
1996
  function bundledAssetBase() {
1997
1997
  let moduleUrl = import.meta.url;
@@ -2381,6 +2381,18 @@ init_define_import_meta_env();
2381
2381
  // packages/format/src/mnx/parseGlobal.ts
2382
2382
  init_define_import_meta_env();
2383
2383
 
2384
+ // packages/format/src/mnx/globalCaesura.ts
2385
+ init_define_import_meta_env();
2386
+ function parseGlobalCaesura(raw) {
2387
+ if (raw === void 0) return {};
2388
+ let { shape, marks, ...attributes } = raw, caesura = { ...attributes };
2389
+ if (shape !== void 0 && (caesura.style = shape), marks !== void 0) {
2390
+ if (marks !== 1 && marks !== 2) throw new Error("Global caesura marks must be 1 or 2");
2391
+ caesura.marks = marks;
2392
+ }
2393
+ return { caesura };
2394
+ }
2395
+
2384
2396
  // packages/format/src/mnx/textContent.ts
2385
2397
  init_define_import_meta_env();
2386
2398
  var FONTS = /* @__PURE__ */ new Set(["serif", "sans-serif", "monospace"]), FONT_STYLES = /* @__PURE__ */ new Set(["normal", "italic", "oblique"]), DECORATIONS = /* @__PURE__ */ new Set(["underline", "overline", "strikethrough"]), ENCLOSURES = /* @__PURE__ */ new Set(["box", "circle"]), MAX_SIZE = 12, MIN_WEIGHT = 1, MAX_WEIGHT = 1e3;
@@ -14366,7 +14378,7 @@ function parseGlobalMeasures(arr) {
14366
14378
  }
14367
14379
  function parseGlobalMeasure(raw) {
14368
14380
  rejectRetiredNavigationExtensions(raw);
14369
- let measure = {};
14381
+ let measure = parseGlobalCaesura(raw.caesura);
14370
14382
  raw.id && (measure.id = raw.id), raw.number !== void 0 && (measure.number = raw.number), raw.time && (measure.time = parseTimeSignature(raw.time)), raw.key && (measure.key = parseKeySignature(raw.key)), raw.barline && (measure.barline = parseBarline(raw.barline)), raw.repeatStart !== void 0 && (measure.repeatStart = parseRepeatStart(raw.repeatStart)), raw.repeatEnd !== void 0 && (measure.repeatEnd = parseRepeatEnd(raw.repeatEnd)), raw.ending !== void 0 && (measure.ending = parseEnding(raw.ending)), raw.tempos && (measure.tempos = raw.tempos.map(parseTempo)), raw.segno && (measure.segno = parseSegno(raw.segno)), raw.fine && (measure.fine = parseFine(raw.fine)), raw.coda && (measure.coda = parseCoda(raw.coda)), raw.jump && (measure.jump = parseJump(raw.jump));
14371
14383
  let viritura = raw._x?.viritura;
14372
14384
  if (viritura) {
@@ -14781,7 +14793,7 @@ function parseNote(raw) {
14781
14793
  }
14782
14794
  raw.written && (note.written = {}, raw.written.diatonicDelta !== void 0 && (note.written.diatonicDelta = raw.written.diatonicDelta));
14783
14795
  let viritura = raw._x?.viritura;
14784
- return viritura?.notehead && (note.notehead = viritura.notehead), note;
14796
+ return viritura?.notehead && (note.notehead = viritura.notehead), raw.markings && (note.markings = raw.markings), note;
14785
14797
  }
14786
14798
  function parseKitNote(raw) {
14787
14799
  let kn = {