@ugfoundation/swaralipi-js 0.1.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.
Files changed (51) hide show
  1. package/LICENSE +347 -0
  2. package/README.md +257 -0
  3. package/dist/batch-NF2Q2CFS.js +47 -0
  4. package/dist/batch-NF2Q2CFS.js.map +1 -0
  5. package/dist/chunk-C6O7DYU5.js +115 -0
  6. package/dist/chunk-C6O7DYU5.js.map +1 -0
  7. package/dist/chunk-GWXI2HJA.js +14 -0
  8. package/dist/chunk-GWXI2HJA.js.map +1 -0
  9. package/dist/chunk-N3NNWAOW.js +593 -0
  10. package/dist/chunk-N3NNWAOW.js.map +1 -0
  11. package/dist/cli.cjs +913 -0
  12. package/dist/cli.cjs.map +1 -0
  13. package/dist/cli.d.cts +1 -0
  14. package/dist/cli.d.ts +1 -0
  15. package/dist/cli.js +91 -0
  16. package/dist/cli.js.map +1 -0
  17. package/dist/convert/index.cjs +720 -0
  18. package/dist/convert/index.cjs.map +1 -0
  19. package/dist/convert/index.d.cts +270 -0
  20. package/dist/convert/index.d.ts +270 -0
  21. package/dist/convert/index.js +5 -0
  22. package/dist/convert/index.js.map +1 -0
  23. package/dist/index.cjs +143 -0
  24. package/dist/index.cjs.map +1 -0
  25. package/dist/index.d.cts +4 -0
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.js +4 -0
  28. package/dist/index.js.map +1 -0
  29. package/dist/player/index.cjs +775 -0
  30. package/dist/player/index.cjs.map +1 -0
  31. package/dist/player/index.d.cts +285 -0
  32. package/dist/player/index.d.ts +285 -0
  33. package/dist/player/index.js +743 -0
  34. package/dist/player/index.js.map +1 -0
  35. package/dist/schema-gxhG45OK.d.cts +467 -0
  36. package/dist/schema-gxhG45OK.d.ts +467 -0
  37. package/dist/spec/index.cjs +143 -0
  38. package/dist/spec/index.cjs.map +1 -0
  39. package/dist/spec/index.d.cts +70 -0
  40. package/dist/spec/index.d.ts +70 -0
  41. package/dist/spec/index.js +4 -0
  42. package/dist/spec/index.js.map +1 -0
  43. package/dist/taals-DguYW0wf.d.cts +60 -0
  44. package/dist/taals-DguYW0wf.d.ts +60 -0
  45. package/dist/viewer/index.cjs +998 -0
  46. package/dist/viewer/index.cjs.map +1 -0
  47. package/dist/viewer/index.d.cts +285 -0
  48. package/dist/viewer/index.d.ts +285 -0
  49. package/dist/viewer/index.js +814 -0
  50. package/dist/viewer/index.js.map +1 -0
  51. package/package.json +93 -0
@@ -0,0 +1,70 @@
1
+ import * as zod from 'zod';
2
+ import { S as Swaralipi, N as Note } from '../schema-gxhG45OK.cjs';
3
+ export { B as Bar, b as Bracket, M as Meta, c as Microtone, O as Octave, P as Part, R as Row, d as Svara, a as SvaraLetter, T as Taal, e as barSchema, f as bracketSchema, m as metaSchema, g as microtoneSchema, n as noteSchema, o as octaveSchema, p as partSchema, r as rowSchema, s as svaraLetterSchema, h as svaraSchema, i as swaralipiSchema, t as taalSchema } from '../schema-gxhG45OK.cjs';
4
+ export { a as TAALS, T as TaalId } from '../taals-DguYW0wf.cjs';
5
+
6
+ /** Current spec version. Documents declare the version they target. */
7
+ declare const SPEC_VERSION = "0.1.0";
8
+
9
+ /** Parse + validate unknown data into a `Swaralipi`. Throws `ZodError` on failure. */
10
+ declare function parseSwaralipi(data: unknown): Swaralipi;
11
+ /** Non-throwing variant: returns Zod's `{ success, data | error }` result. */
12
+ declare function safeParseSwaralipi(data: unknown): zod.SafeParseReturnType<{
13
+ version: string;
14
+ meta: {
15
+ title: string;
16
+ songId?: string | undefined;
17
+ nltrId?: number | undefined;
18
+ taal?: {
19
+ id: string;
20
+ numBeats: number;
21
+ bhaags?: number[] | undefined;
22
+ sam?: number | undefined;
23
+ khaali?: number[] | undefined;
24
+ } | undefined;
25
+ taalName?: string | undefined;
26
+ tonic?: string | undefined;
27
+ bpm?: number | null | undefined;
28
+ raag?: string | undefined;
29
+ avartan?: number | undefined;
30
+ notationBy?: string | undefined;
31
+ source?: string | undefined;
32
+ };
33
+ parts: {
34
+ rows: {
35
+ notes: Note[];
36
+ label?: string | undefined;
37
+ }[];
38
+ name?: string | undefined;
39
+ }[];
40
+ }, {
41
+ version: string;
42
+ meta: {
43
+ title: string;
44
+ songId?: string | undefined;
45
+ nltrId?: number | undefined;
46
+ taal?: {
47
+ id: string;
48
+ numBeats: number;
49
+ bhaags?: number[] | undefined;
50
+ sam?: number | undefined;
51
+ khaali?: number[] | undefined;
52
+ } | undefined;
53
+ taalName?: string | undefined;
54
+ tonic?: string | undefined;
55
+ bpm?: number | null | undefined;
56
+ raag?: string | undefined;
57
+ avartan?: number | undefined;
58
+ notationBy?: string | undefined;
59
+ source?: string | undefined;
60
+ };
61
+ parts: {
62
+ rows: {
63
+ notes: Note[];
64
+ label?: string | undefined;
65
+ }[];
66
+ name?: string | undefined;
67
+ }[];
68
+ }>;
69
+
70
+ export { Note, SPEC_VERSION, Swaralipi, parseSwaralipi, safeParseSwaralipi };
@@ -0,0 +1,70 @@
1
+ import * as zod from 'zod';
2
+ import { S as Swaralipi, N as Note } from '../schema-gxhG45OK.js';
3
+ export { B as Bar, b as Bracket, M as Meta, c as Microtone, O as Octave, P as Part, R as Row, d as Svara, a as SvaraLetter, T as Taal, e as barSchema, f as bracketSchema, m as metaSchema, g as microtoneSchema, n as noteSchema, o as octaveSchema, p as partSchema, r as rowSchema, s as svaraLetterSchema, h as svaraSchema, i as swaralipiSchema, t as taalSchema } from '../schema-gxhG45OK.js';
4
+ export { a as TAALS, T as TaalId } from '../taals-DguYW0wf.js';
5
+
6
+ /** Current spec version. Documents declare the version they target. */
7
+ declare const SPEC_VERSION = "0.1.0";
8
+
9
+ /** Parse + validate unknown data into a `Swaralipi`. Throws `ZodError` on failure. */
10
+ declare function parseSwaralipi(data: unknown): Swaralipi;
11
+ /** Non-throwing variant: returns Zod's `{ success, data | error }` result. */
12
+ declare function safeParseSwaralipi(data: unknown): zod.SafeParseReturnType<{
13
+ version: string;
14
+ meta: {
15
+ title: string;
16
+ songId?: string | undefined;
17
+ nltrId?: number | undefined;
18
+ taal?: {
19
+ id: string;
20
+ numBeats: number;
21
+ bhaags?: number[] | undefined;
22
+ sam?: number | undefined;
23
+ khaali?: number[] | undefined;
24
+ } | undefined;
25
+ taalName?: string | undefined;
26
+ tonic?: string | undefined;
27
+ bpm?: number | null | undefined;
28
+ raag?: string | undefined;
29
+ avartan?: number | undefined;
30
+ notationBy?: string | undefined;
31
+ source?: string | undefined;
32
+ };
33
+ parts: {
34
+ rows: {
35
+ notes: Note[];
36
+ label?: string | undefined;
37
+ }[];
38
+ name?: string | undefined;
39
+ }[];
40
+ }, {
41
+ version: string;
42
+ meta: {
43
+ title: string;
44
+ songId?: string | undefined;
45
+ nltrId?: number | undefined;
46
+ taal?: {
47
+ id: string;
48
+ numBeats: number;
49
+ bhaags?: number[] | undefined;
50
+ sam?: number | undefined;
51
+ khaali?: number[] | undefined;
52
+ } | undefined;
53
+ taalName?: string | undefined;
54
+ tonic?: string | undefined;
55
+ bpm?: number | null | undefined;
56
+ raag?: string | undefined;
57
+ avartan?: number | undefined;
58
+ notationBy?: string | undefined;
59
+ source?: string | undefined;
60
+ };
61
+ parts: {
62
+ rows: {
63
+ notes: Note[];
64
+ label?: string | undefined;
65
+ }[];
66
+ name?: string | undefined;
67
+ }[];
68
+ }>;
69
+
70
+ export { Note, SPEC_VERSION, Swaralipi, parseSwaralipi, safeParseSwaralipi };
@@ -0,0 +1,4 @@
1
+ export { SPEC_VERSION, barSchema, bracketSchema, metaSchema, microtoneSchema, noteSchema, octaveSchema, parseSwaralipi, partSchema, rowSchema, safeParseSwaralipi, svaraLetterSchema, svaraSchema, swaralipiSchema, taalSchema } from '../chunk-C6O7DYU5.js';
2
+ export { TAALS } from '../chunk-GWXI2HJA.js';
3
+ //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Reference definitions for the taals the player will sample (P2.3):
3
+ * adachautaal, dadra, ektaal, jhaptaal, kehrwa, rupak, teentaal.
4
+ *
5
+ * `numBeats` and the `bhaags` given below are standard Hindustani taal theory.
6
+ * `bhaags` is omitted where a single canonical division isn't well-agreed
7
+ * (adachautaal) — we assert only what's uncontested. `sam` is beat 0 for all.
8
+ */
9
+ declare const TAALS: {
10
+ readonly dadra: {
11
+ readonly id: "dadra";
12
+ readonly numBeats: 6;
13
+ readonly bhaags: [3, 3];
14
+ readonly sam: 0;
15
+ readonly khaali: [3];
16
+ };
17
+ readonly kehrwa: {
18
+ readonly id: "kehrwa";
19
+ readonly numBeats: 8;
20
+ readonly bhaags: [4, 4];
21
+ readonly sam: 0;
22
+ readonly khaali: [4];
23
+ };
24
+ readonly rupak: {
25
+ readonly id: "rupak";
26
+ readonly numBeats: 7;
27
+ readonly bhaags: [3, 2, 2];
28
+ readonly sam: 0;
29
+ readonly khaali: [0];
30
+ };
31
+ readonly jhaptaal: {
32
+ readonly id: "jhaptaal";
33
+ readonly numBeats: 10;
34
+ readonly bhaags: [2, 3, 2, 3];
35
+ readonly sam: 0;
36
+ readonly khaali: [5];
37
+ };
38
+ readonly ektaal: {
39
+ readonly id: "ektaal";
40
+ readonly numBeats: 12;
41
+ readonly bhaags: [2, 2, 2, 2, 2, 2];
42
+ readonly sam: 0;
43
+ readonly khaali: [2, 6];
44
+ };
45
+ readonly adachautaal: {
46
+ readonly id: "adachautaal";
47
+ readonly numBeats: 14;
48
+ readonly sam: 0;
49
+ };
50
+ readonly teentaal: {
51
+ readonly id: "teentaal";
52
+ readonly numBeats: 16;
53
+ readonly bhaags: [4, 4, 4, 4];
54
+ readonly sam: 0;
55
+ readonly khaali: [8];
56
+ };
57
+ };
58
+ type TaalId = keyof typeof TAALS;
59
+
60
+ export { type TaalId as T, TAALS as a };
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Reference definitions for the taals the player will sample (P2.3):
3
+ * adachautaal, dadra, ektaal, jhaptaal, kehrwa, rupak, teentaal.
4
+ *
5
+ * `numBeats` and the `bhaags` given below are standard Hindustani taal theory.
6
+ * `bhaags` is omitted where a single canonical division isn't well-agreed
7
+ * (adachautaal) — we assert only what's uncontested. `sam` is beat 0 for all.
8
+ */
9
+ declare const TAALS: {
10
+ readonly dadra: {
11
+ readonly id: "dadra";
12
+ readonly numBeats: 6;
13
+ readonly bhaags: [3, 3];
14
+ readonly sam: 0;
15
+ readonly khaali: [3];
16
+ };
17
+ readonly kehrwa: {
18
+ readonly id: "kehrwa";
19
+ readonly numBeats: 8;
20
+ readonly bhaags: [4, 4];
21
+ readonly sam: 0;
22
+ readonly khaali: [4];
23
+ };
24
+ readonly rupak: {
25
+ readonly id: "rupak";
26
+ readonly numBeats: 7;
27
+ readonly bhaags: [3, 2, 2];
28
+ readonly sam: 0;
29
+ readonly khaali: [0];
30
+ };
31
+ readonly jhaptaal: {
32
+ readonly id: "jhaptaal";
33
+ readonly numBeats: 10;
34
+ readonly bhaags: [2, 3, 2, 3];
35
+ readonly sam: 0;
36
+ readonly khaali: [5];
37
+ };
38
+ readonly ektaal: {
39
+ readonly id: "ektaal";
40
+ readonly numBeats: 12;
41
+ readonly bhaags: [2, 2, 2, 2, 2, 2];
42
+ readonly sam: 0;
43
+ readonly khaali: [2, 6];
44
+ };
45
+ readonly adachautaal: {
46
+ readonly id: "adachautaal";
47
+ readonly numBeats: 14;
48
+ readonly sam: 0;
49
+ };
50
+ readonly teentaal: {
51
+ readonly id: "teentaal";
52
+ readonly numBeats: 16;
53
+ readonly bhaags: [4, 4, 4, 4];
54
+ readonly sam: 0;
55
+ readonly khaali: [8];
56
+ };
57
+ };
58
+ type TaalId = keyof typeof TAALS;
59
+
60
+ export { type TaalId as T, TAALS as a };