bn-calendar 1.2.4 → 1.2.10

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.
@@ -14,8 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./object-D70hzkoY-JjxsmDJd.mjs";
18
-
17
+ import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./index-RyvzOKVa-BA85h5wj.cjs";
19
18
  //#region src/constants.d.ts
20
19
  /** Bangla month days table for different variants */
21
20
  declare const BN_MONTH_TABLES: Readonly<{
@@ -186,16 +185,6 @@ type $BanglaYear<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? number : B
186
185
  type $BanglaMonth<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? NumberRange<1, 12> : BanglaMonth;
187
186
  /** Represents Bangla date of the month either in Bangla digit or Latin from 1-31 */
188
187
  type $BanglaMonthDate<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? NumberRange<1, 31> : BanglaDate;
189
- /** Represents a Bangla date object for `Chronos` plugin */
190
- type BanglaDateObject<Locale extends $BnEn = 'bn'> = {
191
- /** Represents Bangla year either in Bangla digit or Latin from 1-12 */year: $BanglaYear<Locale>; /** Represents Bangla month either in Bangla digit or Latin from 1-12 */
192
- month: $BanglaMonth<Locale>; /** Represents Bangla date of the month either in Bangla digit or Latin from 1-31 */
193
- date: $BanglaMonthDate<Locale>; /** Bangla name of the weekday either in Bangla or Latin */
194
- dayName: BanglaDayName<Locale>; /** Bangla name of the month either in Bangla or Latin */
195
- monthName: BanglaMonthName<Locale>; /** Bangla name of the season either in Bangla or Latin */
196
- seasonName: BanglaSeasonName<Locale>; /** Leap year status of the current year */
197
- isLeapYear: boolean;
198
- };
199
188
  /** Variant of Bangla calendar system */
200
189
  type BnCalendarVariant = keyof typeof BN_MONTH_TABLES;
201
190
  /** Configuration object for Bangla Calendar system */
@@ -203,10 +192,5 @@ interface BnCalendarConfig {
203
192
  /** - Calendar variant to use. Defaults to `'revised-2019'`. */
204
193
  variant?: BnCalendarVariant;
205
194
  }
206
- /** Bangla date options for `Chronos` plugin (`banglaPlugin`) */
207
- interface BanglaDateOptions<Locale extends $BnEn> extends BnCalendarConfig {
208
- /** - Locale to use for output values. Defaults to `'bn'`. */
209
- locale?: Locale | $BnEn;
210
- }
211
195
  //#endregion
212
- export { MSToken as C, TimeToken as D, SecondToken as E, YearToken as O, HourToken as S, MonthToken as T, BnCalendarConfig as _, $BnEn as a, DateWithSeasonToken as b, BanglaDate as c, BanglaDateOptions as d, BanglaDayName as f, BanglaYear as g, BanglaSeasonName as h, $BnDatePadded as i, BanglaDateFormat as l, BanglaMonthName as m, $BanglaMonthDate as n, $BnMonthPadded as o, BanglaMonth as p, $BanglaYear as r, $BnYearPadded as s, $BanglaMonth as t, BanglaDateObject as u, BnCalendarVariant as v, MinuteToken as w, DayToken as x, DateToken as y };
196
+ export { MonthToken as C, YearToken as E, MinuteToken as S, TimeToken as T, DateToken as _, $BnEn as a, HourToken as b, BanglaDate as c, BanglaMonth as d, BanglaMonthName as f, BnCalendarVariant as g, BnCalendarConfig as h, $BnDatePadded as i, BanglaDateFormat as l, BanglaYear as m, $BanglaMonthDate as n, $BnMonthPadded as o, BanglaSeasonName as p, $BanglaYear as r, $BnYearPadded as s, $BanglaMonth as t, BanglaDayName as u, DateWithSeasonToken as v, SecondToken as w, MSToken as x, DayToken as y };
@@ -14,8 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./object-D70hzkoY-JjxsmDJd.cjs";
18
-
17
+ import { c as Repeat, i as DateFormatToken, n as BanglaDigit, o as LooseLiteral, s as NumberRange, t as $BnOnes } from "./index-RyvzOKVa-BA85h5wj.mjs";
19
18
  //#region src/constants.d.ts
20
19
  /** Bangla month days table for different variants */
21
20
  declare const BN_MONTH_TABLES: Readonly<{
@@ -186,16 +185,6 @@ type $BanglaYear<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? number : B
186
185
  type $BanglaMonth<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? NumberRange<1, 12> : BanglaMonth;
187
186
  /** Represents Bangla date of the month either in Bangla digit or Latin from 1-31 */
188
187
  type $BanglaMonthDate<Locale extends $BnEn = 'bn'> = Locale extends 'en' ? NumberRange<1, 31> : BanglaDate;
189
- /** Represents a Bangla date object for `Chronos` plugin */
190
- type BanglaDateObject<Locale extends $BnEn = 'bn'> = {
191
- /** Represents Bangla year either in Bangla digit or Latin from 1-12 */year: $BanglaYear<Locale>; /** Represents Bangla month either in Bangla digit or Latin from 1-12 */
192
- month: $BanglaMonth<Locale>; /** Represents Bangla date of the month either in Bangla digit or Latin from 1-31 */
193
- date: $BanglaMonthDate<Locale>; /** Bangla name of the weekday either in Bangla or Latin */
194
- dayName: BanglaDayName<Locale>; /** Bangla name of the month either in Bangla or Latin */
195
- monthName: BanglaMonthName<Locale>; /** Bangla name of the season either in Bangla or Latin */
196
- seasonName: BanglaSeasonName<Locale>; /** Leap year status of the current year */
197
- isLeapYear: boolean;
198
- };
199
188
  /** Variant of Bangla calendar system */
200
189
  type BnCalendarVariant = keyof typeof BN_MONTH_TABLES;
201
190
  /** Configuration object for Bangla Calendar system */
@@ -203,10 +192,5 @@ interface BnCalendarConfig {
203
192
  /** - Calendar variant to use. Defaults to `'revised-2019'`. */
204
193
  variant?: BnCalendarVariant;
205
194
  }
206
- /** Bangla date options for `Chronos` plugin (`banglaPlugin`) */
207
- interface BanglaDateOptions<Locale extends $BnEn> extends BnCalendarConfig {
208
- /** - Locale to use for output values. Defaults to `'bn'`. */
209
- locale?: Locale | $BnEn;
210
- }
211
195
  //#endregion
212
- export { MSToken as C, TimeToken as D, SecondToken as E, YearToken as O, HourToken as S, MonthToken as T, BnCalendarConfig as _, $BnEn as a, DateWithSeasonToken as b, BanglaDate as c, BanglaDateOptions as d, BanglaDayName as f, BanglaYear as g, BanglaSeasonName as h, $BnDatePadded as i, BanglaDateFormat as l, BanglaMonthName as m, $BanglaMonthDate as n, $BnMonthPadded as o, BanglaMonth as p, $BanglaYear as r, $BnYearPadded as s, $BanglaMonth as t, BanglaDateObject as u, BnCalendarVariant as v, MinuteToken as w, DayToken as x, DateToken as y };
196
+ export { MonthToken as C, YearToken as E, MinuteToken as S, TimeToken as T, DateToken as _, $BnEn as a, HourToken as b, BanglaDate as c, BanglaMonth as d, BanglaMonthName as f, BnCalendarVariant as g, BnCalendarConfig as h, $BnDatePadded as i, BanglaDateFormat as l, BanglaYear as m, $BanglaMonthDate as n, $BnMonthPadded as o, BanglaSeasonName as p, $BanglaYear as r, $BnYearPadded as s, $BanglaMonth as t, BanglaDayName as u, DateWithSeasonToken as v, SecondToken as w, MSToken as x, DayToken as y };
package/dist/types.d.cts CHANGED
@@ -14,5 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as MSToken, D as TimeToken, E as SecondToken, O as YearToken, S as HourToken, T as MonthToken, _ as BnCalendarConfig, a as $BnEn, b as DateWithSeasonToken, c as BanglaDate, d as BanglaDateOptions, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaMonthName, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaMonth, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDateObject, v as BnCalendarVariant, w as MinuteToken, x as DayToken, y as DateToken } from "./types-BKGg1Ls7.cjs";
18
- export { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, BanglaDate, BanglaDateFormat, BanglaDateObject, BanglaDateOptions, BanglaDayName, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, DateToken, DateWithSeasonToken, DayToken, HourToken, MSToken, MinuteToken, MonthToken, SecondToken, TimeToken, YearToken };
17
+ import { i as DateFormatToken, n as BanglaDigit, s as NumberRange } from "./index-RyvzOKVa-BA85h5wj.cjs";
18
+ import { C as MonthToken, E as YearToken, S as MinuteToken, T as TimeToken, _ as DateToken, a as $BnEn, b as HourToken, c as BanglaDate, d as BanglaMonth, f as BanglaMonthName, g as BnCalendarVariant, h as BnCalendarConfig, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaYear, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaSeasonName, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDayName, v as DateWithSeasonToken, w as SecondToken, x as MSToken, y as DayToken } from "./types-CaovKlY-.cjs";
19
+ export { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, BanglaDate, BanglaDateFormat, BanglaDayName, type BanglaDigit, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, type DateFormatToken, DateToken, DateWithSeasonToken, DayToken, HourToken, MSToken, MinuteToken, MonthToken, type NumberRange, SecondToken, TimeToken, YearToken };
package/dist/types.d.mts CHANGED
@@ -14,5 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { C as MSToken, D as TimeToken, E as SecondToken, O as YearToken, S as HourToken, T as MonthToken, _ as BnCalendarConfig, a as $BnEn, b as DateWithSeasonToken, c as BanglaDate, d as BanglaDateOptions, f as BanglaDayName, g as BanglaYear, h as BanglaSeasonName, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaMonthName, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaMonth, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDateObject, v as BnCalendarVariant, w as MinuteToken, x as DayToken, y as DateToken } from "./types-CdJOp5Bk.mjs";
18
- export { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, BanglaDate, BanglaDateFormat, BanglaDateObject, BanglaDateOptions, BanglaDayName, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, DateToken, DateWithSeasonToken, DayToken, HourToken, MSToken, MinuteToken, MonthToken, SecondToken, TimeToken, YearToken };
17
+ import { i as DateFormatToken, n as BanglaDigit, s as NumberRange } from "./index-RyvzOKVa-BA85h5wj.mjs";
18
+ import { C as MonthToken, E as YearToken, S as MinuteToken, T as TimeToken, _ as DateToken, a as $BnEn, b as HourToken, c as BanglaDate, d as BanglaMonth, f as BanglaMonthName, g as BnCalendarVariant, h as BnCalendarConfig, i as $BnDatePadded, l as BanglaDateFormat, m as BanglaYear, n as $BanglaMonthDate, o as $BnMonthPadded, p as BanglaSeasonName, r as $BanglaYear, s as $BnYearPadded, t as $BanglaMonth, u as BanglaDayName, v as DateWithSeasonToken, w as SecondToken, x as MSToken, y as DayToken } from "./types-HdT16D_P.mjs";
19
+ export { $BanglaMonth, $BanglaMonthDate, $BanglaYear, $BnDatePadded, $BnEn, $BnMonthPadded, $BnYearPadded, BanglaDate, BanglaDateFormat, BanglaDayName, type BanglaDigit, BanglaMonth, BanglaMonthName, BanglaSeasonName, BanglaYear, BnCalendarConfig, BnCalendarVariant, type DateFormatToken, DateToken, DateWithSeasonToken, DayToken, HourToken, MSToken, MinuteToken, MonthToken, type NumberRange, SecondToken, TimeToken, YearToken };
package/dist/utils.cjs CHANGED
@@ -15,7 +15,7 @@
15
15
  */
16
16
 
17
17
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
18
- const require_dist = require('./dist-BasKGWW6.cjs');
18
+ const require_dist = require('./dist-DUk8hJtq.cjs');
19
19
 
20
20
  exports.banglaToDigit = require_dist.banglaToDigit;
21
21
  exports.digitToBangla = require_dist.digitToBangla;
package/dist/utils.d.cts CHANGED
@@ -14,9 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { r as BnDigitResult } from "./object-D70hzkoY-JjxsmDJd.cjs";
18
-
19
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/string-DXiOVFK6.d.mts
17
+ import { r as BnDigitResult } from "./index-RyvzOKVa-BA85h5wj.cjs";
18
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/string-DLPDu7c5.d.mts
20
19
  //#region src/types/string.d.ts
21
20
  declare global {
22
21
  interface String {
@@ -44,9 +43,8 @@ declare global {
44
43
  toUpperCase<Upper extends 'T' | Uppercase<string>>(): Upper extends 'T' ? Uppercase<string> : Upper;
45
44
  }
46
45
  }
47
- /** - Options for generating anagrams. */
48
46
  //#endregion
49
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/index.d.mts
47
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/index.d.mts
50
48
  /**
51
49
  * * Converts Bangla (Arabic system) digits to Latin (Arabic system) digits.
52
50
  *
@@ -90,13 +88,6 @@ declare function banglaToDigit<Force extends boolean = true>(bnDigit: string, fo
90
88
  * digitToBangla('12ab', false); // "১২"
91
89
  * digitToBangla('12ab'); // "১২ab"
92
90
  */
93
- declare function digitToBangla(digit: number | string, preserveNonDigit?: boolean): string; //#endregion
94
- //#region src/number/prime.d.ts
95
- /**
96
- * * Checks if a number is prime.
97
- *
98
- * @param number The number to check.
99
- * @returns Boolean: `true` if the number is prime, otherwise `false`.
100
- */
91
+ declare function digitToBangla(digit: number | string, preserveNonDigit?: boolean): string;
101
92
  //#endregion
102
93
  export { banglaToDigit, digitToBangla };
package/dist/utils.d.mts CHANGED
@@ -14,9 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { r as BnDigitResult } from "./object-D70hzkoY-JjxsmDJd.mjs";
18
-
19
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/string-DXiOVFK6.d.mts
17
+ import { r as BnDigitResult } from "./index-RyvzOKVa-BA85h5wj.mjs";
18
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/string-DLPDu7c5.d.mts
20
19
  //#region src/types/string.d.ts
21
20
  declare global {
22
21
  interface String {
@@ -44,9 +43,8 @@ declare global {
44
43
  toUpperCase<Upper extends 'T' | Uppercase<string>>(): Upper extends 'T' ? Uppercase<string> : Upper;
45
44
  }
46
45
  }
47
- /** - Options for generating anagrams. */
48
46
  //#endregion
49
- //#region node_modules/.pnpm/toolbox-x@1.0.1-rc.6/node_modules/toolbox-x/dist/index.d.mts
47
+ //#region node_modules/.pnpm/toolbox-x@2.6.16/node_modules/toolbox-x/dist/index.d.mts
50
48
  /**
51
49
  * * Converts Bangla (Arabic system) digits to Latin (Arabic system) digits.
52
50
  *
@@ -90,13 +88,6 @@ declare function banglaToDigit<Force extends boolean = true>(bnDigit: string, fo
90
88
  * digitToBangla('12ab', false); // "১২"
91
89
  * digitToBangla('12ab'); // "১২ab"
92
90
  */
93
- declare function digitToBangla(digit: number | string, preserveNonDigit?: boolean): string; //#endregion
94
- //#region src/number/prime.d.ts
95
- /**
96
- * * Checks if a number is prime.
97
- *
98
- * @param number The number to check.
99
- * @returns Boolean: `true` if the number is prime, otherwise `false`.
100
- */
91
+ declare function digitToBangla(digit: number | string, preserveNonDigit?: boolean): string;
101
92
  //#endregion
102
93
  export { banglaToDigit, digitToBangla };
package/dist/utils.mjs CHANGED
@@ -14,6 +14,6 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { n as digitToBangla, t as banglaToDigit } from "./dist-BSh0fQzq.mjs";
17
+ import { n as digitToBangla, t as banglaToDigit } from "./dist-C5OaVGq-.mjs";
18
18
 
19
19
  export { banglaToDigit, digitToBangla };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bn-calendar",
3
- "version": "1.2.4",
3
+ "version": "1.2.10",
4
4
  "description": "Comprehensive Bengali calendar system library built for any JavaScript and TypeScript environment.",
5
5
  "main": "./dist/index.cjs",
6
6
  "type": "module",
@@ -52,7 +52,7 @@
52
52
  "type": "git",
53
53
  "url": "git+https://github.com/nazmul-nhb/bn-calendar.git"
54
54
  },
55
- "homepage": "https://github.com/nazmul-nhb/bn-calendar#readme",
55
+ "homepage": "https://bncal.nazmul-nhb.dev",
56
56
  "author": {
57
57
  "name": "Nazmul Hassan",
58
58
  "email": "nazmulnhb@gmail.com",
@@ -76,19 +76,21 @@
76
76
  },
77
77
  "license": "Apache-2.0",
78
78
  "devDependencies": {
79
- "@biomejs/biome": "^2.4.15",
80
- "@types/node": "^25.9.1",
79
+ "@biomejs/biome": "^2.5.5",
80
+ "@types/node": "^26.1.1",
81
81
  "husky": "^9.1.7",
82
- "lint-staged": "^17.0.5",
82
+ "lint-staged": "^17.2.0",
83
83
  "nhb-scripts": "^1.9.2",
84
- "toolbox-x": "1.0.1-rc.6",
85
- "tsdown": "^0.22.0",
86
- "typescript": "^6.0.3"
84
+ "toolbox-x": "2.6.16",
85
+ "tsdown": "^0.22.14",
86
+ "typescript": "^6.0.3",
87
+ "vitepress": "2.0.0-alpha.18",
88
+ "vitepress-plugin-group-icons": "^1.7.5"
87
89
  },
88
90
  "lint-staged": {
89
91
  "*.+((c|m)?js(x)?|(c|m)?ts(x)?)": [
90
- "biome format --write --diagnostic-level=error",
91
- "biome lint --diagnostic-level=error"
92
+ "biome format --write --diagnostic-level=info",
93
+ "biome lint --diagnostic-level=info"
92
94
  ]
93
95
  },
94
96
  "module": "./dist/index.mjs",
@@ -109,7 +111,7 @@
109
111
  "./package.json": "./package.json"
110
112
  },
111
113
  "inlinedDependencies": {
112
- "toolbox-x": "1.0.1-rc.6"
114
+ "toolbox-x": "2.6.16"
113
115
  },
114
116
  "scripts": {
115
117
  "build": "tsdown",
@@ -118,8 +120,13 @@
118
120
  "commit": "nhb-commit",
119
121
  "count": "nhb-count",
120
122
  "delete": "nhb-delete",
121
- "lint": "biome lint --diagnostic-level=error",
122
- "fix": "biome check --write --diagnostic-level=error",
123
- "format": "biome format --write --diagnostic-level=error"
123
+ "lint": "biome lint --diagnostic-level=info",
124
+ "fix": "biome check --write --diagnostic-level=info",
125
+ "format": "biome format --write --diagnostic-level=info",
126
+ "changelog": "node scripts/generate-changelog.mjs",
127
+ "dev": "vitepress dev docs",
128
+ "build:docs-local": "vitepress build docs",
129
+ "build:docs": "git fetch --unshallow --tags 2>/dev/null || git fetch --tags && node scripts/generate-changelog.mjs && vitepress build docs",
130
+ "preview": "vitepress preview docs"
124
131
  }
125
132
  }