Three small additions so private overlays can add components gated behind a paid subscription without forking the picker: - types/component-metadata.ts: optional pro_only?: boolean field on ComponentMetadata. Self-hosters never set it; picker behaves identically. - services/componentRegistry.ts: new mergeComponents() public method. Pro overlay calls this after the default registry has loaded to splice in extra components (replacing any with the same id). - components/ComponentPickerModal.tsx: when a pro_only component is clicked, the picker first calls window.__velxio_pro_gate__(component) if defined. If the gate returns true, the click is consumed (overlay shows an upgrade modal). If absent or returns false, the click passes through to onSelectComponent as normal. Net upstream change: ~25 lines, all backwards-compatible. OSS image behaves exactly as before since no overlay sets pro_only or installs the gate. |
||
|---|---|---|
| .. | ||
| admin | ||
| analog-ui | ||
| components-instruments | ||
| customChips | ||
| editor | ||
| examples | ||
| layout | ||
| raspberry-pi | ||
| simulator | ||
| velxio-components | ||
| ComponentPickerModal.css | ||
| ComponentPickerModal.tsx | ||
| DynamicComponent.tsx | ||