@excalidraw/excalidraw 0.17.1-7441-4e2c539 → 0.17.1-7500-ac247a0

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.
Files changed (69) hide show
  1. package/dist/browser/dev/excalidraw-assets-dev/{chunk-SUHLFFEF.js → chunk-KGZXLFLR.js} +12342 -12294
  2. package/dist/browser/dev/excalidraw-assets-dev/chunk-KGZXLFLR.js.map +7 -0
  3. package/dist/browser/dev/excalidraw-assets-dev/{image-NOPDRTTM.css → image-3MFRCKYM.css} +3929 -3929
  4. package/dist/browser/dev/excalidraw-assets-dev/image-3MFRCKYM.css.map +7 -0
  5. package/dist/browser/dev/excalidraw-assets-dev/{image-HYNUJ3XL.js → image-5TVMINCA.js} +2 -2
  6. package/dist/browser/dev/index.js +17 -7
  7. package/dist/browser/prod/excalidraw-assets/chunk-4YN2HN3S.js +257 -0
  8. package/dist/browser/prod/excalidraw-assets/{image-DZ6B4AID.js → image-LTLHTTSE.js} +1 -1
  9. package/dist/browser/prod/excalidraw-assets/image-QBL334OA.css +1 -0
  10. package/dist/browser/prod/index.js +1 -1
  11. package/dist/dev/index.js +785 -740
  12. package/dist/dev/index.js.map +4 -4
  13. package/dist/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
  14. package/dist/excalidraw/actions/actionBoundText.d.ts +2 -2
  15. package/dist/excalidraw/actions/actionCanvas.d.ts +12 -12
  16. package/dist/excalidraw/actions/actionClipboard.d.ts +7 -7
  17. package/dist/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
  18. package/dist/excalidraw/actions/actionElementLock.d.ts +2 -2
  19. package/dist/excalidraw/actions/actionExport.d.ts +8 -8
  20. package/dist/excalidraw/actions/actionFinalize.d.ts +2 -2
  21. package/dist/excalidraw/actions/actionFrame.d.ts +3 -3
  22. package/dist/excalidraw/actions/actionGroup.d.ts +2 -2
  23. package/dist/excalidraw/actions/actionLinearEditor.d.ts +1 -1
  24. package/dist/excalidraw/actions/actionMenu.d.ts +2 -2
  25. package/dist/excalidraw/actions/actionNavigate.d.ts +2 -2
  26. package/dist/excalidraw/actions/actionProperties.d.ts +13 -13
  27. package/dist/excalidraw/actions/actionSelectAll.d.ts +1 -1
  28. package/dist/excalidraw/actions/actionStyles.d.ts +1 -1
  29. package/dist/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
  30. package/dist/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
  31. package/dist/excalidraw/actions/actionToggleStats.d.ts +1 -1
  32. package/dist/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
  33. package/dist/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
  34. package/dist/excalidraw/components/App.d.ts +9 -1
  35. package/dist/excalidraw/components/App.js +91 -71
  36. package/dist/excalidraw/components/ImageExportDialog.js +1 -1
  37. package/dist/excalidraw/components/PublishLibrary.js +1 -1
  38. package/dist/excalidraw/components/Sidebar/Sidebar.d.ts +1 -1
  39. package/dist/excalidraw/components/dropdownMenu/common.d.ts +1 -1
  40. package/dist/excalidraw/constants.d.ts +2 -0
  41. package/dist/excalidraw/constants.js +4 -0
  42. package/dist/excalidraw/data/index.js +1 -1
  43. package/dist/excalidraw/element/Hyperlink.d.ts +1 -1
  44. package/dist/excalidraw/element/embeddable.d.ts +1 -1
  45. package/dist/excalidraw/element/linearElementEditor.d.ts +1 -1
  46. package/dist/excalidraw/emitter.d.ts +5 -9
  47. package/dist/excalidraw/emitter.js +12 -12
  48. package/dist/excalidraw/frame.js +1 -1
  49. package/dist/excalidraw/hooks/useLibraryItemSvg.js +1 -1
  50. package/dist/excalidraw/index.d.ts +9 -4
  51. package/dist/excalidraw/index.js +9 -4
  52. package/dist/excalidraw/scene/export.js +1 -1
  53. package/dist/excalidraw/types.d.ts +1 -1
  54. package/dist/excalidraw/utils.d.ts +7 -1
  55. package/dist/excalidraw/utils.js +15 -0
  56. package/dist/prod/index.js +30 -30
  57. package/dist/utils/bbox.d.ts +2 -2
  58. package/dist/utils/export.d.ts +3 -9
  59. package/dist/utils/export.js +13 -9
  60. package/dist/utils/index.d.ts +3 -0
  61. package/dist/utils/index.js +3 -0
  62. package/dist/utils/withinBounds.d.ts +1 -1
  63. package/dist/utils/withinBounds.js +1 -3
  64. package/package.json +1 -1
  65. package/dist/browser/dev/excalidraw-assets-dev/chunk-SUHLFFEF.js.map +0 -7
  66. package/dist/browser/dev/excalidraw-assets-dev/image-NOPDRTTM.css.map +0 -7
  67. package/dist/browser/prod/excalidraw-assets/chunk-HE2P7BQ6.js +0 -257
  68. package/dist/browser/prod/excalidraw-assets/image-J2QCCYAR.css +0 -1
  69. /package/dist/browser/dev/excalidraw-assets-dev/{image-HYNUJ3XL.js.map → image-5TVMINCA.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { Bounds } from "../excalidraw/element/bounds";
2
- import { Point } from "../excalidraw/types";
1
+ import type { Bounds } from "../excalidraw/element/bounds";
2
+ import type { Point } from "../excalidraw/types";
3
3
  export type LineSegment = [Point, Point];
4
4
  export declare function getBBox(line: LineSegment): Bounds;
5
5
  export declare function crossProduct(a: Point, b: Point): number;
@@ -1,6 +1,6 @@
1
- import { AppState, BinaryFiles } from "../excalidraw/types";
2
- import { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeleted } from "../excalidraw/element/types";
3
- import { MIME_TYPES } from "../excalidraw/constants";
1
+ import { MIME_TYPES } from "../excalidraw/index";
2
+ import type { ExcalidrawElement, ExcalidrawFrameLikeElement, NonDeleted } from "@excalidraw/excalidraw/element/types";
3
+ import type { AppState, BinaryFiles } from "../excalidraw/types";
4
4
  export { MIME_TYPES };
5
5
  type ExportOpts = {
6
6
  elements: readonly NonDeleted<ExcalidrawElement>[];
@@ -31,9 +31,3 @@ export declare const exportToClipboard: (opts: ExportOpts & {
31
31
  quality?: number;
32
32
  type: "png" | "svg" | "json";
33
33
  }) => Promise<void>;
34
- export * from "./bbox";
35
- export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "./withinBounds";
36
- export { serializeAsJSON, serializeLibraryAsJSON, } from "../excalidraw/data/json";
37
- export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, } from "../excalidraw/data/blob";
38
- export { getFreeDrawSvgPath } from "../excalidraw/renderer/renderElement";
39
- export { mergeLibraryItems } from "../excalidraw/data/library";
@@ -1,7 +1,5 @@
1
1
  import { exportToCanvas as _exportToCanvas, exportToSvg as _exportToSvg, } from "../excalidraw/scene/export";
2
- import { getDefaultAppState } from "../excalidraw/appState";
3
- import { restore } from "../excalidraw/data/restore";
4
- import { MIME_TYPES } from "../excalidraw/constants";
2
+ import { getDefaultAppState, restore, MIME_TYPES } from "../excalidraw/index";
5
3
  import { encodePngMetadata } from "../excalidraw/data/image";
6
4
  import { serializeAsJSON } from "../excalidraw/data/json";
7
5
  import { copyBlobToClipboardAsPng, copyTextToSystemClipboard, copyToClipboard, } from "../excalidraw/clipboard";
@@ -101,9 +99,15 @@ export const exportToClipboard = async (opts) => {
101
99
  throw new Error("Invalid export type");
102
100
  }
103
101
  };
104
- export * from "./bbox";
105
- export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "./withinBounds";
106
- export { serializeAsJSON, serializeLibraryAsJSON, } from "../excalidraw/data/json";
107
- export { loadFromBlob, loadSceneOrLibraryFromBlob, loadLibraryFromBlob, } from "../excalidraw/data/blob";
108
- export { getFreeDrawSvgPath } from "../excalidraw/renderer/renderElement";
109
- export { mergeLibraryItems } from "../excalidraw/data/library";
102
+ // All this we should move to utils package instead or stop exporting from utils package
103
+ // export {
104
+ // serializeAsJSON,
105
+ // serializeLibraryAsJSON,
106
+ // } from "../excalidraw/data/json";
107
+ // export {
108
+ // loadFromBlob,
109
+ // loadSceneOrLibraryFromBlob,
110
+ // loadLibraryFromBlob,
111
+ // } from "../excalidraw/data/blob";
112
+ // export { getFreeDrawSvgPath } from "../excalidraw/renderer/renderElement";
113
+ // export { mergeLibraryItems } from "../excalidraw/data/library";
@@ -0,0 +1,3 @@
1
+ export * from "./bbox";
2
+ export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "./withinBounds";
3
+ export * from "./export";
@@ -0,0 +1,3 @@
1
+ export * from "./bbox";
2
+ export { elementsOverlappingBBox, isElementInsideBBox, elementPartiallyOverlapsWithOrContainsBBox, } from "./withinBounds";
3
+ export * from "./export";
@@ -1,5 +1,5 @@
1
1
  import type { ExcalidrawElement, NonDeletedExcalidrawElement } from "../excalidraw/element/types";
2
- import { Bounds } from "../excalidraw/element/bounds";
2
+ import type { Bounds } from "../excalidraw/element/bounds";
3
3
  type Element = NonDeletedExcalidrawElement;
4
4
  type Elements = readonly NonDeletedExcalidrawElement[];
5
5
  export declare const isElementInsideBBox: (element: Element, bbox: Bounds, eitherDirection?: boolean) => boolean;
@@ -1,6 +1,4 @@
1
- import { isArrowElement, isExcalidrawElement, isFreeDrawElement, isLinearElement, isTextElement, } from "../excalidraw/element/typeChecks";
2
- import { isValueInRange, rotatePoint } from "../excalidraw/math";
3
- import { getElementBounds } from "../excalidraw/element/bounds";
1
+ import { isArrowElement, isExcalidrawElement, isFreeDrawElement, isLinearElement, isTextElement, isValueInRange, rotatePoint, getElementBounds, } from "../excalidraw/index";
4
2
  /** @returns vertices relative to element's top-left [0,0] position */
5
3
  const getNonLinearElementRelativePoints = (element) => {
6
4
  if (element.type === "diamond") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@excalidraw/excalidraw",
3
- "version": "0.17.1-7441-4e2c539",
3
+ "version": "0.17.1-7500-ac247a0",
4
4
  "main": "./dist/prod/index.js",
5
5
  "type": "module",
6
6
  "module": "./dist/prod/index.js",