@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.
Files changed (48) hide show
  1. package/README.md +1 -3
  2. package/dist/dev/{chunk-UGZAZPWM.js → chunk-GOAAUIXU.js} +13 -13
  3. package/dist/dev/{chunk-UGZAZPWM.js.map → chunk-GOAAUIXU.js.map} +2 -2
  4. package/dist/dev/data/{image-NQXTDRIN.js → image-HTHTIQHJ.js} +2 -2
  5. package/dist/dev/index.js +169 -144
  6. package/dist/dev/index.js.map +2 -2
  7. package/dist/prod/{chunk-44FFCT2W.js → chunk-J5HKV5GO.js} +14 -14
  8. package/dist/prod/data/{image-WYICPQ4X.js → image-FCYNPK35.js} +1 -1
  9. package/dist/prod/index.js +13 -13
  10. package/dist/types/excalidraw/actions/actionAddToLibrary.d.ts +3 -3
  11. package/dist/types/excalidraw/actions/actionAlign.d.ts +6 -6
  12. package/dist/types/excalidraw/actions/actionBoundText.d.ts +3 -3
  13. package/dist/types/excalidraw/actions/actionCanvas.d.ts +13 -13
  14. package/dist/types/excalidraw/actions/actionClipboard.d.ts +13 -13
  15. package/dist/types/excalidraw/actions/actionCropEditor.d.ts +1 -1
  16. package/dist/types/excalidraw/actions/actionDeleteSelected.d.ts +3 -3
  17. package/dist/types/excalidraw/actions/actionDistribute.d.ts +2 -2
  18. package/dist/types/excalidraw/actions/actionDuplicateSelection.d.ts +1 -1
  19. package/dist/types/excalidraw/actions/actionElementLink.d.ts +4 -4
  20. package/dist/types/excalidraw/actions/actionElementLock.d.ts +2 -2
  21. package/dist/types/excalidraw/actions/actionExport.d.ts +11 -11
  22. package/dist/types/excalidraw/actions/actionFinalize.d.ts +2 -2
  23. package/dist/types/excalidraw/actions/actionFlip.d.ts +2 -2
  24. package/dist/types/excalidraw/actions/actionFrame.d.ts +7 -7
  25. package/dist/types/excalidraw/actions/actionGroup.d.ts +4 -4
  26. package/dist/types/excalidraw/actions/actionLinearEditor.d.ts +1 -1
  27. package/dist/types/excalidraw/actions/actionLink.d.ts +1 -1
  28. package/dist/types/excalidraw/actions/actionMenu.d.ts +3 -3
  29. package/dist/types/excalidraw/actions/actionNavigate.d.ts +2 -2
  30. package/dist/types/excalidraw/actions/actionProperties.d.ts +15 -15
  31. package/dist/types/excalidraw/actions/actionSelectAll.d.ts +1 -1
  32. package/dist/types/excalidraw/actions/actionStyles.d.ts +3 -3
  33. package/dist/types/excalidraw/actions/actionTextAutoResize.d.ts +1 -1
  34. package/dist/types/excalidraw/actions/actionToggleGridMode.d.ts +1 -1
  35. package/dist/types/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +1 -1
  36. package/dist/types/excalidraw/actions/actionToggleSearchMenu.d.ts +2 -2
  37. package/dist/types/excalidraw/actions/actionToggleStats.d.ts +1 -1
  38. package/dist/types/excalidraw/actions/actionToggleViewMode.d.ts +1 -1
  39. package/dist/types/excalidraw/actions/actionToggleZenMode.d.ts +1 -1
  40. package/dist/types/excalidraw/actions/actionZindex.d.ts +4 -4
  41. package/dist/types/excalidraw/actions/types.d.ts +2 -2
  42. package/dist/types/excalidraw/components/App.d.ts +12 -2
  43. package/dist/types/excalidraw/element/embeddable.d.ts +1 -1
  44. package/dist/types/excalidraw/index.d.ts +1 -1
  45. package/dist/types/excalidraw/store.d.ts +6 -6
  46. package/dist/types/excalidraw/types.d.ts +2 -2
  47. package/package.json +1 -10
  48. /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
- #### Dimensions of Excalidraw
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 StoreAction = {
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
- CAPTURE: "capture",
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
- UPDATE: "update",
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
- * `StoreAction.CAPTURE` - triggered either by the next `updateScene`
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
- NONE: "none"
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(StoreAction.CAPTURE);
16749
+ this.scheduleAction(CaptureUpdateAction.IMMEDIATELY);
16750
16750
  });
16751
16751
  __publicField(this, "shouldUpdateSnapshot", () => {
16752
- this.scheduleAction(StoreAction.UPDATE);
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(StoreAction.CAPTURE)) {
16760
+ if (this.scheduledActions.has(CaptureUpdateAction.IMMEDIATELY)) {
16761
16761
  this.captureIncrement(elements, appState);
16762
- } else if (this.scheduledActions.has(StoreAction.UPDATE)) {
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
- storeAction: StoreAction.NONE
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-NQXTDRIN.js")).decodePngMetadata(blob);
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
- StoreAction,
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-UGZAZPWM.js.map
25614
+ //# sourceMappingURL=chunk-GOAAUIXU.js.map