@hebcal/leyning 4.20.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.js +369 -1316
- package/dist/bundle.min.js +2 -2
- package/dist/index.js +69 -150
- package/dist/index.mjs +71 -138
- package/leyning.d.ts +25 -31
- package/package.json +1 -1
package/leyning.d.ts
CHANGED
|
@@ -28,8 +28,11 @@ declare module '@hebcal/leyning' {
|
|
|
28
28
|
* Leyning for a parsha hashavua or holiday
|
|
29
29
|
*/
|
|
30
30
|
export type Leyning = {
|
|
31
|
+
/** Name of the parsha hashavua or holiday */
|
|
31
32
|
name: {
|
|
33
|
+
/** English */
|
|
32
34
|
en: string;
|
|
35
|
+
/** Hebrew (with nikud) */
|
|
33
36
|
he: string;
|
|
34
37
|
};
|
|
35
38
|
/** An array of either 1 (regular) or 2 (doubled parsha). `undefined` for holiday readings */
|
|
@@ -78,24 +81,6 @@ declare module '@hebcal/leyning' {
|
|
|
78
81
|
*/
|
|
79
82
|
export function getLeyningOnDate(hdate: HDate, il: boolean): Leyning;
|
|
80
83
|
|
|
81
|
-
/**
|
|
82
|
-
* Represents triennial aliyot for a given date
|
|
83
|
-
*/
|
|
84
|
-
export type TriennialAliyot = {
|
|
85
|
-
/** Map of aliyot `1` through `7` plus `M` for maftir */
|
|
86
|
-
aliyot: AliyotMap;
|
|
87
|
-
/** year number, 0-2 */
|
|
88
|
-
yearNum: number;
|
|
89
|
-
/** Shabbat date for when this parsha is read in this 3-year cycle */
|
|
90
|
-
date: Date;
|
|
91
|
-
/** true if a double parsha is read separately in year `yearNum` */
|
|
92
|
-
readSeparately?: boolean;
|
|
93
|
-
/** Shabbat date of the first part of a read-separately aliyah pair */
|
|
94
|
-
date1?: Date;
|
|
95
|
-
/** Shabbat date of the second part of a read-separately aliyah pair */
|
|
96
|
-
date2?: Date;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
84
|
/**
|
|
100
85
|
* Makes a summary of the leyning, like "Genesis 6:9-11:32"
|
|
101
86
|
*/
|
|
@@ -153,6 +138,24 @@ declare module '@hebcal/leyning' {
|
|
|
153
138
|
*/
|
|
154
139
|
export function formatAliyahShort(aliyah: Aliyah, showBook: boolean): string;
|
|
155
140
|
|
|
141
|
+
/**
|
|
142
|
+
* Represents triennial aliyot for a given date
|
|
143
|
+
*/
|
|
144
|
+
export type TriennialAliyot = {
|
|
145
|
+
/** Map of aliyot `1` through `7` plus `M` for maftir */
|
|
146
|
+
aliyot: AliyotMap;
|
|
147
|
+
/** year number, 0-2 */
|
|
148
|
+
yearNum: number;
|
|
149
|
+
/** Shabbat date for when this parsha is read in this 3-year cycle */
|
|
150
|
+
date: Date;
|
|
151
|
+
/** true if a double parsha is read separately in year `yearNum` */
|
|
152
|
+
readSeparately?: boolean;
|
|
153
|
+
/** Shabbat date of the first part of a read-separately aliyah pair */
|
|
154
|
+
date1?: Date;
|
|
155
|
+
/** Shabbat date of the second part of a read-separately aliyah pair */
|
|
156
|
+
date2?: Date;
|
|
157
|
+
};
|
|
158
|
+
|
|
156
159
|
/**
|
|
157
160
|
* Triennial Torah readings
|
|
158
161
|
*/
|
|
@@ -182,26 +185,17 @@ declare module '@hebcal/leyning' {
|
|
|
182
185
|
/**
|
|
183
186
|
* Looks up triennial leyning for a regular Shabbat parsha.
|
|
184
187
|
* @param ev - the Hebcal event associated with this parsha
|
|
185
|
-
* @param [context] returns a reading wrapper object which includes `date`, `yearNum` and `aliyot`
|
|
186
188
|
* @returns a map of aliyot 1-7 plus "M"
|
|
187
189
|
*/
|
|
188
|
-
export function getTriennialForParshaHaShavua(ev: Event
|
|
190
|
+
export function getTriennialForParshaHaShavua(ev: Event): TriennialAliyot;
|
|
189
191
|
|
|
190
192
|
export function getTriennialHaftaraForHoliday(holiday: string, yearNum: number): any;
|
|
191
193
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Names of the books of the Torah. BOOK[1] === 'Genesis'
|
|
196
|
+
*/
|
|
194
197
|
export const BOOK: string[];
|
|
195
198
|
|
|
196
199
|
export function writeTriennialCsv(stream: WriteStream, hyear: number): void;
|
|
197
200
|
export function writeFullKriyahCsv(stream: WriteStream, hyear: number, il: boolean): void;
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* Makes Sefaria links by adding `href`, `verses` and `num` attributes to each aliyah.
|
|
201
|
-
* CAUTION: Modifies the `aliyot` parameter instead of making a copy.
|
|
202
|
-
* @deprecated
|
|
203
|
-
* @param aliyot - aliyah map to decorate
|
|
204
|
-
* @param showBook - display the book name in the `verses` field (e.g. for special Maftir)
|
|
205
|
-
*/
|
|
206
|
-
export function addSefariaLinksToLeyning(aliyot: AliyotMap, showBook: boolean): void;
|
|
207
201
|
}
|