@hebcal/leyning 9.0.2 → 9.0.4

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.
@@ -1,9 +0,0 @@
1
- import { JsonFestivalLeyning } from './internalTypes';
2
- /**
3
- * Is there a special festival Torah Reading for `holiday`?
4
- */
5
- export declare function hasFestival(holiday: string): boolean;
6
- /**
7
- * Returns the raw metadata for festival reading for `holiday`
8
- */
9
- export declare function lookupFestival(holiday: string): JsonFestivalLeyning | undefined;
@@ -1,17 +0,0 @@
1
- import { Event } from '@hebcal/core/dist/esm/event';
2
- import { Leyning } from './types';
3
- /**
4
- * Looks up leyning for a given holiday key. Key should be an
5
- * (untranslated) string used in holiday-readings.json. Returns some
6
- * of full kriyah aliyot, special Maftir, special Haftarah
7
- * @param key name from `holiday-readings.json` to find
8
- */
9
- export declare function getLeyningForHolidayKey(key?: string, cholHaMoedDay?: number, il?: boolean): Leyning | undefined;
10
- /**
11
- * Looks up leyning for a given holiday. Returns some
12
- * of full kriyah aliyot, special Maftir, special Haftarah
13
- * @param ev the Hebcal event associated with this leyning
14
- * @param [il] true if Israel holiday scheme
15
- * @returns map of aliyot
16
- */
17
- export declare function getLeyningForHoliday(ev: Event, il?: boolean): Leyning | undefined;
@@ -1,9 +0,0 @@
1
- import { Event } from '@hebcal/core/dist/esm/event';
2
- export declare const HOLIDAY_IGNORE_MASK: number;
3
- /**
4
- * Based on the event date, type and title, finds the relevant leyning key
5
- * @param ev event
6
- * @param [il] true if Israel holiday scheme
7
- * @returns key to look up in holiday-reading.json
8
- */
9
- export declare function getLeyningKeyForEvent(ev: Event, il?: boolean): string | undefined;
@@ -1,21 +0,0 @@
1
- import { HDate } from '@hebcal/hdate';
2
- import { Leyning, LeyningWeekday } from './types';
3
- /**
4
- * Looks up leyning for a regular Shabbat, Monday/Thursday weekday or holiday.
5
- *
6
- * If `hdate` coincides with a holiday that has Torah reading, returns the
7
- * reading for that day (see {@link getLeyningForHoliday})
8
- *
9
- * Otherwise, if `hdate` is a Saturday, returns {@link getLeyningForParshaHaShavua}
10
- *
11
- * Otherwise, if `hdate` is a Monday or Thursday, returns {@link Leyning} for the
12
- * Parashat haShavua, containing only the `weekday` aliyot (no `fullkriyah`).
13
- *
14
- * Otherwise, returns `undefined`.
15
- *
16
- * @param {HDate} hdate Hebrew Date
17
- * @param {boolean} il in Israel
18
- * @param {boolean} [wantarray] to return an array of 0 or more readings
19
- */
20
- export declare function getLeyningOnDate(hdate: HDate, il: boolean, wantarray?: false): Leyning | LeyningWeekday | undefined;
21
- export declare function getLeyningOnDate(hdate: HDate, il: boolean, wantarray: true): (Leyning | LeyningWeekday)[];
package/dist/he.po.d.ts DELETED
@@ -1,61 +0,0 @@
1
- declare const _default: {
2
- headers: {
3
- "plural-forms": string;
4
- };
5
- contexts: {
6
- "": {
7
- "Shabbat Machar Chodesh": string[];
8
- "Shabbat Rosh Chodesh": string[];
9
- "Pesach I (on Shabbat)": string[];
10
- "Pesach Chol ha-Moed Day 1": string[];
11
- "Pesach Chol ha-Moed Day 2": string[];
12
- "Pesach Chol ha-Moed Day 2 on Sunday": string[];
13
- "Pesach Chol ha-Moed Day 3": string[];
14
- "Pesach Chol ha-Moed Day 3 on Monday": string[];
15
- "Pesach Chol ha-Moed Day 4": string[];
16
- "Pesach Chol ha-Moed Day 5": string[];
17
- "Pesach Shabbat Chol ha-Moed": string[];
18
- "Pesach VII (on Shabbat)": string[];
19
- "Pesach VIII (on Shabbat)": string[];
20
- "Shavuot II (on Shabbat)": string[];
21
- "Rosh Hashana I (on Shabbat)": string[];
22
- "Yom Kippur (on Shabbat)": string[];
23
- "Yom Kippur (Mincha, Traditional)": string[];
24
- "Yom Kippur (Mincha, Alternate)": string[];
25
- "Sukkot I (on Shabbat)": string[];
26
- "Sukkot Chol ha-Moed Day 1": string[];
27
- "Sukkot Chol ha-Moed Day 2": string[];
28
- "Sukkot Chol ha-Moed Day 3": string[];
29
- "Sukkot Chol ha-Moed Day 4": string[];
30
- "Sukkot Chol ha-Moed Day 5": string[];
31
- "Sukkot Shabbat Chol ha-Moed": string[];
32
- "Sukkot Final Day (Hoshana Raba)": string[];
33
- "Shmini Atzeret (on Shabbat)": string[];
34
- "Chanukah Day 1": string[];
35
- "Chanukah Day 2": string[];
36
- "Chanukah Day 3": string[];
37
- "Chanukah Day 4": string[];
38
- "Chanukah Day 5": string[];
39
- "Chanukah Day 6": string[];
40
- "Chanukah Day 7": string[];
41
- "Chanukah Day 7 (on Rosh Chodesh)": string[];
42
- "Chanukah Day 8": string[];
43
- "Chanukah Day 1 (on Shabbat)": string[];
44
- "Chanukah Day 2 (on Shabbat)": string[];
45
- "Chanukah Day 3 (on Shabbat)": string[];
46
- "Chanukah Day 4 (on Shabbat)": string[];
47
- "Chanukah Day 5 (on Shabbat)": string[];
48
- "Chanukah Day 7 (on Shabbat)": string[];
49
- "Chanukah Day 8 (on Shabbat)": string[];
50
- "Shabbat Rosh Chodesh Chanukah": string[];
51
- "Yom Kippur (Mincha)": string[];
52
- "Tish'a B'Av (Mincha)": string[];
53
- "Asara B'Tevet (Mincha)": string[];
54
- "Ta'anit Bechorot (Mincha)": string[];
55
- "Ta'anit Esther (Mincha)": string[];
56
- "Tzom Gedaliah (Mincha)": string[];
57
- "Tzom Tammuz (Mincha)": string[];
58
- };
59
- };
60
- };
61
- export default _default;
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
1
- export * from './types';
2
- export * from './locale';
3
- export * from './common';
4
- export * from './summary';
5
- export * from './festival';
6
- export { getLeyningKeyForEvent } from './getLeyningKeyForEvent';
7
- export * from './specialReadings';
8
- export * from './getLeyningForHoliday';
9
- export * from './leyning';
10
- export { getLeyningOnDate } from './getLeyningOnDate';
11
- export * from './clone';
@@ -1,20 +0,0 @@
1
- export type JsonFestivalAliyah = {
2
- k: number | string;
3
- b: string;
4
- e: string;
5
- v?: number;
6
- p?: number;
7
- };
8
- export type JsonFestivalAliyotMap = {
9
- [key: string]: JsonFestivalAliyah;
10
- };
11
- export type JsonFestivalLeyning = {
12
- haft?: JsonFestivalAliyah | JsonFestivalAliyah[];
13
- seph?: JsonFestivalAliyah | JsonFestivalAliyah[];
14
- fullkriyah?: JsonFestivalAliyotMap;
15
- megillah?: string;
16
- alias?: boolean;
17
- key?: string;
18
- note?: string;
19
- il?: boolean;
20
- };
package/dist/leyning.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import { Event } from '@hebcal/core/dist/esm/event';
2
- import { AliyotMap, Leyning, LeyningNames, ParshaMeta } from './types';
3
- /**
4
- * Transliterated English and Hebrew names of this parsha
5
- * @param parsha untranslated name like ['Pinchas'] or ['Matot','Masei']
6
- */
7
- export declare function makeLeyningNames(parsha: string[]): LeyningNames;
8
- /**
9
- * Looks up Monday/Thursday aliyot for a regular parsha
10
- * @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
11
- */
12
- export declare function getWeekdayReading(parsha: string | string[]): AliyotMap;
13
- /**
14
- * Looks up regular leyning for a weekly parsha with no special readings
15
- * @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
16
- */
17
- export declare function getLeyningForParsha(parsha: string | string[]): Leyning;
18
- /**
19
- * Looks up leyning for a regular Shabbat parsha, including any special
20
- * maftir or Haftara.
21
- * @param ev the Hebcal event associated with this leyning
22
- * @param [il] in Israel
23
- * @returns map of aliyot
24
- */
25
- export declare function getLeyningForParshaHaShavua(ev: Event, il?: boolean): Leyning;
26
- /**
27
- * Returns the parsha metadata
28
- * @param parsha untranslated name like 'Pinchas' or ['Pinchas'] or ['Matot','Masei']
29
- */
30
- export declare function lookupParsha(parsha: string | string[]): ParshaMeta;
package/dist/locale.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { Locale } from '@hebcal/core/dist/esm/locale';
2
- export { Locale };
@@ -1,15 +0,0 @@
1
- import { HDate } from '@hebcal/hdate';
2
- import { AliyotMap, SpecialReading } from './types';
3
- /**
4
- * Determines if the regular parashat haShavua coincides with an event that requires
5
- * a special maftir or Haftara (for example Shabbat HaGadol, Shabbat Chanukah, Rosh
6
- * Chodesh or Machar Chodesh, etc.).
7
- *
8
- * This function does not modify `aliyot`. Instead, it returns a deep copy
9
- * with `aliyot['M']` replaced and sets `reason.M`
10
- * (and in some cases the 6th and 7th aliyah, setting `reason['7']`).
11
- *
12
- * If a special Haftarah applies, the result will have a `haft` property
13
- * pointing to Haftarah object and sets `reason.haftara`.
14
- */
15
- export declare function specialReadings2(parsha: string[], hd: HDate, il: boolean, aliyot: AliyotMap): SpecialReading;
package/dist/summary.d.ts DELETED
@@ -1,18 +0,0 @@
1
- import { Aliyah, AliyotMap } from './types';
2
- /**
3
- * Summarizes an `AliyotMap` by collapsing all adjacent aliyot.
4
- * Finds any non-overlapping parts (e.g. special 7th aliyah or maftir)
5
- */
6
- export declare function makeLeyningParts(aliyot: AliyotMap): Aliyah[];
7
- /**
8
- * Returns a string representation of the leyning parts.
9
- * Separate verse ranges read from the same book are separated
10
- * by commas, e.g. `Isaiah 6:1-7:6, 9:5-6`.
11
- * Verse ranges from different books are separated by semicolons,
12
- * e.g. `Genesis 21:1-34; Numbers 29:1-6`.
13
- */
14
- export declare function makeSummaryFromParts(parts: Aliyah | Aliyah[]): string;
15
- /**
16
- * Makes a summary of the leyning, like "Genesis 6:9-11:32"
17
- */
18
- export declare function makeLeyningSummary(aliyot: AliyotMap): string;
package/dist/types.d.ts DELETED
@@ -1,130 +0,0 @@
1
- /**
2
- * Represents an aliyah
3
- */
4
- export type Aliyah = {
5
- /** Book (e.g. "Numbers") */
6
- k: string;
7
- /** beginning verse (e.g. "28:9") */
8
- b: string;
9
- /** ending verse (e.g. "28:15") */
10
- e: string;
11
- /** number of verses */
12
- v?: number;
13
- /** parsha number (1=Bereshit, 54=Vezot HaBracha) */
14
- p?: number;
15
- reason?: string;
16
- };
17
- export type StringMap = {
18
- [key: string]: string;
19
- };
20
- export type AliyotMap = {
21
- [key: string]: Aliyah;
22
- };
23
- /** Name of the parsha hashavua or holiday */
24
- export type LeyningNames = {
25
- /** English */
26
- en: string;
27
- /** Hebrew (with nikud) */
28
- he: string;
29
- };
30
- /**
31
- * Parsha metadata (underlying JSON object)
32
- */
33
- export type ParshaMeta = {
34
- /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
35
- num: number | number[];
36
- /** parsha name in Hebrew with niqud */
37
- hebrew: string;
38
- /** 1 for Genesis, 2 for Exodus, 5 for Deuteronomy */
39
- book: number;
40
- /** Haftarah object(s) */
41
- haft: Aliyah | Aliyah[];
42
- /** Haftarah object(s) for Sephardim */
43
- seph?: Aliyah | Aliyah[];
44
- /** Map of Shabbat aliyot `1` through `7` plus `M` for maftir */
45
- fullkriyah: {
46
- [key: string]: string[];
47
- };
48
- /**
49
- * Map of weekday Torah Readings
50
- * aliyot `1` through `3` for Monday and Thursday
51
- */
52
- weekday?: {
53
- [key: string]: string[];
54
- };
55
- combined?: boolean;
56
- p1?: string;
57
- p2?: string;
58
- num1?: number;
59
- num2?: number;
60
- };
61
- export type SpecialReading = {
62
- /** Map of aliyot `1` through `7` plus `M` for maftir */
63
- aliyot: AliyotMap;
64
- /**
65
- * Explanations for special readings,
66
- * keyed by aliyah number, `M` for maftir or `haftara` for Haftarah
67
- */
68
- reason: StringMap;
69
- /** Haftarah object(s) */
70
- haft?: Aliyah | Aliyah[];
71
- /** Haftarah object(s) for Sephardim */
72
- seph?: Aliyah | Aliyah[];
73
- };
74
- /**
75
- * Leyning base - weekday, parsha hashavua or holiday
76
- */
77
- export type LeyningBase = {
78
- /** Name of the parsha hashavua or holiday */
79
- name: LeyningNames;
80
- /** Such as `Genesis 1:1 - 6:8` */
81
- summary: string;
82
- summaryParts?: Aliyah[];
83
- note?: string;
84
- };
85
- /**
86
- * Parashat haShavua - weekday or Shabbat
87
- */
88
- export type LeyningParshaHaShavua = LeyningBase & {
89
- /** An array of either 1 (regular) or 2 (doubled parsha). `undefined` for holiday readings */
90
- parsha?: string[];
91
- /** 1 for Bereshit, 2 for Noach, etc. `undefined` for holiday readings */
92
- parshaNum?: number | number[];
93
- };
94
- /**
95
- * Parashat haShavua - weekday
96
- */
97
- export type LeyningWeekday = LeyningParshaHaShavua & {
98
- /** Optional map of weekday Torah Readings aliyot `1` through `3` for Monday and Thursday */
99
- weekday?: AliyotMap;
100
- };
101
- export type HaftarahProps = {
102
- /** Haftarah object */
103
- haft: Aliyah | Aliyah[];
104
- /** Haftarah, such as `Isaiah 42:5 – 43:11` */
105
- haftara: string;
106
- /** Number of verses in the Haftarah */
107
- haftaraNumV?: number;
108
- };
109
- /**
110
- * Shabbat and holiday leyning always has full kriyah and haftarah
111
- */
112
- export type LeyningShabbatHoliday = LeyningBase & HaftarahProps & {
113
- /** Map of aliyot `1` through `7` plus `M` for maftir */
114
- fullkriyah: AliyotMap;
115
- /** Haftarah object for Sephardim */
116
- seph?: Aliyah | Aliyah[];
117
- /** Haftarah for Sephardim, such as `Isaiah 42:5 - 42:21` */
118
- sephardic?: string;
119
- /** Number of verses in the Haftarah for Sephardim */
120
- sephardicNumV?: number;
121
- /** Explanations for special readings, keyed by aliyah number, `M` for maftir or `haftara` for Haftarah */
122
- reason?: StringMap;
123
- /** Song of Songs is read on the sabbath of Passover week, the Book of Ruth on Shavuot, Lamentations on Tisha be-Av, Ecclesiastes on the sabbath of the week of Sukkoth, and the Book of Esther on Purim */
124
- megillah?: AliyotMap;
125
- /** Triennial alternate Haftara */
126
- triHaftara?: string;
127
- /** Triennial alternate Haftara number of verses */
128
- triHaftaraNumV?: number;
129
- };
130
- export type Leyning = LeyningBase & LeyningParshaHaShavua & LeyningShabbatHoliday & LeyningWeekday;