Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(cli): a re-cased component name never resolves through a module (#8350)

Christopher Chedeau15a98a187e54
diff --git a/.changeset/cli-component-case-spelling.md b/.changeset/cli-component-case-spelling.md
new file mode 100644
index 0000000000..f41d0f7586
--- /dev/null
+++ b/.changeset/cli-component-case-spelling.md
@@ -0,0 +1,7 @@
+---
+'@astryxdesign/cli': patch
+---
+
+[fix] `astryx component` takes a component's exact name in another case as that component's, never a module's that only shares the spelling. `tokenizer` opens Tokenizer's doc instead of CodeBlock's, which it reached through `CodeBlock/tokenizer.ts`. `--source` with `tokenizer`, `slider`, `switch` or `progressBar` no longer prints `CodeBlock/tokenizer.ts` or the motion tables in `motion/uikit/`, and answers `ERR_NO_SOURCE`, as `--source badge` does.
+
+@vjeux
diff --git a/docs/specs/AST-083-result-order/spec.md b/docs/specs/AST-083-result-order/spec.md
index cfa64ec1ff..a24d6536e7 100644
--- a/docs/specs/AST-083-result-order/spec.md
+++ b/docs/specs/AST-083-result-order/spec.md
@@ -88,7 +88,9 @@ owns response fields and compatibility.
matches of the component matcher (at most five, and at least two when two
exist); for a template, every template; for docs, the routes its error
gives (for an unknown route, the set `spec:AST-046` FR6 names). Every suggestion is a real catalog entry for that command, and a
- name that resolves keeps resolving to the same entry. Which candidates fill
+ name that resolves keeps resolving to the same entry. A component's exact
+ name in another case is that component's: a module that only shares its
+ spelling never resolves for it. Which candidates fill
a component list and the order of every list change only under FR6,
measured on the held-out and fresh failed-lookup evaluation sets. FR5 holds
for this order.
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-01.txt b/packages/cli/api/component/__fixtures__/resolutions/case-01.txt
new file mode 100644
index 0000000000..601ab8676c
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-01.txt
@@ -0,0 +1,30 @@
+ALERTDIALOG AlertDialog AlertDialog/AlertDialog.doc.mjs -
+APPSHELL AppShell AppShell/AppShell.doc.mjs -
+ASPECTRATIO AspectRatio AspectRatio/AspectRatio.doc.mjs -
+AVATARGROUP AvatarGroup AvatarGroup/AvatarGroup.doc.mjs -
+AVATARGROUPOVERFLOW AvatarGroupOverflow AvatarGroup/AvatarGroupOverflow.doc.mjs -
+AVATARSTATUSDOT AvatarStatusDot Avatar/AvatarStatusDot.doc.mjs -
+BADGE Badge Badge/Badge.doc.mjs -
+BANNER Banner Banner/Banner.doc.mjs -
+BASETYPEAHEAD BaseTypeahead Typeahead/BaseTypeahead.doc.mjs -
+BLOCKQUOTE Blockquote Blockquote/Blockquote.doc.mjs -
+BOTTOMSHEET BottomSheet BottomSheet/BottomSheet.doc.mjs -
+BOTTOMSHEETSWITCHER BottomSheetSwitcher BottomSheet/BottomSheetSwitcher.doc.mjs -
+BREADCRUMBITEM BreadcrumbItem Breadcrumbs/BreadcrumbItem.doc.mjs -
+BREADCRUMBS Breadcrumbs Breadcrumbs/Breadcrumbs.doc.mjs -
+BUTTONGROUP ButtonGroup ButtonGroup/ButtonGroup.doc.mjs -
+CAROUSEL Carousel Carousel/Carousel.doc.mjs -
+CENTER Center Center/Center.doc.mjs -
+CHATCOMPOSER ChatComposer Chat/ChatComposer.doc.mjs -
+CHATCOMPOSERDRAWER ChatComposerDrawer Chat/ChatComposerDrawer.doc.mjs -
+CHATCOMPOSERINPUT ChatComposerInput Chat/ChatComposerInput.doc.mjs -
+CHATDICTATIONBUTTON ChatDictationButton Chat/ChatDictationButton.doc.mjs -
+CHATLAYOUT ChatLayout Chat/ChatLayout.doc.mjs -
+CHATLAYOUTSCROLLBUTTON ChatLayoutScrollButton Chat/ChatLayoutScrollButton.doc.mjs -
+CHATMESSAGE ChatMessage Chat/ChatMessage.doc.mjs -
+CHATMESSAGEBUBBLE ChatMessageBubble Chat/ChatMessageBubble.doc.mjs -
+CHATMESSAGELIST ChatMessageList Chat/ChatMessageList.doc.mjs -
+CHATMESSAGEMETADATA ChatMessageMetadata Chat/ChatMessageMetadata.doc.mjs -
+CHATSENDBUTTON ChatSendButton Chat/ChatSendButton.doc.mjs -
+CHATSYSTEMMESSAGE ChatSystemMessage Chat/ChatSystemMessage.doc.mjs -
+CHATTOKENIZEDTEXT ChatTokenizedText Chat/ChatTokenizedText.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-02.txt b/packages/cli/api/component/__fixtures__/resolutions/case-02.txt
new file mode 100644
index 0000000000..5209ff8bdc
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-02.txt
@@ -0,0 +1,30 @@
+CHATTOOLCALLS ChatToolCalls Chat/ChatToolCalls.doc.mjs -
+CHECKBOXINPUT CheckboxInput CheckboxInput/CheckboxInput.doc.mjs -
+CHECKBOXLIST CheckboxList CheckboxList/CheckboxList.doc.mjs -
+CHECKBOXLISTITEM CheckboxListItem CheckboxList/CheckboxListItem.doc.mjs -
+CLICKABLECARD ClickableCard ClickableCard/ClickableCard.doc.mjs -
+CODEBLOCK CodeBlock CodeBlock/CodeBlock.doc.mjs -
+COLLAPSIBLE Collapsible Collapsible/Collapsible.doc.mjs -
+COLLAPSIBLEGROUP CollapsibleGroup Collapsible/CollapsibleGroup.doc.mjs -
+COMMANDPALETTE CommandPalette CommandPalette/CommandPalette.doc.mjs -
+COMMANDPALETTEEMPTY CommandPaletteEmpty CommandPalette/CommandPaletteEmpty.doc.mjs -
+COMMANDPALETTEFOOTER CommandPaletteFooter CommandPalette/CommandPaletteFooter.doc.mjs -
+COMMANDPALETTEGROUP CommandPaletteGroup CommandPalette/CommandPaletteGroup.doc.mjs -
+COMMANDPALETTEINPUT CommandPaletteInput CommandPalette/CommandPaletteInput.doc.mjs -
+COMMANDPALETTEITEM CommandPaletteItem CommandPalette/CommandPaletteItem.doc.mjs -
+COMMANDPALETTELIST CommandPaletteList CommandPalette/CommandPaletteList.doc.mjs -
+COMPLEXSELECTOR ComplexSelector ComplexSelector/ComplexSelector.doc.mjs -
+DATEINPUT DateInput DateInput/DateInput.doc.mjs -
+DATERANGEINPUT DateRangeInput DateRangeInput/DateRangeInput.doc.mjs -
+DATETIMEINPUT DateTimeInput DateTimeInput/DateTimeInput.doc.mjs -
+DIALOGHEADER DialogHeader Dialog/DialogHeader.doc.mjs -
+DIVIDER Divider Divider/Divider.doc.mjs -
+DRAWERHEADER DrawerHeader Drawer/DrawerHeader.doc.mjs -
+DROPDOWNMENU DropdownMenu DropdownMenu/DropdownMenu.doc.mjs -
+DROPDOWNMENUCHECKBOXITEM DropdownMenuCheckboxItem DropdownMenu/DropdownMenuCheckboxItem.doc.mjs -
+DROPDOWNMENUDIVIDER DropdownMenuDivider DropdownMenu/DropdownMenuDivider.doc.mjs -
+DROPDOWNMENUGROUP DropdownMenuGroup DropdownMenu/DropdownMenuGroup.doc.mjs -
+DROPDOWNMENUITEM DropdownMenuItem DropdownMenu/DropdownMenuItem.doc.mjs -
+DROPDOWNMENURADIOGROUP DropdownMenuRadioGroup DropdownMenu/DropdownMenuRadioGroup.doc.mjs -
+DROPDOWNMENURADIOITEM DropdownMenuRadioItem DropdownMenu/DropdownMenuRadioItem.doc.mjs -
+DROPDOWNMENUSUBMENU DropdownMenuSubMenu DropdownMenu/DropdownMenuSubMenu.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-03.txt b/packages/cli/api/component/__fixtures__/resolutions/case-03.txt
new file mode 100644
index 0000000000..dc1ecc6586
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-03.txt
@@ -0,0 +1,30 @@
+EMPTYSTATE EmptyState EmptyState/EmptyState.doc.mjs -
+FIELDLABEL FieldLabel Field/FieldLabel.doc.mjs -
+FIELDSTATUS FieldStatus FieldStatus/FieldStatus.doc.mjs -
+FILEINPUT FileInput FileInput/FileInput.doc.mjs -
+FORMLAYOUT FormLayout FormLayout/FormLayout.doc.mjs -
+GRIDSPAN GridSpan Grid/GridSpan.doc.mjs -
+HOVERCARD HoverCard HoverCard/HoverCard.doc.mjs -
+INPUTGROUP InputGroup InputGroup/InputGroup.doc.mjs -
+INPUTGROUPTEXT InputGroupText InputGroup/InputGroupText.doc.mjs -
+INTERNATIONALIZATIONPROVIDER InternationalizationProvider i18n/InternationalizationProvider.doc.mjs -
+ITEM Item Item/Item.doc.mjs -
+KBD Kbd Kbd/Kbd.doc.mjs -
+LAYOUTCONTENT LayoutContent Layout/LayoutContent.doc.mjs -
+LAYOUTFOOTER LayoutFooter Layout/LayoutFooter.doc.mjs -
+LAYOUTHEADER LayoutHeader Layout/LayoutHeader.doc.mjs -
+LAYOUTPANEL LayoutPanel Layout/LayoutPanel.doc.mjs -
+LINKPROVIDER LinkProvider Link/LinkProvider.doc.mjs -
+LIST List List/List.doc.mjs -
+MARKDOWN Markdown Markdown/Markdown.doc.mjs -
+MEDIATHEME MediaTheme theme/MediaTheme.doc.mjs -
+METADATALIST MetadataList MetadataList/MetadataList.doc.mjs -
+METADATALISTITEM MetadataListItem MetadataList/MetadataListItem.doc.mjs -
+MOBILENAV MobileNav MobileNav/MobileNav.doc.mjs -
+MOREMENU MoreMenu MoreMenu/MoreMenu.doc.mjs -
+MULTISELECTOR MultiSelector MultiSelector/MultiSelector.doc.mjs -
+NAVICON NavIcon NavIcon/NavIcon.doc.mjs -
+NUMBERINPUT NumberInput NumberInput/NumberInput.doc.mjs -
+OVERFLOWLIST OverflowList OverflowList/OverflowList.doc.mjs -
+PAGINATION Pagination Pagination/Pagination.doc.mjs -
+POWERSEARCH PowerSearch PowerSearch/PowerSearch.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-04.txt b/packages/cli/api/component/__fixtures__/resolutions/case-04.txt
new file mode 100644
index 0000000000..a053ae9e29
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-04.txt
@@ -0,0 +1,30 @@
+PROGRESSBAR ProgressBar ProgressBar/ProgressBar.doc.mjs -
+RADIOLIST RadioList RadioList/RadioList.doc.mjs -
+RADIOLISTITEM RadioListItem RadioList/RadioListItem.doc.mjs -
+SCROLLABLEAREA ScrollableArea ScrollableArea/ScrollableArea.doc.mjs -
+SECTION Section Section/Section.doc.mjs -
+SEGMENTEDCONTROL SegmentedControl SegmentedControl/SegmentedControl.doc.mjs -
+SEGMENTEDCONTROLITEM SegmentedControlItem SegmentedControl/SegmentedControlItem.doc.mjs -
+SELECTABLECARD SelectableCard SelectableCard/SelectableCard.doc.mjs -
+SELECTOROPTION SelectorOption Selector/SelectorOption.doc.mjs -
+SIDENAVCOLLAPSEBUTTON SideNavCollapseButton SideNav/SideNavCollapseButton.doc.mjs -
+SIDENAVHEADING SideNavHeading SideNav/SideNavHeading.doc.mjs -
+SIDENAVITEM SideNavItem SideNav/SideNavItem.doc.mjs -
+SIDENAVSECTION SideNavSection SideNav/SideNavSection.doc.mjs -
+SKELETON Skeleton Skeleton/Skeleton.doc.mjs -
+STATUSDOT StatusDot StatusDot/StatusDot.doc.mjs -
+STEP Step Stepper/Step.doc.mjs -
+TABLE Table Table/Table.doc.mjs -
+TABLEBODY TableBody Table/TableBody.doc.mjs -
+TABLECELL TableCell Table/TableCell.doc.mjs -
+TABLEFOOTER TableFooter Table/TableFooter.doc.mjs -
+TABLEHEADER TableHeader Table/TableHeader.doc.mjs -
+TABLEHEADERCELL TableHeaderCell Table/TableHeaderCell.doc.mjs -
+TABLEROW TableRow Table/TableRow.doc.mjs -
+TABLESELECTIONTOOLBAR TableSelectionToolbar Table/TableSelectionToolbar.doc.mjs -
+TABLIST TabList TabList/TabList.doc.mjs -
+TABMENU TabMenu TabList/TabMenu.doc.mjs -
+TEXT Text Text/Text.doc.mjs -
+TEXTAREA TextArea TextArea/TextArea.doc.mjs -
+TEXTINPUT TextInput TextInput/TextInput.doc.mjs -
+THEME Theme theme/Theme.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-05.txt b/packages/cli/api/component/__fixtures__/resolutions/case-05.txt
new file mode 100644
index 0000000000..56a2e5b21b
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-05.txt
@@ -0,0 +1,30 @@
+TIMEINPUT TimeInput TimeInput/TimeInput.doc.mjs -
+TIMER Timer Timer/Timer.doc.mjs -
+TOGGLEBUTTON ToggleButton ToggleButton/ToggleButton.doc.mjs -
+TOGGLEBUTTONGROUP ToggleButtonGroup ToggleButton/ToggleButtonGroup.doc.mjs -
+TOKEN Token Token/Token.doc.mjs -
+TOKENIZER Tokenizer Tokenizer/Tokenizer.doc.mjs -
+TOPNAVHEADING TopNavHeading TopNav/TopNavHeading.doc.mjs -
+TOPNAVITEM TopNavItem TopNav/TopNavItem.doc.mjs -
+TOPNAVMEGAMENU TopNavMegaMenu TopNav/TopNavMegaMenu.doc.mjs -
+TOPNAVMEGAMENUFEATUREDCARD TopNavMegaMenuFeaturedCard TopNav/TopNavMegaMenuFeaturedCard.doc.mjs -
+TOPNAVMEGAMENUITEM TopNavMegaMenuItem TopNav/TopNavMegaMenuItem.doc.mjs -
+TOPNAVMENU TopNavMenu TopNav/TopNavMenu.doc.mjs -
+TREELIST TreeList TreeList/TreeList.doc.mjs -
+TYPEAHEAD Typeahead Typeahead/Typeahead.doc.mjs -
+TYPEAHEADITEM TypeaheadItem Typeahead/TypeaheadItem.doc.mjs -
+VISUALLYHIDDEN VisuallyHidden VisuallyHidden/VisuallyHidden.doc.mjs -
+alertDialog AlertDialog AlertDialog/AlertDialog.doc.mjs -
+alertdialog AlertDialog AlertDialog/AlertDialog.doc.mjs -
+appShell AppShell AppShell/AppShell.doc.mjs -
+appshell AppShell AppShell/AppShell.doc.mjs -
+aspectRatio AspectRatio AspectRatio/AspectRatio.doc.mjs -
+aspectratio AspectRatio AspectRatio/AspectRatio.doc.mjs -
+avatarGroup AvatarGroup AvatarGroup/AvatarGroup.doc.mjs -
+avatarGroupOverflow AvatarGroupOverflow AvatarGroup/AvatarGroupOverflow.doc.mjs -
+avatarStatusDot AvatarStatusDot Avatar/AvatarStatusDot.doc.mjs -
+avatargroup AvatarGroup AvatarGroup/AvatarGroup.doc.mjs -
+avatargroupoverflow AvatarGroupOverflow AvatarGroup/AvatarGroupOverflow.doc.mjs -
+avatarstatusdot AvatarStatusDot Avatar/AvatarStatusDot.doc.mjs -
+badge Badge Badge/Badge.doc.mjs -
+banner Banner Banner/Banner.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-06.txt b/packages/cli/api/component/__fixtures__/resolutions/case-06.txt
new file mode 100644
index 0000000000..da656e58f0
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-06.txt
@@ -0,0 +1,30 @@
+baseTypeahead BaseTypeahead Typeahead/BaseTypeahead.doc.mjs -
+basetypeahead BaseTypeahead Typeahead/BaseTypeahead.doc.mjs -
+blockquote Blockquote Blockquote/Blockquote.doc.mjs -
+bottomSheet BottomSheet BottomSheet/BottomSheet.doc.mjs -
+bottomSheetSwitcher BottomSheetSwitcher BottomSheet/BottomSheetSwitcher.doc.mjs -
+bottomsheet BottomSheet BottomSheet/BottomSheet.doc.mjs -
+bottomsheetswitcher BottomSheetSwitcher BottomSheet/BottomSheetSwitcher.doc.mjs -
+breadcrumbItem BreadcrumbItem Breadcrumbs/BreadcrumbItem.doc.mjs -
+breadcrumbitem BreadcrumbItem Breadcrumbs/BreadcrumbItem.doc.mjs -
+breadcrumbs Breadcrumbs Breadcrumbs/Breadcrumbs.doc.mjs -
+buttonGroup ButtonGroup ButtonGroup/ButtonGroup.doc.mjs -
+buttongroup ButtonGroup ButtonGroup/ButtonGroup.doc.mjs -
+carousel Carousel Carousel/Carousel.doc.mjs -
+center Center Center/Center.doc.mjs -
+chatComposer ChatComposer Chat/ChatComposer.doc.mjs -
+chatComposerDrawer ChatComposerDrawer Chat/ChatComposerDrawer.doc.mjs -
+chatComposerInput ChatComposerInput Chat/ChatComposerInput.doc.mjs -
+chatDictationButton ChatDictationButton Chat/ChatDictationButton.doc.mjs -
+chatLayout ChatLayout Chat/ChatLayout.doc.mjs -
+chatLayoutScrollButton ChatLayoutScrollButton Chat/ChatLayoutScrollButton.doc.mjs -
+chatMessage ChatMessage Chat/ChatMessage.doc.mjs -
+chatMessageBubble ChatMessageBubble Chat/ChatMessageBubble.doc.mjs -
+chatMessageList ChatMessageList Chat/ChatMessageList.doc.mjs -
+chatMessageMetadata ChatMessageMetadata Chat/ChatMessageMetadata.doc.mjs -
+chatSendButton ChatSendButton Chat/ChatSendButton.doc.mjs -
+chatSystemMessage ChatSystemMessage Chat/ChatSystemMessage.doc.mjs -
+chatTokenizedText ChatTokenizedText Chat/ChatTokenizedText.doc.mjs -
+chatToolCalls ChatToolCalls Chat/ChatToolCalls.doc.mjs -
+chatcomposer ChatComposer Chat/ChatComposer.doc.mjs -
+chatcomposerdrawer ChatComposerDrawer Chat/ChatComposerDrawer.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-07.txt b/packages/cli/api/component/__fixtures__/resolutions/case-07.txt
new file mode 100644
index 0000000000..3d111f0a52
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-07.txt
@@ -0,0 +1,30 @@
+chatcomposerinput ChatComposerInput Chat/ChatComposerInput.doc.mjs -
+chatdictationbutton ChatDictationButton Chat/ChatDictationButton.doc.mjs -
+chatlayout ChatLayout Chat/ChatLayout.doc.mjs -
+chatlayoutscrollbutton ChatLayoutScrollButton Chat/ChatLayoutScrollButton.doc.mjs -
+chatmessage ChatMessage Chat/ChatMessage.doc.mjs -
+chatmessagebubble ChatMessageBubble Chat/ChatMessageBubble.doc.mjs -
+chatmessagelist ChatMessageList Chat/ChatMessageList.doc.mjs -
+chatmessagemetadata ChatMessageMetadata Chat/ChatMessageMetadata.doc.mjs -
+chatsendbutton ChatSendButton Chat/ChatSendButton.doc.mjs -
+chatsystemmessage ChatSystemMessage Chat/ChatSystemMessage.doc.mjs -
+chattokenizedtext ChatTokenizedText Chat/ChatTokenizedText.doc.mjs -
+chattoolcalls ChatToolCalls Chat/ChatToolCalls.doc.mjs -
+checkboxInput CheckboxInput CheckboxInput/CheckboxInput.doc.mjs -
+checkboxList CheckboxList CheckboxList/CheckboxList.doc.mjs -
+checkboxListItem CheckboxListItem CheckboxList/CheckboxListItem.doc.mjs -
+checkboxinput CheckboxInput CheckboxInput/CheckboxInput.doc.mjs -
+checkboxlist CheckboxList CheckboxList/CheckboxList.doc.mjs -
+checkboxlistitem CheckboxListItem CheckboxList/CheckboxListItem.doc.mjs -
+clickableCard ClickableCard ClickableCard/ClickableCard.doc.mjs -
+clickablecard ClickableCard ClickableCard/ClickableCard.doc.mjs -
+codeBlock CodeBlock CodeBlock/CodeBlock.doc.mjs -
+codeblock CodeBlock CodeBlock/CodeBlock.doc.mjs -
+collapsible Collapsible Collapsible/Collapsible.doc.mjs -
+collapsibleGroup CollapsibleGroup Collapsible/CollapsibleGroup.doc.mjs -
+collapsiblegroup CollapsibleGroup Collapsible/CollapsibleGroup.doc.mjs -
+commandPalette CommandPalette CommandPalette/CommandPalette.doc.mjs -
+commandPaletteEmpty CommandPaletteEmpty CommandPalette/CommandPaletteEmpty.doc.mjs -
+commandPaletteFooter CommandPaletteFooter CommandPalette/CommandPaletteFooter.doc.mjs -
+commandPaletteGroup CommandPaletteGroup CommandPalette/CommandPaletteGroup.doc.mjs -
+commandPaletteInput CommandPaletteInput CommandPalette/CommandPaletteInput.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-08.txt b/packages/cli/api/component/__fixtures__/resolutions/case-08.txt
new file mode 100644
index 0000000000..01b3906432
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-08.txt
@@ -0,0 +1,30 @@
+commandPaletteItem CommandPaletteItem CommandPalette/CommandPaletteItem.doc.mjs -
+commandPaletteList CommandPaletteList CommandPalette/CommandPaletteList.doc.mjs -
+commandpalette CommandPalette CommandPalette/CommandPalette.doc.mjs -
+commandpaletteempty CommandPaletteEmpty CommandPalette/CommandPaletteEmpty.doc.mjs -
+commandpalettefooter CommandPaletteFooter CommandPalette/CommandPaletteFooter.doc.mjs -
+commandpalettegroup CommandPaletteGroup CommandPalette/CommandPaletteGroup.doc.mjs -
+commandpaletteinput CommandPaletteInput CommandPalette/CommandPaletteInput.doc.mjs -
+commandpaletteitem CommandPaletteItem CommandPalette/CommandPaletteItem.doc.mjs -
+commandpalettelist CommandPaletteList CommandPalette/CommandPaletteList.doc.mjs -
+complexSelector ComplexSelector ComplexSelector/ComplexSelector.doc.mjs -
+complexselector ComplexSelector ComplexSelector/ComplexSelector.doc.mjs -
+dateInput DateInput DateInput/DateInput.doc.mjs -
+dateRangeInput DateRangeInput DateRangeInput/DateRangeInput.doc.mjs -
+dateTimeInput DateTimeInput DateTimeInput/DateTimeInput.doc.mjs -
+dateinput DateInput DateInput/DateInput.doc.mjs -
+daterangeinput DateRangeInput DateRangeInput/DateRangeInput.doc.mjs -
+datetimeinput DateTimeInput DateTimeInput/DateTimeInput.doc.mjs -
+dialogHeader DialogHeader Dialog/DialogHeader.doc.mjs -
+dialogheader DialogHeader Dialog/DialogHeader.doc.mjs -
+divider Divider Divider/Divider.doc.mjs -
+drawerHeader DrawerHeader Drawer/DrawerHeader.doc.mjs -
+drawerheader DrawerHeader Drawer/DrawerHeader.doc.mjs -
+dropdownMenu DropdownMenu DropdownMenu/DropdownMenu.doc.mjs -
+dropdownMenuCheckboxItem DropdownMenuCheckboxItem DropdownMenu/DropdownMenuCheckboxItem.doc.mjs -
+dropdownMenuDivider DropdownMenuDivider DropdownMenu/DropdownMenuDivider.doc.mjs -
+dropdownMenuGroup DropdownMenuGroup DropdownMenu/DropdownMenuGroup.doc.mjs -
+dropdownMenuItem DropdownMenuItem DropdownMenu/DropdownMenuItem.doc.mjs -
+dropdownMenuRadioGroup DropdownMenuRadioGroup DropdownMenu/DropdownMenuRadioGroup.doc.mjs -
+dropdownMenuRadioItem DropdownMenuRadioItem DropdownMenu/DropdownMenuRadioItem.doc.mjs -
+dropdownMenuSubMenu DropdownMenuSubMenu DropdownMenu/DropdownMenuSubMenu.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-09.txt b/packages/cli/api/component/__fixtures__/resolutions/case-09.txt
new file mode 100644
index 0000000000..4ec06ed51e
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-09.txt
@@ -0,0 +1,30 @@
+dropdownmenu DropdownMenu DropdownMenu/DropdownMenu.doc.mjs -
+dropdownmenucheckboxitem DropdownMenuCheckboxItem DropdownMenu/DropdownMenuCheckboxItem.doc.mjs -
+dropdownmenudivider DropdownMenuDivider DropdownMenu/DropdownMenuDivider.doc.mjs -
+dropdownmenugroup DropdownMenuGroup DropdownMenu/DropdownMenuGroup.doc.mjs -
+dropdownmenuitem DropdownMenuItem DropdownMenu/DropdownMenuItem.doc.mjs -
+dropdownmenuradiogroup DropdownMenuRadioGroup DropdownMenu/DropdownMenuRadioGroup.doc.mjs -
+dropdownmenuradioitem DropdownMenuRadioItem DropdownMenu/DropdownMenuRadioItem.doc.mjs -
+dropdownmenusubmenu DropdownMenuSubMenu DropdownMenu/DropdownMenuSubMenu.doc.mjs -
+emptyState EmptyState EmptyState/EmptyState.doc.mjs -
+emptystate EmptyState EmptyState/EmptyState.doc.mjs -
+fieldLabel FieldLabel Field/FieldLabel.doc.mjs -
+fieldStatus FieldStatus FieldStatus/FieldStatus.doc.mjs -
+fieldlabel FieldLabel Field/FieldLabel.doc.mjs -
+fieldstatus FieldStatus FieldStatus/FieldStatus.doc.mjs -
+fileInput FileInput FileInput/FileInput.doc.mjs -
+fileinput FileInput FileInput/FileInput.doc.mjs -
+formLayout FormLayout FormLayout/FormLayout.doc.mjs -
+formlayout FormLayout FormLayout/FormLayout.doc.mjs -
+gridSpan GridSpan Grid/GridSpan.doc.mjs -
+gridspan GridSpan Grid/GridSpan.doc.mjs -
+hoverCard HoverCard HoverCard/HoverCard.doc.mjs -
+hovercard HoverCard HoverCard/HoverCard.doc.mjs -
+inputGroup InputGroup InputGroup/InputGroup.doc.mjs -
+inputGroupText InputGroupText InputGroup/InputGroupText.doc.mjs -
+inputgroup InputGroup InputGroup/InputGroup.doc.mjs -
+inputgrouptext InputGroupText InputGroup/InputGroupText.doc.mjs -
+internationalizationProvider InternationalizationProvider i18n/InternationalizationProvider.doc.mjs -
+internationalizationprovider InternationalizationProvider i18n/InternationalizationProvider.doc.mjs -
+item Item Item/Item.doc.mjs -
+kbd Kbd Kbd/Kbd.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-10.txt b/packages/cli/api/component/__fixtures__/resolutions/case-10.txt
new file mode 100644
index 0000000000..11904ba261
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-10.txt
@@ -0,0 +1,30 @@
+layoutContent LayoutContent Layout/LayoutContent.doc.mjs -
+layoutFooter LayoutFooter Layout/LayoutFooter.doc.mjs -
+layoutHeader LayoutHeader Layout/LayoutHeader.doc.mjs -
+layoutPanel LayoutPanel Layout/LayoutPanel.doc.mjs -
+layoutcontent LayoutContent Layout/LayoutContent.doc.mjs -
+layoutfooter LayoutFooter Layout/LayoutFooter.doc.mjs -
+layoutheader LayoutHeader Layout/LayoutHeader.doc.mjs -
+layoutpanel LayoutPanel Layout/LayoutPanel.doc.mjs -
+linkProvider LinkProvider Link/LinkProvider.doc.mjs -
+linkprovider LinkProvider Link/LinkProvider.doc.mjs -
+list List List/List.doc.mjs -
+markdown Markdown Markdown/Markdown.doc.mjs -
+mediaTheme MediaTheme theme/MediaTheme.doc.mjs -
+mediatheme MediaTheme theme/MediaTheme.doc.mjs -
+metadataList MetadataList MetadataList/MetadataList.doc.mjs -
+metadataListItem MetadataListItem MetadataList/MetadataListItem.doc.mjs -
+metadatalist MetadataList MetadataList/MetadataList.doc.mjs -
+metadatalistitem MetadataListItem MetadataList/MetadataListItem.doc.mjs -
+mobileNav MobileNav MobileNav/MobileNav.doc.mjs -
+mobilenav MobileNav MobileNav/MobileNav.doc.mjs -
+moreMenu MoreMenu MoreMenu/MoreMenu.doc.mjs -
+moremenu MoreMenu MoreMenu/MoreMenu.doc.mjs -
+multiSelector MultiSelector MultiSelector/MultiSelector.doc.mjs -
+multiselector MultiSelector MultiSelector/MultiSelector.doc.mjs -
+navIcon NavIcon NavIcon/NavIcon.doc.mjs -
+navicon NavIcon NavIcon/NavIcon.doc.mjs -
+numberInput NumberInput NumberInput/NumberInput.doc.mjs -
+numberinput NumberInput NumberInput/NumberInput.doc.mjs -
+overflowList OverflowList OverflowList/OverflowList.doc.mjs -
+overflowlist OverflowList OverflowList/OverflowList.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-11.txt b/packages/cli/api/component/__fixtures__/resolutions/case-11.txt
new file mode 100644
index 0000000000..43bbe68b15
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-11.txt
@@ -0,0 +1,30 @@
+pagination Pagination Pagination/Pagination.doc.mjs -
+powerSearch PowerSearch PowerSearch/PowerSearch.doc.mjs -
+powersearch PowerSearch PowerSearch/PowerSearch.doc.mjs -
+progressBar ProgressBar ProgressBar/ProgressBar.doc.mjs -
+progressbar ProgressBar ProgressBar/ProgressBar.doc.mjs -
+radioList RadioList RadioList/RadioList.doc.mjs -
+radioListItem RadioListItem RadioList/RadioListItem.doc.mjs -
+radiolist RadioList RadioList/RadioList.doc.mjs -
+radiolistitem RadioListItem RadioList/RadioListItem.doc.mjs -
+scrollableArea ScrollableArea ScrollableArea/ScrollableArea.doc.mjs -
+scrollablearea ScrollableArea ScrollableArea/ScrollableArea.doc.mjs -
+section Section Section/Section.doc.mjs -
+segmentedControl SegmentedControl SegmentedControl/SegmentedControl.doc.mjs -
+segmentedControlItem SegmentedControlItem SegmentedControl/SegmentedControlItem.doc.mjs -
+segmentedcontrol SegmentedControl SegmentedControl/SegmentedControl.doc.mjs -
+segmentedcontrolitem SegmentedControlItem SegmentedControl/SegmentedControlItem.doc.mjs -
+selectableCard SelectableCard SelectableCard/SelectableCard.doc.mjs -
+selectablecard SelectableCard SelectableCard/SelectableCard.doc.mjs -
+selectorOption SelectorOption Selector/SelectorOption.doc.mjs -
+selectoroption SelectorOption Selector/SelectorOption.doc.mjs -
+sideNavCollapseButton SideNavCollapseButton SideNav/SideNavCollapseButton.doc.mjs -
+sideNavHeading SideNavHeading SideNav/SideNavHeading.doc.mjs -
+sideNavItem SideNavItem SideNav/SideNavItem.doc.mjs -
+sideNavSection SideNavSection SideNav/SideNavSection.doc.mjs -
+sidenavcollapsebutton SideNavCollapseButton SideNav/SideNavCollapseButton.doc.mjs -
+sidenavheading SideNavHeading SideNav/SideNavHeading.doc.mjs -
+sidenavitem SideNavItem SideNav/SideNavItem.doc.mjs -
+sidenavsection SideNavSection SideNav/SideNavSection.doc.mjs -
+skeleton Skeleton Skeleton/Skeleton.doc.mjs -
+statusDot StatusDot StatusDot/StatusDot.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-12.txt b/packages/cli/api/component/__fixtures__/resolutions/case-12.txt
new file mode 100644
index 0000000000..4853e5af8e
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-12.txt
@@ -0,0 +1,30 @@
+statusdot StatusDot StatusDot/StatusDot.doc.mjs -
+step Step Stepper/Step.doc.mjs -
+tabList TabList TabList/TabList.doc.mjs -
+tabMenu TabMenu TabList/TabMenu.doc.mjs -
+table Table Table/Table.doc.mjs -
+tableBody TableBody Table/TableBody.doc.mjs -
+tableCell TableCell Table/TableCell.doc.mjs -
+tableFooter TableFooter Table/TableFooter.doc.mjs -
+tableHeader TableHeader Table/TableHeader.doc.mjs -
+tableHeaderCell TableHeaderCell Table/TableHeaderCell.doc.mjs -
+tableRow TableRow Table/TableRow.doc.mjs -
+tableSelectionToolbar TableSelectionToolbar Table/TableSelectionToolbar.doc.mjs -
+tablebody TableBody Table/TableBody.doc.mjs -
+tablecell TableCell Table/TableCell.doc.mjs -
+tablefooter TableFooter Table/TableFooter.doc.mjs -
+tableheader TableHeader Table/TableHeader.doc.mjs -
+tableheadercell TableHeaderCell Table/TableHeaderCell.doc.mjs -
+tablerow TableRow Table/TableRow.doc.mjs -
+tableselectiontoolbar TableSelectionToolbar Table/TableSelectionToolbar.doc.mjs -
+tablist TabList TabList/TabList.doc.mjs -
+tabmenu TabMenu TabList/TabMenu.doc.mjs -
+text Text Text/Text.doc.mjs -
+textArea TextArea TextArea/TextArea.doc.mjs -
+textInput TextInput TextInput/TextInput.doc.mjs -
+textarea TextArea TextArea/TextArea.doc.mjs -
+textinput TextInput TextInput/TextInput.doc.mjs -
+theme Theme theme/Theme.doc.mjs -
+timeInput TimeInput TimeInput/TimeInput.doc.mjs -
+timeinput TimeInput TimeInput/TimeInput.doc.mjs -
+timer Timer Timer/Timer.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/case-13.txt b/packages/cli/api/component/__fixtures__/resolutions/case-13.txt
new file mode 100644
index 0000000000..ebd6523d8d
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/case-13.txt
@@ -0,0 +1,25 @@
+toggleButton ToggleButton ToggleButton/ToggleButton.doc.mjs -
+toggleButtonGroup ToggleButtonGroup ToggleButton/ToggleButtonGroup.doc.mjs -
+togglebutton ToggleButton ToggleButton/ToggleButton.doc.mjs -
+togglebuttongroup ToggleButtonGroup ToggleButton/ToggleButtonGroup.doc.mjs -
+token Token Token/Token.doc.mjs -
+tokenizer Tokenizer Tokenizer/Tokenizer.doc.mjs -
+topNavHeading TopNavHeading TopNav/TopNavHeading.doc.mjs -
+topNavItem TopNavItem TopNav/TopNavItem.doc.mjs -
+topNavMegaMenu TopNavMegaMenu TopNav/TopNavMegaMenu.doc.mjs -
+topNavMegaMenuFeaturedCard TopNavMegaMenuFeaturedCard TopNav/TopNavMegaMenuFeaturedCard.doc.mjs -
+topNavMegaMenuItem TopNavMegaMenuItem TopNav/TopNavMegaMenuItem.doc.mjs -
+topNavMenu TopNavMenu TopNav/TopNavMenu.doc.mjs -
+topnavheading TopNavHeading TopNav/TopNavHeading.doc.mjs -
+topnavitem TopNavItem TopNav/TopNavItem.doc.mjs -
+topnavmegamenu TopNavMegaMenu TopNav/TopNavMegaMenu.doc.mjs -
+topnavmegamenufeaturedcard TopNavMegaMenuFeaturedCard TopNav/TopNavMegaMenuFeaturedCard.doc.mjs -
+topnavmegamenuitem TopNavMegaMenuItem TopNav/TopNavMegaMenuItem.doc.mjs -
+topnavmenu TopNavMenu TopNav/TopNavMenu.doc.mjs -
+treeList TreeList TreeList/TreeList.doc.mjs -
+treelist TreeList TreeList/TreeList.doc.mjs -
+typeahead Typeahead Typeahead/Typeahead.doc.mjs -
+typeaheadItem TypeaheadItem Typeahead/TypeaheadItem.doc.mjs -
+typeaheaditem TypeaheadItem Typeahead/TypeaheadItem.doc.mjs -
+visuallyHidden VisuallyHidden VisuallyHidden/VisuallyHidden.doc.mjs -
+visuallyhidden VisuallyHidden VisuallyHidden/VisuallyHidden.doc.mjs -
diff --git a/packages/cli/api/component/__fixtures__/resolutions/modules.txt b/packages/cli/api/component/__fixtures__/resolutions/modules.txt
new file mode 100644
index 0000000000..ad12fb2d32
--- /dev/null
+++ b/packages/cli/api/component/__fixtures__/resolutions/modules.txt
@@ -0,0 +1,309 @@
+AnnounceRenderedText AnnounceRenderedText hooks/useAnimatedLayout.doc.mjs hooks/AnnounceRenderedText.tsx
+AppShellMobileContext AppShellMobileContext AppShell/AppShell.doc.mjs AppShell/AppShellMobileContext.tsx
+AvatarGroupContext AvatarGroupContext AvatarGroup/AvatarGroup.doc.mjs AvatarGroup/AvatarGroupContext.ts
+AvatarSizeContext AvatarSizeContext Avatar/Avatar.doc.mjs Avatar/AvatarSizeContext.ts
+AvatarStatusLabelContext AvatarStatusLabelContext Avatar/Avatar.doc.mjs Avatar/AvatarStatusLabelContext.ts
+BaseTable BaseTable Table/Table.doc.mjs Table/BaseTable.tsx
+BottomSheetEdgeTint BottomSheetEdgeTint BottomSheet/BottomSheet.doc.mjs BottomSheet/BottomSheetEdgeTint.tsx
+BottomSheetHostContext BottomSheetHostContext BottomSheet/BottomSheet.doc.mjs BottomSheet/BottomSheetHostContext.ts
+BottomSheetPanel BottomSheetPanel BottomSheet/BottomSheet.doc.mjs BottomSheet/BottomSheetPanel.tsx
+BottomSheetSwitcherContext BottomSheetSwitcherContext BottomSheet/BottomSheet.doc.mjs BottomSheet/BottomSheetSwitcherContext.ts
+ButtonGroupContext ButtonGroupContext ButtonGroup/ButtonGroup.doc.mjs ButtonGroup/ButtonGroupContext.ts
+ChatContext ChatContext Chat/Chat.doc.mjs Chat/ChatContext.tsx
+ChatPastedTextToken ChatPastedTextToken Chat/Chat.doc.mjs Chat/ChatPastedTextToken.tsx
+CheckIndicator CheckIndicator Indicator/Indicator.doc.mjs Indicator/CheckIndicator.tsx
+CheckboxIndicator CheckboxIndicator Indicator/Indicator.doc.mjs Indicator/CheckboxIndicator.tsx
+CheckboxListContext CheckboxListContext CheckboxList/CheckboxList.doc.mjs CheckboxList/CheckboxListContext.tsx
+CollapsibleGroupContext CollapsibleGroupContext Collapsible/Collapsible.doc.mjs Collapsible/CollapsibleGroupContext.tsx
+CommandPaletteContext CommandPaletteContext CommandPalette/CommandPalette.doc.mjs CommandPalette/CommandPaletteContext.ts
+DialogContext DialogContext Dialog/Dialog.doc.mjs Dialog/DialogContext.ts
+DropdownMenuContext DropdownMenuContext DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/DropdownMenuContext.tsx
+FormLayoutContext FormLayoutContext FormLayout/FormLayout.doc.mjs FormLayout/FormLayoutContext.ts
+HeadingLinksRenderer HeadingLinksRenderer Markdown/Markdown.doc.mjs Markdown/plugins/HeadingLinksRenderer.tsx
+IconDefaultSizeContext IconDefaultSizeContext Icon/Icon.doc.mjs Icon/IconDefaultSizeContext.ts
+InputClearButton InputClearButton Field/Field.doc.mjs Field/InputClearButton.tsx
+InputGroupContext InputGroupContext InputGroup/InputGroup.doc.mjs InputGroup/InputGroupContext.ts
+InputGroupInternalContext InputGroupInternalContext InputGroup/InputGroup.doc.mjs InputGroup/InputGroupInternalContext.ts
+InternationalizationContext InternationalizationContext i18n/InternationalizationProvider.doc.mjs i18n/InternationalizationContext.ts
+ItemDescriptionContext ItemDescriptionContext Item/Item.doc.mjs Item/ItemDescriptionContext.tsx
+ItemMarkerColumnsContext ItemMarkerColumnsContext Item/Item.doc.mjs Item/ItemMarkerColumnsContext.tsx
+ItemSwipeLayer ItemSwipeLayer Item/Item.doc.mjs Item/ItemSwipeLayer.tsx
+LayerContext LayerContext Layer/Layer.doc.mjs Layer/LayerContext.ts
+LayerDepthContext LayerDepthContext Layer/Layer.doc.mjs Layer/LayerDepthContext.tsx
+LayerProvider LayerProvider Layer/Layer.doc.mjs Layer/LayerProvider.tsx
+LayoutAreaContext LayoutAreaContext Layout/Layout.doc.mjs Layout/LayoutAreaContext.ts
+LayoutDividerContext LayoutDividerContext Layout/Layout.doc.mjs Layout/LayoutDividerContext.ts
+LayoutSlotsContext LayoutSlotsContext Layout/Layout.doc.mjs Layout/LayoutSlotsContext.ts
+LinkContext LinkContext Link/Link.doc.mjs Link/LinkContext.ts
+ListContext ListContext List/List.doc.mjs List/ListContext.tsx
+MarkdownPluginNodeRenderer MarkdownPluginNodeRenderer Markdown/Markdown.doc.mjs Markdown/plugin-renderer/MarkdownPluginNodeRenderer.tsx
+MenuBottomSheet MenuBottomSheet DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/MenuBottomSheet.tsx
+MenuBottomSheetActionList MenuBottomSheetActionList DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/MenuBottomSheetActionList.tsx
+MetadataListContext MetadataListContext MetadataList/MetadataList.doc.mjs MetadataList/MetadataListContext.tsx
+MobileNavToggle MobileNavToggle MobileNav/MobileNav.doc.mjs MobileNav/MobileNavToggle.tsx
+ModalAnnounceProvider ModalAnnounceProvider hooks/useAnimatedLayout.doc.mjs hooks/ModalAnnounceProvider.tsx
+MonthScroller MonthScroller DateInput/DateInput.doc.mjs DateInput/MonthScroller.tsx
+MonthYearWheels MonthYearWheels DateInput/DateInput.doc.mjs DateInput/MonthYearWheels.tsx
+NativeDateField NativeDateField DateInput/DateInput.doc.mjs DateInput/NativeDateField.tsx
+NativeDateSegment NativeDateSegment DateTimeInput/DateTimeInput.doc.mjs DateTimeInput/NativeDateSegment.tsx
+NativeTimeSegment NativeTimeSegment DateTimeInput/DateTimeInput.doc.mjs DateTimeInput/NativeTimeSegment.tsx
+NavHeadingMenu NavHeadingMenu NavMenu/NavMenu.doc.mjs NavMenu/NavHeadingMenu.tsx
+NavHeadingMenuItem NavHeadingMenuItem NavMenu/NavMenu.doc.mjs NavMenu/NavHeadingMenuItem.tsx
+NavMenuContext NavMenuContext NavMenu/NavMenu.doc.mjs NavMenu/NavMenuContext.tsx
+OverlayScrim OverlayScrim Overlay/Overlay.doc.mjs Overlay/OverlayScrim.tsx
+PanelSearchInput PanelSearchInput Field/Field.doc.mjs Field/PanelSearchInput.tsx
+PowerSearchBottomSheet PowerSearchBottomSheet PowerSearch/PowerSearch.doc.mjs PowerSearch/PowerSearchBottomSheet.tsx
+PowerSearchEditPopover PowerSearchEditPopover PowerSearch/PowerSearch.doc.mjs PowerSearch/PowerSearchEditPopover.tsx
+PowerSearchFilterEditor PowerSearchFilterEditor PowerSearch/PowerSearch.doc.mjs PowerSearch/PowerSearchFilterEditor.tsx
+PowerSearchToken PowerSearchToken PowerSearch/PowerSearch.doc.mjs PowerSearch/PowerSearchToken.tsx
+PowerSearchValueEditor PowerSearchValueEditor PowerSearch/PowerSearch.doc.mjs PowerSearch/PowerSearchValueEditor.tsx
+ProgressBarMarkTooltip ProgressBarMarkTooltip ProgressBar/ProgressBar.doc.mjs ProgressBar/ProgressBarMarkTooltip.tsx
+ProgressBarTouch ProgressBarTouch ProgressBar/ProgressBar.doc.mjs ProgressBar/ProgressBarTouch.ts
+RadioIndicator RadioIndicator Indicator/Indicator.doc.mjs Indicator/RadioIndicator.tsx
+RadioListReasonContext RadioListReasonContext RadioList/RadioList.doc.mjs RadioList/RadioListReasonContext.ts
+ResizeHandle ResizeHandle Resizable/Resizable.doc.mjs Resizable/ResizeHandle.tsx
+SegmentedControlContext SegmentedControlContext SegmentedControl/SegmentedControl.doc.mjs SegmentedControl/SegmentedControlContext.ts
+SelectorBottomSheet SelectorBottomSheet Selector/Selector.doc.mjs Selector/SelectorBottomSheet.tsx
+SelectorRowLayoutContext SelectorRowLayoutContext Selector/Selector.doc.mjs Selector/SelectorRowLayoutContext.ts
+SideNavCollapseContext SideNavCollapseContext SideNav/SideNav.doc.mjs SideNav/SideNavCollapseContext.ts
+SideNavFocusTargetsContext SideNavFocusTargetsContext SideNav/SideNav.doc.mjs SideNav/SideNavFocusTargetsContext.ts
+SideNavRenderContext SideNavRenderContext SideNav/SideNav.doc.mjs SideNav/SideNavRenderContext.ts
+StackItem StackItem Stack/Stack.doc.mjs Stack/StackItem.tsx
+StepStatus StepStatus Stepper/Step.doc.mjs Stepper/StepStatus.ts
+StepperContext StepperContext Stepper/Step.doc.mjs Stepper/StepperContext.ts
+TabListContext TabListContext TabList/Tab.doc.mjs TabList/TabListContext.ts
+TableContext TableContext Table/Table.doc.mjs Table/TableContext.ts
+TimestampHoverCard TimestampHoverCard Timestamp/Timestamp.doc.mjs Timestamp/TimestampHoverCard.tsx
+ToastContext ToastContext Toast/Toast.doc.mjs Toast/ToastContext.ts
+ToastViewport ToastViewport Toast/Toast.doc.mjs Toast/ToastViewport.tsx
+TokenLink TokenLink Token/Token.doc.mjs Token/TokenLink.tsx
+TokenNamingContext TokenNamingContext Token/Token.doc.mjs Token/TokenNamingContext.ts
+TokenizerBottomSheet TokenizerBottomSheet Tokenizer/Tokenizer.doc.mjs Tokenizer/TokenizerBottomSheet.tsx
+TokenizerClearAllMessageContext TokenizerClearAllMessageContext Tokenizer/Tokenizer.doc.mjs Tokenizer/TokenizerClearAllMessageContext.ts
+TokenizerItemRemovableContext TokenizerItemRemovableContext Tokenizer/Tokenizer.doc.mjs Tokenizer/TokenizerItemRemovableContext.ts
+TopNavContext TopNavContext TopNav/TopNav.doc.mjs TopNav/TopNavContext.ts
+TopNavMobileContentContext TopNavMobileContentContext TopNav/TopNav.doc.mjs TopNav/TopNavMobileContentContext.ts
+TopNavRenderContext TopNavRenderContext TopNav/TopNav.doc.mjs TopNav/TopNavRenderContext.ts
+TouchDateField TouchDateField DateInput/DateInput.doc.mjs DateInput/TouchDateField.tsx
+TouchDateTimeField TouchDateTimeField DateTimeInput/DateTimeInput.doc.mjs DateTimeInput/TouchDateTimeField.tsx
+TouchTimeField TouchTimeField TimeInput/TimeInput.doc.mjs TimeInput/TouchTimeField.tsx
+TreeListBranches TreeListBranches TreeList/TreeList.doc.mjs TreeList/TreeListBranches.tsx
+TreeListItem TreeListItem TreeList/TreeList.doc.mjs TreeList/TreeListItem.tsx
+TreeListTypes TreeListTypes TreeList/TreeList.doc.mjs TreeList/TreeListTypes.ts
+Wheel Wheel DateInput/DateInput.doc.mjs DateInput/Wheel.tsx
+actionGroupTracker actionGroupTracker hooks/useAnimatedLayout.doc.mjs hooks/actionGroupTracker.ts
+anchorName anchorName Layer/Layer.doc.mjs Layer/anchorName.ts
+ast ast Markdown/Markdown.doc.mjs Markdown/ast.ts
+bottomSheetEscape bottomSheetEscape BottomSheet/BottomSheet.doc.mjs BottomSheet/bottomSheetEscape.ts
+bottomSheetStack bottomSheetStack BottomSheet/BottomSheet.doc.mjs BottomSheet/bottomSheetStack.ts
+busyIndicatorLane busyIndicatorLane Typeahead/BaseTypeahead.doc.mjs Typeahead/busyIndicatorLane.tsx
+busyStartSettle busyStartSettle CommandPalette/CommandPalette.doc.mjs CommandPalette/busyStartSettle.ts
+characterReferences characterReferences Markdown/Markdown.doc.mjs Markdown/characterReferences.ts
+chatComposerSelection chatComposerSelection Chat/Chat.doc.mjs Chat/chatComposerSelection.ts
+clampInlineSize clampInlineSize Layer/Layer.doc.mjs Layer/clampInlineSize.ts
+columnUtils columnUtils Table/Table.doc.mjs Table/columnUtils.ts
+committedChoicesKey committedChoicesKey Typeahead/BaseTypeahead.doc.mjs Typeahead/committedChoicesKey.tsx
+computeOverflow computeOverflow hooks/useAnimatedLayout.doc.mjs hooks/computeOverflow.ts
+computeTargetAndRel computeTargetAndRel Link/Link.doc.mjs Link/computeTargetAndRel.ts
+contrast contrast theme/MediaTheme.doc.mjs theme/contrast.ts
+createStaticSource createStaticSource Typeahead/BaseTypeahead.doc.mjs Typeahead/createStaticSource.ts
+dataTokens dataTokens theme/MediaTheme.doc.mjs theme/domainTokens/dataTokens.ts
+dayCellUtils dayCellUtils Calendar/Calendar.doc.mjs Calendar/dayCellUtils.ts
+declarationBoundary declarationBoundary theme/MediaTheme.doc.mjs theme/declarationBoundary.ts
+defaultIcons defaultIcons Icon/Icon.doc.mjs Icon/defaultIcons.tsx
+defineSyntaxTheme defineSyntaxTheme theme/MediaTheme.doc.mjs theme/syntax/defineSyntaxTheme.ts
+defineTheme defineTheme theme/MediaTheme.doc.mjs theme/defineTheme.ts
+derivedVarRegistry derivedVarRegistry theme/MediaTheme.doc.mjs theme/derivedVarRegistry.ts
+dockerfile dockerfile CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/dockerfile.ts
+domainTokenDefaults domainTokenDefaults theme/MediaTheme.doc.mjs theme/domainTokens/domainTokenDefaults.ts
+englishFallback englishFallback i18n/InternationalizationProvider.doc.mjs i18n/englishFallback.ts
+expandColorScale expandColorScale theme/MediaTheme.doc.mjs theme/expandColorScale.ts
+expandMotionScale expandMotionScale theme/MediaTheme.doc.mjs theme/expandMotionScale.ts
+expandRadiusScale expandRadiusScale theme/MediaTheme.doc.mjs theme/expandRadiusScale.ts
+expandTypeScale expandTypeScale theme/MediaTheme.doc.mjs theme/expandTypeScale.ts
+fieldParts fieldParts Field/Field.doc.mjs Field/fieldParts.ts
+fieldStatusPlacement fieldStatusPlacement Field/Field.doc.mjs Field/fieldStatusPlacement.ts
+focusableSelector focusableSelector hooks/useAnimatedLayout.doc.mjs hooks/focusableSelector.ts
+formatFilterValue formatFilterValue PowerSearch/PowerSearch.doc.mjs PowerSearch/formatFilterValue.ts
+formatInstant formatInstant Timestamp/Timestamp.doc.mjs Timestamp/formatInstant.ts
+formatRelativeTime formatRelativeTime Timestamp/Timestamp.doc.mjs Timestamp/formatRelativeTime.ts
+formatTokenValue formatTokenValue PowerSearch/PowerSearch.doc.mjs PowerSearch/formatTokenValue.ts
+frontmatter frontmatter Markdown/Markdown.doc.mjs Markdown/plugins/frontmatter.ts
+fullEnglishFallback fullEnglishFallback i18n/InternationalizationProvider.doc.mjs i18n/fullEnglishFallback.ts
+generateThemeRules generateThemeRules theme/MediaTheme.doc.mjs theme/generateThemeRules.ts
+gestureCounter gestureCounter Layer/Layer.doc.mjs Layer/gestureCounter.ts
+getInitialFocusDate getInitialFocusDate Calendar/Calendar.doc.mjs Calendar/getInitialFocusDate.ts
+getLocaleDirection getLocaleDirection i18n/InternationalizationProvider.doc.mjs i18n/getLocaleDirection.ts
+getStandaloneShortWeekdayNames getStandaloneShortWeekdayNames Calendar/Calendar.doc.mjs Calendar/getStandaloneShortWeekdayNames.ts
+glidingDivider glidingDivider Table/Table.doc.mjs Table/glidingDivider.ts
+globalIconRegistry globalIconRegistry Icon/Icon.doc.mjs Icon/globalIconRegistry.tsx
+grammar grammar CodeBlock/CodeBlock.doc.mjs CodeBlock/grammar.ts
+graphql graphql CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/graphql.ts
+groupStyles groupStyles InputGroup/InputGroup.doc.mjs InputGroup/groupStyles.ts
+hct hct theme/MediaTheme.doc.mjs theme/hct.ts
+headingLinks headingLinks Markdown/Markdown.doc.mjs Markdown/plugins/headingLinks.ts
+headingProjection headingProjection Markdown/Markdown.doc.mjs Markdown/headingProjection.ts
+highlightRanges highlightRanges CodeBlock/CodeBlock.doc.mjs CodeBlock/highlightRanges.ts
+highlightStyles highlightStyles CodeBlock/CodeBlock.doc.mjs CodeBlock/highlightStyles.ts
+hooks hooks MultiSelector/MultiSelector.doc.mjs MultiSelector/hooks.ts
+indicatorRegistry indicatorRegistry Indicator/Indicator.doc.mjs Indicator/indicatorRegistry.ts
+inputDisabledFocus inputDisabledFocus Field/Field.doc.mjs Field/inputDisabledFocus.ts
+isRtlElement isRtlElement hooks/useAnimatedLayout.doc.mjs hooks/isRtlElement.ts
+java java CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/java.ts
+layerClickBoundary layerClickBoundary Layer/Layer.doc.mjs Layer/layerClickBoundary.ts
+layerHost layerHost Layer/Layer.doc.mjs Layer/layerHost.ts
+layerInset layerInset Layer/Layer.doc.mjs Layer/layerInset.ts
+layerScopedContext layerScopedContext Layer/Layer.doc.mjs Layer/layerScopedContext.tsx
+layerSlideRules layerSlideRules Layer/Layer.doc.mjs Layer/layerSlideRules.ts
+layerStack layerStack Layer/Layer.doc.mjs Layer/layerStack.ts
+layerSurfacePress layerSurfacePress Layer/Layer.doc.mjs Layer/layerSurfacePress.ts
+layoutReset layoutReset Layout/Layout.doc.mjs Layout/layoutReset.ts
+lazyMenuBottomSheet lazyMenuBottomSheet DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/lazyMenuBottomSheet.ts
+lazyPopoverBottomSheet lazyPopoverBottomSheet Popover/Popover.doc.mjs Popover/lazyPopoverBottomSheet.ts
+localTokens localTokens theme/MediaTheme.doc.mjs theme/localTokens.ts
+lua lua CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/lua.ts
+menuItemHover menuItemHover DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/menuItemHover.ts
+menuItemRoles menuItemRoles DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/menuItemRoles.ts
+menuPressGesture menuPressGesture hooks/useAnimatedLayout.doc.mjs hooks/menuPressGesture.ts
+menuPressMarker menuPressMarker hooks/useAnimatedLayout.doc.mjs hooks/menuPressMarker.ts
+menuPressOnItems menuPressOnItems hooks/useAnimatedLayout.doc.mjs hooks/menuPressOnItems.ts
+menuRegionStops menuRegionStops DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/menuRegionStops.ts
+menuRegionsContext menuRegionsContext DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/menuRegionsContext.ts
+menuWidth menuWidth DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/menuWidth.ts
+mergeComponents mergeComponents theme/MediaTheme.doc.mjs theme/mergeComponents.ts
+modalAnnounce modalAnnounce hooks/useAnimatedLayout.doc.mjs hooks/modalAnnounce.ts
+modalOutlet modalOutlet Layer/Layer.doc.mjs Layer/modalOutlet.ts
+monthGeometry monthGeometry DateInput/DateInput.doc.mjs DateInput/monthGeometry.ts
+motionKnobs motionKnobs theme/MediaTheme.doc.mjs theme/motionKnobs.ts
+nativeDateSegments nativeDateSegments DateInput/DateInput.doc.mjs DateInput/nativeDateSegments.ts
+nativePickerSegmentStyles nativePickerSegmentStyles DateTimeInput/DateTimeInput.doc.mjs DateTimeInput/nativePickerSegmentStyles.ts
+numberInputCommit numberInputCommit NumberInput/NumberInput.doc.mjs NumberInput/numberInputCommit.ts
+numberParser numberParser NumberInput/NumberInput.doc.mjs NumberInput/numberParser.ts
+objective-c objective-c CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/objective-c.ts
+observeMainOverflow observeMainOverflow AppShell/AppShell.doc.mjs AppShell/observeMainOverflow.ts
+onMediaTokens onMediaTokens theme/MediaTheme.doc.mjs theme/onMediaTokens.ts
+optionShape optionShape Selector/Selector.doc.mjs Selector/optionShape.ts
+outsidePress outsidePress Layer/Layer.doc.mjs Layer/outsidePress.ts
+paginateData paginateData Table/Table.doc.mjs Table/plugins/pagination/paginateData.ts
+paging Pagination Pagination/Pagination.doc.mjs motion/paging.ts
+parseOutlineFromMarkdown parseOutlineFromMarkdown Outline/Outline.doc.mjs Outline/parseOutlineFromMarkdown.ts
+parser parser Markdown/Markdown.doc.mjs Markdown/parser.ts
+popoverOperations popoverOperations Layer/Layer.doc.mjs Layer/popoverOperations.ts
+powerSearchSheetUtils powerSearchSheetUtils PowerSearch/PowerSearch.doc.mjs PowerSearch/powerSearchSheetUtils.ts
+powershell powershell CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/powershell.ts
+preserveAnimations preserveAnimations Layer/Layer.doc.mjs Layer/preserveAnimations.ts
+presets presets theme/MediaTheme.doc.mjs theme/syntax/presets.ts
+pressGroupContext pressGroupContext hooks/useAnimatedLayout.doc.mjs hooks/pressGroupContext.ts
+protocol protocol Markdown/Markdown.doc.mjs Markdown/plugins/protocol.ts
+publicContext publicContext i18n/InternationalizationProvider.doc.mjs i18n/publicContext.ts
+railMotion railMotion SideNav/SideNav.doc.mjs SideNav/railMotion.ts
+remark remark Markdown/Markdown.doc.mjs Markdown/remark.ts
+renderDropdownItems renderDropdownItems DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/renderDropdownItems.tsx
+resizableModel resizableModel Resizable/Resizable.doc.mjs Resizable/resizableModel.ts
+resizeGesture resizeGesture Resizable/Resizable.doc.mjs Resizable/resizeGesture.ts
+resolve resolve i18n/InternationalizationProvider.doc.mjs i18n/resolve.ts
+resolveDateTimeRangePart resolveDateTimeRangePart PowerSearch/PowerSearch.doc.mjs PowerSearch/resolveDateTimeRangePart.ts
+resolveOperatorLabel resolveOperatorLabel PowerSearch/PowerSearch.doc.mjs PowerSearch/resolveOperatorLabel.ts
+resolveThemeValues resolveThemeValues theme/MediaTheme.doc.mjs theme/resolveThemeValues.ts
+rowDivider rowDivider Table/Table.doc.mjs Table/rowDivider.ts
+ruby ruby CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/ruby.ts
+scrollGeometry scrollGeometry hooks/useAnimatedLayout.doc.mjs hooks/scrollGeometry.ts
+scrollKeyboardDelegation scrollKeyboardDelegation hooks/useAnimatedLayout.doc.mjs hooks/scrollKeyboardDelegation.ts
+scrollOwnerRegistry scrollOwnerRegistry hooks/useAnimatedLayout.doc.mjs hooks/scrollOwnerRegistry.ts
+scrollbarGutter scrollbarGutter hooks/useAnimatedLayout.doc.mjs hooks/scrollbarGutter.ts
+selectableOptionEntries selectableOptionEntries Selector/Selector.doc.mjs Selector/selectableOptionEntries.ts
+semanticFence semanticFence Markdown/Markdown.doc.mjs Markdown/plugins/semanticFence.ts
+sliderTouchController sliderTouchController Slider/Slider.doc.mjs Slider/sliderTouchController.ts
+snapOffsets snapOffsets BottomSheet/BottomSheet.doc.mjs BottomSheet/snapOffsets.ts
+softBreaks softBreaks Markdown/Markdown.doc.mjs Markdown/plugins/softBreaks.ts
+sourceDecoration sourceDecoration Markdown/Markdown.doc.mjs Markdown/plugins/sourceDecoration.ts
+sourceLines sourceLines Markdown/Markdown.doc.mjs Markdown/plugins/sourceLines.ts
+statusColor statusColor theme/MediaTheme.doc.mjs theme/statusColor.ts
+statusRoleDerivation statusRoleDerivation theme/MediaTheme.doc.mjs theme/statusRoleDerivation.ts
+streaming streaming Markdown/Markdown.doc.mjs Markdown/streaming.ts
+styles styles Calendar/Calendar.doc.mjs Calendar/styles.ts
+switchFill switchFill Switch/Switch.doc.mjs Switch/switchFill.ts
+switchTouch switchTouch Switch/Switch.doc.mjs Switch/switchTouch.ts
+tableContextMenu tableContextMenu Table/Table.doc.mjs Table/tableContextMenu.tsx
+textEntryTraits textEntryTraits Field/Field.doc.mjs Field/textEntryTraits.ts
+textTransform textTransform Markdown/Markdown.doc.mjs Markdown/plugins/textTransform.ts
+themeAdaptations themeAdaptations theme/MediaTheme.doc.mjs theme/themeAdaptations.ts
+themeMotion themeMotion theme/MediaTheme.doc.mjs theme/themeMotion.ts
+themeRegistry themeRegistry theme/MediaTheme.doc.mjs theme/themeRegistry.ts
+thrift thrift CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/thrift.ts
+tokenReferences tokenReferences theme/MediaTheme.doc.mjs theme/tokenReferences.ts
+tokens tokens theme/MediaTheme.doc.mjs theme/tokens.ts
+toml toml CodeBlock/CodeBlock.doc.mjs CodeBlock/languages/toml.ts
+tooltipEntries tooltipEntries Timestamp/Timestamp.doc.mjs Timestamp/tooltipEntries.ts
+touch BottomSheet BottomSheet/BottomSheet.doc.mjs internal/touch.ts
+trailingKeyDown trailingKeyDown Typeahead/BaseTypeahead.doc.mjs Typeahead/trailingKeyDown.tsx
+translator translator i18n/InternationalizationProvider.doc.mjs i18n/translator.ts
+types types Field/Field.doc.mjs Field/types.ts
+url url Markdown/Markdown.doc.mjs Markdown/url.ts
+useActionGroupTracking useActionGroupTracking hooks/useAnimatedLayout.doc.mjs hooks/useActionGroupTracking.ts
+useAdaptivePresentation useAdaptivePresentation hooks/useAnimatedLayout.doc.mjs hooks/useAdaptivePresentation.ts
+useAnnounceRenderedText useAnnounceRenderedText hooks/useAnimatedLayout.doc.mjs hooks/useAnnounceRenderedText.ts
+useAttachment useAttachment hooks/useAnimatedLayout.doc.mjs hooks/useAttachment.ts
+useAutoMediaMode useAutoMediaMode hooks/useAnimatedLayout.doc.mjs hooks/useAutoMediaMode.ts
+useBackdropPress useBackdropPress Layer/Layer.doc.mjs Layer/useBackdropPress.ts
+useBaseTablePlugins useBaseTablePlugins Table/Table.doc.mjs Table/useBaseTablePlugins.ts
+useBusyAnnouncement useBusyAnnouncement hooks/useAnimatedLayout.doc.mjs hooks/useBusyAnnouncement.ts
+useCalendarConstraints useCalendarConstraints Calendar/Calendar.doc.mjs Calendar/hooks/useCalendarConstraints.ts
+useCalendarDays useCalendarDays Calendar/Calendar.doc.mjs Calendar/hooks/useCalendarDays.ts
+useCalendarNavigation useCalendarNavigation Calendar/Calendar.doc.mjs Calendar/hooks/useCalendarNavigation.ts
+useChatComposerTokens useChatComposerTokens Chat/Chat.doc.mjs Chat/useChatComposerTokens.ts
+useChatDictation useChatDictation Chat/Chat.doc.mjs Chat/useChatDictation.ts
+useChatNewMessages useChatNewMessages Chat/Chat.doc.mjs Chat/useChatNewMessages.ts
+useChatPasteAsToken useChatPasteAsToken Chat/Chat.doc.mjs Chat/useChatPasteAsToken.ts
+useChatStreamScroll useChatStreamScroll Chat/Chat.doc.mjs Chat/useChatStreamScroll.ts
+useCloseMobileDrawerOnActivate useCloseMobileDrawerOnActivate AppShell/AppShell.doc.mjs AppShell/useCloseMobileDrawerOnActivate.ts
+useComponentTranslator useComponentTranslator i18n/InternationalizationProvider.doc.mjs i18n/useComponentTranslator.ts
+useDirection useDirection i18n/InternationalizationProvider.doc.mjs i18n/useDirection.ts
+useDrawerDialogPresence useDrawerDialogPresence Drawer/Drawer.doc.mjs Drawer/useDrawerDialogPresence.ts
+useEndLaneReserve useEndLaneReserve Tokenizer/Tokenizer.doc.mjs Tokenizer/useEndLaneReserve.ts
+useFieldStatusAnnouncement useFieldStatusAnnouncement FieldStatus/FieldStatus.doc.mjs FieldStatus/useFieldStatusAnnouncement.ts
+useFocusReturnVisibility useFocusReturnVisibility hooks/useAnimatedLayout.doc.mjs hooks/useFocusReturnVisibility.ts
+useHighlightedOptionScroll useHighlightedOptionScroll hooks/useAnimatedLayout.doc.mjs hooks/useHighlightedOptionScroll.ts
+useIcon useIcon Icon/Icon.doc.mjs Icon/useIcon.ts
+useIndicator useIndicator Indicator/Indicator.doc.mjs Indicator/useIndicator.ts
+useInternalConfig useInternalConfig PowerSearch/PowerSearch.doc.mjs PowerSearch/useInternalConfig.ts
+useIsHydrating useIsHydrating hooks/useAnimatedLayout.doc.mjs hooks/useIsHydrating.ts
+useIsomorphicLayoutEffect useIsomorphicLayoutEffect hooks/useAnimatedLayout.doc.mjs hooks/useIsomorphicLayoutEffect.ts
+useLayerDismissal useLayerDismissal Layer/Layer.doc.mjs Layer/useLayerDismissal.ts
+useLightbox useLightbox Lightbox/Lightbox.doc.mjs Lightbox/useLightbox.tsx
+useLinkComponent useLinkComponent Link/Link.doc.mjs Link/useLinkComponent.ts
+useLinkify useLinkify Link/Link.doc.mjs Link/useLinkify.tsx
+useListFormatter useListFormatter i18n/InternationalizationProvider.doc.mjs i18n/useListFormatter.ts
+useMenuDrillIn useMenuDrillIn DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/useMenuDrillIn.tsx
+useMenuHover useMenuHover hooks/useAnimatedLayout.doc.mjs hooks/useMenuHover.ts
+useMenuOverflow useMenuOverflow DropdownMenu/DropdownMenu.doc.mjs DropdownMenu/useMenuOverflow.ts
+useMobileKeyboard useMobileKeyboard BottomSheet/BottomSheet.doc.mjs BottomSheet/useMobileKeyboard.ts
+useOutlineFromDOM useOutlineFromDOM Outline/Outline.doc.mjs Outline/useOutlineFromDOM.ts
+useOverlay useOverlay Overlay/Overlay.doc.mjs Overlay/useOverlay.tsx
+useOwnScrollGesture useOwnScrollGesture DateInput/DateInput.doc.mjs DateInput/useOwnScrollGesture.ts
+usePager usePager hooks/useAnimatedLayout.doc.mjs hooks/usePager.ts
+usePointerDragScroll usePointerDragScroll DateInput/DateInput.doc.mjs DateInput/usePointerDragScroll.ts
+usePowerSearchConfig usePowerSearchConfig PowerSearch/PowerSearch.doc.mjs PowerSearch/usePowerSearchConfig.ts
+usePowerSearchSource usePowerSearchSource PowerSearch/PowerSearch.doc.mjs PowerSearch/usePowerSearchSource.ts
+usePressPin usePressPin Layer/Layer.doc.mjs Layer/usePressPin.ts
+useRenamedProp useRenamedProp hooks/useAnimatedLayout.doc.mjs hooks/useRenamedProp.ts
+useResolvedRequired useResolvedRequired hooks/useAnimatedLayout.doc.mjs hooks/useResolvedRequired.ts
+useScrollSettle useScrollSettle DateInput/DateInput.doc.mjs DateInput/useScrollSettle.ts
+useScrollSpy useScrollSpy Outline/Outline.doc.mjs Outline/useScrollSpy.ts
+useSegmentedSelectionMotion useSegmentedSelectionMotion SegmentedControl/SegmentedControl.doc.mjs SegmentedControl/useSegmentedSelectionMotion.ts
+useSegmentedTouchTracking useSegmentedTouchTracking SegmentedControl/SegmentedControl.doc.mjs SegmentedControl/useSegmentedTouchTracking.ts
+useSelectorPresentation useSelectorPresentation Selector/Selector.doc.mjs Selector/useSelectorPresentation.ts
+useSettledOpen useSettledOpen hooks/useAnimatedLayout.doc.mjs hooks/useSettledOpen.ts
+useSheetGestures useSheetGestures BottomSheet/BottomSheet.doc.mjs BottomSheet/useSheetGestures.ts
+useSliderTouch useSliderTouch Slider/Slider.doc.mjs Slider/useSliderTouch.ts
+useSpeechRecognition useSpeechRecognition Chat/Chat.doc.mjs Chat/useSpeechRecognition.ts
+useSwipeAction useSwipeAction Item/Item.doc.mjs Item/useSwipeAction.ts
+useSwitchTouch useSwitchTouch Switch/Switch.doc.mjs Switch/useSwitchTouch.ts
+useTableCellStyles useTableCellStyles Table/Table.doc.mjs Table/useTableCellStyles.ts
+useTableColumnSettingsState useTableColumnSettingsState Table/Table.doc.mjs Table/plugins/columnSettings/useTableColumnSettingsState.tsx
+useTableSortableState useTableSortableState Table/Table.doc.mjs Table/plugins/sortable/useTableSortableState.tsx
+useToastGesture useToastGesture Toast/Toast.doc.mjs Toast/useToastGesture.ts
+useTouchTrigger useTouchTrigger Layer/Layer.doc.mjs Layer/useTouchTrigger.ts
+useTriggerMenu useTriggerMenu Chat/Chat.doc.mjs Chat/useTriggerMenu.tsx
+useTruncation useTruncation Text/Heading.doc.mjs Text/useTruncation.ts
+utils utils Calendar/Calendar.doc.mjs Calendar/utils.ts
diff --git a/packages/cli/api/component/component.mjs b/packages/cli/api/component/component.mjs
index 561f3f949b..621b44d26e 100644
--- a/packages/cli/api/component/component.mjs
+++ b/packages/cli/api/component/component.mjs
@@ -16,6 +16,7 @@ import {
docPackageManager,
runWithDocPackageManager,
} from '../../foundation/env/package-manager.mjs';
+import {withListingCache} from '../../foundation/fs/listing-cache.mjs';
import {ERROR_CODES} from '../../foundation/response/error-codes.mjs';
import {AstryxError} from '../error.mjs';
import {
@@ -265,13 +266,16 @@ export async function component(name, options = {}) {
const cwd = options.cwd ?? process.cwd();
// Every read resolves the links in the doc text it returns (spec:AST-047
// FR9); a batch's results are each a read of their own. Doc tokens render
- // for the project in `cwd`.
- return runWithDocPackageManager(
- docPackageManager(cwd),
- async () =>
- /** @type {any} */ (
- await linkComponentResponse(await componentRead(name, options), cwd)
- ),
+ // for the project in `cwd`. A call's lookups walk the same source tree, so
+ // the call reads each directory once.
+ return withListingCache(() =>
+ runWithDocPackageManager(
+ docPackageManager(cwd),
+ async () =>
+ /** @type {any} */ (
+ await linkComponentResponse(await componentRead(name, options), cwd)
+ ),
+ ),
);
}
diff --git a/packages/cli/api/component/component.test.mjs b/packages/cli/api/component/component.test.mjs
index d05159b517..3777abe665 100644
--- a/packages/cli/api/component/component.test.mjs
+++ b/packages/cli/api/component/component.test.mjs
@@ -251,6 +251,30 @@ describe('component dispatcher — name resolution', () => {
SLOW,
);
+ it(
+ 'opens Tokenizer for tokenizer, not CodeBlock through its tokenizer module (spec:AST-083 FR7)',
+ async () => {
+ const r = await component('tokenizer', {cwd});
+ expect(r.type).toBe('component.detail');
+ expect(r.data.name).toBe('Tokenizer');
+ },
+ SLOW,
+ );
+
+ it.each(['slider', 'switch', 'progressBar', 'tokenizer'])(
+ 'reads no source for %s, a component name in another case that a motion table or helper module shares',
+ async name => {
+ let err;
+ try {
+ await component(name, {cwd, source: true});
+ } catch (e) {
+ err = e;
+ }
+ expect(err?.code).toBe('ERR_NO_SOURCE');
+ },
+ SLOW,
+ );
+
it(
'throws ERR_UNKNOWN_COMPONENT for a genuinely unknown name',
async () => {
diff --git a/packages/cli/api/component/listing-scope.test.mjs b/packages/cli/api/component/listing-scope.test.mjs
new file mode 100644
index 0000000000..9a2fb5fa45
--- /dev/null
+++ b/packages/cli/api/component/listing-scope.test.mjs
@@ -0,0 +1,71 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file Colocated test that the discovery's case index is built once per
+ * operation. It runs against the real @astryxdesign/core registry: one
+ * `component` call (api/component/component.mjs), the CLI's list view and the
+ * XLE registry. It counts the index's builds. A counting wrapper replaces the
+ * listing cache's `oncePerListing`, so the test runs in a file of its own.
+ */
+
+import {describe, it, expect, vi} from 'vitest';
+import * as path from 'node:path';
+import {fileURLToPath} from 'node:url';
+import {component} from './component.mjs';
+import {findComponentSource} from '../../foundation/discovery/component-discovery.mjs';
+import {buildRegistry} from '../../foundation/xle/registry.mjs';
+import {runCli} from '../../test-utils/run-cli.mjs';
+
+const builds = vi.hoisted(() => ({count: 0}));
+
+vi.mock('../../foundation/fs/listing-cache.mjs', async importOriginal => {
+ /** @type {typeof import('../../foundation/fs/listing-cache.mjs')} */
+ const actual = await importOriginal();
+ return {
+ ...actual,
+ /** @type {typeof actual.oncePerListing} */
+ oncePerListing: (key, compute) =>
+ actual.oncePerListing(key, () => {
+ if (key.startsWith('case-stems')) builds.count += 1;
+ return compute();
+ }),
+ };
+});
+
+// api/component/ -> up 4 = repo root (has packages/core, which findCoreDir walks to).
+const REPO = path.resolve(
+ path.dirname(fileURLToPath(import.meta.url)),
+ '../../../..',
+);
+
+describe('one component call', () => {
+ it('builds the case index once for a batch of names', async () => {
+ builds.count = 0;
+ await component(['Button', 'tab', 'Tokenizer'], {cwd: REPO});
+ expect(builds.count).toBe(1);
+ });
+
+ it('builds no case index for a lookup that finds no file', () => {
+ builds.count = 0;
+ expect(
+ findComponentSource(path.join(REPO, 'packages/core'), 'NoSuchName'),
+ ).toBeNull();
+ expect(builds.count).toBe(0);
+ });
+
+ it('builds the case index a fixed number of times for the list view, however many rows it prints', async () => {
+ builds.count = 0;
+ const {status} = await runCli(['component', '--list'], {cwd: REPO});
+ expect(status).toBe(0);
+ // One for the list's own read, one for its text view's import column.
+ expect(builds.count).toBeLessThanOrEqual(2);
+ });
+
+ it('builds the case index once for the XLE registry', async () => {
+ builds.count = 0;
+ // Nothing above builds the registry, so this call reads it, not the
+ // module's cache.
+ await buildRegistry({cwd: REPO});
+ expect(builds.count).toBe(1);
+ });
+});
diff --git a/packages/cli/api/component/resolution-compat.test.mjs b/packages/cli/api/component/resolution-compat.test.mjs
new file mode 100644
index 0000000000..9fda989acf
--- /dev/null
+++ b/packages/cli/api/component/resolution-compat.test.mjs
@@ -0,0 +1,79 @@
+// Copyright (c) Meta Platforms, Inc. and affiliates.
+
+/**
+ * @file resolution-compat.test.mjs
+ * @input The names recorded in __fixtures__/resolutions/, resolved against the
+ * real @astryxdesign/core
+ * @output Tests that each recorded name opens its recorded entry
+ * @position spec:AST-083 FR7's guard over the names that resolve through a
+ * fallback: a component's name in another case, and a module's name. Each
+ * line holds the name, the entry and doc it opens, and its `--source` file.
+ */
+
+import * as fs from 'node:fs';
+import * as path from 'node:path';
+import {fileURLToPath} from 'node:url';
+import {describe, expect, it} from 'vitest';
+import {withListingCache} from '../../foundation/fs/listing-cache.mjs';
+import {resolveCoreSourcePath, resolveUnscopedDoc} from './_adapter.mjs';
+
+const HERE = path.dirname(fileURLToPath(import.meta.url));
+const REPO = path.resolve(HERE, '../../../..');
+const CORE = path.join(REPO, 'packages', 'core');
+const SRC = path.join(CORE, 'src');
+const RECORDED = path.join(HERE, '__fixtures__', 'resolutions');
+// Each file holds a range of names. A case spelling goes through the
+// component matcher, which reads the catalog again for each name. A range
+// stays small enough for the default timeout on a busy machine.
+const RANGES = fs
+ .readdirSync(RECORDED)
+ .filter(file => file.endsWith('.txt'))
+ .sort();
+
+/**
+ * @param {string | null} file
+ * @returns {string}
+ */
+function relative(file) {
+ return file == null ? '-' : path.relative(SRC, file);
+}
+
+/**
+ * @param {string} name
+ * @returns {Promise<string>}
+ */
+async function resolution(name) {
+ let entry;
+ try {
+ const found = await resolveUnscopedDoc(name, {
+ coreDir: CORE,
+ cwd: REPO,
+ name,
+ });
+ entry = `${found.resolvedName} ${relative(found.readmePath)}`;
+ } catch (error) {
+ entry = `${/** @type {{code?: string}} */ (error).code} -`;
+ }
+ return `${name} ${entry} ${relative(resolveCoreSourcePath(CORE, name))}`;
+}
+
+describe('names that resolve through a fallback (spec:AST-083 FR7)', () => {
+ it.each(RANGES)(
+ '%s: each name keeps opening its recorded entry',
+ async range => {
+ const file = path.join(RECORDED, range);
+ const names = fs
+ .readFileSync(file, 'utf8')
+ .trim()
+ .split('\n')
+ .map(line => line.split(' ')[0]);
+ // One listing of each folder serves every lookup.
+ const lines = await withListingCache(async () => {
+ const resolved = [];
+ for (const name of names) resolved.push(await resolution(name));
+ return resolved;
+ });
+ await expect(`${lines.join('\n')}\n`).toMatchFileSnapshot(file);
+ },
+ );
+});
diff --git a/packages/cli/clients/cli/commands/component.mjs b/packages/cli/clients/cli/commands/component.mjs
index 7b5f64a0d3..6e2f7609b9 100644
--- a/packages/cli/clients/cli/commands/component.mjs
+++ b/packages/cli/clients/cli/commands/component.mjs
@@ -6,6 +6,7 @@
* Global options: --detail full|compact|brief, --lang en|zh|dense
*/
+import {withListingCache} from '../../../foundation/fs/listing-cache.mjs';
import {findCoreDir} from '../../../foundation/fs/paths.mjs';
import {
resolveImportPath,
@@ -307,15 +308,18 @@ export function registerComponent(program) {
}
}
}
+ // Each row resolves its import by walking the same source tree.
emit(
code(
- await formatBriefAll(coreDir, {
- zh,
- lang,
- themeData,
- replacements,
- categories: Object.keys(result.data.components),
- }),
+ await withListingCache(() =>
+ formatBriefAll(coreDir, {
+ zh,
+ lang,
+ themeData,
+ replacements,
+ categories: Object.keys(result.data.components),
+ }),
+ ),
),
);
break;
@@ -383,7 +387,13 @@ export function registerComponent(program) {
? section(firstGroup[0])
: section(`Components (${sorted.length})`),
records(
- sorted.map(item => ({name: item.name, import: importCell(item)})),
+ // Each row resolves its import by walking the same source tree.
+ withListingCache(() =>
+ sorted.map(item => ({
+ name: item.name,
+ import: importCell(item),
+ })),
+ ),
{fields: ['name', 'import']},
),
listFooter,
diff --git a/packages/cli/foundation/discovery/component-discovery.mjs b/packages/cli/foundation/discovery/component-discovery.mjs
index 871efe1fe4..70b3d7b887 100644
--- a/packages/cli/foundation/discovery/component-discovery.mjs
+++ b/packages/cli/foundation/discovery/component-discovery.mjs
@@ -11,6 +11,7 @@ import {DOC_EXPORTS} from '../doc-compiler/read.mjs';
import {
listDir,
listDirEntries,
+ oncePerListing,
pathExists,
withListingCache,
} from '../fs/listing-cache.mjs';
@@ -584,17 +585,26 @@ export function findComponentReadme(coreDir, name) {
* @returns {string | null}
*/
export function findComponentSource(coreDir, name) {
+ const found = ownSourceFile(coreDir, name);
+ if (found == null) return null;
+ // A component's exact name in another case (`tokenizer` for Tokenizer) is
+ // that component's. A module that only shares the spelling, such as
+ // `CodeBlock/tokenizer.ts`, never stands for it.
+ return caseSpelledComponentSource(path.join(coreDir, 'src'), name) == null
+ ? found
+ : null;
+}
+
+/**
+ * The file named for `name` in `src/`, found as {@link findComponentSource}
+ * describes, before the case-spelling check.
+ * @param {string} coreDir
+ * @param {string} name
+ * @returns {string | null}
+ */
+function ownSourceFile(coreDir, name) {
const srcDir = path.join(coreDir, 'src');
- // Try the prefixed forms (`XDSButton.tsx`) first since that is the current
- // on-disk convention, then the bare forms (`Button.tsx`) that the Astryx-prefix
- // migration (P4) renames to. `.tsx` before `.ts` within each so a component's
- // `.tsx` wins over a same-named `.ts` helper; `.ts` covers hooks/functions.
- const candidateFiles = [
- `XDS${name}.tsx`,
- `${name}.tsx`,
- `XDS${name}.ts`,
- `${name}.ts`,
- ];
+ const candidateFiles = ownFileNames(name);
/**
* @param {string} dirPath
@@ -647,6 +657,71 @@ export function findComponentSource(coreDir, name) {
return searchDir(srcDir);
}
+/**
+ * The file names a component's own source can have. The `XDS` forms come
+ * first, so an older prefixed file wins over a bare one. `.tsx` comes before
+ * `.ts`, so a component wins over a same-named helper. `.ts` covers hooks and
+ * functions.
+ * @param {string} name
+ * @returns {string[]}
+ */
+function ownFileNames(name) {
+ return [`XDS${name}.tsx`, `${name}.tsx`, `XDS${name}.ts`, `${name}.ts`];
+}
+
+// A component's name (PascalCase) or a hook's (`use` followed by PascalCase).
+const COMPONENT_OR_HOOK_NAME_RE = /^(?:use)?[A-Z][A-Za-z0-9]*$/;
+
+/**
+ * Every component or hook file in `src/`, by its stem in lower case: its
+ * stem (without an `XDS` prefix) and its path. Built once per operation.
+ * @param {string} srcDir
+ * @returns {Map<string, Array<{stem: string, file: string}>>}
+ */
+function caseStemIndex(srcDir) {
+ return oncePerListing(`case-stems\0${srcDir}`, () => {
+ /** @type {Map<string, Array<{stem: string, file: string}>>} */
+ const index = new Map();
+ /** @param {string} dirPath */
+ const visit = dirPath => {
+ for (const entry of listDirEntries(dirPath)) {
+ const entryPath = path.join(dirPath, entry.name);
+ if (entry.isDirectory()) {
+ if (entry.name !== '__tests__') visit(entryPath);
+ continue;
+ }
+ const stem = /^(?:XDS)?(.+)\.tsx?$/.exec(entry.name)?.[1];
+ if (stem == null || !COMPONENT_OR_HOOK_NAME_RE.test(stem)) continue;
+ const key = stem.toLowerCase();
+ index.set(key, [...(index.get(key) ?? []), {stem, file: entryPath}]);
+ }
+ };
+ if (pathExists(srcDir)) visit(srcDir);
+ return index;
+ });
+}
+
+/**
+ * The source of the component or hook whose exact name `name` spells in
+ * another case. A file named for it, anywhere in `src/`, exports it, as
+ * `TabList/Tab.tsx` exports Tab for `tab`. Null when no such file exists.
+ * @param {string} srcDir
+ * @param {string} name
+ * @returns {string | null}
+ */
+function caseSpelledComponentSource(srcDir, name) {
+ for (const {stem, file} of caseStemIndex(srcDir).get(name.toLowerCase()) ??
+ []) {
+ if (
+ stem !== name &&
+ (moduleExportsName(file, stem) || moduleExportsName(file, `XDS${stem}`))
+ ) {
+ return file;
+ }
+ }
+ return null;
+}
+
/**
* Compute the Levenshtein (edit) distance between two strings.
* Used for fuzzy-matching component names. Dependency-free.
diff --git a/packages/cli/foundation/discovery/component-discovery.test.mjs b/packages/cli/foundation/discovery/component-discovery.test.mjs
index 34629f71c2..4a60a4ae95 100644
--- a/packages/cli/foundation/discovery/component-discovery.test.mjs
+++ b/packages/cli/foundation/discovery/component-discovery.test.mjs
@@ -229,6 +229,89 @@ describe('familyMember', () => {
});
});
+describe('a component name in another case is that component (spec:AST-083 FR7)', () => {
+ /**
+ * @param {string} core
+ * @returns {(rel: string, text: string) => void}
+ */
+ const writer = core => (rel, text) => {
+ const file = path.join(core, 'src', rel);
+ fs.mkdirSync(path.dirname(file), {recursive: true});
+ fs.writeFileSync(file, text);
+ };
+
+ it('never resolves through a module that only shares the spelling', () => {
+ const core = mkTmp('as-cd-case-');
+ const write = writer(core);
+ write('Button/Button.tsx', 'export function Button() {}\n');
+ write('Button/Button.doc.mjs', "export const docs = {name: 'Button'};\n");
+ write('Tokenizer/Tokenizer.tsx', 'export function Tokenizer() {}\n');
+ write(
+ 'Tokenizer/Tokenizer.doc.mjs',
+ "export const docs = {name: 'Tokenizer'};\n",
+ );
+ // A motion table below a hook's doc.
+ write('motion/useAnimator.ts', 'export function useAnimator() {}\n');
+ write(
+ 'motion/useAnimator.doc.mjs',
+ "export const docs = {name: 'useAnimator'};\n",
+ );
+ write('motion/uikit/button.ts', 'export const button = {};\n');
+ // A helper module in another component's folder.
+ write('CodeBlock/CodeBlock.tsx', 'export function CodeBlock() {}\n');
+ write(
+ 'CodeBlock/CodeBlock.doc.mjs',
+ "export const docs = {name: 'CodeBlock'};\n",
+ );
+ write('CodeBlock/tokenizer.ts', 'export function tokenize() {}\n');
+ write('CodeBlock/grammar.ts', 'export const grammar = {};\n');
+ for (const name of ['button', 'tokenizer']) {
+ expect(findComponentReadme(core, name), name).toBeNull();
+ expect(findComponentSource(core, name), name).toBeNull();
+ }
+ // A module's own name keeps resolving through the nearest doc.
+ expect(findComponentReadme(core, 'grammar')).toBe(
+ path.join(core, 'src', 'CodeBlock', 'CodeBlock.doc.mjs'),
+ );
+ expect(findComponentSource(core, 'Button')).toBe(
+ path.join(core, 'src', 'Button', 'Button.tsx'),
+ );
+ });
+
+ it('protects a sub-component too: a module spelled like Tab in another case never resolves for it', () => {
+ const core = mkTmp('as-cd-sub-case-');
+ const write = writer(core);
+ write('TabList/TabList.tsx', 'export function TabList() {}\n');
+ write('TabList/Tab.tsx', 'export function Tab() {}\n');
+ write(
+ 'TabList/TabList.doc.mjs',
+ "export const docs = {name: 'TabList'};\n",
+ );
+ write('motion/useAnimator.ts', 'export function useAnimator() {}\n');
+ write(
+ 'motion/useAnimator.doc.mjs',
+ "export const docs = {name: 'useAnimator'};\n",
+ );
+ write('motion/uikit/tab.ts', 'export const tab = {};\n');
+ expect(findComponentSource(core, 'tab')).toBeNull();
+ expect(findComponentReadme(core, 'tab')).toBeNull();
+ expect(findComponentSource(core, 'Tab')).toBe(
+ path.join(core, 'src', 'TabList', 'Tab.tsx'),
+ );
+ });
+
+ it('takes a folder in another case for a component only when a file there exports its name', () => {
+ const core = mkTmp('as-cd-folder-case-');
+ const write = writer(core);
+ write('animator/animator.ts', 'export function createAnimator() {}\n');
+ write('hooks/Animator.ts', 'export function Animator() {}\n');
+ write('hooks/hooks.doc.mjs', "export const docs = {name: 'hooks'};\n");
+ expect(findComponentSource(core, 'Animator')).toBe(
+ path.join(core, 'src', 'hooks', 'Animator.ts'),
+ );
+ });
+});
+
describe('findComponentReadme / findComponentSource / resolveImportPath', () => {
it('finds the doc + source for a top-level component', () => {
expect(findComponentReadme(CORE, 'Button')).toMatch(/Button\.doc\.mjs$/);
diff --git a/packages/cli/foundation/fs/listing-cache.mjs b/packages/cli/foundation/fs/listing-cache.mjs
index b8253577e6..be7845cd36 100644
--- a/packages/cli/foundation/fs/listing-cache.mjs
+++ b/packages/cli/foundation/fs/listing-cache.mjs
@@ -7,7 +7,8 @@
* @input A read-only operation (`withListingCache(fn)`), and directory paths
* its discovery helpers list or probe.
* @output The same answers `fs.readdirSync` / `fs.existsSync` give, read from
- * disk once per path while the operation runs.
+ * disk once per path while the operation runs, and `oncePerListing`, a
+ * value computed once per operation.
* @position Used by the name resolvers in foundation/discovery and by
* `existsCaseExact`. A search or build resolves ~160 components and their
* hooks, and each resolution walks the same source tree again; inside one
@@ -25,6 +26,7 @@ import * as fs from 'node:fs';
* entries: Map<string, fs.Dirent[]>,
* byName: Map<string, Map<string, fs.Dirent>>,
* exists: Map<string, boolean>,
+ * memos: Map<string, unknown>,
* }} ListingCache
*/
@@ -46,11 +48,27 @@ export function withListingCache(fn) {
entries: new Map(),
byName: new Map(),
exists: new Map(),
+ memos: new Map(),
},
fn,
);
}
+/**
+ * `compute()` once per operation, under `key`. A later call in the same
+ * operation gets the first result; outside an operation it computes each time.
+ * @template T
+ * @param {string} key
+ * @param {() => T} compute
+ * @returns {T}
+ */
+export function oncePerListing(key, compute) {
+ const cache = scope.getStore();
+ if (!cache) return compute();
+ if (!cache.memos.has(key)) cache.memos.set(key, compute());
+ return /** @type {T} */ (cache.memos.get(key));
+}
+
/**
* Whether an operation's listing cache is active.
* @returns {boolean}
diff --git a/packages/cli/foundation/fs/listing-cache.test.mjs b/packages/cli/foundation/fs/listing-cache.test.mjs
index 56b762e597..3ff1d6ec48 100644
--- a/packages/cli/foundation/fs/listing-cache.test.mjs
+++ b/packages/cli/foundation/fs/listing-cache.test.mjs
@@ -9,6 +9,7 @@ import {
listDir,
listDirEntries,
listingCacheActive,
+ oncePerListing,
pathExists,
withListingCache,
} from './listing-cache.mjs';
@@ -80,6 +81,19 @@ describe('listing cache', () => {
});
});
+ it('computes a value once per operation, and each time outside one', () => {
+ let computed = 0;
+ const compute = () => ({count: ++computed});
+ withListingCache(() => {
+ const first = oncePerListing('key', compute);
+ expect(oncePerListing('key', compute)).toBe(first);
+ expect(computed).toBe(1);
+ });
+ oncePerListing('key', compute);
+ oncePerListing('key', compute);
+ expect(computed).toBe(3);
+ });
+
it('keeps existsCaseExact exact-case inside an operation', () => {
fs.mkdirSync(path.join(dir, 'Button'));
withListingCache(() => {
diff --git a/packages/cli/foundation/xle/registry.mjs b/packages/cli/foundation/xle/registry.mjs
index 8863c0a5f3..11e71a694d 100644
--- a/packages/cli/foundation/xle/registry.mjs
+++ b/packages/cli/foundation/xle/registry.mjs
@@ -17,6 +17,7 @@
import fs from 'node:fs';
import path from 'node:path';
+import {withListingCache} from '../fs/listing-cache.mjs';
import {findCoreDir} from '../fs/paths.mjs';
import {
discoverComponents,
@@ -106,9 +107,18 @@ let cachedRegistry = /** @type {import('./xle-ast').Registry | null} */ (null);
* @param {string} [options.cwd]
* @returns {Promise<{components: Map<string, object>, aliases: Map<string, string>, componentNames: string[]}>}
*/
-export async function buildRegistry({cwd = process.cwd()} = {}) {
+export async function buildRegistry(options = {}) {
if (cachedRegistry) return cachedRegistry;
+ // Every name's lookups walk the same source tree: read each directory once.
+ return withListingCache(() => readRegistry(options));
+}
+/**
+ * {@link buildRegistry}'s read, inside one listing operation.
+ * @param {{cwd?: string}} options
+ * @returns {ReturnType<typeof buildRegistry>}
+ */
+async function readRegistry({cwd = process.cwd()}) {
const coreDir = findCoreDir(cwd);
if (!coreDir) {
throw new Error('Could not find @astryxdesign/core package — run from an XDS workspace');