@sudosandwich/limps-radix 0.1.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/LICENSE +21 -0
- package/README.md +255 -0
- package/dist/cache/index.d.ts +110 -0
- package/dist/cache/index.d.ts.map +1 -0
- package/dist/cache/index.js +176 -0
- package/dist/cache/index.js.map +1 -0
- package/dist/cache/storage.d.ts +73 -0
- package/dist/cache/storage.d.ts.map +1 -0
- package/dist/cache/storage.js +176 -0
- package/dist/cache/storage.js.map +1 -0
- package/dist/cache/ttl.d.ts +62 -0
- package/dist/cache/ttl.d.ts.map +1 -0
- package/dist/cache/ttl.js +96 -0
- package/dist/cache/ttl.js.map +1 -0
- package/dist/extractor/classifier.d.ts +30 -0
- package/dist/extractor/classifier.d.ts.map +1 -0
- package/dist/extractor/classifier.js +150 -0
- package/dist/extractor/classifier.js.map +1 -0
- package/dist/extractor/forward-ref.d.ts +28 -0
- package/dist/extractor/forward-ref.d.ts.map +1 -0
- package/dist/extractor/forward-ref.js +134 -0
- package/dist/extractor/forward-ref.js.map +1 -0
- package/dist/extractor/index.d.ts +25 -0
- package/dist/extractor/index.d.ts.map +1 -0
- package/dist/extractor/index.js +43 -0
- package/dist/extractor/index.js.map +1 -0
- package/dist/extractor/interface.d.ts +40 -0
- package/dist/extractor/interface.d.ts.map +1 -0
- package/dist/extractor/interface.js +233 -0
- package/dist/extractor/interface.js.map +1 -0
- package/dist/extractor/jsdoc.d.ts +24 -0
- package/dist/extractor/jsdoc.d.ts.map +1 -0
- package/dist/extractor/jsdoc.js +74 -0
- package/dist/extractor/jsdoc.js.map +1 -0
- package/dist/extractor/project.d.ts +17 -0
- package/dist/extractor/project.d.ts.map +1 -0
- package/dist/extractor/project.js +33 -0
- package/dist/extractor/project.js.map +1 -0
- package/dist/extractor/props.d.ts +24 -0
- package/dist/extractor/props.d.ts.map +1 -0
- package/dist/extractor/props.js +78 -0
- package/dist/extractor/props.js.map +1 -0
- package/dist/extractor/type-resolver.d.ts +32 -0
- package/dist/extractor/type-resolver.d.ts.map +1 -0
- package/dist/extractor/type-resolver.js +129 -0
- package/dist/extractor/type-resolver.js.map +1 -0
- package/dist/fetcher/index.d.ts +7 -0
- package/dist/fetcher/index.d.ts.map +1 -0
- package/dist/fetcher/index.js +7 -0
- package/dist/fetcher/index.js.map +1 -0
- package/dist/fetcher/npm-registry.d.ts +45 -0
- package/dist/fetcher/npm-registry.d.ts.map +1 -0
- package/dist/fetcher/npm-registry.js +217 -0
- package/dist/fetcher/npm-registry.js.map +1 -0
- package/dist/fetcher/unified-package.d.ts +27 -0
- package/dist/fetcher/unified-package.d.ts.map +1 -0
- package/dist/fetcher/unified-package.js +99 -0
- package/dist/fetcher/unified-package.js.map +1 -0
- package/dist/fetcher/unpkg.d.ts +20 -0
- package/dist/fetcher/unpkg.d.ts.map +1 -0
- package/dist/fetcher/unpkg.js +57 -0
- package/dist/fetcher/unpkg.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/signatures/disambiguation.d.ts +30 -0
- package/dist/signatures/disambiguation.d.ts.map +1 -0
- package/dist/signatures/disambiguation.js +99 -0
- package/dist/signatures/disambiguation.js.map +1 -0
- package/dist/signatures/distinguishing.d.ts +29 -0
- package/dist/signatures/distinguishing.d.ts.map +1 -0
- package/dist/signatures/distinguishing.js +108 -0
- package/dist/signatures/distinguishing.js.map +1 -0
- package/dist/signatures/generator.d.ts +20 -0
- package/dist/signatures/generator.d.ts.map +1 -0
- package/dist/signatures/generator.js +147 -0
- package/dist/signatures/generator.js.map +1 -0
- package/dist/signatures/index.d.ts +10 -0
- package/dist/signatures/index.d.ts.map +1 -0
- package/dist/signatures/index.js +10 -0
- package/dist/signatures/index.js.map +1 -0
- package/dist/signatures/inference.d.ts +37 -0
- package/dist/signatures/inference.d.ts.map +1 -0
- package/dist/signatures/inference.js +132 -0
- package/dist/signatures/inference.js.map +1 -0
- package/dist/tools/extract-primitive.d.ts +49 -0
- package/dist/tools/extract-primitive.d.ts.map +1 -0
- package/dist/tools/extract-primitive.js +103 -0
- package/dist/tools/extract-primitive.js.map +1 -0
- package/dist/tools/index.d.ts +6 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +6 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/list-primitives.d.ts +40 -0
- package/dist/tools/list-primitives.d.ts.map +1 -0
- package/dist/tools/list-primitives.js +53 -0
- package/dist/tools/list-primitives.js.map +1 -0
- package/dist/types/index.d.ts +83 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +5 -0
- package/dist/types/index.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ts-morph project setup for parsing type definitions.
|
|
3
|
+
*/
|
|
4
|
+
import { Project } from 'ts-morph';
|
|
5
|
+
/**
|
|
6
|
+
* Create a ts-morph Project with in-memory file system.
|
|
7
|
+
*/
|
|
8
|
+
export function createProject() {
|
|
9
|
+
return new Project({
|
|
10
|
+
useInMemoryFileSystem: true,
|
|
11
|
+
compilerOptions: {
|
|
12
|
+
target: 99, // ESNext
|
|
13
|
+
module: 99, // ESNext
|
|
14
|
+
lib: ['lib.esnext.d.ts', 'lib.dom.d.ts'],
|
|
15
|
+
strict: true,
|
|
16
|
+
skipLibCheck: true,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create a source file from type content.
|
|
22
|
+
*/
|
|
23
|
+
export function createSourceFile(project, content, fileName = 'index.d.ts') {
|
|
24
|
+
return project.createSourceFile(fileName, content, { overwrite: true });
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Parse type content and return a source file.
|
|
28
|
+
*/
|
|
29
|
+
export function parseTypes(content) {
|
|
30
|
+
const project = createProject();
|
|
31
|
+
return createSourceFile(project, content);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/extractor/project.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAc,MAAM,UAAU,CAAC;AAE/C;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,IAAI,OAAO,CAAC;QACjB,qBAAqB,EAAE,IAAI;QAC3B,eAAe,EAAE;YACf,MAAM,EAAE,EAAE,EAAE,SAAS;YACrB,MAAM,EAAE,EAAE,EAAE,SAAS;YACrB,GAAG,EAAE,CAAC,iBAAiB,EAAE,cAAc,CAAC;YACxC,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,IAAI;SACnB;KACF,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAAgB,EAChB,OAAe,EACf,WAAmB,YAAY;IAE/B,OAAO,OAAO,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,MAAM,OAAO,GAAG,aAAa,EAAE,CAAC;IAChC,OAAO,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property extraction from TypeScript interfaces.
|
|
3
|
+
*/
|
|
4
|
+
import type { InterfaceDeclaration, PropertySignature } from 'ts-morph';
|
|
5
|
+
import type { RawProp } from '../types/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Extract props from an interface declaration.
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractPropsFromInterface(iface: InterfaceDeclaration): RawProp[];
|
|
10
|
+
/**
|
|
11
|
+
* Extract a single prop from a property signature.
|
|
12
|
+
*/
|
|
13
|
+
export declare function extractProp(prop: PropertySignature): RawProp;
|
|
14
|
+
/**
|
|
15
|
+
* Check if an interface name matches the props pattern.
|
|
16
|
+
* @example "DialogProps" -> true, "DialogState" -> false
|
|
17
|
+
*/
|
|
18
|
+
export declare function isPropsInterface(name: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Extract the component name from a props interface name.
|
|
21
|
+
* @example "DialogContentProps" -> "DialogContent"
|
|
22
|
+
*/
|
|
23
|
+
export declare function componentNameFromProps(propsName: string): string;
|
|
24
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/extractor/props.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAQ,MAAM,UAAU,CAAC;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAGjD;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,oBAAoB,GAC1B,OAAO,EAAE,CAwBX;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAa5D;AAyBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEhE"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property extraction from TypeScript interfaces.
|
|
3
|
+
*/
|
|
4
|
+
import { extractJsDoc } from './jsdoc.js';
|
|
5
|
+
/**
|
|
6
|
+
* Extract props from an interface declaration.
|
|
7
|
+
*/
|
|
8
|
+
export function extractPropsFromInterface(iface) {
|
|
9
|
+
const props = [];
|
|
10
|
+
// Get own properties
|
|
11
|
+
for (const prop of iface.getProperties()) {
|
|
12
|
+
props.push(extractProp(prop));
|
|
13
|
+
}
|
|
14
|
+
// Handle extended interfaces
|
|
15
|
+
for (const base of iface.getBaseDeclarations()) {
|
|
16
|
+
if (base.getKindName() === 'InterfaceDeclaration') {
|
|
17
|
+
const baseInterface = base;
|
|
18
|
+
const baseProps = extractPropsFromInterface(baseInterface);
|
|
19
|
+
// Add props that aren't already defined (don't override)
|
|
20
|
+
for (const baseProp of baseProps) {
|
|
21
|
+
if (!props.some((p) => p.name === baseProp.name)) {
|
|
22
|
+
props.push(baseProp);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return props;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Extract a single prop from a property signature.
|
|
31
|
+
*/
|
|
32
|
+
export function extractProp(prop) {
|
|
33
|
+
const name = prop.getName();
|
|
34
|
+
const type = getTypeText(prop.getType());
|
|
35
|
+
const required = !prop.hasQuestionToken();
|
|
36
|
+
const jsDoc = extractJsDoc(prop);
|
|
37
|
+
return {
|
|
38
|
+
name,
|
|
39
|
+
type,
|
|
40
|
+
required,
|
|
41
|
+
defaultValue: jsDoc.defaultValue,
|
|
42
|
+
description: jsDoc.description,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Get a clean type text representation.
|
|
47
|
+
*/
|
|
48
|
+
function getTypeText(type) {
|
|
49
|
+
let text = type.getText();
|
|
50
|
+
// Simplify React types
|
|
51
|
+
text = text
|
|
52
|
+
.replace(/React\.ReactNode/g, 'ReactNode')
|
|
53
|
+
.replace(/React\.ReactElement/g, 'ReactElement')
|
|
54
|
+
.replace(/React\.CSSProperties/g, 'CSSProperties')
|
|
55
|
+
.replace(/React\.HTMLAttributes<.*?>/g, 'HTMLAttributes')
|
|
56
|
+
.replace(/React\.ComponentPropsWithoutRef<.*?>/g, 'ComponentProps')
|
|
57
|
+
.replace(/import\(".*?"\)\./g, '');
|
|
58
|
+
// Truncate very long types
|
|
59
|
+
if (text.length > 200) {
|
|
60
|
+
text = text.slice(0, 200) + '...';
|
|
61
|
+
}
|
|
62
|
+
return text;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Check if an interface name matches the props pattern.
|
|
66
|
+
* @example "DialogProps" -> true, "DialogState" -> false
|
|
67
|
+
*/
|
|
68
|
+
export function isPropsInterface(name) {
|
|
69
|
+
return name.endsWith('Props');
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Extract the component name from a props interface name.
|
|
73
|
+
* @example "DialogContentProps" -> "DialogContent"
|
|
74
|
+
*/
|
|
75
|
+
export function componentNameFromProps(propsName) {
|
|
76
|
+
return propsName.replace(/Props$/, '');
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../src/extractor/props.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C;;GAEG;AACH,MAAM,UAAU,yBAAyB,CACvC,KAA2B;IAE3B,MAAM,KAAK,GAAc,EAAE,CAAC;IAE5B,qBAAqB;IACrB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,aAAa,EAAE,EAAE,CAAC;QACzC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAChC,CAAC;IAED,6BAA6B;IAC7B,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,mBAAmB,EAAE,EAAE,CAAC;QAC/C,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,sBAAsB,EAAE,CAAC;YAClD,MAAM,aAAa,GAAG,IAA4B,CAAC;YACnD,MAAM,SAAS,GAAG,yBAAyB,CAAC,aAAa,CAAC,CAAC;YAE3D,yDAAyD;YACzD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBACjC,IAAI,CAAC,KAAK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AAG,KAAK,CAAC;IACpC,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAAiB;IACtD,OAAO,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACzC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type alias resolution and intersection merging.
|
|
3
|
+
* Handles complex type patterns in .d.ts files.
|
|
4
|
+
*/
|
|
5
|
+
import type { SourceFile, TypeAliasDeclaration, InterfaceDeclaration } from 'ts-morph';
|
|
6
|
+
import type { RawProp } from '../types/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Resolve a type alias to its underlying properties.
|
|
9
|
+
* Handles intersections, references to interfaces, and inline object types.
|
|
10
|
+
*
|
|
11
|
+
* @returns Array of RawProp or null if type not found
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveTypeAlias(sourceFile: SourceFile, aliasName: string): RawProp[] | null;
|
|
14
|
+
/**
|
|
15
|
+
* Merge all parts of an intersection type into a single props array.
|
|
16
|
+
*/
|
|
17
|
+
export declare function mergeIntersectionTypes(_sourceFile: SourceFile, typeAlias: TypeAliasDeclaration): RawProp[];
|
|
18
|
+
/**
|
|
19
|
+
* Resolve a type reference to its interface or type alias.
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveTypeReference(sourceFile: SourceFile, typeName: string): InterfaceDeclaration | TypeAliasDeclaration | null;
|
|
22
|
+
/**
|
|
23
|
+
* Filter out React internal props.
|
|
24
|
+
* Keeps `children` as it's compositionally relevant.
|
|
25
|
+
*/
|
|
26
|
+
export declare function filterReactInternals(props: RawProp[]): RawProp[];
|
|
27
|
+
/**
|
|
28
|
+
* Extract property names from an intersection type node.
|
|
29
|
+
* Useful for debugging and understanding type structure.
|
|
30
|
+
*/
|
|
31
|
+
export declare function getIntersectionParts(typeAlias: TypeAliasDeclaration): string[];
|
|
32
|
+
//# sourceMappingURL=type-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-resolver.d.ts","sourceRoot":"","sources":["../../src/extractor/type-resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAcjD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,MAAM,GAChB,OAAO,EAAE,GAAG,IAAI,CAclB;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,UAAU,EACvB,SAAS,EAAE,oBAAoB,GAC9B,OAAO,EAAE,CAyCX;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,GACf,oBAAoB,GAAG,oBAAoB,GAAG,IAAI,CAUpD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAEhE;AAiBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,oBAAoB,GAC9B,MAAM,EAAE,CAeV"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type alias resolution and intersection merging.
|
|
3
|
+
* Handles complex type patterns in .d.ts files.
|
|
4
|
+
*/
|
|
5
|
+
import { SyntaxKind } from 'ts-morph';
|
|
6
|
+
import { extractPropsFromInterface } from './props.js';
|
|
7
|
+
/**
|
|
8
|
+
* Props that should be filtered out as React internals.
|
|
9
|
+
* These are not useful for component analysis.
|
|
10
|
+
*/
|
|
11
|
+
const REACT_INTERNAL_PROPS = new Set([
|
|
12
|
+
'ref',
|
|
13
|
+
'key',
|
|
14
|
+
// Internal event handlers from DOM
|
|
15
|
+
'dangerouslySetInnerHTML',
|
|
16
|
+
]);
|
|
17
|
+
/**
|
|
18
|
+
* Resolve a type alias to its underlying properties.
|
|
19
|
+
* Handles intersections, references to interfaces, and inline object types.
|
|
20
|
+
*
|
|
21
|
+
* @returns Array of RawProp or null if type not found
|
|
22
|
+
*/
|
|
23
|
+
export function resolveTypeAlias(sourceFile, aliasName) {
|
|
24
|
+
// First try to find as a type alias
|
|
25
|
+
const typeAlias = sourceFile.getTypeAlias(aliasName);
|
|
26
|
+
if (typeAlias) {
|
|
27
|
+
return mergeIntersectionTypes(sourceFile, typeAlias);
|
|
28
|
+
}
|
|
29
|
+
// Fallback: try as interface
|
|
30
|
+
const iface = sourceFile.getInterface(aliasName);
|
|
31
|
+
if (iface) {
|
|
32
|
+
return extractPropsFromInterface(iface);
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Merge all parts of an intersection type into a single props array.
|
|
38
|
+
*/
|
|
39
|
+
export function mergeIntersectionTypes(_sourceFile, typeAlias) {
|
|
40
|
+
const props = [];
|
|
41
|
+
const seenNames = new Set();
|
|
42
|
+
const type = typeAlias.getType();
|
|
43
|
+
// Get all properties from the resolved type
|
|
44
|
+
// ts-morph's type.getProperties() automatically resolves intersections
|
|
45
|
+
for (const prop of type.getProperties()) {
|
|
46
|
+
const name = prop.getName();
|
|
47
|
+
if (seenNames.has(name))
|
|
48
|
+
continue;
|
|
49
|
+
seenNames.add(name);
|
|
50
|
+
const declarations = prop.getDeclarations();
|
|
51
|
+
const propDecl = declarations[0];
|
|
52
|
+
if (!propDecl)
|
|
53
|
+
continue;
|
|
54
|
+
const propType = prop.getTypeAtLocation(propDecl);
|
|
55
|
+
const typeText = simplifyTypeText(propType.getText());
|
|
56
|
+
// Determine if optional
|
|
57
|
+
let isOptional = false;
|
|
58
|
+
if (propDecl.getKindName() === 'PropertySignature') {
|
|
59
|
+
isOptional =
|
|
60
|
+
propDecl.hasQuestionToken?.() ??
|
|
61
|
+
false;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// Check if type includes undefined
|
|
65
|
+
isOptional = typeText.includes('undefined');
|
|
66
|
+
}
|
|
67
|
+
props.push({
|
|
68
|
+
name,
|
|
69
|
+
type: typeText,
|
|
70
|
+
required: !isOptional,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
return props;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Resolve a type reference to its interface or type alias.
|
|
77
|
+
*/
|
|
78
|
+
export function resolveTypeReference(sourceFile, typeName) {
|
|
79
|
+
// Try interface first
|
|
80
|
+
const iface = sourceFile.getInterface(typeName);
|
|
81
|
+
if (iface)
|
|
82
|
+
return iface;
|
|
83
|
+
// Try type alias
|
|
84
|
+
const typeAlias = sourceFile.getTypeAlias(typeName);
|
|
85
|
+
if (typeAlias)
|
|
86
|
+
return typeAlias;
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Filter out React internal props.
|
|
91
|
+
* Keeps `children` as it's compositionally relevant.
|
|
92
|
+
*/
|
|
93
|
+
export function filterReactInternals(props) {
|
|
94
|
+
return props.filter((p) => !REACT_INTERNAL_PROPS.has(p.name));
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Simplify complex type text for readability.
|
|
98
|
+
*/
|
|
99
|
+
function simplifyTypeText(text) {
|
|
100
|
+
return text
|
|
101
|
+
.replace(/React\.ReactNode/g, 'ReactNode')
|
|
102
|
+
.replace(/React\.ReactElement/g, 'ReactElement')
|
|
103
|
+
.replace(/React\.CSSProperties/g, 'CSSProperties')
|
|
104
|
+
.replace(/React\.HTMLAttributes<.*?>/g, 'HTMLAttributes')
|
|
105
|
+
.replace(/React\.ComponentPropsWithoutRef<.*?>/g, 'ComponentProps')
|
|
106
|
+
.replace(/React\.Ref<.*?>/g, 'Ref')
|
|
107
|
+
.replace(/React\.RefAttributes<.*?>/g, 'RefAttributes')
|
|
108
|
+
.replace(/import\(".*?"\)\./g, '');
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Extract property names from an intersection type node.
|
|
112
|
+
* Useful for debugging and understanding type structure.
|
|
113
|
+
*/
|
|
114
|
+
export function getIntersectionParts(typeAlias) {
|
|
115
|
+
const parts = [];
|
|
116
|
+
const typeNode = typeAlias.getTypeNode();
|
|
117
|
+
if (!typeNode)
|
|
118
|
+
return parts;
|
|
119
|
+
if (typeNode.getKind() === SyntaxKind.IntersectionType) {
|
|
120
|
+
for (const child of typeNode.forEachChildAsArray()) {
|
|
121
|
+
parts.push(child.getText());
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
parts.push(typeNode.getText());
|
|
126
|
+
}
|
|
127
|
+
return parts;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=type-resolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-resolver.js","sourceRoot":"","sources":["../../src/extractor/type-resolver.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAEvD;;;GAGG;AACH,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAC;IACnC,KAAK;IACL,KAAK;IACL,mCAAmC;IACnC,yBAAyB;CAC1B,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAAsB,EACtB,SAAiB;IAEjB,oCAAoC;IACpC,MAAM,SAAS,GAAG,UAAU,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC;IACrD,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,sBAAsB,CAAC,UAAU,EAAE,SAAS,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,oBAAoB,CAClC,SAA+B;IAE/B,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,EAAE,CAAC;IAEzC,IAAI,CAAC,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5B,IAAI,QAAQ,CAAC,OAAO,EAAE,KAAK,UAAU,CAAC,gBAAgB,EAAE,CAAC;QACvD,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,mBAAmB,EAAE,EAAE,CAAC;YACnD,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;SAAM,CAAC;QACN,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type fetcher module for fetching Radix type definitions.
|
|
3
|
+
*/
|
|
4
|
+
export { resolveVersion, resolvePackageVersion, listPrimitives, primitiveToPackage, packageToPrimitive, fetchPackageInfo, KNOWN_PRIMITIVES, type KnownPrimitive, } from './npm-registry.js';
|
|
5
|
+
export { detectPackageSource, resolvePackage, fetchTypesWithFallback, type PackageSource, type ResolvedPackage, } from './unified-package.js';
|
|
6
|
+
export { fetchTypes, fetchFromUnifiedPackage, buildTypesUrl, fetchPackageFile, } from './unpkg.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/fetcher/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,cAAc,GACpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,aAAa,EACb,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type fetcher module for fetching Radix type definitions.
|
|
3
|
+
*/
|
|
4
|
+
export { resolveVersion, resolvePackageVersion, listPrimitives, primitiveToPackage, packageToPrimitive, fetchPackageInfo, KNOWN_PRIMITIVES, } from './npm-registry.js';
|
|
5
|
+
export { detectPackageSource, resolvePackage, fetchTypesWithFallback, } from './unified-package.js';
|
|
6
|
+
export { fetchTypes, fetchFromUnifiedPackage, buildTypesUrl, fetchPackageFile, } from './unpkg.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fetcher/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GAEjB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,sBAAsB,GAGvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,UAAU,EACV,uBAAuB,EACvB,aAAa,EACb,gBAAgB,GACjB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* npm registry client for fetching Radix package metadata.
|
|
3
|
+
*/
|
|
4
|
+
import type { PackageInfo, PrimitiveInfo } from '../types/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Known Radix UI primitives - used as fallback and for validation
|
|
7
|
+
*/
|
|
8
|
+
export declare const KNOWN_PRIMITIVES: readonly ["accordion", "alert-dialog", "aspect-ratio", "avatar", "checkbox", "collapsible", "context-menu", "dialog", "dropdown-menu", "form", "hover-card", "label", "menubar", "navigation-menu", "popover", "progress", "radio-group", "scroll-area", "select", "separator", "slider", "slot", "switch", "tabs", "toast", "toggle", "toggle-group", "toolbar", "tooltip", "visually-hidden"];
|
|
9
|
+
export type KnownPrimitive = (typeof KNOWN_PRIMITIVES)[number];
|
|
10
|
+
export declare function isVersionAtLeast(version: string, minVersion: string): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Convert primitive name to package name.
|
|
13
|
+
* @example "dialog" -> "@radix-ui/react-dialog"
|
|
14
|
+
*/
|
|
15
|
+
export declare function primitiveToPackage(primitive: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Extract primitive name from package name.
|
|
18
|
+
* @example "@radix-ui/react-dialog" -> "dialog"
|
|
19
|
+
*/
|
|
20
|
+
export declare function packageToPrimitive(packageName: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Fetch package info from npm registry.
|
|
23
|
+
*/
|
|
24
|
+
export declare function fetchPackageInfo(packageName: string): Promise<PackageInfo>;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve a version hint for a specific package.
|
|
27
|
+
*/
|
|
28
|
+
export declare function resolvePackageVersion(packageName: string, versionHint?: string): Promise<string>;
|
|
29
|
+
/**
|
|
30
|
+
* Resolve a version hint (e.g., "latest", "^1.0.0") to an actual version.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveVersion(primitive: string, versionHint?: string): Promise<string>;
|
|
33
|
+
/**
|
|
34
|
+
* List all available Radix primitives.
|
|
35
|
+
* Returns known primitives with their package names.
|
|
36
|
+
*/
|
|
37
|
+
export declare function listPrimitives(_version?: string): Promise<PrimitiveInfo[]>;
|
|
38
|
+
/**
|
|
39
|
+
* Check if the unified "radix-ui" package is available and meets the minimum version.
|
|
40
|
+
*/
|
|
41
|
+
export declare function queryUnifiedPackage(minVersion?: string): Promise<{
|
|
42
|
+
available: boolean;
|
|
43
|
+
version?: string;
|
|
44
|
+
}>;
|
|
45
|
+
//# sourceMappingURL=npm-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-registry.d.ts","sourceRoot":"","sources":["../../src/fetcher/npm-registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAWpE;;GAEG;AACH,eAAO,MAAM,gBAAgB,iYA+BnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAiC/D,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAE7E;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG5D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAM9D;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,CAAC,CA6BtB;AAkBD;;GAEG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,WAAW,GAAE,MAAiB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAajB;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,SAAS,EAAE,MAAM,EACjB,WAAW,GAAE,MAAiB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAGjB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,QAAQ,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,aAAa,EAAE,CAAC,CAU1B;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,GAAE,MAA4B,GACvC,OAAO,CAAC;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAWnD"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* npm registry client for fetching Radix package metadata.
|
|
3
|
+
*/
|
|
4
|
+
const NPM_REGISTRY_URL = 'https://registry.npmjs.org';
|
|
5
|
+
const RADIX_SCOPE = '@radix-ui';
|
|
6
|
+
const UNIFIED_PACKAGE_NAME = 'radix-ui';
|
|
7
|
+
const UNIFIED_MIN_VERSION = '1.4.3';
|
|
8
|
+
// Cache for version resolution (short TTL in memory)
|
|
9
|
+
const versionCache = new Map();
|
|
10
|
+
const VERSION_CACHE_TTL_MS = 5 * 60 * 1000; // 5 minutes
|
|
11
|
+
/**
|
|
12
|
+
* Known Radix UI primitives - used as fallback and for validation
|
|
13
|
+
*/
|
|
14
|
+
export const KNOWN_PRIMITIVES = [
|
|
15
|
+
'accordion',
|
|
16
|
+
'alert-dialog',
|
|
17
|
+
'aspect-ratio',
|
|
18
|
+
'avatar',
|
|
19
|
+
'checkbox',
|
|
20
|
+
'collapsible',
|
|
21
|
+
'context-menu',
|
|
22
|
+
'dialog',
|
|
23
|
+
'dropdown-menu',
|
|
24
|
+
'form',
|
|
25
|
+
'hover-card',
|
|
26
|
+
'label',
|
|
27
|
+
'menubar',
|
|
28
|
+
'navigation-menu',
|
|
29
|
+
'popover',
|
|
30
|
+
'progress',
|
|
31
|
+
'radio-group',
|
|
32
|
+
'scroll-area',
|
|
33
|
+
'select',
|
|
34
|
+
'separator',
|
|
35
|
+
'slider',
|
|
36
|
+
'slot',
|
|
37
|
+
'switch',
|
|
38
|
+
'tabs',
|
|
39
|
+
'toast',
|
|
40
|
+
'toggle',
|
|
41
|
+
'toggle-group',
|
|
42
|
+
'toolbar',
|
|
43
|
+
'tooltip',
|
|
44
|
+
'visually-hidden',
|
|
45
|
+
];
|
|
46
|
+
function parseVersion(version) {
|
|
47
|
+
const [core, prerelease] = version.split('-');
|
|
48
|
+
const [major, minor, patch] = core.split('.').map((part) => Number(part));
|
|
49
|
+
return {
|
|
50
|
+
major: Number.isFinite(major) ? major : 0,
|
|
51
|
+
minor: Number.isFinite(minor) ? minor : 0,
|
|
52
|
+
patch: Number.isFinite(patch) ? patch : 0,
|
|
53
|
+
prerelease,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function compareVersions(a, b) {
|
|
57
|
+
const left = parseVersion(a);
|
|
58
|
+
const right = parseVersion(b);
|
|
59
|
+
if (left.major !== right.major)
|
|
60
|
+
return left.major > right.major ? 1 : -1;
|
|
61
|
+
if (left.minor !== right.minor)
|
|
62
|
+
return left.minor > right.minor ? 1 : -1;
|
|
63
|
+
if (left.patch !== right.patch)
|
|
64
|
+
return left.patch > right.patch ? 1 : -1;
|
|
65
|
+
if (left.prerelease && !right.prerelease)
|
|
66
|
+
return -1;
|
|
67
|
+
if (!left.prerelease && right.prerelease)
|
|
68
|
+
return 1;
|
|
69
|
+
return 0;
|
|
70
|
+
}
|
|
71
|
+
export function isVersionAtLeast(version, minVersion) {
|
|
72
|
+
return compareVersions(version, minVersion) >= 0;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Convert primitive name to package name.
|
|
76
|
+
* @example "dialog" -> "@radix-ui/react-dialog"
|
|
77
|
+
*/
|
|
78
|
+
export function primitiveToPackage(primitive) {
|
|
79
|
+
const normalized = primitive.toLowerCase().replace(/\s+/g, '-');
|
|
80
|
+
return `${RADIX_SCOPE}/react-${normalized}`;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Extract primitive name from package name.
|
|
84
|
+
* @example "@radix-ui/react-dialog" -> "dialog"
|
|
85
|
+
*/
|
|
86
|
+
export function packageToPrimitive(packageName) {
|
|
87
|
+
const match = packageName.match(/@radix-ui\/react-(.+)/);
|
|
88
|
+
if (!match) {
|
|
89
|
+
throw new Error(`Invalid Radix package name: ${packageName}`);
|
|
90
|
+
}
|
|
91
|
+
return match[1];
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Fetch package info from npm registry.
|
|
95
|
+
*/
|
|
96
|
+
export async function fetchPackageInfo(packageName) {
|
|
97
|
+
const url = `${NPM_REGISTRY_URL}/${encodeURIComponent(packageName)}`;
|
|
98
|
+
const response = await fetch(url, {
|
|
99
|
+
headers: {
|
|
100
|
+
Accept: 'application/json',
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
if (!response.ok) {
|
|
104
|
+
if (response.status === 404) {
|
|
105
|
+
throw new Error(`Package not found: ${packageName}`);
|
|
106
|
+
}
|
|
107
|
+
throw new Error(`Failed to fetch package info: ${response.status} ${response.statusText}`);
|
|
108
|
+
}
|
|
109
|
+
const data = (await response.json());
|
|
110
|
+
return {
|
|
111
|
+
name: data.name,
|
|
112
|
+
version: data['dist-tags'].latest,
|
|
113
|
+
distTags: data['dist-tags'],
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function resolveVersionFromPackageInfo(packageInfo, versionHint) {
|
|
117
|
+
if (versionHint === 'latest' || versionHint === '*') {
|
|
118
|
+
return packageInfo.distTags.latest;
|
|
119
|
+
}
|
|
120
|
+
if (packageInfo.distTags[versionHint]) {
|
|
121
|
+
return packageInfo.distTags[versionHint];
|
|
122
|
+
}
|
|
123
|
+
if (versionHint.startsWith('^') || versionHint.startsWith('~')) {
|
|
124
|
+
return versionHint.slice(1);
|
|
125
|
+
}
|
|
126
|
+
return versionHint;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Resolve a version hint for a specific package.
|
|
130
|
+
*/
|
|
131
|
+
export async function resolvePackageVersion(packageName, versionHint = 'latest') {
|
|
132
|
+
const cacheKey = `${packageName}@${versionHint}`;
|
|
133
|
+
const cached = versionCache.get(cacheKey);
|
|
134
|
+
if (cached && Date.now() - cached.timestamp < VERSION_CACHE_TTL_MS) {
|
|
135
|
+
return cached.version;
|
|
136
|
+
}
|
|
137
|
+
const packageInfo = await fetchPackageInfo(packageName);
|
|
138
|
+
const version = resolveVersionFromPackageInfo(packageInfo, versionHint);
|
|
139
|
+
versionCache.set(cacheKey, { version, timestamp: Date.now() });
|
|
140
|
+
return version;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Resolve a version hint (e.g., "latest", "^1.0.0") to an actual version.
|
|
144
|
+
*/
|
|
145
|
+
export async function resolveVersion(primitive, versionHint = 'latest') {
|
|
146
|
+
const packageName = primitiveToPackage(primitive);
|
|
147
|
+
return resolvePackageVersion(packageName, versionHint);
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* List all available Radix primitives.
|
|
151
|
+
* Returns known primitives with their package names.
|
|
152
|
+
*/
|
|
153
|
+
export async function listPrimitives(_version) {
|
|
154
|
+
// For now, return known primitives
|
|
155
|
+
// In a full implementation, we could query the radix-ui meta package
|
|
156
|
+
// or npm search API for all @radix-ui/react-* packages
|
|
157
|
+
return KNOWN_PRIMITIVES.map((name) => ({
|
|
158
|
+
name,
|
|
159
|
+
package: primitiveToPackage(name),
|
|
160
|
+
description: getPrimitiveDescription(name),
|
|
161
|
+
}));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Check if the unified "radix-ui" package is available and meets the minimum version.
|
|
165
|
+
*/
|
|
166
|
+
export async function queryUnifiedPackage(minVersion = UNIFIED_MIN_VERSION) {
|
|
167
|
+
try {
|
|
168
|
+
const packageInfo = await fetchPackageInfo(UNIFIED_PACKAGE_NAME);
|
|
169
|
+
const version = resolveVersionFromPackageInfo(packageInfo, 'latest');
|
|
170
|
+
return {
|
|
171
|
+
available: isVersionAtLeast(version, minVersion),
|
|
172
|
+
version,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
catch (error) {
|
|
176
|
+
return { available: false };
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Get a brief description for a primitive.
|
|
181
|
+
*/
|
|
182
|
+
function getPrimitiveDescription(primitive) {
|
|
183
|
+
const descriptions = {
|
|
184
|
+
accordion: 'A vertically stacked set of interactive headings',
|
|
185
|
+
'alert-dialog': 'A modal dialog that interrupts the user',
|
|
186
|
+
'aspect-ratio': 'Displays content within a desired ratio',
|
|
187
|
+
avatar: 'An image element with a fallback',
|
|
188
|
+
checkbox: 'A control that allows the user to toggle between states',
|
|
189
|
+
collapsible: 'An interactive component which expands/collapses content',
|
|
190
|
+
'context-menu': 'A menu displayed on right-click',
|
|
191
|
+
dialog: 'A modal dialog overlay',
|
|
192
|
+
'dropdown-menu': 'A menu displayed from a trigger button',
|
|
193
|
+
form: 'Form primitives with built-in validation',
|
|
194
|
+
'hover-card': 'A popup that appears on hover',
|
|
195
|
+
label: 'Renders an accessible label for form controls',
|
|
196
|
+
menubar: 'A visually persistent menu common in desktop apps',
|
|
197
|
+
'navigation-menu': 'A collection of links for site navigation',
|
|
198
|
+
popover: 'A popup that appears from a trigger',
|
|
199
|
+
progress: 'Displays an indicator showing task completion',
|
|
200
|
+
'radio-group': 'A set of checkable buttons—only one can be checked',
|
|
201
|
+
'scroll-area': 'Augments native scroll with custom scrollbars',
|
|
202
|
+
select: 'A dropdown list of options',
|
|
203
|
+
separator: 'Visually separates content',
|
|
204
|
+
slider: 'An input for selecting a value from a range',
|
|
205
|
+
slot: 'Merges its props onto its immediate child',
|
|
206
|
+
switch: 'A control that toggles between on and off',
|
|
207
|
+
tabs: 'A set of layered content panels',
|
|
208
|
+
toast: 'A succinct message displayed temporarily',
|
|
209
|
+
toggle: 'A two-state button',
|
|
210
|
+
'toggle-group': 'A set of two-state buttons',
|
|
211
|
+
toolbar: 'A container for grouping a set of controls',
|
|
212
|
+
tooltip: 'A popup that displays information on hover',
|
|
213
|
+
'visually-hidden': 'Hides content visually but keeps it accessible',
|
|
214
|
+
};
|
|
215
|
+
return descriptions[primitive] || '';
|
|
216
|
+
}
|
|
217
|
+
//# sourceMappingURL=npm-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-registry.js","sourceRoot":"","sources":["../../src/fetcher/npm-registry.ts"],"names":[],"mappings":"AAAA;;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,OAAO,EAAE,mDAAmD;QAC5D,iBAAiB,EAAE,2CAA2C;QAC9D,OAAO,EAAE,qCAAqC;QAC9C,QAAQ,EAAE,+CAA+C;QACzD,aAAa,EAAE,oDAAoD;QACnE,aAAa,EAAE,+CAA+C;QAC9D,MAAM,EAAE,4BAA4B;QACpC,SAAS,EAAE,4BAA4B;QACvC,MAAM,EAAE,6CAA6C;QACrD,IAAI,EAAE,2CAA2C;QACjD,MAAM,EAAE,2CAA2C;QACnD,IAAI,EAAE,iCAAiC;QACvC,KAAK,EAAE,0CAA0C;QACjD,MAAM,EAAE,oBAAoB;QAC5B,cAAc,EAAE,4BAA4B;QAC5C,OAAO,EAAE,4CAA4C;QACrD,OAAO,EAAE,4CAA4C;QACrD,iBAAiB,EAAE,gDAAgD;KACpE,CAAC;IAEF,OAAO,YAAY,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Radix UI package support.
|
|
3
|
+
*/
|
|
4
|
+
export type PackageSource = 'individual' | 'unified';
|
|
5
|
+
export interface ResolvedPackage {
|
|
6
|
+
source: PackageSource;
|
|
7
|
+
packageName: string;
|
|
8
|
+
primitive: string;
|
|
9
|
+
version: string;
|
|
10
|
+
typesPath: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Detect if the unified package is available.
|
|
14
|
+
*/
|
|
15
|
+
export declare function detectPackageSource(_primitive: string): Promise<PackageSource>;
|
|
16
|
+
/**
|
|
17
|
+
* Resolve package metadata for a primitive and version hint.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolvePackage(primitive: string, versionHint: string): Promise<ResolvedPackage>;
|
|
20
|
+
/**
|
|
21
|
+
* Fetch type definitions with unified-package fallback handling.
|
|
22
|
+
*/
|
|
23
|
+
export declare function fetchTypesWithFallback(primitive: string, versionHint: string): Promise<{
|
|
24
|
+
resolved: ResolvedPackage;
|
|
25
|
+
content: string;
|
|
26
|
+
}>;
|
|
27
|
+
//# sourceMappingURL=unified-package.d.ts.map
|