mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-23 22:25:05 +00:00
fix: break promoted widget import cycle
Amp-Thread-ID: https://ampcode.com/threads/T-019e1d98-44cc-7459-bcc5-cc4f0d3b4268 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -39,6 +39,12 @@ export interface PromotedWidgetView extends IBaseWidget {
|
||||
hydrateHostValue(value: IBaseWidget['value']): void
|
||||
}
|
||||
|
||||
export function getPromotedWidgetHostStateName(
|
||||
widget: PromotedWidgetView
|
||||
): string {
|
||||
return [widget.name, widget.sourceNodeId, widget.sourceWidgetName].join(':')
|
||||
}
|
||||
|
||||
export function isPromotedWidgetView(
|
||||
widget: IBaseWidget
|
||||
): widget is PromotedWidgetView {
|
||||
|
||||
@@ -22,17 +22,17 @@ import {
|
||||
import { matchPromotedInput } from '@/core/graph/subgraph/matchPromotedInput'
|
||||
import { hasWidgetNode } from '@/core/graph/subgraph/widgetNodeTypeGuard'
|
||||
|
||||
import { isPromotedWidgetView } from './promotedWidgetTypes'
|
||||
import {
|
||||
getPromotedWidgetHostStateName,
|
||||
isPromotedWidgetView
|
||||
} from './promotedWidgetTypes'
|
||||
import type { PromotedWidgetView as IPromotedWidgetView } from './promotedWidgetTypes'
|
||||
|
||||
export type { PromotedWidgetView } from './promotedWidgetTypes'
|
||||
export { isPromotedWidgetView } from './promotedWidgetTypes'
|
||||
|
||||
export function getPromotedWidgetHostStateName(
|
||||
widget: IPromotedWidgetView
|
||||
): string {
|
||||
return [widget.name, widget.sourceNodeId, widget.sourceWidgetName].join(':')
|
||||
}
|
||||
export {
|
||||
getPromotedWidgetHostStateName,
|
||||
isPromotedWidgetView
|
||||
} from './promotedWidgetTypes'
|
||||
|
||||
interface SubgraphSlotRef {
|
||||
name: string
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import * as Sentry from '@sentry/vue'
|
||||
import type { PromotedWidgetSource } from '@/core/graph/subgraph/promotedWidgetTypes'
|
||||
import { isPromotedWidgetView } from '@/core/graph/subgraph/promotedWidgetTypes'
|
||||
import { getPromotedWidgetHostStateName } from '@/core/graph/subgraph/promotedWidgetView'
|
||||
import {
|
||||
getPromotedWidgetHostStateName,
|
||||
isPromotedWidgetView
|
||||
} from '@/core/graph/subgraph/promotedWidgetTypes'
|
||||
import { t } from '@/i18n'
|
||||
import type {
|
||||
IContextMenuValue,
|
||||
|
||||
Reference in New Issue
Block a user