tamil-toolkit 0.1.0-alpha.4 → 0.1.0-alpha.6
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 +6 -5
- package/THIRD_PARTY_LICENSES.txt +24 -0
- package/THIRD_PARTY_NOTICES.md +55 -0
- package/dist/api.d.ts +566 -0
- package/dist/api.js +160 -0
- package/dist/index.d.ts +22 -2
- package/dist/index.js +8 -1
- package/dist/web.d.ts +22 -2
- package/dist/web.js +8 -1
- package/package.json +1 -1
- package/pkg-node/README.md +6 -5
- package/pkg-node/package.json +1 -1
- package/pkg-node/tamil_toolkit_bg.wasm +0 -0
- package/pkg-web/README.md +6 -5
- package/pkg-web/package.json +1 -1
- package/pkg-web/tamil_toolkit_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -20,19 +20,20 @@
|
|
|
20
20
|
| **Unicode and letters** | NFC/NFD normalization, tailored Tamil letter operations, and inspection. |
|
|
21
21
|
| **Ordering** | Stable Mei-first Agara collation and versioned sort/search keys. |
|
|
22
22
|
| **Numbers and dates** | Bounded TN/SL number words, exact INR/LKR amounts, fractions, and Gregorian dates. |
|
|
23
|
+
| **Tamil calendar** | Unreleased bounded Thirukanitham Gregorian/solar conversion and five-limb panchangam reports for declared TN/SL coordinates in 2024–2027. Its custom profile does not claim every publisher's Drik output; calendar fixtures remain planned. |
|
|
23
24
|
| **Legacy conversion** | Bamini text conversion, bounded TSCII/TAB/TAM/Anjal byte profiles, and LT-TM / IndoWord 16-bit CID conversion. |
|
|
24
25
|
|
|
25
26
|
TypeScript and WASM are thin bindings to the shared Rust implementation.
|
|
26
27
|
|
|
27
28
|
## Install
|
|
28
29
|
|
|
29
|
-
Node.js 22+ is supported. Install alpha
|
|
30
|
+
Node.js 22+ is supported. Install alpha 6 from npm’s `alpha` dist-tag:
|
|
30
31
|
|
|
31
32
|
```sh
|
|
32
33
|
npm install tamil-toolkit@alpha
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
The `alpha` tag points to `0.1.0-alpha.
|
|
36
|
+
The `alpha` tag points to `0.1.0-alpha.6`; npm’s `latest` tag still points to
|
|
36
37
|
`0.1.0-alpha.1`. The version badge above tracks the `alpha` tag.
|
|
37
38
|
|
|
38
39
|
## Node quick start
|
|
@@ -60,9 +61,9 @@ console.log(get_letters("தமிழ்").join(" | "));
|
|
|
60
61
|
The host page or bundler must serve the packaged WASM asset as an ES module
|
|
61
62
|
asset. The Node entry point initializes its native WASM module automatically.
|
|
62
63
|
|
|
63
|
-
## Alpha
|
|
64
|
+
## Alpha 6 scope
|
|
64
65
|
|
|
65
|
-
The npm `0.1.0-alpha.
|
|
66
|
+
The npm `0.1.0-alpha.6` package includes the capabilities listed above. The
|
|
66
67
|
shared `execute` API exposes `lt_tm_codes_to_unicode`, `lt_tm_text_to_unicode`,
|
|
67
68
|
`unicode_to_lt_tm_codes`, and `unicode_to_lt_tm_text`. LT-TM conversion handles
|
|
68
69
|
selected 16-bit code sequences; it does not parse PDFs, select font runs, or
|
|
@@ -86,7 +87,7 @@ const text = tamil.execute({ op: "lt_tm_codes_to_unicode", input: { codes } });
|
|
|
86
87
|
- [Unicode/core contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/core-v0.1.md)
|
|
87
88
|
- [Collation contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/collate-v0.1.md)
|
|
88
89
|
- [Numerals, fractions, and dates](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/numerals-v0.2.md)
|
|
89
|
-
- [Codec contract and alpha 3 limits](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/releases/alpha-
|
|
90
|
+
- [Codec contract and alpha 3 limits](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/releases/alpha-6.md#compatibility-and-scope)
|
|
90
91
|
- [LT-TM CID profile contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/codec-lt-tm.md)
|
|
91
92
|
- [Third-party notices](https://github.com/abishtakan/tamil-toolkit/blob/master/THIRD_PARTY_NOTICES.md)
|
|
92
93
|
|
package/THIRD_PARTY_LICENSES.txt
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
Locked Rust dependency licenses for tamil-toolkit binary distributions.
|
|
2
2
|
|
|
3
|
+
=== astro 2.0.0 (MIT) ===
|
|
4
|
+
|
|
5
|
+
--- LICENSE.md ---
|
|
6
|
+
Copyright (c) 2015, 2016 Saurav Sachidanand
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in
|
|
16
|
+
all copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
24
|
+
THE SOFTWARE.
|
|
25
|
+
|
|
26
|
+
|
|
3
27
|
=== bumpalo 3.20.3 (MIT OR Apache-2.0) ===
|
|
4
28
|
|
|
5
29
|
--- LICENSE-APACHE ---
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -12,6 +12,37 @@ LT-TM and Vanavil mapping references: Azhagi+ Portable configurations; source
|
|
|
12
12
|
digests and scope are recorded in docs/specs/codec-lt-tm.md and
|
|
13
13
|
docs/specs/codec-vanavil.md. Their bundled terms remain applicable to the
|
|
14
14
|
derived mapping tables.
|
|
15
|
+
Tamil calendar display labels are extracted as short factual name lists from
|
|
16
|
+
Tamil Virtual Academy's educational page; its reuse terms were not stated, so
|
|
17
|
+
no license or permission is asserted and no prose or page/table image is copied.
|
|
18
|
+
Tamil Gregorian weekday labels are from CLDR 49 under Unicode data terms.
|
|
19
|
+
The Latin transliterations of the seven weekday names are from Vidya Mohan and
|
|
20
|
+
Rajiv Ranjan, *Basic Tamil* (2024), chapter 6.1, under CC BY-NC 4.0; attribution
|
|
21
|
+
and the noncommercial condition remain applicable. No images or surrounding
|
|
22
|
+
text from the book are included.
|
|
23
|
+
Historical Vakyakarana solar-transit, Bhupadi correction, and Candra-vakya
|
|
24
|
+
values are transcribed as mathematical facts from *Vakyakarana with
|
|
25
|
+
Sundararaja's Laghuprakashika*, eds. T. S. Kuppanna Sastri and K. V. Sarma,
|
|
26
|
+
1962, printed English translation pp. 251-253 and Appendix II pp. 125-134.
|
|
27
|
+
No source prose or scan images are included; the publication's redistribution
|
|
28
|
+
terms were not established. See docs/specs/calendar-vakya-solar-v1.md and
|
|
29
|
+
docs/specs/calendar-vakya-moon-v1.md before redistributing this data.
|
|
30
|
+
The Ujjain mean-sunrise civil profile uses the same 1962 source, Bag (2001)
|
|
31
|
+
for the Kali epoch's Gregorian equivalence, Pai (2019) as an independent
|
|
32
|
+
transit-method cross-check, and IMD station metadata. It does not include
|
|
33
|
+
source prose or page images; see docs/specs/calendar-vakya-civil-v1.md. The
|
|
34
|
+
1962 source's redistribution terms remain unresolved.
|
|
35
|
+
The Thirukanitham Drik profile depends on Rust `astro` 2.0.0 by Saurav
|
|
36
|
+
Sachidanand, distributed under the MIT license; its complete upstream license
|
|
37
|
+
text is copied below. GeoNames city-point coordinates are attributed to
|
|
38
|
+
GeoNames and used under CC BY 4.0. Drik Panchang, IMD, and Nava Panchangam
|
|
39
|
+
provide factual date and rule witnesses in planned calendar suites. The named
|
|
40
|
+
Nava observance subset records its published Aparahna-then-sunrise selection
|
|
41
|
+
rule and factual annual dates; Nava's annual tithi pages use Vakyakarana, so
|
|
42
|
+
their match to Thirukanitham is not a publisher-equivalence claim. Reuse terms
|
|
43
|
+
for these page tables are not established, and no source page or markup is
|
|
44
|
+
copied. Exact sources, locators, coverage, and retained-page digests are in
|
|
45
|
+
lexicon/calendar-observances.toml and docs/specs/calendar-observances-v1.md.
|
|
15
46
|
Exact sources, revisions, digests and profile limits are recorded at:
|
|
16
47
|
https://github.com/abishtakan/tamil-toolkit/tree/HEAD/tests/reference
|
|
17
48
|
and https://github.com/abishtakan/tamil-toolkit/tree/HEAD/docs/specs
|
|
@@ -143,3 +174,27 @@ SOFTWARE.
|
|
|
143
174
|
Above license is for Tamil-Utill only. We do not offer fonts used in the example under the same license.
|
|
144
175
|
```
|
|
145
176
|
|
|
177
|
+
## astro 2.0.0 by Saurav Sachidanand (MIT)
|
|
178
|
+
|
|
179
|
+
```text
|
|
180
|
+
Copyright (c) 2015, 2016 Saurav Sachidanand
|
|
181
|
+
|
|
182
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
183
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
184
|
+
in the Software without restriction, including without limitation the rights
|
|
185
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
186
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
187
|
+
furnished to do so, subject to the following conditions:
|
|
188
|
+
|
|
189
|
+
The above copyright notice and this permission notice shall be included in
|
|
190
|
+
all copies or substantial portions of the Software.
|
|
191
|
+
|
|
192
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
193
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
194
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
195
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
196
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
197
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
198
|
+
THE SOFTWARE.
|
|
199
|
+
```
|
|
200
|
+
|
package/dist/api.d.ts
CHANGED
|
@@ -6,11 +6,479 @@ export interface Request {
|
|
|
6
6
|
op: string;
|
|
7
7
|
input: unknown;
|
|
8
8
|
}
|
|
9
|
+
export interface EncodingCandidate {
|
|
10
|
+
encoding: string;
|
|
11
|
+
confidence: number;
|
|
12
|
+
}
|
|
13
|
+
export interface DetectionResult {
|
|
14
|
+
status: "detected" | "uncertain";
|
|
15
|
+
encoding: string | null;
|
|
16
|
+
confidence: number;
|
|
17
|
+
reason: string | null;
|
|
18
|
+
candidates: EncodingCandidate[];
|
|
19
|
+
}
|
|
9
20
|
export type Locale = "TN" | "SL";
|
|
10
21
|
export type Currency = "INR" | "LKR";
|
|
11
22
|
export type CodecErrorPolicy = "strict" | "preserve";
|
|
12
23
|
export type DigitStyle = "latin" | "tamil";
|
|
13
24
|
export type DateStyle = "short" | "medium" | "long" | "full";
|
|
25
|
+
export type Grouping = "none" | "indian";
|
|
26
|
+
export interface ExactDecimal {
|
|
27
|
+
negative: boolean;
|
|
28
|
+
coefficient: string;
|
|
29
|
+
scale: number;
|
|
30
|
+
}
|
|
31
|
+
export interface MixedFraction {
|
|
32
|
+
negative: boolean;
|
|
33
|
+
whole: number;
|
|
34
|
+
numerator: number;
|
|
35
|
+
denominator: number;
|
|
36
|
+
}
|
|
37
|
+
export type NumericRangeEndpoint = {
|
|
38
|
+
type: "decimal";
|
|
39
|
+
value: ExactDecimal;
|
|
40
|
+
} | {
|
|
41
|
+
type: "fraction";
|
|
42
|
+
numerator: number;
|
|
43
|
+
denominator: number;
|
|
44
|
+
};
|
|
45
|
+
export interface GregorianDate {
|
|
46
|
+
year: number;
|
|
47
|
+
month: number;
|
|
48
|
+
day: number;
|
|
49
|
+
}
|
|
50
|
+
export type CalendarDisplayScript = "tamil" | "romanized";
|
|
51
|
+
export type CalendarDisplayDigits = DigitStyle;
|
|
52
|
+
export type CalendarDisplayStyle = "day_month_year" | "weekday_day_month_year";
|
|
53
|
+
export type CalendarRegion = "TN" | "SL";
|
|
54
|
+
export interface CalendarContext {
|
|
55
|
+
region: CalendarRegion;
|
|
56
|
+
latitude_microdegrees: number;
|
|
57
|
+
longitude_microdegrees: number;
|
|
58
|
+
elevation_meters: number;
|
|
59
|
+
time_zone: "Asia/Kolkata" | "Asia/Colombo";
|
|
60
|
+
}
|
|
61
|
+
export interface VakyaCivilContext {
|
|
62
|
+
reference_station: "ujjain";
|
|
63
|
+
time_zone: "Asia/Kolkata" | "Asia/Colombo";
|
|
64
|
+
}
|
|
65
|
+
export type CalendarContextInput = CalendarContext | VakyaCivilContext;
|
|
66
|
+
export type CalendarProfileComparisonMoment = {
|
|
67
|
+
date: GregorianDate;
|
|
68
|
+
instant_unix_seconds?: never;
|
|
69
|
+
} | {
|
|
70
|
+
date?: never;
|
|
71
|
+
instant_unix_seconds: number;
|
|
72
|
+
};
|
|
73
|
+
export type CalendarProfileComparisonInput = CalendarProfileComparisonMoment & {
|
|
74
|
+
thirukanitham_context: CalendarContext;
|
|
75
|
+
vakya_context: VakyaCivilContext;
|
|
76
|
+
};
|
|
77
|
+
export interface CalendarProfileComparisonResult {
|
|
78
|
+
comparison_basis: "same_gregorian_civil_date" | "same_utc_instant";
|
|
79
|
+
moment: CalendarProfileComparisonMoment;
|
|
80
|
+
profiles: Record<string, unknown>;
|
|
81
|
+
differing_fields: string[];
|
|
82
|
+
accuracy_assessment: "not_assessed";
|
|
83
|
+
}
|
|
84
|
+
export type CalendarObservanceId = "puthandu" | "bhogi_pandigai" | "pongal" | "mattu_pongal" | "amavasya_tithi_day" | "pournami_tithi_day" | "sri_vaishnava_ekadashi" | "nava_pradosham" | "aadi_perukku" | "thai_poosam" | "panguni_uthiram" | "vaikasi_visakam" | "arudra_darshan" | "karthigai_deepam" | "chitra_pournami" | "vinayaka_chaturthi" | "sivarathri" | "deepavali" | "navaratri_ghatasthapana" | "ayudha_puja" | "vijayadasami" | "sankatahara_chaturthi" | "krishna_jayanthi";
|
|
85
|
+
export interface CalendarObservanceSource {
|
|
86
|
+
id: string;
|
|
87
|
+
url: string;
|
|
88
|
+
locator: string;
|
|
89
|
+
sha256: string | null;
|
|
90
|
+
year: number | null;
|
|
91
|
+
}
|
|
92
|
+
export interface CalendarObservanceEvent {
|
|
93
|
+
event_id: CalendarObservanceId;
|
|
94
|
+
display_name: string;
|
|
95
|
+
date: GregorianDate;
|
|
96
|
+
rule_id: string;
|
|
97
|
+
tithi_index: number | null;
|
|
98
|
+
nakshatra_index: number | null;
|
|
99
|
+
source_ids: string[];
|
|
100
|
+
}
|
|
101
|
+
export interface CalendarObservances {
|
|
102
|
+
definition_id: string;
|
|
103
|
+
rule_set_id: "thirukanitham-tamil-named-observances-v1";
|
|
104
|
+
gregorian_year: number;
|
|
105
|
+
jurisdiction: "TN";
|
|
106
|
+
context: CalendarContext;
|
|
107
|
+
scope_note: string;
|
|
108
|
+
astronomy_note: string;
|
|
109
|
+
source_compatibility: "publisher_equivalence_not_claimed";
|
|
110
|
+
reuse_terms_status: string;
|
|
111
|
+
sources: CalendarObservanceSource[];
|
|
112
|
+
supported_event_ids: CalendarObservanceId[];
|
|
113
|
+
events: CalendarObservanceEvent[];
|
|
114
|
+
}
|
|
115
|
+
export interface ThiruvalluvarYearInfo {
|
|
116
|
+
convention_id: "tn-thiruvalluvar-thai1-thirukanitham-v1";
|
|
117
|
+
calendar_definition_id: string;
|
|
118
|
+
context: CalendarContext;
|
|
119
|
+
gregorian_date: GregorianDate;
|
|
120
|
+
thiruvalluvar_year: number;
|
|
121
|
+
thai1_date: GregorianDate;
|
|
122
|
+
boundary_status: "before_thai1" | "on_or_after_thai1";
|
|
123
|
+
year_number_rule: string;
|
|
124
|
+
official_equivalence: "not_established";
|
|
125
|
+
scope_note: string;
|
|
126
|
+
known_source_conflict: string;
|
|
127
|
+
sources: Array<{
|
|
128
|
+
id: string;
|
|
129
|
+
url: string;
|
|
130
|
+
locator: string;
|
|
131
|
+
}>;
|
|
132
|
+
}
|
|
133
|
+
export declare const calendarDefinitions: {
|
|
134
|
+
readonly thirukanitham: "thirukanitham-astro-2.0.0-lahiri-p03-apparent-v2";
|
|
135
|
+
readonly vakyaCivil: "vakyakarana-1962-laghuprakashika-civil-ujjain-mean-sunrise-v1";
|
|
136
|
+
};
|
|
137
|
+
export interface ThirukanithamProfileInfo {
|
|
138
|
+
profile: string;
|
|
139
|
+
definition_id: string;
|
|
140
|
+
coverage: {
|
|
141
|
+
start_date: string;
|
|
142
|
+
end_date: string;
|
|
143
|
+
};
|
|
144
|
+
solar_year: {
|
|
145
|
+
start: number;
|
|
146
|
+
end: number;
|
|
147
|
+
meaning: string;
|
|
148
|
+
};
|
|
149
|
+
ephemeris: {
|
|
150
|
+
provider: string;
|
|
151
|
+
version: string;
|
|
152
|
+
license: string;
|
|
153
|
+
archive_sha256: string;
|
|
154
|
+
sun_model: string;
|
|
155
|
+
moon_model: string;
|
|
156
|
+
nutation_model: string;
|
|
157
|
+
solar_coordinate_definition: string;
|
|
158
|
+
lunar_coordinate_definition: string;
|
|
159
|
+
};
|
|
160
|
+
time_model: {
|
|
161
|
+
tt_minus_utc_millis: number;
|
|
162
|
+
ut1_minus_utc_assumed_millis: number;
|
|
163
|
+
ut1_minus_utc_max_abs_millis: number;
|
|
164
|
+
time_zone_database_release: string;
|
|
165
|
+
};
|
|
166
|
+
sidereal_definition: string;
|
|
167
|
+
sidereal_parameters: {
|
|
168
|
+
coordinate_definition: string;
|
|
169
|
+
true_anchor_milliarcseconds: number;
|
|
170
|
+
mean_anchor_microarcseconds: number;
|
|
171
|
+
anchor_jd_centidays: number;
|
|
172
|
+
p03_picoarcseconds_per_power: number[];
|
|
173
|
+
p03_epoch_jd_millidays: number;
|
|
174
|
+
p03_century_days: number;
|
|
175
|
+
};
|
|
176
|
+
sunrise: {
|
|
177
|
+
center_altitude_arcminutes: number;
|
|
178
|
+
refraction_arcminutes: number;
|
|
179
|
+
solar_semidiameter_arcminutes: number;
|
|
180
|
+
earth_radius_meters: number;
|
|
181
|
+
horizon_definition: string;
|
|
182
|
+
};
|
|
183
|
+
vara_definition: string;
|
|
184
|
+
solar_month_rule: string;
|
|
185
|
+
supported_regions: {
|
|
186
|
+
region: string;
|
|
187
|
+
time_zone: string;
|
|
188
|
+
utc_offset_seconds: number;
|
|
189
|
+
latitude_min_microdegrees: number;
|
|
190
|
+
latitude_max_microdegrees: number;
|
|
191
|
+
longitude_min_microdegrees: number;
|
|
192
|
+
longitude_max_microdegrees: number;
|
|
193
|
+
}[];
|
|
194
|
+
reference_stations: {
|
|
195
|
+
id: string;
|
|
196
|
+
region: string;
|
|
197
|
+
latitude_microdegrees: number;
|
|
198
|
+
longitude_microdegrees: number;
|
|
199
|
+
elevation_meters: number;
|
|
200
|
+
source: string;
|
|
201
|
+
}[];
|
|
202
|
+
sources: string[];
|
|
203
|
+
}
|
|
204
|
+
export interface TamilSolarDate {
|
|
205
|
+
solar_year: number;
|
|
206
|
+
month: number;
|
|
207
|
+
month_name: string;
|
|
208
|
+
day: number;
|
|
209
|
+
}
|
|
210
|
+
export interface CalendarDateConversion {
|
|
211
|
+
definition_id: string;
|
|
212
|
+
gregorian_date: GregorianDate;
|
|
213
|
+
tamil_date: TamilSolarDate;
|
|
214
|
+
reference_station?: string;
|
|
215
|
+
day_boundary?: string;
|
|
216
|
+
}
|
|
217
|
+
export interface TamilMonthInfo {
|
|
218
|
+
definition_id: string;
|
|
219
|
+
solar_year: number;
|
|
220
|
+
month: number;
|
|
221
|
+
month_name: string;
|
|
222
|
+
start_date: GregorianDate;
|
|
223
|
+
end_date_exclusive: GregorianDate;
|
|
224
|
+
days: number;
|
|
225
|
+
reference_station?: string;
|
|
226
|
+
day_boundary?: string;
|
|
227
|
+
}
|
|
228
|
+
export interface TamilYearInfo {
|
|
229
|
+
definition_id: string;
|
|
230
|
+
solar_year: number;
|
|
231
|
+
start_date: GregorianDate;
|
|
232
|
+
year_cycle: TamilSolarYearCycle;
|
|
233
|
+
end_date_exclusive: GregorianDate;
|
|
234
|
+
days: number;
|
|
235
|
+
months: Array<Pick<TamilMonthInfo, "month" | "month_name" | "start_date" | "end_date_exclusive" | "days">>;
|
|
236
|
+
reference_station?: string;
|
|
237
|
+
day_boundary?: string;
|
|
238
|
+
}
|
|
239
|
+
export interface TamilSolarYearCycle {
|
|
240
|
+
solar_year: number;
|
|
241
|
+
cycle_index: number;
|
|
242
|
+
cycle_name: string;
|
|
243
|
+
anchor: {
|
|
244
|
+
solar_year: number;
|
|
245
|
+
cycle_index: number;
|
|
246
|
+
};
|
|
247
|
+
source_id: string;
|
|
248
|
+
source: string;
|
|
249
|
+
source_sha256: string;
|
|
250
|
+
region_scope: string;
|
|
251
|
+
sources: string[];
|
|
252
|
+
}
|
|
253
|
+
export interface TamilYearCycleInfo extends TamilSolarYearCycle {
|
|
254
|
+
definition_id: string;
|
|
255
|
+
}
|
|
256
|
+
export interface OfficialHolidayYearInfo {
|
|
257
|
+
jurisdiction: "TN" | "SL";
|
|
258
|
+
year: number;
|
|
259
|
+
schedule_id: string;
|
|
260
|
+
source_id: string;
|
|
261
|
+
source: string;
|
|
262
|
+
source_url: string;
|
|
263
|
+
source_sha256: string | null;
|
|
264
|
+
reuse_terms_status: "unverified";
|
|
265
|
+
scope_note: string;
|
|
266
|
+
holidays: Array<{
|
|
267
|
+
date: GregorianDate;
|
|
268
|
+
name: string;
|
|
269
|
+
categories: string[];
|
|
270
|
+
}>;
|
|
271
|
+
}
|
|
272
|
+
export interface AddTamilDateResult {
|
|
273
|
+
definition_id: string;
|
|
274
|
+
tamil_date: TamilSolarDate;
|
|
275
|
+
gregorian_date: GregorianDate;
|
|
276
|
+
reference_station?: string;
|
|
277
|
+
day_boundary?: string;
|
|
278
|
+
}
|
|
279
|
+
export interface CalendarDaylightPeriod {
|
|
280
|
+
period: "rahukalam" | "yamagandam" | "kuligai";
|
|
281
|
+
eighth_part: number;
|
|
282
|
+
start_local_time: {
|
|
283
|
+
hour: number;
|
|
284
|
+
minute: number;
|
|
285
|
+
second: number;
|
|
286
|
+
};
|
|
287
|
+
end_local_time: {
|
|
288
|
+
hour: number;
|
|
289
|
+
minute: number;
|
|
290
|
+
second: number;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
export interface CalendarDaylightPeriods {
|
|
294
|
+
definition_id: string;
|
|
295
|
+
date: GregorianDate;
|
|
296
|
+
weekday: string;
|
|
297
|
+
rule_id: string;
|
|
298
|
+
daylight_basis: string;
|
|
299
|
+
sunrise_local_time: {
|
|
300
|
+
hour: number;
|
|
301
|
+
minute: number;
|
|
302
|
+
second: number;
|
|
303
|
+
};
|
|
304
|
+
sunset_local_time: {
|
|
305
|
+
hour: number;
|
|
306
|
+
minute: number;
|
|
307
|
+
second: number;
|
|
308
|
+
};
|
|
309
|
+
intervals: CalendarDaylightPeriod[];
|
|
310
|
+
source: string;
|
|
311
|
+
source_sha256: string;
|
|
312
|
+
}
|
|
313
|
+
export type LunarPhase = "new_moon" | "first_quarter" | "full_moon" | "last_quarter";
|
|
314
|
+
export interface LunarPhaseEvent {
|
|
315
|
+
phase: LunarPhase;
|
|
316
|
+
ecliptic_longitude_difference_degrees: 0 | 90 | 180 | 270;
|
|
317
|
+
utc_minute: GregorianDate & {
|
|
318
|
+
hour: number;
|
|
319
|
+
minute: number;
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
export interface LunarPhaseEvents {
|
|
323
|
+
definition_id: string;
|
|
324
|
+
events: LunarPhaseEvent[];
|
|
325
|
+
}
|
|
326
|
+
export interface CalendarLimb {
|
|
327
|
+
index: number;
|
|
328
|
+
name: string;
|
|
329
|
+
paksha: "shukla" | "krishna" | null;
|
|
330
|
+
}
|
|
331
|
+
export interface CalendarLimbs {
|
|
332
|
+
tithi: CalendarLimb;
|
|
333
|
+
nakshatra: CalendarLimb;
|
|
334
|
+
yoga: CalendarLimb;
|
|
335
|
+
karana: CalendarLimb;
|
|
336
|
+
}
|
|
337
|
+
export interface PanchangamAt {
|
|
338
|
+
definition_id: string;
|
|
339
|
+
local_date: GregorianDate;
|
|
340
|
+
local_time: {
|
|
341
|
+
hour: number;
|
|
342
|
+
minute: number;
|
|
343
|
+
second: number;
|
|
344
|
+
};
|
|
345
|
+
vara: string;
|
|
346
|
+
limbs: CalendarLimbs;
|
|
347
|
+
reference_station?: string;
|
|
348
|
+
position_basis?: string;
|
|
349
|
+
}
|
|
350
|
+
export interface PanchangamTransition {
|
|
351
|
+
limb: "tithi" | "nakshatra" | "yoga" | "karana";
|
|
352
|
+
from_index: number;
|
|
353
|
+
to_index: number;
|
|
354
|
+
day_offset: number;
|
|
355
|
+
minute_of_day: number;
|
|
356
|
+
}
|
|
357
|
+
export interface PanchangamDay {
|
|
358
|
+
definition_id: string;
|
|
359
|
+
date: GregorianDate;
|
|
360
|
+
sunrise_minute_of_day: number;
|
|
361
|
+
sunset_minute_of_day: number | null;
|
|
362
|
+
vara: string;
|
|
363
|
+
limbs_at_sunrise: CalendarLimbs;
|
|
364
|
+
transitions: PanchangamTransition[];
|
|
365
|
+
sunrise_basis?: string;
|
|
366
|
+
sunset_status?: string;
|
|
367
|
+
}
|
|
368
|
+
export interface VakyaCivilProfileInfo {
|
|
369
|
+
profile: string;
|
|
370
|
+
definition_id: string;
|
|
371
|
+
coverage: Record<string, unknown>;
|
|
372
|
+
epoch: Record<string, unknown>;
|
|
373
|
+
reference_station: Record<string, unknown>;
|
|
374
|
+
day_boundary: string;
|
|
375
|
+
solar_model: Record<string, unknown>;
|
|
376
|
+
moon_model: Record<string, unknown>;
|
|
377
|
+
local_sunrise: Record<string, unknown>;
|
|
378
|
+
sources: string[];
|
|
379
|
+
[key: string]: unknown;
|
|
380
|
+
}
|
|
381
|
+
export type CalendarProfileInfo = VakyaCivilProfileInfo | ThirukanithamProfileInfo;
|
|
382
|
+
export interface Ahargana {
|
|
383
|
+
days: number;
|
|
384
|
+
nadi: number;
|
|
385
|
+
vinadi: number;
|
|
386
|
+
weekday: string;
|
|
387
|
+
}
|
|
388
|
+
export interface SolarTransit {
|
|
389
|
+
rasi: string;
|
|
390
|
+
day_field: number;
|
|
391
|
+
weekday: string;
|
|
392
|
+
nadi: number;
|
|
393
|
+
vinadi: number;
|
|
394
|
+
}
|
|
395
|
+
export interface VakyaSolarYear {
|
|
396
|
+
definition_id: string;
|
|
397
|
+
saka_year_elapsed: number;
|
|
398
|
+
kali_year: number;
|
|
399
|
+
ahargana: Ahargana;
|
|
400
|
+
transits: SolarTransit[];
|
|
401
|
+
}
|
|
402
|
+
export interface DmsAngle {
|
|
403
|
+
degrees: number;
|
|
404
|
+
minutes: number;
|
|
405
|
+
seconds: number;
|
|
406
|
+
}
|
|
407
|
+
export interface VakyaTrueSun {
|
|
408
|
+
definition_id: string;
|
|
409
|
+
elapsed_from_mesha: {
|
|
410
|
+
days: number;
|
|
411
|
+
nadi: number;
|
|
412
|
+
vinadi: number;
|
|
413
|
+
};
|
|
414
|
+
approximate_sun: DmsAngle;
|
|
415
|
+
bhupadi_correction: DmsAngle;
|
|
416
|
+
true_sun: DmsAngle;
|
|
417
|
+
}
|
|
418
|
+
export interface RasiDmsAngle {
|
|
419
|
+
rasi: number;
|
|
420
|
+
degrees: number;
|
|
421
|
+
minutes: number;
|
|
422
|
+
seconds: number;
|
|
423
|
+
}
|
|
424
|
+
export interface VakyaTrueMoon {
|
|
425
|
+
definition_id: string;
|
|
426
|
+
kali_day: number;
|
|
427
|
+
quotients: {
|
|
428
|
+
period_12372: number;
|
|
429
|
+
period_3031: number;
|
|
430
|
+
period_248: number;
|
|
431
|
+
};
|
|
432
|
+
moon_vakya_number: number;
|
|
433
|
+
uncorrected_true_moon: RasiDmsAngle;
|
|
434
|
+
daily_motion: DmsAngle;
|
|
435
|
+
vinadi_adjustment: number;
|
|
436
|
+
correction_seconds: number;
|
|
437
|
+
true_moon: RasiDmsAngle;
|
|
438
|
+
}
|
|
439
|
+
export interface VakyaLocalSunriseReduction {
|
|
440
|
+
definition_id: string;
|
|
441
|
+
true_position: RasiDmsAngle;
|
|
442
|
+
daily_motion: DmsAngle;
|
|
443
|
+
adjustment_vinadi_tenths: {
|
|
444
|
+
cara_half: number;
|
|
445
|
+
desantara: number;
|
|
446
|
+
bhujaantara: number;
|
|
447
|
+
total: number;
|
|
448
|
+
};
|
|
449
|
+
correction_arcseconds: number;
|
|
450
|
+
local_true_position: RasiDmsAngle;
|
|
451
|
+
}
|
|
452
|
+
export interface VakyaCara {
|
|
453
|
+
definition_id: string;
|
|
454
|
+
sayana_sun: RasiDmsAngle;
|
|
455
|
+
bhuja: RasiDmsAngle;
|
|
456
|
+
equinoctial_shadow_tenths: number;
|
|
457
|
+
cara_vinadi_tenths: number;
|
|
458
|
+
}
|
|
459
|
+
export interface VakyaDesantara {
|
|
460
|
+
definition_id: string;
|
|
461
|
+
east_west_distance_tenths_yojana: number;
|
|
462
|
+
desantara_vinadi_tenths: number;
|
|
463
|
+
}
|
|
464
|
+
export interface VakyaBhujaantara {
|
|
465
|
+
definition_id: string;
|
|
466
|
+
sun_rasi: number;
|
|
467
|
+
sun_rasi_progress_arcseconds: number;
|
|
468
|
+
bracketing_endpoint_vinadi: [number, number];
|
|
469
|
+
bhujaantara_vinadi_tenths: number;
|
|
470
|
+
}
|
|
471
|
+
export interface SymbolInfo {
|
|
472
|
+
codepoint: number;
|
|
473
|
+
name: string;
|
|
474
|
+
kind: string;
|
|
475
|
+
rational: {
|
|
476
|
+
numerator: number;
|
|
477
|
+
denominator: number;
|
|
478
|
+
} | null;
|
|
479
|
+
canonical_alternative: number | null;
|
|
480
|
+
source_version: string;
|
|
481
|
+
}
|
|
14
482
|
export interface Inspection {
|
|
15
483
|
nfc: string;
|
|
16
484
|
nfd: string;
|
|
@@ -57,8 +525,106 @@ export declare function createApi(nativeExecute: (request: string) => string): {
|
|
|
57
525
|
vanavil_text_to_unicode: (text: string, errors?: CodecErrorPolicy) => string;
|
|
58
526
|
unicode_to_vanavil_codes: (text: string) => number[];
|
|
59
527
|
unicode_to_vanavil_text: (text: string) => string;
|
|
528
|
+
detect_encoding: (data: Uint8Array | Uint16Array | number[] | string) => DetectionResult;
|
|
529
|
+
detectEncoding: (data: Uint8Array | Uint16Array | number[] | string) => DetectionResult;
|
|
530
|
+
detect_and_decode: (data: Uint8Array | number[] | string) => string;
|
|
531
|
+
detectAndDecode: (data: Uint8Array | number[] | string) => string;
|
|
60
532
|
format_fraction: (numerator: number, denominator: number, digits?: DigitStyle) => string;
|
|
61
533
|
fraction_to_words: (numerator: number, denominator: number, locale?: Locale) => string;
|
|
62
534
|
fraction_symbol: (numerator: number, denominator: number) => string;
|
|
63
535
|
format_date: (year: number, month: number, day: number, locale?: Locale, style?: DateStyle, digits?: DigitStyle) => string;
|
|
536
|
+
convert_digits: (text: string, to: DigitStyle) => string;
|
|
537
|
+
parse_decimal: (text: string, source_digits: DigitStyle, grouping?: Grouping, allow_mixed_digits?: boolean) => ExactDecimal;
|
|
538
|
+
format_decimal: (value: ExactDecimal, digits?: DigitStyle, grouping?: Grouping) => string;
|
|
539
|
+
decimal_to_words: (text: string, source_digits: DigitStyle, locale?: Locale, grouping?: Grouping, allow_mixed_digits?: boolean) => string;
|
|
540
|
+
ordinal_to_words: (value: number, locale?: Locale) => string;
|
|
541
|
+
digit_sequence_to_words: (text: string, source_digits: DigitStyle, locale?: Locale) => string;
|
|
542
|
+
format_currency_decimal: (amount: string, source_digits: DigitStyle, currency: Currency, locale?: Locale, grouping?: Grouping) => string;
|
|
543
|
+
currency_decimal_to_words: (amount: string, source_digits: DigitStyle, currency: Currency, locale?: Locale, grouping?: Grouping) => string;
|
|
544
|
+
parse_fraction_symbol: (text: string) => {
|
|
545
|
+
numerator: number;
|
|
546
|
+
denominator: number;
|
|
547
|
+
};
|
|
548
|
+
symbol_info: (text: string) => SymbolInfo;
|
|
549
|
+
format_mixed_fraction: (value: MixedFraction, digits?: DigitStyle) => string;
|
|
550
|
+
parse_mixed_fraction: (text: string, source_digits: DigitStyle) => MixedFraction;
|
|
551
|
+
format_traditional_integer: (value: number) => string;
|
|
552
|
+
parse_traditional_integer: (text: string) => number;
|
|
553
|
+
parse_percent: (text: string, source_digits: DigitStyle, grouping?: Grouping) => ExactDecimal;
|
|
554
|
+
format_percent: (value: ExactDecimal, digits?: DigitStyle, grouping?: Grouping) => string;
|
|
555
|
+
ratio_to_percent: (value: ExactDecimal) => ExactDecimal;
|
|
556
|
+
percent_to_ratio: (value: ExactDecimal) => ExactDecimal;
|
|
557
|
+
format_numeric_range: (start: NumericRangeEndpoint, end: NumericRangeEndpoint, start_inclusive: boolean, end_inclusive: boolean, separator?: string, digits?: DigitStyle) => string;
|
|
558
|
+
validate_gregorian_date: (year: number, month: number, day: number) => boolean;
|
|
559
|
+
parse_gregorian_date: (text: string) => GregorianDate;
|
|
560
|
+
weekday: (year: number, month: number, day: number) => string;
|
|
561
|
+
add_gregorian_date: (year: number, month: number, day: number, unit: "days" | "months" | "years", amount: number, overflow?: "reject" | "clamp") => GregorianDate;
|
|
562
|
+
date_difference: (start: GregorianDate, end: GregorianDate) => number;
|
|
563
|
+
date_interval: (start: string, end: string) => {
|
|
564
|
+
start: string;
|
|
565
|
+
end: string;
|
|
566
|
+
inclusive_days: number;
|
|
567
|
+
};
|
|
568
|
+
vakya_solar_transits: (saka_year_elapsed: number) => VakyaSolarYear;
|
|
569
|
+
vakya_true_sun_from_mesha_elapsed: (elapsed_days: number, nadi: number, vinadi: number) => VakyaTrueSun;
|
|
570
|
+
vakya_true_moon_from_kali_day: (kali_day: number) => VakyaTrueMoon;
|
|
571
|
+
vakya_reduce_to_local_true_sunrise: (true_position: RasiDmsAngle, daily_motion: DmsAngle, cara_half_vinadi_tenths: number, desantara_vinadi_tenths: number, bhujaantara_vinadi_tenths: number) => VakyaLocalSunriseReduction;
|
|
572
|
+
vakya_cara_from_sayana_sun: (sayana_sun: RasiDmsAngle, equinoctial_shadow_tenths: number) => VakyaCara;
|
|
573
|
+
vakya_desantara_from_yojana_distance: (east_west_distance_tenths_yojana: number) => VakyaDesantara;
|
|
574
|
+
vakya_bhujaantara_from_true_sun: (sun_rasi: number, sun_rasi_progress_arcseconds: number) => VakyaBhujaantara;
|
|
575
|
+
calendar_profile_info: (definition_id?: string) => CalendarProfileInfo;
|
|
576
|
+
gregorian_to_tamil_date: (date: GregorianDate, context: CalendarContextInput, definition_id?: string) => CalendarDateConversion;
|
|
577
|
+
tamil_to_gregorian_date: (date: TamilSolarDate, context: CalendarContextInput, definition_id?: string) => {
|
|
578
|
+
definition_id: string;
|
|
579
|
+
tamil_date: TamilSolarDate;
|
|
580
|
+
gregorian_date: GregorianDate;
|
|
581
|
+
reference_station?: string;
|
|
582
|
+
day_boundary?: string;
|
|
583
|
+
};
|
|
584
|
+
tamil_month_info: (solar_year: number, month: number, context: CalendarContextInput, definition_id?: string) => TamilMonthInfo;
|
|
585
|
+
tamil_year_info: (solar_year: number, context: CalendarContextInput, definition_id?: string) => TamilYearInfo;
|
|
586
|
+
tamil_year_cycle_info: (solar_year: number, context: CalendarContextInput, definition_id?: string) => TamilYearCycleInfo;
|
|
587
|
+
calendar_official_holidays: (jurisdiction: "TN" | "SL", year: number) => OfficialHolidayYearInfo;
|
|
588
|
+
calendar_observances: (gregorian_year: number, context: CalendarContextInput, rule_set?: string, definition_id?: string, month?: number) => CalendarObservances;
|
|
589
|
+
add_tamil_date: (date: TamilSolarDate, unit: "days" | "months" | "years", amount: number, context: CalendarContextInput, overflow?: "reject" | "clamp", definition_id?: string) => AddTamilDateResult;
|
|
590
|
+
panchangam_at: (instant_unix_seconds: number, context: CalendarContextInput, definition_id?: string) => PanchangamAt;
|
|
591
|
+
panchangam_day: (date: GregorianDate, context: CalendarContextInput, definition_id?: string) => PanchangamDay;
|
|
592
|
+
lunar_phase_events: (start_unix_seconds: number, end_unix_seconds: number, definition_id?: string) => LunarPhaseEvents;
|
|
593
|
+
calendar_daylight_periods: (date: GregorianDate, context: CalendarContextInput, definition_id?: string) => CalendarDaylightPeriods;
|
|
594
|
+
format_tamil_date: (date: GregorianDate, context: CalendarContextInput, script?: CalendarDisplayScript, digits?: CalendarDisplayDigits, style?: CalendarDisplayStyle, definition_id?: string) => string;
|
|
595
|
+
calendar_display_info: (date: GregorianDate, context: CalendarContextInput, script?: CalendarDisplayScript, digits?: CalendarDisplayDigits, definition_id?: string) => Record<string, unknown>;
|
|
596
|
+
compare_calendar_profiles: (input: CalendarProfileComparisonInput) => CalendarProfileComparisonResult;
|
|
597
|
+
thiruvalluvar_year_info: (date: GregorianDate, context: CalendarContext, convention_id?: ThiruvalluvarYearInfo["convention_id"]) => ThiruvalluvarYearInfo;
|
|
598
|
+
calendar: {
|
|
599
|
+
profileInfo: (definition_id?: string) => CalendarProfileInfo;
|
|
600
|
+
gregorianToTamilDate: (date: GregorianDate, context: CalendarContextInput, definition_id?: string) => CalendarDateConversion;
|
|
601
|
+
tamilToGregorianDate: (date: TamilSolarDate, context: CalendarContextInput, definition_id?: string) => {
|
|
602
|
+
definition_id: string;
|
|
603
|
+
tamil_date: TamilSolarDate;
|
|
604
|
+
gregorian_date: GregorianDate;
|
|
605
|
+
reference_station?: string;
|
|
606
|
+
day_boundary?: string;
|
|
607
|
+
};
|
|
608
|
+
monthInfo: (solar_year: number, month: number, context: CalendarContextInput, definition_id?: string) => TamilMonthInfo;
|
|
609
|
+
yearInfo: (solar_year: number, context: CalendarContextInput, definition_id?: string) => TamilYearInfo;
|
|
610
|
+
yearCycleInfo: (solar_year: number, context: CalendarContextInput, definition_id?: string) => TamilYearCycleInfo;
|
|
611
|
+
officialHolidays: (jurisdiction: "TN" | "SL", year: number) => OfficialHolidayYearInfo;
|
|
612
|
+
observances: (gregorian_year: number, context: CalendarContextInput, rule_set?: string, definition_id?: string, month?: number) => CalendarObservances;
|
|
613
|
+
addTamilDate: (date: TamilSolarDate, unit: "days" | "months" | "years", amount: number, context: CalendarContextInput, overflow?: "reject" | "clamp", definition_id?: string) => AddTamilDateResult;
|
|
614
|
+
panchangamAt: (instant_unix_seconds: number, context: CalendarContextInput, definition_id?: string) => PanchangamAt;
|
|
615
|
+
panchangamDay: (date: GregorianDate, context: CalendarContextInput, definition_id?: string) => PanchangamDay;
|
|
616
|
+
lunarPhaseEvents: (start_unix_seconds: number, end_unix_seconds: number, definition_id?: string) => LunarPhaseEvents;
|
|
617
|
+
daylightPeriods: (date: GregorianDate, context: CalendarContextInput, definition_id?: string) => CalendarDaylightPeriods;
|
|
618
|
+
formatTamilDate: (date: GregorianDate, context: CalendarContextInput, script?: CalendarDisplayScript, digits?: CalendarDisplayDigits, style?: CalendarDisplayStyle, definition_id?: string) => string;
|
|
619
|
+
displayInfo: (date: GregorianDate, context: CalendarContextInput, script?: CalendarDisplayScript, digits?: CalendarDisplayDigits, definition_id?: string) => Record<string, unknown>;
|
|
620
|
+
compareProfiles: (input: CalendarProfileComparisonInput) => CalendarProfileComparisonResult;
|
|
621
|
+
thiruvalluvarYearInfo: (date: GregorianDate, context: CalendarContext, convention_id?: ThiruvalluvarYearInfo["convention_id"]) => ThiruvalluvarYearInfo;
|
|
622
|
+
vakyaSolarTransits: (saka_year_elapsed: number) => VakyaSolarYear;
|
|
623
|
+
vakyaTrueSunFromMeshaElapsed: (elapsed_days: number, nadi: number, vinadi: number) => VakyaTrueSun;
|
|
624
|
+
vakyaTrueMoonFromKaliDay: (kali_day: number) => VakyaTrueMoon;
|
|
625
|
+
vakyaReduceToLocalTrueSunrise: (true_position: RasiDmsAngle, daily_motion: DmsAngle, cara_half_vinadi_tenths: number, desantara_vinadi_tenths: number, bhujaantara_vinadi_tenths: number) => VakyaLocalSunriseReduction;
|
|
626
|
+
vakyaCaraFromSayanaSun: (sayana_sun: RasiDmsAngle, equinoctial_shadow_tenths: number) => VakyaCara;
|
|
627
|
+
vakyaDesantaraFromYojanaDistance: (east_west_distance_tenths_yojana: number) => VakyaDesantara;
|
|
628
|
+
vakyaBhujaantaraFromTrueSun: (sun_rasi: number, sun_rasi_progress_arcseconds: number) => VakyaBhujaantara;
|
|
629
|
+
};
|
|
64
630
|
};
|
package/dist/api.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
export const calendarDefinitions = {
|
|
2
|
+
thirukanitham: "thirukanitham-astro-2.0.0-lahiri-p03-apparent-v2",
|
|
3
|
+
vakyaCivil: "vakyakarana-1962-laghuprakashika-civil-ujjain-mean-sunrise-v1",
|
|
4
|
+
};
|
|
1
5
|
/** Serialization only. The Rust dispatcher owns every operation. */
|
|
2
6
|
export function createApi(nativeExecute) {
|
|
3
7
|
const execute = (request) => JSON.parse(nativeExecute(JSON.stringify(request)));
|
|
8
|
+
const thirukanithamDefinition = calendarDefinitions.thirukanitham;
|
|
4
9
|
return {
|
|
5
10
|
execute,
|
|
6
11
|
get_letters: (text) => execute({ op: "get_letters", input: text }),
|
|
@@ -34,9 +39,164 @@ export function createApi(nativeExecute) {
|
|
|
34
39
|
vanavil_text_to_unicode: (text, errors = "strict") => execute({ op: "vanavil_text_to_unicode", input: { text, errors } }),
|
|
35
40
|
unicode_to_vanavil_codes: (text) => execute({ op: "unicode_to_vanavil_codes", input: { text } }),
|
|
36
41
|
unicode_to_vanavil_text: (text) => execute({ op: "unicode_to_vanavil_text", input: { text } }),
|
|
42
|
+
detect_encoding: (data) => {
|
|
43
|
+
let input;
|
|
44
|
+
if (typeof data === "string") {
|
|
45
|
+
input = { text: data };
|
|
46
|
+
}
|
|
47
|
+
else if (data instanceof Uint8Array) {
|
|
48
|
+
input = { bytes: Array.from(data) };
|
|
49
|
+
}
|
|
50
|
+
else if (data instanceof Uint16Array) {
|
|
51
|
+
input = { codes: Array.from(data) };
|
|
52
|
+
}
|
|
53
|
+
else if (Array.isArray(data)) {
|
|
54
|
+
if (data.some((x) => x > 255)) {
|
|
55
|
+
input = { codes: data };
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
input = { bytes: data };
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
throw new Error("data must be Uint8Array, Uint16Array, number[], or string");
|
|
63
|
+
}
|
|
64
|
+
return execute({ op: "detect_encoding", input });
|
|
65
|
+
},
|
|
66
|
+
detectEncoding: (data) => {
|
|
67
|
+
let input;
|
|
68
|
+
if (typeof data === "string") {
|
|
69
|
+
input = { text: data };
|
|
70
|
+
}
|
|
71
|
+
else if (data instanceof Uint8Array) {
|
|
72
|
+
input = { bytes: Array.from(data) };
|
|
73
|
+
}
|
|
74
|
+
else if (data instanceof Uint16Array) {
|
|
75
|
+
input = { codes: Array.from(data) };
|
|
76
|
+
}
|
|
77
|
+
else if (Array.isArray(data)) {
|
|
78
|
+
if (data.some((x) => x > 255)) {
|
|
79
|
+
input = { codes: data };
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
input = { bytes: data };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
throw new Error("data must be Uint8Array, Uint16Array, number[], or string");
|
|
87
|
+
}
|
|
88
|
+
return execute({ op: "detect_encoding", input });
|
|
89
|
+
},
|
|
90
|
+
detect_and_decode: (data) => {
|
|
91
|
+
let input;
|
|
92
|
+
if (typeof data === "string") {
|
|
93
|
+
input = { text: data };
|
|
94
|
+
}
|
|
95
|
+
else if (data instanceof Uint8Array) {
|
|
96
|
+
input = { bytes: Array.from(data) };
|
|
97
|
+
}
|
|
98
|
+
else if (Array.isArray(data)) {
|
|
99
|
+
input = { bytes: data };
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
throw new Error("data must be Uint8Array, number[], or string");
|
|
103
|
+
}
|
|
104
|
+
return execute({ op: "detect_and_decode", input });
|
|
105
|
+
},
|
|
106
|
+
detectAndDecode: (data) => {
|
|
107
|
+
let input;
|
|
108
|
+
if (typeof data === "string") {
|
|
109
|
+
input = { text: data };
|
|
110
|
+
}
|
|
111
|
+
else if (data instanceof Uint8Array) {
|
|
112
|
+
input = { bytes: Array.from(data) };
|
|
113
|
+
}
|
|
114
|
+
else if (Array.isArray(data)) {
|
|
115
|
+
input = { bytes: data };
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
throw new Error("data must be Uint8Array, number[], or string");
|
|
119
|
+
}
|
|
120
|
+
return execute({ op: "detect_and_decode", input });
|
|
121
|
+
},
|
|
37
122
|
format_fraction: (numerator, denominator, digits = "latin") => execute({ op: "format_fraction", input: { numerator, denominator, digits } }),
|
|
38
123
|
fraction_to_words: (numerator, denominator, locale = "TN") => execute({ op: "fraction_to_words", input: { numerator, denominator, locale } }),
|
|
39
124
|
fraction_symbol: (numerator, denominator) => execute({ op: "fraction_symbol", input: { numerator, denominator } }),
|
|
40
125
|
format_date: (year, month, day, locale = "TN", style = "long", digits = "latin") => execute({ op: "format_date", input: { year, month, day, locale, style, digits } }),
|
|
126
|
+
convert_digits: (text, to) => execute({ op: "convert_digits", input: { text, to } }),
|
|
127
|
+
parse_decimal: (text, source_digits, grouping = "none", allow_mixed_digits = false) => execute({ op: "parse_decimal", input: { text, source_digits, grouping, allow_mixed_digits } }),
|
|
128
|
+
format_decimal: (value, digits = "latin", grouping = "none") => execute({ op: "format_decimal", input: { value, digits, grouping } }),
|
|
129
|
+
decimal_to_words: (text, source_digits, locale = "TN", grouping = "none", allow_mixed_digits = false) => execute({ op: "decimal_to_words", input: { text, source_digits, locale, grouping, allow_mixed_digits } }),
|
|
130
|
+
ordinal_to_words: (value, locale = "TN") => execute({ op: "ordinal_to_words", input: { value, locale } }),
|
|
131
|
+
digit_sequence_to_words: (text, source_digits, locale = "TN") => execute({ op: "digit_sequence_to_words", input: { text, source_digits, locale } }),
|
|
132
|
+
format_currency_decimal: (amount, source_digits, currency, locale = "TN", grouping = "none") => execute({ op: "format_currency_decimal", input: { amount, source_digits, currency, locale, grouping } }),
|
|
133
|
+
currency_decimal_to_words: (amount, source_digits, currency, locale = "TN", grouping = "none") => execute({ op: "currency_decimal_to_words", input: { amount, source_digits, currency, locale, grouping } }),
|
|
134
|
+
parse_fraction_symbol: (text) => execute({ op: "parse_fraction_symbol", input: { text } }),
|
|
135
|
+
symbol_info: (text) => execute({ op: "symbol_info", input: { text } }),
|
|
136
|
+
format_mixed_fraction: (value, digits = "latin") => execute({ op: "format_mixed_fraction", input: { ...value, digits } }),
|
|
137
|
+
parse_mixed_fraction: (text, source_digits) => execute({ op: "parse_mixed_fraction", input: { text, source_digits } }),
|
|
138
|
+
format_traditional_integer: (value) => execute({ op: "format_traditional_integer", input: { value } }),
|
|
139
|
+
parse_traditional_integer: (text) => execute({ op: "parse_traditional_integer", input: { text } }),
|
|
140
|
+
parse_percent: (text, source_digits, grouping = "none") => execute({ op: "parse_percent", input: { text, source_digits, grouping } }),
|
|
141
|
+
format_percent: (value, digits = "latin", grouping = "none") => execute({ op: "format_percent", input: { value, digits, grouping } }),
|
|
142
|
+
ratio_to_percent: (value) => execute({ op: "ratio_to_percent", input: { value } }),
|
|
143
|
+
percent_to_ratio: (value) => execute({ op: "percent_to_ratio", input: { value } }),
|
|
144
|
+
format_numeric_range: (start, end, start_inclusive, end_inclusive, separator = "–", digits = "latin") => execute({ op: "format_numeric_range", input: { start, end, start_inclusive, end_inclusive, separator, digits } }),
|
|
145
|
+
validate_gregorian_date: (year, month, day) => execute({ op: "validate_gregorian_date", input: { year, month, day } }),
|
|
146
|
+
parse_gregorian_date: (text) => execute({ op: "parse_gregorian_date", input: { text } }),
|
|
147
|
+
weekday: (year, month, day) => execute({ op: "weekday", input: { year, month, day } }),
|
|
148
|
+
add_gregorian_date: (year, month, day, unit, amount, overflow = "reject") => execute({ op: "add_gregorian_date", input: { year, month, day, unit, amount, overflow } }),
|
|
149
|
+
date_difference: (start, end) => execute({ op: "date_difference", input: { start, end } }),
|
|
150
|
+
date_interval: (start, end) => execute({ op: "date_interval", input: { start, end } }),
|
|
151
|
+
vakya_solar_transits: (saka_year_elapsed) => execute({ op: "vakya_solar_transits", input: { definition_id: "vakyakarana-1962-laghuprakashika-solar-transits-v1", saka_year_elapsed } }),
|
|
152
|
+
vakya_true_sun_from_mesha_elapsed: (elapsed_days, nadi, vinadi) => execute({ op: "vakya_true_sun_from_mesha_elapsed", input: { definition_id: "vakyakarana-1962-laghuprakashika-solar-transits-v1", elapsed_days, nadi, vinadi } }),
|
|
153
|
+
vakya_true_moon_from_kali_day: (kali_day) => execute({ op: "vakya_true_moon_from_kali_day", input: { definition_id: "vakyakarana-1962-laghuprakashika-true-moon-v1", kali_day } }),
|
|
154
|
+
vakya_reduce_to_local_true_sunrise: (true_position, daily_motion, cara_half_vinadi_tenths, desantara_vinadi_tenths, bhujaantara_vinadi_tenths) => execute({ op: "vakya_reduce_to_local_true_sunrise", input: { definition_id: "vakyakarana-1962-laghuprakashika-local-sunrise-v1", true_position, daily_motion, cara_half_vinadi_tenths, desantara_vinadi_tenths, bhujaantara_vinadi_tenths } }),
|
|
155
|
+
vakya_cara_from_sayana_sun: (sayana_sun, equinoctial_shadow_tenths) => execute({ op: "vakya_cara_from_sayana_sun", input: { definition_id: "vakyakarana-1962-laghuprakashika-cara-v1", sayana_sun, equinoctial_shadow_tenths } }),
|
|
156
|
+
vakya_desantara_from_yojana_distance: (east_west_distance_tenths_yojana) => execute({ op: "vakya_desantara_from_yojana_distance", input: { definition_id: "vakyakarana-1962-laghuprakashika-desantara-v1", east_west_distance_tenths_yojana } }),
|
|
157
|
+
vakya_bhujaantara_from_true_sun: (sun_rasi, sun_rasi_progress_arcseconds) => execute({ op: "vakya_bhujaantara_from_true_sun", input: { definition_id: "vakyakarana-1962-laghuprakashika-bhujaantara-linear-experimental-v1", sun_rasi, sun_rasi_progress_arcseconds } }),
|
|
158
|
+
calendar_profile_info: (definition_id = thirukanithamDefinition) => execute({ op: "calendar_profile_info", input: { definition_id } }),
|
|
159
|
+
gregorian_to_tamil_date: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "gregorian_to_tamil_date", input: { definition_id, date, context } }),
|
|
160
|
+
tamil_to_gregorian_date: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_to_gregorian_date", input: { definition_id, date: { solar_year: date.solar_year, month: date.month, day: date.day }, context } }),
|
|
161
|
+
tamil_month_info: (solar_year, month, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_month_info", input: { definition_id, solar_year, month, context } }),
|
|
162
|
+
tamil_year_info: (solar_year, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_year_info", input: { definition_id, solar_year, context } }),
|
|
163
|
+
tamil_year_cycle_info: (solar_year, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_year_cycle_info", input: { definition_id, solar_year, context } }),
|
|
164
|
+
calendar_official_holidays: (jurisdiction, year) => execute({ op: "calendar_official_holidays", input: { jurisdiction, year } }),
|
|
165
|
+
calendar_observances: (gregorian_year, context, rule_set = "thirukanitham-tamil-named-observances-v1", definition_id = thirukanithamDefinition, month) => execute({ op: "calendar_observances", input: { definition_id, rule_set, gregorian_year, ...(month === undefined ? {} : { month }), context } }),
|
|
166
|
+
add_tamil_date: (date, unit, amount, context, overflow = "reject", definition_id = thirukanithamDefinition) => execute({ op: "add_tamil_date", input: { definition_id, date: { solar_year: date.solar_year, month: date.month, day: date.day }, unit, amount, overflow, context } }),
|
|
167
|
+
panchangam_at: (instant_unix_seconds, context, definition_id = thirukanithamDefinition) => execute({ op: "panchangam_at", input: { definition_id, instant_unix_seconds, context } }),
|
|
168
|
+
panchangam_day: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "panchangam_day", input: { definition_id, date, context } }),
|
|
169
|
+
lunar_phase_events: (start_unix_seconds, end_unix_seconds, definition_id = thirukanithamDefinition) => execute({ op: "lunar_phase_events", input: { definition_id, start_unix_seconds, end_unix_seconds } }),
|
|
170
|
+
calendar_daylight_periods: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "calendar_daylight_periods", input: { definition_id, date, context } }),
|
|
171
|
+
format_tamil_date: (date, context, script = "tamil", digits = "latin", style = "weekday_day_month_year", definition_id = thirukanithamDefinition) => execute({ op: "format_tamil_date", input: { definition_id, date, context, script, digits, style } }),
|
|
172
|
+
calendar_display_info: (date, context, script = "tamil", digits = "latin", definition_id = thirukanithamDefinition) => execute({ op: "calendar_display_info", input: { definition_id, date, context, script, digits } }),
|
|
173
|
+
compare_calendar_profiles: (input) => execute({ op: "compare_calendar_profiles", input }),
|
|
174
|
+
thiruvalluvar_year_info: (date, context, convention_id = "tn-thiruvalluvar-thai1-thirukanitham-v1") => execute({ op: "thiruvalluvar_year_info", input: { date, context, convention_id } }),
|
|
175
|
+
calendar: {
|
|
176
|
+
profileInfo: (definition_id = thirukanithamDefinition) => execute({ op: "calendar_profile_info", input: { definition_id } }),
|
|
177
|
+
gregorianToTamilDate: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "gregorian_to_tamil_date", input: { definition_id, date, context } }),
|
|
178
|
+
tamilToGregorianDate: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_to_gregorian_date", input: { definition_id, date: { solar_year: date.solar_year, month: date.month, day: date.day }, context } }),
|
|
179
|
+
monthInfo: (solar_year, month, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_month_info", input: { definition_id, solar_year, month, context } }),
|
|
180
|
+
yearInfo: (solar_year, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_year_info", input: { definition_id, solar_year, context } }),
|
|
181
|
+
yearCycleInfo: (solar_year, context, definition_id = thirukanithamDefinition) => execute({ op: "tamil_year_cycle_info", input: { definition_id, solar_year, context } }),
|
|
182
|
+
officialHolidays: (jurisdiction, year) => execute({ op: "calendar_official_holidays", input: { jurisdiction, year } }),
|
|
183
|
+
observances: (gregorian_year, context, rule_set = "thirukanitham-tamil-named-observances-v1", definition_id = thirukanithamDefinition, month) => execute({ op: "calendar_observances", input: { definition_id, rule_set, gregorian_year, ...(month === undefined ? {} : { month }), context } }),
|
|
184
|
+
addTamilDate: (date, unit, amount, context, overflow = "reject", definition_id = thirukanithamDefinition) => execute({ op: "add_tamil_date", input: { definition_id, date: { solar_year: date.solar_year, month: date.month, day: date.day }, unit, amount, overflow, context } }),
|
|
185
|
+
panchangamAt: (instant_unix_seconds, context, definition_id = thirukanithamDefinition) => execute({ op: "panchangam_at", input: { definition_id, instant_unix_seconds, context } }),
|
|
186
|
+
panchangamDay: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "panchangam_day", input: { definition_id, date, context } }),
|
|
187
|
+
lunarPhaseEvents: (start_unix_seconds, end_unix_seconds, definition_id = thirukanithamDefinition) => execute({ op: "lunar_phase_events", input: { definition_id, start_unix_seconds, end_unix_seconds } }),
|
|
188
|
+
daylightPeriods: (date, context, definition_id = thirukanithamDefinition) => execute({ op: "calendar_daylight_periods", input: { definition_id, date, context } }),
|
|
189
|
+
formatTamilDate: (date, context, script = "tamil", digits = "latin", style = "weekday_day_month_year", definition_id = thirukanithamDefinition) => execute({ op: "format_tamil_date", input: { definition_id, date, context, script, digits, style } }),
|
|
190
|
+
displayInfo: (date, context, script = "tamil", digits = "latin", definition_id = thirukanithamDefinition) => execute({ op: "calendar_display_info", input: { definition_id, date, context, script, digits } }),
|
|
191
|
+
compareProfiles: (input) => execute({ op: "compare_calendar_profiles", input }),
|
|
192
|
+
thiruvalluvarYearInfo: (date, context, convention_id = "tn-thiruvalluvar-thai1-thirukanitham-v1") => execute({ op: "thiruvalluvar_year_info", input: { date, context, convention_id } }),
|
|
193
|
+
vakyaSolarTransits: (saka_year_elapsed) => execute({ op: "vakya_solar_transits", input: { definition_id: "vakyakarana-1962-laghuprakashika-solar-transits-v1", saka_year_elapsed } }),
|
|
194
|
+
vakyaTrueSunFromMeshaElapsed: (elapsed_days, nadi, vinadi) => execute({ op: "vakya_true_sun_from_mesha_elapsed", input: { definition_id: "vakyakarana-1962-laghuprakashika-solar-transits-v1", elapsed_days, nadi, vinadi } }),
|
|
195
|
+
vakyaTrueMoonFromKaliDay: (kali_day) => execute({ op: "vakya_true_moon_from_kali_day", input: { definition_id: "vakyakarana-1962-laghuprakashika-true-moon-v1", kali_day } }),
|
|
196
|
+
vakyaReduceToLocalTrueSunrise: (true_position, daily_motion, cara_half_vinadi_tenths, desantara_vinadi_tenths, bhujaantara_vinadi_tenths) => execute({ op: "vakya_reduce_to_local_true_sunrise", input: { definition_id: "vakyakarana-1962-laghuprakashika-local-sunrise-v1", true_position, daily_motion, cara_half_vinadi_tenths, desantara_vinadi_tenths, bhujaantara_vinadi_tenths } }),
|
|
197
|
+
vakyaCaraFromSayanaSun: (sayana_sun, equinoctial_shadow_tenths) => execute({ op: "vakya_cara_from_sayana_sun", input: { definition_id: "vakyakarana-1962-laghuprakashika-cara-v1", sayana_sun, equinoctial_shadow_tenths } }),
|
|
198
|
+
vakyaDesantaraFromYojanaDistance: (east_west_distance_tenths_yojana) => execute({ op: "vakya_desantara_from_yojana_distance", input: { definition_id: "vakyakarana-1962-laghuprakashika-desantara-v1", east_west_distance_tenths_yojana } }),
|
|
199
|
+
vakyaBhujaantaraFromTrueSun: (sun_rasi, sun_rasi_progress_arcseconds) => execute({ op: "vakya_bhujaantara_from_true_sun", input: { definition_id: "vakyakarana-1962-laghuprakashika-bhujaantara-linear-experimental-v1", sun_rasi, sun_rasi_progress_arcseconds } }),
|
|
200
|
+
},
|
|
41
201
|
};
|
|
42
202
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
export type { Uyirmei, Request, Inspection, Locale, Currency, CodecErrorPolicy, DigitStyle, DateStyle } from "./api.js";
|
|
2
|
-
export
|
|
1
|
+
export type { Uyirmei, Request, Inspection, Locale, Currency, CodecErrorPolicy, DigitStyle, DateStyle, Grouping, ExactDecimal, MixedFraction, NumericRangeEndpoint, GregorianDate, CalendarDisplayScript, CalendarDisplayDigits, CalendarDisplayStyle, CalendarProfileComparisonMoment, CalendarProfileComparisonInput, CalendarProfileComparisonResult, ThiruvalluvarYearInfo, CalendarRegion, CalendarContext, VakyaCivilContext, CalendarContextInput, CalendarProfileInfo, ThirukanithamProfileInfo, VakyaCivilProfileInfo, TamilSolarDate, CalendarDateConversion, TamilMonthInfo, TamilYearInfo, TamilYearCycleInfo, TamilSolarYearCycle, OfficialHolidayYearInfo, CalendarObservanceId, CalendarObservanceSource, CalendarObservanceEvent, CalendarObservances, AddTamilDateResult, CalendarDaylightPeriod, CalendarDaylightPeriods, LunarPhase, LunarPhaseEvent, LunarPhaseEvents, CalendarLimb, CalendarLimbs, PanchangamAt, PanchangamTransition, PanchangamDay, Ahargana, SolarTransit, VakyaSolarYear, DmsAngle, VakyaTrueSun, SymbolInfo, EncodingCandidate, DetectionResult } from "./api.js";
|
|
2
|
+
export type { RasiDmsAngle, VakyaTrueMoon, VakyaLocalSunriseReduction, VakyaCara, VakyaDesantara, VakyaBhujaantara } from "./api.js";
|
|
3
|
+
export { calendarDefinitions } from "./api.js";
|
|
4
|
+
export declare const execute: (request: import("./api.js").Request) => unknown, get_letters: (text: string) => string[], normalize_nfc: (text: string) => string, normalize_nfd: (text: string) => string, split_uyirmei: (text: string) => import("./api.js").Uyirmei, compose_uyirmei: (mei: string, uyir: string) => string, inspect_tamil_string: (text: string) => import("./api.js").Inspection, compare: (left: string, right: string) => -1 | 0 | 1, sort_words: (words: string[]) => string[], sort_key: (text: string) => number[], search_key: (text: string) => number[], to_words: (value: number, locale?: import("./api.js").Locale) => string, format_currency: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, currency_to_words: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, bamini_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_bamini: (text: string) => string, anjal_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_anjal_bytes: (text: string) => number[], tam_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tam_bytes: (text: string) => number[], tab_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tab_bytes: (text: string) => number[], tscii_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tscii_bytes: (text: string) => number[], lt_tm_codes_to_unicode: (codes: Uint16Array | number[], errors?: import("./api.js").CodecErrorPolicy) => string, lt_tm_text_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_lt_tm_codes: (text: string) => number[], unicode_to_lt_tm_text: (text: string) => string, vanavil_codes_to_unicode: (codes: Uint16Array | number[], errors?: import("./api.js").CodecErrorPolicy) => string, vanavil_text_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_vanavil_codes: (text: string) => number[], unicode_to_vanavil_text: (text: string) => string, detect_encoding: (data: Uint8Array | Uint16Array | number[] | string) => import("./api.js").DetectionResult, detectEncoding: (data: Uint8Array | Uint16Array | number[] | string) => import("./api.js").DetectionResult, detect_and_decode: (data: Uint8Array | number[] | string) => string, detectAndDecode: (data: Uint8Array | number[] | string) => string, format_fraction: (numerator: number, denominator: number, digits?: import("./api.js").DigitStyle) => string, fraction_to_words: (numerator: number, denominator: number, locale?: import("./api.js").Locale) => string, fraction_symbol: (numerator: number, denominator: number) => string, format_date: (year: number, month: number, day: number, locale?: import("./api.js").Locale, style?: import("./api.js").DateStyle, digits?: import("./api.js").DigitStyle) => string, convert_digits: (text: string, to: import("./api.js").DigitStyle) => string, parse_decimal: (text: string, source_digits: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping, allow_mixed_digits?: boolean) => import("./api.js").ExactDecimal, format_decimal: (value: import("./api.js").ExactDecimal, digits?: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping) => string, decimal_to_words: (text: string, source_digits: import("./api.js").DigitStyle, locale?: import("./api.js").Locale, grouping?: import("./api.js").Grouping, allow_mixed_digits?: boolean) => string, ordinal_to_words: (value: number, locale?: import("./api.js").Locale) => string, digit_sequence_to_words: (text: string, source_digits: import("./api.js").DigitStyle, locale?: import("./api.js").Locale) => string, format_currency_decimal: (amount: string, source_digits: import("./api.js").DigitStyle, currency: import("./api.js").Currency, locale?: import("./api.js").Locale, grouping?: import("./api.js").Grouping) => string, currency_decimal_to_words: (amount: string, source_digits: import("./api.js").DigitStyle, currency: import("./api.js").Currency, locale?: import("./api.js").Locale, grouping?: import("./api.js").Grouping) => string, parse_fraction_symbol: (text: string) => {
|
|
5
|
+
numerator: number;
|
|
6
|
+
denominator: number;
|
|
7
|
+
}, symbol_info: (text: string) => import("./api.js").SymbolInfo, format_mixed_fraction: (value: import("./api.js").MixedFraction, digits?: import("./api.js").DigitStyle) => string, parse_mixed_fraction: (text: string, source_digits: import("./api.js").DigitStyle) => import("./api.js").MixedFraction, format_traditional_integer: (value: number) => string, parse_traditional_integer: (text: string) => number, parse_percent: (text: string, source_digits: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping) => import("./api.js").ExactDecimal, format_percent: (value: import("./api.js").ExactDecimal, digits?: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping) => string, ratio_to_percent: (value: import("./api.js").ExactDecimal) => import("./api.js").ExactDecimal, percent_to_ratio: (value: import("./api.js").ExactDecimal) => import("./api.js").ExactDecimal, format_numeric_range: (start: import("./api.js").NumericRangeEndpoint, end: import("./api.js").NumericRangeEndpoint, start_inclusive: boolean, end_inclusive: boolean, separator?: string, digits?: import("./api.js").DigitStyle) => string, validate_gregorian_date: (year: number, month: number, day: number) => boolean, parse_gregorian_date: (text: string) => import("./api.js").GregorianDate, weekday: (year: number, month: number, day: number) => string, add_gregorian_date: (year: number, month: number, day: number, unit: "days" | "months" | "years", amount: number, overflow?: "reject" | "clamp") => import("./api.js").GregorianDate, date_difference: (start: import("./api.js").GregorianDate, end: import("./api.js").GregorianDate) => number, date_interval: (start: string, end: string) => {
|
|
8
|
+
start: string;
|
|
9
|
+
end: string;
|
|
10
|
+
inclusive_days: number;
|
|
11
|
+
}, vakya_solar_transits: (saka_year_elapsed: number) => import("./api.js").VakyaSolarYear, vakya_true_sun_from_mesha_elapsed: (elapsed_days: number, nadi: number, vinadi: number) => import("./api.js").VakyaTrueSun, calendar_profile_info: (definition_id?: string) => import("./api.js").CalendarProfileInfo, gregorian_to_tamil_date: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").CalendarDateConversion, tamil_to_gregorian_date: (date: import("./api.js").TamilSolarDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => {
|
|
12
|
+
definition_id: string;
|
|
13
|
+
tamil_date: import("./api.js").TamilSolarDate;
|
|
14
|
+
gregorian_date: import("./api.js").GregorianDate;
|
|
15
|
+
reference_station?: string;
|
|
16
|
+
day_boundary?: string;
|
|
17
|
+
}, tamil_month_info: (solar_year: number, month: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").TamilMonthInfo, tamil_year_info: (solar_year: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").TamilYearInfo, tamil_year_cycle_info: (solar_year: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").TamilYearCycleInfo, calendar_official_holidays: (jurisdiction: "TN" | "SL", year: number) => import("./api.js").OfficialHolidayYearInfo, calendar_observances: (gregorian_year: number, context: import("./api.js").CalendarContextInput, rule_set?: string, definition_id?: string, month?: number) => import("./api.js").CalendarObservances, add_tamil_date: (date: import("./api.js").TamilSolarDate, unit: "days" | "months" | "years", amount: number, context: import("./api.js").CalendarContextInput, overflow?: "reject" | "clamp", definition_id?: string) => import("./api.js").AddTamilDateResult, panchangam_at: (instant_unix_seconds: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").PanchangamAt, panchangam_day: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").PanchangamDay, lunar_phase_events: (start_unix_seconds: number, end_unix_seconds: number, definition_id?: string) => import("./api.js").LunarPhaseEvents, calendar_daylight_periods: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").CalendarDaylightPeriods, format_tamil_date: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, script?: import("./api.js").CalendarDisplayScript, digits?: import("./api.js").CalendarDisplayDigits, style?: import("./api.js").CalendarDisplayStyle, definition_id?: string) => string, calendar_display_info: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, script?: import("./api.js").CalendarDisplayScript, digits?: import("./api.js").CalendarDisplayDigits, definition_id?: string) => Record<string, unknown>, compare_calendar_profiles: (input: import("./api.js").CalendarProfileComparisonInput) => import("./api.js").CalendarProfileComparisonResult, thiruvalluvar_year_info: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContext, convention_id?: import("./api.js").ThiruvalluvarYearInfo["convention_id"]) => import("./api.js").ThiruvalluvarYearInfo;
|
|
18
|
+
export declare const vakya_true_moon_from_kali_day: (kali_day: number) => import("./api.js").VakyaTrueMoon;
|
|
19
|
+
export declare const vakya_reduce_to_local_true_sunrise: (true_position: import("./api.js").RasiDmsAngle, daily_motion: import("./api.js").DmsAngle, cara_half_vinadi_tenths: number, desantara_vinadi_tenths: number, bhujaantara_vinadi_tenths: number) => import("./api.js").VakyaLocalSunriseReduction;
|
|
20
|
+
export declare const vakya_cara_from_sayana_sun: (sayana_sun: import("./api.js").RasiDmsAngle, equinoctial_shadow_tenths: number) => import("./api.js").VakyaCara;
|
|
21
|
+
export declare const vakya_desantara_from_yojana_distance: (east_west_distance_tenths_yojana: number) => import("./api.js").VakyaDesantara;
|
|
22
|
+
export declare const vakya_bhujaantara_from_true_sun: (sun_rasi: number, sun_rasi_progress_arcseconds: number) => import("./api.js").VakyaBhujaantara;
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
1
|
import { execute as nativeExecute } from "../pkg-node/tamil_toolkit.js";
|
|
2
2
|
import { createApi } from "./api.js";
|
|
3
|
-
export
|
|
3
|
+
export { calendarDefinitions } from "./api.js";
|
|
4
|
+
export const { execute, get_letters, normalize_nfc, normalize_nfd, split_uyirmei, compose_uyirmei, inspect_tamil_string, compare, sort_words, sort_key, search_key, to_words, format_currency, currency_to_words, bamini_to_unicode, unicode_to_bamini, anjal_bytes_to_unicode, unicode_to_anjal_bytes, tam_bytes_to_unicode, unicode_to_tam_bytes, tab_bytes_to_unicode, unicode_to_tab_bytes, tscii_bytes_to_unicode, unicode_to_tscii_bytes, lt_tm_codes_to_unicode, lt_tm_text_to_unicode, unicode_to_lt_tm_codes, unicode_to_lt_tm_text, vanavil_codes_to_unicode, vanavil_text_to_unicode, unicode_to_vanavil_codes, unicode_to_vanavil_text, detect_encoding, detectEncoding, detect_and_decode, detectAndDecode, format_fraction, fraction_to_words, fraction_symbol, format_date, convert_digits, parse_decimal, format_decimal, decimal_to_words, ordinal_to_words, digit_sequence_to_words, format_currency_decimal, currency_decimal_to_words, parse_fraction_symbol, symbol_info, format_mixed_fraction, parse_mixed_fraction, format_traditional_integer, parse_traditional_integer, parse_percent, format_percent, ratio_to_percent, percent_to_ratio, format_numeric_range, validate_gregorian_date, parse_gregorian_date, weekday, add_gregorian_date, date_difference, date_interval, vakya_solar_transits, vakya_true_sun_from_mesha_elapsed, calendar_profile_info, gregorian_to_tamil_date, tamil_to_gregorian_date, tamil_month_info, tamil_year_info, tamil_year_cycle_info, calendar_official_holidays, calendar_observances, add_tamil_date, panchangam_at, panchangam_day, lunar_phase_events, calendar_daylight_periods, format_tamil_date, calendar_display_info, compare_calendar_profiles, thiruvalluvar_year_info } = createApi(nativeExecute);
|
|
5
|
+
const calendarApi = createApi(nativeExecute);
|
|
6
|
+
export const vakya_true_moon_from_kali_day = calendarApi.vakya_true_moon_from_kali_day;
|
|
7
|
+
export const vakya_reduce_to_local_true_sunrise = calendarApi.vakya_reduce_to_local_true_sunrise;
|
|
8
|
+
export const vakya_cara_from_sayana_sun = calendarApi.vakya_cara_from_sayana_sun;
|
|
9
|
+
export const vakya_desantara_from_yojana_distance = calendarApi.vakya_desantara_from_yojana_distance;
|
|
10
|
+
export const vakya_bhujaantara_from_true_sun = calendarApi.vakya_bhujaantara_from_true_sun;
|
package/dist/web.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import init from "../pkg-web/tamil_toolkit.js";
|
|
2
2
|
export { init };
|
|
3
|
-
export type { Uyirmei, Request, Inspection, Locale, Currency, CodecErrorPolicy, DigitStyle, DateStyle } from "./api.js";
|
|
4
|
-
export
|
|
3
|
+
export type { Uyirmei, Request, Inspection, Locale, Currency, CodecErrorPolicy, DigitStyle, DateStyle, Grouping, ExactDecimal, MixedFraction, NumericRangeEndpoint, GregorianDate, CalendarRegion, CalendarContext, VakyaCivilContext, CalendarContextInput, CalendarProfileInfo, ThirukanithamProfileInfo, VakyaCivilProfileInfo, TamilSolarDate, CalendarDateConversion, TamilMonthInfo, TamilYearInfo, TamilYearCycleInfo, TamilSolarYearCycle, OfficialHolidayYearInfo, CalendarObservanceId, CalendarObservanceSource, CalendarObservanceEvent, CalendarObservances, AddTamilDateResult, CalendarDaylightPeriod, CalendarDaylightPeriods, LunarPhase, LunarPhaseEvent, LunarPhaseEvents, CalendarLimb, CalendarLimbs, PanchangamAt, PanchangamTransition, PanchangamDay, Ahargana, SolarTransit, VakyaSolarYear, DmsAngle, VakyaTrueSun, SymbolInfo, EncodingCandidate, DetectionResult } from "./api.js";
|
|
4
|
+
export type { RasiDmsAngle, VakyaTrueMoon, VakyaLocalSunriseReduction, VakyaCara, VakyaDesantara, VakyaBhujaantara } from "./api.js";
|
|
5
|
+
export { calendarDefinitions } from "./api.js";
|
|
6
|
+
export declare const execute: (request: import("./api.js").Request) => unknown, get_letters: (text: string) => string[], normalize_nfc: (text: string) => string, normalize_nfd: (text: string) => string, split_uyirmei: (text: string) => import("./api.js").Uyirmei, compose_uyirmei: (mei: string, uyir: string) => string, inspect_tamil_string: (text: string) => import("./api.js").Inspection, compare: (left: string, right: string) => -1 | 0 | 1, sort_words: (words: string[]) => string[], sort_key: (text: string) => number[], search_key: (text: string) => number[], to_words: (value: number, locale?: import("./api.js").Locale) => string, format_currency: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, currency_to_words: (amount_minor: number, currency: import("./api.js").Currency, locale?: import("./api.js").Locale) => string, bamini_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_bamini: (text: string) => string, anjal_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_anjal_bytes: (text: string) => number[], tam_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tam_bytes: (text: string) => number[], tab_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tab_bytes: (text: string) => number[], tscii_bytes_to_unicode: (bytes: Uint8Array | number[]) => string, unicode_to_tscii_bytes: (text: string) => number[], lt_tm_codes_to_unicode: (codes: Uint16Array | number[], errors?: import("./api.js").CodecErrorPolicy) => string, lt_tm_text_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_lt_tm_codes: (text: string) => number[], unicode_to_lt_tm_text: (text: string) => string, vanavil_codes_to_unicode: (codes: Uint16Array | number[], errors?: import("./api.js").CodecErrorPolicy) => string, vanavil_text_to_unicode: (text: string, errors?: import("./api.js").CodecErrorPolicy) => string, unicode_to_vanavil_codes: (text: string) => number[], unicode_to_vanavil_text: (text: string) => string, detect_encoding: (data: Uint8Array | Uint16Array | number[] | string) => import("./api.js").DetectionResult, detectEncoding: (data: Uint8Array | Uint16Array | number[] | string) => import("./api.js").DetectionResult, detect_and_decode: (data: Uint8Array | number[] | string) => string, detectAndDecode: (data: Uint8Array | number[] | string) => string, format_fraction: (numerator: number, denominator: number, digits?: import("./api.js").DigitStyle) => string, fraction_to_words: (numerator: number, denominator: number, locale?: import("./api.js").Locale) => string, fraction_symbol: (numerator: number, denominator: number) => string, format_date: (year: number, month: number, day: number, locale?: import("./api.js").Locale, style?: import("./api.js").DateStyle, digits?: import("./api.js").DigitStyle) => string, convert_digits: (text: string, to: import("./api.js").DigitStyle) => string, parse_decimal: (text: string, source_digits: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping, allow_mixed_digits?: boolean) => import("./api.js").ExactDecimal, format_decimal: (value: import("./api.js").ExactDecimal, digits?: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping) => string, decimal_to_words: (text: string, source_digits: import("./api.js").DigitStyle, locale?: import("./api.js").Locale, grouping?: import("./api.js").Grouping, allow_mixed_digits?: boolean) => string, ordinal_to_words: (value: number, locale?: import("./api.js").Locale) => string, digit_sequence_to_words: (text: string, source_digits: import("./api.js").DigitStyle, locale?: import("./api.js").Locale) => string, format_currency_decimal: (amount: string, source_digits: import("./api.js").DigitStyle, currency: import("./api.js").Currency, locale?: import("./api.js").Locale, grouping?: import("./api.js").Grouping) => string, currency_decimal_to_words: (amount: string, source_digits: import("./api.js").DigitStyle, currency: import("./api.js").Currency, locale?: import("./api.js").Locale, grouping?: import("./api.js").Grouping) => string, parse_fraction_symbol: (text: string) => {
|
|
7
|
+
numerator: number;
|
|
8
|
+
denominator: number;
|
|
9
|
+
}, symbol_info: (text: string) => import("./api.js").SymbolInfo, format_mixed_fraction: (value: import("./api.js").MixedFraction, digits?: import("./api.js").DigitStyle) => string, parse_mixed_fraction: (text: string, source_digits: import("./api.js").DigitStyle) => import("./api.js").MixedFraction, format_traditional_integer: (value: number) => string, parse_traditional_integer: (text: string) => number, parse_percent: (text: string, source_digits: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping) => import("./api.js").ExactDecimal, format_percent: (value: import("./api.js").ExactDecimal, digits?: import("./api.js").DigitStyle, grouping?: import("./api.js").Grouping) => string, ratio_to_percent: (value: import("./api.js").ExactDecimal) => import("./api.js").ExactDecimal, percent_to_ratio: (value: import("./api.js").ExactDecimal) => import("./api.js").ExactDecimal, format_numeric_range: (start: import("./api.js").NumericRangeEndpoint, end: import("./api.js").NumericRangeEndpoint, start_inclusive: boolean, end_inclusive: boolean, separator?: string, digits?: import("./api.js").DigitStyle) => string, validate_gregorian_date: (year: number, month: number, day: number) => boolean, parse_gregorian_date: (text: string) => import("./api.js").GregorianDate, weekday: (year: number, month: number, day: number) => string, add_gregorian_date: (year: number, month: number, day: number, unit: "days" | "months" | "years", amount: number, overflow?: "reject" | "clamp") => import("./api.js").GregorianDate, date_difference: (start: import("./api.js").GregorianDate, end: import("./api.js").GregorianDate) => number, date_interval: (start: string, end: string) => {
|
|
10
|
+
start: string;
|
|
11
|
+
end: string;
|
|
12
|
+
inclusive_days: number;
|
|
13
|
+
}, vakya_solar_transits: (saka_year_elapsed: number) => import("./api.js").VakyaSolarYear, vakya_true_sun_from_mesha_elapsed: (elapsed_days: number, nadi: number, vinadi: number) => import("./api.js").VakyaTrueSun, calendar_profile_info: (definition_id?: string) => import("./api.js").CalendarProfileInfo, gregorian_to_tamil_date: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").CalendarDateConversion, tamil_to_gregorian_date: (date: import("./api.js").TamilSolarDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => {
|
|
14
|
+
definition_id: string;
|
|
15
|
+
tamil_date: import("./api.js").TamilSolarDate;
|
|
16
|
+
gregorian_date: import("./api.js").GregorianDate;
|
|
17
|
+
reference_station?: string;
|
|
18
|
+
day_boundary?: string;
|
|
19
|
+
}, tamil_month_info: (solar_year: number, month: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").TamilMonthInfo, tamil_year_info: (solar_year: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").TamilYearInfo, tamil_year_cycle_info: (solar_year: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").TamilYearCycleInfo, calendar_official_holidays: (jurisdiction: "TN" | "SL", year: number) => import("./api.js").OfficialHolidayYearInfo, calendar_observances: (gregorian_year: number, context: import("./api.js").CalendarContextInput, rule_set?: string, definition_id?: string, month?: number) => import("./api.js").CalendarObservances, add_tamil_date: (date: import("./api.js").TamilSolarDate, unit: "days" | "months" | "years", amount: number, context: import("./api.js").CalendarContextInput, overflow?: "reject" | "clamp", definition_id?: string) => import("./api.js").AddTamilDateResult, panchangam_at: (instant_unix_seconds: number, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").PanchangamAt, panchangam_day: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").PanchangamDay, lunar_phase_events: (start_unix_seconds: number, end_unix_seconds: number, definition_id?: string) => import("./api.js").LunarPhaseEvents, calendar_daylight_periods: (date: import("./api.js").GregorianDate, context: import("./api.js").CalendarContextInput, definition_id?: string) => import("./api.js").CalendarDaylightPeriods;
|
|
20
|
+
export declare const vakya_true_moon_from_kali_day: (kali_day: number) => import("./api.js").VakyaTrueMoon;
|
|
21
|
+
export declare const vakya_reduce_to_local_true_sunrise: (true_position: import("./api.js").RasiDmsAngle, daily_motion: import("./api.js").DmsAngle, cara_half_vinadi_tenths: number, desantara_vinadi_tenths: number, bhujaantara_vinadi_tenths: number) => import("./api.js").VakyaLocalSunriseReduction;
|
|
22
|
+
export declare const vakya_cara_from_sayana_sun: (sayana_sun: import("./api.js").RasiDmsAngle, equinoctial_shadow_tenths: number) => import("./api.js").VakyaCara;
|
|
23
|
+
export declare const vakya_desantara_from_yojana_distance: (east_west_distance_tenths_yojana: number) => import("./api.js").VakyaDesantara;
|
|
24
|
+
export declare const vakya_bhujaantara_from_true_sun: (sun_rasi: number, sun_rasi_progress_arcseconds: number) => import("./api.js").VakyaBhujaantara;
|
package/dist/web.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
import init, { execute as nativeExecute } from "../pkg-web/tamil_toolkit.js";
|
|
2
2
|
import { createApi } from "./api.js";
|
|
3
3
|
export { init };
|
|
4
|
-
export
|
|
4
|
+
export { calendarDefinitions } from "./api.js";
|
|
5
|
+
export const { execute, get_letters, normalize_nfc, normalize_nfd, split_uyirmei, compose_uyirmei, inspect_tamil_string, compare, sort_words, sort_key, search_key, to_words, format_currency, currency_to_words, bamini_to_unicode, unicode_to_bamini, anjal_bytes_to_unicode, unicode_to_anjal_bytes, tam_bytes_to_unicode, unicode_to_tam_bytes, tab_bytes_to_unicode, unicode_to_tab_bytes, tscii_bytes_to_unicode, unicode_to_tscii_bytes, lt_tm_codes_to_unicode, lt_tm_text_to_unicode, unicode_to_lt_tm_codes, unicode_to_lt_tm_text, vanavil_codes_to_unicode, vanavil_text_to_unicode, unicode_to_vanavil_codes, unicode_to_vanavil_text, detect_encoding, detectEncoding, detect_and_decode, detectAndDecode, format_fraction, fraction_to_words, fraction_symbol, format_date, convert_digits, parse_decimal, format_decimal, decimal_to_words, ordinal_to_words, digit_sequence_to_words, format_currency_decimal, currency_decimal_to_words, parse_fraction_symbol, symbol_info, format_mixed_fraction, parse_mixed_fraction, format_traditional_integer, parse_traditional_integer, parse_percent, format_percent, ratio_to_percent, percent_to_ratio, format_numeric_range, validate_gregorian_date, parse_gregorian_date, weekday, add_gregorian_date, date_difference, date_interval, vakya_solar_transits, vakya_true_sun_from_mesha_elapsed, calendar_profile_info, gregorian_to_tamil_date, tamil_to_gregorian_date, tamil_month_info, tamil_year_info, tamil_year_cycle_info, calendar_official_holidays, calendar_observances, add_tamil_date, panchangam_at, panchangam_day, lunar_phase_events, calendar_daylight_periods } = createApi(nativeExecute);
|
|
6
|
+
const calendarApi = createApi(nativeExecute);
|
|
7
|
+
export const vakya_true_moon_from_kali_day = calendarApi.vakya_true_moon_from_kali_day;
|
|
8
|
+
export const vakya_reduce_to_local_true_sunrise = calendarApi.vakya_reduce_to_local_true_sunrise;
|
|
9
|
+
export const vakya_cara_from_sayana_sun = calendarApi.vakya_cara_from_sayana_sun;
|
|
10
|
+
export const vakya_desantara_from_yojana_distance = calendarApi.vakya_desantara_from_yojana_distance;
|
|
11
|
+
export const vakya_bhujaantara_from_true_sun = calendarApi.vakya_bhujaantara_from_true_sun;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tamil-toolkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.6",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {"type": "git", "url": "https://github.com/abishtakan/tamil-toolkit.git", "directory": "bindings/js-wasm"},
|
|
6
6
|
"homepage": "https://github.com/abishtakan/tamil-toolkit#readme",
|
package/pkg-node/README.md
CHANGED
|
@@ -20,19 +20,20 @@
|
|
|
20
20
|
| **Unicode and letters** | NFC/NFD normalization, tailored Tamil letter operations, and inspection. |
|
|
21
21
|
| **Ordering** | Stable Mei-first Agara collation and versioned sort/search keys. |
|
|
22
22
|
| **Numbers and dates** | Bounded TN/SL number words, exact INR/LKR amounts, fractions, and Gregorian dates. |
|
|
23
|
+
| **Tamil calendar** | Unreleased bounded Thirukanitham Gregorian/solar conversion and five-limb panchangam reports for declared TN/SL coordinates in 2024–2027. Its custom profile does not claim every publisher's Drik output; calendar fixtures remain planned. |
|
|
23
24
|
| **Legacy conversion** | Bamini text conversion, bounded TSCII/TAB/TAM/Anjal byte profiles, and LT-TM / IndoWord 16-bit CID conversion. |
|
|
24
25
|
|
|
25
26
|
TypeScript and WASM are thin bindings to the shared Rust implementation.
|
|
26
27
|
|
|
27
28
|
## Install
|
|
28
29
|
|
|
29
|
-
Node.js 22+ is supported. Install alpha
|
|
30
|
+
Node.js 22+ is supported. Install alpha 6 from npm’s `alpha` dist-tag:
|
|
30
31
|
|
|
31
32
|
```sh
|
|
32
33
|
npm install tamil-toolkit@alpha
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
The `alpha` tag points to `0.1.0-alpha.
|
|
36
|
+
The `alpha` tag points to `0.1.0-alpha.6`; npm’s `latest` tag still points to
|
|
36
37
|
`0.1.0-alpha.1`. The version badge above tracks the `alpha` tag.
|
|
37
38
|
|
|
38
39
|
## Node quick start
|
|
@@ -60,9 +61,9 @@ console.log(get_letters("தமிழ்").join(" | "));
|
|
|
60
61
|
The host page or bundler must serve the packaged WASM asset as an ES module
|
|
61
62
|
asset. The Node entry point initializes its native WASM module automatically.
|
|
62
63
|
|
|
63
|
-
## Alpha
|
|
64
|
+
## Alpha 6 scope
|
|
64
65
|
|
|
65
|
-
The npm `0.1.0-alpha.
|
|
66
|
+
The npm `0.1.0-alpha.6` package includes the capabilities listed above. The
|
|
66
67
|
shared `execute` API exposes `lt_tm_codes_to_unicode`, `lt_tm_text_to_unicode`,
|
|
67
68
|
`unicode_to_lt_tm_codes`, and `unicode_to_lt_tm_text`. LT-TM conversion handles
|
|
68
69
|
selected 16-bit code sequences; it does not parse PDFs, select font runs, or
|
|
@@ -86,7 +87,7 @@ const text = tamil.execute({ op: "lt_tm_codes_to_unicode", input: { codes } });
|
|
|
86
87
|
- [Unicode/core contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/core-v0.1.md)
|
|
87
88
|
- [Collation contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/collate-v0.1.md)
|
|
88
89
|
- [Numerals, fractions, and dates](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/numerals-v0.2.md)
|
|
89
|
-
- [Codec contract and alpha 3 limits](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/releases/alpha-
|
|
90
|
+
- [Codec contract and alpha 3 limits](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/releases/alpha-6.md#compatibility-and-scope)
|
|
90
91
|
- [LT-TM CID profile contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/codec-lt-tm.md)
|
|
91
92
|
- [Third-party notices](https://github.com/abishtakan/tamil-toolkit/blob/master/THIRD_PARTY_NOTICES.md)
|
|
92
93
|
|
package/pkg-node/package.json
CHANGED
|
Binary file
|
package/pkg-web/README.md
CHANGED
|
@@ -20,19 +20,20 @@
|
|
|
20
20
|
| **Unicode and letters** | NFC/NFD normalization, tailored Tamil letter operations, and inspection. |
|
|
21
21
|
| **Ordering** | Stable Mei-first Agara collation and versioned sort/search keys. |
|
|
22
22
|
| **Numbers and dates** | Bounded TN/SL number words, exact INR/LKR amounts, fractions, and Gregorian dates. |
|
|
23
|
+
| **Tamil calendar** | Unreleased bounded Thirukanitham Gregorian/solar conversion and five-limb panchangam reports for declared TN/SL coordinates in 2024–2027. Its custom profile does not claim every publisher's Drik output; calendar fixtures remain planned. |
|
|
23
24
|
| **Legacy conversion** | Bamini text conversion, bounded TSCII/TAB/TAM/Anjal byte profiles, and LT-TM / IndoWord 16-bit CID conversion. |
|
|
24
25
|
|
|
25
26
|
TypeScript and WASM are thin bindings to the shared Rust implementation.
|
|
26
27
|
|
|
27
28
|
## Install
|
|
28
29
|
|
|
29
|
-
Node.js 22+ is supported. Install alpha
|
|
30
|
+
Node.js 22+ is supported. Install alpha 6 from npm’s `alpha` dist-tag:
|
|
30
31
|
|
|
31
32
|
```sh
|
|
32
33
|
npm install tamil-toolkit@alpha
|
|
33
34
|
```
|
|
34
35
|
|
|
35
|
-
The `alpha` tag points to `0.1.0-alpha.
|
|
36
|
+
The `alpha` tag points to `0.1.0-alpha.6`; npm’s `latest` tag still points to
|
|
36
37
|
`0.1.0-alpha.1`. The version badge above tracks the `alpha` tag.
|
|
37
38
|
|
|
38
39
|
## Node quick start
|
|
@@ -60,9 +61,9 @@ console.log(get_letters("தமிழ்").join(" | "));
|
|
|
60
61
|
The host page or bundler must serve the packaged WASM asset as an ES module
|
|
61
62
|
asset. The Node entry point initializes its native WASM module automatically.
|
|
62
63
|
|
|
63
|
-
## Alpha
|
|
64
|
+
## Alpha 6 scope
|
|
64
65
|
|
|
65
|
-
The npm `0.1.0-alpha.
|
|
66
|
+
The npm `0.1.0-alpha.6` package includes the capabilities listed above. The
|
|
66
67
|
shared `execute` API exposes `lt_tm_codes_to_unicode`, `lt_tm_text_to_unicode`,
|
|
67
68
|
`unicode_to_lt_tm_codes`, and `unicode_to_lt_tm_text`. LT-TM conversion handles
|
|
68
69
|
selected 16-bit code sequences; it does not parse PDFs, select font runs, or
|
|
@@ -86,7 +87,7 @@ const text = tamil.execute({ op: "lt_tm_codes_to_unicode", input: { codes } });
|
|
|
86
87
|
- [Unicode/core contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/core-v0.1.md)
|
|
87
88
|
- [Collation contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/collate-v0.1.md)
|
|
88
89
|
- [Numerals, fractions, and dates](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/numerals-v0.2.md)
|
|
89
|
-
- [Codec contract and alpha 3 limits](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/releases/alpha-
|
|
90
|
+
- [Codec contract and alpha 3 limits](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/releases/alpha-6.md#compatibility-and-scope)
|
|
90
91
|
- [LT-TM CID profile contract](https://github.com/abishtakan/tamil-toolkit/blob/master/docs/specs/codec-lt-tm.md)
|
|
91
92
|
- [Third-party notices](https://github.com/abishtakan/tamil-toolkit/blob/master/THIRD_PARTY_NOTICES.md)
|
|
92
93
|
|
package/pkg-web/package.json
CHANGED
|
Binary file
|