@astryxdesign/cli 0.7.17-canary.g49a475f → 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 +14 -9
- package/api/build/_adapter.d.mts +33 -4
- package/api/build/_adapter.mjs +43 -8
- package/api/build/blocks/blocks.d.mts +1 -0
- package/api/build/blocks/blocks.mjs +2 -1
- package/api/build/blocks/blocks.weights.json +1 -1
- package/api/build/build.doc.mjs +2 -2
- package/api/build/build.type.d.mts +13 -1
- package/api/build/build.type.mjs +6 -3
- package/api/build/kit/kind.d.mts +6 -0
- package/api/build/kit/kind.mjs +1 -1
- package/api/build/kit/kit.mjs +3 -3
- package/api/build/kit/rank.d.mts +9 -3
- package/api/build/kit/rank.mjs +21 -8
- package/api/build/kit/signals.d.mts +7 -1
- package/api/build/kit/signals.mjs +124 -41
- package/api/build/kit/start.d.mts +20 -5
- package/api/build/kit/start.mjs +103 -23
- package/api/build/kit/weights.d.mts +20 -4
- package/api/build/kit/weights.json +1 -1
- package/api/build/kit/weights.mjs +68 -18
- package/api/build/kit/words.d.mts +44 -2
- package/api/build/kit/words.mjs +159 -4
- package/api/build/tree.mjs +1 -1
- package/api/component/__fixtures__/resolutions/modules.txt +4 -4
- package/api/component/_adapter.d.mts +51 -20
- package/api/component/_adapter.mjs +198 -29
- package/api/component/component.mjs +18 -5
- package/api/component/component.type.d.mts +4 -0
- package/api/component/component.type.mjs +1 -0
- package/api/component/detail/blocks/blocks.mjs +1 -0
- 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.d.mts +10 -0
- package/api/discover/_adapter.mjs +110 -16
- package/api/discover/detail/item/item.mjs +5 -0
- package/api/discover/discover.mjs +12 -3
- package/api/discover/discover.type.d.mts +16 -3
- package/api/discover/discover.type.mjs +13 -3
- package/api/docs/_adapter.d.mts +74 -30
- package/api/docs/_adapter.mjs +488 -234
- package/api/docs/_entry-names-lazily.d.mts +22 -0
- package/api/docs/_entry-names-lazily.mjs +25 -0
- package/api/docs/_entry-names.d.mts +23 -0
- package/api/docs/_entry-names.mjs +105 -0
- package/api/doctor/_adapter.d.mts +63 -2
- package/api/doctor/_adapter.mjs +141 -5
- package/api/doctor/doctor.d.mts +11 -0
- package/api/doctor/doctor.doc.mjs +1 -1
- package/api/doctor/doctor.mjs +81 -30
- package/api/doctor/theme-checks.d.mts +35 -3
- package/api/doctor/theme-checks.mjs +449 -99
- package/api/error.d.mts +4 -3
- package/api/error.mjs +3 -2
- package/api/hook/_adapter.d.mts +14 -7
- package/api/hook/_adapter.mjs +46 -9
- package/api/hook/detail/detail.mjs +5 -2
- package/api/hook/detail/params/params.mjs +10 -3
- 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/integration/add-helpers.mjs +10 -0
- package/api/integration/authoring-checks.mjs +5 -2
- package/api/integration/check/check.mjs +6 -1
- package/api/integration/pack-check.mjs +50 -3
- package/api/integration/validate-integration.d.mts +18 -6
- package/api/integration/validate-integration.mjs +110 -14
- package/api/integration/validate-integration.type.d.mts +13 -0
- package/api/integration/validate-integration.type.mjs +2 -1
- package/api/integration/validateIntegration.doc.mjs +1 -1
- package/api/render/render.type.d.mts +1 -1
- package/api/render/render.type.mjs +1 -1
- package/api/search/ORDERING.md +1 -1
- package/api/search/_adapter.d.mts +8 -5
- package/api/search/_adapter.mjs +14 -10
- package/api/search/_candidate-score.d.mts +9 -4
- package/api/search/_candidate-score.mjs +82 -14
- 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/_gather-templates.mjs +1 -0
- package/api/search/_lexical.d.mts +16 -0
- package/api/search/_lexical.mjs +98 -10
- package/api/search/_priority.d.mts +10 -2
- package/api/search/_priority.mjs +37 -7
- package/api/search/_result.d.mts +1 -0
- package/api/search/_result.mjs +1 -0
- 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.doc.mjs +1 -1
- package/api/search/search.mjs +37 -4
- package/api/search/search.type.d.mts +4 -0
- package/api/search/search.type.mjs +1 -0
- package/api/swizzle/_adapter.d.mts +7 -5
- package/api/swizzle/_adapter.mjs +22 -6
- package/api/swizzle/copy/copy.mjs +5 -4
- package/api/template/_adapter.d.mts +16 -0
- package/api/template/_adapter.mjs +39 -2
- package/api/template/cdn/cdn.mjs +37 -8
- package/api/template/copy/copy.d.mts +6 -3
- package/api/template/copy/copy.mjs +83 -8
- package/api/template/show/show.mjs +1 -0
- package/api/template/skeleton/skeleton.mjs +1 -0
- package/api/template/template.doc.mjs +5 -5
- package/api/template/template.mjs +63 -11
- package/api/template/template.type.d.mts +4 -0
- package/api/template/template.type.mjs +5 -1
- package/api/theme/_adapter.d.mts +20 -1
- package/api/theme/_adapter.mjs +149 -12
- package/api/theme/_app-provider.d.mts +31 -0
- package/api/theme/_app-provider.mjs +135 -0
- package/api/theme/add/add.mjs +3 -1
- package/api/theme/build/build.d.mts +127 -11
- package/api/theme/build/build.mjs +2047 -352
- package/api/theme/build/core-interception.d.mts +10 -0
- package/api/theme/build/core-interception.mjs +10 -0
- package/api/theme/build/family.mjs +61 -21
- package/api/theme/build/font-warning.d.mts +99 -5
- package/api/theme/build/font-warning.mjs +379 -61
- package/api/theme/build/icon-imports.mjs +83 -15
- package/api/theme/build/input-fields.d.mts +110 -0
- package/api/theme/build/input-fields.mjs +667 -0
- package/api/theme/build/null-values.d.mts +42 -0
- package/api/theme/build/null-values.mjs +283 -0
- package/api/theme/build/self-contained.d.mts +90 -0
- package/api/theme/build/self-contained.mjs +380 -0
- package/api/theme/build/source-syntax.d.mts +11 -0
- package/api/theme/build/source-syntax.mjs +28 -0
- package/api/theme/build/style-keys.d.mts +72 -0
- package/api/theme/build/style-keys.mjs +589 -0
- package/api/theme/build/typography-values.d.mts +61 -0
- package/api/theme/build/typography-values.mjs +408 -0
- package/api/theme/build/written-values.d.mts +78 -0
- package/api/theme/build/written-values.mjs +482 -0
- package/api/theme/generateTonalPalette.doc.mjs +1 -1
- package/api/theme/list/list.mjs +17 -1
- package/api/theme/palette/generate/generator.d.mts +14 -2
- package/api/theme/palette/generate/generator.mjs +94 -8
- package/api/theme/remove/remove.d.mts +2 -1
- package/api/theme/remove/remove.mjs +7 -3
- package/api/theme/theme.type.d.mts +89 -5
- package/api/theme/theme.type.mjs +46 -7
- package/api/theme/themeAdd.doc.mjs +1 -1
- package/api/theme/themeBuild.doc.mjs +1 -1
- package/api/theme/themeListAvailable.doc.mjs +1 -1
- package/api/theme/themePaletteGenerate.doc.mjs +1 -1
- package/api/theme/themeRemove.doc.mjs +8 -5
- package/api/theme/themeTemplate.doc.mjs +18 -3
- package/api/theme-edit/_adapter.d.mts +57 -4
- package/api/theme-edit/_adapter.mjs +380 -73
- package/api/theme-edit/_catalog.d.mts +82 -4
- package/api/theme-edit/_catalog.mjs +397 -24
- package/api/theme-edit/_check.d.mts +153 -2
- package/api/theme-edit/_check.mjs +3028 -563
- package/api/theme-edit/_color.d.mts +27 -2
- package/api/theme-edit/_color.mjs +66 -8
- package/api/theme-edit/_compiler.d.mts +7 -2
- package/api/theme-edit/_compiler.mjs +335 -21
- package/api/theme-edit/_context.d.mts +192 -7
- package/api/theme-edit/_context.mjs +750 -70
- package/api/theme-edit/_css.d.mts +32 -0
- package/api/theme-edit/_css.mjs +121 -34
- package/api/theme-edit/_edit.d.mts +68 -5
- package/api/theme-edit/_edit.mjs +5119 -667
- package/api/theme-edit/_how-commands.d.mts +28 -1
- package/api/theme-edit/_how-commands.mjs +621 -17
- package/api/theme-edit/_how-question.d.mts +101 -9
- package/api/theme-edit/_how-question.mjs +13901 -1282
- package/api/theme-edit/_how.d.mts +13 -2
- package/api/theme-edit/_how.mjs +389 -32
- package/api/theme-edit/_importers.d.mts +38 -0
- package/api/theme-edit/_importers.mjs +188 -0
- package/api/theme-edit/_missed.d.mts +54 -0
- package/api/theme-edit/_missed.mjs +917 -0
- package/api/theme-edit/_normal.d.mts +110 -21
- package/api/theme-edit/_normal.mjs +700 -105
- package/api/theme-edit/_palette.d.mts +77 -0
- package/api/theme-edit/_palette.mjs +364 -73
- package/api/theme-edit/_part-words.d.mts +39 -0
- package/api/theme-edit/_part-words.mjs +191 -0
- package/api/theme-edit/_parts.d.mts +74 -4
- package/api/theme-edit/_parts.mjs +677 -73
- package/api/theme-edit/_preview-app.d.mts +8 -13
- package/api/theme-edit/_preview-app.mjs +1189 -559
- package/api/theme-edit/_preview.d.mts +151 -10
- package/api/theme-edit/_preview.mjs +785 -98
- package/api/theme-edit/_project.d.mts +38 -3
- package/api/theme-edit/_project.mjs +135 -8
- package/api/theme-edit/_settings.d.mts +678 -83
- package/api/theme-edit/_settings.mjs +6037 -1051
- package/api/theme-edit/_tables.d.mts +43 -3
- package/api/theme-edit/_tables.mjs +244 -59
- package/api/theme-edit/_vet.d.mts +14 -1
- package/api/theme-edit/_vet.mjs +86 -12
- package/api/theme-edit/theme-edit.type.d.mts +53 -3
- package/api/theme-edit/theme-edit.type.mjs +23 -5
- package/api/theme-edit/themeEditPreviewApp.doc.mjs +1 -1
- package/api/upgrade/_adapter.mjs +13 -2
- package/api/upgrade/upgrade.mjs +16 -1
- package/assets/codemods/integration-runner.mjs +1 -1
- package/assets/codemods/jscodeshift.d.ts +1 -1
- package/assets/codemods/parse.mjs +2 -2
- package/assets/codemods/run-codemod.mjs +71 -18
- package/assets/codemods/runner.mjs +1 -4
- package/assets/component-list.generated.json +1 -1
- package/assets/docs/author-a-theme.doc.mjs +1 -0
- package/assets/docs/theme.doc.dense.mjs +86 -7
- package/assets/docs/theme.doc.mjs +76 -2
- package/assets/docs/theme.doc.zh.mjs +61 -1
- package/assets/docs/tree/authoring.doc.mjs +1 -0
- package/assets/docs/tree/checks.doc.mjs +2 -2
- package/assets/docs/tree/cli.doc.mjs +1 -0
- package/assets/docs/tree/computer-agent-guide.doc.mjs +1 -1
- package/assets/docs/tree/document-the-theme.doc.mjs +1 -1
- package/assets/docs/tree/font-setup.doc.mjs +1 -1
- package/assets/docs/tree/fonts-and-assets.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/install-once.doc.mjs +1 -1
- package/assets/docs/tree/problems.doc.mjs +1 -1
- package/assets/docs/tree/render-pages.doc.mjs +2 -2
- package/assets/docs/tree/share-a-page.doc.mjs +162 -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 +3 -3
- package/assets/docs/tree/write-good-templates.doc.mjs +1 -1
- package/assets/docs/use-a-theme.doc.mjs +1 -1
- package/assets/docs-routes.generated.json +1 -0
- 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/ChatComposerInput/useChatPasteAsTokenHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/ChatComposerInput/useChatPasteAsTokenHookUsage.tsx +32 -0
- package/assets/templates/blocks/components/ChatComposerInput/useSpeechRecognitionHookUsage.doc.mjs +14 -0
- package/assets/templates/blocks/components/ChatComposerInput/useSpeechRecognitionHookUsage.tsx +43 -0
- 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/ai-chat-landing/page.tsx +31 -4
- package/assets/templates/pages/ai-chat-landing/template.doc.mjs +3 -0
- 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-alert-rail/page.tsx +1 -1
- package/assets/templates/pages/dashboard-cohort-funnel/page.tsx +32 -21
- package/assets/templates/pages/dashboard-comparison/page.tsx +11 -2
- package/assets/templates/pages/dashboard-composition/page.tsx +22 -9
- package/assets/templates/pages/dashboard-progress/page.tsx +28 -16
- package/assets/templates/pages/dashboard-scorecard/page.tsx +9 -0
- package/assets/templates/pages/detail-page/page.tsx +157 -76
- 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 +122 -65
- package/assets/templates/pages/editor/page.tsx +41 -24
- package/assets/templates/pages/file-explorer/page.tsx +44 -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 +55 -6
- package/assets/templates/pages/gallery-hero/page.tsx +2 -1
- package/assets/templates/pages/ide/page.tsx +23 -0
- package/assets/templates/pages/ide/template.doc.mjs +1 -1
- package/assets/templates/pages/incident-console/page.tsx +130 -30
- package/assets/templates/pages/incident-console/template.doc.mjs +2 -2
- package/assets/templates/pages/kanban-board/page.tsx +50 -3
- package/assets/templates/pages/login-card/page.tsx +16 -0
- package/assets/templates/pages/login-split/page.tsx +19 -6
- package/assets/templates/pages/messaging-shell/page.tsx +409 -419
- package/assets/templates/pages/messaging-shell/template.doc.mjs +6 -6
- package/assets/templates/pages/payment-form/page.tsx +107 -43
- package/assets/templates/pages/product-detail/page.tsx +26 -2
- 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 +196 -17
- 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 +27 -4
- 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 +575 -61
- package/assets/templates/pages/table/template.doc.mjs +11 -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 +17 -1
- package/assets/templates/pages/table-grouped/page.tsx +171 -133
- package/assets/templates/pages/table-inbox/page.tsx +60 -1
- package/assets/templates/pages/table-page/page.tsx +23 -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 +134 -80
- 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/assets/theme.template.ts +3 -2
- package/authoring/debug/parse.d.mts +1 -1
- package/authoring/doctypes/_schema.d.mts +28 -14
- 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/template.doc.mjs +1 -1
- package/authoring/doctypes/template/type.ts +1 -1
- package/authoring/index.d.ts +6 -1
- package/authoring/integration/integration.doc.mjs +15 -0
- package/authoring/integration/schema.d.mts +30 -1
- package/authoring/integration/schema.mjs +129 -4
- package/authoring/integration/type.ts +48 -0
- package/clients/cli/bin/astryx.mjs +9 -3
- package/clients/cli/build-id.generated.json +1 -1
- package/clients/cli/commands/build.mjs +17 -5
- package/clients/cli/commands/component.doc.mjs +1 -0
- package/clients/cli/commands/component.mjs +107 -42
- package/clients/cli/commands/discover.mjs +70 -3
- package/clients/cli/commands/docs.doc.mjs +1 -1
- package/clients/cli/commands/docs.mjs +41 -5
- package/clients/cli/commands/doctor.mjs +52 -2
- package/clients/cli/commands/experimental/index.mjs +4 -1
- package/clients/cli/commands/experimental/theme.mjs +1504 -186
- package/clients/cli/commands/experimental-render.doc.mjs +18 -5
- package/clients/cli/commands/experimental-theme-add.doc.mjs +2 -0
- package/clients/cli/commands/experimental-theme-compile.doc.mjs +3 -2
- 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 +4 -3
- package/clients/cli/commands/experimental-theme-editor-show.doc.mjs +3 -2
- package/clients/cli/commands/experimental-theme-editor-undo.doc.mjs +5 -4
- 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 +3 -2
- package/clients/cli/commands/experimental-theme-remove.doc.mjs +6 -4
- 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/init.mjs +14 -6
- package/clients/cli/commands/integration-add.doc.mjs +1 -0
- package/clients/cli/commands/manifest.mjs +10 -3
- package/clients/cli/commands/search.mjs +13 -1
- package/clients/cli/commands/swizzle.doc.mjs +9 -2
- package/clients/cli/commands/swizzle.mjs +13 -6
- package/clients/cli/commands/template.doc.mjs +4 -1
- package/clients/cli/commands/template.mjs +34 -7
- package/clients/cli/commands/theme-add.doc.mjs +3 -2
- package/clients/cli/commands/theme-build.doc.mjs +11 -2
- package/clients/cli/commands/theme-eject.doc.mjs +1 -1
- package/clients/cli/commands/theme-list.doc.mjs +1 -1
- package/clients/cli/commands/theme-palette-generate.doc.mjs +3 -2
- package/clients/cli/commands/theme-remove.doc.mjs +15 -6
- 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 +824 -576
- package/clients/cli/commands/upgrade.mjs +7 -3
- package/clients/cli/index.mjs +177 -78
- package/clients/cli/lib/base-gate.mjs +522 -0
- package/clients/cli/lib/cli-error.mjs +21 -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 +679 -40
- package/clients/cli/lib/manifest.d.ts +14 -0
- package/clients/cli/lib/manifest.mjs +78 -22
- package/clients/cli/lib/not-ready.mjs +22 -0
- package/clients/cli/lib/root-args.mjs +79 -0
- package/clients/cli/lib/stray-option.mjs +491 -0
- package/clients/cli/lib/unknown-command.mjs +374 -0
- package/clients/cli/manifest.generated.json +1 -1
- package/clients/cli/run.mjs +39 -3
- package/foundation/agent-docs/agent-docs.mjs +1 -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 +22 -0
- package/foundation/config/project.mjs +94 -30
- package/foundation/config/theme-build-header.d.mts +14 -0
- package/foundation/config/theme-build-header.mjs +14 -0
- package/foundation/config/theme-private-vars.d.mts +26 -2
- package/foundation/config/theme-private-vars.mjs +65 -5
- package/foundation/config/theme-state.d.mts +19 -2
- package/foundation/config/theme-state.mjs +93 -1
- package/foundation/debug/event.d.mts +8 -2
- package/foundation/debug/event.mjs +6 -7
- package/foundation/debug/recorder.d.mts +8 -1
- package/foundation/debug/recorder.mjs +8 -2
- package/foundation/discovery/cli-self-doc-names.d.mts +13 -0
- package/foundation/discovery/cli-self-doc-names.mjs +51 -0
- package/foundation/discovery/cli-self-docs.d.mts +0 -2
- package/foundation/discovery/cli-self-docs.mjs +11 -16
- 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 +12 -6
- package/foundation/discovery/core-component-docs.d.mts +29 -0
- package/foundation/discovery/core-component-docs.mjs +83 -0
- package/foundation/discovery/core-theme-facts.d.mts +70 -0
- package/foundation/discovery/core-theme-facts.mjs +384 -0
- package/foundation/discovery/docs-discovery.d.mts +84 -9
- package/foundation/discovery/docs-discovery.mjs +151 -60
- package/foundation/discovery/entry-name-files.d.mts +72 -9
- package/foundation/discovery/entry-name-files.mjs +193 -103
- package/foundation/discovery/hook-discovery.d.mts +16 -6
- package/foundation/discovery/hook-discovery.mjs +82 -43
- package/foundation/discovery/integration-component-views.d.mts +15 -0
- package/foundation/discovery/integration-component-views.mjs +91 -0
- package/foundation/discovery/module-exports.d.mts +26 -1
- package/foundation/discovery/module-exports.mjs +114 -40
- package/foundation/discovery/name-roots.d.mts +38 -0
- package/foundation/discovery/name-roots.mjs +108 -0
- package/foundation/discovery/next-routes.d.mts +48 -0
- package/foundation/discovery/next-routes.mjs +197 -0
- package/foundation/discovery/stored-self-audit.mjs +2 -0
- package/foundation/discovery/template-adapter.d.mts +31 -63
- package/foundation/discovery/template-adapter.mjs +38 -207
- package/foundation/discovery/template-destination.d.mts +28 -0
- package/foundation/discovery/template-destination.mjs +106 -0
- package/foundation/discovery/template-ids.d.mts +69 -0
- package/foundation/discovery/template-ids.mjs +203 -0
- package/foundation/discovery/template-needs.mjs +3 -1
- package/foundation/discovery/theme-discovery.d.mts +12 -0
- package/foundation/discovery/theme-discovery.mjs +34 -2
- package/foundation/discovery/theme-imports.d.mts +10 -0
- package/foundation/discovery/theme-imports.mjs +37 -4
- package/foundation/discovery/theming-targets.d.mts +13 -5
- package/foundation/discovery/theming-targets.mjs +38 -45
- package/foundation/doc-compiler/generated-levels.d.mts +43 -0
- package/foundation/doc-compiler/generated-levels.mjs +72 -0
- package/foundation/doc-compiler/literal-doc.d.mts +12 -0
- package/foundation/doc-compiler/literal-doc.mjs +322 -0
- package/foundation/doc-compiler/stored-docs.d.mts +7 -0
- package/foundation/doc-compiler/stored-docs.mjs +14 -1
- package/foundation/doc-compiler/tree.d.mts +18 -87
- package/foundation/doc-compiler/tree.mjs +57 -64
- package/foundation/env/intl-defaults.d.mts +39 -0
- package/foundation/env/intl-defaults.mjs +150 -0
- package/foundation/env/intl-now.d.mts +21 -0
- package/foundation/env/intl-now.mjs +25 -0
- package/foundation/env/package-manager.d.mts +11 -2
- package/foundation/env/package-manager.mjs +28 -4
- package/foundation/fonts/font-stylesheet.d.mts +38 -0
- package/foundation/fonts/font-stylesheet.mjs +128 -12
- package/foundation/fs/cache-eviction.d.mts +3 -1
- package/foundation/fs/cache-eviction.mjs +7 -1
- package/foundation/fs/exact-codec.d.mts +12 -2
- package/foundation/fs/exact-codec.mjs +23 -6
- package/foundation/fs/file-protection.mjs +12 -2
- package/foundation/fs/gather-cache.d.mts +81 -2
- package/foundation/fs/gather-cache.mjs +615 -97
- package/foundation/fs/glob.d.mts +16 -0
- package/foundation/fs/glob.mjs +105 -0
- package/foundation/fs/jiti-cache.mjs +14 -6
- package/foundation/fs/kept-tree.d.mts +39 -15
- package/foundation/fs/kept-tree.mjs +155 -46
- package/foundation/fs/loaded-files.d.mts +30 -0
- package/foundation/fs/loaded-files.mjs +148 -0
- package/foundation/fs/module-loader.d.mts +53 -8
- package/foundation/fs/module-loader.mjs +559 -39
- package/foundation/fs/own-modules.d.mts +29 -0
- package/foundation/fs/own-modules.mjs +57 -0
- package/foundation/fs/path-safety.d.mts +34 -2
- package/foundation/fs/path-safety.mjs +170 -18
- package/foundation/fs/paths.d.mts +41 -2
- package/foundation/fs/paths.mjs +95 -5
- package/foundation/fs/read-record.d.mts +84 -7
- package/foundation/fs/read-record.mjs +333 -56
- package/foundation/fs/regular-file.d.mts +29 -0
- package/foundation/fs/regular-file.mjs +77 -0
- package/foundation/fs/stop-cleanup.d.mts +12 -0
- package/foundation/fs/stop-cleanup.mjs +66 -0
- package/foundation/fs/stylesheet-file.d.mts +37 -0
- package/foundation/fs/stylesheet-file.mjs +48 -0
- package/foundation/fs/theme-module-rejections.d.mts +32 -0
- package/foundation/fs/theme-module-rejections.mjs +82 -0
- package/foundation/integrations/integrations.d.mts +27 -1
- package/foundation/integrations/integrations.mjs +24 -2
- package/foundation/integrations/pack-state.d.mts +85 -0
- package/foundation/integrations/pack-state.mjs +509 -0
- package/foundation/integrations/shipped-imports.d.mts +125 -0
- package/foundation/integrations/shipped-imports.mjs +530 -0
- package/foundation/integrations/validate-contributions.d.mts +0 -17
- package/foundation/integrations/validate-contributions.mjs +81 -290
- package/foundation/release/choose.d.mts +7 -0
- package/foundation/release/choose.mjs +16 -2
- package/foundation/release/handoff.mjs +68 -13
- package/foundation/release/notices.d.mts +46 -9
- package/foundation/release/notices.mjs +78 -20
- package/foundation/release/pnp-runtime.d.mts +66 -0
- package/foundation/release/pnp-runtime.mjs +139 -0
- package/foundation/release/project.d.mts +11 -0
- package/foundation/release/project.mjs +23 -7
- package/foundation/release/run-context.d.mts +7 -2
- package/foundation/release/run-context.mjs +6 -2
- package/foundation/render/assets.mjs +52 -7
- package/foundation/render/charts.d.mts +78 -27
- package/foundation/render/charts.mjs +319 -90
- package/foundation/render/css-cut.d.mts +14 -1
- package/foundation/render/css-cut.mjs +117 -4
- package/foundation/render/cut-short.d.mts +35 -0
- package/foundation/render/cut-short.mjs +124 -0
- package/foundation/render/embedded-imports.d.mts +31 -0
- package/foundation/render/embedded-imports.mjs +169 -39
- package/foundation/render/font-probe.d.mts +27 -0
- package/foundation/render/font-probe.mjs +77 -0
- package/foundation/render/layers.d.mts +49 -0
- package/foundation/render/layers.mjs +347 -0
- package/foundation/render/offline.d.mts +32 -0
- package/foundation/render/offline.mjs +56 -0
- package/foundation/render/page-worker.mjs +374 -15
- package/foundation/render/picture-chrome.mjs +46 -4
- package/foundation/render/picture-playwright.mjs +41 -5
- package/foundation/render/picture-window.d.mts +32 -0
- package/foundation/render/picture-window.mjs +146 -0
- package/foundation/render/render-page.d.mts +46 -4
- package/foundation/render/render-page.mjs +453 -98
- 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 +12 -12
- package/foundation/runtime/css-tree.d.mts +24 -0
- package/foundation/runtime/css-tree.mjs +103 -0
- package/foundation/runtime/lazy-dependencies.d.mts +3 -1
- package/foundation/runtime/lazy-dependencies.mjs +20 -5
- package/foundation/suggest/name-index.d.mts +149 -0
- package/foundation/suggest/name-index.mjs +317 -0
- package/foundation/suggest/other-command.d.mts +146 -0
- package/foundation/suggest/other-command.mjs +783 -0
- package/foundation/text/css-escape.d.mts +18 -0
- package/foundation/text/css-escape.mjs +35 -0
- package/foundation/text/entry-names.d.mts +14 -0
- package/foundation/text/entry-names.mjs +14 -0
- package/foundation/text/string-utils.d.mts +49 -5
- package/foundation/text/string-utils.mjs +124 -26
- package/foundation/text/suggest-order.d.mts +75 -4
- package/foundation/text/suggest-order.mjs +285 -9
- package/foundation/text/written-string.d.mts +17 -0
- package/foundation/text/written-string.mjs +22 -0
- package/foundation/xle/browser.d.mts +2 -2
- package/package.json +8 -7
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
* (`ownWords`), so a new template can start a build.
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
|
+
import {readNames} from './words.mjs';
|
|
24
25
|
import {STOPWORDS} from '../../search/search.mjs';
|
|
25
26
|
import {keywordUnits, keywordWordsFor} from './words.mjs';
|
|
26
27
|
import {isWordModel} from './word-model.mjs';
|
|
@@ -165,10 +166,11 @@ export function weightWords(idea) {
|
|
|
165
166
|
* @property {WeightTable[]} tables
|
|
166
167
|
* @property {number[]} blend three numbers per member (the tables, in order,
|
|
167
168
|
* with the ranker second), then one for `SHELL`
|
|
168
|
-
* @property {{tables
|
|
169
|
-
* model: its own
|
|
170
|
-
*
|
|
171
|
-
*
|
|
169
|
+
* @property {{tables?: WeightTable[], blend: number[]}} [pick] the pick
|
|
170
|
+
* model: its own blend numbers, used only to choose which page starts once
|
|
171
|
+
* the call model (the top-level tables and blend) has called a page. It
|
|
172
|
+
* reads the top-level tables unless it carries its own. Without it, one
|
|
173
|
+
* model does both.
|
|
172
174
|
*/
|
|
173
175
|
|
|
174
176
|
/**
|
|
@@ -177,19 +179,27 @@ export function weightWords(idea) {
|
|
|
177
179
|
* @param {WeightsFile} weights
|
|
178
180
|
* @returns {boolean}
|
|
179
181
|
*/
|
|
180
|
-
const hasPickModel = weights =>
|
|
181
|
-
|
|
182
|
+
const hasPickModel = weights => {
|
|
183
|
+
const pick = weights.pick;
|
|
184
|
+
return (
|
|
185
|
+
pick != null &&
|
|
186
|
+
isWordModel(
|
|
187
|
+
{...pick, tables: pick.tables ?? weights.tables},
|
|
188
|
+
weights.candidates.length,
|
|
189
|
+
)
|
|
190
|
+
);
|
|
191
|
+
};
|
|
182
192
|
|
|
183
193
|
/**
|
|
184
|
-
* The pick model of a weights file: its `pick`
|
|
185
|
-
* else the file's own.
|
|
194
|
+
* The pick model of a weights file: its `pick` blend, over its own tables or
|
|
195
|
+
* else the top-level ones, when present; else the file's own model.
|
|
186
196
|
* @param {WeightsFile} weights
|
|
187
197
|
* @returns {WeightsFile}
|
|
188
198
|
*/
|
|
189
199
|
const pickModel = weights => {
|
|
190
200
|
const pick = weights.pick;
|
|
191
201
|
return pick && hasPickModel(weights)
|
|
192
|
-
? {...weights, tables: pick.tables, blend: pick.blend}
|
|
202
|
+
? {...weights, tables: pick.tables ?? weights.tables, blend: pick.blend}
|
|
193
203
|
: weights;
|
|
194
204
|
};
|
|
195
205
|
|
|
@@ -376,7 +386,9 @@ function blend(idea, ranked, pick, catalog, weights) {
|
|
|
376
386
|
.filter(n => !shellIds.has(n) && !weights.candidates.includes(n));
|
|
377
387
|
const cands = [...listed, ...extra];
|
|
378
388
|
const position = new Map(weights.candidates.map((c, i) => [c, i]));
|
|
379
|
-
|
|
389
|
+
// A template named in any case, separator or with a neighbour-letter swap in a word of six or more letters
|
|
390
|
+
// reads as its id's words, as the page ranker reads it (readNames).
|
|
391
|
+
const words = new Set(weightWords(readNames(idea, catalog)).map(stem));
|
|
380
392
|
/** @type {(number | undefined)[][]} */
|
|
381
393
|
const members = weights.tables.map(table => {
|
|
382
394
|
const index = new Map(table.words.map((w, i) => [w, i]));
|
|
@@ -621,6 +633,39 @@ function pickOrder(idea, ranked, pick, catalog, weights) {
|
|
|
621
633
|
return out;
|
|
622
634
|
}
|
|
623
635
|
|
|
636
|
+
/**
|
|
637
|
+
* The pick model's probability for a page template among the ready, non-shell
|
|
638
|
+
* templates: a softmax over the pick model's scores. It says how clearly the
|
|
639
|
+
* pick model prefers that template over the others, not whether the template
|
|
640
|
+
* is right. Null without weights or for a template the word tables do not
|
|
641
|
+
* list.
|
|
642
|
+
* @param {string} name
|
|
643
|
+
* @param {string} idea
|
|
644
|
+
* @param {import('./rank.mjs').RankedPage[]} ranked
|
|
645
|
+
* @param {import('./rank.mjs').RankedPage | null} pick
|
|
646
|
+
* @param {DescribedTemplate[]} catalog
|
|
647
|
+
* @param {WeightsFile | null} weights
|
|
648
|
+
* @returns {number | null}
|
|
649
|
+
*/
|
|
650
|
+
export function pickFit(name, idea, ranked, pick, catalog, weights) {
|
|
651
|
+
if (!weights) return null;
|
|
652
|
+
const {cands, scores, position} = blend(
|
|
653
|
+
readNames(idea, catalog),
|
|
654
|
+
ranked,
|
|
655
|
+
pick,
|
|
656
|
+
catalog,
|
|
657
|
+
pickModel(weights),
|
|
658
|
+
);
|
|
659
|
+
// The tables cannot judge a template they do not list, so it has no fit.
|
|
660
|
+
if (!position.has(name)) return null;
|
|
661
|
+
const pages = cands.flatMap((c, i) => (c === SHELL ? [] : [scores[i]]));
|
|
662
|
+
const at = cands.filter(c => c !== SHELL).indexOf(name);
|
|
663
|
+
if (at < 0) return null;
|
|
664
|
+
const top = Math.max(...pages);
|
|
665
|
+
const sum = pages.reduce((t, s) => t + Math.exp(s - top), 0);
|
|
666
|
+
return round4(Math.exp(pages[at] - top) / sum);
|
|
667
|
+
}
|
|
668
|
+
|
|
624
669
|
/**
|
|
625
670
|
* Every ready, non-shell template in the blend's own order, best first: the
|
|
626
671
|
* order the page start is chosen from, so the alternatives build names beside
|
|
@@ -634,7 +679,7 @@ function pickOrder(idea, ranked, pick, catalog, weights) {
|
|
|
634
679
|
*/
|
|
635
680
|
export function blendOrder(idea, ranked, pick, catalog, weights) {
|
|
636
681
|
if (!weights) return null;
|
|
637
|
-
return pickOrder(idea, ranked, pick, catalog, weights);
|
|
682
|
+
return pickOrder(readNames(idea, catalog), ranked, pick, catalog, weights);
|
|
638
683
|
}
|
|
639
684
|
|
|
640
685
|
/**
|
|
@@ -656,7 +701,11 @@ export function weighStart(
|
|
|
656
701
|
{weights = null, newPage = false} = {},
|
|
657
702
|
) {
|
|
658
703
|
if (!weights) return undefined;
|
|
659
|
-
|
|
704
|
+
// Every reader below sees a template the idea names in any case, separator
|
|
705
|
+
// or with a neighbour-letter swap in a word of six or more letters as that template's own words
|
|
706
|
+
// (readNames).
|
|
707
|
+
const read = readNames(idea, catalog);
|
|
708
|
+
const {cands, scores, position} = blend(read, ranked, pick, catalog, weights);
|
|
660
709
|
/** @param {(c: string) => boolean} ok */
|
|
661
710
|
const best = ok => {
|
|
662
711
|
let at = -1;
|
|
@@ -679,13 +728,13 @@ export function weighStart(
|
|
|
679
728
|
// and nearly as many; otherwise that listed template starts. Nothing learned about the template is involved,
|
|
680
729
|
// so a new template competes on its own words.
|
|
681
730
|
if (kept && !position.has(kept)) {
|
|
682
|
-
const listed = bestPage(
|
|
731
|
+
const listed = bestPage(read, ranked, pick, catalog, weights, c =>
|
|
683
732
|
position.has(c),
|
|
684
733
|
);
|
|
685
734
|
if (!listed) return kept;
|
|
686
735
|
// The idea's own words, less search's stopwords: "basically" must not
|
|
687
736
|
// answer the "Basic" of a category.
|
|
688
|
-
const order = contentWords(
|
|
737
|
+
const order = contentWords(read);
|
|
689
738
|
const mine = ownWords(kept, catalog, order);
|
|
690
739
|
const theirs = ownWords(listed, catalog, order);
|
|
691
740
|
// An idea that names the template's family before the listed one's
|
|
@@ -702,11 +751,11 @@ export function weighStart(
|
|
|
702
751
|
// whose own descriptor best matches the idea starts (`fullerOfTie`), then
|
|
703
752
|
// the one most typical of the family. Only the templates' descriptors
|
|
704
753
|
// decide this tie, never the tables.
|
|
705
|
-
return fullerOfTie(kept,
|
|
754
|
+
return fullerOfTie(kept, read, ranked, cands, catalog);
|
|
706
755
|
}
|
|
707
756
|
const top = best(() => true);
|
|
708
757
|
if (top !== SHELL)
|
|
709
|
-
return bestPage(
|
|
758
|
+
return bestPage(read, ranked, pick, catalog, weights) ?? top;
|
|
710
759
|
// An idea that asks for a new page keeps the ranker's template rather than
|
|
711
760
|
// the shell.
|
|
712
761
|
if (newPage && kept) return kept;
|
|
@@ -725,7 +774,8 @@ export function weighStart(
|
|
|
725
774
|
*/
|
|
726
775
|
export function blendSummary(idea, ranked, pick, catalog, weights) {
|
|
727
776
|
if (!weights) return null;
|
|
728
|
-
const
|
|
777
|
+
const read = readNames(idea, catalog);
|
|
778
|
+
const {cands, scores} = blend(read, ranked, pick, catalog, weights);
|
|
729
779
|
let shell = 0;
|
|
730
780
|
const rest = [];
|
|
731
781
|
for (let i = 0; i < cands.length; i++) {
|
|
@@ -736,7 +786,7 @@ export function blendSummary(idea, ranked, pick, catalog, weights) {
|
|
|
736
786
|
return {
|
|
737
787
|
shell,
|
|
738
788
|
best: hasPickModel(weights)
|
|
739
|
-
? bestPage(
|
|
789
|
+
? bestPage(read, ranked, pick, catalog, weights)
|
|
740
790
|
: (rest[0]?.name ?? null),
|
|
741
791
|
bestScore: rest[0]?.score ?? 0,
|
|
742
792
|
secondScore: rest[1]?.score ?? 0,
|
|
@@ -45,12 +45,16 @@ export function keywordUnits(keywords: readonly string[], read: (text: string) =
|
|
|
45
45
|
/**
|
|
46
46
|
* The phrase units (two or more words) a request names: the unit's words
|
|
47
47
|
* appear next to each other, in order, in the request's words as the same
|
|
48
|
-
* reader reads them.
|
|
48
|
+
* reader reads them. With `oneWord`, a one-word unit the request names counts
|
|
49
|
+
* too.
|
|
49
50
|
* @param {readonly string[]} words the request's words, in order
|
|
50
51
|
* @param {Iterable<string>} units
|
|
52
|
+
* @param {{oneWord?: boolean}} [options]
|
|
51
53
|
* @returns {Set<string>}
|
|
52
54
|
*/
|
|
53
|
-
export function phrasesIn(words: readonly string[], units: Iterable<string
|
|
55
|
+
export function phrasesIn(words: readonly string[], units: Iterable<string>, { oneWord }?: {
|
|
56
|
+
oneWord?: boolean;
|
|
57
|
+
}): Set<string>;
|
|
54
58
|
/**
|
|
55
59
|
* The words a template's keyword units give an idea: each one-word keyword,
|
|
56
60
|
* and every word of each phrase keyword the idea names (`phrasesIn`). A named
|
|
@@ -71,6 +75,29 @@ export function keywordWordsFor(units: readonly string[], words: readonly string
|
|
|
71
75
|
* @returns {Map<string, Set<string>>} frame term -> terms it holds
|
|
72
76
|
*/
|
|
73
77
|
export function framesOf(query: string): Map<string, Set<string>>;
|
|
78
|
+
/**
|
|
79
|
+
* The parts of a page template that its name and descriptor words come from.
|
|
80
|
+
* @typedef {object} NamedTemplate
|
|
81
|
+
* @property {string} name
|
|
82
|
+
* @property {string} [displayName]
|
|
83
|
+
* @property {string} [category]
|
|
84
|
+
* @property {string[]} [keywords]
|
|
85
|
+
* @property {string} [description]
|
|
86
|
+
*/
|
|
87
|
+
/**
|
|
88
|
+
* An idea with every run of its words that names a page template written as
|
|
89
|
+
* that template's own words: "a KanbanBoard page", "a kanban-board page" and
|
|
90
|
+
* "a kanabn board page" read as the template id's words. Only a whole name
|
|
91
|
+
* counts (matchWholeName), a run never crosses punctuation, and the only slip
|
|
92
|
+
* read is a swap of two neighbouring letters in a word of six or more letters
|
|
93
|
+
* that the templates' own descriptors never use, so a real word ("pane",
|
|
94
|
+
* "seating") is never respelled into a name. A run already written as the
|
|
95
|
+
* name's words is left as it is.
|
|
96
|
+
* @param {string} idea
|
|
97
|
+
* @param {NamedTemplate[]} pages the project's page templates
|
|
98
|
+
* @returns {string}
|
|
99
|
+
*/
|
|
100
|
+
export function readNames(idea: string, pages: NamedTemplate[]): string;
|
|
74
101
|
/**
|
|
75
102
|
* Family words, from the templates' own ids: a word in the ids of two or more
|
|
76
103
|
* templates of one family, plus the family's name when a template carries it.
|
|
@@ -88,6 +115,10 @@ export const HEAD_END: RegExp;
|
|
|
88
115
|
* explicit `Shell -` category (architecture:template-authoring/INV7).
|
|
89
116
|
*/
|
|
90
117
|
export const SHELL_FAMILY: "Shell";
|
|
118
|
+
export function isAppShell(page: {
|
|
119
|
+
family: string;
|
|
120
|
+
hidden?: boolean;
|
|
121
|
+
} | null | undefined): boolean;
|
|
91
122
|
/** A container phrase: "in a modal", "inside the side panel". */
|
|
92
123
|
export const CONTAINER_PHRASE: RegExp;
|
|
93
124
|
/**
|
|
@@ -104,6 +135,16 @@ export const PHRASE_END: RegExp;
|
|
|
104
135
|
export function normalized(text: string): string;
|
|
105
136
|
/** Stemmed synonym lookup built from search's vocabulary, both directions. */
|
|
106
137
|
export const SYNONYMS_OF: Map<string, Set<string>>;
|
|
138
|
+
/**
|
|
139
|
+
* The parts of a page template that its name and descriptor words come from.
|
|
140
|
+
*/
|
|
141
|
+
export type NamedTemplate = {
|
|
142
|
+
name: string;
|
|
143
|
+
displayName?: string | undefined;
|
|
144
|
+
category?: string | undefined;
|
|
145
|
+
keywords?: string[] | undefined;
|
|
146
|
+
description?: string | undefined;
|
|
147
|
+
};
|
|
107
148
|
export type PageTemplate = import("../_adapter.mjs").PageTemplate;
|
|
108
149
|
export type ComponentWords = import("../_adapter.mjs").ComponentWords;
|
|
109
150
|
export type RankedPage = {
|
|
@@ -117,5 +158,6 @@ export type RankedPage = {
|
|
|
117
158
|
base: boolean;
|
|
118
159
|
matched: Set<string>;
|
|
119
160
|
typical: number;
|
|
161
|
+
hidden: boolean;
|
|
120
162
|
};
|
|
121
163
|
export type IdeaKind = "page" | "part" | "edit";
|
package/api/build/kit/words.mjs
CHANGED
|
@@ -12,6 +12,10 @@
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
import {stem, STOPWORDS, SYNONYMS} from '../../search/search.mjs';
|
|
15
|
+
import {
|
|
16
|
+
matchWholeName,
|
|
17
|
+
nameWords as foldWords,
|
|
18
|
+
} from '../../../foundation/text/suggest-order.mjs';
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
21
|
* Words search drops that name layout: "side navigation", "side by side".
|
|
@@ -43,6 +47,14 @@ const OVERLAY_FRAMES = new Set([
|
|
|
43
47
|
*/
|
|
44
48
|
export const SHELL_FAMILY = 'Shell';
|
|
45
49
|
|
|
50
|
+
/**
|
|
51
|
+
* Whether a ranked template can be the app shell: a template of the Shell
|
|
52
|
+
* family that is not kept off the gallery. A hidden template is no starter.
|
|
53
|
+
* @param {{family: string, hidden?: boolean} | null | undefined} page
|
|
54
|
+
*/
|
|
55
|
+
export const isAppShell = page =>
|
|
56
|
+
page?.family === SHELL_FAMILY && page.hidden !== true;
|
|
57
|
+
|
|
46
58
|
/** A container phrase: "in a modal", "inside the side panel". */
|
|
47
59
|
export const CONTAINER_PHRASE =
|
|
48
60
|
/\b(?:in|inside|within)\s+(?:a|an|the)\s+([a-z-]+)(?:\s+([a-z-]+))?/gi;
|
|
@@ -156,16 +168,20 @@ export function keywordUnits(keywords, read) {
|
|
|
156
168
|
/**
|
|
157
169
|
* The phrase units (two or more words) a request names: the unit's words
|
|
158
170
|
* appear next to each other, in order, in the request's words as the same
|
|
159
|
-
* reader reads them.
|
|
171
|
+
* reader reads them. With `oneWord`, a one-word unit the request names counts
|
|
172
|
+
* too.
|
|
160
173
|
* @param {readonly string[]} words the request's words, in order
|
|
161
174
|
* @param {Iterable<string>} units
|
|
175
|
+
* @param {{oneWord?: boolean}} [options]
|
|
162
176
|
* @returns {Set<string>}
|
|
163
177
|
*/
|
|
164
|
-
export function phrasesIn(words, units) {
|
|
178
|
+
export function phrasesIn(words, units, {oneWord = false} = {}) {
|
|
165
179
|
const text = ` ${words.join(' ')} `;
|
|
166
180
|
const found = new Set();
|
|
167
181
|
for (const unit of units) {
|
|
168
|
-
if (unit.includes(' ') && text.includes(` ${unit} `))
|
|
182
|
+
if ((oneWord || unit.includes(' ')) && text.includes(` ${unit} `)) {
|
|
183
|
+
found.add(unit);
|
|
184
|
+
}
|
|
169
185
|
}
|
|
170
186
|
return found;
|
|
171
187
|
}
|
|
@@ -219,6 +235,145 @@ export function framesOf(query) {
|
|
|
219
235
|
return held;
|
|
220
236
|
}
|
|
221
237
|
|
|
238
|
+
/**
|
|
239
|
+
* The parts of a page template that its name and descriptor words come from.
|
|
240
|
+
* @typedef {object} NamedTemplate
|
|
241
|
+
* @property {string} name
|
|
242
|
+
* @property {string} [displayName]
|
|
243
|
+
* @property {string} [category]
|
|
244
|
+
* @property {string[]} [keywords]
|
|
245
|
+
* @property {string} [description]
|
|
246
|
+
*/
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* An idea with every run of its words that names a page template written as
|
|
250
|
+
* that template's own words: "a KanbanBoard page", "a kanban-board page" and
|
|
251
|
+
* "a kanabn board page" read as the template id's words. Only a whole name
|
|
252
|
+
* counts (matchWholeName), a run never crosses punctuation, and the only slip
|
|
253
|
+
* read is a swap of two neighbouring letters in a word of six or more letters
|
|
254
|
+
* that the templates' own descriptors never use, so a real word ("pane",
|
|
255
|
+
* "seating") is never respelled into a name. A run already written as the
|
|
256
|
+
* name's words is left as it is.
|
|
257
|
+
* @param {string} idea
|
|
258
|
+
* @param {NamedTemplate[]} pages the project's page templates
|
|
259
|
+
* @returns {string}
|
|
260
|
+
*/
|
|
261
|
+
export function readNames(idea, pages) {
|
|
262
|
+
const text = String(idea ?? '');
|
|
263
|
+
const names = pages.map(p => p.name);
|
|
264
|
+
const known = descriptorWordsOf(pages);
|
|
265
|
+
const tokens = [...text.matchAll(/[A-Za-z0-9]+(?:[-_][A-Za-z0-9]+)*/g)];
|
|
266
|
+
const longest = Math.max(1, ...names.map(n => n.split('-').length));
|
|
267
|
+
const plain = (/** @type {string} */ s) =>
|
|
268
|
+
s
|
|
269
|
+
.toLowerCase()
|
|
270
|
+
.split(/[^a-z0-9]+/)
|
|
271
|
+
.filter(Boolean);
|
|
272
|
+
let out = '';
|
|
273
|
+
let at = 0;
|
|
274
|
+
for (let i = 0; i < tokens.length;) {
|
|
275
|
+
let matched = 0;
|
|
276
|
+
let name = null;
|
|
277
|
+
for (let n = Math.min(longest, tokens.length - i); n >= 1 && !name; n--) {
|
|
278
|
+
const run = tokens.slice(i, i + n);
|
|
279
|
+
const gaps = run.slice(1).every((t, k) => {
|
|
280
|
+
const prev = run[k];
|
|
281
|
+
return /^\s+$/.test(text.slice(prev.index + prev[0].length, t.index));
|
|
282
|
+
});
|
|
283
|
+
if (!gaps) continue;
|
|
284
|
+
const typed = run.map(t => t[0]).join(' ');
|
|
285
|
+
const found = matchWholeName(typed, names);
|
|
286
|
+
if (!found) continue;
|
|
287
|
+
const nameWords = found.split('-');
|
|
288
|
+
const words = plain(typed);
|
|
289
|
+
const sameWords =
|
|
290
|
+
words.length === nameWords.length &&
|
|
291
|
+
foldWords(typed).join('') === foldWords(found).join('');
|
|
292
|
+
if (sameWords) continue;
|
|
293
|
+
const slipped = words.filter(w => !nameWords.includes(w));
|
|
294
|
+
const joined = words.length < nameWords.length;
|
|
295
|
+
if (!joined && slipped.some(w => known.has(stem(w)))) continue;
|
|
296
|
+
const typedFold = foldWords(typed).join('');
|
|
297
|
+
const nameFold = foldWords(found).join('');
|
|
298
|
+
if (
|
|
299
|
+
typedFold !== nameFold &&
|
|
300
|
+
(!swapsTwo(typedFold, nameFold) ||
|
|
301
|
+
slipped.some(w => w.length < SLIP_MIN_LENGTH))
|
|
302
|
+
) {
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
name = found;
|
|
306
|
+
matched = n;
|
|
307
|
+
}
|
|
308
|
+
if (!name) {
|
|
309
|
+
i++;
|
|
310
|
+
continue;
|
|
311
|
+
}
|
|
312
|
+
const first = tokens[i];
|
|
313
|
+
const last = tokens[i + matched - 1];
|
|
314
|
+
out += text.slice(at, first.index) + name.split('-').join(' ');
|
|
315
|
+
at = /** @type {number} */ (last.index) + last[0].length;
|
|
316
|
+
i += matched;
|
|
317
|
+
}
|
|
318
|
+
return out + text.slice(at);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* The fewest letters a slipped word has before it can be read as a name:
|
|
323
|
+
* shorter words are too often other real words one slip away.
|
|
324
|
+
*/
|
|
325
|
+
const SLIP_MIN_LENGTH = 6;
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Whether a typed name is a name with two neighbouring letters swapped. A
|
|
329
|
+
* name takes only this slip: a dropped, changed or added letter turns many
|
|
330
|
+
* everyday words ("seating", "retail", "galley") into a template name.
|
|
331
|
+
* @param {string} typed
|
|
332
|
+
* @param {string} name
|
|
333
|
+
* @returns {boolean}
|
|
334
|
+
*/
|
|
335
|
+
function swapsTwo(typed, name) {
|
|
336
|
+
if (typed.length !== name.length) return false;
|
|
337
|
+
const diff = [...typed].flatMap((c, i) => (c === name[i] ? [] : [i]));
|
|
338
|
+
return (
|
|
339
|
+
diff.length === 2 &&
|
|
340
|
+
diff[1] === diff[0] + 1 &&
|
|
341
|
+
typed[diff[0]] === name[diff[1]] &&
|
|
342
|
+
typed[diff[1]] === name[diff[0]]
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/** @type {WeakMap<object, Set<string>>} */
|
|
347
|
+
const descriptorWordCache = new WeakMap();
|
|
348
|
+
|
|
349
|
+
/**
|
|
350
|
+
* Every stemmed word the page templates' own descriptors use: ids, display
|
|
351
|
+
* names, categories, keywords and descriptions.
|
|
352
|
+
* @param {NamedTemplate[]} pages
|
|
353
|
+
* @returns {Set<string>}
|
|
354
|
+
*/
|
|
355
|
+
function descriptorWordsOf(pages) {
|
|
356
|
+
let set = descriptorWordCache.get(pages);
|
|
357
|
+
if (!set) {
|
|
358
|
+
set = new Set();
|
|
359
|
+
for (const p of pages) {
|
|
360
|
+
const text = [
|
|
361
|
+
p.name,
|
|
362
|
+
p.displayName,
|
|
363
|
+
p.category,
|
|
364
|
+
...(p.keywords ?? []),
|
|
365
|
+
p.description,
|
|
366
|
+
].join(' ');
|
|
367
|
+
for (const w of String(text)
|
|
368
|
+
.toLowerCase()
|
|
369
|
+
.match(/[a-z0-9]+/g) ?? [])
|
|
370
|
+
set.add(stem(w));
|
|
371
|
+
}
|
|
372
|
+
descriptorWordCache.set(pages, set);
|
|
373
|
+
}
|
|
374
|
+
return set;
|
|
375
|
+
}
|
|
376
|
+
|
|
222
377
|
/** @param {string} text */
|
|
223
378
|
export const normalized = text =>
|
|
224
379
|
(
|
|
@@ -252,7 +407,7 @@ export const SYNONYMS_OF = (() => {
|
|
|
252
407
|
/**
|
|
253
408
|
* @typedef {import('../_adapter.mjs').PageTemplate} PageTemplate
|
|
254
409
|
* @typedef {import('../_adapter.mjs').ComponentWords} ComponentWords
|
|
255
|
-
* @typedef {{name: string, score: number, hits: number, familyNamed: boolean, headNamed: boolean, containerMatched: boolean, family: string, base: boolean, matched: Set<string>, typical: number}} RankedPage
|
|
410
|
+
* @typedef {{name: string, score: number, hits: number, familyNamed: boolean, headNamed: boolean, containerMatched: boolean, family: string, base: boolean, matched: Set<string>, typical: number, hidden: boolean}} RankedPage
|
|
256
411
|
* @typedef {'page' | 'part' | 'edit'} IdeaKind
|
|
257
412
|
*/
|
|
258
413
|
|
package/api/build/tree.mjs
CHANGED
|
@@ -183,7 +183,7 @@ onMediaTokens onMediaTokens theme/MediaTheme.doc.mjs theme/onMediaTokens.ts
|
|
|
183
183
|
optionShape optionShape Selector/Selector.doc.mjs Selector/optionShape.ts
|
|
184
184
|
outsidePress outsidePress Layer/Layer.doc.mjs Layer/outsidePress.ts
|
|
185
185
|
paginateData paginateData Table/Table.doc.mjs Table/plugins/pagination/paginateData.ts
|
|
186
|
-
paging
|
|
186
|
+
paging ERR_UNKNOWN_COMPONENT - motion/paging.ts
|
|
187
187
|
parseOutlineFromMarkdown parseOutlineFromMarkdown Outline/Outline.doc.mjs Outline/parseOutlineFromMarkdown.ts
|
|
188
188
|
parser parser Markdown/Markdown.doc.mjs Markdown/parser.ts
|
|
189
189
|
popoverOperations popoverOperations Layer/Layer.doc.mjs Layer/popoverOperations.ts
|
|
@@ -233,7 +233,7 @@ tokenReferences tokenReferences theme/MediaTheme.doc.mjs theme/tokenReferences.t
|
|
|
233
233
|
tokens tokens theme/MediaTheme.doc.mjs theme/tokens.ts
|
|
234
234
|
toml toml CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/toml.ts
|
|
235
235
|
tooltipEntries tooltipEntries Timestamp/Timestamp.doc.mjs Timestamp/tooltipEntries.ts
|
|
236
|
-
touch
|
|
236
|
+
touch ERR_UNKNOWN_COMPONENT - internal/touch.ts
|
|
237
237
|
trailingKeyDown trailingKeyDown Typeahead/BaseTypeahead.doc.mjs Typeahead/trailingKeyDown.tsx
|
|
238
238
|
translator translator i18n/InternationalizationProvider.doc.mjs i18n/translator.ts
|
|
239
239
|
types types Field/Field.doc.mjs Field/types.ts
|
|
@@ -252,7 +252,7 @@ useCalendarNavigation useCalendarNavigation Calendar/useCalendarNavigation.doc.m
|
|
|
252
252
|
useChatComposerTokens useChatComposerTokens Chat/Chat.doc.mjs Chat/useChatComposerTokens.ts
|
|
253
253
|
useChatDictation useChatDictation Chat/useChatDictation.doc.mjs Chat/useChatDictation.ts
|
|
254
254
|
useChatNewMessages useChatNewMessages Chat/Chat.doc.mjs Chat/useChatNewMessages.ts
|
|
255
|
-
useChatPasteAsToken useChatPasteAsToken Chat/
|
|
255
|
+
useChatPasteAsToken useChatPasteAsToken Chat/useChatPasteAsToken.doc.mjs Chat/useChatPasteAsToken.ts
|
|
256
256
|
useChatStreamScroll useChatStreamScroll Chat/Chat.doc.mjs Chat/useChatStreamScroll.ts
|
|
257
257
|
useCloseMobileDrawerOnActivate useCloseMobileDrawerOnActivate AppShell/AppShell.doc.mjs AppShell/useCloseMobileDrawerOnActivate.ts
|
|
258
258
|
useComponentTranslator useComponentTranslator i18n/InternationalizationProvider.doc.mjs i18n/useComponentTranslator.ts
|
|
@@ -293,7 +293,7 @@ useSelectorPresentation useSelectorPresentation Selector/Selector.doc.mjs Select
|
|
|
293
293
|
useSettledOpen useSettledOpen hooks/useAnimatedLayout.doc.mjs hooks/useSettledOpen.ts
|
|
294
294
|
useSheetGestures useSheetGestures BottomSheet/BottomSheet.doc.mjs BottomSheet/useSheetGestures.ts
|
|
295
295
|
useSliderTouch useSliderTouch Slider/Slider.doc.mjs Slider/useSliderTouch.ts
|
|
296
|
-
useSpeechRecognition useSpeechRecognition Chat/
|
|
296
|
+
useSpeechRecognition useSpeechRecognition Chat/useSpeechRecognition.doc.mjs Chat/useSpeechRecognition.ts
|
|
297
297
|
useSwipeAction useSwipeAction Swipe/createSwipe.doc.mjs Swipe/useSwipeAction.ts
|
|
298
298
|
useSwitchTouch useSwitchTouch Switch/Switch.doc.mjs Switch/useSwitchTouch.ts
|
|
299
299
|
useTableCellStyles useTableCellStyles Table/Table.doc.mjs Table/useTableCellStyles.ts
|
|
@@ -57,11 +57,13 @@
|
|
|
57
57
|
* @property {string|null} resolvedSourcePath
|
|
58
58
|
*/
|
|
59
59
|
/**
|
|
60
|
-
* Locate
|
|
60
|
+
* Locate the Core whose components this run reads, throwing the stable
|
|
61
|
+
* not-found error when a run on Core finds none. Null in a run whose base is
|
|
62
|
+
* not Core: it has no Core components.
|
|
61
63
|
* @param {string} cwd
|
|
62
|
-
* @returns {string}
|
|
64
|
+
* @returns {string | null}
|
|
63
65
|
*/
|
|
64
|
-
export function
|
|
66
|
+
export function coreContentDir(cwd: string): string | null;
|
|
65
67
|
/**
|
|
66
68
|
* Load the configured integrations for `cwd`, swallowing any config errors so
|
|
67
69
|
* component discovery never hard-fails on a malformed/absent integration. An
|
|
@@ -83,32 +85,32 @@ export function loadComponentReplacements(coreDir: string | null, loadedIntegrat
|
|
|
83
85
|
/**
|
|
84
86
|
* The integration component that answers to the Core component name
|
|
85
87
|
* `dirName` for unqualified lookup, or undefined when none replaces it.
|
|
86
|
-
* @param {string} coreDir
|
|
88
|
+
* @param {string | null} coreDir
|
|
87
89
|
* @param {import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]} loadedIntegrations
|
|
88
90
|
* @param {string} dirName
|
|
89
91
|
* @returns {Promise<import('../../foundation/discovery/component-replacement.mjs').ActiveComponentReplacement | undefined>}
|
|
90
92
|
*/
|
|
91
|
-
export function resolveComponentReplacement(coreDir: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], dirName: string): Promise<import("../../foundation/discovery/component-replacement.mjs").ActiveComponentReplacement | undefined>;
|
|
93
|
+
export function resolveComponentReplacement(coreDir: string | null, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], dirName: string): Promise<import("../../foundation/discovery/component-replacement.mjs").ActiveComponentReplacement | undefined>;
|
|
92
94
|
/**
|
|
93
95
|
* Read the exact installed version available to a package-qualified component
|
|
94
96
|
* selector. Legacy docs packages do not expose a reliable version here, so a
|
|
95
97
|
* version-qualified lookup never falls through to them.
|
|
96
|
-
* @param {string} coreDir
|
|
98
|
+
* @param {string | null} coreDir
|
|
97
99
|
* @param {import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]} loadedIntegrations
|
|
98
100
|
* @param {string} packageName
|
|
99
101
|
* @returns {string|null}
|
|
100
102
|
*/
|
|
101
|
-
export function installedComponentPackageVersion(coreDir: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], packageName: string): string | null;
|
|
103
|
+
export function installedComponentPackageVersion(coreDir: string | null, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[], packageName: string): string | null;
|
|
102
104
|
/**
|
|
103
105
|
* Build the set of OWNER packages that provide a component with this name
|
|
104
106
|
* across core + every loaded integration. This is what lets the CLI
|
|
105
107
|
* disambiguate by package and expose the owner's source + issuesUrl.
|
|
106
|
-
* @param {string} coreDir
|
|
108
|
+
* @param {string | null} coreDir
|
|
107
109
|
* @param {string} dirName - bare component name (no `XDS` prefix)
|
|
108
110
|
* @param {import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]} loadedIntegrations
|
|
109
111
|
* @returns {ComponentOwner[]}
|
|
110
112
|
*/
|
|
111
|
-
export function resolveOwners(coreDir: string, dirName: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[]): ComponentOwner[];
|
|
113
|
+
export function resolveOwners(coreDir: string | null, dirName: string, loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[]): ComponentOwner[];
|
|
112
114
|
/**
|
|
113
115
|
* Classify a `--package`-scoped lookup. Searches the scoped package first so a
|
|
114
116
|
* component that exists in both core and an external package (e.g. AppShell,
|
|
@@ -162,25 +164,33 @@ export function legacyExternalKeeps(cwd: string, dirName: string, owners: Array<
|
|
|
162
164
|
/**
|
|
163
165
|
* The core source file for `dirName` (the no-scope `--source` path reads core
|
|
164
166
|
* directly — it does NOT fall back to externals or fuzzy search).
|
|
165
|
-
* @param {string} coreDir
|
|
167
|
+
* @param {string | null} coreDir
|
|
166
168
|
* @param {string} dirName
|
|
167
169
|
* @returns {string | null}
|
|
168
170
|
*/
|
|
169
|
-
export function resolveCoreSourcePath(coreDir: string, dirName: string): string | null;
|
|
171
|
+
export function resolveCoreSourcePath(coreDir: string | null, dirName: string): string | null;
|
|
170
172
|
/**
|
|
171
173
|
* Resolve a bare (unscoped) name to a `.doc.mjs`: core first, then back-compat
|
|
172
174
|
* externals, then a conservative fuzzy search. Throws ERR_UNKNOWN_COMPONENT
|
|
173
175
|
* for a genuinely unknown name, and ERR_AMBIGUOUS_COMPONENT when multiple
|
|
174
176
|
* packages provide the same name
|
|
175
177
|
* (with candidate suggestions when close) or ERR_NO_DOC.
|
|
178
|
+
*
|
|
179
|
+
* The suggestions for an unknown name come from every component the bare
|
|
180
|
+
* lookup reads: Core's and each loaded integration's. Past the exact file
|
|
181
|
+
* name, only a Core component whose name is the typed name, ignoring case,
|
|
182
|
+
* resolves, and only when no other Core component comes close. A typed name
|
|
183
|
+
* that is a component's keyword never resolves: that component goes first in
|
|
184
|
+
* the suggestions.
|
|
176
185
|
* @param {string} dirName - bare component name (no `XDS` prefix)
|
|
177
|
-
* @param {{coreDir: string, cwd: string, name: string}} ctx - `name` is the caller's original (prefixed) input, used in error text
|
|
186
|
+
* @param {{coreDir: string | null, cwd: string, name: string, loadedIntegrations?: import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]}} ctx - `name` is the caller's original (prefixed) input, used in error text
|
|
178
187
|
* @returns {Promise<ResolvedUnscopedDoc>}
|
|
179
188
|
*/
|
|
180
|
-
export function resolveUnscopedDoc(dirName: string, { coreDir, cwd, name }: {
|
|
181
|
-
coreDir: string;
|
|
189
|
+
export function resolveUnscopedDoc(dirName: string, { coreDir, cwd, name, loadedIntegrations }: {
|
|
190
|
+
coreDir: string | null;
|
|
182
191
|
cwd: string;
|
|
183
192
|
name: string;
|
|
193
|
+
loadedIntegrations?: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[];
|
|
184
194
|
}): Promise<ResolvedUnscopedDoc>;
|
|
185
195
|
/**
|
|
186
196
|
* Load a `.doc.mjs` through the shared loader, applying the API's doc-load
|
|
@@ -210,10 +220,10 @@ export function extractProps(docs: LoadedComponentDoc): any[];
|
|
|
210
220
|
* @param {LoadedComponentDoc} docs
|
|
211
221
|
* @param {OwnershipSubject} owner
|
|
212
222
|
* @param {string} componentName
|
|
213
|
-
* @param {string} coreDir
|
|
223
|
+
* @param {string | null} coreDir
|
|
214
224
|
* @returns {import('./component.type.mjs').ComponentDetailResponse['data']}
|
|
215
225
|
*/
|
|
216
|
-
export function withOwnership(docs: LoadedComponentDoc, owner: OwnershipSubject, componentName: string, coreDir: string): import("./component.type.mjs").ComponentDetailResponse["data"];
|
|
226
|
+
export function withOwnership(docs: LoadedComponentDoc, owner: OwnershipSubject, componentName: string, coreDir: string | null): import("./component.type.mjs").ComponentDetailResponse["data"];
|
|
217
227
|
/**
|
|
218
228
|
* When the caller asked for "Code" but the resolved doc is for "CodeBlock"
|
|
219
229
|
* (parent), scope the response to just the matching sub-component. Returns the
|
|
@@ -221,10 +231,10 @@ export function withOwnership(docs: LoadedComponentDoc, owner: OwnershipSubject,
|
|
|
221
231
|
* not a scopeable parent.
|
|
222
232
|
* @param {LoadedComponentDoc} docs
|
|
223
233
|
* @param {string} dirName
|
|
224
|
-
* @param {string} coreDir
|
|
234
|
+
* @param {string | null} coreDir
|
|
225
235
|
* @returns {{scoped: LoadedComponentDoc & {parentDoc?: string, import?: string}, matchingComponent: any} | null}
|
|
226
236
|
*/
|
|
227
|
-
export function scopeSubComponent(docs: LoadedComponentDoc, dirName: string, coreDir: string): {
|
|
237
|
+
export function scopeSubComponent(docs: LoadedComponentDoc, dirName: string, coreDir: string | null): {
|
|
228
238
|
scoped: LoadedComponentDoc & {
|
|
229
239
|
parentDoc?: string;
|
|
230
240
|
import?: string;
|
|
@@ -284,13 +294,34 @@ export function linkComponentResponse<R extends {
|
|
|
284
294
|
* matcher's suggestions stay. Returns `error` unchanged otherwise.
|
|
285
295
|
* @param {unknown} error
|
|
286
296
|
* @param {string} dirName
|
|
287
|
-
* @param {{coreDir: string, cwd: string}} context
|
|
297
|
+
* @param {{coreDir: string | null, cwd: string}} context
|
|
288
298
|
* @returns {Promise<unknown>}
|
|
289
299
|
*/
|
|
290
300
|
export function withExampleBlockPointer(error: unknown, dirName: string, { coreDir, cwd }: {
|
|
291
|
-
coreDir: string;
|
|
301
|
+
coreDir: string | null;
|
|
292
302
|
cwd: string;
|
|
293
303
|
}): Promise<unknown>;
|
|
304
|
+
/**
|
|
305
|
+
* When `error` is the unknown-component error for a name that matches a hook,
|
|
306
|
+
* template or docs topic (exact, folded or last segment, or a hook it nearly
|
|
307
|
+
* spells or whose keyword it is, as foundation/suggest/other-command.mjs
|
|
308
|
+
* ranks it), returns the same error with the command that reads that entry
|
|
309
|
+
* among its suggestions, in the place foundation/suggest/other-command.mjs
|
|
310
|
+
* gives it: a hint at the folded tier or a worse one stays behind a
|
|
311
|
+
* suggested component that declares the name as a keyword or synonym, and a
|
|
312
|
+
* hook keyword hint behind one that declares the same keyword. A component
|
|
313
|
+
* whose keyword the name clearly is stays first. Returns `error` unchanged otherwise,
|
|
314
|
+
* and when the check fails.
|
|
315
|
+
* @param {unknown} error
|
|
316
|
+
* @param {string} dirName
|
|
317
|
+
* @param {{coreDir: string | null, cwd: string, loadedIntegrations: import('../../foundation/integrations/integrations.mjs').LoadedIntegration[]}} context
|
|
318
|
+
* @returns {Promise<unknown>}
|
|
319
|
+
*/
|
|
320
|
+
export function withOtherCommandHint(error: unknown, dirName: string, { coreDir, cwd, loadedIntegrations }: {
|
|
321
|
+
coreDir: string | null;
|
|
322
|
+
cwd: string;
|
|
323
|
+
loadedIntegrations: import("../../foundation/integrations/integrations.mjs").LoadedIntegration[];
|
|
324
|
+
}): Promise<unknown>;
|
|
294
325
|
/**
|
|
295
326
|
* Internal ambiguity marker. Single-component callers still receive the same
|
|
296
327
|
* AstryxError code, message, and suggestions; batch callers can additionally
|