@astryxdesign/cli 0.7.16 → 0.7.17-canary.g335a172
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -86
- package/api/build/_adapter.d.mts +12 -0
- package/api/build/_adapter.mjs +51 -34
- package/api/build/blocks/blocks.d.mts +7 -5
- package/api/build/blocks/blocks.mjs +113 -26
- package/api/build/build.doc.mjs +4 -3
- package/api/build/build.type.d.mts +2 -2
- package/api/build/build.type.mjs +3 -3
- package/api/build/kit/kind.d.mts +2 -1
- package/api/build/kit/kind.mjs +199 -10
- package/api/build/kit/kit.mjs +6 -4
- package/api/build/kit/rank.mjs +69 -16
- package/api/build/kit/start.d.mts +5 -4
- package/api/build/kit/start.mjs +12 -8
- package/api/build/kit/weights.d.mts +16 -3
- package/api/build/kit/weights.json +1 -1
- package/api/build/kit/weights.mjs +251 -35
- package/api/build/kit/word-model.d.mts +23 -0
- package/api/build/kit/word-model.mjs +46 -0
- package/api/build/kit/words.d.mts +48 -0
- package/api/build/kit/words.mjs +90 -1
- package/api/component/__fixtures__/resolutions/modules.txt +4 -5
- package/api/component/list/list.d.mts +1 -1
- package/api/component/list/list.mjs +48 -6
- package/api/discover/_adapter.d.mts +1 -1
- package/api/discover/search/search.mjs +3 -2
- package/api/docs/_adapter.d.mts +26 -2
- package/api/docs/_adapter.mjs +219 -6
- package/api/docs/docs.d.mts +3 -0
- package/api/docs/docs.doc.mjs +7 -1
- package/api/docs/docs.mjs +12 -0
- package/api/docs/docs.type.d.mts +5 -0
- package/api/docs/docs.type.mjs +2 -0
- package/api/docs/node/node.mjs +1 -1
- package/api/doctor/_adapter.d.mts +27 -5
- package/api/doctor/_adapter.mjs +83 -10
- package/api/doctor/built-checks.mjs +40 -14
- package/api/doctor/doctor.d.mts +4 -3
- package/api/doctor/doctor.mjs +14 -7
- package/api/doctor/theme-checks.mjs +121 -17
- package/api/icon/_records.mjs +2 -1
- package/api/index.d.mts +2 -0
- package/api/index.mjs +2 -0
- package/api/integration/_adapter.d.mts +44 -0
- package/api/integration/_adapter.mjs +77 -1
- package/api/integration/authoring-checks.mjs +6 -6
- package/api/integration/example-scope.d.mts +14 -0
- package/api/integration/example-scope.mjs +44 -0
- package/api/integration/example-scope.type.d.mts +29 -0
- package/api/integration/example-scope.type.mjs +25 -0
- package/api/integration/integrationExampleScope.doc.d.mts +11 -0
- package/api/integration/integrationExampleScope.doc.mjs +59 -0
- package/api/integration/validate-integration.mjs +19 -1
- package/api/integration/validate-integration.type.d.mts +9 -0
- package/api/integration/validate-integration.type.mjs +1 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/render/_adapter.mjs +591 -195
- package/api/render/render.doc.mjs +11 -3
- package/api/render/render.type.d.mts +52 -0
- package/api/render/render.type.mjs +31 -1
- package/api/search/ORDERING.md +1 -1
- package/api/search/_candidate-score.mjs +51 -32
- package/api/search/_fit-order.mjs +3 -3
- package/api/search/_gather-components.d.mts +3 -2
- package/api/search/_gather-components.mjs +12 -3
- package/api/search/_lexical.d.mts +5 -0
- package/api/search/_lexical.mjs +8 -2
- package/api/search/_result.d.mts +11 -9
- package/api/search/_result.mjs +4 -4
- package/api/search/_score.d.mts +6 -1
- package/api/search/_score.mjs +15 -3
- package/api/search/search-index.mjs +7 -1
- package/api/search/search.d.mts +1 -1
- package/api/theme/_adapter.mjs +12 -1
- package/api/theme/build/build.d.mts +60 -0
- package/api/theme/build/build.mjs +210 -54
- package/api/theme/build/font-warning.d.mts +8 -0
- package/api/theme/build/font-warning.mjs +19 -0
- package/api/theme/theme.type.d.mts +10 -0
- package/api/theme/theme.type.mjs +7 -1
- package/api/theme-edit/_adapter.d.mts +55 -0
- package/api/theme-edit/_adapter.mjs +673 -42
- package/api/theme-edit/_check.d.mts +28 -22
- package/api/theme-edit/_check.mjs +1858 -312
- package/api/theme-edit/_color.d.mts +10 -0
- package/api/theme-edit/_color.mjs +49 -1
- package/api/theme-edit/_compiler.mjs +9 -0
- package/api/theme-edit/_context.mjs +60 -3
- package/api/theme-edit/_css.mjs +21 -1
- package/api/theme-edit/_edit.d.mts +22 -0
- package/api/theme-edit/_edit.mjs +1533 -92
- package/api/theme-edit/_how-commands.d.mts +57 -0
- package/api/theme-edit/_how-commands.mjs +587 -1
- package/api/theme-edit/_how-question.d.mts +78 -0
- package/api/theme-edit/_how-question.mjs +4716 -235
- package/api/theme-edit/_how.mjs +134 -8
- package/api/theme-edit/_marks.d.mts +31 -5
- package/api/theme-edit/_marks.mjs +57 -5
- package/api/theme-edit/_normal.d.mts +219 -0
- package/api/theme-edit/_normal.mjs +1041 -0
- package/api/theme-edit/_palette.mjs +10 -4
- package/api/theme-edit/_parts.d.mts +8 -0
- package/api/theme-edit/_parts.mjs +103 -2
- package/api/theme-edit/_playwright-picture.d.mts +4 -0
- package/api/theme-edit/_playwright-picture.mjs +34 -0
- package/api/theme-edit/_preview-app.d.mts +7 -1
- package/api/theme-edit/_preview-app.mjs +394 -74
- package/api/theme-edit/_preview.d.mts +69 -8
- package/api/theme-edit/_preview.mjs +531 -108
- package/api/theme-edit/_settings.d.mts +243 -6
- package/api/theme-edit/_settings.mjs +2415 -147
- package/api/theme-edit/_tables.d.mts +6 -0
- package/api/theme-edit/_tables.mjs +44 -1
- package/api/theme-edit/_vet.d.mts +18 -0
- package/api/theme-edit/_vet.mjs +32 -0
- package/api/theme-edit/theme-edit.type.d.mts +10 -1
- package/api/theme-edit/theme-edit.type.mjs +4 -1
- package/api/theme-edit/themeEditHow.doc.mjs +1 -1
- package/api/theme-edit/themeEditNew.doc.mjs +1 -1
- package/api/theme-edit/themeEditPreviewApp.doc.mjs +3 -3
- package/api/theme-edit/themeEditPreviewRemove.doc.mjs +2 -2
- package/api/upgrade/run/run.mjs +4 -3
- package/assets/codemods/integration-discovery.mjs +2 -1
- package/assets/codemods/run-codemod.mjs +87 -7
- package/assets/codemods/transforms/next/index.mjs +11 -1
- package/assets/codemods/transforms/next/migrate-item-swipe-actions-to-swipe.mjs +394 -0
- package/assets/component-list.generated.json +1 -0
- package/assets/docs/author-a-theme.doc.mjs +1 -0
- package/assets/docs/theme.doc.dense.mjs +2 -2
- package/assets/docs/theme.doc.mjs +1 -1
- package/assets/docs/tree/check-your-docs.doc.mjs +1 -1
- package/assets/docs/tree/checks.doc.mjs +1 -1
- package/assets/docs/tree/cli-command.doc.mjs +2 -3
- package/assets/docs/tree/render-pages.doc.mjs +44 -3
- package/assets/docs/tree/single-component.doc.mjs +4 -0
- package/assets/docs/tree/template-doc-overview.doc.mjs +1 -1
- package/assets/docs/tree/test-in-an-app.doc.mjs +1 -1
- package/assets/docs/use-a-theme.doc.mjs +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/ChatComposerInput/useChatDictationHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/ChatComposerInput/useChatDictationHookUsage.tsx +38 -0
- package/assets/templates/blocks/components/Hooks/useContainerRevealHookUsage.tsx +2 -2
- package/assets/templates/blocks/components/SyntaxTheme/useSyntaxThemeHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/SyntaxTheme/useSyntaxThemeHookUsage.tsx +36 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/template.doc.mjs +5 -4
- package/assets/templates/pages/ai-chat-landing/template.doc.mjs +2 -1
- package/assets/templates/pages/blank/template.doc.mjs +1 -1
- package/assets/templates/pages/canvas-editor/template.doc.mjs +4 -2
- package/assets/templates/pages/centered-hero/template.doc.mjs +9 -1
- package/assets/templates/pages/classic-gallery/template.doc.mjs +1 -1
- package/assets/templates/pages/contact-form/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard/template.doc.mjs +3 -2
- package/assets/templates/pages/dashboard-alert-rail/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard-cohort-funnel/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard-composition/template.doc.mjs +2 -1
- package/assets/templates/pages/dashboard-progress/template.doc.mjs +6 -3
- package/assets/templates/pages/detail-page/template.doc.mjs +10 -3
- package/assets/templates/pages/documentation/template.doc.mjs +4 -1
- package/assets/templates/pages/documentation-design/template.doc.mjs +7 -1
- package/assets/templates/pages/documentation-technical/template.doc.mjs +7 -1
- package/assets/templates/pages/editor/template.doc.mjs +2 -8
- package/assets/templates/pages/file-explorer/template.doc.mjs +1 -1
- package/assets/templates/pages/form-two-column/template.doc.mjs +4 -3
- package/assets/templates/pages/form-wizard/template.doc.mjs +5 -3
- package/assets/templates/pages/gallery-hero/template.doc.mjs +4 -2
- package/assets/templates/pages/ide/page.tsx +24 -2
- package/assets/templates/pages/kanban-board/template.doc.mjs +1 -9
- package/assets/templates/pages/library/template.doc.mjs +4 -1
- package/assets/templates/pages/login/template.doc.mjs +2 -1
- package/assets/templates/pages/login-card/template.doc.mjs +2 -1
- package/assets/templates/pages/login-split/template.doc.mjs +2 -1
- package/assets/templates/pages/login-sso/template.doc.mjs +4 -2
- package/assets/templates/pages/mixed-gallery/template.doc.mjs +2 -1
- package/assets/templates/pages/product-detail/template.doc.mjs +4 -2
- package/assets/templates/pages/product-gallery/template.doc.mjs +2 -1
- package/assets/templates/pages/settings-dialog/template.doc.mjs +2 -1
- package/assets/templates/pages/settings-sidebar/template.doc.mjs +2 -1
- package/assets/templates/pages/shell-nav/template.doc.mjs +4 -2
- package/assets/templates/pages/shell-side-nav/template.doc.mjs +5 -3
- package/assets/templates/pages/shell-top-nav/template.doc.mjs +2 -1
- package/assets/templates/pages/side-gallery/template.doc.mjs +9 -1
- package/assets/templates/pages/table-filter/template.doc.mjs +9 -8
- package/assets/templates/pages/table-grouped/template.doc.mjs +4 -2
- package/assets/templates/pages/table-page/template.doc.mjs +5 -4
- package/assets/templates/pages/table-tree/template.doc.mjs +6 -3
- package/assets/templates/pages/theme-showcase/template.doc.mjs +2 -9
- package/assets/templates/pages/work-item-detail/template.doc.mjs +1 -0
- package/assets/theme.template.ts +6 -0
- package/authoring/debug/parse.d.mts +3 -3
- package/authoring/doctypes/_schema.d.mts +3 -3
- package/authoring/doctypes/command/command.doc.mjs +1 -1
- package/authoring/doctypes/component/categories.d.mts +37 -0
- package/authoring/doctypes/component/categories.mjs +54 -0
- package/authoring/doctypes/template/template.doc.mjs +1 -1
- package/authoring/doctypes/template/type.ts +9 -0
- package/authoring/example/example.doc.d.mts +12 -0
- package/authoring/example/example.doc.mjs +69 -0
- package/authoring/example/preview.d.mts +92 -0
- package/authoring/example/preview.mjs +994 -0
- package/authoring/example/type.ts +102 -0
- package/authoring/index.d.mts +1 -0
- package/authoring/index.d.ts +12 -0
- package/authoring/index.mjs +3 -1
- package/clients/cli/bin/astryx.mjs +6 -9
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -1
- package/clients/cli/commands/component.mjs +22 -3
- package/clients/cli/commands/docs.doc.mjs +7 -1
- package/clients/cli/commands/docs.mjs +3 -1
- package/clients/cli/commands/doctor.mjs +32 -14
- package/clients/cli/commands/experimental/render.mjs +42 -1
- package/clients/cli/commands/experimental/theme.mjs +145 -16
- package/clients/cli/commands/experimental-render.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +3 -3
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +87 -1
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +2 -2
- package/clients/cli/commands/experimental-theme-editor.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -1
- package/clients/cli/commands/experimental-theme-preview-remove.doc.mjs +2 -2
- package/clients/cli/commands/search.doc.mjs +2 -1
- package/clients/cli/commands/search.mjs +6 -1
- package/clients/cli/commands/template.mjs +4 -2
- package/clients/cli/commands/theme-build.doc.mjs +5 -1
- package/clients/cli/commands/theme.doc.mjs +1 -1
- package/clients/cli/commands/theme.mjs +183 -6
- package/clients/cli/commands/upgrade.mjs +42 -7
- package/clients/cli/index.mjs +1 -1
- package/clients/cli/lib/cli-error.mjs +2 -1
- package/clients/cli/lib/component-format.mjs +205 -98
- package/clients/cli/lib/hook-format.mjs +9 -19
- package/clients/cli/lib/json-shim.mjs +77 -21
- package/clients/cli/lib/manifest.mjs +3 -2
- package/clients/cli/manifest.generated.json +1 -1
- package/foundation/agent-docs/agent-docs.mjs +1 -1
- package/foundation/config/theme-state.d.mts +13 -1
- package/foundation/config/theme-state.mjs +47 -7
- package/foundation/discovery/authoring-self-docs.mjs +1 -0
- package/foundation/discovery/component-discovery.d.mts +11 -0
- package/foundation/discovery/component-discovery.mjs +56 -8
- package/foundation/discovery/component-replacement.mjs +130 -1
- package/foundation/discovery/copied-passages.mjs +2 -1
- package/foundation/discovery/doc-types.mjs +4 -3
- package/foundation/discovery/entry-name-files.d.mts +43 -0
- package/foundation/discovery/entry-name-files.mjs +264 -0
- package/foundation/discovery/hook-discovery.d.mts +8 -2
- package/foundation/discovery/hook-discovery.mjs +22 -8
- package/foundation/discovery/icon-definition-discovery.mjs +2 -1
- package/foundation/discovery/icon-set-checks.mjs +2 -1
- package/foundation/discovery/icon-set-discovery.mjs +2 -1
- package/foundation/discovery/integration-doc-files.mjs +2 -1
- package/foundation/discovery/package-exports.d.mts +10 -0
- package/foundation/discovery/package-exports.mjs +56 -3
- package/foundation/discovery/prop-drift.mjs +9 -9
- package/foundation/discovery/runner-allowlist.d.mts +1 -0
- package/foundation/discovery/runner-allowlist.mjs +2 -0
- package/foundation/discovery/stored-component-list.d.mts +43 -0
- package/foundation/discovery/stored-component-list.mjs +90 -0
- package/foundation/discovery/stored-self-audit.d.mts +26 -10
- package/foundation/discovery/stored-self-audit.mjs +38 -18
- package/foundation/discovery/template-adapter.d.mts +52 -0
- package/foundation/discovery/template-adapter.mjs +176 -12
- package/foundation/discovery/template-icons.mjs +2 -1
- package/foundation/discovery/theme-discovery.mjs +3 -2
- package/foundation/discovery/theme-imports.d.mts +14 -0
- package/foundation/discovery/theme-imports.mjs +43 -1
- package/foundation/discovery/theming-targets.mjs +3 -2
- package/foundation/doc-compiler/import.mjs +7 -1
- package/foundation/doc-compiler/inputs.mjs +3 -2
- package/foundation/doc-compiler/parse-readable.mjs +4 -1
- package/foundation/doc-compiler/stored-docs.d.mts +22 -0
- package/foundation/doc-compiler/stored-docs.mjs +49 -0
- package/foundation/env/semver.mjs +3 -1
- package/foundation/fonts/font-stylesheet.d.mts +31 -0
- package/foundation/fonts/font-stylesheet.mjs +115 -0
- package/foundation/fs/cache-eviction.d.mts +21 -0
- package/foundation/fs/cache-eviction.mjs +73 -0
- package/foundation/fs/file-protection.mjs +4 -3
- package/foundation/fs/gather-cache.d.mts +25 -4
- package/foundation/fs/gather-cache.mjs +164 -55
- package/foundation/fs/jiti-cache.d.mts +19 -1
- package/foundation/fs/jiti-cache.mjs +130 -6
- package/foundation/fs/kept-tree.d.mts +60 -0
- package/foundation/fs/kept-tree.mjs +154 -0
- package/foundation/fs/listing-cache.d.mts +7 -0
- package/foundation/fs/listing-cache.mjs +10 -0
- package/foundation/fs/module-loader.d.mts +24 -2
- package/foundation/fs/module-loader.mjs +94 -21
- package/foundation/fs/paths.d.mts +18 -0
- package/foundation/fs/paths.mjs +15 -2
- package/foundation/identity/provider-identity.d.mts +6 -0
- package/foundation/identity/provider-identity.mjs +10 -1
- package/foundation/integrations/contribution-inventory.mjs +4 -3
- package/foundation/integrations/example-code.d.mts +63 -0
- package/foundation/integrations/example-code.mjs +416 -0
- package/foundation/integrations/public-imports.d.mts +9 -0
- package/foundation/integrations/public-imports.mjs +3 -2
- package/foundation/integrations/validate-contributions.mjs +17 -45
- package/foundation/render/embedded-files.d.mts +6 -0
- package/foundation/render/embedded-files.mjs +25 -5
- package/foundation/render/embedded-imports.d.mts +39 -7
- package/foundation/render/embedded-imports.mjs +66 -27
- package/foundation/render/file-header.d.mts +66 -0
- package/foundation/render/file-header.mjs +118 -0
- package/foundation/render/host-answer.d.mts +18 -0
- package/foundation/render/host-answer.mjs +46 -0
- package/foundation/render/host-exit.d.mts +1 -0
- package/foundation/render/host-exit.mjs +6 -1
- package/foundation/render/html-reader.d.mts +55 -2
- package/foundation/render/html-reader.mjs +145 -26
- package/foundation/render/markup-edits.d.mts +57 -0
- package/foundation/render/markup-edits.mjs +182 -0
- package/foundation/render/page-host.mjs +29 -12
- package/foundation/render/page-worker.mjs +121 -13
- package/foundation/render/rebuild.mjs +2 -1
- package/foundation/render/render-page.d.mts +35 -3
- package/foundation/render/render-page.mjs +316 -42
- package/foundation/render/source-block.d.mts +85 -6
- package/foundation/render/source-block.mjs +211 -20
- package/foundation/render/ts-paths.d.mts +69 -6
- package/foundation/render/ts-paths.mjs +326 -40
- package/foundation/response/error-codes.d.mts +3 -1
- package/foundation/response/error-codes.d.ts +1 -0
- package/foundation/response/error-codes.doc.mjs +12 -1
- package/foundation/response/error-codes.mjs +11 -1
- package/foundation/response/response-types.doc.mjs +2 -2
- package/foundation/text/compare-text.d.mts +14 -0
- package/foundation/text/compare-text.mjs +68 -0
- package/foundation/text/string-utils.d.mts +3 -2
- package/foundation/text/string-utils.mjs +18 -4
- package/foundation/text/suggest-order.d.mts +9 -0
- package/foundation/text/suggest-order.mjs +15 -1
- package/foundation/xle/expand.mjs +2 -1
- package/host/index.mjs +8 -6
- package/package.json +7 -6
|
@@ -30,7 +30,10 @@ import {
|
|
|
30
30
|
text,
|
|
31
31
|
} from '../../formatters/index.mjs';
|
|
32
32
|
import {cliError} from '../../lib/cli-error.mjs';
|
|
33
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
editorMissingArgument,
|
|
35
|
+
setEditorThemeList,
|
|
36
|
+
} from '../../lib/json-shim.mjs';
|
|
34
37
|
import {AstryxError} from '../../../../api/error.mjs';
|
|
35
38
|
import {defineCommand} from '../../lib/define-command.mjs';
|
|
36
39
|
import {
|
|
@@ -49,6 +52,11 @@ import {
|
|
|
49
52
|
dialValueFits,
|
|
50
53
|
newFlagList,
|
|
51
54
|
editorCompileProblem,
|
|
55
|
+
editorFollowCompile,
|
|
56
|
+
editorThemesAt,
|
|
57
|
+
editorBuildExtra,
|
|
58
|
+
editorLoadedFonts,
|
|
59
|
+
editorColorModes,
|
|
52
60
|
editorThemeHold,
|
|
53
61
|
editorThemeRefusal,
|
|
54
62
|
editorMissingSource,
|
|
@@ -484,7 +492,16 @@ function flagValues(name) {
|
|
|
484
492
|
*/
|
|
485
493
|
function changeBlocks(r) {
|
|
486
494
|
const d = r.data;
|
|
487
|
-
|
|
495
|
+
// The status line names the value as saved, with a quote or space mark
|
|
496
|
+
// the text output would fold written as its CSS escape (\201C), so the
|
|
497
|
+
// text and the JSON name the same value.
|
|
498
|
+
const s = {
|
|
499
|
+
...d.setting,
|
|
500
|
+
value: String(d.setting.value).replace(
|
|
501
|
+
/[\u00A0\u00AB\u00BB\u2000-\u200B\u2018-\u201F\u2039\u203A\u202F\u3000\u300C-\u300F]/g,
|
|
502
|
+
c => `\\${c.codePointAt(0)?.toString(16).toUpperCase()} `,
|
|
503
|
+
),
|
|
504
|
+
};
|
|
488
505
|
const status =
|
|
489
506
|
d.was != null
|
|
490
507
|
? `[ok] ${d.theme}: ${s.thing} ${d.was} -> ${s.value}`
|
|
@@ -639,7 +656,14 @@ function strayOption(command, rest) {
|
|
|
639
656
|
},
|
|
640
657
|
);
|
|
641
658
|
}
|
|
642
|
-
|
|
659
|
+
// A value pasted with a token's label (`'--color-accent: #e11d48'`) is
|
|
660
|
+
// a value, read by the label reader, not an option.
|
|
661
|
+
const word = rest.find(
|
|
662
|
+
w =>
|
|
663
|
+
typeof w === 'string' &&
|
|
664
|
+
w.startsWith('--') &&
|
|
665
|
+
!/^--[a-z0-9-]+\s*:\s*\S/i.test(w),
|
|
666
|
+
);
|
|
643
667
|
if (word == null) return null;
|
|
644
668
|
return cliError(
|
|
645
669
|
`unknown option '${word}': only the thing a change names may start with -- (a design token such as --color-accent).`,
|
|
@@ -655,6 +679,42 @@ function strayOption(command, rest) {
|
|
|
655
679
|
);
|
|
656
680
|
}
|
|
657
681
|
|
|
682
|
+
/**
|
|
683
|
+
* Refuse an option `show` does not take with a show that works: the same
|
|
684
|
+
* show without it (`--png=false` is no --png, `--png=true` is --png), the
|
|
685
|
+
* nearest option it takes, and its help. Null when there is none.
|
|
686
|
+
* @param {string} name
|
|
687
|
+
* @param {unknown[]} rest the words after the theme
|
|
688
|
+
* @param {{png?: boolean, section?: string}} o the options read
|
|
689
|
+
*/
|
|
690
|
+
function showStray(name, rest, o) {
|
|
691
|
+
const stray = rest.map(String).find(w => w.startsWith('-'));
|
|
692
|
+
if (stray == null) return null;
|
|
693
|
+
const [flag, value] = stray.split('=');
|
|
694
|
+
const takes = ['--png', '--section', '--json'];
|
|
695
|
+
const on = value != null && /^(true|yes|1)$/i.test(value);
|
|
696
|
+
const off = value != null && /^(false|no|0)$/i.test(value);
|
|
697
|
+
const near = takes
|
|
698
|
+
.map(t => ({t, d: levenshteinDistance(flag.toLowerCase(), t)}))
|
|
699
|
+
.filter(x => x.d <= 2)
|
|
700
|
+
.sort((a, b) => a.d - b.d)[0]?.t;
|
|
701
|
+
const meant = takes.includes(flag.toLowerCase()) ? flag.toLowerCase() : near;
|
|
702
|
+
const png =
|
|
703
|
+
(o.png && !(meant === '--png' && off)) || (meant === '--png' && on);
|
|
704
|
+
const json = meant === '--json' && on;
|
|
705
|
+
const line = `${EDITOR} show ${name}${o.section ? ` --section ${o.section}` : ''}${png ? ' --png' : ''}${json ? ' --json' : ''}`;
|
|
706
|
+
return cliError(
|
|
707
|
+
`unknown option '${stray}'${meant && meant !== flag ? ` (did you mean ${meant}?)` : value != null && meant === flag ? ` (${flag} takes no value)` : ''}.`,
|
|
708
|
+
{
|
|
709
|
+
suggestions: [
|
|
710
|
+
{name: cmd(line), reason: 'do this instead'},
|
|
711
|
+
{name: cmd(`${EDITOR} show --help`), reason: 'every option it takes'},
|
|
712
|
+
],
|
|
713
|
+
code: ERROR_CODES.ERR_INVALID_OPTION,
|
|
714
|
+
},
|
|
715
|
+
);
|
|
716
|
+
}
|
|
717
|
+
|
|
658
718
|
/**
|
|
659
719
|
* A refusal for words after what a command takes, which would otherwise be
|
|
660
720
|
* dropped without a word; null when there are none.
|
|
@@ -777,12 +837,32 @@ function defineGroup(parent, doc) {
|
|
|
777
837
|
return cmd;
|
|
778
838
|
}
|
|
779
839
|
|
|
840
|
+
/**
|
|
841
|
+
* A preview command's result, once it is in: this client owns its process,
|
|
842
|
+
* so a stop that lands while the result is printed is held, and a printed
|
|
843
|
+
* ok never ends with exit 130. The API itself leaves no listener behind.
|
|
844
|
+
* @template T
|
|
845
|
+
* @param {Promise<T>} result
|
|
846
|
+
* @returns {Promise<T>}
|
|
847
|
+
*/
|
|
848
|
+
async function resultStands(result) {
|
|
849
|
+
const r = await result;
|
|
850
|
+
for (const sig of /** @type {const} */ (['SIGINT', 'SIGTERM']))
|
|
851
|
+
if (!process.listeners(sig).includes(heldStop)) process.on(sig, heldStop);
|
|
852
|
+
return r;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/** A stop after a preview command finished: its result stands. */
|
|
856
|
+
function heldStop() {}
|
|
857
|
+
|
|
780
858
|
/**
|
|
781
859
|
* Register `theme` and its subcommands under the `experimental` group.
|
|
782
860
|
* @param {import('commander').Command} group the `experimental` command
|
|
783
861
|
* @param {import('commander').Command} program the root program
|
|
784
862
|
*/
|
|
785
863
|
export function registerExperimentalTheme(group, program) {
|
|
864
|
+
// A command run with no theme names the app's only theme.
|
|
865
|
+
setEditorThemeList(editorThemesAt);
|
|
786
866
|
const theme = defineGroup(group, groupDoc);
|
|
787
867
|
explained(theme, groupDoc);
|
|
788
868
|
theme.addHelpText(
|
|
@@ -824,6 +904,35 @@ export function registerExperimentalTheme(group, program) {
|
|
|
824
904
|
(/** @type {string} */ w) =>
|
|
825
905
|
/^-/.test(w) && !takes.has(w.split('=')[0]),
|
|
826
906
|
);
|
|
907
|
+
// `--base` is the dial new takes as --like.
|
|
908
|
+
if (stray && stray.split('=')[0] === '--base') {
|
|
909
|
+
const args = (cmd?.args ?? []).slice(1).map(String);
|
|
910
|
+
const at = args.indexOf(stray);
|
|
911
|
+
const value = stray.includes('=')
|
|
912
|
+
? stray.slice(stray.indexOf('=') + 1)
|
|
913
|
+
: args[at + 1];
|
|
914
|
+
return cliError(
|
|
915
|
+
`new takes the base theme as --like, not --base.`,
|
|
916
|
+
{
|
|
917
|
+
suggestions: value
|
|
918
|
+
? [
|
|
919
|
+
{
|
|
920
|
+
name: cliLine(
|
|
921
|
+
`${EDITOR} new ${quoteCommandArgument(name)}${newFlagLine({...o, like: value})}`,
|
|
922
|
+
),
|
|
923
|
+
reason: 'do this instead',
|
|
924
|
+
},
|
|
925
|
+
]
|
|
926
|
+
: [
|
|
927
|
+
{
|
|
928
|
+
name: cliLine(`${EDITOR} new --help`),
|
|
929
|
+
reason: 'every option it takes',
|
|
930
|
+
},
|
|
931
|
+
],
|
|
932
|
+
code: ERROR_CODES.ERR_INVALID_OPTION,
|
|
933
|
+
},
|
|
934
|
+
);
|
|
935
|
+
}
|
|
827
936
|
if (stray)
|
|
828
937
|
return cliError(`unknown option '${stray}'.`, {
|
|
829
938
|
suggestions: [
|
|
@@ -908,10 +1017,17 @@ export function registerExperimentalTheme(group, program) {
|
|
|
908
1017
|
// A declaration pasted as one argument (`--color-accent: #e11d48`,
|
|
909
1018
|
// or `--color-accent:#e11d48`) is the token and its value; with no
|
|
910
1019
|
// value otherwise, the missing-argument error the parser gives.
|
|
1020
|
+
// A pasted JSON object of settings goes to the editor whole, which
|
|
1021
|
+
// gives one set line per entry.
|
|
1022
|
+
if (!value.length && /^\s*\{/.test(thing)) value = [''];
|
|
911
1023
|
if (!value.length) {
|
|
912
1024
|
// Any thing, a token or a dial, with `:` or `=` (`accent: red`,
|
|
913
1025
|
// `--color-accent=#e11d48`).
|
|
914
|
-
|
|
1026
|
+
// A thing and its value in one word (`'corners pill'`) are the
|
|
1027
|
+
// same as given apart.
|
|
1028
|
+
const pasted =
|
|
1029
|
+
/^(\S+?)\s*[:=]\s*(.+?);?\s*$/.exec(thing) ??
|
|
1030
|
+
/^\s*(\S+)\s+(.+?)\s*$/.exec(thing);
|
|
915
1031
|
if (!pasted)
|
|
916
1032
|
return missingSetValue(
|
|
917
1033
|
editor.commands.find(c => c.name() === 'set'),
|
|
@@ -941,6 +1057,7 @@ export function registerExperimentalTheme(group, program) {
|
|
|
941
1057
|
/** @type {any} */ o,
|
|
942
1058
|
/** @type {any} */ c,
|
|
943
1059
|
) =>
|
|
1060
|
+
showStray(name, (c?.args ?? []).slice(1), o) ??
|
|
944
1061
|
extraWords('show', (c?.args ?? []).slice(1)) ??
|
|
945
1062
|
// The sheet is limited to one section (the docs say so): a second
|
|
946
1063
|
// --section is refused, never kept over the first in silence.
|
|
@@ -974,6 +1091,8 @@ export function registerExperimentalTheme(group, program) {
|
|
|
974
1091
|
),
|
|
975
1092
|
}),
|
|
976
1093
|
showDoc,
|
|
1094
|
+
// An unknown option reaches the action, which names a show that works.
|
|
1095
|
+
{tokens: true},
|
|
977
1096
|
);
|
|
978
1097
|
|
|
979
1098
|
explained(
|
|
@@ -1026,13 +1145,15 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1026
1145
|
program,
|
|
1027
1146
|
() =>
|
|
1028
1147
|
previewFlagsOnce('add', ['theme', 'template', 'top', 'path']) ??
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1148
|
+
resultStands(
|
|
1149
|
+
themeEditPreviewAdd([words ?? []].flat().join(' ') || undefined, {
|
|
1150
|
+
cwd: process.cwd(),
|
|
1151
|
+
theme: o.theme,
|
|
1152
|
+
template: o.template,
|
|
1153
|
+
top: o.top,
|
|
1154
|
+
path: o.path,
|
|
1155
|
+
}),
|
|
1156
|
+
),
|
|
1036
1157
|
r => {
|
|
1037
1158
|
const {matched, skipped, ...rest} = r.data;
|
|
1038
1159
|
return [
|
|
@@ -1073,10 +1194,12 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1073
1194
|
program,
|
|
1074
1195
|
() =>
|
|
1075
1196
|
previewFlagsOnce('app', ['theme']) ??
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1197
|
+
resultStands(
|
|
1198
|
+
themeEditPreviewApp(dir, {
|
|
1199
|
+
cwd: process.cwd(),
|
|
1200
|
+
theme: o.theme,
|
|
1201
|
+
}),
|
|
1202
|
+
),
|
|
1080
1203
|
r => [
|
|
1081
1204
|
`[ok] new app in ${r.data.folder} with the theme preview`,
|
|
1082
1205
|
...project(/** @type {any} */ (r.data)),
|
|
@@ -1157,7 +1280,9 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1157
1280
|
program,
|
|
1158
1281
|
() =>
|
|
1159
1282
|
previewFlagsOnce('remove', ['path']) ??
|
|
1160
|
-
|
|
1283
|
+
resultStands(
|
|
1284
|
+
themeEditPreviewRemove(page, {cwd: process.cwd(), path: o.path}),
|
|
1285
|
+
),
|
|
1161
1286
|
r => [
|
|
1162
1287
|
r.data.pages.length
|
|
1163
1288
|
? `[ok] removed ${page} from the theme preview`
|
|
@@ -1303,9 +1428,13 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1303
1428
|
build: 'compile',
|
|
1304
1429
|
explain: editorThemeRefusal,
|
|
1305
1430
|
preflight: editorCompileProblem,
|
|
1431
|
+
follow: editorFollowCompile,
|
|
1306
1432
|
missingSource: editorMissingSource,
|
|
1307
1433
|
template: editorThemeTemplate,
|
|
1308
1434
|
hold: editorThemeHold,
|
|
1435
|
+
loadedFonts: editorLoadedFonts,
|
|
1436
|
+
extraData: editorBuildExtra,
|
|
1437
|
+
colorModes: editorColorModes,
|
|
1309
1438
|
},
|
|
1310
1439
|
);
|
|
1311
1440
|
}
|
|
@@ -16,7 +16,7 @@ export const doc = {
|
|
|
16
16
|
summary:
|
|
17
17
|
'Render a page to one self-contained HTML file, or turn one back into a page',
|
|
18
18
|
description:
|
|
19
|
-
"Renders the page's default export with the project's own Astryx components and writes ONE static HTML file that needs nothing beside it: no script runs and nothing loads from the network, so it opens anywhere, including a sandboxed frame with a strict content security policy, and follows the viewer's light or dark scheme. The page's own StyleX compiles, only the Core CSS rules the page uses are inlined, local images become data: URIs, and the page's source is embedded. Warnings name anything that may not look as meant, such as a component that did not render the text it was given (ListItem takes label=, not children). --reverse writes the embedded source back byte for byte; a file with Astryx markup but no embedded source is rebuilt from its components (text and layout only, as a starting point); any other HTML is refused. Experimental: it may change or be removed in a patch release.",
|
|
19
|
+
"Renders the page's default export with the project's own Astryx components and writes ONE static HTML file that needs nothing beside it: no script runs and nothing loads from the network, so it opens anywhere, including a sandboxed frame with a strict content security policy, and follows the viewer's light or dark scheme. The page's own StyleX compiles, only the Core CSS rules the page uses are inlined, local images become data: URIs, and the page's source is embedded. Warnings name anything that may not look as meant, such as a component that did not render the text it was given (ListItem takes label=, not children). The file opens with a plain note for whoever opens it next: the CLI version and render format that made it, the page's path, the files it carries, the packages it rendered with, and the exact commands that give the page back and render it again. --reverse (the way back, or unrender) writes the embedded source back byte for byte and names any text someone changed in the HTML after the render, with the file and line that hold the old text; a file with Astryx markup but no embedded source is rebuilt from its components (text and layout only, as a starting point); any other HTML is refused. Experimental: it may change or be removed in a patch release.",
|
|
20
20
|
fn: 'render',
|
|
21
21
|
args: [{name: 'file', param: 'file', required: false}],
|
|
22
22
|
options: [
|
|
@@ -53,7 +53,7 @@ export const doc = {
|
|
|
53
53
|
{code: 0, when: 'the file was written (warnings included)'},
|
|
54
54
|
{
|
|
55
55
|
code: 1,
|
|
56
|
-
when: 'no file, a wrong extension, a missing file, a page that does not compile, has no default export, imports a package that is not installed, reads a browser API while rendering, throws, crashes Node, or takes over 60 seconds; a file to write outside the current folder; with --reverse, an existing output without --overwrite, a damaged embedded source, or HTML that is not an Astryx page',
|
|
56
|
+
when: 'no file, a wrong extension, a missing file, a page that does not compile, has no default export, imports a package that is not installed, reads a browser API while rendering, throws, crashes Node, or takes over 60 seconds; a file to write outside the current folder; with --reverse, an existing output without --overwrite, a damaged embedded source, a file in a newer render format than this CLI reads, or HTML that is not an Astryx page',
|
|
57
57
|
},
|
|
58
58
|
],
|
|
59
59
|
related: ['template', 'build'],
|
|
@@ -14,7 +14,7 @@ export const doc = {
|
|
|
14
14
|
stability: 'experimental',
|
|
15
15
|
summary: 'Compile standalone themes or one keyed theme family',
|
|
16
16
|
description:
|
|
17
|
-
|
|
17
|
+
"Compiles defineTheme() sources through the same theme pipeline into scoped CSS, standard ESM, and type declarations. Compiling a theme made by experimental theme editor (themes/<theme>/<theme>.theme.ts, or its app copy src/themes/<theme>/<Theme>Theme.ts) takes that theme's lock and also writes its app copy in src/themes/<theme>/ again; --check fails while that copy is behind or gone. Ordinary mode writes one complete set per theme. --family combines one selected extension tree into the three files named by the required --family-key, ready for one CSS load and identity-only switching. With --check it writes nothing and reports source drift. --icons-specifier keeps its existing generated-module behavior. It prints one line per built theme and one line naming fonts the themes do not load; --detail full adds the install example and the font recipe, once for a batch.",
|
|
18
18
|
fn: 'themeBuild',
|
|
19
19
|
args: [
|
|
20
20
|
{
|
|
@@ -39,7 +39,7 @@ export const doc = {
|
|
|
39
39
|
flag: '-o, --out <path>',
|
|
40
40
|
param: 'options.out',
|
|
41
41
|
description:
|
|
42
|
-
|
|
42
|
+
"Output CSS file path, relative or absolute; the .js and .d.ts are written beside it (default: <theme name>.css next to the source). A folder, or a path ending in /, writes <theme name>.css into it. The path should end in .css; another name still builds, with a warning. A build never replaces the theme source (ERR_THEME_INVALID). At a path --out names, it replaces its own earlier outputs, and the output of another theme source with a warning that names both sources; any other existing file fails with ERR_FILE_EXISTS and nothing is written. Into a folder the theme editor made (folder <slug>/ holds <slug>.settings.json), a source outside that folder builds there too, with a warning; to keep the editor folder to its own theme, build beside the source, or pass an --out outside it. A build writes only inside the working directory, the defaults beside the source too (ERR_PATH_TRAVERSAL); --check writes nothing, so it compares outputs anywhere and refuses only a relative path that escapes the working directory. Single theme only: refused with more than one file or with --family (ERR_THEME_INVALID) An --out in an editor theme's app copy folder (src/themes/<theme>/, the folder itself too) is refused (ERR_INVALID_ARGUMENT): the editor writes that folder after every build",
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
flag: '--icons-specifier <specifier>',
|
|
@@ -89,7 +89,7 @@ export const doc = {
|
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
code: 1,
|
|
92
|
-
when:
|
|
92
|
+
when: "a build or validation error (an error envelope), or --check finds stale or missing outputs (the check result, with upToDate false, the stale files and code ERR_THEME_STALE, is still printed: it is a result, not an error). One exception: an editor theme whose settings changed after its build is refused (ERR_THEME_INVALID, an error envelope) before any file is checked, with `editor show <theme>` to build it again. An editor theme run from a folder other than its app root is refused (ERR_INVALID_ARGUMENT) with the `cd` to the root and the same command; `--family` does not take an editor theme (ERR_INVALID_ARGUMENT); its damaged or unbuildable settings are refused (ERR_THEME_INVALID). An editor theme's compile also writes its app copy in src/themes/<theme>/ from what it just built (its font stylesheet from the fonts the theme loads now), and --check also compares that copy once the theme's outputs are current: a copy that is kept back, missing a file or not the current build fails the check with the same check result (upToDate false, code ERR_THEME_STALE) and appCopyStale naming why. The copy's own files, its source included, are not compile targets (ERR_INVALID_ARGUMENT, naming the theme to compile)",
|
|
93
93
|
},
|
|
94
94
|
],
|
|
95
95
|
related: ['experimental theme add', 'experimental theme list'],
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
summary:
|
|
13
13
|
"Look up a part, group, setting or aspect; answer a question in plain words; read a picture's colors; or list what you can set",
|
|
14
14
|
description:
|
|
15
|
-
'One command for every question. With nothing named, it prints its usage and examples. A part (button, card; --list parts): what it reads for each aspect (text, background, border, corners, shadow, spacing, font, size), each condition written as the --when and --state flags `set` takes or marked not settable with the reason, its variants, every state `set` accepts, the parts inside it (a token set --on the part reaches them), and its group; a part the part data does not have says so, with commands that still apply. A group (inputs, containers, checks, menus): its members and whether styling one styles all. A setting: a dial\'s rungs and examples, a token\'s type, default and the parts that read it (and, when none does, whether Core\'s stylesheet still uses it), or a CSS property and the parts that set it. An aspect (text, background, border, corners, shadow, spacing, font, size): the dial and the whole-theme tokens most parts read for it. `colors` (or `palette`): how the theme\'s colors are made: one seed per color, light and dark shades generated with the same generator as `theme palette generate`, the shade each token starts from, vibrancy, the Colors preview page and the exact-token escape hatch. A lookup takes any case, a plural, and a token name without its dashes. A question in plain words ("bold white text in the header", "remove shadows from cards", "cards: 8px radius; buttons: 4px"): it reads each clause for the parts (and their variant, size, state or mode), what to change, the values typed (hex, rgb(), lengths, dashed), and whether it asks for more, less or none ("shouldn\'t", "turn off", "never", "too sharp", "everything except X" included), and answers with exact commands; a typed value always wins over a color word, and a hex color with the wrong number of digits is refused by name, never replaced with a sample. "In dark mode" carries --mode dark to every color command; a change that cannot differ by mode, or a dark-mode ask on a light-only theme, says so instead. A question about what something is ("what does --color-accent do") gets the lookup. Several changes in one question come first as one sequence (`sequence: true`: run every command in order, at most 12), with repeated and overwritten steps left out; two asks that contradict each other are offered as choices. Changes come before lookups. Every suggested command names the theme (`theme`: the one named with `theme`, the only one, or the one an editor command changed last, said in `themeNote`; `themeChosenBy` says which: named, only, last-changed or none; with none, my-theme, made first), holds a real value, never a placeholder or a comment, and is checked as `set` checks it: a command `set` would refuse, or that changes nothing, is left out and listed in `refused` with the reason. A question with no answer says why in `hint`, with the next commands in `run
|
|
15
|
+
'One command for every question. With nothing named, it prints its usage and examples. A part (button, card; --list parts): what it reads for each aspect (text, background, border, corners, shadow, spacing, font, size), each condition written as the --when and --state flags `set` takes or marked not settable with the reason, its variants, every state `set` accepts, the parts inside it (a token set --on the part reaches them), and its group; a part the part data does not have says so, with commands that still apply. A group (inputs, containers, checks, menus): its members and whether styling one styles all. A setting: a dial\'s rungs and examples, a token\'s type, default and the parts that read it (and, when none does, whether Core\'s stylesheet still uses it), or a CSS property and the parts that set it. An aspect (text, background, border, corners, shadow, spacing, font, size): the dial and the whole-theme tokens most parts read for it. `colors` (or `palette`): how the theme\'s colors are made: one seed per color, light and dark shades generated with the same generator as `theme palette generate`, the shade each token starts from, vibrancy, the Colors preview page and the exact-token escape hatch. A lookup takes any case, a plural, and a token name without its dashes. A question in plain words ("bold white text in the header", "remove shadows from cards", "cards: 8px radius; buttons: 4px"): it reads each clause for the parts (and their variant, size, state or mode), what to change, the values typed (hex, rgb(), lengths, dashed), and whether it asks for more, less or none ("shouldn\'t", "turn off", "never", "too sharp", "everything except X" included), and answers with exact commands; a typed value always wins over a color word, and a hex color with the wrong number of digits is refused by name, never replaced with a sample. "In dark mode" carries --mode dark to every color command; a change that cannot differ by mode, or a dark-mode ask on a light-only theme, says so instead. A question about what something is ("what does --color-accent do") gets the lookup. Several changes in one question come first as one sequence (`sequence: true`: run every command in order, at most 12), with repeated and overwritten steps left out; two asks that contradict each other are offered as choices. Changes come before lookups. Every suggested command names the theme (`theme`: the one named with `theme`, the only one, or the one an editor command changed last, said in `themeNote`; `themeChosenBy` says which: named, only, last-changed or none; with none, my-theme, made first), holds a real value, never a placeholder or a comment, and is checked as `set` checks it: a command `set` would refuse, or that changes nothing, is left out and listed in `refused` with the reason. A question with no answer says why in `hint`, with the next commands in `run`, the first of them this help, whose examples labeled "Asks how understands" list the kinds of ask it answers. A PNG picture (by any file name; other formats are refused by their bytes): its main colors from every pixel (on an even grid past 4 million), biggest share first, with where each sits, see-through pixels skipped, tRNS included (a number after the file sets how many, default 14), or with --at the exact color and alpha at pixel points; a picture over 40 million pixels (20 million at 16 bits), or with pixel data that is damaged or shorter than its header says, is refused before it is decoded. --list <what> lists what a change can name (dials, tokens, parts, groups or properties, in any case, singular or plural; kinds or no word lists those kinds), and the other words filter the list. Experimental: it may change or be removed in a patch release.',
|
|
16
16
|
fn: 'themeEditHow',
|
|
17
17
|
args: [
|
|
18
18
|
{
|
|
@@ -79,9 +79,95 @@ export const doc = {
|
|
|
79
79
|
label: 'Accent tokens',
|
|
80
80
|
cli: 'astryx experimental theme editor how accent --list tokens',
|
|
81
81
|
},
|
|
82
|
+
{
|
|
83
|
+
label: 'Asks how understands: change a dial',
|
|
84
|
+
cli: 'astryx experimental theme editor how "make everything more compact"',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: 'Asks how understands: change a dial',
|
|
88
|
+
cli: 'astryx experimental theme editor how "make it more colorful"',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
label: "Asks how understands: a part's property, by an amount or a value",
|
|
92
|
+
cli: 'astryx experimental theme editor how "card padding 2 steps more"',
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
label: "Asks how understands: a part's property, by an amount or a value",
|
|
96
|
+
cli: 'astryx experimental theme editor how "card padding 24x24px"',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: 'Asks how understands: a direction, with or without a reference',
|
|
100
|
+
cli: 'astryx experimental theme editor how "make the card background lighter"',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
label: 'Asks how understands: a direction, with or without a reference',
|
|
104
|
+
cli: 'astryx experimental theme editor how "make the card padding bigger than 24px"',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
label: 'Asks how understands: comparisons with another part',
|
|
108
|
+
cli: 'astryx experimental theme editor how "make primary buttons as round as cards"',
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
label: 'Asks how understands: comparisons with another part',
|
|
112
|
+
cli: 'astryx experimental theme editor how "make cards 4px rounder than buttons"',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
label:
|
|
116
|
+
'Asks how understands: everything except some parts, or keeping a part',
|
|
117
|
+
cli: 'astryx experimental theme editor how "make everything rounder except buttons and cards"',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
label:
|
|
121
|
+
'Asks how understands: everything except some parts, or keeping a part',
|
|
122
|
+
cli: 'astryx experimental theme editor how "make everything rounder but keep cards as they are"',
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: 'Asks how understands: prohibitions',
|
|
126
|
+
cli: 'astryx experimental theme editor how "make everything rounder; never round the inputs"',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
label: 'Asks how understands: prohibitions',
|
|
130
|
+
cli: 'astryx experimental theme editor how "never use pure black for text"',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: 'Asks how understands: one mode',
|
|
134
|
+
cli: 'astryx experimental theme editor how "make shadows darker in dark mode"',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: 'Asks how understands: one mode',
|
|
138
|
+
cli: 'astryx experimental theme editor how "in dark mode, cards should be #1c1c1e"',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: 'Asks how understands: removals',
|
|
142
|
+
cli: 'astryx experimental theme editor how "no shadow and no border on dialogs"',
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
label: 'Asks how understands: removals',
|
|
146
|
+
cli: 'astryx experimental theme editor how "remove the card background"',
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
label: 'Asks how understands: several changes in one ask',
|
|
150
|
+
cli: 'astryx experimental theme editor how "cards: 8px radius; buttons: 4px"',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: 'Asks how understands: several changes in one ask',
|
|
154
|
+
cli: 'astryx experimental theme editor how "rounder cards without shadows"',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: 'Asks how understands: value questions',
|
|
158
|
+
cli: 'astryx experimental theme editor how "what is the padding of buttons"',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
label: 'Asks how understands: value questions',
|
|
162
|
+
cli: 'astryx experimental theme editor how "how round are the cards now?"',
|
|
163
|
+
},
|
|
82
164
|
],
|
|
83
165
|
outsideProject: 'refuse',
|
|
84
166
|
notes: [
|
|
167
|
+
{
|
|
168
|
+
type: 'prose',
|
|
169
|
+
text: 'The examples labeled "Asks how understands" list the kinds of ask a question in plain words can be, each with examples it answers with commands: a dial for the whole theme, a part\'s property by an amount or a value, a direction (lighter, darker, bigger, smaller, with or without a reference), a comparison with another part, everything except some parts or keeping a part, a prohibition (never …), one mode (in dark mode), a removal (no shadow, remove …), several changes in one ask, and a question about a value. An ask of another kind may still be answered; one it cannot answer says so and points here.',
|
|
170
|
+
},
|
|
85
171
|
{
|
|
86
172
|
type: 'prose',
|
|
87
173
|
text: "In global mode: outside a project, with no package.json in the folder or above it, experimental theme editor how writes nothing and stops with `ERR_PROJECT_REQUIRED`; run it in the app project. In a project, the project's version of Astryx runs it, whichever astryx command you start. See {@link namespace:global} and {@link generic:problems}.",
|
|
@@ -11,7 +11,7 @@ export const doc = {
|
|
|
11
11
|
stability: 'experimental',
|
|
12
12
|
summary: 'Start a theme in themes/<theme>/, optionally on a built-in theme',
|
|
13
13
|
description:
|
|
14
|
-
'Makes themes/<theme>/ with <theme>.settings.json (the settings this command owns), the generated <theme>.settings.ts, <theme>.theme.ts (which extends it and is yours), and the built <theme>.css and <theme>.js (build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor settings first), then writes preview.html, the sample app page with the theme. --like builds on a built-in theme (neutral, stone, matcha, y2k, gothic, chocolate, butter; its package must be installed); without it, or with --like none, the theme starts from Astryx defaults. Any `set` dial can be a flag too (--accent "#7c3aed" --font inter --corners round --vibrancy 60 ...): the same names, values and checks as `set`, all applied in the one build, with one result that lists them. Change the base later with `astryx experimental theme editor set <theme> base <theme|none>`. Afterwards, <theme>.theme.ts is yours: it extends the generated <theme>.settings.ts, and every later change rewrites only the settings files, so your own edits in <theme>.theme.ts survive. A theme name is lowercase letters, digits and dashes, starts with a letter, has 64 characters at most, and is not the name of a built-in theme or a name Windows reserves for a device (con, prn, aux, nul,
|
|
14
|
+
'Makes themes/<theme>/ with <theme>.settings.json (the settings this command owns), the generated <theme>.settings.ts, <theme>.theme.ts (which extends it and is yours), and the built <theme>.css and <theme>.js (build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor settings first), then writes preview.html, the sample app page with the theme. --like builds on a built-in theme (neutral, stone, matcha, y2k, gothic, chocolate, butter; its package must be installed); without it, or with --like none, the theme starts from Astryx defaults. Any `set` dial except base (that is --like) can be a flag too (--accent "#7c3aed" --font inter --corners round --vibrancy 60 ...): the same names, values and checks as `set`, all applied in the one build, with one result that lists them. Change the base later with `astryx experimental theme editor set <theme> base <theme|none>`. Afterwards, <theme>.theme.ts is yours: it extends the generated <theme>.settings.ts, and every later change rewrites only the settings files, so your own edits in <theme>.theme.ts survive. A theme name is lowercase letters, digits and dashes, starts with a letter, has 64 characters at most, and is not the name of a built-in theme or a name Windows reserves for a device (con, prn, aux, nul, com0-com9, lpt0-lpt9, and com¹-com³, lpt¹-lpt³). Experimental: it may change or be removed in a patch release. The result ends with `wiring`: `astryx theme add <theme>` for the app copy of the theme (src/themes/<theme>/, a standard local theme every build writes), the `mode` of a one-mode theme for the `<Theme>`, and what builds it; only when a folder of yours holds src/themes/<theme>/ does it give the imports in the root file and the `<Theme>` by hand.',
|
|
15
15
|
fn: 'themeEditNew',
|
|
16
16
|
args: [
|
|
17
17
|
{
|
|
@@ -31,7 +31,7 @@ export const doc = {
|
|
|
31
31
|
flag: '--png',
|
|
32
32
|
param: 'options.png',
|
|
33
33
|
description:
|
|
34
|
-
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file',
|
|
34
|
+
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
flag: '--corners <rung>',
|
|
@@ -67,7 +67,7 @@ export const doc = {
|
|
|
67
67
|
flag: '--png',
|
|
68
68
|
param: 'options.png',
|
|
69
69
|
description:
|
|
70
|
-
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file',
|
|
70
|
+
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file',
|
|
71
71
|
},
|
|
72
72
|
],
|
|
73
73
|
examples: [
|
|
@@ -32,7 +32,7 @@ export const doc = {
|
|
|
32
32
|
flag: '--png',
|
|
33
33
|
param: 'options.png',
|
|
34
34
|
description:
|
|
35
|
-
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file',
|
|
35
|
+
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file. Taking pictures changes nothing in the app, except that show first brings the app copy (src/themes/<theme>/) and an in-app preview up to date after a hand edit to <theme>.theme.ts',
|
|
36
36
|
},
|
|
37
37
|
],
|
|
38
38
|
examples: [
|
|
@@ -54,7 +54,7 @@ export const doc = {
|
|
|
54
54
|
flag: '--mode <mode>',
|
|
55
55
|
param: 'options.mode',
|
|
56
56
|
description:
|
|
57
|
-
'light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes
|
|
57
|
+
'light or dark: only that color mode. Colors only; sizes, numbers, fonts and shadows are the same in both modes. In a light-only or dark-only theme, it removes a setting saved for one mode (one made before the theme became one-mode)',
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
60
|
flag: '--only',
|
|
@@ -66,7 +66,7 @@ export const doc = {
|
|
|
66
66
|
flag: '--png',
|
|
67
67
|
param: 'options.png',
|
|
68
68
|
description:
|
|
69
|
-
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts; without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file',
|
|
69
|
+
'Also take PNG pictures of the previews (light and dark), with no dev server running: it needs a Playwright installed in the project or a Chrome or Chromium found on the machine, and adds a few seconds while the browser starts (a browser that takes longer than 60 seconds is stopped, and the result says so); without one, the result says how to get it. Each picture carries the editor stamp and is recorded, by name and content, in themes/<theme>/<theme>.pictures.json; a file of yours named like a picture (preview.png, sheet.png) is never written over: no picture is taken, and the result names the file',
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
72
|
examples: [
|
|
@@ -15,7 +15,7 @@ export const doc = {
|
|
|
15
15
|
summary:
|
|
16
16
|
'Make and change a theme one checked change at a time (dials, tokens, part styles), with previews',
|
|
17
17
|
description:
|
|
18
|
-
"A type-safe compiler for themes. A theme lives in themes/<theme>/: <theme>.settings.json holds the checked settings and is owned by this command; <theme>.settings.ts is generated from it on every change; <theme>.theme.ts extends it, is written once and is yours to edit; <theme>.css and <theme>.js are built from it; build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor's settings first. Every build also writes the theme's app copy, src/themes/<theme>/: a standard local theme (descriptor, source, built module and stylesheets), never edited by hand, so `astryx theme add <theme>` puts the theme into the app and `theme use`, `remove` and `list` take it as they take any local theme.
|
|
18
|
+
"A type-safe compiler for themes. A theme lives in themes/<theme>/: <theme>.settings.json holds the checked settings and is owned by this command; <theme>.settings.ts is generated from it on every change; <theme>.theme.ts extends it, is written once and is yours to edit; <theme>.css and <theme>.js are built from it; build them again with `astryx experimental theme compile themes/<theme>/<theme>.theme.ts`, which checks the editor's settings first. Every build also writes the theme's app copy, src/themes/<theme>/: a standard local theme (descriptor, source, built module and stylesheets), never edited by hand, so `astryx theme add <theme>` puts the theme into the app and `theme use`, `remove` and `list` take it as they take any local theme. Your own files in that folder are left as they are and the copy is written around them; a file, folder or link of yours at one of the copy's names, a link on the way to it, or a folder that cannot be written stops it, and every set, undo, show and compile says so (`appCopyStale`), with `compile --check` failing while the copy is behind or gone. Every change is CHECKED against what the installed Core's components really read (derived from Core itself, version for version, and cached under node_modules/.cache/) and against the token's type; a change that cannot take effect is refused, nothing is written, and the error leads with the command that works. The thing you set is a dial (a big move with named rungs: corners, spacing, font, headings, text-size, base, mode; or a color: accent, neutral, success, warning, danger, info, each generating its light and dark shades from one color for the color tokens, and vibrancy, how saturated they are), a design token by name, or a CSS property on a part. Where it applies: --on <part|group>, --when <prop>:<value>, --state <state>, --mode light|dark, --only. Every accepted change rebuilds and writes preview.html (the sample app page); `show` adds the theme-building page with every component. PNG pictures only with --png. Commands on one theme run one after the other, through a lock in node_modules/.cache/astryx-theme/ of the project; when node_modules cannot be written (a read-only install), changes are refused and `show` still reads the last build. `how` answers everything else: what a part, group, setting or aspect does, how the colors are made, plain-words questions (with exact commands), a picture's colors, and lists of what you can set. Experimental: it may change or be removed in a patch release.",
|
|
19
19
|
subcommands: ['new', 'set', 'undo', 'show', 'how'],
|
|
20
20
|
examples: [
|
|
21
21
|
{
|
|
@@ -12,7 +12,7 @@ export const doc = {
|
|
|
12
12
|
summary:
|
|
13
13
|
'Make a new starter app with the theme preview inside, ready to install and run',
|
|
14
14
|
description:
|
|
15
|
-
"Writes a new starter app into <dir> (Next.js app router, Core and the neutral theme, with the Astryx packages pinned to this CLI's release; with --theme, Core and the base theme are pinned to the versions this project has, the ones the copied build was made on, with a note), with the theme preview route and its default pages (the sample app page and every component grouped) in src/app/theme-preview/. With --theme, the theme folder is copied into the app's themes/ and the pages wear it; a base theme or font package it needs is added to package.json. No install runs: it prints the install and dev commands and the page to open. <dir> must be new or empty, inside the
|
|
15
|
+
"Writes a new starter app into <dir> (Next.js app router, Core and the neutral theme, with the Astryx packages pinned to this CLI's release; with --theme, Core and the base theme are pinned to the versions this project has, the ones the copied build was made on, with a note), with the theme preview route and its default pages (the sample app page and every component grouped) in src/app/theme-preview/. With --theme, the theme folder is copied into the app's themes/ and the pages wear it; a base theme or font package it needs is added to package.json. No install runs: it prints the install and dev commands and the page to open. <dir> must be new or empty, inside the project folder (from a subfolder too); a folder that is not empty is refused, with a free folder name to use instead. Every check runs before the first write, so a refusal changes nothing. Later pages go in with `experimental theme preview add`, run in the new app. Every open font the theme names is added to package.json, at the version this project has or a pinned range, and the route imports it; a theme with generated colors gets the Colors page too, and a one-mode theme starts the route in its mode. The app is written into a temp folder beside the folder and moved into place, so a failure leaves nothing behind. A folder holding only .git, .DS_Store or Thumbs.db counts as empty. The folder is refused when it is a file, a dangling link, inside this app's routes folder, themes/, node_modules/ or Next's build folder (.next/, out/ or the distDir next.config names), or written with Windows separators, white space at either end or a name too long. A theme whose build is missing or older than its settings is built first, with a note. The app's home page links to the preview, and its .gitignore leaves out node_modules, next-env.d.ts and *.tsbuildinfo. Inside a project with a tsconfig.json, a note says to exclude the new folder. It takes one folder; more arguments are refused. With a theme, it holds that theme's lock while it builds and copies it, so an `editor set` on the same theme waits for it. A folder given from a subfolder of the project is taken from where it was given. An app is refused in public/ (served as files at the site root) and under a name Windows does not allow; a base theme passed to --theme is named as a package theme, installed or not, with the command that adds it. Experimental: it may change or be removed in a patch release.",
|
|
16
16
|
fn: 'themeEditPreviewApp',
|
|
17
17
|
args: [
|
|
18
18
|
{
|
|
@@ -11,7 +11,7 @@ export const doc = {
|
|
|
11
11
|
stability: 'experimental',
|
|
12
12
|
summary: 'Remove one page from the theme preview, or the whole preview',
|
|
13
13
|
description:
|
|
14
|
-
'Removes one page and its nav item, and rewrites the route. With no page, or for the last page, it removes the whole preview: only the files the preview wrote (theme-preview.json lists them) are deleted, and the folder only when nothing else is in it. A path in theme-preview.json that leads outside the route folder is
|
|
14
|
+
'Removes one page and its nav item, and rewrites the route. With no page, or for the last page, it removes the whole preview: only the files the preview wrote (theme-preview.json lists them) are deleted, and the folder only when nothing else is in it. A path in theme-preview.json that leads outside the route folder is dropped from the record and named in a note; nothing outside the folder is deleted. Only files the preview wrote are deleted: a page file it did not write, or one changed by hand since it wrote it (by the hash theme-preview.json records), is kept and named in `kept`, with a note; files already gone are named in `missing`, and the route and Colors page written again in `rewritten`. Every check runs before the first delete: the theme the route wears is loaded first, so a theme that does not load is refused with nothing deleted, and the refusal names the whole-preview remove, which needs no theme. A theme that is gone is replaced by the theme of the app itself, with a note. A page id matches in any case. A damaged theme-preview.json (not JSON, the wrong shape, a duplicate page, a folder or an absolute path in its files) is refused with `ERR_THEME_INVALID`, naming the file. With no folder given and no preview in the default place, a preview recorded for a theme is used. It takes one page; more arguments are refused. A whole remove stops, deleting nothing, when page.tsx was changed by hand: it imports the pages. A page whose file is gone leaves the nav, with a note. Refusals never suggest deleting files. Preview commands in one project run one after another. A remove deletes only the route file, the record and the page files of recorded pages (in _pages/, or pages/ for an older release), and only when a recorded hash shows they are as the preview wrote them: any other file the record names, and any file with no recorded hash, is kept and named, so a copied or edited record never deletes a project file. A route that stays keeps the pages it imports. Experimental: it may change or be removed in a patch release.',
|
|
15
15
|
fn: 'themeEditPreviewRemove',
|
|
16
16
|
args: [
|
|
17
17
|
{
|
|
@@ -52,7 +52,7 @@ export const doc = {
|
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
54
|
code: 1,
|
|
55
|
-
when: 'there is no preview, it has no such page, theme-preview.json is damaged
|
|
55
|
+
when: 'there is no preview, it has no such page, theme-preview.json is damaged, the theme the route wears does not load (ERR_THEME_INVALID, ERR_UNKNOWN_THEME, ERR_THEME_LOAD), another preview command did not finish within 30 seconds (ERR_THEME_BUSY), the route file was changed by hand, a write failed, more than one page, or outside a project',
|
|
56
56
|
},
|
|
57
57
|
],
|
|
58
58
|
related: ['experimental theme preview'],
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* astryx search dark mode Every word is part of the query
|
|
18
18
|
* astryx search modal --type component Filter to a single domain
|
|
19
19
|
* astryx search forms --limit 5 Cap the result count
|
|
20
|
-
* astryx search button --verbose Also print score / reason
|
|
20
|
+
* astryx search button --verbose Also print score / reason, whole descriptions
|
|
21
21
|
* astryx search button --json Typed JSON envelope
|
|
22
22
|
*/
|
|
23
23
|
|
|
@@ -32,6 +32,7 @@ import {cliError} from '../lib/cli-error.mjs';
|
|
|
32
32
|
import {defineCommand} from '../lib/define-command.mjs';
|
|
33
33
|
import {search as searchApi} from '../../../api/search/search.mjs';
|
|
34
34
|
import {Project} from '../../../foundation/config/project.mjs';
|
|
35
|
+
import {firstSentence} from '../../../foundation/text/string-utils.mjs';
|
|
35
36
|
import {warnOnIntegrationIssues} from '../../../foundation/integrations/integration-warnings.mjs';
|
|
36
37
|
import {doc as searchCommand} from './search.doc.mjs';
|
|
37
38
|
import {doc as searchFn} from '../../../api/search/search.doc.mjs';
|
|
@@ -183,6 +184,10 @@ export function registerSearch(program) {
|
|
|
183
184
|
command: formatCliCommand,
|
|
184
185
|
parent: formatCliCommand,
|
|
185
186
|
deprecated: formatDeprecation,
|
|
187
|
+
// The text view keeps a description's first sentence. A
|
|
188
|
+
// component, hook or doc result's command prints the whole doc;
|
|
189
|
+
// --verbose and --json keep the description whole.
|
|
190
|
+
...(options.verbose ? {} : {description: firstSentence}),
|
|
186
191
|
},
|
|
187
192
|
}),
|
|
188
193
|
...note,
|