cizgile 0.2.0 → 0.3.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.
@@ -79,6 +79,24 @@ const latin = {
79
79
  ɩ: "i",
80
80
  Ʊ: "U",
81
81
  ʊ: "u",
82
+ Ƿ: "W",
83
+ ƿ: "w",
84
+ Ȝ: "Gh",
85
+ ȝ: "gh",
86
+ Ʌ: "V",
87
+ ʌ: "v",
88
+ Ƣ: "Gh",
89
+ ƣ: "gh",
90
+ Ȣ: "Ou",
91
+ ȣ: "ou",
92
+ Ʈ: "T",
93
+ ʈ: "t",
94
+ Ɲ: "N",
95
+ ɲ: "n",
96
+ Ƨ: "S",
97
+ ƨ: "s",
98
+ Ɂ: "",
99
+ ɂ: "",
82
100
  ʔ: "",
83
101
  ʼ: "",
84
102
  ʻ: "",
@@ -348,6 +366,9 @@ const de = {
348
366
  ü: "ue",
349
367
  ß: "ss",
350
368
  ẞ: "SS",
369
+ "%": " prozent ",
370
+ $: " dollar ",
371
+ "£": " pfund ",
351
372
  "&": " und "
352
373
  }
353
374
  };
@@ -367,6 +388,9 @@ const tr = {
367
388
  ö: "o",
368
389
  Ü: "U",
369
390
  ü: "u",
391
+ "%": " yuzde ",
392
+ $: " dolar ",
393
+ "£": " sterlin ",
370
394
  "&": " ve "
371
395
  },
372
396
  lowercase: turkishLowercase
@@ -389,6 +413,9 @@ const az = {
389
413
  ü: "u",
390
414
  Ə: "E",
391
415
  ə: "e",
416
+ "%": " faiz ",
417
+ $: " dollar ",
418
+ "£": " funt ",
392
419
  "&": " ve "
393
420
  },
394
421
  lowercase: turkishLowercase
@@ -403,6 +430,9 @@ const da = {
403
430
  å: "aa",
404
431
  Æ: "Ae",
405
432
  æ: "ae",
433
+ "%": " procent ",
434
+ $: " dollar ",
435
+ "£": " pund ",
406
436
  "&": " og "
407
437
  }
408
438
  };
@@ -416,6 +446,9 @@ const nb = {
416
446
  å: "aa",
417
447
  Æ: "Ae",
418
448
  æ: "ae",
449
+ "%": " prosent ",
450
+ $: " dollar ",
451
+ "£": " pund ",
419
452
  "&": " og "
420
453
  }
421
454
  };
@@ -429,6 +462,9 @@ const sv = {
429
462
  ö: "oe",
430
463
  Å: "Aa",
431
464
  å: "aa",
465
+ "%": " procent ",
466
+ $: " dollar ",
467
+ "£": " pund ",
432
468
  "&": " och "
433
469
  }
434
470
  };
@@ -442,13 +478,21 @@ const fi = {
442
478
  ö: "oe",
443
479
  Å: "Aa",
444
480
  å: "aa",
481
+ "%": " prosenttia ",
482
+ $: " dollari ",
483
+ "£": " punta ",
445
484
  "&": " ja "
446
485
  }
447
486
  };
448
487
  /** Hungarian: `&` becomes `es`. */
449
488
  const hu = {
450
489
  id: "hu",
451
- table: { "&": " es " }
490
+ table: {
491
+ "%": " szazalek ",
492
+ $: " dollar ",
493
+ "£": " font ",
494
+ "&": " es "
495
+ }
452
496
  };
453
497
  /** Vietnamese: `đ` becomes `d`, `&` becomes `va`. */
454
498
  const vi = {
@@ -456,6 +500,9 @@ const vi = {
456
500
  table: {
457
501
  Đ: "D",
458
502
  đ: "d",
503
+ "%": " phan tram ",
504
+ $: " do la ",
505
+ "£": " bang ",
459
506
  "&": " va "
460
507
  }
461
508
  };
@@ -465,6 +512,9 @@ const es = {
465
512
  table: {
466
513
  Ñ: "N",
467
514
  ñ: "n",
515
+ "%": " por ciento ",
516
+ $: " dolar ",
517
+ "£": " libra ",
468
518
  "&": " y "
469
519
  }
470
520
  };
@@ -476,18 +526,31 @@ const fr = {
476
526
  œ: "oe",
477
527
  Æ: "Ae",
478
528
  æ: "ae",
529
+ "%": " pour cent ",
530
+ $: " dollar ",
531
+ "£": " livre ",
479
532
  "&": " et "
480
533
  }
481
534
  };
482
535
  /** Portuguese: `&` becomes `e`. */
483
536
  const pt = {
484
537
  id: "pt",
485
- table: { "&": " e " }
538
+ table: {
539
+ "%": " por cento ",
540
+ $: " dolar ",
541
+ "£": " libra ",
542
+ "&": " e "
543
+ }
486
544
  };
487
545
  /** Italian: `&` becomes `e`. */
488
546
  const it = {
489
547
  id: "it",
490
- table: { "&": " e " }
548
+ table: {
549
+ "%": " per cento ",
550
+ $: " dollaro ",
551
+ "£": " sterlina ",
552
+ "&": " e "
553
+ }
491
554
  };
492
555
  /** Dutch: `ij` becomes `ij`, `&` becomes `en`. */
493
556
  const nl = {
@@ -495,38 +558,71 @@ const nl = {
495
558
  table: {
496
559
  IJ: "IJ",
497
560
  ij: "ij",
561
+ "%": " procent ",
562
+ $: " dollar ",
563
+ "£": " pond ",
498
564
  "&": " en "
499
565
  }
500
566
  };
501
567
  /** Polish: `&` becomes `i`. */
502
568
  const pl = {
503
569
  id: "pl",
504
- table: { "&": " i " }
570
+ table: {
571
+ "%": " procent ",
572
+ $: " dolar ",
573
+ "£": " funt ",
574
+ "&": " i "
575
+ }
505
576
  };
506
577
  /** Romanian: `&` becomes `si`. */
507
578
  const ro = {
508
579
  id: "ro",
509
- table: { "&": " si " }
580
+ table: {
581
+ "%": " la suta ",
582
+ $: " dolar ",
583
+ "£": " lira ",
584
+ "&": " si "
585
+ }
510
586
  };
511
587
  /** Czech: `&` becomes `a`. */
512
588
  const cs = {
513
589
  id: "cs",
514
- table: { "&": " a " }
590
+ table: {
591
+ "%": " procent ",
592
+ $: " dolar ",
593
+ "£": " libra ",
594
+ "&": " a "
595
+ }
515
596
  };
516
597
  /** Slovak: `&` becomes `a`. */
517
598
  const sk = {
518
599
  id: "sk",
519
- table: { "&": " a " }
600
+ table: {
601
+ "%": " percent ",
602
+ $: " dolar ",
603
+ "£": " libra ",
604
+ "&": " a "
605
+ }
520
606
  };
521
607
  /** Slovenian: `&` becomes `in`. */
522
608
  const sl = {
523
609
  id: "sl",
524
- table: { "&": " in " }
610
+ table: {
611
+ "%": " odstotkov ",
612
+ $: " dolar ",
613
+ "£": " funt ",
614
+ "&": " in "
615
+ }
525
616
  };
526
617
  /** Croatian: `&` becomes `i`. */
527
618
  const hr = {
528
619
  id: "hr",
529
- table: { "&": " i " }
620
+ table: {
621
+ "%": " posto ",
622
+ $: " dolar ",
623
+ "£": " funta ",
624
+ "&": " i "
625
+ }
530
626
  };
531
627
  /** Icelandic: `þ ð` become `th d`, `&` becomes `og`. */
532
628
  const is = {
@@ -536,29 +632,50 @@ const is = {
536
632
  þ: "th",
537
633
  Ð: "D",
538
634
  ð: "d",
635
+ "%": " prosent ",
636
+ $: " dollari ",
637
+ "£": " pund ",
539
638
  "&": " og "
540
639
  }
541
640
  };
542
641
  /** Estonian: `&` becomes `ja`. */
543
642
  const et = {
544
643
  id: "et",
545
- table: { "&": " ja " }
644
+ table: {
645
+ "%": " protsenti ",
646
+ $: " dollar ",
647
+ "£": " nael ",
648
+ "&": " ja "
649
+ }
546
650
  };
547
651
  /** Latvian: `&` becomes `un`. */
548
652
  const lv = {
549
653
  id: "lv",
550
- table: { "&": " un " }
654
+ table: {
655
+ "%": " procenti ",
656
+ $: " dolars ",
657
+ "£": " marcina ",
658
+ "&": " un "
659
+ }
551
660
  };
552
661
  /** Lithuanian: `&` becomes `ir`. */
553
662
  const lt = {
554
663
  id: "lt",
555
- table: { "&": " ir " }
664
+ table: {
665
+ "%": " procentai ",
666
+ $: " doleris ",
667
+ "£": " svaras ",
668
+ "&": " ir "
669
+ }
556
670
  };
557
671
  /** Catalan: the punt volat in `l·l` is dropped, `&` becomes `i`. */
558
672
  const ca = {
559
673
  id: "ca",
560
674
  table: {
561
675
  "·": "",
676
+ "%": " per cent ",
677
+ $: " dolar ",
678
+ "£": " lliura ",
562
679
  "&": " i "
563
680
  }
564
681
  };
@@ -592,4 +709,28 @@ const latinLocales = {
592
709
  };
593
710
 
594
711
  //#endregion
595
- export { fold as A, sl as C, DEFAULT_TABLES as D, vi as E, symbols as F, latin as I, resolveTables as M, stripMarks as N, applyCompat as O, transliterate as P, sk as S, tr as T, nb as _, de as a, pt as b, fi as c, hu as d, is as f, lv as g, lt as h, da as i, lookup as j, compileTables as k, fr as l, latinLocales as m, ca as n, es as o, it as p, cs as r, et as s, az as t, hr as u, nl as v, sv as w, ro as x, pl as y };
712
+ //#region src/transliterate/registry.ts
713
+ const registered = /* @__PURE__ */ new Map();
714
+ let version = 0;
715
+ /** A counter that changes whenever the registry does, so cached option resolutions can tell they are stale. */
716
+ function registryVersion() {
717
+ return version;
718
+ }
719
+ /** Makes `slugify` accept each locale's `id` as a string, for locales whose tables do not ship with the main entry (`registerLocale(ru, uk)`). Later registrations win. */
720
+ function registerLocale(...locales) {
721
+ for (const locale of locales) registered.set(locale.id, locale);
722
+ version += 1;
723
+ }
724
+ /** Removes a locale registered with `registerLocale`; the built-in Latin ids cannot be removed. */
725
+ function unregisterLocale(id) {
726
+ const removed = registered.delete(id);
727
+ if (removed) version += 1;
728
+ return removed;
729
+ }
730
+ /** The locale registered under `id`, if any. */
731
+ function registeredLocale(id) {
732
+ return registered.get(id);
733
+ }
734
+
735
+ //#endregion
736
+ export { vi as A, latin as B, pl as C, sl as D, sk as E, lookup as F, resolveTables as I, stripMarks as L, applyCompat as M, compileTables as N, sv as O, fold as P, transliterate as R, nl as S, ro as T, it as _, az as a, lv as b, da as c, et as d, fi as f, is as g, hu as h, unregisterLocale as i, DEFAULT_TABLES as j, tr as k, de as l, hr as m, registeredLocale as n, ca as o, fr as p, registryVersion as r, cs as s, registerLocale as t, es as u, latinLocales as v, pt as w, nb as x, lt as y, symbols as z };
@@ -17,7 +17,7 @@ type LatinLocaleId = "az" | "ca" | "cs" | "da" | "de" | "es" | "et" | "fi" | "fr
17
17
  /** Locales that carry the Cyrillic table; import the objects from `cizgile/transliterate`. */
18
18
  type CyrillicLocaleId = "be" | "bg" | "kk" | "mk" | "ru" | "sr" | "uk";
19
19
  /** Locales that carry the Greek, Hebrew, kana or Hangul table; import the objects from `cizgile/transliterate`. */
20
- type OtherLocaleId = "el" | "he" | "ja" | "ko";
20
+ type OtherLocaleId = "bn" | "el" | "gu" | "he" | "hi" | "ja" | "kn" | "ko" | "ml" | "or" | "pa" | "ta" | "te";
21
21
  /** Every id in the `locales` registry. */
22
22
  type LocaleId = LatinLocaleId | CyrillicLocaleId | OtherLocaleId;
23
23
  //#endregion
@@ -1,4 +1,4 @@
1
- import { a as OtherLocaleId, i as LocaleId, n as LatinLocaleId, o as TransliterationTable, r as Locale, t as CyrillicLocaleId } from "./shared/types-DbyhfPRc.mjs";
1
+ import { a as OtherLocaleId, i as LocaleId, n as LatinLocaleId, o as TransliterationTable, r as Locale, t as CyrillicLocaleId } from "./shared/types-B3EVWvDh.mjs";
2
2
  //#region src/transliterate/core.d.ts
3
3
  /** Options for `transliterate`. */
4
4
  interface TransliterateOptions {
@@ -74,6 +74,42 @@ export declare function mergeTables(...tables: readonly TransliterationTable[]):
74
74
  /** A new locale from `base` with `overrides` merged in; neither object is mutated. */
75
75
  export declare function defineLocale(base: Locale, overrides?: LocaleOverrides): Locale;
76
76
  //#endregion
77
+ //#region src/transliterate/devanagari.d.ts
78
+ /** Devanagari (Hindi, Marathi, Nepali) to Latin without diacritics: consonants carry their inherent `a` unless a vowel sign or virama follows; vowel length is not marked and no schwa deletion is applied, so `भारत` is `bharata`. */
79
+ export declare const devanagari: TransliterationTable;
80
+ //#endregion
81
+ //#region src/transliterate/bengali.d.ts
82
+ /** Bengali to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
83
+ export declare const bengali: TransliterationTable;
84
+ //#endregion
85
+ //#region src/transliterate/gujarati.d.ts
86
+ /** Gujarati to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
87
+ export declare const gujarati: TransliterationTable;
88
+ //#endregion
89
+ //#region src/transliterate/gurmukhi.d.ts
90
+ /** Gurmukhi to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
91
+ export declare const gurmukhi: TransliterationTable;
92
+ //#endregion
93
+ //#region src/transliterate/kannada.d.ts
94
+ /** Kannada to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
95
+ export declare const kannada: TransliterationTable;
96
+ //#endregion
97
+ //#region src/transliterate/malayalam.d.ts
98
+ /** Malayalam to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
99
+ export declare const malayalam: TransliterationTable;
100
+ //#endregion
101
+ //#region src/transliterate/oriya.d.ts
102
+ /** Oriya to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
103
+ export declare const oriya: TransliterationTable;
104
+ //#endregion
105
+ //#region src/transliterate/tamil.d.ts
106
+ /** Tamil to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
107
+ export declare const tamil: TransliterationTable;
108
+ //#endregion
109
+ //#region src/transliterate/telugu.d.ts
110
+ /** Telugu to Latin without diacritics, syllable by syllable like the Devanagari table: inherent `a`, no vowel length, no schwa deletion. */
111
+ export declare const telugu: TransliterationTable;
112
+ //#endregion
77
113
  //#region src/transliterate/dhivehi.d.ts
78
114
  /** Thaana (Dhivehi) to Latin, the sindresorhus/transliterate values. */
79
115
  export declare const dhivehi: TransliterationTable;
@@ -123,13 +159,31 @@ export declare const cyrillicLocales: Readonly<Record<CyrillicLocaleId, Locale>>
123
159
  //#region src/transliterate/locales-other.d.ts
124
160
  /** Greek: the Greek table, `&` becomes `kai`. */
125
161
  export declare const el: Locale;
162
+ /** Hindi: the Devanagari table, `&` becomes `aur`. */
163
+ export declare const hi: Locale;
126
164
  /** Hebrew: the Hebrew table, `&` becomes `ve`. */
127
165
  export declare const he: Locale;
128
166
  /** Japanese: the kana table, `&` becomes `to`; kanji is left alone. */
129
167
  export declare const ja: Locale;
130
168
  /** Korean: the Hangul table, `&` becomes `mit`. */
131
169
  export declare const ko: Locale;
132
- /** The Greek, Hebrew, Japanese and Korean locales by id. */
170
+ /** Bengali: the bengali table, `&` becomes `ebong`. */
171
+ export declare const bn: Locale;
172
+ /** Punjabi: the gurmukhi table, `&` becomes `ate`. */
173
+ export declare const pa: Locale;
174
+ /** Gujarati: the gujarati table, `&` becomes `ane`. */
175
+ export declare const gu: Locale;
176
+ /** Odia: the oriya table, `&` becomes `o`. */
177
+ export declare const or: Locale;
178
+ /** Tamil: the tamil table, `&` becomes `matrum`. */
179
+ export declare const ta: Locale;
180
+ /** Telugu: the telugu table, `&` becomes `mariyu`. */
181
+ export declare const te: Locale;
182
+ /** Kannada: the kannada table, `&` becomes `mattu`. */
183
+ export declare const kn: Locale;
184
+ /** Malayalam: the malayalam table, `&` becomes `um`. */
185
+ export declare const ml: Locale;
186
+ /** The locales that carry a non-Latin, non-Cyrillic script table, by id. */
133
187
  export declare const otherLocales: Readonly<Record<OtherLocaleId, Locale>>;
134
188
  //#endregion
135
189
  //#region src/transliterate/locales-latin.d.ts
@@ -186,6 +240,14 @@ export declare const ca: Locale;
186
240
  /** The Latin-script locales by id; these ship with the main entry. */
187
241
  export declare const latinLocales: Readonly<Record<LatinLocaleId, Locale>>;
188
242
  //#endregion
243
+ //#region src/transliterate/registry.d.ts
244
+ /** Makes `slugify` accept each locale's `id` as a string, for locales whose tables do not ship with the main entry (`registerLocale(ru, uk)`). Later registrations win. */
245
+ export declare function registerLocale(...locales: readonly Locale[]): void;
246
+ /** Removes a locale registered with `registerLocale`; the built-in Latin ids cannot be removed. */
247
+ export declare function unregisterLocale(id: string): boolean;
248
+ /** The locale registered under `id`, if any. */
249
+ export declare function registeredLocale(id: string): Locale | undefined;
250
+ //#endregion
189
251
  //#region src/transliterate/symbols.d.ts
190
252
  /** Symbols spelled out in English (`&`, `©`, currency signs) or turned into separators (dashes, quotes, bullets). */
191
253
  export declare const symbols: TransliterationTable;