@zsviczian/excalidraw 0.12.0-obsidian-7 → 0.12.0-obsidian-9

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 (75) hide show
  1. package/README.md +10 -4
  2. package/dist/excalidraw.development.js +369 -488
  3. package/dist/excalidraw.production.min.js +1 -1
  4. package/dist/excalidraw.production.min.js.LICENSE.txt +0 -9
  5. package/package.json +1 -1
  6. package/types/actions/actionCanvas.d.ts +5 -5
  7. package/types/actions/actionClipboard.d.ts +1 -1
  8. package/types/actions/actionDeleteSelected.d.ts +1 -1
  9. package/types/actions/actionExport.d.ts +1 -1
  10. package/types/components/Actions.d.ts +2 -2
  11. package/types/components/BackgroundPickerAndDarkModeToggle.d.ts +1 -6
  12. package/types/components/InitializeApp.d.ts +2 -0
  13. package/types/components/LayerUI.d.ts +1 -2
  14. package/types/components/LoadingMessage.d.ts +2 -0
  15. package/types/components/MobileMenu.d.ts +1 -2
  16. package/types/data/blob.d.ts +1 -1
  17. package/types/element/linearElementEditor.d.ts +18 -7
  18. package/types/math.d.ts +8 -1
  19. package/types/packages/common.webpack.dev.config.d.ts +71 -0
  20. package/types/packages/common.webpack.prod.config.d.ts +83 -0
  21. package/types/packages/excalidraw/dist/excalidraw-assets/locales/ar-SA-json-4ff31c0432fe4c84d726.d.ts +0 -0
  22. package/types/packages/excalidraw/dist/excalidraw-assets/locales/bg-BG-json-1c6eb789a5c90a61edf8.d.ts +0 -0
  23. package/types/packages/excalidraw/dist/excalidraw-assets/locales/bn-BD-json-906099d3f665de611389.d.ts +0 -0
  24. package/types/packages/excalidraw/dist/excalidraw-assets/locales/ca-ES-json-7f3f0a2c7f428fa60e01.d.ts +0 -0
  25. package/types/packages/excalidraw/dist/excalidraw-assets/locales/cs-CZ-json-304d08cac870aa0684ec.d.ts +0 -0
  26. package/types/packages/excalidraw/dist/excalidraw-assets/locales/da-DK-json-80c7153473e1427a9a3b.d.ts +0 -0
  27. package/types/packages/excalidraw/dist/excalidraw-assets/locales/de-DE-json-9b88838b2648d7d61f1b.d.ts +0 -0
  28. package/types/packages/excalidraw/dist/excalidraw-assets/locales/el-GR-json-18ce48894d32ca4895b8.d.ts +0 -0
  29. package/types/packages/excalidraw/dist/excalidraw-assets/locales/es-ES-json-69a6c81b0e5dc370ea1a.d.ts +0 -0
  30. package/types/packages/excalidraw/dist/excalidraw-assets/locales/eu-ES-json-a61838a778c9eacb61ec.d.ts +0 -0
  31. package/types/packages/excalidraw/dist/excalidraw-assets/locales/fa-IR-json-2d0cb1044744ed8e4139.d.ts +0 -0
  32. package/types/packages/excalidraw/dist/excalidraw-assets/locales/fi-FI-json-32bcb6481756ef8af590.d.ts +0 -0
  33. package/types/packages/excalidraw/dist/excalidraw-assets/locales/fr-FR-json-935424b03b86c1d82dcd.d.ts +0 -0
  34. package/types/packages/excalidraw/dist/excalidraw-assets/locales/gl-ES-json-5b417484d91976bce190.d.ts +0 -0
  35. package/types/packages/excalidraw/dist/excalidraw-assets/locales/he-IL-json-3f5bfefb1ad0baf19b6c.d.ts +0 -0
  36. package/types/packages/excalidraw/dist/excalidraw-assets/locales/hi-IN-json-71a38dbb2202baec2bad.d.ts +0 -0
  37. package/types/packages/excalidraw/dist/excalidraw-assets/locales/hu-HU-json-e1275f2b1e6ae6ef4427.d.ts +0 -0
  38. package/types/packages/excalidraw/dist/excalidraw-assets/locales/id-ID-json-da38cd847aaf195c3c20.d.ts +0 -0
  39. package/types/packages/excalidraw/dist/excalidraw-assets/locales/it-IT-json-10923c290e23bd31a5b4.d.ts +0 -0
  40. package/types/packages/excalidraw/dist/excalidraw-assets/locales/ja-JP-json-4c357f8206b88dc44840.d.ts +0 -0
  41. package/types/packages/excalidraw/dist/excalidraw-assets/locales/kab-KAB-json-8303afee283a95237f2b.d.ts +0 -0
  42. package/types/packages/excalidraw/dist/excalidraw-assets/locales/kk-KZ-json-ccf0876179807d1d685a.d.ts +0 -0
  43. package/types/packages/excalidraw/dist/excalidraw-assets/locales/ko-KR-json-8e7ae1bb19a7677a8190.d.ts +0 -0
  44. package/types/packages/excalidraw/dist/excalidraw-assets/locales/lt-LT-json-4147c3543dce75362050.d.ts +0 -0
  45. package/types/packages/excalidraw/dist/excalidraw-assets/locales/lv-LV-json-cc5e03ed2a09f8f8b60b.d.ts +0 -0
  46. package/types/packages/excalidraw/dist/excalidraw-assets/locales/mr-IN-json-cb316f30d7b40d3e6766.d.ts +0 -0
  47. package/types/packages/excalidraw/dist/excalidraw-assets/locales/my-MM-json-5dcc8e9cb97a4aa1d8bc.d.ts +0 -0
  48. package/types/packages/excalidraw/dist/excalidraw-assets/locales/nb-NO-json-61192c4af6e2231d38ae.d.ts +0 -0
  49. package/types/packages/excalidraw/dist/excalidraw-assets/locales/nl-NL-json-861ac93c048b5296b791.d.ts +0 -0
  50. package/types/packages/excalidraw/dist/excalidraw-assets/locales/nn-NO-json-808362c0cd4eccb6a885.d.ts +0 -0
  51. package/types/packages/excalidraw/dist/excalidraw-assets/locales/oc-FR-json-d5706569ab4023f94c66.d.ts +0 -0
  52. package/types/packages/excalidraw/dist/excalidraw-assets/locales/pa-IN-json-eb38ce8bfc1b974c1455.d.ts +0 -0
  53. package/types/packages/excalidraw/dist/excalidraw-assets/locales/pl-PL-json-55d8dd8a44917364ef63.d.ts +0 -0
  54. package/types/packages/excalidraw/dist/excalidraw-assets/locales/pt-BR-json-4ffa2f70c2863bca4f91.d.ts +0 -0
  55. package/types/packages/excalidraw/dist/excalidraw-assets/locales/pt-PT-json-4368eca89d2b2b3fb444.d.ts +0 -0
  56. package/types/packages/excalidraw/dist/excalidraw-assets/locales/ro-RO-json-232ea1e0c18745ec6ed9.d.ts +0 -0
  57. package/types/packages/excalidraw/dist/excalidraw-assets/locales/ru-RU-json-ce5fedd8812aa76a0b41.d.ts +0 -0
  58. package/types/packages/excalidraw/dist/excalidraw-assets/locales/si-LK-json-f48a64dfd1cb9c075d2e.d.ts +0 -0
  59. package/types/packages/excalidraw/dist/excalidraw-assets/locales/sk-SK-json-537132ec043d4db7f328.d.ts +0 -0
  60. package/types/packages/excalidraw/dist/excalidraw-assets/locales/sl-SI-json-b69c9fd9b85dac1310c6.d.ts +0 -0
  61. package/types/packages/excalidraw/dist/excalidraw-assets/locales/sv-SE-json-9a8520b202b7181625cf.d.ts +0 -0
  62. package/types/packages/excalidraw/dist/excalidraw-assets/locales/ta-IN-json-15175d03785f7a482568.d.ts +0 -0
  63. package/types/packages/excalidraw/dist/excalidraw-assets/locales/tr-TR-json-c53ae37e848043dd0b89.d.ts +0 -0
  64. package/types/packages/excalidraw/dist/excalidraw-assets/locales/uk-UA-json-15fda426e55236408ef9.d.ts +0 -0
  65. package/types/packages/excalidraw/dist/excalidraw-assets/locales/vi-VN-json-929afcbc15b2c06a64f2.d.ts +0 -0
  66. package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-CN-json-a670f2b6ddaac05b44fb.d.ts +0 -0
  67. package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-HK-json-9e8b36ecb4c8399449b1.d.ts +0 -0
  68. package/types/packages/excalidraw/dist/excalidraw-assets/locales/zh-TW-json-441a30840e0721d7f2e2.d.ts +0 -0
  69. package/types/packages/excalidraw/dist/excalidraw-assets/vendor-e516a81320b8c48e3114.d.ts +0 -0
  70. package/types/packages/excalidraw/dist/excalidraw.development.d.ts +4 -2
  71. package/types/packages/excalidraw/webpack.dev.config.d.ts +61 -82
  72. package/types/packages/excalidraw/webpack.prod.config.d.ts +70 -85
  73. package/types/packages/utils.d.ts +4 -1
  74. package/types/random.d.ts +1 -0
  75. package/types/types.d.ts +1 -1
package/README.md CHANGED
@@ -638,7 +638,9 @@ If supplied, this URL will be used when user tries to install a library from [li
638
638
 
639
639
  #### `theme`
640
640
 
641
- This prop controls Excalidraw's theme. When supplied, the value takes precedence over `intialData.appState.theme`, the theme will be fully controlled by the host app, and users won't be able to toggle it from within the app. You can use [`THEME`](#THEME-1) to specify the theme.
641
+ This prop controls Excalidraw's theme. When supplied, the value takes precedence over `intialData.appState.theme`, the theme will be fully controlled by the host app, and users won't be able to toggle it from within the app unless `UIOptions.canvasActions.toggleTheme` is set to `true`, in which case the `theme` prop will control Excalidraw's default theme with ability to allow theme switching (you must take care of updating the `theme` prop when you detect a change to `appState.theme` from the [onChange](#onChange) callback).
642
+
643
+ You can use [`THEME`](#THEME-1) to specify the theme.
642
644
 
643
645
  #### `name`
644
646
 
@@ -661,7 +663,7 @@ This prop can be used to customise UI of Excalidraw. Currently we support custom
661
663
  | `export` | false &#124; [exportOpts](#exportOpts) | <pre>{ saveFileToDisk: true }</pre> | This prop allows to customize the UI inside the export dialog. By default it shows the "saveFileToDisk". If this prop is `false` the export button will not be rendered. For more details visit [`exportOpts`](#exportOpts). |
662
664
  | `loadScene` | boolean | true | Implies whether to show `Load button` |
663
665
  | `saveToActiveFile` | boolean | true | Implies whether to show `Save button` to save to current file |
664
- | `theme` | boolean | true | Implies whether to show `Theme toggle` |
666
+ | `toggleTheme` | boolean &#124; null | null | Implies whether to show `Theme toggle`. When defined as `boolean`, takes precedence over [`props.theme`](#theme) to show `Theme toggle` |
665
667
  | `saveAsImage` | boolean | true | Implies whether to show `Save as image button` |
666
668
 
667
669
  ##### `dockedSidebarBreakpoint`
@@ -930,7 +932,8 @@ This function normalizes library items elements, adding missing values when need
930
932
  elements,
931
933
  appState
932
934
  getDimensions,
933
- files
935
+ files,
936
+ exportPadding?: number;
934
937
  }: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/packages/utils.ts#L12">ExportOpts</a>
935
938
  </pre>
936
939
 
@@ -941,6 +944,7 @@ This function normalizes library items elements, adding missing values when need
941
944
  | getDimensions | `(width: number, height: number) => { width: number, height: number, scale?: number }` | undefined | A function which returns the `width`, `height`, and optionally `scale` (defaults `1`), with which canvas is to be exported. |
942
945
  | maxWidthOrHeight | `number` | undefined | The maximum width or height of the exported image. If provided, `getDimensions` is ignored. |
943
946
  | files | [BinaryFiles](The [`BinaryFiles`](<[BinaryFiles](https://github.com/excalidraw/excalidraw/blob/master/src/types.ts#L64)>) | undefined | The files added to the scene. |
947
+ | exportPadding | number | 10 | The padding to be added on canvas |
944
948
 
945
949
  **How to use**
946
950
 
@@ -958,7 +962,8 @@ This function returns the canvas with the exported elements, appState and dimens
958
962
  exportToBlob(
959
963
  opts: <a href="https://github.com/excalidraw/excalidraw/blob/master/src/packages/utils.ts#L14">ExportOpts</a> & {
960
964
  mimeType?: string,
961
- quality?: number;
965
+ quality?: number,
966
+ exportPadding?: number;
962
967
  })
963
968
  </pre>
964
969
 
@@ -967,6 +972,7 @@ exportToBlob(
967
972
  | opts | | | This param is passed to `exportToCanvas`. You can refer to [`exportToCanvas`](#exportToCanvas) |
968
973
  | mimeType | string | "image/png" | Indicates the image format |
969
974
  | quality | number | 0.92 | A value between 0 and 1 indicating the [image quality](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob#parameters). Applies only to `image/jpeg`/`image/webp` MIME types. |
975
+ | exportPadding | number | 10 | The padding to be added on canvas |
970
976
 
971
977
  **How to use**
972
978