import { OriginUIService } from '../src/originui-service.js';
async function findSpecificNavbars() {
console.log('š Finding all 20 navbar components (comp-577 to comp-596)...\n');
const service = new OriginUIService();
// Wait for discovery to complete
await new Promise(resolve => setTimeout(resolve, 3000));
// Check the specific navbar range comp-577 to comp-596 (20 components)
const navbarIds = Array.from({length: 20}, (_, i) => `comp-${(577 + i).toString()}`);
console.log(`šØ Getting details for all 20 navbar components from OriginUI navbar page:\n`);
const foundComponents: string[] = [];
const notFoundComponents: string[] = [];
for (let i = 0; i < navbarIds.length; i++) {
const componentId = navbarIds[i];
const componentNumber = i + 1;
console.log(`š Checking navbar ${componentNumber}/20: ${componentId}`);
try {
// Try to search for this specific component
const searchResult = await service.searchComponents(componentId, undefined, 1);
const text = searchResult.content[0].text;
if (!text.includes('Found 0 component')) {
foundComponents.push(componentId);
console.log(`ā
${componentId}: Found in MCP`);
// Get installation command
const installResult = await service.getInstallCommand(componentId);
const installText = installResult.content[0].text;
const commandMatch = installText.match(/```bash\n(.+)\n```/);
if (commandMatch) {
console.log(` š¾ Install: ${commandMatch[1]}`);
}
} else {
notFoundComponents.push(componentId);
console.log(`ā ${componentId}: NOT found in MCP`);
}
} catch (error) {
notFoundComponents.push(componentId);
console.log(`ā ${componentId}: Error - ${error}`);
}
// Small delay to avoid overwhelming the server
await new Promise(resolve => setTimeout(resolve, 200));
}
console.log(`\nš Navbar Discovery Results:`);
console.log(`ā
Found in MCP: ${foundComponents.length}/20 navbar components`);
console.log(`ā Missing from MCP: ${notFoundComponents.length}/20 navbar components`);
if (foundComponents.length > 0) {
console.log(`\nā
Available navbar components: ${foundComponents.join(', ')}`);
}
if (notFoundComponents.length > 0) {
console.log(`\nā Missing navbar components: ${notFoundComponents.join(', ')}`);
}
// Also check for some additional navbar-related components
console.log(`\nš Checking for additional navbar-related components...`);
const additionalSearches = ['navbar', 'navigation-menu', 'comp-200', 'comp-201'];
for (const searchTerm of additionalSearches) {
try {
const result = await service.searchComponents(searchTerm, undefined, 1);
const text = result.content[0].text;
const found = !text.includes('Found 0 component');
console.log(`${found ? 'ā
' : 'ā'} ${searchTerm}: ${found ? 'Found' : 'Not found'}`);
} catch (error) {
console.log(`ā ${searchTerm}: Error`);
}
}
// Summary
const totalNavbarComponents = foundComponents.length + (foundComponents.includes('navbar') ? 0 : 1); // Add basic navbar if not in range
console.log(`\nš Total navbar components available: ${totalNavbarComponents}`);
console.log(`š OriginUI navbar page: https://originui.com/navbar`);
console.log(`š¦ Install any navbar: pnpm dlx shadcn@latest add https://originui.com/r/[component-id].json`);
}
findSpecificNavbars().catch(console.error);