@reliverse/relinka 1.1.7 → 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,317 +1,270 @@
1
- import Differ from 'ansi-diff-stream';
2
- import esc from 'ansi-escapes';
3
- import chalk from 'chalk';
4
- import ui from 'cli-styles';
5
- import {EventEmitter} from 'node:events';
6
- import precision from 'precision';
7
- import stringWidth from 'string-width';
8
- import windowSize from 'window-size';
9
- import process from 'node:process';
10
- import wrap from '../../utils/skeleton.js';
11
-
12
- const isString = (a) => typeof a === 'string';
13
-
1
+ import Differ from "ansi-diff-stream";
2
+ import esc from "ansi-escapes";
3
+ import chalk from "chalk";
4
+ import ui from "cli-styles";
5
+ import { EventEmitter } from "events";
6
+ import precision from "precision";
7
+ import stringWidth from "string-width";
8
+ import windowSize from "window-size";
9
+ import wrap from "../../utils/skeleton.js";
14
10
  export class RangePrompt extends EventEmitter {
15
- hint;
16
- marker;
17
- bar;
18
- values;
19
- value;
20
- unit;
21
- typed;
22
- lastHit;
23
- min;
24
- max;
25
- step;
26
- size;
27
- done;
28
- aborted;
29
- msg;
30
- initialValue;
31
- out;
32
- close;
33
- pause;
34
- resume;
35
- _;
36
- stdin;
37
- keyListener;
38
- cursorHidden;
39
- constructor(msg, options = {}) {
40
- super();
41
- const defaults = {
42
- hint: '\u2013\xA0Use arrow keys or type a value.',
43
- marker: chalk.cyan.bold('\u25CF'),
44
- bar: '\u2013',
45
- values: [],
46
- value: null,
47
- unit: '',
48
- typed: '',
49
- lastHit: 0,
50
- min: 0,
51
- max: 100,
52
- step: 1,
53
- size: windowSize.width,
54
- };
55
-
56
- const opts = { ...defaults,
57
- ...options,
58
- };
59
-
60
- this.hint = opts.hint;
61
- this.marker = opts.marker;
62
- this.bar = opts.bar;
63
- this.values = opts.values;
64
- this.value = opts.value;
65
- this.unit = opts.unit;
66
- this.typed = opts.typed;
67
- this.lastHit = opts.lastHit;
68
- this.min = opts.min;
69
- this.max = opts.max;
70
- this.step = opts.step;
71
- this.size = opts.size;
72
- this.done = false;
73
- this.aborted = false;
74
- this.msg = msg;
75
- this.initialValue = this.value;
76
- this.out = process.stdout;
77
- this.stdin = process.stdin;
78
- this.keyListener = this.onKeyPress.bind(this);
79
- this.cursorHidden = false;
80
- this.close = this._close.bind(this);
81
- this.reset = this.reset.bind(this);
82
- this.abort = this.abort.bind(this);
83
- this.submit = this.submit.bind(this);
84
- this.up = this.up.bind(this);
85
- this.down = this.down.bind(this);
86
- this.handleNumericInput = this.handleNumericInput.bind(this);
87
- this.handleUnknownInput = this.handleUnknownInput.bind(this);
88
- this.render = this.render.bind(this);
89
- this.left = this.down.bind(this);
90
- this.right = this.up.bind(this);
91
- this._ = this.handleUnknownInput;
92
- this.initialize();
93
- }
94
- /**
11
+
12
+ hint;
13
+ marker;
14
+ bar;
15
+ values;
16
+ value;
17
+ unit;
18
+ typed;
19
+ lastHit;
20
+ min;
21
+ max;
22
+ step;
23
+ size;
24
+ done;
25
+ aborted;
26
+ msg;
27
+ initialValue;
28
+ out;
29
+ close;
30
+ pause;
31
+ resume;
32
+ _;
33
+
34
+
35
+ stdin;
36
+ keyListener;
37
+ cursorHidden;
38
+ constructor(msg, options = {}) {
39
+ super();
40
+ const defaults = {
41
+ hint: "\u2013\xA0Use arrow keys or type a value.",
42
+ marker: chalk.cyan.bold("\u25CF"),
43
+ bar: "\u2013",
44
+ values: [],
45
+ value: null,
46
+ unit: "",
47
+ typed: "",
48
+ lastHit: 0,
49
+ min: 0,
50
+ max: 100,
51
+ step: 1,
52
+ size: windowSize.width
53
+ };
54
+ const opts = { ...defaults, ...options };
55
+ this.hint = opts.hint;
56
+ this.marker = opts.marker;
57
+ this.bar = opts.bar;
58
+ this.values = opts.values;
59
+ this.value = opts.value;
60
+ this.unit = opts.unit;
61
+ this.typed = opts.typed;
62
+ this.lastHit = opts.lastHit;
63
+ this.min = opts.min;
64
+ this.max = opts.max;
65
+ this.step = opts.step;
66
+ this.size = opts.size;
67
+ this.done = false;
68
+ this.aborted = false;
69
+ this.msg = msg;
70
+ this.initialValue = this.value;
71
+ this.out = process.stdout;
72
+ this.stdin = process.stdin;
73
+ this.keyListener = this.onKeyPress.bind(this);
74
+ this.cursorHidden = false;
75
+ this.close = this._close.bind(this);
76
+ this.reset = this.reset.bind(this);
77
+ this.abort = this.abort.bind(this);
78
+ this.submit = this.submit.bind(this);
79
+ this.up = this.up.bind(this);
80
+ this.down = this.down.bind(this);
81
+ this.handleNumericInput = this.handleNumericInput.bind(this);
82
+ this.handleUnknownInput = this.handleUnknownInput.bind(this);
83
+ this.render = this.render.bind(this);
84
+ this.left = this.down.bind(this);
85
+ this.right = this.up.bind(this);
86
+ this._ = this.handleUnknownInput;
87
+ this.initialize();
88
+ }
89
+ /**
95
90
  * Initializes the prompt by setting up listeners and terminal settings
96
91
  */
97
- initialize() {
98
- this.out.write(esc.cursorHide);
99
- this.cursorHidden = true;
100
- if (this.stdin.isTTY) {
101
- this.stdin.setRawMode(true);
102
- this.stdin.resume();
103
- }
104
-
105
- this.stdin.on('data', this.keyListener);
106
- this.render(true);
92
+ initialize() {
93
+ this.out.write(esc.cursorHide);
94
+ this.cursorHidden = true;
95
+ if (this.stdin.isTTY) {
96
+ this.stdin.setRawMode(true);
97
+ this.stdin.resume();
107
98
  }
108
-
99
+ this.stdin.on("data", this.keyListener);
100
+ this.render(true);
101
+ }
109
102
  _close() {
110
- this.stdin.removeListener('data', this.keyListener);
111
- if (this.stdin.isTTY) {
112
- this.stdin.setRawMode(false);
113
- this.stdin.pause();
114
- }
115
-
116
- if (this.cursorHidden) {
117
- this.out.write(esc.cursorShow);
118
- this.cursorHidden = false;
119
- }
120
-
121
- if (this.out instanceof Differ) {
122
- this.out.end();
123
- }
124
-
125
- this.emit('close');
103
+ this.stdin.removeListener("data", this.keyListener);
104
+ if (this.stdin.isTTY) {
105
+ this.stdin.setRawMode(false);
106
+ this.stdin.pause();
107
+ }
108
+ if (this.cursorHidden) {
109
+ this.out.write(esc.cursorShow);
110
+ this.cursorHidden = false;
111
+ }
112
+ if (this.out instanceof Differ) {
113
+ this.out.end();
126
114
  }
127
-
115
+ this.emit("close");
116
+ }
128
117
  onKeyPress(chunk) {
129
- const key = chunk.toString();
130
-
131
- if (key === '') {
132
- this.abort();
133
- return;
134
- }
135
-
136
- if (key === '\r' || key === '\n') {
137
- this.submit();
138
- return;
139
- }
140
-
141
- if (key === '\x1B[A' || key === '\x1B[B') {
142
- if (key === '\x1B[A') {
143
- this.up();
144
- } else {
145
- this.down();
146
- }
147
-
148
- return;
149
- }
150
-
151
- if (isFloat.test(key)) {
152
- this.handleNumericInput(key);
153
- } else {
154
- this.handleUnknownInput();
155
- }
118
+ const key = chunk.toString();
119
+ if (key === "") {
120
+ this.abort();
121
+ return;
122
+ } else if (key === "\r" || key === "\n") {
123
+ this.submit();
124
+ return;
125
+ } else if (key === "\x1B[A" || key === "\x1B[B") {
126
+ if (key === "\x1B[A") {
127
+ this.up();
128
+ } else {
129
+ this.down();
130
+ }
131
+ return;
156
132
  }
157
-
158
- reset() {
159
- this.typed = '';
160
- this.value = this.initialValue;
161
- this.emit('change');
162
- this.render();
133
+ if (isFloat.test(key)) {
134
+ this.handleNumericInput(key);
135
+ } else {
136
+ this.handleUnknownInput(key);
163
137
  }
164
-
138
+ }
139
+ reset() {
140
+ this.typed = "";
141
+ this.value = this.initialValue;
142
+ this.emit("change");
143
+ this.render();
144
+ }
165
145
  abort() {
166
- this.done = true;
167
- this.aborted = true;
168
- this.emit('abort');
169
- this.render();
170
- this.out.write('\n');
171
- this.close();
172
- }
173
-
146
+ this.done = true;
147
+ this.aborted = true;
148
+ this.emit("abort");
149
+ this.render();
150
+ this.out.write("\n");
151
+ this.close();
152
+ }
174
153
  submit() {
175
- this.done = true;
176
- this.aborted = false;
177
- this.emit('submit');
178
- this.render();
179
- this.out.write('\n');
180
- this.close();
181
- }
182
-
154
+ this.done = true;
155
+ this.aborted = false;
156
+ this.emit("submit");
157
+ this.render();
158
+ this.out.write("\n");
159
+ this.close();
160
+ }
183
161
  up() {
184
- this.typed = '';
185
- if (this.value !== null && this.value >= this.max) {
186
- this.bell();
187
- return;
188
- }
189
-
190
- if (this.value !== null) {
191
- this.value = +(this.value + this.step).toFixed(precision(this.step));
192
- if (this.value > this.max) {
193
- this.value = this.max;
194
- }
195
- }
196
-
197
- this.emit('change');
198
- this.render();
162
+ this.typed = "";
163
+ if (this.value !== null && this.value >= this.max) {
164
+ this.bell();
165
+ return;
199
166
  }
200
-
167
+ if (this.value !== null) {
168
+ this.value = +(this.value + this.step).toFixed(precision(this.step));
169
+ if (this.value > this.max) {
170
+ this.value = this.max;
171
+ }
172
+ }
173
+ this.emit("change");
174
+ this.render();
175
+ }
201
176
  down() {
202
- this.typed = '';
203
- if (this.value !== null && this.value <= this.min) {
204
- this.bell();
205
- return;
206
- }
207
-
208
- if (this.value !== null) {
209
- this.value = +(this.value - this.step).toFixed(precision(this.step));
210
- if (this.value < this.min) {
211
- this.value = this.min;
212
- }
213
- }
214
-
215
- this.emit('change');
216
- this.render();
177
+ this.typed = "";
178
+ if (this.value !== null && this.value <= this.min) {
179
+ this.bell();
180
+ return;
181
+ }
182
+ if (this.value !== null) {
183
+ this.value = +(this.value - this.step).toFixed(precision(this.step));
184
+ if (this.value < this.min) {
185
+ this.value = this.min;
186
+ }
217
187
  }
218
-
188
+ this.emit("change");
189
+ this.render();
190
+ }
219
191
  handleNumericInput(n) {
220
- if (!isFloat.test(n)) {
221
- this.bell();
222
- return;
223
- }
224
-
225
- const now = Date.now();
226
-
227
- if (now - this.lastHit > 1e3) {
228
- this.typed = '';
229
- }
230
-
231
- this.typed += n;
232
- this.lastHit = now;
233
- const v = parseFloat(this.typed);
234
-
235
- if (isNaN(v)) {
236
- this.bell();
237
- return;
238
- }
239
-
240
- let newValue = v;
241
-
242
- if (newValue > this.max) {
243
- newValue = this.max;
244
- }
245
-
246
- if (newValue < this.min) {
247
- newValue = this.min;
248
- }
249
-
250
- this.value = newValue;
251
- this.emit('change');
252
- this.render();
192
+ if (!isFloat.test(n)) {
193
+ this.bell();
194
+ return;
253
195
  }
254
-
255
- handleUnknownInput() {
256
- this.bell();
196
+ const now = Date.now();
197
+ if (now - this.lastHit > 1e3) {
198
+ this.typed = "";
257
199
  }
258
-
259
- render(first = false) {
260
- let out = '';
261
-
262
- if (first) {
263
- out += esc.cursorHide;
264
- } else {
265
- out += esc.eraseLines(2) + esc.cursorTo(0);
266
- }
267
-
268
- out += [
269
- ui.symbol(this.done, this.aborted),
270
- chalk.bold(this.msg),
271
- ui.delimiter(this.done),
272
- this.value !== null ? this.value : '',
273
- chalk.gray(this.unit),
274
- ].join(' ') + '\n';
275
- const size = this.size - stringWidth(String(this.min)) - stringWidth(String(this.max)) - 6;
276
- const barWidth = stringWidth(this.bar);
277
-
278
- const left = Math.round((size - barWidth) * (this.value !== null ? this.value : 0) / (this.max - this.min));
279
-
280
- const right = size - left - barWidth;
281
- const leftBar = this.bar.repeat(Math.max(0, Math.floor(left / barWidth)));
282
- const rightBar = this.bar.repeat(Math.max(0, Math.floor(right / barWidth)));
283
-
284
- out += [
285
- '',
286
- this.min,
287
- chalk.gray(leftBar) + this.marker + chalk.gray(rightBar),
288
- this.max,
289
- '',
290
- ].join(' ') + '\n';
291
- this.out.write(out);
200
+ this.typed += n;
201
+ this.lastHit = now;
202
+ const v = parseFloat(this.typed);
203
+ if (isNaN(v)) {
204
+ this.bell();
205
+ return;
292
206
  }
293
-
294
- bell() {
295
- this.out.write('\x07');
207
+ let newValue = v;
208
+ if (newValue > this.max) {
209
+ newValue = this.max;
296
210
  }
297
-
298
- left;
299
- right;
300
- }const isFloat = /^[\d.]+$/;
301
-
302
- export const rangePrompt = (msg, opt) => {
303
- if (!isString(msg)) {
304
- throw Error('Message must be string.');
211
+ if (newValue < this.min) {
212
+ newValue = this.min;
305
213
  }
306
-
307
- if (Array.isArray(opt) || typeof opt !== 'object') {
308
- opt = {};
214
+ this.value = newValue;
215
+ this.emit("change");
216
+ this.render();
217
+ }
218
+ handleUnknownInput(input) {
219
+ this.bell();
220
+ }
221
+ render(first = false) {
222
+ let out = "";
223
+ if (first) {
224
+ out += esc.cursorHide;
225
+ } else {
226
+ out += esc.eraseLines(2) + esc.cursorTo(0);
309
227
  }
310
-
311
- const prompt = new RangePrompt(msg, opt);
312
-
313
- return wrap(prompt);
228
+ out += [
229
+ ui.symbol(this.done, this.aborted),
230
+ chalk.bold(this.msg),
231
+ ui.delimiter(this.done),
232
+ this.value !== null ? this.value : "",
233
+ chalk.gray(this.unit)
234
+ ].join(" ") + "\n";
235
+ const size = this.size - stringWidth(String(this.min)) - stringWidth(String(this.max)) - 6;
236
+ const barWidth = stringWidth(this.bar);
237
+ const left = Math.round(
238
+ (size - barWidth) * (this.value !== null ? this.value : 0) / (this.max - this.min)
239
+ );
240
+ const right = size - left - barWidth;
241
+ const leftBar = this.bar.repeat(Math.max(0, Math.floor(left / barWidth)));
242
+ const rightBar = this.bar.repeat(Math.max(0, Math.floor(right / barWidth)));
243
+ out += [
244
+ "",
245
+ this.min,
246
+ chalk.gray(leftBar) + this.marker + chalk.gray(rightBar),
247
+ this.max,
248
+ ""
249
+ ].join(" ") + "\n";
250
+ this.out.write(out);
251
+ }
252
+ bell() {
253
+ this.out.write("\x07");
254
+ }
255
+
256
+ left;
257
+ right;
258
+ }
259
+ const isFloat = /^[0-9.]+$/;
260
+ export const rangePrompt = (msg, opt) => {
261
+ if (typeof msg !== "string") {
262
+ throw new Error("Message must be string.");
263
+ }
264
+ if (Array.isArray(opt) || typeof opt !== "object") {
265
+ opt = {};
266
+ }
267
+ const prompt = new RangePrompt(msg, opt);
268
+ return wrap(prompt);
314
269
  };
315
- export default Object.assign(rangePrompt, {
316
- RangePrompt,
317
- });
270
+ export default Object.assign(rangePrompt, { RangePrompt });