@ugfoundation/swaralipi-js 0.3.4 → 0.5.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 +8 -8
- package/dist/{batch-Y3HKAL3B.js → batch-UETOBPHT.js} +4 -4
- package/dist/{batch-Y3HKAL3B.js.map → batch-UETOBPHT.js.map} +1 -1
- package/dist/{chunk-AIGSKUD3.js → chunk-C6TRCMPL.js} +24 -5
- package/dist/chunk-C6TRCMPL.js.map +1 -0
- package/dist/{chunk-KPKD53NA.js → chunk-ID44OP2N.js} +3 -3
- package/dist/{chunk-KPKD53NA.js.map → chunk-ID44OP2N.js.map} +1 -1
- package/dist/{chunk-IG2CIUTP.js → chunk-UD2K4UIC.js} +3 -3
- package/dist/{chunk-IG2CIUTP.js.map → chunk-UD2K4UIC.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/player/index.cjs +58 -15
- package/dist/player/index.cjs.map +1 -1
- package/dist/player/index.d.cts +2 -2
- package/dist/player/index.d.ts +2 -2
- package/dist/player/index.js +39 -15
- package/dist/player/index.js.map +1 -1
- package/dist/{schedule-dXV5cUQI.d.ts → schedule-BaYIJf8y.d.ts} +14 -4
- package/dist/{schedule-C2WN7YOK.d.cts → schedule-bBvy18MO.d.cts} +14 -4
- 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 +27 -13
- package/dist/viewer/index.cjs.map +1 -1
- package/dist/viewer/index.d.cts +1 -1
- package/dist/viewer/index.d.ts +1 -1
- package/dist/viewer/index.js +14 -12
- package/dist/viewer/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-AIGSKUD3.js.map +0 -1
package/dist/viewer/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-D3wyNRqM.cjs';
|
|
2
|
-
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-
|
|
2
|
+
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-bBvy18MO.cjs';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import 'tone';
|
|
5
5
|
import '../taals-CjzBuZ35.cjs';
|
package/dist/viewer/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as Octave, a as SvaraLetter, N as Note, M as Meta, S as Swaralipi, T as Taal } from '../schema-D3wyNRqM.js';
|
|
2
|
-
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-
|
|
2
|
+
import { D as DrumVoice, S as Schedule, P as PlayEvent } from '../schedule-BaYIJf8y.js';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import 'tone';
|
|
5
5
|
import '../taals-CjzBuZ35.js';
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildSchedule, drumPattern } from '../chunk-
|
|
1
|
+
import { buildSchedule, drumPattern } from '../chunk-C6TRCMPL.js';
|
|
2
2
|
import { TAALS } from '../chunk-6ETPFHZ6.js';
|
|
3
3
|
|
|
4
4
|
// src/viewer/glyphs.ts
|
|
@@ -41,7 +41,9 @@ var MARKS = {
|
|
|
41
41
|
var LABELS = {
|
|
42
42
|
bn: { title: "\u09A8\u09BE\u09AE", taal: "\u09A4\u09BE\u09B2", raag: "\u09B0\u09BE\u0997", avartan: "\u0986\u09AC\u09B0\u09CD\u09A4\u09A8", notationBy: "\u09B8\u09CD\u09AC\u09B0\u09B2\u09BF\u09AA\u09BF\u0995\u09BE\u09B0" },
|
|
43
43
|
hi: { title: "\u0928\u093E\u092E", taal: "\u0924\u093E\u0932", raag: "\u0930\u093E\u0917", avartan: "\u0906\u0935\u0930\u094D\u0924\u0928", notationBy: "\u0938\u094D\u0935\u0930\u0932\u093F\u092A\u093F\u0915\u093E\u0930" },
|
|
44
|
-
|
|
44
|
+
// "Cycle", not "Avartan": the English sheet is read by people who do not know the word, and
|
|
45
|
+
// one taal cycle is exactly what the number counts.
|
|
46
|
+
en: { title: "Song", taal: "Taal", raag: "Raag", avartan: "Cycles", notationBy: "Notator" }
|
|
45
47
|
};
|
|
46
48
|
function composeCluster(letter, opts) {
|
|
47
49
|
const classes = [];
|
|
@@ -359,9 +361,9 @@ function renderToHtml(doc, opts = {}) {
|
|
|
359
361
|
|
|
360
362
|
// src/viewer/styles.ts
|
|
361
363
|
var NOTATION_FONT_URLS = {
|
|
362
|
-
Swarabitan: "https://
|
|
363
|
-
ome_bhatkhande_hindi: "https://
|
|
364
|
-
ome_bhatkhande_english: "https://
|
|
364
|
+
Swarabitan: "https://lipighor.pages.dev/swarabitan/Swarabitan.ttf",
|
|
365
|
+
ome_bhatkhande_hindi: "https://lipighor.pages.dev/ome-bhatkhande/OmeBhatkhandeHindi.ttf",
|
|
366
|
+
ome_bhatkhande_english: "https://lipighor.pages.dev/ome-bhatkhande/OmeBhatkhandeEnglish.ttf"
|
|
365
367
|
};
|
|
366
368
|
NOTATION_FONT_URLS.Swarabitan;
|
|
367
369
|
var FONT_FACES = Object.entries(NOTATION_FONT_URLS).map(
|
|
@@ -790,26 +792,26 @@ function escapeHtml2(s) {
|
|
|
790
792
|
}
|
|
791
793
|
function watermarkCss(text) {
|
|
792
794
|
if (!text) return "";
|
|
795
|
+
const span = 92;
|
|
796
|
+
const size = Math.min(18, span / (0.62 * text.length));
|
|
797
|
+
const len = Math.min(span, 0.62 * text.length * size);
|
|
798
|
+
const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid meet"><text x="50" y="50" dy=".35em" text-anchor="middle" font-family="sans-serif" font-weight="700" fill="rgba(0,0,0,0.07)" font-size="${size.toFixed(2)}" textLength="${len.toFixed(2)}" lengthAdjust="spacingAndGlyphs" transform="rotate(-35 50 50)">${escapeHtml2(text)}</text></svg>`;
|
|
793
799
|
return `
|
|
794
800
|
.sw-watermark {
|
|
795
801
|
position: fixed; inset: 0; z-index: 0; pointer-events: none;
|
|
796
|
-
|
|
797
|
-
overflow: hidden;
|
|
802
|
+
background: url("data:image/svg+xml,${encodeURIComponent(svg)}") center / contain no-repeat;
|
|
798
803
|
-webkit-print-color-adjust: exact; print-color-adjust: exact;
|
|
799
804
|
}
|
|
800
|
-
.sw-watermark span {
|
|
801
|
-
font-size: 11vw; font-weight: 700; letter-spacing: .08em;
|
|
802
|
-
color: rgba(0,0,0,0.07); transform: rotate(-35deg); white-space: nowrap;
|
|
803
|
-
}
|
|
804
805
|
body > .sw-sheet, body > .sw-footer { position: relative; z-index: 1; }
|
|
805
806
|
`;
|
|
806
807
|
}
|
|
807
808
|
function chrome(text, notator) {
|
|
808
|
-
const top = text ?
|
|
809
|
+
const top = text ? '<div class="sw-watermark" aria-hidden="true"></div>' : "";
|
|
809
810
|
const bottom = notator ? `<footer class="sw-footer">${escapeHtml2(notator)}</footer>` : "";
|
|
810
811
|
return { top, bottom };
|
|
811
812
|
}
|
|
812
813
|
function resolveNotator(doc, opts) {
|
|
814
|
+
if (opts.notator === "") return "";
|
|
813
815
|
return doc.meta.notationBy ?? opts.notator ?? DEFAULT_NOTATOR;
|
|
814
816
|
}
|
|
815
817
|
function pageHtml(lang, title, bodyHtml, opts, doc) {
|