@commercetools/nimbus-mcp 0.1.0 → 2.10.0
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 +63 -14
- package/data/docs/route-manifest.json +10913 -0
- package/data/docs/routes/components-accessibility-visually-hidden.json +388 -0
- package/data/docs/routes/components-accessibility.json +34 -0
- package/data/docs/routes/components-buttons-button.json +715 -0
- package/data/docs/routes/components-buttons-icon-button.json +852 -0
- package/data/docs/routes/components-buttons-icon-toggle-button.json +594 -0
- package/data/docs/routes/components-buttons-split-button.json +670 -0
- package/data/docs/routes/components-buttons-toggle-button-group.json +722 -0
- package/data/docs/routes/components-buttons-toggle-button.json +689 -0
- package/data/docs/routes/components-buttons.json +36 -0
- package/data/docs/routes/components-data-display-badge.json +555 -0
- package/data/docs/routes/components-data-display-card.json +338 -0
- package/data/docs/routes/components-data-display-data-table.json +855 -0
- package/data/docs/routes/components-data-display-draggable-list.json +596 -0
- package/data/docs/routes/components-data-display-table.json +472 -0
- package/data/docs/routes/components-data-display-tag-group.json +535 -0
- package/data/docs/routes/components-data-display.json +34 -0
- package/data/docs/routes/components-feedback-alert.json +696 -0
- package/data/docs/routes/components-feedback-dialog.json +682 -0
- package/data/docs/routes/components-feedback-drawer.json +600 -0
- package/data/docs/routes/components-feedback-loading-spinner.json +415 -0
- package/data/docs/routes/components-feedback-progress-bar.json +661 -0
- package/data/docs/routes/components-feedback-toast.json +1040 -0
- package/data/docs/routes/components-feedback-tooltip.json +510 -0
- package/data/docs/routes/components-feedback.json +34 -0
- package/data/docs/routes/components-forms-field-errors.json +557 -0
- package/data/docs/routes/components-forms-form-field.json +848 -0
- package/data/docs/routes/components-forms-group.json +427 -0
- package/data/docs/routes/components-forms-localized-field.json +770 -0
- package/data/docs/routes/components-forms.json +37 -0
- package/data/docs/routes/components-inputs-calendar.json +611 -0
- package/data/docs/routes/components-inputs-checkbox.json +774 -0
- package/data/docs/routes/components-inputs-combo-box.json +761 -0
- package/data/docs/routes/components-inputs-date-input.json +628 -0
- package/data/docs/routes/components-inputs-date-picker.json +709 -0
- package/data/docs/routes/components-inputs-date-range-picker.json +599 -0
- package/data/docs/routes/components-inputs-money-input.json +721 -0
- package/data/docs/routes/components-inputs-multiline-text-input.json +611 -0
- package/data/docs/routes/components-inputs-number-input.json +647 -0
- package/data/docs/routes/components-inputs-password-input.json +576 -0
- package/data/docs/routes/components-inputs-radio-input.json +583 -0
- package/data/docs/routes/components-inputs-range-calendar.json +607 -0
- package/data/docs/routes/components-inputs-rich-text-input.json +599 -0
- package/data/docs/routes/components-inputs-scoped-search-input.json +570 -0
- package/data/docs/routes/components-inputs-search-input.json +588 -0
- package/data/docs/routes/components-inputs-select-input.json +960 -0
- package/data/docs/routes/components-inputs-switch.json +720 -0
- package/data/docs/routes/components-inputs-text-input.json +566 -0
- package/data/docs/routes/components-inputs-time-input.json +775 -0
- package/data/docs/routes/components-inputs.json +34 -0
- package/data/docs/routes/components-layout-box.json +501 -0
- package/data/docs/routes/components-layout-defaultpage.json +748 -0
- package/data/docs/routes/components-layout-flex.json +587 -0
- package/data/docs/routes/components-layout-grid.json +393 -0
- package/data/docs/routes/components-layout-modalpage.json +716 -0
- package/data/docs/routes/components-layout-pagecontent.json +673 -0
- package/data/docs/routes/components-layout-separator.json +461 -0
- package/data/docs/routes/components-layout-simple-grid.json +519 -0
- package/data/docs/routes/components-layout-spacer.json +573 -0
- package/data/docs/routes/components-layout-stack.json +481 -0
- package/data/docs/routes/components-layout.json +34 -0
- package/data/docs/routes/components-media-avatar.json +427 -0
- package/data/docs/routes/components-media-icon.json +663 -0
- package/data/docs/routes/components-media-image.json +511 -0
- package/data/docs/routes/components-media-inline-svg.json +586 -0
- package/data/docs/routes/components-media.json +34 -0
- package/data/docs/routes/components-navigation-accordion.json +643 -0
- package/data/docs/routes/components-navigation-collapsible-motion.json +628 -0
- package/data/docs/routes/components-navigation-link.json +554 -0
- package/data/docs/routes/components-navigation-menu.json +546 -0
- package/data/docs/routes/components-navigation-pagination.json +502 -0
- package/data/docs/routes/components-navigation-steps.json +629 -0
- package/data/docs/routes/components-navigation-tabnav.json +546 -0
- package/data/docs/routes/components-navigation-tabs.json +635 -0
- package/data/docs/routes/components-navigation-toolbar.json +549 -0
- package/data/docs/routes/components-navigation.json +34 -0
- package/data/docs/routes/components-typography-code.json +39 -0
- package/data/docs/routes/components-typography-heading.json +402 -0
- package/data/docs/routes/components-typography-kbd.json +399 -0
- package/data/docs/routes/components-typography-list.json +593 -0
- package/data/docs/routes/components-typography-text.json +444 -0
- package/data/docs/routes/components-typography.json +34 -0
- package/data/docs/routes/components-utilities-nimbus-i18n-provider.json +295 -0
- package/data/docs/routes/components-utilities-nimbus-provider.json +663 -0
- package/data/docs/routes/components-utilities.json +34 -0
- package/data/docs/routes/components.json +33 -0
- package/data/docs/routes/home-contribute-adrs-adr0001-consumer-component-apis.json +314 -0
- package/data/docs/routes/home-contribute-adrs-adr0002-compound-component-extraction.json +160 -0
- package/data/docs/routes/home-contribute-adrs-adr0003-component-lifecycle-states.json +460 -0
- package/data/docs/routes/home-contribute-adrs.json +205 -0
- package/data/docs/routes/home-contribute-development-setup.json +213 -0
- package/data/docs/routes/home-contribute-stats.json +36 -0
- package/data/docs/routes/home-contribute.json +36 -0
- package/data/docs/routes/home-design-tokens-aspect-ratios.json +36 -0
- package/data/docs/routes/home-design-tokens-borders.json +35 -0
- package/data/docs/routes/home-design-tokens-colors.json +157 -0
- package/data/docs/routes/home-design-tokens-other-animations.json +119 -0
- package/data/docs/routes/home-design-tokens-other-blurs.json +36 -0
- package/data/docs/routes/home-design-tokens-other-breakpoints.json +61 -0
- package/data/docs/routes/home-design-tokens-other-cursors.json +36 -0
- package/data/docs/routes/home-design-tokens-other-z-indices.json +39 -0
- package/data/docs/routes/home-design-tokens-other.json +35 -0
- package/data/docs/routes/home-design-tokens-radii.json +59 -0
- package/data/docs/routes/home-design-tokens-shadows.json +57 -0
- package/data/docs/routes/home-design-tokens-sizes.json +137 -0
- package/data/docs/routes/home-design-tokens-spacing.json +36 -0
- package/data/docs/routes/home-design-tokens-typography.json +184 -0
- package/data/docs/routes/home-design-tokens.json +34 -0
- package/data/docs/routes/home-getting-started-core-concepts.json +301 -0
- package/data/docs/routes/home-getting-started-installation.json +621 -0
- package/data/docs/routes/home-getting-started-mcp-server-overview.json +139 -0
- package/data/docs/routes/home-getting-started-mcp-server-setup.json +316 -0
- package/data/docs/routes/home-getting-started-release-process.json +294 -0
- package/data/docs/routes/home-getting-started-testing-setup.json +296 -0
- package/data/docs/routes/home-playground-markdown.json +638 -0
- package/data/docs/routes/home-playground-toc.json +169 -0
- package/data/docs/routes/home-playground.json +34 -0
- package/data/docs/routes/home-style-props-background.json +236 -0
- package/data/docs/routes/home-style-props-border.json +310 -0
- package/data/docs/routes/home-style-props-display.json +120 -0
- package/data/docs/routes/home-style-props-effects.json +116 -0
- package/data/docs/routes/home-style-props-filters.json +396 -0
- package/data/docs/routes/home-style-props-flex-and-grid.json +496 -0
- package/data/docs/routes/home-style-props-interactivity.json +356 -0
- package/data/docs/routes/home-style-props-layout.json +422 -0
- package/data/docs/routes/home-style-props-list.json +116 -0
- package/data/docs/routes/home-style-props-sizing.json +244 -0
- package/data/docs/routes/home-style-props-spacing.json +228 -0
- package/data/docs/routes/home-style-props-svg.json +96 -0
- package/data/docs/routes/home-style-props-tables.json +116 -0
- package/data/docs/routes/home-style-props-transforms.json +216 -0
- package/data/docs/routes/home-style-props-transitions.json +216 -0
- package/data/docs/routes/home-style-props-typography.json +536 -0
- package/data/docs/routes/home-style-props.json +33 -0
- package/data/docs/routes/home.json +32 -0
- package/data/docs/routes/hooks-usecopytoclipboard.json +76 -0
- package/data/docs/routes/hooks-usehotkeys.json +117 -0
- package/data/docs/routes/hooks.json +33 -0
- package/data/docs/routes/icons.json +32 -0
- package/data/docs/routes/patterns-fields-date-range-picker-field.json +393 -0
- package/data/docs/routes/patterns-fields-money-input-field.json +415 -0
- package/data/docs/routes/patterns-fields-multiline-text-input-field.json +404 -0
- package/data/docs/routes/patterns-fields-number-input-field.json +470 -0
- package/data/docs/routes/patterns-fields-password-input-field.json +319 -0
- package/data/docs/routes/patterns-fields-search-input-field.json +382 -0
- package/data/docs/routes/patterns-fields-text-input-field.json +404 -0
- package/data/docs/routes/patterns-fields.json +78 -0
- package/data/docs/routes/patterns.json +34 -0
- package/data/docs/search-index.json +1 -0
- package/data/docs/types/Accordion.json +12 -0
- package/data/docs/types/AccordionContent.json +286 -0
- package/data/docs/types/AccordionHeader.json +891 -0
- package/data/docs/types/AccordionHeaderRightContent.json +27 -0
- package/data/docs/types/AccordionItem.json +242 -0
- package/data/docs/types/AccordionRoot.json +162 -0
- package/data/docs/types/Alert.json +12 -0
- package/data/docs/types/AlertActions.json +11 -0
- package/data/docs/types/AlertDescription.json +118 -0
- package/data/docs/types/AlertDismissButton.json +937 -0
- package/data/docs/types/AlertRoot.json +42 -0
- package/data/docs/types/AlertTitle.json +118 -0
- package/data/docs/types/Avatar.json +125 -0
- package/data/docs/types/Badge.json +64 -0
- package/data/docs/types/Body.json +67 -0
- package/data/docs/types/Box.json +85 -0
- package/data/docs/types/Button.json +1015 -0
- package/data/docs/types/Calendar.json +565 -0
- package/data/docs/types/Caption.json +67 -0
- package/data/docs/types/Card.json +12 -0
- package/data/docs/types/CardContent.json +27 -0
- package/data/docs/types/CardHeader.json +27 -0
- package/data/docs/types/CardRoot.json +106 -0
- package/data/docs/types/Cell.json +227 -0
- package/data/docs/types/Checkbox.json +897 -0
- package/data/docs/types/Code.json +112 -0
- package/data/docs/types/CollapsibleMotionContent.json +35 -0
- package/data/docs/types/CollapsibleMotionRoot.json +99 -0
- package/data/docs/types/CollapsibleMotionTrigger.json +71 -0
- package/data/docs/types/Column.json +101 -0
- package/data/docs/types/ColumnGroup.json +101 -0
- package/data/docs/types/ColumnHeader.json +193 -0
- package/data/docs/types/ComboBoxListBox.json +751 -0
- package/data/docs/types/ComboBoxOption.json +672 -0
- package/data/docs/types/ComboBoxPopover.json +786 -0
- package/data/docs/types/ComboBoxRoot.json +747 -0
- package/data/docs/types/ComboBoxSection.json +277 -0
- package/data/docs/types/ComboBoxTrigger.json +70 -0
- package/data/docs/types/Content.json +33 -0
- package/data/docs/types/DataTable.json +596 -0
- package/data/docs/types/DataTableBody.json +223 -0
- package/data/docs/types/DataTableFooter.json +27 -0
- package/data/docs/types/DataTableHeader.json +269 -0
- package/data/docs/types/DataTableManager.json +11 -0
- package/data/docs/types/DataTableRoot.json +590 -0
- package/data/docs/types/DataTableTable.json +271 -0
- package/data/docs/types/DateInput.json +792 -0
- package/data/docs/types/DatePicker.json +700 -0
- package/data/docs/types/DateRangePicker.json +936 -0
- package/data/docs/types/DateRangePickerField.json +1047 -0
- package/data/docs/types/DefaultPage.json +12 -0
- package/data/docs/types/DefaultPageActions.json +27 -0
- package/data/docs/types/DefaultPageBackLink.json +213 -0
- package/data/docs/types/DefaultPageContent.json +27 -0
- package/data/docs/types/DefaultPageFooter.json +27 -0
- package/data/docs/types/DefaultPageHeader.json +27 -0
- package/data/docs/types/DefaultPageRoot.json +106 -0
- package/data/docs/types/DefaultPageSubtitle.json +27 -0
- package/data/docs/types/DefaultPageTabNav.json +28 -0
- package/data/docs/types/DefaultPageTitle.json +27 -0
- package/data/docs/types/DialogBody.json +27 -0
- package/data/docs/types/DialogCloseTrigger.json +939 -0
- package/data/docs/types/DialogContent.json +27 -0
- package/data/docs/types/DialogFooter.json +27 -0
- package/data/docs/types/DialogHeader.json +27 -0
- package/data/docs/types/DialogRoot.json +138 -0
- package/data/docs/types/DialogTitle.json +27 -0
- package/data/docs/types/DialogTrigger.json +80 -0
- package/data/docs/types/DraggableList.json +12 -0
- package/data/docs/types/DraggableListField.json +894 -0
- package/data/docs/types/DraggableListItem.json +574 -0
- package/data/docs/types/DraggableListRoot.json +745 -0
- package/data/docs/types/Drawer.json +12 -0
- package/data/docs/types/DrawerBody.json +27 -0
- package/data/docs/types/DrawerCloseTrigger.json +939 -0
- package/data/docs/types/DrawerContent.json +27 -0
- package/data/docs/types/DrawerFooter.json +27 -0
- package/data/docs/types/DrawerHeader.json +27 -0
- package/data/docs/types/DrawerRoot.json +142 -0
- package/data/docs/types/DrawerTitle.json +27 -0
- package/data/docs/types/DrawerTrigger.json +80 -0
- package/data/docs/types/FieldErrors.getBuiltInMessage.json +11 -0
- package/data/docs/types/FieldErrors.getCustomMessage.json +9 -0
- package/data/docs/types/FieldErrors.json +109 -0
- package/data/docs/types/Flex.json +238 -0
- package/data/docs/types/Footer.json +67 -0
- package/data/docs/types/FormFieldDescription.json +11 -0
- package/data/docs/types/FormFieldError.json +11 -0
- package/data/docs/types/FormFieldInfoBox.json +27 -0
- package/data/docs/types/FormFieldInput.json +11 -0
- package/data/docs/types/FormFieldLabel.json +11 -0
- package/data/docs/types/FormFieldRoot.json +148 -0
- package/data/docs/types/Grid.json +253 -0
- package/data/docs/types/GridProps.json +11 -0
- package/data/docs/types/Group.json +143 -0
- package/data/docs/types/Header.json +67 -0
- package/data/docs/types/Heading.json +109 -0
- package/data/docs/types/Icon.json +112 -0
- package/data/docs/types/IconButton.json +1019 -0
- package/data/docs/types/IconToggleButton.json +787 -0
- package/data/docs/types/Image.json +373 -0
- package/data/docs/types/Indicator.json +67 -0
- package/data/docs/types/InlineSvg.json +98 -0
- package/data/docs/types/Item.json +67 -0
- package/data/docs/types/Kbd.json +118 -0
- package/data/docs/types/Link.json +380 -0
- package/data/docs/types/List.json +12 -0
- package/data/docs/types/ListIndicator.json +70 -0
- package/data/docs/types/ListItem.json +70 -0
- package/data/docs/types/ListRoot.json +124 -0
- package/data/docs/types/LoadingSpinner.json +87 -0
- package/data/docs/types/LocalizedField.json +460 -0
- package/data/docs/types/LocalizedStringFormatter.json +9 -0
- package/data/docs/types/MakeElementFocusable.json +196 -0
- package/data/docs/types/MenuContent.json +111 -0
- package/data/docs/types/MenuItem.json +671 -0
- package/data/docs/types/MenuRoot.json +670 -0
- package/data/docs/types/MenuSection.json +364 -0
- package/data/docs/types/MenuSubmenu.json +111 -0
- package/data/docs/types/MenuSubmenuTrigger.json +67 -0
- package/data/docs/types/MenuTrigger.json +906 -0
- package/data/docs/types/ModalPage.json +12 -0
- package/data/docs/types/ModalPageActions.json +27 -0
- package/data/docs/types/ModalPageContent.json +27 -0
- package/data/docs/types/ModalPageFooter.json +27 -0
- package/data/docs/types/ModalPageHeader.json +27 -0
- package/data/docs/types/ModalPageRoot.json +87 -0
- package/data/docs/types/ModalPageSubtitle.json +27 -0
- package/data/docs/types/ModalPageTabNav.json +28 -0
- package/data/docs/types/ModalPageTitle.json +27 -0
- package/data/docs/types/ModalPageTopBar.json +57 -0
- package/data/docs/types/MoneyInput.isEmpty.json +40 -0
- package/data/docs/types/MoneyInput.json +282 -0
- package/data/docs/types/MoneyInputField.json +379 -0
- package/data/docs/types/MoneyInputFieldProps.json +9 -0
- package/data/docs/types/MultilineTextInput.json +1194 -0
- package/data/docs/types/MultilineTextInputField.json +1269 -0
- package/data/docs/types/MultilineTextInputFieldProps.json +9 -0
- package/data/docs/types/NimbusI18nProvider.json +42 -0
- package/data/docs/types/NimbusI18nProviderProps.json +9 -0
- package/data/docs/types/NimbusProvider.json +270 -0
- package/data/docs/types/NumberInput.json +952 -0
- package/data/docs/types/NumberInputField.json +1004 -0
- package/data/docs/types/NumberInputFieldProps.json +9 -0
- package/data/docs/types/PageContent.json +11 -0
- package/data/docs/types/PageContentColumn.json +99 -0
- package/data/docs/types/PageContentRoot.json +114 -0
- package/data/docs/types/Pagination.json +159 -0
- package/data/docs/types/PasswordInput.json +1120 -0
- package/data/docs/types/PasswordInputField.json +1216 -0
- package/data/docs/types/PasswordInputFieldProps.json +9 -0
- package/data/docs/types/ProgressBar.json +280 -0
- package/data/docs/types/RadioInputOption.json +550 -0
- package/data/docs/types/RadioInputRoot.json +514 -0
- package/data/docs/types/RangeCalendar.json +618 -0
- package/data/docs/types/RichTextInput.json +134 -0
- package/data/docs/types/Root.json +122 -0
- package/data/docs/types/Row.json +67 -0
- package/data/docs/types/ScopedSearchInput.isEmpty.json +40 -0
- package/data/docs/types/ScopedSearchInput.json +253 -0
- package/data/docs/types/ScrollArea.json +82 -0
- package/data/docs/types/SearchInput.json +1165 -0
- package/data/docs/types/SearchInputField.json +1240 -0
- package/data/docs/types/Select.json +12 -0
- package/data/docs/types/SelectOption.json +572 -0
- package/data/docs/types/SelectOptionGroup.json +215 -0
- package/data/docs/types/SelectOptions.json +693 -0
- package/data/docs/types/SelectRoot.json +926 -0
- package/data/docs/types/Separator.json +65 -0
- package/data/docs/types/SimpleGrid.json +291 -0
- package/data/docs/types/Spacer.json +27 -0
- package/data/docs/types/SpacerProps.json +9 -0
- package/data/docs/types/SplitButton.json +203 -0
- package/data/docs/types/Stack.json +144 -0
- package/data/docs/types/Steps.json +12 -0
- package/data/docs/types/StepsChangeDetails.json +9 -0
- package/data/docs/types/StepsCompletedContent.json +28 -0
- package/data/docs/types/StepsCompletedContentProps.json +9 -0
- package/data/docs/types/StepsContent.json +43 -0
- package/data/docs/types/StepsContentProps.json +9 -0
- package/data/docs/types/StepsDescription.json +28 -0
- package/data/docs/types/StepsDescriptionProps.json +9 -0
- package/data/docs/types/StepsIndicator.json +28 -0
- package/data/docs/types/StepsIndicatorProps.json +9 -0
- package/data/docs/types/StepsItem.json +43 -0
- package/data/docs/types/StepsItemProps.json +9 -0
- package/data/docs/types/StepsList.json +28 -0
- package/data/docs/types/StepsListProps.json +9 -0
- package/data/docs/types/StepsNextTrigger.json +62 -0
- package/data/docs/types/StepsNextTriggerProps.json +9 -0
- package/data/docs/types/StepsNumber.json +28 -0
- package/data/docs/types/StepsNumberProps.json +9 -0
- package/data/docs/types/StepsPrevTrigger.json +62 -0
- package/data/docs/types/StepsPrevTriggerProps.json +9 -0
- package/data/docs/types/StepsRoot.json +183 -0
- package/data/docs/types/StepsRootProps.json +11 -0
- package/data/docs/types/StepsSeparator.json +28 -0
- package/data/docs/types/StepsSeparatorProps.json +9 -0
- package/data/docs/types/StepsStatus.json +57 -0
- package/data/docs/types/StepsStatusProps.json +9 -0
- package/data/docs/types/StepsTitle.json +28 -0
- package/data/docs/types/StepsTitleProps.json +9 -0
- package/data/docs/types/StepsTrigger.json +47 -0
- package/data/docs/types/StepsTriggerProps.json +9 -0
- package/data/docs/types/Switch.json +371 -0
- package/data/docs/types/TabListProps.json +9 -0
- package/data/docs/types/TabNav.json +12 -0
- package/data/docs/types/TabNavItem.json +300 -0
- package/data/docs/types/TabNavItemProps.json +9 -0
- package/data/docs/types/TabNavProps.json +9 -0
- package/data/docs/types/TabNavRoot.json +80 -0
- package/data/docs/types/TabPanelProps.json +9 -0
- package/data/docs/types/TabPanelsProps.json +9 -0
- package/data/docs/types/TabProps.json +9 -0
- package/data/docs/types/Table.json +9 -0
- package/data/docs/types/TableBody.json +67 -0
- package/data/docs/types/TableBodyProps.json +9 -0
- package/data/docs/types/TableCaption.json +67 -0
- package/data/docs/types/TableCaptionProps.json +9 -0
- package/data/docs/types/TableCell.json +227 -0
- package/data/docs/types/TableCellProps.json +9 -0
- package/data/docs/types/TableColumn.json +101 -0
- package/data/docs/types/TableColumnGroup.json +101 -0
- package/data/docs/types/TableColumnGroupProps.json +9 -0
- package/data/docs/types/TableColumnHeader.json +193 -0
- package/data/docs/types/TableColumnHeaderProps.json +9 -0
- package/data/docs/types/TableColumnProps.json +9 -0
- package/data/docs/types/TableFooter.json +67 -0
- package/data/docs/types/TableFooterProps.json +9 -0
- package/data/docs/types/TableHeader.json +67 -0
- package/data/docs/types/TableHeaderProps.json +9 -0
- package/data/docs/types/TableRoot.json +365 -0
- package/data/docs/types/TableRootProps.json +12 -0
- package/data/docs/types/TableRow.json +67 -0
- package/data/docs/types/TableRowProps.json +9 -0
- package/data/docs/types/TableScrollArea.json +82 -0
- package/data/docs/types/TableScrollAreaProps.json +9 -0
- package/data/docs/types/Tabs.json +12 -0
- package/data/docs/types/TabsList.json +110 -0
- package/data/docs/types/TabsPanel.json +112 -0
- package/data/docs/types/TabsPanels.json +108 -0
- package/data/docs/types/TabsRoot.json +211 -0
- package/data/docs/types/TabsTab.json +174 -0
- package/data/docs/types/TagGroup.json +12 -0
- package/data/docs/types/TagGroupRoot.json +306 -0
- package/data/docs/types/TagGroupTag.json +595 -0
- package/data/docs/types/TagGroupTagList.json +166 -0
- package/data/docs/types/Text.json +119 -0
- package/data/docs/types/TextInput.json +1156 -0
- package/data/docs/types/TextInputField.json +1263 -0
- package/data/docs/types/TimeInput.json +752 -0
- package/data/docs/types/ToastAction.json +9 -0
- package/data/docs/types/ToastManagerApi.json +9 -0
- package/data/docs/types/ToastOptions.json +9 -0
- package/data/docs/types/ToastOutlet.json +12 -0
- package/data/docs/types/ToastPlacement.json +9 -0
- package/data/docs/types/ToastPromiseOptions.json +9 -0
- package/data/docs/types/ToastType.json +9 -0
- package/data/docs/types/ToastVariant.json +9 -0
- package/data/docs/types/ToggleButton.json +789 -0
- package/data/docs/types/ToggleButtonGroup.json +9 -0
- package/data/docs/types/ToggleButtonGroupButton.json +331 -0
- package/data/docs/types/ToggleButtonGroupRoot.json +269 -0
- package/data/docs/types/Toolbar.json +176 -0
- package/data/docs/types/Tooltip.json +12 -0
- package/data/docs/types/TooltipContent.json +372 -0
- package/data/docs/types/TooltipRoot.json +179 -0
- package/data/docs/types/Trigger.json +69 -0
- package/data/docs/types/VisuallyHidden.json +93 -0
- package/data/docs/types/__object.json +12 -0
- package/data/docs/types/filters.json +11 -0
- package/data/docs/types/manifest.json +278 -0
- package/data/docs/types/toast.json +234 -0
- package/data/docs/types/useColorMode.json +13 -0
- package/data/docs/types/useColorModeValue.json +13 -0
- package/data/docs/types/useColorScheme.json +12 -0
- package/data/docs/types/useLocalizedStringFormatter.json +14 -0
- package/data/icons.json +21940 -0
- package/data/tokens.json +40061 -0
- package/dist/index.js +2516 -17
- package/package.json +25 -6
- package/dist/data-loader.d.ts +0 -102
- package/dist/data-loader.js +0 -104
- package/dist/index.d.ts +0 -13
- package/dist/server.d.ts +0 -9
- package/dist/server.js +0 -22
- package/dist/server.spec.d.ts +0 -1
- package/dist/server.spec.js +0 -69
- package/dist/tools/list-components.d.ts +0 -9
- package/dist/tools/list-components.js +0 -42
- package/dist/types.d.ts +0 -28
- package/dist/types.js +0 -4
- package/src/data-loader.ts +0 -226
- package/src/index.ts +0 -29
- package/src/server.spec.ts +0 -86
- package/src/server.ts +0 -28
- package/src/tools/list-components.ts +0 -49
- package/src/types.ts +0 -31
- package/tsconfig.json +0 -14
- package/vitest.config.ts +0 -9
package/package.json
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools/nimbus-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "MCP server for the Nimbus design system",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public",
|
|
8
|
+
"registry": "https://registry.npmjs.org/"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"data"
|
|
13
|
+
],
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/commercetools/nimbus.git"
|
|
17
|
+
},
|
|
6
18
|
"bin": {
|
|
7
19
|
"nimbus-mcp": "./dist/index.js"
|
|
8
20
|
},
|
|
@@ -13,16 +25,23 @@
|
|
|
13
25
|
},
|
|
14
26
|
"dependencies": {
|
|
15
27
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
16
|
-
"fuse.js": "^7.1.0",
|
|
17
28
|
"zod": "^3.25.67"
|
|
18
29
|
},
|
|
19
30
|
"devDependencies": {
|
|
20
|
-
"@
|
|
31
|
+
"@modelcontextprotocol/inspector": "^0.21.2",
|
|
32
|
+
"@types/node": "^24.11.0",
|
|
33
|
+
"tsup": "^8.5.1",
|
|
34
|
+
"tsx": "^4.21.0",
|
|
21
35
|
"typescript": "~5.9.3",
|
|
22
|
-
"
|
|
36
|
+
"@commercetools/nimbus": "^2.10.0",
|
|
37
|
+
"@commercetools/nimbus-icons": "^2.10.0",
|
|
38
|
+
"@commercetools/nimbus-tokens": "^2.10.0"
|
|
23
39
|
},
|
|
24
40
|
"scripts": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
41
|
+
"prebuild": "tsx scripts/prebuild.ts",
|
|
42
|
+
"build": "pnpm prebuild && tsup",
|
|
43
|
+
"dev": "tsx src/index.ts",
|
|
44
|
+
"mcp-inspector": "mcp-inspector tsx src/index.ts",
|
|
45
|
+
"mcp-inspector:cli": "mcp-inspector --cli tsx src/index.ts"
|
|
27
46
|
}
|
|
28
47
|
}
|
package/dist/data-loader.d.ts
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/** Returns `true` when running inside the Nimbus monorepo. */
|
|
2
|
-
export declare function isMonorepoMode(): boolean;
|
|
3
|
-
/** Returns the resolved data directory for the current mode. */
|
|
4
|
-
export declare function getDataDir(): string;
|
|
5
|
-
export interface RouteManifestEntry {
|
|
6
|
-
path: string;
|
|
7
|
-
id: string;
|
|
8
|
-
title: string;
|
|
9
|
-
description: string;
|
|
10
|
-
category: string;
|
|
11
|
-
tags: string[];
|
|
12
|
-
menu: string[];
|
|
13
|
-
order: number;
|
|
14
|
-
chunkName: string;
|
|
15
|
-
tabs?: Array<{
|
|
16
|
-
key: string;
|
|
17
|
-
title: string;
|
|
18
|
-
order: number;
|
|
19
|
-
}>;
|
|
20
|
-
}
|
|
21
|
-
export interface RouteManifest {
|
|
22
|
-
routes: RouteManifestEntry[];
|
|
23
|
-
}
|
|
24
|
-
export declare const getRouteManifest: () => Promise<RouteManifest>;
|
|
25
|
-
export interface RouteData {
|
|
26
|
-
meta: {
|
|
27
|
-
id: string;
|
|
28
|
-
title: string;
|
|
29
|
-
description: string;
|
|
30
|
-
route: string;
|
|
31
|
-
menu: string[];
|
|
32
|
-
tags: string[];
|
|
33
|
-
toc?: Array<{
|
|
34
|
-
id: string;
|
|
35
|
-
title: string;
|
|
36
|
-
depth: number;
|
|
37
|
-
}>;
|
|
38
|
-
[key: string]: unknown;
|
|
39
|
-
};
|
|
40
|
-
[key: string]: unknown;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Loads a per-component route JSON by slug.
|
|
44
|
-
* Example: `getRouteData("components-inputs-button")`
|
|
45
|
-
*/
|
|
46
|
-
export declare function getRouteData(slug: string): Promise<RouteData>;
|
|
47
|
-
export interface TypeData {
|
|
48
|
-
displayName: string;
|
|
49
|
-
description: string;
|
|
50
|
-
filePath: string;
|
|
51
|
-
props: Record<string, {
|
|
52
|
-
name: string;
|
|
53
|
-
description: string;
|
|
54
|
-
required: boolean;
|
|
55
|
-
type: {
|
|
56
|
-
name: string;
|
|
57
|
-
};
|
|
58
|
-
defaultValue?: {
|
|
59
|
-
value: string;
|
|
60
|
-
};
|
|
61
|
-
}>;
|
|
62
|
-
methods: unknown[];
|
|
63
|
-
tags: Record<string, string>;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Loads a per-component type JSON by component name.
|
|
67
|
-
* Example: `getTypeData("Button")`
|
|
68
|
-
*/
|
|
69
|
-
export declare function getTypeData(componentName: string): Promise<TypeData>;
|
|
70
|
-
export declare const getTypesIndex: () => Promise<TypeData[]>;
|
|
71
|
-
export interface SearchIndexEntry {
|
|
72
|
-
id: string;
|
|
73
|
-
title: string;
|
|
74
|
-
description: string;
|
|
75
|
-
tags: string[];
|
|
76
|
-
route: string;
|
|
77
|
-
menu: string[];
|
|
78
|
-
content: string;
|
|
79
|
-
}
|
|
80
|
-
export declare const getSearchIndex: () => Promise<SearchIndexEntry[]>;
|
|
81
|
-
export interface DocEntry {
|
|
82
|
-
meta: {
|
|
83
|
-
id: string;
|
|
84
|
-
title: string;
|
|
85
|
-
description: string;
|
|
86
|
-
route: string;
|
|
87
|
-
menu: string[];
|
|
88
|
-
tags: string[];
|
|
89
|
-
[key: string]: unknown;
|
|
90
|
-
};
|
|
91
|
-
mdx: string;
|
|
92
|
-
}
|
|
93
|
-
export type DocsManifest = Record<string, DocEntry>;
|
|
94
|
-
export declare const getDocsManifest: () => Promise<DocsManifest>;
|
|
95
|
-
/**
|
|
96
|
-
* Returns docs entries whose route starts with `home/design-tokens`.
|
|
97
|
-
*/
|
|
98
|
-
export declare function getTokenData(): Promise<DocEntry[]>;
|
|
99
|
-
/**
|
|
100
|
-
* Returns the Icons docs entry from the docs manifest.
|
|
101
|
-
*/
|
|
102
|
-
export declare function getIconData(): Promise<DocEntry | undefined>;
|
package/dist/data-loader.js
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { resolve, dirname } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
-
/**
|
|
7
|
-
* Resolves the package root by walking up from the current file's directory
|
|
8
|
-
* until we find the package.json for nimbus-mcp.
|
|
9
|
-
*/
|
|
10
|
-
function findPackageRoot() {
|
|
11
|
-
let dir = __dirname;
|
|
12
|
-
while (dir !== dirname(dir)) {
|
|
13
|
-
if (existsSync(resolve(dir, "package.json"))) {
|
|
14
|
-
return dir;
|
|
15
|
-
}
|
|
16
|
-
dir = dirname(dir);
|
|
17
|
-
}
|
|
18
|
-
return __dirname;
|
|
19
|
-
}
|
|
20
|
-
const PACKAGE_ROOT = findPackageRoot();
|
|
21
|
-
/** Path to route-manifest.json when running inside the monorepo. */
|
|
22
|
-
const MONOREPO_DATA_DIR = resolve(PACKAGE_ROOT, "../../apps/docs/src/data");
|
|
23
|
-
/** Path to bundled data shipped with the npm package. */
|
|
24
|
-
const BUNDLED_DATA_DIR = resolve(PACKAGE_ROOT, "data");
|
|
25
|
-
/** Marker file used to detect monorepo mode. */
|
|
26
|
-
const MONOREPO_MARKER = resolve(MONOREPO_DATA_DIR, "route-manifest.json");
|
|
27
|
-
// ---------------------------------------------------------------------------
|
|
28
|
-
// Mode detection
|
|
29
|
-
// ---------------------------------------------------------------------------
|
|
30
|
-
let _isMonorepo = null;
|
|
31
|
-
/** Returns `true` when running inside the Nimbus monorepo. */
|
|
32
|
-
export function isMonorepoMode() {
|
|
33
|
-
if (_isMonorepo === null) {
|
|
34
|
-
_isMonorepo = existsSync(MONOREPO_MARKER);
|
|
35
|
-
}
|
|
36
|
-
return _isMonorepo;
|
|
37
|
-
}
|
|
38
|
-
/** Returns the resolved data directory for the current mode. */
|
|
39
|
-
export function getDataDir() {
|
|
40
|
-
return isMonorepoMode() ? MONOREPO_DATA_DIR : BUNDLED_DATA_DIR;
|
|
41
|
-
}
|
|
42
|
-
// ---------------------------------------------------------------------------
|
|
43
|
-
// Generic helpers
|
|
44
|
-
// ---------------------------------------------------------------------------
|
|
45
|
-
async function readJson(filePath) {
|
|
46
|
-
const raw = await readFile(filePath, "utf-8");
|
|
47
|
-
return JSON.parse(raw);
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Creates a lazy accessor that reads and caches a JSON file on first call.
|
|
51
|
-
*/
|
|
52
|
-
function lazyJson(relativePath) {
|
|
53
|
-
let cached;
|
|
54
|
-
return async () => {
|
|
55
|
-
if (cached === undefined) {
|
|
56
|
-
const fullPath = resolve(getDataDir(), relativePath);
|
|
57
|
-
cached = await readJson(fullPath);
|
|
58
|
-
}
|
|
59
|
-
return cached;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export const getRouteManifest = lazyJson("route-manifest.json");
|
|
63
|
-
/**
|
|
64
|
-
* Loads a per-component route JSON by slug.
|
|
65
|
-
* Example: `getRouteData("components-inputs-button")`
|
|
66
|
-
*/
|
|
67
|
-
export async function getRouteData(slug) {
|
|
68
|
-
const fullPath = resolve(getDataDir(), "routes", `${slug}.json`);
|
|
69
|
-
return readJson(fullPath);
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Loads a per-component type JSON by component name.
|
|
73
|
-
* Example: `getTypeData("Button")`
|
|
74
|
-
*/
|
|
75
|
-
export async function getTypeData(componentName) {
|
|
76
|
-
const fullPath = resolve(getDataDir(), "types", `${componentName}.json`);
|
|
77
|
-
return readJson(fullPath);
|
|
78
|
-
}
|
|
79
|
-
// ---------------------------------------------------------------------------
|
|
80
|
-
// Types index
|
|
81
|
-
// ---------------------------------------------------------------------------
|
|
82
|
-
export const getTypesIndex = lazyJson("types.json");
|
|
83
|
-
export const getSearchIndex = lazyJson("search-index.json");
|
|
84
|
-
export const getDocsManifest = lazyJson("docs.json");
|
|
85
|
-
// ---------------------------------------------------------------------------
|
|
86
|
-
// Convenience: token data
|
|
87
|
-
// ---------------------------------------------------------------------------
|
|
88
|
-
/**
|
|
89
|
-
* Returns docs entries whose route starts with `home/design-tokens`.
|
|
90
|
-
*/
|
|
91
|
-
export async function getTokenData() {
|
|
92
|
-
const docs = await getDocsManifest();
|
|
93
|
-
return Object.values(docs).filter((entry) => entry.meta.route.startsWith("design-tokens"));
|
|
94
|
-
}
|
|
95
|
-
// ---------------------------------------------------------------------------
|
|
96
|
-
// Convenience: icon data
|
|
97
|
-
// ---------------------------------------------------------------------------
|
|
98
|
-
/**
|
|
99
|
-
* Returns the Icons docs entry from the docs manifest.
|
|
100
|
-
*/
|
|
101
|
-
export async function getIconData() {
|
|
102
|
-
const docs = await getDocsManifest();
|
|
103
|
-
return Object.values(docs).find((entry) => entry.meta.id === "Icons" || entry.meta.route.includes("icons"));
|
|
104
|
-
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Nimbus MCP Server — stdio entry point.
|
|
4
|
-
*
|
|
5
|
-
* Connects the MCP server to stdin/stdout so it can be used with any MCP
|
|
6
|
-
* client (e.g. Claude Desktop, Claude Code) via the stdio transport.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* node dist/index.js
|
|
10
|
-
* # or via package bin:
|
|
11
|
-
* nimbus-mcp
|
|
12
|
-
*/
|
|
13
|
-
export type { ComponentMeta, DesignToken, ToolResult } from "./types.js";
|
package/dist/server.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
/**
|
|
3
|
-
* Creates and configures the Nimbus MCP server.
|
|
4
|
-
*
|
|
5
|
-
* Each tool lives in `src/tools/` and exports a `register*` function that
|
|
6
|
-
* receives the server instance and calls `server.registerTool(...)`. This
|
|
7
|
-
* file collects all registrations in one place.
|
|
8
|
-
*/
|
|
9
|
-
export declare function createServer(): McpServer;
|
package/dist/server.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
import { registerListComponents } from "./tools/list-components.js";
|
|
3
|
-
/**
|
|
4
|
-
* Creates and configures the Nimbus MCP server.
|
|
5
|
-
*
|
|
6
|
-
* Each tool lives in `src/tools/` and exports a `register*` function that
|
|
7
|
-
* receives the server instance and calls `server.registerTool(...)`. This
|
|
8
|
-
* file collects all registrations in one place.
|
|
9
|
-
*/
|
|
10
|
-
export function createServer() {
|
|
11
|
-
const server = new McpServer({
|
|
12
|
-
name: "nimbus-mcp",
|
|
13
|
-
version: "0.1.0",
|
|
14
|
-
}, {
|
|
15
|
-
capabilities: {
|
|
16
|
-
tools: {},
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
// Register all tools
|
|
20
|
-
registerListComponents(server);
|
|
21
|
-
return server;
|
|
22
|
-
}
|
package/dist/server.spec.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/server.spec.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from "vitest";
|
|
2
|
-
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
3
|
-
import { InMemoryTransport } from "@modelcontextprotocol/sdk/inMemory.js";
|
|
4
|
-
import { createServer } from "./server.js";
|
|
5
|
-
/**
|
|
6
|
-
* Integration tests for the Nimbus MCP server.
|
|
7
|
-
*
|
|
8
|
-
* These tests run the server in-process using InMemoryTransport so no
|
|
9
|
-
* child-process spawning or stdio wiring is needed. Add new tools freely —
|
|
10
|
-
* the tool-list tests only assert structure and cardinality, never specific
|
|
11
|
-
* tool names, so they won't break when new tools are registered.
|
|
12
|
-
*/
|
|
13
|
-
function createTestClient() {
|
|
14
|
-
const server = createServer();
|
|
15
|
-
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
|
|
16
|
-
const client = new Client({ name: "test-client", version: "1.0.0" }, { capabilities: {} });
|
|
17
|
-
return {
|
|
18
|
-
server,
|
|
19
|
-
client,
|
|
20
|
-
clientTransport,
|
|
21
|
-
serverTransport,
|
|
22
|
-
async connect() {
|
|
23
|
-
await server.connect(serverTransport);
|
|
24
|
-
await client.connect(clientTransport);
|
|
25
|
-
},
|
|
26
|
-
async close() {
|
|
27
|
-
await client.close();
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
describe("MCP server — initialize handshake", () => {
|
|
32
|
-
it("responds to initialize with server info and capabilities", async () => {
|
|
33
|
-
// client.connect() performs the initialize handshake automatically
|
|
34
|
-
const ctx = createTestClient();
|
|
35
|
-
await ctx.connect();
|
|
36
|
-
const serverVersion = ctx.client.getServerVersion();
|
|
37
|
-
expect(serverVersion).toBeDefined();
|
|
38
|
-
expect(serverVersion?.name).toBe("nimbus-mcp");
|
|
39
|
-
expect(serverVersion?.version).toMatch(/^\d+\.\d+\.\d+$/);
|
|
40
|
-
const capabilities = ctx.client.getServerCapabilities();
|
|
41
|
-
expect(capabilities).toBeDefined();
|
|
42
|
-
expect(capabilities?.tools).toBeDefined();
|
|
43
|
-
await ctx.close();
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
describe("MCP server — tools/list", () => {
|
|
47
|
-
it("returns a non-empty array of tools", async () => {
|
|
48
|
-
const ctx = createTestClient();
|
|
49
|
-
await ctx.connect();
|
|
50
|
-
const { tools } = await ctx.client.listTools();
|
|
51
|
-
expect(Array.isArray(tools)).toBe(true);
|
|
52
|
-
expect(tools.length).toBeGreaterThan(0);
|
|
53
|
-
await ctx.close();
|
|
54
|
-
});
|
|
55
|
-
it("every tool has a name, description, and inputSchema", async () => {
|
|
56
|
-
const ctx = createTestClient();
|
|
57
|
-
await ctx.connect();
|
|
58
|
-
const { tools } = await ctx.client.listTools();
|
|
59
|
-
for (const tool of tools) {
|
|
60
|
-
expect(typeof tool.name).toBe("string");
|
|
61
|
-
expect(tool.name.length).toBeGreaterThan(0);
|
|
62
|
-
expect(tool.description).toBeDefined();
|
|
63
|
-
expect(tool.description.length).toBeGreaterThan(0);
|
|
64
|
-
expect(tool.inputSchema).toBeDefined();
|
|
65
|
-
expect(tool.inputSchema.type).toBe("object");
|
|
66
|
-
}
|
|
67
|
-
await ctx.close();
|
|
68
|
-
});
|
|
69
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
/**
|
|
3
|
-
* Registers the `list_components` tool on the given MCP server.
|
|
4
|
-
*
|
|
5
|
-
* Returns a list of all Nimbus component names and descriptions from the
|
|
6
|
-
* route manifest. This is a lightweight discovery tool — use
|
|
7
|
-
* `get_component_docs` to fetch full documentation for a specific component.
|
|
8
|
-
*/
|
|
9
|
-
export declare function registerListComponents(server: McpServer): void;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { getRouteManifest } from "../data-loader.js";
|
|
2
|
-
/**
|
|
3
|
-
* Registers the `list_components` tool on the given MCP server.
|
|
4
|
-
*
|
|
5
|
-
* Returns a list of all Nimbus component names and descriptions from the
|
|
6
|
-
* route manifest. This is a lightweight discovery tool — use
|
|
7
|
-
* `get_component_docs` to fetch full documentation for a specific component.
|
|
8
|
-
*/
|
|
9
|
-
export function registerListComponents(server) {
|
|
10
|
-
server.registerTool("list_components", {
|
|
11
|
-
title: "List Components",
|
|
12
|
-
description: "Returns the names and descriptions of all available Nimbus components.",
|
|
13
|
-
inputSchema: {},
|
|
14
|
-
}, async () => {
|
|
15
|
-
try {
|
|
16
|
-
const manifest = await getRouteManifest();
|
|
17
|
-
const components = manifest.routes
|
|
18
|
-
.filter((route) => route.category === "components")
|
|
19
|
-
.map((route) => `${route.title}: ${route.description}`)
|
|
20
|
-
.join("\n");
|
|
21
|
-
return {
|
|
22
|
-
content: [
|
|
23
|
-
{
|
|
24
|
-
type: "text",
|
|
25
|
-
text: components || "No components found.",
|
|
26
|
-
},
|
|
27
|
-
],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
catch {
|
|
31
|
-
return {
|
|
32
|
-
content: [
|
|
33
|
-
{
|
|
34
|
-
type: "text",
|
|
35
|
-
text: "Component data is not available in this environment.",
|
|
36
|
-
},
|
|
37
|
-
],
|
|
38
|
-
isError: true,
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
package/dist/types.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared type definitions for the Nimbus MCP server.
|
|
3
|
-
*/
|
|
4
|
-
/** Metadata about a Nimbus component. */
|
|
5
|
-
export interface ComponentMeta {
|
|
6
|
-
/** Component name in PascalCase (e.g. "Button", "DatePicker"). */
|
|
7
|
-
name: string;
|
|
8
|
-
/** Brief description of the component's purpose. */
|
|
9
|
-
description: string;
|
|
10
|
-
/** Filesystem path to the component directory. */
|
|
11
|
-
path: string;
|
|
12
|
-
}
|
|
13
|
-
/** A single design token entry. */
|
|
14
|
-
export interface DesignToken {
|
|
15
|
-
/** Token name (e.g. "color.primary.500"). */
|
|
16
|
-
name: string;
|
|
17
|
-
/** Resolved token value. */
|
|
18
|
-
value: string;
|
|
19
|
-
/** Category the token belongs to (e.g. "color", "spacing"). */
|
|
20
|
-
category: string;
|
|
21
|
-
}
|
|
22
|
-
/** Result returned by MCP tool handlers. */
|
|
23
|
-
export interface ToolResult {
|
|
24
|
-
content: Array<{
|
|
25
|
-
type: "text";
|
|
26
|
-
text: string;
|
|
27
|
-
}>;
|
|
28
|
-
}
|
package/dist/types.js
DELETED
package/src/data-loader.ts
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { existsSync } from "node:fs";
|
|
3
|
-
import { resolve, dirname } from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
|
|
6
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Resolves the package root by walking up from the current file's directory
|
|
10
|
-
* until we find the package.json for nimbus-mcp.
|
|
11
|
-
*/
|
|
12
|
-
function findPackageRoot(): string {
|
|
13
|
-
let dir = __dirname;
|
|
14
|
-
while (dir !== dirname(dir)) {
|
|
15
|
-
if (existsSync(resolve(dir, "package.json"))) {
|
|
16
|
-
return dir;
|
|
17
|
-
}
|
|
18
|
-
dir = dirname(dir);
|
|
19
|
-
}
|
|
20
|
-
return __dirname;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const PACKAGE_ROOT = findPackageRoot();
|
|
24
|
-
|
|
25
|
-
/** Path to route-manifest.json when running inside the monorepo. */
|
|
26
|
-
const MONOREPO_DATA_DIR = resolve(PACKAGE_ROOT, "../../apps/docs/src/data");
|
|
27
|
-
|
|
28
|
-
/** Path to bundled data shipped with the npm package. */
|
|
29
|
-
const BUNDLED_DATA_DIR = resolve(PACKAGE_ROOT, "data");
|
|
30
|
-
|
|
31
|
-
/** Marker file used to detect monorepo mode. */
|
|
32
|
-
const MONOREPO_MARKER = resolve(MONOREPO_DATA_DIR, "route-manifest.json");
|
|
33
|
-
|
|
34
|
-
// ---------------------------------------------------------------------------
|
|
35
|
-
// Mode detection
|
|
36
|
-
// ---------------------------------------------------------------------------
|
|
37
|
-
|
|
38
|
-
let _isMonorepo: boolean | null = null;
|
|
39
|
-
|
|
40
|
-
/** Returns `true` when running inside the Nimbus monorepo. */
|
|
41
|
-
export function isMonorepoMode(): boolean {
|
|
42
|
-
if (_isMonorepo === null) {
|
|
43
|
-
_isMonorepo = existsSync(MONOREPO_MARKER);
|
|
44
|
-
}
|
|
45
|
-
return _isMonorepo;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/** Returns the resolved data directory for the current mode. */
|
|
49
|
-
export function getDataDir(): string {
|
|
50
|
-
return isMonorepoMode() ? MONOREPO_DATA_DIR : BUNDLED_DATA_DIR;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ---------------------------------------------------------------------------
|
|
54
|
-
// Generic helpers
|
|
55
|
-
// ---------------------------------------------------------------------------
|
|
56
|
-
|
|
57
|
-
async function readJson<T>(filePath: string): Promise<T> {
|
|
58
|
-
const raw = await readFile(filePath, "utf-8");
|
|
59
|
-
return JSON.parse(raw) as T;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Creates a lazy accessor that reads and caches a JSON file on first call.
|
|
64
|
-
*/
|
|
65
|
-
function lazyJson<T>(relativePath: string): () => Promise<T> {
|
|
66
|
-
let cached: T | undefined;
|
|
67
|
-
return async () => {
|
|
68
|
-
if (cached === undefined) {
|
|
69
|
-
const fullPath = resolve(getDataDir(), relativePath);
|
|
70
|
-
cached = await readJson<T>(fullPath);
|
|
71
|
-
}
|
|
72
|
-
return cached;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
// ---------------------------------------------------------------------------
|
|
77
|
-
// Route manifest
|
|
78
|
-
// ---------------------------------------------------------------------------
|
|
79
|
-
|
|
80
|
-
export interface RouteManifestEntry {
|
|
81
|
-
path: string;
|
|
82
|
-
id: string;
|
|
83
|
-
title: string;
|
|
84
|
-
description: string;
|
|
85
|
-
category: string;
|
|
86
|
-
tags: string[];
|
|
87
|
-
menu: string[];
|
|
88
|
-
order: number;
|
|
89
|
-
chunkName: string;
|
|
90
|
-
tabs?: Array<{ key: string; title: string; order: number }>;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export interface RouteManifest {
|
|
94
|
-
routes: RouteManifestEntry[];
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export const getRouteManifest = lazyJson<RouteManifest>("route-manifest.json");
|
|
98
|
-
|
|
99
|
-
// ---------------------------------------------------------------------------
|
|
100
|
-
// Per-component route data
|
|
101
|
-
// ---------------------------------------------------------------------------
|
|
102
|
-
|
|
103
|
-
export interface RouteData {
|
|
104
|
-
meta: {
|
|
105
|
-
id: string;
|
|
106
|
-
title: string;
|
|
107
|
-
description: string;
|
|
108
|
-
route: string;
|
|
109
|
-
menu: string[];
|
|
110
|
-
tags: string[];
|
|
111
|
-
toc?: Array<{ id: string; title: string; depth: number }>;
|
|
112
|
-
[key: string]: unknown;
|
|
113
|
-
};
|
|
114
|
-
[key: string]: unknown;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Loads a per-component route JSON by slug.
|
|
119
|
-
* Example: `getRouteData("components-inputs-button")`
|
|
120
|
-
*/
|
|
121
|
-
export async function getRouteData(slug: string): Promise<RouteData> {
|
|
122
|
-
const fullPath = resolve(getDataDir(), "routes", `${slug}.json`);
|
|
123
|
-
return readJson<RouteData>(fullPath);
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// ---------------------------------------------------------------------------
|
|
127
|
-
// Per-component type data
|
|
128
|
-
// ---------------------------------------------------------------------------
|
|
129
|
-
|
|
130
|
-
export interface TypeData {
|
|
131
|
-
displayName: string;
|
|
132
|
-
description: string;
|
|
133
|
-
filePath: string;
|
|
134
|
-
props: Record<
|
|
135
|
-
string,
|
|
136
|
-
{
|
|
137
|
-
name: string;
|
|
138
|
-
description: string;
|
|
139
|
-
required: boolean;
|
|
140
|
-
type: { name: string };
|
|
141
|
-
defaultValue?: { value: string };
|
|
142
|
-
}
|
|
143
|
-
>;
|
|
144
|
-
methods: unknown[];
|
|
145
|
-
tags: Record<string, string>;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Loads a per-component type JSON by component name.
|
|
150
|
-
* Example: `getTypeData("Button")`
|
|
151
|
-
*/
|
|
152
|
-
export async function getTypeData(componentName: string): Promise<TypeData> {
|
|
153
|
-
const fullPath = resolve(getDataDir(), "types", `${componentName}.json`);
|
|
154
|
-
return readJson<TypeData>(fullPath);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// ---------------------------------------------------------------------------
|
|
158
|
-
// Types index
|
|
159
|
-
// ---------------------------------------------------------------------------
|
|
160
|
-
|
|
161
|
-
export const getTypesIndex = lazyJson<TypeData[]>("types.json");
|
|
162
|
-
|
|
163
|
-
// ---------------------------------------------------------------------------
|
|
164
|
-
// Search index
|
|
165
|
-
// ---------------------------------------------------------------------------
|
|
166
|
-
|
|
167
|
-
export interface SearchIndexEntry {
|
|
168
|
-
id: string;
|
|
169
|
-
title: string;
|
|
170
|
-
description: string;
|
|
171
|
-
tags: string[];
|
|
172
|
-
route: string;
|
|
173
|
-
menu: string[];
|
|
174
|
-
content: string;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
export const getSearchIndex = lazyJson<SearchIndexEntry[]>("search-index.json");
|
|
178
|
-
|
|
179
|
-
// ---------------------------------------------------------------------------
|
|
180
|
-
// Docs (token / icon data is embedded in the docs.json manifest)
|
|
181
|
-
// ---------------------------------------------------------------------------
|
|
182
|
-
|
|
183
|
-
export interface DocEntry {
|
|
184
|
-
meta: {
|
|
185
|
-
id: string;
|
|
186
|
-
title: string;
|
|
187
|
-
description: string;
|
|
188
|
-
route: string;
|
|
189
|
-
menu: string[];
|
|
190
|
-
tags: string[];
|
|
191
|
-
[key: string]: unknown;
|
|
192
|
-
};
|
|
193
|
-
mdx: string;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
export type DocsManifest = Record<string, DocEntry>;
|
|
197
|
-
|
|
198
|
-
export const getDocsManifest = lazyJson<DocsManifest>("docs.json");
|
|
199
|
-
|
|
200
|
-
// ---------------------------------------------------------------------------
|
|
201
|
-
// Convenience: token data
|
|
202
|
-
// ---------------------------------------------------------------------------
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Returns docs entries whose route starts with `home/design-tokens`.
|
|
206
|
-
*/
|
|
207
|
-
export async function getTokenData(): Promise<DocEntry[]> {
|
|
208
|
-
const docs = await getDocsManifest();
|
|
209
|
-
return Object.values(docs).filter((entry) =>
|
|
210
|
-
entry.meta.route.startsWith("design-tokens")
|
|
211
|
-
);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// ---------------------------------------------------------------------------
|
|
215
|
-
// Convenience: icon data
|
|
216
|
-
// ---------------------------------------------------------------------------
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Returns the Icons docs entry from the docs manifest.
|
|
220
|
-
*/
|
|
221
|
-
export async function getIconData(): Promise<DocEntry | undefined> {
|
|
222
|
-
const docs = await getDocsManifest();
|
|
223
|
-
return Object.values(docs).find(
|
|
224
|
-
(entry) => entry.meta.id === "Icons" || entry.meta.route.includes("icons")
|
|
225
|
-
);
|
|
226
|
-
}
|