@ugfoundation/swaralipi-js 0.7.5 → 0.7.7
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-DLPDVNFK.js → batch-6MCPHHKF.js} +5 -5
- package/dist/{batch-DLPDVNFK.js.map → batch-6MCPHHKF.js.map} +1 -1
- package/dist/{chunk-YAXYP7BR.js → chunk-ALN4SWMS.js} +3 -3
- package/dist/{chunk-YAXYP7BR.js.map → chunk-ALN4SWMS.js.map} +1 -1
- package/dist/{chunk-UF5OSJRP.js → chunk-QM4CXKW2.js} +11 -3
- package/dist/chunk-QM4CXKW2.js.map +1 -0
- package/dist/{chunk-ZAK3QRDN.js → chunk-QQC6WVLJ.js} +4 -4
- package/dist/{chunk-ZAK3QRDN.js.map → chunk-QQC6WVLJ.js.map} +1 -1
- package/dist/{chunk-2SAZWTTK.js → chunk-TKTQCUKD.js} +5 -5
- package/dist/chunk-TKTQCUKD.js.map +1 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +3 -3
- package/dist/convert/index.cjs +1 -1
- package/dist/convert/index.cjs.map +1 -1
- package/dist/convert/index.js +3 -3
- package/dist/index.cjs +11 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/player/index.cjs +41 -7
- package/dist/player/index.cjs.map +1 -1
- package/dist/player/index.d.cts +15 -1
- package/dist/player/index.d.ts +15 -1
- package/dist/player/index.js +34 -8
- package/dist/player/index.js.map +1 -1
- package/dist/spec/index.cjs +11 -1
- package/dist/spec/index.cjs.map +1 -1
- package/dist/spec/index.d.cts +18 -4
- package/dist/spec/index.d.ts +18 -4
- package/dist/spec/index.js +2 -2
- package/dist/viewer/index.cjs +21 -5
- package/dist/viewer/index.cjs.map +1 -1
- package/dist/viewer/index.d.cts +0 -27
- package/dist/viewer/index.d.ts +0 -27
- package/dist/viewer/index.js +3 -4
- package/dist/viewer/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2SAZWTTK.js.map +0 -1
- package/dist/chunk-UF5OSJRP.js.map +0 -1
package/dist/viewer/index.d.cts
CHANGED
|
@@ -4,33 +4,6 @@ import 'zod';
|
|
|
4
4
|
import 'tone';
|
|
5
5
|
import '../taals-CjzBuZ35.cjs';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Per-language notation encoding for the viewer.
|
|
9
|
-
*
|
|
10
|
-
* Every language renders its notation through a dedicated, purpose-built
|
|
11
|
-
* font whose glyphs ARE the akarmatrik/Bhatkhande marks — so composeCluster
|
|
12
|
-
* emits that font's ASCII encoding and the font does all the hard work
|
|
13
|
-
* (komal/tivra forms, octave reph/dots, matra). This is why the viewer no
|
|
14
|
-
* longer touches Unicode cluster composition at all: the old reph-over-
|
|
15
|
-
* vowel, hasanta-before-matra and dotted-circle hazards simply don't exist
|
|
16
|
-
* when the font supplies precomposed glyphs keyed by plain ASCII.
|
|
17
|
-
*
|
|
18
|
-
* - bn → NLTR's **Swarabitan** (the akarmatrik font this project decodes).
|
|
19
|
-
* Letters s r g m p q n = স র গ ম প ধ ন (q=ধ); komal v t d u = ঋ জ্ঞ দ ণ;
|
|
20
|
-
* tivra ma k = the authentic কড়ি-ম conjunct (ম-based — has NO Unicode
|
|
21
|
-
* form, which is what forced this whole approach); suffix f = taar reph,
|
|
22
|
-
* h = mandra hasanta; trailing a = the আ-কার matra carrier. See codec.ts.
|
|
23
|
-
* - hi/en → **Ome Bhatkhande** Hindi/English (SIL OFL 1.1, © Omenad —
|
|
24
|
-
* github.com/omenad/fonts). Same clean keymap for both: lowercase
|
|
25
|
-
* s r g m p d n = the seven shuddha swaras, uppercase R G M D N = komal
|
|
26
|
-
* Re/Ga, tivra Ma, komal Dha/Ni; octave suffix u/l = taar/mandra dot,
|
|
27
|
-
* U/L = ati (two dots). Bhatkhande has no আ-কার, so no matra is appended.
|
|
28
|
-
*
|
|
29
|
-
* The font is applied by CSS keyed on `.sw-sheet`'s `lang` (see styles.ts);
|
|
30
|
-
* composeCluster only chooses the ASCII. The single residual CSS mark is the
|
|
31
|
-
* bn ati-octave extra dot (Swarabitan's f/h are single reph/hasanta only).
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
7
|
/** Akarmatrik/Bhatkhande grid languages, rendered synchronously by renderToHtml. */
|
|
35
8
|
type GridLang = 'bn' | 'hi' | 'en';
|
|
36
9
|
/** All viewer languages. `staff` = Western staff notation (async, via abcjs). */
|
package/dist/viewer/index.d.ts
CHANGED
|
@@ -4,33 +4,6 @@ import 'zod';
|
|
|
4
4
|
import 'tone';
|
|
5
5
|
import '../taals-CjzBuZ35.js';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
* Per-language notation encoding for the viewer.
|
|
9
|
-
*
|
|
10
|
-
* Every language renders its notation through a dedicated, purpose-built
|
|
11
|
-
* font whose glyphs ARE the akarmatrik/Bhatkhande marks — so composeCluster
|
|
12
|
-
* emits that font's ASCII encoding and the font does all the hard work
|
|
13
|
-
* (komal/tivra forms, octave reph/dots, matra). This is why the viewer no
|
|
14
|
-
* longer touches Unicode cluster composition at all: the old reph-over-
|
|
15
|
-
* vowel, hasanta-before-matra and dotted-circle hazards simply don't exist
|
|
16
|
-
* when the font supplies precomposed glyphs keyed by plain ASCII.
|
|
17
|
-
*
|
|
18
|
-
* - bn → NLTR's **Swarabitan** (the akarmatrik font this project decodes).
|
|
19
|
-
* Letters s r g m p q n = স র গ ম প ধ ন (q=ধ); komal v t d u = ঋ জ্ঞ দ ণ;
|
|
20
|
-
* tivra ma k = the authentic কড়ি-ম conjunct (ম-based — has NO Unicode
|
|
21
|
-
* form, which is what forced this whole approach); suffix f = taar reph,
|
|
22
|
-
* h = mandra hasanta; trailing a = the আ-কার matra carrier. See codec.ts.
|
|
23
|
-
* - hi/en → **Ome Bhatkhande** Hindi/English (SIL OFL 1.1, © Omenad —
|
|
24
|
-
* github.com/omenad/fonts). Same clean keymap for both: lowercase
|
|
25
|
-
* s r g m p d n = the seven shuddha swaras, uppercase R G M D N = komal
|
|
26
|
-
* Re/Ga, tivra Ma, komal Dha/Ni; octave suffix u/l = taar/mandra dot,
|
|
27
|
-
* U/L = ati (two dots). Bhatkhande has no আ-কার, so no matra is appended.
|
|
28
|
-
*
|
|
29
|
-
* The font is applied by CSS keyed on `.sw-sheet`'s `lang` (see styles.ts);
|
|
30
|
-
* composeCluster only chooses the ASCII. The single residual CSS mark is the
|
|
31
|
-
* bn ati-octave extra dot (Swarabitan's f/h are single reph/hasanta only).
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
7
|
/** Akarmatrik/Bhatkhande grid languages, rendered synchronously by renderToHtml. */
|
|
35
8
|
type GridLang = 'bn' | 'hi' | 'en';
|
|
36
9
|
/** All viewer languages. `staff` = Western staff notation (async, via abcjs). */
|
package/dist/viewer/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isArcRaw, glideTargets, buildSchedule, drumPattern } from '../chunk-
|
|
2
|
-
import { TAALS, graceNotes } from '../chunk-
|
|
1
|
+
import { isArcRaw, glideTargets, buildSchedule, drumPattern } from '../chunk-TKTQCUKD.js';
|
|
2
|
+
import { hasKomal, TAALS, graceNotes } from '../chunk-QM4CXKW2.js';
|
|
3
3
|
|
|
4
4
|
// src/viewer/glyphs.ts
|
|
5
5
|
var SWARABITAN_SHUDDHA = {
|
|
@@ -27,7 +27,6 @@ var BHATKHANDE_OCTAVE = {
|
|
|
27
27
|
"ati-taar": "U",
|
|
28
28
|
"ati-mandra": "L"
|
|
29
29
|
};
|
|
30
|
-
var BHATKHANDE_HAS_KOMAL = /* @__PURE__ */ new Set(["r", "g", "d", "n"]);
|
|
31
30
|
var DIGITS = {
|
|
32
31
|
bn: "\u09E6\u09E7\u09E8\u09E9\u09EA\u09EB\u09EC\u09ED\u09EE\u09EF",
|
|
33
32
|
hi: "\u0966\u0967\u0968\u0969\u096A\u096B\u096C\u096D\u096E\u096F",
|
|
@@ -58,7 +57,7 @@ function composeCluster(letter, opts) {
|
|
|
58
57
|
}
|
|
59
58
|
let base = letter;
|
|
60
59
|
if (opts.tivra && letter === "m") base = "M";
|
|
61
|
-
else if (opts.komal &&
|
|
60
|
+
else if (opts.komal && hasKomal(letter)) base = base.toUpperCase();
|
|
62
61
|
return { text: base + BHATKHANDE_OCTAVE[opts.octave], classes };
|
|
63
62
|
}
|
|
64
63
|
function localizeDigits(s, lang) {
|