@myoc/excalidraw 0.19.532 → 0.19.534
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/CHANGELOG.md +160 -0
- package/dist/dev/{chunk-ITMOGRAW.js → chunk-LMB2JFA3.js} +23 -8
- package/dist/dev/chunk-LMB2JFA3.js.map +7 -0
- package/dist/dev/{chunk-ASAPRLCW.js → chunk-LXITAORX.js} +2 -2
- package/dist/dev/data/{image-S7APFFV6.js → image-42C5IMES.js} +3 -3
- package/dist/dev/index.css +248 -0
- package/dist/dev/index.css.map +3 -3
- package/dist/dev/index.js +1374 -591
- package/dist/dev/index.js.map +4 -4
- package/dist/dev/subset-shared.chunk.js +1 -1
- package/dist/dev/subset-worker.chunk.js +1 -1
- package/dist/prod/chunk-GTKIAGSI.js +4 -0
- package/dist/prod/{chunk-GSRXJLOQ.js → chunk-J5EM63O7.js} +1 -1
- package/dist/prod/data/image-SPSR2YYO.js +1 -0
- package/dist/prod/index.css +1 -1
- package/dist/prod/index.js +19 -19
- package/dist/prod/subset-shared.chunk.js +1 -1
- package/dist/prod/subset-worker.chunk.js +1 -1
- package/dist/types/common/src/constants.d.ts +1 -0
- package/dist/types/element/src/gif.d.ts +29 -0
- package/dist/types/element/src/image.d.ts +6 -1
- package/dist/types/element/src/index.d.ts +2 -0
- package/dist/types/element/src/newElement.d.ts +1 -0
- package/dist/types/element/src/renderGif.d.ts +5 -0
- package/dist/types/element/src/types.d.ts +12 -0
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionDeselect.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +4 -3
- package/dist/types/excalidraw/actions/actionGroup.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +2 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionProperties.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleArrowBinding.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleMidpointSnapping.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
- package/dist/types/excalidraw/components/App.d.ts +8 -1
- package/dist/types/excalidraw/components/App.gif.d.ts +18 -0
- package/dist/types/excalidraw/components/GifPlaybackControls.d.ts +10 -0
- package/dist/types/excalidraw/components/icons.d.ts +4 -0
- package/dist/types/excalidraw/data/blob.d.ts +2 -2
- package/dist/types/excalidraw/data/json.d.ts +1 -1
- package/dist/types/excalidraw/data/restoreGif.d.ts +4 -0
- package/dist/types/excalidraw/index.d.ts +1 -1
- package/dist/types/excalidraw/scene/Renderer.d.ts +1 -0
- package/dist/types/excalidraw/scene/types.d.ts +2 -1
- package/dist/types/excalidraw/types.d.ts +12 -2
- package/dist/types/excalidraw/viewport.d.ts +1 -1
- package/package.json +5 -5
- package/dist/dev/chunk-ITMOGRAW.js.map +0 -7
- package/dist/prod/chunk-U3WBDUKM.js +0 -4
- package/dist/prod/data/image-MWFLMJV7.js +0 -1
- /package/dist/dev/{chunk-ASAPRLCW.js.map → chunk-LXITAORX.js.map} +0 -0
- /package/dist/dev/data/{image-S7APFFV6.js.map → image-42C5IMES.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -5692,6 +5692,61 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5692
5692
|
- Incorrect import for color (was moved to common)
|
|
5693
5693
|
|
|
5694
5694
|
---
|
|
5695
|
+
|
|
5696
|
+
## Excalidraw Library
|
|
5697
|
+
|
|
5698
|
+
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
5699
|
+
|
|
5700
|
+
### Features
|
|
5701
|
+
|
|
5702
|
+
- Add ability to turn off compression for files that are smaller than a given size
|
|
5703
|
+
|
|
5704
|
+
- Add lock tool to the dropdown and also add the status of the extra tools to be the same icon as the selected tool
|
|
5705
|
+
|
|
5706
|
+
- Add view mode button
|
|
5707
|
+
|
|
5708
|
+
- Add multiple image copy paste or drag and drop
|
|
5709
|
+
|
|
5710
|
+
- Multiple image additions from clipboard
|
|
5711
|
+
|
|
5712
|
+
- Add arrange elements action
|
|
5713
|
+
|
|
5714
|
+
- Add top picks to appProps for both stoke color and background color
|
|
5715
|
+
|
|
5716
|
+
### Fixes
|
|
5717
|
+
|
|
5718
|
+
- Issues
|
|
5719
|
+
|
|
5720
|
+
- Make mobile mode more myoc looking
|
|
5721
|
+
|
|
5722
|
+
- Add normalise functionality
|
|
5723
|
+
|
|
5724
|
+
- Update with excalidraw
|
|
5725
|
+
|
|
5726
|
+
- Fix imports
|
|
5727
|
+
|
|
5728
|
+
- Fix mutateGroup to use scene.mutateGroup
|
|
5729
|
+
|
|
5730
|
+
- Imports
|
|
5731
|
+
|
|
5732
|
+
- Ensure that fileId is different for compressed vs uncompressed file
|
|
5733
|
+
|
|
5734
|
+
- Remove not working prop for dontResizeLimitMBs
|
|
5735
|
+
|
|
5736
|
+
- Add smartview for mobile
|
|
5737
|
+
|
|
5738
|
+
- Hide the alignment buttons if there is only one group selected (they do nothing if only one group is selected)
|
|
5739
|
+
|
|
5740
|
+
- Use css vars already provided instead of hard coding directly from oc-gray
|
|
5741
|
+
|
|
5742
|
+
- Remove unused variables
|
|
5743
|
+
|
|
5744
|
+
- Pass the new top pick color props properly
|
|
5745
|
+
|
|
5746
|
+
- Incorrect import for color (was moved to common)
|
|
5747
|
+
|
|
5748
|
+
---
|
|
5749
|
+
|
|
5695
5750
|
## Excalidraw Library
|
|
5696
5751
|
|
|
5697
5752
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5744,7 +5799,60 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5744
5799
|
|
|
5745
5800
|
- Incorrect import for color (was moved to common)
|
|
5746
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
|
---
|
|
5855
|
+
|
|
5748
5856
|
## Excalidraw Library
|
|
5749
5857
|
|
|
5750
5858
|
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
@@ -5797,5 +5905,57 @@ First release of `@excalidraw/excalidraw`## Excalidraw Library
|
|
|
5797
5905
|
|
|
5798
5906
|
- Incorrect import for color (was moved to common)
|
|
5799
5907
|
|
|
5908
|
+
---## Excalidraw Library
|
|
5909
|
+
|
|
5910
|
+
**_This section lists the updates made to the excalidraw library and will not affect the integration._**
|
|
5911
|
+
|
|
5912
|
+
### Features
|
|
5913
|
+
|
|
5914
|
+
- Add ability to turn off compression for files that are smaller than a given size
|
|
5915
|
+
|
|
5916
|
+
- Add lock tool to the dropdown and also add the status of the extra tools to be the same icon as the selected tool
|
|
5917
|
+
|
|
5918
|
+
- Add view mode button
|
|
5919
|
+
|
|
5920
|
+
- Add multiple image copy paste or drag and drop
|
|
5921
|
+
|
|
5922
|
+
- Multiple image additions from clipboard
|
|
5923
|
+
|
|
5924
|
+
- Add arrange elements action
|
|
5925
|
+
|
|
5926
|
+
- Add top picks to appProps for both stoke color and background color
|
|
5927
|
+
|
|
5928
|
+
### Fixes
|
|
5929
|
+
|
|
5930
|
+
- Issues
|
|
5931
|
+
|
|
5932
|
+
- Make mobile mode more myoc looking
|
|
5933
|
+
|
|
5934
|
+
- Add normalise functionality
|
|
5935
|
+
|
|
5936
|
+
- Update with excalidraw
|
|
5937
|
+
|
|
5938
|
+
- Fix imports
|
|
5939
|
+
|
|
5940
|
+
- Fix mutateGroup to use scene.mutateGroup
|
|
5941
|
+
|
|
5942
|
+
- Imports
|
|
5943
|
+
|
|
5944
|
+
- Ensure that fileId is different for compressed vs uncompressed file
|
|
5945
|
+
|
|
5946
|
+
- Remove not working prop for dontResizeLimitMBs
|
|
5947
|
+
|
|
5948
|
+
- Add smartview for mobile
|
|
5949
|
+
|
|
5950
|
+
- Hide the alignment buttons if there is only one group selected (they do nothing if only one group is selected)
|
|
5951
|
+
|
|
5952
|
+
- Use css vars already provided instead of hard coding directly from oc-gray
|
|
5953
|
+
|
|
5954
|
+
- Remove unused variables
|
|
5955
|
+
|
|
5956
|
+
- Pass the new top pick color props properly
|
|
5957
|
+
|
|
5958
|
+
- Incorrect import for color (was moved to common)
|
|
5959
|
+
|
|
5800
5960
|
---
|
|
5801
5961
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
define_import_meta_env_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-LXITAORX.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-
|
|
5431
|
+
return await (await import("./data/image-42C5IMES.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-
|
|
5869
|
+
//# sourceMappingURL=chunk-LMB2JFA3.js.map
|