utils import is now condensed into "/utils"

This commit is contained in:
kruschen 2024-08-26 00:34:19 +00:00
parent 743e9bbbb1
commit 3b6f8349ef
2 changed files with 25 additions and 12 deletions

View file

@ -1,19 +1,14 @@
import * as d3 from "d3"; import * as d3 from "d3";
import {closeDialogs} from "dialogs/utils"; import { closeDialogs } from "dialogs/utils";
import {layerIsOn, toggleLayer} from "layers"; import { layerIsOn, toggleLayer } from "layers";
import {clearMainTip, tip} from "scripts/tooltips"; import { clearMainTip, tip } from "scripts/tooltips";
import {findGridCell, getGridPolygon} from "utils/graphUtils"; import { byId, findGridCell, getGridPolygon, getInputNumber, parseTransform, rand, rn } from "utils";
import {getInputNumber} from "utils/nodeUtils";
import {rn} from "utils/numberUtils";
import {rand} from "utils/probabilityUtils";
import {byId} from "utils/shorthands";
import {parseTransform} from "utils/stringUtils";
// @ts-expect-error js module // @ts-expect-error js module
import {editStyle} from "modules/style"; import { editStyle } from "modules/style";
import {setDefaultEventHandlers} from "scripts/events"; import { setDefaultEventHandlers } from "scripts/events";
// @ts-expect-error js module // @ts-expect-error js module
import {unselect} from "modules/ui/editors"; import { unselect } from "modules/ui/editors";
let isLoaded = false; let isLoaded = false;

18
src/utils/index.ts Normal file
View file

@ -0,0 +1,18 @@
export * from "./arrayUtils";
export * from "./colorUtils";
export * from "./coordinateUtils";
export * from "./debugUtils";
export * from "./errorUtils";
export * from "./functionUtils";
export * from "./graphUtils";
export * from "./keyboardUtils";
export * from "./languageUtils";
export * from "./lineUtils";
export * from "./linkUtils";
export * from "./nodeUtils";
export * from "./numberUtils";
export * from "./probabilityUtils";
export * from "./shorthands";
export * from "./stringUtils";
export * from "./typeUtils";
export * from "./unitUtils";