mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
chore: upgrade to react@19 (#9182)
This commit is contained in:
parent
9ee0b8ffcb
commit
31e8476c78
58 changed files with 2774 additions and 2828 deletions
|
@ -1,4 +1,5 @@
|
|||
import { forwardRef } from "react";
|
||||
import type { JSX } from "react";
|
||||
import clsx from "clsx";
|
||||
|
||||
import "./ButtonIcon.scss";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import clsx from "clsx";
|
||||
|
||||
export const ButtonIconCycle = <T extends any>({
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import clsx from "clsx";
|
||||
import { ButtonIcon } from "./ButtonIcon";
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import React, {
|
||||
useMemo,
|
||||
useState,
|
||||
|
|
|
@ -4,7 +4,7 @@ import { type FontDescriptor } from "./FontPickerList";
|
|||
|
||||
interface FontPickerKeyNavHandlerProps {
|
||||
event: React.KeyboardEvent<HTMLDivElement>;
|
||||
inputRef: React.RefObject<HTMLInputElement>;
|
||||
inputRef: React.RefObject<HTMLInputElement | null>;
|
||||
hoveredFont: Node<FontDescriptor> | undefined;
|
||||
filteredFonts: Node<FontDescriptor>[];
|
||||
onClose: () => void;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import React from "react";
|
||||
import { t } from "../i18n";
|
||||
import { KEYS } from "../keys";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import React, { useEffect } from "react";
|
||||
import * as Popover from "@radix-ui/react-popover";
|
||||
import { isArrowKey, KEYS } from "../keys";
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import "./ToolIcon.scss";
|
||||
|
||||
import type { JSX } from "react";
|
||||
import clsx from "clsx";
|
||||
import type { ToolButtonSize } from "./ToolButton";
|
||||
|
||||
import "./ToolIcon.scss";
|
||||
|
||||
const DEFAULT_SIZE: ToolButtonSize = "small";
|
||||
|
||||
export const ElementCanvasButton = (props: {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import React from "react";
|
||||
import type {
|
||||
AppClassProperties,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import React from "react";
|
||||
import type { AppState, SidebarName, SidebarTabName } from "../../types";
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@ type StackProps = {
|
|||
justifyContent?: "center" | "space-around" | "space-between";
|
||||
className?: string | boolean;
|
||||
style?: React.CSSProperties;
|
||||
ref: React.RefObject<HTMLDivElement>;
|
||||
};
|
||||
|
||||
const RowStack = forwardRef(
|
||||
|
|
|
@ -13,7 +13,7 @@ const ErrorComp = ({ error }: { error: string }) => {
|
|||
|
||||
interface TTDDialogOutputProps {
|
||||
error: Error | null;
|
||||
canvasRef: React.RefObject<HTMLDivElement>;
|
||||
canvasRef: React.RefObject<HTMLDivElement | null>;
|
||||
loaded: boolean;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import type { ReactNode } from "react";
|
||||
import { useTunnels } from "../../context/tunnels";
|
||||
import DropdownMenu from "../dropdownMenu/DropdownMenu";
|
||||
|
|
|
@ -12,7 +12,7 @@ const resetPreview = ({
|
|||
canvasRef,
|
||||
setError,
|
||||
}: {
|
||||
canvasRef: React.RefObject<HTMLDivElement>;
|
||||
canvasRef: React.RefObject<HTMLDivElement | null>;
|
||||
setError: (error: Error | null) => void;
|
||||
}) => {
|
||||
const canvasNode = canvasRef.current;
|
||||
|
@ -40,7 +40,7 @@ export interface MermaidToExcalidrawLibProps {
|
|||
}
|
||||
|
||||
interface ConvertMermaidToExcalidrawFormatProps {
|
||||
canvasRef: React.RefObject<HTMLDivElement>;
|
||||
canvasRef: React.RefObject<HTMLDivElement | null>;
|
||||
mermaidToExcalidrawLib: MermaidToExcalidrawLibProps;
|
||||
mermaidDefinition: string;
|
||||
setError: (error: Error | null) => void;
|
||||
|
|
|
@ -17,7 +17,7 @@ import { isRenderThrottlingEnabled } from "../../reactUtils";
|
|||
import { renderInteractiveScene } from "../../renderer/interactiveScene";
|
||||
|
||||
type InteractiveCanvasProps = {
|
||||
containerRef: React.RefObject<HTMLDivElement>;
|
||||
containerRef: React.RefObject<HTMLDivElement | null>;
|
||||
canvas: HTMLCanvasElement | null;
|
||||
elementsMap: RenderableElementsMap;
|
||||
visibleElements: readonly NonDeletedExcalidrawElement[];
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import React, { useEffect, useRef } from "react";
|
||||
import {
|
||||
getDropdownMenuItemClassName,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import { useDevice } from "../App";
|
||||
|
||||
const MenuItemContent = ({
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import MenuItemContent from "./DropdownMenuItemContent";
|
||||
import type { JSX } from "react";
|
||||
import React from "react";
|
||||
import {
|
||||
getDropdownMenuItemClassName,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import type { JSX } from "react";
|
||||
import { actionLoadScene, actionShortcuts } from "../../actions";
|
||||
import { getShortcutFromShortcutName } from "../../actions/shortcuts";
|
||||
import { t, useI18n } from "../../i18n";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue