@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
|
@@ -22,9 +22,24 @@ import {
|
|
|
22
22
|
/** @typedef {{colors: Record<number, string>, diagnostics: TonalPaletteRampDiagnostics}} GeneratedRamp */
|
|
23
23
|
/** @typedef {{id: string, name: string, seed: string, kind: 'chromatic' | 'neutral', anchors: TonalPaletteAnchor[]}} NormalizedFamily */
|
|
24
24
|
/** @typedef {{id: string, name: string, seed: string, light?: GeneratedRamp, dark?: GeneratedRamp}} GeneratedFamily */
|
|
25
|
-
/** @typedef {{recipe:
|
|
25
|
+
/** @typedef {{recipe: PaletteRecipe, status: 'candidate', request: NormalizedRequest, families: GeneratedFamily[], coordination: TonalPaletteCoordinationDiagnostics[], errors: {familyId: string, message: string}[]}} PaletteGenerationResult */
|
|
26
26
|
|
|
27
|
+
/** @typedef {'astryx-oklch-v1' | 'astryx-oklch-v2'} PaletteRecipe */
|
|
28
|
+
|
|
29
|
+
/** The recipe a request that names none runs: the first one. */
|
|
27
30
|
export const PALETTE_RECIPE = 'astryx-oklch-v1';
|
|
31
|
+
/**
|
|
32
|
+
* The recipe whose pale stops follow the vibrancy and the seed's own
|
|
33
|
+
* chroma: a stop whose gamut cannot hold the most vivid request gives every
|
|
34
|
+
* request the same share of it, and coordination never raises a seed's
|
|
35
|
+
* chroma. A request runs it by naming it.
|
|
36
|
+
*/
|
|
37
|
+
export const PALETTE_RECIPE_V2 = 'astryx-oklch-v2';
|
|
38
|
+
/** Every recipe the generator runs. */
|
|
39
|
+
export const PALETTE_RECIPES = Object.freeze([
|
|
40
|
+
PALETTE_RECIPE,
|
|
41
|
+
PALETTE_RECIPE_V2,
|
|
42
|
+
]);
|
|
28
43
|
/**
|
|
29
44
|
* Identity of this generator implementation. `PALETTE_RECIPE` names the
|
|
30
45
|
* normative algorithm; this names the code that ran it, so a receipt can tell
|
|
@@ -108,6 +123,7 @@ export function parseStopList(input) {
|
|
|
108
123
|
* (see TonalPaletteGenerationInput); any other field changes nothing.
|
|
109
124
|
*/
|
|
110
125
|
export const GENERATION_INPUT_KEYS = Object.freeze([
|
|
126
|
+
'recipe',
|
|
111
127
|
'vibrancy',
|
|
112
128
|
'neutralProfile',
|
|
113
129
|
'modeStrategy',
|
|
@@ -192,11 +208,31 @@ function vibrancyMultiplier(vibrancy) {
|
|
|
192
208
|
return 1 + (vibrancy - 50) * 0.0096;
|
|
193
209
|
}
|
|
194
210
|
|
|
195
|
-
/**
|
|
196
|
-
|
|
197
|
-
|
|
211
|
+
/**
|
|
212
|
+
* A family's chroma drawn toward the shared one, so its families sit
|
|
213
|
+
* together. As v2 shares a narrow stop's gamut it is never raised above the
|
|
214
|
+
* seed's own, so a dusty seed stays dusty in its pale stops.
|
|
215
|
+
* @param {number} sourceChroma @param {PaletteRecipe} [recipe]
|
|
216
|
+
*/
|
|
217
|
+
function coordinatedChroma(sourceChroma, recipe = PALETTE_RECIPE) {
|
|
218
|
+
const drawn = sourceChroma * 0.35 + 0.18 * 0.65;
|
|
219
|
+
return recipe === PALETTE_RECIPE_V2 ? Math.min(sourceChroma, drawn) : drawn;
|
|
198
220
|
}
|
|
199
221
|
|
|
222
|
+
/**
|
|
223
|
+
* How narrow a stop's gamut is for v2 to share it: the most vivid seed at
|
|
224
|
+
* the default vibrancy asks this many times what the stop holds. From the
|
|
225
|
+
* first the stop starts to share its gamut in proportion; from the second
|
|
226
|
+
* it shares it wholly.
|
|
227
|
+
*/
|
|
228
|
+
const V2_SHARED_FROM = 1.3;
|
|
229
|
+
/** v2 shares only stops lighter than this tone: the pale side of a ramp. */
|
|
230
|
+
const V2_SHARED_ABOVE = 50;
|
|
231
|
+
const V2_SHARED_FULL = 2;
|
|
232
|
+
|
|
233
|
+
/** The chroma of the most vivid seed sRGB holds, as v2 coordinates it. */
|
|
234
|
+
const MOST_VIVID_CHROMA = coordinatedChroma(0.32, PALETTE_RECIPE_V2);
|
|
235
|
+
|
|
200
236
|
/** @param {string} color @returns {PolarColor} */
|
|
201
237
|
function colorToPolar(color) {
|
|
202
238
|
const value = hexToOklch(color);
|
|
@@ -244,6 +280,7 @@ function anchorPolarAtStop(seed, anchors, stop) {
|
|
|
244
280
|
* @param {boolean} coordinateWithOtherFamilies
|
|
245
281
|
* @param {number} [chromaMultiplier] Share of its in-gamut chroma the stop
|
|
246
282
|
* keeps (see darkChromaMultiplier).
|
|
283
|
+
* @param {PaletteRecipe} [recipe]
|
|
247
284
|
*/
|
|
248
285
|
function generateCandidate(
|
|
249
286
|
source,
|
|
@@ -252,13 +289,16 @@ function generateCandidate(
|
|
|
252
289
|
vibrancy,
|
|
253
290
|
coordinateWithOtherFamilies,
|
|
254
291
|
chromaMultiplier = 1,
|
|
292
|
+
recipe = PALETTE_RECIPE,
|
|
255
293
|
) {
|
|
256
294
|
const adjustedTone = tone;
|
|
257
295
|
const adjustedHue = toneAdjustedHue(source.hue, adjustedTone);
|
|
296
|
+
// Every recipe starts from v1's chroma, so a stop v2 does not share is
|
|
297
|
+
// drawn exactly as v1 draws it.
|
|
258
298
|
const baseChroma = coordinateWithOtherFamilies
|
|
259
299
|
? coordinatedChroma(source.chroma)
|
|
260
300
|
: source.chroma;
|
|
261
|
-
|
|
301
|
+
let chroma =
|
|
262
302
|
baseChroma *
|
|
263
303
|
vibrancyMultiplier(vibrancy) *
|
|
264
304
|
hueBalanceFactor(adjustedHue) *
|
|
@@ -267,6 +307,42 @@ function generateCandidate(
|
|
|
267
307
|
(mode === 'dark' ? DARK_CHROMA_FACTOR : 1);
|
|
268
308
|
const lightness = toneToOklabLightness(adjustedTone);
|
|
269
309
|
const maxChroma = maxOklchChroma(adjustedHue, lightness);
|
|
310
|
+
// v2, on the pale side of a ramp (above its middle): the narrower a
|
|
311
|
+
// stop's gamut is for the most vivid seed at the default vibrancy (a pale
|
|
312
|
+
// tint), the more every request shares that gamut in proportion (the most
|
|
313
|
+
// vivid seed at vibrancy 100 takes all of it), so such a stop follows the
|
|
314
|
+
// seed's chroma, never raised above the seed's own, and the vibrancy,
|
|
315
|
+
// instead of every request landing on the gamut's edge. A stop whose
|
|
316
|
+
// gamut holds the most vivid seed at the default vibrancy shares nothing,
|
|
317
|
+
// and the dark side never shares (role text and dark fills keep their
|
|
318
|
+
// strength): those stops are drawn exactly as v1 draws them, for every
|
|
319
|
+
// seed at every vibrancy.
|
|
320
|
+
if (
|
|
321
|
+
recipe === PALETTE_RECIPE_V2 &&
|
|
322
|
+
coordinateWithOtherFamilies &&
|
|
323
|
+
adjustedTone > V2_SHARED_ABOVE
|
|
324
|
+
) {
|
|
325
|
+
const shape =
|
|
326
|
+
hueBalanceFactor(adjustedHue) *
|
|
327
|
+
highToneChromaFactor(adjustedHue, adjustedTone) *
|
|
328
|
+
toneChromaEnvelope(adjustedTone) *
|
|
329
|
+
(mode === 'dark' ? DARK_CHROMA_FACTOR : 1);
|
|
330
|
+
const narrow =
|
|
331
|
+
(MOST_VIVID_CHROMA * vibrancyMultiplier(50) * shape) /
|
|
332
|
+
Math.max(maxChroma, 1e-6);
|
|
333
|
+
const share = smoothstep(
|
|
334
|
+
(narrow - V2_SHARED_FROM) / (V2_SHARED_FULL - V2_SHARED_FROM),
|
|
335
|
+
);
|
|
336
|
+
if (share > 0) {
|
|
337
|
+
const most = MOST_VIVID_CHROMA * vibrancyMultiplier(100) * shape;
|
|
338
|
+
const own =
|
|
339
|
+
coordinatedChroma(source.chroma, recipe) *
|
|
340
|
+
vibrancyMultiplier(vibrancy) *
|
|
341
|
+
shape;
|
|
342
|
+
const shared = (own / most) * maxChroma;
|
|
343
|
+
chroma = (1 - share) * Math.min(chroma, maxChroma) + share * shared;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
270
346
|
// A taper scales the chroma the stop shows after gamut mapping, so a stop
|
|
271
347
|
// the gamut already limits loses the same share as any other stop.
|
|
272
348
|
const shownChroma =
|
|
@@ -551,6 +627,7 @@ function generateRamp(request, family, mode) {
|
|
|
551
627
|
request.vibrancy,
|
|
552
628
|
family.kind !== 'neutral',
|
|
553
629
|
darkChromaMultiplier(request.darkChromaTaper, family, mode, 50),
|
|
630
|
+
request.recipe,
|
|
554
631
|
).hex;
|
|
555
632
|
for (const stop of request.stops) {
|
|
556
633
|
const source = anchorPolarAtStop(seed, anchors, stop);
|
|
@@ -561,6 +638,7 @@ function generateRamp(request, family, mode) {
|
|
|
561
638
|
request.vibrancy,
|
|
562
639
|
family.kind !== 'neutral',
|
|
563
640
|
darkChromaMultiplier(request.darkChromaTaper, family, mode, stop),
|
|
641
|
+
request.recipe,
|
|
564
642
|
);
|
|
565
643
|
colors[stop] = generated.hex;
|
|
566
644
|
if (generated.gamutMapped) gamutMappedStops.push(stop);
|
|
@@ -744,6 +822,14 @@ export function normalizeGenerationRequest(input) {
|
|
|
744
822
|
if (!Array.isArray(families) || families.length === 0) {
|
|
745
823
|
throw new Error('Palette generation requires at least one family.');
|
|
746
824
|
}
|
|
825
|
+
// A request that names no recipe runs the first one, so a config written
|
|
826
|
+
// before v2 regenerates the same colors.
|
|
827
|
+
const recipe = /** @type {PaletteRecipe} */ (input.recipe ?? PALETTE_RECIPE);
|
|
828
|
+
if (!PALETTE_RECIPES.includes(recipe)) {
|
|
829
|
+
throw new Error(
|
|
830
|
+
`Unknown palette recipe: ${String(input.recipe)} (known: ${PALETTE_RECIPES.join(', ')}).`,
|
|
831
|
+
);
|
|
832
|
+
}
|
|
747
833
|
const modeStrategy = input.modeStrategy ?? 'light-and-dark';
|
|
748
834
|
const modes = modesForStrategy(modeStrategy);
|
|
749
835
|
const stops = validateStops(input.stops ?? DEFAULT_21_STOPS);
|
|
@@ -848,7 +934,7 @@ export function normalizeGenerationRequest(input) {
|
|
|
848
934
|
);
|
|
849
935
|
/** @type {NormalizedRequest} */
|
|
850
936
|
const request = {
|
|
851
|
-
recipe
|
|
937
|
+
recipe,
|
|
852
938
|
vibrancy: input.vibrancy ?? 50,
|
|
853
939
|
neutralProfile,
|
|
854
940
|
modeStrategy,
|
|
@@ -887,7 +973,7 @@ export function generatePaletteSet(input) {
|
|
|
887
973
|
}
|
|
888
974
|
}
|
|
889
975
|
return {
|
|
890
|
-
recipe:
|
|
976
|
+
recipe: request.recipe,
|
|
891
977
|
status: 'candidate',
|
|
892
978
|
request,
|
|
893
979
|
families,
|
|
@@ -914,7 +1000,7 @@ export function generateTonalPalette(input) {
|
|
|
914
1000
|
return {
|
|
915
1001
|
schemaVersion: 1,
|
|
916
1002
|
status: 'candidate',
|
|
917
|
-
recipe:
|
|
1003
|
+
recipe: result.recipe,
|
|
918
1004
|
black: PALETTE_BLACK,
|
|
919
1005
|
white: PALETTE_WHITE,
|
|
920
1006
|
stops: [...result.request.stops],
|
|
@@ -9,6 +9,10 @@ export type ThemeBuildResponse = {
|
|
|
9
9
|
* `warnings` are defects the theme author should fix. `notices` are advisories
|
|
10
10
|
* about a correct theme — most of them cannot be fixed in a theme file at all,
|
|
11
11
|
* so folding them into `warnings` makes a clean build look dirty.
|
|
12
|
+
* `base`, on a `--family` build only, is the theme the family's root extends
|
|
13
|
+
* that the family does not select: `package` is the installed package it comes
|
|
14
|
+
* from, a requirement of the outputs (null for a local base), and `export` the
|
|
15
|
+
* name the root imports it by (null for a theme the root's file defines).
|
|
12
16
|
*/
|
|
13
17
|
type: "theme.build";
|
|
14
18
|
data: {
|
|
@@ -25,6 +29,11 @@ export type ThemeBuildResponse = {
|
|
|
25
29
|
};
|
|
26
30
|
warnings: string[];
|
|
27
31
|
notices: string[];
|
|
32
|
+
base?: {
|
|
33
|
+
theme: string;
|
|
34
|
+
package: string | null;
|
|
35
|
+
export: string | null;
|
|
36
|
+
};
|
|
28
37
|
};
|
|
29
38
|
};
|
|
30
39
|
/**
|
|
@@ -397,6 +406,14 @@ export type TonalPaletteDarkChromaTaper = {
|
|
|
397
406
|
familyMultipliers?: Record<string, number> | undefined;
|
|
398
407
|
};
|
|
399
408
|
export type TonalPaletteGenerationInput = {
|
|
409
|
+
/**
|
|
410
|
+
* The recipe to
|
|
411
|
+
* run: astryx-oklch-v1 when none is named, so a request or config made
|
|
412
|
+
* before v2 keeps its colors; astryx-oklch-v2 makes pale stops
|
|
413
|
+
* follow the vibrancy and the seed's own chroma. New palettes name v2 (the
|
|
414
|
+
* theme editor records it); a config pins its recipe by naming it.
|
|
415
|
+
*/
|
|
416
|
+
recipe?: "astryx-oklch-v1" | "astryx-oklch-v2" | undefined;
|
|
400
417
|
families: TonalPaletteFamilyInput[];
|
|
401
418
|
/**
|
|
402
419
|
* Chroma control from 0 (most muted) through 50
|
|
@@ -429,7 +446,7 @@ export type TonalPaletteGenerationInput = {
|
|
|
429
446
|
export type TonalPaletteCandidate = {
|
|
430
447
|
schemaVersion: 1;
|
|
431
448
|
status: "candidate";
|
|
432
|
-
recipe: "astryx-oklch-v1";
|
|
449
|
+
recipe: "astryx-oklch-v1" | "astryx-oklch-v2";
|
|
433
450
|
/**
|
|
434
451
|
* Exact solid black for theme authoring outside a tonal family.
|
|
435
452
|
*/
|
|
@@ -528,7 +545,7 @@ export type TonalPaletteCoordinationDiagnostics = {
|
|
|
528
545
|
* The request as the generator resolved it, with every default filled in.
|
|
529
546
|
*/
|
|
530
547
|
export type TonalPaletteNormalizedRequest = {
|
|
531
|
-
recipe: "astryx-oklch-v1";
|
|
548
|
+
recipe: "astryx-oklch-v1" | "astryx-oklch-v2";
|
|
532
549
|
vibrancy: number;
|
|
533
550
|
neutralProfile: "neutral-v1" | "warm-v1" | "cool-v1" | "custom";
|
|
534
551
|
modeStrategy: "light-only" | "dark-only" | "light-and-dark";
|
|
@@ -557,7 +574,7 @@ export type TonalPaletteGenerationReceipt = {
|
|
|
557
574
|
/**
|
|
558
575
|
* Recipe that produced the candidate.
|
|
559
576
|
*/
|
|
560
|
-
recipe: "astryx-oklch-v1";
|
|
577
|
+
recipe: "astryx-oklch-v1" | "astryx-oklch-v2";
|
|
561
578
|
/**
|
|
562
579
|
* Generator
|
|
563
580
|
* implementation that ran the recipe.
|
|
@@ -597,7 +614,7 @@ export type TonalPaletteGenerationReceipt = {
|
|
|
597
614
|
export type ThemePaletteGenerateResponse = {
|
|
598
615
|
type: "theme.palette.generate";
|
|
599
616
|
data: {
|
|
600
|
-
recipe: "astryx-oklch-v1";
|
|
617
|
+
recipe: "astryx-oklch-v1" | "astryx-oklch-v2";
|
|
601
618
|
status: "candidate";
|
|
602
619
|
familyCount: number;
|
|
603
620
|
stopCount: number;
|
package/api/theme/theme.type.mjs
CHANGED
|
@@ -31,7 +31,11 @@
|
|
|
31
31
|
* `warnings` are defects the theme author should fix. `notices` are advisories
|
|
32
32
|
* about a correct theme — most of them cannot be fixed in a theme file at all,
|
|
33
33
|
* so folding them into `warnings` makes a clean build look dirty.
|
|
34
|
-
*
|
|
34
|
+
* `base`, on a `--family` build only, is the theme the family's root extends
|
|
35
|
+
* that the family does not select: `package` is the installed package it comes
|
|
36
|
+
* from, a requirement of the outputs (null for a local base), and `export` the
|
|
37
|
+
* name the root imports it by (null for a theme the root's file defines).
|
|
38
|
+
* @property {{name: string, tokenCount: number, componentCount: number, sizeKB: number, outputs: {css: string, cssDts: string, js: string, dts: string, variantsDts?: string}, warnings: string[], notices: string[], base?: {theme: string, package: string | null, export: string | null}}} data
|
|
35
39
|
*/
|
|
36
40
|
|
|
37
41
|
/**
|
|
@@ -232,6 +236,11 @@
|
|
|
232
236
|
|
|
233
237
|
/**
|
|
234
238
|
* @typedef {object} TonalPaletteGenerationInput
|
|
239
|
+
* @property {'astryx-oklch-v1' | 'astryx-oklch-v2'} [recipe] The recipe to
|
|
240
|
+
* run: astryx-oklch-v1 when none is named, so a request or config made
|
|
241
|
+
* before v2 keeps its colors; astryx-oklch-v2 makes pale stops
|
|
242
|
+
* follow the vibrancy and the seed's own chroma. New palettes name v2 (the
|
|
243
|
+
* theme editor records it); a config pins its recipe by naming it.
|
|
235
244
|
* @property {TonalPaletteFamilyInput[]} families
|
|
236
245
|
* @property {number} [vibrancy] Chroma control from 0 (most muted) through 50
|
|
237
246
|
* (default) to 100 (most vivid).
|
|
@@ -253,7 +262,7 @@
|
|
|
253
262
|
* @typedef {object} TonalPaletteCandidate
|
|
254
263
|
* @property {1} schemaVersion
|
|
255
264
|
* @property {'candidate'} status
|
|
256
|
-
* @property {'astryx-oklch-v1'} recipe
|
|
265
|
+
* @property {'astryx-oklch-v1' | 'astryx-oklch-v2'} recipe
|
|
257
266
|
* @property {'#000000'} black Exact solid black for theme authoring outside a tonal family.
|
|
258
267
|
* @property {'#ffffff'} white Exact solid white for theme authoring outside a tonal family.
|
|
259
268
|
* @property {number[]} stops Canonical order for iterating the palette's stop lookup maps.
|
|
@@ -295,7 +304,7 @@
|
|
|
295
304
|
/**
|
|
296
305
|
* The request as the generator resolved it, with every default filled in.
|
|
297
306
|
* @typedef {object} TonalPaletteNormalizedRequest
|
|
298
|
-
* @property {'astryx-oklch-v1'} recipe
|
|
307
|
+
* @property {'astryx-oklch-v1' | 'astryx-oklch-v2'} recipe
|
|
299
308
|
* @property {number} vibrancy
|
|
300
309
|
* @property {'neutral-v1' | 'warm-v1' | 'cool-v1' | 'custom'} neutralProfile
|
|
301
310
|
* @property {'light-only' | 'dark-only' | 'light-and-dark'} modeStrategy
|
|
@@ -312,7 +321,7 @@
|
|
|
312
321
|
* its request without rerunning generation.
|
|
313
322
|
* @typedef {object} TonalPaletteGenerationReceipt
|
|
314
323
|
* @property {1} schemaVersion
|
|
315
|
-
* @property {'astryx-oklch-v1'} recipe Recipe that produced the candidate.
|
|
324
|
+
* @property {'astryx-oklch-v1' | 'astryx-oklch-v2'} recipe Recipe that produced the candidate.
|
|
316
325
|
* @property {'palette-generator-v1'} generatorVersion Generator
|
|
317
326
|
* implementation that ran the recipe.
|
|
318
327
|
* @property {'palette-typescript-v1' | 'palette-json-v1'} candidateFormatVersion
|
|
@@ -331,7 +340,7 @@
|
|
|
331
340
|
* astryx --json theme palette generate <config>
|
|
332
341
|
* @typedef {object} ThemePaletteGenerateResponse
|
|
333
342
|
* @property {'theme.palette.generate'} type
|
|
334
|
-
* @property {{recipe: 'astryx-oklch-v1', status: 'candidate', familyCount: number, stopCount: number, modes: string[], output: string | null, receipt: string | null, preview: string | null, written: boolean, reason: 'exists' | null, candidate: TonalPaletteCandidate, generationReceipt: TonalPaletteGenerationReceipt}} data
|
|
343
|
+
* @property {{recipe: 'astryx-oklch-v1' | 'astryx-oklch-v2', status: 'candidate', familyCount: number, stopCount: number, modes: string[], output: string | null, receipt: string | null, preview: string | null, written: boolean, reason: 'exists' | null, candidate: TonalPaletteCandidate, generationReceipt: TonalPaletteGenerationReceipt}} data
|
|
335
344
|
*/
|
|
336
345
|
|
|
337
346
|
// Make this a module so the @typedefs above are importable as types via
|
|
@@ -9,7 +9,7 @@ export const doc = {
|
|
|
9
9
|
displayName: 'themePaletteGenerate()',
|
|
10
10
|
summary: 'Generate an author-reviewable palette candidate from JSON input.',
|
|
11
11
|
description:
|
|
12
|
-
'Runs the
|
|
12
|
+
'Runs the recipe the request names: astryx-oklch-v1 when it names none, so a request or config made before v2 keeps its colors, or astryx-oklch-v2, whose pale stops follow the vibrancy and each seed\'s own chroma. New palettes name v2: the theme editor records it in each config it makes, and a new config should too. A config keeps the recipe it records; to pin one, record "recipe": "astryx-oklch-v1" (or v2) in the palette config, against an explicit generation request. ' +
|
|
13
13
|
'It always emits standalone `black` and `white` values that generated TypeScript can import ' +
|
|
14
14
|
'directly into semantic theme tokens; those names are reserved from tonal family IDs. It also ' +
|
|
15
15
|
'defaults family ramps to 21 stops from 0 through 100, repeating exact black and white ' +
|
|
@@ -28,7 +28,15 @@ export const doc = {
|
|
|
28
28
|
importPath: '@astryxdesign/cli/api',
|
|
29
29
|
signature:
|
|
30
30
|
'themeTemplate(options?: {targetPath?: string, overwrite?: boolean, cwd?: string}): ThemeTemplateResponse',
|
|
31
|
-
keywords: [
|
|
31
|
+
keywords: [
|
|
32
|
+
'theme',
|
|
33
|
+
'template',
|
|
34
|
+
'starter',
|
|
35
|
+
'defineTheme',
|
|
36
|
+
'scaffold',
|
|
37
|
+
'reference',
|
|
38
|
+
'tokens',
|
|
39
|
+
],
|
|
32
40
|
params: [
|
|
33
41
|
{
|
|
34
42
|
name: 'options.targetPath',
|
|
@@ -40,7 +48,8 @@ export const doc = {
|
|
|
40
48
|
{
|
|
41
49
|
name: 'options.overwrite',
|
|
42
50
|
type: 'boolean',
|
|
43
|
-
description:
|
|
51
|
+
description:
|
|
52
|
+
'Replace an existing file instead of reporting it untouched.',
|
|
44
53
|
default: 'false',
|
|
45
54
|
},
|
|
46
55
|
{
|
|
@@ -80,5 +89,11 @@ export const doc = {
|
|
|
80
89
|
},
|
|
81
90
|
],
|
|
82
91
|
command: 'theme template',
|
|
83
|
-
related: [
|
|
92
|
+
related: [
|
|
93
|
+
'themeAdd',
|
|
94
|
+
'themeEject',
|
|
95
|
+
'themeBuild',
|
|
96
|
+
'themeListAvailable',
|
|
97
|
+
'themeTargets',
|
|
98
|
+
],
|
|
84
99
|
};
|
|
@@ -224,5 +224,5 @@ import { AstryxError } from '../error.mjs';
|
|
|
224
224
|
import * as edit from './_edit.mjs';
|
|
225
225
|
import * as preview from './_preview-app.mjs';
|
|
226
226
|
export { newFlagList, checkedChangeLine as editorCheckedLine, checkedNewLines as editorCheckedNewLines, checkedShowLines as editorCheckedShowLines } from "./_edit.mjs";
|
|
227
|
-
export { dialTakesText, dialValueFits, slugOk as editorNameOk, usableNewName as editorFreeName, describe, namesSetting } from "./_settings.mjs";
|
|
227
|
+
export { dialTakesText, dialValueFits, slugOk as editorNameOk, usableNewName as editorFreeName, describe, namesSetting, needsPart } from "./_settings.mjs";
|
|
228
228
|
export { booleanWord, typoNear, typoOf } from "./_normal.mjs";
|
|
@@ -973,7 +973,7 @@ export function editorThemeRefusal(err, cwd) {
|
|
|
973
973
|
/** The shared typo rule, for a typed subcommand. */
|
|
974
974
|
export {booleanWord, typoNear, typoOf} from './_normal.mjs';
|
|
975
975
|
// How a setting is named in a result: one wording for the API and the CLI.
|
|
976
|
-
export {describe, namesSetting} from './_settings.mjs';
|
|
976
|
+
export {describe, namesSetting, needsPart} from './_settings.mjs';
|
|
977
977
|
|
|
978
978
|
/**
|
|
979
979
|
* The editor themes of the app the folder `cwd` is in, by name; none when
|
|
@@ -12,7 +12,8 @@ export function sampleControls(): Array<{
|
|
|
12
12
|
label: string;
|
|
13
13
|
}>;
|
|
14
14
|
/**
|
|
15
|
-
* Every component name an element tree uses
|
|
15
|
+
* Every component name an element tree uses, and every hook its plugins
|
|
16
|
+
* name.
|
|
16
17
|
* @param {unknown} v
|
|
17
18
|
* @param {Set<string>} [out]
|
|
18
19
|
* @returns {Set<string>}
|
|
@@ -60,9 +61,11 @@ export const SAMPLE_PAGE: Tree;
|
|
|
60
61
|
/**
|
|
61
62
|
* Overlays the overlays section draws open in a deeper state than their docs
|
|
62
63
|
* show: a menu with its submenu open, a popover that holds a form, a date and
|
|
63
|
-
* time field with its time list,
|
|
64
|
-
*
|
|
65
|
-
* opened by the drawing's presses
|
|
64
|
+
* time field with its time list, a table with a row selected and a column
|
|
65
|
+
* sorted, and the navigation drawer of a narrow screen. Each is drawn as the
|
|
66
|
+
* other overlays are: open as it mounts, or opened by the drawing's presses
|
|
67
|
+
* (`openable`). A part a hook configures (a table's plugins) names the hook
|
|
68
|
+
* and its state as data (`{__plugin, ...}`), and the page calls the hook.
|
|
66
69
|
* @type {ReadonlyArray<import('./_catalog.mjs').CatalogItem>}
|
|
67
70
|
*/
|
|
68
71
|
export const OPEN_SCENES: ReadonlyArray<import("./_catalog.mjs").CatalogItem>;
|
|
@@ -92,6 +95,8 @@ export type Tree = {
|
|
|
92
95
|
/**
|
|
93
96
|
* `open`: drawn open in a document after the server render (a popover,
|
|
94
97
|
* tooltip or menu, which Core places only once mounted: layers.mjs);
|
|
98
|
+
* `mounted`: drawn as the browser shows it once it runs, nothing opened
|
|
99
|
+
* (a part Core finishes as it mounts: a table's selected row);
|
|
95
100
|
* `openable`: also shown open in the overlays section when it holds an
|
|
96
101
|
* overlay a press opens (a dropdown's menu, a selector's list);
|
|
97
102
|
* `onlyOpen`: in the page for that open look alone; `openTree`: the part
|
|
@@ -108,6 +113,7 @@ export type CatalogItem = {
|
|
|
108
113
|
tree: unknown;
|
|
109
114
|
group?: string;
|
|
110
115
|
open?: boolean;
|
|
116
|
+
mounted?: boolean;
|
|
111
117
|
openable?: boolean;
|
|
112
118
|
onlyOpen?: boolean;
|
|
113
119
|
openTree?: unknown;
|
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* @typedef {{__element: string, props?: Record<string, unknown>, children?: unknown}} Tree
|
|
19
|
-
* @typedef {{name: string, label: string, tree: unknown, group?: string, open?: boolean, openable?: boolean, onlyOpen?: boolean, openTree?: unknown, strip?: boolean, anchored?: boolean, states?: boolean}} CatalogItem
|
|
19
|
+
* @typedef {{name: string, label: string, tree: unknown, group?: string, open?: boolean, mounted?: boolean, openable?: boolean, onlyOpen?: boolean, openTree?: unknown, strip?: boolean, anchored?: boolean, states?: boolean}} CatalogItem
|
|
20
20
|
* `open`: drawn open in a document after the server render (a popover,
|
|
21
21
|
* tooltip or menu, which Core places only once mounted: layers.mjs);
|
|
22
|
+
* `mounted`: drawn as the browser shows it once it runs, nothing opened
|
|
23
|
+
* (a part Core finishes as it mounts: a table's selected row);
|
|
22
24
|
* `openable`: also shown open in the overlays section when it holds an
|
|
23
25
|
* overlay a press opens (a dropdown's menu, a selector's list);
|
|
24
26
|
* `onlyOpen`: in the page for that open look alone; `openTree`: the part
|
|
@@ -134,9 +136,12 @@ export const SAMPLE_PAGE = h(
|
|
|
134
136
|
h('Switch', {label: 'Notify my team', value: true}),
|
|
135
137
|
h('CheckboxInput', {label: 'Add to calendar', value: true}),
|
|
136
138
|
h('ProgressBar', {label: 'Progress', value: 60, hasValueLabel: true}),
|
|
139
|
+
// The buttons wrap to a second row when a theme's buttons are
|
|
140
|
+
// wider than the card (a roomier padding, a larger text): a
|
|
141
|
+
// label is never cut short by the sample's own width.
|
|
137
142
|
h(
|
|
138
143
|
'HStack',
|
|
139
|
-
{gap: 2},
|
|
144
|
+
{gap: 2, wrap: 'wrap'},
|
|
140
145
|
h('Button', {label: 'Save', variant: 'primary'}),
|
|
141
146
|
h('Button', {label: 'Preview', variant: 'secondary'}),
|
|
142
147
|
h('Button', {label: 'Cancel', variant: 'ghost'}),
|
|
@@ -179,9 +184,11 @@ export const SAMPLE_PAGE = h(
|
|
|
179
184
|
/**
|
|
180
185
|
* Overlays the overlays section draws open in a deeper state than their docs
|
|
181
186
|
* show: a menu with its submenu open, a popover that holds a form, a date and
|
|
182
|
-
* time field with its time list,
|
|
183
|
-
*
|
|
184
|
-
* opened by the drawing's presses
|
|
187
|
+
* time field with its time list, a table with a row selected and a column
|
|
188
|
+
* sorted, and the navigation drawer of a narrow screen. Each is drawn as the
|
|
189
|
+
* other overlays are: open as it mounts, or opened by the drawing's presses
|
|
190
|
+
* (`openable`). A part a hook configures (a table's plugins) names the hook
|
|
191
|
+
* and its state as data (`{__plugin, ...}`), and the page calls the hook.
|
|
185
192
|
* @type {ReadonlyArray<import('./_catalog.mjs').CatalogItem>}
|
|
186
193
|
*/
|
|
187
194
|
export const OPEN_SCENES = Object.freeze([
|
|
@@ -235,6 +242,34 @@ export const OPEN_SCENES = Object.freeze([
|
|
|
235
242
|
timeOptionInterval: 30,
|
|
236
243
|
}),
|
|
237
244
|
},
|
|
245
|
+
{
|
|
246
|
+
// Core marks a selected row and a sorted column as the browser runs
|
|
247
|
+
// (the row's selected state, the column's sort glyph), so the table is
|
|
248
|
+
// drawn as it mounts, with its plugins in that state.
|
|
249
|
+
name: 'Table',
|
|
250
|
+
label: 'selected and sorted',
|
|
251
|
+
mounted: true,
|
|
252
|
+
tree: h('Table', {
|
|
253
|
+
idKey: 'id',
|
|
254
|
+
data: [
|
|
255
|
+
{id: '1', name: 'Alice', role: 'Engineer', status: 'Active'},
|
|
256
|
+
{id: '2', name: 'Bob', role: 'Designer', status: 'Away'},
|
|
257
|
+
{id: '3', name: 'Charlie', role: 'Manager', status: 'Active'},
|
|
258
|
+
],
|
|
259
|
+
columns: [
|
|
260
|
+
{key: 'name', header: 'Name', sortable: true},
|
|
261
|
+
{key: 'role', header: 'Role', sortable: true},
|
|
262
|
+
{key: 'status', header: 'Status'},
|
|
263
|
+
],
|
|
264
|
+
plugins: {
|
|
265
|
+
selection: {__plugin: 'useTableSelection', selected: ['2']},
|
|
266
|
+
sortable: {
|
|
267
|
+
__plugin: 'useTableSortable',
|
|
268
|
+
sort: [{sortKey: 'name', direction: 'ascending'}],
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
}),
|
|
272
|
+
},
|
|
238
273
|
{
|
|
239
274
|
name: 'MobileNav',
|
|
240
275
|
label: 'open',
|
|
@@ -324,7 +359,8 @@ export const SHEET_ORDER = [
|
|
|
324
359
|
];
|
|
325
360
|
|
|
326
361
|
/**
|
|
327
|
-
* Every component name an element tree uses
|
|
362
|
+
* Every component name an element tree uses, and every hook its plugins
|
|
363
|
+
* name.
|
|
328
364
|
* @param {unknown} v
|
|
329
365
|
* @param {Set<string>} [out]
|
|
330
366
|
* @returns {Set<string>}
|
|
@@ -334,6 +370,9 @@ export function elementNames(v, out = new Set()) {
|
|
|
334
370
|
else if (v && typeof v === 'object') {
|
|
335
371
|
const el = /** @type {any} */ (v).__element;
|
|
336
372
|
if (typeof el === 'string') out.add(el);
|
|
373
|
+
// A hook a part's plugin names is imported as a part is.
|
|
374
|
+
const hook = /** @type {any} */ (v).__plugin;
|
|
375
|
+
if (typeof hook === 'string') out.add(hook);
|
|
337
376
|
for (const x of Object.values(v)) elementNames(x, out);
|
|
338
377
|
}
|
|
339
378
|
return out;
|
|
@@ -425,7 +464,19 @@ export function pageSource({
|
|
|
425
464
|
'const isEl = v => Boolean(v && typeof v === "object" && !Array.isArray(v) && v.__element);',
|
|
426
465
|
);
|
|
427
466
|
lines.push(
|
|
428
|
-
'function el(v) { if (Array.isArray(v)) return v.map(el); if (v && typeof v === "object" && v.__element) { const T = C[v.__element] ?? (/^[a-z][a-z0-9]*$/.test(v.__element) ? v.__element : null); if (!T) return null;
|
|
467
|
+
'function el(v) { if (Array.isArray(v)) return v.map(el); if (v && typeof v === "object" && v.__element) { const T = C[v.__element] ?? (/^[a-z][a-z0-9]*$/.test(v.__element) ? v.__element : null); if (!T) return null; const props = fix(v.props ?? {}); if (props.plugins && Object.values(props.plugins).some(isPlugin)) return React.createElement(Plugged, {T, props}); return React.createElement(T, props, ...[].concat(v.children ?? []).map(el)); } return v; }',
|
|
468
|
+
);
|
|
469
|
+
// A plugin named as data ({__plugin: hook, ...state}) is the hook's
|
|
470
|
+
// return, called in a component of the page's own, with the state the data
|
|
471
|
+
// gives it: a table's selected rows, its sorted columns.
|
|
472
|
+
lines.push(
|
|
473
|
+
'const isPlugin = v => Boolean(v && typeof v === "object" && typeof v.__plugin === "string");',
|
|
474
|
+
);
|
|
475
|
+
lines.push(
|
|
476
|
+
'const PLUGIN_CONFIG = {useTableSelection: (spec, props) => ({getIsItemSelected: item => (spec.selected ?? []).includes(String(item[props.idKey ?? "id"])), onSelectItem: noop, onSelectAll: noop, getIsAllSelected: () => false, getIsIndeterminate: () => (spec.selected ?? []).length > 0}), useTableSortable: spec => ({sort: spec.sort ?? [], onSortChange: noop})};',
|
|
477
|
+
);
|
|
478
|
+
lines.push(
|
|
479
|
+
'function Plugged({T, props}) { const plugins = {}; for (const [k, spec] of Object.entries(props.plugins)) plugins[k] = isPlugin(spec) && C[spec.__plugin] && PLUGIN_CONFIG[spec.__plugin] ? C[spec.__plugin](PLUGIN_CONFIG[spec.__plugin](spec, props)) : spec; return React.createElement(T, {...props, plugins}); }',
|
|
429
480
|
);
|
|
430
481
|
// The sample search source a part that requires one gets (a typeahead):
|
|
431
482
|
// the prop names it, the page defines it.
|
|
@@ -454,7 +505,7 @@ export function pageSource({
|
|
|
454
505
|
// date), so a part that holds it is drawn as the browser mounts it; so
|
|
455
506
|
// is an overlay shown open with no layer, which loads what it lists once
|
|
456
507
|
// mounted (a command palette's items).
|
|
457
|
-
`function html(tree, mode = MODE, open = false) { try { const node = el(tree); const whole = theme ? React.createElement(Theme, {theme, mode}, node) : node; const markup = renderToStaticMarkup(whole); const layered = markup.includes('<template></template>'); if (open === 'ifOpen' && !layered) return null; const mounted = open === true && !layered || !open && markup.includes(' inert=""'); const draw = (open && layered) || mounted ? globalThis[${JSON.stringify(LAYER_GLOBAL)}] : null; return draw ? draw(whole, mounted ? 'mounted' : open === 'ifOpen') : markup; } catch { return null; } }`,
|
|
508
|
+
`function html(tree, mode = MODE, open = false) { try { const node = el(tree); const whole = theme ? React.createElement(Theme, {theme, mode}, node) : node; const markup = renderToStaticMarkup(whole); const layered = markup.includes('<template></template>'); if (open === 'ifOpen' && !layered) return null; const mounted = open === 'mounted' || open === true && !layered || !open && markup.includes(' inert=""'); const draw = (open && layered) || mounted ? globalThis[${JSON.stringify(LAYER_GLOBAL)}] : null; return draw ? draw(whole, mounted ? 'mounted' : open === 'ifOpen') : markup; } catch { return null; } }`,
|
|
458
509
|
);
|
|
459
510
|
// A theme with both modes: each part is rendered in light and in dark, as
|
|
460
511
|
// the app renders it in each (a part that picks its look from the mode as
|
|
@@ -480,7 +531,7 @@ export default function Page() {
|
|
|
480
531
|
return markup == null ? null : h('section', {key: i, 'data-cat': it.name, dangerouslySetInnerHTML: {__html: markup}});
|
|
481
532
|
}));
|
|
482
533
|
}
|
|
483
|
-
const rendered = ITEMS.map(it => ({...it, markup: modes(it.tree, it.open)})).filter(it => it.markup != null);
|
|
534
|
+
const rendered = ITEMS.map(it => ({...it, markup: modes(it.tree, it.mounted ? 'mounted' : it.open)})).filter(it => it.markup != null);
|
|
484
535
|
// A part only in this page for its open look (the overlays section alone)
|
|
485
536
|
// is not shown closed.
|
|
486
537
|
const done = rendered.filter(it => !it.onlyOpen);
|
|
@@ -551,15 +602,17 @@ export default function Page() {
|
|
|
551
602
|
if (!c) { c = {name: it.name, list: []}; g.cells.push(c); }
|
|
552
603
|
if (!c.list.some(x => x.label === it.label)) c.list.push(it);
|
|
553
604
|
}
|
|
554
|
-
body = groups.map(g => h('section', {key: g.name, className: g.name === 'overlays' ? 'cs-group cs-open-group' : 'cs-group'},
|
|
605
|
+
body = groups.map(g => h('section', {key: g.name, className: (g.name === 'overlays' ? 'cs-group cs-open-group' : 'cs-group') + ' cs-family-' + g.name},
|
|
555
606
|
g.name ? h('h2', {className: 'cs-group-name'}, g.name) : null,
|
|
556
607
|
h('div', {className: g.name === 'pages' ? 'cs-pages' : 'cs-sheet'}, g.cells.map(c => h('div', {key: c.name, className: 'cs-cell', style: {'--cs-examples': c.list.length}},
|
|
557
608
|
h('div', {className: 'cs-name'}, c.name),
|
|
558
609
|
h('div', {className: 'cs-row'}, c.list.map((x, j) => h('div', {key: j, className: 'cs-item'},
|
|
559
610
|
x.label ? h('div', {className: 'cs-label'}, x.label) : null,
|
|
560
611
|
x.opened ? h('div', {className: 'cs-open'}, part(x.markup)) : part(x.markup)))))))));
|
|
612
|
+
// On the overlays section's own page the states come first, so its
|
|
613
|
+
// picture shows them in its first screen.
|
|
561
614
|
if (stated.length)
|
|
562
|
-
body
|
|
615
|
+
body[SECTION === 'overlays' ? 'unshift' : 'push'](h('section', {key: 'states', className: 'cs-group cs-states cs-family-states'},
|
|
563
616
|
h('h2', {className: 'cs-group-name'}, 'states'),
|
|
564
617
|
h('div', {className: 'cs-states-grid'},
|
|
565
618
|
h('div', {className: 'cs-states-row cs-states-head'}, h('div', null), STATES.map(([label]) => h('div', {key: label, className: 'cs-label'}, label))),
|
|
@@ -587,12 +640,9 @@ export const SHEET_CSS = [
|
|
|
587
640
|
'.cs-group-name{font:600 14px ui-monospace,monospace;margin:16px 14px 0;opacity:.75}',
|
|
588
641
|
'.cs-sheet{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:14px}',
|
|
589
642
|
'.cs-pages{display:grid;grid-template-columns:minmax(0,1fr);gap:14px;padding:14px}',
|
|
590
|
-
|
|
643
|
+
// A cell is as tall as what it holds, so every variant is drawn whole.
|
|
644
|
+
'.cs-cell{border:1px dashed #8885;padding:10px;overflow:hidden}',
|
|
591
645
|
'.cs-pages .cs-cell{max-height:none}',
|
|
592
|
-
// An overlay drawn open is shown at the height of what it holds (a date
|
|
593
|
-
// range's calendar, a command palette), up to the height of the window a
|
|
594
|
-
// picture is taken in (900px), as a person sees it on a screen.
|
|
595
|
-
'.cs-open-group .cs-cell{max-height:900px}',
|
|
596
646
|
// A panel that fills the window (a drawer, a bottom sheet, a lightbox)
|
|
597
647
|
// takes an equal share of that height for each of its examples, so every
|
|
598
648
|
// example is drawn, never one panel filling the cell.
|
|
@@ -600,7 +650,16 @@ export const SHEET_CSS = [
|
|
|
600
650
|
'.cs-name{font:600 12px ui-monospace,monospace;opacity:.6;margin-bottom:8px}',
|
|
601
651
|
'.cs-row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start}',
|
|
602
652
|
'.cs-label{font:10px ui-monospace,monospace;opacity:.5}',
|
|
603
|
-
|
|
653
|
+
// An item takes a share of its row, so a part as wide as its container
|
|
654
|
+
// (a divider, a form layout) is drawn at a width, never at none.
|
|
655
|
+
'.cs-item{max-width:100%;position:relative;flex:1 1 200px;min-width:0}',
|
|
656
|
+
// A part that needs a row's width (a table, code, an app shell) takes the
|
|
657
|
+
// whole row of the grid, so its text is never cut or wrapped mid-word.
|
|
658
|
+
'.cs-sheet>.cs-cell:has(table,pre,.astryx-app-shell){grid-column:1/-1}',
|
|
659
|
+
// A picture is one moment: a part that loops an animation (a skeleton's
|
|
660
|
+
// shimmer, a pulsing dot) is drawn at rest, never at a frame where it is
|
|
661
|
+
// faint or gone.
|
|
662
|
+
'.cs-page *,.cs-page *::before,.cs-page *::after{animation:none!important}',
|
|
604
663
|
// Overlays shown open in place: a layer the page would open with script
|
|
605
664
|
// (its root alone: a hidden helper popover inside it stays hidden), and a
|
|
606
665
|
// panel over the page (a drawer, a bottom sheet, a lightbox) at the size
|
|
@@ -610,15 +669,15 @@ export const SHEET_CSS = [
|
|
|
610
669
|
'.cs-strip-row{display:flex;flex-wrap:wrap;gap:24px;align-items:flex-start}',
|
|
611
670
|
'.cs-strip-item{max-width:300px;position:relative}',
|
|
612
671
|
'.cs-strip [popover][data-astryx-layer-root]{display:block!important;position:relative!important;inset:auto!important;margin:8px 0 0!important;translate:none!important;transform:none!important}',
|
|
613
|
-
|
|
672
|
+
// An overlay shown in place is no wider than its cell (a popover that
|
|
673
|
+
// holds a form), so nothing it holds is cut at the cell's edge.
|
|
674
|
+
'.cs-cell [popover][data-astryx-layer-root]{display:block!important;position:relative!important;inset:auto!important;margin:8px 0 0!important;translate:none!important;transform:none!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important}',
|
|
614
675
|
// A part shown for its open look that opened nothing has no cell.
|
|
615
676
|
'.cs-cell:has(.cs-open):not(:has(.cs-open [data-astryx-layer-root])){display:none}',
|
|
616
677
|
// The overlays section's own page (sheet-overlays.png): five to a row,
|
|
617
|
-
//
|
|
618
|
-
//
|
|
619
|
-
// first. The full sheet keeps each at a window's height.
|
|
678
|
+
// a panel over the page cropped to its top at 260px, the small overlays
|
|
679
|
+
// first.
|
|
620
680
|
'.cs-section-overlays .cs-open-group .cs-sheet{grid-template-columns:repeat(5,minmax(0,1fr))}',
|
|
621
|
-
'.cs-section-overlays .cs-open-group .cs-cell{max-height:300px}',
|
|
622
681
|
'.cs-section-overlays .cs-open-group .cs-cell dialog{max-height:260px!important}',
|
|
623
682
|
// The states section: one row per control, one column per state.
|
|
624
683
|
'.cs-states-grid{display:grid;gap:10px;padding:14px}',
|