mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
Use '@' path mapping (#94)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { app } from "../../scripts/app";
|
import { app } from "../../scripts/app";
|
||||||
import { $el } from "../../scripts/ui";
|
import { $el } from "../../scripts/ui";
|
||||||
import type { ColorPalettes } from "/types/colorPalette";
|
import type { ColorPalettes } from "@/types/colorPalette";
|
||||||
import { LGraphCanvas, LiteGraph } from "@comfyorg/litegraph";
|
import { LGraphCanvas, LiteGraph } from "@comfyorg/litegraph";
|
||||||
|
|
||||||
// Manage color palettes
|
// Manage color palettes
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { app } from "../../scripts/app";
|
import { app } from "../../scripts/app";
|
||||||
import { api } from "../../scripts/api";
|
import { api } from "../../scripts/api";
|
||||||
import type { IWidget } from "@comfyorg/litegraph";
|
import type { IWidget } from "@comfyorg/litegraph";
|
||||||
import type { DOMWidget } from "/scripts/domWidget";
|
import type { DOMWidget } from "@/scripts/domWidget";
|
||||||
import { ComfyNodeDef } from "/types/apiTypes";
|
import { ComfyNodeDef } from "@/types/apiTypes";
|
||||||
|
|
||||||
type FolderType = "input" | "output" | "temp";
|
type FolderType = "input" | "output" | "temp";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { app } from "../../scripts/app";
|
import { app } from "../../scripts/app";
|
||||||
import { ComfyNodeDef } from "/types/apiTypes";
|
import { ComfyNodeDef } from "@/types/apiTypes";
|
||||||
|
|
||||||
// Adds an upload button to the nodes
|
// Adds an upload button to the nodes
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import { ComfyWorkflowJSON } from "types/comfyWorkflow";
|
import { ComfyWorkflowJSON } from "@/types/comfyWorkflow";
|
||||||
import {
|
import {
|
||||||
HistoryTaskItem,
|
HistoryTaskItem,
|
||||||
PendingTaskItem,
|
PendingTaskItem,
|
||||||
RunningTaskItem,
|
RunningTaskItem,
|
||||||
ComfyNodeDef,
|
ComfyNodeDef,
|
||||||
} from "/types/apiTypes";
|
} from "@/types/apiTypes";
|
||||||
|
|
||||||
interface QueuePromptRequestBody {
|
interface QueuePromptRequestBody {
|
||||||
client_id: string;
|
client_id: string;
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import { addDomClippingSetting } from "./domWidget";
|
|||||||
import { createImageHost, calculateImageGrid } from "./ui/imagePreview";
|
import { createImageHost, calculateImageGrid } from "./ui/imagePreview";
|
||||||
import { DraggableList } from "./ui/draggableList";
|
import { DraggableList } from "./ui/draggableList";
|
||||||
import { applyTextReplacements, addStylesheet } from "./utils";
|
import { applyTextReplacements, addStylesheet } from "./utils";
|
||||||
import type { ComfyExtension } from "/types/comfy";
|
import type { ComfyExtension } from "@/types/comfy";
|
||||||
import {
|
import {
|
||||||
type ComfyWorkflowJSON,
|
type ComfyWorkflowJSON,
|
||||||
parseComfyWorkflow,
|
parseComfyWorkflow,
|
||||||
} from "../types/comfyWorkflow";
|
} from "../types/comfyWorkflow";
|
||||||
import { ComfyNodeDef } from "/types/apiTypes";
|
import { ComfyNodeDef } from "@/types/apiTypes";
|
||||||
import { ComfyAppMenu } from "./ui/menu/index";
|
import { ComfyAppMenu } from "./ui/menu/index";
|
||||||
import { getStorageValue } from "./utils";
|
import { getStorageValue } from "./utils";
|
||||||
import { ComfyWorkflowManager, ComfyWorkflow } from "./workflows";
|
import { ComfyWorkflowManager, ComfyWorkflow } from "./workflows";
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ComfyWorkflowJSON } from "/types/comfyWorkflow";
|
import type { ComfyWorkflowJSON } from "@/types/comfyWorkflow";
|
||||||
|
|
||||||
export const defaultGraph: ComfyWorkflowJSON = {
|
export const defaultGraph: ComfyWorkflowJSON = {
|
||||||
last_node_id: 9,
|
last_node_id: 9,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { ComfyDialog as _ComfyDialog } from "./ui/dialog";
|
|||||||
import { toggleSwitch } from "./ui/toggleSwitch";
|
import { toggleSwitch } from "./ui/toggleSwitch";
|
||||||
import { ComfySettingsDialog } from "./ui/settings";
|
import { ComfySettingsDialog } from "./ui/settings";
|
||||||
import { ComfyApp, app } from "./app";
|
import { ComfyApp, app } from "./app";
|
||||||
import { TaskItem } from "/types/apiTypes";
|
import { TaskItem } from "@/types/apiTypes";
|
||||||
|
|
||||||
export const ComfyDialog = _ComfyDialog;
|
export const ComfyDialog = _ComfyDialog;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { applyClasses, ClassList, toggleElement } from "../utils";
|
|||||||
import { prop } from "../../utils";
|
import { prop } from "../../utils";
|
||||||
import type { ComfyPopup } from "./popup";
|
import type { ComfyPopup } from "./popup";
|
||||||
import type { ComfyComponent } from ".";
|
import type { ComfyComponent } from ".";
|
||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
|
|
||||||
type ComfyButtonProps = {
|
type ComfyButtonProps = {
|
||||||
icon?: string;
|
icon?: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
import { api } from "../../api";
|
import { api } from "../../api";
|
||||||
import { $el } from "../../ui";
|
import { $el } from "../../ui";
|
||||||
import { downloadBlob } from "../../utils";
|
import { downloadBlob } from "../../utils";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { api } from "../../api";
|
|||||||
import { ComfySplitButton } from "../components/splitButton";
|
import { ComfySplitButton } from "../components/splitButton";
|
||||||
import { ComfyQueueOptions } from "./queueOptions";
|
import { ComfyQueueOptions } from "./queueOptions";
|
||||||
import { prop } from "../../utils";
|
import { prop } from "../../utils";
|
||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
|
|
||||||
export class ComfyQueueButton {
|
export class ComfyQueueButton {
|
||||||
element = $el("div.comfyui-queue-button");
|
element = $el("div.comfyui-queue-button");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
import { $el } from "../../ui";
|
import { $el } from "../../ui";
|
||||||
import { prop } from "../../utils";
|
import { prop } from "../../utils";
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
import { ComfyButton } from "../components/button";
|
import { ComfyButton } from "../components/button";
|
||||||
import { ComfyViewList, ComfyViewListButton } from "./viewList";
|
import { ComfyViewList, ComfyViewListButton } from "./viewList";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { ComfyButton } from "../components/button";
|
|||||||
import { $el } from "../../ui";
|
import { $el } from "../../ui";
|
||||||
import { api } from "../../api";
|
import { api } from "../../api";
|
||||||
import { ComfyPopup } from "../components/popup";
|
import { ComfyPopup } from "../components/popup";
|
||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
|
|
||||||
type ViewListMode = "Queue" | "History";
|
type ViewListMode = "Queue" | "History";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { ComfyButton } from "../components/button";
|
import { ComfyButton } from "../components/button";
|
||||||
import { ComfyViewList, ComfyViewListButton } from "./viewList";
|
import { ComfyViewList, ComfyViewListButton } from "./viewList";
|
||||||
import { api } from "../../api";
|
import { api } from "../../api";
|
||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
|
|
||||||
export class ComfyViewQueueButton extends ComfyViewListButton {
|
export class ComfyViewQueueButton extends ComfyViewListButton {
|
||||||
constructor(app: ComfyApp) {
|
constructor(app: ComfyApp) {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { ComfyPopup } from "../components/popup";
|
|||||||
import { createSpinner } from "../spinner";
|
import { createSpinner } from "../spinner";
|
||||||
import { ComfyWorkflow, trimJsonExt } from "../../workflows";
|
import { ComfyWorkflow, trimJsonExt } from "../../workflows";
|
||||||
import { ComfyAsyncDialog } from "../components/asyncDialog";
|
import { ComfyAsyncDialog } from "../components/asyncDialog";
|
||||||
import type { ComfyApp } from "scripts/app";
|
import type { ComfyApp } from "@/scripts/app";
|
||||||
import type { ComfyComponent } from "../components";
|
import type { ComfyComponent } from "../components";
|
||||||
|
|
||||||
export class ComfyWorkflowsMenu {
|
export class ComfyWorkflowsMenu {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { api } from "./api";
|
|||||||
import "./domWidget";
|
import "./domWidget";
|
||||||
import type { ComfyApp } from "./app";
|
import type { ComfyApp } from "./app";
|
||||||
import type { IWidget, LGraphNode } from "@comfyorg/litegraph";
|
import type { IWidget, LGraphNode } from "@comfyorg/litegraph";
|
||||||
import { ComfyNodeDef } from "/types/apiTypes";
|
import { ComfyNodeDef } from "@/types/apiTypes";
|
||||||
|
|
||||||
export type ComfyWidgetConstructor = (
|
export type ComfyWidgetConstructor = (
|
||||||
node: LGraphNode,
|
node: LGraphNode,
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"baseUrl": ".",
|
"baseUrl": ".",
|
||||||
"paths": {
|
"paths": {
|
||||||
"*": ["src/*"],
|
"@/*": ["src/*"],
|
||||||
},
|
},
|
||||||
"typeRoots": ["src/types", "node_modules/@types"],
|
"typeRoots": ["src/types", "node_modules/@types"],
|
||||||
"outDir": "./dist",
|
"outDir": "./dist",
|
||||||
|
|||||||
Reference in New Issue
Block a user