@astryxdesign/cli 0.7.17-canary.g4ea41ce → 0.7.17-canary.g5a3fd39
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 +7 -2
- package/api/build/_adapter.d.mts +7 -6
- package/api/build/_adapter.mjs +18 -11
- package/api/build/build.type.mjs +1 -1
- package/api/build/kit/kind.d.mts +6 -0
- package/api/build/kit/kind.mjs +1 -1
- package/api/build/kit/rank.d.mts +7 -1
- package/api/build/kit/rank.mjs +15 -5
- package/api/build/kit/signals.mjs +58 -57
- package/api/build/kit/start.d.mts +2 -1
- package/api/build/kit/start.mjs +62 -9
- package/api/build/kit/words.d.mts +6 -2
- package/api/build/kit/words.mjs +7 -3
- package/api/component/__fixtures__/resolutions/modules.txt +2 -2
- package/api/component/_adapter.d.mts +30 -24
- package/api/component/_adapter.mjs +72 -31
- package/api/component/component.mjs +4 -4
- package/api/component/detail/detail.d.mts +2 -2
- package/api/component/detail/detail.mjs +1 -1
- package/api/component/list/list.d.mts +2 -2
- package/api/component/list/list.mjs +4 -4
- package/api/discover/_adapter.mjs +15 -15
- package/api/docs/_adapter.d.mts +13 -5
- package/api/docs/_adapter.mjs +37 -10
- package/api/doctor/_adapter.d.mts +32 -0
- package/api/doctor/_adapter.mjs +56 -1
- package/api/doctor/doctor.mjs +28 -5
- package/api/doctor/theme-checks.mjs +165 -83
- package/api/error.d.mts +4 -3
- package/api/error.mjs +3 -2
- package/api/hook/_adapter.d.mts +5 -4
- package/api/hook/_adapter.mjs +6 -5
- package/api/icon/_options.d.mts +17 -0
- package/api/icon/_options.mjs +54 -0
- package/api/icon/exportIconIndex.doc.d.mts +10 -0
- package/api/icon/exportIconIndex.doc.mjs +59 -0
- package/api/icon/icon.mjs +11 -34
- package/api/icon/icon.type.d.mts +49 -0
- package/api/icon/icon.type.mjs +24 -0
- package/api/icon/rankIconIndex.doc.d.mts +10 -0
- package/api/icon/rankIconIndex.doc.mjs +79 -0
- package/api/icon/search/icon-index.d.mts +41 -0
- package/api/icon/search/icon-index.mjs +139 -0
- package/api/icon/search/search.d.mts +18 -0
- package/api/icon/search/search.mjs +13 -0
- package/api/index.d.mts +1 -0
- package/api/index.mjs +1 -0
- package/api/search/_adapter.d.mts +8 -5
- package/api/search/_adapter.mjs +14 -10
- package/api/search/_gather-components.d.mts +4 -4
- package/api/search/_gather-components.mjs +4 -3
- package/api/search/_gather-hooks.d.mts +2 -2
- package/api/search/_gather-hooks.mjs +1 -1
- package/api/search/_lexical.mjs +12 -2
- package/api/search/_priority.d.mts +10 -2
- package/api/search/_priority.mjs +37 -7
- package/api/search/_score.d.mts +12 -3
- package/api/search/_score.mjs +6 -3
- package/api/search/_words.mjs +12 -3
- package/api/search/search.d.mts +7 -1
- package/api/search/search.mjs +37 -4
- package/api/swizzle/_adapter.d.mts +7 -5
- package/api/swizzle/_adapter.mjs +7 -3
- package/api/swizzle/copy/copy.mjs +5 -4
- package/api/theme/build/build.d.mts +5 -0
- package/api/theme/build/build.mjs +400 -21
- package/api/theme/build/family.mjs +18 -7
- package/api/theme/build/font-warning.mjs +5 -4
- package/api/theme/build/input-fields.d.mts +21 -6
- package/api/theme/build/input-fields.mjs +104 -13
- package/api/theme/build/typography-values.d.mts +22 -0
- package/api/theme/build/typography-values.mjs +172 -22
- package/api/theme/build/written-values.d.mts +7 -0
- package/api/theme/build/written-values.mjs +57 -8
- package/api/theme/generateTonalPalette.doc.mjs +1 -1
- package/api/theme/palette/generate/generator.d.mts +14 -2
- package/api/theme/palette/generate/generator.mjs +94 -8
- package/api/theme/theme.type.d.mts +21 -4
- package/api/theme/theme.type.mjs +14 -5
- package/api/theme/themePaletteGenerate.doc.mjs +1 -1
- package/api/theme/themeTemplate.doc.mjs +18 -3
- package/api/theme-edit/_adapter.d.mts +1 -1
- package/api/theme-edit/_adapter.mjs +1 -1
- package/api/theme-edit/_catalog.d.mts +10 -4
- package/api/theme-edit/_catalog.mjs +81 -22
- package/api/theme-edit/_check.mjs +402 -88
- package/api/theme-edit/_color.d.mts +11 -2
- package/api/theme-edit/_color.mjs +23 -7
- package/api/theme-edit/_compiler.mjs +11 -3
- package/api/theme-edit/_context.d.mts +87 -6
- package/api/theme-edit/_context.mjs +224 -17
- package/api/theme-edit/_css.mjs +4 -0
- package/api/theme-edit/_edit.mjs +331 -58
- package/api/theme-edit/_how-question.d.mts +11 -0
- package/api/theme-edit/_how-question.mjs +2514 -234
- package/api/theme-edit/_how.mjs +79 -14
- package/api/theme-edit/_missed.mjs +294 -32
- package/api/theme-edit/_normal.d.mts +3 -1
- package/api/theme-edit/_normal.mjs +4 -1
- package/api/theme-edit/_palette.mjs +36 -5
- package/api/theme-edit/_part-words.mjs +20 -2
- package/api/theme-edit/_parts.d.mts +12 -1
- package/api/theme-edit/_parts.mjs +116 -11
- package/api/theme-edit/_preview-app.mjs +40 -2
- package/api/theme-edit/_preview.d.mts +45 -5
- package/api/theme-edit/_preview.mjs +173 -21
- package/api/theme-edit/_settings.d.mts +20 -0
- package/api/theme-edit/_settings.mjs +1033 -94
- package/api/theme-edit/_tables.mjs +2 -2
- package/api/theme-edit/theme-edit.type.d.mts +6 -5
- package/api/theme-edit/theme-edit.type.mjs +8 -8
- package/api/upgrade/_adapter.mjs +13 -2
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/tree/authoring.doc.mjs +1 -0
- package/assets/docs/tree/cli.doc.mjs +1 -0
- package/assets/docs/tree/computer-agent-guide.doc.mjs +1 -1
- package/assets/docs/tree/generate-a-palette.doc.mjs +2 -2
- package/assets/docs/tree/global.doc.mjs +1 -0
- package/assets/docs/tree/single-component.doc.mjs +40 -2
- package/assets/docs/tree/updates.doc.mjs +1 -1
- package/assets/docs/tree/who-answers.doc.mjs +2 -2
- package/assets/docs-routes.generated.json +1 -1
- package/assets/docs.generated.json +2 -2
- package/assets/search-catalog.generated.json +2 -2
- package/assets/self-audit.generated.json +1 -1
- package/assets/templates/blocks/components/Blockquote/BlockquoteShowcase.tsx +1 -1
- package/assets/templates/blocks/components/BreadcrumbItem/BreadcrumbItemShowcase.tsx +4 -4
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsCustomSeparator.tsx +1 -0
- package/assets/templates/blocks/components/Breadcrumbs/BreadcrumbsSupportingVariant.tsx +2 -2
- package/assets/templates/blocks/components/Card/CardElevations.tsx +1 -1
- package/assets/templates/blocks/components/Card/CardWithInnerLayout.tsx +19 -3
- package/assets/templates/blocks/components/Card/ClickableCardWithNestedButton.tsx +11 -1
- package/assets/templates/blocks/components/Card/SelectableCardElevated.tsx +1 -1
- package/assets/templates/blocks/components/Card/SelectableCardMulti.tsx +1 -1
- package/assets/templates/blocks/components/Center/CenterHorizontal.tsx +1 -1
- package/assets/templates/blocks/components/Center/CenterInsideACard.tsx +1 -1
- package/assets/templates/blocks/components/ChatComposer/ChatComposerFullFeatured.tsx +8 -0
- package/assets/templates/blocks/components/ChatComposerDrawer/ChatComposerDrawerWithProgress.tsx +8 -2
- package/assets/templates/blocks/components/ChatLayout/ChatLayoutPanelChat.tsx +1 -0
- package/assets/templates/blocks/components/ChatLayout/ChatLayoutShowcase.tsx +1 -1
- package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleCustomContent.tsx +9 -1
- package/assets/templates/blocks/components/ChatMessageBubble/ChatMessageBubbleMetadata.tsx +12 -2
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataFooter.tsx +28 -7
- package/assets/templates/blocks/components/ChatMessageMetadata/ChatMessageMetadataShowcase.tsx +35 -7
- package/assets/templates/blocks/components/Collapsible/CollapsibleShowcase.tsx +1 -1
- package/assets/templates/blocks/components/CommandPaletteGroup/CommandPaletteGroupBasic.tsx +20 -4
- package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListBasic.tsx +15 -3
- package/assets/templates/blocks/components/CommandPaletteList/CommandPaletteListShowcase.tsx +29 -6
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBasic.tsx +2 -2
- package/assets/templates/blocks/components/ContextMenu/ContextMenuBottomSheet.tsx +1 -1
- package/assets/templates/blocks/components/ContextMenu/ContextMenuShowcase.tsx +2 -2
- package/assets/templates/blocks/components/Divider/DividerFullBleed.tsx +1 -1
- package/assets/templates/blocks/components/Divider/DividerShowcase.tsx +1 -1
- package/assets/templates/blocks/components/Divider/DividerVariants.tsx +1 -1
- package/assets/templates/blocks/components/DropdownMenuGroup/DropdownMenuGroupShowcase.tsx +23 -4
- package/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx +18 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx +20 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx +16 -2
- package/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx +11 -1
- package/assets/templates/blocks/components/Heading/HeadingTruncation.tsx +12 -2
- package/assets/templates/blocks/components/InternationalizationProvider/useDirectionHookUsage.tsx +1 -1
- package/assets/templates/blocks/components/LayoutContent/LayoutContentBasic.tsx +1 -1
- package/assets/templates/blocks/components/LayoutContent/LayoutContentShowcase.tsx +1 -1
- package/assets/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx +17 -3
- package/assets/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx +17 -3
- package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx +15 -3
- package/assets/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx +9 -2
- package/assets/templates/blocks/components/LayoutPanel/LayoutPanelNavigation.tsx +1 -1
- package/assets/templates/blocks/components/LayoutPanel/LayoutPanelShowcase.tsx +1 -1
- package/assets/templates/blocks/components/MoreMenu/MoreMenuBottomSheet.tsx +1 -1
- package/assets/templates/blocks/components/MultiSelector/MultiSelectorGhostToolbar.tsx +14 -2
- package/assets/templates/blocks/components/Outline/OutlineDensity.tsx +2 -0
- package/assets/templates/blocks/components/OverflowList/OverflowListShowcase.tsx +6 -1
- package/assets/templates/blocks/components/Pagination/PaginationVariants.tsx +4 -0
- package/assets/templates/blocks/components/Popover/PopoverHookUsage.tsx +17 -2
- package/assets/templates/blocks/components/SegmentedControl/SegmentedControlFillLayout.tsx +1 -1
- package/assets/templates/blocks/components/Selector/SelectorGhostToolbar.tsx +14 -2
- package/assets/templates/blocks/components/Selector/SelectorOptionDescriptions.tsx +8 -1
- package/assets/templates/blocks/components/SideNav/SideNavWithHeaderMenu.tsx +2 -2
- package/assets/templates/blocks/components/SideNavHeading/SideNavHeadingShowcase.tsx +2 -0
- package/assets/templates/blocks/components/Switch/SwitchWithStatus.tsx +1 -1
- package/assets/templates/blocks/components/TabList/TabListTabsFillLayout.tsx +1 -1
- package/assets/templates/blocks/components/TabList/TabListTabsWithActions.tsx +12 -1
- package/assets/templates/blocks/components/Table/TableBulkActionsTable.tsx +11 -1
- package/assets/templates/blocks/components/Table/TableInCard.tsx +2 -2
- package/assets/templates/blocks/components/Text/TextTruncation.tsx +1 -1
- package/assets/templates/blocks/components/Text/TextWordBreak.tsx +12 -2
- package/assets/templates/blocks/components/Text/TextWrap.tsx +19 -4
- package/assets/templates/blocks/components/TextArea/TextAreaCharacterCount.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaShowcase.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaStates.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaValidation.tsx +1 -1
- package/assets/templates/blocks/components/TextArea/TextAreaWithIcon.tsx +1 -1
- package/assets/templates/blocks/components/TextInput/TextInputStatusVariant.tsx +2 -2
- package/assets/templates/blocks/components/Timestamp/TimestampAutoFormat.tsx +15 -1
- package/assets/templates/blocks/components/Timestamp/TimestampRelativeFormat.tsx +15 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarCardHeader.tsx +8 -0
- package/assets/templates/blocks/components/Toolbar/ToolbarSizes.tsx +12 -1
- package/assets/templates/blocks/components/Toolbar/ToolbarThreeSlot.tsx +18 -3
- package/assets/templates/blocks/components/TopNav/TopNavCenteredNavigation.tsx +6 -0
- package/assets/templates/blocks/components/TopNav/TopNavEnterpriseDashboard.tsx +7 -1
- package/assets/templates/blocks/components/TopNav/TopNavMegaMenu.tsx +2 -2
- package/assets/templates/blocks/components/TopNav/TopNavShowcase.tsx +9 -0
- package/assets/templates/components.generated.json +1 -1
- package/assets/templates/pages/ai-chat/page.tsx +102 -6
- package/assets/templates/pages/canvas-editor/page.tsx +73 -2
- package/assets/templates/pages/centered-hero/page.tsx +10 -4
- package/assets/templates/pages/course-detail/page.tsx +46 -2
- package/assets/templates/pages/dashboard/page.tsx +45 -16
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +31 -20
- package/assets/templates/pages/dashboard-comparison/page.tsx +9 -0
- package/assets/templates/pages/dashboard-composition/page.tsx +22 -9
- package/assets/templates/pages/dashboard-progress/page.tsx +27 -15
- package/assets/templates/pages/dashboard-scorecard/page.tsx +9 -0
- package/assets/templates/pages/detail-page/page.tsx +105 -77
- package/assets/templates/pages/documentation/page.tsx +15 -2
- package/assets/templates/pages/documentation-design/page.tsx +7 -34
- package/assets/templates/pages/documentation-technical/page.tsx +76 -12
- package/assets/templates/pages/editor/page.tsx +26 -21
- package/assets/templates/pages/file-explorer/page.tsx +35 -1
- package/assets/templates/pages/form-two-column/page.tsx +2 -3
- package/assets/templates/pages/form-wizard/page.tsx +31 -3
- package/assets/templates/pages/form-wizard-vertical/page.tsx +32 -3
- package/assets/templates/pages/gallery-hero/page.tsx +2 -1
- package/assets/templates/pages/ide/page.tsx +15 -1
- package/assets/templates/pages/incident-console/page.tsx +2 -1
- package/assets/templates/pages/incident-console/template.doc.mjs +1 -1
- package/assets/templates/pages/kanban-board/page.tsx +39 -2
- package/assets/templates/pages/payment-form/page.tsx +77 -39
- package/assets/templates/pages/product-gallery/page.tsx +16 -14
- package/assets/templates/pages/settings/page.tsx +35 -3
- package/assets/templates/pages/settings-dialog/page.tsx +34 -5
- package/assets/templates/pages/settings-sidebar/page.tsx +23 -3
- package/assets/templates/pages/shell-nav/page.tsx +28 -12
- package/assets/templates/pages/shell-side-nav/page.tsx +16 -1
- package/assets/templates/pages/shell-top-nav/page.tsx +27 -1
- package/assets/templates/pages/side-gallery/page.tsx +1 -1
- package/assets/templates/pages/table/page.tsx +2 -1
- package/assets/templates/pages/table/template.doc.mjs +1 -1
- package/assets/templates/pages/table-collapsible/page.tsx +1 -1
- package/assets/templates/pages/table-comparison/page.tsx +1 -1
- package/assets/templates/pages/table-filter/page.tsx +9 -2
- package/assets/templates/pages/table-grouped/page.tsx +16 -6
- package/assets/templates/pages/table-inbox/page.tsx +60 -1
- package/assets/templates/pages/table-page/page.tsx +10 -2
- package/assets/templates/pages/table-tree/page.tsx +95 -13
- package/assets/templates/pages/theme-showcase/page.tsx +107 -11
- package/assets/templates/pages/work-item-detail/page.tsx +88 -74
- package/assets/templates/pages/work-item-detail/template.doc.mjs +0 -1
- package/assets/templates/themes/gothic/gothicPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/gothic/gothicTheme.ts +5 -0
- package/assets/templates/themes/neutral/neutralTheme.ts +1 -1
- package/assets/templates/themes/y2k/y2kPaletteRefs.generated.ts +1 -1
- package/assets/templates/themes/y2k/y2kTheme.ts +1 -1
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/_schema.d.mts +22 -8
- package/authoring/doctypes/_schema.mjs +31 -0
- package/authoring/doctypes/command/command.doc.mjs +24 -0
- package/authoring/doctypes/command/type.ts +31 -0
- package/authoring/doctypes/component/component.doc.mjs +1 -1
- package/authoring/doctypes/component/type.ts +8 -5
- package/authoring/doctypes/namespace/namespace.doc.mjs +6 -0
- package/authoring/doctypes/namespace/type.ts +4 -0
- package/authoring/doctypes/template/type.ts +0 -7
- package/authoring/index.d.ts +6 -1
- package/authoring/integration/integration.doc.mjs +7 -0
- package/authoring/integration/schema.d.mts +6 -0
- package/authoring/integration/schema.mjs +3 -0
- package/authoring/integration/type.ts +34 -0
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/component.doc.mjs +1 -0
- package/clients/cli/commands/component.mjs +5 -1
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/experimental/index.mjs +4 -1
- package/clients/cli/commands/experimental/theme.mjs +139 -64
- package/clients/cli/commands/experimental-render.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-add.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-editor-how.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-editor-new.doc.mjs +3 -1
- package/clients/cli/commands/experimental-theme-editor-set.doc.mjs +3 -2
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +2 -1
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +3 -2
- package/clients/cli/commands/experimental-theme-eject.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-preview-add.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-preview-app.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-remove.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-targets.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-template.doc.mjs +1 -0
- package/clients/cli/commands/experimental-theme-use.doc.mjs +2 -0
- package/clients/cli/commands/gap-report.doc.mjs +1 -0
- package/clients/cli/commands/hook.doc.mjs +1 -1
- package/clients/cli/commands/init.doc.mjs +1 -1
- package/clients/cli/commands/integration-add.doc.mjs +1 -0
- package/clients/cli/commands/manifest.mjs +10 -3
- package/clients/cli/commands/swizzle.doc.mjs +8 -1
- package/clients/cli/commands/swizzle.mjs +13 -6
- package/clients/cli/commands/template.doc.mjs +3 -0
- package/clients/cli/commands/theme-add.doc.mjs +2 -1
- package/clients/cli/commands/theme-build.doc.mjs +2 -1
- package/clients/cli/commands/theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -2
- package/clients/cli/commands/theme-remove.doc.mjs +2 -1
- package/clients/cli/commands/theme-targets.doc.mjs +1 -0
- package/clients/cli/commands/theme-template.doc.mjs +1 -0
- package/clients/cli/commands/theme-use.doc.mjs +2 -1
- package/clients/cli/commands/theme.doc.mjs +7 -2
- package/clients/cli/commands/theme.mjs +21 -5
- package/clients/cli/index.mjs +167 -59
- package/clients/cli/lib/base-gate.mjs +522 -0
- package/clients/cli/lib/command-path.mjs +26 -0
- package/clients/cli/lib/define-command.mjs +161 -12
- package/clients/cli/lib/json-shim.mjs +34 -31
- package/clients/cli/lib/manifest.d.ts +14 -0
- package/clients/cli/lib/manifest.mjs +78 -22
- package/clients/cli/lib/root-args.mjs +79 -0
- package/clients/cli/lib/stray-option.mjs +21 -8
- package/clients/cli/lib/unknown-command.mjs +27 -6
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +13 -1
- package/foundation/agent-docs/computer-agent-text.mjs +1 -1
- package/foundation/bases/core-docs.d.mts +10 -0
- package/foundation/bases/core-docs.mjs +42 -0
- package/foundation/bases/core.d.mts +11 -0
- package/foundation/bases/core.mjs +32 -0
- package/foundation/bases/requirements.d.mts +128 -0
- package/foundation/bases/requirements.mjs +193 -0
- package/foundation/bases/resolve.d.mts +134 -0
- package/foundation/bases/resolve.mjs +295 -0
- package/foundation/bases/state.d.mts +24 -0
- package/foundation/bases/state.mjs +46 -0
- package/foundation/bases/steps.d.mts +49 -0
- package/foundation/bases/steps.mjs +88 -0
- package/foundation/config/project.d.mts +14 -0
- package/foundation/config/project.mjs +68 -1
- package/foundation/discovery/cli-self-docs.mjs +9 -1
- package/foundation/discovery/command-pointers.d.mts +28 -0
- package/foundation/discovery/command-pointers.mjs +31 -0
- package/foundation/discovery/component-discovery.d.mts +9 -8
- package/foundation/discovery/component-discovery.mjs +9 -4
- package/foundation/discovery/docs-discovery.d.mts +13 -5
- package/foundation/discovery/docs-discovery.mjs +25 -6
- package/foundation/discovery/hook-discovery.d.mts +6 -6
- package/foundation/discovery/hook-discovery.mjs +6 -4
- package/foundation/discovery/template-adapter.mjs +5 -0
- package/foundation/discovery/template-ids.d.mts +1 -1
- package/foundation/discovery/template-ids.mjs +5 -1
- package/foundation/discovery/theme-discovery.mjs +3 -0
- package/foundation/discovery/theme-imports.mjs +19 -1
- package/foundation/doc-compiler/tree.d.mts +4 -2
- package/foundation/doc-compiler/tree.mjs +46 -1
- package/foundation/env/package-manager.d.mts +7 -0
- package/foundation/env/package-manager.mjs +21 -0
- package/foundation/fonts/font-stylesheet.d.mts +8 -0
- package/foundation/fonts/font-stylesheet.mjs +26 -2
- package/foundation/fs/gather-cache.mjs +44 -13
- package/foundation/fs/own-modules.d.mts +29 -0
- package/foundation/fs/own-modules.mjs +57 -0
- package/foundation/fs/paths.d.mts +30 -2
- package/foundation/fs/paths.mjs +49 -2
- package/foundation/integrations/integrations.d.mts +4 -0
- package/foundation/integrations/integrations.mjs +6 -1
- package/foundation/release/choose.d.mts +7 -0
- package/foundation/release/choose.mjs +16 -2
- package/foundation/release/notices.d.mts +26 -0
- package/foundation/release/notices.mjs +48 -19
- package/foundation/release/project.d.mts +3 -2
- package/foundation/release/project.mjs +4 -5
- package/foundation/release/run-context.d.mts +7 -2
- package/foundation/release/run-context.mjs +6 -2
- package/foundation/render/css-cut.mjs +86 -6
- package/foundation/render/cut-short.d.mts +35 -0
- package/foundation/render/cut-short.mjs +124 -0
- package/foundation/render/font-probe.d.mts +27 -0
- package/foundation/render/font-probe.mjs +77 -0
- package/foundation/render/layers.d.mts +1 -9
- package/foundation/render/layers.mjs +2 -111
- package/foundation/render/page-worker.mjs +83 -6
- package/foundation/render/picture-chrome.mjs +24 -2
- package/foundation/render/picture-playwright.mjs +22 -2
- package/foundation/render/picture-window.d.mts +20 -4
- package/foundation/render/picture-window.mjs +137 -4
- package/foundation/response/base.d.ts +25 -0
- package/foundation/response/error-codes.d.mts +4 -1
- package/foundation/response/error-codes.d.ts +4 -1
- package/foundation/response/error-codes.doc.mjs +17 -0
- package/foundation/response/error-codes.mjs +21 -0
- package/foundation/response/json.d.mts +3 -1
- package/foundation/response/json.mjs +7 -2
- package/foundation/response/response-types.doc.mjs +2 -2
- package/foundation/suggest/name-index.d.mts +2 -1
- package/foundation/suggest/name-index.mjs +1 -1
- package/foundation/suggest/other-command.d.mts +4 -1
- package/foundation/suggest/other-command.mjs +23 -6
- package/foundation/text/string-utils.d.mts +7 -2
- package/foundation/text/string-utils.mjs +24 -10
- package/package.json +6 -6
- package/assets/templates/pages/access-denied/page.tsx +0 -101
- package/assets/templates/pages/access-denied/template.doc.mjs +0 -24
- package/assets/templates/pages/error-page/page.tsx +0 -130
- package/assets/templates/pages/error-page/template.doc.mjs +0 -22
- package/assets/templates/pages/not-found/page.tsx +0 -124
- package/assets/templates/pages/not-found/template.doc.mjs +0 -30
- package/assets/templates/pages/review-workspace/page.tsx +0 -551
- package/assets/templates/pages/review-workspace/template.doc.mjs +0 -31
- package/assets/templates/pages/run-console/page.tsx +0 -945
- package/assets/templates/pages/run-console/template.doc.mjs +0 -27
- package/assets/templates/pages/welcome-portal/page.tsx +0 -538
- package/assets/templates/pages/welcome-portal/template.doc.mjs +0 -38
|
@@ -81,6 +81,7 @@ import {
|
|
|
81
81
|
showSections,
|
|
82
82
|
describe,
|
|
83
83
|
namesSetting,
|
|
84
|
+
needsPart,
|
|
84
85
|
} from '../../../../api/theme-edit/_adapter.mjs';
|
|
85
86
|
import {registerThemeSubcommands} from '../theme.mjs';
|
|
86
87
|
import {doc as groupDoc} from '../experimental-theme.doc.mjs';
|
|
@@ -113,6 +114,11 @@ import {doc as previewListFn} from '../../../../api/theme-edit/themeEditPreviewL
|
|
|
113
114
|
import {doc as previewRemoveFn} from '../../../../api/theme-edit/themeEditPreviewRemove.doc.mjs';
|
|
114
115
|
import {doc as howFn} from '../../../../api/theme-edit/themeEditHow.doc.mjs';
|
|
115
116
|
import {quoteCommandArgument} from '../../../../foundation/env/package-manager.mjs';
|
|
117
|
+
import {
|
|
118
|
+
commandAvailable,
|
|
119
|
+
exampleAvailable,
|
|
120
|
+
helpBase,
|
|
121
|
+
} from '../../lib/base-gate.mjs';
|
|
116
122
|
|
|
117
123
|
const PREFIX = 'astryx experimental theme';
|
|
118
124
|
const EDITOR = `${PREFIX} editor`;
|
|
@@ -361,7 +367,9 @@ async function run(program, call, render, answer) {
|
|
|
361
367
|
const changeOptions = o => ({
|
|
362
368
|
cwd: process.cwd(),
|
|
363
369
|
on: o.on,
|
|
364
|
-
when:
|
|
370
|
+
// (--when given for several props, a ghost small button: all at once,
|
|
371
|
+
// joined as Core's own keys join them.)
|
|
372
|
+
when: flagValues('when').length > 1 ? flagValues('when').join('+') : o.when,
|
|
365
373
|
state: o.state,
|
|
366
374
|
mode: o.mode,
|
|
367
375
|
only: o.only ?? false,
|
|
@@ -608,11 +616,12 @@ function changeBlocks(r) {
|
|
|
608
616
|
]
|
|
609
617
|
: []),
|
|
610
618
|
// The parts the theme's own changes still do not reach, counted near
|
|
611
|
-
// the top, so a head of the output keeps it; show
|
|
619
|
+
// the top, so a head of the output keeps it; show names the first ones
|
|
620
|
+
// with their lines, and show --json lists each.
|
|
612
621
|
...(missed
|
|
613
622
|
? [
|
|
614
623
|
record({
|
|
615
|
-
missed: `${missed} miss${missed > 1 ? 'es' : ''} on ${missedParts} part${missedParts > 1 ? 's' : ''} the theme's changes did not reach (show lists
|
|
624
|
+
missed: `${missed} miss${missed > 1 ? 'es' : ''} on ${missedParts} part${missedParts > 1 ? 's' : ''} the theme's changes did not reach (show lists the first with their lines; show --json lists each)`,
|
|
616
625
|
}),
|
|
617
626
|
]
|
|
618
627
|
: []),
|
|
@@ -756,7 +765,16 @@ function showBlocks(d) {
|
|
|
756
765
|
openProblems.length
|
|
757
766
|
? [
|
|
758
767
|
section(
|
|
759
|
-
`openProblems: ${openProblems.length} the theme has now
|
|
768
|
+
`openProblems: ${openProblems.length} the theme has now${(() => {
|
|
769
|
+
const fixable = openProblems.filter(
|
|
770
|
+
(/** @type {any} */ p) => p.fix,
|
|
771
|
+
).length;
|
|
772
|
+
return fixable === openProblems.length
|
|
773
|
+
? '; each fix line fixes one'
|
|
774
|
+
: fixable
|
|
775
|
+
? `; ${fixable} with a fix line that fixes it, the rest with none (no one line fixes those alone)`
|
|
776
|
+
: '; none has a fix line (no one line fixes these alone)';
|
|
777
|
+
})()}`,
|
|
760
778
|
),
|
|
761
779
|
...problemList(openProblems),
|
|
762
780
|
]
|
|
@@ -863,8 +881,11 @@ function lookupBlocks(d) {
|
|
|
863
881
|
*/
|
|
864
882
|
function strayOption(command, doc, rest) {
|
|
865
883
|
// A scope flag given twice would keep only the last one without a word.
|
|
884
|
+
// (--when takes one value per prop: those are joined, all at once.)
|
|
866
885
|
for (const flag of ['on', 'when', 'state', 'mode']) {
|
|
867
886
|
const all = flagValues(flag);
|
|
887
|
+
const props = all.map(w => String(w).split(':')[0].trim().toLowerCase());
|
|
888
|
+
if (flag === 'when' && new Set(props).size === all.length) continue;
|
|
868
889
|
if (new Set(all).size > 1)
|
|
869
890
|
return cliError(
|
|
870
891
|
`--${flag} was given twice (${all.join(', ')}); give it once.`,
|
|
@@ -1435,6 +1456,22 @@ function previewExtraWords(sub, doc, head) {
|
|
|
1435
1456
|
* @param {{png?: boolean, section?: string}} o the options read
|
|
1436
1457
|
*/
|
|
1437
1458
|
function showStray(name, rest, o) {
|
|
1459
|
+
// The theme typed as an option (`show --theme t`), as set and undo read
|
|
1460
|
+
// it: the show on that theme, never its help alone.
|
|
1461
|
+
const asOption = /^--?(?:theme|name)$/i.test(String(name));
|
|
1462
|
+
if (asOption && rest.length) {
|
|
1463
|
+
const theme = String(rest[0]);
|
|
1464
|
+
return strayRefusal(
|
|
1465
|
+
'show',
|
|
1466
|
+
showDoc,
|
|
1467
|
+
`${EDITOR} show`,
|
|
1468
|
+
{
|
|
1469
|
+
option: String(name),
|
|
1470
|
+
note: "the theme is show's first word",
|
|
1471
|
+
},
|
|
1472
|
+
`${EDITOR} show ${quoteCommandArgument(theme)}${o.section ? ` --section ${o.section}` : ''}${o.png ? ' --png' : ''}`,
|
|
1473
|
+
);
|
|
1474
|
+
}
|
|
1438
1475
|
const stray = rest.map(String).find(w => w.startsWith('-'));
|
|
1439
1476
|
if (stray == null) return null;
|
|
1440
1477
|
// An option the one reader names never comes here (readOptions reads
|
|
@@ -1518,6 +1555,7 @@ function defineGroup(parent, doc) {
|
|
|
1518
1555
|
const word = String(extras[0]).toLowerCase();
|
|
1519
1556
|
const group = doc.name.split(' ').at(-1) ?? '';
|
|
1520
1557
|
const ranked = (cmd.commands ?? [])
|
|
1558
|
+
.filter(command => commandAvailable(command, helpBase()))
|
|
1521
1559
|
.map(command => command.name())
|
|
1522
1560
|
.sort(
|
|
1523
1561
|
(a, b) =>
|
|
@@ -1557,7 +1595,9 @@ function defineGroup(parent, doc) {
|
|
|
1557
1595
|
type: 'help',
|
|
1558
1596
|
data: {
|
|
1559
1597
|
command: words.join(' '),
|
|
1560
|
-
commands: (cmd.commands ?? [])
|
|
1598
|
+
commands: (cmd.commands ?? [])
|
|
1599
|
+
.filter(command => commandAvailable(command, helpBase()))
|
|
1600
|
+
.map(command => ({
|
|
1561
1601
|
name: command.name(),
|
|
1562
1602
|
summary: command.summary() || command.description(),
|
|
1563
1603
|
})),
|
|
@@ -1615,12 +1655,20 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1615
1655
|
setUnknownOptionReader(unknownThemeOption);
|
|
1616
1656
|
const theme = defineGroup(group, groupDoc);
|
|
1617
1657
|
explained(theme, groupDoc);
|
|
1658
|
+
// The run's base may not serve a line's command; help then leaves it out.
|
|
1659
|
+
const overrides = [
|
|
1660
|
+
['experimental theme targets', ` ${getCliInvocation()} experimental theme targets Every themeable class, with its props and states\n`],
|
|
1661
|
+
['experimental theme editor how', ` ${getCliInvocation()} experimental theme editor how <part> What one part reads, and the commands that change it\n`],
|
|
1662
|
+
['component <Name>', ` ${getCliInvocation()} component <Name> One component's theming table\n`],
|
|
1663
|
+
];
|
|
1618
1664
|
theme.addHelpText(
|
|
1619
1665
|
'after',
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1666
|
+
() =>
|
|
1667
|
+
`\nComponent style overrides:\n` +
|
|
1668
|
+
overrides
|
|
1669
|
+
.filter(([cli]) => exampleAvailable(program, cli, helpBase()))
|
|
1670
|
+
.map(([, line]) => line)
|
|
1671
|
+
.join(''),
|
|
1624
1672
|
);
|
|
1625
1673
|
|
|
1626
1674
|
const editor = defineGroup(theme, editorDoc);
|
|
@@ -1658,38 +1706,6 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1658
1706
|
(/** @type {string} */ w) =>
|
|
1659
1707
|
/^-/.test(w) && !takes.has(w.split('=')[0]),
|
|
1660
1708
|
);
|
|
1661
|
-
// `--base` is the dial new takes as --like.
|
|
1662
|
-
if (stray && stray.split('=')[0] === '--base') {
|
|
1663
|
-
const args = (cmd?.args ?? []).slice(1).map(String);
|
|
1664
|
-
const at = args.indexOf(stray);
|
|
1665
|
-
const value = stray.includes('=')
|
|
1666
|
-
? stray.slice(stray.indexOf('=') + 1)
|
|
1667
|
-
: args[at + 1];
|
|
1668
|
-
// Thrown, as every refusal inside run is: run prints it once
|
|
1669
|
-
// (a refusal printed here and then caught again by run would
|
|
1670
|
-
// print twice where exit does not end the process).
|
|
1671
|
-
// The line with --like is checked as new checks it (an
|
|
1672
|
-
// install first, other flags' repairs folded in), as the
|
|
1673
|
-
// option reader's lines are.
|
|
1674
|
-
const lines = value
|
|
1675
|
-
? await checkedOptionLines(
|
|
1676
|
-
'editor',
|
|
1677
|
-
'new',
|
|
1678
|
-
`${EDITOR} new ${quoteCommandArgument(name)}${newFlagLine({...o, like: value})}`,
|
|
1679
|
-
)
|
|
1680
|
-
: [];
|
|
1681
|
-
throw new AstryxError(
|
|
1682
|
-
`new takes the base theme as --like, not --base.`,
|
|
1683
|
-
[
|
|
1684
|
-
...lines,
|
|
1685
|
-
{
|
|
1686
|
-
name: `${EDITOR} new --help`,
|
|
1687
|
-
reason: 'every option it takes',
|
|
1688
|
-
},
|
|
1689
|
-
],
|
|
1690
|
-
ERROR_CODES.ERR_INVALID_OPTION,
|
|
1691
|
-
);
|
|
1692
|
-
}
|
|
1693
1709
|
if (stray)
|
|
1694
1710
|
throw new AstryxError(
|
|
1695
1711
|
`unknown option '${stray}'.`,
|
|
@@ -1931,14 +1947,30 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1931
1947
|
/[A-Z]/g,
|
|
1932
1948
|
c => `-${c.toLowerCase()}`,
|
|
1933
1949
|
);
|
|
1950
|
+
/**
|
|
1951
|
+
* A key, a value or a word without the quotes around it
|
|
1952
|
+
* (`"accent"`, `'base neutral'`); a text that holds a quote
|
|
1953
|
+
* of its own (`"like": "neutral"`) keeps them, since its
|
|
1954
|
+
* ends are two quotes, not one pair.
|
|
1955
|
+
* @param {string} x
|
|
1956
|
+
*/
|
|
1957
|
+
const unquote = x => {
|
|
1958
|
+
const t = String(x).trim();
|
|
1959
|
+
const m = /^(["'])([\s\S]*)\1$/.exec(t);
|
|
1960
|
+
return m && !m[2].includes(m[1]) ? m[2] : t;
|
|
1961
|
+
};
|
|
1934
1962
|
/**
|
|
1935
1963
|
* The settings one typed word holds, each `[dial, value]`: a
|
|
1936
1964
|
* JSON object, `key=value` or `key: value` pairs, or `dial
|
|
1937
1965
|
* value` items, apart at `;` or `,`; null when it holds none.
|
|
1938
|
-
* @param {string}
|
|
1966
|
+
* @param {string} rawWord
|
|
1939
1967
|
* @returns {Array<[string, string]> | null}
|
|
1940
1968
|
*/
|
|
1941
|
-
const pairsIn =
|
|
1969
|
+
const pairsIn = (/** @type {string} */ rawWord) => {
|
|
1970
|
+
// A word with its own quotes around it (`'base neutral'`,
|
|
1971
|
+
// `"accent"`) is that word, as the shell would have given
|
|
1972
|
+
// it: the quotes are no part of a name.
|
|
1973
|
+
const w = unquote(rawWord);
|
|
1942
1974
|
/** @type {unknown} */
|
|
1943
1975
|
let json;
|
|
1944
1976
|
try {
|
|
@@ -1951,15 +1983,15 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1951
1983
|
? Object.entries(json)
|
|
1952
1984
|
: [];
|
|
1953
1985
|
if (entries.length)
|
|
1954
|
-
return entries.every(
|
|
1986
|
+
return entries.every(
|
|
1987
|
+
([k]) => dialOf(k) || namesSetting(unquote(k)),
|
|
1988
|
+
)
|
|
1955
1989
|
? entries.map(([k, v]) => [k, String(v)])
|
|
1956
1990
|
: null;
|
|
1957
1991
|
// `key=value`, `key: value`, keys and values in quotes or
|
|
1958
1992
|
// not (`"like": "neutral"`), in either order (`red=accent`,
|
|
1959
1993
|
// `stone=like`), as set reads a pair swapped; `like` is
|
|
1960
1994
|
// never a value (`neutral=like` is the base neutral).
|
|
1961
|
-
const unquote = (/** @type {string} */ x) =>
|
|
1962
|
-
x.trim().replace(/^(["'])(.*)\1$/, '$2');
|
|
1963
1995
|
const byColon = w
|
|
1964
1996
|
.split(/\s*;\s*/)
|
|
1965
1997
|
.map(x =>
|
|
@@ -1975,20 +2007,25 @@ export function registerExperimentalTheme(group, program) {
|
|
|
1975
2007
|
const [k, v] = [unquote(m[1]), unquote(m[3])];
|
|
1976
2008
|
if (dialOf(v) === 'like' && !dialOf(k)?.startsWith('like'))
|
|
1977
2009
|
read.push([v, k]);
|
|
1978
|
-
else if (dialOf(k)) read.push([k, v]);
|
|
2010
|
+
else if (dialOf(k) || namesSetting(k)) read.push([k, v]);
|
|
1979
2011
|
else if (dialOf(v) && !/\s/.test(v)) read.push([v, k]);
|
|
1980
2012
|
else return null;
|
|
1981
2013
|
}
|
|
1982
2014
|
if (read.length) return read;
|
|
1983
|
-
// `'accent red'`, `'accent red, corners pill'
|
|
2015
|
+
// `'accent red'`, `'accent red, corners pill'`, `'base
|
|
2016
|
+
// neutral'`.
|
|
1984
2017
|
if (!/\s/.test(w.trim())) return null;
|
|
1985
2018
|
const items = w
|
|
1986
2019
|
.split(/\s*[;,]\s*/)
|
|
1987
2020
|
.map(x => x.trim().split(/\s+/))
|
|
1988
2021
|
.filter(x => x[0]);
|
|
1989
2022
|
return items.length &&
|
|
1990
|
-
items.every(
|
|
1991
|
-
|
|
2023
|
+
items.every(
|
|
2024
|
+
x =>
|
|
2025
|
+
x.length > 1 &&
|
|
2026
|
+
(dialOf(x[0]) || namesSetting(unquote(x[0]))),
|
|
2027
|
+
)
|
|
2028
|
+
? items.map(x => [unquote(x[0]), x.slice(1).join(' ')])
|
|
1992
2029
|
: null;
|
|
1993
2030
|
};
|
|
1994
2031
|
/** @type {string[]} */
|
|
@@ -2011,7 +2048,8 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2011
2048
|
continue;
|
|
2012
2049
|
}
|
|
2013
2050
|
pasted = -1;
|
|
2014
|
-
|
|
2051
|
+
// A word quoted on its own (`"accent"`) keeps no quotes.
|
|
2052
|
+
kept.push(unquote(w));
|
|
2015
2053
|
}
|
|
2016
2054
|
// `accent red`: a dial word, and its value up to the next
|
|
2017
2055
|
// setting; `red accent`: a value, then the dial it is for (as
|
|
@@ -2032,16 +2070,25 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2032
2070
|
i += 1;
|
|
2033
2071
|
continue;
|
|
2034
2072
|
}
|
|
2073
|
+
const builtIn = (/** @type {string} */ w) =>
|
|
2074
|
+
builtInThemes().includes(String(w).toLowerCase());
|
|
2075
|
+
// A built-in theme's name is the base, whatever word is
|
|
2076
|
+
// beside it (`theme neutral`, `neutral stone`): the base
|
|
2077
|
+
// reader below takes it, never a dial of the same name.
|
|
2078
|
+
if (builtIn(kept[i])) {
|
|
2079
|
+
rest.push(kept[i]);
|
|
2080
|
+
continue;
|
|
2081
|
+
}
|
|
2035
2082
|
if (dialOf(kept[i])) {
|
|
2036
2083
|
const value = [];
|
|
2037
2084
|
let j = i + 1;
|
|
2038
|
-
while (
|
|
2085
|
+
while (
|
|
2086
|
+
j < kept.length &&
|
|
2087
|
+
!isSetting(kept[j]) &&
|
|
2088
|
+
!builtIn(kept[j])
|
|
2089
|
+
)
|
|
2039
2090
|
value.push(kept[j++]);
|
|
2040
2091
|
if (value.length) pairs.push([kept[i], value.join(' ')]);
|
|
2041
|
-
// (A built-in theme's name, `neutral`, is the base the
|
|
2042
|
-
// reader below takes, not a bare dial.)
|
|
2043
|
-
else if (builtInThemes().includes(kept[i].toLowerCase()))
|
|
2044
|
-
rest.push(kept[i]);
|
|
2045
2092
|
else bare.push(kept[i]);
|
|
2046
2093
|
i = j - 1;
|
|
2047
2094
|
continue;
|
|
@@ -2050,6 +2097,7 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2050
2097
|
!isSetting(kept[i]) &&
|
|
2051
2098
|
kept[i + 1] != null &&
|
|
2052
2099
|
dialOf(kept[i + 1]) &&
|
|
2100
|
+
!builtIn(kept[i + 1]) &&
|
|
2053
2101
|
(kept[i + 2] == null || isSetting(kept[i + 2]))
|
|
2054
2102
|
) {
|
|
2055
2103
|
pairs.push([kept[i + 1], kept[i]]);
|
|
@@ -2059,6 +2107,13 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2059
2107
|
rest.push(kept[i]);
|
|
2060
2108
|
}
|
|
2061
2109
|
for (const [k, v] of pairs) {
|
|
2110
|
+
// A setting new has no option for (`padding: 8px`) is a
|
|
2111
|
+
// set after the theme is made, as the space form is.
|
|
2112
|
+
if (!dialOf(k)) {
|
|
2113
|
+
later.push([unquote(k), v]);
|
|
2114
|
+
intoValues.push(`${unquote(k)} ${v}`);
|
|
2115
|
+
continue;
|
|
2116
|
+
}
|
|
2062
2117
|
const key = /** @type {string} */ (dialOf(k));
|
|
2063
2118
|
if (given[key] == null) given[key] = v;
|
|
2064
2119
|
intoValues.push(`${dialName(k)} ${v}`);
|
|
@@ -2069,7 +2124,12 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2069
2124
|
const named = [];
|
|
2070
2125
|
for (let i = 0; i < rest.length; i++) {
|
|
2071
2126
|
const thing = rest[i].replace(/[:=]+$/, '');
|
|
2072
|
-
|
|
2127
|
+
// (A built-in theme's name is the base, read below.)
|
|
2128
|
+
if (
|
|
2129
|
+
namesSetting(thing) &&
|
|
2130
|
+
!builtInThemes().includes(thing.toLowerCase()) &&
|
|
2131
|
+
rest[i + 1] != null
|
|
2132
|
+
) {
|
|
2073
2133
|
const value = [];
|
|
2074
2134
|
let j = i + 1;
|
|
2075
2135
|
while (j < rest.length && !isSetting(rest[j]))
|
|
@@ -2100,14 +2160,20 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2100
2160
|
);
|
|
2101
2161
|
if (baseAt >= 0 && given.like == null)
|
|
2102
2162
|
given.like = all[baseAt].toLowerCase();
|
|
2103
|
-
// (`base stone`
|
|
2163
|
+
// (`base stone` and `theme stone` are the base as `like
|
|
2164
|
+
// stone` is; a second base typed is no word of the name.)
|
|
2104
2165
|
const nameWords = all.filter(
|
|
2105
2166
|
(w, i) =>
|
|
2106
2167
|
i !== baseAt &&
|
|
2107
2168
|
!(
|
|
2108
2169
|
baseAt >= 0 &&
|
|
2109
|
-
/^(like|base)
|
|
2170
|
+
/^(like|base|theme)[:=]?$/i.test(w) &&
|
|
2110
2171
|
i === baseAt - 1
|
|
2172
|
+
) &&
|
|
2173
|
+
!(
|
|
2174
|
+
baseAt >= 0 &&
|
|
2175
|
+
i > baseAt &&
|
|
2176
|
+
builtInThemes().includes(w.toLowerCase())
|
|
2111
2177
|
),
|
|
2112
2178
|
);
|
|
2113
2179
|
const fixed = nameWords
|
|
@@ -2150,10 +2216,19 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2150
2216
|
: `new takes one theme name; "${(nameWord ? [...intoValues, ...words] : extra).join(' ')}" is extra.${read ? ' A value of more than one word goes in quotes.' : ''} For a base theme, use --like. Nothing was changed.`,
|
|
2151
2217
|
[
|
|
2152
2218
|
...lines,
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2219
|
+
// A CSS property is written on a part: the ask that
|
|
2220
|
+
// names the parts, never a set line set itself refuses.
|
|
2221
|
+
...later.map(([thing, value]) =>
|
|
2222
|
+
needsPart(thing)
|
|
2223
|
+
? {
|
|
2224
|
+
name: `${HOW} ${quoteCommandArgument(`${value} ${thing}`)}`,
|
|
2225
|
+
reason: `then this: new takes no ${thing}, and set writes it on a part (--on)`,
|
|
2226
|
+
}
|
|
2227
|
+
: {
|
|
2228
|
+
name: `${EDITOR} set ${quoteCommandArgument(fixed)} ${quoteCommandArgument(thing)} ${quoteCommandArgument(value)}`,
|
|
2229
|
+
reason: `then this: new takes no ${thing}; set gives it`,
|
|
2230
|
+
},
|
|
2231
|
+
),
|
|
2157
2232
|
],
|
|
2158
2233
|
ERROR_CODES.ERR_INVALID_ARGUMENT,
|
|
2159
2234
|
);
|
|
@@ -2169,7 +2244,7 @@ export function registerExperimentalTheme(group, program) {
|
|
|
2169
2244
|
`[ok] made theme "${r.data.theme}"${r.data.like ? ` on top of ${r.data.like}` : ''}`,
|
|
2170
2245
|
...changeFields(/** @type {any} */ (r.data)),
|
|
2171
2246
|
`Tip: ${EDITOR} set ${r.data.theme} <thing> <value>, or ${HOW} "<what you want>"`,
|
|
2172
|
-
`Look at it after each change (this changes nothing in your app): ${EDITOR} show ${r.data.theme} --png writes themes/${r.data.theme}/preview.png (a sample page), sheet-overlays.png (every menu, tooltip, popover and list, open) and sheet.png
|
|
2247
|
+
`Look at it after each change (this changes nothing in your app): ${EDITOR} show ${r.data.theme} --png writes themes/${r.data.theme}/preview.png (a sample page), sheet-overlays.png (each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list, open) and a picture of each family of components the theme sets a part of (sheet-actions.png, the buttons, while it sets none) from real components, and --section <family> --png pictures any other family (actions, inputs, selection, navigation, feedback, data, containers); open the family pictures, preview.png and sheet-overlays.png and check them against the request`,
|
|
2173
2248
|
],
|
|
2174
2249
|
),
|
|
2175
2250
|
}),
|
|
@@ -28,6 +28,7 @@ export const doc = {
|
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
flag: '--reverse',
|
|
31
|
+
requires: ['render.reverse'],
|
|
31
32
|
param: 'options.reverse',
|
|
32
33
|
description: 'Turn a rendered HTML file back into a page module',
|
|
33
34
|
},
|
|
@@ -60,6 +61,7 @@ export const doc = {
|
|
|
60
61
|
{label: 'As JSON', cli: 'astryx --json experimental render page.tsx'},
|
|
61
62
|
],
|
|
62
63
|
outsideProject: 'same',
|
|
64
|
+
requires: ['render.page'],
|
|
63
65
|
exitCodes: [
|
|
64
66
|
{code: 0, when: 'the file was written (warnings included)'},
|
|
65
67
|
{
|
|
@@ -22,6 +22,7 @@ export const doc = {
|
|
|
22
22
|
name: 'slug',
|
|
23
23
|
param: 'slug',
|
|
24
24
|
required: false,
|
|
25
|
+
names: 'theme',
|
|
25
26
|
},
|
|
26
27
|
],
|
|
27
28
|
options: [
|
|
@@ -52,6 +53,7 @@ export const doc = {
|
|
|
52
53
|
},
|
|
53
54
|
],
|
|
54
55
|
outsideProject: 'own',
|
|
56
|
+
requires: ['themes.appModule'],
|
|
55
57
|
exitCodes: [
|
|
56
58
|
{
|
|
57
59
|
code: 0,
|
|
@@ -28,6 +28,7 @@ export const doc = {
|
|
|
28
28
|
{
|
|
29
29
|
flag: '--like <theme>',
|
|
30
30
|
param: 'options.like',
|
|
31
|
+
names: 'theme',
|
|
31
32
|
description:
|
|
32
33
|
'A built-in theme to build on: neutral, stone, matcha, y2k, gothic, chocolate, or butter; or none, for Astryx defaults (the same as leaving it out)',
|
|
33
34
|
},
|
|
@@ -35,7 +36,7 @@ export const doc = {
|
|
|
35
36
|
flag: '--png',
|
|
36
37
|
param: 'options.png',
|
|
37
38
|
description:
|
|
38
|
-
'Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds sheet.
|
|
39
|
+
'Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of, or of the buttons when it sets none, and show --section <family> --png takes any other family; sheet.html, every component, is not pictured), 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-overlays.png) is never written over: no picture is taken, and the result names the file',
|
|
39
40
|
},
|
|
40
41
|
{
|
|
41
42
|
flag: '--corners <rung>',
|
|
@@ -149,6 +150,7 @@ export const doc = {
|
|
|
149
150
|
},
|
|
150
151
|
],
|
|
151
152
|
outsideProject: 'refuse',
|
|
153
|
+
requires: ['themes.targets', 'themes.compile'],
|
|
152
154
|
notes: [
|
|
153
155
|
{
|
|
154
156
|
type: 'prose',
|
|
@@ -43,7 +43,7 @@ export const doc = {
|
|
|
43
43
|
flag: '--when <prop:value>',
|
|
44
44
|
param: 'options.when',
|
|
45
45
|
description:
|
|
46
|
-
'Only that variant of the part, such as variant:primary or status:error (how <part> lists them); needs --on',
|
|
46
|
+
'Only that variant of the part, such as variant:primary or status:error (how <part> lists them); give it once per prop for several at once (--when variant:ghost --when size:sm, or variant:ghost+size:sm); needs --on',
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
flag: '--state <state>',
|
|
@@ -67,7 +67,7 @@ export const doc = {
|
|
|
67
67
|
flag: '--png',
|
|
68
68
|
param: 'options.png',
|
|
69
69
|
description:
|
|
70
|
-
|
|
70
|
+
"Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of, or of the buttons when it sets none, and show --section <family> --png takes any other family; sheet.html, every component, is not pictured), 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-overlays.png) is never written over: no picture is taken, and the result names the file. A change removes the pictures --png took of the look before it (the preview, the sheet and each section sheet, in each mode) and the result names them; a section sheet's page stays, marked as out of date",
|
|
71
71
|
},
|
|
72
72
|
],
|
|
73
73
|
examples: [
|
|
@@ -113,6 +113,7 @@ export const doc = {
|
|
|
113
113
|
},
|
|
114
114
|
],
|
|
115
115
|
outsideProject: 'refuse',
|
|
116
|
+
requires: ['themes.targets', 'themes.compile'],
|
|
116
117
|
notes: [
|
|
117
118
|
{
|
|
118
119
|
type: 'prose',
|
|
@@ -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): preview.png, the sample page, and sheet-overlays.png, every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds sheet
|
|
35
|
+
"Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of with --on, or of the buttons when it sets none: sheet-<family>.png, from the sheet-<family>.html it writes beside the full sheet; the families are actions, inputs, selection, navigation, feedback, data and containers. With --section, that section's picture is taken in their place, so --section <family> --png pictures any other family. sheet.html, every component, is written but not pictured; the open states are taken with a section too), 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-overlays.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: [
|
|
@@ -46,6 +46,7 @@ export const doc = {
|
|
|
46
46
|
},
|
|
47
47
|
],
|
|
48
48
|
outsideProject: 'refuse',
|
|
49
|
+
requires: ['themes.compile'],
|
|
49
50
|
notes: [
|
|
50
51
|
{
|
|
51
52
|
type: 'prose',
|
|
@@ -42,7 +42,7 @@ export const doc = {
|
|
|
42
42
|
flag: '--when <prop:value>',
|
|
43
43
|
param: 'options.when',
|
|
44
44
|
description:
|
|
45
|
-
'Only that variant of the part, such as variant:primary or status:error (how <part> lists them); needs --on',
|
|
45
|
+
'Only that variant of the part, such as variant:primary or status:error (how <part> lists them); give it once per prop for several at once (--when variant:ghost --when size:sm, or variant:ghost+size:sm); needs --on',
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
flag: '--state <state>',
|
|
@@ -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): preview.png, the sample page, and sheet-overlays.png, every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds sheet.
|
|
69
|
+
"Also take PNG pictures of the previews (light and dark): preview.png, the sample page, and sheet-overlays.png, each control at rest, hovered, focused and pressed at its top, then every menu, tooltip, popover and list drawn open (from sheet-overlays.html, which it writes too; a file of yours by that name is left alone and the picture not taken) (show adds a picture of each family of components the theme sets a part of, or of the buttons when it sets none, and show --section <family> --png takes any other family; sheet.html, every component, is not pictured), 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-overlays.png) is never written over: no picture is taken, and the result names the file. A change removes the pictures --png took of the look before it (the preview, the sheet and each section sheet, in each mode) and the result names them; a section sheet's page stays, marked as out of date",
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
72
|
examples: [
|
|
@@ -84,6 +84,7 @@ export const doc = {
|
|
|
84
84
|
},
|
|
85
85
|
],
|
|
86
86
|
outsideProject: 'refuse',
|
|
87
|
+
requires: ['themes.compile'],
|
|
87
88
|
notes: [
|
|
88
89
|
{
|
|
89
90
|
type: 'prose',
|
|
@@ -21,6 +21,7 @@ export const doc = {
|
|
|
21
21
|
name: 'slug',
|
|
22
22
|
param: 'slug',
|
|
23
23
|
required: true,
|
|
24
|
+
names: 'theme',
|
|
24
25
|
},
|
|
25
26
|
],
|
|
26
27
|
examples: [
|
|
@@ -30,6 +31,7 @@ export const doc = {
|
|
|
30
31
|
},
|
|
31
32
|
],
|
|
32
33
|
outsideProject: 'refuse',
|
|
34
|
+
requires: ['themes.appModule'],
|
|
33
35
|
exitCodes: [
|
|
34
36
|
{
|
|
35
37
|
code: 0,
|
|
@@ -21,6 +21,7 @@ export const doc = {
|
|
|
21
21
|
name: 'slug',
|
|
22
22
|
param: 'slug',
|
|
23
23
|
required: true,
|
|
24
|
+
names: 'theme',
|
|
24
25
|
},
|
|
25
26
|
],
|
|
26
27
|
examples: [
|
|
@@ -30,6 +31,7 @@ export const doc = {
|
|
|
30
31
|
},
|
|
31
32
|
],
|
|
32
33
|
outsideProject: 'refuse',
|
|
34
|
+
requires: ['themes.appModule'],
|
|
33
35
|
exitCodes: [
|
|
34
36
|
{
|
|
35
37
|
code: 0,
|
|
@@ -18,7 +18,7 @@ export const doc = {
|
|
|
18
18
|
'Resolves a hook by name and prints its authored doc, or lists the catalog grouped ' +
|
|
19
19
|
'by category. The --params flag narrows a single hook to just its parameters table.',
|
|
20
20
|
fn: 'hook',
|
|
21
|
-
args: [{name: 'name', param: 'name', required: false}],
|
|
21
|
+
args: [{name: 'name', param: 'name', required: false, names: 'hook'}],
|
|
22
22
|
options: [
|
|
23
23
|
{
|
|
24
24
|
flag: '--list',
|