@astryxdesign/cli 0.6.4-canary.f0355e3 → 0.6.4
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 +96 -99
- package/api/build/build.doc.mjs +1 -6
- package/api/build/build.test.mjs +0 -22
- package/api/build/kit/kit.mjs +5 -44
- package/api/component/_adapter.d.mts +0 -25
- package/api/component/_adapter.mjs +5 -59
- package/api/component/component.d.mts +3 -6
- package/api/component/component.doc.mjs +17 -37
- package/api/component/component.mjs +9 -249
- package/api/component/component.type.d.mts +0 -25
- package/api/component/component.type.mjs +0 -44
- package/api/discover/_adapter.d.mts +6 -114
- package/api/discover/_adapter.mjs +17 -372
- package/api/discover/detail/detail.d.mts +6 -18
- package/api/discover/detail/detail.mjs +13 -67
- package/api/discover/detail/detail.test.mjs +0 -85
- package/api/discover/discover.d.mts +9 -3
- package/api/discover/discover.doc.mjs +18 -61
- package/api/discover/discover.mjs +36 -220
- package/api/discover/discover.test.mjs +2 -11
- package/api/discover/discover.type.d.mts +8 -147
- package/api/discover/discover.type.mjs +12 -102
- package/api/discover/list/list.d.mts +6 -20
- package/api/discover/list/list.mjs +12 -45
- package/api/discover/list/list.test.mjs +0 -46
- package/api/discover/search/search.d.mts +16 -18
- package/api/discover/search/search.mjs +56 -102
- package/api/discover/search/search.test.mjs +10 -144
- package/api/docs/_adapter.d.mts +3 -8
- package/api/docs/_adapter.mjs +6 -14
- package/api/docs/docOverlays.test.mjs +1 -27
- package/api/docs/docs.doc.mjs +2 -2
- package/api/docs/docs.test.mjs +243 -0
- package/api/docs/integration-tree.test.mjs +555 -0
- package/api/docs/integrationDocs.test.mjs +314 -0
- package/api/doctor/doctor.d.mts +3 -8
- package/api/doctor/doctor.doc.mjs +8 -17
- package/api/doctor/doctor.mjs +9 -90
- package/api/doctor/doctor.test.mjs +10 -122
- package/api/doctor/doctor.type.d.mts +1 -1
- package/api/doctor/doctor.type.mjs +1 -1
- package/api/gap-report/gap-report.doc.mjs +10 -19
- package/api/hook/hook.doc.mjs +3 -6
- package/api/index.d.mts +2 -1
- package/api/index.mjs +5 -5
- package/api/init/init.doc.mjs +12 -17
- package/api/integration/add-helpers.d.mts +2 -5
- package/api/integration/add-helpers.mjs +9 -36
- package/api/integration/add-theme.mjs +1 -22
- package/api/integration/add-theme.test.mjs +0 -34
- package/api/integration/authoring-checks.mjs +2 -2
- package/api/integration/integrationPackCheck.doc.mjs +3 -3
- package/api/integration/pack-check.mjs +9 -82
- package/api/integration/pack-check.test.mjs +0 -90
- package/api/integration/pack-check.type.mjs +1 -1
- package/api/json/assertResponse.doc.mjs +1 -1
- package/api/json/index.ts +1 -0
- package/api/json/isError.doc.mjs +1 -1
- package/api/layout/_adapter.d.mts +34 -0
- package/api/layout/_adapter.mjs +148 -0
- package/api/layout/check/check.d.mts +16 -0
- package/api/layout/check/check.mjs +40 -0
- package/api/layout/expand/expand.d.mts +22 -0
- package/api/layout/expand/expand.mjs +155 -0
- package/api/layout/expand/expand.path-safety.test.mjs +53 -0
- package/api/layout/grammar/grammar.d.mts +13 -0
- package/api/layout/grammar/grammar.mjs +87 -0
- package/api/layout/layout.d.mts +6 -0
- package/api/layout/layout.mjs +17 -0
- package/api/layout/layout.test.mjs +297 -0
- package/api/layout/layout.type.d.mts +89 -0
- package/api/layout/layout.type.mjs +103 -0
- package/api/layout/layoutCheck.doc.d.mts +11 -0
- package/api/layout/layoutCheck.doc.mjs +85 -0
- package/api/layout/layoutExpand.doc.d.mts +11 -0
- package/api/layout/layoutExpand.doc.mjs +107 -0
- package/api/layout/layoutGrammar.doc.d.mts +11 -0
- package/api/layout/layoutGrammar.doc.mjs +57 -0
- package/api/search/search.d.mts +1 -27
- package/api/search/search.doc.mjs +2 -2
- package/api/search/search.mjs +16 -228
- package/api/search/search.test.mjs +512 -0
- package/api/swizzle/swizzle.doc.mjs +5 -7
- package/api/template/copy/copy.mjs +1 -1
- package/api/template/copy/copy.test.mjs +0 -9
- package/api/template/template-integration.test.mjs +65 -1
- package/api/template/template.doc.mjs +1 -2
- package/api/template/template.mjs +1 -1
- package/api/theme/add/add.mjs +25 -17
- package/api/theme/add/add.staging.test.mjs +23 -40
- package/api/theme/build/build.family.test.mjs +12 -7
- package/api/theme/build/build.mjs +18 -8
- package/api/theme/generateTonalPalette.doc.mjs +2 -1
- package/api/theme/listThemes.doc.mjs +1 -1
- package/api/theme/themeAdd.doc.mjs +10 -9
- package/api/theme/themeBuild.doc.mjs +13 -13
- package/api/theme/themeList.doc.mjs +1 -1
- package/api/theme/themeListAvailable.doc.mjs +1 -2
- package/api/theme/themePaletteGenerate.doc.mjs +8 -15
- package/api/theme/themeTargets.doc.mjs +2 -3
- package/api/theme/themeTemplate.doc.mjs +1 -2
- package/api/upgrade/run/run.mjs +4 -6
- package/api/upgrade/upgrade.doc.mjs +22 -24
- package/api/upgrade/upgrade.type.mjs +2 -2
- package/assets/codemods/__tests__/runner.test.mjs +1 -3
- package/assets/codemods/integration-runner.mjs +3 -3
- package/assets/codemods/runner.mjs +4 -5
- package/assets/docs/README.md +2 -4
- package/assets/docs/browser-support.doc.mjs +11 -11
- package/assets/docs/color.doc.mjs +2 -8
- package/assets/docs/elevation.doc.mjs +4 -6
- package/assets/docs/getting-started.doc.mjs +16 -5
- package/assets/docs/icons.doc.mjs +21 -2
- package/assets/docs/illustrations.doc.mjs +15 -7
- package/assets/docs/internationalization.doc.mjs +5 -7
- package/assets/docs/layout.doc.dense.mjs +82 -130
- package/assets/docs/layout.doc.mjs +77 -133
- package/assets/docs/migration.doc.mjs +21 -19
- package/assets/docs/motion.doc.mjs +3 -16
- package/assets/docs/principles.doc.dense.mjs +5 -5
- package/assets/docs/principles.doc.mjs +0 -8
- package/assets/docs/principles.doc.zh.mjs +6 -6
- package/assets/docs/shape.doc.mjs +3 -8
- package/assets/docs/spacing.doc.mjs +2 -7
- package/assets/docs/styling-libraries.doc.mjs +2 -6
- package/assets/docs/styling.doc.mjs +23 -19
- package/assets/docs/theme.doc.dense.mjs +18 -58
- package/assets/docs/theme.doc.mjs +46 -56
- package/assets/docs/theme.doc.zh.mjs +8 -9
- package/assets/docs/tokens.doc.dense.mjs +2 -2
- package/assets/docs/tokens.doc.mjs +8 -389
- package/assets/docs/tokens.doc.zh.mjs +2 -2
- package/assets/docs/tree/integrations.doc.mjs +451 -25
- package/assets/docs/tree/integrations.test.mjs +62 -0
- package/assets/docs/tree/writing-docs.doc.mjs +286 -0
- package/assets/docs/typography.doc.mjs +4 -24
- package/assets/docs/working-with-ai.doc.mjs +22 -30
- package/assets/templates/blocks/components/InternationalizationProvider/InternationalizationProvider01ShippedLocale.tsx +1 -1
- package/authoring/config/config.doc.mjs +2 -10
- package/authoring/config/parse.d.mts +0 -2
- package/authoring/config/parse.mjs +0 -19
- package/authoring/config/parse.test.mjs +0 -8
- package/authoring/config/type.ts +2 -13
- package/authoring/doctypes/_schema.d.mts +2 -3
- package/authoring/doctypes/_schema.mjs +0 -6
- package/authoring/doctypes/base/graph-fields.doc.mjs +3 -3
- package/authoring/doctypes/base/type.ts +2 -4
- package/authoring/doctypes/command/command.doc.mjs +1 -1
- package/authoring/doctypes/command/type.ts +1 -1
- package/authoring/doctypes/component/component.doc.mjs +0 -6
- package/authoring/doctypes/component/type.ts +0 -8
- package/authoring/doctypes/reference/reference.doc.mjs +0 -7
- package/authoring/doctypes/reference/type.ts +0 -5
- package/authoring/doctypes/schema/schema.doc.mjs +2 -2
- package/authoring/doctypes/template/template.doc.mjs +1 -1
- package/authoring/doctypes/template/type.ts +2 -2
- package/authoring/index.d.mts +0 -1
- package/authoring/index.d.ts +0 -10
- package/authoring/index.mjs +0 -1
- package/authoring/integration/integration.doc.mjs +10 -12
- package/clients/cli/command-result-coverage.test.mjs +7 -7
- package/clients/cli/commands/component/index.mjs +55 -152
- package/clients/cli/commands/component-ownership.test.mjs +0 -89
- package/clients/cli/commands/component.doc.mjs +9 -27
- package/clients/cli/commands/debug-result-summary.test.mjs +2 -2
- package/clients/cli/commands/discover.doc.mjs +9 -53
- package/clients/cli/commands/discover.mjs +118 -393
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/docs.mjs +17 -60
- package/clients/cli/commands/docs.test.mjs +294 -0
- package/clients/cli/commands/doctor-integration-docs.doc.mjs +2 -3
- package/clients/cli/commands/doctor-integration.test.mjs +0 -53
- package/clients/cli/commands/doctor.doc.mjs +1 -3
- package/clients/cli/commands/doctor.mjs +5 -49
- package/clients/cli/commands/gap-report.doc.mjs +9 -10
- package/clients/cli/commands/init.doc.mjs +6 -9
- package/clients/cli/commands/integration-add.doc.mjs +9 -9
- package/clients/cli/commands/integration-authoring.test.mjs +10 -61
- package/clients/cli/commands/integration-pack.doc.mjs +9 -5
- package/clients/cli/commands/integration-real-world.test.mjs +1 -1
- package/clients/cli/commands/integration.doc.mjs +4 -4
- package/clients/cli/commands/integration.mjs +43 -74
- package/clients/cli/commands/layout-check.doc.mjs +65 -0
- package/clients/cli/commands/layout-expand.doc.mjs +83 -0
- package/clients/cli/commands/layout-grammar.doc.mjs +30 -0
- package/clients/cli/commands/layout.doc.mjs +34 -0
- package/clients/cli/commands/layout.error-codes.test.mjs +66 -0
- package/clients/cli/commands/layout.exit-parity.test.mjs +41 -0
- package/clients/cli/commands/layout.mjs +275 -0
- package/clients/cli/commands/layout.path-help.test.mjs +33 -0
- package/clients/cli/commands/layout.stdin-cap.test.mjs +47 -0
- package/clients/cli/commands/layout.text-fields.test.mjs +39 -0
- package/clients/cli/commands/manifest.doc.mjs +1 -1
- package/clients/cli/commands/search.doc.mjs +3 -10
- package/clients/cli/commands/search.mjs +2 -21
- package/clients/cli/commands/search.test.mjs +4 -21
- package/clients/cli/commands/swizzle.doc.mjs +1 -1
- package/clients/cli/commands/template.doc.mjs +1 -1
- package/clients/cli/commands/text-json-parity.test.mjs +16 -5
- package/clients/cli/commands/theme-add.doc.mjs +1 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +2 -3
- package/clients/cli/commands/theme-palette.doc.mjs +2 -1
- package/clients/cli/commands/theme-targets.doc.mjs +2 -2
- package/clients/cli/commands/theme.doc.mjs +1 -2
- package/clients/cli/commands/upgrade.doc.mjs +3 -62
- package/clients/cli/index.mjs +10 -28
- package/clients/cli/lib/define-command.mjs +4 -28
- package/clients/cli/lib/define-command.test.mjs +0 -54
- package/clients/cli/lib/exit-codes.test.mjs +9 -18
- package/clients/cli/lib/json-shim.mjs +14 -24
- package/clients/cli/lib/json-shim.test.mjs +20 -6
- package/clients/cli/lib/manifest.mjs +13 -18
- package/clients/cli/lib/manifest.test.mjs +2 -5
- package/foundation/agent-docs/agent-docs.mjs +1 -1
- package/foundation/agent-docs/agent-docs.test.mjs +1159 -0
- package/foundation/discovery/authoring-self-docs.mjs +0 -1
- package/foundation/discovery/authoring-self-docs.test.mjs +2 -6
- package/foundation/discovery/cli-self-docs.mjs +2 -16
- package/foundation/discovery/cli-self-docs.test.mjs +0 -20
- package/foundation/discovery/docs-discovery.mjs +1 -5
- package/foundation/discovery/docs-discovery.test.mjs +0 -21
- package/foundation/discovery/docs-section-key.d.mts +1 -1
- package/foundation/discovery/docs-section-key.mjs +1 -1
- package/foundation/discovery/template-adapter.mjs +1 -1
- package/foundation/doc-compiler/doc-loads.test.mjs +14 -3
- package/foundation/doc-compiler/tree.d.mts +0 -4
- package/foundation/doc-compiler/tree.mjs +1 -6
- package/foundation/doc-compiler/tree.test.mjs +598 -0
- package/foundation/integrations/cli-requirement.d.mts +6 -26
- package/foundation/integrations/cli-requirement.mjs +11 -46
- package/foundation/integrations/cli-requirement.test.mjs +2 -7
- package/foundation/integrations/contribution-inventory.mjs +1 -1
- package/foundation/integrations/integrations.d.mts +1 -14
- package/foundation/integrations/integrations.mjs +1 -41
- package/foundation/integrations/integrations.test.mjs +0 -31
- package/foundation/response/error-codes.doc.mjs +8 -6
- package/foundation/response/error-codes.test.mjs +5 -30
- package/foundation/response/response-types.doc.d.mts +3 -4
- package/foundation/response/response-types.doc.mjs +27 -40
- package/foundation/response/response-types.doc.test.mjs +0 -23
- package/foundation/response/response.doc.mjs +10 -11
- package/foundation/xle/browser.d.mts +3 -3
- package/foundation/xle/browser.mjs +3 -3
- package/foundation/xle/expand.mjs +2 -2
- package/foundation/xle/parse.mjs +1 -1
- package/foundation/xle/print.mjs +2 -2
- package/foundation/xle/splice.mjs +1 -1
- package/package.json +9 -9
- package/api/discover/_adapter.test.mjs +0 -215
- package/api/discover/_catalog-view.d.mts +0 -115
- package/api/discover/_catalog-view.mjs +0 -203
- package/api/discover/_catalog-view.test.mjs +0 -128
- package/api/discover/detail/item/item.d.mts +0 -26
- package/api/discover/detail/item/item.mjs +0 -78
- package/api/discover/detail/item/item.test.mjs +0 -73
- package/api/integration/pack-check.lifecycle-output.test.mjs +0 -107
- package/api/theme/add/add.rollback.test.mjs +0 -158
- package/api/theme/build/build.rollback.test.mjs +0 -148
- package/api/upgrade/run/files-changed.test.mjs +0 -111
- package/assets/codemods/file-count.test.mjs +0 -163
- package/assets/docs/tree/add-a-component.doc.mjs +0 -75
- package/assets/docs/tree/add-a-theme.doc.mjs +0 -85
- package/assets/docs/tree/add-a-topic.doc.mjs +0 -144
- package/assets/docs/tree/agent-guidance.doc.mjs +0 -138
- package/assets/docs/tree/block-template.doc.mjs +0 -130
- package/assets/docs/tree/build-the-template.doc.mjs +0 -28
- package/assets/docs/tree/building-blocks.doc.mjs +0 -46
- package/assets/docs/tree/check-your-docs.doc.mjs +0 -137
- package/assets/docs/tree/checks.doc.mjs +0 -119
- package/assets/docs/tree/codemods.doc.mjs +0 -147
- package/assets/docs/tree/component-family.doc.mjs +0 -113
- package/assets/docs/tree/component-imports.doc.mjs +0 -69
- package/assets/docs/tree/component-lookups.doc.mjs +0 -149
- package/assets/docs/tree/components.doc.mjs +0 -23
- package/assets/docs/tree/configuration.doc.mjs +0 -23
- package/assets/docs/tree/debug-and-gap-reports.doc.mjs +0 -182
- package/assets/docs/tree/define-the-theme.doc.mjs +0 -118
- package/assets/docs/tree/describe-the-component.doc.mjs +0 -57
- package/assets/docs/tree/docs.doc.mjs +0 -21
- package/assets/docs/tree/document-the-template.doc.mjs +0 -28
- package/assets/docs/tree/document-the-theme.doc.mjs +0 -68
- package/assets/docs/tree/export-template-assets.doc.mjs +0 -147
- package/assets/docs/tree/extend-or-replace.doc.mjs +0 -103
- package/assets/docs/tree/fonts-and-assets.doc.mjs +0 -106
- package/assets/docs/tree/generate-a-palette.doc.mjs +0 -66
- package/assets/docs/tree/grade-template-with-agent.doc.mjs +0 -105
- package/assets/docs/tree/help.doc.mjs +0 -16
- package/assets/docs/tree/links.doc.mjs +0 -98
- package/assets/docs/tree/package-and-test.doc.mjs +0 -32
- package/assets/docs/tree/page-template.doc.mjs +0 -71
- package/assets/docs/tree/publishing.doc.mjs +0 -111
- package/assets/docs/tree/quick-start.doc.mjs +0 -272
- package/assets/docs/tree/replace-a-core-component.doc.mjs +0 -104
- package/assets/docs/tree/replace-a-core-template.doc.mjs +0 -172
- package/assets/docs/tree/sections-and-placement.doc.mjs +0 -108
- package/assets/docs/tree/see-it-in-an-app.doc.mjs +0 -59
- package/assets/docs/tree/ship.doc.mjs +0 -16
- package/assets/docs/tree/short-and-findable.doc.mjs +0 -108
- package/assets/docs/tree/single-component.doc.mjs +0 -165
- package/assets/docs/tree/start-a-template.doc.mjs +0 -143
- package/assets/docs/tree/subcomponent.doc.mjs +0 -115
- package/assets/docs/tree/template-assets.doc.mjs +0 -64
- package/assets/docs/tree/template-doc-overview.doc.mjs +0 -109
- package/assets/docs/tree/template-fonts.doc.mjs +0 -102
- package/assets/docs/tree/template-grading-rubric.doc.mjs +0 -452
- package/assets/docs/tree/template-icons.doc.mjs +0 -97
- package/assets/docs/tree/template-images-media.doc.mjs +0 -127
- package/assets/docs/tree/template-styles.doc.mjs +0 -93
- package/assets/docs/tree/templates.doc.mjs +0 -34
- package/assets/docs/tree/test-in-an-app.doc.mjs +0 -115
- package/assets/docs/tree/test-template-in-app.doc.mjs +0 -128
- package/assets/docs/tree/themes.doc.mjs +0 -39
- package/assets/docs/tree/troubleshooting.doc.mjs +0 -149
- package/assets/docs/tree/upgrading.doc.mjs +0 -103
- package/assets/docs/tree/use-a-theme-in-an-app.doc.mjs +0 -51
- package/assets/docs/tree/verify-packed-template.doc.mjs +0 -77
- package/assets/docs/tree/versioning.doc.mjs +0 -161
- package/assets/docs/tree/write-good-templates.doc.mjs +0 -64
- package/assets/docs/tree/write-the-template-file.doc.mjs +0 -154
- package/authoring/discover/discover.doc.d.mts +0 -13
- package/authoring/discover/discover.doc.mjs +0 -138
- package/authoring/discover/parse.d.mts +0 -24
- package/authoring/discover/parse.mjs +0 -128
- package/authoring/discover/parse.test.mjs +0 -124
- package/authoring/discover/type.ts +0 -87
- package/clients/cli/commands/component-batch.test.mjs +0 -341
- package/clients/cli/commands/discover.sources.test.mjs +0 -267
- package/clients/cli/commands/integration-verify.doc.mjs +0 -22
- package/clients/cli/lib/parse-error-format.test.mjs +0 -81
- package/foundation/response/batch.type.d.mts +0 -33
- package/foundation/response/batch.type.mjs +0 -34
|
@@ -13,16 +13,19 @@ export const doc = {
|
|
|
13
13
|
name: 'upgrade',
|
|
14
14
|
namespace: 'cli/api',
|
|
15
15
|
displayName: 'upgrade()',
|
|
16
|
-
summary:
|
|
17
|
-
'After bumping @astryxdesign/core, migrate project source with codemods and update copied compositions.',
|
|
16
|
+
summary: 'Run version migrations and reconcile copied compositions.',
|
|
18
17
|
description:
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'
|
|
22
|
-
'
|
|
23
|
-
'
|
|
24
|
-
'
|
|
25
|
-
'
|
|
18
|
+
'Migrates project source from a previous Astryx version to the currently ' +
|
|
19
|
+
'installed one by running the registered codemods, and compares the fully ' +
|
|
20
|
+
'rendered managed agent-docs block on every migration path, including ' +
|
|
21
|
+
'same-Core integration guidance changes; list and registry-only modes do not ' +
|
|
22
|
+
'run migration reconciliation. Dry-run previews without writing; `apply` ' +
|
|
23
|
+
'writes the prepared block only after selected codemods and hooks succeed. ' +
|
|
24
|
+
'Core codemods run before ' +
|
|
25
|
+
'the config is loaded so a config codemod can repair an otherwise-invalid ' +
|
|
26
|
+
'astryx.config. Copied compositions carry adjacent receipts with exact canonical and format-specific install bases; upgrade ' +
|
|
27
|
+
'compares those installed bases with the matching registry release, updates pristine ' +
|
|
28
|
+
'files, merges non-overlapping edits, and leaves conflicting originals untouched.',
|
|
26
29
|
importPath: '@astryxdesign/cli/api',
|
|
27
30
|
signature:
|
|
28
31
|
'upgrade(options?: UpgradeOptions, ctx?: {cwd?: string}): Promise<UpgradeListResponse | UpgradeRegistryResponse | UpgradeStatusResponse | UpgradeRunResponse>',
|
|
@@ -39,7 +42,7 @@ export const doc = {
|
|
|
39
42
|
name: 'options.from',
|
|
40
43
|
type: 'string',
|
|
41
44
|
description:
|
|
42
|
-
'Version before the dependency bump
|
|
45
|
+
'Version before the dependency bump. Required unless `list` or `registry` is set.',
|
|
43
46
|
},
|
|
44
47
|
{
|
|
45
48
|
name: 'options.apply',
|
|
@@ -52,13 +55,11 @@ export const doc = {
|
|
|
52
55
|
type: 'boolean',
|
|
53
56
|
description:
|
|
54
57
|
'Run codemods even when `from` is at/after the installed version.',
|
|
55
|
-
default: 'false',
|
|
56
58
|
},
|
|
57
59
|
{
|
|
58
60
|
name: 'options.codemod',
|
|
59
61
|
type: 'string',
|
|
60
|
-
description:
|
|
61
|
-
'Run only this codemod. Optional codemods run only when named here. Setting it also skips copied-composition reconciliation.',
|
|
62
|
+
description: 'Run a single named transform instead of the full set.',
|
|
62
63
|
},
|
|
63
64
|
{
|
|
64
65
|
name: 'options.skipCodemod',
|
|
@@ -82,26 +83,23 @@ export const doc = {
|
|
|
82
83
|
type: 'boolean',
|
|
83
84
|
description:
|
|
84
85
|
'Install jscodeshift when it is missing; otherwise a missing jscodeshift throws ERR_DEP_MISSING.',
|
|
85
|
-
default: 'false',
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
name: 'options.registry',
|
|
89
89
|
type: 'boolean',
|
|
90
90
|
description:
|
|
91
|
-
'
|
|
91
|
+
'Reconcile copied compositions from their install receipts without requiring `from`.',
|
|
92
92
|
default: 'false',
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
name: 'options.list',
|
|
96
96
|
type: 'boolean',
|
|
97
97
|
description: 'Return the available codemods instead of running any.',
|
|
98
|
-
default: 'false',
|
|
99
98
|
},
|
|
100
99
|
{
|
|
101
100
|
name: 'ctx.cwd',
|
|
102
101
|
type: 'string',
|
|
103
102
|
description: 'Directory to run the upgrade in.',
|
|
104
|
-
default: 'process.cwd()',
|
|
105
103
|
},
|
|
106
104
|
],
|
|
107
105
|
returns: [
|
|
@@ -118,36 +116,36 @@ export const doc = {
|
|
|
118
116
|
{
|
|
119
117
|
type: 'upgrade.status',
|
|
120
118
|
description:
|
|
121
|
-
'A short-circuit outcome (no codemods executed): `up_to_date` (`from` is at/after the installed target and no `force`), `no_codemods` (none apply to the range), or `config_fixable` (dry-run preview that a pending config codemod would repair an invalid astryx.config).
|
|
119
|
+
'A short-circuit outcome (no codemods executed): `up_to_date` (`from` is at/after the installed target and no `force`), `no_codemods` (none apply to the range), or `config_fixable` (dry-run preview that a pending config codemod would repair an invalid astryx.config). Each carries the agent-docs summary and, when found, the copied-composition registry summary.',
|
|
122
120
|
},
|
|
123
121
|
{
|
|
124
122
|
type: 'upgrade.run',
|
|
125
123
|
description:
|
|
126
|
-
'The terminal run receipt: from
|
|
124
|
+
'The terminal run receipt: from/to versions, codemod count, integrations processed, agent-docs and registry summaries, modifiedFiles, protectedFiles, declinedCandidates, and completion state. A protected required change returns complete: false with ERR_CODEMOD_PROTECTED; the CLI exits nonzero while preserving the structured receipt.',
|
|
127
125
|
},
|
|
128
126
|
],
|
|
129
127
|
throws: [
|
|
130
128
|
{
|
|
131
129
|
code: 'ERR_INVALID_ARGUMENT',
|
|
132
|
-
when: '`from` is missing (and neither `list` nor `registry` is set)
|
|
130
|
+
when: '`from` is missing (and neither `list` nor `registry` is set), or the project config fails strict validation and no pending config codemod can repair it',
|
|
133
131
|
},
|
|
134
132
|
{code: 'ERR_INVALID_VERSION', when: '`from` is not a valid semver string'},
|
|
135
133
|
{code: 'ERR_PATH_TRAVERSAL', when: '`path` resolves outside cwd'},
|
|
136
134
|
{
|
|
137
135
|
code: 'ERR_VERSION_DETECT',
|
|
138
|
-
when: '
|
|
136
|
+
when: 'the installed @astryxdesign/core version cannot be detected',
|
|
139
137
|
},
|
|
140
138
|
{
|
|
141
139
|
code: 'ERR_DEP_MISSING',
|
|
142
|
-
when: 'jscodeshift is
|
|
140
|
+
when: 'jscodeshift is required but could not be installed',
|
|
143
141
|
},
|
|
144
142
|
{
|
|
145
143
|
code: 'ERR_UNKNOWN_CODEMOD',
|
|
146
|
-
when: '
|
|
144
|
+
when: 'a `codemod` name matches no registered codemod',
|
|
147
145
|
},
|
|
148
146
|
{
|
|
149
147
|
code: 'ERR_CODEMOD_FAILED',
|
|
150
|
-
when: 'one or more codemods failed, or a post-codemod hook failed
|
|
148
|
+
when: 'one or more codemods failed, or a post-codemod hook failed',
|
|
151
149
|
},
|
|
152
150
|
{
|
|
153
151
|
code: 'ERR_CODEMOD_PROTECTION_SOURCE',
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
* @property {RegistryCompositionSummary} [data.registryCompositions]
|
|
120
120
|
* @property {boolean} [data.complete] False when protected required changes remain.
|
|
121
121
|
* @property {'ERR_CODEMOD_PROTECTED'} [data.errorCode] Stable incomplete-result code when complete is false.
|
|
122
|
-
* @property {number} [data.filesChanged]
|
|
122
|
+
* @property {number} [data.filesChanged] Total files changed across core + integration codemods (apply mode).
|
|
123
123
|
* @property {string[]} [data.modifiedFiles] Project-relative files changed or previewed.
|
|
124
124
|
* @property {ProtectedCodemodFile[]} [data.protectedFiles] Protected files that still require a codemod change after regeneration.
|
|
125
125
|
* @property {Array<{file: string, location?: string, reason: string}>} [data.declinedCandidates] Candidates left unchanged because proof was insufficient.
|
|
126
|
-
* @property {number} [data.transformsApplied] Total
|
|
126
|
+
* @property {number} [data.transformsApplied] Total transforms that reported a change.
|
|
127
127
|
* @property {Array<{file: string, codemod: string, error: string}>} [data.errors] Per-codemod errors, when any codemod failed.
|
|
128
128
|
*/
|
|
129
129
|
|
|
@@ -46,9 +46,7 @@ describe('runCodemods — ordered dry-run state', () => {
|
|
|
46
46
|
silent: true,
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
expect(preview.totalFilesChanged).toBe(1);
|
|
51
|
-
expect(preview.totalTransformsApplied).toBe(2);
|
|
49
|
+
expect(preview.totalFilesChanged).toBe(2);
|
|
52
50
|
expect(preview.changedFiles).toEqual([
|
|
53
51
|
path.join(srcDir, 'a.ts'),
|
|
54
52
|
path.join(srcDir, 'a.ts'),
|
|
@@ -67,6 +67,7 @@ export function runIntegrationCodemods(
|
|
|
67
67
|
/** In-memory pipeline state keeps ordered dry-runs equivalent to apply. */
|
|
68
68
|
const virtualContents = new Map(providedContents ?? []);
|
|
69
69
|
|
|
70
|
+
let totalFilesChanged = 0;
|
|
70
71
|
let totalTransformsApplied = 0;
|
|
71
72
|
/** @type {string[]} */
|
|
72
73
|
const changedFiles = [];
|
|
@@ -114,6 +115,7 @@ export function runIntegrationCodemods(
|
|
|
114
115
|
protection,
|
|
115
116
|
contents: virtualContents,
|
|
116
117
|
});
|
|
118
|
+
totalFilesChanged += r.filesChanged;
|
|
117
119
|
totalTransformsApplied += r.filesChanged;
|
|
118
120
|
changedFiles.push(...r.changedFiles);
|
|
119
121
|
writtenFiles.push(...r.writtenFiles);
|
|
@@ -143,6 +145,7 @@ export function runIntegrationCodemods(
|
|
|
143
145
|
protection,
|
|
144
146
|
contents: virtualContents,
|
|
145
147
|
});
|
|
148
|
+
totalFilesChanged += r.filesChanged;
|
|
146
149
|
totalTransformsApplied += r.filesChanged;
|
|
147
150
|
changedFiles.push(...r.changedFiles);
|
|
148
151
|
writtenFiles.push(...r.writtenFiles);
|
|
@@ -151,9 +154,6 @@ export function runIntegrationCodemods(
|
|
|
151
154
|
}
|
|
152
155
|
}
|
|
153
156
|
|
|
154
|
-
// A file several codemods changed is one file; transforms count each change.
|
|
155
|
-
const totalFilesChanged = new Set(changedFiles).size;
|
|
156
|
-
|
|
157
157
|
return {
|
|
158
158
|
totalFilesChanged,
|
|
159
159
|
totalTransformsApplied,
|
|
@@ -486,6 +486,7 @@ export async function runCodemods(
|
|
|
486
486
|
(await import('jscodeshift')).default
|
|
487
487
|
);
|
|
488
488
|
|
|
489
|
+
let totalFilesChanged = 0;
|
|
489
490
|
let totalTransformsApplied = 0;
|
|
490
491
|
let totalValidationBlocked = 0;
|
|
491
492
|
/** @type {Array<{file: string, codemod: string, error: string}>} */
|
|
@@ -553,6 +554,7 @@ export async function runCodemods(
|
|
|
553
554
|
protectionWriteCount = writtenFiles.length;
|
|
554
555
|
}
|
|
555
556
|
if (result.filesChanged > 0) {
|
|
557
|
+
totalFilesChanged += result.filesChanged;
|
|
556
558
|
totalTransformsApplied += 1;
|
|
557
559
|
}
|
|
558
560
|
continue;
|
|
@@ -575,6 +577,7 @@ export async function runCodemods(
|
|
|
575
577
|
changedFiles.push(...result.changedFiles);
|
|
576
578
|
writtenFiles.push(...result.writtenFiles);
|
|
577
579
|
if (result.filesChanged > 0) {
|
|
580
|
+
totalFilesChanged += result.filesChanged;
|
|
578
581
|
totalTransformsApplied += result.filesChanged;
|
|
579
582
|
}
|
|
580
583
|
continue;
|
|
@@ -589,6 +592,7 @@ export async function runCodemods(
|
|
|
589
592
|
protectedFiles.push(...result.protectedFiles);
|
|
590
593
|
changedFiles.push(...result.changedFiles);
|
|
591
594
|
writtenFiles.push(...result.writtenFiles);
|
|
595
|
+
totalFilesChanged += result.filesChanged;
|
|
592
596
|
totalTransformsApplied += result.filesChanged;
|
|
593
597
|
totalValidationBlocked += result.errors.filter(
|
|
594
598
|
error =>
|
|
@@ -626,11 +630,6 @@ export async function runCodemods(
|
|
|
626
630
|
);
|
|
627
631
|
}
|
|
628
632
|
|
|
629
|
-
// A file several codemods changed is one file. `totalTransformsApplied` is
|
|
630
|
-
// unchanged: a code or config codemod counts each file it changed, and a
|
|
631
|
-
// project codemod counts once. The two answer different questions.
|
|
632
|
-
const totalFilesChanged = new Set(changedFiles).size;
|
|
633
|
-
|
|
634
633
|
if (protectedFiles.length > 0) {
|
|
635
634
|
const files = [...new Set(protectedFiles.map(item => item.file))];
|
|
636
635
|
log.warn(
|
package/assets/docs/README.md
CHANGED
|
@@ -21,15 +21,13 @@ Someone building a product with Astryx. Their questions:
|
|
|
21
21
|
## Tells that you are writing for us instead
|
|
22
22
|
|
|
23
23
|
- second person aimed at the wrong reader — "reviewers should…", "before promoting a component…", "attach evidence for…"
|
|
24
|
-
-
|
|
24
|
+
- **rubric, readiness, gate, audit, checklist, sign-off, promotion, evidence** as things the reader must produce
|
|
25
25
|
- a table of things to verify rather than things to use
|
|
26
26
|
- anything about lab → core, which is our lifecycle, not theirs
|
|
27
27
|
- Storybook, Playwright, CI or the Simulator named as tools the reader runs
|
|
28
28
|
|
|
29
29
|
One subtlety: a statement about the **system's behavior** is caller-facing even when it sounds like process. "A component's theme targets are stable once published" tells a caller what they can rely on; "reviewers must check that theme targets are stable" is ours. Same fact, different reader — **rewrite it rather than move it**.
|
|
30
30
|
|
|
31
|
-
A public authoring-quality rubric is also caller-facing when it helps someone evaluate an artifact they create through Astryx. It must be complete and actionable from public inputs. It must not include Astryx's internal approval, promotion, evidence-publication, or CI process. A current system spec must assign the shipped guide as the rubric's owner.
|
|
32
|
-
|
|
33
31
|
## Where the rest goes
|
|
34
32
|
|
|
35
33
|
The material is usually good; the finding is placement, not quality. It goes in the [wiki](https://github.com/facebook/astryx/wiki) — **as a section on the page that already covers it, not a new page.** The wiki is at nearly 60 pages, several of them overlapping, because every stray section got its own.
|
|
@@ -57,5 +55,5 @@ Worked example: a responsive-and-interaction readiness rubric is grading criteri
|
|
|
57
55
|
one section by its key. A section's key is its `id`, or a key derived from its
|
|
58
56
|
title when it has none. Give a section an `id` when its title may change, since
|
|
59
57
|
readers and extensions link to the key. Two sections in one topic cannot share
|
|
60
|
-
a key. Keep each section small enough to read on its own: `astryx doctor`
|
|
58
|
+
a key. Keep each section small enough to read on its own: `astryx doctor` fails
|
|
61
59
|
any section over 32 KB.
|
|
@@ -73,7 +73,7 @@ export const docs = {
|
|
|
73
73
|
'Baseline 2026: the tightest requirement.',
|
|
74
74
|
],
|
|
75
75
|
[
|
|
76
|
-
'`Popover` API',
|
|
76
|
+
'[`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API',
|
|
77
77
|
'Opens, stacks, and light-dismisses layered surfaces via the top layer.',
|
|
78
78
|
'Baseline 2025.',
|
|
79
79
|
],
|
|
@@ -86,7 +86,7 @@ export const docs = {
|
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
type: 'prose',
|
|
89
|
-
text: 'The gap that matters is between Tier 1 and Tier 2: the `Popover` API and `light-dark()` reached wide availability well before anchor positioning. So in Tier 2 browsers, layered surfaces open and dismiss correctly; they just are not positioned. This is the one feature most consumers will need to reason about.',
|
|
89
|
+
text: 'The gap that matters is between Tier 1 and Tier 2: the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API and `light-dark()` reached wide availability well before anchor positioning. So in Tier 2 browsers, layered surfaces open and dismiss correctly; they just are not positioned. This is the one feature most consumers will need to reason about.',
|
|
90
90
|
},
|
|
91
91
|
],
|
|
92
92
|
},
|
|
@@ -95,24 +95,24 @@ export const docs = {
|
|
|
95
95
|
content: [
|
|
96
96
|
{
|
|
97
97
|
type: 'prose',
|
|
98
|
-
text: '
|
|
98
|
+
text: 'The browser requirement is concentrated in the layered-surface components: anything that renders content in an overlay positioned against a trigger:',
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
type: 'list',
|
|
102
102
|
style: 'unordered',
|
|
103
103
|
items: [
|
|
104
|
-
'Tooltip
|
|
105
|
-
'
|
|
106
|
-
'
|
|
107
|
-
'
|
|
104
|
+
'Tooltip',
|
|
105
|
+
'HoverCard',
|
|
106
|
+
'Popover',
|
|
107
|
+
'ContextMenu',
|
|
108
|
+
'Selector and MultiSelector (dropdown surfaces)',
|
|
108
109
|
'Tokenizer (suggestion menu)',
|
|
109
|
-
'The overflow and flyout menus in Breadcrumbs, TabList, TopNav, and SideNav',
|
|
110
110
|
'Carousel (anchored controls)',
|
|
111
111
|
],
|
|
112
112
|
},
|
|
113
113
|
{
|
|
114
114
|
type: 'prose',
|
|
115
|
-
text: 'If your product
|
|
115
|
+
text: 'If your product does not use any of these, it has no anchor-positioning requirement at all; it needs only `light-dark()` (Tier 2 and up) for correct theme colors. Page layout, typography, forms, buttons, cards, tables, and navigation all work down to Tier 2 with no special handling.',
|
|
116
116
|
},
|
|
117
117
|
],
|
|
118
118
|
},
|
|
@@ -123,7 +123,7 @@ export const docs = {
|
|
|
123
123
|
type: 'list',
|
|
124
124
|
style: 'do',
|
|
125
125
|
items: [
|
|
126
|
-
'Components never throw on missing platform APIs. Where a browser lacks the `Popover` API, layers fall back to plain visibility instead of crashing.',
|
|
126
|
+
'Components never throw on missing platform APIs. Where a browser lacks the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API, layers fall back to plain visibility instead of crashing.',
|
|
127
127
|
'Tier 1 and Tier 2 are officially supported and tested.',
|
|
128
128
|
'Non-layered components render correctly down to Tier 2.',
|
|
129
129
|
],
|
|
@@ -192,7 +192,7 @@ const hasLightDark = CSS.supports('color', 'light-dark(#000, #fff)');`,
|
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
type: 'prose',
|
|
195
|
-
text: 'This is not an arbitrary window: Baseline − 2 is close to where anchor positioning stops being available while the `Popover` API and `light-dark()` still are, so the tier boundary tracks a real capability edge, not a guessed date. The version floors above are reviewed and advanced roughly once a year as new Baseline years land. Always feature-detect rather than hardcoding version numbers, so your app adapts automatically as the platform moves.',
|
|
195
|
+
text: 'This is not an arbitrary window: Baseline − 2 is close to where anchor positioning stops being available while the [`Popover`](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) API and `light-dark()` still are, so the tier boundary tracks a real capability edge, not a guessed date. The version floors above are reviewed and advanced roughly once a year as new Baseline years land. Always feature-detect rather than hardcoding version numbers, so your app adapts automatically as the platform moves.',
|
|
196
196
|
},
|
|
197
197
|
],
|
|
198
198
|
},
|
|
@@ -22,8 +22,7 @@ export const docs = {
|
|
|
22
22
|
],
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
|
|
26
|
-
title: 'Color Tokens',
|
|
25
|
+
title: 'Surface Colors',
|
|
27
26
|
category: 'foundations',
|
|
28
27
|
content: [
|
|
29
28
|
{
|
|
@@ -38,14 +37,9 @@ export const docs = {
|
|
|
38
37
|
],
|
|
39
38
|
},
|
|
40
39
|
{
|
|
41
|
-
|
|
42
|
-
title: 'Use color tokens in StyleX',
|
|
40
|
+
title: 'Usage',
|
|
43
41
|
category: 'foundations',
|
|
44
42
|
content: [
|
|
45
|
-
{
|
|
46
|
-
type: 'prose',
|
|
47
|
-
text: 'Import the typed color tokens and use them in `stylex.create()`; they resolve to the active theme and color mode.',
|
|
48
|
-
},
|
|
49
43
|
{
|
|
50
44
|
type: 'code',
|
|
51
45
|
lang: 'tsx',
|
|
@@ -82,7 +82,7 @@ export const docs = {
|
|
|
82
82
|
content: [
|
|
83
83
|
{
|
|
84
84
|
type: 'prose',
|
|
85
|
-
text: 'Configurable surfaces expose a single `elevation` prop instead of asking consumers to hand-write a box-shadow. It takes the graded enum `none | low | med | high`, narrowed per component to the steps that surface needs: Card, ClickableCard, SelectableCard, Button, IconButton, ButtonGroup,
|
|
85
|
+
text: 'Configurable surfaces expose a single `elevation` prop instead of asking consumers to hand-write a box-shadow. It takes the graded enum `none | low | med | high`, narrowed per component to the steps that surface needs: Card, ClickableCard, SelectableCard, Button, IconButton, ButtonGroup, and Banner expose the full scale, while ChatComposer exposes only `none | low`. `none` is a flat literal (`box-shadow: none`); the other levels map to the `--shadow-*` tokens above, so a surface stays theme-agnostic.',
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
type: 'prose',
|
|
@@ -92,13 +92,11 @@ export const docs = {
|
|
|
92
92
|
type: 'code',
|
|
93
93
|
lang: 'tsx',
|
|
94
94
|
label: 'Raising a surface with the elevation prop',
|
|
95
|
-
code:
|
|
96
|
-
|
|
97
|
-
// Flat by default; raise only when the surface needs to float.
|
|
95
|
+
code: `// Flat by default; raise only when the surface needs to float.
|
|
98
96
|
<Card elevation="low">Raised card</Card>
|
|
99
97
|
|
|
100
98
|
// A floating action button.
|
|
101
|
-
<IconButton icon={<Icon icon=
|
|
99
|
+
<IconButton icon={<Icon icon="add" />} label="New" variant="primary" elevation="med" />
|
|
102
100
|
|
|
103
101
|
// Flatten the composer (defaults to 'low').
|
|
104
102
|
<ChatComposer elevation="none" onSubmit={handleSubmit} />`,
|
|
@@ -121,7 +119,7 @@ export const docs = {
|
|
|
121
119
|
type: 'code',
|
|
122
120
|
lang: 'tsx',
|
|
123
121
|
label: 'Applying elevation',
|
|
124
|
-
code: `import {shadowVars} from '@astryxdesign/core
|
|
122
|
+
code: `import {shadowVars} from '@astryxdesign/core';
|
|
125
123
|
|
|
126
124
|
const styles = stylex.create({
|
|
127
125
|
dropdown: {
|
|
@@ -8,7 +8,6 @@ export const docs = {
|
|
|
8
8
|
category: 'guide',
|
|
9
9
|
description:
|
|
10
10
|
'Add the design system to your project and start building.',
|
|
11
|
-
keywords: ['quick start', 'setup', 'install'],
|
|
12
11
|
|
|
13
12
|
sections: [
|
|
14
13
|
{
|
|
@@ -82,11 +81,24 @@ export const docs = {
|
|
|
82
81
|
},
|
|
83
82
|
{
|
|
84
83
|
type: 'prose',
|
|
85
|
-
text: '
|
|
84
|
+
text: 'Available themes:',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'list',
|
|
88
|
+
style: 'unordered',
|
|
89
|
+
items: [
|
|
90
|
+
'`@astryxdesign/theme-neutral`: muted and minimal; a good starting point',
|
|
91
|
+
'`@astryxdesign/theme-butter`: warm, golden tones with blue accents',
|
|
92
|
+
'`@astryxdesign/theme-chocolate`: rich chocolate and caramel tones',
|
|
93
|
+
'`@astryxdesign/theme-gothic`: dark-only theme with ink and noir influences',
|
|
94
|
+
'`@astryxdesign/theme-matcha`: earthy greens and botanical tones',
|
|
95
|
+
'`@astryxdesign/theme-stone`: warm neutrals inspired by sandstone',
|
|
96
|
+
'`@astryxdesign/theme-y2k`: playful early-2000s pop aesthetic',
|
|
97
|
+
],
|
|
86
98
|
},
|
|
87
99
|
{
|
|
88
100
|
type: 'prose',
|
|
89
|
-
text: 'These stylesheets are cascade-layered: the reset loads in @layer reset and component styles in @layer astryx-base. If your project has existing global CSS, a legacy reset, or Tailwind, declare the layer order explicitly and assign every stylesheet to a layer deliberately: unlayered styles and later layers both override astryx-base regardless of specificity.
|
|
101
|
+
text: 'These stylesheets are cascade-layered: the reset loads in @layer reset and component styles in @layer astryx-base. If your project has existing global CSS, a legacy reset, or Tailwind, declare the layer order explicitly and assign every stylesheet to a layer deliberately: unlayered styles and later layers both override astryx-base regardless of specificity. See the Cascade Layer Safety section in {@link generic:migration} before building screens.',
|
|
90
102
|
},
|
|
91
103
|
{
|
|
92
104
|
type: 'prose',
|
|
@@ -123,7 +135,7 @@ export default function Page() {
|
|
|
123
135
|
content: [
|
|
124
136
|
{
|
|
125
137
|
type: 'prose',
|
|
126
|
-
text: 'Astryx components support various styling solutions, from plain CSS and `className` to Tailwind and CSS-in-JS. See
|
|
138
|
+
text: 'Astryx components support various styling solutions, from plain CSS and `className` to Tailwind and CSS-in-JS. See the [styling docs](/docs/styling) for the full guide. Astryx also has a deep integration with [StyleX](https://stylexjs.com/), an atomic CSS-in-JS library: create styles with `stylex.create()` and pass them to components with the `xstyle` prop.',
|
|
127
139
|
},
|
|
128
140
|
{
|
|
129
141
|
type: 'code',
|
|
@@ -155,7 +167,6 @@ const overrides = stylex.create({
|
|
|
155
167
|
['Next.js + Tailwind', 'Next.js + Tailwind bridge', '[apps/example-nextjs-tailwind](https://github.com/facebook/astryx/tree/main/apps/example-nextjs-tailwind)'],
|
|
156
168
|
['Next.js Source', 'Next.js importing from source', '[apps/example-nextjs-source](https://github.com/facebook/astryx/tree/main/apps/example-nextjs-source)'],
|
|
157
169
|
['Vite', 'Vite', '[apps/example-vite](https://github.com/facebook/astryx/tree/main/apps/example-vite)'],
|
|
158
|
-
['Vite + Tailwind', 'Vite + Tailwind bridge', '[apps/example-vite-tailwind](https://github.com/facebook/astryx/tree/main/apps/example-vite-tailwind)'],
|
|
159
170
|
],
|
|
160
171
|
},
|
|
161
172
|
{
|
|
@@ -73,7 +73,7 @@ export const docs = {
|
|
|
73
73
|
import { HeartIcon } from 'lucide-react';
|
|
74
74
|
|
|
75
75
|
<Icon icon={PhotoIcon} size="lg" />
|
|
76
|
-
<Icon icon={HeartIcon} color="
|
|
76
|
+
<Icon icon={HeartIcon} color="negative" />`,
|
|
77
77
|
},
|
|
78
78
|
],
|
|
79
79
|
},
|
|
@@ -128,7 +128,26 @@ export const brandTheme = defineTheme({
|
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
type: 'prose',
|
|
131
|
-
text: '
|
|
131
|
+
text: 'Ship the fallback in `defaultIcons` under the same key so the glyph still renders with no theme, or pass one to `getExtendedIcon(key, fallback)` when the icon lives outside core.',
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
title: 'Adding New Icons',
|
|
137
|
+
category: 'foundations',
|
|
138
|
+
content: [
|
|
139
|
+
{
|
|
140
|
+
type: 'prose',
|
|
141
|
+
text: 'To add a new semantic icon name to the design system, only for a glyph the whole system shares; a component-owned one takes a namespaced key instead:',
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
type: 'list',
|
|
145
|
+
style: 'ordered',
|
|
146
|
+
items: [
|
|
147
|
+
'Add the name to IconName type in `packages/core/src/Icon/globalIconRegistry.tsx`',
|
|
148
|
+
'Add the default SVG to `packages/core/src/Icon/defaultIcons.tsx`',
|
|
149
|
+
'Add a row to the Available Names table in `packages/cli/assets/docs/icons.doc.mjs`',
|
|
150
|
+
],
|
|
132
151
|
},
|
|
133
152
|
],
|
|
134
153
|
},
|
|
@@ -7,7 +7,6 @@ export const docs = {
|
|
|
7
7
|
category: 'foundations',
|
|
8
8
|
description:
|
|
9
9
|
'Illustration guidelines for empty states, onboarding flows, and feature highlights.',
|
|
10
|
-
keywords: ['empty state'],
|
|
11
10
|
|
|
12
11
|
sections: [
|
|
13
12
|
{
|
|
@@ -60,17 +59,26 @@ export const docs = {
|
|
|
60
59
|
content: [
|
|
61
60
|
{
|
|
62
61
|
type: 'prose',
|
|
63
|
-
text: '
|
|
62
|
+
text: 'Place illustrations inside Center with supporting text stacked below. Typical illustration sizes range from 120px for inline empty states to 240px for full-page onboarding screens. Always pair the illustration with a heading and optional body text to explain what the user should do next.',
|
|
64
63
|
},
|
|
65
64
|
{
|
|
66
65
|
type: 'code',
|
|
67
66
|
lang: 'tsx',
|
|
68
67
|
label: 'Empty state with illustration',
|
|
69
|
-
code: `<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
code: `<Center>
|
|
69
|
+
<Stack direction="vertical" gap={3} hAlign="center">
|
|
70
|
+
<img
|
|
71
|
+
src="/illustrations/empty-search.svg"
|
|
72
|
+
alt="No results"
|
|
73
|
+
style={{ width: 200, height: 200 }}
|
|
74
|
+
/>
|
|
75
|
+
<Heading level={3}>No results found</Heading>
|
|
76
|
+
<Text type="body" color="secondary">
|
|
77
|
+
Try adjusting your search or filters to find what you\u2019re
|
|
78
|
+
looking for.
|
|
79
|
+
</Text>
|
|
80
|
+
</Stack>
|
|
81
|
+
</Center>`,
|
|
74
82
|
},
|
|
75
83
|
],
|
|
76
84
|
},
|
|
@@ -41,17 +41,15 @@ function App() {
|
|
|
41
41
|
lang: 'tsx',
|
|
42
42
|
label: 'Load an astryx locale catalog',
|
|
43
43
|
code: `import {InternationalizationProvider} from '@astryxdesign/core/i18n';
|
|
44
|
-
import
|
|
44
|
+
import fr from '@astryxdesign/core/locales/fr.json';
|
|
45
45
|
|
|
46
|
-
<InternationalizationProvider
|
|
47
|
-
locale="fr-FR"
|
|
48
|
-
messages={{'fr-FR': frFR}}>
|
|
46
|
+
<InternationalizationProvider locale="fr" messages={{fr}}>
|
|
49
47
|
<App />
|
|
50
48
|
</InternationalizationProvider>;`,
|
|
51
49
|
},
|
|
52
50
|
{
|
|
53
51
|
type: 'prose',
|
|
54
|
-
text: 'Astryx ships English
|
|
52
|
+
text: 'Astryx ships English today, with first-party translations for other locales on the roadmap. Until a locale is available from `@astryxdesign/core/locales/*`, apps can pass a local catalog with the same shape. See `@astryxdesign/core/locales/en.json` for the current key inventory. Missing keys fall back through the locale chain to English (for example, `pt-BR` walks to `pt`, then to shipped `en`).',
|
|
55
53
|
},
|
|
56
54
|
{
|
|
57
55
|
type: 'prose',
|
|
@@ -292,7 +290,7 @@ export default function App() {
|
|
|
292
290
|
},
|
|
293
291
|
{
|
|
294
292
|
type: 'prose',
|
|
295
|
-
text: '`Catalog` types
|
|
293
|
+
text: '`Catalog` types a single locale file; `MessagesByLocale` types the map passed to `messages`. A catalog entry uses the same `{defaultMessage, description?}` shape as `@astryxdesign/core/locales/en.json`.',
|
|
296
294
|
},
|
|
297
295
|
],
|
|
298
296
|
},
|
|
@@ -309,7 +307,7 @@ export default function App() {
|
|
|
309
307
|
lang: 'tsx',
|
|
310
308
|
label: 'Turn on pseudo-localization',
|
|
311
309
|
code: `import {InternationalizationProvider} from '@astryxdesign/core/i18n';
|
|
312
|
-
import pseudo from '@astryxdesign/core/locales/pseudo.
|
|
310
|
+
import pseudo from '@astryxdesign/core/locales/pseudo.json';
|
|
313
311
|
|
|
314
312
|
<InternationalizationProvider locale="pseudo" messages={{pseudo}}>
|
|
315
313
|
<App />
|