create-rstack 1.9.0 → 1.9.1

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
@@ -1,3 +1,4 @@
1
+ import { AutocompletePrompt } from '@clack/core';
1
2
  import { Readable } from 'node:stream';
2
3
  import { Writable } from 'node:stream';
3
4
 
@@ -12,6 +13,47 @@ export declare type Argv = {
12
13
  'package-name'?: string;
13
14
  };
14
15
 
16
+ export declare const autocomplete: <Value>(opts: AutocompleteOptions<Value>) => Promise<Value | symbol>;
17
+
18
+ declare interface AutocompleteOptions<Value> extends AutocompleteSharedOptions<Value> {
19
+ /**
20
+ * The initial selected value.
21
+ */
22
+ initialValue?: Value;
23
+ /**
24
+ * The initial user input
25
+ */
26
+ initialUserInput?: string;
27
+ }
28
+
29
+ declare interface AutocompleteSharedOptions<Value> extends CommonOptions {
30
+ /**
31
+ * The message to display to the user.
32
+ */
33
+ message: string;
34
+ /**
35
+ * Available options for the autocomplete prompt.
36
+ */
37
+ options: Option_2<Value>[] | ((this: AutocompletePrompt<Option_2<Value>>) => Option_2<Value>[]);
38
+ /**
39
+ * Maximum number of items to display at once.
40
+ */
41
+ maxItems?: number;
42
+ /**
43
+ * Placeholder text to display when no input is provided.
44
+ */
45
+ placeholder?: string;
46
+ /**
47
+ * Validates the value
48
+ */
49
+ validate?: (value: Value | Value[] | undefined) => string | Error | undefined;
50
+ /**
51
+ * Custom filter function to match options against search input.
52
+ * If not provided, a default filter that matches label, hint, and value is used.
53
+ */
54
+ filter?: (search: string, option: Option_2<Value>) => boolean;
55
+ }
56
+
15
57
  export declare const BUILTIN_TOOLS: string[];
16
58
 
17
59
  export declare function checkCancel<T>(value: unknown): T;
@@ -118,6 +160,18 @@ declare type ExtraTool = {
118
160
  when?: (templateName: string) => boolean;
119
161
  };
120
162
 
163
+ export declare const groupMultiselect: <Value>(opts: GroupMultiSelectOptions<Value>) => Promise<Value[] | symbol>;
164
+
165
+ declare interface GroupMultiSelectOptions<Value> extends CommonOptions {
166
+ message: string;
167
+ options: Record<string, Option_2<Value>[]>;
168
+ initialValues?: Value[];
169
+ required?: boolean;
170
+ cursorAt?: Value;
171
+ selectableGroups?: boolean;
172
+ groupSpacing?: number;
173
+ }
174
+
121
175
  /**
122
176
  * Merge AGENTS.md files from multiple sources
123
177
  */