@ugfoundation/swaralipi-js 0.8.0 → 0.8.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/dist/{batch-NJMT3M5Z.js → batch-NDL6CW7Q.js} +4 -4
- package/dist/{batch-NJMT3M5Z.js.map → batch-NDL6CW7Q.js.map} +1 -1
- package/dist/{chunk-4HMHTXDE.js → chunk-LPCKL3AM.js} +3 -3
- package/dist/{chunk-4HMHTXDE.js.map → chunk-LPCKL3AM.js.map} +1 -1
- package/dist/{chunk-YFVAVICF.js → chunk-Z42M5JAA.js} +3 -3
- package/dist/{chunk-YFVAVICF.js.map → chunk-Z42M5JAA.js.map} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/convert/index.cjs +1 -1
- package/dist/convert/index.cjs.map +1 -1
- package/dist/convert/index.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/spec/index.cjs +1 -1
- package/dist/spec/index.cjs.map +1 -1
- package/dist/spec/index.d.cts +1 -1
- package/dist/spec/index.d.ts +1 -1
- package/dist/spec/index.js +1 -1
- package/dist/viewer/index.cjs +33 -12
- package/dist/viewer/index.cjs.map +1 -1
- package/dist/viewer/index.js +32 -11
- package/dist/viewer/index.js.map +1 -1
- package/package.json +1 -1
package/dist/viewer/index.js
CHANGED
|
@@ -414,16 +414,20 @@ function renderNote(note, kind, opts, ctx) {
|
|
|
414
414
|
}
|
|
415
415
|
function renderArc(arc, offset) {
|
|
416
416
|
const open = arc.line === true;
|
|
417
|
-
const
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
const
|
|
423
|
-
const
|
|
424
|
-
const
|
|
425
|
-
const
|
|
426
|
-
|
|
417
|
+
const openL = arc.openLeft || open;
|
|
418
|
+
const openR = arc.openRight || open;
|
|
419
|
+
const fill = '<i class="sw-arc-m"></i>';
|
|
420
|
+
const hookL = openL ? "" : '<i class="sw-arc-l">w</i>';
|
|
421
|
+
const hookR = openR ? "" : '<i class="sw-arc-r">x</i>';
|
|
422
|
+
const piece = (col, cls, inner) => `<span class="sw-arc${cls}" style="grid-column:${col}">${inner}</span>`;
|
|
423
|
+
const f = offset + arc.start + COL_BASE;
|
|
424
|
+
const t = offset + arc.end + COL_BASE;
|
|
425
|
+
const openCls = (openL ? " sw-arc--openl" : "") + (openR ? " sw-arc--openr" : "");
|
|
426
|
+
if (t === f) return piece(`${f}`, openCls, hookL + fill + hookR);
|
|
427
|
+
const head = piece(`${f}`, openL ? " sw-arc--openl" : " sw-arc--head", hookL + fill);
|
|
428
|
+
const tail = piece(`${t}`, openR ? " sw-arc--openr" : " sw-arc--tail", fill + hookR);
|
|
429
|
+
const mid = t > f + 1 ? piece(`${f + 1} / ${t}`, " sw-arc--mid", fill) : "";
|
|
430
|
+
return head + mid + tail;
|
|
427
431
|
}
|
|
428
432
|
function renderRow(row, partIdx, rowIdx, offset, ctx) {
|
|
429
433
|
const cells = groupRowIntoCells(row.notes);
|
|
@@ -734,9 +738,26 @@ ${FONT_FACES}
|
|
|
734
738
|
align-items: baseline;
|
|
735
739
|
line-height: 1;
|
|
736
740
|
font-family: Swarabitan, var(--sw-font, sans-serif);
|
|
737
|
-
|
|
741
|
+
/* The 0.9em sits on the children, not here: the end pieces below size
|
|
742
|
+
themselves off the block's own column-gap, which is in the block's em. */
|
|
738
743
|
}
|
|
744
|
+
.sw-arc > i, .sw-arc::before { font-size: 0.9em; }
|
|
739
745
|
.sw-arc-l, .sw-arc-r { flex: none; font-style: normal; }
|
|
746
|
+
/* Every piece needs the same baseline \u2014 the fill rides it, so a piece holding
|
|
747
|
+
only fill would otherwise drop to the bottom of the row. A zero-width copy
|
|
748
|
+
of the hook glyph is the strut (same font, same metrics). */
|
|
749
|
+
.sw-arc::before { content: 'w'; flex: none; width: 0; overflow: hidden; }
|
|
750
|
+
/* The ends hang from the two notes' CENTRES, as the print sets them, so the
|
|
751
|
+
arc is three grid items: each end piece takes half of its own column plus
|
|
752
|
+
the column-gap it has to bridge, and the negative margin on the same side
|
|
753
|
+
lets that bridge overhang the grid area instead of shifting the piece. */
|
|
754
|
+
.sw-arc--head, .sw-arc--tail {
|
|
755
|
+
--sw-arc-gap: calc(var(--sw-cell-gap, 0.4em) * var(--sw-tight, 1));
|
|
756
|
+
width: calc(50% + var(--sw-arc-gap));
|
|
757
|
+
}
|
|
758
|
+
.sw-arc--head { justify-self: end; margin-right: calc(var(--sw-arc-gap) * -1); }
|
|
759
|
+
.sw-arc--tail { justify-self: start; margin-left: calc(var(--sw-arc-gap) * -1);
|
|
760
|
+
justify-content: flex-end; }
|
|
740
761
|
/* The fill's geometry is measured off the font's own 'y' glyph: ink 0.11em
|
|
741
762
|
tall whose bottom sits 0.01em above the baseline. An empty inline-block
|
|
742
763
|
takes its bottom margin edge as its baseline, so -0.01em lifts the bar to
|