@reliverse/relinka 1.1.6 → 1.1.8

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 (121) hide show
  1. package/dist-npm/components/anykey/index.js +57 -77
  2. package/dist-npm/components/block/block.js +48 -61
  3. package/dist-npm/components/checkbox/index.js +178 -211
  4. package/dist-npm/components/confirm/confirm-main.js +85 -122
  5. package/dist-npm/components/confirm/confirm-three.js +24 -27
  6. package/dist-npm/components/confirm/index.js +36 -45
  7. package/dist-npm/components/core/Separator.js +15 -17
  8. package/dist-npm/components/core/create-prompt.js +101 -124
  9. package/dist-npm/components/core/errors.js +19 -15
  10. package/dist-npm/components/core/hook-engine.js +91 -120
  11. package/dist-npm/components/core/index.js +12 -12
  12. package/dist-npm/components/core/key.js +16 -6
  13. package/dist-npm/components/core/lines.js +45 -54
  14. package/dist-npm/components/core/make-theme.js +21 -30
  15. package/dist-npm/components/core/position.js +27 -23
  16. package/dist-npm/components/core/promise-polyfill.js +11 -14
  17. package/dist-npm/components/core/screen-manager.js +59 -74
  18. package/dist-npm/components/core/theme.js +22 -32
  19. package/dist-npm/components/core/use-effect.js +9 -15
  20. package/dist-npm/components/core/use-keypress.js +19 -23
  21. package/dist-npm/components/core/use-memo.js +10 -16
  22. package/dist-npm/components/core/use-pagination.js +33 -32
  23. package/dist-npm/components/core/use-prefix.js +40 -38
  24. package/dist-npm/components/core/use-ref.js +2 -5
  25. package/dist-npm/components/core/use-state.js +15 -23
  26. package/dist-npm/components/core/useKeyPress.js +14 -17
  27. package/dist-npm/components/core/usePromptState.js +8 -14
  28. package/dist-npm/components/core/utils.js +7 -16
  29. package/dist-npm/components/date/date.js +173 -204
  30. package/dist-npm/components/editor/index.js +71 -92
  31. package/dist-npm/components/expand/index.js +96 -124
  32. package/dist-npm/components/figures/index.js +283 -294
  33. package/dist-npm/components/input/index.js +61 -87
  34. package/dist-npm/components/input/text-main.js +97 -124
  35. package/dist-npm/components/input/text.js +24 -28
  36. package/dist-npm/components/instance/basic.js +17 -25
  37. package/dist-npm/components/instance/browser.js +14 -18
  38. package/dist-npm/components/instance/reporter/basic.js +46 -65
  39. package/dist-npm/components/instance/reporter/browser.js +44 -47
  40. package/dist-npm/components/instance/reporter/fancy.js +83 -96
  41. package/dist-npm/components/instance/shared.js +2 -2
  42. package/dist-npm/components/mono/mono.js +52 -62
  43. package/dist-npm/components/mono/monoTwo.js +35 -49
  44. package/dist-npm/components/multiselect/group-multiselect.js +55 -71
  45. package/dist-npm/components/multiselect/multi-select-two.js +97 -130
  46. package/dist-npm/components/multiselect/multi-select.js +43 -49
  47. package/dist-npm/components/multiselect/multiselect-main.d.ts +1 -0
  48. package/dist-npm/components/multiselect/multiselect-main.js +158 -145
  49. package/dist-npm/components/multiselect/num-multi-select.js +97 -130
  50. package/dist-npm/components/multiselect/num-multiselect-main.js +24 -35
  51. package/dist-npm/components/next-steps/next-steps.js +23 -25
  52. package/dist-npm/components/number/index.js +78 -112
  53. package/dist-npm/components/number/number-main.js +95 -2
  54. package/dist-npm/components/password/index.js +54 -73
  55. package/dist-npm/components/password/password-main.js +119 -2
  56. package/dist-npm/components/password/password-three.js +26 -30
  57. package/dist-npm/components/progressbar/ProgressBar.js +45 -64
  58. package/dist-npm/components/progressbar/helper.js +33 -40
  59. package/dist-npm/components/progressbar/index.js +1 -1
  60. package/dist-npm/components/prompts/create.js +29 -44
  61. package/dist-npm/components/prompts/index.d.ts +1 -0
  62. package/dist-npm/components/prompts/index.js +46 -45
  63. package/dist-npm/components/prompts/prompt.js +211 -260
  64. package/dist-npm/components/prompts/promptTwo.js +561 -605
  65. package/dist-npm/components/prompts/relinka.js +237 -295
  66. package/dist-npm/components/range/range.js +247 -294
  67. package/dist-npm/components/rawlist/index.js +87 -107
  68. package/dist-npm/components/results/results.js +31 -37
  69. package/dist-npm/components/search/index.js +148 -193
  70. package/dist-npm/components/select/index.js +148 -186
  71. package/dist-npm/components/select/num-select-main.js +27 -27
  72. package/dist-npm/components/select/num-select.js +124 -5
  73. package/dist-npm/components/select/select-key.js +24 -25
  74. package/dist-npm/components/select/select-main.d.ts +1 -0
  75. package/dist-npm/components/select/select-main.js +143 -133
  76. package/dist-npm/components/select/select-three.js +32 -36
  77. package/dist-npm/components/select/select-two.js +94 -87
  78. package/dist-npm/components/spinner/index.js +107 -136
  79. package/dist-npm/components/st-end/end.js +34 -26
  80. package/dist-npm/components/st-end/start.js +29 -15
  81. package/dist-npm/components/toggle/index.js +113 -137
  82. package/dist-npm/components/visual/animate/animate.js +53 -10
  83. package/dist-npm/components/visual/ascii-art/ascii-art.js +12 -1
  84. package/dist-npm/main.js +1 -0
  85. package/dist-npm/testing/index.js +58 -83
  86. package/dist-npm/types/general.d.ts +1 -1
  87. package/dist-npm/types/general.js +0 -1
  88. package/dist-npm/types/index.js +2 -3
  89. package/dist-npm/types/keypress.js +35 -36
  90. package/dist-npm/types/readline.js +0 -1
  91. package/dist-npm/types/relinka.js +0 -1
  92. package/dist-npm/types/utils.js +0 -1
  93. package/dist-npm/utils/box.js +135 -137
  94. package/dist-npm/utils/color.js +65 -74
  95. package/dist-npm/utils/colorize.js +124 -156
  96. package/dist-npm/utils/component.js +532 -657
  97. package/dist-npm/utils/constants.js +64 -63
  98. package/dist-npm/utils/core.js +2 -3
  99. package/dist-npm/utils/decoder.js +244 -223
  100. package/dist-npm/utils/error.js +4 -9
  101. package/dist-npm/utils/errors.js +14 -4
  102. package/dist-npm/utils/format.js +19 -24
  103. package/dist-npm/utils/keypress.js +316 -414
  104. package/dist-npm/utils/log.js +11 -15
  105. package/dist-npm/utils/mapping.js +45 -52
  106. package/dist-npm/utils/messages.js +196 -183
  107. package/dist-npm/utils/platforms.js +16 -20
  108. package/dist-npm/utils/prompt-tmp.js +235 -286
  109. package/dist-npm/utils/prompt-two.js +235 -286
  110. package/dist-npm/utils/readline.js +5 -7
  111. package/dist-npm/utils/skeleton.js +130 -170
  112. package/dist-npm/utils/stream.js +2 -2
  113. package/dist-npm/utils/string.js +44 -58
  114. package/dist-npm/utils/terminal.js +23 -34
  115. package/dist-npm/utils/tree.js +30 -41
  116. package/dist-npm/utils/types.js +0 -1
  117. package/dist-npm/utils/utils.js +8 -8
  118. package/dist-npm/utils/variants.js +36 -44
  119. package/package.json +14 -14
  120. package/dist-npm/mod.js +0 -2
  121. /package/dist-npm/{mod.d.ts → main.d.ts} +0 -0
@@ -1,310 +1,299 @@
1
- import process from 'node:process';
2
-
1
+ import process from "node:process";
3
2
  function isUnicodeSupported() {
4
- if (process.platform !== 'win32') {
5
- return process.env.TERM !== 'linux';
6
- }
7
-
8
- return process.env.WT_SESSION || Boolean(process.env.TERMINUS_SUBLIME) || process.env.ConEmuTask === '{cmd::Cmder}' || process.env.TERM_PROGRAM === 'Terminus-Sublime' || process.env.TERM_PROGRAM === 'vscode' || process.env.TERM === 'xterm-256color' || process.env.TERM === 'alacritty' || process.env.TERMINAL_EMULATOR === 'JetBrains-JediTerm';
3
+ if (process.platform !== "win32") {
4
+ return process.env.TERM !== "linux";
5
+ }
6
+ return Boolean(process.env.WT_SESSION) ||
7
+ Boolean(process.env.TERMINUS_SUBLIME) ||
8
+ process.env.ConEmuTask === "{cmd::Cmder}" ||
9
+ process.env.TERM_PROGRAM === "Terminus-Sublime" || process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty" || process.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
9
10
  }
10
-
11
11
  const common = {
12
- circleQuestionMark: '(?)',
13
- questionMarkPrefix: '(?)',
14
- square: '\u2588',
15
- squareDarkShade: '\u2593',
16
- squareMediumShade: '\u2592',
17
- squareLightShade: '\u2591',
18
- squareTop: '\u2580',
19
- squareBottom: '\u2584',
20
- squareLeft: '\u258C',
21
- squareRight: '\u2590',
22
- squareCenter: '\u25A0',
23
- bullet: '\u25CF',
24
- dot: '\u2024',
25
- ellipsis: '\u2026',
26
- pointerSmall: '\u203A',
27
- triangleUp: '\u25B2',
28
- triangleUpSmall: '\u25B4',
29
- triangleDown: '\u25BC',
30
- triangleDownSmall: '\u25BE',
31
- triangleLeftSmall: '\u25C2',
32
- triangleRightSmall: '\u25B8',
33
- home: '\u2302',
34
- heart: '\u2665',
35
- musicNote: '\u266A',
36
- musicNoteBeamed: '\u266B',
37
- arrowUp: '\u2191',
38
- arrowDown: '\u2193',
39
- arrowLeft: '\u2190',
40
- arrowRight: '\u2192',
41
- arrowLeftRight: '\u2194',
42
- arrowUpDown: '\u2195',
43
- almostEqual: '\u2248',
44
- notEqual: '\u2260',
45
- lessOrEqual: '\u2264',
46
- greaterOrEqual: '\u2265',
47
- identical: '\u2261',
48
- infinity: '\u221E',
49
- subscriptZero: '\u2080',
50
- subscriptOne: '\u2081',
51
- subscriptTwo: '\u2082',
52
- subscriptThree: '\u2083',
53
- subscriptFour: '\u2084',
54
- subscriptFive: '\u2085',
55
- subscriptSix: '\u2086',
56
- subscriptSeven: '\u2087',
57
- subscriptEight: '\u2088',
58
- subscriptNine: '\u2089',
59
- oneHalf: '\xBD',
60
- oneThird: '\u2153',
61
- oneQuarter: '\xBC',
62
- oneFifth: '\u2155',
63
- oneSixth: '\u2159',
64
- oneEighth: '\u215B',
65
- twoThirds: '\u2154',
66
- twoFifths: '\u2156',
67
- threeQuarters: '\xBE',
68
- threeFifths: '\u2157',
69
- threeEighths: '\u215C',
70
- fourFifths: '\u2158',
71
- fiveSixths: '\u215A',
72
- fiveEighths: '\u215D',
73
- sevenEighths: '\u215E',
74
- line: '\u2500',
75
- lineBold: '\u2501',
76
- lineDouble: '\u2550',
77
- lineDashed0: '\u2504',
78
- lineDashed1: '\u2505',
79
- lineDashed2: '\u2508',
80
- lineDashed3: '\u2509',
81
- lineDashed4: '\u254C',
82
- lineDashed5: '\u254D',
83
- lineDashed6: '\u2574',
84
- lineDashed7: '\u2576',
85
- lineDashed8: '\u2578',
86
- lineDashed9: '\u257A',
87
- lineDashed10: '\u257C',
88
- lineDashed11: '\u257E',
89
- lineDashed12: '\u2212',
90
- lineDashed13: '\u2013',
91
- lineDashed14: '\u2010',
92
- lineDashed15: '\u2043',
93
- lineVertical: '\u2502',
94
- lineVerticalBold: '\u2503',
95
- lineVerticalDouble: '\u2551',
96
- lineVerticalDashed0: '\u2506',
97
- lineVerticalDashed1: '\u2507',
98
- lineVerticalDashed2: '\u250A',
99
- lineVerticalDashed3: '\u250B',
100
- lineVerticalDashed4: '\u254E',
101
- lineVerticalDashed5: '\u254F',
102
- lineVerticalDashed6: '\u2575',
103
- lineVerticalDashed7: '\u2577',
104
- lineVerticalDashed8: '\u2579',
105
- lineVerticalDashed9: '\u257B',
106
- lineVerticalDashed10: '\u257D',
107
- lineVerticalDashed11: '\u257F',
108
- lineDownLeft: '\u2510',
109
- lineDownLeftArc: '\u256E',
110
- lineDownBoldLeftBold: '\u2513',
111
- lineDownBoldLeft: '\u2512',
112
- lineDownLeftBold: '\u2511',
113
- lineDownDoubleLeftDouble: '\u2557',
114
- lineDownDoubleLeft: '\u2556',
115
- lineDownLeftDouble: '\u2555',
116
- lineDownRight: '\u250C',
117
- lineDownRightArc: '\u256D',
118
- lineDownBoldRightBold: '\u250F',
119
- lineDownBoldRight: '\u250E',
120
- lineDownRightBold: '\u250D',
121
- lineDownDoubleRightDouble: '\u2554',
122
- lineDownDoubleRight: '\u2553',
123
- lineDownRightDouble: '\u2552',
124
- lineUpLeft: '\u2518',
125
- lineUpLeftArc: '\u256F',
126
- lineUpBoldLeftBold: '\u251B',
127
- lineUpBoldLeft: '\u251A',
128
- lineUpLeftBold: '\u2519',
129
- lineUpDoubleLeftDouble: '\u255D',
130
- lineUpDoubleLeft: '\u255C',
131
- lineUpLeftDouble: '\u255B',
132
- lineUpRight: '\u2514',
133
- lineUpRightArc: '\u2570',
134
- lineUpBoldRightBold: '\u2517',
135
- lineUpBoldRight: '\u2516',
136
- lineUpRightBold: '\u2515',
137
- lineUpDoubleRightDouble: '\u255A',
138
- lineUpDoubleRight: '\u2559',
139
- lineUpRightDouble: '\u2558',
140
- lineUpDownLeft: '\u2524',
141
- lineUpBoldDownBoldLeftBold: '\u252B',
142
- lineUpBoldDownBoldLeft: '\u2528',
143
- lineUpDownLeftBold: '\u2525',
144
- lineUpBoldDownLeftBold: '\u2529',
145
- lineUpDownBoldLeftBold: '\u252A',
146
- lineUpDownBoldLeft: '\u2527',
147
- lineUpBoldDownLeft: '\u2526',
148
- lineUpDoubleDownDoubleLeftDouble: '\u2563',
149
- lineUpDoubleDownDoubleLeft: '\u2562',
150
- lineUpDownLeftDouble: '\u2561',
151
- lineUpDownRight: '\u251C',
152
- lineUpBoldDownBoldRightBold: '\u2523',
153
- lineUpBoldDownBoldRight: '\u2520',
154
- lineUpDownRightBold: '\u251D',
155
- lineUpBoldDownRightBold: '\u2521',
156
- lineUpDownBoldRightBold: '\u2522',
157
- lineUpDownBoldRight: '\u251F',
158
- lineUpBoldDownRight: '\u251E',
159
- lineUpDoubleDownDoubleRightDouble: '\u2560',
160
- lineUpDoubleDownDoubleRight: '\u255F',
161
- lineUpDownRightDouble: '\u255E',
162
- lineDownLeftRight: '\u252C',
163
- lineDownBoldLeftBoldRightBold: '\u2533',
164
- lineDownLeftBoldRightBold: '\u252F',
165
- lineDownBoldLeftRight: '\u2530',
166
- lineDownBoldLeftBoldRight: '\u2531',
167
- lineDownBoldLeftRightBold: '\u2532',
168
- lineDownLeftRightBold: '\u252E',
169
- lineDownLeftBoldRight: '\u252D',
170
- lineDownDoubleLeftDoubleRightDouble: '\u2566',
171
- lineDownDoubleLeftRight: '\u2565',
172
- lineDownLeftDoubleRightDouble: '\u2564',
173
- lineUpLeftRight: '\u2534',
174
- lineUpBoldLeftBoldRightBold: '\u253B',
175
- lineUpLeftBoldRightBold: '\u2537',
176
- lineUpBoldLeftRight: '\u2538',
177
- lineUpBoldLeftBoldRight: '\u2539',
178
- lineUpBoldLeftRightBold: '\u253A',
179
- lineUpLeftRightBold: '\u2536',
180
- lineUpLeftBoldRight: '\u2535',
181
- lineUpDoubleLeftDoubleRightDouble: '\u2569',
182
- lineUpDoubleLeftRight: '\u2568',
183
- lineUpLeftDoubleRightDouble: '\u2567',
184
- lineUpDownLeftRight: '\u253C',
185
- lineUpBoldDownBoldLeftBoldRightBold: '\u254B',
186
- lineUpDownBoldLeftBoldRightBold: '\u2548',
187
- lineUpBoldDownLeftBoldRightBold: '\u2547',
188
- lineUpBoldDownBoldLeftRightBold: '\u254A',
189
- lineUpBoldDownBoldLeftBoldRight: '\u2549',
190
- lineUpBoldDownLeftRight: '\u2540',
191
- lineUpDownBoldLeftRight: '\u2541',
192
- lineUpDownLeftBoldRight: '\u253D',
193
- lineUpDownLeftRightBold: '\u253E',
194
- lineUpBoldDownBoldLeftRight: '\u2542',
195
- lineUpDownLeftBoldRightBold: '\u253F',
196
- lineUpBoldDownLeftBoldRight: '\u2543',
197
- lineUpBoldDownLeftRightBold: '\u2544',
198
- lineUpDownBoldLeftBoldRight: '\u2545',
199
- lineUpDownBoldLeftRightBold: '\u2546',
200
- lineUpDoubleDownDoubleLeftDoubleRightDouble: '\u256C',
201
- lineUpDoubleDownDoubleLeftRight: '\u256B',
202
- lineUpDownLeftDoubleRightDouble: '\u256A',
203
- lineCross: '\u2573',
204
- lineBackslash: '\u2572',
205
- lineSlash: '\u2571',
12
+ circleQuestionMark: "(?)",
13
+ questionMarkPrefix: "(?)",
14
+ square: "\u2588",
15
+ squareDarkShade: "\u2593",
16
+ squareMediumShade: "\u2592",
17
+ squareLightShade: "\u2591",
18
+ squareTop: "\u2580",
19
+ squareBottom: "\u2584",
20
+ squareLeft: "\u258C",
21
+ squareRight: "\u2590",
22
+ squareCenter: "\u25A0",
23
+ bullet: "\u25CF",
24
+ dot: "\u2024",
25
+ ellipsis: "\u2026",
26
+ pointerSmall: "\u203A",
27
+ triangleUp: "\u25B2",
28
+ triangleUpSmall: "\u25B4",
29
+ triangleDown: "\u25BC",
30
+ triangleDownSmall: "\u25BE",
31
+ triangleLeftSmall: "\u25C2",
32
+ triangleRightSmall: "\u25B8",
33
+ home: "\u2302",
34
+ heart: "\u2665",
35
+ musicNote: "\u266A",
36
+ musicNoteBeamed: "\u266B",
37
+ arrowUp: "\u2191",
38
+ arrowDown: "\u2193",
39
+ arrowLeft: "\u2190",
40
+ arrowRight: "\u2192",
41
+ arrowLeftRight: "\u2194",
42
+ arrowUpDown: "\u2195",
43
+ almostEqual: "\u2248",
44
+ notEqual: "\u2260",
45
+ lessOrEqual: "\u2264",
46
+ greaterOrEqual: "\u2265",
47
+ identical: "\u2261",
48
+ infinity: "\u221E",
49
+ subscriptZero: "\u2080",
50
+ subscriptOne: "\u2081",
51
+ subscriptTwo: "\u2082",
52
+ subscriptThree: "\u2083",
53
+ subscriptFour: "\u2084",
54
+ subscriptFive: "\u2085",
55
+ subscriptSix: "\u2086",
56
+ subscriptSeven: "\u2087",
57
+ subscriptEight: "\u2088",
58
+ subscriptNine: "\u2089",
59
+ oneHalf: "\xBD",
60
+ oneThird: "\u2153",
61
+ oneQuarter: "\xBC",
62
+ oneFifth: "\u2155",
63
+ oneSixth: "\u2159",
64
+ oneEighth: "\u215B",
65
+ twoThirds: "\u2154",
66
+ twoFifths: "\u2156",
67
+ threeQuarters: "\xBE",
68
+ threeFifths: "\u2157",
69
+ threeEighths: "\u215C",
70
+ fourFifths: "\u2158",
71
+ fiveSixths: "\u215A",
72
+ fiveEighths: "\u215D",
73
+ sevenEighths: "\u215E",
74
+ line: "\u2500",
75
+ lineBold: "\u2501",
76
+ lineDouble: "\u2550",
77
+ lineDashed0: "\u2504",
78
+ lineDashed1: "\u2505",
79
+ lineDashed2: "\u2508",
80
+ lineDashed3: "\u2509",
81
+ lineDashed4: "\u254C",
82
+ lineDashed5: "\u254D",
83
+ lineDashed6: "\u2574",
84
+ lineDashed7: "\u2576",
85
+ lineDashed8: "\u2578",
86
+ lineDashed9: "\u257A",
87
+ lineDashed10: "\u257C",
88
+ lineDashed11: "\u257E",
89
+ lineDashed12: "\u2212",
90
+ lineDashed13: "\u2013",
91
+ lineDashed14: "\u2010",
92
+ lineDashed15: "\u2043",
93
+ lineVertical: "\u2502",
94
+ lineVerticalBold: "\u2503",
95
+ lineVerticalDouble: "\u2551",
96
+ lineVerticalDashed0: "\u2506",
97
+ lineVerticalDashed1: "\u2507",
98
+ lineVerticalDashed2: "\u250A",
99
+ lineVerticalDashed3: "\u250B",
100
+ lineVerticalDashed4: "\u254E",
101
+ lineVerticalDashed5: "\u254F",
102
+ lineVerticalDashed6: "\u2575",
103
+ lineVerticalDashed7: "\u2577",
104
+ lineVerticalDashed8: "\u2579",
105
+ lineVerticalDashed9: "\u257B",
106
+ lineVerticalDashed10: "\u257D",
107
+ lineVerticalDashed11: "\u257F",
108
+ lineDownLeft: "\u2510",
109
+ lineDownLeftArc: "\u256E",
110
+ lineDownBoldLeftBold: "\u2513",
111
+ lineDownBoldLeft: "\u2512",
112
+ lineDownLeftBold: "\u2511",
113
+ lineDownDoubleLeftDouble: "\u2557",
114
+ lineDownDoubleLeft: "\u2556",
115
+ lineDownLeftDouble: "\u2555",
116
+ lineDownRight: "\u250C",
117
+ lineDownRightArc: "\u256D",
118
+ lineDownBoldRightBold: "\u250F",
119
+ lineDownBoldRight: "\u250E",
120
+ lineDownRightBold: "\u250D",
121
+ lineDownDoubleRightDouble: "\u2554",
122
+ lineDownDoubleRight: "\u2553",
123
+ lineDownRightDouble: "\u2552",
124
+ lineUpLeft: "\u2518",
125
+ lineUpLeftArc: "\u256F",
126
+ lineUpBoldLeftBold: "\u251B",
127
+ lineUpBoldLeft: "\u251A",
128
+ lineUpLeftBold: "\u2519",
129
+ lineUpDoubleLeftDouble: "\u255D",
130
+ lineUpDoubleLeft: "\u255C",
131
+ lineUpLeftDouble: "\u255B",
132
+ lineUpRight: "\u2514",
133
+ lineUpRightArc: "\u2570",
134
+ lineUpBoldRightBold: "\u2517",
135
+ lineUpBoldRight: "\u2516",
136
+ lineUpRightBold: "\u2515",
137
+ lineUpDoubleRightDouble: "\u255A",
138
+ lineUpDoubleRight: "\u2559",
139
+ lineUpRightDouble: "\u2558",
140
+ lineUpDownLeft: "\u2524",
141
+ lineUpBoldDownBoldLeftBold: "\u252B",
142
+ lineUpBoldDownBoldLeft: "\u2528",
143
+ lineUpDownLeftBold: "\u2525",
144
+ lineUpBoldDownLeftBold: "\u2529",
145
+ lineUpDownBoldLeftBold: "\u252A",
146
+ lineUpDownBoldLeft: "\u2527",
147
+ lineUpBoldDownLeft: "\u2526",
148
+ lineUpDoubleDownDoubleLeftDouble: "\u2563",
149
+ lineUpDoubleDownDoubleLeft: "\u2562",
150
+ lineUpDownLeftDouble: "\u2561",
151
+ lineUpDownRight: "\u251C",
152
+ lineUpBoldDownBoldRightBold: "\u2523",
153
+ lineUpBoldDownBoldRight: "\u2520",
154
+ lineUpDownRightBold: "\u251D",
155
+ lineUpBoldDownRightBold: "\u2521",
156
+ lineUpDownBoldRightBold: "\u2522",
157
+ lineUpDownBoldRight: "\u251F",
158
+ lineUpBoldDownRight: "\u251E",
159
+ lineUpDoubleDownDoubleRightDouble: "\u2560",
160
+ lineUpDoubleDownDoubleRight: "\u255F",
161
+ lineUpDownRightDouble: "\u255E",
162
+ lineDownLeftRight: "\u252C",
163
+ lineDownBoldLeftBoldRightBold: "\u2533",
164
+ lineDownLeftBoldRightBold: "\u252F",
165
+ lineDownBoldLeftRight: "\u2530",
166
+ lineDownBoldLeftBoldRight: "\u2531",
167
+ lineDownBoldLeftRightBold: "\u2532",
168
+ lineDownLeftRightBold: "\u252E",
169
+ lineDownLeftBoldRight: "\u252D",
170
+ lineDownDoubleLeftDoubleRightDouble: "\u2566",
171
+ lineDownDoubleLeftRight: "\u2565",
172
+ lineDownLeftDoubleRightDouble: "\u2564",
173
+ lineUpLeftRight: "\u2534",
174
+ lineUpBoldLeftBoldRightBold: "\u253B",
175
+ lineUpLeftBoldRightBold: "\u2537",
176
+ lineUpBoldLeftRight: "\u2538",
177
+ lineUpBoldLeftBoldRight: "\u2539",
178
+ lineUpBoldLeftRightBold: "\u253A",
179
+ lineUpLeftRightBold: "\u2536",
180
+ lineUpLeftBoldRight: "\u2535",
181
+ lineUpDoubleLeftDoubleRightDouble: "\u2569",
182
+ lineUpDoubleLeftRight: "\u2568",
183
+ lineUpLeftDoubleRightDouble: "\u2567",
184
+ lineUpDownLeftRight: "\u253C",
185
+ lineUpBoldDownBoldLeftBoldRightBold: "\u254B",
186
+ lineUpDownBoldLeftBoldRightBold: "\u2548",
187
+ lineUpBoldDownLeftBoldRightBold: "\u2547",
188
+ lineUpBoldDownBoldLeftRightBold: "\u254A",
189
+ lineUpBoldDownBoldLeftBoldRight: "\u2549",
190
+ lineUpBoldDownLeftRight: "\u2540",
191
+ lineUpDownBoldLeftRight: "\u2541",
192
+ lineUpDownLeftBoldRight: "\u253D",
193
+ lineUpDownLeftRightBold: "\u253E",
194
+ lineUpBoldDownBoldLeftRight: "\u2542",
195
+ lineUpDownLeftBoldRightBold: "\u253F",
196
+ lineUpBoldDownLeftBoldRight: "\u2543",
197
+ lineUpBoldDownLeftRightBold: "\u2544",
198
+ lineUpDownBoldLeftBoldRight: "\u2545",
199
+ lineUpDownBoldLeftRightBold: "\u2546",
200
+ lineUpDoubleDownDoubleLeftDoubleRightDouble: "\u256C",
201
+ lineUpDoubleDownDoubleLeftRight: "\u256B",
202
+ lineUpDownLeftDoubleRightDouble: "\u256A",
203
+ lineCross: "\u2573",
204
+ lineBackslash: "\u2572",
205
+ lineSlash: "\u2571"
206
206
  };
207
-
208
207
  const specialMainSymbols = {
209
- tick: '\u2714',
210
- info: '\u2139',
211
- warning: '\u26A0',
212
- cross: '\u2718',
213
- squareSmall: '\u25FB',
214
- squareSmallFilled: '\u25FC',
215
- circle: '\u25EF',
216
- circleFilled: '\u25C9',
217
- circleDotted: '\u25CC',
218
- circleDouble: '\u25CE',
219
- circleCircle: '\u24DE',
220
- circleCross: '\u24E7',
221
- circlePipe: '\u24BE',
222
- radioOn: '\u25C9',
223
- radioOff: '\u25EF',
224
- checkboxOn: '\u2612',
225
- checkboxOff: '\u2610',
226
- checkboxCircleOn: '\u24E7',
227
- checkboxCircleOff: '\u24BE',
228
- pointer: '\u276F',
229
- triangleUpOutline: '\u25B3',
230
- triangleLeft: '\u25C0',
231
- triangleRight: '\u25B6',
232
- lozenge: '\u25C6',
233
- lozengeOutline: '\u25C7',
234
- hamburger: '\u2630',
235
- smiley: '\u32E1',
236
- mustache: '\u0DF4',
237
- star: '\u2605',
238
- play: '\u25B6',
239
- nodejs: '\u2B22',
240
- oneSeventh: '\u2150',
241
- oneNinth: '\u2151',
242
- oneTenth: '\u2152',
208
+ tick: "\u2714",
209
+ info: "\u2139",
210
+ warning: "\u26A0",
211
+ cross: "\u2718",
212
+ squareSmall: "\u25FB",
213
+ squareSmallFilled: "\u25FC",
214
+ circle: "\u25EF",
215
+ circleFilled: "\u25C9",
216
+ circleDotted: "\u25CC",
217
+ circleDouble: "\u25CE",
218
+ circleCircle: "\u24DE",
219
+ circleCross: "\u24E7",
220
+ circlePipe: "\u24BE",
221
+ radioOn: "\u25C9",
222
+ radioOff: "\u25EF",
223
+ checkboxOn: "\u2612",
224
+ checkboxOff: "\u2610",
225
+ checkboxCircleOn: "\u24E7",
226
+ checkboxCircleOff: "\u24BE",
227
+ pointer: "\u276F",
228
+ triangleUpOutline: "\u25B3",
229
+ triangleLeft: "\u25C0",
230
+ triangleRight: "\u25B6",
231
+ lozenge: "\u25C6",
232
+ lozengeOutline: "\u25C7",
233
+ hamburger: "\u2630",
234
+ smiley: "\u32E1",
235
+ mustache: "\u0DF4",
236
+ star: "\u2605",
237
+ play: "\u25B6",
238
+ nodejs: "\u2B22",
239
+ oneSeventh: "\u2150",
240
+ oneNinth: "\u2151",
241
+ oneTenth: "\u2152"
243
242
  };
244
-
245
243
  const specialFallbackSymbols = {
246
- tick: '\u221A',
247
- info: 'i',
248
- warning: '\u203C',
249
- cross: '\xD7',
250
- squareSmall: '\u25A1',
251
- squareSmallFilled: '\u25A0',
252
- circle: '( )',
253
- circleFilled: '(*)',
254
- circleDotted: '( )',
255
- circleDouble: '( )',
256
- circleCircle: '(\u25CB)',
257
- circleCross: '(\xD7)',
258
- circlePipe: '(\u2502)',
259
- radioOn: '(*)',
260
- radioOff: '( )',
261
- checkboxOn: '[\xD7]',
262
- checkboxOff: '[ ]',
263
- checkboxCircleOn: '(\xD7)',
264
- checkboxCircleOff: '( )',
265
- pointer: '>',
266
- triangleUpOutline: '\u2206',
267
- triangleLeft: '\u25C4',
268
- triangleRight: '\u25BA',
269
- lozenge: '\u2666',
270
- lozengeOutline: '\u25CA',
271
- hamburger: '\u2261',
272
- smiley: '\u263A',
273
- mustache: '\u250C\u2500\u2510',
274
- star: '\u2736',
275
- play: '\u25BA',
276
- nodejs: '\u2666',
277
- oneSeventh: '1/7',
278
- oneNinth: '1/9',
279
- oneTenth: '1/10',
280
- };
281
-
282
- export const mainSymbols = { ...common,
283
- ...specialMainSymbols,
244
+ tick: "\u221A",
245
+ info: "i",
246
+ warning: "\u203C",
247
+ cross: "\xD7",
248
+ squareSmall: "\u25A1",
249
+ squareSmallFilled: "\u25A0",
250
+ circle: "( )",
251
+ circleFilled: "(*)",
252
+ circleDotted: "( )",
253
+ circleDouble: "( )",
254
+ circleCircle: "(\u25CB)",
255
+ circleCross: "(\xD7)",
256
+ circlePipe: "(\u2502)",
257
+ radioOn: "(*)",
258
+ radioOff: "( )",
259
+ checkboxOn: "[\xD7]",
260
+ checkboxOff: "[ ]",
261
+ checkboxCircleOn: "(\xD7)",
262
+ checkboxCircleOff: "( )",
263
+ pointer: ">",
264
+ triangleUpOutline: "\u2206",
265
+ triangleLeft: "\u25C4",
266
+ triangleRight: "\u25BA",
267
+ lozenge: "\u2666",
268
+ lozengeOutline: "\u25CA",
269
+ hamburger: "\u2261",
270
+ smiley: "\u263A",
271
+ mustache: "\u250C\u2500\u2510",
272
+ star: "\u2736",
273
+ play: "\u25BA",
274
+ nodejs: "\u2666",
275
+ oneSeventh: "1/7",
276
+ oneNinth: "1/9",
277
+ oneTenth: "1/10"
284
278
  };
279
+ export const mainSymbols = { ...common, ...specialMainSymbols };
285
280
  export const fallbackSymbols = {
286
- ...common,
287
- ...specialFallbackSymbols,
281
+ ...common,
282
+ ...specialFallbackSymbols
288
283
  };
289
284
  const shouldUseMain = isUnicodeSupported();
290
285
  const figures = shouldUseMain ? mainSymbols : fallbackSymbols;
291
-
292
286
  export default figures;
293
-
294
287
  const replacements = Object.entries(specialMainSymbols);
295
-
296
- export const replaceSymbols = (string, {useFallback = !shouldUseMain} = {}) => {
297
- if (useFallback) {
298
- for (const [key, mainSymbol] of replacements) {
299
- const fallbackSymbol = fallbackSymbols[key];
300
-
301
- if (!fallbackSymbol) {
302
- throw Error(`Unable to find fallback for ${key}`);
303
- }
304
-
305
- string = string.replaceAll(mainSymbol, fallbackSymbol);
306
- }
288
+ export const replaceSymbols = (string, { useFallback = !shouldUseMain } = {}) => {
289
+ if (useFallback) {
290
+ for (const [key, mainSymbol] of replacements) {
291
+ const fallbackSymbol = fallbackSymbols[key];
292
+ if (!fallbackSymbol) {
293
+ throw new Error(`Unable to find fallback for ${key}`);
294
+ }
295
+ string = string.replaceAll(mainSymbol, fallbackSymbol);
307
296
  }
308
-
309
- return string;
297
+ }
298
+ return string;
310
299
  };