@dwelle/excalidraw 0.4.0-78b30cc → 0.4.0-83a4d67
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 +22 -1
- package/README.md +4 -0
- package/dist/excalidraw.development.js +994 -159
- package/dist/excalidraw.production.min.js +1 -1
- package/package.json +2 -2
- package/types/actions/actionAddToLibrary.d.ts +63 -21
- package/types/actions/actionAlign.d.ts +25 -19
- package/types/actions/actionBoundText.d.ts +46 -17
- package/types/actions/actionCanvas.d.ts +345 -72
- package/types/actions/actionClipboard.d.ts +101 -34
- package/types/actions/actionDeleteSelected.d.ts +57 -18
- package/types/actions/actionDistribute.d.ts +7 -7
- package/types/actions/actionElementLock.d.ts +272 -0
- package/types/actions/actionExport.d.ts +227 -101
- package/types/actions/actionFinalize.d.ts +39 -14
- package/types/actions/actionFlip.d.ts +4 -6
- package/types/actions/actionFrame.d.ts +424 -0
- package/types/actions/actionGroup.d.ts +5 -5
- package/types/actions/actionHistory.d.ts +1 -1
- package/types/actions/actionLinearEditor.d.ts +23 -9
- package/types/actions/actionMenu.d.ts +64 -23
- package/types/actions/actionNavigate.d.ts +1 -1
- package/types/actions/actionProperties.d.ts +275 -93
- package/types/actions/actionStyles.d.ts +21 -7
- package/types/actions/actionToggleGridMode.d.ts +21 -7
- package/types/actions/actionToggleStats.d.ts +21 -7
- package/types/actions/actionToggleViewMode.d.ts +21 -7
- package/types/actions/actionToggleZenMode.d.ts +21 -7
- package/types/actions/actionZindex.d.ts +4 -4
- package/types/actions/index.d.ts +1 -1
- package/types/actions/manager.d.ts +1 -1
- package/types/actions/shortcuts.d.ts +1 -1
- package/types/actions/types.d.ts +10 -9
- package/types/appState.d.ts +6 -6
- package/types/charts.d.ts +2 -2
- package/types/clients.d.ts +5 -6
- package/types/colors.d.ts +60 -5
- package/types/components/ActiveConfirmDialog.d.ts +1 -21
- package/types/components/App.d.ts +43 -7
- package/types/components/Avatar.d.ts +1 -2
- package/types/components/ColorPicker/ColorInput.d.ts +7 -0
- package/types/components/ColorPicker/ColorPicker.d.ts +19 -0
- package/types/components/ColorPicker/CustomColorList.d.ts +8 -0
- package/types/components/ColorPicker/HotkeyLabel.d.ts +8 -0
- package/types/components/ColorPicker/Picker.d.ts +18 -0
- package/types/components/ColorPicker/PickerColorList.d.ts +10 -0
- package/types/components/ColorPicker/PickerHeading.d.ts +5 -0
- package/types/components/ColorPicker/ShadeList.d.ts +8 -0
- package/types/components/ColorPicker/TopPicks.d.ts +9 -0
- package/types/components/ColorPicker/colorPickerUtils.d.ts +21 -0
- package/types/components/ColorPicker/keyboardNavHandlers.d.ts +21 -0
- package/types/components/ContextMenu.d.ts +3 -3
- package/types/components/Dialog.d.ts +3 -4
- package/types/components/EyeDropper.d.ts +18 -0
- package/types/components/FilledButton.d.ts +17 -0
- package/types/components/FixedSideContainer.d.ts +1 -1
- package/types/components/HandButton.d.ts +1 -1
- package/types/components/HelpButton.d.ts +1 -1
- package/types/components/HintViewer.d.ts +3 -4
- package/types/components/ImageExportDialog.d.ts +7 -12
- package/types/components/Island.d.ts +1 -1
- package/types/components/JSONExportDialog.d.ts +1 -1
- package/types/components/LayerUI.d.ts +4 -2
- package/types/components/LibraryMenu.d.ts +3 -23
- package/types/components/LibraryMenuControlButtons.d.ts +4 -4
- package/types/components/LibraryMenuHeaderContent.d.ts +3 -1
- package/types/components/LibraryMenuItems.d.ts +4 -5
- package/types/components/LibraryMenuSection.d.ts +22 -0
- package/types/components/LibraryUnit.d.ts +7 -3
- package/types/components/LockButton.d.ts +1 -1
- package/types/components/MobileMenu.d.ts +4 -3
- package/types/components/OverwriteConfirm/OverwriteConfirm.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +17 -0
- package/types/components/OverwriteConfirm/OverwriteConfirmState.d.ts +22 -0
- package/types/components/PenModeButton.d.ts +1 -1
- package/types/components/Popover.d.ts +1 -1
- package/types/components/ProjectName.d.ts +2 -1
- package/types/components/RadioGroup.d.ts +12 -0
- package/types/components/Sidebar/Sidebar.d.ts +1 -21
- package/types/components/Sidebar/common.d.ts +3 -3
- package/types/components/Spinner.d.ts +2 -1
- package/types/components/Stack.d.ts +4 -3
- package/types/components/Switch.d.ts +9 -0
- package/types/components/ToolButton.d.ts +5 -4
- package/types/components/Tooltip.d.ts +1 -1
- package/types/components/dropdownMenu/DropdownMenu.d.ts +3 -2
- package/types/components/dropdownMenu/DropdownMenuTrigger.d.ts +4 -2
- package/types/components/icons.d.ts +12 -1
- package/types/components/main-menu/MainMenu.d.ts +3 -2
- package/types/constants.d.ts +31 -3
- package/types/context/tunnels.d.ts +3 -2
- package/types/data/encode.d.ts +1 -1
- package/types/data/filesystem.d.ts +1 -1
- package/types/data/library.d.ts +3 -45
- package/types/data/restore.d.ts +2 -2
- package/types/data/types.d.ts +1 -1
- package/types/data/url.d.ts +7 -0
- package/types/element/Hyperlink.d.ts +31 -13
- package/types/element/binding.d.ts +3 -3
- package/types/element/bounds.d.ts +31 -6
- package/types/element/collision.d.ts +7 -7
- package/types/element/dragElements.d.ts +2 -1
- package/types/element/embeddable.d.ts +154 -0
- package/types/element/index.d.ts +3 -2
- package/types/element/linearElementEditor.d.ts +23 -9
- package/types/element/mutateElement.d.ts +1 -1
- package/types/element/newElement.d.ts +7 -2
- package/types/element/resizeElements.d.ts +1 -0
- package/types/element/transformHandles.d.ts +13 -6
- package/types/element/typeChecks.d.ts +3 -1
- package/types/element/types.d.ts +51 -35
- package/types/emitter.d.ts +1 -1
- package/types/errors.d.ts +1 -1
- package/types/frame.d.ts +40 -0
- package/types/ga.d.ts +5 -5
- package/types/groups.d.ts +7 -3
- package/types/history.d.ts +3 -3
- package/types/hooks/useCreatePortalContainer.d.ts +4 -0
- package/types/hooks/useLibraryItemSvg.d.ts +11 -0
- package/types/hooks/useOutsideClick.d.ts +19 -1
- package/types/hooks/useScrollPosition.d.ts +2 -0
- package/types/hooks/useTransition.d.ts +2 -0
- package/types/i18n.d.ts +2 -2
- package/types/jotai.d.ts +16 -104
- package/types/keys.d.ts +4 -1
- package/types/math.d.ts +1 -0
- package/types/packages/excalidraw/example/initialData.d.ts +6 -0
- package/types/packages/excalidraw/index.d.ts +3 -2
- package/types/packages/utils.d.ts +2 -2
- package/types/renderer/renderElement.d.ts +5 -4
- package/types/renderer/renderScene.d.ts +12 -3
- package/types/renderer/roundRect.d.ts +1 -1
- package/types/scene/Scene.d.ts +25 -5
- package/types/scene/export.d.ts +12 -35
- package/types/scene/selection.d.ts +24 -4
- package/types/scene/types.d.ts +4 -4
- package/types/types.d.ts +81 -42
- package/types/utility-types.d.ts +15 -13
- package/types/utils.d.ts +51 -19
- package/types/zindex.d.ts +4 -4
- package/types/actions/actionToggleLock.d.ts +0 -122
- package/types/components/ColorPicker.d.ts +0 -14
package/CHANGELOG.md
CHANGED
|
@@ -13,8 +13,29 @@ Please add the latest change on the top under the correct section.
|
|
|
13
13
|
|
|
14
14
|
## Unreleased
|
|
15
15
|
|
|
16
|
+
### renderEmbeddable
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
(element: NonDeletedExcalidrawElement, radius: number, appState: UIAppState) => JSX.Element | null;`
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The renderEmbeddable function allows you to customize the rendering of a JSX component instead of using the default `<iframe>`. By setting props.renderEmbeddable, you can provide a custom implementation for rendering the element.
|
|
23
|
+
|
|
24
|
+
#### Parameters:
|
|
25
|
+
|
|
26
|
+
- element (NonDeletedExcalidrawElement): The element to be rendered.
|
|
27
|
+
- radius (number): The calculated border radius in pixels.
|
|
28
|
+
- appState (UIAppState): The current state of the UI.
|
|
29
|
+
|
|
30
|
+
#### Return value:
|
|
31
|
+
|
|
32
|
+
JSX.Element | null: The JSX component representing the custom rendering, or null if the default `<iframe>` should be rendered.
|
|
33
|
+
|
|
16
34
|
### Features
|
|
17
35
|
|
|
36
|
+
- Added [`props.validateEmbeddable`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props#validateEmbeddable) to customize embeddable src url validation. [#6691](https://github.com/excalidraw/excalidraw/pull/6691)
|
|
37
|
+
- Add support for `opts.fitToViewport` and `opts.viewportZoomFactor` in the [`ExcalidrawAPI.scrollToContent`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/ref#scrolltocontent) API. [#6581](https://github.com/excalidraw/excalidraw/pull/6581).
|
|
38
|
+
- Properly sanitize element `link` urls. [#6728](https://github.com/excalidraw/excalidraw/pull/6728).
|
|
18
39
|
- Sidebar component now supports tabs — for more detailed description of new behavior and breaking changes, see the linked PR. [#6213](https://github.com/excalidraw/excalidraw/pull/6213)
|
|
19
40
|
- Exposed `DefaultSidebar` component to allow modifying the default sidebar, such as adding custom tabs to it. [#6213](https://github.com/excalidraw/excalidraw/pull/6213)
|
|
20
41
|
|
|
@@ -63,7 +84,7 @@ Please add the latest change on the top under the correct section.
|
|
|
63
84
|
|
|
64
85
|
### Features
|
|
65
86
|
|
|
66
|
-
- [`ExcalidrawAPI.
|
|
87
|
+
- [`ExcalidrawAPI.scrollToContent`](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api/props/ref#scrolltocontent) has new opts object allowing you to fit viewport to content, and animate the scrolling. [#6319](https://github.com/excalidraw/excalidraw/pull/6319)
|
|
67
88
|
|
|
68
89
|
- Expose `useI18n()` hook return an object containing `t()` i18n helper and current `langCode`. You can use this in components you render as `<Excalidraw>` children to render any of our i18n locale strings. [#6224](https://github.com/excalidraw/excalidraw/pull/6224)
|
|
69
90
|
|
package/README.md
CHANGED
|
@@ -43,3 +43,7 @@ Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/
|
|
|
43
43
|
## API
|
|
44
44
|
|
|
45
45
|
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api)
|
|
46
|
+
|
|
47
|
+
## Contributing
|
|
48
|
+
|
|
49
|
+
Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/contributing)
|