@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
|
@@ -40,6 +40,8 @@ import {MoreMenu} from '@astryxdesign/core/MoreMenu';
|
|
|
40
40
|
import {Toolbar} from '@astryxdesign/core/Toolbar';
|
|
41
41
|
import {useResizable, ResizeHandle} from '@astryxdesign/core/Resizable';
|
|
42
42
|
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
43
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
44
|
+
import {useClipboard} from '@astryxdesign/core/hooks';
|
|
43
45
|
|
|
44
46
|
import {
|
|
45
47
|
DocumentTextIcon,
|
|
@@ -172,9 +174,27 @@ The refresh path is covered end to end:
|
|
|
172
174
|
|
|
173
175
|
// Artifact subviews
|
|
174
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Copies the document and confirms with a toast, for the desktop toolbar and
|
|
179
|
+
* the narrow-screen menu alike.
|
|
180
|
+
*/
|
|
181
|
+
function useCopyDocument() {
|
|
182
|
+
const showToast = useToast();
|
|
183
|
+
const {copy} = useClipboard({announce: 'Copied'});
|
|
184
|
+
return () =>
|
|
185
|
+
void copy(ARTIFACT_CONTENT).then(isCopied =>
|
|
186
|
+
showToast({
|
|
187
|
+
body: isCopied ? 'Copied' : 'Could not copy the document',
|
|
188
|
+
uniqueID: 'copy',
|
|
189
|
+
}),
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
175
193
|
// Header actions: version menu, copy, share. Pass `onClose` for the desktop
|
|
176
194
|
// close button. A fragment so each control is a direct child of the toolbar.
|
|
177
195
|
function ArtifactActions({onClose}: {onClose?: () => void}) {
|
|
196
|
+
const showToast = useToast();
|
|
197
|
+
const copyDocument = useCopyDocument();
|
|
178
198
|
return (
|
|
179
199
|
<>
|
|
180
200
|
<DropdownMenu
|
|
@@ -183,7 +203,26 @@ function ArtifactActions({onClose}: {onClose?: () => void}) {
|
|
|
183
203
|
variant: 'ghost',
|
|
184
204
|
size: 'sm',
|
|
185
205
|
}}
|
|
186
|
-
items={[
|
|
206
|
+
items={[
|
|
207
|
+
{
|
|
208
|
+
label: 'v2 (current)',
|
|
209
|
+
onClick: () =>
|
|
210
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
211
|
+
showToast({
|
|
212
|
+
body: 'Demo: version 2 is already shown',
|
|
213
|
+
uniqueID: 'v2',
|
|
214
|
+
}),
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: 'v1',
|
|
218
|
+
onClick: () =>
|
|
219
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
220
|
+
showToast({
|
|
221
|
+
body: 'Demo: version 1 would open here',
|
|
222
|
+
uniqueID: 'v1',
|
|
223
|
+
}),
|
|
224
|
+
},
|
|
225
|
+
]}
|
|
187
226
|
/>
|
|
188
227
|
<Button
|
|
189
228
|
label="Copy"
|
|
@@ -191,6 +230,7 @@ function ArtifactActions({onClose}: {onClose?: () => void}) {
|
|
|
191
230
|
size="sm"
|
|
192
231
|
icon={<Icon icon={ClipboardDocumentIcon} size="sm" />}
|
|
193
232
|
isIconOnly
|
|
233
|
+
onClick={copyDocument}
|
|
194
234
|
/>
|
|
195
235
|
<Button
|
|
196
236
|
label="Share"
|
|
@@ -198,6 +238,10 @@ function ArtifactActions({onClose}: {onClose?: () => void}) {
|
|
|
198
238
|
size="sm"
|
|
199
239
|
icon={<Icon icon={ShareIcon} size="sm" />}
|
|
200
240
|
isIconOnly
|
|
241
|
+
onClick={() =>
|
|
242
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
243
|
+
showToast({body: 'Demo: sharing would start here', uniqueID: 'share'})
|
|
244
|
+
}
|
|
201
245
|
/>
|
|
202
246
|
{onClose != null && (
|
|
203
247
|
<Button
|
|
@@ -215,6 +259,8 @@ function ArtifactActions({onClose}: {onClose?: () => void}) {
|
|
|
215
259
|
|
|
216
260
|
// Mobile variant: the actions collapse into an overflow menu.
|
|
217
261
|
function MobileArtifactActions() {
|
|
262
|
+
const showToast = useToast();
|
|
263
|
+
const copyDocument = useCopyDocument();
|
|
218
264
|
return (
|
|
219
265
|
<MoreMenu
|
|
220
266
|
label="Document actions"
|
|
@@ -224,13 +270,42 @@ function MobileArtifactActions() {
|
|
|
224
270
|
type: 'section',
|
|
225
271
|
title: 'Version',
|
|
226
272
|
items: [
|
|
227
|
-
{
|
|
228
|
-
|
|
273
|
+
{
|
|
274
|
+
label: 'v2 (current)',
|
|
275
|
+
onClick: () =>
|
|
276
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
277
|
+
showToast({
|
|
278
|
+
body: 'Demo: version 2 is already shown',
|
|
279
|
+
uniqueID: 'v2',
|
|
280
|
+
}),
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
label: 'v1',
|
|
284
|
+
onClick: () =>
|
|
285
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
286
|
+
showToast({
|
|
287
|
+
body: 'Demo: version 1 would open here',
|
|
288
|
+
uniqueID: 'v1',
|
|
289
|
+
}),
|
|
290
|
+
},
|
|
229
291
|
],
|
|
230
292
|
},
|
|
231
293
|
{type: 'divider'},
|
|
232
|
-
{
|
|
233
|
-
|
|
294
|
+
{
|
|
295
|
+
label: 'Copy',
|
|
296
|
+
icon: ClipboardDocumentIcon,
|
|
297
|
+
onClick: copyDocument,
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
label: 'Share',
|
|
301
|
+
icon: ShareIcon,
|
|
302
|
+
onClick: () =>
|
|
303
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
304
|
+
showToast({
|
|
305
|
+
body: 'Demo: sharing would start here',
|
|
306
|
+
uniqueID: 'share',
|
|
307
|
+
}),
|
|
308
|
+
},
|
|
234
309
|
]}
|
|
235
310
|
/>
|
|
236
311
|
);
|
|
@@ -283,6 +358,7 @@ function ArtifactCard({onOpen}: {onOpen: () => void}) {
|
|
|
283
358
|
// Main component
|
|
284
359
|
|
|
285
360
|
export default function AIChatConversationTemplate() {
|
|
361
|
+
const showToast = useToast();
|
|
286
362
|
const [composerMode, setComposerMode] = useState('ask');
|
|
287
363
|
// Mobile shows the artifact as a full-screen dialog; desktop as a side panel.
|
|
288
364
|
const [isArtifactDialogOpen, setIsArtifactDialogOpen] = useState(false);
|
|
@@ -324,7 +400,13 @@ export default function AIChatConversationTemplate() {
|
|
|
324
400
|
style={chatLayout}
|
|
325
401
|
composer={
|
|
326
402
|
<ChatComposer
|
|
327
|
-
onSubmit={() =>
|
|
403
|
+
onSubmit={() =>
|
|
404
|
+
// Demo only: replace this toast with the call that sends the message.
|
|
405
|
+
showToast({
|
|
406
|
+
body: 'Demo: your message would send here',
|
|
407
|
+
uniqueID: 'send',
|
|
408
|
+
})
|
|
409
|
+
}
|
|
328
410
|
placeholder={
|
|
329
411
|
composerMode === 'ask'
|
|
330
412
|
? 'Ask anything...'
|
|
@@ -339,6 +421,13 @@ export default function AIChatConversationTemplate() {
|
|
|
339
421
|
size="sm"
|
|
340
422
|
icon={<Icon icon={AtSymbolIcon} size="sm" />}
|
|
341
423
|
isIconOnly
|
|
424
|
+
onClick={() =>
|
|
425
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
426
|
+
showToast({
|
|
427
|
+
body: 'Demo: a list of people to mention would open here',
|
|
428
|
+
uniqueID: 'mention',
|
|
429
|
+
})
|
|
430
|
+
}
|
|
342
431
|
/>
|
|
343
432
|
<Button
|
|
344
433
|
label="Attach"
|
|
@@ -346,6 +435,13 @@ export default function AIChatConversationTemplate() {
|
|
|
346
435
|
size="sm"
|
|
347
436
|
icon={<Icon icon={PaperClipIcon} size="sm" />}
|
|
348
437
|
isIconOnly
|
|
438
|
+
onClick={() =>
|
|
439
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
440
|
+
showToast({
|
|
441
|
+
body: 'Demo: a file picker would open here',
|
|
442
|
+
uniqueID: 'attach',
|
|
443
|
+
})
|
|
444
|
+
}
|
|
349
445
|
/>
|
|
350
446
|
</>
|
|
351
447
|
}
|
|
@@ -50,6 +50,8 @@ import {TreeList, type TreeListItemData} from '@astryxdesign/core/TreeList';
|
|
|
50
50
|
import {useContainerReveal} from '@astryxdesign/core/hooks';
|
|
51
51
|
import {Theme, defineTheme} from '@astryxdesign/core/theme';
|
|
52
52
|
import {Toolbar} from '@astryxdesign/core/Toolbar';
|
|
53
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
54
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
53
55
|
import {neutralTheme} from '@astryxdesign/theme-neutral/built';
|
|
54
56
|
import {
|
|
55
57
|
Aperture,
|
|
@@ -1659,6 +1661,9 @@ function ShadowFields({
|
|
|
1659
1661
|
// =============================================================================
|
|
1660
1662
|
|
|
1661
1663
|
export default function CanvasEditor() {
|
|
1664
|
+
const showToast = useToast();
|
|
1665
|
+
// Demo only: replace these toasts with the calls that perform each action.
|
|
1666
|
+
const demo = (body: string, uniqueID: string) => showToast({body, uniqueID});
|
|
1662
1667
|
const [layers, setLayers] = useState(INITIAL_LAYERS);
|
|
1663
1668
|
const [selectedID, setSelectedID] = useState('headline');
|
|
1664
1669
|
const [panel, setPanel] = useState('layers');
|
|
@@ -2150,7 +2155,11 @@ export default function CanvasEditor() {
|
|
|
2150
2155
|
height="max-content"
|
|
2151
2156
|
minHeight="100%"
|
|
2152
2157
|
xstyle={styles.canvasStage}>
|
|
2158
|
+
{/* The artboard is a physical coordinate space:
|
|
2159
|
+
layers sit at x/y from its top-left corner in
|
|
2160
|
+
every reading direction. */}
|
|
2153
2161
|
<Card
|
|
2162
|
+
dir="ltr"
|
|
2154
2163
|
padding={0}
|
|
2155
2164
|
elevation="med"
|
|
2156
2165
|
width={FRAME.width * scale}
|
|
@@ -2262,19 +2271,39 @@ export default function CanvasEditor() {
|
|
|
2262
2271
|
<>
|
|
2263
2272
|
<IconButton
|
|
2264
2273
|
label="Undo"
|
|
2274
|
+
onClick={() =>
|
|
2275
|
+
demo(
|
|
2276
|
+
'Demo: the last change would be undone here',
|
|
2277
|
+
'undo',
|
|
2278
|
+
)
|
|
2279
|
+
}
|
|
2265
2280
|
tooltip="Undo"
|
|
2266
2281
|
variant="ghost"
|
|
2267
2282
|
icon={
|
|
2268
|
-
<Icon
|
|
2283
|
+
<Icon
|
|
2284
|
+
icon={Undo2}
|
|
2285
|
+
size={ICON}
|
|
2286
|
+
xstyle={rtlStyles.mirror}
|
|
2287
|
+
/>
|
|
2269
2288
|
}
|
|
2270
2289
|
xstyle={styles.toolBarControl}
|
|
2271
2290
|
/>
|
|
2272
2291
|
<IconButton
|
|
2273
2292
|
label="Redo"
|
|
2293
|
+
onClick={() =>
|
|
2294
|
+
demo(
|
|
2295
|
+
'Demo: the change would be redone here',
|
|
2296
|
+
'redo',
|
|
2297
|
+
)
|
|
2298
|
+
}
|
|
2274
2299
|
tooltip="Redo"
|
|
2275
2300
|
variant="ghost"
|
|
2276
2301
|
icon={
|
|
2277
|
-
<Icon
|
|
2302
|
+
<Icon
|
|
2303
|
+
icon={Redo2}
|
|
2304
|
+
size={ICON}
|
|
2305
|
+
xstyle={rtlStyles.mirror}
|
|
2306
|
+
/>
|
|
2278
2307
|
}
|
|
2279
2308
|
xstyle={styles.toolBarControl}
|
|
2280
2309
|
/>
|
|
@@ -2284,6 +2313,12 @@ export default function CanvasEditor() {
|
|
|
2284
2313
|
/>
|
|
2285
2314
|
<IconButton
|
|
2286
2315
|
label="Add frame"
|
|
2316
|
+
onClick={() =>
|
|
2317
|
+
demo(
|
|
2318
|
+
'Demo: a new frame would be added here',
|
|
2319
|
+
'add-frame',
|
|
2320
|
+
)
|
|
2321
|
+
}
|
|
2287
2322
|
tooltip="Add frame"
|
|
2288
2323
|
variant="ghost"
|
|
2289
2324
|
icon={
|
|
@@ -2293,6 +2328,12 @@ export default function CanvasEditor() {
|
|
|
2293
2328
|
/>
|
|
2294
2329
|
<IconButton
|
|
2295
2330
|
label="Add text"
|
|
2331
|
+
onClick={() =>
|
|
2332
|
+
demo(
|
|
2333
|
+
'Demo: a new text layer would be added here',
|
|
2334
|
+
'add-text',
|
|
2335
|
+
)
|
|
2336
|
+
}
|
|
2296
2337
|
tooltip="Add text"
|
|
2297
2338
|
variant="ghost"
|
|
2298
2339
|
icon={
|
|
@@ -2302,6 +2343,12 @@ export default function CanvasEditor() {
|
|
|
2302
2343
|
/>
|
|
2303
2344
|
<IconButton
|
|
2304
2345
|
label="Add image"
|
|
2346
|
+
onClick={() =>
|
|
2347
|
+
demo(
|
|
2348
|
+
'Demo: an image picker would open here',
|
|
2349
|
+
'add-image',
|
|
2350
|
+
)
|
|
2351
|
+
}
|
|
2305
2352
|
tooltip="Add image"
|
|
2306
2353
|
variant="ghost"
|
|
2307
2354
|
icon={
|
|
@@ -2384,6 +2431,12 @@ export default function CanvasEditor() {
|
|
|
2384
2431
|
/>
|
|
2385
2432
|
<IconButton
|
|
2386
2433
|
label="Set padding per side"
|
|
2434
|
+
onClick={() =>
|
|
2435
|
+
demo(
|
|
2436
|
+
'Demo: padding fields for each side would open here',
|
|
2437
|
+
'set-padding-per-side',
|
|
2438
|
+
)
|
|
2439
|
+
}
|
|
2387
2440
|
tooltip="Per side"
|
|
2388
2441
|
size="sm"
|
|
2389
2442
|
variant="ghost"
|
|
@@ -2433,6 +2486,12 @@ export default function CanvasEditor() {
|
|
|
2433
2486
|
/>
|
|
2434
2487
|
<IconButton
|
|
2435
2488
|
label="Set radius per corner"
|
|
2489
|
+
onClick={() =>
|
|
2490
|
+
demo(
|
|
2491
|
+
'Demo: radius fields for each corner would open here',
|
|
2492
|
+
'set-radius-per-corner',
|
|
2493
|
+
)
|
|
2494
|
+
}
|
|
2436
2495
|
tooltip="Per corner"
|
|
2437
2496
|
size="sm"
|
|
2438
2497
|
variant="ghost"
|
|
@@ -2515,6 +2574,12 @@ export default function CanvasEditor() {
|
|
|
2515
2574
|
<InspectorRow label="Flip" hAlign="end">
|
|
2516
2575
|
<IconButton
|
|
2517
2576
|
label="Flip horizontally"
|
|
2577
|
+
onClick={() =>
|
|
2578
|
+
demo(
|
|
2579
|
+
'Demo: the layer would flip horizontally here',
|
|
2580
|
+
'flip-horizontally',
|
|
2581
|
+
)
|
|
2582
|
+
}
|
|
2518
2583
|
tooltip="Flip horizontally"
|
|
2519
2584
|
size="sm"
|
|
2520
2585
|
variant="ghost"
|
|
@@ -2522,6 +2587,12 @@ export default function CanvasEditor() {
|
|
|
2522
2587
|
/>
|
|
2523
2588
|
<IconButton
|
|
2524
2589
|
label="Flip vertically"
|
|
2590
|
+
onClick={() =>
|
|
2591
|
+
demo(
|
|
2592
|
+
'Demo: the layer would flip vertically here',
|
|
2593
|
+
'flip-vertically',
|
|
2594
|
+
)
|
|
2595
|
+
}
|
|
2525
2596
|
tooltip="Flip vertically"
|
|
2526
2597
|
size="sm"
|
|
2527
2598
|
variant="ghost"
|
|
@@ -9,10 +9,10 @@ import {Button} from '@astryxdesign/core/Button';
|
|
|
9
9
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
10
10
|
import {AspectRatio} from '@astryxdesign/core/AspectRatio';
|
|
11
11
|
import {Section} from '@astryxdesign/core/Section';
|
|
12
|
+
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
12
13
|
import {ArrowRightIcon} from '@heroicons/react/20/solid';
|
|
13
14
|
|
|
14
|
-
const IMAGE_URL =
|
|
15
|
-
'/template-assets/light-scene-horizontal-1.png';
|
|
15
|
+
const IMAGE_URL = '/template-assets/light-scene-horizontal-1.png';
|
|
16
16
|
|
|
17
17
|
const heroImage: CSSProperties = {
|
|
18
18
|
width: '100%',
|
|
@@ -53,11 +53,17 @@ export default function CenteredHero() {
|
|
|
53
53
|
<Button
|
|
54
54
|
label="Get started"
|
|
55
55
|
variant="primary"
|
|
56
|
+
href="#"
|
|
56
57
|
endContent={
|
|
57
|
-
<Icon
|
|
58
|
+
<Icon
|
|
59
|
+
icon={ArrowRightIcon}
|
|
60
|
+
size="sm"
|
|
61
|
+
color="inherit"
|
|
62
|
+
xstyle={rtlStyles.mirror}
|
|
63
|
+
/>
|
|
58
64
|
}
|
|
59
65
|
/>
|
|
60
|
-
<Button label="Learn more" variant="secondary" />
|
|
66
|
+
<Button label="Learn more" variant="secondary" href="#" />
|
|
61
67
|
</HStack>
|
|
62
68
|
</VStack>
|
|
63
69
|
<Section variant="transparent" padding={0}>
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
import {RadioList, RadioListItem} from '@astryxdesign/core/RadioList';
|
|
32
32
|
import {VisuallyHidden} from '@astryxdesign/core/VisuallyHidden';
|
|
33
33
|
import {rtlStyles} from '@astryxdesign/core/utils';
|
|
34
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
34
35
|
import type {CSSProperties, ReactNode} from 'react';
|
|
35
36
|
|
|
36
37
|
// Custom CSS here is limited to what Astryx components can't express today:
|
|
@@ -414,6 +415,7 @@ function SyllabusSection() {
|
|
|
414
415
|
|
|
415
416
|
// ─── Instructor ──────────────────────────────────────────────────────────────
|
|
416
417
|
function InstructorSection() {
|
|
418
|
+
const showToast = useToast();
|
|
417
419
|
return (
|
|
418
420
|
<Section padding={6}>
|
|
419
421
|
<VStack gap={4}>
|
|
@@ -457,8 +459,27 @@ function InstructorSection() {
|
|
|
457
459
|
</HStack>
|
|
458
460
|
<Text type="body">{INSTRUCTOR.bio}</Text>
|
|
459
461
|
<HStack gap={2}>
|
|
460
|
-
<Button
|
|
461
|
-
|
|
462
|
+
<Button
|
|
463
|
+
label="View full profile"
|
|
464
|
+
onClick={() =>
|
|
465
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
466
|
+
showToast({
|
|
467
|
+
body: 'Demo: the instructor profile would open here',
|
|
468
|
+
uniqueID: 'profile',
|
|
469
|
+
})
|
|
470
|
+
}
|
|
471
|
+
/>
|
|
472
|
+
<Button
|
|
473
|
+
label="Follow"
|
|
474
|
+
variant="ghost"
|
|
475
|
+
onClick={() =>
|
|
476
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
477
|
+
showToast({
|
|
478
|
+
body: 'Demo: you would follow the instructor here',
|
|
479
|
+
uniqueID: 'follow',
|
|
480
|
+
})
|
|
481
|
+
}
|
|
482
|
+
/>
|
|
462
483
|
</HStack>
|
|
463
484
|
</VStack>
|
|
464
485
|
</Card>
|
|
@@ -469,6 +490,7 @@ function InstructorSection() {
|
|
|
469
490
|
|
|
470
491
|
// ─── Reviews ─────────────────────────────────────────────────────────────────
|
|
471
492
|
function ReviewCard({review}: {review: (typeof REVIEWS)[number]}) {
|
|
493
|
+
const showToast = useToast();
|
|
472
494
|
return (
|
|
473
495
|
<Card padding={4}>
|
|
474
496
|
<VStack gap={3}>
|
|
@@ -491,6 +513,13 @@ function ReviewCard({review}: {review: (typeof REVIEWS)[number]}) {
|
|
|
491
513
|
variant="ghost"
|
|
492
514
|
size="sm"
|
|
493
515
|
icon={<Icon icon={CheckIcon} size="xsm" />}
|
|
516
|
+
onClick={() =>
|
|
517
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
518
|
+
showToast({
|
|
519
|
+
body: 'Demo: your vote would be counted here',
|
|
520
|
+
uniqueID: `helpful-${review.name}`,
|
|
521
|
+
})
|
|
522
|
+
}
|
|
494
523
|
/>
|
|
495
524
|
</HStack>
|
|
496
525
|
</VStack>
|
|
@@ -582,6 +611,7 @@ function FaqSection() {
|
|
|
582
611
|
|
|
583
612
|
// ─── Enroll rail ─────────────────────────────────────────────────────────────
|
|
584
613
|
function EnrollRail() {
|
|
614
|
+
const showToast = useToast();
|
|
585
615
|
const [mode, setMode] = useState('self-paced');
|
|
586
616
|
const [pace, setPace] = useState(7);
|
|
587
617
|
const [cohort, setCohort] = useState(COHORTS[0].id);
|
|
@@ -609,11 +639,25 @@ function EnrollRail() {
|
|
|
609
639
|
icon={
|
|
610
640
|
<Icon icon={ArrowRightIcon} size="sm" xstyle={rtlStyles.mirror} />
|
|
611
641
|
}
|
|
642
|
+
onClick={() =>
|
|
643
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
644
|
+
showToast({
|
|
645
|
+
body: 'Demo: enrollment would start here',
|
|
646
|
+
uniqueID: 'enroll',
|
|
647
|
+
})
|
|
648
|
+
}
|
|
612
649
|
/>
|
|
613
650
|
<Button
|
|
614
651
|
label="Start lesson one free"
|
|
615
652
|
size="lg"
|
|
616
653
|
icon={<Icon icon={PlayIcon} size="sm" />}
|
|
654
|
+
onClick={() =>
|
|
655
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
656
|
+
showToast({
|
|
657
|
+
body: 'Demo: lesson one would play here',
|
|
658
|
+
uniqueID: 'lesson-one',
|
|
659
|
+
})
|
|
660
|
+
}
|
|
617
661
|
/>
|
|
618
662
|
</VStack>
|
|
619
663
|
<Text type="supporting" color="secondary">
|
|
@@ -24,6 +24,7 @@ import type {TableColumn} from '@astryxdesign/core/Table';
|
|
|
24
24
|
import {Divider} from '@astryxdesign/core/Divider';
|
|
25
25
|
import {Link} from '@astryxdesign/core/Link';
|
|
26
26
|
import {Icon} from '@astryxdesign/core/Icon';
|
|
27
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
27
28
|
|
|
28
29
|
// ============= ICONS =============
|
|
29
30
|
|
|
@@ -699,20 +700,18 @@ function TableCard<T extends {id: string}>({
|
|
|
699
700
|
}) {
|
|
700
701
|
return (
|
|
701
702
|
<Card>
|
|
702
|
-
<
|
|
703
|
-
<
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
/>
|
|
715
|
-
</VStack>
|
|
703
|
+
<HStack hAlign="between" vAlign="center" paddingBlockEnd={6}>
|
|
704
|
+
<Heading level={4}>{title}</Heading>
|
|
705
|
+
<Link href={linkHref}>{linkLabel}</Link>
|
|
706
|
+
</HStack>
|
|
707
|
+
<Table<T>
|
|
708
|
+
data={data}
|
|
709
|
+
columns={columns}
|
|
710
|
+
idKey="id"
|
|
711
|
+
density="compact"
|
|
712
|
+
dividers="rows"
|
|
713
|
+
hasHover
|
|
714
|
+
/>
|
|
716
715
|
</Card>
|
|
717
716
|
);
|
|
718
717
|
}
|
|
@@ -722,6 +721,7 @@ function TableCard<T extends {id: string}>({
|
|
|
722
721
|
// ============= MAIN COMPONENT =============
|
|
723
722
|
|
|
724
723
|
export default function DashboardTemplate() {
|
|
724
|
+
const showToast = useToast();
|
|
725
725
|
return (
|
|
726
726
|
<Layout
|
|
727
727
|
height="fill"
|
|
@@ -737,6 +737,13 @@ export default function DashboardTemplate() {
|
|
|
737
737
|
variant="secondary"
|
|
738
738
|
size="md"
|
|
739
739
|
icon={<Icon icon={ArrowPathIcon} size="sm" />}
|
|
740
|
+
onClick={() =>
|
|
741
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
742
|
+
showToast({
|
|
743
|
+
body: 'Demo: the active-users data would reload here',
|
|
744
|
+
uniqueID: 'reload-active-users',
|
|
745
|
+
})
|
|
746
|
+
}
|
|
740
747
|
/>
|
|
741
748
|
</HStack>
|
|
742
749
|
<ActiveUsersChart />
|
|
@@ -765,7 +772,18 @@ export default function DashboardTemplate() {
|
|
|
765
772
|
{/* Demographics */}
|
|
766
773
|
<HStack hAlign="between" vAlign="center">
|
|
767
774
|
<Heading level={3}>Demographics</Heading>
|
|
768
|
-
<Button
|
|
775
|
+
<Button
|
|
776
|
+
label="View more"
|
|
777
|
+
variant="secondary"
|
|
778
|
+
size="md"
|
|
779
|
+
onClick={() =>
|
|
780
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
781
|
+
showToast({
|
|
782
|
+
body: 'Demo: the full demographics breakdown would open here',
|
|
783
|
+
uniqueID: 'more-demographics',
|
|
784
|
+
})
|
|
785
|
+
}
|
|
786
|
+
/>
|
|
769
787
|
</HStack>
|
|
770
788
|
<Grid columns={{minWidth: 320, repeat: 'fit'}} gap={4}>
|
|
771
789
|
<StackedBarCard title="Region" data={regionData} />
|
|
@@ -777,7 +795,18 @@ export default function DashboardTemplate() {
|
|
|
777
795
|
{/* Engagement */}
|
|
778
796
|
<HStack hAlign="between" vAlign="center">
|
|
779
797
|
<Heading level={3}>Engagement</Heading>
|
|
780
|
-
<Button
|
|
798
|
+
<Button
|
|
799
|
+
label="View more"
|
|
800
|
+
variant="secondary"
|
|
801
|
+
size="md"
|
|
802
|
+
onClick={() =>
|
|
803
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
804
|
+
showToast({
|
|
805
|
+
body: 'Demo: the full engagement report would open here',
|
|
806
|
+
uniqueID: 'more-engagement',
|
|
807
|
+
})
|
|
808
|
+
}
|
|
809
|
+
/>
|
|
781
810
|
</HStack>
|
|
782
811
|
<Grid columns={{minWidth: 320, repeat: 'fit'}} gap={4}>
|
|
783
812
|
<TableCard
|
|
@@ -40,6 +40,7 @@ import {
|
|
|
40
40
|
} from '@astryxdesign/core/SegmentedControl';
|
|
41
41
|
import {Table, pixel} from '@astryxdesign/core/Table';
|
|
42
42
|
import type {TableColumn} from '@astryxdesign/core/Table';
|
|
43
|
+
import {useToast} from '@astryxdesign/core/Toast';
|
|
43
44
|
import {
|
|
44
45
|
BarChart,
|
|
45
46
|
Bar,
|
|
@@ -783,6 +784,7 @@ function SectionHeading({title, hint}: {title: string; hint?: string}) {
|
|
|
783
784
|
// ============= MAIN =============
|
|
784
785
|
|
|
785
786
|
export default function FunnelCohortAnalyticsPage() {
|
|
787
|
+
const showToast = useToast();
|
|
786
788
|
const [segment, setSegment] = useState<Segment>('all');
|
|
787
789
|
const [funnelWindow, setFunnelWindow] = useState<FunnelWindow>('30d');
|
|
788
790
|
|
|
@@ -833,6 +835,13 @@ export default function FunnelCohortAnalyticsPage() {
|
|
|
833
835
|
label="Export"
|
|
834
836
|
variant="secondary"
|
|
835
837
|
icon={<Icon icon={ArrowDownTrayIcon} size="sm" />}
|
|
838
|
+
onClick={() =>
|
|
839
|
+
// Demo only: replace this toast with the call that performs the action.
|
|
840
|
+
showToast({
|
|
841
|
+
body: 'Demo: this funnel and cohort report would export here',
|
|
842
|
+
uniqueID: 'export-funnel',
|
|
843
|
+
})
|
|
844
|
+
}
|
|
836
845
|
/>
|
|
837
846
|
</HStack>
|
|
838
847
|
</HStack>
|
|
@@ -883,27 +892,29 @@ export default function FunnelCohortAnalyticsPage() {
|
|
|
883
892
|
hint="Signup week × weeks since signup"
|
|
884
893
|
/>
|
|
885
894
|
<Card padding={6}>
|
|
886
|
-
<
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
895
|
+
<Table<CohortRow>
|
|
896
|
+
data={cohortRows}
|
|
897
|
+
columns={cohortColumns}
|
|
898
|
+
idKey="id"
|
|
899
|
+
density="balanced"
|
|
900
|
+
dividers="rows"
|
|
901
|
+
/>
|
|
902
|
+
<HStack
|
|
903
|
+
gap={4}
|
|
904
|
+
vAlign="center"
|
|
905
|
+
wrap="wrap"
|
|
906
|
+
paddingBlockStart={8}>
|
|
907
|
+
<Text type="supporting" color="secondary">
|
|
908
|
+
Retention:
|
|
909
|
+
</Text>
|
|
910
|
+
<HStack gap={2} vAlign="center">
|
|
911
|
+
<Token size="sm" color="red" label="< 32%" />
|
|
912
|
+
<Token size="sm" color="orange" label="32–40%" />
|
|
913
|
+
<Token size="sm" color="yellow" label="40–50%" />
|
|
914
|
+
<Token size="sm" color="teal" label="50–70%" />
|
|
915
|
+
<Token size="sm" color="green" label="≥ 70%" />
|
|
905
916
|
</HStack>
|
|
906
|
-
</
|
|
917
|
+
</HStack>
|
|
907
918
|
</Card>
|
|
908
919
|
</VStack>
|
|
909
920
|
</VStack>
|