Fix es & ts build

This commit is contained in:
Marcel Mraz 2025-03-18 12:44:13 +01:00
parent 931d03d514
commit fc225c5353
18 changed files with 73 additions and 54 deletions

View file

@ -13,6 +13,8 @@ import {
isLinearElement,
} from "@excalidraw/element/typeChecks";
import type { Mutable } from "@excalidraw/excalidraw/utility-types";
import type {
ExcalidrawElement,
NonDeletedExcalidrawElement,
@ -512,7 +514,10 @@ export const _generateElementShape = (
if (isPathALoop(element.points)) {
// generate rough polygon to fill freedraw shape
const simplifiedPoints = simplify(element.points, 0.75);
const simplifiedPoints = simplify(
element.points as Mutable<LocalPoint[]>,
0.75,
);
shape = generator.curve(simplifiedPoints as [number, number][], {
...generateRoughOptions(element),
stroke: "none",

View file

@ -13,6 +13,7 @@ import {
import { getCurvePathOps } from "@excalidraw/utils/geometry/shape";
import { generateRoughOptions } from "@excalidraw/element/Shape";
import { ShapeCache } from "@excalidraw/element/ShapeCache";
import type {
Degrees,

View file

@ -5,6 +5,8 @@ import {
import { KEYS, invariant, toBrandedType } from "@excalidraw/common";
import { aabbForElement } from "@excalidraw/element";
import { pointFrom, type LocalPoint } from "@excalidraw/math";
import type {
AppState,
PendingExcalidrawElements,

View file

@ -5,12 +5,13 @@ import {
toBrandedType,
} from "@excalidraw/common";
// TODO_SEP: should be passed in or injected instead
import Scene from "@excalidraw/excalidraw/scene/Scene";
import type { Radians } from "@excalidraw/math";
import type { Mutable } from "@excalidraw/excalidraw/utility-types";
import Scene from "../scene/Scene";
import { ShapeCache } from "./ShapeCache";
import { updateElbowArrowPoints } from "./elbowArrow";

View file

@ -38,7 +38,7 @@ import {
import { getContainingFrame } from "@excalidraw/element/frame";
import { getCornerRadius } from "@excalidraw/element/shapes";
// TODO: consider separating
// TODO_SEP: consider separating
import { getVerticalOffset } from "@excalidraw/excalidraw/fonts/FontMetadata";
import type {