@excalidraw/excalidraw 0.17.1-7441-e31f307 → 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-PJT4QCRY.js → chunk-LZCCI7PN.js} +4 -4
- package/dist/browser/excalidraw-assets/{image-KZSI6GAB.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 -6
- package/dist/index.css +0 -5796
- package/dist/index.js +0 -71305
- /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,214 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
3
|
+
import OpenColor from "open-color";
|
|
4
|
+
import { Dialog } from "./Dialog";
|
|
5
|
+
import { t } from "../i18n";
|
|
6
|
+
import Trans from "./Trans";
|
|
7
|
+
import { exportToCanvas, exportToSvg } from "../../utils/export";
|
|
8
|
+
import { EDITOR_LS_KEYS, EXPORT_DATA_TYPES, EXPORT_SOURCE, MIME_TYPES, VERSIONS, } from "../constants";
|
|
9
|
+
import { canvasToBlob, resizeImageFile } from "../data/blob";
|
|
10
|
+
import { chunk } from "../utils";
|
|
11
|
+
import DialogActionButton from "./DialogActionButton";
|
|
12
|
+
import { CloseIcon } from "./icons";
|
|
13
|
+
import { ToolButton } from "./ToolButton";
|
|
14
|
+
import { EditorLocalStorage } from "../data/EditorLocalStorage";
|
|
15
|
+
import "./PublishLibrary.scss";
|
|
16
|
+
const generatePreviewImage = async (libraryItems) => {
|
|
17
|
+
const MAX_ITEMS_PER_ROW = 6;
|
|
18
|
+
const BOX_SIZE = 128;
|
|
19
|
+
const BOX_PADDING = Math.round(BOX_SIZE / 16);
|
|
20
|
+
const BORDER_WIDTH = Math.max(Math.round(BOX_SIZE / 64), 2);
|
|
21
|
+
const rows = chunk(libraryItems, MAX_ITEMS_PER_ROW);
|
|
22
|
+
const canvas = document.createElement("canvas");
|
|
23
|
+
canvas.width =
|
|
24
|
+
rows[0].length * BOX_SIZE +
|
|
25
|
+
(rows[0].length + 1) * (BOX_PADDING * 2) -
|
|
26
|
+
BOX_PADDING * 2;
|
|
27
|
+
canvas.height =
|
|
28
|
+
rows.length * BOX_SIZE +
|
|
29
|
+
(rows.length + 1) * (BOX_PADDING * 2) -
|
|
30
|
+
BOX_PADDING * 2;
|
|
31
|
+
const ctx = canvas.getContext("2d");
|
|
32
|
+
ctx.fillStyle = OpenColor.white;
|
|
33
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
34
|
+
// draw items
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
for (const [index, item] of libraryItems.entries()) {
|
|
37
|
+
const itemCanvas = await exportToCanvas({
|
|
38
|
+
elements: item.elements,
|
|
39
|
+
files: null,
|
|
40
|
+
maxWidthOrHeight: BOX_SIZE,
|
|
41
|
+
});
|
|
42
|
+
const { width, height } = itemCanvas;
|
|
43
|
+
// draw item
|
|
44
|
+
// -------------------------------------------------------------------------
|
|
45
|
+
const rowOffset = Math.floor(index / MAX_ITEMS_PER_ROW) * (BOX_SIZE + BOX_PADDING * 2);
|
|
46
|
+
const colOffset = (index % MAX_ITEMS_PER_ROW) * (BOX_SIZE + BOX_PADDING * 2);
|
|
47
|
+
ctx.drawImage(itemCanvas, colOffset + (BOX_SIZE - width) / 2 + BOX_PADDING, rowOffset + (BOX_SIZE - height) / 2 + BOX_PADDING);
|
|
48
|
+
// draw item border
|
|
49
|
+
// -------------------------------------------------------------------------
|
|
50
|
+
ctx.lineWidth = BORDER_WIDTH;
|
|
51
|
+
ctx.strokeStyle = OpenColor.gray[4];
|
|
52
|
+
ctx.strokeRect(colOffset + BOX_PADDING / 2, rowOffset + BOX_PADDING / 2, BOX_SIZE + BOX_PADDING, BOX_SIZE + BOX_PADDING);
|
|
53
|
+
}
|
|
54
|
+
return await resizeImageFile(new File([await canvasToBlob(canvas)], "preview", { type: MIME_TYPES.png }), {
|
|
55
|
+
outputType: MIME_TYPES.jpg,
|
|
56
|
+
maxWidthOrHeight: 5000,
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
const SingleLibraryItem = ({ libItem, appState, index, onChange, onRemove, }) => {
|
|
60
|
+
const svgRef = useRef(null);
|
|
61
|
+
const inputRef = useRef(null);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const node = svgRef.current;
|
|
64
|
+
if (!node) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
(async () => {
|
|
68
|
+
const svg = await exportToSvg({
|
|
69
|
+
elements: libItem.elements,
|
|
70
|
+
appState: {
|
|
71
|
+
...appState,
|
|
72
|
+
viewBackgroundColor: OpenColor.white,
|
|
73
|
+
exportBackground: true,
|
|
74
|
+
},
|
|
75
|
+
files: null,
|
|
76
|
+
});
|
|
77
|
+
node.innerHTML = svg.outerHTML;
|
|
78
|
+
})();
|
|
79
|
+
}, [libItem.elements, appState]);
|
|
80
|
+
return (_jsxs("div", { className: "single-library-item", children: [libItem.status === "published" && (_jsx("span", { className: "single-library-item-status", children: t("labels.statusPublished") })), _jsx("div", { ref: svgRef, className: "single-library-item__svg" }), _jsx(ToolButton, { "aria-label": t("buttons.remove"), type: "button", icon: CloseIcon, className: "single-library-item--remove", onClick: onRemove.bind(null, libItem.id), title: t("buttons.remove") }), _jsxs("div", { style: {
|
|
81
|
+
display: "flex",
|
|
82
|
+
margin: "0.8rem 0",
|
|
83
|
+
width: "100%",
|
|
84
|
+
fontSize: "14px",
|
|
85
|
+
fontWeight: 500,
|
|
86
|
+
flexDirection: "column",
|
|
87
|
+
}, children: [_jsxs("label", { style: {
|
|
88
|
+
display: "flex",
|
|
89
|
+
justifyContent: "space-between",
|
|
90
|
+
flexDirection: "column",
|
|
91
|
+
}, children: [_jsxs("div", { style: { padding: "0.5em 0" }, children: [_jsx("span", { style: { fontWeight: 500, color: OpenColor.gray[6] }, children: t("publishDialog.itemName") }), _jsx("span", { "aria-hidden": "true", className: "required", children: "*" })] }), _jsx("input", { type: "text", ref: inputRef, style: { width: "80%", padding: "0.2rem" }, defaultValue: libItem.name, placeholder: "Item name", onChange: (event) => {
|
|
92
|
+
onChange(event.target.value, index);
|
|
93
|
+
} })] }), _jsx("span", { className: "error", children: libItem.error })] })] }));
|
|
94
|
+
};
|
|
95
|
+
const PublishLibrary = ({ onClose, libraryItems, appState, onSuccess, onError, updateItemsInStorage, onRemove, }) => {
|
|
96
|
+
const [libraryData, setLibraryData] = useState({
|
|
97
|
+
authorName: "",
|
|
98
|
+
githubHandle: "",
|
|
99
|
+
name: "",
|
|
100
|
+
description: "",
|
|
101
|
+
twitterHandle: "",
|
|
102
|
+
website: "",
|
|
103
|
+
});
|
|
104
|
+
const [isSubmitting, setIsSubmitting] = useState(false);
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const data = EditorLocalStorage.get(EDITOR_LS_KEYS.PUBLISH_LIBRARY);
|
|
107
|
+
if (data) {
|
|
108
|
+
setLibraryData(data);
|
|
109
|
+
}
|
|
110
|
+
}, []);
|
|
111
|
+
const [clonedLibItems, setClonedLibItems] = useState(libraryItems.slice());
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
setClonedLibItems(libraryItems.slice());
|
|
114
|
+
}, [libraryItems]);
|
|
115
|
+
const onInputChange = (event) => {
|
|
116
|
+
setLibraryData({
|
|
117
|
+
...libraryData,
|
|
118
|
+
[event.target.name]: event.target.value,
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
const onSubmit = async (event) => {
|
|
122
|
+
event.preventDefault();
|
|
123
|
+
setIsSubmitting(true);
|
|
124
|
+
const erroredLibItems = [];
|
|
125
|
+
let isError = false;
|
|
126
|
+
clonedLibItems.forEach((libItem) => {
|
|
127
|
+
let error = "";
|
|
128
|
+
if (!libItem.name) {
|
|
129
|
+
error = t("publishDialog.errors.required");
|
|
130
|
+
isError = true;
|
|
131
|
+
}
|
|
132
|
+
erroredLibItems.push({ ...libItem, error });
|
|
133
|
+
});
|
|
134
|
+
if (isError) {
|
|
135
|
+
setClonedLibItems(erroredLibItems);
|
|
136
|
+
setIsSubmitting(false);
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
const previewImage = await generatePreviewImage(clonedLibItems);
|
|
140
|
+
const libContent = {
|
|
141
|
+
type: EXPORT_DATA_TYPES.excalidrawLibrary,
|
|
142
|
+
version: VERSIONS.excalidrawLibrary,
|
|
143
|
+
source: EXPORT_SOURCE,
|
|
144
|
+
libraryItems: clonedLibItems,
|
|
145
|
+
};
|
|
146
|
+
const content = JSON.stringify(libContent, null, 2);
|
|
147
|
+
const lib = new Blob([content], { type: "application/json" });
|
|
148
|
+
const formData = new FormData();
|
|
149
|
+
formData.append("excalidrawLib", lib);
|
|
150
|
+
formData.append("previewImage", previewImage);
|
|
151
|
+
formData.append("previewImageType", previewImage.type);
|
|
152
|
+
formData.append("title", libraryData.name);
|
|
153
|
+
formData.append("authorName", libraryData.authorName);
|
|
154
|
+
formData.append("githubHandle", libraryData.githubHandle);
|
|
155
|
+
formData.append("name", libraryData.name);
|
|
156
|
+
formData.append("description", libraryData.description);
|
|
157
|
+
formData.append("twitterHandle", libraryData.twitterHandle);
|
|
158
|
+
formData.append("website", libraryData.website);
|
|
159
|
+
fetch(`${import.meta.env.VITE_APP_LIBRARY_BACKEND}/submit`, {
|
|
160
|
+
method: "post",
|
|
161
|
+
body: formData,
|
|
162
|
+
})
|
|
163
|
+
.then((response) => {
|
|
164
|
+
if (response.ok) {
|
|
165
|
+
return response.json().then(({ url }) => {
|
|
166
|
+
// flush data from local storage
|
|
167
|
+
EditorLocalStorage.delete(EDITOR_LS_KEYS.PUBLISH_LIBRARY);
|
|
168
|
+
onSuccess({
|
|
169
|
+
url,
|
|
170
|
+
authorName: libraryData.authorName,
|
|
171
|
+
items: clonedLibItems,
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return response
|
|
176
|
+
.json()
|
|
177
|
+
.catch(() => {
|
|
178
|
+
throw new Error(response.statusText || "something went wrong");
|
|
179
|
+
})
|
|
180
|
+
.then((error) => {
|
|
181
|
+
throw new Error(error.message || response.statusText || "something went wrong");
|
|
182
|
+
});
|
|
183
|
+
}, (err) => {
|
|
184
|
+
console.error(err);
|
|
185
|
+
onError(err);
|
|
186
|
+
setIsSubmitting(false);
|
|
187
|
+
})
|
|
188
|
+
.catch((err) => {
|
|
189
|
+
console.error(err);
|
|
190
|
+
onError(err);
|
|
191
|
+
setIsSubmitting(false);
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
const renderLibraryItems = () => {
|
|
195
|
+
const items = [];
|
|
196
|
+
clonedLibItems.forEach((libItem, index) => {
|
|
197
|
+
items.push(_jsx("div", { className: "single-library-item-wrapper", children: _jsx(SingleLibraryItem, { libItem: libItem, appState: appState, index: index, onChange: (val, index) => {
|
|
198
|
+
const items = clonedLibItems.slice();
|
|
199
|
+
items[index].name = val;
|
|
200
|
+
setClonedLibItems(items);
|
|
201
|
+
}, onRemove: onRemove }) }, index));
|
|
202
|
+
});
|
|
203
|
+
return _jsx("div", { className: "selected-library-items", children: items });
|
|
204
|
+
};
|
|
205
|
+
const onDialogClose = useCallback(() => {
|
|
206
|
+
updateItemsInStorage(clonedLibItems);
|
|
207
|
+
EditorLocalStorage.set(EDITOR_LS_KEYS.PUBLISH_LIBRARY, libraryData);
|
|
208
|
+
onClose();
|
|
209
|
+
}, [clonedLibItems, onClose, updateItemsInStorage, libraryData]);
|
|
210
|
+
const shouldRenderForm = !!libraryItems.length;
|
|
211
|
+
const containsPublishedItems = libraryItems.some((item) => item.status === "published");
|
|
212
|
+
return (_jsx(Dialog, { onCloseRequest: onDialogClose, title: t("publishDialog.title"), className: "publish-library", children: shouldRenderForm ? (_jsxs("form", { onSubmit: onSubmit, children: [_jsx("div", { className: "publish-library-note", children: _jsx(Trans, { i18nKey: "publishDialog.noteDescription", link: (el) => (_jsx("a", { href: "https://libraries.excalidraw.com", target: "_blank", rel: "noopener noreferrer", children: el })) }) }), _jsx("span", { className: "publish-library-note", children: _jsx(Trans, { i18nKey: "publishDialog.noteGuidelines", link: (el) => (_jsx("a", { href: "https://github.com/excalidraw/excalidraw-libraries#guidelines", target: "_blank", rel: "noopener noreferrer", children: el })) }) }), _jsx("div", { className: "publish-library-note", children: t("publishDialog.noteItems") }), containsPublishedItems && (_jsx("span", { className: "publish-library-note publish-library-warning", children: t("publishDialog.republishWarning") })), renderLibraryItems(), _jsxs("div", { className: "publish-library__fields", children: [_jsxs("label", { children: [_jsxs("div", { children: [_jsx("span", { children: t("publishDialog.libraryName") }), _jsx("span", { "aria-hidden": "true", className: "required", children: "*" })] }), _jsx("input", { type: "text", name: "name", required: true, value: libraryData.name, onChange: onInputChange, placeholder: t("publishDialog.placeholder.libraryName") })] }), _jsxs("label", { style: { alignItems: "flex-start" }, children: [_jsxs("div", { children: [_jsx("span", { children: t("publishDialog.libraryDesc") }), _jsx("span", { "aria-hidden": "true", className: "required", children: "*" })] }), _jsx("textarea", { name: "description", rows: 4, required: true, value: libraryData.description, onChange: onInputChange, placeholder: t("publishDialog.placeholder.libraryDesc") })] }), _jsxs("label", { children: [_jsxs("div", { children: [_jsx("span", { children: t("publishDialog.authorName") }), _jsx("span", { "aria-hidden": "true", className: "required", children: "*" })] }), _jsx("input", { type: "text", name: "authorName", required: true, value: libraryData.authorName, onChange: onInputChange, placeholder: t("publishDialog.placeholder.authorName") })] }), _jsxs("label", { children: [_jsx("span", { children: t("publishDialog.githubUsername") }), _jsx("input", { type: "text", name: "githubHandle", value: libraryData.githubHandle, onChange: onInputChange, placeholder: t("publishDialog.placeholder.githubHandle") })] }), _jsxs("label", { children: [_jsx("span", { children: t("publishDialog.twitterUsername") }), _jsx("input", { type: "text", name: "twitterHandle", value: libraryData.twitterHandle, onChange: onInputChange, placeholder: t("publishDialog.placeholder.twitterHandle") })] }), _jsxs("label", { children: [_jsx("span", { children: t("publishDialog.website") }), _jsx("input", { type: "text", name: "website", pattern: "https?://.+", title: t("publishDialog.errors.website"), value: libraryData.website, onChange: onInputChange, placeholder: t("publishDialog.placeholder.website") })] }), _jsx("span", { className: "publish-library-note", children: _jsx(Trans, { i18nKey: "publishDialog.noteLicense", link: (el) => (_jsx("a", { href: "https://github.com/excalidraw/excalidraw-libraries/blob/main/LICENSE", target: "_blank", rel: "noopener noreferrer", children: el })) }) })] }), _jsxs("div", { className: "publish-library__buttons", children: [_jsx(DialogActionButton, { label: t("buttons.cancel"), onClick: onDialogClose, "data-testid": "cancel-clear-canvas-button" }), _jsx(DialogActionButton, { type: "submit", label: t("buttons.submit"), actionType: "primary", isLoading: isSubmitting })] })] })) : (_jsx("p", { style: { padding: "1em", textAlign: "center", fontWeight: 500 }, children: t("publishDialog.atleastOneLibItem") })) }));
|
|
213
|
+
};
|
|
214
|
+
export default PublishLibrary;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
@import "../css/variables.module.scss";
|
|
2
|
+
|
|
3
|
+
.excalidraw {
|
|
4
|
+
.publish-library {
|
|
5
|
+
&__fields {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
|
|
9
|
+
label {
|
|
10
|
+
padding: 1em 0;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
align-items: center;
|
|
14
|
+
span {
|
|
15
|
+
font-weight: 500;
|
|
16
|
+
font-size: 1rem;
|
|
17
|
+
color: $oc-gray-6;
|
|
18
|
+
}
|
|
19
|
+
input,
|
|
20
|
+
textarea {
|
|
21
|
+
width: 70%;
|
|
22
|
+
padding: 0.6em;
|
|
23
|
+
font-family: var(--ui-font);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.required {
|
|
27
|
+
color: $oc-red-8;
|
|
28
|
+
margin: 0.2rem;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&__buttons {
|
|
34
|
+
display: flex;
|
|
35
|
+
padding: 0.2rem 0;
|
|
36
|
+
justify-content: flex-end;
|
|
37
|
+
gap: 0.5rem;
|
|
38
|
+
|
|
39
|
+
.ToolIcon__icon {
|
|
40
|
+
min-width: 2.5rem;
|
|
41
|
+
width: auto;
|
|
42
|
+
font-size: 1rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ToolIcon_type_button {
|
|
46
|
+
margin-left: 1rem;
|
|
47
|
+
padding: 0 0.5rem;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&--confirm.ToolIcon_type_button {
|
|
51
|
+
background-color: $oc-blue-6;
|
|
52
|
+
|
|
53
|
+
&:hover {
|
|
54
|
+
background-color: $oc-blue-8;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&--cancel.ToolIcon_type_button {
|
|
59
|
+
background-color: $oc-gray-5;
|
|
60
|
+
&:hover {
|
|
61
|
+
background-color: $oc-gray-6;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ToolIcon__icon {
|
|
66
|
+
color: $oc-white;
|
|
67
|
+
.Spinner {
|
|
68
|
+
--spinner-color: #fff;
|
|
69
|
+
svg {
|
|
70
|
+
padding: 0.5rem;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.selected-library-items {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
|
|
80
|
+
.single-library-item-wrapper {
|
|
81
|
+
width: 9rem;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&-warning {
|
|
86
|
+
color: $oc-red-6;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&-note {
|
|
90
|
+
padding: 1em 0;
|
|
91
|
+
font-style: italic;
|
|
92
|
+
font-size: 14px;
|
|
93
|
+
display: block;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.single-library-item {
|
|
98
|
+
position: relative;
|
|
99
|
+
|
|
100
|
+
&-status {
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: 0.3rem;
|
|
103
|
+
left: 0.3rem;
|
|
104
|
+
font-size: 0.7rem;
|
|
105
|
+
color: $oc-red-7;
|
|
106
|
+
background: rgba(255, 255, 255, 0.9);
|
|
107
|
+
padding: 0.1rem 0.2rem;
|
|
108
|
+
border-radius: 0.2rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&__svg {
|
|
112
|
+
background-color: $oc-white;
|
|
113
|
+
padding: 0.3rem;
|
|
114
|
+
width: 7.5rem;
|
|
115
|
+
height: 7.5rem;
|
|
116
|
+
border: 1px solid var(--button-gray-2);
|
|
117
|
+
svg {
|
|
118
|
+
width: 100%;
|
|
119
|
+
height: 100%;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.ToolIcon__icon {
|
|
124
|
+
background-color: $oc-white;
|
|
125
|
+
width: auto;
|
|
126
|
+
height: auto;
|
|
127
|
+
margin: 0 0.5rem;
|
|
128
|
+
}
|
|
129
|
+
.ToolIcon,
|
|
130
|
+
.ToolIcon_type_button:hover {
|
|
131
|
+
background-color: white;
|
|
132
|
+
}
|
|
133
|
+
.required,
|
|
134
|
+
.error {
|
|
135
|
+
color: $oc-red-8;
|
|
136
|
+
font-weight: bold;
|
|
137
|
+
font-size: 1rem;
|
|
138
|
+
margin: 0.2rem;
|
|
139
|
+
}
|
|
140
|
+
.error {
|
|
141
|
+
font-weight: 500;
|
|
142
|
+
margin: 0;
|
|
143
|
+
padding: 0.3em 0;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
&--remove {
|
|
147
|
+
position: absolute;
|
|
148
|
+
top: 0.2rem;
|
|
149
|
+
right: 1rem;
|
|
150
|
+
|
|
151
|
+
.ToolIcon__icon {
|
|
152
|
+
margin: 0;
|
|
153
|
+
}
|
|
154
|
+
.ToolIcon__icon {
|
|
155
|
+
background-color: $oc-red-6;
|
|
156
|
+
&:hover {
|
|
157
|
+
background-color: $oc-red-7;
|
|
158
|
+
}
|
|
159
|
+
&:active {
|
|
160
|
+
background-color: $oc-red-8;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
svg {
|
|
164
|
+
color: $oc-white;
|
|
165
|
+
padding: 0.26rem;
|
|
166
|
+
border-radius: 0.3em;
|
|
167
|
+
width: 1rem;
|
|
168
|
+
height: 1rem;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from "clsx";
|
|
3
|
+
import "./RadioGroup.scss";
|
|
4
|
+
export const RadioGroup = function ({ onChange, value, choices, name, }) {
|
|
5
|
+
return (_jsx("div", { className: "RadioGroup", children: choices.map((choice) => (_jsxs("div", { className: clsx("RadioGroup__choice", {
|
|
6
|
+
active: choice.value === value,
|
|
7
|
+
}), children: [_jsx("input", { name: name, type: "radio", checked: choice.value === value, onChange: () => onChange(choice.value) }), choice.label] }, choice.label))) }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@import "../css/variables.module.scss";
|
|
2
|
+
|
|
3
|
+
.excalidraw {
|
|
4
|
+
--RadioGroup-background: var(--island-bg-color);
|
|
5
|
+
--RadioGroup-border: var(--color-surface-high);
|
|
6
|
+
|
|
7
|
+
--RadioGroup-choice-color-off: var(--color-primary);
|
|
8
|
+
--RadioGroup-choice-color-off-hover: var(--color-brand-hover);
|
|
9
|
+
--RadioGroup-choice-background-off: var(--island-bg-color);
|
|
10
|
+
--RadioGroup-choice-background-off-active: var(--color-surface-high);
|
|
11
|
+
|
|
12
|
+
--RadioGroup-choice-color-on: var(--color-surface-lowest);
|
|
13
|
+
--RadioGroup-choice-background-on: var(--color-primary);
|
|
14
|
+
--RadioGroup-choice-background-on-hover: var(--color-brand-hover);
|
|
15
|
+
--RadioGroup-choice-background-on-active: var(--color-brand-active);
|
|
16
|
+
|
|
17
|
+
.RadioGroup {
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
align-items: flex-start;
|
|
22
|
+
|
|
23
|
+
padding: 3px;
|
|
24
|
+
border-radius: 10px;
|
|
25
|
+
|
|
26
|
+
background: var(--RadioGroup-background);
|
|
27
|
+
border: 1px solid var(--RadioGroup-border);
|
|
28
|
+
|
|
29
|
+
&__choice {
|
|
30
|
+
position: relative;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
width: 32px;
|
|
35
|
+
height: 24px;
|
|
36
|
+
|
|
37
|
+
color: var(--RadioGroup-choice-color-off);
|
|
38
|
+
background: var(--RadioGroup-choice-background-off);
|
|
39
|
+
|
|
40
|
+
border-radius: 8px;
|
|
41
|
+
|
|
42
|
+
font-family: "Assistant";
|
|
43
|
+
font-style: normal;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
font-size: 0.75rem;
|
|
46
|
+
line-height: 100%;
|
|
47
|
+
user-select: none;
|
|
48
|
+
letter-spacing: 0.4px;
|
|
49
|
+
|
|
50
|
+
transition: all 75ms ease-out;
|
|
51
|
+
|
|
52
|
+
&:hover {
|
|
53
|
+
color: var(--RadioGroup-choice-color-off-hover);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:active {
|
|
57
|
+
background: var(--RadioGroup-choice-background-off-active);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.active {
|
|
61
|
+
color: var(--RadioGroup-choice-color-on);
|
|
62
|
+
background: var(--RadioGroup-choice-background-on);
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background: var(--RadioGroup-choice-background-on-hover);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:active {
|
|
69
|
+
background: var(--RadioGroup-choice-background-on-active);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
& input {
|
|
74
|
+
z-index: 1;
|
|
75
|
+
position: absolute;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
margin: 0;
|
|
79
|
+
padding: 0;
|
|
80
|
+
|
|
81
|
+
border-radius: 8px;
|
|
82
|
+
|
|
83
|
+
-webkit-appearance: none;
|
|
84
|
+
-moz-appearance: none;
|
|
85
|
+
appearance: none;
|
|
86
|
+
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { t } from "../i18n";
|
|
3
|
+
import { useExcalidrawContainer } from "./App";
|
|
4
|
+
export const Section = ({ heading, children, ...props }) => {
|
|
5
|
+
const { id } = useExcalidrawContainer();
|
|
6
|
+
const header = (_jsx("h2", { className: "visually-hidden", id: `${id}-${heading}-title`, children: t(`headings.${heading}`) }));
|
|
7
|
+
return (_jsx("section", { ...props, "aria-labelledby": `${id}-${heading}-title`, children: typeof children === "function" ? (children(header)) : (_jsxs(_Fragment, { children: [header, children] })) }));
|
|
8
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import * as Popover from "@radix-ui/react-popover";
|
|
4
|
+
import { copyTextToSystemClipboard } from "../clipboard";
|
|
5
|
+
import { useI18n } from "../i18n";
|
|
6
|
+
import { Dialog } from "./Dialog";
|
|
7
|
+
import { TextField } from "./TextField";
|
|
8
|
+
import { FilledButton } from "./FilledButton";
|
|
9
|
+
import { copyIcon, tablerCheckIcon } from "./icons";
|
|
10
|
+
import "./ShareableLinkDialog.scss";
|
|
11
|
+
export const ShareableLinkDialog = ({ link, onCloseRequest, setErrorMessage, }) => {
|
|
12
|
+
const { t } = useI18n();
|
|
13
|
+
const [justCopied, setJustCopied] = useState(false);
|
|
14
|
+
const timerRef = useRef(0);
|
|
15
|
+
const ref = useRef(null);
|
|
16
|
+
const copyRoomLink = async () => {
|
|
17
|
+
try {
|
|
18
|
+
await copyTextToSystemClipboard(link);
|
|
19
|
+
setJustCopied(true);
|
|
20
|
+
if (timerRef.current) {
|
|
21
|
+
window.clearTimeout(timerRef.current);
|
|
22
|
+
}
|
|
23
|
+
timerRef.current = window.setTimeout(() => {
|
|
24
|
+
setJustCopied(false);
|
|
25
|
+
}, 3000);
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
setErrorMessage(error.message);
|
|
29
|
+
}
|
|
30
|
+
ref.current?.select();
|
|
31
|
+
};
|
|
32
|
+
return (_jsx(Dialog, { onCloseRequest: onCloseRequest, title: false, size: "small", children: _jsxs("div", { className: "ShareableLinkDialog", children: [_jsx("h3", { children: "Shareable link" }), _jsxs("div", { className: "ShareableLinkDialog__linkRow", children: [_jsx(TextField, { ref: ref, label: "Link", readonly: true, fullWidth: true, value: link, selectOnRender: true }), _jsxs(Popover.Root, { open: justCopied, children: [_jsx(Popover.Trigger, { asChild: true, children: _jsx(FilledButton, { size: "large", label: "Copy link", startIcon: copyIcon, onClick: copyRoomLink }) }), _jsxs(Popover.Content, { onOpenAutoFocus: (event) => event.preventDefault(), onCloseAutoFocus: (event) => event.preventDefault(), className: "ShareableLinkDialog__popover", side: "top", align: "end", sideOffset: 5.5, children: [tablerCheckIcon, " copied"] })] })] }), _jsxs("div", { className: "ShareableLinkDialog__description", children: ["\uD83D\uDD12 ", t("alerts.uploadedSecurly")] })] }) }));
|
|
33
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
@import "../css/variables.module.scss";
|
|
2
|
+
|
|
3
|
+
.excalidraw {
|
|
4
|
+
.ShareableLinkDialog {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: 1.5rem;
|
|
8
|
+
|
|
9
|
+
color: var(--text-primary-color);
|
|
10
|
+
|
|
11
|
+
::selection {
|
|
12
|
+
background: var(--color-primary-light-darker);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
h3 {
|
|
16
|
+
font-family: "Assistant";
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
font-size: 1.313rem;
|
|
19
|
+
line-height: 130%;
|
|
20
|
+
|
|
21
|
+
margin: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__popover {
|
|
25
|
+
@keyframes RoomDialog__popover__scaleIn {
|
|
26
|
+
from {
|
|
27
|
+
opacity: 0;
|
|
28
|
+
}
|
|
29
|
+
to {
|
|
30
|
+
opacity: 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
z-index: 100;
|
|
36
|
+
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-direction: row;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
align-items: flex-start;
|
|
41
|
+
padding: 0.125rem 0.5rem;
|
|
42
|
+
gap: 0.125rem;
|
|
43
|
+
|
|
44
|
+
height: 1.125rem;
|
|
45
|
+
|
|
46
|
+
border: none;
|
|
47
|
+
border-radius: 0.6875rem;
|
|
48
|
+
|
|
49
|
+
font-family: "Assistant";
|
|
50
|
+
font-style: normal;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
font-size: 0.75rem;
|
|
53
|
+
line-height: 110%;
|
|
54
|
+
|
|
55
|
+
background: var(--color-success-lighter);
|
|
56
|
+
color: var(--color-success);
|
|
57
|
+
|
|
58
|
+
& > svg {
|
|
59
|
+
width: 0.875rem;
|
|
60
|
+
height: 0.875rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
transform-origin: var(--radix-popover-content-transform-origin);
|
|
64
|
+
animation: RoomDialog__popover__scaleIn 150ms ease-out;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&__linkRow {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: row;
|
|
70
|
+
align-items: flex-end;
|
|
71
|
+
gap: 0.75rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&__description {
|
|
75
|
+
border-top: 1px solid var(--color-gray-20);
|
|
76
|
+
|
|
77
|
+
padding: 0.5rem 0.5rem 0;
|
|
78
|
+
font-weight: 400;
|
|
79
|
+
font-size: 0.75rem;
|
|
80
|
+
line-height: 150%;
|
|
81
|
+
|
|
82
|
+
& p {
|
|
83
|
+
margin: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
& p + p {
|
|
87
|
+
margin-top: 1em;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|