create-rstack 2.1.2 → 2.1.3

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.
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ export declare function create({ name, root, templates, skipFiles, getTemplateNa
106
106
  }) => ESLintTemplateName | null;
107
107
  /**
108
108
  * Map the template name to the Rslint template name.
109
- * If not provided, reuses mapESLintTemplate and falls back to 'vanilla-ts'.
109
+ * If not provided, defaults to 'vanilla-ts' for all templates.
110
110
  */
111
111
  mapRslintTemplate?: (templateName: string, context: {
112
112
  distFolder: string;
@@ -185,6 +185,7 @@ declare interface GroupMultiSelectOptions<Value> extends CommonOptions {
185
185
  message: string;
186
186
  options: Record<string, Option_2<Value>[]>;
187
187
  initialValues?: Value[];
188
+ maxItems?: number;
188
189
  required?: boolean;
189
190
  cursorAt?: Value;
190
191
  selectableGroups?: boolean;
@@ -303,13 +304,52 @@ declare interface SelectOptions<Value> extends CommonOptions {
303
304
  maxItems?: number;
304
305
  }
305
306
 
307
+ /**
308
+ * The text prompt accepts a single line of text.
309
+ *
310
+ * @see https://bomb.sh/docs/clack/packages/prompts/#text-input
311
+ *
312
+ * @example
313
+ * ```ts
314
+ * import { text } from '@clack/prompts';
315
+ *
316
+ * const name = await text({
317
+ * message: 'What is your name?',
318
+ * placeholder: 'John Doe',
319
+ * validate: (value) => {
320
+ * if (!value || value.length < 2) return 'Name must be at least 2 characters';
321
+ * return undefined;
322
+ * },
323
+ * });
324
+ * ```
325
+ */
306
326
  export declare const text: (opts: TextOptions) => Promise<string | symbol>;
307
327
 
328
+ /**
329
+ * Options for the {@link text} prompt
330
+ */
308
331
  declare interface TextOptions extends CommonOptions {
332
+ /**
333
+ * The prompt message or question shown to the user above the input.
334
+ */
309
335
  message: string;
336
+ /**
337
+ * A visual hint shown when the field has no content.
338
+ */
310
339
  placeholder?: string;
340
+ /**
341
+ * A fallback value returned when the user provides nothing (empty input).
342
+ */
311
343
  defaultValue?: string;
344
+ /**
345
+ * The starting value shown when the prompt first renders.
346
+ * Users can edit this value before submitting.
347
+ */
312
348
  initialValue?: string;
349
+ /**
350
+ * A function that validates user input. Return a `string` or `Error` to show as a
351
+ * validation error, or `undefined` to accept the result.
352
+ */
313
353
  validate?: (value: string | undefined) => string | Error | undefined;
314
354
  }
315
355