@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,441 @@
|
|
|
1
|
+
@import "../../css/variables.module.scss";
|
|
2
|
+
|
|
3
|
+
.excalidraw {
|
|
4
|
+
.focus-visible-none {
|
|
5
|
+
&:focus-visible {
|
|
6
|
+
outline: none !important;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.color-picker__heading {
|
|
11
|
+
padding: 0 0.5rem;
|
|
12
|
+
font-size: 0.75rem;
|
|
13
|
+
text-align: left;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.color-picker-container {
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-template-columns: 1fr 20px 1.625rem;
|
|
19
|
+
padding: 0.25rem 0px;
|
|
20
|
+
align-items: center;
|
|
21
|
+
|
|
22
|
+
@include isMobile {
|
|
23
|
+
max-width: 175px;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.color-picker__top-picks {
|
|
28
|
+
display: flex;
|
|
29
|
+
justify-content: space-between;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.color-picker__button {
|
|
33
|
+
--radius: 0.25rem;
|
|
34
|
+
|
|
35
|
+
padding: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
width: 1.35rem;
|
|
38
|
+
height: 1.35rem;
|
|
39
|
+
border: 1px solid var(--color-gray-30);
|
|
40
|
+
border-radius: var(--radius);
|
|
41
|
+
filter: var(--theme-filter);
|
|
42
|
+
background-color: var(--swatch-color);
|
|
43
|
+
background-position: left center;
|
|
44
|
+
position: relative;
|
|
45
|
+
font-family: inherit;
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
|
|
48
|
+
&:hover {
|
|
49
|
+
&::after {
|
|
50
|
+
content: "";
|
|
51
|
+
position: absolute;
|
|
52
|
+
top: -2px;
|
|
53
|
+
left: -2px;
|
|
54
|
+
right: -2px;
|
|
55
|
+
bottom: -2px;
|
|
56
|
+
box-shadow: 0 0 0 1px var(--color-gray-30);
|
|
57
|
+
border-radius: calc(var(--radius) + 1px);
|
|
58
|
+
filter: var(--theme-filter);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&.active {
|
|
63
|
+
.color-picker__button-outline {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: -2px;
|
|
66
|
+
left: -2px;
|
|
67
|
+
right: -2px;
|
|
68
|
+
bottom: -2px;
|
|
69
|
+
box-shadow: 0 0 0 1px var(--color-primary-darkest);
|
|
70
|
+
z-index: 1; // due hover state so this has preference
|
|
71
|
+
border-radius: calc(var(--radius) + 1px);
|
|
72
|
+
filter: var(--theme-filter);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:focus-visible {
|
|
77
|
+
outline: none;
|
|
78
|
+
|
|
79
|
+
&::after {
|
|
80
|
+
content: "";
|
|
81
|
+
position: absolute;
|
|
82
|
+
top: -4px;
|
|
83
|
+
right: -4px;
|
|
84
|
+
bottom: -4px;
|
|
85
|
+
left: -4px;
|
|
86
|
+
border: 3px solid var(--focus-highlight-color);
|
|
87
|
+
border-radius: calc(var(--radius) + 1px);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.active {
|
|
91
|
+
.color-picker__button-outline {
|
|
92
|
+
display: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&--large {
|
|
98
|
+
--radius: 0.5rem;
|
|
99
|
+
width: 1.875rem;
|
|
100
|
+
height: 1.875rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&.is-transparent {
|
|
104
|
+
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==");
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&--no-focus-visible {
|
|
108
|
+
border: 0;
|
|
109
|
+
&::after {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
&:focus-visible {
|
|
113
|
+
outline: none !important;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&.active-color {
|
|
118
|
+
border-radius: calc(var(--radius) + 1px);
|
|
119
|
+
width: 1.625rem;
|
|
120
|
+
height: 1.625rem;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.color-picker__button__hotkey-label {
|
|
125
|
+
position: absolute;
|
|
126
|
+
right: 4px;
|
|
127
|
+
bottom: 4px;
|
|
128
|
+
filter: none;
|
|
129
|
+
font-size: 11px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.color-picker {
|
|
133
|
+
background: var(--popup-bg-color);
|
|
134
|
+
border: 0 solid transparentize($oc-white, 0.75);
|
|
135
|
+
box-shadow: transparentize($oc-black, 0.75) 0 1px 4px;
|
|
136
|
+
border-radius: 4px;
|
|
137
|
+
position: absolute;
|
|
138
|
+
|
|
139
|
+
:root[dir="ltr"] & {
|
|
140
|
+
left: -5.5px;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
:root[dir="rtl"] & {
|
|
144
|
+
right: -5.5px;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.color-picker-control-container {
|
|
149
|
+
display: grid;
|
|
150
|
+
grid-template-columns: auto 1fr;
|
|
151
|
+
align-items: center;
|
|
152
|
+
column-gap: 0.5rem;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.color-picker-control-container + .popover {
|
|
156
|
+
position: static;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.color-picker-popover-container {
|
|
160
|
+
margin-top: -0.25rem;
|
|
161
|
+
|
|
162
|
+
:root[dir="ltr"] & {
|
|
163
|
+
margin-left: 0.5rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:root[dir="rtl"] & {
|
|
167
|
+
margin-left: -3rem;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.color-picker-triangle {
|
|
172
|
+
width: 0;
|
|
173
|
+
height: 0;
|
|
174
|
+
border-style: solid;
|
|
175
|
+
border-width: 0 9px 10px;
|
|
176
|
+
border-color: transparent transparent var(--popup-bg-color);
|
|
177
|
+
position: absolute;
|
|
178
|
+
top: 10px;
|
|
179
|
+
|
|
180
|
+
:root[dir="ltr"] & {
|
|
181
|
+
transform: rotate(270deg);
|
|
182
|
+
left: -14px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
:root[dir="rtl"] & {
|
|
186
|
+
transform: rotate(90deg);
|
|
187
|
+
right: -14px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.color-picker-triangle-shadow {
|
|
192
|
+
border-color: transparent transparent transparentize($oc-black, 0.9);
|
|
193
|
+
|
|
194
|
+
:root[dir="ltr"] & {
|
|
195
|
+
left: -14px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
:root[dir="rtl"] & {
|
|
199
|
+
right: -16px;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.color-picker-content {
|
|
204
|
+
display: flex;
|
|
205
|
+
flex-direction: column;
|
|
206
|
+
gap: 0.75rem;
|
|
207
|
+
outline: none;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.color-picker-content--default {
|
|
211
|
+
padding: 0.5rem;
|
|
212
|
+
display: grid;
|
|
213
|
+
grid-template-columns: repeat(5, 1.875rem);
|
|
214
|
+
grid-gap: 0.25rem;
|
|
215
|
+
border-radius: 4px;
|
|
216
|
+
|
|
217
|
+
&:focus {
|
|
218
|
+
outline: none;
|
|
219
|
+
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.color-picker-content--canvas {
|
|
224
|
+
display: flex;
|
|
225
|
+
flex-direction: column;
|
|
226
|
+
padding: 0.25rem;
|
|
227
|
+
|
|
228
|
+
&-title {
|
|
229
|
+
color: $oc-gray-6;
|
|
230
|
+
font-size: 12px;
|
|
231
|
+
padding: 0 0.25rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&-colors {
|
|
235
|
+
padding: 0.5rem 0;
|
|
236
|
+
|
|
237
|
+
.color-picker-swatch {
|
|
238
|
+
margin: 0 0.25rem;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.color-picker-content .color-input-container {
|
|
244
|
+
grid-column: 1 / span 5;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.color-picker-swatch {
|
|
248
|
+
position: relative;
|
|
249
|
+
height: 1.875rem;
|
|
250
|
+
width: 1.875rem;
|
|
251
|
+
cursor: pointer;
|
|
252
|
+
border-radius: 4px;
|
|
253
|
+
margin: 0;
|
|
254
|
+
box-sizing: border-box;
|
|
255
|
+
border: 1px solid #ddd;
|
|
256
|
+
background-color: currentColor !important;
|
|
257
|
+
filter: var(--theme-filter);
|
|
258
|
+
|
|
259
|
+
&:focus {
|
|
260
|
+
/* TODO: only show the border when the color is too light to see as a shadow */
|
|
261
|
+
box-shadow: 0 0 4px 1px currentColor;
|
|
262
|
+
border-color: var(--select-highlight-color);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.color-picker-transparent {
|
|
267
|
+
border-radius: 4px;
|
|
268
|
+
box-shadow: transparentize($oc-black, 0.9) 0 0 0 1px inset;
|
|
269
|
+
position: absolute;
|
|
270
|
+
top: 0;
|
|
271
|
+
right: 0;
|
|
272
|
+
bottom: 0;
|
|
273
|
+
left: 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.color-picker-transparent,
|
|
277
|
+
.color-picker-label-swatch {
|
|
278
|
+
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
|
|
279
|
+
left center;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.color-picker-hash {
|
|
283
|
+
height: var(--default-button-size);
|
|
284
|
+
flex-shrink: 0;
|
|
285
|
+
padding: 0.5rem 0.5rem 0.5rem 0.75rem;
|
|
286
|
+
border: 1px solid var(--default-border-color);
|
|
287
|
+
border-right: 0;
|
|
288
|
+
box-sizing: border-box;
|
|
289
|
+
|
|
290
|
+
:root[dir="ltr"] & {
|
|
291
|
+
border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
:root[dir="rtl"] & {
|
|
295
|
+
border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
|
|
296
|
+
border-right: 1px solid var(--default-border-color);
|
|
297
|
+
border-left: 0;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
color: var(--input-label-color);
|
|
301
|
+
display: flex;
|
|
302
|
+
align-items: center;
|
|
303
|
+
justify-content: center;
|
|
304
|
+
position: relative;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.color-input-container {
|
|
308
|
+
display: flex;
|
|
309
|
+
|
|
310
|
+
&:focus-within {
|
|
311
|
+
box-shadow: 0 0 0 1px var(--color-primary-darkest);
|
|
312
|
+
border-radius: var(--border-radius-lg);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.color-picker__input-label {
|
|
317
|
+
display: grid;
|
|
318
|
+
grid-template-columns: auto 1fr auto auto;
|
|
319
|
+
gap: 8px;
|
|
320
|
+
align-items: center;
|
|
321
|
+
border: 1px solid var(--default-border-color);
|
|
322
|
+
border-radius: 8px;
|
|
323
|
+
padding: 0 12px;
|
|
324
|
+
margin: 8px;
|
|
325
|
+
box-sizing: border-box;
|
|
326
|
+
|
|
327
|
+
&:focus-within {
|
|
328
|
+
box-shadow: 0 0 0 1px var(--color-primary-darkest);
|
|
329
|
+
border-radius: var(--border-radius-lg);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.color-picker__input-hash {
|
|
334
|
+
padding: 0 0.25rem;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.color-picker-input {
|
|
338
|
+
box-sizing: border-box;
|
|
339
|
+
width: 100%;
|
|
340
|
+
margin: 0;
|
|
341
|
+
font-size: 0.875rem;
|
|
342
|
+
font-family: inherit;
|
|
343
|
+
background-color: transparent;
|
|
344
|
+
color: var(--text-primary-color);
|
|
345
|
+
border: 0;
|
|
346
|
+
outline: none;
|
|
347
|
+
height: var(--default-button-size);
|
|
348
|
+
border: 1px solid var(--default-border-color);
|
|
349
|
+
border-left: 0;
|
|
350
|
+
letter-spacing: 0.4px;
|
|
351
|
+
|
|
352
|
+
:root[dir="ltr"] & {
|
|
353
|
+
border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
:root[dir="rtl"] & {
|
|
357
|
+
border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
|
|
358
|
+
border-left: 1px solid var(--default-border-color);
|
|
359
|
+
border-right: 0;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
padding: 0.5rem;
|
|
363
|
+
padding-left: 0.25rem;
|
|
364
|
+
appearance: none;
|
|
365
|
+
|
|
366
|
+
&:focus-visible {
|
|
367
|
+
box-shadow: none;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.color-picker-label-swatch-container {
|
|
372
|
+
border: 1px solid var(--default-border-color);
|
|
373
|
+
border-radius: var(--border-radius-lg);
|
|
374
|
+
width: var(--default-button-size);
|
|
375
|
+
height: var(--default-button-size);
|
|
376
|
+
box-sizing: border-box;
|
|
377
|
+
overflow: hidden;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.color-picker-label-swatch {
|
|
381
|
+
@include outlineButtonStyles;
|
|
382
|
+
background-color: var(--swatch-color) !important;
|
|
383
|
+
overflow: hidden;
|
|
384
|
+
position: relative;
|
|
385
|
+
filter: var(--theme-filter);
|
|
386
|
+
border: 0 !important;
|
|
387
|
+
|
|
388
|
+
&:after {
|
|
389
|
+
content: "";
|
|
390
|
+
position: absolute;
|
|
391
|
+
top: 0;
|
|
392
|
+
left: 0;
|
|
393
|
+
width: 100%;
|
|
394
|
+
height: 100%;
|
|
395
|
+
background: var(--swatch-color);
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.color-picker-keybinding {
|
|
400
|
+
position: absolute;
|
|
401
|
+
bottom: 2px;
|
|
402
|
+
font-size: 0.7em;
|
|
403
|
+
|
|
404
|
+
:root[dir="ltr"] & {
|
|
405
|
+
right: 2px;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
:root[dir="rtl"] & {
|
|
409
|
+
left: 2px;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
@include isMobile {
|
|
413
|
+
display: none;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.color-picker-type-canvasBackground .color-picker-keybinding {
|
|
418
|
+
color: #aaa;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.color-picker-type-elementBackground .color-picker-keybinding {
|
|
422
|
+
color: $oc-white;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.color-picker-swatch[aria-label="transparent"] .color-picker-keybinding {
|
|
426
|
+
color: #aaa;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.color-picker-type-elementStroke .color-picker-keybinding {
|
|
430
|
+
color: #d4d4d4;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
&.theme--dark {
|
|
434
|
+
.color-picker-type-elementBackground .color-picker-keybinding {
|
|
435
|
+
color: $oc-black;
|
|
436
|
+
}
|
|
437
|
+
.color-picker-swatch[aria-label="transparent"] .color-picker-keybinding {
|
|
438
|
+
color: $oc-black;
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { useAtom } from "jotai";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import { activeColorPickerSectionAtom } from "./colorPickerUtils";
|
|
6
|
+
import HotkeyLabel from "./HotkeyLabel";
|
|
7
|
+
export const CustomColorList = ({ colors, color, onChange, label, }) => {
|
|
8
|
+
const [activeColorPickerSection, setActiveColorPickerSection] = useAtom(activeColorPickerSectionAtom);
|
|
9
|
+
const btnRef = useRef(null);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
if (btnRef.current) {
|
|
12
|
+
btnRef.current.focus();
|
|
13
|
+
}
|
|
14
|
+
}, [color, activeColorPickerSection]);
|
|
15
|
+
return (_jsx("div", { className: "color-picker-content--default", children: colors.map((c, i) => {
|
|
16
|
+
return (_jsxs("button", { ref: color === c ? btnRef : undefined, tabIndex: -1, type: "button", className: clsx("color-picker__button color-picker__button--large", {
|
|
17
|
+
active: color === c,
|
|
18
|
+
"is-transparent": c === "transparent" || !c,
|
|
19
|
+
}), onClick: () => {
|
|
20
|
+
onChange(c);
|
|
21
|
+
setActiveColorPickerSection("custom");
|
|
22
|
+
}, title: c, "aria-label": label, style: { "--swatch-color": c }, children: [_jsx("div", { className: "color-picker__button-outline" }), _jsx(HotkeyLabel, { color: c, keyLabel: i + 1, isCustomColor: true })] }, i));
|
|
23
|
+
}) }));
|
|
24
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { getContrastYIQ } from "./colorPickerUtils";
|
|
3
|
+
const HotkeyLabel = ({ color, keyLabel, isCustomColor = false, isShade = false, }) => {
|
|
4
|
+
return (_jsxs("div", { className: "color-picker__button__hotkey-label", style: {
|
|
5
|
+
color: getContrastYIQ(color, isCustomColor),
|
|
6
|
+
}, children: [isShade && "⇧", keyLabel] }));
|
|
7
|
+
};
|
|
8
|
+
export default HotkeyLabel;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { t } from "../../i18n";
|
|
4
|
+
import { ShadeList } from "./ShadeList";
|
|
5
|
+
import PickerColorList from "./PickerColorList";
|
|
6
|
+
import { useAtom } from "jotai";
|
|
7
|
+
import { CustomColorList } from "./CustomColorList";
|
|
8
|
+
import { colorPickerKeyNavHandler } from "./keyboardNavHandlers";
|
|
9
|
+
import PickerHeading from "./PickerHeading";
|
|
10
|
+
import { activeColorPickerSectionAtom, getColorNameAndShadeFromColor, getMostUsedCustomColors, isCustomColor, } from "./colorPickerUtils";
|
|
11
|
+
import { DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX, DEFAULT_ELEMENT_STROKE_COLOR_INDEX, } from "../../colors";
|
|
12
|
+
import { KEYS } from "../../keys";
|
|
13
|
+
import { EVENT } from "../../constants";
|
|
14
|
+
export const Picker = ({ color, onChange, label, type, elements, palette, updateData, children, onEyeDropperToggle, onEscape, }) => {
|
|
15
|
+
const [customColors] = React.useState(() => {
|
|
16
|
+
if (type === "canvasBackground") {
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
return getMostUsedCustomColors(elements, type, palette);
|
|
20
|
+
});
|
|
21
|
+
const [activeColorPickerSection, setActiveColorPickerSection] = useAtom(activeColorPickerSectionAtom);
|
|
22
|
+
const colorObj = getColorNameAndShadeFromColor({
|
|
23
|
+
color,
|
|
24
|
+
palette,
|
|
25
|
+
});
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (!activeColorPickerSection) {
|
|
28
|
+
const isCustom = isCustomColor({ color, palette });
|
|
29
|
+
const isCustomButNotInList = isCustom && !customColors.includes(color);
|
|
30
|
+
setActiveColorPickerSection(isCustomButNotInList
|
|
31
|
+
? "hex"
|
|
32
|
+
: isCustom
|
|
33
|
+
? "custom"
|
|
34
|
+
: colorObj?.shade != null
|
|
35
|
+
? "shades"
|
|
36
|
+
: "baseColors");
|
|
37
|
+
}
|
|
38
|
+
}, [
|
|
39
|
+
activeColorPickerSection,
|
|
40
|
+
color,
|
|
41
|
+
palette,
|
|
42
|
+
setActiveColorPickerSection,
|
|
43
|
+
colorObj,
|
|
44
|
+
customColors,
|
|
45
|
+
]);
|
|
46
|
+
const [activeShade, setActiveShade] = useState(colorObj?.shade ??
|
|
47
|
+
(type === "elementBackground"
|
|
48
|
+
? DEFAULT_ELEMENT_BACKGROUND_COLOR_INDEX
|
|
49
|
+
: DEFAULT_ELEMENT_STROKE_COLOR_INDEX));
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (colorObj?.shade != null) {
|
|
52
|
+
setActiveShade(colorObj.shade);
|
|
53
|
+
}
|
|
54
|
+
const keyup = (event) => {
|
|
55
|
+
if (event.key === KEYS.ALT) {
|
|
56
|
+
onEyeDropperToggle(false);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
document.addEventListener(EVENT.KEYUP, keyup, { capture: true });
|
|
60
|
+
return () => {
|
|
61
|
+
document.removeEventListener(EVENT.KEYUP, keyup, { capture: true });
|
|
62
|
+
};
|
|
63
|
+
}, [colorObj, onEyeDropperToggle]);
|
|
64
|
+
const pickerRef = React.useRef(null);
|
|
65
|
+
return (_jsx("div", { role: "dialog", "aria-modal": "true", "aria-label": t("labels.colorPicker"), children: _jsxs("div", { ref: pickerRef, onKeyDown: (event) => {
|
|
66
|
+
const handled = colorPickerKeyNavHandler({
|
|
67
|
+
event,
|
|
68
|
+
activeColorPickerSection,
|
|
69
|
+
palette,
|
|
70
|
+
color,
|
|
71
|
+
onChange,
|
|
72
|
+
onEyeDropperToggle,
|
|
73
|
+
customColors,
|
|
74
|
+
setActiveColorPickerSection,
|
|
75
|
+
updateData,
|
|
76
|
+
activeShade,
|
|
77
|
+
onEscape,
|
|
78
|
+
});
|
|
79
|
+
if (handled) {
|
|
80
|
+
event.preventDefault();
|
|
81
|
+
event.stopPropagation();
|
|
82
|
+
}
|
|
83
|
+
}, className: "color-picker-content",
|
|
84
|
+
// to allow focusing by clicking but not by tabbing
|
|
85
|
+
tabIndex: -1, children: [!!customColors.length && (_jsxs("div", { children: [_jsx(PickerHeading, { children: t("colorPicker.mostUsedCustomColors") }), _jsx(CustomColorList, { colors: customColors, color: color, label: t("colorPicker.mostUsedCustomColors"), onChange: onChange })] })), _jsxs("div", { children: [_jsx(PickerHeading, { children: t("colorPicker.colors") }), _jsx(PickerColorList, { color: color, label: label, palette: palette, onChange: onChange, activeShade: activeShade })] }), _jsxs("div", { children: [_jsx(PickerHeading, { children: t("colorPicker.shades") }), _jsx(ShadeList, { hex: color, onChange: onChange, palette: palette })] }), children] }) }));
|
|
86
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { useAtom } from "jotai";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import { activeColorPickerSectionAtom, colorPickerHotkeyBindings, getColorNameAndShadeFromColor, } from "./colorPickerUtils";
|
|
6
|
+
import HotkeyLabel from "./HotkeyLabel";
|
|
7
|
+
import { t } from "../../i18n";
|
|
8
|
+
const PickerColorList = ({ palette, color, onChange, label, activeShade, }) => {
|
|
9
|
+
const colorObj = getColorNameAndShadeFromColor({
|
|
10
|
+
color: color || "transparent",
|
|
11
|
+
palette,
|
|
12
|
+
});
|
|
13
|
+
const [activeColorPickerSection, setActiveColorPickerSection] = useAtom(activeColorPickerSectionAtom);
|
|
14
|
+
const btnRef = useRef(null);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (btnRef.current && activeColorPickerSection === "baseColors") {
|
|
17
|
+
btnRef.current.focus();
|
|
18
|
+
}
|
|
19
|
+
}, [colorObj?.colorName, activeColorPickerSection]);
|
|
20
|
+
return (_jsx("div", { className: "color-picker-content--default", children: Object.entries(palette).map(([key, value], index) => {
|
|
21
|
+
const color = (Array.isArray(value) ? value[activeShade] : value) || "transparent";
|
|
22
|
+
const keybinding = colorPickerHotkeyBindings[index];
|
|
23
|
+
const label = t(`colors.${key.replace(/\d+/, "")}`, null, "");
|
|
24
|
+
return (_jsxs("button", { ref: colorObj?.colorName === key ? btnRef : undefined, tabIndex: -1, type: "button", className: clsx("color-picker__button color-picker__button--large", {
|
|
25
|
+
active: colorObj?.colorName === key,
|
|
26
|
+
"is-transparent": color === "transparent" || !color,
|
|
27
|
+
}), onClick: () => {
|
|
28
|
+
onChange(color);
|
|
29
|
+
setActiveColorPickerSection("baseColors");
|
|
30
|
+
}, title: `${label}${color.startsWith("#") ? ` ${color}` : ""} — ${keybinding}`, "aria-label": `${label} — ${keybinding}`, style: color ? { "--swatch-color": color } : undefined, "data-testid": `color-${key}`, children: [_jsx("div", { className: "color-picker__button-outline" }), _jsx(HotkeyLabel, { color: color, keyLabel: keybinding })] }, key));
|
|
31
|
+
}) }));
|
|
32
|
+
};
|
|
33
|
+
export default PickerColorList;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { useAtom } from "jotai";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import { activeColorPickerSectionAtom, getColorNameAndShadeFromColor, } from "./colorPickerUtils";
|
|
6
|
+
import HotkeyLabel from "./HotkeyLabel";
|
|
7
|
+
import { t } from "../../i18n";
|
|
8
|
+
export const ShadeList = ({ hex, onChange, palette }) => {
|
|
9
|
+
const colorObj = getColorNameAndShadeFromColor({
|
|
10
|
+
color: hex || "transparent",
|
|
11
|
+
palette,
|
|
12
|
+
});
|
|
13
|
+
const [activeColorPickerSection, setActiveColorPickerSection] = useAtom(activeColorPickerSectionAtom);
|
|
14
|
+
const btnRef = useRef(null);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (btnRef.current && activeColorPickerSection === "shades") {
|
|
17
|
+
btnRef.current.focus();
|
|
18
|
+
}
|
|
19
|
+
}, [colorObj, activeColorPickerSection]);
|
|
20
|
+
if (colorObj) {
|
|
21
|
+
const { colorName, shade } = colorObj;
|
|
22
|
+
const shades = palette[colorName];
|
|
23
|
+
if (Array.isArray(shades)) {
|
|
24
|
+
return (_jsx("div", { className: "color-picker-content--default shades", children: shades.map((color, i) => (_jsxs("button", { ref: i === shade && activeColorPickerSection === "shades"
|
|
25
|
+
? btnRef
|
|
26
|
+
: undefined, tabIndex: -1, type: "button", className: clsx("color-picker__button color-picker__button--large", { active: i === shade }), "aria-label": "Shade", title: `${colorName} - ${i + 1}`, style: color ? { "--swatch-color": color } : undefined, onClick: () => {
|
|
27
|
+
onChange(color);
|
|
28
|
+
setActiveColorPickerSection("shades");
|
|
29
|
+
}, children: [_jsx("div", { className: "color-picker__button-outline" }), _jsx(HotkeyLabel, { color: color, keyLabel: i + 1, isShade: true })] }, i))) }));
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return (_jsxs("div", { className: "color-picker-content--default", style: { position: "relative" }, tabIndex: -1, children: [_jsx("button", { type: "button", tabIndex: -1, className: "color-picker__button color-picker__button--large color-picker__button--no-focus-visible" }), _jsx("div", { tabIndex: -1, style: {
|
|
33
|
+
position: "absolute",
|
|
34
|
+
top: 0,
|
|
35
|
+
left: 0,
|
|
36
|
+
right: 0,
|
|
37
|
+
bottom: 0,
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
justifyContent: "center",
|
|
41
|
+
textAlign: "center",
|
|
42
|
+
fontSize: "0.75rem",
|
|
43
|
+
}, children: t("colorPicker.noShades") })] }));
|
|
44
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import { DEFAULT_CANVAS_BACKGROUND_PICKS, DEFAULT_ELEMENT_BACKGROUND_PICKS, DEFAULT_ELEMENT_STROKE_PICKS, } from "../../colors";
|
|
4
|
+
export const TopPicks = ({ onChange, type, activeColor, topPicks, }) => {
|
|
5
|
+
let colors;
|
|
6
|
+
if (type === "elementStroke") {
|
|
7
|
+
colors = DEFAULT_ELEMENT_STROKE_PICKS;
|
|
8
|
+
}
|
|
9
|
+
if (type === "elementBackground") {
|
|
10
|
+
colors = DEFAULT_ELEMENT_BACKGROUND_PICKS;
|
|
11
|
+
}
|
|
12
|
+
if (type === "canvasBackground") {
|
|
13
|
+
colors = DEFAULT_CANVAS_BACKGROUND_PICKS;
|
|
14
|
+
}
|
|
15
|
+
// this one can overwrite defaults
|
|
16
|
+
if (topPicks) {
|
|
17
|
+
colors = topPicks;
|
|
18
|
+
}
|
|
19
|
+
if (!colors) {
|
|
20
|
+
console.error("Invalid type for TopPicks");
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
return (_jsx("div", { className: "color-picker__top-picks", children: colors.map((color) => (_jsx("button", { className: clsx("color-picker__button", {
|
|
24
|
+
active: color === activeColor,
|
|
25
|
+
"is-transparent": color === "transparent" || !color,
|
|
26
|
+
}), style: { "--swatch-color": color }, type: "button", title: color, onClick: () => onChange(color), "data-testid": `color-top-pick-${color}`, children: _jsx("div", { className: "color-picker__button-outline" }) }, color))) }));
|
|
27
|
+
};
|