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/excalidraw/components/QuickSearch.tsx
packages/excalidraw/components/QuickSearch.tsx
import clsx from "clsx"; import React from "react"; import { searchIcon } from "./icons"; import "./QuickSearch.scss"; interface QuickSearchProps { className?: string; placeholder: string; onChange: (term: string) => void; } export const QuickSearch = React.forwardRef<HTMLInputElement, QuickSearchProps>( ({...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/MobileMenu.tsx
packages/excalidraw/components/MobileMenu.tsx
import React from "react"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import { useTunnels } from "../context/tunnels"; import { t } from "../i18n"; import { calculateScrollCenter } from "../scene"; import { SCROLLBAR_WIDTH, SCROLLBAR_MARGIN } from "../scene/scrollbars"; import { Ex...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/BraveMeasureTextError.tsx
packages/excalidraw/components/BraveMeasureTextError.tsx
import Trans from "./Trans"; const BraveMeasureTextError = () => { return ( <div data-testid="brave-measure-text-error"> <p> <Trans i18nKey="errors.brave_measure_text_error.line1" bold={(el) => <span style={{ fontWeight: 600 }}>{el}</span>} /> </p> <p> ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TextField.tsx
packages/excalidraw/components/TextField.tsx
import clsx from "clsx"; import { forwardRef, useRef, useImperativeHandle, useLayoutEffect, useState, } from "react"; import { Button } from "./Button"; import { eyeIcon, eyeClosedIcon } from "./icons"; import "./TextField.scss"; import type { KeyboardEvent } from "react"; type TextFieldProps = { onChan...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/InitializeApp.tsx
packages/excalidraw/components/InitializeApp.tsx
import React, { useEffect, useState } from "react"; import type { Theme } from "@excalidraw/element/types"; import { defaultLang, languages, setLanguage } from "../i18n"; import { LoadingMessage } from "./LoadingMessage"; import type { Language } from "../i18n"; interface Props { langCode: Language["code"]; ch...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/icons.tsx
packages/excalidraw/components/icons.tsx
// // All icons are imported from https://fontawesome.com/icons?d=gallery // Icons are under the license https://fontawesome.com/license // // Note: when adding new icons, review https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/RTL_Guidelines // to determine whether or not the icons should be mirrored ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
true
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/HintViewer.tsx
packages/excalidraw/components/HintViewer.tsx
import { CANVAS_SEARCH_TAB, DEFAULT_SIDEBAR } from "@excalidraw/common"; import { isFlowchartNodeElement, isImageElement, isLinearElement, isLineElement, isTextBindableContainer, isTextElement, } from "@excalidraw/element"; import { isNodeInFlowchart } from "@excalidraw/element"; import type { EditorInte...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/LibraryMenuItems.tsx
packages/excalidraw/components/LibraryMenuItems.tsx
import React, { useCallback, useEffect, useMemo, useRef, useState, } from "react"; import { MIME_TYPES, arrayToMap, nextAnimationFrame } from "@excalidraw/common"; import { duplicateElements } from "@excalidraw/element"; import clsx from "clsx"; import { deburr } from "../deburr"; import { useLibraryCach...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/HelpButton.tsx
packages/excalidraw/components/HelpButton.tsx
import { t } from "../i18n"; import { HelpIcon } from "./icons"; type HelpButtonProps = { name?: string; id?: string; onClick?(): void; }; export const HelpButton = (props: HelpButtonProps) => ( <button className="help-icon" onClick={props.onClick} type="button" title={`${t("helpDialog.title"...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/LinkButton.tsx
packages/excalidraw/components/LinkButton.tsx
import { FilledButton } from "./FilledButton"; export const LinkButton = ({ children, href, }: { href: string; children: React.ReactNode; }) => { return ( <a href={href} target="_blank" rel="noopener" className="link-button"> <FilledButton>{children}</FilledButton> </a> ); };
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ConvertElementTypePopup.tsx
packages/excalidraw/components/ConvertElementTypePopup.tsx
import { type ReactNode, useEffect, useMemo, useRef, useState } from "react"; import { getLinearElementSubType, updateElbowArrowPoints, } from "@excalidraw/element"; import { pointFrom, pointRotateRads, type LocalPoint } from "@excalidraw/math"; import { hasBoundTextElement, isArrowBoundToElement, isArrowE...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stack.tsx
packages/excalidraw/components/Stack.tsx
import React, { forwardRef } from "react"; import clsx from "clsx"; import "./Stack.scss"; type StackProps = { children: React.ReactNode; gap?: number; align?: "start" | "center" | "end" | "baseline"; justifyContent?: "center" | "space-around" | "space-between"; className?: string | boolean; style?: React...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/LibraryMenu.tsx
packages/excalidraw/components/LibraryMenu.tsx
import React, { useState, useCallback, useMemo, useEffect, memo, useRef, } from "react"; import { LIBRARY_DISABLED_TYPES, randomId, isShallowEqual, KEYS, isWritableElement, addEventListener, EVENT, CLASSES, } from "@excalidraw/common"; import type { ExcalidrawElement, NonDeletedExcalid...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ScrollableList.tsx
packages/excalidraw/components/ScrollableList.tsx
import clsx from "clsx"; import { Children } from "react"; import "./ScrollableList.scss"; interface ScrollableListProps { className?: string; placeholder: string; children: React.ReactNode; } export const ScrollableList = ({ className, placeholder, children, }: ScrollableListProps) => { const isEmpty ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ButtonIconCycle.tsx
packages/excalidraw/components/ButtonIconCycle.tsx
import clsx from "clsx"; import type { JSX } from "react"; export const ButtonIconCycle = <T extends any>({ options, value, onChange, group, }: { options: { value: T; text: string; icon: JSX.Element }[]; value: T | null; onChange: (value: T) => void; group: string; }) => { const current = options.fi...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/IconPicker.tsx
packages/excalidraw/components/IconPicker.tsx
import * as Popover from "@radix-ui/react-popover"; import clsx from "clsx"; import React, { useEffect } from "react"; import { isArrowKey, KEYS } from "@excalidraw/common"; import { atom, useAtom } from "../editor-jotai"; import { getLanguage, t } from "../i18n"; import Collapsible from "./Stats/Collapsible"; impor...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/shapes.tsx
packages/excalidraw/components/shapes.tsx
import { KEYS } from "@excalidraw/common"; import { SelectionIcon, RectangleIcon, DiamondIcon, EllipseIcon, ArrowIcon, LineIcon, FreedrawIcon, TextIcon, ImageIcon, EraserIcon, } from "./icons"; import type { AppClassProperties } from "../types"; export const SHAPES = [ { icon: SelectionIcon...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/PublishLibrary.tsx
packages/excalidraw/components/PublishLibrary.tsx
import { exportToCanvas, exportToSvg } from "@excalidraw/utils/export"; import OpenColor from "open-color"; import { useCallback, useEffect, useRef, useState } from "react"; import { EDITOR_LS_KEYS, EXPORT_DATA_TYPES, MIME_TYPES, VERSIONS, chunk, getExportSource, } from "@excalidraw/common"; import { Edit...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/MobileToolBar.tsx
packages/excalidraw/components/MobileToolBar.tsx
import { useState, useEffect } from "react"; import clsx from "clsx"; import { KEYS, capitalizeString } from "@excalidraw/common"; import { trackEvent } from "../analytics"; import { t } from "../i18n"; import { isHandToolActive } from "../appState"; import { useTunnels } from "../context/tunnels"; import { HandB...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ShareableLinkDialog.tsx
packages/excalidraw/components/ShareableLinkDialog.tsx
import { useRef, useState } from "react"; import { copyTextToSystemClipboard } from "../clipboard"; import { useCopyStatus } from "../hooks/useCopiedIndicator"; import { useI18n } from "../i18n"; import { Dialog } from "./Dialog"; import { FilledButton } from "./FilledButton"; import { TextField } from "./TextField";...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ElementLinkDialog.tsx
packages/excalidraw/components/ElementLinkDialog.tsx
import { useCallback, useEffect, useState } from "react"; import { normalizeLink, KEYS } from "@excalidraw/common"; import { defaultGetElementLinkFromSelection, getLinkIdAndTypeFromSelection, } from "@excalidraw/element"; import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { Scene } ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/LockButton.tsx
packages/excalidraw/components/LockButton.tsx
import clsx from "clsx"; import "./ToolIcon.scss"; import { LockedIcon, UnlockedIcon } from "./icons"; import type { ToolButtonSize } from "./ToolButton"; type LockIconProps = { title?: string; name?: string; checked: boolean; onChange?(): void; isMobile?: boolean; }; const DEFAULT_SIZE: ToolButtonSize =...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ButtonIcon.tsx
packages/excalidraw/components/ButtonIcon.tsx
import clsx from "clsx"; import { forwardRef } from "react"; import "./ButtonIcon.scss"; import type { JSX } from "react"; interface ButtonIconProps { icon: JSX.Element; title: string; className?: string; testId?: string; /** if not supplied, defaults to value identity check */ active?: boolean; /** in...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Avatar.tsx
packages/excalidraw/components/Avatar.tsx
import clsx from "clsx"; import React, { useState } from "react"; import { getNameInitial } from "../clients"; import "./Avatar.scss"; type AvatarProps = { onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void; color: string; name: string; src?: string; className?: string; }; export const Ava...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/UserList.tsx
packages/excalidraw/components/UserList.tsx
import * as Popover from "@radix-ui/react-popover"; import clsx from "clsx"; import React, { useLayoutEffect } from "react"; import { supportsResizeObserver, isShallowEqual } from "@excalidraw/common"; import type { MarkRequired } from "@excalidraw/common/utility-types"; import { t } from "../i18n"; import { useExc...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Tooltip.tsx
packages/excalidraw/components/Tooltip.tsx
import React, { useEffect } from "react"; import "./Tooltip.scss"; export const getTooltipDiv = () => { const existingDiv = document.querySelector<HTMLDivElement>( ".excalidraw-tooltip", ); if (existingDiv) { return existingDiv; } const div = document.createElement("div"); document.body.appendChil...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/FilledButton.tsx
packages/excalidraw/components/FilledButton.tsx
import clsx from "clsx"; import React, { forwardRef, useState } from "react"; import { isPromiseLike } from "@excalidraw/common"; import { AbortError } from "../errors"; import Spinner from "./Spinner"; import { tablerCheckIcon } from "./icons"; import "./FilledButton.scss"; export type ButtonVariant = "filled" | ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.tsx
packages/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.tsx
import React from "react"; import { actionSaveFileToDisk } from "../../actions"; import { actionChangeExportEmbedScene } from "../../actions/actionExport"; import { useI18n } from "../../i18n"; import { useExcalidrawActionManager, useExcalidrawSetAppState } from "../App"; import { FilledButton } from "../FilledButton"...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/OverwriteConfirm/OverwriteConfirm.tsx
packages/excalidraw/components/OverwriteConfirm/OverwriteConfirm.tsx
import React from "react"; import { useTunnels } from "../../context/tunnels"; import { useAtom } from "../../editor-jotai"; import { Dialog } from "../Dialog"; import { FilledButton } from "../FilledButton"; import { withInternalFallback } from "../hoc/withInternalFallback"; import { alertTriangleIcon } from "../icon...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.ts
packages/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.ts
import { atom, editorJotaiStore } from "../../editor-jotai"; import type React from "react"; export type OverwriteConfirmState = | { active: true; title: string; description: React.ReactNode; actionLabel: string; color: "danger" | "warning"; onClose: () => void; onConfirm:...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuItemContent.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuItemContent.tsx
import { useEditorInterface } from "../App"; import { Ellipsify } from "../Ellipsify"; import type { JSX } from "react"; const MenuItemContent = ({ textStyle, icon, shortcut, children, }: { icon?: JSX.Element; shortcut?: string; textStyle?: React.CSSProperties; children: React.ReactNode; }) => { co...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenu.test.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenu.test.tsx
import React from "react"; import { KEYS } from "@excalidraw/common"; import { Excalidraw } from "../../index"; import { Keyboard } from "../../tests/helpers/ui"; import { render, waitFor, getByTestId, fireEvent, } from "../../tests/test-utils"; describe("Test <DropdownMenu/>", () => { it("should", async (...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuItem.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuItem.tsx
import React, { useEffect, useRef } from "react"; import { THEME } from "@excalidraw/common"; import type { ValueOf } from "@excalidraw/common/utility-types"; import { useExcalidrawAppState } from "../App"; import MenuItemContent from "./DropdownMenuItemContent"; import { getDropdownMenuItemClassName, useHandle...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuItemContentRadio.tsx
import { useEditorInterface } from "../App"; import { RadioGroup } from "../RadioGroup"; type Props<T> = { value: T; shortcut?: string; choices: { value: T; label: React.ReactNode; ariaLabel?: string; }[]; onChange: (value: T) => void; children: React.ReactNode; name: string; }; const Dropdo...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuItemLink.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuItemLink.tsx
import React from "react"; import MenuItemContent from "./DropdownMenuItemContent"; import { getDropdownMenuItemClassName, useHandleDropdownMenuItemClick, } from "./common"; import type { JSX } from "react"; const DropdownMenuItemLink = ({ icon, shortcut, href, children, onSelect, className = "", s...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/common.ts
packages/excalidraw/components/dropdownMenu/common.ts
import React, { useContext } from "react"; import { EVENT, composeEventHandlers } from "@excalidraw/common"; export const DropdownMenuContentPropsContext = React.createContext<{ onSelect?: (event: Event) => void; }>({}); export const getDropdownMenuItemClassName = ( className = "", selected = false, hovered ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuTrigger.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuTrigger.tsx
import clsx from "clsx"; import { useEditorInterface } from "../App"; const MenuTrigger = ({ className = "", children, onToggle, title, ...rest }: { className?: string; children: React.ReactNode; onToggle: () => void; title?: string; } & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "onSelect"...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuGroup.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuGroup.tsx
import React from "react"; const MenuGroup = ({ children, className = "", style, title, }: { children: React.ReactNode; className?: string; style?: React.CSSProperties; title?: string; }) => { return ( <div className={`dropdown-menu-group ${className}`} style={style}> {title && <p className...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenu.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenu.tsx
import React from "react"; import DropdownMenuContent from "./DropdownMenuContent"; import DropdownMenuGroup from "./DropdownMenuGroup"; import DropdownMenuItem from "./DropdownMenuItem"; import DropdownMenuItemCustom from "./DropdownMenuItemCustom"; import DropdownMenuItemLink from "./DropdownMenuItemLink"; import Me...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.tsx
import React from "react"; const DropdownMenuItemCustom = ({ children, className = "", selected, ...rest }: { children: React.ReactNode; className?: string; selected?: boolean; } & React.HTMLAttributes<HTMLDivElement>) => { return ( <div {...rest} className={`dropdown-menu-item-base dro...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuContent.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuContent.tsx
import clsx from "clsx"; import React, { useEffect, useRef } from "react"; import { EVENT, KEYS } from "@excalidraw/common"; import { useOutsideClick } from "../../hooks/useOutsideClick"; import { useStable } from "../../hooks/useStable"; import { useEditorInterface } from "../App"; import { Island } from "../Island"...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/DropdownMenuSeparator.tsx
packages/excalidraw/components/dropdownMenu/DropdownMenuSeparator.tsx
import React from "react"; const MenuSeparator = () => ( <div style={{ height: "1px", backgroundColor: "var(--default-border-color)", margin: ".5rem 0", flex: "0 0 auto", }} /> ); export default MenuSeparator; MenuSeparator.displayName = "DropdownMenuSeparator";
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/dropdownMenu/dropdownMenuUtils.ts
packages/excalidraw/components/dropdownMenu/dropdownMenuUtils.ts
import React from "react"; export const getMenuTriggerComponent = (children: React.ReactNode) => { const comp = React.Children.toArray(children).find( (child) => React.isValidElement(child) && typeof child.type !== "string" && //@ts-ignore child?.type.displayName && //@ts-ignore ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/Collapsible.tsx
packages/excalidraw/components/Stats/Collapsible.tsx
import { InlineIcon } from "../InlineIcon"; import { collapseDownIcon, collapseUpIcon } from "../icons"; interface CollapsibleProps { label: React.ReactNode; // having it controlled so that the state is managed outside // this is to keep the user's previous choice even when the // Collapsible is unmounted op...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/Angle.tsx
packages/excalidraw/components/Stats/Angle.tsx
import { degreesToRadians, radiansToDegrees } from "@excalidraw/math"; import { getBoundTextElement } from "@excalidraw/element"; import { isArrowElement, isElbowArrow } from "@excalidraw/element"; import { updateBindings } from "@excalidraw/element"; import type { Degrees } from "@excalidraw/math"; import type { E...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/MultiAngle.tsx
packages/excalidraw/components/Stats/MultiAngle.tsx
import { degreesToRadians, radiansToDegrees } from "@excalidraw/math"; import { getBoundTextElement } from "@excalidraw/element"; import { isArrowElement } from "@excalidraw/element"; import { isInGroup } from "@excalidraw/element"; import type { Degrees } from "@excalidraw/math"; import type { ExcalidrawElement } ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/utils.ts
packages/excalidraw/components/Stats/utils.ts
import { pointFrom, pointRotateRads } from "@excalidraw/math"; import { getBoundTextElement, isBindingElement, unbindBindingElement, } from "@excalidraw/element"; import { isFrameLikeElement } from "@excalidraw/element"; import { getSelectedGroupIds, getElementsInGroup, isInGroup, } from "@excalidraw/elem...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/Position.tsx
packages/excalidraw/components/Stats/Position.tsx
import { clamp, pointFrom, pointRotateRads, round } from "@excalidraw/math"; import { getFlipAdjustedCropPosition, getUncroppedWidthAndHeight, } from "@excalidraw/element"; import { isImageElement } from "@excalidraw/element"; import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types"; impor...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/index.tsx
packages/excalidraw/components/Stats/index.tsx
import { round } from "@excalidraw/math"; import clsx from "clsx"; import throttle from "lodash.throttle"; import { useEffect, useMemo, useState, memo } from "react"; import { STATS_PANELS } from "@excalidraw/common"; import { getCommonBounds } from "@excalidraw/element"; import { getUncroppedWidthAndHeight } from "@e...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/MultiDimension.tsx
packages/excalidraw/components/Stats/MultiDimension.tsx
import { pointFrom, type GlobalPoint } from "@excalidraw/math"; import { useMemo } from "react"; import { MIN_WIDTH_OR_HEIGHT } from "@excalidraw/common"; import { getElementsInResizingFrame, isFrameLikeElement, replaceAllElementsInFrame, updateBoundElements, } from "@excalidraw/element"; import { rescalePoi...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/CanvasGrid.tsx
packages/excalidraw/components/Stats/CanvasGrid.tsx
import type { Scene } from "@excalidraw/element"; import { getNormalizedGridStep } from "../../scene"; import StatsDragInput from "./DragInput"; import { getStepSizedValue } from "./utils"; import type { AppState } from "../../types"; interface PositionProps { property: "gridStep"; scene: Scene; appState: App...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/DragInput.tsx
packages/excalidraw/components/Stats/DragInput.tsx
import clsx from "clsx"; import { useEffect, useRef, useState } from "react"; import { EVENT, KEYS, cloneJSON } from "@excalidraw/common"; import { deepCopyElement } from "@excalidraw/element"; import { CaptureUpdateAction } from "@excalidraw/element"; import type { ElementsMap, ExcalidrawElement } from "@excalidra...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/stats.test.tsx
packages/excalidraw/components/Stats/stats.test.tsx
import { degreesToRadians, pointFrom, pointRotateRads } from "@excalidraw/math"; import { act, fireEvent, queryByTestId } from "@testing-library/react"; import React from "react"; import { vi } from "vitest"; import { setDateTimeForTests, reseed } from "@excalidraw/common"; import { isInGroup } from "@excalidraw/elem...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/Dimension.tsx
packages/excalidraw/components/Stats/Dimension.tsx
import { clamp, round } from "@excalidraw/math"; import { MIN_WIDTH_OR_HEIGHT } from "@excalidraw/common"; import { MINIMAL_CROP_SIZE, getUncroppedWidthAndHeight, } from "@excalidraw/element"; import { resizeSingleElement } from "@excalidraw/element"; import { isImageElement } from "@excalidraw/element"; import { ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/FontSize.tsx
packages/excalidraw/components/Stats/FontSize.tsx
import { getBoundTextElement, redrawTextBoundingBox, } from "@excalidraw/element"; import { hasBoundTextElement, isTextElement } from "@excalidraw/element"; import type { ExcalidrawElement, ExcalidrawTextElement, } from "@excalidraw/element/types"; import type { Scene } from "@excalidraw/element"; import { f...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/MultiPosition.tsx
packages/excalidraw/components/Stats/MultiPosition.tsx
import { pointFrom, pointRotateRads } from "@excalidraw/math"; import { useMemo } from "react"; import { isTextElement } from "@excalidraw/element"; import { getCommonBounds } from "@excalidraw/element"; import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types"; import type { Scene } from "@ex...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/Stats/MultiFontSize.tsx
packages/excalidraw/components/Stats/MultiFontSize.tsx
import { getBoundTextElement, redrawTextBoundingBox, } from "@excalidraw/element"; import { hasBoundTextElement, isTextElement } from "@excalidraw/element"; import { isInGroup } from "@excalidraw/element"; import type { ExcalidrawElement, ExcalidrawTextElement, NonDeletedSceneElementsMap, } from "@excalidra...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/canvases/NewElementCanvas.tsx
packages/excalidraw/components/canvases/NewElementCanvas.tsx
import { useEffect, useRef } from "react"; import type { NonDeletedSceneElementsMap } from "@excalidraw/element/types"; import { isRenderThrottlingEnabled } from "../../reactUtils"; import { renderNewElementScene } from "../../renderer/renderNewElementScene"; import type { RenderableElementsMap, StaticCanvasRend...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/canvases/StaticCanvas.tsx
packages/excalidraw/components/canvases/StaticCanvas.tsx
import React, { useEffect, useRef } from "react"; import { isShallowEqual } from "@excalidraw/common"; import type { NonDeletedExcalidrawElement, NonDeletedSceneElementsMap, } from "@excalidraw/element/types"; import { isRenderThrottlingEnabled } from "../../reactUtils"; import { renderStaticScene } from "../../...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/canvases/InteractiveCanvas.tsx
packages/excalidraw/components/canvases/InteractiveCanvas.tsx
import React, { useEffect, useRef } from "react"; import { CURSOR_TYPE, isShallowEqual, sceneCoordsToViewportCoords, type EditorInterface, } from "@excalidraw/common"; import { AnimationController } from "@excalidraw/excalidraw/renderer/animation"; import type { InteractiveCanvasRenderConfig, InteractiveS...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/canvases/index.tsx
packages/excalidraw/components/canvases/index.tsx
import InteractiveCanvas from "./InteractiveCanvas"; import StaticCanvas from "./StaticCanvas"; export { InteractiveCanvas, StaticCanvas };
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/live-collaboration/LiveCollaborationTrigger.tsx
packages/excalidraw/components/live-collaboration/LiveCollaborationTrigger.tsx
import clsx from "clsx"; import { MQ_MIN_WIDTH_DESKTOP, type EditorInterface } from "@excalidraw/common"; import { t } from "../../i18n"; import { Button } from "../Button"; import { share } from "../icons"; import { useUIAppState } from "../../context/ui-appState"; import "./LiveCollaborationTrigger.scss"; const L...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/FontPicker/FontPicker.tsx
packages/excalidraw/components/FontPicker/FontPicker.tsx
import * as Popover from "@radix-ui/react-popover"; import clsx from "clsx"; import React, { useCallback, useMemo } from "react"; import { FONT_FAMILY } from "@excalidraw/common"; import type { FontFamilyValues } from "@excalidraw/element/types"; import { t } from "../../i18n"; import { RadioSelection } from "../Rad...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/FontPicker/keyboardNavHandlers.ts
packages/excalidraw/components/FontPicker/keyboardNavHandlers.ts
import { KEYS } from "@excalidraw/common"; import type { Node } from "@excalidraw/common"; import { type FontDescriptor } from "./FontPickerList"; interface FontPickerKeyNavHandlerProps { event: React.KeyboardEvent<HTMLDivElement>; inputRef: React.RefObject<HTMLInputElement | null>; hoveredFont: Node<FontDescr...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/FontPicker/FontPickerTrigger.tsx
packages/excalidraw/components/FontPicker/FontPickerTrigger.tsx
import * as Popover from "@radix-ui/react-popover"; import { MOBILE_ACTION_BUTTON_BG } from "@excalidraw/common"; import type { FontFamilyValues } from "@excalidraw/element/types"; import { t } from "../../i18n"; import { ButtonIcon } from "../ButtonIcon"; import { TextIcon } from "../icons"; import { useExcalidraw...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/FontPicker/FontPickerList.tsx
packages/excalidraw/components/FontPicker/FontPickerList.tsx
import React, { useMemo, useState, useRef, useEffect, useCallback, type KeyboardEventHandler, } from "react"; import { type FontFamilyValues } from "@excalidraw/element/types"; import { arrayToList, debounce, FONT_FAMILY, getFontFamilyString, } from "@excalidraw/common"; import type { ValueOf } f...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/CommandPalette/CommandPalette.tsx
packages/excalidraw/components/CommandPalette/CommandPalette.tsx
import clsx from "clsx"; import fuzzy from "fuzzy"; import { useEffect, useRef, useMemo, useState } from "react"; import { DEFAULT_SIDEBAR, EVENT, KEYS, capitalizeString, isWritableElement, } from "@excalidraw/common"; import { actionToggleShapeSwitch } from "@excalidraw/excalidraw/actions/actionToggleShape...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/CommandPalette/types.ts
packages/excalidraw/components/CommandPalette/types.ts
import type { ActionManager } from "../../actions/manager"; import type { Action } from "../../actions/types"; export type CommandPaletteItem = { label: string; /** additional keywords to match against * (appended to haystack, not displayed) */ keywords?: string[]; /** * string we should match against wh...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/CommandPalette/defaultCommandPaletteItems.ts
packages/excalidraw/components/CommandPalette/defaultCommandPaletteItems.ts
import { actionToggleTheme } from "../../actions"; import type { CommandPaletteItem } from "./types"; export const toggleTheme: CommandPaletteItem = { ...actionToggleTheme, category: "App", label: "Toggle theme", perform: ({ actionManager }) => { actionManager.executeAction(actionToggleTheme, "commandPale...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/footer/FooterCenter.tsx
packages/excalidraw/components/footer/FooterCenter.tsx
import clsx from "clsx"; import { useTunnels } from "../../context/tunnels"; import { useUIAppState } from "../../context/ui-appState"; import "./FooterCenter.scss"; const FooterCenter = ({ children }: { children?: React.ReactNode }) => { const { FooterCenterTunnel } = useTunnels(); const appState = useUIAppStat...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/footer/Footer.tsx
packages/excalidraw/components/footer/Footer.tsx
import clsx from "clsx"; import { actionShortcuts } from "../../actions"; import { useTunnels } from "../../context/tunnels"; import { ExitZenModeButton, UndoRedoActions, ZoomActions } from "../Actions"; import { HelpButton } from "../HelpButton"; import { Section } from "../Section"; import Stack from "../Stack"; im...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogPanel.tsx
packages/excalidraw/components/TTDDialog/TTDDialogPanel.tsx
import clsx from "clsx"; import { Button } from "../Button"; import Spinner from "../Spinner"; import type { ReactNode } from "react"; interface TTDDialogPanelProps { label: string; children: ReactNode; panelAction?: { label: string; action: () => void; icon?: ReactNode; }; panelActionDisabled?...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx
packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx
import { useEffect, useRef } from "react"; import { EVENT, KEYS } from "@excalidraw/common"; import type { ChangeEventHandler } from "react"; interface TTDDialogInputProps { input: string; placeholder: string; onChange: ChangeEventHandler<HTMLTextAreaElement>; onKeyboardSubmit?: () => void; } export const T...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogTabTrigger.tsx
packages/excalidraw/components/TTDDialog/TTDDialogTabTrigger.tsx
import * as RadixTabs from "@radix-ui/react-tabs"; export const TTDDialogTabTrigger = ({ children, tab, onSelect, ...rest }: { children: React.ReactNode; tab: string; onSelect?: React.ReactEventHandler<HTMLButtonElement> | undefined; } & Omit<React.HTMLAttributes<HTMLButtonElement>, "onSelect">) => { r...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/common.ts
packages/excalidraw/components/TTDDialog/common.ts
import { DEFAULT_EXPORT_PADDING, EDITOR_LS_KEYS } from "@excalidraw/common"; import type { MermaidConfig } from "@excalidraw/mermaid-to-excalidraw"; import type { MermaidToExcalidrawResult } from "@excalidraw/mermaid-to-excalidraw/dist/interfaces"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.tsx
packages/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.tsx
import { getShortcutKey } from "@excalidraw/excalidraw/shortcut"; export const TTDDialogSubmitShortcut = () => { return ( <div className="ttd-dialog-submit-shortcut"> <div className="ttd-dialog-submit-shortcut__key"> {getShortcutKey("CtrlOrCmd")} </div> <div className="ttd-dialog-submit...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogTrigger.tsx
packages/excalidraw/components/TTDDialog/TTDDialogTrigger.tsx
import { trackEvent } from "../../analytics"; import { useTunnels } from "../../context/tunnels"; import { useI18n } from "../../i18n"; import { useExcalidrawSetAppState } from "../App"; import DropdownMenu from "../dropdownMenu/DropdownMenu"; import { brainIcon } from "../icons"; import type { JSX, ReactNode } from "...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogTabTriggers.tsx
packages/excalidraw/components/TTDDialog/TTDDialogTabTriggers.tsx
import * as RadixTabs from "@radix-ui/react-tabs"; export const TTDDialogTabTriggers = ({ children, ...rest }: { children: React.ReactNode } & React.HTMLAttributes<HTMLDivElement>) => { return ( <RadixTabs.List className="ttd-dialog-triggers" {...rest}> {children} </RadixTabs.List> ); }; TTDDialo...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialog.tsx
packages/excalidraw/components/TTDDialog/TTDDialog.tsx
import { useEffect, useRef, useState } from "react"; import { isFiniteNumber } from "@excalidraw/math"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import { trackEvent } from "../../analytics"; import { useUIAppState } from "../../context/ui-appState"; import { atom, useAtom } from ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx
packages/excalidraw/components/TTDDialog/TTDDialogOutput.tsx
import Spinner from "../Spinner"; const ErrorComp = ({ error }: { error: string }) => { return ( <div data-testid="ttd-dialog-output-error" className="ttd-dialog-output-error" > Error! <p>{error}</p> </div> ); }; interface TTDDialogOutputProps { error: Error | null; canvasRef: Re...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogPanels.tsx
packages/excalidraw/components/TTDDialog/TTDDialogPanels.tsx
import type { ReactNode } from "react"; export const TTDDialogPanels = ({ children }: { children: ReactNode }) => { return <div className="ttd-dialog-panels">{children}</div>; };
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.tsx
packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.tsx
import { useState, useRef, useEffect, useDeferredValue } from "react"; import { EDITOR_LS_KEYS, debounce, isDevEnv } from "@excalidraw/common"; import type { NonDeletedExcalidrawElement } from "@excalidraw/element/types"; import { useApp } from "../App"; import { ArrowRightIcon } from "../icons"; import { EditorLoca...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogTab.tsx
packages/excalidraw/components/TTDDialog/TTDDialogTab.tsx
import * as RadixTabs from "@radix-ui/react-tabs"; export const TTDDialogTab = ({ tab, children, ...rest }: { tab: string; children: React.ReactNode; } & React.HTMLAttributes<HTMLDivElement>) => { return ( <RadixTabs.Content {...rest} value={tab}> {children} </RadixTabs.Content> ); }; TTDDi...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/TTDDialog/TTDDialogTabs.tsx
packages/excalidraw/components/TTDDialog/TTDDialogTabs.tsx
import * as RadixTabs from "@radix-ui/react-tabs"; import { useRef } from "react"; import { isMemberOf } from "@excalidraw/common"; import { useExcalidrawSetAppState } from "../App"; import type { ReactNode } from "react"; const TTDDialogTabs = ( props: { children: ReactNode; } & { dialog: "ttd"; tab: "text...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.tsx
packages/excalidraw/components/DiagramToCodePlugin/DiagramToCodePlugin.tsx
import { useLayoutEffect } from "react"; import { useApp } from "../App"; import type { GenerateDiagramToCode } from "../../types"; export const DiagramToCodePlugin = (props: { generate: GenerateDiagramToCode; }) => { const app = useApp(); useLayoutEffect(() => { app.setPlugins({ diagramToCode: { ge...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/hyperlink/Hyperlink.tsx
packages/excalidraw/components/hyperlink/Hyperlink.tsx
import { pointFrom, type GlobalPoint } from "@excalidraw/math"; import clsx from "clsx"; import { useCallback, useEffect, useLayoutEffect, useRef, useState, } from "react"; import { EVENT, HYPERLINK_TOOLTIP_DELAY, KEYS } from "@excalidraw/common"; import { getElementAbsoluteCoords } from "@excalidraw/elemen...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/hyperlink/helpers.ts
packages/excalidraw/components/hyperlink/helpers.ts
import { pointFrom, pointRotateRads } from "@excalidraw/math"; import { MIME_TYPES } from "@excalidraw/common"; import { getElementAbsoluteCoords } from "@excalidraw/element"; import { hitElementBoundingBox } from "@excalidraw/element"; import type { GlobalPoint, Radians } from "@excalidraw/math"; import type { Boun...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/FollowMode/FollowMode.tsx
packages/excalidraw/components/FollowMode/FollowMode.tsx
import { CloseIcon } from "../icons"; import "./FollowMode.scss"; import type { UserToFollow } from "../../types"; interface FollowModeProps { width: number; height: number; userToFollow: UserToFollow; onDisconnect: () => void; } const FollowMode = ({ height, width, userToFollow, onDisconnect, }: Fo...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/main-menu/DefaultItems.tsx
packages/excalidraw/components/main-menu/DefaultItems.tsx
import clsx from "clsx"; import { THEME } from "@excalidraw/common"; import type { Theme } from "@excalidraw/element/types"; import { actionClearCanvas, actionLoadScene, actionSaveToActiveFile, actionShortcuts, actionToggleSearchMenu, actionToggleTheme, } from "../../actions"; import { getShortcutFromSho...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/main-menu/MainMenu.tsx
packages/excalidraw/components/main-menu/MainMenu.tsx
import React from "react"; import { composeEventHandlers } from "@excalidraw/common"; import { useTunnels } from "../../context/tunnels"; import { useUIAppState } from "../../context/ui-appState"; import { t } from "../../i18n"; import { useEditorInterface, useExcalidrawSetAppState } from "../App"; import { UserList ...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/welcome-screen/WelcomeScreen.Hints.tsx
packages/excalidraw/components/welcome-screen/WelcomeScreen.Hints.tsx
import { useTunnels } from "../../context/tunnels"; import { t } from "../../i18n"; import { WelcomeScreenHelpArrow, WelcomeScreenMenuArrow, WelcomeScreenTopToolbarArrow, } from "../icons"; const MenuHint = ({ children }: { children?: React.ReactNode }) => { const { WelcomeScreenMenuHintTunnel } = useTunnels()...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/welcome-screen/WelcomeScreen.tsx
packages/excalidraw/components/welcome-screen/WelcomeScreen.tsx
import { Center } from "./WelcomeScreen.Center"; import { MenuHint, ToolbarHint, HelpHint } from "./WelcomeScreen.Hints"; import "./WelcomeScreen.scss"; const WelcomeScreen = (props: { children?: React.ReactNode }) => { return ( <> {props.children || ( <> <Center /> <MenuHint /...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/welcome-screen/WelcomeScreen.Center.tsx
packages/excalidraw/components/welcome-screen/WelcomeScreen.Center.tsx
import { actionLoadScene, actionShortcuts } from "../../actions"; import { getShortcutFromShortcutName } from "../../actions/shortcuts"; import { useTunnels } from "../../context/tunnels"; import { useUIAppState } from "../../context/ui-appState"; import { t, useI18n } from "../../i18n"; import { useEditorInterface, us...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ColorPicker/ShadeList.tsx
packages/excalidraw/components/ColorPicker/ShadeList.tsx
import clsx from "clsx"; import { useEffect, useRef } from "react"; import type { ColorPaletteCustom } from "@excalidraw/common"; import { useAtom } from "../../editor-jotai"; import { t } from "../../i18n"; import HotkeyLabel from "./HotkeyLabel"; import { activeColorPickerSectionAtom, getColorNameAndShadeFromC...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ColorPicker/ColorPicker.tsx
packages/excalidraw/components/ColorPicker/ColorPicker.tsx
import * as Popover from "@radix-ui/react-popover"; import clsx from "clsx"; import { useRef, useEffect } from "react"; import { COLOR_OUTLINE_CONTRAST_THRESHOLD, COLOR_PALETTE, isWritableElement, } from "@excalidraw/common"; import type { ColorTuple, ColorPaletteCustom } from "@excalidraw/common"; import type...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ColorPicker/ColorInput.tsx
packages/excalidraw/components/ColorPicker/ColorInput.tsx
import clsx from "clsx"; import { useCallback, useEffect, useRef, useState } from "react"; import { isTransparent, KEYS } from "@excalidraw/common"; import tinycolor from "tinycolor2"; import { getShortcutKey } from "../..//shortcut"; import { useAtom } from "../../editor-jotai"; import { t } from "../../i18n"; impo...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ColorPicker/TopPicks.tsx
packages/excalidraw/components/ColorPicker/TopPicks.tsx
import clsx from "clsx"; import { COLOR_OUTLINE_CONTRAST_THRESHOLD, DEFAULT_CANVAS_BACKGROUND_PICKS, DEFAULT_ELEMENT_BACKGROUND_PICKS, DEFAULT_ELEMENT_STROKE_PICKS, } from "@excalidraw/common"; import { isColorDark } from "./colorPickerUtils"; import type { ColorPickerType } from "./colorPickerUtils"; inter...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ColorPicker/colorPickerUtils.ts
packages/excalidraw/components/ColorPicker/colorPickerUtils.ts
import { isTransparent, MAX_CUSTOM_COLORS_USED_IN_CANVAS, tinycolor, } from "@excalidraw/common"; import type { ExcalidrawElement } from "@excalidraw/element/types"; import type { ColorPickerColor, ColorPaletteCustom } from "@excalidraw/common"; import { atom } from "../../editor-jotai"; export const getColor...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ColorPicker/keyboardNavHandlers.ts
packages/excalidraw/components/ColorPicker/keyboardNavHandlers.ts
import { COLORS_PER_ROW, COLOR_PALETTE, KEYS } from "@excalidraw/common"; import type { ColorPickerColor, ColorPalette, ColorPaletteCustom, } from "@excalidraw/common"; import type { ValueOf } from "@excalidraw/common/utility-types"; import { colorPickerHotkeyBindings, getColorNameAndShadeFromColor, } from...
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false
excalidraw/excalidraw
https://github.com/excalidraw/excalidraw/blob/63e1148280163a36326b7efb5fdfeefebabdb3e4/packages/excalidraw/components/ColorPicker/PickerHeading.tsx
packages/excalidraw/components/ColorPicker/PickerHeading.tsx
import type { ReactNode } from "react"; const PickerHeading = ({ children }: { children: ReactNode }) => ( <div className="color-picker__heading">{children}</div> ); export default PickerHeading;
typescript
MIT
63e1148280163a36326b7efb5fdfeefebabdb3e4
2026-01-04T15:25:31.673879Z
false