@astryxdesign/cli 0.7.7 → 0.7.8-canary.15a98a1
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/component/__fixtures__/resolutions/case-01.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-02.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-03.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-04.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-05.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-06.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-07.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-08.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-09.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-10.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-11.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-12.txt +30 -0
- package/api/component/__fixtures__/resolutions/case-13.txt +25 -0
- package/api/component/__fixtures__/resolutions/modules.txt +309 -0
- package/api/component/component.mjs +11 -7
- package/api/gap-report/gap-report.mjs +9 -4
- package/api/integration/authoring-checks.mjs +31 -0
- package/api/integration/check/check.mjs +8 -3
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/promote-tokenizer-presentation.mjs +174 -0
- package/assets/discover/official-packages.json +4 -8
- package/assets/templates/blocks/components/Hooks/useAnnounceHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Hooks/useAnnounceHookUsage.tsx +90 -0
- package/assets/templates/blocks/components/Hooks/useFocusTrapHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Hooks/useFocusTrapHookUsage.tsx +70 -0
- package/assets/templates/blocks/components/Tokenizer/TokenizerClear.tsx +1 -0
- package/assets/templates/blocks/components/Tokenizer/TokenizerCreatable.tsx +1 -0
- package/assets/templates/blocks/components/Tokenizer/TokenizerEndContent.tsx +1 -0
- package/assets/templates/blocks/components/Tokenizer/TokenizerOverflow.tsx +2 -0
- package/assets/templates/blocks/components/createAnimator/AnimatorPlayingCardsVanilla.doc.mjs +14 -0
- package/assets/templates/blocks/components/createAnimator/AnimatorPlayingCardsVanilla.tsx +199 -0
- package/assets/templates/blocks/components/useAnimator/AnimatorPlayingCards.doc.mjs +21 -0
- package/assets/templates/blocks/components/useAnimator/AnimatorPlayingCards.tsx +210 -0
- package/assets/templates/pages/table-inbox/page.tsx +6 -0
- package/assets/templates/pages/work-item-detail/page.tsx +1 -0
- package/clients/cli/commands/component.mjs +18 -8
- package/foundation/discovery/component-discovery.mjs +111 -16
- package/foundation/fs/listing-cache.d.mts +25 -0
- package/foundation/fs/listing-cache.mjs +69 -2
- package/foundation/fs/paths.mjs +50 -5
- package/foundation/integrations/public-imports.d.mts +24 -0
- package/foundation/integrations/public-imports.mjs +2 -2
- package/foundation/xle/registry.d.mts +1 -1
- package/foundation/xle/registry.mjs +11 -1
- package/package.json +9 -9
|
@@ -36,6 +36,30 @@ export function moduleExportNames(file: string, cache?: ExportNameCache): {
|
|
|
36
36
|
types: Set<string>;
|
|
37
37
|
typed: boolean;
|
|
38
38
|
};
|
|
39
|
+
/**
|
|
40
|
+
* Every file a declared subpath names, and whether each is on disk.
|
|
41
|
+
* @param {string} packageDir
|
|
42
|
+
* @param {SubpathDeclaration} declaration
|
|
43
|
+
* @returns {{files: string[], allPresent: boolean}}
|
|
44
|
+
*/
|
|
45
|
+
export function declaredTargets(packageDir: string, declaration: SubpathDeclaration): {
|
|
46
|
+
files: string[];
|
|
47
|
+
allPresent: boolean;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* The names an import statement asks for that the module provably lacks.
|
|
51
|
+
* A name is missing only when every file the subpath names is on disk and
|
|
52
|
+
* read in full, and at least one of those lists includes its types: any
|
|
53
|
+
* construct the reader does not model leaves the import unchecked.
|
|
54
|
+
* @param {ImportStatement} statement
|
|
55
|
+
* @param {string[]} files candidate targets on disk
|
|
56
|
+
* @param {ExportNameCache} cache
|
|
57
|
+
* @param {boolean} [allPresent] every target the subpath names is on disk
|
|
58
|
+
* @param {boolean} [values] every name is known to be a value (a component),
|
|
59
|
+
* so a list without the module's types can still judge it
|
|
60
|
+
* @returns {string[] | null} null when it cannot be judged
|
|
61
|
+
*/
|
|
62
|
+
export function missingNames(statement: ImportStatement, files: string[], cache: ExportNameCache, allPresent?: boolean, values?: boolean): string[] | null;
|
|
39
63
|
/**
|
|
40
64
|
* Every public-import finding for one package, as notes, and the report of
|
|
41
65
|
* what could not be judged. It returns no issues: the notes are listed
|
|
@@ -667,7 +667,7 @@ function readOwnExportNames(file, cache, stack) {
|
|
|
667
667
|
* @param {SubpathDeclaration} declaration
|
|
668
668
|
* @returns {{files: string[], allPresent: boolean}}
|
|
669
669
|
*/
|
|
670
|
-
function declaredTargets(packageDir, declaration) {
|
|
670
|
+
export function declaredTargets(packageDir, declaration) {
|
|
671
671
|
if (declaration.state !== 'declared') return {files: [], allPresent: false};
|
|
672
672
|
const root = path.resolve(packageDir);
|
|
673
673
|
const all = allTargets(declaration.value)
|
|
@@ -693,7 +693,7 @@ function declaredTargets(packageDir, declaration) {
|
|
|
693
693
|
* so a list without the module's types can still judge it
|
|
694
694
|
* @returns {string[] | null} null when it cannot be judged
|
|
695
695
|
*/
|
|
696
|
-
function missingNames(
|
|
696
|
+
export function missingNames(
|
|
697
697
|
statement,
|
|
698
698
|
files,
|
|
699
699
|
cache,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* @param {string} [options.cwd]
|
|
10
10
|
* @returns {Promise<{components: Map<string, object>, aliases: Map<string, string>, componentNames: string[]}>}
|
|
11
11
|
*/
|
|
12
|
-
export function buildRegistry(
|
|
12
|
+
export function buildRegistry(options?: {
|
|
13
13
|
cwd?: string | undefined;
|
|
14
14
|
}): Promise<{
|
|
15
15
|
components: Map<string, object>;
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import fs from 'node:fs';
|
|
19
19
|
import path from 'node:path';
|
|
20
|
+
import {withListingCache} from '../fs/listing-cache.mjs';
|
|
20
21
|
import {findCoreDir} from '../fs/paths.mjs';
|
|
21
22
|
import {
|
|
22
23
|
discoverComponents,
|
|
@@ -106,9 +107,18 @@ let cachedRegistry = /** @type {import('./xle-ast').Registry | null} */ (null);
|
|
|
106
107
|
* @param {string} [options.cwd]
|
|
107
108
|
* @returns {Promise<{components: Map<string, object>, aliases: Map<string, string>, componentNames: string[]}>}
|
|
108
109
|
*/
|
|
109
|
-
export async function buildRegistry(
|
|
110
|
+
export async function buildRegistry(options = {}) {
|
|
110
111
|
if (cachedRegistry) return cachedRegistry;
|
|
112
|
+
// Every name's lookups walk the same source tree: read each directory once.
|
|
113
|
+
return withListingCache(() => readRegistry(options));
|
|
114
|
+
}
|
|
111
115
|
|
|
116
|
+
/**
|
|
117
|
+
* {@link buildRegistry}'s read, inside one listing operation.
|
|
118
|
+
* @param {{cwd?: string}} options
|
|
119
|
+
* @returns {ReturnType<typeof buildRegistry>}
|
|
120
|
+
*/
|
|
121
|
+
async function readRegistry({cwd = process.cwd()}) {
|
|
112
122
|
const coreDir = findCoreDir(cwd);
|
|
113
123
|
if (!coreDir) {
|
|
114
124
|
throw new Error('Could not find @astryxdesign/core package — run from an XDS workspace');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astryxdesign/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8-canary.15a98a1",
|
|
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,10 +124,10 @@
|
|
|
124
124
|
"zod": "^4.4.3"
|
|
125
125
|
},
|
|
126
126
|
"peerDependencies": {
|
|
127
|
-
"@astryxdesign/charts": "
|
|
128
|
-
"@astryxdesign/core": "
|
|
129
|
-
"@astryxdesign/lab": "
|
|
130
|
-
"@astryxdesign/theme-neutral": "
|
|
127
|
+
"@astryxdesign/charts": "0.7.8-canary.15a98a1",
|
|
128
|
+
"@astryxdesign/core": "0.7.8-canary.15a98a1",
|
|
129
|
+
"@astryxdesign/lab": "0.7.8-canary.15a98a1",
|
|
130
|
+
"@astryxdesign/theme-neutral": "0.7.8-canary.15a98a1"
|
|
131
131
|
},
|
|
132
132
|
"peerDependenciesMeta": {
|
|
133
133
|
"@astryxdesign/charts": {
|
|
@@ -144,10 +144,10 @@
|
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
"devDependencies": {
|
|
147
|
-
"@astryxdesign/charts": "
|
|
148
|
-
"@astryxdesign/core": "
|
|
149
|
-
"@astryxdesign/lab": "
|
|
150
|
-
"@astryxdesign/theme-neutral": "
|
|
147
|
+
"@astryxdesign/charts": "0.7.8-canary.15a98a1",
|
|
148
|
+
"@astryxdesign/core": "0.7.8-canary.15a98a1",
|
|
149
|
+
"@astryxdesign/lab": "0.7.8-canary.15a98a1",
|
|
150
|
+
"@astryxdesign/theme-neutral": "0.7.8-canary.15a98a1",
|
|
151
151
|
"@heroicons/react": "^2.2.0",
|
|
152
152
|
"@stylexjs/stylex": "^0.19.0",
|
|
153
153
|
"@types/babel__core": "^7.20.5",
|