@excalidraw/excalidraw 0.18.0-rc.7 → 0.18.0

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.
@@ -1 +1 @@
1
- import{a,b,c,d}from"./chunk-EIO257PC.js";import"./chunk-YCRRKGOW.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
1
+ import{a,b,c,d}from"./chunk-EIO257PC.js";import"./chunk-SQ5PDB2P.js";import"./chunk-SRAX5OIU.js";export{a as Commands,b as subsetToBase64,c as subsetToBinary,d as toBase64};
@@ -1 +1 @@
1
- import{a as r,c as t}from"./chunk-EIO257PC.js";import"./chunk-YCRRKGOW.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
1
+ import{a as r,c as t}from"./chunk-EIO257PC.js";import"./chunk-SQ5PDB2P.js";import"./chunk-SRAX5OIU.js";var s=import.meta.url?new URL(import.meta.url):void 0;typeof window>"u"&&typeof self<"u"&&(self.onmessage=async e=>{switch(e.data.command){case r.Subset:let a=await t(e.data.arrayBuffer,e.data.codePoints);self.postMessage(a,{transfer:[a]});break}});export{s as WorkerUrl};
@@ -8,8 +8,8 @@ interface PropertiesPopoverProps {
8
8
  onClose: () => void;
9
9
  onKeyDown?: React.KeyboardEventHandler<HTMLDivElement>;
10
10
  onPointerLeave?: React.PointerEventHandler<HTMLDivElement>;
11
- onFocusOutside?: Popover.DismissableLayerProps["onFocusOutside"];
12
- onPointerDownOutside?: Popover.DismissableLayerProps["onPointerDownOutside"];
11
+ onFocusOutside?: Popover.PopoverContentProps["onFocusOutside"];
12
+ onPointerDownOutside?: Popover.PopoverContentProps["onPointerDownOutside"];
13
13
  }
14
14
  export declare const PropertiesPopover: React.ForwardRefExoticComponent<PropertiesPopoverProps & React.RefAttributes<HTMLDivElement>>;
15
15
  export {};
@@ -38,7 +38,6 @@ export declare const getElementLineSegments: (element: ExcalidrawElement, elemen
38
38
  */
39
39
  export declare const getRectangleBoxAbsoluteCoords: (boxSceneCoords: RectangleBox) => number[];
40
40
  export declare const getDiamondPoints: (element: ExcalidrawElement) => number[];
41
- export declare const getCurvePathOps: (shape: Drawable) => Op[];
42
41
  export declare const getMinMaxXYFromCurvePathOps: (ops: Op[], transformXY?: ((p: GlobalPoint) => GlobalPoint) | undefined) => Bounds;
43
42
  export declare const getBoundsFromPoints: (points: ExcalidrawFreeDrawElement["points"]) => Bounds;
44
43
  /** @returns number in pixels */
@@ -74,3 +73,4 @@ export declare const getCommonBoundingBox: (elements: ExcalidrawElement[] | read
74
73
  */
75
74
  export declare const getVisibleSceneBounds: ({ scrollX, scrollY, width, height, zoom, }: AppState) => SceneBounds;
76
75
  export declare const getCenterForBounds: (bounds: Bounds) => GlobalPoint;
76
+ export declare const doBoundsIntersect: (bounds1: Bounds | null, bounds2: Bounds | null) => boolean;
@@ -1,12 +1,12 @@
1
- import { type LocalPoint } from "@excalidraw/math";
1
+ import { type GlobalPoint, type LocalPoint } from "@excalidraw/math";
2
2
  import { type ElementUpdate } from "./mutateElement";
3
- import { type ExcalidrawElbowArrowElement, type NonDeletedSceneElementsMap, type SceneElementsMap } from "./types";
3
+ import { type ExcalidrawElbowArrowElement, type NonDeletedSceneElementsMap } from "./types";
4
4
  import type { FixedPointBinding, FixedSegment } from "./types";
5
5
  export declare const BASE_PADDING = 40;
6
6
  /**
7
7
  *
8
8
  */
9
- export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArrowElement>, elementsMap: NonDeletedSceneElementsMap | SceneElementsMap, updates: {
9
+ export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArrowElement>, elementsMap: NonDeletedSceneElementsMap, updates: {
10
10
  points?: readonly LocalPoint[];
11
11
  fixedSegments?: FixedSegment[] | null;
12
12
  startBinding?: FixedPointBinding | null;
@@ -14,3 +14,4 @@ export declare const updateElbowArrowPoints: (arrow: Readonly<ExcalidrawElbowArr
14
14
  }, options?: {
15
15
  isDragging?: boolean;
16
16
  }) => ElementUpdate<ExcalidrawElbowArrowElement>;
17
+ export declare const validateElbowPoints: <P extends GlobalPoint | LocalPoint>(points: readonly P[], tolerance?: number) => boolean;
@@ -51,7 +51,9 @@ export declare class LinearElementEditor {
51
51
  */
52
52
  static getElement<T extends ExcalidrawLinearElement>(id: InstanceType<typeof LinearElementEditor>["elementId"], elementsMap: ElementsMap): T | null;
53
53
  static handleBoxSelection(event: PointerEvent, appState: AppState, setState: React.Component<any, AppState>["setState"], elementsMap: NonDeletedSceneElementsMap): false | undefined;
54
- /** @returns whether point was dragged */
54
+ /**
55
+ * @returns whether point was dragged
56
+ */
55
57
  static handlePointDragging(event: PointerEvent, app: AppClassProperties, scenePointerX: number, scenePointerY: number, maybeSuggestBinding: (element: NonDeleted<ExcalidrawLinearElement>, pointSceneCoords: {
56
58
  x: number;
57
59
  y: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@excalidraw/excalidraw",
3
- "version": "0.18.0-rc.7",
3
+ "version": "0.18.0",
4
4
  "type": "module",
5
5
  "types": "./dist/types/excalidraw/index.d.ts",
6
6
  "main": "./dist/prod/index.js",
@@ -16,7 +16,8 @@
16
16
  ".": {
17
17
  "types": "./dist/types/excalidraw/index.d.ts",
18
18
  "development": "./dist/dev/index.js",
19
- "production": "./dist/prod/index.js"
19
+ "production": "./dist/prod/index.js",
20
+ "default": "./dist/prod/index.js"
20
21
  }
21
22
  },
22
23
  "files": [
@@ -62,7 +63,7 @@
62
63
  "@excalidraw/laser-pointer": "1.3.1",
63
64
  "@excalidraw/mermaid-to-excalidraw": "1.1.2",
64
65
  "@excalidraw/random-username": "1.1.0",
65
- "@radix-ui/react-popover": "1.0.3",
66
+ "@radix-ui/react-popover": "1.1.6",
66
67
  "@radix-ui/react-tabs": "1.0.2",
67
68
  "browser-fs-access": "0.29.1",
68
69
  "canvas-roundrect-polyfill": "0.0.1",