@excalidraw/excalidraw 0.17.1-7441-0269e5a → 0.17.1-7441-4c9a6f4
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/dist/browser/excalidraw-assets/{chunk-V52YQ6TH.js → chunk-LZCCI7PN.js} +1181 -1675
- package/dist/browser/excalidraw-assets/{image-MZHH7VY4.js → image-CG4AV2NT.js} +1 -1
- package/dist/browser/excalidraw-assets/{image-2MHILQWB.css → image-EO7USLQY.css} +1 -1
- package/dist/browser/index.css +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/packages/excalidraw/actions/actionAddToLibrary.js +59 -0
- package/dist/packages/excalidraw/actions/actionAlign.js +124 -0
- package/dist/packages/excalidraw/actions/actionBoundText.js +213 -0
- package/dist/packages/excalidraw/actions/actionCanvas.js +354 -0
- package/dist/packages/excalidraw/actions/actionClipboard.js +221 -0
- package/dist/packages/excalidraw/actions/actionDeleteSelected.js +129 -0
- package/dist/packages/excalidraw/actions/actionDistribute.js +56 -0
- package/dist/packages/excalidraw/actions/actionDuplicateSelection.js +181 -0
- package/dist/packages/excalidraw/actions/actionElementLock.js +89 -0
- package/dist/packages/excalidraw/actions/actionExport.js +195 -0
- package/dist/packages/excalidraw/actions/actionFinalize.js +150 -0
- package/dist/packages/excalidraw/actions/actionFlip.js +52 -0
- package/dist/packages/excalidraw/actions/actionFrame.js +113 -0
- package/dist/packages/excalidraw/actions/actionGroup.js +162 -0
- package/dist/packages/excalidraw/actions/actionHistory.js +57 -0
- package/dist/packages/excalidraw/actions/actionLinearEditor.js +41 -0
- package/dist/packages/excalidraw/actions/actionMenu.js +53 -0
- package/dist/packages/excalidraw/actions/actionNavigate.js +43 -0
- package/dist/packages/excalidraw/actions/actionProperties.js +683 -0
- package/dist/packages/excalidraw/actions/actionSelectAll.js +40 -0
- package/dist/packages/excalidraw/actions/actionStyles.js +118 -0
- package/dist/packages/excalidraw/actions/actionToggleGridMode.js +27 -0
- package/dist/packages/excalidraw/actions/actionToggleObjectsSnapMode.js +26 -0
- package/dist/packages/excalidraw/actions/actionToggleStats.js +19 -0
- package/dist/packages/excalidraw/actions/actionToggleViewMode.js +25 -0
- package/dist/packages/excalidraw/actions/actionToggleZenMode.js +25 -0
- package/dist/packages/excalidraw/actions/actionZindex.js +86 -0
- package/dist/packages/excalidraw/actions/index.js +25 -0
- package/dist/packages/excalidraw/actions/manager.js +110 -0
- package/dist/packages/excalidraw/actions/register.js +5 -0
- package/dist/packages/excalidraw/actions/shortcuts.js +52 -0
- package/dist/packages/excalidraw/align.js +36 -0
- package/dist/packages/excalidraw/analytics.js +30 -0
- package/dist/packages/excalidraw/appState.js +222 -0
- package/dist/packages/excalidraw/charts.js +365 -0
- package/dist/packages/excalidraw/clients.js +34 -0
- package/dist/packages/excalidraw/clipboard.js +351 -0
- package/dist/packages/excalidraw/colors.js +124 -0
- package/dist/packages/excalidraw/components/Actions.js +127 -0
- package/dist/packages/excalidraw/components/Actions.scss +92 -0
- package/dist/packages/excalidraw/components/ActiveConfirmDialog.js +22 -0
- package/dist/packages/excalidraw/components/App.js +6177 -0
- package/dist/packages/excalidraw/components/Avatar.js +15 -0
- package/dist/packages/excalidraw/components/Avatar.scss +7 -0
- package/dist/packages/excalidraw/components/BraveMeasureTextError.js +6 -0
- package/dist/packages/excalidraw/components/Button.js +14 -0
- package/dist/packages/excalidraw/components/Button.scss +7 -0
- package/dist/packages/excalidraw/components/ButtonIconCycle.js +11 -0
- package/dist/packages/excalidraw/components/ButtonIconSelect.js +6 -0
- package/dist/packages/excalidraw/components/ButtonSelect.js +3 -0
- package/dist/packages/excalidraw/components/Card.js +14 -0
- package/dist/packages/excalidraw/components/Card.scss +57 -0
- package/dist/packages/excalidraw/components/CheckboxItem.js +10 -0
- package/dist/packages/excalidraw/components/CheckboxItem.scss +91 -0
- package/dist/packages/excalidraw/components/ColorPicker/ColorInput.js +67 -0
- package/dist/packages/excalidraw/components/ColorPicker/ColorPicker.js +138 -0
- package/dist/packages/excalidraw/components/ColorPicker/ColorPicker.scss +441 -0
- package/dist/packages/excalidraw/components/ColorPicker/CustomColorList.js +24 -0
- package/dist/packages/excalidraw/components/ColorPicker/HotkeyLabel.js +8 -0
- package/dist/packages/excalidraw/components/ColorPicker/Picker.js +86 -0
- package/dist/packages/excalidraw/components/ColorPicker/PickerColorList.js +33 -0
- package/dist/packages/excalidraw/components/ColorPicker/PickerHeading.js +3 -0
- package/dist/packages/excalidraw/components/ColorPicker/ShadeList.js +44 -0
- package/dist/packages/excalidraw/components/ColorPicker/TopPicks.js +27 -0
- package/dist/packages/excalidraw/components/ColorPicker/colorPickerUtils.js +83 -0
- package/dist/packages/excalidraw/components/ColorPicker/keyboardNavHandlers.js +174 -0
- package/dist/packages/excalidraw/components/ConfirmDialog.js +27 -0
- package/dist/packages/excalidraw/components/ConfirmDialog.scss +11 -0
- package/dist/packages/excalidraw/components/ContextMenu.js +56 -0
- package/dist/packages/excalidraw/components/ContextMenu.scss +98 -0
- package/dist/packages/excalidraw/components/DarkModeToggle.js +16 -0
- package/dist/packages/excalidraw/components/DefaultSidebar.js +48 -0
- package/dist/packages/excalidraw/components/Dialog.js +74 -0
- package/dist/packages/excalidraw/components/Dialog.scss +48 -0
- package/dist/packages/excalidraw/components/DialogActionButton.js +9 -0
- package/dist/packages/excalidraw/components/DialogActionButton.scss +47 -0
- package/dist/packages/excalidraw/components/ErrorDialog.js +18 -0
- package/dist/packages/excalidraw/components/ExcalidrawLogo.js +7 -0
- package/dist/packages/excalidraw/components/ExcalidrawLogo.scss +73 -0
- package/dist/packages/excalidraw/components/ExportDialog.scss +129 -0
- package/dist/packages/excalidraw/components/EyeDropper.js +130 -0
- package/dist/packages/excalidraw/components/EyeDropper.scss +48 -0
- package/dist/packages/excalidraw/components/FilledButton.js +7 -0
- package/dist/packages/excalidraw/components/FilledButton.scss +191 -0
- package/dist/packages/excalidraw/components/FixedSideContainer.js +4 -0
- package/dist/packages/excalidraw/components/FixedSideContainer.scss +40 -0
- package/dist/packages/excalidraw/components/FollowMode/FollowMode.js +7 -0
- package/dist/packages/excalidraw/components/FollowMode/FollowMode.scss +59 -0
- package/dist/packages/excalidraw/components/HandButton.js +9 -0
- package/dist/packages/excalidraw/components/HelpButton.js +4 -0
- package/dist/packages/excalidraw/components/HelpDialog.js +79 -0
- package/dist/packages/excalidraw/components/HelpDialog.scss +130 -0
- package/dist/packages/excalidraw/components/HintViewer.js +97 -0
- package/dist/packages/excalidraw/components/HintViewer.scss +37 -0
- package/dist/packages/excalidraw/components/IconPicker.js +99 -0
- package/dist/packages/excalidraw/components/IconPicker.scss +143 -0
- package/dist/packages/excalidraw/components/ImageExportDialog.js +127 -0
- package/dist/packages/excalidraw/components/ImageExportDialog.scss +173 -0
- package/dist/packages/excalidraw/components/InitializeApp.js +16 -0
- package/dist/packages/excalidraw/components/InlineIcon.js +10 -0
- package/dist/packages/excalidraw/components/Island.js +5 -0
- package/dist/packages/excalidraw/components/Island.scss +16 -0
- package/dist/packages/excalidraw/components/JSONExportDialog.js +35 -0
- package/dist/packages/excalidraw/components/LaserTool/LaserPathManager.js +225 -0
- package/dist/packages/excalidraw/components/LaserTool/LaserPointerButton.js +10 -0
- package/dist/packages/excalidraw/components/LaserTool/LaserTool.js +15 -0
- package/dist/packages/excalidraw/components/LaserTool/LaserToolOverlay.scss +20 -0
- package/dist/packages/excalidraw/components/LayerUI.js +189 -0
- package/dist/packages/excalidraw/components/LayerUI.scss +112 -0
- package/dist/packages/excalidraw/components/LibraryMenu.js +99 -0
- package/dist/packages/excalidraw/components/LibraryMenu.scss +150 -0
- package/dist/packages/excalidraw/components/LibraryMenuBrowseButton.js +8 -0
- package/dist/packages/excalidraw/components/LibraryMenuControlButtons.js +6 -0
- package/dist/packages/excalidraw/components/LibraryMenuHeaderContent.js +126 -0
- package/dist/packages/excalidraw/components/LibraryMenuItems.js +138 -0
- package/dist/packages/excalidraw/components/LibraryMenuItems.scss +99 -0
- package/dist/packages/excalidraw/components/LibraryMenuSection.js +21 -0
- package/dist/packages/excalidraw/components/LibraryUnit.js +52 -0
- package/dist/packages/excalidraw/components/LibraryUnit.scss +185 -0
- package/dist/packages/excalidraw/components/LoadingMessage.js +24 -0
- package/dist/packages/excalidraw/components/LockButton.js +14 -0
- package/dist/packages/excalidraw/components/MagicButton.js +9 -0
- package/dist/packages/excalidraw/components/MagicSettings.js +46 -0
- package/dist/packages/excalidraw/components/MagicSettings.scss +18 -0
- package/dist/packages/excalidraw/components/MobileMenu.js +45 -0
- package/dist/packages/excalidraw/components/Modal.js +23 -0
- package/dist/packages/excalidraw/components/Modal.scss +121 -0
- package/dist/packages/excalidraw/components/OverwriteConfirm/OverwriteConfirm.js +31 -0
- package/dist/packages/excalidraw/components/OverwriteConfirm/OverwriteConfirm.scss +126 -0
- package/dist/packages/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.js +32 -0
- package/dist/packages/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.js +19 -0
- package/dist/packages/excalidraw/components/Paragraph.js +4 -0
- package/dist/packages/excalidraw/components/PasteChartDialog.js +63 -0
- package/dist/packages/excalidraw/components/PasteChartDialog.scss +46 -0
- package/dist/packages/excalidraw/components/PenModeButton.js +13 -0
- package/dist/packages/excalidraw/components/Popover.js +111 -0
- package/dist/packages/excalidraw/components/Popover.scss +8 -0
- package/dist/packages/excalidraw/components/ProjectName.js +30 -0
- package/dist/packages/excalidraw/components/ProjectName.scss +25 -0
- package/dist/packages/excalidraw/components/PublishLibrary.js +214 -0
- package/dist/packages/excalidraw/components/PublishLibrary.scss +172 -0
- package/dist/packages/excalidraw/components/RadioGroup.js +8 -0
- package/dist/packages/excalidraw/components/RadioGroup.scss +91 -0
- package/dist/packages/excalidraw/components/Section.js +8 -0
- package/dist/packages/excalidraw/components/ShareableLinkDialog.js +33 -0
- package/dist/packages/excalidraw/components/ShareableLinkDialog.scss +91 -0
- package/dist/packages/excalidraw/components/Sidebar/Sidebar.js +145 -0
- package/dist/packages/excalidraw/components/Sidebar/Sidebar.scss +176 -0
- package/dist/packages/excalidraw/components/Sidebar/SidebarHeader.js +16 -0
- package/dist/packages/excalidraw/components/Sidebar/SidebarTab.js +6 -0
- package/dist/packages/excalidraw/components/Sidebar/SidebarTabTrigger.js +6 -0
- package/dist/packages/excalidraw/components/Sidebar/SidebarTabTriggers.js +6 -0
- package/dist/packages/excalidraw/components/Sidebar/SidebarTabs.js +17 -0
- package/dist/packages/excalidraw/components/Sidebar/SidebarTrigger.js +18 -0
- package/dist/packages/excalidraw/components/Sidebar/SidebarTrigger.scss +37 -0
- package/dist/packages/excalidraw/components/Sidebar/common.js +2 -0
- package/dist/packages/excalidraw/components/Spinner.js +14 -0
- package/dist/packages/excalidraw/components/Spinner.scss +49 -0
- package/dist/packages/excalidraw/components/Stack.js +24 -0
- package/dist/packages/excalidraw/components/Stack.scss +19 -0
- package/dist/packages/excalidraw/components/Stats.js +13 -0
- package/dist/packages/excalidraw/components/Stats.scss +54 -0
- package/dist/packages/excalidraw/components/Switch.js +10 -0
- package/dist/packages/excalidraw/components/Switch.scss +118 -0
- package/dist/packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.js +58 -0
- package/dist/packages/excalidraw/components/TTDDialog/MermaidToExcalidraw.scss +10 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialog.js +194 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialog.scss +315 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogInput.js +28 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogOutput.js +8 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogPanel.js +11 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogPanels.js +4 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.js +5 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogTab.js +6 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogTabTrigger.js +6 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogTabTriggers.js +6 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogTabs.js +39 -0
- package/dist/packages/excalidraw/components/TTDDialog/TTDDialogTrigger.js +16 -0
- package/dist/packages/excalidraw/components/TTDDialog/common.js +88 -0
- package/dist/packages/excalidraw/components/TextField.js +25 -0
- package/dist/packages/excalidraw/components/TextField.scss +109 -0
- package/dist/packages/excalidraw/components/TextInput.scss +7 -0
- package/dist/packages/excalidraw/components/Toast.js +30 -0
- package/dist/packages/excalidraw/components/Toast.scss +49 -0
- package/dist/packages/excalidraw/components/ToolButton.js +72 -0
- package/dist/packages/excalidraw/components/ToolIcon.scss +184 -0
- package/dist/packages/excalidraw/components/Toolbar.scss +50 -0
- package/dist/packages/excalidraw/components/Tooltip.js +60 -0
- package/dist/packages/excalidraw/components/Tooltip.scss +47 -0
- package/dist/packages/excalidraw/components/Trans.js +139 -0
- package/dist/packages/excalidraw/components/UserList.js +96 -0
- package/dist/packages/excalidraw/components/UserList.scss +136 -0
- package/dist/packages/excalidraw/components/canvases/InteractiveCanvas.js +120 -0
- package/dist/packages/excalidraw/components/canvases/StaticCanvas.js +85 -0
- package/dist/packages/excalidraw/components/canvases/index.js +3 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenu.js +24 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenu.scss +148 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuContent.js +21 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuGroup.js +6 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuItem.js +23 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuItemContent.js +7 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.js +5 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuItemLink.js +9 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuSeparator.js +8 -0
- package/dist/packages/excalidraw/components/dropdownMenu/DropdownMenuTrigger.js +12 -0
- package/dist/packages/excalidraw/components/dropdownMenu/common.js +20 -0
- package/dist/packages/excalidraw/components/dropdownMenu/dropdownMenuUtils.js +27 -0
- package/dist/packages/excalidraw/components/footer/Footer.js +25 -0
- package/dist/packages/excalidraw/components/footer/FooterCenter.js +14 -0
- package/dist/packages/excalidraw/components/footer/FooterCenter.scss +11 -0
- package/dist/packages/excalidraw/components/hoc/withInternalFallback.js +57 -0
- package/dist/packages/excalidraw/components/icons.js +220 -0
- package/dist/packages/excalidraw/components/live-collaboration/LiveCollaborationTrigger.js +13 -0
- package/dist/packages/excalidraw/components/live-collaboration/LiveCollaborationTrigger.scss +72 -0
- package/dist/packages/excalidraw/components/main-menu/DefaultItems.js +116 -0
- package/dist/packages/excalidraw/components/main-menu/DefaultItems.scss +21 -0
- package/dist/packages/excalidraw/components/main-menu/MainMenu.js +36 -0
- package/dist/packages/excalidraw/components/welcome-screen/WelcomeScreen.Center.js +69 -0
- package/dist/packages/excalidraw/components/welcome-screen/WelcomeScreen.Hints.js +20 -0
- package/dist/packages/excalidraw/components/welcome-screen/WelcomeScreen.js +11 -0
- package/dist/packages/excalidraw/components/welcome-screen/WelcomeScreen.scss +285 -0
- package/dist/packages/excalidraw/constants.js +312 -0
- package/dist/packages/excalidraw/context/tunnels.js +21 -0
- package/dist/packages/excalidraw/context/ui-appState.js +3 -0
- package/dist/packages/excalidraw/css/app.scss +39 -0
- package/dist/packages/excalidraw/css/styles.scss +757 -0
- package/dist/packages/excalidraw/css/theme.scss +252 -0
- package/dist/packages/excalidraw/css/variables.module.scss +174 -0
- package/dist/packages/excalidraw/cursor.js +72 -0
- package/dist/packages/excalidraw/data/EditorLocalStorage.js +42 -0
- package/dist/packages/excalidraw/data/ai/types.js +1 -0
- package/dist/packages/excalidraw/data/blob.js +378 -0
- package/dist/packages/excalidraw/data/encode.js +231 -0
- package/dist/packages/excalidraw/data/encryption.js +53 -0
- package/dist/packages/excalidraw/data/filesystem.js +65 -0
- package/dist/packages/excalidraw/data/image.js +91 -0
- package/dist/packages/excalidraw/data/index.js +120 -0
- package/dist/packages/excalidraw/data/json.js +93 -0
- package/dist/packages/excalidraw/data/library.js +376 -0
- package/dist/packages/excalidraw/data/magic.js +73 -0
- package/dist/packages/excalidraw/data/resave.js +22 -0
- package/dist/packages/excalidraw/data/restore.js +438 -0
- package/dist/packages/excalidraw/data/transform.js +442 -0
- package/dist/packages/excalidraw/data/types.js +1 -0
- package/dist/packages/excalidraw/data/url.js +30 -0
- package/dist/packages/excalidraw/distribute.js +58 -0
- package/dist/packages/excalidraw/element/ElementCanvasButtons.js +31 -0
- package/dist/packages/excalidraw/element/ElementCanvasButtons.scss +14 -0
- package/dist/packages/excalidraw/element/Hyperlink.js +350 -0
- package/dist/packages/excalidraw/element/Hyperlink.scss +70 -0
- package/dist/packages/excalidraw/element/binding.js +412 -0
- package/dist/packages/excalidraw/element/bounds.js +613 -0
- package/dist/packages/excalidraw/element/collision.js +727 -0
- package/dist/packages/excalidraw/element/dragElements.js +119 -0
- package/dist/packages/excalidraw/element/embeddable.js +305 -0
- package/dist/packages/excalidraw/element/image.js +91 -0
- package/dist/packages/excalidraw/element/index.js +24 -0
- package/dist/packages/excalidraw/element/linearElementEditor.js +867 -0
- package/dist/packages/excalidraw/element/mutateElement.js +112 -0
- package/dist/packages/excalidraw/element/newElement.js +389 -0
- package/dist/packages/excalidraw/element/resizeElements.js +597 -0
- package/dist/packages/excalidraw/element/resizeTest.js +95 -0
- package/dist/packages/excalidraw/element/showSelectedShapeActions.js +9 -0
- package/dist/packages/excalidraw/element/sizeHelpers.js +131 -0
- package/dist/packages/excalidraw/element/sortElements.js +104 -0
- package/dist/packages/excalidraw/element/textElement.js +716 -0
- package/dist/packages/excalidraw/element/textWysiwyg.js +500 -0
- package/dist/packages/excalidraw/element/transformHandles.js +155 -0
- package/dist/packages/excalidraw/element/typeChecks.js +141 -0
- package/dist/packages/excalidraw/element/types.js +1 -0
- package/dist/packages/excalidraw/emitter.js +36 -0
- package/dist/packages/excalidraw/errors.js +20 -0
- package/dist/packages/excalidraw/frame.js +373 -0
- package/dist/packages/excalidraw/ga.js +268 -0
- package/dist/packages/excalidraw/gadirections.js +18 -0
- package/dist/packages/excalidraw/galines.js +32 -0
- package/dist/packages/excalidraw/gapoints.js +30 -0
- package/dist/packages/excalidraw/gatransforms.js +23 -0
- package/dist/packages/excalidraw/gesture.js +9 -0
- package/dist/packages/excalidraw/groups.js +225 -0
- package/dist/packages/excalidraw/history.js +190 -0
- package/dist/packages/excalidraw/hooks/useCallbackRefState.js +6 -0
- package/dist/packages/excalidraw/hooks/useCreatePortalContainer.js +32 -0
- package/dist/packages/excalidraw/hooks/useLibraryItemSvg.js +62 -0
- package/dist/packages/excalidraw/hooks/useOutsideClick.js +67 -0
- package/dist/packages/excalidraw/hooks/useScrollPosition.js +23 -0
- package/dist/packages/excalidraw/hooks/useStable.js +6 -0
- package/dist/packages/excalidraw/hooks/useTransition.js +7 -0
- package/dist/packages/excalidraw/i18n.js +137 -0
- package/dist/packages/excalidraw/index-node.d.ts +1 -0
- package/dist/packages/excalidraw/index-node.js +73 -0
- package/{types → dist/packages}/excalidraw/index.d.ts +1 -1
- package/dist/packages/excalidraw/index.js +116 -0
- package/dist/packages/excalidraw/jotai.js +18 -0
- package/dist/packages/excalidraw/keys.js +84 -0
- package/dist/packages/excalidraw/locales/ar-SA.json +525 -0
- package/dist/packages/excalidraw/locales/az-AZ.json +525 -0
- package/dist/packages/excalidraw/locales/bg-BG.json +525 -0
- package/dist/packages/excalidraw/locales/bn-BD.json +525 -0
- package/dist/packages/excalidraw/locales/ca-ES.json +525 -0
- package/dist/packages/excalidraw/locales/cs-CZ.json +525 -0
- package/dist/packages/excalidraw/locales/da-DK.json +525 -0
- package/dist/packages/excalidraw/locales/de-DE.json +525 -0
- package/dist/packages/excalidraw/locales/el-GR.json +525 -0
- package/dist/packages/excalidraw/locales/en.json +535 -0
- package/dist/packages/excalidraw/locales/es-ES.json +525 -0
- package/dist/packages/excalidraw/locales/eu-ES.json +525 -0
- package/dist/packages/excalidraw/locales/fa-IR.json +525 -0
- package/dist/packages/excalidraw/locales/fi-FI.json +525 -0
- package/dist/packages/excalidraw/locales/fr-FR.json +525 -0
- package/dist/packages/excalidraw/locales/gl-ES.json +525 -0
- package/dist/packages/excalidraw/locales/he-IL.json +525 -0
- package/dist/packages/excalidraw/locales/hi-IN.json +525 -0
- package/dist/packages/excalidraw/locales/hu-HU.json +525 -0
- package/dist/packages/excalidraw/locales/id-ID.json +525 -0
- package/dist/packages/excalidraw/locales/it-IT.json +525 -0
- package/dist/packages/excalidraw/locales/ja-JP.json +525 -0
- package/dist/packages/excalidraw/locales/kaa.json +525 -0
- package/dist/packages/excalidraw/locales/kab-KAB.json +525 -0
- package/dist/packages/excalidraw/locales/kk-KZ.json +525 -0
- package/dist/packages/excalidraw/locales/km-KH.json +525 -0
- package/dist/packages/excalidraw/locales/ko-KR.json +525 -0
- package/dist/packages/excalidraw/locales/ku-TR.json +525 -0
- package/dist/packages/excalidraw/locales/lt-LT.json +525 -0
- package/dist/packages/excalidraw/locales/lv-LV.json +525 -0
- package/dist/packages/excalidraw/locales/mr-IN.json +525 -0
- package/dist/packages/excalidraw/locales/my-MM.json +525 -0
- package/dist/packages/excalidraw/locales/nb-NO.json +525 -0
- package/dist/packages/excalidraw/locales/nl-NL.json +525 -0
- package/dist/packages/excalidraw/locales/nn-NO.json +525 -0
- package/dist/packages/excalidraw/locales/oc-FR.json +525 -0
- package/dist/packages/excalidraw/locales/pa-IN.json +525 -0
- package/dist/packages/excalidraw/locales/percentages.json +56 -0
- package/dist/packages/excalidraw/locales/pl-PL.json +525 -0
- package/dist/packages/excalidraw/locales/pt-BR.json +525 -0
- package/dist/packages/excalidraw/locales/pt-PT.json +525 -0
- package/dist/packages/excalidraw/locales/ro-RO.json +525 -0
- package/dist/packages/excalidraw/locales/ru-RU.json +525 -0
- package/dist/packages/excalidraw/locales/si-LK.json +525 -0
- package/dist/packages/excalidraw/locales/sk-SK.json +525 -0
- package/dist/packages/excalidraw/locales/sl-SI.json +525 -0
- package/dist/packages/excalidraw/locales/sv-SE.json +525 -0
- package/dist/packages/excalidraw/locales/ta-IN.json +525 -0
- package/dist/packages/excalidraw/locales/th-TH.json +525 -0
- package/dist/packages/excalidraw/locales/tr-TR.json +525 -0
- package/dist/packages/excalidraw/locales/uk-UA.json +525 -0
- package/dist/packages/excalidraw/locales/vi-VN.json +525 -0
- package/dist/packages/excalidraw/locales/zh-CN.json +525 -0
- package/dist/packages/excalidraw/locales/zh-HK.json +525 -0
- package/dist/packages/excalidraw/locales/zh-TW.json +525 -0
- package/dist/packages/excalidraw/math.js +364 -0
- package/dist/packages/excalidraw/points.js +38 -0
- package/dist/packages/excalidraw/polyfill.js +32 -0
- package/dist/packages/excalidraw/random.js +11 -0
- package/dist/packages/excalidraw/renderer/renderElement.js +871 -0
- package/dist/packages/excalidraw/renderer/renderScene.js +859 -0
- package/dist/packages/excalidraw/renderer/renderSnaps.js +114 -0
- package/dist/packages/excalidraw/renderer/roundRect.js +28 -0
- package/dist/packages/excalidraw/scene/Fonts.js +71 -0
- package/dist/packages/excalidraw/scene/Renderer.js +65 -0
- package/dist/packages/excalidraw/scene/Scene.js +230 -0
- package/dist/packages/excalidraw/scene/Shape.js +322 -0
- package/dist/packages/excalidraw/scene/ShapeCache.js +42 -0
- package/dist/packages/excalidraw/scene/comparisons.js +67 -0
- package/dist/packages/excalidraw/scene/export.js +304 -0
- package/dist/packages/excalidraw/scene/index.js +5 -0
- package/dist/packages/excalidraw/scene/scroll.js +35 -0
- package/dist/packages/excalidraw/scene/scrollbars.js +85 -0
- package/dist/packages/excalidraw/scene/selection.js +134 -0
- package/dist/packages/excalidraw/scene/types.js +1 -0
- package/dist/packages/excalidraw/scene/zoom.js +22 -0
- package/dist/packages/excalidraw/shapes.js +84 -0
- package/dist/packages/excalidraw/snapping.js +838 -0
- package/dist/packages/excalidraw/types.js +6 -0
- package/dist/packages/excalidraw/utility-types.js +1 -0
- package/dist/packages/excalidraw/utils.js +668 -0
- package/dist/packages/excalidraw/zindex.js +349 -0
- package/dist/packages/utils/bbox.js +42 -0
- package/dist/packages/utils/export.js +109 -0
- package/dist/packages/utils/withinBounds.js +125 -0
- package/dist/public/fonts/Assistant-Bold.woff2 +0 -0
- package/dist/public/fonts/Assistant-Medium.woff2 +0 -0
- package/dist/public/fonts/Assistant-Regular.woff2 +0 -0
- package/dist/public/fonts/Assistant-SemiBold.woff2 +0 -0
- package/dist/public/fonts/Cascadia.ttf +0 -0
- package/dist/public/fonts/Cascadia.woff2 +0 -0
- package/dist/public/fonts/FG_Virgil.ttf +0 -0
- package/dist/public/fonts/FG_Virgil.woff2 +0 -0
- package/dist/public/fonts/Virgil.woff2 +0 -0
- package/dist/public/fonts/fonts.css +38 -0
- package/package.json +8 -5
- package/dist/index.css +0 -5796
- package/dist/index.js +0 -71898
- /package/{types → dist/packages}/excalidraw/actions/actionAddToLibrary.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionAlign.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionBoundText.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionCanvas.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionClipboard.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionDeleteSelected.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionDistribute.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionDuplicateSelection.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionElementLock.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionExport.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionFinalize.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionFlip.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionFrame.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionGroup.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionHistory.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionLinearEditor.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionMenu.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionNavigate.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionProperties.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionSelectAll.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionStyles.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionToggleGridMode.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionToggleObjectsSnapMode.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionToggleStats.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionToggleViewMode.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionToggleZenMode.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/actionZindex.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/index.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/manager.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/register.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/shortcuts.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/actions/types.d.ts +0 -0
- /package/{types/excalidraw/index-node.d.ts → dist/packages/excalidraw/actions/types.js} +0 -0
- /package/{types → dist/packages}/excalidraw/align.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/analytics.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/appState.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/charts.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/clients.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/clipboard.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/colors.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Actions.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ActiveConfirmDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/App.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Avatar.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/BraveMeasureTextError.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Button.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ButtonIconCycle.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ButtonIconSelect.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ButtonSelect.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Card.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/CheckboxItem.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/ColorInput.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/ColorPicker.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/CustomColorList.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/HotkeyLabel.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/Picker.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/PickerColorList.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/PickerHeading.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/ShadeList.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/TopPicks.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/colorPickerUtils.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ColorPicker/keyboardNavHandlers.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ConfirmDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ContextMenu.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/DarkModeToggle.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/DefaultSidebar.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Dialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/DialogActionButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ErrorDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ExcalidrawLogo.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/EyeDropper.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/FilledButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/FixedSideContainer.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/FollowMode/FollowMode.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/HandButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/HelpButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/HelpDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/HintViewer.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/IconPicker.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ImageExportDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/InitializeApp.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/InlineIcon.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Island.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/JSONExportDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LaserTool/LaserPathManager.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LaserTool/LaserPointerButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LaserTool/LaserTool.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LayerUI.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LibraryMenu.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LibraryMenuBrowseButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LibraryMenuControlButtons.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LibraryMenuHeaderContent.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LibraryMenuItems.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LibraryMenuSection.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LibraryUnit.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LoadingMessage.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/LockButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/MagicButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/MagicSettings.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/MobileMenu.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Modal.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/OverwriteConfirm/OverwriteConfirm.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/OverwriteConfirm/OverwriteConfirmActions.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/OverwriteConfirm/OverwriteConfirmState.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Paragraph.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/PasteChartDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/PenModeButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Popover.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ProjectName.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/PublishLibrary.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/RadioGroup.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Section.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ShareableLinkDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/Sidebar.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/SidebarHeader.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/SidebarTab.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/SidebarTabTrigger.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/SidebarTabTriggers.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/SidebarTabs.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/SidebarTrigger.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Sidebar/common.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Spinner.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Stack.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Stats.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Switch.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/MermaidToExcalidraw.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialog.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogInput.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogOutput.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogPanel.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogPanels.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogSubmitShortcut.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogTab.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogTabTrigger.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogTabTriggers.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogTabs.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/TTDDialogTrigger.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TTDDialog/common.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/TextField.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Toast.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/ToolButton.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Tooltip.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/Trans.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/UserList.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/canvases/InteractiveCanvas.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/canvases/StaticCanvas.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/canvases/index.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenu.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuContent.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuGroup.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuItem.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuItemContent.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuItemCustom.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuItemLink.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuSeparator.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/DropdownMenuTrigger.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/common.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/dropdownMenu/dropdownMenuUtils.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/footer/Footer.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/footer/FooterCenter.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/hoc/withInternalFallback.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/icons.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/live-collaboration/LiveCollaborationTrigger.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/main-menu/DefaultItems.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/main-menu/MainMenu.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/welcome-screen/WelcomeScreen.Center.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/welcome-screen/WelcomeScreen.Hints.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/components/welcome-screen/WelcomeScreen.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/constants.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/context/tunnels.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/context/ui-appState.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/cursor.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/EditorLocalStorage.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/ai/types.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/blob.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/encode.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/encryption.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/filesystem.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/image.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/index.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/json.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/library.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/magic.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/resave.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/restore.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/transform.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/types.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/data/url.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/distribute.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/ElementCanvasButtons.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/Hyperlink.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/binding.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/bounds.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/collision.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/dragElements.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/embeddable.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/image.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/index.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/linearElementEditor.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/mutateElement.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/newElement.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/resizeElements.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/resizeTest.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/showSelectedShapeActions.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/sizeHelpers.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/sortElements.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/textElement.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/textWysiwyg.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/transformHandles.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/typeChecks.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/element/types.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/emitter.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/errors.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/frame.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/ga.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/gadirections.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/galines.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/gapoints.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/gatransforms.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/gesture.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/groups.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/history.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/hooks/useCallbackRefState.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/hooks/useCreatePortalContainer.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/hooks/useLibraryItemSvg.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/hooks/useOutsideClick.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/hooks/useScrollPosition.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/hooks/useStable.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/hooks/useTransition.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/i18n.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/jotai.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/keys.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/math.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/points.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/polyfill.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/random.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/renderer/renderElement.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/renderer/renderScene.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/renderer/renderSnaps.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/renderer/roundRect.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/Fonts.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/Renderer.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/Scene.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/Shape.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/ShapeCache.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/comparisons.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/export.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/index.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/scroll.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/scrollbars.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/selection.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/types.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/scene/zoom.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/shapes.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/snapping.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/types.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/utility-types.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/utils.d.ts +0 -0
- /package/{types → dist/packages}/excalidraw/zindex.d.ts +0 -0
- /package/{types → dist/packages}/utils/bbox.d.ts +0 -0
- /package/{types → dist/packages}/utils/export.d.ts +0 -0
- /package/{types → dist/packages}/utils/withinBounds.d.ts +0 -0
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE, DEFAULT_ELEMENT_BACKGROUND_PICKS, DEFAULT_ELEMENT_STROKE_COLOR_PALETTE, DEFAULT_ELEMENT_STROKE_PICKS, } from "../colors";
|
|
3
|
+
import { trackEvent } from "../analytics";
|
|
4
|
+
import { ButtonIconSelect } from "../components/ButtonIconSelect";
|
|
5
|
+
import { ColorPicker } from "../components/ColorPicker/ColorPicker";
|
|
6
|
+
import { IconPicker } from "../components/IconPicker";
|
|
7
|
+
// TODO barnabasmolnar/editor-redesign
|
|
8
|
+
// TextAlignTopIcon, TextAlignBottomIcon,TextAlignMiddleIcon,
|
|
9
|
+
// ArrowHead icons
|
|
10
|
+
import { ArrowheadArrowIcon, ArrowheadBarIcon, ArrowheadCircleIcon, ArrowheadTriangleIcon, ArrowheadNoneIcon, StrokeStyleDashedIcon, StrokeStyleDottedIcon, TextAlignTopIcon, TextAlignBottomIcon, TextAlignMiddleIcon, FillHachureIcon, FillCrossHatchIcon, FillSolidIcon, SloppinessArchitectIcon, SloppinessArtistIcon, SloppinessCartoonistIcon, StrokeWidthBaseIcon, StrokeWidthBoldIcon, StrokeWidthExtraBoldIcon, FontSizeSmallIcon, FontSizeMediumIcon, FontSizeLargeIcon, FontSizeExtraLargeIcon, EdgeSharpIcon, EdgeRoundIcon, FreedrawIcon, FontFamilyNormalIcon, FontFamilyCodeIcon, TextAlignLeftIcon, TextAlignCenterIcon, TextAlignRightIcon, FillZigZagIcon, ArrowheadTriangleOutlineIcon, ArrowheadCircleOutlineIcon, ArrowheadDiamondIcon, ArrowheadDiamondOutlineIcon, } from "../components/icons";
|
|
11
|
+
import { DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, FONT_FAMILY, ROUNDNESS, STROKE_WIDTH, VERTICAL_ALIGN, } from "../constants";
|
|
12
|
+
import { getNonDeletedElements, isTextElement, redrawTextBoundingBox, } from "../element";
|
|
13
|
+
import { mutateElement, newElementWith } from "../element/mutateElement";
|
|
14
|
+
import { getBoundTextElement, getContainerElement, getDefaultLineHeight, } from "../element/textElement";
|
|
15
|
+
import { isBoundToContainer, isLinearElement, isUsingAdaptiveRadius, } from "../element/typeChecks";
|
|
16
|
+
import { getLanguage, t } from "../i18n";
|
|
17
|
+
import { KEYS } from "../keys";
|
|
18
|
+
import { randomInteger } from "../random";
|
|
19
|
+
import { canHaveArrowheads, getCommonAttributeOfSelectedElements, getSelectedElements, getTargetElements, isSomeElementSelected, } from "../scene";
|
|
20
|
+
import { hasStrokeColor } from "../scene/comparisons";
|
|
21
|
+
import { arrayToMap, getShortcutKey } from "../utils";
|
|
22
|
+
import { register } from "./register";
|
|
23
|
+
const FONT_SIZE_RELATIVE_INCREASE_STEP = 0.1;
|
|
24
|
+
export const changeProperty = (elements, appState, callback, includeBoundText = false) => {
|
|
25
|
+
const selectedElementIds = arrayToMap(getSelectedElements(elements, appState, {
|
|
26
|
+
includeBoundTextElement: includeBoundText,
|
|
27
|
+
}));
|
|
28
|
+
return elements.map((element) => {
|
|
29
|
+
if (selectedElementIds.get(element.id) ||
|
|
30
|
+
element.id === appState.editingElement?.id) {
|
|
31
|
+
return callback(element);
|
|
32
|
+
}
|
|
33
|
+
return element;
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
export const getFormValue = function (elements, appState, getAttribute, isRelevantElement, defaultValue) {
|
|
37
|
+
const editingElement = appState.editingElement;
|
|
38
|
+
const nonDeletedElements = getNonDeletedElements(elements);
|
|
39
|
+
let ret = null;
|
|
40
|
+
if (editingElement) {
|
|
41
|
+
ret = getAttribute(editingElement);
|
|
42
|
+
}
|
|
43
|
+
if (!ret) {
|
|
44
|
+
const hasSelection = isSomeElementSelected(nonDeletedElements, appState);
|
|
45
|
+
if (hasSelection) {
|
|
46
|
+
ret =
|
|
47
|
+
getCommonAttributeOfSelectedElements(isRelevantElement === true
|
|
48
|
+
? nonDeletedElements
|
|
49
|
+
: nonDeletedElements.filter((el) => isRelevantElement(el)), appState, getAttribute) ??
|
|
50
|
+
(typeof defaultValue === "function"
|
|
51
|
+
? defaultValue(true)
|
|
52
|
+
: defaultValue);
|
|
53
|
+
}
|
|
54
|
+
else {
|
|
55
|
+
ret =
|
|
56
|
+
typeof defaultValue === "function" ? defaultValue(false) : defaultValue;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return ret;
|
|
60
|
+
};
|
|
61
|
+
const offsetElementAfterFontResize = (prevElement, nextElement) => {
|
|
62
|
+
if (isBoundToContainer(nextElement)) {
|
|
63
|
+
return nextElement;
|
|
64
|
+
}
|
|
65
|
+
return mutateElement(nextElement, {
|
|
66
|
+
x: prevElement.textAlign === "left"
|
|
67
|
+
? prevElement.x
|
|
68
|
+
: prevElement.x +
|
|
69
|
+
(prevElement.width - nextElement.width) /
|
|
70
|
+
(prevElement.textAlign === "center" ? 2 : 1),
|
|
71
|
+
// centering vertically is non-standard, but for Excalidraw I think
|
|
72
|
+
// it makes sense
|
|
73
|
+
y: prevElement.y + (prevElement.height - nextElement.height) / 2,
|
|
74
|
+
}, false);
|
|
75
|
+
};
|
|
76
|
+
const changeFontSize = (elements, appState, getNewFontSize, fallbackValue) => {
|
|
77
|
+
const newFontSizes = new Set();
|
|
78
|
+
return {
|
|
79
|
+
elements: changeProperty(elements, appState, (oldElement) => {
|
|
80
|
+
if (isTextElement(oldElement)) {
|
|
81
|
+
const newFontSize = getNewFontSize(oldElement);
|
|
82
|
+
newFontSizes.add(newFontSize);
|
|
83
|
+
let newElement = newElementWith(oldElement, {
|
|
84
|
+
fontSize: newFontSize,
|
|
85
|
+
});
|
|
86
|
+
redrawTextBoundingBox(newElement, getContainerElement(oldElement));
|
|
87
|
+
newElement = offsetElementAfterFontResize(oldElement, newElement);
|
|
88
|
+
return newElement;
|
|
89
|
+
}
|
|
90
|
+
return oldElement;
|
|
91
|
+
}, true),
|
|
92
|
+
appState: {
|
|
93
|
+
...appState,
|
|
94
|
+
// update state only if we've set all select text elements to
|
|
95
|
+
// the same font size
|
|
96
|
+
currentItemFontSize: newFontSizes.size === 1
|
|
97
|
+
? [...newFontSizes][0]
|
|
98
|
+
: fallbackValue ?? appState.currentItemFontSize,
|
|
99
|
+
},
|
|
100
|
+
commitToHistory: true,
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
// -----------------------------------------------------------------------------
|
|
104
|
+
export const actionChangeStrokeColor = register({
|
|
105
|
+
name: "changeStrokeColor",
|
|
106
|
+
trackEvent: false,
|
|
107
|
+
perform: (elements, appState, value) => {
|
|
108
|
+
return {
|
|
109
|
+
...(value.currentItemStrokeColor && {
|
|
110
|
+
elements: changeProperty(elements, appState, (el) => {
|
|
111
|
+
return hasStrokeColor(el.type)
|
|
112
|
+
? newElementWith(el, {
|
|
113
|
+
strokeColor: value.currentItemStrokeColor,
|
|
114
|
+
})
|
|
115
|
+
: el;
|
|
116
|
+
}, true),
|
|
117
|
+
}),
|
|
118
|
+
appState: {
|
|
119
|
+
...appState,
|
|
120
|
+
...value,
|
|
121
|
+
},
|
|
122
|
+
commitToHistory: !!value.currentItemStrokeColor,
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
PanelComponent: ({ elements, appState, updateData, appProps }) => (_jsxs(_Fragment, { children: [_jsx("h3", { "aria-hidden": "true", children: t("labels.stroke") }), _jsx(ColorPicker, { topPicks: DEFAULT_ELEMENT_STROKE_PICKS, palette: DEFAULT_ELEMENT_STROKE_COLOR_PALETTE, type: "elementStroke", label: t("labels.stroke"), color: getFormValue(elements, appState, (element) => element.strokeColor, true, appState.currentItemStrokeColor), onChange: (color) => updateData({ currentItemStrokeColor: color }), elements: elements, appState: appState, updateData: updateData })] })),
|
|
126
|
+
});
|
|
127
|
+
export const actionChangeBackgroundColor = register({
|
|
128
|
+
name: "changeBackgroundColor",
|
|
129
|
+
trackEvent: false,
|
|
130
|
+
perform: (elements, appState, value) => {
|
|
131
|
+
return {
|
|
132
|
+
...(value.currentItemBackgroundColor && {
|
|
133
|
+
elements: changeProperty(elements, appState, (el) => newElementWith(el, {
|
|
134
|
+
backgroundColor: value.currentItemBackgroundColor,
|
|
135
|
+
})),
|
|
136
|
+
}),
|
|
137
|
+
appState: {
|
|
138
|
+
...appState,
|
|
139
|
+
...value,
|
|
140
|
+
},
|
|
141
|
+
commitToHistory: !!value.currentItemBackgroundColor,
|
|
142
|
+
};
|
|
143
|
+
},
|
|
144
|
+
PanelComponent: ({ elements, appState, updateData, appProps }) => (_jsxs(_Fragment, { children: [_jsx("h3", { "aria-hidden": "true", children: t("labels.background") }), _jsx(ColorPicker, { topPicks: DEFAULT_ELEMENT_BACKGROUND_PICKS, palette: DEFAULT_ELEMENT_BACKGROUND_COLOR_PALETTE, type: "elementBackground", label: t("labels.background"), color: getFormValue(elements, appState, (element) => element.backgroundColor, true, appState.currentItemBackgroundColor), onChange: (color) => updateData({ currentItemBackgroundColor: color }), elements: elements, appState: appState, updateData: updateData })] })),
|
|
145
|
+
});
|
|
146
|
+
export const actionChangeFillStyle = register({
|
|
147
|
+
name: "changeFillStyle",
|
|
148
|
+
trackEvent: false,
|
|
149
|
+
perform: (elements, appState, value, app) => {
|
|
150
|
+
trackEvent("element", "changeFillStyle", `${value} (${app.device.editor.isMobile ? "mobile" : "desktop"})`);
|
|
151
|
+
return {
|
|
152
|
+
elements: changeProperty(elements, appState, (el) => newElementWith(el, {
|
|
153
|
+
fillStyle: value,
|
|
154
|
+
})),
|
|
155
|
+
appState: { ...appState, currentItemFillStyle: value },
|
|
156
|
+
commitToHistory: true,
|
|
157
|
+
};
|
|
158
|
+
},
|
|
159
|
+
PanelComponent: ({ elements, appState, updateData }) => {
|
|
160
|
+
const selectedElements = getSelectedElements(elements, appState);
|
|
161
|
+
const allElementsZigZag = selectedElements.length > 0 &&
|
|
162
|
+
selectedElements.every((el) => el.fillStyle === "zigzag");
|
|
163
|
+
return (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.fill") }), _jsx(ButtonIconSelect, { type: "button", options: [
|
|
164
|
+
{
|
|
165
|
+
value: "hachure",
|
|
166
|
+
text: `${allElementsZigZag ? t("labels.zigzag") : t("labels.hachure")} (${getShortcutKey("Alt-Click")})`,
|
|
167
|
+
icon: allElementsZigZag ? FillZigZagIcon : FillHachureIcon,
|
|
168
|
+
active: allElementsZigZag ? true : undefined,
|
|
169
|
+
testId: `fill-hachure`,
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
value: "cross-hatch",
|
|
173
|
+
text: t("labels.crossHatch"),
|
|
174
|
+
icon: FillCrossHatchIcon,
|
|
175
|
+
testId: `fill-cross-hatch`,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
value: "solid",
|
|
179
|
+
text: t("labels.solid"),
|
|
180
|
+
icon: FillSolidIcon,
|
|
181
|
+
testId: `fill-solid`,
|
|
182
|
+
},
|
|
183
|
+
], value: getFormValue(elements, appState, (element) => element.fillStyle, (element) => element.hasOwnProperty("fillStyle"), (hasSelection) => hasSelection ? null : appState.currentItemFillStyle), onClick: (value, event) => {
|
|
184
|
+
const nextValue = event.altKey &&
|
|
185
|
+
value === "hachure" &&
|
|
186
|
+
selectedElements.every((el) => el.fillStyle === "hachure")
|
|
187
|
+
? "zigzag"
|
|
188
|
+
: value;
|
|
189
|
+
updateData(nextValue);
|
|
190
|
+
} })] }));
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
export const actionChangeStrokeWidth = register({
|
|
194
|
+
name: "changeStrokeWidth",
|
|
195
|
+
trackEvent: false,
|
|
196
|
+
perform: (elements, appState, value) => {
|
|
197
|
+
return {
|
|
198
|
+
elements: changeProperty(elements, appState, (el) => newElementWith(el, {
|
|
199
|
+
strokeWidth: value,
|
|
200
|
+
})),
|
|
201
|
+
appState: { ...appState, currentItemStrokeWidth: value },
|
|
202
|
+
commitToHistory: true,
|
|
203
|
+
};
|
|
204
|
+
},
|
|
205
|
+
PanelComponent: ({ elements, appState, updateData }) => (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.strokeWidth") }), _jsx(ButtonIconSelect, { group: "stroke-width", options: [
|
|
206
|
+
{
|
|
207
|
+
value: STROKE_WIDTH.thin,
|
|
208
|
+
text: t("labels.thin"),
|
|
209
|
+
icon: StrokeWidthBaseIcon,
|
|
210
|
+
testId: "strokeWidth-thin",
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
value: STROKE_WIDTH.bold,
|
|
214
|
+
text: t("labels.bold"),
|
|
215
|
+
icon: StrokeWidthBoldIcon,
|
|
216
|
+
testId: "strokeWidth-bold",
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
value: STROKE_WIDTH.extraBold,
|
|
220
|
+
text: t("labels.extraBold"),
|
|
221
|
+
icon: StrokeWidthExtraBoldIcon,
|
|
222
|
+
testId: "strokeWidth-extraBold",
|
|
223
|
+
},
|
|
224
|
+
], value: getFormValue(elements, appState, (element) => element.strokeWidth, (element) => element.hasOwnProperty("strokeWidth"), (hasSelection) => hasSelection ? null : appState.currentItemStrokeWidth), onChange: (value) => updateData(value) })] })),
|
|
225
|
+
});
|
|
226
|
+
export const actionChangeSloppiness = register({
|
|
227
|
+
name: "changeSloppiness",
|
|
228
|
+
trackEvent: false,
|
|
229
|
+
perform: (elements, appState, value) => {
|
|
230
|
+
return {
|
|
231
|
+
elements: changeProperty(elements, appState, (el) => newElementWith(el, {
|
|
232
|
+
seed: randomInteger(),
|
|
233
|
+
roughness: value,
|
|
234
|
+
})),
|
|
235
|
+
appState: { ...appState, currentItemRoughness: value },
|
|
236
|
+
commitToHistory: true,
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
PanelComponent: ({ elements, appState, updateData }) => (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.sloppiness") }), _jsx(ButtonIconSelect, { group: "sloppiness", options: [
|
|
240
|
+
{
|
|
241
|
+
value: 0,
|
|
242
|
+
text: t("labels.architect"),
|
|
243
|
+
icon: SloppinessArchitectIcon,
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
value: 1,
|
|
247
|
+
text: t("labels.artist"),
|
|
248
|
+
icon: SloppinessArtistIcon,
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
value: 2,
|
|
252
|
+
text: t("labels.cartoonist"),
|
|
253
|
+
icon: SloppinessCartoonistIcon,
|
|
254
|
+
},
|
|
255
|
+
], value: getFormValue(elements, appState, (element) => element.roughness, (element) => element.hasOwnProperty("roughness"), (hasSelection) => hasSelection ? null : appState.currentItemRoughness), onChange: (value) => updateData(value) })] })),
|
|
256
|
+
});
|
|
257
|
+
export const actionChangeStrokeStyle = register({
|
|
258
|
+
name: "changeStrokeStyle",
|
|
259
|
+
trackEvent: false,
|
|
260
|
+
perform: (elements, appState, value) => {
|
|
261
|
+
return {
|
|
262
|
+
elements: changeProperty(elements, appState, (el) => newElementWith(el, {
|
|
263
|
+
strokeStyle: value,
|
|
264
|
+
})),
|
|
265
|
+
appState: { ...appState, currentItemStrokeStyle: value },
|
|
266
|
+
commitToHistory: true,
|
|
267
|
+
};
|
|
268
|
+
},
|
|
269
|
+
PanelComponent: ({ elements, appState, updateData }) => (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.strokeStyle") }), _jsx(ButtonIconSelect, { group: "strokeStyle", options: [
|
|
270
|
+
{
|
|
271
|
+
value: "solid",
|
|
272
|
+
text: t("labels.strokeStyle_solid"),
|
|
273
|
+
icon: StrokeWidthBaseIcon,
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
value: "dashed",
|
|
277
|
+
text: t("labels.strokeStyle_dashed"),
|
|
278
|
+
icon: StrokeStyleDashedIcon,
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
value: "dotted",
|
|
282
|
+
text: t("labels.strokeStyle_dotted"),
|
|
283
|
+
icon: StrokeStyleDottedIcon,
|
|
284
|
+
},
|
|
285
|
+
], value: getFormValue(elements, appState, (element) => element.strokeStyle, (element) => element.hasOwnProperty("strokeStyle"), (hasSelection) => hasSelection ? null : appState.currentItemStrokeStyle), onChange: (value) => updateData(value) })] })),
|
|
286
|
+
});
|
|
287
|
+
export const actionChangeOpacity = register({
|
|
288
|
+
name: "changeOpacity",
|
|
289
|
+
trackEvent: false,
|
|
290
|
+
perform: (elements, appState, value) => {
|
|
291
|
+
return {
|
|
292
|
+
elements: changeProperty(elements, appState, (el) => newElementWith(el, {
|
|
293
|
+
opacity: value,
|
|
294
|
+
}), true),
|
|
295
|
+
appState: { ...appState, currentItemOpacity: value },
|
|
296
|
+
commitToHistory: true,
|
|
297
|
+
};
|
|
298
|
+
},
|
|
299
|
+
PanelComponent: ({ elements, appState, updateData }) => (_jsxs("label", { className: "control-label", children: [t("labels.opacity"), _jsx("input", { type: "range", min: "0", max: "100", step: "10", onChange: (event) => updateData(+event.target.value), value: getFormValue(elements, appState, (element) => element.opacity, true, appState.currentItemOpacity) ?? undefined })] })),
|
|
300
|
+
});
|
|
301
|
+
export const actionChangeFontSize = register({
|
|
302
|
+
name: "changeFontSize",
|
|
303
|
+
trackEvent: false,
|
|
304
|
+
perform: (elements, appState, value) => {
|
|
305
|
+
return changeFontSize(elements, appState, () => value, value);
|
|
306
|
+
},
|
|
307
|
+
PanelComponent: ({ elements, appState, updateData }) => (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.fontSize") }), _jsx(ButtonIconSelect, { group: "font-size", options: [
|
|
308
|
+
{
|
|
309
|
+
value: 16,
|
|
310
|
+
text: t("labels.small"),
|
|
311
|
+
icon: FontSizeSmallIcon,
|
|
312
|
+
testId: "fontSize-small",
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
value: 20,
|
|
316
|
+
text: t("labels.medium"),
|
|
317
|
+
icon: FontSizeMediumIcon,
|
|
318
|
+
testId: "fontSize-medium",
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
value: 28,
|
|
322
|
+
text: t("labels.large"),
|
|
323
|
+
icon: FontSizeLargeIcon,
|
|
324
|
+
testId: "fontSize-large",
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
value: 36,
|
|
328
|
+
text: t("labels.veryLarge"),
|
|
329
|
+
icon: FontSizeExtraLargeIcon,
|
|
330
|
+
testId: "fontSize-veryLarge",
|
|
331
|
+
},
|
|
332
|
+
], value: getFormValue(elements, appState, (element) => {
|
|
333
|
+
if (isTextElement(element)) {
|
|
334
|
+
return element.fontSize;
|
|
335
|
+
}
|
|
336
|
+
const boundTextElement = getBoundTextElement(element);
|
|
337
|
+
if (boundTextElement) {
|
|
338
|
+
return boundTextElement.fontSize;
|
|
339
|
+
}
|
|
340
|
+
return null;
|
|
341
|
+
}, (element) => isTextElement(element) || getBoundTextElement(element) !== null, (hasSelection) => hasSelection
|
|
342
|
+
? null
|
|
343
|
+
: appState.currentItemFontSize || DEFAULT_FONT_SIZE), onChange: (value) => updateData(value) })] })),
|
|
344
|
+
});
|
|
345
|
+
export const actionDecreaseFontSize = register({
|
|
346
|
+
name: "decreaseFontSize",
|
|
347
|
+
trackEvent: false,
|
|
348
|
+
perform: (elements, appState, value) => {
|
|
349
|
+
return changeFontSize(elements, appState, (element) => Math.round(
|
|
350
|
+
// get previous value before relative increase (doesn't work fully
|
|
351
|
+
// due to rounding and float precision issues)
|
|
352
|
+
(1 / (1 + FONT_SIZE_RELATIVE_INCREASE_STEP)) * element.fontSize));
|
|
353
|
+
},
|
|
354
|
+
keyTest: (event) => {
|
|
355
|
+
return (event[KEYS.CTRL_OR_CMD] &&
|
|
356
|
+
event.shiftKey &&
|
|
357
|
+
// KEYS.COMMA needed for MacOS
|
|
358
|
+
(event.key === KEYS.CHEVRON_LEFT || event.key === KEYS.COMMA));
|
|
359
|
+
},
|
|
360
|
+
});
|
|
361
|
+
export const actionIncreaseFontSize = register({
|
|
362
|
+
name: "increaseFontSize",
|
|
363
|
+
trackEvent: false,
|
|
364
|
+
perform: (elements, appState, value) => {
|
|
365
|
+
return changeFontSize(elements, appState, (element) => Math.round(element.fontSize * (1 + FONT_SIZE_RELATIVE_INCREASE_STEP)));
|
|
366
|
+
},
|
|
367
|
+
keyTest: (event) => {
|
|
368
|
+
return (event[KEYS.CTRL_OR_CMD] &&
|
|
369
|
+
event.shiftKey &&
|
|
370
|
+
// KEYS.PERIOD needed for MacOS
|
|
371
|
+
(event.key === KEYS.CHEVRON_RIGHT || event.key === KEYS.PERIOD));
|
|
372
|
+
},
|
|
373
|
+
});
|
|
374
|
+
export const actionChangeFontFamily = register({
|
|
375
|
+
name: "changeFontFamily",
|
|
376
|
+
trackEvent: false,
|
|
377
|
+
perform: (elements, appState, value) => {
|
|
378
|
+
return {
|
|
379
|
+
elements: changeProperty(elements, appState, (oldElement) => {
|
|
380
|
+
if (isTextElement(oldElement)) {
|
|
381
|
+
const newElement = newElementWith(oldElement, {
|
|
382
|
+
fontFamily: value,
|
|
383
|
+
lineHeight: getDefaultLineHeight(value),
|
|
384
|
+
});
|
|
385
|
+
redrawTextBoundingBox(newElement, getContainerElement(oldElement));
|
|
386
|
+
return newElement;
|
|
387
|
+
}
|
|
388
|
+
return oldElement;
|
|
389
|
+
}, true),
|
|
390
|
+
appState: {
|
|
391
|
+
...appState,
|
|
392
|
+
currentItemFontFamily: value,
|
|
393
|
+
},
|
|
394
|
+
commitToHistory: true,
|
|
395
|
+
};
|
|
396
|
+
},
|
|
397
|
+
PanelComponent: ({ elements, appState, updateData }) => {
|
|
398
|
+
const options = [
|
|
399
|
+
{
|
|
400
|
+
value: FONT_FAMILY.Virgil,
|
|
401
|
+
text: t("labels.handDrawn"),
|
|
402
|
+
icon: FreedrawIcon,
|
|
403
|
+
testId: "font-family-virgil",
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
value: FONT_FAMILY.Helvetica,
|
|
407
|
+
text: t("labels.normal"),
|
|
408
|
+
icon: FontFamilyNormalIcon,
|
|
409
|
+
testId: "font-family-normal",
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
value: FONT_FAMILY.Cascadia,
|
|
413
|
+
text: t("labels.code"),
|
|
414
|
+
icon: FontFamilyCodeIcon,
|
|
415
|
+
testId: "font-family-code",
|
|
416
|
+
},
|
|
417
|
+
];
|
|
418
|
+
return (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.fontFamily") }), _jsx(ButtonIconSelect, { group: "font-family", options: options, value: getFormValue(elements, appState, (element) => {
|
|
419
|
+
if (isTextElement(element)) {
|
|
420
|
+
return element.fontFamily;
|
|
421
|
+
}
|
|
422
|
+
const boundTextElement = getBoundTextElement(element);
|
|
423
|
+
if (boundTextElement) {
|
|
424
|
+
return boundTextElement.fontFamily;
|
|
425
|
+
}
|
|
426
|
+
return null;
|
|
427
|
+
}, (element) => isTextElement(element) || getBoundTextElement(element) !== null, (hasSelection) => hasSelection
|
|
428
|
+
? null
|
|
429
|
+
: appState.currentItemFontFamily || DEFAULT_FONT_FAMILY), onChange: (value) => updateData(value) })] }));
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
export const actionChangeTextAlign = register({
|
|
433
|
+
name: "changeTextAlign",
|
|
434
|
+
trackEvent: false,
|
|
435
|
+
perform: (elements, appState, value) => {
|
|
436
|
+
return {
|
|
437
|
+
elements: changeProperty(elements, appState, (oldElement) => {
|
|
438
|
+
if (isTextElement(oldElement)) {
|
|
439
|
+
const newElement = newElementWith(oldElement, { textAlign: value });
|
|
440
|
+
redrawTextBoundingBox(newElement, getContainerElement(oldElement));
|
|
441
|
+
return newElement;
|
|
442
|
+
}
|
|
443
|
+
return oldElement;
|
|
444
|
+
}, true),
|
|
445
|
+
appState: {
|
|
446
|
+
...appState,
|
|
447
|
+
currentItemTextAlign: value,
|
|
448
|
+
},
|
|
449
|
+
commitToHistory: true,
|
|
450
|
+
};
|
|
451
|
+
},
|
|
452
|
+
PanelComponent: ({ elements, appState, updateData }) => {
|
|
453
|
+
return (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.textAlign") }), _jsx(ButtonIconSelect, { group: "text-align", options: [
|
|
454
|
+
{
|
|
455
|
+
value: "left",
|
|
456
|
+
text: t("labels.left"),
|
|
457
|
+
icon: TextAlignLeftIcon,
|
|
458
|
+
testId: "align-left",
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
value: "center",
|
|
462
|
+
text: t("labels.center"),
|
|
463
|
+
icon: TextAlignCenterIcon,
|
|
464
|
+
testId: "align-horizontal-center",
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
value: "right",
|
|
468
|
+
text: t("labels.right"),
|
|
469
|
+
icon: TextAlignRightIcon,
|
|
470
|
+
testId: "align-right",
|
|
471
|
+
},
|
|
472
|
+
], value: getFormValue(elements, appState, (element) => {
|
|
473
|
+
if (isTextElement(element)) {
|
|
474
|
+
return element.textAlign;
|
|
475
|
+
}
|
|
476
|
+
const boundTextElement = getBoundTextElement(element);
|
|
477
|
+
if (boundTextElement) {
|
|
478
|
+
return boundTextElement.textAlign;
|
|
479
|
+
}
|
|
480
|
+
return null;
|
|
481
|
+
}, (element) => isTextElement(element) || getBoundTextElement(element) !== null, (hasSelection) => hasSelection ? null : appState.currentItemTextAlign), onChange: (value) => updateData(value) })] }));
|
|
482
|
+
},
|
|
483
|
+
});
|
|
484
|
+
export const actionChangeVerticalAlign = register({
|
|
485
|
+
name: "changeVerticalAlign",
|
|
486
|
+
trackEvent: { category: "element" },
|
|
487
|
+
perform: (elements, appState, value) => {
|
|
488
|
+
return {
|
|
489
|
+
elements: changeProperty(elements, appState, (oldElement) => {
|
|
490
|
+
if (isTextElement(oldElement)) {
|
|
491
|
+
const newElement = newElementWith(oldElement, { verticalAlign: value });
|
|
492
|
+
redrawTextBoundingBox(newElement, getContainerElement(oldElement));
|
|
493
|
+
return newElement;
|
|
494
|
+
}
|
|
495
|
+
return oldElement;
|
|
496
|
+
}, true),
|
|
497
|
+
appState: {
|
|
498
|
+
...appState,
|
|
499
|
+
},
|
|
500
|
+
commitToHistory: true,
|
|
501
|
+
};
|
|
502
|
+
},
|
|
503
|
+
PanelComponent: ({ elements, appState, updateData }) => {
|
|
504
|
+
return (_jsx("fieldset", { children: _jsx(ButtonIconSelect, { group: "text-align", options: [
|
|
505
|
+
{
|
|
506
|
+
value: VERTICAL_ALIGN.TOP,
|
|
507
|
+
text: t("labels.alignTop"),
|
|
508
|
+
icon: _jsx(TextAlignTopIcon, { theme: appState.theme }),
|
|
509
|
+
testId: "align-top",
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
value: VERTICAL_ALIGN.MIDDLE,
|
|
513
|
+
text: t("labels.centerVertically"),
|
|
514
|
+
icon: _jsx(TextAlignMiddleIcon, { theme: appState.theme }),
|
|
515
|
+
testId: "align-middle",
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
value: VERTICAL_ALIGN.BOTTOM,
|
|
519
|
+
text: t("labels.alignBottom"),
|
|
520
|
+
icon: _jsx(TextAlignBottomIcon, { theme: appState.theme }),
|
|
521
|
+
testId: "align-bottom",
|
|
522
|
+
},
|
|
523
|
+
], value: getFormValue(elements, appState, (element) => {
|
|
524
|
+
if (isTextElement(element) && element.containerId) {
|
|
525
|
+
return element.verticalAlign;
|
|
526
|
+
}
|
|
527
|
+
const boundTextElement = getBoundTextElement(element);
|
|
528
|
+
if (boundTextElement) {
|
|
529
|
+
return boundTextElement.verticalAlign;
|
|
530
|
+
}
|
|
531
|
+
return null;
|
|
532
|
+
}, (element) => isTextElement(element) || getBoundTextElement(element) !== null, (hasSelection) => (hasSelection ? null : VERTICAL_ALIGN.MIDDLE)), onChange: (value) => updateData(value) }) }));
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
export const actionChangeRoundness = register({
|
|
536
|
+
name: "changeRoundness",
|
|
537
|
+
trackEvent: false,
|
|
538
|
+
perform: (elements, appState, value) => {
|
|
539
|
+
return {
|
|
540
|
+
elements: changeProperty(elements, appState, (el) => newElementWith(el, {
|
|
541
|
+
roundness: value === "round"
|
|
542
|
+
? {
|
|
543
|
+
type: isUsingAdaptiveRadius(el.type)
|
|
544
|
+
? ROUNDNESS.ADAPTIVE_RADIUS
|
|
545
|
+
: ROUNDNESS.PROPORTIONAL_RADIUS,
|
|
546
|
+
}
|
|
547
|
+
: null,
|
|
548
|
+
})),
|
|
549
|
+
appState: {
|
|
550
|
+
...appState,
|
|
551
|
+
currentItemRoundness: value,
|
|
552
|
+
},
|
|
553
|
+
commitToHistory: true,
|
|
554
|
+
};
|
|
555
|
+
},
|
|
556
|
+
PanelComponent: ({ elements, appState, updateData }) => {
|
|
557
|
+
const targetElements = getTargetElements(getNonDeletedElements(elements), appState);
|
|
558
|
+
const hasLegacyRoundness = targetElements.some((el) => el.roundness?.type === ROUNDNESS.LEGACY);
|
|
559
|
+
return (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.edges") }), _jsx(ButtonIconSelect, { group: "edges", options: [
|
|
560
|
+
{
|
|
561
|
+
value: "sharp",
|
|
562
|
+
text: t("labels.sharp"),
|
|
563
|
+
icon: EdgeSharpIcon,
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
value: "round",
|
|
567
|
+
text: t("labels.round"),
|
|
568
|
+
icon: EdgeRoundIcon,
|
|
569
|
+
},
|
|
570
|
+
], value: getFormValue(elements, appState, (element) => hasLegacyRoundness ? null : element.roundness ? "round" : "sharp", (element) => element.hasOwnProperty("roundness"), (hasSelection) => hasSelection ? null : appState.currentItemRoundness), onChange: (value) => updateData(value) })] }));
|
|
571
|
+
},
|
|
572
|
+
});
|
|
573
|
+
const getArrowheadOptions = (flip) => {
|
|
574
|
+
return [
|
|
575
|
+
{
|
|
576
|
+
value: null,
|
|
577
|
+
text: t("labels.arrowhead_none"),
|
|
578
|
+
keyBinding: "q",
|
|
579
|
+
icon: ArrowheadNoneIcon,
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
value: "arrow",
|
|
583
|
+
text: t("labels.arrowhead_arrow"),
|
|
584
|
+
keyBinding: "w",
|
|
585
|
+
icon: _jsx(ArrowheadArrowIcon, { flip: flip }),
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
value: "bar",
|
|
589
|
+
text: t("labels.arrowhead_bar"),
|
|
590
|
+
keyBinding: "e",
|
|
591
|
+
icon: _jsx(ArrowheadBarIcon, { flip: flip }),
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
value: "dot",
|
|
595
|
+
text: t("labels.arrowhead_circle"),
|
|
596
|
+
keyBinding: null,
|
|
597
|
+
icon: _jsx(ArrowheadCircleIcon, { flip: flip }),
|
|
598
|
+
showInPicker: false,
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
value: "circle",
|
|
602
|
+
text: t("labels.arrowhead_circle"),
|
|
603
|
+
keyBinding: "r",
|
|
604
|
+
icon: _jsx(ArrowheadCircleIcon, { flip: flip }),
|
|
605
|
+
showInPicker: false,
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
value: "circle_outline",
|
|
609
|
+
text: t("labels.arrowhead_circle_outline"),
|
|
610
|
+
keyBinding: null,
|
|
611
|
+
icon: _jsx(ArrowheadCircleOutlineIcon, { flip: flip }),
|
|
612
|
+
showInPicker: false,
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
value: "triangle",
|
|
616
|
+
text: t("labels.arrowhead_triangle"),
|
|
617
|
+
icon: _jsx(ArrowheadTriangleIcon, { flip: flip }),
|
|
618
|
+
keyBinding: "t",
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
value: "triangle_outline",
|
|
622
|
+
text: t("labels.arrowhead_triangle_outline"),
|
|
623
|
+
icon: _jsx(ArrowheadTriangleOutlineIcon, { flip: flip }),
|
|
624
|
+
keyBinding: null,
|
|
625
|
+
showInPicker: false,
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
value: "diamond",
|
|
629
|
+
text: t("labels.arrowhead_diamond"),
|
|
630
|
+
icon: _jsx(ArrowheadDiamondIcon, { flip: flip }),
|
|
631
|
+
keyBinding: null,
|
|
632
|
+
showInPicker: false,
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
value: "diamond_outline",
|
|
636
|
+
text: t("labels.arrowhead_diamond_outline"),
|
|
637
|
+
icon: _jsx(ArrowheadDiamondOutlineIcon, { flip: flip }),
|
|
638
|
+
keyBinding: null,
|
|
639
|
+
showInPicker: false,
|
|
640
|
+
},
|
|
641
|
+
];
|
|
642
|
+
};
|
|
643
|
+
export const actionChangeArrowhead = register({
|
|
644
|
+
name: "changeArrowhead",
|
|
645
|
+
trackEvent: false,
|
|
646
|
+
perform: (elements, appState, value) => {
|
|
647
|
+
return {
|
|
648
|
+
elements: changeProperty(elements, appState, (el) => {
|
|
649
|
+
if (isLinearElement(el)) {
|
|
650
|
+
const { position, type } = value;
|
|
651
|
+
if (position === "start") {
|
|
652
|
+
const element = newElementWith(el, {
|
|
653
|
+
startArrowhead: type,
|
|
654
|
+
});
|
|
655
|
+
return element;
|
|
656
|
+
}
|
|
657
|
+
else if (position === "end") {
|
|
658
|
+
const element = newElementWith(el, {
|
|
659
|
+
endArrowhead: type,
|
|
660
|
+
});
|
|
661
|
+
return element;
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
return el;
|
|
665
|
+
}),
|
|
666
|
+
appState: {
|
|
667
|
+
...appState,
|
|
668
|
+
[value.position === "start"
|
|
669
|
+
? "currentItemStartArrowhead"
|
|
670
|
+
: "currentItemEndArrowhead"]: value.type,
|
|
671
|
+
},
|
|
672
|
+
commitToHistory: true,
|
|
673
|
+
};
|
|
674
|
+
},
|
|
675
|
+
PanelComponent: ({ elements, appState, updateData }) => {
|
|
676
|
+
const isRTL = getLanguage().rtl;
|
|
677
|
+
return (_jsxs("fieldset", { children: [_jsx("legend", { children: t("labels.arrowheads") }), _jsxs("div", { className: "iconSelectList buttonList", children: [_jsx(IconPicker, { label: "arrowhead_start", options: getArrowheadOptions(!isRTL), value: getFormValue(elements, appState, (element) => isLinearElement(element) && canHaveArrowheads(element.type)
|
|
678
|
+
? element.startArrowhead
|
|
679
|
+
: appState.currentItemStartArrowhead, true, appState.currentItemStartArrowhead), onChange: (value) => updateData({ position: "start", type: value }) }), _jsx(IconPicker, { label: "arrowhead_end", group: "arrowheads", options: getArrowheadOptions(!!isRTL), value: getFormValue(elements, appState, (element) => isLinearElement(element) && canHaveArrowheads(element.type)
|
|
680
|
+
? element.endArrowhead
|
|
681
|
+
: appState.currentItemEndArrowhead, true, appState.currentItemEndArrowhead), onChange: (value) => updateData({ position: "end", type: value }) })] })] }));
|
|
682
|
+
},
|
|
683
|
+
});
|