@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
|
@@ -68,6 +68,8 @@ import {findNodeModulesPackage} from '../../foundation/fs/paths.mjs';
|
|
|
68
68
|
import {themeFileImports} from '../../foundation/discovery/theme-discovery.mjs';
|
|
69
69
|
import {withListingCache} from '../../foundation/fs/listing-cache.mjs';
|
|
70
70
|
import {compareText} from '../../foundation/text/compare-text.mjs';
|
|
71
|
+
import {FONT_PROBE_PREFIX} from '../../foundation/render/font-probe.mjs';
|
|
72
|
+
import {CUT_SHORT_PREFIX} from '../../foundation/render/cut-short.mjs';
|
|
71
73
|
|
|
72
74
|
const TEMPLATES_DIR = path.resolve(
|
|
73
75
|
path.dirname(fileURLToPath(import.meta.url)),
|
|
@@ -116,6 +118,76 @@ function groupOf(name, category) {
|
|
|
116
118
|
return null;
|
|
117
119
|
}
|
|
118
120
|
|
|
121
|
+
/**
|
|
122
|
+
* A container's or a layout's props on the sheet, with two lines of sample
|
|
123
|
+
* text when its doc suggests no children (a section, a form layout): empty,
|
|
124
|
+
* it draws nothing of the theme. The part data reads the doc's own props.
|
|
125
|
+
* @param {import('./_project.mjs').ThemeProject} project
|
|
126
|
+
* @param {string} name
|
|
127
|
+
* @param {Record<string, unknown>} props
|
|
128
|
+
* @returns {Record<string, unknown>}
|
|
129
|
+
*/
|
|
130
|
+
function withSampleContent(project, name, props) {
|
|
131
|
+
const info = project.components[name];
|
|
132
|
+
const kids = info?.props?.children;
|
|
133
|
+
if (
|
|
134
|
+
'children' in props ||
|
|
135
|
+
!kids ||
|
|
136
|
+
kids.slots?.length ||
|
|
137
|
+
!/ReactNode/.test(String(kids.type ?? '')) ||
|
|
138
|
+
!/^(container|layout)$/i.test(String(info.category ?? '')) ||
|
|
139
|
+
!project.components.Text
|
|
140
|
+
)
|
|
141
|
+
return props;
|
|
142
|
+
return {
|
|
143
|
+
...props,
|
|
144
|
+
children: [
|
|
145
|
+
{__element: 'Text', props: {}, children: ['Content']},
|
|
146
|
+
{__element: 'Text', props: {}, children: ['More content']},
|
|
147
|
+
],
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* The section of the theme-building page a component sits in; a part with
|
|
153
|
+
* no category of its own sits with its parent.
|
|
154
|
+
* @param {import('./_project.mjs').ThemeProject} project
|
|
155
|
+
* @param {string} name
|
|
156
|
+
* @returns {string | null}
|
|
157
|
+
*/
|
|
158
|
+
export function familyOf(project, name) {
|
|
159
|
+
const info = project.components[name];
|
|
160
|
+
const parent = info?.subComponentOf
|
|
161
|
+
? project.components[info.subComponentOf]
|
|
162
|
+
: null;
|
|
163
|
+
return groupOf(name, info?.category || parent?.category || '');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The sections of the theme-building page whose parts the theme's settings
|
|
168
|
+
* set on their own (`--on badge`): the components that part names a class
|
|
169
|
+
* of, each in its section. A setting for the whole theme (a color, the
|
|
170
|
+
* corners) sets no section here: the sample page and the open states show
|
|
171
|
+
* it.
|
|
172
|
+
* @param {import('./_project.mjs').ThemeProject} project
|
|
173
|
+
* @param {import('./_settings.mjs').ThemeData} data
|
|
174
|
+
* @returns {string[]}
|
|
175
|
+
*/
|
|
176
|
+
export function touchedFamilies(project, data) {
|
|
177
|
+
const parts = new Set(
|
|
178
|
+
(data.settings ?? []).flatMap(s => (s.on ? [s.on] : [])),
|
|
179
|
+
);
|
|
180
|
+
/** @type {Set<string>} */
|
|
181
|
+
const out = new Set();
|
|
182
|
+
for (const [name, info] of Object.entries(project.components)) {
|
|
183
|
+
if (!info.targets.some(t => parts.has(t.className.replace(/^astryx-/, ''))))
|
|
184
|
+
continue;
|
|
185
|
+
const family = familyOf(project, name);
|
|
186
|
+
if (family) out.add(family);
|
|
187
|
+
}
|
|
188
|
+
return [...out];
|
|
189
|
+
}
|
|
190
|
+
|
|
119
191
|
/**
|
|
120
192
|
* Items of the theme-building page: each component once per variant
|
|
121
193
|
* (overlays open), the sample page, and template pages
|
|
@@ -128,14 +200,7 @@ export function showcaseItems(project, group) {
|
|
|
128
200
|
/** @type {import('./_catalog.mjs').CatalogItem[]} */
|
|
129
201
|
const items = [];
|
|
130
202
|
/** @param {string} name */
|
|
131
|
-
const groupFor = name =>
|
|
132
|
-
const info = project.components[name];
|
|
133
|
-
// A part with no category of its own sits with its parent.
|
|
134
|
-
const parent = info?.subComponentOf
|
|
135
|
-
? project.components[info.subComponentOf]
|
|
136
|
-
: null;
|
|
137
|
-
return groupOf(name, info?.category || parent?.category || '');
|
|
138
|
-
};
|
|
203
|
+
const groupFor = name => familyOf(project, name);
|
|
139
204
|
for (const name of Object.keys(project.components)) {
|
|
140
205
|
const g = groupFor(name);
|
|
141
206
|
if (!g) continue;
|
|
@@ -155,7 +220,10 @@ export function showcaseItems(project, group) {
|
|
|
155
220
|
group: g,
|
|
156
221
|
name,
|
|
157
222
|
label: v.label,
|
|
158
|
-
tree: inParent({
|
|
223
|
+
tree: inParent({
|
|
224
|
+
__element: name,
|
|
225
|
+
props: withSampleContent(project, name, v.props),
|
|
226
|
+
}),
|
|
159
227
|
// An overlay shown open is drawn open: Core places a popover,
|
|
160
228
|
// tooltip or hover card only once it is mounted. Any other part, as
|
|
161
229
|
// first shown, is shown open with the overlays too when a press
|
|
@@ -1851,14 +1919,17 @@ export function newPictureRun() {
|
|
|
1851
1919
|
* gets its own time bound, and the next one its turn when one fails or
|
|
1852
1920
|
* hangs. Not ok with a reason when none is there or every one failed: the
|
|
1853
1921
|
* reason then names each one's real error. When a later browser took the
|
|
1854
|
-
* picture, `note` says why an earlier one did not.
|
|
1922
|
+
* picture, `note` says why an earlier one did not. `cutShort` is the text
|
|
1923
|
+
* the page draws cut short, measured in it by the browser that took the
|
|
1924
|
+
* picture, each with whether its part keeping its width draws it whole;
|
|
1925
|
+
* absent when that browser's script measured nothing.
|
|
1855
1926
|
* @param {import('./_project.mjs').ThemeProject} project
|
|
1856
1927
|
* @param {string} html absolute
|
|
1857
1928
|
* @param {string} png absolute
|
|
1858
1929
|
* @param {'light' | 'dark'} mode
|
|
1859
1930
|
* @param {PictureRun} [run] what earlier pictures of the same run learned:
|
|
1860
1931
|
* a browser that failed or hung there is not tried again
|
|
1861
|
-
* @returns {Promise<{ok: true, file: string,
|
|
1932
|
+
* @returns {Promise<{ok: true, file: string, notes?: string[], cutShort?: Array<{part: string | null, text: string, whole: boolean}>} | {ok: false, reason: string, stopped?: string}>}
|
|
1862
1933
|
*/
|
|
1863
1934
|
export async function screenshot(
|
|
1864
1935
|
project,
|
|
@@ -1938,16 +2009,19 @@ export async function screenshot(
|
|
|
1938
2009
|
ok: false,
|
|
1939
2010
|
reason: `no browser was started: the system temp folder cannot be written (${r.noTemp}), and a browser needs a profile folder of its own there; fix the temp folder (TMPDIR), then run the command again`,
|
|
1940
2011
|
};
|
|
1941
|
-
if (r.status === 0 && fs.existsSync(png))
|
|
2012
|
+
if (r.status === 0 && fs.existsSync(png)) {
|
|
1942
2013
|
return {
|
|
1943
2014
|
ok: true,
|
|
1944
2015
|
file: shown(project.cwd, png),
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
2016
|
+
notes: [
|
|
2017
|
+
...(failed.length
|
|
2018
|
+
? [`the picture was taken with ${t.who}; ${failed.join('; ')}`]
|
|
2019
|
+
: []),
|
|
2020
|
+
...pictureFontNotes(r.stdout ?? ''),
|
|
2021
|
+
],
|
|
2022
|
+
...measuredCutShort(r.stdout ?? ''),
|
|
1950
2023
|
};
|
|
2024
|
+
}
|
|
1951
2025
|
const text = r.error ? String(r.error.message) : r.stderr;
|
|
1952
2026
|
if (
|
|
1953
2027
|
t.script === PLAYWRIGHT_PICTURE &&
|
|
@@ -1981,6 +2055,76 @@ export async function screenshot(
|
|
|
1981
2055
|
};
|
|
1982
2056
|
}
|
|
1983
2057
|
|
|
2058
|
+
/** The generic families any font of a common kind stands in for. */
|
|
2059
|
+
const PLAIN_GENERICS = ['sans-serif', 'system-ui', 'ui-sans-serif'];
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* What a picture shows in place of a font stack: a role whose stack ends in
|
|
2063
|
+
* a generic of a kind (serif, monospace, cursive) and none of whose named
|
|
2064
|
+
* families this machine has is drawn in this machine's font for that
|
|
2065
|
+
* generic, which may be of another kind (a system with no serif font draws
|
|
2066
|
+
* serif in a sans-serif one). A stack that ends in sans-serif falls back
|
|
2067
|
+
* to a font of its own kind, so it is not named.
|
|
2068
|
+
* @param {string} stdout what the picture script printed
|
|
2069
|
+
* @returns {string[]}
|
|
2070
|
+
*/
|
|
2071
|
+
export function pictureFontNotes(stdout) {
|
|
2072
|
+
const line = stdout.split('\n').find(l => l.startsWith(FONT_PROBE_PREFIX));
|
|
2073
|
+
if (!line) return [];
|
|
2074
|
+
/** @type {Record<string, {stack: string[], shown: string | null} | null>} */
|
|
2075
|
+
let probe;
|
|
2076
|
+
try {
|
|
2077
|
+
probe = JSON.parse(line.slice(FONT_PROBE_PREFIX.length));
|
|
2078
|
+
} catch {
|
|
2079
|
+
return [];
|
|
2080
|
+
}
|
|
2081
|
+
/** @type {string[]} */
|
|
2082
|
+
const out = [];
|
|
2083
|
+
for (const [role, label] of /** @type {const} */ ([
|
|
2084
|
+
['heading', 'headings'],
|
|
2085
|
+
['body', 'body text'],
|
|
2086
|
+
])) {
|
|
2087
|
+
const r = probe?.[role];
|
|
2088
|
+
const generic = r?.stack.at(-1)?.toLowerCase();
|
|
2089
|
+
if (!r?.shown || !generic || PLAIN_GENERICS.includes(generic)) continue;
|
|
2090
|
+
const named = r.stack.slice(0, -1);
|
|
2091
|
+
const drawn = r.shown.toLowerCase();
|
|
2092
|
+
if (!named.length || named.some(f => f.toLowerCase() === drawn)) continue;
|
|
2093
|
+
out.push(
|
|
2094
|
+
`this machine has none of ${named.join(', ')}, so the pictures draw the ${label} in ${r.shown}, its font for ${generic}; a system with ${named[0]} shows them as set (an open font with its package installed shows everywhere, the pictures included)`,
|
|
2095
|
+
);
|
|
2096
|
+
}
|
|
2097
|
+
return out;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
/**
|
|
2101
|
+
* The text a picture script measured cut short, from the line it prints
|
|
2102
|
+
* after `CUT_SHORT_PREFIX`; nothing when it printed none that reads.
|
|
2103
|
+
* @param {string} stdout what the picture script printed
|
|
2104
|
+
* @returns {{cutShort?: Array<{part: string | null, text: string, whole: boolean}>}}
|
|
2105
|
+
*/
|
|
2106
|
+
function measuredCutShort(stdout) {
|
|
2107
|
+
const line = stdout.split('\n').find(l => l.startsWith(CUT_SHORT_PREFIX));
|
|
2108
|
+
if (!line) return {};
|
|
2109
|
+
/** @type {unknown} */
|
|
2110
|
+
let found;
|
|
2111
|
+
try {
|
|
2112
|
+
found = JSON.parse(line.slice(CUT_SHORT_PREFIX.length));
|
|
2113
|
+
} catch {
|
|
2114
|
+
return {};
|
|
2115
|
+
}
|
|
2116
|
+
if (!Array.isArray(found)) return {};
|
|
2117
|
+
return {
|
|
2118
|
+
cutShort: found
|
|
2119
|
+
.filter(x => x && typeof x.text === 'string')
|
|
2120
|
+
.map(x => ({
|
|
2121
|
+
part: typeof x.part === 'string' ? x.part : null,
|
|
2122
|
+
text: x.text,
|
|
2123
|
+
whole: x.whole === true,
|
|
2124
|
+
})),
|
|
2125
|
+
};
|
|
2126
|
+
}
|
|
2127
|
+
|
|
1984
2128
|
/** A Chrome or Chromium on this machine, at a usual place or on PATH. */
|
|
1985
2129
|
function chromeBinary() {
|
|
1986
2130
|
const names = [
|
|
@@ -2493,12 +2637,13 @@ export function takeFirstAppCopy(cwd, slug) {
|
|
|
2493
2637
|
* A stop or the bound asks the whole group to close, waits for it (killing
|
|
2494
2638
|
* it past a short grace), then removes the temp folder and the `drop` files
|
|
2495
2639
|
* (a picture part a stopped run leaves); a run that ends on its own removes
|
|
2496
|
-
* the temp folder only
|
|
2640
|
+
* the temp folder only, and gives what the script wrote on its standard
|
|
2641
|
+
* output (`stdout`: what it measured in the page).
|
|
2497
2642
|
* @param {string} script a picture script
|
|
2498
2643
|
* @param {string[]} args
|
|
2499
2644
|
* @param {number} [bound] milliseconds before the run is stopped
|
|
2500
2645
|
* @param {{drop?: string[]}} [opts]
|
|
2501
|
-
* @returns {Promise<{status: number | null, signal: string | null, stderr: string, error?: Error, stoppedBy?: string, timedOut?: boolean, noTemp?: string}>}
|
|
2646
|
+
* @returns {Promise<{status: number | null, signal: string | null, stderr: string, stdout?: string, error?: Error, stoppedBy?: string, timedOut?: boolean, noTemp?: string}>}
|
|
2502
2647
|
*/
|
|
2503
2648
|
export function runBrowser(script, args, bound = BROWSER_BOUND_MS, opts = {}) {
|
|
2504
2649
|
const drop = opts.drop ?? [];
|
|
@@ -2516,9 +2661,10 @@ export function runBrowser(script, args, bound = BROWSER_BOUND_MS, opts = {}) {
|
|
|
2516
2661
|
}
|
|
2517
2662
|
return new Promise(resolve => {
|
|
2518
2663
|
let stderr = '';
|
|
2664
|
+
let stdout = '';
|
|
2519
2665
|
const posix = process.platform !== 'win32';
|
|
2520
2666
|
const child = spawn(process.execPath, [script, ...args], {
|
|
2521
|
-
stdio: ['ignore', '
|
|
2667
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
2522
2668
|
env: {...process.env, TMPDIR: temp, TMP: temp, TEMP: temp},
|
|
2523
2669
|
// A group of its own, so a stop reaches the browser it starts too.
|
|
2524
2670
|
detached: posix,
|
|
@@ -2567,6 +2713,12 @@ export function runBrowser(script, args, bound = BROWSER_BOUND_MS, opts = {}) {
|
|
|
2567
2713
|
child.stderr?.on('data', d => {
|
|
2568
2714
|
if (stderr.length < 8000) stderr += d;
|
|
2569
2715
|
});
|
|
2716
|
+
child.stdout?.setEncoding('utf8');
|
|
2717
|
+
child.stdout?.on('data', d => {
|
|
2718
|
+
// Room for every line the script prints: the fonts, and the text cut
|
|
2719
|
+
// short on a page of every component.
|
|
2720
|
+
if (stdout.length < 64_000) stdout += d;
|
|
2721
|
+
});
|
|
2570
2722
|
/** Set once the run is being stopped (bound, signal): it ends there. */
|
|
2571
2723
|
let stopping = false;
|
|
2572
2724
|
let settled = false;
|
|
@@ -2615,7 +2767,7 @@ export function runBrowser(script, args, bound = BROWSER_BOUND_MS, opts = {}) {
|
|
|
2615
2767
|
child.once('close', (status, signal) => {
|
|
2616
2768
|
if (stopping) return;
|
|
2617
2769
|
clean();
|
|
2618
|
-
settle({status, signal, stderr});
|
|
2770
|
+
settle({status, signal, stderr, stdout});
|
|
2619
2771
|
});
|
|
2620
2772
|
});
|
|
2621
2773
|
}
|
|
@@ -129,6 +129,13 @@ export function refuseThemesNotFolder(cwd: string): void;
|
|
|
129
129
|
* @param {string} word
|
|
130
130
|
*/
|
|
131
131
|
export function namesSetting(word: string): boolean;
|
|
132
|
+
/**
|
|
133
|
+
* Whether a word names a CSS property, which `set` writes only on a part
|
|
134
|
+
* (`--on`): a theme a `new` makes takes no value for it, so its line comes
|
|
135
|
+
* after the theme is made, with a part named.
|
|
136
|
+
* @param {string} word
|
|
137
|
+
*/
|
|
138
|
+
export function needsPart(word: string): boolean;
|
|
132
139
|
/**
|
|
133
140
|
* Whether text typed where a theme goes names settings, in any form set
|
|
134
141
|
* reads them: a setting's name (`corners`, `--color-accent`), with its value
|
|
@@ -537,6 +544,14 @@ export function partsOf(ctx: Ctx, s: Pick<Setting, "on" | "only" | "thing">): st
|
|
|
537
544
|
* @returns {string[]}
|
|
538
545
|
*/
|
|
539
546
|
export function borderParts(ctx: Ctx, part: string): string[];
|
|
547
|
+
/**
|
|
548
|
+
* The parts that paint a part's box (a text input itself; a date and time
|
|
549
|
+
* field's two boxes, where the row around them paints none).
|
|
550
|
+
* @param {Ctx} ctx
|
|
551
|
+
* @param {string} part
|
|
552
|
+
* @returns {string[]}
|
|
553
|
+
*/
|
|
554
|
+
export function fillParts(ctx: Ctx, part: string): string[];
|
|
540
555
|
/**
|
|
541
556
|
* A corners value in the plain form the editor saves, typed or saved: a
|
|
542
557
|
* rung in any case is that rung; a size in px or rem, any way a CSS number
|
|
@@ -1488,6 +1503,11 @@ export namespace PHONE_RULE_WHEN {
|
|
|
1488
1503
|
let below: string;
|
|
1489
1504
|
}
|
|
1490
1505
|
}
|
|
1506
|
+
/**
|
|
1507
|
+
* The tokens that follow another one the theme sets exactly (where it
|
|
1508
|
+
* does not set them itself): each with the token it follows.
|
|
1509
|
+
*/
|
|
1510
|
+
export const FOLLOWS: Readonly<Record<string, string>>;
|
|
1491
1511
|
export function themeSource(slug: string): string;
|
|
1492
1512
|
export function settingsThemeName(slug: string): string;
|
|
1493
1513
|
/**
|