Fx imports and most tests

This commit is contained in:
Marcel Mraz 2025-03-20 13:50:36 +01:00
parent ddac2e969a
commit 40ff1b08ae
70 changed files with 335 additions and 305 deletions

View file

@ -1,6 +1,6 @@
import oc from "open-color";
import type { Merge } from "@excalidraw/common/utility-types";
import type { Merge } from "./utility-types";
// FIXME can't put to utils.ts rn because of circular dependency
const pick = <R extends Record<string, any>, K extends readonly (keyof R)[]>(

View file

@ -1,10 +1,10 @@
import { FONT_FAMILY, FONT_FAMILY_FALLBACKS } from "@excalidraw/common";
import type {
ExcalidrawTextElement,
FontFamilyValues,
} from "@excalidraw/element/types";
import { FONT_FAMILY, FONT_FAMILY_FALLBACKS } from ".";
/**
* Encapsulates font metrics with additional font metadata.
* */

View file

@ -2,6 +2,7 @@ export * from "./binary-heap";
export * from "./colors";
export * from "./constants";
export * from "./font-metadata";
export * from "./queue";
export * from "./keys";
export * from "./points";
export * from "./promise-pool";

View file

@ -1,7 +1,7 @@
import type { ValueOf } from "@excalidraw/common/utility-types";
import { isDarwin } from "./constants";
import type { ValueOf } from "./utility-types";
export const CODES = {
EQUAL: "Equal",
MINUS: "Minus",

View file

@ -1,8 +1,8 @@
import { promiseTry, resolvablePromise } from "@excalidraw/common";
import { promiseTry, resolvablePromise } from ".";
import type { ResolvablePromise } from "@excalidraw/common";
import type { ResolvablePromise } from ".";
import type { MaybePromise } from "@excalidraw/common/utility-types";
import type { MaybePromise } from "./utility-types";
type Job<T, TArgs extends unknown[]> = (...args: TArgs) => MaybePromise<T>;

View file

@ -14,11 +14,6 @@ import type {
Zoom,
} from "@excalidraw/excalidraw/types";
import type {
MaybePromise,
ResolutionType,
} from "@excalidraw/common/utility-types";
import { COLOR_PALETTE } from "./colors";
import {
DEFAULT_VERSION,
@ -28,6 +23,8 @@ import {
WINDOWS_EMOJI_FALLBACK_FONT,
} from "./constants";
import type { MaybePromise, ResolutionType } from "./utility-types";
import type { EVENT } from "./constants";
let mockDateTime: string | null = null;