@@ -27,6 +27,16 @@ export type ComponentMeta = {
2727 icon ?: string ; // Icon name or svg string
2828 category ?: string ; // Grouping category
2929 namespace ?: string ; // Component namespace (e.g., 'ui', 'plugin-grid', 'field')
30+ /**
31+ * When true, prevents the component from being registered with a non-namespaced fallback.
32+ * Use this when a component should only be accessible via its full namespaced key.
33+ * This avoids conflicts with other components that share the same base name.
34+ *
35+ * @example
36+ * // Register as 'view:form' only, don't overwrite 'form'
37+ * registry.register('form', FormView, { namespace: 'view', skipFallback: true });
38+ */
39+ skipFallback ?: boolean ;
3040 inputs ?: ComponentInput [ ] ;
3141 defaultProps ?: Record < string , any > ; // Default props when dropped
3242 defaultChildren ?: SchemaNode [ ] ; // Default children when dropped
@@ -94,7 +104,8 @@ export class Registry<T = any> {
94104 // This allows "button" to work even when registered as "ui:button"
95105 // Note: If multiple namespaced components share the same short name,
96106 // the last registration wins for non-namespaced lookups
97- if ( meta ?. namespace ) {
107+ // Skip this if skipFallback is true to avoid overwriting other components
108+ if ( meta ?. namespace && ! meta ?. skipFallback ) {
98109 this . components . set ( type , {
99110 type : fullType , // Keep reference to namespaced type
100111 component,
0 commit comments