@zsviczian/excalidraw 0.18.0-11 → 0.18.0-13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/excalidraw.development.js +103 -70
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +16 -0
- package/dist/styles.production.css +1 -0
- package/package.json +1 -1
- package/types/common/src/constants.d.ts +1 -0
- package/types/{excalidraw/scene → element/src}/Scene.d.ts +8 -11
- package/types/element/src/align.d.ts +3 -3
- package/types/element/src/binding.d.ts +18 -10
- package/types/element/src/dragElements.d.ts +3 -2
- package/types/element/src/elbowArrow.d.ts +1 -1
- package/types/element/src/flowchart.d.ts +3 -2
- package/types/element/src/fractionalIndex.d.ts +2 -2
- package/types/element/src/frame.d.ts +1 -1
- package/types/element/src/linearElementEditor.d.ts +13 -13
- package/types/element/src/mutateElement.d.ts +10 -2
- package/types/element/src/newElement.d.ts +2 -2
- package/types/element/src/resizeElements.d.ts +5 -5
- package/types/element/src/sizeHelpers.d.ts +0 -1
- package/types/element/src/textElement.d.ts +4 -3
- package/types/element/src/typeChecks.d.ts +3 -0
- package/types/element/src/types.d.ts +3 -0
- package/types/element/src/zindex.d.ts +3 -3
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
- package/types/excalidraw/actions/actionBoundText.d.ts +2 -2
- package/types/excalidraw/actions/actionCanvas.d.ts +30 -30
- package/types/excalidraw/actions/actionClipboard.d.ts +6 -6
- package/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
- package/types/excalidraw/actions/actionElementLink.d.ts +1 -1
- package/types/excalidraw/actions/actionElementLock.d.ts +2 -2
- package/types/excalidraw/actions/actionEmbeddable.d.ts +1 -1
- package/types/excalidraw/actions/actionExport.d.ts +32 -32
- package/types/excalidraw/actions/actionFinalize.d.ts +2 -2
- package/types/excalidraw/actions/actionFrame.d.ts +6 -6
- package/types/excalidraw/actions/actionGroup.d.ts +2 -2
- package/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
- package/types/excalidraw/actions/actionMenu.d.ts +1 -1
- package/types/excalidraw/actions/actionNavigate.d.ts +1 -1
- package/types/excalidraw/actions/actionProperties.d.ts +17 -17
- package/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/types/excalidraw/actions/actionStyles.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -2
- package/types/excalidraw/actions/actionToggleShapeSwitch.d.ts +19 -0
- package/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
- package/types/excalidraw/actions/actionZindex.d.ts +2 -2
- package/types/excalidraw/actions/types.d.ts +2 -2
- package/types/excalidraw/appState.d.ts +15 -15
- package/types/excalidraw/components/App.d.ts +6 -1
- package/types/excalidraw/components/ConvertElementTypePopup.d.ts +49 -0
- package/types/excalidraw/components/ElementLinkDialog.d.ts +4 -3
- package/types/excalidraw/components/Stats/Angle.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGrid.d.ts +1 -1
- package/types/excalidraw/components/Stats/CanvasGridSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/Dimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/DragInput.d.ts +1 -1
- package/types/excalidraw/components/Stats/FontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiAngle.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiDimension.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiFontSize.d.ts +1 -1
- package/types/excalidraw/components/Stats/MultiPosition.d.ts +1 -1
- package/types/excalidraw/components/Stats/Position.d.ts +1 -1
- package/types/excalidraw/components/Stats/utils.d.ts +4 -11
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +3 -2
- package/types/excalidraw/editor-jotai.d.ts +6 -6
- package/types/excalidraw/fonts/Fonts.d.ts +1 -1
- package/types/excalidraw/scene/Renderer.d.ts +1 -1
- package/types/excalidraw/scene/types.d.ts +2 -0
- package/types/excalidraw/types.d.ts +2 -0
- package/types/excalidraw/wysiwyg/textWysiwyg.d.ts +3 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type Scene from "@excalidraw/element/Scene";
|
|
1
2
|
import type { ElementsMap, ExcalidrawEmbeddableElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
3
|
import "./Hyperlink.scss";
|
|
3
4
|
import type { AppState, ExcalidrawProps, UIAppState } from "../../types";
|
|
4
|
-
export declare const Hyperlink: ({ element,
|
|
5
|
+
export declare const Hyperlink: ({ element, scene, setAppState, onLinkOpen, setToast, updateEmbedValidationStatus, }: {
|
|
5
6
|
element: NonDeletedExcalidrawElement;
|
|
6
|
-
|
|
7
|
+
scene: Scene;
|
|
7
8
|
setAppState: React.Component<any, AppState>["setState"];
|
|
8
9
|
onLinkOpen: ExcalidrawProps["onLinkOpen"];
|
|
9
10
|
setToast: (toast: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { atom, createStore, type PrimitiveAtom } from "jotai";
|
|
1
|
+
import { atom, createStore, type PrimitiveAtom, type WritableAtom } from "jotai";
|
|
2
2
|
import { createIsolation } from "jotai-scope";
|
|
3
|
-
export { atom, PrimitiveAtom };
|
|
3
|
+
export { atom, PrimitiveAtom, WritableAtom };
|
|
4
4
|
export declare const useAtom: typeof import("jotai").useAtom, useSetAtom: typeof import("jotai").useSetAtom, useAtomValue: typeof import("jotai").useAtomValue, useStore: (options?: {
|
|
5
5
|
store?: {
|
|
6
6
|
get: <Value>(atom: import("jotai").Atom<Value>) => Value;
|
|
7
|
-
set: <Value_1, Args extends unknown[], Result>(atom:
|
|
7
|
+
set: <Value_1, Args extends unknown[], Result>(atom: WritableAtom<Value_1, Args, Result>, ...args: Args) => Result;
|
|
8
8
|
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
9
9
|
} | ({
|
|
10
10
|
get: <Value_2>(atom: import("jotai").Atom<Value_2>) => Value_2;
|
|
11
|
-
set: <Value_1_1, Args_1 extends unknown[], Result_1>(atom:
|
|
11
|
+
set: <Value_1_1, Args_1 extends unknown[], Result_1>(atom: WritableAtom<Value_1_1, Args_1, Result_1>, ...args: Args_1) => Result_1;
|
|
12
12
|
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
13
13
|
} & {
|
|
14
14
|
dev4_get_internal_weak_map: () => WeakMap<import("jotai").Atom<unknown>, {
|
|
@@ -29,11 +29,11 @@ export declare const useAtom: typeof import("jotai").useAtom, useSetAtom: typeof
|
|
|
29
29
|
}) | undefined;
|
|
30
30
|
} | undefined) => {
|
|
31
31
|
get: <Value_3>(atom: import("jotai").Atom<Value_3>) => Value_3;
|
|
32
|
-
set: <Value_1_2, Args_2 extends unknown[], Result_2>(atom:
|
|
32
|
+
set: <Value_1_2, Args_2 extends unknown[], Result_2>(atom: WritableAtom<Value_1_2, Args_2, Result_2>, ...args: Args_2) => Result_2;
|
|
33
33
|
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
34
34
|
} | ({
|
|
35
35
|
get: <Value_4>(atom: import("jotai").Atom<Value_4>) => Value_4;
|
|
36
|
-
set: <Value_1_3, Args_3 extends unknown[], Result_3>(atom:
|
|
36
|
+
set: <Value_1_3, Args_3 extends unknown[], Result_3>(atom: WritableAtom<Value_1_3, Args_3, Result_3>, ...args: Args_3) => Result_3;
|
|
37
37
|
sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
|
|
38
38
|
} & {
|
|
39
39
|
dev4_get_internal_weak_map: () => WeakMap<import("jotai").Atom<unknown>, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type FontMetadata } from "@excalidraw/common";
|
|
2
2
|
import type { ExcalidrawElement, ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
3
|
+
import type Scene from "@excalidraw/element/Scene";
|
|
3
4
|
import { ExcalidrawFontFace } from "./ExcalidrawFontFace";
|
|
4
|
-
import type Scene from "../scene/Scene";
|
|
5
5
|
export declare class Fonts {
|
|
6
6
|
static readonly loadedFontsCache: Set<string>;
|
|
7
7
|
private static _registered;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "@excalidraw/element/types";
|
|
2
|
-
import type Scene from "
|
|
2
|
+
import type Scene from "@excalidraw/element/Scene";
|
|
3
3
|
import type { AppState } from "../types";
|
|
4
4
|
export declare class Renderer {
|
|
5
5
|
private scene;
|
|
@@ -95,12 +95,14 @@ export type ScrollBars = {
|
|
|
95
95
|
y: number;
|
|
96
96
|
width: number;
|
|
97
97
|
height: number;
|
|
98
|
+
deltaMultiplier: number;
|
|
98
99
|
} | null;
|
|
99
100
|
vertical: {
|
|
100
101
|
x: number;
|
|
101
102
|
y: number;
|
|
102
103
|
width: number;
|
|
103
104
|
height: number;
|
|
105
|
+
deltaMultiplier: number;
|
|
104
106
|
} | null;
|
|
105
107
|
};
|
|
106
108
|
export type ElementShape = Drawable | Drawable[] | null;
|
|
@@ -605,6 +605,7 @@ export type AppClassProperties = {
|
|
|
605
605
|
visibleElements: App["visibleElements"];
|
|
606
606
|
excalidrawContainerValue: App["excalidrawContainerValue"];
|
|
607
607
|
onPointerUpEmitter: App["onPointerUpEmitter"];
|
|
608
|
+
updateEditorAtom: App["updateEditorAtom"];
|
|
608
609
|
};
|
|
609
610
|
export type PointerDownState = Readonly<{
|
|
610
611
|
origin: Readonly<{
|
|
@@ -666,6 +667,7 @@ export type PointerDownState = Readonly<{
|
|
|
666
667
|
export type UnsubscribeCallback = () => void;
|
|
667
668
|
export interface ExcalidrawImperativeAPI {
|
|
668
669
|
updateScene: InstanceType<typeof App>["updateScene"];
|
|
670
|
+
mutateElement: InstanceType<typeof App>["mutateElement"];
|
|
669
671
|
updateLibrary: InstanceType<typeof Library>["updateLibrary"];
|
|
670
672
|
resetScene: InstanceType<typeof App>["resetScene"];
|
|
671
673
|
getSceneElementsIncludingDeleted: InstanceType<typeof App>["getSceneElementsIncludingDeleted"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExcalidrawElement, ExcalidrawTextElement } from "@excalidraw/element/types";
|
|
2
2
|
import type App from "../components/App";
|
|
3
|
+
type SubmitHandler = () => void;
|
|
3
4
|
export declare const textWysiwyg: ({ id, onChange, onSubmit, getViewportCoords, element, canvas, excalidrawContainer, app, autoSelect, }: {
|
|
4
5
|
id: ExcalidrawElement["id"];
|
|
5
6
|
/**
|
|
@@ -19,4 +20,5 @@ export declare const textWysiwyg: ({ id, onChange, onSubmit, getViewportCoords,
|
|
|
19
20
|
excalidrawContainer: HTMLDivElement | null;
|
|
20
21
|
app: App;
|
|
21
22
|
autoSelect?: boolean | undefined;
|
|
22
|
-
}) =>
|
|
23
|
+
}) => SubmitHandler;
|
|
24
|
+
export {};
|