pupt-lib 1.2.5 → 1.3.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.
- package/README.md +292 -256
- package/dist/index.d.ts +458 -29
- package/dist/index.js +2061 -362
- package/dist/jsx-dev-runtime.d.ts +483 -0
- package/dist/jsx-runtime/index.d.ts +2 -29
- package/dist/jsx-runtime/jsx-dev-runtime.d.ts +2 -26
- package/package.json +4 -4
- package/dist/api.d.ts +0 -38
- package/dist/api.d.ts.map +0 -1
- package/dist/component.d.ts +0 -83
- package/dist/component.d.ts.map +0 -1
- package/dist/components/ask/Choice.d.ts +0 -156
- package/dist/components/ask/Choice.d.ts.map +0 -1
- package/dist/components/ask/Confirm.d.ts +0 -61
- package/dist/components/ask/Confirm.d.ts.map +0 -1
- package/dist/components/ask/Date.d.ts +0 -79
- package/dist/components/ask/Date.d.ts.map +0 -1
- package/dist/components/ask/Editor.d.ts +0 -67
- package/dist/components/ask/Editor.d.ts.map +0 -1
- package/dist/components/ask/File.d.ts +0 -85
- package/dist/components/ask/File.d.ts.map +0 -1
- package/dist/components/ask/Label.d.ts +0 -28
- package/dist/components/ask/Label.d.ts.map +0 -1
- package/dist/components/ask/MultiSelect.d.ts +0 -148
- package/dist/components/ask/MultiSelect.d.ts.map +0 -1
- package/dist/components/ask/Number.d.ts +0 -73
- package/dist/components/ask/Number.d.ts.map +0 -1
- package/dist/components/ask/Option.d.ts +0 -29
- package/dist/components/ask/Option.d.ts.map +0 -1
- package/dist/components/ask/Path.d.ts +0 -73
- package/dist/components/ask/Path.d.ts.map +0 -1
- package/dist/components/ask/Rating.d.ts +0 -79
- package/dist/components/ask/Rating.d.ts.map +0 -1
- package/dist/components/ask/ReviewFile.d.ts +0 -79
- package/dist/components/ask/ReviewFile.d.ts.map +0 -1
- package/dist/components/ask/Secret.d.ts +0 -67
- package/dist/components/ask/Secret.d.ts.map +0 -1
- package/dist/components/ask/Select.d.ts +0 -136
- package/dist/components/ask/Select.d.ts.map +0 -1
- package/dist/components/ask/Text.d.ts +0 -67
- package/dist/components/ask/Text.d.ts.map +0 -1
- package/dist/components/ask/index.d.ts +0 -34
- package/dist/components/ask/index.d.ts.map +0 -1
- package/dist/components/ask/utils.d.ts +0 -26
- package/dist/components/ask/utils.d.ts.map +0 -1
- package/dist/components/control/ForEach.d.ts +0 -32
- package/dist/components/control/ForEach.d.ts.map +0 -1
- package/dist/components/control/If.d.ts +0 -24
- package/dist/components/control/If.d.ts.map +0 -1
- package/dist/components/data/Code.d.ts +0 -31
- package/dist/components/data/Code.d.ts.map +0 -1
- package/dist/components/data/Data.d.ts +0 -31
- package/dist/components/data/Data.d.ts.map +0 -1
- package/dist/components/data/File.d.ts +0 -37
- package/dist/components/data/File.d.ts.map +0 -1
- package/dist/components/data/Json.d.ts +0 -25
- package/dist/components/data/Json.d.ts.map +0 -1
- package/dist/components/data/Xml.d.ts +0 -25
- package/dist/components/data/Xml.d.ts.map +0 -1
- package/dist/components/data/index.d.ts +0 -6
- package/dist/components/data/index.d.ts.map +0 -1
- package/dist/components/examples/Example.d.ts +0 -17
- package/dist/components/examples/Example.d.ts.map +0 -1
- package/dist/components/examples/ExampleInput.d.ts +0 -13
- package/dist/components/examples/ExampleInput.d.ts.map +0 -1
- package/dist/components/examples/ExampleOutput.d.ts +0 -13
- package/dist/components/examples/ExampleOutput.d.ts.map +0 -1
- package/dist/components/examples/Examples.d.ts +0 -13
- package/dist/components/examples/Examples.d.ts.map +0 -1
- package/dist/components/examples/index.d.ts +0 -5
- package/dist/components/examples/index.d.ts.map +0 -1
- package/dist/components/index.d.ts +0 -11
- package/dist/components/index.d.ts.map +0 -1
- package/dist/components/meta/Uses.d.ts +0 -98
- package/dist/components/meta/Uses.d.ts.map +0 -1
- package/dist/components/meta/index.d.ts +0 -2
- package/dist/components/meta/index.d.ts.map +0 -1
- package/dist/components/post-execution/OpenUrl.d.ts +0 -29
- package/dist/components/post-execution/OpenUrl.d.ts.map +0 -1
- package/dist/components/post-execution/PostExecution.d.ts +0 -13
- package/dist/components/post-execution/PostExecution.d.ts.map +0 -1
- package/dist/components/post-execution/ReviewFile.d.ts +0 -29
- package/dist/components/post-execution/ReviewFile.d.ts.map +0 -1
- package/dist/components/post-execution/RunCommand.d.ts +0 -35
- package/dist/components/post-execution/RunCommand.d.ts.map +0 -1
- package/dist/components/post-execution/index.d.ts +0 -5
- package/dist/components/post-execution/index.d.ts.map +0 -1
- package/dist/components/reasoning/Step.d.ts +0 -25
- package/dist/components/reasoning/Step.d.ts.map +0 -1
- package/dist/components/reasoning/Steps.d.ts +0 -14
- package/dist/components/reasoning/Steps.d.ts.map +0 -1
- package/dist/components/reasoning/index.d.ts +0 -3
- package/dist/components/reasoning/index.d.ts.map +0 -1
- package/dist/components/structural/Audience.d.ts +0 -25
- package/dist/components/structural/Audience.d.ts.map +0 -1
- package/dist/components/structural/Constraint.d.ts +0 -31
- package/dist/components/structural/Constraint.d.ts.map +0 -1
- package/dist/components/structural/Context.d.ts +0 -25
- package/dist/components/structural/Context.d.ts.map +0 -1
- package/dist/components/structural/Criterion.d.ts +0 -13
- package/dist/components/structural/Criterion.d.ts.map +0 -1
- package/dist/components/structural/Format.d.ts +0 -37
- package/dist/components/structural/Format.d.ts.map +0 -1
- package/dist/components/structural/Prompt.d.ts +0 -43
- package/dist/components/structural/Prompt.d.ts.map +0 -1
- package/dist/components/structural/Role.d.ts +0 -37
- package/dist/components/structural/Role.d.ts.map +0 -1
- package/dist/components/structural/Section.d.ts +0 -31
- package/dist/components/structural/Section.d.ts.map +0 -1
- package/dist/components/structural/SuccessCriteria.d.ts +0 -25
- package/dist/components/structural/SuccessCriteria.d.ts.map +0 -1
- package/dist/components/structural/Task.d.ts +0 -25
- package/dist/components/structural/Task.d.ts.map +0 -1
- package/dist/components/structural/Tone.d.ts +0 -25
- package/dist/components/structural/Tone.d.ts.map +0 -1
- package/dist/components/structural/index.d.ts +0 -12
- package/dist/components/structural/index.d.ts.map +0 -1
- package/dist/components/utility/Cwd.d.ts +0 -11
- package/dist/components/utility/Cwd.d.ts.map +0 -1
- package/dist/components/utility/DateTime.d.ts +0 -23
- package/dist/components/utility/DateTime.d.ts.map +0 -1
- package/dist/components/utility/Hostname.d.ts +0 -11
- package/dist/components/utility/Hostname.d.ts.map +0 -1
- package/dist/components/utility/Timestamp.d.ts +0 -11
- package/dist/components/utility/Timestamp.d.ts.map +0 -1
- package/dist/components/utility/UUID.d.ts +0 -11
- package/dist/components/utility/UUID.d.ts.map +0 -1
- package/dist/components/utility/Username.d.ts +0 -11
- package/dist/components/utility/Username.d.ts.map +0 -1
- package/dist/components/utility/index.d.ts +0 -7
- package/dist/components/utility/index.d.ts.map +0 -1
- package/dist/create-prompt.d.ts +0 -118
- package/dist/create-prompt.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/jsx-runtime/index.d.ts.map +0 -1
- package/dist/jsx-runtime/jsx-dev-runtime.d.ts.map +0 -1
- package/dist/render.d.ts +0 -19
- package/dist/render.d.ts.map +0 -1
- package/dist/services/babel-plugins/index.d.ts +0 -3
- package/dist/services/babel-plugins/index.d.ts.map +0 -1
- package/dist/services/babel-plugins/name-hoisting.d.ts +0 -8
- package/dist/services/babel-plugins/name-hoisting.d.ts.map +0 -1
- package/dist/services/babel-plugins/uses-to-import.d.ts +0 -16
- package/dist/services/babel-plugins/uses-to-import.d.ts.map +0 -1
- package/dist/services/browser-support.d.ts +0 -185
- package/dist/services/browser-support.d.ts.map +0 -1
- package/dist/services/file-search-engine.d.ts +0 -162
- package/dist/services/file-search-engine.d.ts.map +0 -1
- package/dist/services/formula-parser.d.ts +0 -9
- package/dist/services/formula-parser.d.ts.map +0 -1
- package/dist/services/input-iterator.d.ts +0 -54
- package/dist/services/input-iterator.d.ts.map +0 -1
- package/dist/services/module-evaluator.d.ts +0 -38
- package/dist/services/module-evaluator.d.ts.map +0 -1
- package/dist/services/module-loader.d.ts +0 -92
- package/dist/services/module-loader.d.ts.map +0 -1
- package/dist/services/preprocessor.d.ts +0 -52
- package/dist/services/preprocessor.d.ts.map +0 -1
- package/dist/services/prop-validator.d.ts +0 -21
- package/dist/services/prop-validator.d.ts.map +0 -1
- package/dist/services/search-engine.d.ts +0 -10
- package/dist/services/search-engine.d.ts.map +0 -1
- package/dist/services/transformer.d.ts +0 -38
- package/dist/services/transformer.d.ts.map +0 -1
- package/dist/types/component.d.ts +0 -30
- package/dist/types/component.d.ts.map +0 -1
- package/dist/types/context.d.ts +0 -341
- package/dist/types/context.d.ts.map +0 -1
- package/dist/types/element.d.ts +0 -47
- package/dist/types/element.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -11
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/input.d.ts +0 -61
- package/dist/types/input.d.ts.map +0 -1
- package/dist/types/module.d.ts +0 -61
- package/dist/types/module.d.ts.map +0 -1
- package/dist/types/render.d.ts +0 -92
- package/dist/types/render.d.ts.map +0 -1
- package/dist/types/search.d.ts +0 -59
- package/dist/types/search.d.ts.map +0 -1
- package/dist/types/symbols.d.ts +0 -9
- package/dist/types/symbols.d.ts.map +0 -1
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
type PathModule = typeof import('path');
|
|
2
|
-
type FsModule = typeof import('fs');
|
|
3
|
-
type OsModule = typeof import('os');
|
|
4
|
-
/**
|
|
5
|
-
* Inject mock modules for testing. Only use in test environments.
|
|
6
|
-
* @internal
|
|
7
|
-
*/
|
|
8
|
-
export declare function _injectModulesForTesting(mocks: {
|
|
9
|
-
path?: PathModule;
|
|
10
|
-
fs?: FsModule;
|
|
11
|
-
os?: OsModule;
|
|
12
|
-
}): void;
|
|
13
|
-
/**
|
|
14
|
-
* Reset injected modules. Only use in test environments.
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
export declare function _resetModulesForTesting(): void;
|
|
18
|
-
/**
|
|
19
|
-
* Information about a file or directory
|
|
20
|
-
*/
|
|
21
|
-
export interface FileInfo {
|
|
22
|
-
/** File or directory name */
|
|
23
|
-
name: string;
|
|
24
|
-
/** Full absolute path */
|
|
25
|
-
absolutePath: string;
|
|
26
|
-
/** Path relative to base path */
|
|
27
|
-
relativePath: string;
|
|
28
|
-
/** Whether this is a directory */
|
|
29
|
-
isDirectory: boolean;
|
|
30
|
-
/** Last modification time */
|
|
31
|
-
modTime: Date;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Formatted file search result for display
|
|
35
|
-
*/
|
|
36
|
-
export interface FileSearchResult {
|
|
37
|
-
/** Display string (with trailing slash for directories) */
|
|
38
|
-
display: string;
|
|
39
|
-
/** Absolute path value */
|
|
40
|
-
value: string;
|
|
41
|
-
/** Description (relative path) */
|
|
42
|
-
description?: string;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Configuration for the file search engine
|
|
46
|
-
*/
|
|
47
|
-
export interface FileSearchEngineConfig {
|
|
48
|
-
/** Base path for searches (default: current directory) */
|
|
49
|
-
basePath?: string;
|
|
50
|
-
/** Optional file filter pattern */
|
|
51
|
-
filter?: string;
|
|
52
|
-
/** Cache timeout in milliseconds (default: 5000) */
|
|
53
|
-
cacheTimeout?: number;
|
|
54
|
-
/** Maximum cache entries before eviction (default: 100) */
|
|
55
|
-
maxCacheEntries?: number;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* File search engine with fuzzy matching and caching.
|
|
59
|
-
* Provides real-time directory navigation and file selection.
|
|
60
|
-
*
|
|
61
|
-
* Note: This class is only available in Node.js environments.
|
|
62
|
-
* It will throw an error if instantiated in a browser.
|
|
63
|
-
*/
|
|
64
|
-
export declare class FileSearchEngine {
|
|
65
|
-
private basePath;
|
|
66
|
-
private filter?;
|
|
67
|
-
private cache;
|
|
68
|
-
private cacheTimeout;
|
|
69
|
-
private cacheTimestamps;
|
|
70
|
-
private maxCacheEntries;
|
|
71
|
-
constructor(config?: FileSearchEngineConfig);
|
|
72
|
-
/**
|
|
73
|
-
* Search for files matching the query.
|
|
74
|
-
* Supports directory navigation and fuzzy matching.
|
|
75
|
-
*
|
|
76
|
-
* @param query - Search query (can include path components)
|
|
77
|
-
* @param signal - Optional AbortSignal to cancel the search
|
|
78
|
-
* @returns Array of matching files
|
|
79
|
-
*/
|
|
80
|
-
search(query: string, signal?: AbortSignal): Promise<FileInfo[]>;
|
|
81
|
-
/**
|
|
82
|
-
* List all files in a directory.
|
|
83
|
-
*
|
|
84
|
-
* @param dirPath - Directory path to list
|
|
85
|
-
* @returns Array of files in the directory
|
|
86
|
-
*/
|
|
87
|
-
listDirectory(dirPath: string): Promise<FileInfo[]>;
|
|
88
|
-
/**
|
|
89
|
-
* Parse a search query into path and search term components.
|
|
90
|
-
*
|
|
91
|
-
* @param query - The search query
|
|
92
|
-
* @returns Object with searchPath and searchTerm
|
|
93
|
-
*/
|
|
94
|
-
parseSearchQuery(query: string): {
|
|
95
|
-
searchPath: string;
|
|
96
|
-
searchTerm: string;
|
|
97
|
-
};
|
|
98
|
-
/**
|
|
99
|
-
* Normalize a path input, handling home directory and separators.
|
|
100
|
-
*
|
|
101
|
-
* @param input - The input path
|
|
102
|
-
* @returns Normalized path
|
|
103
|
-
*/
|
|
104
|
-
normalizePathInput(input: string): string;
|
|
105
|
-
/**
|
|
106
|
-
* Resolve an input path to an absolute path.
|
|
107
|
-
*
|
|
108
|
-
* @param input - The input path
|
|
109
|
-
* @returns Absolute path
|
|
110
|
-
*/
|
|
111
|
-
resolveToAbsolutePath(input: string): string;
|
|
112
|
-
/**
|
|
113
|
-
* Format a FileInfo object for display.
|
|
114
|
-
*
|
|
115
|
-
* @param fileInfo - The file info to format
|
|
116
|
-
* @returns Formatted search result
|
|
117
|
-
*/
|
|
118
|
-
formatFileInfo(fileInfo: FileInfo): FileSearchResult;
|
|
119
|
-
/**
|
|
120
|
-
* Check if the filesystem is case-sensitive.
|
|
121
|
-
*
|
|
122
|
-
* @returns true if case-sensitive (Linux), false otherwise (macOS, Windows)
|
|
123
|
-
*/
|
|
124
|
-
isFileSystemCaseSensitive(): boolean;
|
|
125
|
-
/**
|
|
126
|
-
* Clear the directory cache.
|
|
127
|
-
*/
|
|
128
|
-
clearCache(): void;
|
|
129
|
-
/**
|
|
130
|
-
* Get the current base path.
|
|
131
|
-
*/
|
|
132
|
-
getBasePath(): string;
|
|
133
|
-
/**
|
|
134
|
-
* Set a new base path.
|
|
135
|
-
*
|
|
136
|
-
* @param basePath - New base path
|
|
137
|
-
*/
|
|
138
|
-
setBasePath(basePath: string): void;
|
|
139
|
-
private getCandidatePaths;
|
|
140
|
-
private matchesFilter;
|
|
141
|
-
private filterAndSort;
|
|
142
|
-
/**
|
|
143
|
-
* Sort results with directories first, then alphabetically.
|
|
144
|
-
*/
|
|
145
|
-
private sortResults;
|
|
146
|
-
/**
|
|
147
|
-
* Simple fuzzy matching - checks if all characters in pattern
|
|
148
|
-
* appear in str in the same order.
|
|
149
|
-
*/
|
|
150
|
-
private fuzzyMatch;
|
|
151
|
-
private getFromCache;
|
|
152
|
-
private addToCache;
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* Create a new FileSearchEngine instance.
|
|
156
|
-
*
|
|
157
|
-
* @param config - Configuration options
|
|
158
|
-
* @returns FileSearchEngine instance
|
|
159
|
-
*/
|
|
160
|
-
export declare function createFileSearchEngine(config?: FileSearchEngineConfig): FileSearchEngine;
|
|
161
|
-
export {};
|
|
162
|
-
//# sourceMappingURL=file-search-engine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-search-engine.d.ts","sourceRoot":"","sources":["../../src/services/file-search-engine.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Evaluate an Excel-style formula with the given inputs.
|
|
3
|
-
*
|
|
4
|
-
* @param formula - The formula to evaluate (e.g., "=count>5", "=AND(a>1, b<10)")
|
|
5
|
-
* @param inputs - Map of variable names to their values
|
|
6
|
-
* @returns The boolean result of the formula evaluation
|
|
7
|
-
*/
|
|
8
|
-
export declare function evaluateFormula(formula: string, inputs: Map<string, unknown>): boolean;
|
|
9
|
-
//# sourceMappingURL=formula-parser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formula-parser.d.ts","sourceRoot":"","sources":["../../src/services/formula-parser.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,GAC3B,OAAO,CAsET"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { PuptElement, InputRequirement, ValidationResult } from '../types';
|
|
2
|
-
export type RuntimeEnvironment = 'node' | 'browser';
|
|
3
|
-
/**
|
|
4
|
-
* Strategy for handling inputs without defaults in non-interactive mode
|
|
5
|
-
*/
|
|
6
|
-
export type OnMissingDefaultStrategy = 'error' | 'skip';
|
|
7
|
-
export interface InputIteratorOptions {
|
|
8
|
-
validateOnSubmit?: boolean;
|
|
9
|
-
/** Override environment detection. Useful for testing. */
|
|
10
|
-
environment?: RuntimeEnvironment;
|
|
11
|
-
/**
|
|
12
|
-
* Pre-supply input values. Inputs with pre-supplied values will be skipped
|
|
13
|
-
* during iteration (they won't appear as requirements to collect).
|
|
14
|
-
*/
|
|
15
|
-
values?: Record<string, unknown>;
|
|
16
|
-
/**
|
|
17
|
-
* Enable non-interactive mode. When true, inputs are automatically filled
|
|
18
|
-
* with their default values. Use with `onMissingDefault` to control behavior
|
|
19
|
-
* when a required input has no default.
|
|
20
|
-
*/
|
|
21
|
-
nonInteractive?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Strategy for handling inputs without defaults in non-interactive mode.
|
|
24
|
-
* - 'error' (default): Throw an error if a required input has no default
|
|
25
|
-
* - 'skip': Skip inputs without defaults, leaving them undefined
|
|
26
|
-
*/
|
|
27
|
-
onMissingDefault?: OnMissingDefaultStrategy;
|
|
28
|
-
}
|
|
29
|
-
export interface InputIterator {
|
|
30
|
-
/**
|
|
31
|
-
* Start the iterator by collecting input requirements from the element tree.
|
|
32
|
-
* This is async to support components with async render methods.
|
|
33
|
-
*/
|
|
34
|
-
start(): Promise<void>;
|
|
35
|
-
current(): InputRequirement | null;
|
|
36
|
-
submit(value: unknown): Promise<ValidationResult>;
|
|
37
|
-
/**
|
|
38
|
-
* Advance to the next unfilled requirement.
|
|
39
|
-
* This is async to support re-collecting requirements from async components.
|
|
40
|
-
*/
|
|
41
|
-
advance(): Promise<void>;
|
|
42
|
-
isDone(): boolean;
|
|
43
|
-
getValues(): Map<string, unknown>;
|
|
44
|
-
/**
|
|
45
|
-
* Run through all inputs non-interactively using defaults and pre-supplied values.
|
|
46
|
-
* This is a convenience method that handles the entire iteration loop.
|
|
47
|
-
*
|
|
48
|
-
* @throws Error if a required input has no default and onMissingDefault is 'error'
|
|
49
|
-
* @returns Map of all collected values
|
|
50
|
-
*/
|
|
51
|
-
runNonInteractive(): Promise<Map<string, unknown>>;
|
|
52
|
-
}
|
|
53
|
-
export declare function createInputIterator(element: PuptElement, options?: InputIteratorOptions): InputIterator;
|
|
54
|
-
//# sourceMappingURL=input-iterator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-iterator.d.ts","sourceRoot":"","sources":["../../src/services/input-iterator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,gBAAgB,EAAE,gBAAgB,EAAiB,MAAM,UAAU,CAAC;AASzG,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,SAAS,CAAC;AA6CpD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0DAA0D;IAC1D,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CAC7C;AAED,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,OAAO,IAAI,gBAAgB,GAAG,IAAI,CAAC;IACnC,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAClD;;;OAGG;IACH,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzB,MAAM,IAAI,OAAO,CAAC;IAClB,SAAS,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC;;;;;;OAMG;IACH,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;CACpD;AAID,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EACpB,OAAO,GAAE,oBAAyB,GACjC,aAAa,CA2sBf"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ES Module evaluator using dynamic import().
|
|
3
|
-
* Supports both browser (Blob URLs) and Node.js environments.
|
|
4
|
-
*
|
|
5
|
-
* Uses Option 2 (Full Path Rewriting) from design/module-import-design.md:
|
|
6
|
-
* All bare specifiers are resolved to absolute file:// URLs at transform time,
|
|
7
|
-
* eliminating the need for Node.js module resolution at runtime.
|
|
8
|
-
*/
|
|
9
|
-
export interface EvaluateOptions {
|
|
10
|
-
/** Filename for error messages */
|
|
11
|
-
filename: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Evaluate JavaScript code as an ES module.
|
|
15
|
-
* Uses Blob URLs in browser and temp files in Node.js.
|
|
16
|
-
*
|
|
17
|
-
* In Node.js, all bare specifiers (like 'pupt-lib', 'zod') are rewritten
|
|
18
|
-
* to absolute file:// URLs before evaluation, eliminating module resolution issues.
|
|
19
|
-
*
|
|
20
|
-
* @param code - JavaScript code to evaluate (should be valid ES module)
|
|
21
|
-
* @param options - Evaluation options
|
|
22
|
-
* @returns The module's exports object
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* const code = `
|
|
27
|
-
* import { Prompt } from 'pupt-lib';
|
|
28
|
-
* export default <Prompt name="test" />;
|
|
29
|
-
* `;
|
|
30
|
-
* const module = await evaluateModule(code, { filename: 'test.tsx' });
|
|
31
|
-
* const element = module.default;
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
export declare function evaluateModule(code: string, options: EvaluateOptions): Promise<{
|
|
35
|
-
default?: unknown;
|
|
36
|
-
[key: string]: unknown;
|
|
37
|
-
}>;
|
|
38
|
-
//# sourceMappingURL=module-evaluator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-evaluator.d.ts","sourceRoot":"","sources":["../../src/services/module-evaluator.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgBH,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAmMD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC,CAexD"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { ComponentType, PuptElement } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Represents the source type of a module
|
|
4
|
-
*/
|
|
5
|
-
export type SourceType = 'npm' | 'url' | 'github' | 'local';
|
|
6
|
-
/**
|
|
7
|
-
* Represents a loaded library with its components
|
|
8
|
-
*/
|
|
9
|
-
export interface LoadedLibrary {
|
|
10
|
-
name: string;
|
|
11
|
-
components: Record<string, ComponentType>;
|
|
12
|
-
dependencies: string[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Parsed package source information
|
|
16
|
-
*/
|
|
17
|
-
export interface ParsedPackageSource {
|
|
18
|
-
name: string;
|
|
19
|
-
version?: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* ModuleLoader handles loading modules from various sources (npm, URL, GitHub, local).
|
|
23
|
-
* It manages deduplication and version conflict detection.
|
|
24
|
-
*/
|
|
25
|
-
export declare class ModuleLoader {
|
|
26
|
-
private loaded;
|
|
27
|
-
private loading;
|
|
28
|
-
private versions;
|
|
29
|
-
/**
|
|
30
|
-
* Determine the source type from a source string
|
|
31
|
-
*/
|
|
32
|
-
resolveSourceType(source: string): SourceType;
|
|
33
|
-
/**
|
|
34
|
-
* Parse a package source string into name and version
|
|
35
|
-
*/
|
|
36
|
-
parsePackageSource(source: string): ParsedPackageSource;
|
|
37
|
-
/**
|
|
38
|
-
* Load a module from the given source.
|
|
39
|
-
* Handles deduplication and version conflict detection.
|
|
40
|
-
*/
|
|
41
|
-
load(source: string): Promise<LoadedLibrary>;
|
|
42
|
-
/**
|
|
43
|
-
* Detect Component classes in module exports
|
|
44
|
-
*/
|
|
45
|
-
detectComponents(exports: Record<string, unknown>): Record<string, ComponentType>;
|
|
46
|
-
/**
|
|
47
|
-
* Detect Prompt elements in module exports
|
|
48
|
-
*/
|
|
49
|
-
detectPrompts(exports: Record<string, unknown>): Record<string, PuptElement>;
|
|
50
|
-
/**
|
|
51
|
-
* Check if a value is a PuptElement with a name prop (indicates a Prompt)
|
|
52
|
-
*/
|
|
53
|
-
private isPromptElement;
|
|
54
|
-
/**
|
|
55
|
-
* Normalize a source string for consistent caching
|
|
56
|
-
*/
|
|
57
|
-
private normalizeSource;
|
|
58
|
-
/**
|
|
59
|
-
* Actually load the module from the source.
|
|
60
|
-
* This is the internal implementation that can be mocked in tests.
|
|
61
|
-
*/
|
|
62
|
-
private doLoad;
|
|
63
|
-
/**
|
|
64
|
-
* Load a local module
|
|
65
|
-
*/
|
|
66
|
-
private loadLocal;
|
|
67
|
-
/**
|
|
68
|
-
* Load an npm package
|
|
69
|
-
*/
|
|
70
|
-
private loadNpm;
|
|
71
|
-
/**
|
|
72
|
-
* Load a module from a URL
|
|
73
|
-
*/
|
|
74
|
-
private loadUrl;
|
|
75
|
-
/**
|
|
76
|
-
* Load a module from GitHub
|
|
77
|
-
*/
|
|
78
|
-
private loadGithub;
|
|
79
|
-
/**
|
|
80
|
-
* Extract a module name from a file path
|
|
81
|
-
*/
|
|
82
|
-
private extractNameFromPath;
|
|
83
|
-
/**
|
|
84
|
-
* Extract a module name from a URL
|
|
85
|
-
*/
|
|
86
|
-
private extractNameFromUrl;
|
|
87
|
-
/**
|
|
88
|
-
* Clear all loaded modules (useful for testing)
|
|
89
|
-
*/
|
|
90
|
-
clear(): void;
|
|
91
|
-
}
|
|
92
|
-
//# sourceMappingURL=module-loader.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module-loader.d.ts","sourceRoot":"","sources":["../../src/services/module-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAqB3D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAC1C,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,MAAM,CAAoC;IAClD,OAAO,CAAC,OAAO,CAA6C;IAC5D,OAAO,CAAC,QAAQ,CAA6B;IAE7C;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU;IAa7C;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,mBAAmB;IAyBvD;;;OAGG;IACG,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IA2ClD;;OAEG;IACH,gBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC;IAcjF;;OAEG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;IAY5E;;OAEG;IACH,OAAO,CAAC,eAAe;IAYvB;;OAEG;IACH,OAAO,CAAC,eAAe;IAMvB;;;OAGG;YACW,MAAM;IAiBpB;;OAEG;YACW,SAAS;IAoBvB;;OAEG;YACW,OAAO;IAmBrB;;OAEG;YACW,OAAO;IAiBrB;;OAEG;YACW,UAAU;IAaxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAW1B;;OAEG;IACH,KAAK,IAAI,IAAI;CAKd"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Preprocessor for .prompt files.
|
|
3
|
-
* Injects imports for built-in components and wraps raw JSX with export default.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* List of all built-in components that should be auto-imported for .prompt files.
|
|
7
|
-
*/
|
|
8
|
-
export declare const BUILTIN_COMPONENTS: readonly ["Component", "Prompt", "Section", "Role", "Task", "Context", "Constraint", "Format", "Audience", "Tone", "SuccessCriteria", "Criterion", "UUID", "Timestamp", "DateTime", "Hostname", "Username", "Cwd", "Uses", "If", "ForEach", "Example", "Examples", "ExampleInput", "ExampleOutput", "Steps", "Step", "Code", "Data", "File", "Json", "Xml", "PostExecution", "ReviewFile", "OpenUrl", "RunCommand"];
|
|
9
|
-
/**
|
|
10
|
-
* Ask components that need special handling (Ask namespace + individual exports)
|
|
11
|
-
*/
|
|
12
|
-
export declare const ASK_COMPONENTS: readonly ["Ask", "AskOption", "AskLabel", "AskText", "AskNumber", "AskSelect", "AskConfirm", "AskEditor", "AskMultiSelect", "AskFile", "AskPath", "AskDate", "AskSecret", "AskChoice", "AskRating", "AskReviewFile"];
|
|
13
|
-
/**
|
|
14
|
-
* Shorthand component names that map to Ask.* components.
|
|
15
|
-
* These allow using <Text> instead of <Ask.Text> in .prompt files.
|
|
16
|
-
*/
|
|
17
|
-
export declare const ASK_SHORTHAND: Record<string, string>;
|
|
18
|
-
export interface PreprocessOptions {
|
|
19
|
-
/** Original filename for error messages */
|
|
20
|
-
filename: string;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Check if a file is a .prompt file based on extension.
|
|
24
|
-
*/
|
|
25
|
-
export declare function isPromptFile(filename: string): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Check if source code needs import injection.
|
|
28
|
-
* Returns true if the source has no import statements.
|
|
29
|
-
* The presence/absence of export default is handled separately.
|
|
30
|
-
*/
|
|
31
|
-
export declare function needsImportInjection(source: string): boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Check if source code needs export default wrapper.
|
|
34
|
-
* Returns true if there's no export default statement.
|
|
35
|
-
*/
|
|
36
|
-
export declare function needsExportWrapper(source: string): boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Check if source code needs any preprocessing.
|
|
39
|
-
* Returns true if the source needs import injection or export wrapper.
|
|
40
|
-
* @deprecated Use needsImportInjection and needsExportWrapper instead
|
|
41
|
-
*/
|
|
42
|
-
export declare function needsPreprocessing(source: string): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Preprocess source code for .prompt files and raw JSX.
|
|
45
|
-
* Injects imports for built-in components if needed, and wraps with export default if needed.
|
|
46
|
-
*
|
|
47
|
-
* @param source - Raw source code
|
|
48
|
-
* @param options - Preprocessing options
|
|
49
|
-
* @returns Preprocessed source code ready for Babel transformation
|
|
50
|
-
*/
|
|
51
|
-
export declare function preprocessSource(source: string, options: PreprocessOptions): string;
|
|
52
|
-
//# sourceMappingURL=preprocessor.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preprocessor.d.ts","sourceRoot":"","sources":["../../src/services/preprocessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB,qZA8CrB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc,sNAiBjB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAahD,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAI5D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AA6BD;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAuBnF"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ZodObject, ZodRawShape } from 'zod';
|
|
2
|
-
import { RenderError } from '../types/render';
|
|
3
|
-
/**
|
|
4
|
-
* Validate component props against a Zod schema.
|
|
5
|
-
* Children are stripped before validation since they are structural, not data.
|
|
6
|
-
*
|
|
7
|
-
* @param componentName - Name of the component (for error reporting)
|
|
8
|
-
* @param props - The full props object (may include children)
|
|
9
|
-
* @param schema - The Zod schema to validate against
|
|
10
|
-
* @returns Array of RenderError objects (empty if valid)
|
|
11
|
-
*/
|
|
12
|
-
export declare function validateProps(componentName: string, props: Record<string, unknown>, schema: ZodObject<ZodRawShape>): RenderError[];
|
|
13
|
-
/**
|
|
14
|
-
* Extract the Zod schema from a component class or function.
|
|
15
|
-
*/
|
|
16
|
-
export declare function getSchema(type: unknown): ZodObject<ZodRawShape> | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* Extract a human-readable name from a component type.
|
|
19
|
-
*/
|
|
20
|
-
export declare function getComponentName(type: unknown): string;
|
|
21
|
-
//# sourceMappingURL=prop-validator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"prop-validator.d.ts","sourceRoot":"","sources":["../../src/services/prop-validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAY,MAAM,KAAK,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,SAAS,CAAC,WAAW,CAAC,GAC7B,WAAW,EAAE,CAmBf;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC,WAAW,CAAC,GAAG,SAAS,CAS3E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAQtD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SearchablePrompt, SearchResult, SearchEngineConfig, SearchOptions } from '../types';
|
|
2
|
-
export interface SearchEngine {
|
|
3
|
-
index(prompts: SearchablePrompt[]): void;
|
|
4
|
-
search(query: string, options?: Partial<SearchOptions>): SearchResult[];
|
|
5
|
-
getByTag(tag: string): SearchablePrompt[];
|
|
6
|
-
getAllTags(): string[];
|
|
7
|
-
clear(): void;
|
|
8
|
-
}
|
|
9
|
-
export declare function createSearchEngine(config?: SearchEngineConfig): SearchEngine;
|
|
10
|
-
//# sourceMappingURL=search-engine.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search-engine.d.ts","sourceRoot":"","sources":["../../src/services/search-engine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAElG,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,OAAO,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC;IACzC,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,YAAY,EAAE,CAAC;IACxE,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;IAC1C,UAAU,IAAI,MAAM,EAAE,CAAC;IACvB,KAAK,IAAI,IAAI,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,YAAY,CAmF5E"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Transformer class for compiling TSX source code at runtime.
|
|
3
|
-
* Uses @babel/standalone to transform JSX syntax into jsx() function calls.
|
|
4
|
-
*
|
|
5
|
-
* Works in both Node.js and browser environments.
|
|
6
|
-
*/
|
|
7
|
-
export declare class Transformer {
|
|
8
|
-
/**
|
|
9
|
-
* Transform a source string containing TSX code (sync version).
|
|
10
|
-
* Note: Requires Babel to be pre-loaded via transformSourceAsync first.
|
|
11
|
-
*
|
|
12
|
-
* @param source - The TSX source code to transform
|
|
13
|
-
* @param filename - Filename used for error messages and source maps
|
|
14
|
-
* @returns The transformed JavaScript code
|
|
15
|
-
* @throws Error if transformation fails or if Babel not loaded
|
|
16
|
-
*/
|
|
17
|
-
transformSource(source: string, filename: string): string;
|
|
18
|
-
/**
|
|
19
|
-
* Transform a source string containing TSX code (async version).
|
|
20
|
-
* Works in both Node.js and browser environments.
|
|
21
|
-
*
|
|
22
|
-
* @param source - The TSX source code to transform
|
|
23
|
-
* @param filename - Filename used for error messages and source maps
|
|
24
|
-
* @returns The transformed JavaScript code
|
|
25
|
-
* @throws Error if transformation fails
|
|
26
|
-
*/
|
|
27
|
-
transformSourceAsync(source: string, filename: string): Promise<string>;
|
|
28
|
-
/**
|
|
29
|
-
* Transform a TSX file by reading and transforming its contents.
|
|
30
|
-
* Note: This method only works in Node.js environments.
|
|
31
|
-
*
|
|
32
|
-
* @param filePath - Path to the TSX file
|
|
33
|
-
* @returns The transformed JavaScript code
|
|
34
|
-
* @throws Error if file cannot be read or transformation fails
|
|
35
|
-
*/
|
|
36
|
-
transformFile(filePath: string): Promise<string>;
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=transformer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transformer.d.ts","sourceRoot":"","sources":["../../src/services/transformer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+FH,qBAAa,WAAW;IACtB;;;;;;;;OAQG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM;IAIzD;;;;;;;;OAQG;IACG,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAI7E;;;;;;;OAOG;IACG,aAAa,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAKvD"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { PuptNode } from './element';
|
|
2
|
-
/**
|
|
3
|
-
* Base props interface for all components
|
|
4
|
-
*/
|
|
5
|
-
export interface ComponentProps {
|
|
6
|
-
children?: PuptNode;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Props for Prompt components (root components)
|
|
10
|
-
*/
|
|
11
|
-
export interface PromptProps extends ComponentProps {
|
|
12
|
-
name?: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
version?: string;
|
|
15
|
-
tags?: string[];
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Props for structural components
|
|
19
|
-
*/
|
|
20
|
-
export interface StructuralProps extends ComponentProps {
|
|
21
|
-
name?: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Common props available to all components
|
|
25
|
-
*/
|
|
26
|
-
export interface CommonProps {
|
|
27
|
-
key?: string | number;
|
|
28
|
-
if?: boolean;
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/types/component.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,EAAE,CAAC,EAAE,OAAO,CAAC;CACd"}
|