@astryxdesign/cli 0.7.15 → 0.7.16-canary.g3aa244b
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 +35 -0
- package/api/doctor/_adapter.mjs +69 -0
- package/api/doctor/built-checks.mjs +1 -1
- package/api/doctor/doctor.d.mts +18 -0
- package/api/doctor/doctor.doc.mjs +1 -1
- package/api/doctor/doctor.mjs +104 -4
- package/api/doctor/theme-checks.mjs +6 -10
- 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 +264 -40
- package/api/theme-edit/_check.d.mts +93 -4
- package/api/theme-edit/_check.mjs +1727 -223
- 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 +31 -1
- package/api/theme-edit/_context.mjs +445 -41
- package/api/theme-edit/_css.d.mts +60 -1
- package/api/theme-edit/_css.mjs +404 -28
- package/api/theme-edit/_edit.d.mts +25 -0
- package/api/theme-edit/_edit.mjs +1532 -149
- 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 +38 -0
- package/api/theme-edit/_palette.mjs +305 -71
- 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 +36 -1
- package/api/theme-edit/_preview-app.mjs +1415 -96
- package/api/theme-edit/_preview.d.mts +64 -3
- package/api/theme-edit/_preview.mjs +514 -31
- package/api/theme-edit/_project.d.mts +11 -0
- package/api/theme-edit/_project.mjs +46 -12
- package/api/theme-edit/_settings.d.mts +278 -5
- package/api/theme-edit/_settings.mjs +2741 -195
- 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 +20 -2
- package/api/theme-edit/theme-edit.type.mjs +6 -2
- package/api/theme-edit/themeEditNew.doc.mjs +1 -1
- package/api/theme-edit/themeEditPreviewApp.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 +239 -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-preview-app.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 +61 -43
- 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 +129 -31
- 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
|
@@ -14,6 +14,17 @@ export function showcaseItems(project: import("./_project.mjs").ThemeProject, gr
|
|
|
14
14
|
imports: Record<string, string>;
|
|
15
15
|
skipped: string[];
|
|
16
16
|
};
|
|
17
|
+
/**
|
|
18
|
+
* The fonts stylesheet of the theme a theme is built on, when its package
|
|
19
|
+
* ships one (`@astryxdesign/theme-neutral/fonts.css` loads Figtree): naming
|
|
20
|
+
* a family does not load it, and the base theme's families apply until the
|
|
21
|
+
* theme sets its own. Once the theme's build names none of the families the
|
|
22
|
+
* sheet loads, it is left out.
|
|
23
|
+
* @param {import('./_settings.mjs').Ctx} ctx
|
|
24
|
+
* @param {import('./_settings.mjs').ThemeData} data
|
|
25
|
+
* @returns {string[]}
|
|
26
|
+
*/
|
|
27
|
+
export function baseFontsCss(ctx: import("./_settings.mjs").Ctx, data: import("./_settings.mjs").ThemeData): string[];
|
|
17
28
|
/**
|
|
18
29
|
* How a generated page imports the theme: its built module, its stylesheet,
|
|
19
30
|
* and the stylesheets of open fonts the project has installed.
|
|
@@ -61,7 +72,7 @@ export function renderSheet(ctx: import("./_settings.mjs").Ctx, slug: string, da
|
|
|
61
72
|
* @param {{theme?: string | null, C?: import('./_compiler.mjs').Compiler}} [options]
|
|
62
73
|
* @returns {{source: string, components: number}}
|
|
63
74
|
*/
|
|
64
|
-
export function componentsPageSource(project: import("./_project.mjs").ThemeProject,
|
|
75
|
+
export function componentsPageSource(project: import("./_project.mjs").ThemeProject, options?: {
|
|
65
76
|
theme?: string | null;
|
|
66
77
|
C?: import("./_compiler.mjs").Compiler;
|
|
67
78
|
}): {
|
|
@@ -75,11 +86,13 @@ export function componentsPageSource(project: import("./_project.mjs").ThemeProj
|
|
|
75
86
|
* boundary, so one part that throws never blanks the page. The preview
|
|
76
87
|
* route is the app shell, so the page has no shell of its own.
|
|
77
88
|
* @param {import('./_project.mjs').ThemeProject} project
|
|
78
|
-
* @param {{theme?: string | null}} [options]
|
|
89
|
+
* @param {{theme?: string | null, colors?: boolean}} [options] `colors`:
|
|
90
|
+
* the preview has a Colors page, so the header points to it
|
|
79
91
|
* @returns {string}
|
|
80
92
|
*/
|
|
81
|
-
export function overviewPageSource(project: import("./_project.mjs").ThemeProject,
|
|
93
|
+
export function overviewPageSource(project: import("./_project.mjs").ThemeProject, options?: {
|
|
82
94
|
theme?: string | null;
|
|
95
|
+
colors?: boolean;
|
|
83
96
|
}): string;
|
|
84
97
|
/**
|
|
85
98
|
* The source of the preview's Colors page: each generated color's shades in
|
|
@@ -141,5 +154,53 @@ export function screenshot(project: import("./_project.mjs").ThemeProject, html:
|
|
|
141
154
|
ok: false;
|
|
142
155
|
reason: string;
|
|
143
156
|
}>;
|
|
157
|
+
/**
|
|
158
|
+
* The app's copy of an editor theme: a standard local theme in
|
|
159
|
+
* src/themes/<theme>/ (a descriptor, a source that re-exports the built
|
|
160
|
+
* module, the built module, its stylesheet and font stylesheet), the shape
|
|
161
|
+
* `astryx theme add <theme>` reads, so the theme goes into the app with the
|
|
162
|
+
* stable theme commands. It is written again after every build of the
|
|
163
|
+
* theme, never edited by hand. A folder there that is not the editor's own
|
|
164
|
+
* copy is left alone: returns null then, else the folder.
|
|
165
|
+
* The built module and stylesheet are written whole: a local theme's source
|
|
166
|
+
* may import only files inside its own folder.
|
|
167
|
+
* @param {import('./_settings.mjs').Ctx} ctx
|
|
168
|
+
* @param {string} slug
|
|
169
|
+
* @param {import('./_settings.mjs').ThemeData} data
|
|
170
|
+
* @returns {string | null}
|
|
171
|
+
*/
|
|
172
|
+
export function writeAppCopy(ctx: import("./_settings.mjs").Ctx, slug: string, data: import("./_settings.mjs").ThemeData): string | null;
|
|
173
|
+
/**
|
|
174
|
+
* {@link writeAppCopy} with the font stylesheets given, or null to keep the
|
|
175
|
+
* copy's own (a compile, which changes no setting).
|
|
176
|
+
* @param {string} cwd
|
|
177
|
+
* @param {string} slug
|
|
178
|
+
* @param {string[] | null} fontsCss
|
|
179
|
+
* @returns {string | null}
|
|
180
|
+
*/
|
|
181
|
+
export function writeAppCopyAt(cwd: string, slug: string, fontsCss: string[] | null): string | null;
|
|
182
|
+
/**
|
|
183
|
+
* Why the editor will not write a theme's app copy, or null when it will:
|
|
184
|
+
* the folder is not there yet, or its descriptor carries the editor's mark
|
|
185
|
+
* and it holds only the copy's own files (system files such as .DS_Store
|
|
186
|
+
* aside). Otherwise the name of what is in the way (a file of yours), or
|
|
187
|
+
* the folder itself when it is not the editor's copy. Built bytes are not
|
|
188
|
+
* compared, so a stable rebuild of the copy leaves it the editor's. The one
|
|
189
|
+
* test the copy's writer and `wiring` both use.
|
|
190
|
+
* @param {string} cwd
|
|
191
|
+
* @param {string} slug
|
|
192
|
+
* @returns {string | null}
|
|
193
|
+
*/
|
|
194
|
+
export function appCopyBlocker(cwd: string, slug: string): string | null;
|
|
195
|
+
/**
|
|
196
|
+
* The files of a theme's app copy when this command wrote it for the first
|
|
197
|
+
* time (then forgotten, so one result names them), else null.
|
|
198
|
+
* @param {string} cwd
|
|
199
|
+
* @param {string} slug
|
|
200
|
+
* @returns {string[] | null}
|
|
201
|
+
*/
|
|
202
|
+
export function takeFirstAppCopy(cwd: string, slug: string): string[] | null;
|
|
144
203
|
/** The groups of the theme-building page, in order. */
|
|
145
204
|
export const SHOWCASE_GROUPS: string[];
|
|
205
|
+
/** The first line of every file the editor writes into a theme's app copy. */
|
|
206
|
+
export const APP_COPY_MARK: "Written by `astryx experimental theme editor`";
|