[feat] Add core Vue widget infrastructure

- SimplifiedWidget interface for Vue-based node widgets
- widgetPropFilter utility with component-specific exclusion lists
- Removes DOM manipulation and positioning concerns
- Provides clean API for value binding and prop filtering
This commit is contained in:
bymyself
2025-06-24 12:32:27 -07:00
parent 47145ce4b8
commit 36e4e79994
2 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/**
* Simplified widget interface for Vue-based node rendering
* Removes all DOM manipulation and positioning concerns
*/
export interface SimplifiedWidget<T = any, O = Record<string, any>> {
/** Display name of the widget */
name: string
/** Widget type identifier (e.g., 'STRING', 'INT', 'COMBO') */
type: string
/** Current value of the widget */
value: T
/** Widget options including filtered PrimeVue props */
options?: O
/** Callback fired when value changes */
callback?: (value: T) => void
/** Optional serialization method for custom value handling */
serializeValue?: () => any
/** Optional method to compute widget size requirements */
computeSize?: () => { minHeight: number; maxHeight?: number }
}