fix: add constants and side methods to packages (#10418)

* fix: add constants and side methods to packages

* add transform to the element package

* lint

* remove dead code

* put transform types back to transform.ts

* fix imports

* fix imports in test

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
Ryan Di
2025-12-28 21:53:25 +01:00
committed by GitHub
co-authored by dwelle
parent d87620b239
commit e95222ed32
12 changed files with 484 additions and 30 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ import {
CJK_HAND_DRAWN_FALLBACK_FONT,
WINDOWS_EMOJI_FALLBACK_FONT,
getFontFamilyFallbacks,
FONT_SIZES,
} from "@excalidraw/common";
import { getContainerElement } from "@excalidraw/element";
import { charWidth } from "@excalidraw/element";
@@ -240,7 +241,7 @@ export class Fonts {
for (const [index, fontFamily] of fontFamilies.entries()) {
const font = getFontString({
fontFamily,
fontSize: 16,
fontSize: FONT_SIZES.sm,
});
// WARN: without "text" param it does not have to mean that all font faces are loaded as it could be just one irrelevant font face!