@excalidraw/excalidraw 0.18.0-rc.5 → 0.18.0-rc.7
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/README.md +1 -3
- package/dist/dev/{chunk-UGZAZPWM.js → chunk-GOAAUIXU.js} +13 -13
- package/dist/dev/{chunk-UGZAZPWM.js.map → chunk-GOAAUIXU.js.map} +2 -2
- package/dist/dev/data/{image-NQXTDRIN.js → image-HTHTIQHJ.js} +2 -2
- package/dist/dev/index.js +169 -144
- package/dist/dev/index.js.map +2 -2
- package/dist/prod/{chunk-44FFCT2W.js → chunk-J5HKV5GO.js} +14 -14
- package/dist/prod/data/{image-WYICPQ4X.js → image-FCYNPK35.js} +1 -1
- package/dist/prod/index.js +13 -13
- package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
- package/dist/types/excalidraw/actions/actionBoundText.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionCanvas.d.ts +13 -13
- package/dist/types/excalidraw/actions/actionClipboard.d.ts +13 -13
- 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/actionDistribute.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionExport.d.ts +11 -11
- package/dist/types/excalidraw/actions/actionFinalize.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionFrame.d.ts +7 -7
- package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -4
- package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionMenu.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionNavigate.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionProperties.d.ts +15 -15
- package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionStyles.d.ts +3 -3
- package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -2
- package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
- package/dist/types/excalidraw/actions/actionZindex.d.ts +4 -4
- package/dist/types/excalidraw/actions/types.d.ts +2 -2
- package/dist/types/excalidraw/components/App.d.ts +12 -2
- package/dist/types/excalidraw/element/embeddable.d.ts +1 -1
- package/dist/types/excalidraw/index.d.ts +1 -1
- package/dist/types/excalidraw/store.d.ts +6 -6
- package/dist/types/excalidraw/types.d.ts +2 -2
- package/package.json +1 -10
- /package/dist/dev/data/{image-NQXTDRIN.js.map → image-HTHTIQHJ.js.map} +0 -0
package/README.md
CHANGED
|
@@ -24,14 +24,12 @@ For self-hosting purposes, you'll have to copy the content of the folder `node_m
|
|
|
24
24
|
<script>window.EXCALIDRAW_ASSET_PATH = "/";</script>
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
### Dimensions of Excalidraw
|
|
28
28
|
|
|
29
29
|
Excalidraw takes _100%_ of `width` and `height` of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.
|
|
30
30
|
|
|
31
31
|
## Demo
|
|
32
32
|
|
|
33
|
-
<!-- // TODO_V18: temp -->
|
|
34
|
-
|
|
35
33
|
Go to [CodeSandbox](https://codesandbox.io/p/sandbox/github/excalidraw/excalidraw/tree/mrazator/release-v18/examples/with-script-in-browser) example.
|
|
36
34
|
|
|
37
35
|
## Integration
|
|
@@ -16701,7 +16701,7 @@ var getObservedAppState = (appState) => {
|
|
|
16701
16701
|
return observedAppState;
|
|
16702
16702
|
};
|
|
16703
16703
|
var isObservedAppState = (appState) => !!Reflect.get(appState, hiddenObservedAppStateProp);
|
|
16704
|
-
var
|
|
16704
|
+
var CaptureUpdateAction = {
|
|
16705
16705
|
/**
|
|
16706
16706
|
* Immediately undoable.
|
|
16707
16707
|
*
|
|
@@ -16710,7 +16710,7 @@ var StoreAction = {
|
|
|
16710
16710
|
*
|
|
16711
16711
|
* These updates will _immediately_ make it to the local undo / redo stacks.
|
|
16712
16712
|
*/
|
|
16713
|
-
|
|
16713
|
+
IMMEDIATELY: "IMMEDIATELY",
|
|
16714
16714
|
/**
|
|
16715
16715
|
* Never undoable.
|
|
16716
16716
|
*
|
|
@@ -16719,19 +16719,19 @@ var StoreAction = {
|
|
|
16719
16719
|
*
|
|
16720
16720
|
* These updates will _never_ make it to the local undo / redo stacks.
|
|
16721
16721
|
*/
|
|
16722
|
-
|
|
16722
|
+
NEVER: "NEVER",
|
|
16723
16723
|
/**
|
|
16724
16724
|
* Eventually undoable.
|
|
16725
16725
|
*
|
|
16726
16726
|
* Use for updates which should not be captured immediately - likely
|
|
16727
16727
|
* exceptions which are part of some async multi-step process. Otherwise, all
|
|
16728
16728
|
* such updates would end up being captured with the next
|
|
16729
|
-
* `
|
|
16729
|
+
* `CaptureUpdateAction.IMMEDIATELY` - triggered either by the next `updateScene`
|
|
16730
16730
|
* or internally by the editor.
|
|
16731
16731
|
*
|
|
16732
16732
|
* These updates will _eventually_ make it to the local undo / redo stacks.
|
|
16733
16733
|
*/
|
|
16734
|
-
|
|
16734
|
+
EVENTUALLY: "EVENTUALLY"
|
|
16735
16735
|
};
|
|
16736
16736
|
var StoreIncrementEvent = class {
|
|
16737
16737
|
constructor(elementsChange, appStateChange) {
|
|
@@ -16746,10 +16746,10 @@ var Store = class {
|
|
|
16746
16746
|
__publicField(this, "_snapshot", Snapshot.empty());
|
|
16747
16747
|
// TODO: Suspicious that this is called so many places. Seems error-prone.
|
|
16748
16748
|
__publicField(this, "shouldCaptureIncrement", () => {
|
|
16749
|
-
this.scheduleAction(
|
|
16749
|
+
this.scheduleAction(CaptureUpdateAction.IMMEDIATELY);
|
|
16750
16750
|
});
|
|
16751
16751
|
__publicField(this, "shouldUpdateSnapshot", () => {
|
|
16752
|
-
this.scheduleAction(
|
|
16752
|
+
this.scheduleAction(CaptureUpdateAction.NEVER);
|
|
16753
16753
|
});
|
|
16754
16754
|
__publicField(this, "scheduleAction", (action) => {
|
|
16755
16755
|
this.scheduledActions.add(action);
|
|
@@ -16757,9 +16757,9 @@ var Store = class {
|
|
|
16757
16757
|
});
|
|
16758
16758
|
__publicField(this, "commit", (elements, appState) => {
|
|
16759
16759
|
try {
|
|
16760
|
-
if (this.scheduledActions.has(
|
|
16760
|
+
if (this.scheduledActions.has(CaptureUpdateAction.IMMEDIATELY)) {
|
|
16761
16761
|
this.captureIncrement(elements, appState);
|
|
16762
|
-
} else if (this.scheduledActions.has(
|
|
16762
|
+
} else if (this.scheduledActions.has(CaptureUpdateAction.NEVER)) {
|
|
16763
16763
|
this.updateSnapshot(elements, appState);
|
|
16764
16764
|
}
|
|
16765
16765
|
} finally {
|
|
@@ -17208,7 +17208,7 @@ var actionSetEmbeddableAsActiveTool = register({
|
|
|
17208
17208
|
type: "embeddable"
|
|
17209
17209
|
})
|
|
17210
17210
|
},
|
|
17211
|
-
|
|
17211
|
+
captureUpdate: CaptureUpdateAction.EVENTUALLY
|
|
17212
17212
|
};
|
|
17213
17213
|
}
|
|
17214
17214
|
});
|
|
@@ -24537,7 +24537,7 @@ var parseFileContents = async (blob) => {
|
|
|
24537
24537
|
let contents;
|
|
24538
24538
|
if (blob.type === MIME_TYPES.png) {
|
|
24539
24539
|
try {
|
|
24540
|
-
return await (await import("./data/image-
|
|
24540
|
+
return await (await import("./data/image-HTHTIQHJ.js")).decodePngMetadata(blob);
|
|
24541
24541
|
} catch (error) {
|
|
24542
24542
|
if (error.message === "INVALID") {
|
|
24543
24543
|
throw new ImageSceneDataError(
|
|
@@ -25414,7 +25414,7 @@ export {
|
|
|
25414
25414
|
fixBindingsAfterDeletion,
|
|
25415
25415
|
maxBindingGap,
|
|
25416
25416
|
Emitter,
|
|
25417
|
-
|
|
25417
|
+
CaptureUpdateAction,
|
|
25418
25418
|
Store,
|
|
25419
25419
|
createSrcDoc,
|
|
25420
25420
|
getEmbedLink,
|
|
@@ -25611,4 +25611,4 @@ export {
|
|
|
25611
25611
|
getNormalizedZoom,
|
|
25612
25612
|
getNormalizedGridStep
|
|
25613
25613
|
};
|
|
25614
|
-
//# sourceMappingURL=chunk-
|
|
25614
|
+
//# sourceMappingURL=chunk-GOAAUIXU.js.map
|