@astryxdesign/cli 0.7.18-canary.gfacee17 → 0.7.18
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 +185 -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/data-colors-in-renderers.doc.mjs +400 -0
- 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/tree/visualization.doc.mjs +30 -0
- 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/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 -2294
- 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
|
@@ -1,730 +0,0 @@
|
|
|
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
|
-
* One setting a theme made by `experimental theme editor` holds.
|
|
6
|
-
*/
|
|
7
|
-
export type ThemeEditSetting = {
|
|
8
|
-
/**
|
|
9
|
-
* - A dial (`corners`), a design token (`--color-accent`), or a CSS property (`background`).
|
|
10
|
-
*/
|
|
11
|
-
thing: string;
|
|
12
|
-
/**
|
|
13
|
-
* - The value as stored (a dial step is stored as the rung it reached).
|
|
14
|
-
*/
|
|
15
|
-
value: string;
|
|
16
|
-
/**
|
|
17
|
-
* - What kind of thing it is.
|
|
18
|
-
*/
|
|
19
|
-
source: "dial" | "token" | "property";
|
|
20
|
-
/**
|
|
21
|
-
* - The part, group, or typography role it applies to; absent for the whole theme.
|
|
22
|
-
*/
|
|
23
|
-
on?: string | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* - `<prop>:<value>`: only that variant.
|
|
26
|
-
*/
|
|
27
|
-
when?: string | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* - Only that state.
|
|
30
|
-
*/
|
|
31
|
-
state?: string | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* - Only that color mode.
|
|
34
|
-
*/
|
|
35
|
-
mode?: "light" | "dark" | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* - One member of an always-alike group, not the whole group.
|
|
38
|
-
*/
|
|
39
|
-
only?: boolean | undefined;
|
|
40
|
-
/**
|
|
41
|
-
* - For the `headings` dial: `weight` or `tracking`.
|
|
42
|
-
*/
|
|
43
|
-
axis?: string | undefined;
|
|
44
|
-
/**
|
|
45
|
-
* - What the check found worth saying (what the token feeds, parts it misses).
|
|
46
|
-
*/
|
|
47
|
-
note?: string | undefined;
|
|
48
|
-
};
|
|
49
|
-
export type ThemeEditNewOptions = {
|
|
50
|
-
/**
|
|
51
|
-
* - The folder to start from (default: process.cwd()); commands act on the Astryx project at or above it.
|
|
52
|
-
*/
|
|
53
|
-
cwd?: string | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* - A built-in theme to build on: neutral, stone, matcha, y2k, gothic, chocolate, or butter.
|
|
56
|
-
*/
|
|
57
|
-
like?: string | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* - Also take PNG pictures of the preview with a Playwright or Chrome found on the machine.
|
|
60
|
-
*/
|
|
61
|
-
png?: boolean | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* - Dial settings to start with, by dial name (`{accent: '#7c3aed', corners: 'round', vibrancy: '60'}`), each checked as `set` checks it; every dial but `base` (use `like`). `headings` takes a list for a weight and a tracking.
|
|
64
|
-
*/
|
|
65
|
-
settings?: Record<string, string | string[] | undefined> | undefined;
|
|
66
|
-
};
|
|
67
|
-
export type ThemeEditChangeOptions = {
|
|
68
|
-
/**
|
|
69
|
-
* - The folder to start from (default: process.cwd()); commands act on the Astryx project at or above it.
|
|
70
|
-
*/
|
|
71
|
-
cwd?: string | undefined;
|
|
72
|
-
/**
|
|
73
|
-
* - A part (`button`), a group (`inputs`), or for `font` a role (`heading`).
|
|
74
|
-
*/
|
|
75
|
-
on?: string | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* - `<prop>:<value>`: only that variant, such as `variant:primary`.
|
|
78
|
-
*/
|
|
79
|
-
when?: string | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* - Only that state, such as `hover`.
|
|
82
|
-
*/
|
|
83
|
-
state?: string | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* - `light` or `dark`: only that color mode (colors only; a shadow is one value for both modes).
|
|
86
|
-
*/
|
|
87
|
-
mode?: string | undefined;
|
|
88
|
-
/**
|
|
89
|
-
* - With a member of an always-alike group (inputs, checks), style just that part.
|
|
90
|
-
*/
|
|
91
|
-
only?: boolean | undefined;
|
|
92
|
-
/**
|
|
93
|
-
* - Also take PNG pictures of the preview.
|
|
94
|
-
*/
|
|
95
|
-
png?: boolean | undefined;
|
|
96
|
-
};
|
|
97
|
-
export type ThemeEditPreviewFields = {
|
|
98
|
-
/**
|
|
99
|
-
* - The sample app page with the theme, one self-contained HTML file; null when the components could not be rendered.
|
|
100
|
-
*/
|
|
101
|
-
preview: string | null;
|
|
102
|
-
/**
|
|
103
|
-
* - PNG pictures taken (only with `png`).
|
|
104
|
-
*/
|
|
105
|
-
pictures: string[];
|
|
106
|
-
/**
|
|
107
|
-
* - Why a picture was not taken (when some were, which were and which were not), and how to get a browser for it.
|
|
108
|
-
*/
|
|
109
|
-
pictureProblem: string | null;
|
|
110
|
-
/**
|
|
111
|
-
* - Set when the change is saved but the components could not be rendered, so it was not checked and has no preview: the cause, such as two copies of React.
|
|
112
|
-
*/
|
|
113
|
-
notChecked: {
|
|
114
|
-
code: string;
|
|
115
|
-
cause: string;
|
|
116
|
-
} | null;
|
|
117
|
-
/**
|
|
118
|
-
* - Set when sheet.html (the sheet of every component, made by `show`) shows the theme as it was before this change: it says so at its top until `show` makes it again.
|
|
119
|
-
*/
|
|
120
|
-
sheetStale?: string | undefined;
|
|
121
|
-
/**
|
|
122
|
-
* - Files of the in-app theme preview that were not written again and still show the theme as it was: changed by hand, or a preview folder where a stopped preview change waits for the next preview command.
|
|
123
|
-
*/
|
|
124
|
-
previewStale?: string[] | undefined;
|
|
125
|
-
/**
|
|
126
|
-
* - One line on how to see the change: first a look that changes nothing in the app (the editor's preview.html, current after the change, and `png`, which takes pictures with no dev server; when this result's own picture run was blocked, what blocked it instead), then the in-app preview page most about it (Colors for a color, Components for a part, else Overview) at its own URL when there is a preview, and adding one to the app last, as an option. When the change could not be rendered, it names why instead of the editor's page.
|
|
127
|
-
*/
|
|
128
|
-
see: string;
|
|
129
|
-
/**
|
|
130
|
-
* - Only the first time the theme's app copy is written (src/themes/<theme>/, a standard local theme `astryx theme add <theme>` takes, written again after every build): the files written.
|
|
131
|
-
*/
|
|
132
|
-
appCopy?: {
|
|
133
|
-
wrote: string[];
|
|
134
|
-
} | undefined;
|
|
135
|
-
/**
|
|
136
|
-
* - Set when the app copy (src/themes/<theme>/) was not written: a file, folder or link of yours at one of its names; a link on the way to it (src/, src/themes/ or the copy's folder; the editor writes nothing through one); a file where src/, src/themes/ or the copy's folder goes; or a folder that cannot be written, or a write that failed (with the system's reason, such as not writable or the disk is full). The app keeps the theme as it was, and this says what is in the way and why.
|
|
137
|
-
*/
|
|
138
|
-
appCopyStale?: string | undefined;
|
|
139
|
-
};
|
|
140
|
-
/**
|
|
141
|
-
* `astryx --json experimental theme editor new <theme>`.
|
|
142
|
-
*/
|
|
143
|
-
export type ThemeEditNewResponse = {
|
|
144
|
-
type: "themeEdit.new";
|
|
145
|
-
/**
|
|
146
|
-
* - `settings`: the dial settings it started with; `missed`, `missedParts`, `missedOn`, `missedWhere`: what those settings did not reach, as a change reports it (left out when none); `notes`: font loading, and with `png` the text the sample page's pictures draw cut short; `wiring`: the steps that put the theme into this app (`theme add <theme>` for its app copy in src/themes/<theme>/, else the root file, its imports and the Theme around the app; what builds it).
|
|
147
|
-
*/
|
|
148
|
-
data: {
|
|
149
|
-
theme: string;
|
|
150
|
-
like: string | null;
|
|
151
|
-
files: {
|
|
152
|
-
settings: string;
|
|
153
|
-
source: string;
|
|
154
|
-
css: string;
|
|
155
|
-
module: string;
|
|
156
|
-
};
|
|
157
|
-
settings: string[];
|
|
158
|
-
notes: string[];
|
|
159
|
-
problems: string[];
|
|
160
|
-
wiring: string[];
|
|
161
|
-
missed?: number;
|
|
162
|
-
missedParts?: number;
|
|
163
|
-
missedOn?: string[];
|
|
164
|
-
missedWhere?: string[];
|
|
165
|
-
} & ThemeEditPreviewFields;
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* `astryx --json experimental theme editor set <theme> <thing> <value>`, and
|
|
169
|
-
* `undo <theme> <thing>`, which removes one setting.
|
|
170
|
-
*/
|
|
171
|
-
export type ThemeEditChangeResponse = {
|
|
172
|
-
type: "themeEdit.set" | "themeEdit.undo";
|
|
173
|
-
data: ThemeEditChangeData;
|
|
174
|
-
};
|
|
175
|
-
/**
|
|
176
|
-
* One problem a theme has, with the command that fixes it: the text token
|
|
177
|
-
* set where the text sits, or the border color, for the mode, to the black
|
|
178
|
-
* or white that reads there. `fix` is null when no one command does (a
|
|
179
|
-
* color the palette cannot make read: its note says what to change).
|
|
180
|
-
*/
|
|
181
|
-
export type ThemeEditProblem = {
|
|
182
|
-
problem: string;
|
|
183
|
-
fix: string | null;
|
|
184
|
-
};
|
|
185
|
-
export type ThemeEditChangeData = {
|
|
186
|
-
theme: string;
|
|
187
|
-
action: "set" | "undo";
|
|
188
|
-
/**
|
|
189
|
-
* - The setting written, or for `undo` the one removed.
|
|
190
|
-
*/
|
|
191
|
-
setting: ThemeEditSetting;
|
|
192
|
-
/**
|
|
193
|
-
* - On `set` of a box shorthand a part takes one length of (a menu's `padding '5px 0'`): the value typed and the sides written for it in this change, `setting` being the first.
|
|
194
|
-
*/
|
|
195
|
-
asSides?: {
|
|
196
|
-
thing: string;
|
|
197
|
-
value: string;
|
|
198
|
-
sides: ThemeEditSetting[];
|
|
199
|
-
} | undefined;
|
|
200
|
-
/**
|
|
201
|
-
* - On `undo`: what applies instead of the setting removed: a dial that still writes the token (such as the generated accent color), a whole-theme setting of the same thing, or the base theme's value.
|
|
202
|
-
*/
|
|
203
|
-
now?: string | undefined;
|
|
204
|
-
/**
|
|
205
|
-
* - On `undo`: the setting removed (the same as `setting`); the value now in effect is the base theme's, and `changedTokens` lists it.
|
|
206
|
-
*/
|
|
207
|
-
removed?: ThemeEditSetting | undefined;
|
|
208
|
-
/**
|
|
209
|
-
* - On `undo` of a setting listed more than once by hand: the other entries, removed with it.
|
|
210
|
-
*/
|
|
211
|
-
alsoRemoved?: ThemeEditSetting[] | undefined;
|
|
212
|
-
/**
|
|
213
|
-
* - The setting this one replaced.
|
|
214
|
-
*/
|
|
215
|
-
replaced: ThemeEditSetting | null;
|
|
216
|
-
/**
|
|
217
|
-
* - For `base`, `mode` and a whole-theme dial: the value before.
|
|
218
|
-
*/
|
|
219
|
-
was: string | null;
|
|
220
|
-
/**
|
|
221
|
-
* - The parts it styles (a group's members when it spread).
|
|
222
|
-
*/
|
|
223
|
-
parts: string[];
|
|
224
|
-
/**
|
|
225
|
-
* - The group it spread to; `onlyHint` when `--only` would style one member.
|
|
226
|
-
*/
|
|
227
|
-
group: {
|
|
228
|
-
name: string;
|
|
229
|
-
members: string[];
|
|
230
|
-
onlyHint: boolean;
|
|
231
|
-
} | null;
|
|
232
|
-
/**
|
|
233
|
-
* - Resolved token changes, `name (mode): before -> after`. The category colors (badges, tokens, card tints) and chart colors that moved with the look are counted in one line each.
|
|
234
|
-
*/
|
|
235
|
-
changedTokens: string[];
|
|
236
|
-
/**
|
|
237
|
-
* - Changes to the custom properties the built stylesheet sets on parts, `name on <rule> (mode): before -> after` (a readable text color on a selected row). With `changedTokens`, every custom property whose built value moved.
|
|
238
|
-
*/
|
|
239
|
-
changedPartTokens?: string[] | undefined;
|
|
240
|
-
/**
|
|
241
|
-
* - Part styles and typography the change wrote.
|
|
242
|
-
*/
|
|
243
|
-
styled: string[];
|
|
244
|
-
/**
|
|
245
|
-
* - Part settings a whole-theme dial left in place (a part setting wins).
|
|
246
|
-
*/
|
|
247
|
-
kept: string[];
|
|
248
|
-
/**
|
|
249
|
-
* - Variant keys the setting was newly repeated on, so a more specific base rule cannot beat it.
|
|
250
|
-
*/
|
|
251
|
-
lifted: string[];
|
|
252
|
-
/**
|
|
253
|
-
* - What else to know: the shade a color's main token uses and any shade contrast moved, then the generated color files; font loading; what a token feeds; with `png`, the text the sample page's pictures draw cut short and the words they break inside the word, as the browser measured them (one note for each part, with its labels).
|
|
254
|
-
*/
|
|
255
|
-
notes: string[];
|
|
256
|
-
/**
|
|
257
|
-
* - What a whole-theme change leaves out, each with the commands that reach it, one per part: the parts drawn as pills that square corners leave round; the surfaces a border width does not reach, and the dividers it moves. The text output prints it right under the status line.
|
|
258
|
-
*/
|
|
259
|
-
leftOut: Array<{
|
|
260
|
-
note: string;
|
|
261
|
-
run: string[];
|
|
262
|
-
}>;
|
|
263
|
-
/**
|
|
264
|
-
* - The open fonts this set names whose package is not installed, each with the command that installs it; the previews and the app draw the next font in the stack until then. Left out when every one loads. The text output prints it right under the status line.
|
|
265
|
-
*/
|
|
266
|
-
fontNotLoaded?: {
|
|
267
|
-
family: string;
|
|
268
|
-
run: string[];
|
|
269
|
-
}[] | undefined;
|
|
270
|
-
/**
|
|
271
|
-
* - Text this theme made unreadable (below 4.5:1, and not that low in the base theme).
|
|
272
|
-
*/
|
|
273
|
-
problems: string[];
|
|
274
|
-
/**
|
|
275
|
-
* - What this change made unreadable or unseen, each with the command that fixes it: text and borders that read well before it, and the contrast checks the colors it made fail; with `png`, text the sample page's pictures draw cut short, with `flex-shrink 0` on its part when the browser measured that drawing it whole. The text output leads with them, under the status line.
|
|
276
|
-
*/
|
|
277
|
-
newProblems: ThemeEditProblem[];
|
|
278
|
-
/**
|
|
279
|
-
* - Problems the theme had that this change moved but left failing (a fill made darker, still not dark enough), each with what it was and the command that fixes it; left out when none. The text output says them under the new problems.
|
|
280
|
-
*/
|
|
281
|
-
leftProblems?: ThemeEditProblem[] | undefined;
|
|
282
|
-
/**
|
|
283
|
-
* - How many misses the theme's own changes left (show --json lists each, with the line that reaches it); the text output counts them near its top.
|
|
284
|
-
*/
|
|
285
|
-
missed?: number | undefined;
|
|
286
|
-
/**
|
|
287
|
-
* - On how many parts those misses are (a part can miss two ways, its border and its shadow).
|
|
288
|
-
*/
|
|
289
|
-
missedParts?: number | undefined;
|
|
290
|
-
/**
|
|
291
|
-
* - Those parts, in show's order; the text output names them.
|
|
292
|
-
*/
|
|
293
|
-
missedOn?: string[] | undefined;
|
|
294
|
-
/**
|
|
295
|
-
* - Where each of those parts keeps the base theme's look: the part, the variant its miss is in when it is one (`type:error`), then the state, or `at rest`; the text output names them.
|
|
296
|
-
*/
|
|
297
|
-
missedWhere?: string[] | undefined;
|
|
298
|
-
/**
|
|
299
|
-
* - How many of those misses this change brought (not there before it); the text output says the missed line only when it brought one.
|
|
300
|
-
*/
|
|
301
|
-
missedNew?: number | undefined;
|
|
302
|
-
/**
|
|
303
|
-
* - Warnings from the theme build.
|
|
304
|
-
*/
|
|
305
|
-
warnings: string[];
|
|
306
|
-
preview: string | null;
|
|
307
|
-
pictures: string[];
|
|
308
|
-
pictureProblem: string | null;
|
|
309
|
-
/**
|
|
310
|
-
* - Saved but not checked: see ThemeEditPreviewFields.
|
|
311
|
-
*/
|
|
312
|
-
notChecked: {
|
|
313
|
-
code: string;
|
|
314
|
-
cause: string;
|
|
315
|
-
} | null;
|
|
316
|
-
/**
|
|
317
|
-
* - In-app preview files changed by hand: see ThemeEditPreviewFields.
|
|
318
|
-
*/
|
|
319
|
-
previewStale?: string[] | undefined;
|
|
320
|
-
/**
|
|
321
|
-
* - How to see the change: see ThemeEditPreviewFields.
|
|
322
|
-
*/
|
|
323
|
-
see: string;
|
|
324
|
-
/**
|
|
325
|
-
* - Set when sheet.html shows the theme as it was before this change: see ThemeEditPreviewFields.
|
|
326
|
-
*/
|
|
327
|
-
sheetStale?: string | undefined;
|
|
328
|
-
/**
|
|
329
|
-
* - Set when the app copy could not be written (something of yours at a copy name or on the way, or a write that failed): see ThemeEditPreviewFields.
|
|
330
|
-
*/
|
|
331
|
-
appCopyStale?: string | undefined;
|
|
332
|
-
/**
|
|
333
|
-
* - Only the first time the theme's app copy is written: see ThemeEditPreviewFields.
|
|
334
|
-
*/
|
|
335
|
-
appCopy?: {
|
|
336
|
-
wrote: string[];
|
|
337
|
-
} | undefined;
|
|
338
|
-
};
|
|
339
|
-
export type ThemeEditShowOptions = {
|
|
340
|
-
/**
|
|
341
|
-
* - The folder to start from (default: process.cwd()); commands act on the Astryx project at or above it.
|
|
342
|
-
*/
|
|
343
|
-
cwd?: string | undefined;
|
|
344
|
-
/**
|
|
345
|
-
* - Only one section of the sheet: actions, inputs, selection, navigation, feedback, data, containers, overlays, or pages.
|
|
346
|
-
*/
|
|
347
|
-
section?: string | undefined;
|
|
348
|
-
/**
|
|
349
|
-
* - Also take PNG pictures of the previews.
|
|
350
|
-
*/
|
|
351
|
-
png?: boolean | undefined;
|
|
352
|
-
/**
|
|
353
|
-
* - Only what one part shows, as a lookup that writes nothing (`themeEdit.showPart`); the theme may then be any theme the project builds.
|
|
354
|
-
*/
|
|
355
|
-
on?: string | undefined;
|
|
356
|
-
};
|
|
357
|
-
/**
|
|
358
|
-
* `astryx --json experimental theme editor show <theme>`.
|
|
359
|
-
*/
|
|
360
|
-
export type ThemeEditShowResponse = {
|
|
361
|
-
type: "themeEdit.show";
|
|
362
|
-
data: {
|
|
363
|
-
theme: string;
|
|
364
|
-
like: string | null;
|
|
365
|
-
mode: string;
|
|
366
|
-
settings: Array<ThemeEditSetting & {
|
|
367
|
-
parts: string[];
|
|
368
|
-
masked?: string;
|
|
369
|
-
}>;
|
|
370
|
-
resolved: Record<string, Record<string, string | null> | string | null>;
|
|
371
|
-
partValues: string[];
|
|
372
|
-
missed: Array<{
|
|
373
|
-
part: string;
|
|
374
|
-
state?: string;
|
|
375
|
-
why: string;
|
|
376
|
-
line: string;
|
|
377
|
-
}>;
|
|
378
|
-
unreached: string[];
|
|
379
|
-
vibrancy: number | null;
|
|
380
|
-
colors: ThemeEditColor[];
|
|
381
|
-
colorNotes: string[];
|
|
382
|
-
problems: string[];
|
|
383
|
-
openProblems: ThemeEditProblem[];
|
|
384
|
-
notes: string[];
|
|
385
|
-
preview: string;
|
|
386
|
-
previewStale?: string[] | undefined;
|
|
387
|
-
sheet: string;
|
|
388
|
-
sheetComponents: number;
|
|
389
|
-
skipped: string[];
|
|
390
|
-
pictures: string[];
|
|
391
|
-
pictureProblem: string | null;
|
|
392
|
-
look?: string | undefined;
|
|
393
|
-
colorFiles: {
|
|
394
|
-
config: string;
|
|
395
|
-
module: string;
|
|
396
|
-
receipt: string;
|
|
397
|
-
} | null;
|
|
398
|
-
appCopy?: {
|
|
399
|
-
wrote: string[];
|
|
400
|
-
} | undefined;
|
|
401
|
-
appCopyStale?: string | undefined;
|
|
402
|
-
wiring: string[];
|
|
403
|
-
};
|
|
404
|
-
};
|
|
405
|
-
/**
|
|
406
|
-
* `astryx --json experimental theme editor show <theme> --on <part>`: what one
|
|
407
|
-
* part of a theme shows. Nothing is written.
|
|
408
|
-
*/
|
|
409
|
-
export type ThemeEditShowPartResponse = {
|
|
410
|
-
type: "themeEdit.showPart";
|
|
411
|
-
data: {
|
|
412
|
-
theme: string;
|
|
413
|
-
kind: "editor" | "local" | "package" | "bundled";
|
|
414
|
-
part: string;
|
|
415
|
-
values: ThemeEditPartValue[];
|
|
416
|
-
};
|
|
417
|
-
};
|
|
418
|
-
/**
|
|
419
|
-
* One property of a part, as `show --on` gives it.
|
|
420
|
-
*/
|
|
421
|
-
export type ThemeEditPartValue = {
|
|
422
|
-
/**
|
|
423
|
-
* - The CSS property.
|
|
424
|
-
*/
|
|
425
|
-
property: string;
|
|
426
|
-
/**
|
|
427
|
-
* - The variant, as `set` takes `--when` (`variant:outlined`); null at rest. For a condition no flag of `set` reaches, the condition as Core writes it, with `notSettable`.
|
|
428
|
-
*/
|
|
429
|
-
when: string | null;
|
|
430
|
-
/**
|
|
431
|
-
* - The state, as `set` takes `--state`; null for none (and for a condition no flag reaches).
|
|
432
|
-
*/
|
|
433
|
-
state: string | null;
|
|
434
|
-
/**
|
|
435
|
-
* - Only for a condition no flag of `set` reaches (a CSS selector such as `:first-child`): why, as `how <part>` says it.
|
|
436
|
-
*/
|
|
437
|
-
notSettable?: string | undefined;
|
|
438
|
-
/**
|
|
439
|
-
* - The final value, every token written out; per mode when the modes differ; null when a token it reads has no value. A mode is left out where it is not shown yet (the other mode of a property or token a one-mode block sets on the part, with nothing else under that condition).
|
|
440
|
-
*/
|
|
441
|
-
value: string | {
|
|
442
|
-
light?: string | null;
|
|
443
|
-
dark?: string | null;
|
|
444
|
-
} | null;
|
|
445
|
-
/**
|
|
446
|
-
* - The declaration that gives it, as written: Core's, or the rule on the part; per mode when a rule sets one mode (a one-mode theme, or a `--mode` setting).
|
|
447
|
-
*/
|
|
448
|
-
expression: string | {
|
|
449
|
-
light?: string;
|
|
450
|
-
dark?: string;
|
|
451
|
-
};
|
|
452
|
-
/**
|
|
453
|
-
* - The tokens it reads, and the tokens those read in turn, in order; per mode when the modes read different ones.
|
|
454
|
-
*/
|
|
455
|
-
tokens: string[] | {
|
|
456
|
-
light?: string[];
|
|
457
|
-
dark?: string[];
|
|
458
|
-
};
|
|
459
|
-
/**
|
|
460
|
-
* - Who decides the value (not a setting's source, as in `show`'s settings): Core's default, the base theme the theme extends, or the theme's own file, a setting on the part included.
|
|
461
|
-
*/
|
|
462
|
-
source: "core" | "base" | "theme";
|
|
463
|
-
};
|
|
464
|
-
/**
|
|
465
|
-
* One color of a theme, as `show` reports it.
|
|
466
|
-
*/
|
|
467
|
-
export type ThemeEditColor = {
|
|
468
|
-
/**
|
|
469
|
-
* - The setting that makes it: accent, neutral, success, warning, danger or info.
|
|
470
|
-
*/
|
|
471
|
-
color: string;
|
|
472
|
-
/**
|
|
473
|
-
* - The color it is generated from, as hex.
|
|
474
|
-
*/
|
|
475
|
-
seed: string;
|
|
476
|
-
/**
|
|
477
|
-
* - The shade each token uses: `light <shade> <hex>, dark <shade> <hex>`, and whether an exact token setting wins.
|
|
478
|
-
*/
|
|
479
|
-
tokens: Record<string, string>;
|
|
480
|
-
};
|
|
481
|
-
export type ThemeEditUndoOptions = {
|
|
482
|
-
/**
|
|
483
|
-
* - The folder to start from (default: process.cwd()); commands act on the Astryx project at or above it.
|
|
484
|
-
*/
|
|
485
|
-
cwd?: string | undefined;
|
|
486
|
-
/**
|
|
487
|
-
* - Remove this one setting (a dial, a token, or a CSS property) instead of stepping back one change; the result's `now` says what applies instead.
|
|
488
|
-
*/
|
|
489
|
-
thing?: string | undefined;
|
|
490
|
-
/**
|
|
491
|
-
* - With `thing` `headings`: which half to remove, `weight` or `tracking`.
|
|
492
|
-
*/
|
|
493
|
-
value?: string | undefined;
|
|
494
|
-
/**
|
|
495
|
-
* - With `thing`: the part, group or role it was set on.
|
|
496
|
-
*/
|
|
497
|
-
on?: string | undefined;
|
|
498
|
-
/**
|
|
499
|
-
* - With `thing`: the variant it was set for.
|
|
500
|
-
*/
|
|
501
|
-
when?: string | undefined;
|
|
502
|
-
/**
|
|
503
|
-
* - With `thing`: the state it was set for.
|
|
504
|
-
*/
|
|
505
|
-
state?: string | undefined;
|
|
506
|
-
/**
|
|
507
|
-
* - With `thing`: the mode it was set for.
|
|
508
|
-
*/
|
|
509
|
-
mode?: string | undefined;
|
|
510
|
-
/**
|
|
511
|
-
* - With `thing`: whether it was set with `--only`.
|
|
512
|
-
*/
|
|
513
|
-
only?: boolean | undefined;
|
|
514
|
-
/**
|
|
515
|
-
* - Also take PNG pictures of the preview.
|
|
516
|
-
*/
|
|
517
|
-
png?: boolean | undefined;
|
|
518
|
-
};
|
|
519
|
-
/**
|
|
520
|
-
* `astryx --json experimental theme editor undo <theme>`: one step back.
|
|
521
|
-
* With a thing, undo returns a {@link ThemeEditChangeResponse} instead.
|
|
522
|
-
*/
|
|
523
|
-
export type ThemeEditUndoResponse = {
|
|
524
|
-
type: "themeEdit.undo";
|
|
525
|
-
/**
|
|
526
|
-
* - `undid` names what the step took back (each setting, base and mode, in one line); `refusedBefore` says a change command refused since the last change changed nothing, so the step took back the change before it; `next` names the change now on top, which the next undo takes back; `notes`, with `png`, the text the sample page's pictures draw cut short.
|
|
527
|
-
*/
|
|
528
|
-
data: {
|
|
529
|
-
theme: string;
|
|
530
|
-
action: "step";
|
|
531
|
-
undid: string;
|
|
532
|
-
refusedBefore?: string;
|
|
533
|
-
undone: string[];
|
|
534
|
-
next?: string;
|
|
535
|
-
settings: number;
|
|
536
|
-
stepsLeft: number;
|
|
537
|
-
changedTokens: string[];
|
|
538
|
-
changedPartTokens?: string[];
|
|
539
|
-
problems: string[];
|
|
540
|
-
newProblems: ThemeEditProblem[];
|
|
541
|
-
notes?: string[];
|
|
542
|
-
} & ThemeEditPreviewFields;
|
|
543
|
-
};
|
|
544
|
-
export type ThemeEditPreviewAddOptions = {
|
|
545
|
-
/**
|
|
546
|
-
* - The folder to start from (default: process.cwd()); commands act on the Astryx project at or above it.
|
|
547
|
-
*/
|
|
548
|
-
cwd?: string | undefined;
|
|
549
|
-
/**
|
|
550
|
-
* - The theme the pages wear: a theme made by `experimental theme editor` (default: the only one under themes/; with none or several, the app's own theme).
|
|
551
|
-
*/
|
|
552
|
-
theme?: string | undefined;
|
|
553
|
-
/**
|
|
554
|
-
* - Add this page template instead of ranking one from a description.
|
|
555
|
-
*/
|
|
556
|
-
template?: string | undefined;
|
|
557
|
-
/**
|
|
558
|
-
* - With a description: how many of the best-fitting page templates to add, 1 to 3 (default 1). A string is taken as typed: only "1", "2" or "3".
|
|
559
|
-
*/
|
|
560
|
-
top?: string | number | undefined;
|
|
561
|
-
/**
|
|
562
|
-
* - The folder of the preview route, inside the project (default: theme-preview/ in the app's routes folder, app/ or src/app/).
|
|
563
|
-
*/
|
|
564
|
-
path?: string | undefined;
|
|
565
|
-
};
|
|
566
|
-
/**
|
|
567
|
-
* `astryx --json experimental theme preview add [<description>]`.
|
|
568
|
-
*/
|
|
569
|
-
export type ThemeEditPreviewAddResponse = {
|
|
570
|
-
type: "themeEdit.previewAdd";
|
|
571
|
-
data: {
|
|
572
|
-
folder: string;
|
|
573
|
-
theme: string | null;
|
|
574
|
-
added: string[];
|
|
575
|
-
refreshed: string[];
|
|
576
|
-
matched: Array<{
|
|
577
|
-
page: string;
|
|
578
|
-
why: string;
|
|
579
|
-
}>;
|
|
580
|
-
skipped: Array<{
|
|
581
|
-
page: string;
|
|
582
|
-
reason: string;
|
|
583
|
-
installCommand: string | null;
|
|
584
|
-
installGuidance?: string;
|
|
585
|
-
}>;
|
|
586
|
-
notes: string[];
|
|
587
|
-
pages: string[];
|
|
588
|
-
files: string[];
|
|
589
|
-
open: string;
|
|
590
|
-
urls: Record<string, string>;
|
|
591
|
-
};
|
|
592
|
-
};
|
|
593
|
-
export type ThemeEditPreviewAppOptions = {
|
|
594
|
-
/**
|
|
595
|
-
* - The folder the app folder is inside (default: process.cwd()).
|
|
596
|
-
*/
|
|
597
|
-
cwd?: string | undefined;
|
|
598
|
-
/**
|
|
599
|
-
* - A theme made by `experimental theme editor` here: it is copied into the app, and the preview pages wear it (default: the app's own neutral theme).
|
|
600
|
-
*/
|
|
601
|
-
theme?: string | undefined;
|
|
602
|
-
};
|
|
603
|
-
/**
|
|
604
|
-
* `astryx --json experimental theme preview app <dir>`.
|
|
605
|
-
*/
|
|
606
|
-
export type ThemeEditPreviewAppResponse = {
|
|
607
|
-
type: "themeEdit.previewApp";
|
|
608
|
-
data: {
|
|
609
|
-
folder: string;
|
|
610
|
-
theme: string | null;
|
|
611
|
-
pages: string[];
|
|
612
|
-
files: string[];
|
|
613
|
-
notes: string[];
|
|
614
|
-
open: string;
|
|
615
|
-
urls: Record<string, string>;
|
|
616
|
-
};
|
|
617
|
-
};
|
|
618
|
-
export type ThemeEditPreviewListOptions = {
|
|
619
|
-
/**
|
|
620
|
-
* - The folder to start from (default: process.cwd()); commands act on the Astryx project at or above it.
|
|
621
|
-
*/
|
|
622
|
-
cwd?: string | undefined;
|
|
623
|
-
/**
|
|
624
|
-
* - The folder of the preview route, when it is not in the default place.
|
|
625
|
-
*/
|
|
626
|
-
path?: string | undefined;
|
|
627
|
-
};
|
|
628
|
-
/**
|
|
629
|
-
* `astryx --json experimental theme preview list`.
|
|
630
|
-
*/
|
|
631
|
-
export type ThemeEditPreviewListResponse = {
|
|
632
|
-
type: "themeEdit.previewList";
|
|
633
|
-
/**
|
|
634
|
-
* - `themeMissing`: the theme the preview wears is gone, so its route does not build; a page's `url`: its own URL in the running app; a page's `missing`: its file is gone; `notes`: what else to know, such as the command that fixes it.
|
|
635
|
-
*/
|
|
636
|
-
data: {
|
|
637
|
-
folder: string | null;
|
|
638
|
-
theme: string | null;
|
|
639
|
-
themeMissing: boolean;
|
|
640
|
-
pages: Array<{
|
|
641
|
-
id: string;
|
|
642
|
-
label: string;
|
|
643
|
-
url?: string;
|
|
644
|
-
missing?: boolean;
|
|
645
|
-
}>;
|
|
646
|
-
notes: string[];
|
|
647
|
-
};
|
|
648
|
-
};
|
|
649
|
-
/**
|
|
650
|
-
* `astryx --json experimental theme preview remove [<page>]`.
|
|
651
|
-
*/
|
|
652
|
-
export type ThemeEditPreviewRemoveResponse = {
|
|
653
|
-
type: "themeEdit.previewRemove";
|
|
654
|
-
data: {
|
|
655
|
-
folder: string;
|
|
656
|
-
removed: string[];
|
|
657
|
-
kept: string[];
|
|
658
|
-
missing: string[];
|
|
659
|
-
rewritten: string[];
|
|
660
|
-
notes: string[];
|
|
661
|
-
pages: string[];
|
|
662
|
-
};
|
|
663
|
-
};
|
|
664
|
-
export type ThemeEditHowOptions = {
|
|
665
|
-
/**
|
|
666
|
-
* - The folder to start from (default: process.cwd()); commands act on the Astryx project at or above it.
|
|
667
|
-
*/
|
|
668
|
-
cwd?: string | undefined;
|
|
669
|
-
/**
|
|
670
|
-
* - List what a change can name: dials, tokens, parts, groups, or properties (any case, singular or plural); the subject filters it. An empty string or `kinds` lists the kinds.
|
|
671
|
-
*/
|
|
672
|
-
list?: string | undefined;
|
|
673
|
-
/**
|
|
674
|
-
* - The theme the suggested commands are for, checked against its settings (default: the only theme the editor made in the app; with several, the one an editor command changed last; with none, `my-theme`, which the answer makes first). An empty name is refused.
|
|
675
|
-
*/
|
|
676
|
-
theme?: string | undefined;
|
|
677
|
-
/**
|
|
678
|
-
* - With a PNG picture: pixel points x,y, whole numbers inside the picture ("40,20;300,180", "40,20 300,180", several entries, or a flat "40,20,300,180").
|
|
679
|
-
*/
|
|
680
|
-
at?: string[] | undefined;
|
|
681
|
-
/**
|
|
682
|
-
* - With a PNG picture: how many main colors (default 14).
|
|
683
|
-
*/
|
|
684
|
-
count?: number | undefined;
|
|
685
|
-
/**
|
|
686
|
-
* - The words as typed after `how`: a picture first takes only a count after it (the count is read from the words); anything else is one question. Replaces `subject`.
|
|
687
|
-
*/
|
|
688
|
-
words?: string[] | undefined;
|
|
689
|
-
};
|
|
690
|
-
/**
|
|
691
|
-
* One result of a plain-words question (`data.results`, `kind: 'question'`).
|
|
692
|
-
*/
|
|
693
|
-
export type ThemeEditHowResult = {
|
|
694
|
-
/**
|
|
695
|
-
* - What the result does, or why it does nothing.
|
|
696
|
-
*/
|
|
697
|
-
text: string;
|
|
698
|
-
/**
|
|
699
|
-
* - The commands, each checked as `set` checks it.
|
|
700
|
-
*/
|
|
701
|
-
commands: string[];
|
|
702
|
-
/**
|
|
703
|
-
* - Run every command in order.
|
|
704
|
-
*/
|
|
705
|
-
sequence?: boolean | undefined;
|
|
706
|
-
/**
|
|
707
|
-
* - Commands left out, with the reason.
|
|
708
|
-
*/
|
|
709
|
-
refused?: {
|
|
710
|
-
command: string;
|
|
711
|
-
why: string;
|
|
712
|
-
run?: string[];
|
|
713
|
-
}[] | undefined;
|
|
714
|
-
/**
|
|
715
|
-
* - More than the ask (a colored variant changed too): never first, never the answer itself.
|
|
716
|
-
*/
|
|
717
|
-
offer?: boolean | undefined;
|
|
718
|
-
};
|
|
719
|
-
/**
|
|
720
|
-
* `astryx --json experimental theme editor how <subject>`. `kind` says which answer it is.
|
|
721
|
-
*/
|
|
722
|
-
export type ThemeEditHowResponse = {
|
|
723
|
-
type: "themeEdit.how";
|
|
724
|
-
data: {
|
|
725
|
-
kind: "part" | "group" | "setting" | "aspect" | "question" | "picture" | "list";
|
|
726
|
-
subject: string;
|
|
727
|
-
results?: ThemeEditHowResult[];
|
|
728
|
-
[key: string]: any;
|
|
729
|
-
};
|
|
730
|
-
};
|