mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-02 22:37:32 +00:00
[Lint] Sort imports (#2104)
This commit is contained in:
@@ -1,30 +1,31 @@
|
||||
import type { ComfyWorkflowJSON, NodeId } from '@/types/comfyWorkflow'
|
||||
import axios from 'axios'
|
||||
|
||||
import type {
|
||||
HistoryTaskItem,
|
||||
PendingTaskItem,
|
||||
RunningTaskItem,
|
||||
ComfyNodeDef,
|
||||
EmbeddingsResponse,
|
||||
ExtensionsResponse,
|
||||
PromptResponse,
|
||||
SystemStats,
|
||||
User,
|
||||
Settings,
|
||||
UserDataFullInfo,
|
||||
LogsRawResponse,
|
||||
ExecutingWsMessage,
|
||||
ExecutedWsMessage,
|
||||
ProgressWsMessage,
|
||||
ExecutionStartWsMessage,
|
||||
ExecutingWsMessage,
|
||||
ExecutionCachedWsMessage,
|
||||
ExecutionErrorWsMessage,
|
||||
ExecutionStartWsMessage,
|
||||
ExecutionSuccessWsMessage,
|
||||
ExtensionsResponse,
|
||||
HistoryTaskItem,
|
||||
LogsRawResponse,
|
||||
LogsWsMessage,
|
||||
PendingTaskItem,
|
||||
ProgressWsMessage,
|
||||
PromptResponse,
|
||||
RunningTaskItem,
|
||||
Settings,
|
||||
StatusWsMessage,
|
||||
StatusWsMessageStatus,
|
||||
ExecutionCachedWsMessage,
|
||||
ExecutionSuccessWsMessage,
|
||||
LogsWsMessage
|
||||
SystemStats,
|
||||
User,
|
||||
UserDataFullInfo
|
||||
} from '@/types/apiTypes'
|
||||
import { validateComfyNodeDef } from '@/types/apiTypes'
|
||||
import axios from 'axios'
|
||||
import type { ComfyWorkflowJSON, NodeId } from '@/types/comfyWorkflow'
|
||||
|
||||
interface QueuePromptRequestBody {
|
||||
client_id: string
|
||||
|
||||
@@ -1,54 +1,56 @@
|
||||
// @ts-strict-ignore
|
||||
import { type ComfyWidgetConstructor, ComfyWidgets } from './widgets'
|
||||
import { ComfyUI, $el } from './ui'
|
||||
import { api, type ComfyApi } from './api'
|
||||
import { defaultGraph } from './defaultGraph'
|
||||
import {
|
||||
getPngMetadata,
|
||||
getWebpMetadata,
|
||||
getFlacMetadata,
|
||||
importA1111,
|
||||
getLatentMetadata
|
||||
} from './pnginfo'
|
||||
LGraph,
|
||||
LGraphCanvas,
|
||||
LGraphEventMode,
|
||||
LGraphNode,
|
||||
LiteGraph
|
||||
} from '@comfyorg/litegraph'
|
||||
import { Vector2 } from '@comfyorg/litegraph'
|
||||
import _ from 'lodash'
|
||||
import type { ToastMessageOptions } from 'primevue/toast'
|
||||
import { shallowReactive } from 'vue'
|
||||
|
||||
import { st } from '@/i18n'
|
||||
import { useDialogService } from '@/services/dialogService'
|
||||
import { useExtensionService } from '@/services/extensionService'
|
||||
import { useLitegraphService } from '@/services/litegraphService'
|
||||
import { useWorkflowService } from '@/services/workflowService'
|
||||
import { useCommandStore } from '@/stores/commandStore'
|
||||
import { useExecutionStore } from '@/stores/executionStore'
|
||||
import { useExtensionStore } from '@/stores/extensionStore'
|
||||
import { KeyComboImpl, useKeybindingStore } from '@/stores/keybindingStore'
|
||||
import { useModelStore } from '@/stores/modelStore'
|
||||
import { SYSTEM_NODE_DEFS, useNodeDefStore } from '@/stores/nodeDefStore'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import { useWidgetStore } from '@/stores/widgetStore'
|
||||
import { ComfyWorkflow } from '@/stores/workflowStore'
|
||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import type { ComfyNodeDef } from '@/types/apiTypes'
|
||||
import type { ComfyExtension, MissingNodeType } from '@/types/comfy'
|
||||
import {
|
||||
type ComfyWorkflowJSON,
|
||||
type NodeId,
|
||||
validateComfyWorkflow
|
||||
} from '@/types/comfyWorkflow'
|
||||
import type { ComfyNodeDef } from '@/types/apiTypes'
|
||||
import { adjustColor, ColorAdjustOptions } from '@/utils/colorUtil'
|
||||
import { ExtensionManager } from '@/types/extensionTypes'
|
||||
import { ColorAdjustOptions, adjustColor } from '@/utils/colorUtil'
|
||||
import { deserialiseAndCreate } from '@/utils/vintageClipboard'
|
||||
|
||||
import { type ComfyApi, api } from './api'
|
||||
import { defaultGraph } from './defaultGraph'
|
||||
import {
|
||||
getFlacMetadata,
|
||||
getLatentMetadata,
|
||||
getPngMetadata,
|
||||
getWebpMetadata,
|
||||
importA1111
|
||||
} from './pnginfo'
|
||||
import { $el, ComfyUI } from './ui'
|
||||
import { ComfyAppMenu } from './ui/menu/index'
|
||||
import { getStorageValue } from './utils'
|
||||
import { ComfyWorkflow } from '@/stores/workflowStore'
|
||||
import {
|
||||
LGraphCanvas,
|
||||
LGraph,
|
||||
LGraphNode,
|
||||
LiteGraph,
|
||||
LGraphEventMode
|
||||
} from '@comfyorg/litegraph'
|
||||
import { ExtensionManager } from '@/types/extensionTypes'
|
||||
import { SYSTEM_NODE_DEFS, useNodeDefStore } from '@/stores/nodeDefStore'
|
||||
import { Vector2 } from '@comfyorg/litegraph'
|
||||
import _ from 'lodash'
|
||||
import { useDialogService } from '@/services/dialogService'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import { useModelStore } from '@/stores/modelStore'
|
||||
import type { ToastMessageOptions } from 'primevue/toast'
|
||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import { useExecutionStore } from '@/stores/executionStore'
|
||||
import { useExtensionStore } from '@/stores/extensionStore'
|
||||
import { KeyComboImpl, useKeybindingStore } from '@/stores/keybindingStore'
|
||||
import { useCommandStore } from '@/stores/commandStore'
|
||||
import { shallowReactive } from 'vue'
|
||||
import { useWorkflowService } from '@/services/workflowService'
|
||||
import { useWidgetStore } from '@/stores/widgetStore'
|
||||
import { deserialiseAndCreate } from '@/utils/vintageClipboard'
|
||||
import { st } from '@/i18n'
|
||||
import { useExtensionService } from '@/services/extensionService'
|
||||
import { useLitegraphService } from '@/services/litegraphService'
|
||||
import { type ComfyWidgetConstructor, ComfyWidgets } from './widgets'
|
||||
|
||||
export const ANIM_PREVIEW_WIDGET = '$$comfy_animation_preview'
|
||||
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import type { ComfyApp } from './app'
|
||||
import { api } from './api'
|
||||
import { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph'
|
||||
import { ComfyWorkflow, useWorkflowStore } from '@/stores/workflowStore'
|
||||
import { LGraphNode } from '@comfyorg/litegraph'
|
||||
import type { ComfyWorkflowJSON } from '@/types/comfyWorkflow'
|
||||
import type { ExecutedWsMessage } from '@/types/apiTypes'
|
||||
import { useExecutionStore } from '@/stores/executionStore'
|
||||
import _ from 'lodash'
|
||||
import * as jsondiffpatch from 'jsondiffpatch'
|
||||
import _ from 'lodash'
|
||||
import log from 'loglevel'
|
||||
|
||||
import { useExecutionStore } from '@/stores/executionStore'
|
||||
import { ComfyWorkflow, useWorkflowStore } from '@/stores/workflowStore'
|
||||
import type { ExecutedWsMessage } from '@/types/apiTypes'
|
||||
import type { ComfyWorkflowJSON } from '@/types/comfyWorkflow'
|
||||
|
||||
import { api } from './api'
|
||||
import type { ComfyApp } from './app'
|
||||
|
||||
function clone<T>(obj: T): T {
|
||||
return JSON.parse(JSON.stringify(obj))
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
// @ts-strict-ignore
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { app, ANIM_PREVIEW_WIDGET } from './app'
|
||||
import { LGraphCanvas, LGraphNode, LiteGraph } from '@comfyorg/litegraph'
|
||||
import type { Vector4 } from '@comfyorg/litegraph'
|
||||
import {
|
||||
@@ -8,6 +6,10 @@ import {
|
||||
IWidgetOptions
|
||||
} from '@comfyorg/litegraph/dist/types/widgets'
|
||||
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
|
||||
import { ANIM_PREVIEW_WIDGET, app } from './app'
|
||||
|
||||
const SIZE = Symbol()
|
||||
|
||||
interface Rect {
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
// @ts-strict-ignore
|
||||
import { LiteGraph } from '@comfyorg/litegraph'
|
||||
|
||||
import { api } from './api'
|
||||
import { getFromPngFile } from './metadata/png'
|
||||
import { getFromFlacFile } from './metadata/flac'
|
||||
import { getFromPngFile } from './metadata/png'
|
||||
|
||||
// Original functions left in for backwards compatibility
|
||||
export function getPngMetadata(file: File): Promise<Record<string, string>> {
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
// @ts-strict-ignore
|
||||
import { api } from './api'
|
||||
import { ComfyDialog as _ComfyDialog } from './ui/dialog'
|
||||
import { toggleSwitch } from './ui/toggleSwitch'
|
||||
import { ComfySettingsDialog } from './ui/settings'
|
||||
import { ComfyApp, app } from './app'
|
||||
import { TaskItem, type StatusWsMessageStatus } from '@/types/apiTypes'
|
||||
import { useDialogService } from '@/services/dialogService'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useCommandStore } from '@/stores/commandStore'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
import { type StatusWsMessageStatus, TaskItem } from '@/types/apiTypes'
|
||||
|
||||
import { api } from './api'
|
||||
import { ComfyApp, app } from './app'
|
||||
import { ComfyDialog as _ComfyDialog } from './ui/dialog'
|
||||
import { ComfySettingsDialog } from './ui/settings'
|
||||
import { toggleSwitch } from './ui/toggleSwitch'
|
||||
|
||||
export const ComfyDialog = _ComfyDialog
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// @ts-strict-ignore
|
||||
import { ComfyDialog } from '../dialog'
|
||||
import { $el } from '../../ui'
|
||||
import { ComfyDialog } from '../dialog'
|
||||
|
||||
export class ComfyAsyncDialog extends ComfyDialog<HTMLDialogElement> {
|
||||
#resolve: (value: any) => void
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
// @ts-strict-ignore
|
||||
import { $el } from '../../ui'
|
||||
import { applyClasses, ClassList, toggleElement } from '../utils'
|
||||
import { prop } from '../../utils'
|
||||
import type { ComfyPopup } from './popup'
|
||||
import type { ComfyComponent } from '.'
|
||||
import type { ComfyApp } from '@/scripts/app'
|
||||
import { Settings } from '@/types/apiTypes'
|
||||
|
||||
import type { ComfyComponent } from '.'
|
||||
import { $el } from '../../ui'
|
||||
import { prop } from '../../utils'
|
||||
import { ClassList, applyClasses, toggleElement } from '../utils'
|
||||
import type { ComfyPopup } from './popup'
|
||||
|
||||
type ComfyButtonProps = {
|
||||
icon?: string
|
||||
overIcon?: string
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @ts-strict-ignore
|
||||
import { $el } from '../../ui'
|
||||
import { ComfyButton } from './button'
|
||||
import { prop } from '../../utils'
|
||||
import { ComfyButton } from './button'
|
||||
|
||||
export class ComfyButtonGroup {
|
||||
element = $el('div.comfyui-button-group')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// @ts-strict-ignore
|
||||
import { prop } from '../../utils'
|
||||
import { $el } from '../../ui'
|
||||
import { applyClasses, ClassList } from '../utils'
|
||||
import { prop } from '../../utils'
|
||||
import { ClassList, applyClasses } from '../utils'
|
||||
|
||||
export class ComfyPopup extends EventTarget {
|
||||
element = $el('div.comfyui-popup')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { $el } from '../../ui'
|
||||
import { ComfyButton } from './button'
|
||||
import { prop } from '../../utils'
|
||||
import { ComfyButton } from './button'
|
||||
import { ComfyPopup } from './popup'
|
||||
|
||||
export class ComfySplitButton {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// @ts-strict-ignore
|
||||
import { useDialogStore } from '@/stores/dialogStore'
|
||||
|
||||
import { $el } from '../ui'
|
||||
|
||||
export class ComfyDialog<
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
import { $el } from '../ui'
|
||||
|
||||
$el('style', {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { ComfyApp } from '@/scripts/app'
|
||||
|
||||
import { $el } from '../../ui'
|
||||
import { ComfyButtonGroup } from '../components/buttonGroup'
|
||||
import './menu.css'
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { ComfyApp } from '@/scripts/app'
|
||||
import { ComfyDialog } from './dialog'
|
||||
import type { SettingParams } from '@/types/settingTypes'
|
||||
import type { Settings } from '@/types/apiTypes'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import type { Settings } from '@/types/apiTypes'
|
||||
import type { SettingParams } from '@/types/settingTypes'
|
||||
|
||||
import { ComfyDialog } from './dialog'
|
||||
|
||||
export class ComfySettingsDialog extends ComfyDialog<HTMLDialogElement> {
|
||||
app: ComfyApp
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
// @ts-strict-ignore
|
||||
import { api } from './api'
|
||||
import './domWidget'
|
||||
import type { ComfyApp } from './app'
|
||||
import type { LGraphNode } from '@comfyorg/litegraph'
|
||||
import { InputSpec } from '@/types/apiTypes'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import type { IWidget } from '@comfyorg/litegraph'
|
||||
import { Editor as TiptapEditor } from '@tiptap/core'
|
||||
import TiptapStarterKit from '@tiptap/starter-kit'
|
||||
import { Markdown as TiptapMarkdown } from 'tiptap-markdown'
|
||||
import TiptapLink from '@tiptap/extension-link'
|
||||
import TiptapTable from '@tiptap/extension-table'
|
||||
import TiptapTableCell from '@tiptap/extension-table-cell'
|
||||
import TiptapTableHeader from '@tiptap/extension-table-header'
|
||||
import TiptapTableRow from '@tiptap/extension-table-row'
|
||||
import TiptapStarterKit from '@tiptap/starter-kit'
|
||||
import { Markdown as TiptapMarkdown } from 'tiptap-markdown'
|
||||
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useToastStore } from '@/stores/toastStore'
|
||||
import { InputSpec } from '@/types/apiTypes'
|
||||
|
||||
import { api } from './api'
|
||||
import type { ComfyApp } from './app'
|
||||
import './domWidget'
|
||||
|
||||
export type ComfyWidgetConstructor = (
|
||||
node: LGraphNode,
|
||||
|
||||
Reference in New Issue
Block a user