@myoc/excalidraw 0.19.532 → 0.19.533

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 (65) hide show
  1. package/CHANGELOG.md +107 -0
  2. package/dist/dev/{chunk-ASAPRLCW.js → chunk-5CVRJMG3.js} +2 -2
  3. package/dist/dev/{chunk-ITMOGRAW.js → chunk-AR7I2OPB.js} +23 -8
  4. package/dist/dev/chunk-AR7I2OPB.js.map +7 -0
  5. package/dist/dev/data/{image-S7APFFV6.js → image-XXT3R6SF.js} +3 -3
  6. package/dist/dev/index.css +239 -0
  7. package/dist/dev/index.css.map +3 -3
  8. package/dist/dev/index.js +1294 -591
  9. package/dist/dev/index.js.map +4 -4
  10. package/dist/dev/subset-shared.chunk.js +1 -1
  11. package/dist/dev/subset-worker.chunk.js +1 -1
  12. package/dist/prod/{chunk-GSRXJLOQ.js → chunk-6D6KWUBN.js} +1 -1
  13. package/dist/prod/chunk-AS35EYHE.js +4 -0
  14. package/dist/prod/data/image-6PNCNKLO.js +1 -0
  15. package/dist/prod/index.css +1 -1
  16. package/dist/prod/index.js +13 -13
  17. package/dist/prod/subset-shared.chunk.js +1 -1
  18. package/dist/prod/subset-worker.chunk.js +1 -1
  19. package/dist/types/common/src/constants.d.ts +1 -0
  20. package/dist/types/element/src/gif.d.ts +29 -0
  21. package/dist/types/element/src/image.d.ts +6 -1
  22. package/dist/types/element/src/index.d.ts +2 -0
  23. package/dist/types/element/src/newElement.d.ts +1 -0
  24. package/dist/types/element/src/renderGif.d.ts +5 -0
  25. package/dist/types/element/src/types.d.ts +12 -0
  26. package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -2
  27. package/dist/types/excalidraw/actions/actionCanvas.d.ts +6 -6
  28. package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -2
  29. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
  30. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
  31. package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -1
  32. package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -1
  33. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
  34. package/dist/types/excalidraw/actions/actionExport.d.ts +2 -2
  35. package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -3
  36. package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -2
  37. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +2 -1
  38. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
  39. package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -2
  40. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  41. package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -1
  42. package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -1
  43. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
  44. package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -1
  45. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
  46. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -1
  47. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
  48. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
  49. package/dist/types/excalidraw/components/App.d.ts +8 -1
  50. package/dist/types/excalidraw/components/App.gif.d.ts +18 -0
  51. package/dist/types/excalidraw/components/GifPlaybackControls.d.ts +10 -0
  52. package/dist/types/excalidraw/components/icons.d.ts +4 -0
  53. package/dist/types/excalidraw/data/blob.d.ts +2 -2
  54. package/dist/types/excalidraw/data/json.d.ts +1 -1
  55. package/dist/types/excalidraw/data/restoreGif.d.ts +4 -0
  56. package/dist/types/excalidraw/scene/Renderer.d.ts +1 -0
  57. package/dist/types/excalidraw/scene/types.d.ts +2 -1
  58. package/dist/types/excalidraw/types.d.ts +12 -2
  59. package/dist/types/excalidraw/viewport.d.ts +1 -1
  60. package/package.json +5 -5
  61. package/dist/dev/chunk-ITMOGRAW.js.map +0 -7
  62. package/dist/prod/chunk-U3WBDUKM.js +0 -4
  63. package/dist/prod/data/image-MWFLMJV7.js +0 -1
  64. /package/dist/dev/{chunk-ASAPRLCW.js.map → chunk-5CVRJMG3.js.map} +0 -0
  65. /package/dist/dev/data/{image-S7APFFV6.js.map → image-XXT3R6SF.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -5692,6 +5692,7 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
5692
5692
  - Incorrect import for color (was moved to common)
5693
5693
 
5694
5694
  ---
5695
+
5695
5696
  ## Excalidraw Library
5696
5697
 
5697
5698
  **_This section lists the updates made to the excalidraw library and will not affect the integration._**
@@ -5744,6 +5745,112 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
5744
5745
 
5745
5746
  - Incorrect import for color (was moved to common)
5746
5747
 
5748
+ ---
5749
+
5750
+ ## Excalidraw Library
5751
+
5752
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
5753
+
5754
+ ### Features
5755
+
5756
+ - Add ability to turn off compression for files that are smaller than a given size
5757
+
5758
+ - Add lock tool to the dropdown and also add the status of the extra tools to be the same icon as the selected tool
5759
+
5760
+ - Add view mode button
5761
+
5762
+ - Add multiple image copy paste or drag and drop
5763
+
5764
+ - Multiple image additions from clipboard
5765
+
5766
+ - Add arrange elements action
5767
+
5768
+ - Add top picks to appProps for both stoke color and background color
5769
+
5770
+ ### Fixes
5771
+
5772
+ - Issues
5773
+
5774
+ - Make mobile mode more myoc looking
5775
+
5776
+ - Add normalise functionality
5777
+
5778
+ - Update with excalidraw
5779
+
5780
+ - Fix imports
5781
+
5782
+ - Fix mutateGroup to use scene.mutateGroup
5783
+
5784
+ - Imports
5785
+
5786
+ - Ensure that fileId is different for compressed vs uncompressed file
5787
+
5788
+ - Remove not working prop for dontResizeLimitMBs
5789
+
5790
+ - Add smartview for mobile
5791
+
5792
+ - Hide the alignment buttons if there is only one group selected (they do nothing if only one group is selected)
5793
+
5794
+ - Use css vars already provided instead of hard coding directly from oc-gray
5795
+
5796
+ - Remove unused variables
5797
+
5798
+ - Pass the new top pick color props properly
5799
+
5800
+ - Incorrect import for color (was moved to common)
5801
+
5802
+ ---## Excalidraw Library
5803
+
5804
+ **_This section lists the updates made to the excalidraw library and will not affect the integration._**
5805
+
5806
+ ### Features
5807
+
5808
+ - Add ability to turn off compression for files that are smaller than a given size
5809
+
5810
+ - Add lock tool to the dropdown and also add the status of the extra tools to be the same icon as the selected tool
5811
+
5812
+ - Add view mode button
5813
+
5814
+ - Add multiple image copy paste or drag and drop
5815
+
5816
+ - Multiple image additions from clipboard
5817
+
5818
+ - Add arrange elements action
5819
+
5820
+ - Add top picks to appProps for both stoke color and background color
5821
+
5822
+ ### Fixes
5823
+
5824
+ - Issues
5825
+
5826
+ - Make mobile mode more myoc looking
5827
+
5828
+ - Add normalise functionality
5829
+
5830
+ - Update with excalidraw
5831
+
5832
+ - Fix imports
5833
+
5834
+ - Fix mutateGroup to use scene.mutateGroup
5835
+
5836
+ - Imports
5837
+
5838
+ - Ensure that fileId is different for compressed vs uncompressed file
5839
+
5840
+ - Remove not working prop for dontResizeLimitMBs
5841
+
5842
+ - Add smartview for mobile
5843
+
5844
+ - Hide the alignment buttons if there is only one group selected (they do nothing if only one group is selected)
5845
+
5846
+ - Use css vars already provided instead of hard coding directly from oc-gray
5847
+
5848
+ - Remove unused variables
5849
+
5850
+ - Pass the new top pick color props properly
5851
+
5852
+ - Incorrect import for color (was moved to common)
5853
+
5747
5854
  ---
5748
5855
  ## Excalidraw Library
5749
5856
 
@@ -1,7 +1,7 @@
1
1
  // <define:import.meta.env>
2
- var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3016", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3001", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@myoc/excalidraw", PKG_VERSION: "0.19.531", DEV: true };
2
+ var define_import_meta_env_default = { MODE: "development", VITE_APP_BACKEND_V2_GET_URL: "https://json-dev.excalidraw.com/api/v2/", VITE_APP_BACKEND_V2_POST_URL: "https://json-dev.excalidraw.com/api/v2/post/", VITE_APP_LIBRARY_URL: "https://libraries.excalidraw.com", VITE_APP_LIBRARY_BACKEND: "https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries", VITE_APP_WS_SERVER_URL: "http://localhost:3002", VITE_APP_PLUS_LP: "https://plus.excalidraw.com", VITE_APP_PLUS_APP: "http://localhost:3000", VITE_APP_AI_BACKEND: "http://localhost:3016", VITE_APP_FIREBASE_CONFIG: '{"apiKey":"AIzaSyCMkxA60XIW8KbqMYL7edC4qT5l4qHX2h8","authDomain":"excalidraw-oss-dev.firebaseapp.com","projectId":"excalidraw-oss-dev","storageBucket":"excalidraw-oss-dev.appspot.com","messagingSenderId":"664559512677","appId":"1:664559512677:web:a385181f2928d328a7aa8c"}', VITE_APP_DEV_DISABLE_LIVE_RELOAD: "", VITE_APP_ENABLE_TRACKING: "true", FAST_REFRESH: "false", VITE_APP_PORT: "3001", VITE_APP_DEBUG_ENABLE_TEXT_CONTAINER_BOUNDING_BOX: "", VITE_APP_COLLAPSE_OVERLAY: "true", VITE_APP_ENABLE_ESLINT: "true", VITE_APP_ENABLE_PWA: "false", VITE_APP_PLUS_EXPORT_PUBLIC_KEY: "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm2g5T+Rub6Kbf1Mf57t0\n7r2zeHuVg4dla3r5ryXMswtzz6x767octl6oLThn33mQsPSy3GKglFZoCTXJR4ij\nba8SxB04sL/N8eRrKja7TFWjCVtRwTTfyy771NYYNFVJclkxHyE5qw4m27crHF1y\nUNWEjuqNMi/lwAErS9fFa2oJlWyT8U7zzv/5kQREkxZI6y9v0AF3qcbsy2731FnD\ns9ChJvOUW9toIab2gsIdrKW8ZNpu084ZFVKb6LNjvIXI1Se4oMTHeszXzNptzlot\nkdxxjOoaQMAyfljFSot1F1FlU6MQlag7UnFGvFjRHN1JI5q4K+n3a67DX+TMyRqS\nHQIDAQAB", VITE_APP_DISABLE_PREVENT_UNLOAD: "", PKG_NAME: "@myoc/excalidraw", PKG_VERSION: "0.19.532", DEV: true };
3
3
 
4
4
  export {
5
5
  define_import_meta_env_default
6
6
  };
7
- //# sourceMappingURL=chunk-ASAPRLCW.js.map
7
+ //# sourceMappingURL=chunk-5CVRJMG3.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  define_import_meta_env_default
3
- } from "./chunk-ASAPRLCW.js";
3
+ } from "./chunk-5CVRJMG3.js";
4
4
  import {
5
5
  __publicField
6
6
  } from "./chunk-XDFCUUT6.js";
@@ -4722,6 +4722,20 @@ import {
4722
4722
  import { refreshTextDimensions } from "@excalidraw/element";
4723
4723
  import { getNormalizedDimensions } from "@excalidraw/element";
4724
4724
  import { isInvisiblySmallElement } from "@excalidraw/element";
4725
+
4726
+ // data/restoreGif.ts
4727
+ var restoreGifPlayback = (gifPlayback) => {
4728
+ if (gifPlayback && typeof gifPlayback.frameIndex === "number" && typeof gifPlayback.speed === "number" && typeof gifPlayback.playing === "boolean") {
4729
+ return {
4730
+ frameIndex: Math.max(0, Math.floor(gifPlayback.frameIndex)),
4731
+ speed: gifPlayback.speed > 0 ? gifPlayback.speed : 1,
4732
+ playing: gifPlayback.playing
4733
+ };
4734
+ }
4735
+ return null;
4736
+ };
4737
+
4738
+ // data/restore.ts
4725
4739
  var MAX_LINEAR_PX = 75e3;
4726
4740
  var handleOversizedLinearElements = (element) => {
4727
4741
  if (element.width <= MAX_LINEAR_PX && element.height <= MAX_LINEAR_PX) {
@@ -5006,7 +5020,8 @@ var restoreElement = (element, targetElementsMap, existingElementsMap, opts) =>
5006
5020
  fileName: element.fileName ?? null,
5007
5021
  thumbHash: typeof element.thumbHash === "string" ? element.thumbHash : null,
5008
5022
  scale: element.scale || [1, 1],
5009
- crop: element.crop ?? null
5023
+ crop: element.crop ?? null,
5024
+ gifPlayback: restoreGifPlayback(element.gifPlayback)
5010
5025
  });
5011
5026
  case "line":
5012
5027
  case "draw":
@@ -5413,7 +5428,7 @@ var parseFileContents = async (blob) => {
5413
5428
  let contents;
5414
5429
  if (blob.type === MIME_TYPES6.png) {
5415
5430
  try {
5416
- return await (await import("./data/image-S7APFFV6.js")).decodePngMetadata(blob);
5431
+ return await (await import("./data/image-XXT3R6SF.js")).decodePngMetadata(blob);
5417
5432
  } catch (error) {
5418
5433
  if (error.message === "INVALID") {
5419
5434
  throw new ImageSceneDataError(
@@ -5461,14 +5476,14 @@ var getFileHandleType = (handle) => {
5461
5476
  if (!handle) {
5462
5477
  return null;
5463
5478
  }
5464
- return handle.name.match(/\.(json|excalidraw|png|svg)$/)?.[1] || null;
5479
+ return handle.name.match(/\.(json|excalidraw|png|svg|gif)$/)?.[1] || null;
5465
5480
  };
5466
5481
  var isImageFileHandleType = (type) => {
5467
- return type === "png" || type === "svg";
5482
+ return type === "png" || type === "svg" || type === "gif";
5468
5483
  };
5469
5484
  var isImageFileHandle = (handle) => {
5470
5485
  const type = getFileHandleType(handle);
5471
- return type === "png" || type === "svg";
5486
+ return type === "png" || type === "svg" || type === "gif";
5472
5487
  };
5473
5488
  var isSupportedImageFileType = (type) => {
5474
5489
  return !!type && Object.values(IMAGE_MIME_TYPES).includes(type);
@@ -5603,7 +5618,7 @@ var getImageFileDimensions = async (file) => {
5603
5618
  });
5604
5619
  };
5605
5620
  var resizeImageFile = async (file, opts) => {
5606
- if (file.type === MIME_TYPES6.svg) {
5621
+ if (file.type === MIME_TYPES6.svg || file.type === MIME_TYPES6.gif) {
5607
5622
  return file;
5608
5623
  }
5609
5624
  if (!isSupportedImageFile(file)) {
@@ -5851,4 +5866,4 @@ export {
5851
5866
  createFile,
5852
5867
  normalizeFile
5853
5868
  };
5854
- //# sourceMappingURL=chunk-ITMOGRAW.js.map
5869
+ //# sourceMappingURL=chunk-AR7I2OPB.js.map