mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
Knip: More Pruning (#5374)
* knip: Don't ignore exports that are only used within a given file * knip: More pruning after rebase * knip: Vite plugin config fix * knip: vitest plugin config * knip: Playwright config, remove unnecessary ignores. * knip: Simplify project file enumeration. * knip: simplify the config file patterns ?(.optional_segment) * knip: tailwind v4 fix * knip: A little more, explain some of the deps. Should be good for this PR. * knip: remove unused disabling of classMembers. It's opt-in, which we should probably do. * knip: floating comments We should probably delete _one_ of these parallell trees, right? * knip: Add additional entrypoints * knip: Restore UserData that's exposed via the types for now. * knip: Add as an entry file even though knip says it's not necessary. * knip: re-export functions used by nodes (h/t @christian-byrne)
This commit is contained in:
@@ -58,7 +58,7 @@ export interface LinkRenderContext {
|
||||
disabledPattern?: CanvasPattern | null
|
||||
}
|
||||
|
||||
export interface LinkRenderOptions {
|
||||
interface LinkRenderOptions {
|
||||
color?: CanvasColour
|
||||
flow?: boolean
|
||||
skipBorder?: boolean
|
||||
|
||||
@@ -38,7 +38,7 @@ export interface LinkRenderData {
|
||||
centerAngle?: number
|
||||
}
|
||||
|
||||
export interface RenderStyle {
|
||||
interface RenderStyle {
|
||||
mode: RenderMode
|
||||
connectionWidth: number
|
||||
borderWidth?: number
|
||||
@@ -51,7 +51,7 @@ export interface RenderStyle {
|
||||
highQuality?: boolean
|
||||
}
|
||||
|
||||
export interface RenderColors {
|
||||
interface RenderColors {
|
||||
default: string
|
||||
byType: Record<string, string>
|
||||
highlighted: string
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
|
||||
const logger = log.getLogger('LayoutMutations')
|
||||
|
||||
export interface LayoutMutations {
|
||||
interface LayoutMutations {
|
||||
// Single node operations (synchronous, CRDT-ready)
|
||||
moveNode(nodeId: NodeId, position: Point): void
|
||||
resizeNode(nodeId: NodeId, size: Size): void
|
||||
|
||||
@@ -24,7 +24,7 @@ import { getSlotKey } from './slotIdentifier'
|
||||
* @param isInput Whether this is an input slot
|
||||
* @param position The slot position in graph coordinates
|
||||
*/
|
||||
export function registerSlotLayout(
|
||||
function registerSlotLayout(
|
||||
nodeId: string,
|
||||
slotIndex: number,
|
||||
isInput: boolean,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* @TODO Replace this concatenated string with root cause fix
|
||||
*/
|
||||
|
||||
export interface SlotIdentifier {
|
||||
interface SlotIdentifier {
|
||||
nodeId: string
|
||||
index: number
|
||||
isInput: boolean
|
||||
|
||||
@@ -16,7 +16,7 @@ import { layoutStore } from '@/renderer/core/layout/store/layoutStore'
|
||||
* Compute and register slot layouts for a node
|
||||
* @param node LiteGraph node to process
|
||||
*/
|
||||
export function computeAndRegisterSlots(node: LGraphNode): void {
|
||||
function computeAndRegisterSlots(node: LGraphNode): void {
|
||||
const nodeId = String(node.id)
|
||||
const nodeLayout = layoutStore.getNodeLayoutRef(nodeId).value
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ export interface RerouteLayout {
|
||||
/**
|
||||
* Meta-only base for all operations - contains common fields
|
||||
*/
|
||||
export interface OperationMeta {
|
||||
interface OperationMeta {
|
||||
/** Unique operation ID for deduplication */
|
||||
id?: string
|
||||
/** Timestamp for ordering operations */
|
||||
@@ -100,9 +100,9 @@ export interface OperationMeta {
|
||||
/**
|
||||
* Entity-specific base types for proper type discrimination
|
||||
*/
|
||||
export type NodeOpBase = OperationMeta & { entity: 'node'; nodeId: NodeId }
|
||||
export type LinkOpBase = OperationMeta & { entity: 'link'; linkId: LinkId }
|
||||
export type RerouteOpBase = OperationMeta & {
|
||||
type NodeOpBase = OperationMeta & { entity: 'node'; nodeId: NodeId }
|
||||
type LinkOpBase = OperationMeta & { entity: 'link'; linkId: LinkId }
|
||||
type RerouteOpBase = OperationMeta & {
|
||||
entity: 'reroute'
|
||||
rerouteId: RerouteId
|
||||
}
|
||||
@@ -110,7 +110,7 @@ export type RerouteOpBase = OperationMeta & {
|
||||
/**
|
||||
* Operation type discriminator for type narrowing
|
||||
*/
|
||||
export type OperationType =
|
||||
type OperationType =
|
||||
| 'moveNode'
|
||||
| 'resizeNode'
|
||||
| 'setNodeZIndex'
|
||||
@@ -170,7 +170,7 @@ export interface DeleteNodeOperation extends NodeOpBase {
|
||||
/**
|
||||
* Set node visibility operation
|
||||
*/
|
||||
export interface SetNodeVisibilityOperation extends NodeOpBase {
|
||||
interface SetNodeVisibilityOperation extends NodeOpBase {
|
||||
type: 'setNodeVisibility'
|
||||
visible: boolean
|
||||
previousVisible: boolean
|
||||
@@ -179,7 +179,7 @@ export interface SetNodeVisibilityOperation extends NodeOpBase {
|
||||
/**
|
||||
* Batch update operation for atomic multi-property changes
|
||||
*/
|
||||
export interface BatchUpdateOperation extends NodeOpBase {
|
||||
interface BatchUpdateOperation extends NodeOpBase {
|
||||
type: 'batchUpdate'
|
||||
updates: Partial<NodeLayout>
|
||||
previousValues: Partial<NodeLayout>
|
||||
|
||||
@@ -53,12 +53,12 @@ import { computed, reactive, readonly } from 'vue'
|
||||
|
||||
import type { LGraphCanvas } from '@/lib/litegraph/src/litegraph'
|
||||
|
||||
export interface Point {
|
||||
interface Point {
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
|
||||
export interface Camera {
|
||||
interface Camera {
|
||||
x: number
|
||||
y: number
|
||||
z: number // scale/zoom
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface Bounds {
|
||||
height: number
|
||||
}
|
||||
|
||||
export interface QuadTreeItem<T> {
|
||||
interface QuadTreeItem<T> {
|
||||
id: string
|
||||
bounds: Bounds
|
||||
data: T
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Spatial bounds calculations for node layouts
|
||||
*/
|
||||
|
||||
export interface SpatialBounds {
|
||||
interface SpatialBounds {
|
||||
minX: number
|
||||
minY: number
|
||||
maxX: number
|
||||
@@ -11,7 +11,7 @@ export interface SpatialBounds {
|
||||
height: number
|
||||
}
|
||||
|
||||
export interface PositionedNode {
|
||||
interface PositionedNode {
|
||||
pos: ArrayLike<number>
|
||||
size: ArrayLike<number>
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ export interface MinimapRenderContext {
|
||||
height: number
|
||||
}
|
||||
|
||||
export interface MinimapRenderSettings {
|
||||
interface MinimapRenderSettings {
|
||||
nodeColors: boolean
|
||||
showLinks: boolean
|
||||
showGroups: boolean
|
||||
|
||||
@@ -35,7 +35,7 @@ export enum LODLevel {
|
||||
FULL = 'full' // zoom > 0.8
|
||||
}
|
||||
|
||||
export interface LODConfig {
|
||||
interface LODConfig {
|
||||
renderWidgets: boolean
|
||||
renderSlots: boolean
|
||||
renderContent: boolean
|
||||
|
||||
@@ -9,7 +9,7 @@ import { api } from '@/scripts/api'
|
||||
const MAX_RETRIES = 5
|
||||
const TIMEOUT = 4096
|
||||
|
||||
export interface CacheEntry<T> {
|
||||
interface CacheEntry<T> {
|
||||
data: T
|
||||
timestamp?: number
|
||||
error?: Error | null
|
||||
|
||||
@@ -130,7 +130,7 @@ export const getComponent = (type: string): Component | null => {
|
||||
return widgets.get(canonicalType)?.component || null
|
||||
}
|
||||
|
||||
export const isSupported = (type: string): boolean => {
|
||||
const isSupported = (type: string): boolean => {
|
||||
const canonicalType = getCanonicalType(type)
|
||||
return widgets.has(canonicalType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user