@astryxdesign/cli 0.7.15 → 0.7.16-canary.g07c77c0
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 +5 -3
- package/api/build/_adapter.d.mts +1 -0
- package/api/build/blocks/blocks.d.mts +1 -0
- package/api/build/blocks/blocks.mjs +18 -1
- package/api/component/_adapter.d.mts +1 -1
- package/api/component/_adapter.mjs +28 -1
- package/api/doctor/_adapter.d.mts +17 -0
- package/api/doctor/_adapter.mjs +43 -0
- package/api/doctor/built-checks.mjs +1 -1
- package/api/doctor/doctor.mjs +18 -4
- package/api/doctor/theme-checks.mjs +1 -1
- package/api/integration/add-contribution.mjs +3 -3
- package/api/integration/pack-check.mjs +14 -8
- package/api/integration/validate-integration.mjs +1 -1
- package/api/search/_adapter.mjs +15 -16
- package/api/search/_entries.d.mts +2 -1
- package/api/search/_entries.mjs +28 -1
- package/api/swizzle/_moduleGraph.mjs +1 -1
- package/api/theme/_adapter.d.mts +5 -2
- package/api/theme/_adapter.mjs +43 -12
- package/api/theme/_fork.mjs +1 -1
- package/api/theme/build/build.d.mts +116 -32
- package/api/theme/build/build.mjs +449 -102
- package/api/theme/eject/eject.mjs +22 -1
- package/api/theme/template/template.d.mts +19 -0
- package/api/theme/template/template.mjs +102 -25
- package/api/theme/theme.type.d.mts +5 -1
- package/api/theme/theme.type.mjs +2 -1
- package/api/theme/themeBuild.doc.mjs +3 -3
- package/api/theme/themeEject.doc.mjs +1 -1
- package/api/theme/themeTemplate.doc.mjs +9 -3
- package/api/theme-edit/_adapter.d.mts +32 -2
- package/api/theme-edit/_adapter.mjs +213 -36
- package/api/theme-edit/_check.d.mts +69 -3
- package/api/theme-edit/_check.mjs +1517 -218
- package/api/theme-edit/_color.d.mts +2 -8
- package/api/theme-edit/_color.mjs +292 -219
- package/api/theme-edit/_compiler.d.mts +1 -0
- package/api/theme-edit/_compiler.mjs +20 -1
- package/api/theme-edit/_context.d.mts +29 -0
- package/api/theme-edit/_context.mjs +426 -40
- package/api/theme-edit/_css.d.mts +60 -1
- package/api/theme-edit/_css.mjs +404 -28
- package/api/theme-edit/_edit.d.mts +9 -0
- package/api/theme-edit/_edit.mjs +1300 -135
- package/api/theme-edit/_how-commands.d.mts +11 -26
- package/api/theme-edit/_how-commands.mjs +30 -2
- package/api/theme-edit/_how-question.d.mts +7 -0
- package/api/theme-edit/_how-question.mjs +1304 -176
- package/api/theme-edit/_how.mjs +144 -30
- package/api/theme-edit/_overview.mjs +2 -0
- package/api/theme-edit/_palette.d.mts +11 -0
- package/api/theme-edit/_palette.mjs +194 -65
- package/api/theme-edit/_parts.d.mts +33 -0
- package/api/theme-edit/_parts.mjs +138 -9
- package/api/theme-edit/_png.d.mts +18 -0
- package/api/theme-edit/_png.mjs +95 -14
- package/api/theme-edit/_preview-app.d.mts +9 -0
- package/api/theme-edit/_preview-app.mjs +1191 -71
- package/api/theme-edit/_preview.d.mts +16 -3
- package/api/theme-edit/_preview.mjs +335 -30
- package/api/theme-edit/_project.d.mts +11 -0
- package/api/theme-edit/_project.mjs +46 -12
- package/api/theme-edit/_settings.d.mts +240 -5
- package/api/theme-edit/_settings.mjs +2561 -115
- package/api/theme-edit/_tables.d.mts +24 -0
- package/api/theme-edit/_tables.mjs +211 -149
- package/api/theme-edit/_vet.d.mts +42 -0
- package/api/theme-edit/_vet.mjs +144 -0
- package/api/theme-edit/theme-edit.type.d.mts +2 -1
- package/api/theme-edit/theme-edit.type.mjs +1 -1
- package/api/theme-edit/themeEditNew.doc.mjs +1 -1
- package/api/theme-edit/themeEditShow.doc.mjs +11 -3
- package/api/upgrade/registry/registry.mjs +6 -1
- package/assets/codemods/parse.mjs +2 -2
- package/assets/docs/tree/single-component.doc.mjs +11 -2
- package/assets/docs/tree/tokens-and-setup.doc.mjs +39 -3
- package/assets/docs.generated.json +2 -2
- package/assets/preview-app/next.config.mjs +7 -1
- package/assets/preview-app/package.json +1 -0
- package/assets/preview-app/src/app/globals.css +1 -0
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/ColumnsVirtualizationHookUsage.tsx +53 -0
- package/assets/templates/blocks/components/Table/InfiniteScrollHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/InfiniteScrollHookUsage.tsx +33 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/dashboard/page.tsx +1 -1
- package/authoring/doctypes/_schema.d.mts +52 -5
- package/authoring/doctypes/_schema.mjs +62 -7
- package/authoring/doctypes/base/type.ts +10 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/function/function.doc.mjs +6 -0
- package/authoring/doctypes/function/type.ts +3 -0
- package/authoring/doctypes/legacy.mjs +5 -1
- package/authoring/index.d.ts +1 -0
- package/authoring/shadcn/source-variants.d.mts +1 -1
- package/authoring/shadcn/source-variants.mjs +32 -10
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/doctor.doc.mjs +2 -2
- package/clients/cli/commands/experimental/theme.mjs +237 -45
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-template.doc.mjs +2 -2
- package/clients/cli/commands/theme-build.doc.mjs +2 -2
- package/clients/cli/commands/theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/theme-template.doc.mjs +3 -1
- package/clients/cli/commands/theme.mjs +190 -46
- package/clients/cli/formatters/index.mjs +7 -4
- package/clients/cli/lib/cli-error.mjs +9 -3
- package/clients/cli/lib/component-format.mjs +27 -9
- package/clients/cli/lib/json-shim.mjs +72 -2
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +49 -0
- package/foundation/agent-docs/agent-docs-target.d.mts +2 -6
- package/foundation/agent-docs/agent-docs-target.mjs +9 -17
- package/foundation/agent-docs/agent-docs.mjs +3 -2
- package/foundation/config/config-writer.mjs +2 -2
- package/foundation/config/project.mjs +60 -14
- package/foundation/discovery/component-discovery.mjs +5 -17
- package/foundation/discovery/icon-set-writer.mjs +1 -1
- package/foundation/discovery/module-exports.mjs +1 -15
- package/foundation/discovery/template-adapter.mjs +44 -19
- package/foundation/discovery/template-source-tree.mjs +3 -16
- package/foundation/discovery/theme-discovery.d.mts +5 -1
- package/foundation/discovery/theme-discovery.mjs +30 -35
- package/foundation/fs/exact-codec.d.mts +35 -0
- package/foundation/fs/exact-codec.mjs +148 -0
- package/foundation/fs/gather-cache.d.mts +15 -5
- package/foundation/fs/gather-cache.mjs +123 -30
- package/foundation/fs/paths.d.mts +39 -0
- package/foundation/fs/paths.mjs +44 -11
- package/foundation/fs/read-record.mjs +11 -1
- package/foundation/integrations/contribution-fixes.mjs +1 -16
- package/foundation/integrations/may-have-integrations.mjs +3 -2
- package/foundation/integrations/public-imports.mjs +1 -1
- package/foundation/render/embedded-imports.mjs +1 -1
- package/foundation/render/host-exit.d.mts +8 -0
- package/foundation/render/host-exit.mjs +11 -0
- package/foundation/render/page-host.mjs +56 -10
- package/foundation/render/page-worker.mjs +14 -0
- package/foundation/render/render-page.mjs +37 -2
- package/foundation/response/error-codes.d.mts +2 -1
- package/foundation/response/error-codes.d.ts +1 -0
- package/foundation/response/error-codes.doc.mjs +5 -0
- package/foundation/response/error-codes.mjs +3 -0
- package/foundation/response/json.d.mts +15 -0
- package/foundation/response/json.mjs +52 -1
- package/foundation/response/response-types.doc.mjs +1 -1
- package/foundation/runtime/lazy-dependencies.d.mts +14 -0
- package/foundation/runtime/lazy-dependencies.mjs +82 -0
- package/foundation/xle/browser.d.mts +2 -2
- package/package.json +7 -6
|
@@ -85,6 +85,8 @@ export function makeCompiler(project, parts) {
|
|
|
85
85
|
}
|
|
86
86
|
/** @param {string} tok */
|
|
87
87
|
const typeOf = tok => TYPE[tok] ?? 'other';
|
|
88
|
+
/** Whether Core defines the token. @param {string} tok */
|
|
89
|
+
const isToken = tok => Object.hasOwn(TYPE, tok);
|
|
88
90
|
|
|
89
91
|
/** @param {string} p */
|
|
90
92
|
const groupOfProp = p =>
|
|
@@ -276,7 +278,23 @@ export function makeCompiler(project, parts) {
|
|
|
276
278
|
void fed;
|
|
277
279
|
return null;
|
|
278
280
|
}
|
|
279
|
-
|
|
281
|
+
// Only a token of the same kind takes the value: a weight never goes to
|
|
282
|
+
// a line height, a line height never to a weight.
|
|
283
|
+
// Font tokens share a type across kinds (a weight and a leading are
|
|
284
|
+
// both numbers), so the kind is read from the name.
|
|
285
|
+
const kindOf = (/** @type {string} */ t) =>
|
|
286
|
+
/family/.test(t)
|
|
287
|
+
? 'family'
|
|
288
|
+
: /weight/.test(t)
|
|
289
|
+
? 'weight'
|
|
290
|
+
: /leading|line-height/.test(t)
|
|
291
|
+
? 'leading'
|
|
292
|
+
: /tracking|letter-spacing/.test(t)
|
|
293
|
+
? 'tracking'
|
|
294
|
+
: typeOf(t);
|
|
295
|
+
const reads = g
|
|
296
|
+
? partReads(target, g).filter(r => kindOf(r.token) === kindOf(token))
|
|
297
|
+
: [];
|
|
280
298
|
const v = quoteCommandArgument(value);
|
|
281
299
|
/** @type {string[]} */
|
|
282
300
|
const run = [];
|
|
@@ -539,6 +557,7 @@ export function makeCompiler(project, parts) {
|
|
|
539
557
|
return {
|
|
540
558
|
MAP,
|
|
541
559
|
typeOf,
|
|
560
|
+
isToken,
|
|
542
561
|
propsReading,
|
|
543
562
|
feeds,
|
|
544
563
|
fmtFeeds,
|
|
@@ -18,6 +18,7 @@ export function context(cwd: string): Promise<{
|
|
|
18
18
|
C: {
|
|
19
19
|
MAP: Record<string, import("./_parts.mjs").PartRecord>;
|
|
20
20
|
typeOf: (tok: string) => string;
|
|
21
|
+
isToken: (tok: string) => boolean;
|
|
21
22
|
propsReading: (tok: string) => string[];
|
|
22
23
|
feeds: (target: string, token: string) => Array<{
|
|
23
24
|
part: string;
|
|
@@ -63,7 +64,28 @@ export function context(cwd: string): Promise<{
|
|
|
63
64
|
parts: import("./_parts.mjs").PartData;
|
|
64
65
|
unchecked: string | null;
|
|
65
66
|
uncheckedCode: string | null;
|
|
67
|
+
derived: Record<string, {
|
|
68
|
+
property: string;
|
|
69
|
+
vars?: string[];
|
|
70
|
+
replaces?: boolean;
|
|
71
|
+
expand?: string;
|
|
72
|
+
}[]>;
|
|
66
73
|
}>;
|
|
74
|
+
/**
|
|
75
|
+
* The app a folder belongs to: the nearest folder at or above it whose
|
|
76
|
+
* package.json lists @astryxdesign/core (dependencies, devDependencies or
|
|
77
|
+
* peerDependencies), never the home folder; null when there is none.
|
|
78
|
+
* @param {string} cwd
|
|
79
|
+
* @returns {string | null}
|
|
80
|
+
*/
|
|
81
|
+
export function coreApp(cwd: string): string | null;
|
|
82
|
+
/**
|
|
83
|
+
* Why the components did not render, with the likely cause: two copies of
|
|
84
|
+
* React (the app's and the one Core resolves) break every hook.
|
|
85
|
+
* @param {import('./_project.mjs').ThemeProject} project
|
|
86
|
+
* @param {string} message
|
|
87
|
+
*/
|
|
88
|
+
export function renderCause(project: import("./_project.mjs").ThemeProject, message: string): string;
|
|
67
89
|
/**
|
|
68
90
|
* Pictures of HTML files, on request.
|
|
69
91
|
* @param {import('./_project.mjs').ThemeProject} project
|
|
@@ -111,6 +133,13 @@ export function previewAfter(ctx: import("./_settings.mjs").Ctx, slug: string, d
|
|
|
111
133
|
cause: string;
|
|
112
134
|
} | null;
|
|
113
135
|
}>;
|
|
136
|
+
/**
|
|
137
|
+
* Record in a freshly made full sheet the build it shows.
|
|
138
|
+
* @param {string} file
|
|
139
|
+
* @param {string} slug
|
|
140
|
+
* @param {string} cwd
|
|
141
|
+
*/
|
|
142
|
+
export function stampSheet(file: string, slug: string, cwd: string): void;
|
|
114
143
|
/**
|
|
115
144
|
* The section of the sheet, in lower case, or undefined; a refusal for one
|
|
116
145
|
* that is not a section.
|