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