@ugfoundation/swaralipi-js 0.10.1 → 0.11.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 (48) hide show
  1. package/README.md +1 -0
  2. package/dist/.sync-conflict-20260930-214520-JJOTM26.DS_Store +0 -0
  3. package/dist/{batch-5ZFEKXKS.js → batch-RAM2S4QO.js} +4 -4
  4. package/dist/{batch-5ZFEKXKS.js.map → batch-RAM2S4QO.js.map} +1 -1
  5. package/dist/{chunk-UPJYLXYX.js → chunk-3EWAKXLM.js} +5 -4
  6. package/dist/chunk-3EWAKXLM.js.map +1 -0
  7. package/dist/{chunk-VCLLSNAK.js → chunk-CF3JWIHP.js} +4 -4
  8. package/dist/chunk-CF3JWIHP.js.map +1 -0
  9. package/dist/{chunk-R6VNIBMG.js → chunk-LRIAUFKF.js} +3 -3
  10. package/dist/{chunk-R6VNIBMG.js.map → chunk-LRIAUFKF.js.map} +1 -1
  11. package/dist/cli.cjs +3 -2
  12. package/dist/cli.cjs.map +1 -1
  13. package/dist/cli.js +2 -2
  14. package/dist/convert/index.cjs +3 -2
  15. package/dist/convert/index.cjs.map +1 -1
  16. package/dist/convert/index.d.cts +1 -1
  17. package/dist/convert/index.d.ts +1 -1
  18. package/dist/convert/index.js +2 -2
  19. package/dist/index.cjs +3 -2
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +2 -2
  22. package/dist/index.d.ts +2 -2
  23. package/dist/index.js +1 -1
  24. package/dist/{lay-J17-gS6O.d.cts → lay-CvZeVon3.d.cts} +1 -1
  25. package/dist/{lay-0LnKv1LL.d.ts → lay-DypMIIuf.d.ts} +1 -1
  26. package/dist/player/index.cjs +2 -2
  27. package/dist/player/index.cjs.map +1 -1
  28. package/dist/player/index.d.cts +5 -5
  29. package/dist/player/index.d.ts +5 -5
  30. package/dist/player/index.js +2 -2
  31. package/dist/{schedule-B1S53131.d.cts → schedule-C4sP7uFu.d.cts} +2 -2
  32. package/dist/{schedule-DtcYB-o4.d.ts → schedule-DjcqM6A4.d.ts} +2 -2
  33. package/dist/{schema-Cf_epUIC.d.cts → schema-DZag9qkF.d.cts} +8 -2
  34. package/dist/{schema-Cf_epUIC.d.ts → schema-DZag9qkF.d.ts} +8 -2
  35. package/dist/spec/index.cjs +3 -2
  36. package/dist/spec/index.cjs.map +1 -1
  37. package/dist/spec/index.d.cts +4 -4
  38. package/dist/spec/index.d.ts +4 -4
  39. package/dist/spec/index.js +1 -1
  40. package/dist/viewer/index.cjs +14 -18
  41. package/dist/viewer/index.cjs.map +1 -1
  42. package/dist/viewer/index.d.cts +3 -3
  43. package/dist/viewer/index.d.ts +3 -3
  44. package/dist/viewer/index.js +10 -15
  45. package/dist/viewer/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/chunk-UPJYLXYX.js.map +0 -1
  48. package/dist/chunk-VCLLSNAK.js.map +0 -1
@@ -1,6 +1,6 @@
1
- import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-Cf_epUIC.cjs';
2
- import { L as Lay } from '../lay-J17-gS6O.cjs';
3
- import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-B1S53131.cjs';
1
+ import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-DZag9qkF.cjs';
2
+ import { L as Lay } from '../lay-CvZeVon3.cjs';
3
+ import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-C4sP7uFu.cjs';
4
4
  import 'zod';
5
5
  import 'tone';
6
6
 
@@ -1,6 +1,6 @@
1
- import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-Cf_epUIC.js';
2
- import { L as Lay } from '../lay-0LnKv1LL.js';
3
- import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-DtcYB-o4.js';
1
+ import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-DZag9qkF.js';
2
+ import { L as Lay } from '../lay-DypMIIuf.js';
3
+ import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-DjcqM6A4.js';
4
4
  import 'zod';
5
5
  import 'tone';
6
6
 
@@ -1,4 +1,4 @@
1
- import { isArcRaw, glideTargets, buildSchedule, drumPattern } from '../chunk-VCLLSNAK.js';
1
+ import { isArcRaw, glideTargets, buildSchedule, drumPattern } from '../chunk-CF3JWIHP.js';
2
2
  import { hasKomal, isTaalFerta, sameTaal, TAALS, graceNotes } from '../chunk-SR7NFEGL.js';
3
3
 
4
4
  // src/viewer/glyphs.ts
@@ -230,8 +230,8 @@ function resolveArcs(cells) {
230
230
  const last = pitched[pitched.length - 1] ?? cell.notes.length - 1;
231
231
  let marks = "";
232
232
  cell.notes.forEach((note, j) => {
233
- if (note.meend === "start") openAt(i, j);
234
- else if (note.meend === "end") closeAt(i, j);
233
+ if (note.meend === "end" || note.meend === "both") closeAt(i, j);
234
+ if (note.meend === "start" || note.meend === "both") openAt(i, j);
235
235
  for (const b of note.below ?? []) if (isArcRaw(b.raw)) marks += b.raw;
236
236
  });
237
237
  const reopens = /[xX].*[wW]/.test(marks);
@@ -452,7 +452,7 @@ function renderAnnotation(notes, ctx) {
452
452
  `<span class="sw-beat${beat.sam ? " sw-sam" : ""}">${localizeDigits(beat.digits, ctx.lang)}</span>`
453
453
  );
454
454
  } else if (/^\|+$/.test(raw)) {
455
- parts.push(`<span class="sw-stop">${"<i></i>".repeat(raw.length)}</span>`);
455
+ parts.push(`<span class="sw-stop">${raw}</span>`);
456
456
  } else {
457
457
  parts.push(`<span class="sw-raw" title="${escapeHtml(raw)}">${escapeHtml(raw)}</span>`);
458
458
  }
@@ -718,7 +718,7 @@ ${FONT_FACES}
718
718
  .sw-cell::before { margin-left: calc(var(--sw-half-gap) * -1); }
719
719
  .sw-cell::after { margin-right: calc(var(--sw-half-gap) * -1); }
720
720
  .sw-cell > .sw-n { position: relative; }
721
- .sw-above { grid-row: 1; font-size: 0.62em; line-height: 1; justify-self: center; white-space: nowrap; }
721
+ .sw-above { grid-row: 1; font-size: 0.7em; line-height: 1; justify-self: center; white-space: nowrap; }
722
722
  .sw-below { grid-row: 3; font-size: 0.62em; line-height: 1; justify-self: center; white-space: nowrap; }
723
723
  .sw-lyr { grid-row: 4; }
724
724
 
@@ -792,9 +792,12 @@ ${FONT_FACES}
792
792
  font-size: 0.72em;
793
793
  opacity: 0.55;
794
794
  }
795
+ /* above the notes, raw is the notator's own mark (alt passages, \u2016): full ink */
796
+ .sw-above .sw-raw { font-size: 1em; opacity: 1; }
795
797
 
796
- /* ---- bars: dari (A) and danda (l/L) Swarabitan glyphs, all langs ---- */
797
- .sw-bar {
798
+ /* ---- bars: dari (A) and danda (l/L) Swarabitan glyphs, all langs;
799
+ * its | is the \u2016 \u0985\u09AC\u09B8\u09BE\u09A8 stop mark ---- */
800
+ .sw-bar, .sw-stop {
798
801
  font-family: Swarabitan, var(--sw-font, sans-serif);
799
802
  white-space: nowrap;
800
803
  }
@@ -858,14 +861,6 @@ ${FONT_FACES}
858
861
  background: currentColor;
859
862
  transform: rotate(14deg);
860
863
  }
861
- .sw-stop i {
862
- display: inline-block;
863
- width: 0.07em;
864
- height: 1em;
865
- margin: 0 0.07em;
866
- background: currentColor;
867
- vertical-align: text-bottom;
868
- }
869
864
 
870
865
  /* ---- player sync (P2.3) ---- */
871
866
  .sw-hl { background: var(--sw-hl, rgba(255, 196, 64, 0.45)); border-radius: 0.15em; }