@astryxdesign/cli 0.7.18-canary.gee79b85 → 0.7.18-canary.gf9e98fe
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/CHANGELOG.md +19 -19
- package/README.md +19 -19
- package/api/component/_adapter.d.mts +2 -1
- package/api/component/_adapter.mjs +2 -1
- package/api/docs/_adapter.d.mts +6 -5
- package/api/docs/_adapter.mjs +36 -5
- package/api/doctor/_adapter.d.mts +6 -3
- package/api/doctor/_adapter.mjs +13 -5
- package/api/doctor/doctor.mjs +5 -5
- package/api/doctor/font-packages.d.mts +36 -0
- package/api/doctor/font-packages.mjs +124 -0
- package/api/doctor/theme-checks.mjs +110 -49
- package/api/experimental.d.mts +0 -2
- package/api/experimental.mjs +0 -12
- package/api/icon/_adapter.d.mts +2 -2
- package/api/icon/_adapter.mjs +6 -2
- package/api/icon/_authoring.mjs +22 -13
- package/api/icon/_default-look.mjs +15 -15
- package/api/icon/add/add.mjs +14 -9
- package/api/icon/icon.doc.mjs +7 -7
- package/api/icon/icon.type.d.mts +33 -33
- package/api/icon/icon.type.mjs +45 -45
- package/api/icon/iconAdd.doc.mjs +9 -10
- package/api/icon/iconMap.doc.mjs +11 -12
- package/api/icon/iconNewDefinition.doc.mjs +8 -8
- package/api/icon/iconNewSet.doc.mjs +5 -5
- package/api/icon/map/map.mjs +7 -7
- package/api/icon/use/use.mjs +4 -4
- package/api/init/run/run.mjs +0 -1
- package/api/integration/add-helpers.mjs +1 -1
- package/api/integration/validate-integration.type.d.mts +6 -6
- package/api/integration/validate-integration.type.mjs +6 -6
- package/api/render/_adapter.d.mts +5 -3
- package/api/render/_adapter.mjs +64 -4
- package/api/render/render.doc.mjs +9 -2
- package/api/render/render.mjs +5 -2
- package/api/render/render.type.d.mts +17 -0
- package/api/render/render.type.mjs +10 -0
- package/api/search/ORDERING.md +1 -1
- package/api/search/_candidate-score.mjs +20 -0
- package/api/search/_words.d.mts +8 -0
- package/api/search/_words.mjs +15 -0
- package/api/template/template.type.d.mts +2 -2
- package/api/template/template.type.mjs +2 -2
- package/api/theme/_adapter.mjs +19 -11
- package/api/theme/build/build.d.mts +19 -51
- package/api/theme/build/build.mjs +195 -189
- package/api/theme/build/font-warning.d.mts +19 -2
- package/api/theme/build/font-warning.mjs +46 -5
- package/api/theme/generateTonalPalette.doc.mjs +1 -1
- package/api/theme/palette/generate/derive-look.mjs +108 -37
- package/api/theme/palette/generate/mapping.mjs +2 -0
- package/api/theme/template/template.d.mts +0 -17
- package/api/theme/template/template.mjs +1 -42
- package/api/theme/theme.type.d.mts +5 -4
- package/api/theme/theme.type.mjs +5 -4
- package/api/theme/themePaletteGenerate.doc.mjs +1 -1
- package/api/theme/themeRemove.doc.mjs +1 -1
- package/assets/codemods/transforms/v0.7.0/preserve-bottom-sheet-content-padding.mjs +3 -1
- package/assets/component-list.generated.json +1 -1
- package/assets/discover/official-packages.json +26 -2
- package/assets/docs/author-a-theme.doc.mjs +6 -5
- package/assets/docs/browser-support.doc.mjs +1 -0
- package/assets/docs/icons.doc.mjs +8 -7
- package/assets/docs/motion.doc.mjs +46 -0
- package/assets/docs/theme.doc.dense.mjs +6 -17
- package/assets/docs/theme.doc.mjs +6 -16
- package/assets/docs/theme.doc.zh.mjs +6 -16
- package/assets/docs/tree/ci-and-containers.doc.mjs +1 -1
- package/assets/docs/tree/font-setup.doc.mjs +30 -0
- package/assets/docs/tree/icon-sets.doc.mjs +2 -2
- package/assets/docs/tree/share-a-page.doc.mjs +1 -1
- package/assets/docs/tree/template-icons.doc.mjs +3 -3
- package/assets/docs/tree/tokens-color.doc.mjs +5 -0
- package/assets/docs/tree/tokens.doc.mjs +4 -3
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/icons/definitions/drag.doc.mjs +1 -0
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardElevated.doc.mjs +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +20 -10
- package/assets/templates/blocks/components/Card/SelectableCardShowcase.doc.mjs +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardShowcase.tsx +36 -16
- package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMentionTrigger.tsx +6 -0
- package/assets/templates/blocks/components/ChatComposerInput/ChatComposerInputMultipleTriggers.tsx +6 -0
- package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/Hooks/useIndicatorFocusRingHookUsage.tsx +63 -0
- package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.doc.mjs +29 -0
- package/assets/templates/blocks/components/Hooks/useLongPressHookUsage.tsx +237 -0
- package/assets/templates/blocks/components/SideNav/SideNavShowcase.tsx +10 -72
- package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.doc.mjs +1 -1
- package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +7 -7
- package/assets/templates/blocks/components/Table/TableCustomRowTable.doc.mjs +14 -0
- package/assets/templates/blocks/components/Table/TableCustomRowTable.tsx +96 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat-landing/page.tsx +4 -0
- package/assets/templates/pages/dashboard-scorecard/page.tsx +26 -7
- package/assets/templates/pages/editor/page.tsx +13 -3
- package/assets/templates/pages/library/page.tsx +1 -1
- package/assets/templates/themes/butter/butterPaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/butter/butterTheme.ts +12 -10
- package/assets/templates/themes/butter/icons.tsx +2 -0
- package/assets/templates/themes/chocolate/chocolateTheme.ts +1 -0
- package/assets/templates/themes/chocolate/icons.tsx +2 -0
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/gothic/gothicTheme.ts +1 -0
- package/assets/templates/themes/gothic/icons.tsx +2 -0
- package/assets/templates/themes/matcha/icons.tsx +2 -0
- package/assets/templates/themes/matcha/matchaPaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/matcha/matchaTheme.ts +1 -0
- package/assets/templates/themes/neutral/icons.tsx +2 -0
- package/assets/templates/themes/neutral/neutralPaletteRefs.generated.ts +2 -2
- package/assets/templates/themes/neutral/neutralTheme.ts +1 -0
- package/assets/templates/themes/stone/icons.tsx +2 -0
- package/assets/templates/themes/stone/stonePaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/stone/stoneTheme.ts +1 -0
- package/assets/templates/themes/y2k/icons.tsx +2 -0
- package/assets/templates/themes/y2k/y2kTheme.ts +1 -0
- package/assets/theme.template.ts +9 -5
- package/authoring/config/parse.mjs +1 -1
- package/authoring/doctypes/base/type.ts +2 -3
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/icon-set/icon-names.mjs +1 -0
- package/authoring/integration/integration.doc.mjs +1 -1
- package/authoring/integration/type.ts +1 -1
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/doctor.mjs +2 -2
- package/clients/cli/commands/experimental/export.mjs +2 -1
- package/clients/cli/commands/experimental/icon.mjs +17 -17
- package/clients/cli/commands/experimental/index.mjs +0 -5
- package/clients/cli/commands/experimental/render-output.mjs +9 -0
- package/clients/cli/commands/experimental-export.doc.mjs +6 -0
- package/clients/cli/commands/experimental-icon-add.doc.mjs +8 -8
- package/clients/cli/commands/experimental-icon-map.doc.mjs +6 -6
- package/clients/cli/commands/experimental-icon-new-definition.doc.mjs +6 -6
- package/clients/cli/commands/experimental-icon-new-set.doc.mjs +3 -3
- package/clients/cli/commands/experimental-icon-use.doc.mjs +1 -1
- package/clients/cli/commands/experimental-icon.doc.mjs +6 -6
- package/clients/cli/commands/experimental.doc.mjs +2 -6
- package/clients/cli/commands/template.mjs +1 -1
- package/clients/cli/commands/theme-build.doc.mjs +8 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +1 -1
- package/clients/cli/commands/theme-remove.doc.mjs +1 -1
- package/clients/cli/commands/theme.doc.mjs +1 -11
- package/clients/cli/commands/theme.mjs +110 -475
- package/clients/cli/commands.generated.json +1 -1
- package/clients/cli/index.mjs +4 -34
- package/clients/cli/lib/base-gate.mjs +2 -3
- package/clients/cli/lib/cli-error.mjs +8 -72
- package/clients/cli/lib/define-command.mjs +0 -19
- package/clients/cli/lib/json-shim.mjs +11 -633
- package/clients/cli/lib/manifest.mjs +0 -4
- package/clients/cli/lib/stray-option.mjs +1 -2
- package/clients/cli/manifest.generated.json +1 -1
- package/foundation/agent-docs/agent-docs.mjs +1 -1
- package/foundation/color/css-color.mjs +2 -3
- package/foundation/discovery/app-layout.d.mts +13 -0
- package/foundation/discovery/app-layout.mjs +35 -0
- package/foundation/discovery/cli-self-docs.mjs +4 -4
- package/foundation/discovery/fixture-refs.d.mts +51 -0
- package/foundation/discovery/fixture-refs.mjs +351 -0
- package/foundation/discovery/icon-definition-discovery.mjs +7 -7
- package/foundation/discovery/icon-ranking.mjs +2 -2
- package/foundation/discovery/icon-set-checks.mjs +6 -6
- package/foundation/discovery/icon-set-discovery.mjs +2 -2
- package/foundation/discovery/icon-set-writer.d.mts +24 -7
- package/foundation/discovery/icon-set-writer.mjs +75 -31
- package/foundation/discovery/static-descriptor.d.mts +49 -0
- package/foundation/discovery/static-descriptor.mjs +548 -0
- package/foundation/discovery/template-adapter.d.mts +0 -47
- package/foundation/discovery/template-adapter.mjs +1 -333
- package/foundation/discovery/theme-discovery.d.mts +6 -47
- package/foundation/discovery/theme-discovery.mjs +15 -537
- package/foundation/doc-compiler/bundle.mjs +2 -2
- package/foundation/doc-compiler/import.mjs +1 -1
- package/foundation/env/user-dirs.d.mts +5 -2
- package/foundation/env/user-dirs.mjs +12 -5
- package/foundation/fonts/next-font.d.mts +26 -0
- package/foundation/fonts/next-font.mjs +149 -0
- package/foundation/fs/empty-folder.mjs +2 -2
- package/foundation/fs/read-record.mjs +11 -4
- package/foundation/pictures/pictures.d.mts +152 -0
- package/foundation/pictures/pictures.mjs +565 -0
- package/foundation/release/folder-lock.mjs +3 -2
- package/foundation/render/cut-short.d.mts +2 -2
- package/foundation/render/cut-short.mjs +2 -2
- package/foundation/render/drawn-contrast.d.mts +2 -2
- package/foundation/render/drawn-contrast.mjs +2 -2
- package/foundation/render/font-probe.d.mts +2 -2
- package/foundation/render/font-probe.mjs +2 -2
- package/foundation/render/layers.mjs +1 -2
- package/foundation/render/package-resolve-hooks.d.mts +25 -5
- package/foundation/render/package-resolve-hooks.mjs +77 -14
- package/foundation/render/page-worker.mjs +24 -12
- package/foundation/render/part-boxes.d.mts +2 -3
- package/foundation/render/part-boxes.mjs +2 -3
- package/foundation/render/picture-chrome.mjs +18 -15
- package/foundation/render/picture-playwright.mjs +10 -7
- package/foundation/render/picture-window.d.mts +13 -0
- package/foundation/render/picture-window.mjs +31 -0
- package/foundation/render/render-page.d.mts +1 -1
- package/foundation/render/render-page.mjs +4 -5
- package/foundation/render/single-copy-hooks.d.mts +2 -0
- package/foundation/render/single-copy-hooks.mjs +2 -0
- package/foundation/response/error-codes.doc.mjs +14 -14
- package/foundation/response/error-codes.mjs +13 -13
- package/foundation/response/response-types.doc.mjs +8 -69
- package/foundation/runtime/css-tree.mjs +2 -2
- package/foundation/runtime/word-table.d.mts +1 -1
- package/foundation/runtime/word-table.mjs +1 -1
- package/foundation/suggest/other-command.d.mts +52 -15
- package/foundation/suggest/other-command.mjs +168 -45
- package/foundation/text/suggest-order.d.mts +7 -0
- package/foundation/text/suggest-order.mjs +1 -1
- package/package.json +7 -8
- package/api/theme-edit/_adapter.d.mts +0 -228
- package/api/theme-edit/_adapter.mjs +0 -2025
- package/api/theme-edit/_catalog.d.mts +0 -172
- package/api/theme-edit/_catalog.mjs +0 -806
- package/api/theme-edit/_check.d.mts +0 -391
- package/api/theme-edit/_check.mjs +0 -9370
- package/api/theme-edit/_color.d.mts +0 -135
- package/api/theme-edit/_color.mjs +0 -480
- package/api/theme-edit/_compiler.d.mts +0 -77
- package/api/theme-edit/_compiler.mjs +0 -1053
- package/api/theme-edit/_context.d.mts +0 -399
- package/api/theme-edit/_context.mjs +0 -1778
- package/api/theme-edit/_css.d.mts +0 -169
- package/api/theme-edit/_css.mjs +0 -1167
- package/api/theme-edit/_edit.d.mts +0 -167
- package/api/theme-edit/_edit.mjs +0 -11220
- package/api/theme-edit/_how-commands.d.mts +0 -315
- package/api/theme-edit/_how-commands.mjs +0 -1664
- package/api/theme-edit/_how-question.d.mts +0 -341
- package/api/theme-edit/_how-question.mjs +0 -33291
- package/api/theme-edit/_how-sides.d.mts +0 -22
- package/api/theme-edit/_how-sides.mjs +0 -173
- package/api/theme-edit/_how-steps.d.mts +0 -42
- package/api/theme-edit/_how-steps.mjs +0 -208
- package/api/theme-edit/_how-values.d.mts +0 -29
- package/api/theme-edit/_how-values.mjs +0 -111
- package/api/theme-edit/_how-words.d.mts +0 -15
- package/api/theme-edit/_how-words.mjs +0 -239
- package/api/theme-edit/_how.d.mts +0 -55
- package/api/theme-edit/_how.mjs +0 -2388
- package/api/theme-edit/_importers.d.mts +0 -38
- package/api/theme-edit/_importers.mjs +0 -188
- package/api/theme-edit/_marks.d.mts +0 -39
- package/api/theme-edit/_marks.mjs +0 -67
- package/api/theme-edit/_missed.d.mts +0 -56
- package/api/theme-edit/_missed.mjs +0 -1128
- package/api/theme-edit/_name-rule.d.mts +0 -11
- package/api/theme-edit/_name-rule.mjs +0 -12
- package/api/theme-edit/_normal.d.mts +0 -365
- package/api/theme-edit/_normal.mjs +0 -1978
- package/api/theme-edit/_overview.d.mts +0 -9
- package/api/theme-edit/_overview.mjs +0 -293
- package/api/theme-edit/_palette.d.mts +0 -616
- package/api/theme-edit/_palette.mjs +0 -2776
- package/api/theme-edit/_part-pieces.d.mts +0 -54
- package/api/theme-edit/_part-pieces.mjs +0 -179
- package/api/theme-edit/_part-words.d.mts +0 -39
- package/api/theme-edit/_part-words.mjs +0 -242
- package/api/theme-edit/_parts.d.mts +0 -402
- package/api/theme-edit/_parts.mjs +0 -2322
- package/api/theme-edit/_picture-traits.d.mts +0 -259
- package/api/theme-edit/_picture-traits.mjs +0 -1030
- package/api/theme-edit/_png.d.mts +0 -94
- package/api/theme-edit/_png.mjs +0 -479
- package/api/theme-edit/_preview-app.d.mts +0 -172
- package/api/theme-edit/_preview-app.mjs +0 -6430
- package/api/theme-edit/_preview.d.mts +0 -549
- package/api/theme-edit/_preview.mjs +0 -3264
- package/api/theme-edit/_project.d.mts +0 -207
- package/api/theme-edit/_project.mjs +0 -643
- package/api/theme-edit/_resolved.d.mts +0 -46
- package/api/theme-edit/_resolved.mjs +0 -800
- package/api/theme-edit/_set-line.d.mts +0 -29
- package/api/theme-edit/_set-line.mjs +0 -100
- package/api/theme-edit/_settings.d.mts +0 -2426
- package/api/theme-edit/_settings.mjs +0 -18435
- package/api/theme-edit/_tables.d.mts +0 -227
- package/api/theme-edit/_tables.mjs +0 -1128
- package/api/theme-edit/_text-looks.d.mts +0 -78
- package/api/theme-edit/_text-looks.mjs +0 -376
- package/api/theme-edit/_vet.d.mts +0 -50
- package/api/theme-edit/_vet.mjs +0 -166
- package/api/theme-edit/how/how.d.mts +0 -17
- package/api/theme-edit/how/how.mjs +0 -28
- package/api/theme-edit/new/new.d.mts +0 -11
- package/api/theme-edit/new/new.mjs +0 -22
- package/api/theme-edit/preview-add/preview-add.d.mts +0 -14
- package/api/theme-edit/preview-add/preview-add.mjs +0 -25
- package/api/theme-edit/preview-app/preview-app.d.mts +0 -13
- package/api/theme-edit/preview-app/preview-app.mjs +0 -24
- package/api/theme-edit/preview-list/preview-list.d.mts +0 -10
- package/api/theme-edit/preview-list/preview-list.mjs +0 -21
- package/api/theme-edit/preview-remove/preview-remove.d.mts +0 -12
- package/api/theme-edit/preview-remove/preview-remove.mjs +0 -23
- package/api/theme-edit/set/set.d.mts +0 -13
- package/api/theme-edit/set/set.mjs +0 -24
- package/api/theme-edit/show/show.d.mts +0 -13
- package/api/theme-edit/show/show.mjs +0 -24
- package/api/theme-edit/theme-edit.d.mts +0 -12
- package/api/theme-edit/theme-edit.mjs +0 -36
- package/api/theme-edit/theme-edit.type.d.mts +0 -730
- package/api/theme-edit/theme-edit.type.mjs +0 -342
- package/api/theme-edit/themeEditHow.doc.d.mts +0 -6
- package/api/theme-edit/themeEditHow.doc.mjs +0 -105
- package/api/theme-edit/themeEditNew.doc.d.mts +0 -5
- package/api/theme-edit/themeEditNew.doc.mjs +0 -112
- package/api/theme-edit/themeEditPreviewAdd.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewAdd.doc.mjs +0 -121
- package/api/theme-edit/themeEditPreviewApp.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewApp.doc.mjs +0 -87
- package/api/theme-edit/themeEditPreviewList.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewList.doc.mjs +0 -62
- package/api/theme-edit/themeEditPreviewRemove.doc.d.mts +0 -6
- package/api/theme-edit/themeEditPreviewRemove.doc.mjs +0 -96
- package/api/theme-edit/themeEditSet.doc.d.mts +0 -6
- package/api/theme-edit/themeEditSet.doc.mjs +0 -175
- package/api/theme-edit/themeEditShow.doc.d.mts +0 -6
- package/api/theme-edit/themeEditShow.doc.mjs +0 -118
- package/api/theme-edit/themeEditUndo.doc.d.mts +0 -6
- package/api/theme-edit/themeEditUndo.doc.mjs +0 -133
- package/api/theme-edit/undo/undo.d.mts +0 -13
- package/api/theme-edit/undo/undo.mjs +0 -24
- package/assets/preview-app/README.md +0 -6
- package/assets/preview-app/css.d.ts +0 -5
- package/assets/preview-app/gitignore +0 -4
- package/assets/preview-app/next.config.mjs +0 -12
- package/assets/preview-app/package.json +0 -24
- package/assets/preview-app/src/app/globals.css +0 -6
- package/assets/preview-app/src/app/layout.tsx +0 -21
- package/assets/preview-app/src/app/page.tsx +0 -94
- package/assets/preview-app/src/app/providers.tsx +0 -16
- package/assets/preview-app/tsconfig.json +0 -27
- package/clients/cli/commands/experimental/theme.mjs +0 -2990
- package/clients/cli/commands/experimental-theme-add.doc.mjs +0 -80
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +0 -98
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +0 -196
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +0 -174
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +0 -139
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +0 -77
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +0 -105
- package/clients/cli/commands/experimental-theme-editor.doc.mjs +0 -49
- package/clients/cli/commands/experimental-theme-eject.doc.mjs +0 -72
- package/clients/cli/commands/experimental-theme-list.doc.mjs +0 -49
- package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +0 -88
- package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +0 -61
- package/clients/cli/commands/experimental-theme-preview-list.doc.mjs +0 -48
- package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +0 -59
- package/clients/cli/commands/experimental-theme-preview.doc.mjs +0 -41
- package/clients/cli/commands/experimental-theme-remove.doc.mjs +0 -57
- package/clients/cli/commands/experimental-theme-targets.doc.mjs +0 -62
- package/clients/cli/commands/experimental-theme-template.doc.mjs +0 -63
- package/clients/cli/commands/experimental-theme-use.doc.mjs +0 -57
- package/clients/cli/commands/experimental-theme.doc.mjs +0 -60
- package/foundation/fonts/fontsource-families.generated.d.mts +0 -5
- package/foundation/fonts/fontsource-families.generated.mjs +0 -2110
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @astryxdesign/cli
|
|
2
2
|
|
|
3
3
|
# 0.7.17
|
|
4
4
|
|
|
@@ -4278,7 +4278,7 @@ Thanks to everyone who contributed to this release:
|
|
|
4278
4278
|
- The CLI README now shows `apiVersion` in every hand-written envelope shape and example, and lists `astryx search --verbose` in place of `--detail`, which needs a level and does not add a result's score or reason. (#6587)
|
|
4279
4279
|
- The response-type docs, and the CLI README table generated from them, now name the fields of the `component.detail`, `docs.index`, `search`, `build.kit`, `gap-report.file`, `theme.build`, `theme.targets`, and `integration.pack-check` responses by their JSON keys, including `parentDoc`, `hint`, `notices`, `deprecatedFor`, each gap-report delivery's fields, and the pack-check contribution identities and issue fields. The `component.detail` response type declares `parentDoc`. (#6588)
|
|
4280
4280
|
- `astryx template --help` and the manifest now say which flags win when they are combined: `--cdn` overrides everything else and writes to its value, else to `<path>`, else `cdn.template.html`; `--list` ignores a name, a path, `--skeleton` and `--overwrite`; and `--skeleton` needs a name and writes nothing. (#6591)
|
|
4281
|
-
- `astryx upgrade --help` and the manifest now state how its flags combine: `--list` ignores every other flag, `--registry` refuses `--list` and the migration flags, and `--codemod` is the only way to run an optional codemod and also skips the ShadCN composition check. The `--from` help names the legacy
|
|
4281
|
+
- `astryx upgrade --help` and the manifest now state how its flags combine: `--list` ignores every other flag, `--registry` refuses `--list` and the migration flags, and `--codemod` is the only way to run an optional codemod and also skips the ShadCN composition check. The `--from` help names the legacy core-package fallback, and the documented exit codes now include a missing core, a missing jscodeshift, an invalid `astryx.config`, a post-codemod hook failure and the refused flag combinations. (#6590)
|
|
4282
4282
|
- `astryx docs authoring` now says where loading a doc is looser than its published type (stamped component and function docs, older generic docs, and templates), and which doc kinds accept fields they do not know. Nothing about how docs load has changed. (#6492)
|
|
4283
4283
|
|
|
4284
4284
|
#### Other Changes
|
|
@@ -5120,7 +5120,7 @@ Thanks to everyone who contributed to this release:
|
|
|
5120
5120
|
#### Fixes
|
|
5121
5121
|
|
|
5122
5122
|
- theme build: generated custom Button variants now type-check through the public `@astryxdesign/core/Button` subpath.
|
|
5123
|
-
- Remove the
|
|
5123
|
+
- Remove the earlier scope's `theme-default` → `@astryxdesign/theme-neutral` collapse from the v0.1.0 upgrade codemods (module-specifiers, css-surfaces, and declare-module). `theme-default` was dropped at the v0.1.0 scope move, so no v0.1.x consumer imported it — the collapse was dead and could rewrite unrelated source (including the earlier scope's `theme-default/theme.css` CSS imports) to a `@astryxdesign/theme-neutral` package the app never declared. The earlier scope's `theme-daily` → `theme-neutral` collapse (and its `defaultTheme` → `neutralTheme` export remap) is unchanged.
|
|
5124
5124
|
- cli — confine user-controlled file paths, close DoS vectors, and repair paths broken by the authoring reorg (#4637)
|
|
5125
5125
|
- cli hardening pass — validate inputs at the API layer, close path-safety gaps, and prevent agent-docs content loss. The API is a public surface (`@astryxdesign/cli/api`), so guards that lived only in the CLI wrapper are pushed into the API.
|
|
5126
5126
|
Path safety (the guard the write commands all depend on):
|
|
@@ -5296,7 +5296,7 @@ Thanks to everyone who contributed to this release:
|
|
|
5296
5296
|
|
|
5297
5297
|
- Stop suggesting bare `npx astryx` before the CLI is installed — it resolves to an unrelated package on the npm registry.
|
|
5298
5298
|
The CLI now emits an install-aware invocation everywhere it prints a command:
|
|
5299
|
-
- Extend the v0.1.0 upgrade codemods to cover test files that mock
|
|
5299
|
+
- Extend the v0.1.0 upgrade codemods to cover test files that mock the earlier scope's `core` modules, which were previously left half-migrated and broke after upgrade:
|
|
5300
5300
|
- `astryx upgrade` now keeps the managed agent-docs block (`<!-- ASTRYX:START --> … <!-- ASTRYX:END -->`) in sync with the installed version on **every** path — including the up-to-date and no-codemods short-circuits that previously returned before any refresh, leaving AI agents reading a stale component index and superseded rules. The block documents the installed library, so it's now refreshed up front (independent of codemods) and reported in the `--json` receipt as `agentDocs`. One detection pass covers three cases: a stale block is rewritten (`--apply`) or reported as a pending change (dry-run, which no longer writes); a project with core installed but no managed block is nudged to run `astryx init --features agents`; an already-current block stays silent. (#4168, #4169)
|
|
5301
5301
|
|
|
5302
5302
|
#### Documentation
|
|
@@ -5307,8 +5307,8 @@ Thanks to everyone who contributed to this release:
|
|
|
5307
5307
|
|
|
5308
5308
|
- Installed / global / dev runs suggest `<pm> astryx <cmd>` (e.g. `pnpm exec astryx …`), unchanged.
|
|
5309
5309
|
- One-off runs (launched via `npx`/`pnpm dlx`/`yarn dlx`/`bunx`) suggest the scoped package `<dlx> @astryxdesign/cli <cmd>`, which always resolves to us.
|
|
5310
|
-
- **migrate-xds-module-specifiers**: rewrite the mocked-module path in `vi.mock`/`vi.doMock`/`jest.mock`/`jest.doMock` (and bare `mock`) calls, plus `import(...)` specifiers used in TS type positions (`typeof import('
|
|
5311
|
-
- **drop-xds-prefix-imports**: un-prefix partial-mock override keys inside
|
|
5310
|
+
- **migrate-xds-module-specifiers**: rewrite the mocked-module path in `vi.mock`/`vi.doMock`/`jest.mock`/`jest.doMock` (and bare `mock`) calls, plus `import(...)` specifiers used in TS type positions (`typeof import(…)` of the earlier scope's `core/Text`), so the mock still intercepts the renamed `@astryxdesign/*` import.
|
|
5311
|
+
- **drop-xds-prefix-imports**: un-prefix partial-mock override keys inside the earlier scope's `core` mock factory (e.g. `useXDSTruncation` → `useTruncation`) so the override matches the renamed export instead of silently overriding nothing. Scoped to recognized mock factories of the earlier scope's `core` only; unrelated object keys are untouched.
|
|
5312
5312
|
|
|
5313
5313
|
#### Contributors
|
|
5314
5314
|
|
|
@@ -5414,9 +5414,9 @@ Thanks to everyone who contributed to this release:
|
|
|
5414
5414
|
|
|
5415
5415
|
#### Other Changes
|
|
5416
5416
|
|
|
5417
|
-
- **drop-xds-prefix-imports**: when un-prefixing an
|
|
5418
|
-
- **migrate-xds-css-surfaces**: rewrite CSS `@import` of
|
|
5419
|
-
- **migrate-xds-module-specifiers**: when collapsing
|
|
5417
|
+
- **drop-xds-prefix-imports**: when un-prefixing an import from the earlier scope's `core` (e.g. `XDSCodeBlock` → `CodeBlock`) would collide with a same-named local binding in the file (such as a local `export function CodeBlock` wrapper), alias the import to `Astryx<Name>` and rewrite its usages instead of producing a duplicate declaration that breaks the build.
|
|
5418
|
+
- **migrate-xds-css-surfaces**: rewrite CSS `@import` of the earlier scope's package stylesheets (both `'…'`/`"…"` and `url(…)` forms), including the earlier scope's `core/xds.css` → `@astryxdesign/core/astryx.css` file rename and the `theme-default`/`theme-daily` → `theme-neutral` collapse.
|
|
5419
|
+
- **migrate-xds-module-specifiers**: when collapsing the earlier scope's `theme-default`/`theme-daily` to `@astryxdesign/theme-neutral`, remap the `defaultTheme` export to `neutralTheme`, aliasing back to the original local name (`neutralTheme as defaultTheme`) so downstream usages keep working.
|
|
5420
5420
|
|
|
5421
5421
|
#### Contributors
|
|
5422
5422
|
|
|
@@ -5440,7 +5440,7 @@ Thanks to everyone who contributed to this release:
|
|
|
5440
5440
|
- Add a Kanban Board page template: color-coded status columns, draggable task cards with priority tags, and board toolbar. Based on a design by @cg-hub18.
|
|
5441
5441
|
- Add frame-first layout guidance: new `astryx docs layout` topic (shell choice, region budgets, app archetypes, cards-vs-rows policy, responsive contracts), layout rules in the generated agent cheat sheet, and layout anti-patterns in `docs principles`.
|
|
5442
5442
|
- Add a v0.1.3 config codemod that migrates astryx.config layout.components to experimental.xle.components.
|
|
5443
|
-
- Add v0.1.0 codemods for migrating `declare module
|
|
5443
|
+
- Add v0.1.0 codemods for migrating `declare module` type augmentations of the earlier scope's `core/...` modules and `.xds-*` / `[data-xds-theme]` / `@layer xds-theme` CSS surfaces to their `@astryxdesign`/`astryx-*` equivalents.
|
|
5444
5444
|
- Introduce the Project configuration API as the single entry point for reading resolved project config, components, templates, codemods, and issue routing, replacing loadConfig. Misconfigured integrations are now skipped with a warning during upgrade instead of hard-failing, and a new --skip-codemod flag lets you re-run past a failed codemod.
|
|
5445
5445
|
- Add a Shell page-template category to the CLI: Top Nav, Side Nav, and Shell Nav app-shell scaffolds (#3245, #3246, #3247)
|
|
5446
5446
|
- Static template authoring API (createPageTemplate/createBlockTemplate) with the @astryxdesign/cli/template export and type-driven, package-scoped template discovery.
|
|
@@ -5454,7 +5454,7 @@ Thanks to everyone who contributed to this release:
|
|
|
5454
5454
|
- Align the CLI error-code type declarations with the runtime error codes (add the missing ERR_AMBIGUOUS_TEMPLATE declaration).
|
|
5455
5455
|
- Correct the `doctor` theme-wiring hint to reference the real `astryx.theme` config field (was `xds.theme`) and update the agent-docs check wording to say "Astryx".
|
|
5456
5456
|
- Update the API/CLI parity harness for the package-qualified `component --list` shape, and make the component API reject a non-string name with a clean error instead of throwing.
|
|
5457
|
-
- The XDS-prefix drop codemod now runs as a mandatory v0.1.0 upgrade step, so upgrading from 0.0.x rewrites prefixed imports (useXDSTheme, XDSButton, XDSIconRegistry, ...) to their bare names alongside the
|
|
5457
|
+
- The XDS-prefix drop codemod now runs as a mandatory v0.1.0 upgrade step, so upgrading from 0.0.x rewrites prefixed imports (useXDSTheme, XDSButton, XDSIconRegistry, ...) to their bare names alongside the scope rename to `@astryxdesign/*`.
|
|
5458
5458
|
- upgrade now runs core codemods before loading config, so a config codemod can repair an otherwise-invalid config; dry-run reports a fixable config and suggests the command to apply it.
|
|
5459
5459
|
|
|
5460
5460
|
#### Documentation
|
|
@@ -5583,7 +5583,7 @@ Thanks to everyone who contributed to this release:
|
|
|
5583
5583
|
(realpath of `import.meta.url`), working whether invoked via symlink, copy, or
|
|
5584
5584
|
Windows shim. Also fixes the non-interactive `init`/`theme` error to say
|
|
5585
5585
|
`astryx <command>` instead of the stale `xds <command>`.
|
|
5586
|
-
- Add a v0.1.0 upgrade codemod that migrates legacy
|
|
5586
|
+
- Add a v0.1.0 upgrade codemod that migrates legacy module specifiers and config surfaces to the Astryx v0.1.0 names.
|
|
5587
5587
|
[breaking] Remove legacy `astryx.versionFile` update-hint support from package.json.
|
|
5588
5588
|
|
|
5589
5589
|
#### Documentation
|
|
@@ -5627,7 +5627,7 @@ Thanks to everyone who contributed to this release:
|
|
|
5627
5627
|
name should switch to `astryx`. Part of removing `xds` naming from the public API.
|
|
5628
5628
|
- Rename the exported `XDSError` class to `AstryxError`
|
|
5629
5629
|
The CLI's programmatic API error class is renamed `XDSError` -> `AstryxError`
|
|
5630
|
-
(exported from `@
|
|
5630
|
+
(exported from `@astryxdesign/cli` + declared in its types). Consumers that catch or
|
|
5631
5631
|
reference `XDSError` from the CLI's API should switch to `AstryxError`. Part of
|
|
5632
5632
|
removing `xds` naming from the public API.
|
|
5633
5633
|
- Remove the XDS-prefix compatibility layer — astryx is now the only public surface
|
|
@@ -5640,9 +5640,9 @@ Thanks to everyone who contributed to this release:
|
|
|
5640
5640
|
|
|
5641
5641
|
- `theme build` generates valid bare type imports (IconRegistry/DefinedTheme)
|
|
5642
5642
|
`astryx theme build` emitted `.d.ts` files importing `XDSIconRegistry` /
|
|
5643
|
-
`XDSDefinedTheme` from `@
|
|
5643
|
+
`XDSDefinedTheme` from `@astryxdesign/core`, but those aliases were removed — the
|
|
5644
5644
|
generated types failed to resolve. Generate `IconRegistry` / `DefinedTheme`
|
|
5645
|
-
(the bare names `@
|
|
5645
|
+
(the bare names `@astryxdesign/core` now exports) instead.
|
|
5646
5646
|
|
|
5647
5647
|
#### Documentation
|
|
5648
5648
|
|
|
@@ -5686,8 +5686,8 @@ Thanks to everyone who contributed to this release:
|
|
|
5686
5686
|
|
|
5687
5687
|
- Remove an internal-only codemod from the public repository (#2970)
|
|
5688
5688
|
It was an optional, version-independent transform and not part of any standard upgrade path, so removing it does not affect the public `0.0.13 → 0.0.15` migration.
|
|
5689
|
-
-
|
|
5690
|
-
All published packages move to the new `@astryxdesign` scope
|
|
5689
|
+
- Move every package to the npm package scope `@astryxdesign/*`
|
|
5690
|
+
All published packages move to the new `@astryxdesign` scope, along with the workspace lockfile, build/runtime scope-directory scans, and docsite slug derivation. Consumers must update their imports and dependency names. The ESLint plugin namespace is unchanged. The existing upgrade codemods still migrate projects from the earlier scope.
|
|
5691
5691
|
|
|
5692
5692
|
#### Contributors
|
|
5693
5693
|
|
|
@@ -5716,7 +5716,7 @@ npx astryx upgrade --apply
|
|
|
5716
5716
|
- **`astryx doctor`** — New health-check command for diagnosing project/setup issues. (#2565)
|
|
5717
5717
|
- **Unified search** — `astryx search` searches across components, hooks, docs, and templates in one query. (#2564)
|
|
5718
5718
|
- **Capability manifest** — Full machine-readable capability manifest for agent discovery, plus stable machine-readable error codes on every error. (#2562, #2563)
|
|
5719
|
-
- **`@
|
|
5719
|
+
- **`@astryxdesign/cli/api` hook export** — The `hook` is exposed via `@astryxdesign/cli/api` with types and parity coverage. (#2558)
|
|
5720
5720
|
- **CLI exit-code policy** — Every user-visible error now exits with code 1 in both human and `--json` modes (previously several command-layer errors printed a message but exited 0, invisible to CI scripts and AI agents). `xds bogus-cmd`, `astryx theme bogus-subcommand`, the bare `theme` group with an unknown subcommand, and "command not found"/"did you mean…" paths all exit 1. Help, version, and bare-list invocations still exit 0. Introduces `lib/cli-error.mjs` as the canonical exit-code helper.
|
|
5721
5721
|
- **Migration guide** — Added an explicit guide for moving existing Tailwind, shadcn, and Radix applications to XDS incrementally.
|
|
5722
5722
|
- **Data-attribute selector docs** — Documented the data-attribute selector surface in CLI docs alongside the core dual-emit change.
|
|
@@ -5732,7 +5732,7 @@ npx astryx upgrade --apply
|
|
|
5732
5732
|
- **`astryx discover --json`** — Includes `meta: { configured: false }` when no packages are configured, distinguishing "configured but empty" from "not configured".
|
|
5733
5733
|
- **`xds gap-report --json`** — Returns a structured error instead of starting an interactive prompt when required flags are missing; the "gh CLI missing" path also emits a JSON error.
|
|
5734
5734
|
- **`astryx theme --json`** — The `theme` parent command (without a subcommand) rejects `--json` cleanly; `theme build --json` continues to work.
|
|
5735
|
-
- **Theme CSS prose regression** — `astryx theme build` now uses a single CSS generation path (`@
|
|
5735
|
+
- **Theme CSS prose regression** — `astryx theme build` now uses a single CSS generation path (`@astryxdesign/core`'s generator) and treats a failed `@astryxdesign/core/theme` import as a hard build error instead of a silent fallback, fixing the docsite Markdown typography regression after the XDS-prefix migration. (#2964)
|
|
5736
5736
|
|
|
5737
5737
|
#### Contributors
|
|
5738
5738
|
|
package/README.md
CHANGED
|
@@ -101,25 +101,25 @@ Every run reads one base: Core, or an installed integration whose manifest decla
|
|
|
101
101
|
|
|
102
102
|
<!-- BEGIN GENERATED: commands -->
|
|
103
103
|
|
|
104
|
-
| Command | Description
|
|
105
|
-
| -------------- |
|
|
106
|
-
| `blog` | Read the Astryx blog from the published feed
|
|
107
|
-
| `build` | Build a page: the template to start from, or the workflow playbook (no query)
|
|
108
|
-
| `component` | List components or print component docs
|
|
109
|
-
| `discover` | Browse and search integrations: the ones you have and the ones you could add
|
|
110
|
-
| `docs` | Print reference docs
|
|
111
|
-
| `doctor` | Diagnose Astryx projects and integration packages
|
|
112
|
-
| `experimental` | [experimental] Try features that may change in a patch release: icon sets, one self-contained HTML file from a page built with Astryx components (not for other pages)
|
|
113
|
-
| `gap-report` | Report a missing component or feature to the package that owns it
|
|
114
|
-
| `hook` | List hooks or print hook docs
|
|
115
|
-
| `init` | Initialize the design system in your project
|
|
116
|
-
| `integration` | Author and verify an Astryx integration package
|
|
117
|
-
| `mcp` | For AI tools that cannot run commands: serve every astryx command as an MCP tool, over stdio
|
|
118
|
-
| `search` | Search components, hooks, docs, templates, and themes in one ranked list
|
|
119
|
-
| `swizzle` | Copy component source for customization
|
|
120
|
-
| `template` | List, show, or scaffold page and block templates
|
|
121
|
-
| `theme` | Add, switch, build, and author themes
|
|
122
|
-
| `upgrade` | Update your code after upgrading Astryx, and refresh ShadCN-copied components
|
|
104
|
+
| Command | Description | Outside a project |
|
|
105
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- |
|
|
106
|
+
| `blog` | Read the Astryx blog from the published feed | `same` |
|
|
107
|
+
| `build` | Build a page: the template to start from, or the workflow playbook (no query) | `same` |
|
|
108
|
+
| `component` | List components or print component docs | `same` |
|
|
109
|
+
| `discover` | Browse and search integrations: the ones you have and the ones you could add | `same` |
|
|
110
|
+
| `docs` | Print reference docs | `same` |
|
|
111
|
+
| `doctor` | Diagnose Astryx projects and integration packages | `own` |
|
|
112
|
+
| `experimental` | [experimental] Try features that may change in a patch release: icon sets, one self-contained HTML file from a page built with Astryx components (not for other pages) | by subcommand |
|
|
113
|
+
| `gap-report` | Report a missing component or feature to the package that owns it | `same` |
|
|
114
|
+
| `hook` | List hooks or print hook docs | `same` |
|
|
115
|
+
| `init` | Initialize the design system in your project | `own` |
|
|
116
|
+
| `integration` | Author and verify an Astryx integration package | by subcommand |
|
|
117
|
+
| `mcp` | For AI tools that cannot run commands: serve every astryx command as an MCP tool, over stdio | `same` |
|
|
118
|
+
| `search` | Search components, hooks, docs, templates, and themes in one ranked list | `same` |
|
|
119
|
+
| `swizzle` | Copy component source for customization | `refuse` |
|
|
120
|
+
| `template` | List, show, or scaffold page and block templates | `same` |
|
|
121
|
+
| `theme` | Add, switch, build, and author themes | by subcommand |
|
|
122
|
+
| `upgrade` | Update your code after upgrading Astryx, and refresh ShadCN-copied components | `own` |
|
|
123
123
|
|
|
124
124
|
<!-- END GENERATED: commands -->
|
|
125
125
|
<!-- Generated by scripts/generate-cli-readme.mjs from `astryx manifest`. Run `pnpm -F @astryxdesign/cli readme`. -->
|
|
@@ -321,7 +321,8 @@ export function withExampleBlockPointer(error: unknown, dirName: string, { coreD
|
|
|
321
321
|
/**
|
|
322
322
|
* When `error` is the unknown-component error for a name that matches a hook,
|
|
323
323
|
* template or docs topic (exact, folded or last segment, or a hook it nearly
|
|
324
|
-
* spells
|
|
324
|
+
* spells, whose keyword it is, or whose name without its verb its words
|
|
325
|
+
* carry, as foundation/suggest/other-command.mjs
|
|
325
326
|
* ranks it), returns the same error with the command that reads that entry
|
|
326
327
|
* among its suggestions, in the place foundation/suggest/other-command.mjs
|
|
327
328
|
* gives it: a hint at the folded tier or a worse one stays behind a
|
|
@@ -989,7 +989,8 @@ export async function withExampleBlockPointer(error, dirName, {coreDir, cwd}) {
|
|
|
989
989
|
/**
|
|
990
990
|
* When `error` is the unknown-component error for a name that matches a hook,
|
|
991
991
|
* template or docs topic (exact, folded or last segment, or a hook it nearly
|
|
992
|
-
* spells
|
|
992
|
+
* spells, whose keyword it is, or whose name without its verb its words
|
|
993
|
+
* carry, as foundation/suggest/other-command.mjs
|
|
993
994
|
* ranks it), returns the same error with the command that reads that entry
|
|
994
995
|
* among its suggestions, in the place foundation/suggest/other-command.mjs
|
|
995
996
|
* gives it: a hint at the folded tier or a worse one stays behind a
|
package/api/docs/_adapter.d.mts
CHANGED
|
@@ -489,11 +489,12 @@ export function withPageBelow<T extends {
|
|
|
489
489
|
* hyphens; failing that, the topics and top-level namespaces,
|
|
490
490
|
* closest first and cut where the matches get weaker (every one of them when
|
|
491
491
|
* none shares a word with the argument, with the names a slip or two from it
|
|
492
|
-
* first). When the argument matches a component, hook or template
|
|
493
|
-
*
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
*
|
|
492
|
+
* first). When the argument matches a component, hook or template (exact,
|
|
493
|
+
* folded or last segment, or a Core component or hook its last path segment
|
|
494
|
+
* names, unless a stable doc has that name), the command that reads that
|
|
495
|
+
* entry joins the list as foundation/suggest/other-command.mjs places it, and
|
|
496
|
+
* the list keeps its length; when no suggested doc shares a word with the
|
|
497
|
+
* argument, that command is the only suggestion.
|
|
497
498
|
* When no command joins, the docs whose route, title or declared keywords
|
|
498
499
|
* carry a typed word ({@link wordMatches}) take the place of the topics and
|
|
499
500
|
* namespaces, the named route that list leads with first, in a list no
|
package/api/docs/_adapter.mjs
CHANGED
|
@@ -2517,11 +2517,12 @@ export function withPageBelow(topic, byRoute, ordered, deeper) {
|
|
|
2517
2517
|
* hyphens; failing that, the topics and top-level namespaces,
|
|
2518
2518
|
* closest first and cut where the matches get weaker (every one of them when
|
|
2519
2519
|
* none shares a word with the argument, with the names a slip or two from it
|
|
2520
|
-
* first). When the argument matches a component, hook or template
|
|
2521
|
-
*
|
|
2522
|
-
*
|
|
2523
|
-
*
|
|
2524
|
-
*
|
|
2520
|
+
* first). When the argument matches a component, hook or template (exact,
|
|
2521
|
+
* folded or last segment, or a Core component or hook its last path segment
|
|
2522
|
+
* names, unless a stable doc has that name), the command that reads that
|
|
2523
|
+
* entry joins the list as foundation/suggest/other-command.mjs places it, and
|
|
2524
|
+
* the list keeps its length; when no suggested doc shares a word with the
|
|
2525
|
+
* argument, that command is the only suggestion.
|
|
2525
2526
|
* When no command joins, the docs whose route, title or declared keywords
|
|
2526
2527
|
* carry a typed word ({@link wordMatches}) take the place of the topics and
|
|
2527
2528
|
* namespaces, the named route that list leads with first, in a list no
|
|
@@ -2583,8 +2584,11 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
|
|
|
2583
2584
|
...catalog.names().map(name => ({name, reason: 'available topic'})),
|
|
2584
2585
|
];
|
|
2585
2586
|
}
|
|
2587
|
+
// A child the route names stays first, ahead of another command's entry.
|
|
2588
|
+
let namedChild = 0;
|
|
2586
2589
|
if (typeof topic === 'string' && routeChildren) {
|
|
2587
2590
|
const byRoute = orderRouteSuggestions(topic, suggestions, {closest: false});
|
|
2591
|
+
namedChild = namesRoute(topic, byRoute[0]?.name ?? '') ? 1 : 0;
|
|
2588
2592
|
suggestions = withPageBelow(
|
|
2589
2593
|
topic,
|
|
2590
2594
|
byRoute,
|
|
@@ -2644,6 +2648,7 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
|
|
|
2644
2648
|
// Kept with the project's one name index (the docs catalog itself
|
|
2645
2649
|
// is not asked from here).
|
|
2646
2650
|
docsRoutes: routes.docsRoutesLazily,
|
|
2651
|
+
tail: componentTail(String(topic), hint.tailForms, tree, catalog),
|
|
2647
2652
|
})
|
|
2648
2653
|
: null;
|
|
2649
2654
|
if (hint && elsewhere) {
|
|
@@ -2655,6 +2660,7 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
|
|
|
2655
2660
|
hint.withOtherCommand(suggestions, elsewhere, String(topic), {
|
|
2656
2661
|
from: 'docs',
|
|
2657
2662
|
alone: !sharesAWord,
|
|
2663
|
+
pinned: namedChild,
|
|
2658
2664
|
}) ?? [];
|
|
2659
2665
|
} else if (byWords.length > 0) {
|
|
2660
2666
|
suggestions = fewerWordMatches(String(topic), suggestions, byWords, 0);
|
|
@@ -2666,6 +2672,31 @@ export async function unknownTopicError(topic, catalog, {cwd} = {}) {
|
|
|
2666
2672
|
);
|
|
2667
2673
|
}
|
|
2668
2674
|
|
|
2675
|
+
/**
|
|
2676
|
+
* The names a typed last route segment may give a Core component or hook by,
|
|
2677
|
+
* or none when a stable doc or topic name, as typed or with its words
|
|
2678
|
+
* singular, is one of them: a doc wins (`icons` is a topic, so `guides/icon`
|
|
2679
|
+
* names no component), while an experimental doc changes no stable answer.
|
|
2680
|
+
* @param {string} topic
|
|
2681
|
+
* @param {(name: string) => string[]} formsOf other-command.mjs tailForms
|
|
2682
|
+
* @param {DocsTree} tree
|
|
2683
|
+
* @param {DocsCatalog} catalog
|
|
2684
|
+
* @returns {string[]}
|
|
2685
|
+
*/
|
|
2686
|
+
function componentTail(topic, formsOf, tree, catalog) {
|
|
2687
|
+
const forms = formsOf(topic);
|
|
2688
|
+
const docNames = [
|
|
2689
|
+
...[...tree.nodes.values()]
|
|
2690
|
+
.filter(node => !isExperimentalTreeNode(tree, node))
|
|
2691
|
+
.map(node => node.name),
|
|
2692
|
+
...catalog.names(),
|
|
2693
|
+
];
|
|
2694
|
+
const namesADoc = docNames.some(name =>
|
|
2695
|
+
formsOf(name).some(form => forms.includes(form)),
|
|
2696
|
+
);
|
|
2697
|
+
return namesADoc ? [] : forms;
|
|
2698
|
+
}
|
|
2699
|
+
|
|
2669
2700
|
/**
|
|
2670
2701
|
* The project a catalog came from, loaded again when the catalog is not one
|
|
2671
2702
|
* {@link loadDocsCatalog} made. Undefined when the project does not load.
|
|
@@ -439,8 +439,8 @@ export function readBuiltPath(target: string, { fileLimit }?: {
|
|
|
439
439
|
export function builtIntegrationPackages(target: string, cwd: string): string[];
|
|
440
440
|
/**
|
|
441
441
|
* The install line for the font families a known package loads (an open
|
|
442
|
-
* font
|
|
443
|
-
* guidance gives it, else in the project's package manager, and
|
|
442
|
+
* font with a known Fontsource package), as the project's integration
|
|
443
|
+
* install guidance gives it, else in the project's package manager, and
|
|
444
444
|
* whether it loads every family given. A family no known package loads (a
|
|
445
445
|
* self-hosted face) gets none: its package name would be a guess.
|
|
446
446
|
* @param {string} projectDir
|
|
@@ -480,6 +480,7 @@ export { placeholderFixes } from "../../foundation/discovery/template-icons.mjs"
|
|
|
480
480
|
export { iconFeatureGate } from "../../foundation/integrations/icon-features.mjs";
|
|
481
481
|
export { addMatchingCore } from "../../foundation/release/notices.mjs";
|
|
482
482
|
export { fontServiceFamilies } from "../../foundation/fonts/font-stylesheet.mjs";
|
|
483
|
+
export { declaredColorModes } from "../../foundation/discovery/color-modes.mjs";
|
|
483
484
|
export { resolveRecordedTheme } from "../theme/theme.mjs";
|
|
484
485
|
export { themeIdentifier } from "../theme/_fork.mjs";
|
|
485
486
|
export { collectUnloadedFonts } from "../theme/build/font-warning.mjs";
|
|
@@ -578,6 +579,8 @@ export { listProjectSourceFiles, SOURCE_EXTENSIONS } from "../../foundation/fs/p
|
|
|
578
579
|
export { projectImportsModule, specifierTargets } from "../../foundation/fs/project-sources.mjs";
|
|
579
580
|
export { iconUseCommand, unlistedIconSets } from "../../foundation/discovery/icon-set-discovery.mjs";
|
|
580
581
|
export { isLocalThemeOwner, planThemeAppWrite, readThemeState, resolveThemeModule } from "../../foundation/config/theme-state.mjs";
|
|
581
|
-
export { fileMark,
|
|
582
|
+
export { fileMark, isPrivateVarRefusal, missingThemePackage, themeBuild, validateThemePrivateInputs } from "../theme/build/build.mjs";
|
|
582
583
|
export { installCommandFor as packageInstallCommand, installStepFor as packageInstallStep } from "../../foundation/discovery/template-needs.mjs";
|
|
584
|
+
export { nextFontFix, rootLayoutImportsNextFont } from "../../foundation/fonts/next-font.mjs";
|
|
585
|
+
export { APP_ROOT_LAYOUT_FILES, parseAppModule } from "../../foundation/discovery/app-layout.mjs";
|
|
583
586
|
export { AUTHORING_AUDIT, authoringAudit, authoringAuditData } from "./_authoring-audit.mjs";
|
package/api/doctor/_adapter.mjs
CHANGED
|
@@ -176,7 +176,6 @@ export {
|
|
|
176
176
|
} from '../../foundation/config/theme-state.mjs';
|
|
177
177
|
export {
|
|
178
178
|
fileMark,
|
|
179
|
-
generatedSourceCommand,
|
|
180
179
|
isPrivateVarRefusal,
|
|
181
180
|
missingThemePackage,
|
|
182
181
|
themeBuild,
|
|
@@ -188,6 +187,15 @@ export {
|
|
|
188
187
|
} from '../../foundation/discovery/template-needs.mjs';
|
|
189
188
|
export {addMatchingCore} from '../../foundation/release/notices.mjs';
|
|
190
189
|
export {fontServiceFamilies} from '../../foundation/fonts/font-stylesheet.mjs';
|
|
190
|
+
export {declaredColorModes} from '../../foundation/discovery/color-modes.mjs';
|
|
191
|
+
export {
|
|
192
|
+
nextFontFix,
|
|
193
|
+
rootLayoutImportsNextFont,
|
|
194
|
+
} from '../../foundation/fonts/next-font.mjs';
|
|
195
|
+
export {
|
|
196
|
+
APP_ROOT_LAYOUT_FILES,
|
|
197
|
+
parseAppModule,
|
|
198
|
+
} from '../../foundation/discovery/app-layout.mjs';
|
|
191
199
|
export {resolveRecordedTheme} from '../theme/theme.mjs';
|
|
192
200
|
export {themeIdentifier} from '../theme/_fork.mjs';
|
|
193
201
|
export {collectUnloadedFonts} from '../theme/build/font-warning.mjs';
|
|
@@ -1742,8 +1750,8 @@ export function builtIntegrationPackages(target, cwd) {
|
|
|
1742
1750
|
|
|
1743
1751
|
/**
|
|
1744
1752
|
* The install line for the font families a known package loads (an open
|
|
1745
|
-
* font
|
|
1746
|
-
* guidance gives it, else in the project's package manager, and
|
|
1753
|
+
* font with a known Fontsource package), as the project's integration
|
|
1754
|
+
* install guidance gives it, else in the project's package manager, and
|
|
1747
1755
|
* whether it loads every family given. A family no known package loads (a
|
|
1748
1756
|
* self-hosted face) gets none: its package name would be a guess.
|
|
1749
1757
|
* @param {string} projectDir
|
|
@@ -1751,8 +1759,8 @@ export function builtIntegrationPackages(target, cwd) {
|
|
|
1751
1759
|
* @returns {Promise<{line: string | null, coversAll: boolean}>}
|
|
1752
1760
|
*/
|
|
1753
1761
|
export async function fontPackagesInstallLine(projectDir, families) {
|
|
1754
|
-
const {fontsourceSuggestion} =
|
|
1755
|
-
|
|
1762
|
+
const {fontsourceSuggestion, installLine} =
|
|
1763
|
+
await import('./font-packages.mjs');
|
|
1756
1764
|
const known = families.map(family => {
|
|
1757
1765
|
const s = fontsourceSuggestion(family);
|
|
1758
1766
|
return s?.known ? s.pkg : null;
|
package/api/doctor/doctor.mjs
CHANGED
|
@@ -1681,7 +1681,7 @@ export function checkIconSets(ctx) {
|
|
|
1681
1681
|
status: 'fail',
|
|
1682
1682
|
message:
|
|
1683
1683
|
declared.length === 0
|
|
1684
|
-
? `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured ?? choice.set.name} declares no variants
|
|
1684
|
+
? `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured ?? choice.set.name} declares no variants: it draws one look.`
|
|
1685
1685
|
: `experimental.iconVariant names "${choice.variant}", but the main set ${choice.configured ?? choice.set.name} declares no such variant. Its variants: ${declared.join(', ')}.`,
|
|
1686
1686
|
fix:
|
|
1687
1687
|
declared.length === 0
|
|
@@ -1730,15 +1730,15 @@ export function checkIconSets(ctx) {
|
|
|
1730
1730
|
id,
|
|
1731
1731
|
label,
|
|
1732
1732
|
status: 'warn',
|
|
1733
|
-
message: `${renamed.join(' | ')}. Each entry maps the
|
|
1734
|
-
fix: 'In the package that ships the set, rename each map key to the
|
|
1733
|
+
message: `${renamed.join(' | ')}. Each entry maps the meaning that replaced it.`,
|
|
1734
|
+
fix: 'In the package that ships the set, rename each map key to the meaning that replaced it (any `astryx experimental icon map` run there writes it), or install a release of the package that has.',
|
|
1735
1735
|
};
|
|
1736
1736
|
}
|
|
1737
1737
|
return {
|
|
1738
1738
|
id,
|
|
1739
1739
|
label,
|
|
1740
1740
|
status: 'pass',
|
|
1741
|
-
message: `${sets.length} icon set${sets.length === 1 ? '' : 's'} installed. ${choice.reason}${choice.variant ? ` Each icon draws its "${choice.variant}"
|
|
1741
|
+
message: `${sets.length} icon set${sets.length === 1 ? '' : 's'} installed. ${choice.reason}${choice.variant ? ` Each icon draws its "${choice.variant}" look where its set has one.` : ''}`,
|
|
1742
1742
|
};
|
|
1743
1743
|
}
|
|
1744
1744
|
|
|
@@ -1812,7 +1812,7 @@ export function checkIconPlaceholders(ctx) {
|
|
|
1812
1812
|
label,
|
|
1813
1813
|
status: 'warn',
|
|
1814
1814
|
message: `${uses} placeholder icon${uses === 1 ? '' : 's'} in copied code: no set in your list has ${meanings.length > 0 ? `"${meanings.join('", "')}"` : 'these icons'}. ${where}.`,
|
|
1815
|
-
fix: `Add a backup set that has each meaning (\`astryx discover --type icon-set\` lists sets and the
|
|
1815
|
+
fix: `Add a backup set that has each meaning (\`astryx discover --type icon-set\` lists sets and the meanings they map): \`${backupFix}\`; or, if you author your main set, map it there: \`${mapFix}\`. Then copy the template again, or replace each use of the placeholder (\`${found[0].local}\`) with the icon \`astryx experimental icon <meaning>\` prints, and delete its declaration. A built-in meaning (\`astryx experimental icon --definitions\` marks them) also renders from the theme by name: \`<Icon icon="<name>" />\`. Otherwise, use your own icon component (\`astryx docs icons custom-icons\`).`,
|
|
1816
1816
|
};
|
|
1817
1817
|
}
|
|
1818
1818
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// @generated by scripts/sync-api-types.mjs from the JSDoc in api/**/*.mjs.
|
|
2
|
+
// DO NOT EDIT — run `pnpm sync:api-types` to regenerate.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The Fontsource package for a font family, in Fontsource's own naming: an
|
|
6
|
+
* open font's own package (Geist is `@fontsource/geist-sans`); a variable
|
|
7
|
+
* family, which Fontsource names `<Name> Variable`, from
|
|
8
|
+
* `@fontsource-variable/<name>`; else the family's name with every run of
|
|
9
|
+
* other characters as one dash (`Open Sans` is `@fontsource/open-sans`).
|
|
10
|
+
* Null when the name gives no such package name (a name with no Latin
|
|
11
|
+
* letters or digits).
|
|
12
|
+
* @param {string} family
|
|
13
|
+
* @returns {string | null}
|
|
14
|
+
*/
|
|
15
|
+
export function fontsourcePackageOf(family: string): string | null;
|
|
16
|
+
/**
|
|
17
|
+
* The Fontsource package to suggest installing for a family: an open
|
|
18
|
+
* font's own package (known to exist); none for a font a system ships (on
|
|
19
|
+
* any platform), which Fontsource does not publish; else the family's
|
|
20
|
+
* package in Fontsource's naming, which may or may not exist (`known`
|
|
21
|
+
* false).
|
|
22
|
+
* @param {string} family
|
|
23
|
+
* @returns {{pkg: string, known: boolean} | null}
|
|
24
|
+
*/
|
|
25
|
+
export function fontsourceSuggestion(family: string): {
|
|
26
|
+
pkg: string;
|
|
27
|
+
known: boolean;
|
|
28
|
+
} | null;
|
|
29
|
+
/**
|
|
30
|
+
* The step that adds packages to the app: the install guidance its
|
|
31
|
+
* integrations give, else the add command of the project's package manager.
|
|
32
|
+
* @param {string} cwd
|
|
33
|
+
* @param {string[]} packages
|
|
34
|
+
* @returns {string}
|
|
35
|
+
*/
|
|
36
|
+
export function installLine(cwd: string, packages: string[]): string;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @file The packages that load the font families a theme names: the
|
|
5
|
+
* Fontsource package for a family, and the line that installs packages in
|
|
6
|
+
* the project.
|
|
7
|
+
* @input Font family names, and the project folder.
|
|
8
|
+
* @output `fontsourceSuggestion` (the package for one family, and whether it
|
|
9
|
+
* is known to exist) and `installLine` (the install step for packages).
|
|
10
|
+
* @position api/doctor: read by `fontPackagesInstallLine` (./_adapter.mjs)
|
|
11
|
+
* for the fix of a font a theme names and the app does not load.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import {installGuidanceFor} from '../../foundation/env/cli-command.mjs';
|
|
15
|
+
import {detectPackageManager} from '../../foundation/env/package-manager.mjs';
|
|
16
|
+
import {cssUnescape} from '../../foundation/text/css-escape.mjs';
|
|
17
|
+
import {collectUnloadedFonts} from '../theme/build/font-warning.mjs';
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Open fonts whose Fontsource package is known to exist: the family, and
|
|
21
|
+
* its package.
|
|
22
|
+
* @type {ReadonlyArray<{family: string, pkg: string}>}
|
|
23
|
+
*/
|
|
24
|
+
const OPEN_FONTS = Object.freeze([
|
|
25
|
+
{family: 'Inter', pkg: '@fontsource/inter'},
|
|
26
|
+
{family: 'Roboto', pkg: '@fontsource/roboto'},
|
|
27
|
+
{family: 'Poppins', pkg: '@fontsource/poppins'},
|
|
28
|
+
{family: 'Figtree', pkg: '@fontsource/figtree'},
|
|
29
|
+
{family: 'DM Sans', pkg: '@fontsource/dm-sans'},
|
|
30
|
+
{family: 'Manrope', pkg: '@fontsource/manrope'},
|
|
31
|
+
{family: 'Space Grotesk', pkg: '@fontsource/space-grotesk'},
|
|
32
|
+
{family: 'IBM Plex Sans', pkg: '@fontsource/ibm-plex-sans'},
|
|
33
|
+
{family: 'IBM Plex Mono', pkg: '@fontsource/ibm-plex-mono'},
|
|
34
|
+
{family: 'JetBrains Mono', pkg: '@fontsource/jetbrains-mono'},
|
|
35
|
+
{family: 'Nunito', pkg: '@fontsource/nunito'},
|
|
36
|
+
{family: 'Source Serif 4', pkg: '@fontsource/source-serif-4'},
|
|
37
|
+
{family: 'Mona Sans', pkg: '@fontsource/mona-sans'},
|
|
38
|
+
{family: 'Geist Sans', pkg: '@fontsource/geist-sans'},
|
|
39
|
+
{family: 'Geist Mono', pkg: '@fontsource/geist-mono'},
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* A family as written, without quotes or CSS escapes.
|
|
44
|
+
* @param {string} family
|
|
45
|
+
*/
|
|
46
|
+
const familyName = family =>
|
|
47
|
+
cssUnescape(String(family).replace(/["']/g, '')).trim();
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The open font of that family, or undefined.
|
|
51
|
+
* @param {string} name without quotes
|
|
52
|
+
*/
|
|
53
|
+
const openFont = name =>
|
|
54
|
+
OPEN_FONTS.find(f => f.family.toLowerCase() === name.toLowerCase());
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Whether a family needs no font file: a CSS generic family, or a family on
|
|
58
|
+
* the theme build's own list of system fonts.
|
|
59
|
+
* @param {string} family without quotes
|
|
60
|
+
*/
|
|
61
|
+
const isSystemFamily = family =>
|
|
62
|
+
family.trim() !== '' &&
|
|
63
|
+
collectUnloadedFonts({
|
|
64
|
+
tokens: {'--font-family-body': JSON.stringify(family.trim())},
|
|
65
|
+
}).length === 0;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* The Fontsource package for a font family, in Fontsource's own naming: an
|
|
69
|
+
* open font's own package (Geist is `@fontsource/geist-sans`); a variable
|
|
70
|
+
* family, which Fontsource names `<Name> Variable`, from
|
|
71
|
+
* `@fontsource-variable/<name>`; else the family's name with every run of
|
|
72
|
+
* other characters as one dash (`Open Sans` is `@fontsource/open-sans`).
|
|
73
|
+
* Null when the name gives no such package name (a name with no Latin
|
|
74
|
+
* letters or digits).
|
|
75
|
+
* @param {string} family
|
|
76
|
+
* @returns {string | null}
|
|
77
|
+
*/
|
|
78
|
+
export function fontsourcePackageOf(family) {
|
|
79
|
+
const name = familyName(family);
|
|
80
|
+
const open = openFont(name);
|
|
81
|
+
if (open) return open.pkg;
|
|
82
|
+
/** @param {string} n */
|
|
83
|
+
const slug = n =>
|
|
84
|
+
n
|
|
85
|
+
.toLowerCase()
|
|
86
|
+
.replace(/[^a-z0-9]+/g, '-')
|
|
87
|
+
.replace(/^-+|-+$/g, '');
|
|
88
|
+
const variable = /^(.+?)\s+variable$/i.exec(name);
|
|
89
|
+
const base = slug(variable ? variable[1] : name);
|
|
90
|
+
if (!base) return null;
|
|
91
|
+
return variable ? `@fontsource-variable/${base}` : `@fontsource/${base}`;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The Fontsource package to suggest installing for a family: an open
|
|
96
|
+
* font's own package (known to exist); none for a font a system ships (on
|
|
97
|
+
* any platform), which Fontsource does not publish; else the family's
|
|
98
|
+
* package in Fontsource's naming, which may or may not exist (`known`
|
|
99
|
+
* false).
|
|
100
|
+
* @param {string} family
|
|
101
|
+
* @returns {{pkg: string, known: boolean} | null}
|
|
102
|
+
*/
|
|
103
|
+
export function fontsourceSuggestion(family) {
|
|
104
|
+
const name = familyName(family);
|
|
105
|
+
const open = openFont(name);
|
|
106
|
+
if (open) return {pkg: open.pkg, known: true};
|
|
107
|
+
if (isSystemFamily(name)) return null;
|
|
108
|
+
const pkg = fontsourcePackageOf(name);
|
|
109
|
+
return pkg ? {pkg, known: false} : null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The step that adds packages to the app: the install guidance its
|
|
114
|
+
* integrations give, else the add command of the project's package manager.
|
|
115
|
+
* @param {string} cwd
|
|
116
|
+
* @param {string[]} packages
|
|
117
|
+
* @returns {string}
|
|
118
|
+
*/
|
|
119
|
+
export function installLine(cwd, packages) {
|
|
120
|
+
const guided = installGuidanceFor(packages, cwd);
|
|
121
|
+
if (guided) return guided;
|
|
122
|
+
const pm = detectPackageManager(cwd);
|
|
123
|
+
return `${pm === 'npm' || pm === 'npx' ? 'npm install' : `${pm} add`} ${packages.join(' ')}`;
|
|
124
|
+
}
|