repo stringlengths 7 64 | file_url stringlengths 81 338 | file_path stringlengths 5 257 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 15:25:31 2026-01-05 01:50:38 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/utils/tests/geometry.test.ts | packages/utils/tests/geometry.test.ts | import {
pointFrom,
lineSegment,
polygon,
pointOnLineSegment,
pointOnPolygon,
polygonIncludesPoint,
segmentsIntersectAt,
} from "@excalidraw/math";
import type {
GlobalPoint,
LineSegment,
Polygon,
Radians,
} from "@excalidraw/math";
import { pointInEllipse, pointOnEllipse, type Ellipse } from ".... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/utils/tests/export.test.ts | packages/utils/tests/export.test.ts | import { MIME_TYPES } from "@excalidraw/common";
import * as mockedSceneExportUtils from "@excalidraw/excalidraw/scene/export";
import { diagramFactory } from "@excalidraw/excalidraw/tests/fixtures/diagramFixture";
import { vi } from "vitest";
import * as utils from "../src";
const exportToSvgSpy = vi.spyOn(mockedSce... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/utils/tests/withinBounds.test.ts | packages/utils/tests/withinBounds.test.ts | import { API } from "@excalidraw/excalidraw/tests/helpers/api";
import type { Bounds } from "@excalidraw/common";
import {
elementPartiallyOverlapsWithOrContainsBBox,
elementsOverlappingBBox,
isElementInsideBBox,
} from "../src/withinBounds";
const makeElement = (x: number, y: number, width: number, height: nu... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/global.d.ts | packages/common/global.d.ts | /// <reference types="vite/client" />
import "@excalidraw/excalidraw/global";
import "@excalidraw/excalidraw/css";
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/promise-pool.ts | packages/common/src/promise-pool.ts | import Pool from "es6-promise-pool";
// extending the missing types
// relying on the [Index, T] to keep a correct order
type TPromisePool<T, Index = number> = Pool<[Index, T][]> & {
addEventListener: (
type: "fulfilled",
listener: (event: { data: { result: [Index, T] } }) => void,
) => (event: { data: { r... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/random.ts | packages/common/src/random.ts | import { nanoid } from "nanoid";
import { Random } from "roughjs/bin/math";
import { isTestEnv } from "./utils";
let random = new Random(Date.now());
let testIdBase = 0;
export const randomInteger = () => Math.floor(random.next() * 2 ** 31);
export const reseed = (seed: number) => {
random = new Random(seed);
t... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/utils.ts | packages/common/src/utils.ts | import { average } from "@excalidraw/math";
import type { FontFamilyValues, FontString } from "@excalidraw/element/types";
import type {
ActiveTool,
AppState,
ToolType,
UnsubscribeCallback,
Zoom,
} from "@excalidraw/excalidraw/types";
import { tinycolor } from "./colors";
import {
DEFAULT_VERSION,
ENV,... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/visualdebug.ts | packages/common/src/visualdebug.ts | import {
isLineSegment,
lineSegment,
pointFrom,
type GlobalPoint,
type LocalPoint,
} from "@excalidraw/math";
import type { Curve } from "@excalidraw/math";
import type { LineSegment } from "@excalidraw/utils";
import { type Bounds, isBounds } from "./bounds";
// The global data holder to collect the debug... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/queue.ts | packages/common/src/queue.ts | import { promiseTry, resolvablePromise } from ".";
import type { ResolvablePromise } from ".";
import type { MaybePromise } from "./utility-types";
type Job<T, TArgs extends unknown[]> = (...args: TArgs) => MaybePromise<T>;
type QueueJob<T, TArgs extends unknown[]> = {
jobFactory: Job<T, TArgs>;
promise: Resolv... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/font-metadata.ts | packages/common/src/font-metadata.ts | import type {
ExcalidrawTextElement,
FontFamilyValues,
} from "@excalidraw/element/types";
import { FONT_FAMILY, FONT_FAMILY_FALLBACKS } from "./constants";
/**
* Encapsulates font metrics with additional font metadata.
* */
export interface FontMetadata {
/** for head & hhea metrics read the woff2 with https... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/bounds.ts | packages/common/src/bounds.ts | /**
* x and y position of top left corner, x and y position of bottom right corner
*/
export type Bounds = readonly [
minX: number,
minY: number,
maxX: number,
maxY: number,
];
export const isBounds = (box: unknown): box is Bounds =>
Array.isArray(box) &&
box.length === 4 &&
typeof box[0] === "number" ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/utils.test.ts | packages/common/src/utils.test.ts | import {
isTransparent,
mapFind,
reduceToCommonValue,
} from "@excalidraw/common";
describe("@excalidraw/common/utils", () => {
describe("isTransparent()", () => {
it("should return true when color is rgb transparent", () => {
expect(isTransparent("#ff00")).toEqual(true);
expect(isTransparent("... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/url.ts | packages/common/src/url.ts | import { sanitizeUrl } from "@braintree/sanitize-url";
import { escapeDoubleQuotes } from "./utils";
export const normalizeLink = (link: string) => {
link = link.trim();
if (!link) {
return link;
}
return sanitizeUrl(escapeDoubleQuotes(link));
};
export const isLocalLink = (link: string | null) => {
re... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/utility-types.ts | packages/common/src/utility-types.ts | export type Mutable<T> = {
-readonly [P in keyof T]: T[P];
};
export type ValueOf<T> = T[keyof T];
export type Merge<M, N> = Omit<M, keyof N> & N;
/** utility type to assert that the second type is a subtype of the first type.
* Returns the subtype. */
export type SubtypeOf<Supertype, Subtype extends Supertype> =... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/colors.ts | packages/common/src/colors.ts | import oc from "open-color";
import tinycolor from "tinycolor2";
import { clamp } from "@excalidraw/math";
import { degreesToRadians } from "@excalidraw/math";
import type { Degrees } from "@excalidraw/math";
import type { Merge } from "./utility-types";
export { tinycolor };
// Browser-only cache to avoid memory ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/emitter.ts | packages/common/src/emitter.ts | import type { UnsubscribeCallback } from "@excalidraw/excalidraw/types";
type Subscriber<T extends any[]> = (...payload: T) => void;
export class Emitter<T extends any[] = []> {
public subscribers: Subscriber<T>[] = [];
/**
* Attaches subscriber
*
* @returns unsubscribe function
*/
on(...handlers: ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/constants.ts | packages/common/src/constants.ts | import type {
ExcalidrawElement,
FontFamilyValues,
} from "@excalidraw/element/types";
import type { AppProps, AppState } from "@excalidraw/excalidraw/types";
import { COLOR_PALETTE } from "./colors";
export const supportsResizeObserver =
typeof window !== "undefined" && "ResizeObserver" in window;
export cons... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/editorInterface.ts | packages/common/src/editorInterface.ts | export type StylesPanelMode = "compact" | "full" | "mobile";
export type EditorInterface = Readonly<{
formFactor: "phone" | "tablet" | "desktop";
desktopUIMode: "compact" | "full";
userAgent: Readonly<{
isMobileDevice: boolean;
platform: "ios" | "android" | "other" | "unknown";
}>;
isTouchScreen: boo... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/colors.test.ts | packages/common/src/colors.test.ts | import {
applyDarkModeFilter,
COLOR_PALETTE,
rgbToHex,
} from "@excalidraw/common";
describe("applyDarkModeFilter", () => {
describe("basic transformations", () => {
it("transforms black to near-white", () => {
const result = applyDarkModeFilter("#000000");
// Black inverted 93% + hue rotate sh... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/keys.ts | packages/common/src/keys.ts | import { isDarwin } from "./editorInterface";
import type { ValueOf } from "./utility-types";
export const CODES = {
EQUAL: "Equal",
MINUS: "Minus",
NUM_ADD: "NumpadAdd",
NUM_SUBTRACT: "NumpadSubtract",
NUM_ZERO: "Numpad0",
BRACKET_RIGHT: "BracketRight",
BRACKET_LEFT: "BracketLeft",
ONE: "Digit1",
T... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/index.ts | packages/common/src/index.ts | export * from "./binary-heap";
export * from "./bounds";
export * from "./colors";
export * from "./constants";
export * from "./font-metadata";
export * from "./queue";
export * from "./keys";
export * from "./points";
export * from "./promise-pool";
export * from "./random";
export * from "./url";
export * from "./ut... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/points.ts | packages/common/src/points.ts | import {
pointFromPair,
type GlobalPoint,
type LocalPoint,
} from "@excalidraw/math";
import type { NullableGridSize } from "@excalidraw/excalidraw/types";
export const getSizeFromPoints = (
points: readonly (GlobalPoint | LocalPoint)[],
) => {
const xs = points.map((point) => point[0]);
const ys = points... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/src/binary-heap.ts | packages/common/src/binary-heap.ts | export class BinaryHeap<T> {
private content: T[] = [];
constructor(private scoreFunction: (node: T) => number) {}
sinkDown(idx: number) {
const node = this.content[idx];
const nodeScore = this.scoreFunction(node);
while (idx > 0) {
const parentN = ((idx + 1) >> 1) - 1;
const parent = th... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/tests/queue.test.ts | packages/common/tests/queue.test.ts | import { Queue } from "../src/queue";
describe("Queue", () => {
const calls: any[] = [];
const createJobFactory =
<T>(
// for purpose of this test, Error object will become a rejection value
resolutionOrRejectionValue: T,
ms = 1,
) =>
() => {
return new Promise<T>((resolve, rej... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/tests/url.test.tsx | packages/common/tests/url.test.tsx | import { normalizeLink } from "../src/url";
describe("normalizeLink", () => {
// NOTE not an extensive XSS test suite, just to check if we're not
// regressing in sanitization
it("should sanitize links", () => {
expect(
// eslint-disable-next-line no-script-url
normalizeLink(`javascript://%0aaler... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/common/tests/keys.test.ts | packages/common/tests/keys.test.ts | import { KEYS, matchKey } from "../src/keys";
describe("key matcher", async () => {
it("should not match unexpected key", async () => {
expect(
matchKey(new KeyboardEvent("keydown", { key: "N" }), KEYS.Y),
).toBeFalsy();
expect(
matchKey(new KeyboardEvent("keydown", { key: "Unidentified" }), ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/mermaid.ts | packages/excalidraw/mermaid.ts | /** heuristically checks whether the text may be a mermaid diagram definition */
export const isMaybeMermaidDefinition = (text: string) => {
const chartTypes = [
"flowchart",
"graph",
"sequenceDiagram",
"classDiagram",
"stateDiagram",
"stateDiagram-v2",
"erDiagram",
"journey",
"gan... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/charts.test.ts | packages/excalidraw/charts.test.ts | import { tryParseCells, tryParseNumber, VALID_SPREADSHEET } from "./charts";
import type { Spreadsheet } from "./charts";
describe("charts", () => {
describe("tryParseNumber", () => {
it.each<[string, number]>([
["1", 1],
["0", 0],
["-1", -1],
["0.1", 0.1],
[".1", 0.1],
["1."... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/appState.ts | packages/excalidraw/appState.ts | import {
COLOR_PALETTE,
ARROW_TYPE,
DEFAULT_ELEMENT_PROPS,
DEFAULT_FONT_FAMILY,
DEFAULT_FONT_SIZE,
DEFAULT_TEXT_ALIGN,
DEFAULT_GRID_SIZE,
EXPORT_SCALES,
STATS_PANELS,
THEME,
DEFAULT_GRID_STEP,
isTestEnv,
} from "@excalidraw/common";
import type { AppState, NormalizedZoomValue } from "./types";
... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/animation-frame-handler.ts | packages/excalidraw/animation-frame-handler.ts | export type AnimationCallback = (timestamp: number) => void | boolean;
export type AnimationTarget = {
callback: AnimationCallback;
stopped: boolean;
};
export class AnimationFrameHandler {
private targets = new WeakMap<object, AnimationTarget>();
private rafIds = new WeakMap<object, number>();
register(ke... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/clipboard.test.ts | packages/excalidraw/clipboard.test.ts | import {
createPasteEvent,
parseClipboard,
parseDataTransferEvent,
serializeAsClipboardJSON,
} from "./clipboard";
import { API } from "./tests/helpers/api";
describe("parseClipboard()", () => {
it("should parse JSON as plaintext if not excalidraw-api/clipboard data", async () => {
let text;
let clip... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/errors.ts | packages/excalidraw/errors.ts | type CANVAS_ERROR_NAMES = "CANVAS_ERROR" | "CANVAS_POSSIBLY_TOO_BIG";
export class CanvasError extends Error {
constructor(
message: string = "Couldn't export canvas.",
name: CANVAS_ERROR_NAMES = "CANVAS_ERROR",
) {
super();
this.name = name;
this.message = message;
}
}
export class AbortErr... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/cursor.ts | packages/excalidraw/cursor.ts | import OpenColor from "open-color";
import { CURSOR_TYPE, MIME_TYPES, THEME } from "@excalidraw/common";
import { isHandToolActive, isEraserActive } from "./appState";
import type { AppState, DataURL } from "./types";
const laserPointerCursorSVG_tag = `<svg viewBox="0 0 24 24" stroke-width="1" width="28" height="28... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/pwacompat.d.ts | packages/excalidraw/pwacompat.d.ts | declare module "pwacompat";
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/index-node.ts | packages/excalidraw/index-node.ts | import { getDefaultAppState } from "./appState";
import { exportToCanvas } from "./scene/export";
const fs = require("fs");
const { registerFont, createCanvas } = require("canvas");
const elements = [
{
id: "eVzaxG3YnHhqjEmD7NdYo",
type: "diamond",
x: 519,
y: 199,
width: 113,
height: 115,
... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/global.d.ts | packages/excalidraw/global.d.ts | interface Window {
ClipboardItem: any;
__EXCALIDRAW_SHA__: string | undefined;
EXCALIDRAW_ASSET_PATH: string | string[] | undefined;
EXCALIDRAW_THROTTLE_RENDER: boolean | undefined;
DEBUG_FRACTIONAL_INDICES: boolean | undefined;
EXCALIDRAW_EXPORT_SOURCE: string;
gtag: Function;
sa_event: Function;
fat... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/gesture.ts | packages/excalidraw/gesture.ts | import type { PointerCoords } from "./types";
export const getCenter = (pointers: Map<number, PointerCoords>) => {
const allCoords = Array.from(pointers.values());
return {
x: sum(allCoords, (coords) => coords.x) / allCoords.length,
y: sum(allCoords, (coords) => coords.y) / allCoords.length,
};
};
expor... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/history.ts | packages/excalidraw/history.ts | import { Emitter } from "@excalidraw/common";
import {
CaptureUpdateAction,
StoreChange,
StoreDelta,
} from "@excalidraw/element";
import type { StoreSnapshot, Store } from "@excalidraw/element";
import type { SceneElementsMap } from "@excalidraw/element/types";
import type { AppState } from "./types";
expor... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/index.tsx | packages/excalidraw/index.tsx | import React, { useEffect } from "react";
import { DEFAULT_UI_OPTIONS, isShallowEqual } from "@excalidraw/common";
import App from "./components/App";
import { InitializeApp } from "./components/InitializeApp";
import Footer from "./components/footer/FooterCenter";
import LiveCollaborationTrigger from "./components/l... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/clients.ts | packages/excalidraw/clients.ts | import {
COLOR_CHARCOAL_BLACK,
COLOR_VOICE_CALL,
COLOR_WHITE,
THEME,
UserIdleState,
} from "@excalidraw/common";
import { roundRect } from "./renderer/roundRect";
import type { InteractiveCanvasRenderConfig } from "./scene/types";
import type {
Collaborator,
InteractiveCanvasAppState,
SocketId,
} from... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/css.d.ts | packages/excalidraw/css.d.ts | import "csstype";
declare module "csstype" {
interface Properties {
"--max-width"?: number | string;
"--swatch-color"?: string;
"--gap"?: number | string;
"--padding"?: number | string;
}
}
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/animated-trail.ts | packages/excalidraw/animated-trail.ts | import { LaserPointer } from "@excalidraw/laser-pointer";
import {
SVG_NS,
getSvgPathFromStroke,
sceneCoordsToViewportCoords,
} from "@excalidraw/common";
import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
import type { AnimationFrameHandler } from "./animation-frame-handler";
import type Ap... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/reactUtils.ts | packages/excalidraw/reactUtils.ts | /**
* @param func handler taking at most single parameter (event).
*/
import { version as ReactVersion } from "react";
import { unstable_batchedUpdates } from "react-dom";
import { throttleRAF } from "@excalidraw/common";
export const withBatchedUpdates = <
TFunction extends ((event: any) => void) | (() => void)... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/mermaid.test.ts | packages/excalidraw/mermaid.test.ts | import { isMaybeMermaidDefinition } from "./mermaid";
describe("isMaybeMermaidDefinition", () => {
it("should return true for a valid mermaid definition", () => {
expect(isMaybeMermaidDefinition("flowchart")).toBe(true);
expect(isMaybeMermaidDefinition("flowchart LR")).toBe(true);
expect(isMaybeMermaidDe... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/snapping.ts | packages/excalidraw/snapping.ts | import {
pointFrom,
pointRotateRads,
rangeInclusive,
rangeIntersection,
rangesOverlap,
type GlobalPoint,
} from "@excalidraw/math";
import { TOOL_TYPE, KEYS } from "@excalidraw/common";
import {
getCommonBounds,
getDraggedElementsBounds,
getElementAbsoluteCoords,
} from "@excalidraw/element";
import ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/analytics.ts | packages/excalidraw/analytics.ts | // place here categories that you want to track. We want to track just a
import { isDevEnv } from "@excalidraw/common";
// small subset of categories at a given time.
const ALLOWED_CATEGORIES_TO_TRACK = new Set(["command_palette", "export"]);
export const trackEvent = (
category: string,
action: string,
label?... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/laser-trails.ts | packages/excalidraw/laser-trails.ts | import { DEFAULT_LASER_COLOR, easeOut } from "@excalidraw/common";
import type { LaserPointerOptions } from "@excalidraw/laser-pointer";
import { AnimatedTrail } from "./animated-trail";
import { getClientColor } from "./clients";
import type { Trail } from "./animated-trail";
import type { AnimationFrameHandler } f... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/clipboard.ts | packages/excalidraw/clipboard.ts | import {
ALLOWED_PASTE_MIME_TYPES,
EXPORT_DATA_TYPES,
MIME_TYPES,
arrayToMap,
isMemberOf,
isPromiseLike,
EVENT,
} from "@excalidraw/common";
import { mutateElement } from "@excalidraw/element";
import { deepCopyElement } from "@excalidraw/element";
import {
isFrameLikeElement,
isInitializedImageEleme... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/editor-jotai.ts | packages/excalidraw/editor-jotai.ts | // eslint-disable-next-line no-restricted-imports
import {
atom,
createStore,
type PrimitiveAtom,
type WritableAtom,
} from "jotai";
import { createIsolation } from "jotai-scope";
const jotai = createIsolation();
export { atom, PrimitiveAtom, WritableAtom };
export const { useAtom, useSetAtom, useAtomValue, u... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/i18n.ts | packages/excalidraw/i18n.ts | import { isDevEnv } from "@excalidraw/common";
import type { NestedKeyOf } from "@excalidraw/common/utility-types";
import { useAtomValue, editorJotaiStore, atom } from "./editor-jotai";
import fallbackLangData from "./locales/en.json";
import percentages from "./locales/percentages.json";
const COMPLETION_THRESHOLD... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/shortcut.ts | packages/excalidraw/shortcut.ts | import { isDarwin } from "@excalidraw/common";
import { t } from "./i18n";
export const getShortcutKey = (shortcut: string): string =>
shortcut
.replace(
/\b(Opt(?:ion)?|Alt)\b/i,
isDarwin ? t("keys.option") : t("keys.alt"),
)
.replace(/\bShift\b/i, t("keys.shift"))
.replace(/\b(Enter|Re... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/types.ts | packages/excalidraw/types.ts | import type {
IMAGE_MIME_TYPES,
UserIdleState,
throttleRAF,
MIME_TYPES,
EditorInterface,
} from "@excalidraw/common";
import type { LinearElementEditor } from "@excalidraw/element";
import type { MaybeTransformHandleType } from "@excalidraw/element";
import type {
PointerType,
ExcalidrawLinearElement,
... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/vite-env.d.ts | packages/excalidraw/vite-env.d.ts | /// <reference types="vite/client" />
/// <reference types="vite-plugin-pwa/vanillajs" />
/// <reference types="vite-plugin-pwa/info" />
/// <reference types="vite-plugin-svgr/client" />
interface ImportMetaEnv {
// The port to run the dev server
VITE_APP_PORT: string;
VITE_APP_BACKEND_V2_GET_URL: string;
VITE... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/react-app-env.d.ts | packages/excalidraw/react-app-env.d.ts | /// <reference types="react-scripts" />
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/workers.ts | packages/excalidraw/workers.ts | import { debounce } from "@excalidraw/common";
import { WorkerInTheMainChunkError, WorkerUrlNotDefinedError } from "./errors";
class IdleWorker {
public instance: Worker;
constructor(workerUrl: URL) {
this.instance = new Worker(workerUrl, { type: "module" });
}
/**
* Use to prolong the worker's life ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/charts.ts | packages/excalidraw/charts.ts | import { pointFrom } from "@excalidraw/math";
import {
COLOR_PALETTE,
DEFAULT_CHART_COLOR_INDEX,
getAllColorsSpecificShade,
DEFAULT_FONT_FAMILY,
DEFAULT_FONT_SIZE,
VERTICAL_ALIGN,
randomId,
isDevEnv,
FONT_SIZES,
} from "@excalidraw/common";
import {
newTextElement,
newLinearElement,
newElement... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/deburr.ts | packages/excalidraw/deburr.ts | // taken from lodash (MIT)
// https://github.com/lodash/lodash/blob/67389a8c78975d97505fa15aa79bec6397749807/lodash.js#L14180
const rsComboMarksRange = "\\u0300-\\u036f";
const reComboHalfMarksRange = "\\ufe20-\\ufe2f";
const rsComboSymbolsRange = "\\u20d0-\\u20ff";
const rsComboRange =
rsComboMarksRange + reComboHa... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/polyfill.ts | packages/excalidraw/polyfill.ts | const polyfill = () => {
if (!Array.prototype.at) {
// Taken from https://github.com/tc39/proposal-relative-indexing-method#polyfill so that it works in tests
/* eslint-disable */
Object.defineProperty(Array.prototype, "at", {
value: function (n: number) {
// ToInteger() abstract op
... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/interactiveScene.ts | packages/excalidraw/renderer/interactiveScene.ts | import {
clamp,
pointFrom,
pointsEqual,
type GlobalPoint,
type LocalPoint,
type Radians,
} from "@excalidraw/math";
import oc from "open-color";
import {
arrayToMap,
BIND_MODE_TIMEOUT,
DEFAULT_TRANSFORM_HANDLE_SPACING,
FRAME_STYLE,
getFeatureFlag,
invariant,
THEME,
} from "@excalidraw/common"... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/staticScene.ts | packages/excalidraw/renderer/staticScene.ts | import { FRAME_STYLE, throttleRAF } from "@excalidraw/common";
import { isElementLink } from "@excalidraw/element";
import { createPlaceholderEmbeddableLabel } from "@excalidraw/element";
import { getBoundTextElement } from "@excalidraw/element";
import {
isEmbeddableElement,
isIframeLikeElement,
isTextElement,
}... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/renderSnaps.ts | packages/excalidraw/renderer/renderSnaps.ts | import { pointFrom, type GlobalPoint, type LocalPoint } from "@excalidraw/math";
import { THEME } from "@excalidraw/common";
import type { PointSnapLine, PointerSnapLine } from "../snapping";
import type { InteractiveCanvasAppState } from "../types";
const SNAP_COLOR_LIGHT = "#ff6b6b";
const SNAP_COLOR_DARK = "#ff00... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/renderNewElementScene.ts | packages/excalidraw/renderer/renderNewElementScene.ts | import { throttleRAF } from "@excalidraw/common";
import {
getTargetFrame,
isInvisiblySmallElement,
renderElement,
shouldApplyFrameClip,
} from "@excalidraw/element";
import { bootstrapCanvas, getNormalizedCanvasDimensions } from "./helpers";
import { frameClip } from "./staticScene";
import type { NewEleme... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/roundRect.ts | packages/excalidraw/renderer/roundRect.ts | /**
* https://stackoverflow.com/a/3368118
* Draws a rounded rectangle using the current state of the canvas.
* @param {CanvasRenderingContext2D} context
* @param {Number} x The top left x coordinate
* @param {Number} y The top left y coordinate
* @param {Number} width The width of the rectangle
* @param {Number}... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/helpers.ts | packages/excalidraw/renderer/helpers.ts | import { THEME, applyDarkModeFilter } from "@excalidraw/common";
import type { StaticCanvasRenderConfig } from "../scene/types";
import type { AppState, StaticCanvasAppState } from "../types";
export const fillCircle = (
context: CanvasRenderingContext2D,
cx: number,
cy: number,
radius: number,
stroke: bool... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/staticSvgScene.ts | packages/excalidraw/renderer/staticSvgScene.ts | import {
FRAME_STYLE,
MAX_DECIMALS_FOR_SVG_EXPORT,
SVG_NS,
THEME,
getFontFamilyString,
isRTL,
isTestEnv,
getVerticalOffset,
applyDarkModeFilter,
} from "@excalidraw/common";
import { normalizeLink, toValidURL } from "@excalidraw/common";
import { hashString } from "@excalidraw/element";
import { getUn... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/renderer/animation.ts | packages/excalidraw/renderer/animation.ts | import { isRenderThrottlingEnabled } from "../reactUtils";
export type Animation<R extends object> = (params: {
deltaTime: number;
state?: R;
}) => R | null | undefined;
export class AnimationController {
private static isRunning = false;
private static animations = new Map<
string,
{
animation:... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Fonts.ts | packages/excalidraw/fonts/Fonts.ts | import {
FONT_FAMILY,
FONT_FAMILY_FALLBACKS,
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";
import { containsCJK } from "@e... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/ExcalidrawFontFace.ts | packages/excalidraw/fonts/ExcalidrawFontFace.ts | import { promiseTry, LOCAL_FONT_PROTOCOL } from "@excalidraw/common";
import { subsetWoff2GlyphsByCodepoints } from "../subset/subset-main";
type DataURL = string;
export class ExcalidrawFontFace {
public readonly urls: URL[] | DataURL[];
public readonly fontFace: FontFace;
private static readonly ASSETS_FALL... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/index.ts | packages/excalidraw/fonts/index.ts | export * from "./Fonts";
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Emoji/index.ts | packages/excalidraw/fonts/Emoji/index.ts | import { LOCAL_FONT_PROTOCOL } from "@excalidraw/common";
import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
export const EmojiFontFaces: ExcalidrawFontFaceDescriptor[] = [
{
uri: LOCAL_FONT_PROTOCOL,
},
];
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/ComicShanns/index.ts | packages/excalidraw/fonts/ComicShanns/index.ts | // The following file content was generated with https://chinese-font.netlify.app/online-split,
// but has been manully rewritten from `@font-face` rules into TS while leveraging FontFace API.
import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import _0 from "./ComicShanns-Regular-279a7b317d12eb88de06167bd... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Virgil/index.ts | packages/excalidraw/fonts/Virgil/index.ts | import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import Virgil from "./Virgil-Regular.woff2";
export const VirgilFontFaces: ExcalidrawFontFaceDescriptor[] = [
{
uri: Virgil,
},
];
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Xiaolai/index.ts | packages/excalidraw/fonts/Xiaolai/index.ts | // The following file content was generated with https://chinese-font.netlify.app/online-split,
// but has been manully rewritten from `@font-face` rules into TS while leveraging FontFace API.
import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import _80 from "./Xiaolai-Regular-019d66dcad46dc156b162d267f98... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Helvetica/index.ts | packages/excalidraw/fonts/Helvetica/index.ts | import { LOCAL_FONT_PROTOCOL } from "@excalidraw/common";
import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
export const HelveticaFontFaces: ExcalidrawFontFaceDescriptor[] = [
{
uri: LOCAL_FONT_PROTOCOL,
},
];
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Nunito/index.ts | packages/excalidraw/fonts/Nunito/index.ts | import { GOOGLE_FONTS_RANGES } from "@excalidraw/common";
import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import Cyrilic from "./Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTA3j6zbXWjgevT5.woff2";
import Latin from "./Nunito-Regular-XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2";
import Cyril... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Lilita/index.ts | packages/excalidraw/fonts/Lilita/index.ts | import { GOOGLE_FONTS_RANGES } from "@excalidraw/common";
import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import LilitaLatinExt from "./Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYE98RXi4EwSsbg.woff2";
import LilitaLatin from "./Lilita-Regular-i7dPIFZ9Zz-WBtRtedDbYEF8RXi4EwQ.woff2";
export const LilitaFontFace... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Cascadia/index.ts | packages/excalidraw/fonts/Cascadia/index.ts | import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import CascadiaCodeRegular from "./CascadiaCode-Regular.woff2";
export const CascadiaFontFaces: ExcalidrawFontFaceDescriptor[] = [
{
uri: CascadiaCodeRegular,
},
];
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Liberation/index.ts | packages/excalidraw/fonts/Liberation/index.ts | import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import LiberationSansRegular from "./LiberationSans-Regular.woff2";
export const LiberationFontFaces: ExcalidrawFontFaceDescriptor[] = [
{
uri: LiberationSansRegular,
},
];
| typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/fonts/Excalifont/index.ts | packages/excalidraw/fonts/Excalifont/index.ts | import { type ExcalidrawFontFaceDescriptor } from "../Fonts";
import _5 from "./Excalifont-Regular-349fac6ca4700ffec595a7150a0d1e1d.woff2";
import _4 from "./Excalifont-Regular-3f2c5db56cc93c5a6873b1361d730c16.woff2";
import _3 from "./Excalifont-Regular-41b173a47b57366892116a575a43e2b6.woff2";
import _6 from "./Excal... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/subset-shared.chunk.ts | packages/excalidraw/subset/subset-shared.chunk.ts | /**
* DON'T depend on anything from the outside like `promiseTry`, as this module is part of a separate lazy-loaded chunk.
*
* Including anything from the main chunk would include the whole chunk by default.
* Even it it would be tree-shaken during build, it won't be tree-shaken in dev.
*
* In the future consider... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/subset-main.ts | packages/excalidraw/subset/subset-main.ts | import { isServerEnv, promiseTry } from "@excalidraw/common";
import { WorkerInTheMainChunkError, WorkerUrlNotDefinedError } from "../errors";
import { WorkerPool } from "../workers";
import type { Commands } from "./subset-shared.chunk";
let shouldUseWorkers = typeof Worker !== "undefined";
/**
* Tries to subset ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/subset-worker.chunk.ts | packages/excalidraw/subset/subset-worker.chunk.ts | /**
* DON'T depend on anything from the outside like `promiseTry`, as this module is part of a separate lazy-loaded chunk.
*
* Including anything from the main chunk would include the whole chunk by default.
* Even it it would be tree-shaken during build, it won't be tree-shaken in dev.
*
* In the future consider... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/woff2/woff2-bindings.ts | packages/excalidraw/subset/woff2/woff2-bindings.ts | /* eslint-disable */
// @ts-nocheck
/**
* Slitghly modified emscripten bindings of https://github.com/kekee000/fonteditor-core/blob/582bba757aa2915ec2240c61717ff12c50594675/woff2src/woff2.js
*
* CHANGELOG:
* - replaced existing exports with default esm export (`export default Module;`)
* - replaced "instanceof A... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/woff2/woff2-wasm.ts | packages/excalidraw/subset/woff2/woff2-wasm.ts | // GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
/**
* The following wasm module is generated with `scripts/buildWasm.js` and encoded as base64.
*
* The source of this content is taken from the package "fonteditor-core", which contains the following metadata:
*
* @author [{"name":"kekee000","emai... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/woff2/woff2-loader.ts | packages/excalidraw/subset/woff2/woff2-loader.ts | /**
* DON'T depend on anything from the outside like `promiseTry`, as this module is part of a separate lazy-loaded chunk.
*
* Including anything from the main chunk would include the whole chunk by default.
* Even it it would be tree-shaken during build, it won't be tree-shaken in dev.
*
* In the future consider... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/harfbuzz/harfbuzz-bindings.ts | packages/excalidraw/subset/harfbuzz/harfbuzz-bindings.ts | /**
* Modified version of hb-subset bindings from "subset-font" package https://github.com/papandreou/subset-font/blob/3f711c8aa29a426c7f22655861abfb976950f527/index.js
*
* CHANGELOG:
* - removed dependency on node APIs to work inside the browser
* - removed dependency on font fontverter for brotli compression
*... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/harfbuzz/harfbuzz-loader.ts | packages/excalidraw/subset/harfbuzz/harfbuzz-loader.ts | /**
* DON'T depend on anything from the outside like `promiseTry`, as this module is part of a separate lazy-loaded chunk.
*
* Including anything from the main chunk would include the whole chunk by default.
* Even it it would be tree-shaken during build, it won't be tree-shaken in dev.
*
* In the future consider... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/subset/harfbuzz/harfbuzz-wasm.ts | packages/excalidraw/subset/harfbuzz/harfbuzz-wasm.ts | // GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
/**
* The following wasm module is generated with `scripts/buildWasm.js` and encoded as base64.
*
* The source of this content is taken from the package "harfbuzzjs", which contains the following metadata:
*
* @author Ebrahim Byagowi <ebrahim@gnu.o... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/MermaidToExcalidraw.test.tsx | packages/excalidraw/tests/MermaidToExcalidraw.test.tsx | import React from "react";
import { expect } from "vitest";
import { Excalidraw } from "../index";
import { mockMermaidToExcalidraw } from "./helpers/mocks";
import { getTextEditor, updateTextEditor } from "./queries/dom";
import { render, waitFor } from "./test-utils";
mockMermaidToExcalidraw({
mockRef: true,
p... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/clients.test.ts | packages/excalidraw/tests/clients.test.ts | import { getNameInitial } from "../clients";
describe("getClientInitials", () => {
it("returns substring if one name provided", () => {
expect(getNameInitial("Alan")).toBe("A");
});
it("returns initials", () => {
expect(getNameInitial("John Doe")).toBe("J");
});
it("returns correct initials if many... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/selection.test.tsx | packages/excalidraw/tests/selection.test.tsx | import React from "react";
import { vi } from "vitest";
import { KEYS, reseed } from "@excalidraw/common";
import { SHAPES } from "../components/shapes";
import { Excalidraw } from "../index";
import * as InteractiveCanvas from "../renderer/interactiveScene";
import * as StaticScene from "../renderer/staticScene";
... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/contextmenu.test.tsx | packages/excalidraw/tests/contextmenu.test.tsx | import React from "react";
import { vi } from "vitest";
import { KEYS, reseed } from "@excalidraw/common";
import { setDateTimeForTests } from "@excalidraw/common";
import { copiedStyles } from "../actions/actionStyles";
import { Excalidraw } from "../index";
import * as StaticScene from "../renderer/staticScene";
... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/scroll.test.tsx | packages/excalidraw/tests/scroll.test.tsx | import React from "react";
import { KEYS } from "@excalidraw/common";
import { Excalidraw } from "../index";
import { API } from "./helpers/api";
import { Keyboard } from "./helpers/ui";
import {
mockBoundingClientRect,
render,
restoreOriginalGetBoundingClientRect,
waitFor,
} from "./test-utils";
const { h ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/excalidraw.test.tsx | packages/excalidraw/tests/excalidraw.test.tsx | import { queryByText, queryByTestId } from "@testing-library/react";
import React from "react";
import { useMemo } from "react";
import { THEME } from "@excalidraw/common";
import { t } from "../i18n";
import { Excalidraw, Footer, MainMenu } from "../index";
import { fireEvent, GlobalTestState, toggleMenu, render } ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/multiPointCreate.test.tsx | packages/excalidraw/tests/multiPointCreate.test.tsx | import React from "react";
import { vi } from "vitest";
import { KEYS, reseed } from "@excalidraw/common";
import type { ExcalidrawLinearElement } from "@excalidraw/element/types";
import { Excalidraw } from "../index";
import * as InteractiveCanvas from "../renderer/interactiveScene";
import * as StaticScene from ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/actionStyles.test.tsx | packages/excalidraw/tests/actionStyles.test.tsx | import React from "react";
import { CODES } from "@excalidraw/common";
import { copiedStyles } from "../actions/actionStyles";
import { Excalidraw } from "../index";
import { API } from "../tests/helpers/api";
import { Keyboard, Pointer, UI } from "../tests/helpers/ui";
import {
act,
fireEvent,
render,
screen... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/shortcuts.test.tsx | packages/excalidraw/tests/shortcuts.test.tsx | import React from "react";
import { KEYS } from "@excalidraw/common";
import { Excalidraw } from "../index";
import { API } from "./helpers/api";
import { Keyboard } from "./helpers/ui";
import { fireEvent, render, waitFor } from "./test-utils";
describe("shortcuts", () => {
it("Clear canvas shortcut should displ... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/viewMode.test.tsx | packages/excalidraw/tests/viewMode.test.tsx | import React from "react";
import { CURSOR_TYPE, KEYS } from "@excalidraw/common";
import { Excalidraw } from "../index";
import { API } from "./helpers/api";
import { Keyboard, Pointer, UI } from "./helpers/ui";
import { render, GlobalTestState } from "./test-utils";
const mouse = new Pointer("mouse");
const touch... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/App.test.tsx | packages/excalidraw/tests/App.test.tsx | import React from "react";
import { vi } from "vitest";
import { reseed } from "@excalidraw/common";
import { Excalidraw } from "../index";
import * as StaticScene from "../renderer/staticScene";
import { render, queryByTestId, unmountComponent } from "../tests/test-utils";
const renderStaticScene = vi.spyOn(StaticS... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | false |
excalidraw/excalidraw | https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/tests/history.test.tsx | packages/excalidraw/tests/history.test.tsx | import React from "react";
import {
queryByText,
fireEvent,
queryByTestId,
waitFor,
} from "@testing-library/react";
import { vi } from "vitest";
import { pointFrom } from "@excalidraw/math";
import { newElementWith } from "@excalidraw/element";
import {
EXPORT_DATA_TYPES,
MIME_TYPES,
ORIG_ID,
KEYS,
... | typescript | MIT | 63e1148280163a36326b7efb5fdfeefebabdb3e4 | 2026-01-04T15:25:31.673879Z | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.