@@ -43,9 +43,10 @@ This package is specifically designed for AI-assisted development tools and Mode
4343- ** Assist with component selection** based on requirements
4444
4545### MCP Server Integration
46+ #### Individual Component Imports (Tree-Shakeable)
4647``` javascript
4748// MCP servers can load and query component schemas
48- import { componentNames , getComponentSchema } from ' patternfly-component-schemas' ;
49+ import { componentNames , getComponentSchema } from ' @patternfly/ patternfly-component-schemas' ;
4950
5051// Discover available components
5152const components = componentNames; // 462 PatternFly components
@@ -55,12 +56,63 @@ const buttonSchema = await getComponentSchema('Button');
5556// Returns: { schema, componentName, propsCount, requiredProps }
5657```
5758
59+ #### JSON-Optimized Integration
60+ ``` javascript
61+ // JSON-optimized interface with lazy loading:
62+ // - Single import of lightweight metadata for fast discovery of all components
63+ // - Bulk schema access lazy loaded on first query
64+ // - Fast subsequent queries after initial load
65+
66+ import { componentNames , getComponentSchema } from ' @patternfly/patternfly-component-schemas/json' ;
67+
68+ // Discover all available components (no full schemas loaded yet)
69+ const components = componentNames; // 462 PatternFly components
70+
71+ // Get detailed component information (lazy loads full schemas on first call)
72+ const buttonSchema = await getComponentSchema (' Button' );
73+ // Returns JSON Schema with properties, required props, etc.
74+ ```
75+
5876### AI Assistant Examples
5977- ** "What props does the Button component accept?"** → AI reads Button schema
6078- ** "Generate a PatternFly Alert component"** → AI uses Alert schema for validation
6179- ** "Show me all navigation components"** → AI filters components by name/description
6280- ** "Create a form with proper PatternFly components"** → AI selects appropriate form components
6381
82+ ## 📦 Package Architecture
83+
84+ ### Two Interfaces for Different Needs
85+
86+ This package provides two interfaces optimized for different use cases:
87+
88+ #### 🌳 Individual Component Imports (Tree-Shakeable)
89+ ** Import** : ` @patternfly/patternfly-component-schemas `
90+
91+ ** Characteristics** :
92+ - Optimized for selective access
93+ - Each component loads individually
94+ - Tree-shakeable (only import what you need)
95+
96+ #### 🚀 JSON-Optimized Interface
97+ ** Import** : ` @patternfly/patternfly-component-schemas/json `
98+
99+ ** Characteristics** :
100+ - Optimized for bulk access patterns
101+ - Lightweight metadata for fast discovery
102+ - Lazy-loaded (full schemas on demand)
103+
104+ ### Quick Decision Guide
105+
106+ ** Use Tree-Shakeable if you** :
107+ - Need minimal application bundle size
108+ - Know which components you'll use at build time
109+ - Want per-component imports
110+
111+ ** Use JSON-Optimized if you** :
112+ - Need all component metadata quickly
113+ - Are building tools that need runtime discovery
114+ - Want fast discovery and bulk operations
115+
64116## 🔧 Development
65117
66118### Building from Source
0 commit comments