@nkardaz/typography-rules 1.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.
Files changed (49) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +911 -0
  3. package/dist/api/blacklist.d.ts +72 -0
  4. package/dist/api/htmlNodes.d.ts +30 -0
  5. package/dist/api/index.d.ts +6 -0
  6. package/dist/api/newRule.d.ts +51 -0
  7. package/dist/api/registerRule.d.ts +27 -0
  8. package/dist/api/rulesInit.d.ts +49 -0
  9. package/dist/functions/chemNotation.d.ts +10 -0
  10. package/dist/functions/clearSpaces.d.ts +16 -0
  11. package/dist/functions/index.cjs +514 -0
  12. package/dist/functions/index.d.ts +8 -0
  13. package/dist/functions/index.mjs +491 -0
  14. package/dist/functions/rubyText.d.ts +11 -0
  15. package/dist/functions/runt.d.ts +3 -0
  16. package/dist/functions/smartNumberGrouping.d.ts +25 -0
  17. package/dist/functions/smartQuotes.d.ts +29 -0
  18. package/dist/functions/wrapWithTag.d.ts +42 -0
  19. package/dist/glyphs/index.cjs +737 -0
  20. package/dist/glyphs/index.d.ts +53 -0
  21. package/dist/glyphs/index.mjs +714 -0
  22. package/dist/glyphs/proto.d.ts +11 -0
  23. package/dist/glyphs/registry.d.ts +728 -0
  24. package/dist/glyphs/types.d.ts +151 -0
  25. package/dist/helpers/index.cjs +268 -0
  26. package/dist/helpers/index.d.ts +133 -0
  27. package/dist/helpers/index.mjs +245 -0
  28. package/dist/helpers/types.d.ts +71 -0
  29. package/dist/index.cjs +985 -0
  30. package/dist/index.d.ts +5 -0
  31. package/dist/index.mjs +977 -0
  32. package/dist/style/index.d.ts +2 -0
  33. package/dist/style/main.css +16 -0
  34. package/dist/types.d.ts +223 -0
  35. package/dist/typography/aliases.d.ts +129 -0
  36. package/dist/typography/expressions/common.d.ts +29 -0
  37. package/dist/typography/expressions/en.d.ts +25 -0
  38. package/dist/typography/expressions/ru.d.ts +29 -0
  39. package/dist/typography/markup/common.d.ts +17 -0
  40. package/dist/typography/markup/en.d.ts +3 -0
  41. package/dist/typography/markup/index.d.ts +4 -0
  42. package/dist/typography/markup/ru.d.ts +3 -0
  43. package/dist/typography/sets/ang.d.ts +3 -0
  44. package/dist/typography/sets/common.d.ts +17 -0
  45. package/dist/typography/sets/en.d.ts +14 -0
  46. package/dist/typography/sets/index.d.ts +5 -0
  47. package/dist/typography/sets/ru.d.ts +16 -0
  48. package/dist/typography/store.d.ts +63 -0
  49. package/package.json +92 -0
@@ -0,0 +1,714 @@
1
+ // src/glyphs/proto.ts
2
+ var proto = {
3
+ values() {
4
+ return Object.values(this);
5
+ },
6
+ join(joiner = "|") {
7
+ return Object.values(this).join(joiner);
8
+ },
9
+ insert(entries) {
10
+ Object.assign(this, entries);
11
+ },
12
+ hasKey(key) {
13
+ return Object.prototype.hasOwnProperty.call(this, key);
14
+ },
15
+ hasValue(value) {
16
+ return Object.values(this).includes(value);
17
+ },
18
+ findKey(value) {
19
+ return Object.entries(this).find(([, v]) => v === value)?.[0];
20
+ },
21
+ find(...keys) {
22
+ const result = keys.map((k) => this[k]).filter((v) => v !== void 0);
23
+ return result.length ? result : void 0;
24
+ }
25
+ };
26
+
27
+ // src/glyphs/registry.ts
28
+ var NONE = "";
29
+ var CHARACTERS = createCharacters({
30
+ dagger: "\u2020",
31
+ // †
32
+ daggerLeftGuard: "\u2E36",
33
+ // ⸶
34
+ daggerRightGuard: "\u2E37",
35
+ // ⸷
36
+ doubleDagger: "\u2021",
37
+ // ‡
38
+ tripleDagger: "\u2E4B",
39
+ // ⹋
40
+ turnedDagger: "\u2E38",
41
+ // ⸸
42
+ numero: "\u2116",
43
+ // №
44
+ number: "#",
45
+ section: "\xA7",
46
+ // §
47
+ sectionTopHalf: "\u2E39",
48
+ // ⸹
49
+ at: "@",
50
+ percent: "%",
51
+ permil: "\u2030",
52
+ // ‰
53
+ perTenThousand: "\u2031",
54
+ // ‱
55
+ trademark: "\u2122",
56
+ // TM
57
+ registered: "\xAE",
58
+ // ®
59
+ copyright: "\xA9",
60
+ // ©
61
+ copyleft: "\u{1F12F}",
62
+ // 🄯
63
+ middleDot: "\xB7",
64
+ // ·
65
+ dotOperator: "\u22C5"
66
+ // ⋅
67
+ });
68
+ var LIGATURES = createCharacters({
69
+ fi: "\uFB01",
70
+ // fi
71
+ fl: "\uFB02",
72
+ // fl
73
+ ffi: "\uFB03",
74
+ // ffi
75
+ ffl: "\uFB04",
76
+ // ffl
77
+ AA: "\uA732",
78
+ // Ꜳ
79
+ aa: "\uA733",
80
+ // ꜳ
81
+ AE: "\xC6",
82
+ // Æ
83
+ ae: "\xE6",
84
+ // æ
85
+ AO: "\uA734",
86
+ // Ꜵ
87
+ ao: "\uA735",
88
+ // ꜵ
89
+ AU: "\uA736",
90
+ // Ꜷ
91
+ au: "\uA737",
92
+ // ꜷ
93
+ AV: "\uA738",
94
+ // Ꜹ
95
+ av: "\uA739",
96
+ // ꜹ
97
+ AY: "\uA73C",
98
+ // Ꜽ
99
+ ay: "\uA73D",
100
+ // ꜽ
101
+ OE: "\u0152",
102
+ // Œ
103
+ oe: "\u0153"
104
+ // œ
105
+ });
106
+ var DASHES = createCharacters({
107
+ /**
108
+ * Em dash (—), Unicode U+2014.
109
+ *
110
+ * HTML: — or —.
111
+ *
112
+ * A full-width punctuation dash commonly used for interruptions,
113
+ * parenthetical statements, dialogue, and emphasis in typography.
114
+ *
115
+ * ---
116
+ *
117
+ * @see {@link https://en.wiktionary.org/wiki/%E2%80%94|Wiktionary: “—”}
118
+ */
119
+ em: "\u2014",
120
+ /**
121
+ * En dash (–), Unicode U+2013.
122
+ *
123
+ * HTML: – or –.
124
+ *
125
+ * Traditionally used for numeric ranges (e.g. 10–20), date spans,
126
+ * and relationships between equal terms.
127
+ *
128
+ * ---
129
+ * @see {@link https://en.wiktionary.org/wiki/%E2%80%93|Wiktionary: “–”}
130
+ */
131
+ en: "\u2013",
132
+ /**
133
+ * Two-em dash (⸺), Unicode U+2E3A.
134
+ *
135
+ * HTML: ⸺.
136
+ *
137
+ * Historically used to indicate omitted text, names, or words,
138
+ * especially in literary and bibliographic works.
139
+ *
140
+ * ---
141
+ * @see {@link https://en.wiktionary.org/wiki/%E2%B8%BA|Wiktionary: “⸺”}
142
+ */
143
+ twoEm: "\u2E3A",
144
+ /**
145
+ * Three-em dash (⸻), Unicode U+2E3B.
146
+ *
147
+ * HTML: ⸻.
148
+ *
149
+ * Traditionally used to replace an entire omitted word, name,
150
+ * or repeated author name in indexes and bibliographies.
151
+ *
152
+ * ---
153
+ * @see {@link https://en.wiktionary.org/wiki/%E2%B8%BB|Wiktionary: “⸻”}
154
+ */
155
+ threeEm: "\u2E3B",
156
+ /**
157
+ * Soft hyphen, Unicode U+00AD.
158
+ *
159
+ * HTML: ­ or ­.
160
+ *
161
+ * An invisible discretionary hyphen that appears only when a word
162
+ * is broken across lines at its insertion point.
163
+ *
164
+ * ---
165
+ * @see {@link https://en.wikipedia.org/wiki/Soft_hyphen|Wikipedia: “Soft hyphen”}
166
+ * @see {@link https://en.wiktionary.org/wiki/%E2%80%90|Wiktionary: “‐”}
167
+ */
168
+ softHyphen: "\xAD",
169
+ /**
170
+ * Figure dash (‒), Unicode U+2012.
171
+ *
172
+ * HTML: ‒.
173
+ *
174
+ * A dash designed to match the width of digits, making it useful
175
+ * in tables, account numbers, dates, and other numeric contexts.
176
+ *
177
+ * ---
178
+ * @see {@link https://en.wiktionary.org/wiki/%E2%80%92|Wiktionary: “‒”}
179
+ */
180
+ figure: "\u2012",
181
+ /**
182
+ * Hyphen (‐), Unicode U+2010.
183
+ *
184
+ * HTML: ‐.
185
+ *
186
+ * The dedicated Unicode hyphen character used to join compound
187
+ * words and affixes without the ambiguity of the ASCII hyphen-minus.
188
+ *
189
+ * ---
190
+ * @see {@link https://en.wiktionary.org/wiki/%E2%80%90|Wiktionary: “‐”}
191
+ */
192
+ hyphen: "\u2010",
193
+ /**
194
+ * Double hyphen (⹀), Unicode U+2E40.
195
+ *
196
+ * HTML: ⹀.
197
+ *
198
+ * A typographic punctuation mark representing a paired hyphen,
199
+ * historically used in dictionaries and scholarly texts.
200
+ *
201
+ * ---
202
+ * @see {@link https://en.wiktionary.org/wiki/%E2%B8%80|Wiktionary: “⹀”}
203
+ */
204
+ doubleHyphen: "\u2E40",
205
+ /**
206
+ * Non-breaking hyphen (-), Unicode U+2011.
207
+ *
208
+ * HTML: ‑.
209
+ *
210
+ * A hyphen that prevents line breaks at its position, keeping
211
+ * connected elements together on the same line.
212
+ *
213
+ * ---
214
+ * @see {@link https://en.wiktionary.org/wiki/%E2%80%90|Wiktionary: “‐”}
215
+ */
216
+ noBreakHyphen: "\u2011",
217
+ /**
218
+ * Horizontal bar (―), Unicode U+2015.
219
+ *
220
+ * HTML: ―.
221
+ *
222
+ * A long horizontal dash used in some writing systems as an
223
+ * alternative to the em dash or as a quotation dash.
224
+ *
225
+ * ---
226
+ * @see {@link https://en.wiktionary.org/wiki/%E2%80%95|Wiktionary: “―”}
227
+ */
228
+ horbar: "\u2015",
229
+ /**
230
+ * Hyphen-minus (-), Unicode U+002D.
231
+ *
232
+ * HTML: -.
233
+ *
234
+ * The standard ASCII keyboard character commonly used as a hyphen,
235
+ * minus sign, dash substitute, and command-line prefix.
236
+ *
237
+ * ---
238
+ * @see {@link https://en.wiktionary.org/wiki/-|Wiktionary: “‐”}
239
+ */
240
+ hyphenMinus: "-",
241
+ /**
242
+ * Underscore (_), Unicode U+005F.
243
+ *
244
+ * HTML: &_ or _.
245
+ *
246
+ * A low horizontal line commonly used in identifiers, file names,
247
+ * markup syntaxes, and text-based formatting conventions.
248
+ *
249
+ * ---
250
+ * @see {@link https://en.wiktionary.org/wiki/Unsupported_titles/`lowbar`|Wiktionary: “_”}
251
+ */
252
+ underscore: "_"
253
+ });
254
+ var SPACES = createCharacters({
255
+ _: " ",
256
+ // Space
257
+ noBreak: "\xA0",
258
+ // Non-breaking space
259
+ en: "\u2002",
260
+ // En space
261
+ em: "\u2003",
262
+ // Em space
263
+ threePerEm: "\u2004",
264
+ // Three-per-em
265
+ fourPerEm: "\u2005",
266
+ // Four-per-em
267
+ sixPerEm: "\u2006",
268
+ // Six-per-em
269
+ figure: "\u2007",
270
+ // Figure space
271
+ punctuation: "\u2008",
272
+ // Punctuation space
273
+ thin: "\u2009",
274
+ // Thin space
275
+ hair: "\u200A",
276
+ // Hair space
277
+ noBreakNarrow: "\u202F",
278
+ // Narrow non-breaking space
279
+ mediumMath: "\u205F",
280
+ // Medium mathematical space
281
+ ideographic: "\u3000",
282
+ // Ideographic space
283
+ zeroWidth: "\u200B",
284
+ // Zero-width
285
+ zeroWidthNoBreak: "\uFEFF"
286
+ // Zero-width non-breaking space
287
+ });
288
+ var MATHS = createCharacters({
289
+ minus: "\u2212",
290
+ // −
291
+ plusMinus: "\xB1",
292
+ // ±
293
+ minusPlus: "\u2213",
294
+ // ∓
295
+ multiply: "\xD7",
296
+ // ×
297
+ obelus: "\xF7",
298
+ // ÷
299
+ divisionTimes: "\u22C7",
300
+ // ⋇
301
+ fractionSlash: "\u2044"
302
+ // ⁄
303
+ });
304
+ var TEMPERATURES = createCharacters({
305
+ celsiusSolid: "\u2103",
306
+ // ℃
307
+ fahrenheitSolid: "\u2109",
308
+ // ℉
309
+ kelvin: "[K\u212A]",
310
+ // K
311
+ celsius: "\xB0C",
312
+ fahrenheit: "\xB0F",
313
+ delisle: "\xB0D",
314
+ leiden: "\xB0L",
315
+ newton: "\xB0N",
316
+ wedgewood: "\xB0W",
317
+ dalton: "\xB0Da",
318
+ hooke: "\xB0H",
319
+ rankine: "\xB0R",
320
+ reaumur: "\xB0R[e\xE9]",
321
+ romer: "\xB0R[o\xF8]"
322
+ });
323
+ var PUNCTUATION = createCharacterSet({
324
+ common: {
325
+ // Shared
326
+ generic: createCharacters({
327
+ apostrophe: "\u2019"
328
+ // ’
329
+ }),
330
+ leftSided: createCharacters({
331
+ invertedExclamation: "\xA1",
332
+ // ¡
333
+ invertedQuestion: "\xBF",
334
+ // ¿
335
+ invertedInterrobang: "\u2E18"
336
+ // ⸘
337
+ }),
338
+ rightSided: createCharacters({
339
+ exclamation: "!",
340
+ doubleExclamation: "\u203C",
341
+ // ‼
342
+ exclamationQuestion: "\u2049",
343
+ // ⁉
344
+ exclamationMedieval: "\u2E53",
345
+ // ⹓
346
+ question: "?",
347
+ doubleQuestion: "\u2047",
348
+ // ⁇
349
+ questionExclamation: "\u2048",
350
+ // ⁈
351
+ questionMedieval: "\u2E54",
352
+ // ⹔
353
+ reversedQuestion: "\u2E2E",
354
+ // ⸮
355
+ interrobang: "\u203D",
356
+ // ‽
357
+ dot: ".",
358
+ comma: ",",
359
+ commaMedieval: "\u2E4C",
360
+ // ⹌
361
+ ellipsis: "\u2026"
362
+ // …
363
+ }),
364
+ colons: createCharacters({
365
+ colon: ":",
366
+ semicolon: ";",
367
+ punctusElevatus: "\u2E4E"
368
+ // ⹎
369
+ })
370
+ },
371
+ ru: {
372
+ // Russian
373
+ leftSided: createCharacters({
374
+ outerQuoteOpen: "\xAB",
375
+ // «
376
+ innerQuoteOpen: "\u201E"
377
+ // „
378
+ }),
379
+ rightSided: createCharacters({
380
+ outerQuoteClose: "\xBB",
381
+ // »
382
+ innerQuoteClose: "\u201D"
383
+ // “
384
+ })
385
+ },
386
+ en: {
387
+ // English
388
+ leftSided: createCharacters({
389
+ outerQuoteOpen: "\u201C",
390
+ // “
391
+ innerQuoteOpen: "\u2018"
392
+ // ‘
393
+ }),
394
+ rightSided: createCharacters({
395
+ outerQuoteClose: "\u201D",
396
+ // ”
397
+ innerQuoteClose: "\u2019"
398
+ // ’
399
+ })
400
+ },
401
+ fr: {
402
+ // Français
403
+ leftSided: createCharacters({
404
+ outerQuoteOpen: "\xAB",
405
+ // «
406
+ innerQuoteOpen: "\u2039"
407
+ // ‹
408
+ }),
409
+ rightSided: createCharacters({
410
+ outerQuoteClose: "\xBB",
411
+ // »
412
+ innerQuoteClose: "\u203A"
413
+ // ›
414
+ })
415
+ },
416
+ is: {
417
+ // Íslenska
418
+ leftSided: createCharacters({
419
+ outerQuoteOpen: "\u201E",
420
+ // „
421
+ innerQuoteOpen: "\u201A"
422
+ // ‚
423
+ }),
424
+ rightSided: createCharacters({
425
+ outerQuoteClose: "\u201C",
426
+ // “
427
+ innerQuoteClose: "\u2018"
428
+ // ‘
429
+ })
430
+ }
431
+ });
432
+ var BRACKETS = createCharacterSet({
433
+ common: {
434
+ left: createCharacters({
435
+ round: "(",
436
+ square: "[",
437
+ curly: "{"
438
+ }),
439
+ right: createCharacters({
440
+ round: ")",
441
+ square: "]",
442
+ curly: "}"
443
+ })
444
+ }
445
+ });
446
+ var DIGITS = createCharacters({
447
+ zero: "0",
448
+ one: "1",
449
+ two: "2",
450
+ three: "3",
451
+ four: "4",
452
+ five: "5",
453
+ six: "6",
454
+ seven: "7",
455
+ eight: "8",
456
+ nine: "9",
457
+ ascii_roman_capital_one: "I",
458
+ ascii_roman_capital_five: "V",
459
+ ascii_roman_capital_ten: "X",
460
+ ascii_roman_capital_fifty: "L",
461
+ ascii_roman_capital_one_hundred: "C",
462
+ ascii_roman_capital_five_hundred: "D",
463
+ ascii_roman_capital_one_thousand: "M",
464
+ roman_capital_one: "\u2160",
465
+ roman_capital_two: "\u2161",
466
+ roman_capital_three: "\u2162",
467
+ roman_capital_four: "\u2163",
468
+ roman_capital_five: "\u2164",
469
+ roman_capital_six: "\u2165",
470
+ roman_capital_six_late_form: "\u2185",
471
+ roman_capital_seven: "\u2166",
472
+ roman_capital_eight: "\u2167",
473
+ roman_capital_nine: "\u2168",
474
+ roman_capital_ten: "\u2169",
475
+ roman_capital_eleven: "\u216A",
476
+ roman_capital_twelve: "\u216B",
477
+ roman_capital_fifty: "\u216C",
478
+ roman_capital_fifty_early_form: "\u2186",
479
+ roman_capital_one_hundred: "\u216D",
480
+ roman_capital_one_hundred_reversed: "\u2183",
481
+ roman_capital_five_hundred: "\u216E",
482
+ roman_capital_one_thousand: "\u216F",
483
+ roman_capital_five_thousand: "\u2181",
484
+ roman_capital_ten_thousand: "\u2182",
485
+ roman_capital_fifty_thousand: "\u2187",
486
+ roman_capital_one_hundred_thousand: "\u2188",
487
+ roman_small_one: "\u2170",
488
+ roman_small_two: "\u2171",
489
+ roman_small_three: "\u2172",
490
+ roman_small_four: "\u2173",
491
+ roman_small_five: "\u2174",
492
+ roman_small_six: "\u2175",
493
+ roman_small_seven: "\u2176",
494
+ roman_small_eight: "\u2177",
495
+ roman_small_nine: "\u2178",
496
+ roman_small_ten: "\u2179",
497
+ roman_small_eleven: "\u217A",
498
+ roman_small_twelve: "\u217B"
499
+ });
500
+ var WALLET = {
501
+ SYMBOL: createCharacters({
502
+ // symbols
503
+ anis: "\xA4",
504
+ // ¤
505
+ european_currency_unit: "\u20A0",
506
+ // ₠
507
+ austral: "\u20B3",
508
+ // ₳
509
+ cent: "\xA2",
510
+ // ¢
511
+ cedi: "\u20B5",
512
+ // ₵
513
+ colon: "\u20A1",
514
+ // ₡
515
+ dollar: "$",
516
+ drachma: "\u20AF",
517
+ // ₯
518
+ dram: "\u058F",
519
+ // ֏
520
+ doromi: "\u07FE",
521
+ euro: "\u20AC",
522
+ // €
523
+ franc: "\u20A3",
524
+ // ₣
525
+ guarani: "\u20B2",
526
+ // ₲
527
+ kip: "\u20AD",
528
+ // ₭
529
+ lari: "\u20BE",
530
+ // ₾
531
+ naira: "\u20A6",
532
+ // ₦
533
+ pound: "\xA3",
534
+ // £
535
+ tournois: "\u20B6",
536
+ // ₶
537
+ spesmillo: "\u20B7",
538
+ // ₷
539
+ ruble: "\u20BD",
540
+ // ₽
541
+ hryvnia: "\u20B4",
542
+ // ₴
543
+ lira: "\u20A4",
544
+ // ₤
545
+ lira_turkish: "\u20BA",
546
+ // ₺
547
+ baht: "\u0E3F",
548
+ // ฿
549
+ rupee: "\u20B9",
550
+ // ₹
551
+ won: "\u20A9",
552
+ // ₩
553
+ yen: "\xA5",
554
+ // ¥
555
+ yen_kanji: "\u5186",
556
+ // 円
557
+ yuan_hanzi: "\u5143",
558
+ // 元
559
+ dong: "\u20AB",
560
+ // ₫
561
+ tugrik: "\u20AE",
562
+ // ₮
563
+ tenge: "\u20B8",
564
+ // ₸
565
+ shekel: "\u20AA",
566
+ // ₪
567
+ manat: "\u20BC",
568
+ // ₼
569
+ rupee_alt: "\u20A8",
570
+ // ₨
571
+ peseta: "\u20A7",
572
+ // ₧
573
+ peso: "\u20B1",
574
+ // ₱
575
+ riyal: "\uFDFC",
576
+ bitcoin_symbol: "\u20BF",
577
+ // ₿
578
+ taka: "\u09F3",
579
+ // ৳
580
+ tamil_rupee: "\u0BF9",
581
+ // ௹
582
+ sinhala_rupee: "\u0DBB\u0DD4",
583
+ // රු
584
+ roman_sextans: "\u{10190}",
585
+ roman_uncia: "\u{10191}",
586
+ roman_semuncia: "\u{10192}",
587
+ roman_sextula: "\u{10193}",
588
+ roman_dimida_sextula: "\u{10194}",
589
+ roman_siliqua: "\u{10195}",
590
+ roman_denarius: "\u{10196}",
591
+ roman_quinarius: "\u{10197}",
592
+ roman_sestertius: "\u{10198}",
593
+ roman_dupondius: "\u{10199}",
594
+ roman_as: "\u{1019A}"
595
+ }),
596
+ ISO: createCharacters({
597
+ // codes / ISO / crypto
598
+ rub: "RUB",
599
+ usd: "USD",
600
+ eur: "EUR",
601
+ gbp: "GBP",
602
+ jpy: "JPY",
603
+ chf: "CHF",
604
+ cad: "CAD",
605
+ aud: "AUD",
606
+ nzd: "NZD",
607
+ pln: "PLN",
608
+ huf: "HUF",
609
+ brl: "BRL",
610
+ cny: "CNY",
611
+ twd: "TWD",
612
+ sgd: "SGD",
613
+ myr: "MYR",
614
+ idr: "IDR",
615
+ thb: "THB",
616
+ vnd: "VND",
617
+ krw: "KRW",
618
+ pkr: "PKR",
619
+ inr: "INR",
620
+ ils: "ILS",
621
+ qar: "QAR",
622
+ sar: "SAR",
623
+ aed: "AED",
624
+ omr: "OMR",
625
+ yem: "YER",
626
+ jod: "JOD",
627
+ iqd: "IQD",
628
+ kwd: "KWD",
629
+ bhd: "BHD",
630
+ tnd: "TND",
631
+ egp: "EGP",
632
+ syp: "SYP",
633
+ lbp: "LBP",
634
+ czk: "CZK",
635
+ sek: "SEK",
636
+ nok: "NOK",
637
+ dkk: "DKK",
638
+ hrk: "HRK",
639
+ rsd: "RSD",
640
+ bgn: "BGN",
641
+ ron: "RON",
642
+ uah: "UAH",
643
+ kzt: "KZT",
644
+ gel: "GEL",
645
+ amd: "AMD",
646
+ mxn: "MXN",
647
+ clp: "CLP",
648
+ cop: "COP",
649
+ ars: "ARS",
650
+ zar: "ZAR",
651
+ try: "TRY",
652
+ php: "PHP",
653
+ ngn: "NGN",
654
+ lkr: "LKR",
655
+ bdt: "BDT",
656
+ usdt: "USDT",
657
+ btc: "BTC",
658
+ eth: "ETH",
659
+ xrp: "XRP",
660
+ sol: "SOL",
661
+ bnb: "BNB",
662
+ usdc: "USDC"
663
+ })
664
+ };
665
+ var RANGES = createCharacterSet({
666
+ common: {
667
+ DIGITS: createCharacters({
668
+ digits: "0-9",
669
+ ascii_roman_numerals: "XIVCMLDZxivcmldz",
670
+ roman_numerals: "\u2160-\u2188"
671
+ })
672
+ }
673
+ });
674
+
675
+ // src/glyphs/index.ts
676
+ function createCharacters(data) {
677
+ return Object.assign(Object.create(proto), data);
678
+ }
679
+ function createProtoSet() {
680
+ return {
681
+ get(dataSet, key) {
682
+ const commonEntry = this.common?.[key] ?? {};
683
+ const localeEntry = this[dataSet]?.[key] ?? {};
684
+ return createCharacters({ ...commonEntry, ...localeEntry });
685
+ },
686
+ getList() {
687
+ return Object.keys(this);
688
+ },
689
+ hasKey(key) {
690
+ return this.getList().includes(key);
691
+ }
692
+ };
693
+ }
694
+ function createCharacterSet(data) {
695
+ return Object.assign(Object.create(createProtoSet()), data);
696
+ }
697
+ export {
698
+ BRACKETS,
699
+ CHARACTERS,
700
+ DASHES,
701
+ DIGITS,
702
+ LIGATURES,
703
+ MATHS,
704
+ NONE,
705
+ PUNCTUATION,
706
+ RANGES,
707
+ SPACES,
708
+ TEMPERATURES,
709
+ WALLET,
710
+ createCharacterSet,
711
+ createCharacters,
712
+ createProtoSet
713
+ };
714
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,11 @@
1
+ import type { GlyphData, GlyphStringMap } from '.';
2
+ export declare const proto: {
3
+ values(this: GlyphStringMap): string[];
4
+ join(this: GlyphStringMap, joiner?: string): string;
5
+ insert(this: GlyphStringMap, entries: GlyphData): void;
6
+ hasKey(this: GlyphStringMap, key: string): boolean;
7
+ hasValue(this: GlyphStringMap, value: string): boolean;
8
+ findKey(this: GlyphStringMap, value: string): string | undefined;
9
+ find(this: GlyphStringMap, ...keys: (keyof GlyphStringMap)[]): string[] | undefined;
10
+ };
11
+ //# sourceMappingURL=proto.d.ts.map