@astryxdesign/cli 0.7.10 → 0.7.11-canary.3df65bf
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/build/blocks/blocks.weights.json +1 -1
- package/api/build/build.doc.mjs +1 -1
- package/api/build/kit/rank.mjs +21 -4
- package/api/build/kit/signals.mjs +9 -3
- package/api/build/kit/start.d.mts +19 -0
- package/api/build/kit/start.mjs +49 -2
- package/api/build/kit/weights.d.mts +12 -0
- package/api/build/kit/weights.mjs +52 -16
- package/api/build/kit/words.d.mts +1 -0
- package/api/build/kit/words.mjs +1 -1
- package/api/docs/_adapter.mjs +2 -1
- package/api/doctor/_adapter.d.mts +28 -1
- package/api/doctor/_adapter.mjs +39 -2
- package/api/doctor/doctor.doc.mjs +1 -1
- package/api/doctor/doctor.mjs +9 -2
- package/api/doctor/theme-checks.d.mts +44 -3
- package/api/doctor/theme-checks.mjs +273 -6
- package/api/hook/hook.mjs +13 -0
- package/api/icon/_adapter.d.mts +3 -2
- package/api/icon/_adapter.mjs +8 -2
- package/api/icon/_authoring.d.mts +1 -0
- package/api/icon/_authoring.mjs +362 -38
- package/api/icon/_default-look.d.mts +155 -0
- package/api/icon/_default-look.mjs +474 -0
- package/api/icon/_records.d.mts +1 -1
- package/api/icon/_records.mjs +1 -0
- package/api/icon/add/add.mjs +224 -38
- package/api/icon/icon.type.d.mts +7 -2
- package/api/icon/icon.type.mjs +4 -2
- package/api/icon/iconAdd.doc.mjs +2 -2
- package/api/icon/iconNewDefinition.doc.mjs +3 -2
- package/api/icon/iconNewSet.doc.mjs +4 -4
- package/api/icon/search/search.mjs +10 -9
- package/api/integration/add-helpers.d.mts +2 -1
- package/api/integration/add-helpers.mjs +5 -2
- package/api/integration/authoring-checks.d.mts +0 -2
- package/api/integration/authoring-checks.mjs +1 -6
- package/api/integration/pack-check.d.mts +8 -6
- package/api/integration/pack-check.mjs +16 -6
- package/api/logger.mjs +2 -1
- package/api/render/_adapter.mjs +47 -1
- package/api/render/render.doc.mjs +2 -1
- package/api/search/_gather-components.mjs +2 -1
- package/api/swizzle/copy/copy.mjs +5 -1
- package/api/theme/build/build.mjs +15 -4
- package/assets/docs/author-a-theme.doc.mjs +2 -0
- package/assets/docs/getting-started.doc.mjs +20 -0
- package/assets/docs/tree/building-blocks.doc.mjs +1 -0
- package/assets/docs/tree/global-integrations.doc.mjs +1 -0
- package/assets/docs/tree/help.doc.mjs +1 -1
- package/assets/docs/tree/icon-sets.doc.mjs +9 -3
- package/assets/docs/tree/quick-start.doc.mjs +1 -0
- package/assets/docs/tree/render-pages.doc.mjs +1 -1
- package/assets/docs/tree/ship.doc.mjs +1 -1
- package/assets/docs/tree/tokens-color.doc.mjs +2 -2
- package/assets/templates/blocks/components/Table/TableLeadingMarkSelection.doc.mjs +15 -0
- package/assets/templates/blocks/components/Table/TableLeadingMarkSelection.tsx +134 -0
- package/authoring/doctypes/_schema.d.mts +1 -1
- package/clients/cli/commands/build.doc.mjs +3 -2
- package/clients/cli/commands/build.mjs +34 -5
- package/clients/cli/commands/experimental/icon.mjs +31 -10
- package/clients/cli/commands/experimental-icon-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +2 -1
- package/clients/cli/commands/experimental-icon-new-set.doc.mjs +2 -2
- package/clients/cli/index.mjs +36 -7
- package/foundation/discovery/authoring-self-docs.mjs +8 -3
- package/foundation/discovery/cli-self-docs.mjs +2 -1
- package/foundation/discovery/component-discovery.mjs +16 -0
- package/foundation/discovery/doc-types.mjs +9 -2
- package/foundation/discovery/docs-discovery.mjs +6 -4
- package/foundation/discovery/icon-definition-discovery.mjs +3 -3
- package/foundation/discovery/icon-ranking.d.mts +27 -3
- package/foundation/discovery/icon-ranking.mjs +125 -8
- package/foundation/discovery/icon-set-checks.mjs +40 -20
- package/foundation/discovery/icon-set-writer.d.mts +210 -16
- package/foundation/discovery/icon-set-writer.mjs +619 -79
- package/foundation/discovery/module-exports.d.mts +92 -4
- package/foundation/discovery/module-exports.mjs +410 -61
- package/foundation/discovery/template-adapter.mjs +5 -7
- package/foundation/discovery/theme-discovery.mjs +8 -10
- package/foundation/doc-compiler/tree.mjs +2 -2
- package/foundation/env/package-manager.d.mts +12 -4
- package/foundation/env/package-manager.mjs +15 -6
- package/foundation/env/semver.mjs +41 -9
- package/foundation/fs/listing-cache.d.mts +3 -1
- package/foundation/fs/listing-cache.mjs +63 -11
- package/foundation/fs/paths.mjs +2 -1
- package/foundation/release/notices.d.mts +16 -0
- package/foundation/release/notices.mjs +27 -6
- package/foundation/render/embedded-imports.d.mts +7 -0
- package/foundation/render/embedded-imports.mjs +1 -1
- package/foundation/render/page-worker.mjs +109 -4
- package/foundation/render/render-page.d.mts +16 -1
- package/foundation/render/render-page.mjs +25 -18
- package/foundation/render/served-packages.d.mts +33 -0
- package/foundation/render/served-packages.mjs +75 -0
- package/foundation/render/single-copy-hooks.d.mts +18 -0
- package/foundation/render/single-copy-hooks.mjs +44 -0
- package/foundation/text/shell-arg.d.mts +14 -0
- package/foundation/text/shell-arg.mjs +17 -0
- package/foundation/text/string-utils.mjs +25 -25
- package/package.json +6 -6
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
// @generated by scripts/sync-api-types.mjs from the JSDoc in foundation/**/*.mjs.
|
|
2
2
|
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* The file a relative import names: the path itself, then each module
|
|
6
|
+
* extension, then a folder's index. Null for a bare specifier or no file.
|
|
7
|
+
* @param {unknown} specifier
|
|
8
|
+
* @param {string} fromFile absolute path of the importing file
|
|
9
|
+
* @returns {string|null}
|
|
10
|
+
*/
|
|
11
|
+
export function resolveLocalModule(specifier: unknown, fromFile: string): string | null;
|
|
4
12
|
/**
|
|
5
13
|
* The first module, from `file` through its relative re-exports, that does
|
|
6
14
|
* not parse, with the parser's message; null when every one parses.
|
|
@@ -43,6 +51,29 @@ export function moduleExportSource(file: string, exportName: string, seen?: Set<
|
|
|
43
51
|
* @returns {string[] | null}
|
|
44
52
|
*/
|
|
45
53
|
export function moduleExportNames(file: string): string[] | null;
|
|
54
|
+
/**
|
|
55
|
+
* Every export of a module with where it is declared, in one pass: the same
|
|
56
|
+
* answers as the whole-tree {@link exportOrigin} for each name, read once per
|
|
57
|
+
* module.
|
|
58
|
+
* Pass one `memo` to calls that read the same package, so a module behind
|
|
59
|
+
* many barrels is read once; a memo keeps value and type reads apart, and
|
|
60
|
+
* nothing is kept between memos. One difference follows ESM where
|
|
61
|
+
* {@link exportOrigin} does not: a name re-exported by name from a
|
|
62
|
+
* module that cannot be followed is absent, never filled from `export *`.
|
|
63
|
+
* @param {string} file
|
|
64
|
+
* @param {{types?: boolean, memo?: Map<string, Map<string, {file: string, name: string}>>}} [options]
|
|
65
|
+
* @returns {Map<string, {file: string, name: string}>}
|
|
66
|
+
*/
|
|
67
|
+
export function moduleExportOrigins(file: string, { types, memo }?: {
|
|
68
|
+
types?: boolean;
|
|
69
|
+
memo?: Map<string, Map<string, {
|
|
70
|
+
file: string;
|
|
71
|
+
name: string;
|
|
72
|
+
}>>;
|
|
73
|
+
}): Map<string, {
|
|
74
|
+
file: string;
|
|
75
|
+
name: string;
|
|
76
|
+
}>;
|
|
46
77
|
/**
|
|
47
78
|
* @typedef {{verdict: 'exports'} | {verdict: 'lacks'} | {verdict: 'unknown', reason: string}} ExportVerdict
|
|
48
79
|
*/
|
|
@@ -84,12 +115,16 @@ export function staticExportObject(file: string, exportNames: readonly string[])
|
|
|
84
115
|
* has there, without executing anything: local re-exports, renames, and
|
|
85
116
|
* imported bindings a module exports again are followed. Two exports are the
|
|
86
117
|
* same value when their origins are equal. Null when it cannot be proved.
|
|
118
|
+
* With `types`, type-only exports and type declarations are followed too.
|
|
87
119
|
* @param {string} file
|
|
88
120
|
* @param {string} exportName
|
|
89
121
|
* @param {Set<string>} [seen]
|
|
122
|
+
* @param {{types?: boolean}} [options]
|
|
90
123
|
* @returns {{file: string, name: string} | null}
|
|
91
124
|
*/
|
|
92
|
-
export function moduleExportOrigin(file: string, exportName: string, seen?: Set<string
|
|
125
|
+
export function moduleExportOrigin(file: string, exportName: string, seen?: Set<string>, { types }?: {
|
|
126
|
+
types?: boolean;
|
|
127
|
+
}): {
|
|
93
128
|
file: string;
|
|
94
129
|
name: string;
|
|
95
130
|
} | null;
|
|
@@ -114,12 +149,16 @@ export function exportOriginVerdict(file: string, exportName: string): ExportOri
|
|
|
114
149
|
* named exports and, through `export *` from local files and installed
|
|
115
150
|
* packages, theirs. Unlike {@link moduleExportNames}, it never gives up on an
|
|
116
151
|
* `export *`: what it cannot read is left out. Type-only
|
|
117
|
-
* exports
|
|
152
|
+
* exports are left out unless `types` asks for them; `default` always is.
|
|
153
|
+
* Sorted.
|
|
118
154
|
* @param {string} file
|
|
119
155
|
* @param {Set<string>} [seen]
|
|
156
|
+
* @param {{types?: boolean}} [options]
|
|
120
157
|
* @returns {string[]}
|
|
121
158
|
*/
|
|
122
|
-
export function followedExportNames(file: string, seen?: Set<string
|
|
159
|
+
export function followedExportNames(file: string, seen?: Set<string>, { types }?: {
|
|
160
|
+
types?: boolean;
|
|
161
|
+
}): string[];
|
|
123
162
|
/**
|
|
124
163
|
* What a module's runtime export is, read without running it: `component`
|
|
125
164
|
* for a function, a class, or a value a call returns (`forwardRef(...)`);
|
|
@@ -146,17 +185,46 @@ export function exportScalarType(file: string, exportName: string): "string" | "
|
|
|
146
185
|
* then have the same final origin. Null when an alias cannot be followed (to
|
|
147
186
|
* a default or namespace import, a member such as `Icons.X`, or an import
|
|
148
187
|
* that does not resolve), so a caller leaves the comparison unchecked.
|
|
188
|
+
* `unwrap`, when given, names a value a declaration stands for besides a
|
|
189
|
+
* plain alias (a theme made by `defineTheme({extends: base})` stands for
|
|
190
|
+
* `base`): it receives the declaration's initializer and returns the
|
|
191
|
+
* expression to follow, or null for none. A followed expression that is not
|
|
192
|
+
* an identifier makes the origin unknown.
|
|
149
193
|
* @param {{file: string, name: string}} origin
|
|
150
194
|
* @param {Set<string>} [seen]
|
|
195
|
+
* @param {(init: any) => any} [unwrap]
|
|
151
196
|
* @returns {{file: string, name: string} | null}
|
|
152
197
|
*/
|
|
153
198
|
export function aliasedOrigin(origin: {
|
|
154
199
|
file: string;
|
|
155
200
|
name: string;
|
|
156
|
-
}, seen?: Set<string
|
|
201
|
+
}, seen?: Set<string>, unwrap?: (init: any) => any): {
|
|
157
202
|
file: string;
|
|
158
203
|
name: string;
|
|
159
204
|
} | null;
|
|
205
|
+
/**
|
|
206
|
+
* Where the value each `<Name prop={value}>` element of a module passes is
|
|
207
|
+
* declared, one entry per element, read without running anything. `Name` is
|
|
208
|
+
* a runtime import of `name` from one of `sources` (renames included). The
|
|
209
|
+
* value is followed with {@link aliasedOrigin} (passing `unwrap`) from the
|
|
210
|
+
* module-scope binding it names, through local files and installed packages.
|
|
211
|
+
* An entry is null when the value is not an identifier or its origin cannot
|
|
212
|
+
* be proved (a parameter or an import that does not resolve gives the
|
|
213
|
+
* module's own name, and a member or a default import gives null). An element
|
|
214
|
+
* without `prop` gives no entry.
|
|
215
|
+
* @param {string} file
|
|
216
|
+
* @param {{sources: ReadonlySet<string>, name: string, prop: string, unwrap?: (init: any) => any}} element
|
|
217
|
+
* @returns {Array<{file: string, name: string} | null>}
|
|
218
|
+
*/
|
|
219
|
+
export function elementPropOrigins(file: string, { sources, name, prop, unwrap }: {
|
|
220
|
+
sources: ReadonlySet<string>;
|
|
221
|
+
name: string;
|
|
222
|
+
prop: string;
|
|
223
|
+
unwrap?: (init: any) => any;
|
|
224
|
+
}): Array<{
|
|
225
|
+
file: string;
|
|
226
|
+
name: string;
|
|
227
|
+
} | null>;
|
|
160
228
|
/**
|
|
161
229
|
* The object a module exports under `exportName`, read without running it:
|
|
162
230
|
* each property's key and the binding its value names (an identifier, or the
|
|
@@ -178,6 +246,26 @@ export function staticExportBindings(file: string, exportName: string): Map<stri
|
|
|
178
246
|
* enumerable, so the object compares and serializes as its literal properties.
|
|
179
247
|
*/
|
|
180
248
|
export const HAS_COMPUTED: unique symbol;
|
|
249
|
+
export type OriginsRead = {
|
|
250
|
+
types: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* finished maps, keyed by read mode and file
|
|
253
|
+
*/
|
|
254
|
+
memo: Map<string, Map<string, {
|
|
255
|
+
file: string;
|
|
256
|
+
name: string;
|
|
257
|
+
}>>;
|
|
258
|
+
/**
|
|
259
|
+
* the modules being read now, by memo key
|
|
260
|
+
*/
|
|
261
|
+
reading: Map<string, {
|
|
262
|
+
depth: number;
|
|
263
|
+
origins: Map<string, {
|
|
264
|
+
file: string;
|
|
265
|
+
name: string;
|
|
266
|
+
}>;
|
|
267
|
+
}>;
|
|
268
|
+
};
|
|
181
269
|
export type ExportVerdict = {
|
|
182
270
|
verdict: "exports";
|
|
183
271
|
} | {
|