@astryxdesign/cli 0.7.11-canary.3bbab18 → 0.7.11-canary.4e6e67d
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/api/icon/_authoring.mjs +228 -32
- package/api/icon/icon.type.d.mts +15 -0
- package/api/icon/icon.type.mjs +2 -0
- package/api/integration/add-helpers.d.mts +10 -1
- package/api/integration/add-helpers.mjs +1 -1
- package/api/swizzle/_adapter.d.mts +1 -0
- package/api/swizzle/_adapter.mjs +4 -1
- package/api/swizzle/_moduleGraph.d.mts +162 -0
- package/api/swizzle/_moduleGraph.mjs +754 -0
- package/api/swizzle/copy/copy.d.mts +2 -43
- package/api/swizzle/copy/copy.mjs +194 -314
- package/api/swizzle/swizzle.d.mts +0 -2
- package/api/swizzle/swizzle.doc.mjs +8 -4
- package/api/swizzle/swizzle.mjs +3 -7
- package/api/swizzle/swizzle.type.d.mts +1 -1
- package/api/swizzle/swizzle.type.mjs +2 -2
- package/assets/discover/official-packages.json +12 -0
- package/assets/docs/tree/icon-sets.doc.mjs +2 -2
- package/assets/templates/pages/file-explorer/page.tsx +103 -79
- package/clients/cli/commands/swizzle.doc.mjs +6 -3
- package/clients/cli/commands/swizzle.mjs +8 -9
- package/foundation/discovery/component-loader.d.mts +1 -1
- package/foundation/discovery/icon-set-checks.mjs +4 -15
- package/foundation/discovery/icon-set-discovery.d.mts +13 -0
- package/foundation/discovery/icon-set-discovery.mjs +25 -0
- package/foundation/discovery/icon-set-writer.d.mts +28 -0
- package/foundation/discovery/icon-set-writer.mjs +57 -0
- package/foundation/discovery/module-exports.mjs +57 -2
- package/foundation/fs/paths.d.mts +2 -1
- package/foundation/fs/paths.mjs +3 -4
- package/package.json +6 -6
|
@@ -707,7 +707,12 @@ function exportOriginsOf(file, read) {
|
|
|
707
707
|
for (const node of declarations) {
|
|
708
708
|
for (const name of declaredNames(node.declaration, types)) {
|
|
709
709
|
named.add(name);
|
|
710
|
-
if (!origins.has(name))
|
|
710
|
+
if (!origins.has(name)) {
|
|
711
|
+
origins.set(
|
|
712
|
+
name,
|
|
713
|
+
declaredOrigin(ast, file, node.declaration, name, types),
|
|
714
|
+
);
|
|
715
|
+
}
|
|
711
716
|
}
|
|
712
717
|
}
|
|
713
718
|
for (const [exportName, entries] of specifiers) {
|
|
@@ -1211,7 +1216,15 @@ function exportOrigin(file, exportName, seen, read, types = false) {
|
|
|
1211
1216
|
const {declarations, specifiers} = namedExportIndex(ast.program, types, read);
|
|
1212
1217
|
for (const node of declarations) {
|
|
1213
1218
|
if (declarationExports(node.declaration, exportName, types)) {
|
|
1214
|
-
return
|
|
1219
|
+
return declaredOrigin(
|
|
1220
|
+
ast,
|
|
1221
|
+
file,
|
|
1222
|
+
node.declaration,
|
|
1223
|
+
exportName,
|
|
1224
|
+
types,
|
|
1225
|
+
seen,
|
|
1226
|
+
read,
|
|
1227
|
+
);
|
|
1215
1228
|
}
|
|
1216
1229
|
}
|
|
1217
1230
|
for (const {node, specifier} of specifiers.get(exportName) ?? []) {
|
|
@@ -1690,6 +1703,48 @@ export function elementPropOrigins(file, {sources, name, prop, unwrap}) {
|
|
|
1690
1703
|
return origins;
|
|
1691
1704
|
}
|
|
1692
1705
|
|
|
1706
|
+
/**
|
|
1707
|
+
* Where a declared export is defined. An `export const X = Y` whose value is
|
|
1708
|
+
* another binding is that binding, so an alias of an imported value has the
|
|
1709
|
+
* imported value's origin.
|
|
1710
|
+
* @param {any} ast
|
|
1711
|
+
* @param {string} file
|
|
1712
|
+
* @param {any} declaration
|
|
1713
|
+
* @param {string} name
|
|
1714
|
+
* @param {boolean} types
|
|
1715
|
+
* @param {Set<string>} [seen]
|
|
1716
|
+
* @param {(node: any, type: string) => readonly any[]} [read]
|
|
1717
|
+
* @returns {{file: string, name: string}}
|
|
1718
|
+
*/
|
|
1719
|
+
function declaredOrigin(
|
|
1720
|
+
ast,
|
|
1721
|
+
file,
|
|
1722
|
+
declaration,
|
|
1723
|
+
name,
|
|
1724
|
+
types,
|
|
1725
|
+
seen = new Set(),
|
|
1726
|
+
read = nodesOfType,
|
|
1727
|
+
) {
|
|
1728
|
+
if (
|
|
1729
|
+
declaration?.type === 'VariableDeclaration' &&
|
|
1730
|
+
declaration.kind === 'const'
|
|
1731
|
+
) {
|
|
1732
|
+
for (const declarator of declaration.declarations) {
|
|
1733
|
+
if (
|
|
1734
|
+
declarator.id?.type === 'Identifier' &&
|
|
1735
|
+
declarator.id.name === name &&
|
|
1736
|
+
declarator.init?.type === 'Identifier'
|
|
1737
|
+
) {
|
|
1738
|
+
const init = declarator.init.name;
|
|
1739
|
+
return (
|
|
1740
|
+
bindingOrigin(ast, file, init, seen, types, read) ?? {file, name}
|
|
1741
|
+
);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
return {file, name};
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1693
1748
|
/**
|
|
1694
1749
|
* Where a top-level binding of a parsed module comes from: an import from a
|
|
1695
1750
|
* local module is followed to its origin; anything else is declared here.
|
|
@@ -166,7 +166,8 @@ export function discoverExternalPackages(startDir?: string): {
|
|
|
166
166
|
}[];
|
|
167
167
|
/**
|
|
168
168
|
* List available component directories in packages/core/src.
|
|
169
|
-
*
|
|
169
|
+
* Component directories are capitalized (`Button`, `Dialog`); lowercase
|
|
170
|
+
* directories hold shared infrastructure and are never listed.
|
|
170
171
|
* @param {string} coreDir
|
|
171
172
|
*/
|
|
172
173
|
export function listComponents(coreDir: string): string[];
|
package/foundation/fs/paths.mjs
CHANGED
|
@@ -854,7 +854,8 @@ export function discoverExternalPackages(startDir = process.cwd()) {
|
|
|
854
854
|
|
|
855
855
|
/**
|
|
856
856
|
* List available component directories in packages/core/src.
|
|
857
|
-
*
|
|
857
|
+
* Component directories are capitalized (`Button`, `Dialog`); lowercase
|
|
858
|
+
* directories hold shared infrastructure and are never listed.
|
|
858
859
|
* @param {string} coreDir
|
|
859
860
|
*/
|
|
860
861
|
export function listComponents(coreDir) {
|
|
@@ -865,9 +866,7 @@ export function listComponents(coreDir) {
|
|
|
865
866
|
return entries
|
|
866
867
|
.filter(e => {
|
|
867
868
|
if (!e.isDirectory()) return false;
|
|
868
|
-
|
|
869
|
-
if (['hooks', 'theme', 'utils'].includes(e.name)) return false;
|
|
870
|
-
return true;
|
|
869
|
+
return /^[A-Z]/.test(e.name);
|
|
871
870
|
})
|
|
872
871
|
.map(e => e.name)
|
|
873
872
|
.sort();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.11-canary.
|
|
3
|
+
"version": "0.7.11-canary.4e6e67d",
|
|
4
4
|
"displayName": "CLI",
|
|
5
5
|
"description": "Scaffold projects, browse templates, generate themes, and get agent-ready docs from the command line.",
|
|
6
6
|
"author": "Meta Open Source",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"zod": "^4.4.3"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
|
-
"@astryxdesign/core": "0.7.11-canary.
|
|
127
|
+
"@astryxdesign/core": "0.7.11-canary.4e6e67d"
|
|
128
128
|
},
|
|
129
129
|
"peerDependenciesMeta": {
|
|
130
130
|
"@astryxdesign/core": {
|
|
@@ -132,10 +132,10 @@
|
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
134
|
"devDependencies": {
|
|
135
|
-
"@astryxdesign/charts": "0.7.11-canary.
|
|
136
|
-
"@astryxdesign/core": "0.7.11-canary.
|
|
137
|
-
"@astryxdesign/lab": "0.7.11-canary.
|
|
138
|
-
"@astryxdesign/theme-neutral": "0.7.11-canary.
|
|
135
|
+
"@astryxdesign/charts": "0.7.11-canary.4e6e67d",
|
|
136
|
+
"@astryxdesign/core": "0.7.11-canary.4e6e67d",
|
|
137
|
+
"@astryxdesign/lab": "0.7.11-canary.4e6e67d",
|
|
138
|
+
"@astryxdesign/theme-neutral": "0.7.11-canary.4e6e67d",
|
|
139
139
|
"@heroicons/react": "^2.2.0",
|
|
140
140
|
"@stylexjs/stylex": "^0.19.0",
|
|
141
141
|
"@types/babel__core": "^7.20.5",
|