@zsviczian/excalidraw 0.17.6-13 → 0.17.6-15
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 +76 -32
- package/dist/excalidraw.production.min.js +1 -1
- package/dist/styles.development.css +78 -0
- package/dist/styles.production.css +1 -0
- package/package.json +1 -2
- package/types/excalidraw/actions/actionAddToLibrary.d.ts +18 -0
- package/types/excalidraw/actions/actionBoundText.d.ts +12 -0
- package/types/excalidraw/actions/actionCanvas.d.ts +84 -0
- package/types/excalidraw/actions/actionClipboard.d.ts +36 -0
- package/types/excalidraw/actions/actionCropEditor.d.ts +6 -0
- package/types/excalidraw/actions/actionDeleteSelected.d.ts +18 -0
- package/types/excalidraw/actions/actionElementLink.d.ts +244 -0
- package/types/excalidraw/actions/actionElementLock.d.ts +12 -0
- package/types/excalidraw/actions/actionExport.d.ts +51 -0
- package/types/excalidraw/actions/actionFinalize.d.ts +12 -0
- package/types/excalidraw/actions/actionFrame.d.ts +24 -0
- package/types/excalidraw/actions/actionGroup.d.ts +12 -0
- package/types/excalidraw/actions/actionLinearEditor.d.ts +6 -0
- package/types/excalidraw/actions/actionLink.d.ts +7 -1
- package/types/excalidraw/actions/actionMenu.d.ts +15 -0
- package/types/excalidraw/actions/actionNavigate.d.ts +12 -0
- package/types/excalidraw/actions/actionProperties.d.ts +90 -0
- package/types/excalidraw/actions/actionSelectAll.d.ts +6 -0
- package/types/excalidraw/actions/actionStyles.d.ts +6 -0
- package/types/excalidraw/actions/actionToggleGridMode.d.ts +6 -0
- package/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +6 -0
- package/types/excalidraw/actions/actionToggleSearchMenu.d.ts +9 -0
- package/types/excalidraw/actions/actionToggleStats.d.ts +6 -0
- package/types/excalidraw/actions/actionToggleViewMode.d.ts +6 -0
- package/types/excalidraw/actions/actionToggleZenMode.d.ts +6 -0
- package/types/excalidraw/actions/types.d.ts +1 -1
- package/types/excalidraw/components/App.d.ts +9 -1
- package/types/excalidraw/components/ElementLinkDialog.d.ts +11 -0
- package/types/excalidraw/components/LayerUI.d.ts +2 -1
- package/types/excalidraw/components/hyperlink/Hyperlink.d.ts +1 -1
- package/types/excalidraw/components/hyperlink/helpers.d.ts +1 -0
- package/types/excalidraw/components/icons.d.ts +1 -0
- package/types/excalidraw/constants.d.ts +2 -0
- package/types/excalidraw/data/encode.d.ts +1 -0
- package/types/excalidraw/element/binding.d.ts +1 -1
- package/types/excalidraw/element/elementLink.d.ts +13 -0
- package/types/excalidraw/element/embeddable.d.ts +6 -0
- package/types/excalidraw/errors.d.ts +7 -0
- package/types/excalidraw/index.d.ts +1 -0
- package/types/excalidraw/renderer/renderElement.d.ts +1 -1
- package/types/excalidraw/scene/Scene.d.ts +1 -0
- package/types/excalidraw/types.d.ts +9 -0
|
@@ -60,3 +60,4 @@ export { getCommonBounds, getVisibleSceneBounds } from "./element/bounds";
|
|
|
60
60
|
export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "../utils/withinBounds";
|
|
61
61
|
export { DiagramToCodePlugin } from "./components/DiagramToCodePlugin/DiagramToCodePlugin";
|
|
62
62
|
export { getDataURL } from "./data/blob";
|
|
63
|
+
export { isElementLink } from "./element/elementLink";
|
|
@@ -3,7 +3,7 @@ import type { RoughCanvas } from "roughjs/bin/canvas";
|
|
|
3
3
|
import type { StaticCanvasRenderConfig, RenderableElementsMap, InteractiveCanvasRenderConfig } from "../scene/types";
|
|
4
4
|
import type { AppState, StaticCanvasAppState, InteractiveCanvasAppState, ElementsPendingErasure, PendingExcalidrawElements } from "../types";
|
|
5
5
|
export declare const IMAGE_INVERT_FILTER = "invert(100%) hue-rotate(180deg) saturate(1.25)";
|
|
6
|
-
export declare const getRenderOpacity: (element: ExcalidrawElement, containingFrame: ExcalidrawFrameLikeElement | null, elementsPendingErasure: ElementsPendingErasure, pendingNodes: Readonly<PendingExcalidrawElements> | null) => number;
|
|
6
|
+
export declare const getRenderOpacity: (element: ExcalidrawElement, containingFrame: ExcalidrawFrameLikeElement | null, elementsPendingErasure: ElementsPendingErasure, pendingNodes: Readonly<PendingExcalidrawElements> | null, globalAlpha?: number) => number;
|
|
7
7
|
export interface ExcalidrawElementWithCanvas {
|
|
8
8
|
element: ExcalidrawElement | ExcalidrawTextElement;
|
|
9
9
|
canvas: HTMLCanvasElement;
|
|
@@ -74,5 +74,6 @@ declare class Scene {
|
|
|
74
74
|
getContainerElement: (element: (ExcalidrawElement & {
|
|
75
75
|
containerId: ExcalidrawElement["id"] | null;
|
|
76
76
|
}) | null) => import("../element/types").ExcalidrawSelectionElement | import("../element/types").ExcalidrawRectangleElement | import("../element/types").ExcalidrawDiamondElement | import("../element/types").ExcalidrawEllipseElement | import("../element/types").ExcalidrawTextElement | import("../element/types").ExcalidrawLinearElement | import("../element/types").ExcalidrawFreeDrawElement | import("../element/types").ExcalidrawImageElement | import("../element/types").ExcalidrawFrameElement | import("../element/types").ExcalidrawMagicFrameElement | import("../element/types").ExcalidrawIframeElement | import("../element/types").ExcalidrawEmbeddableElement | null;
|
|
77
|
+
getElementsFromId: (id: string) => ExcalidrawElement[];
|
|
77
78
|
}
|
|
78
79
|
export default Scene;
|
|
@@ -107,6 +107,7 @@ type _CommonCanvasAppState = {
|
|
|
107
107
|
width: AppState["width"];
|
|
108
108
|
height: AppState["height"];
|
|
109
109
|
viewModeEnabled: AppState["viewModeEnabled"];
|
|
110
|
+
openDialog: AppState["openDialog"];
|
|
110
111
|
editingGroupId: AppState["editingGroupId"];
|
|
111
112
|
selectedElementIds: AppState["selectedElementIds"];
|
|
112
113
|
frameToHighlight: AppState["frameToHighlight"];
|
|
@@ -128,6 +129,7 @@ export type StaticCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
|
128
129
|
gridColor: AppState["gridColor"];
|
|
129
130
|
frameColor: AppState["frameColor"];
|
|
130
131
|
currentHoveredFontFamily: AppState["currentHoveredFontFamily"];
|
|
132
|
+
hoveredElementIds: AppState["hoveredElementIds"];
|
|
131
133
|
croppingElementId: AppState["croppingElementId"];
|
|
132
134
|
}>;
|
|
133
135
|
export type InteractiveCanvasAppState = Readonly<_CommonCanvasAppState & {
|
|
@@ -265,6 +267,9 @@ export interface AppState {
|
|
|
265
267
|
tab: "text-to-diagram" | "mermaid";
|
|
266
268
|
} | {
|
|
267
269
|
name: "commandPalette";
|
|
270
|
+
} | {
|
|
271
|
+
name: "elementLinkSelector";
|
|
272
|
+
sourceElementId: ExcalidrawElement["id"];
|
|
268
273
|
};
|
|
269
274
|
/**
|
|
270
275
|
* Reflects user preference for whether the default sidebar should be docked.
|
|
@@ -278,6 +283,9 @@ export interface AppState {
|
|
|
278
283
|
selectedElementIds: Readonly<{
|
|
279
284
|
[id: string]: true;
|
|
280
285
|
}>;
|
|
286
|
+
hoveredElementIds: Readonly<{
|
|
287
|
+
[id: string]: true;
|
|
288
|
+
}>;
|
|
281
289
|
previousSelectedElementIds: {
|
|
282
290
|
[id: string]: true;
|
|
283
291
|
};
|
|
@@ -471,6 +479,7 @@ export interface ExcalidrawProps {
|
|
|
471
479
|
generateIdForFile?: (file: File) => string | Promise<string>;
|
|
472
480
|
onThemeChange?: (newTheme: string) => void;
|
|
473
481
|
onViewModeChange?: (isViewModeEnabled: boolean) => void;
|
|
482
|
+
generateLinkForSelection?: (id: string, type: "element" | "group") => string;
|
|
474
483
|
onLinkOpen?: (element: NonDeletedExcalidrawElement, event: CustomEvent<{
|
|
475
484
|
nativeEvent: MouseEvent | React.PointerEvent<HTMLCanvasElement>;
|
|
476
485
|
}>) => void;
|