mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 10:44:12 +00:00
[Schema] ComfyNodeDefV2 schema (#2847)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref } from 'vue'
|
||||
|
||||
import type { InputSpec as InputSpecV2 } from '@/schemas/nodeDef/nodeDefSchemaV2'
|
||||
import {
|
||||
type ComboInputSpecV2,
|
||||
type InputSpec,
|
||||
@@ -8,8 +9,6 @@ import {
|
||||
} from '@/schemas/nodeDefSchema'
|
||||
import { ComfyWidgetConstructor, ComfyWidgets } from '@/scripts/widgets'
|
||||
|
||||
import type { BaseInputSpec } from './nodeDefStore'
|
||||
|
||||
export const useWidgetStore = defineStore('widget', () => {
|
||||
const coreWidgets = ComfyWidgets
|
||||
const customWidgets = ref<Record<string, ComfyWidgetConstructor>>({})
|
||||
@@ -33,7 +32,7 @@ export const useWidgetStore = defineStore('widget', () => {
|
||||
}
|
||||
}
|
||||
|
||||
function inputIsWidget(spec: BaseInputSpec) {
|
||||
function inputIsWidget(spec: InputSpecV2) {
|
||||
return getWidgetType(spec.type, spec.name) !== null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user