UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

122 lines (121 loc) 2.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PAGE_COMPONENT_CONTENT_PATTERNS = exports.PAGE_COMPONENT_PATTERNS = exports.UI_COMPONENT_DIRECTORIES = exports.UI_COMPONENT_PATTERNS = void 0; /** * Common UI component patterns used to identify reusable UI components * vs page/route components in React applications */ exports.UI_COMPONENT_PATTERNS = [ // Form components "Button", "Input", "Select", "Checkbox", "Radio", "Textarea", "Form", "FormField", "FormGroup", "Label", "Dropdown", "DatePicker", "TimePicker", "Slider", "Switch", "SearchBox", // Layout components "Layout", "Header", "Footer", "Sidebar", "Nav", "Navbar", "Menu", "MenuItem", "Breadcrumb", "Container", "Grid", "Row", "Column", "Section", "Wrapper", // Display components "Card", "Table", "List", "ListItem", "Avatar", "Badge", "Tag", "Chip", "Progress", "Spinner", "Loader", "Image", "Icon", "Divider", "Separator", // Interactive components "Modal", "Dialog", "Tooltip", "Popover", "Accordion", "Tab", "TabPanel", "Carousel", "Gallery", "Drawer", "Sheet", // Feedback components "Alert", "Toast", "Notification", "Banner", "ErrorBoundary", "SkeletonLoader", "EmptyState", // Data components "Chart", "Graph", "Calendar", "Timeline", "DataTable", "Pagination", "Filter", "Sort", ]; /** * Directory patterns that typically contain UI components */ exports.UI_COMPONENT_DIRECTORIES = [ "/components/", "\\components\\", "/ui/", "\\ui\\", "/shared/", "\\shared\\", "/common/", "\\common\\", ]; /** * File patterns that indicate page components (should NOT be considered UI components) */ exports.PAGE_COMPONENT_PATTERNS = [ "page.tsx", "page.jsx", "Page.tsx", "Page.jsx", "index.tsx", "index.jsx", ]; /** * Content patterns that indicate page components */ exports.PAGE_COMPONENT_CONTENT_PATTERNS = [ "generateMetadata", "export const metadata", "export default function Page", "getServerSideProps", "getStaticProps", ];