microboard-ui-temp 0.0.3
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/.github/workflows/npm-publish.yml +66 -0
- package/Dockerfile +15 -0
- package/LICENSE.txt +17 -0
- package/MicroboardLicense.txt +84 -0
- package/README.md +23 -0
- package/bun.lock +1079 -0
- package/bunPlugins/copyPlugin.ts +81 -0
- package/bunfig.toml +1 -0
- package/docker-compose.yml +7 -0
- package/package.json +49 -0
- package/scripts/buildPkg.ts +29 -0
- package/scripts/buildSpa.ts +29 -0
- package/server.ts +18 -0
- package/src/App/App.ts +502 -0
- package/src/App/BoardsList.ts +752 -0
- package/src/App/Clipboard.ts +22 -0
- package/src/App/Connection.ts +758 -0
- package/src/App/Location.ts +23 -0
- package/src/App/MediaHelpers.ts +221 -0
- package/src/App/Paste/index.ts +5 -0
- package/src/App/Paste/pasteTextToTheBoard.ts +19 -0
- package/src/App/Paste/tryToGetMarkdownFromDataTransfer.ts +60 -0
- package/src/App/Paste/tryToPasteAsItemOrReturnText.ts +72 -0
- package/src/App/Paste/tryToPasteAudioByLink.ts +35 -0
- package/src/App/Paste/tryToPasteFromMicroboard.ts +15 -0
- package/src/App/Paste/tryToPasteFromMiro.ts +75 -0
- package/src/App/Paste/tryToPasteImages.ts +44 -0
- package/src/App/Paste/tryToPasteVideoByLink.ts +68 -0
- package/src/App/Permissions.ts +43 -0
- package/src/App/README.md +58 -0
- package/src/App/SessionStorage.ts +248 -0
- package/src/App/Storage.ts +122 -0
- package/src/App/Wheel/Wheel.spec.ts +40 -0
- package/src/App/Wheel/Wheel.ts +229 -0
- package/src/App/Wheel/WheelEventLogger.ts +70 -0
- package/src/App/Wheel/WheelEvents.spec.ts +418 -0
- package/src/App/Wheel/index.ts +1 -0
- package/src/App/Wheel/mockedWheelData.ts +77658 -0
- package/src/App/getController.ts +878 -0
- package/src/App/getSubscriptions.ts +155 -0
- package/src/App/index.ts +1 -0
- package/src/App/isFirefox.ts +3 -0
- package/src/App/isMacos.ts +2 -0
- package/src/App/isSafari.ts +17 -0
- package/src/App/router.tsx +149 -0
- package/src/App/testRecorder.ts +393 -0
- package/src/App/throttlePointerEvent.ts +27 -0
- package/src/App/useAccount.ts +19 -0
- package/src/App/useBoardSubscription.ts +14 -0
- package/src/App/useBoardsList.ts +18 -0
- package/src/App/useDomMbr.ts +65 -0
- package/src/Config.ts +41 -0
- package/src/Globals.d.ts +6 -0
- package/src/WhiteBoardModule/Readme.md +21 -0
- package/src/WhiteBoardModule/WhiteBoardModuleNative.tsx +60 -0
- package/src/WhiteBoardModule/WhiteboardModuleReact.tsx +61 -0
- package/src/development.entrypoint.ts +38 -0
- package/src/entities/AIInput/AIContext.tsx +377 -0
- package/src/entities/AIInput/AIDropdown.tsx +296 -0
- package/src/entities/AIInput/AIGenerationButton.tsx +54 -0
- package/src/entities/AIInput/AIInput.module.css +488 -0
- package/src/entities/AIInput/AIInput.tsx +427 -0
- package/src/entities/AIInput/StarIcon.tsx +201 -0
- package/src/entities/AIInput/index.ts +12 -0
- package/src/entities/AIInput/utils.ts +384 -0
- package/src/entities/BoardMenu/BoardMenu.module.css +38 -0
- package/src/entities/BoardMenu/BoardMenu.tsx +86 -0
- package/src/entities/BoardMenu/MouseOrTracpadModal/MouseOrTrackpadModal.tsx +138 -0
- package/src/entities/BoardMenu/MouseOrTracpadModal/MouseOrTracpadModal.module.css +93 -0
- package/src/entities/BoardMenu/index.ts +1 -0
- package/src/entities/BoardMenu/sections/Comments.tsx +65 -0
- package/src/entities/BoardMenu/sections/Items.tsx +85 -0
- package/src/entities/BoardMenu/sections/MouseOrTrackpad.tsx +108 -0
- package/src/entities/BoardName/BoardName.module.css +61 -0
- package/src/entities/BoardName/BoardName.tsx +66 -0
- package/src/entities/BoardName/BoardRename.module.css +15 -0
- package/src/entities/BoardName/BoardRename.tsx +93 -0
- package/src/entities/BoardName/index.ts +3 -0
- package/src/entities/Canvas/Canvas.tsx +250 -0
- package/src/entities/Canvas/CanvasNoRouter.tsx +216 -0
- package/src/entities/Canvas/index.ts +2 -0
- package/src/entities/Folder/DragOverlay.tsx +52 -0
- package/src/entities/Folder/DragPlaceholder.module.css +5 -0
- package/src/entities/Folder/DragPlaceholder.tsx +6 -0
- package/src/entities/Folder/DraggingItem.module.css +8 -0
- package/src/entities/Folder/DraggingWrapper.tsx +18 -0
- package/src/entities/Folder/Folder.module.css +113 -0
- package/src/entities/Folder/Folder.tsx +356 -0
- package/src/entities/Folder/FolderItem.module.css +89 -0
- package/src/entities/Folder/FolderItem.tsx +165 -0
- package/src/entities/Folder/FoldersDndContext.tsx +129 -0
- package/src/entities/Folder/OpenedFoldersContext.tsx +33 -0
- package/src/entities/Folder/index.ts +8 -0
- package/src/entities/account/Account.ts +542 -0
- package/src/entities/account/AuthForm.module.css +150 -0
- package/src/entities/account/AuthForm.tsx +48 -0
- package/src/entities/account/AuthGuard.tsx +17 -0
- package/src/entities/account/AuthInterceptor.ts +21 -0
- package/src/entities/account/UnauthGuard.tsx +17 -0
- package/src/entities/account/index.ts +5 -0
- package/src/entities/comments/Cluster/Cluster.module.css +43 -0
- package/src/entities/comments/Cluster/Cluster.tsx +100 -0
- package/src/entities/comments/CommentContainer/CommentContainer.module.css +51 -0
- package/src/entities/comments/CommentContainer/CommentContainer.tsx +232 -0
- package/src/entities/comments/CommentContainer/CommentPreview/CommentPreview.module.css +89 -0
- package/src/entities/comments/CommentContainer/CommentPreview/CommentPreview.tsx +92 -0
- package/src/entities/comments/CommentInput/CommentInput.module.css +69 -0
- package/src/entities/comments/CommentInput/CommentInput.tsx +122 -0
- package/src/entities/comments/CommentsContext.tsx +65 -0
- package/src/entities/comments/CommentsPanel/CommentCard/CommentCard.module.css +36 -0
- package/src/entities/comments/CommentsPanel/CommentCard/CommentCard.tsx +132 -0
- package/src/entities/comments/CommentsPanel/CommentCard/Message/Message.module.css +73 -0
- package/src/entities/comments/CommentsPanel/CommentCard/Message/Message.tsx +72 -0
- package/src/entities/comments/CommentsPanel/CommentsPanel.module.css +143 -0
- package/src/entities/comments/CommentsPanel/CommentsPanel.tsx +278 -0
- package/src/entities/comments/CommentsPanel/CommentsPanelContext.tsx +37 -0
- package/src/entities/comments/CommentsProvider.module.css +4 -0
- package/src/entities/comments/CommentsProvider.tsx +73 -0
- package/src/entities/comments/CreateComment/CreateComment.module.css +8 -0
- package/src/entities/comments/CreateComment/CreateComment.tsx +66 -0
- package/src/entities/comments/Thread/ExtraOptions/ExtraOptions.module.css +44 -0
- package/src/entities/comments/Thread/ExtraOptions/ExtraOptions.tsx +127 -0
- package/src/entities/comments/Thread/OptionsPanel/OptionsPanel.module.css +32 -0
- package/src/entities/comments/Thread/OptionsPanel/OptionsPanel.tsx +38 -0
- package/src/entities/comments/Thread/ThreadPanel.module.css +82 -0
- package/src/entities/comments/Thread/ThreadPanel.tsx +298 -0
- package/src/entities/comments/Thread/message/Message.module.css +71 -0
- package/src/entities/comments/Thread/message/Message.tsx +137 -0
- package/src/entities/comments/index.ts +7 -0
- package/src/entities/comments/lib.ts +22 -0
- package/src/entities/comments/useCommentsMerge.ts +88 -0
- package/src/entities/comments/useIntersectionObserver.ts +58 -0
- package/src/entities/comments/useScrollToUnreadMessage.ts +24 -0
- package/src/env.d.ts +12 -0
- package/src/features/AccessDeniedModal/AccessDeniedModal.module.css +56 -0
- package/src/features/AccessDeniedModal/AccessDeniedModal.tsx +94 -0
- package/src/features/AccessDeniedModal/index.ts +1 -0
- package/src/features/AiUnavailableModal/AiUnavailableModal.module.css +52 -0
- package/src/features/AiUnavailableModal/AiUnavailableModal.tsx +59 -0
- package/src/features/AiUnavailableModal/index.ts +1 -0
- package/src/features/AppContext.tsx +17 -0
- package/src/features/AppView/AppView.module.css +18 -0
- package/src/features/AppView/AppView.tsx +302 -0
- package/src/features/AppView/InactiveBoardHidder.tsx +14 -0
- package/src/features/AppView/LocalAppView.tsx +177 -0
- package/src/features/AppView/NoBoardIsOpen.module.css +29 -0
- package/src/features/AppView/NoBoardIsOpen.tsx +69 -0
- package/src/features/AppView/QuickAddPanel/QuickAddPanel.module.css +12 -0
- package/src/features/AppView/QuickAddPanel/QuickAddPanel.tsx +171 -0
- package/src/features/AppView/QuickAddPanel/index.ts +1 -0
- package/src/features/AppView/index.ts +2 -0
- package/src/features/AppView/listeners.ts +0 -0
- package/src/features/AudioPlayer/AudioPlayer.module.css +213 -0
- package/src/features/AudioPlayer/AudioPlayer.tsx +517 -0
- package/src/features/AudioPlayer/index.ts +1 -0
- package/src/features/ChangePasswordModal/ChangePassword.module.css +129 -0
- package/src/features/ChangePasswordModal/ChangePasswordModal.tsx +247 -0
- package/src/features/ChangePasswordModal/index.ts +4 -0
- package/src/features/ContextMenu/ContextMenu.module.css +38 -0
- package/src/features/ContextMenu/ContextMenu.tsx +507 -0
- package/src/features/ContextMenu/ContextMenuContext.tsx +77 -0
- package/src/features/ContextMenu/index.ts +5 -0
- package/src/features/ContextPanel/Buttons/AIGeneration.tsx +72 -0
- package/src/features/ContextPanel/Buttons/AIModel/AIModel.module.css +5 -0
- package/src/features/ContextPanel/Buttons/AIModel/AIModel.tsx +97 -0
- package/src/features/ContextPanel/Buttons/AIModel/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/AIModel.tsx +95 -0
- package/src/features/ContextPanel/Buttons/AddList/AddList.tsx +83 -0
- package/src/features/ContextPanel/Buttons/AddList/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +107 -0
- package/src/features/ContextPanel/Buttons/ButtonWithMenu/UiButtonWithMenu.module.css +49 -0
- package/src/features/ContextPanel/Buttons/ButtonWithMenu/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/CardGame/Card/CreateDeck.tsx +65 -0
- package/src/features/ContextPanel/Buttons/CardGame/Card/FlipCard.tsx +41 -0
- package/src/features/ContextPanel/Buttons/CardGame/Deck/GetCard.tsx +61 -0
- package/src/features/ContextPanel/Buttons/CardGame/Deck/ShuffleDeck.tsx +39 -0
- package/src/features/ContextPanel/Buttons/CardGame/Dice/ChangeRange/ChangeRange.module.css +53 -0
- package/src/features/ContextPanel/Buttons/CardGame/Dice/ChangeRange/ChangeRange.tsx +133 -0
- package/src/features/ContextPanel/Buttons/CardGame/Dice/ThrowDice.tsx +38 -0
- package/src/features/ContextPanel/Buttons/ConnectorAddText.tsx +55 -0
- package/src/features/ContextPanel/Buttons/ConnectorFontStyle.tsx +28 -0
- package/src/features/ContextPanel/Buttons/ConnectorLineColor.tsx +96 -0
- package/src/features/ContextPanel/Buttons/ConnectorTextColor.tsx +22 -0
- package/src/features/ContextPanel/Buttons/ConnectorTextHighlight.tsx +28 -0
- package/src/features/ContextPanel/Buttons/ConnectorType/ConnectorType.module.css +5 -0
- package/src/features/ContextPanel/Buttons/ConnectorType/ConnectorType.tsx +108 -0
- package/src/features/ContextPanel/Buttons/ConnectorType/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/ContextPanelButton.module.css +19 -0
- package/src/features/ContextPanel/Buttons/Delete.tsx +32 -0
- package/src/features/ContextPanel/Buttons/DrawFillStyle.tsx +107 -0
- package/src/features/ContextPanel/Buttons/DrawStrokeWidth/DrawStrokeWidth.module.css +4 -0
- package/src/features/ContextPanel/Buttons/DrawStrokeWidth/DrawStrokeWidth.tsx +32 -0
- package/src/features/ContextPanel/Buttons/DrawStrokeWidth/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/Duplicate.tsx +25 -0
- package/src/features/ContextPanel/Buttons/Edit.tsx +23 -0
- package/src/features/ContextPanel/Buttons/EndPointer/EndPointer.module.css +14 -0
- package/src/features/ContextPanel/Buttons/EndPointer/EndPointer.tsx +80 -0
- package/src/features/ContextPanel/Buttons/EndPointer/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/FillStyle.tsx +91 -0
- package/src/features/ContextPanel/Buttons/FontSize/ConnectorFontSize.tsx +34 -0
- package/src/features/ContextPanel/Buttons/FontSize/FontSize.module.css +53 -0
- package/src/features/ContextPanel/Buttons/FontSize/FontSize.tsx +217 -0
- package/src/features/ContextPanel/Buttons/FontSize/index.ts +2 -0
- package/src/features/ContextPanel/Buttons/FontStyle.tsx +68 -0
- package/src/features/ContextPanel/Buttons/FrameFill.tsx +91 -0
- package/src/features/ContextPanel/Buttons/FrameNavNext.tsx +33 -0
- package/src/features/ContextPanel/Buttons/FrameNavPrev.tsx +37 -0
- package/src/features/ContextPanel/Buttons/FrameRatio/FrameRatio.module.css +14 -0
- package/src/features/ContextPanel/Buttons/FrameRatio/FrameRatio.tsx +113 -0
- package/src/features/ContextPanel/Buttons/FrameRatio/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/HyperLinkBtn.tsx +53 -0
- package/src/features/ContextPanel/Buttons/ItemType/ItemType.module.css +15 -0
- package/src/features/ContextPanel/Buttons/ItemType/ItemType.tsx +115 -0
- package/src/features/ContextPanel/Buttons/ItemType/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/Lock.tsx +98 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/BringToFront.tsx +28 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/CopyFrameLink.tsx +50 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/CopyItemLink.tsx +48 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/ExportFrame.tsx +32 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SaveImg.tsx +32 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SaveVideoOrAudio.tsx +45 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SendToBack.tsx +28 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/SetLinkTo.tsx +35 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/getLinkToItem.tsx +3 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/Items/index.ts +5 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenu.module.css +51 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenu.tsx +96 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/RestOptionsMenuItem.tsx +29 -0
- package/src/features/ContextPanel/Buttons/RestOptionsMenu/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/StartPointer/StartPointer.module.css +18 -0
- package/src/features/ContextPanel/Buttons/StartPointer/StartPointer.tsx +87 -0
- package/src/features/ContextPanel/Buttons/StartPointer/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/StickerFillStyle.tsx +74 -0
- package/src/features/ContextPanel/Buttons/StrokeStyle/StrokeStyle.module.css +19 -0
- package/src/features/ContextPanel/Buttons/StrokeStyle/StrokeStyle.tsx +144 -0
- package/src/features/ContextPanel/Buttons/StrokeStyle/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/SwitchPointers.tsx +28 -0
- package/src/features/ContextPanel/Buttons/TextAlignment/TextAlignment.module.css +6 -0
- package/src/features/ContextPanel/Buttons/TextAlignment/TextAlignment.tsx +98 -0
- package/src/features/ContextPanel/Buttons/TextAlignment/index.ts +1 -0
- package/src/features/ContextPanel/Buttons/TextAlignmentSticker.tsx +87 -0
- package/src/features/ContextPanel/Buttons/TextColor.tsx +86 -0
- package/src/features/ContextPanel/Buttons/TextHighlight.tsx +85 -0
- package/src/features/ContextPanel/Buttons/ToggleFrameRatio.tsx +38 -0
- package/src/features/ContextPanel/Buttons/ToggleIsShining.tsx +36 -0
- package/src/features/ContextPanel/ContextPanel.module.css +9 -0
- package/src/features/ContextPanel/ContextPanel.tsx +531 -0
- package/src/features/ContextPanel/PanelContext.ts +17 -0
- package/src/features/ContextPanel/index.ts +1 -0
- package/src/features/ContextWrapper.tsx +47 -0
- package/src/features/Counter/Counter.module.css +20 -0
- package/src/features/Counter/Counter.tsx +49 -0
- package/src/features/CryptoWrapper/CryptoWrapper.tsx +79 -0
- package/src/features/CryptoWrapper/index.ts +1 -0
- package/src/features/Cursors/comment.svg +22 -0
- package/src/features/Cursors/customCursors.ts +31 -0
- package/src/features/Cursors/eraser.svg +3 -0
- package/src/features/Cursors/index.ts +1 -0
- package/src/features/Cursors/pencil.svg +3 -0
- package/src/features/Cursors/sticker/sticker-black.svg +27 -0
- package/src/features/Cursors/sticker/sticker-blue.svg +27 -0
- package/src/features/Cursors/sticker/sticker-gray.svg +27 -0
- package/src/features/Cursors/sticker/sticker-green.svg +27 -0
- package/src/features/Cursors/sticker/sticker-light-blue.svg +28 -0
- package/src/features/Cursors/sticker/sticker-light-gray.svg +27 -0
- package/src/features/Cursors/sticker/sticker-light-green.svg +27 -0
- package/src/features/Cursors/sticker/sticker-orange.svg +27 -0
- package/src/features/Cursors/sticker/sticker-pink.svg +27 -0
- package/src/features/Cursors/sticker/sticker-purple.svg +27 -0
- package/src/features/Cursors/sticker/sticker-sky-blue.svg +27 -0
- package/src/features/Cursors/sticker/sticker-yellow.svg +27 -0
- package/src/features/ErrorBoundary/ErrorBoundary.module.css +64 -0
- package/src/features/ErrorBoundary/ErrorBoundary.tsx +112 -0
- package/src/features/ErrorBoundary/index.ts +1 -0
- package/src/features/ExportPanel/ExportPanel.module.css +55 -0
- package/src/features/ExportPanel/ExportPanel.tsx +73 -0
- package/src/features/ExportPanel/ExportVisible.tsx +18 -0
- package/src/features/ExportPanel/index.ts +1 -0
- package/src/features/GameItems/CreateCardsModal.tsx +178 -0
- package/src/features/GameItems/CreateDiceModal.tsx +213 -0
- package/src/features/GameItems/Modal.module.css +148 -0
- package/src/features/GameItems/index.ts +1 -0
- package/src/features/GenerateChart/AIChat.module.css +162 -0
- package/src/features/GenerateChart/AIChat.tsx +198 -0
- package/src/features/GenerateChart/AIChatPanel.module.css +34 -0
- package/src/features/GenerateChart/AIChatPanel.tsx +72 -0
- package/src/features/GenerateChart/lib/engine/index.ts +616 -0
- package/src/features/GenerateChart/lib/transformOutput.ts +338 -0
- package/src/features/GoogleAuthBtn/GoogleAuthBtn.module.css +19 -0
- package/src/features/GoogleAuthBtn/GoogleAuthBtn.tsx +19 -0
- package/src/features/GoogleAuthBtn/icons.tsx +301 -0
- package/src/features/GoogleAuthBtn/index.ts +1 -0
- package/src/features/ImportMiro/AuthClipboardModal/AuthClipboardModal.module.css +26 -0
- package/src/features/ImportMiro/AuthClipboardModal/AuthClipboardModal.tsx +38 -0
- package/src/features/ImportMiro/ImgAuthClipboardModal/ImgAuthClipboardModal.module.css +36 -0
- package/src/features/ImportMiro/ImgAuthClipboardModal/ImgAuthClipboardModal.tsx +74 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/MiroClipboardTransformer.ts +765 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/index.ts +1 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportBoardItem/useCopyBoardItems.tsx +1156 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportMiro.module.css +157 -0
- package/src/features/ImportMiro/ImportMiroBoards/ImportMiro.tsx +95 -0
- package/src/features/ImportMiro/ImportMiroBoards/MiroModels.ts +250 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/ErrorNotification.tsx +48 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/LoadingNotification.tsx +53 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/SuccessNotification.tsx +54 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/WarnClipboardNotification.tsx +57 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/WarnNotification.tsx +68 -0
- package/src/features/ImportMiro/ImportMiroBoards/Notifications/index.ts +5 -0
- package/src/features/ImportMiro/ImportMiroStartModal/ImportMiroStartModal.module.css +35 -0
- package/src/features/ImportMiro/ImportMiroStartModal/ImportMiroStartModal.tsx +47 -0
- package/src/features/ImportMiro/index.ts +5 -0
- package/src/features/ItemTooltip/ItemTooltip.tsx +77 -0
- package/src/features/ItemTooltip/index.ts +1 -0
- package/src/features/ItemsProvider/ItemsProvider.tsx +45 -0
- package/src/features/ItemsProvider/index.ts +1 -0
- package/src/features/LandingMenu/LandingMenu.module.css +54 -0
- package/src/features/LandingMenu/LandingMenu.tsx +88 -0
- package/src/features/LandingMenu/MobileLandingMenu.module.css +78 -0
- package/src/features/LandingMenu/MobileLandingMenu.tsx +133 -0
- package/src/features/LandingMenu/const.ts +2 -0
- package/src/features/LandingMenu/index.ts +2 -0
- package/src/features/LinksProvider/LinkToButton/LinkToButton.module.css +34 -0
- package/src/features/LinksProvider/LinkToButton/LinkToButton.tsx +175 -0
- package/src/features/LinksProvider/LinksProvider.tsx +84 -0
- package/src/features/LinksProvider/index.ts +1 -0
- package/src/features/LocalFileSavingProgress/LocalFileSaveProgress.module.css +6 -0
- package/src/features/LocalFileSavingProgress/LocalFileSaveProgress.tsx +30 -0
- package/src/features/LocalFileSavingProgress/index.ts +1 -0
- package/src/features/LoginWith/LoginWith.module.css +18 -0
- package/src/features/LoginWith/LoginWith.tsx +15 -0
- package/src/features/MediaUnavailableModal/MediaUnavailableModal.module.css +52 -0
- package/src/features/MediaUnavailableModal/MediaUnavailableModal.tsx +64 -0
- package/src/features/MediaUnavailableModal/index.ts +4 -0
- package/src/features/Modal/ConfirmModal.module.css +71 -0
- package/src/features/Modal/ConfirmModal.tsx +199 -0
- package/src/features/Modal/CookiesModal.module.css +32 -0
- package/src/features/Modal/CookiesModal.tsx +75 -0
- package/src/features/Modal/InfoModal.module.css +49 -0
- package/src/features/Modal/InfoModal.tsx +90 -0
- package/src/features/Modal/ModalsWrapper.tsx +13 -0
- package/src/features/Modal/SetLinkToModal.module.css +49 -0
- package/src/features/Modal/SetLinkToModal.tsx +112 -0
- package/src/features/Notifications/Notifications.module.css +14 -0
- package/src/features/Notifications/SigninErrorNotification.tsx +34 -0
- package/src/features/Notifications/SignupErrorNotification.tsx +33 -0
- package/src/features/Notifications/index.ts +8 -0
- package/src/features/Pickers/ColorPicker/ColorItem.module.css +44 -0
- package/src/features/Pickers/ColorPicker/ColorItem.tsx +33 -0
- package/src/features/Pickers/ColorPicker/ColorPicker.module.css +12 -0
- package/src/features/Pickers/ColorPicker/ColorPicker.tsx +43 -0
- package/src/features/Pickers/ColorPicker/SquareColorItem.module.css +41 -0
- package/src/features/Pickers/ColorPicker/SquareColorItem.tsx +27 -0
- package/src/features/Pickers/ColorPicker/index.ts +1 -0
- package/src/features/Pickers/ConnectorLineStylePicker.tsx +52 -0
- package/src/features/Pickers/ConnectorPointerPicker/ConnectorPointerPicker.module.css +4 -0
- package/src/features/Pickers/ConnectorPointerPicker/ConnectorPointerPicker.tsx +39 -0
- package/src/features/Pickers/ConnectorPointerPicker/index.ts +1 -0
- package/src/features/Pickers/DrawingToolPicker.tsx +31 -0
- package/src/features/Pickers/FontSizePicker/FontSizePicker.module.css +8 -0
- package/src/features/Pickers/FontSizePicker/FontSizePicker.tsx +61 -0
- package/src/features/Pickers/FontSizePicker/index.ts +1 -0
- package/src/features/Pickers/FontStylePicker.tsx +88 -0
- package/src/features/Pickers/FramePicker/FramePicker.module.css +11 -0
- package/src/features/Pickers/FramePicker/FramePicker.tsx +40 -0
- package/src/features/Pickers/FramePicker/index.ts +1 -0
- package/src/features/Pickers/HorizontalAlignmentPicker.tsx +49 -0
- package/src/features/Pickers/ShapeTypePicker.tsx +80 -0
- package/src/features/Pickers/SliderPicker/SliderPicker.module.css +13 -0
- package/src/features/Pickers/SliderPicker/SliderPicker.tsx +43 -0
- package/src/features/Pickers/SliderPicker/index.ts +1 -0
- package/src/features/Pickers/StrokeStylePicker/StrokeStylePicker.module.css +4 -0
- package/src/features/Pickers/StrokeStylePicker/StrokeStylePicker.tsx +59 -0
- package/src/features/Pickers/StrokeStylePicker/index.ts +1 -0
- package/src/features/Pickers/VerticalAlignmentPicker.tsx +48 -0
- package/src/features/Presence/BringToMe/BringToMe.module.css +134 -0
- package/src/features/Presence/BringToMe/BringToMe.tsx +363 -0
- package/src/features/Presence/PresenceUsers/Dropdown.tsx +70 -0
- package/src/features/Presence/PresenceUsers/EyeIcon.tsx +16 -0
- package/src/features/Presence/PresenceUsers/PresenceUserAvatar.tsx +93 -0
- package/src/features/Presence/PresenceUsers/PresenceUsers.module.css +366 -0
- package/src/features/Presence/PresenceUsers/PresenceUsers.tsx +239 -0
- package/src/features/Presence/PresenceUsers/UserAvatar.tsx +92 -0
- package/src/features/Presence/PresenceUsers/mock.ts +34 -0
- package/src/features/Presence/UserTracking/UserTracking.module.css +72 -0
- package/src/features/Presence/UserTracking/UserTracking.tsx +67 -0
- package/src/features/ProfileSettingsModal/ProfileSettingsModal.module.css +100 -0
- package/src/features/ProfileSettingsModal/ProfileSettingsModal.tsx +333 -0
- package/src/features/ProfileSettingsModal/index.ts +4 -0
- package/src/features/QuickAddButtons/QuickAddButtonsClear.tsx +12 -0
- package/src/features/README.md +36 -0
- package/src/features/Rename/RenameContext.tsx +54 -0
- package/src/features/Rename/RenameInput.module.css +15 -0
- package/src/features/Rename/RenameInput.tsx +78 -0
- package/src/features/Rename/index.ts +2 -0
- package/src/features/ShapesPanel/ShapesCategory/ShapesCategory.module.css +29 -0
- package/src/features/ShapesPanel/ShapesCategory/ShapesCategory.tsx +70 -0
- package/src/features/ShapesPanel/ShapesPanel.module.css +75 -0
- package/src/features/ShapesPanel/ShapesPanel.tsx +69 -0
- package/src/features/ShapesPanel/ShapesPanelContext.tsx +109 -0
- package/src/features/ShapesPanel/index.ts +5 -0
- package/src/features/ShareModal/SaveShareModal.module.css +31 -0
- package/src/features/ShareModal/SaveShareModal.tsx +63 -0
- package/src/features/ShareModal/SearchInput.module.css +188 -0
- package/src/features/ShareModal/SearchInput.tsx +441 -0
- package/src/features/ShareModal/ShareModal.module.css +297 -0
- package/src/features/ShareModal/ShareModal.tsx +627 -0
- package/src/features/ShareModal/SharePanel.module.css +74 -0
- package/src/features/ShareModal/SharePanel.tsx +258 -0
- package/src/features/ShareModal/index.ts +1 -0
- package/src/features/ShareSnapshotModal/ShareSnapshotModal.module.css +286 -0
- package/src/features/ShareSnapshotModal/ShareSnapshotModal.tsx +41 -0
- package/src/features/ShareSnapshotModal/SnapshotNameInput.module.css +92 -0
- package/src/features/ShareSnapshotModal/SnapshotNameInput.tsx +225 -0
- package/src/features/ShareSnapshotModal/index.ts +1 -0
- package/src/features/SidePanel/LocalSidePanelContext.tsx +66 -0
- package/src/features/SidePanel/ResizableEdge.module.css +9 -0
- package/src/features/SidePanel/ResizableEdge.tsx +77 -0
- package/src/features/SidePanel/SidePanel.module.css +140 -0
- package/src/features/SidePanel/SidePanel.tsx +179 -0
- package/src/features/SidePanel/SidePanelContext.tsx +108 -0
- package/src/features/SidePanel/index.ts +3 -0
- package/src/features/SidePanelsContainer/SidePanelsContainer.module.css +15 -0
- package/src/features/SidePanelsContainer/SidePanelsContainer.tsx +61 -0
- package/src/features/SidePanelsContainer/index.ts +1 -0
- package/src/features/Templates/CreateTemplateModal/CreateTemplateModal.module.css +34 -0
- package/src/features/Templates/CreateTemplateModal/CreateTemplateModal.tsx +463 -0
- package/src/features/Templates/SelectTemplateModal/CategoriesMenu/CategoriesMenu.module.css +48 -0
- package/src/features/Templates/SelectTemplateModal/CategoriesMenu/CategoriesMenu.tsx +62 -0
- package/src/features/Templates/SelectTemplateModal/LanguagesDropdown/LanguagesDropdown.module.css +61 -0
- package/src/features/Templates/SelectTemplateModal/LanguagesDropdown/LanguagesDropdown.tsx +72 -0
- package/src/features/Templates/SelectTemplateModal/SelectTemplateModal.module.css +152 -0
- package/src/features/Templates/SelectTemplateModal/SelectTemplateModal.tsx +206 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemPreview/TemplateItemPreview.module.css +151 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemPreview/TemplateItemPreview.tsx +77 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItem/TemplateItem.tsx +119 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItem/templateItem.module.css +88 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItemsGrid.module.css +51 -0
- package/src/features/Templates/SelectTemplateModal/TemplateItemsGrid/TemplateItemsGrid.tsx +39 -0
- package/src/features/Templates/TolgeeProvider.tsx +29 -0
- package/src/features/Templates/config.ts +6 -0
- package/src/features/Templates/index.ts +2 -0
- package/src/features/Templates/lib.ts +59 -0
- package/src/features/TextEditor/Element.tsx +204 -0
- package/src/features/TextEditor/Leaf.tsx +72 -0
- package/src/features/TextEditor/README.md +3 -0
- package/src/features/TextEditor/TextEditor.module.css +115 -0
- package/src/features/TextEditor/TextEditor.tsx +610 -0
- package/src/features/TextEditor/index.ts +1 -0
- package/src/features/TextEditor/verticalAlignmentToFlex.tsx +14 -0
- package/src/features/TitlePanel/TitlePanel.module.css +123 -0
- package/src/features/TitlePanel/TitlePanel.tsx +341 -0
- package/src/features/TitlePanel/index.ts +1 -0
- package/src/features/ToastProvider.tsx +33 -0
- package/src/features/ToolsPanel/Buttons/AddConnector.tsx +73 -0
- package/src/features/ToolsPanel/Buttons/AddCounter.tsx +29 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawing.module.css +13 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawing.tsx +115 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddDrawingContext.tsx +15 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddHighlighter/AddHighlighter.module.css +26 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddHighlighter/AddHighlighter.tsx +138 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddPen/AddPen.module.css +26 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/AddPen/AddPen.tsx +126 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/Eraser/Eraser.tsx +47 -0
- package/src/features/ToolsPanel/Buttons/AddDrawing/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/AddFrame.tsx +57 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddCard.tsx +31 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddDice.tsx +32 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddGameItem.module.css +3 -0
- package/src/features/ToolsPanel/Buttons/AddGameItem/AddGameItem.tsx +39 -0
- package/src/features/ToolsPanel/Buttons/AddMedia/AddMedia.module.css +3 -0
- package/src/features/ToolsPanel/Buttons/AddMedia/AddMedia.tsx +72 -0
- package/src/features/ToolsPanel/Buttons/AddMedia/AddMediaButton.tsx +146 -0
- package/src/features/ToolsPanel/Buttons/AddShape/AddShape.module.css +18 -0
- package/src/features/ToolsPanel/Buttons/AddShape/AddShape.tsx +97 -0
- package/src/features/ToolsPanel/Buttons/AddShape/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/AddSticker.tsx +73 -0
- package/src/features/ToolsPanel/Buttons/AddTemplate.tsx +28 -0
- package/src/features/ToolsPanel/Buttons/AddText.tsx +31 -0
- package/src/features/ToolsPanel/Buttons/ButtonWithMenu/ButtonWithMenu.module.css +9 -0
- package/src/features/ToolsPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +24 -0
- package/src/features/ToolsPanel/Buttons/ButtonWithMenu/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/EventList/EventList.module.css +5 -0
- package/src/features/ToolsPanel/Buttons/EventList/EventList.tsx +144 -0
- package/src/features/ToolsPanel/Buttons/EventList/History.tsx +140 -0
- package/src/features/ToolsPanel/Buttons/EventList/HistoryEvent.tsx +28 -0
- package/src/features/ToolsPanel/Buttons/EventList/PrettifiedEvent.tsx +212 -0
- package/src/features/ToolsPanel/Buttons/EventList/SyncJournal.tsx +89 -0
- package/src/features/ToolsPanel/Buttons/EventList/index.ts +1 -0
- package/src/features/ToolsPanel/Buttons/Grab.tsx +29 -0
- package/src/features/ToolsPanel/Buttons/Redo.tsx +40 -0
- package/src/features/ToolsPanel/Buttons/Select.tsx +37 -0
- package/src/features/ToolsPanel/Buttons/Star.tsx +31 -0
- package/src/features/ToolsPanel/Buttons/Undo.tsx +39 -0
- package/src/features/ToolsPanel/PanelContext.ts +13 -0
- package/src/features/ToolsPanel/ToolsPanel.module.css +33 -0
- package/src/features/ToolsPanel/ToolsPanel.tsx +84 -0
- package/src/features/ToolsPanel/ViewToolsPanel.tsx +30 -0
- package/src/features/ToolsPanel/index.ts +1 -0
- package/src/features/UserPanel/ActionButtons/ActionButtons.module.css +9 -0
- package/src/features/UserPanel/ActionButtons/ActionButtons.tsx +22 -0
- package/src/features/UserPanel/Avatar/Avatar.module.css +21 -0
- package/src/features/UserPanel/Avatar/Avatar.tsx +44 -0
- package/src/features/UserPanel/Buttons/AddComment/AddComment.module.css +14 -0
- package/src/features/UserPanel/Buttons/AddComment/AddComment.tsx +61 -0
- package/src/features/UserPanel/Buttons/AddComment/index.ts +1 -0
- package/src/features/UserPanel/Buttons/ButtonWithMenu/ButtonWithMenu.module.css +8 -0
- package/src/features/UserPanel/Buttons/ButtonWithMenu/ButtonWithMenu.tsx +24 -0
- package/src/features/UserPanel/Buttons/ButtonWithMenu/index.ts +1 -0
- package/src/features/UserPanel/Buttons/ShareBtn/ShareBtn.tsx +49 -0
- package/src/features/UserPanel/Buttons/TogglePresenceRender/TogglePresenceRender.module.css +48 -0
- package/src/features/UserPanel/Buttons/TogglePresenceRender/TogglePresenceRender.tsx +38 -0
- package/src/features/UserPanel/UserAvatar/UserAvatar.tsx +66 -0
- package/src/features/UserPanel/UserDropdown/UserDropdown.tsx +75 -0
- package/src/features/UserPanel/UserPanel.module.css +516 -0
- package/src/features/UserPanel/UserPanel.tsx +153 -0
- package/src/features/UserPanel/UserPic/UserPic.tsx +171 -0
- package/src/features/UserPanel/icons/ChangePassword.tsx +22 -0
- package/src/features/UserPanel/icons/Click.tsx +20 -0
- package/src/features/UserPanel/icons/Logout.tsx +22 -0
- package/src/features/UserPanel/icons/Ring.tsx +18 -0
- package/src/features/UserPanel/icons/Thumb.tsx +18 -0
- package/src/features/UserPanel/icons/Upgrade.tsx +20 -0
- package/src/features/UserPanel/icons/UserShare.tsx +18 -0
- package/src/features/UserPlan/HistoryModal.tsx +30 -0
- package/src/features/UserPlan/HistoryTable.tsx +114 -0
- package/src/features/UserPlan/LimitsModal.tsx +102 -0
- package/src/features/UserPlan/LimitsTable.module.css +131 -0
- package/src/features/UserPlan/LimitsTable.tsx +171 -0
- package/src/features/UserPlan/PlanCard.module.css +184 -0
- package/src/features/UserPlan/PlanCard.tsx +245 -0
- package/src/features/UserPlan/PlanCards.module.css +26 -0
- package/src/features/UserPlan/PlanCards.tsx +476 -0
- package/src/features/UserPlan/SelectPaymentModal.module.css +206 -0
- package/src/features/UserPlan/SelectPaymentModal.tsx +810 -0
- package/src/features/UserPlan/UserPlanModal.module.css +145 -0
- package/src/features/UserPlan/UserPlanModal.tsx +124 -0
- package/src/features/UserPlan/UserPlanUsage.module.css +101 -0
- package/src/features/UserPlan/UserPlanUsage.tsx +186 -0
- package/src/features/UserPlan/index.ts +1 -0
- package/src/features/VideoPlayer/VideoCanvasControls.tsx +59 -0
- package/src/features/VideoPlayer/VideoPlayer.module.css +3 -0
- package/src/features/VideoPlayer/VideoPlayer.tsx +158 -0
- package/src/features/VideoPlayer/index.ts +2 -0
- package/src/features/ViewModeGuard.tsx +62 -0
- package/src/features/WalletLoginButton/WalletLoginButton.module.css +7 -0
- package/src/features/WalletLoginButton/WalletLoginButton.tsx +77 -0
- package/src/features/WalletLoginButton/index.ts +1 -0
- package/src/features/Widgets/Navbar/Navbar.css +148 -0
- package/src/features/Widgets/Navbar/Navbar.tsx +75 -0
- package/src/features/Widgets/Navbar/lead-icon.tsx +25 -0
- package/src/features/Widgets/form-notifications/password-changed.module.css +39 -0
- package/src/features/Widgets/form-notifications/password-changed.tsx +28 -0
- package/src/features/ZoomPanel/ZoomPanel.module.css +32 -0
- package/src/features/ZoomPanel/ZoomPanel.tsx +105 -0
- package/src/features/ZoomPanel/index.ts +1 -0
- package/src/features/hotkeys.json +315 -0
- package/src/features/hyperLink/HyperLink.module.css +20 -0
- package/src/features/hyperLink/HyperLink.tsx +77 -0
- package/src/features/hyperLink/HyperLinkContext.tsx +57 -0
- package/src/features/hyperLink/HyperLinkInput/HyperLinkInput.module.css +47 -0
- package/src/features/hyperLink/HyperLinkInput/HyperLinkInput.tsx +196 -0
- package/src/features/hyperLink/index.ts +6 -0
- package/src/features/index.drawio +115 -0
- package/src/features/index.svg +1 -0
- package/src/features/modules.d.ts +22 -0
- package/src/index.css +65 -0
- package/src/index.html +74 -0
- package/src/index.ts +4 -0
- package/src/initI18N.ts +42 -0
- package/src/pages/AddEmailView/AddEmailPage.module.css +136 -0
- package/src/pages/AddEmailView/AddEmailPage.tsx +125 -0
- package/src/pages/AddEmailView/index.ts +1 -0
- package/src/pages/BindEmailPage/BindEmailPage.module.css +73 -0
- package/src/pages/BindEmailPage/BindEmailPage.tsx +263 -0
- package/src/pages/BindEmailPage/index.ts +1 -0
- package/src/pages/BoardPage.tsx +161 -0
- package/src/pages/ForgotPasswordPage/ForgotPasswordPage.module.css +82 -0
- package/src/pages/ForgotPasswordPage/ForgotPasswordPage.tsx +148 -0
- package/src/pages/ForgotPasswordPage/SuccessIcon.tsx +20 -0
- package/src/pages/ForgotPasswordPage/index.ts +1 -0
- package/src/pages/HTMLSnapshot/HTMLSnapshot.tsx +60 -0
- package/src/pages/HTMLSnapshot/index.ts +1 -0
- package/src/pages/RestorePasswordPage/RestorePasswordPage.module.css +46 -0
- package/src/pages/RestorePasswordPage/RestorePasswordPage.tsx +197 -0
- package/src/pages/RestorePasswordPage/index.ts +1 -0
- package/src/pages/SelectBoardPage/SelectBoardPage.module.css +247 -0
- package/src/pages/SelectBoardPage/SelectBoardPage.tsx +419 -0
- package/src/pages/SelectBoardPage/getEmbedUrl.ts +3 -0
- package/src/pages/SelectBoardPage/index.ts +1 -0
- package/src/pages/SigninPage/SigninPage.module.css +17 -0
- package/src/pages/SigninPage/SigninPage.tsx +201 -0
- package/src/pages/SigninPage/index.ts +1 -0
- package/src/pages/SignupPage/EmailIcon.tsx +24 -0
- package/src/pages/SignupPage/LockIcon.tsx +24 -0
- package/src/pages/SignupPage/PeopleIcon.tsx +23 -0
- package/src/pages/SignupPage/SignupPage.module.css +52 -0
- package/src/pages/SignupPage/SignupPage.tsx +282 -0
- package/src/pages/SignupPage/index.ts +1 -0
- package/src/pages/TestPage.tsx +52 -0
- package/src/pages/VerifyMailPage/VerifyMailPage.module.css +20 -0
- package/src/pages/VerifyMailPage/VerifyMailPage.tsx +287 -0
- package/src/pages/VerifyMailPage/index.ts +1 -0
- package/src/pages/WelcomePage/WelcomePage.tsx +76 -0
- package/src/pages/WelcomePage/index.ts +1 -0
- package/src/pages/WelcomePage/welcomeBoard.json +8727 -0
- package/src/pages/WelcomePage/welcomeBoardEn.json +9683 -0
- package/src/pages/WheelLogger/WheelLogger.module.css +32 -0
- package/src/pages/WheelLogger/WheelLogger.tsx +94 -0
- package/src/pages/layouts/AppLayout.tsx +86 -0
- package/src/pages/layouts/AuthLayout/AuthLayout.module.css +80 -0
- package/src/pages/layouts/AuthLayout/AuthLayout.tsx +74 -0
- package/src/pages/layouts/AuthLayout/Tail.tsx +23 -0
- package/src/pages/layouts/AuthLayout/index.ts +1 -0
- package/src/production.entrypoint.ts +39 -0
- package/src/public/customWebComponents.js +323 -0
- package/src/public/favicon.svg +20 -0
- package/src/public/favicons/apple-touch-icon.png +0 -0
- package/src/public/favicons/favicon-16x16.png +0 -0
- package/src/public/favicons/favicon-32x32.png +0 -0
- package/src/public/favicons/favicon.ico +0 -0
- package/src/public/favicons/favicon.svg +6 -0
- package/src/public/favicons/site.webmanifest +21 -0
- package/src/public/favicons/web-app-manifest-192x192.png +0 -0
- package/src/public/favicons/web-app-manifest-512x512.png +0 -0
- package/src/public/fonts/NotoColorEmoji-Regular.ttf +0 -0
- package/src/public/fonts/OpenSans-Bold.ttf +0 -0
- package/src/public/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/src/public/fonts/OpenSans-Italic.ttf +0 -0
- package/src/public/fonts/OpenSans-Regular.ttf +0 -0
- package/src/public/fonts/RobotoMono-Regular.ttf +0 -0
- package/src/public/loadLinksImages.js +26 -0
- package/src/public/loader.svg +26 -0
- package/src/public/pdf/installiation_ru.pdf +0 -0
- package/src/public/pdf/lifecycle_ru.pdf +0 -0
- package/src/public/pdf/personal_data_policy_ru.pdf +0 -0
- package/src/public/pdf/privacy_policy_en.pdf +0 -0
- package/src/public/pdf/privacy_policy_ru.pdf +0 -0
- package/src/public/pdf/terms_conditions_en.pdf +0 -0
- package/src/public/pdf/terms_conditions_ru.pdf +0 -0
- package/src/public/pdf/user_agreement_ru.pdf +0 -0
- package/src/public/pdf/user_manual_ru.pdf +0 -0
- package/src/shared/Lang/en.json +1227 -0
- package/src/shared/Lang/i18n.d.ts +8 -0
- package/src/shared/Lang/index.ts +32 -0
- package/src/shared/Lang/ru.json +1226 -0
- package/src/shared/Logger.ts +72 -0
- package/src/shared/RawEvents.ts +7 -0
- package/src/shared/Subject.ts +29 -0
- package/src/shared/SubjectOperation.ts +31 -0
- package/src/shared/ViewSettings.tsx +9 -0
- package/src/shared/api/ai/api.ts +6 -0
- package/src/shared/api/ai/index.ts +3 -0
- package/src/shared/api/ai/requestMap.ts +22 -0
- package/src/shared/api/ai/types.ts +6 -0
- package/src/shared/api/auth/api.ts +78 -0
- package/src/shared/api/auth/index.ts +2 -0
- package/src/shared/api/auth/types.ts +51 -0
- package/src/shared/api/base/base.ts +244 -0
- package/src/shared/api/base/httpError.ts +10 -0
- package/src/shared/api/base/httpResponse.ts +7 -0
- package/src/shared/api/base/interceptors.ts +64 -0
- package/src/shared/api/base/types.ts +18 -0
- package/src/shared/api/billing/api.ts +79 -0
- package/src/shared/api/billing/index.ts +2 -0
- package/src/shared/api/billing/types.ts +155 -0
- package/src/shared/api/boards/api.ts +128 -0
- package/src/shared/api/boards/index.ts +2 -0
- package/src/shared/api/boards/types.ts +15 -0
- package/src/shared/api/index.ts +8 -0
- package/src/shared/api/media/index.ts +3 -0
- package/src/shared/api/media/uploadAudio.ts +53 -0
- package/src/shared/api/media/uploadImage.ts +180 -0
- package/src/shared/api/media/uploadVideo.ts +48 -0
- package/src/shared/api/types.ts +3 -0
- package/src/shared/api/users/api.ts +37 -0
- package/src/shared/api/users/index.ts +2 -0
- package/src/shared/api/users/types.ts +17 -0
- package/src/shared/apiV2/base.ts +9 -0
- package/src/shared/apiV2/boards/api.ts +143 -0
- package/src/shared/apiV2/boards/index.ts +2 -0
- package/src/shared/apiV2/boards/types.ts +66 -0
- package/src/shared/apiV2/folders/api.ts +81 -0
- package/src/shared/apiV2/folders/index.ts +2 -0
- package/src/shared/apiV2/folders/types.ts +35 -0
- package/src/shared/apiV2/index.ts +2 -0
- package/src/shared/assets/imgs/default-user-icon.svg +12 -0
- package/src/shared/assets/imgs/no-img-icon.svg +3 -0
- package/src/shared/lib/IframeModule.ts +223 -0
- package/src/shared/lib/convertColors.ts +51 -0
- package/src/shared/lib/debounce.ts +9 -0
- package/src/shared/lib/getCorrectEnding.ts +19 -0
- package/src/shared/lib/getEmailPrefix.ts +13 -0
- package/src/shared/lib/handleClickDetection.ts +25 -0
- package/src/shared/lib/isIframe.ts +3 -0
- package/src/shared/lib/isMicroboardIframe.ts +3 -0
- package/src/shared/lib/queryStringParser.ts +18 -0
- package/src/shared/lib/regex.ts +4 -0
- package/src/shared/lib/strictContext.ts +14 -0
- package/src/shared/lib/throttle.ts +59 -0
- package/src/shared/lib/useClickOutside.ts +50 -0
- package/src/shared/lib/useClientRect.ts +34 -0
- package/src/shared/lib/useDebounce.ts +22 -0
- package/src/shared/lib/useForceUpdate.ts +7 -0
- package/src/shared/lib/useHoverState.ts +14 -0
- package/src/shared/lib/useIsPhoneScreen.ts +21 -0
- package/src/shared/lib/useMediaQuery.tsx +19 -0
- package/src/shared/lib/withRouter.tsx +21 -0
- package/src/shared/sha256.ts +22 -0
- package/src/shared/ui-lib/Button/Button.module.css +179 -0
- package/src/shared/ui-lib/Button/Button.tsx +43 -0
- package/src/shared/ui-lib/Button/Loader.tsx +20 -0
- package/src/shared/ui-lib/Button/index.ts +1 -0
- package/src/shared/ui-lib/Checkbox/Checkbox.module.css +44 -0
- package/src/shared/ui-lib/Checkbox/Checkbox.tsx +42 -0
- package/src/shared/ui-lib/Checkbox/index.ts +1 -0
- package/src/shared/ui-lib/Dropdown/Chevron.tsx +24 -0
- package/src/shared/ui-lib/Dropdown/Dropdown.module.css +48 -0
- package/src/shared/ui-lib/Dropdown/Dropdown.tsx +42 -0
- package/src/shared/ui-lib/Icon/ConnectorIcon.tsx +33 -0
- package/src/shared/ui-lib/Icon/ConnectorPointerIcon.tsx +50 -0
- package/src/shared/ui-lib/Icon/EyeClosed.tsx +34 -0
- package/src/shared/ui-lib/Icon/EyeOpened.tsx +56 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/FillColorIndicator.module.css +11 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/FillColorIndicator.tsx +26 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/bg.png +0 -0
- package/src/shared/ui-lib/Icon/FillColorIndicator/index.ts +1 -0
- package/src/shared/ui-lib/Icon/FrameIcon.tsx +33 -0
- package/src/shared/ui-lib/Icon/Icon.module.css +11 -0
- package/src/shared/ui-lib/Icon/Icon.tsx +212 -0
- package/src/shared/ui-lib/Icon/Logo.tsx +23 -0
- package/src/shared/ui-lib/Icon/ShapeIcon.tsx +33 -0
- package/src/shared/ui-lib/Icon/StrokeColorIndicator.tsx +51 -0
- package/src/shared/ui-lib/Icon/TextColorIndicator/TextColorIndicator.module.css +14 -0
- package/src/shared/ui-lib/Icon/TextColorIndicator/TextColorIndicator.tsx +22 -0
- package/src/shared/ui-lib/Icon/TextColorIndicator/index.ts +1 -0
- package/src/shared/ui-lib/Icon/TextHighlightIndicator/TextHighlightIndicator.module.css +15 -0
- package/src/shared/ui-lib/Icon/TextHighlightIndicator/TextHighlightIndicator.tsx +22 -0
- package/src/shared/ui-lib/Icon/TextHighlightIndicator/index.ts +1 -0
- package/src/shared/ui-lib/Icon/index.ts +11 -0
- package/src/shared/ui-lib/Icon/sprite.svg +1707 -0
- package/src/shared/ui-lib/Input/EyeClose.tsx +22 -0
- package/src/shared/ui-lib/Input/EyeOpen.tsx +23 -0
- package/src/shared/ui-lib/Input/Input.css +130 -0
- package/src/shared/ui-lib/Input/Input.tsx +205 -0
- package/src/shared/ui-lib/Input/index.ts +1 -0
- package/src/shared/ui-lib/Link/Link.module.css +38 -0
- package/src/shared/ui-lib/Link/Link.tsx +19 -0
- package/src/shared/ui-lib/Link/index.ts +1 -0
- package/src/shared/ui-lib/Loader/Loader.module.css +9 -0
- package/src/shared/ui-lib/Loader/Loader.tsx +27 -0
- package/src/shared/ui-lib/Message/Message.module.css +26 -0
- package/src/shared/ui-lib/Message/Message.tsx +37 -0
- package/src/shared/ui-lib/Notification/Notification.module.css +58 -0
- package/src/shared/ui-lib/Notification/Notification.tsx +75 -0
- package/src/shared/ui-lib/Notification/index.ts +1 -0
- package/src/shared/ui-lib/OuterLink/OuterLink.module.css +38 -0
- package/src/shared/ui-lib/OuterLink/OuterLink.tsx +16 -0
- package/src/shared/ui-lib/OuterLink/index.ts +1 -0
- package/src/shared/ui-lib/Progress/Progress.module.css +16 -0
- package/src/shared/ui-lib/Progress/Progress.tsx +35 -0
- package/src/shared/ui-lib/Selector/Selector.module.css +91 -0
- package/src/shared/ui-lib/Selector/Selector.tsx +170 -0
- package/src/shared/ui-lib/Selector/index.ts +1 -0
- package/src/shared/ui-lib/Toast/Toast.module.css +142 -0
- package/src/shared/ui-lib/Toast/index.ts +2 -0
- package/src/shared/ui-lib/Toast/notify.tsx +119 -0
- package/src/shared/ui-lib/ToggleMark/ToggleMark.module.css +22 -0
- package/src/shared/ui-lib/ToggleMark/ToggleMark.tsx +15 -0
- package/src/shared/ui-lib/Tooltip/Tooltip.module.css +195 -0
- package/src/shared/ui-lib/Tooltip/Tooltip.tsx +99 -0
- package/src/shared/ui-lib/Tooltip/index.tsx +1 -0
- package/src/shared/ui-lib/Transitions/FadeTransition.module.css +22 -0
- package/src/shared/ui-lib/Transitions/FadeTransition.tsx +25 -0
- package/src/shared/ui-lib/Transitions/OpacityTransition.module.css +17 -0
- package/src/shared/ui-lib/Transitions/OpacityTransition.tsx +27 -0
- package/src/shared/ui-lib/Transitions/TopFade.module.css +25 -0
- package/src/shared/ui-lib/Transitions/TopFade.tsx +27 -0
- package/src/shared/ui-lib/Transitions/index.ts +2 -0
- package/src/shared/ui-lib/Transitions/types.ts +7 -0
- package/src/shared/ui-lib/UIMainLoader/UIMainLoader.module.css +8 -0
- package/src/shared/ui-lib/UIMainLoader/UIMainLoader.tsx +10 -0
- package/src/shared/ui-lib/UiAccordion/UiAccordion.module.css +4 -0
- package/src/shared/ui-lib/UiAccordion/UiAccordion.tsx +47 -0
- package/src/shared/ui-lib/UiAccordion/index.ts +1 -0
- package/src/shared/ui-lib/UiAdaptiveAccordion/UiAdaptiveAccordion.module.css +22 -0
- package/src/shared/ui-lib/UiAdaptiveAccordion/UiAdaptiveAccordion.tsx +90 -0
- package/src/shared/ui-lib/UiAdaptiveAccordion/index.ts +2 -0
- package/src/shared/ui-lib/UiButton/Loader.tsx +20 -0
- package/src/shared/ui-lib/UiButton/Tooltip.tsx +98 -0
- package/src/shared/ui-lib/UiButton/UiButton.module.css +306 -0
- package/src/shared/ui-lib/UiButton/UiButton.tsx +119 -0
- package/src/shared/ui-lib/UiButton/index.ts +1 -0
- package/src/shared/ui-lib/UiColorInput/UiColorInput.module.css +66 -0
- package/src/shared/ui-lib/UiColorInput/UiColorInput.tsx +66 -0
- package/src/shared/ui-lib/UiColorInput/index.ts +1 -0
- package/src/shared/ui-lib/UiColorInput/palette.png +0 -0
- package/src/shared/ui-lib/UiLink/UiLink.module.css +175 -0
- package/src/shared/ui-lib/UiLink/UiLink.tsx +72 -0
- package/src/shared/ui-lib/UiLink/index.ts +1 -0
- package/src/shared/ui-lib/UiLoader/UiLoader.module.css +19 -0
- package/src/shared/ui-lib/UiLoader/UiLoader.tsx +31 -0
- package/src/shared/ui-lib/UiLoader/index.ts +1 -0
- package/src/shared/ui-lib/UiModal/UiModal.module.css +188 -0
- package/src/shared/ui-lib/UiModal/UiModal.tsx +182 -0
- package/src/shared/ui-lib/UiModal/UiModalBackground.tsx +62 -0
- package/src/shared/ui-lib/UiModal/UiModalContext.tsx +90 -0
- package/src/shared/ui-lib/UiModal/index.ts +2 -0
- package/src/shared/ui-lib/UiPanel/UiPanel.module.css +52 -0
- package/src/shared/ui-lib/UiPanel/UiPanel.tsx +70 -0
- package/src/shared/ui-lib/UiPanel/index.ts +1 -0
- package/src/shared/ui-lib/UiSelector/UiSelector.module.css +143 -0
- package/src/shared/ui-lib/UiSelector/UiSelector.tsx +202 -0
- package/src/shared/ui-lib/UiSelector/index.ts +2 -0
- package/src/shared/ui-lib/UiSeparator/UiSeparator.module.css +18 -0
- package/src/shared/ui-lib/UiSeparator/UiSeparator.tsx +33 -0
- package/src/shared/ui-lib/UiSeparator/index.ts +1 -0
- package/src/shared/ui-lib/UiSkeleton/UiSkeleton.module.css +37 -0
- package/src/shared/ui-lib/UiSkeleton/UiSkeleton.tsx +10 -0
- package/src/shared/ui-lib/UiSkeleton/index.ts +1 -0
- package/src/shared/ui-lib/UiSlider/UiSlider.module.css +75 -0
- package/src/shared/ui-lib/UiSlider/UiSlider.tsx +50 -0
- package/src/shared/ui-lib/UiSlider/index.ts +1 -0
- package/src/shared/ui-lib/UiSwitch/UiSwitch.module.css +48 -0
- package/src/shared/ui-lib/UiSwitch/UiSwitch.tsx +103 -0
- package/src/shared/ui-lib/UiSwitch/index.ts +1 -0
- package/src/staticResources.ts +410 -0
- package/src/version.ts +1 -0
- package/tsconfig.json +42 -0
|
@@ -0,0 +1,610 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Slate, Editable } from "slate-react";
|
|
3
|
+
import { Leaf } from "./Leaf";
|
|
4
|
+
import { Element } from "./Element";
|
|
5
|
+
import { App } from "App";
|
|
6
|
+
import { verticalAlignmentToFlex } from "./verticalAlignmentToFlex";
|
|
7
|
+
import styles from "./TextEditor.module.css";
|
|
8
|
+
import clsx from "clsx";
|
|
9
|
+
import { Icon } from "shared/ui-lib/Icon";
|
|
10
|
+
import { tryToPasteAsItemOrReturnText } from "App/Paste";
|
|
11
|
+
import { Transforms } from "slate";
|
|
12
|
+
import { HyperLinkCreationData } from "features/hyperLink/HyperLinkContext";
|
|
13
|
+
import {
|
|
14
|
+
EditorContainer,
|
|
15
|
+
conf,
|
|
16
|
+
Board,
|
|
17
|
+
RichText,
|
|
18
|
+
getSlateSelectionRect,
|
|
19
|
+
BlockNode,
|
|
20
|
+
} from "microboard-temp";
|
|
21
|
+
import { notify } from "shared/ui-lib/Toast/notify";
|
|
22
|
+
|
|
23
|
+
export class TextEditors extends React.Component<
|
|
24
|
+
{
|
|
25
|
+
app: App;
|
|
26
|
+
board: Board;
|
|
27
|
+
setQuotedText: (text: string) => void;
|
|
28
|
+
setHyperLinkData: (data: HyperLinkCreationData | null) => void;
|
|
29
|
+
hyperLinkData: HyperLinkCreationData | null;
|
|
30
|
+
sendGenerationRequest: () => void;
|
|
31
|
+
},
|
|
32
|
+
{}
|
|
33
|
+
> {
|
|
34
|
+
observer = (): void => {
|
|
35
|
+
this.forceUpdate();
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
subscription = {
|
|
39
|
+
observer: this.observer,
|
|
40
|
+
subjects: ["selection", "camera", "items"],
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
componentDidMount(): void {
|
|
44
|
+
this.props.app.subscriptions.add(this.subscription);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
componentWillUnmount(): void {
|
|
48
|
+
this.props.app.subscriptions.remove(this.subscription);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
render(): React.ReactElement | null {
|
|
52
|
+
const text = this.props.board.selection.getTextToEdit();
|
|
53
|
+
if (!text) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<TextEditor
|
|
59
|
+
app={this.props.app}
|
|
60
|
+
board={this.props.board}
|
|
61
|
+
text={text}
|
|
62
|
+
setQuotedText={this.props.setQuotedText}
|
|
63
|
+
setHyperLinkData={this.props.setHyperLinkData}
|
|
64
|
+
hyperLinkData={this.props.hyperLinkData}
|
|
65
|
+
sendGenerationRequest={this.props.sendGenerationRequest}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export class TextEditor extends React.Component<
|
|
72
|
+
{
|
|
73
|
+
app: App;
|
|
74
|
+
board: Board;
|
|
75
|
+
text: RichText;
|
|
76
|
+
setQuotedText: (text: string) => void;
|
|
77
|
+
setHyperLinkData: (data: HyperLinkCreationData | null) => void;
|
|
78
|
+
hyperLinkData: HyperLinkCreationData | null;
|
|
79
|
+
sendGenerationRequest: () => void;
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
hasError: boolean;
|
|
83
|
+
limitReached: boolean;
|
|
84
|
+
timeoutId: NodeJS.Timeout | null;
|
|
85
|
+
buttonPosition: { top: number; left: number } | null;
|
|
86
|
+
isButtonVisible: boolean;
|
|
87
|
+
isQuoteBtnTooltipVisible: boolean;
|
|
88
|
+
}
|
|
89
|
+
> {
|
|
90
|
+
static getDerivedStateFromError(error): {
|
|
91
|
+
hasError: boolean;
|
|
92
|
+
} {
|
|
93
|
+
console.error("Text Editor error", error);
|
|
94
|
+
return { hasError: true };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
componentDidMount(): void {
|
|
98
|
+
this.props.text.setCursorUnderLastClick(this.editableRef.current);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
componentWillUnmount(): void {
|
|
102
|
+
if (this.props.hyperLinkData) {
|
|
103
|
+
this.props.setHyperLinkData({
|
|
104
|
+
...this.props.hyperLinkData,
|
|
105
|
+
isWatchMode: false,
|
|
106
|
+
});
|
|
107
|
+
} else {
|
|
108
|
+
this.updateHyperLinkDataFromSelectionAnchor(
|
|
109
|
+
this.props.text.editor,
|
|
110
|
+
false,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
if (this.state.timeoutId) {
|
|
114
|
+
clearTimeout(this.state.timeoutId);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
state = {
|
|
119
|
+
hasError: false,
|
|
120
|
+
limitReached: false,
|
|
121
|
+
timeoutId: null,
|
|
122
|
+
buttonPosition: null,
|
|
123
|
+
isButtonVisible: false,
|
|
124
|
+
isQuoteBtnTooltipVisible: false,
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
containerRef = React.createRef<HTMLDivElement>();
|
|
128
|
+
editableRef = React.createRef<HTMLDivElement>();
|
|
129
|
+
|
|
130
|
+
updateHyperLinkDataFromSelectionAnchor(
|
|
131
|
+
editor: EditorContainer,
|
|
132
|
+
isWatchMode: boolean,
|
|
133
|
+
) {
|
|
134
|
+
const link = editor.getFirstSelectionLink(editor.getSelection());
|
|
135
|
+
if (link) {
|
|
136
|
+
const selection = window.getSelection();
|
|
137
|
+
if (!selection) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
const range = selection.getRangeAt(0);
|
|
141
|
+
const rect = range.getBoundingClientRect();
|
|
142
|
+
this.props.setHyperLinkData({
|
|
143
|
+
inputPosition: {
|
|
144
|
+
top: rect.bottom,
|
|
145
|
+
left: rect.left,
|
|
146
|
+
},
|
|
147
|
+
selection: editor.getLinkNodeRange(),
|
|
148
|
+
isWatchMode,
|
|
149
|
+
});
|
|
150
|
+
} else {
|
|
151
|
+
this.props.setHyperLinkData(null);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
handleSelectionChange = (): void => {
|
|
156
|
+
const editor = this.props.text.editor;
|
|
157
|
+
const rects = getSlateSelectionRect(editor);
|
|
158
|
+
|
|
159
|
+
if (rects) {
|
|
160
|
+
const { firstRect, lastRect } = rects;
|
|
161
|
+
this.setState({
|
|
162
|
+
buttonPosition: {
|
|
163
|
+
top: firstRect.top + window.scrollY - 40,
|
|
164
|
+
left:
|
|
165
|
+
(firstRect.left + firstRect.right) / 2 + window.scrollX,
|
|
166
|
+
},
|
|
167
|
+
isButtonVisible: true,
|
|
168
|
+
});
|
|
169
|
+
this.props.setHyperLinkData({
|
|
170
|
+
inputPosition: {
|
|
171
|
+
top: lastRect.bottom,
|
|
172
|
+
left: lastRect.left,
|
|
173
|
+
},
|
|
174
|
+
selection: structuredClone(editor.getSelection()),
|
|
175
|
+
isWatchMode: false,
|
|
176
|
+
});
|
|
177
|
+
} else {
|
|
178
|
+
this.setState({ isButtonVisible: false });
|
|
179
|
+
this.updateHyperLinkDataFromSelectionAnchor(editor, true);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
onKeyDown = (event: React.KeyboardEvent<HTMLDivElement>): boolean => {
|
|
184
|
+
const text = this.props.text;
|
|
185
|
+
if (event.key === "Enter" && text.insideOf === "Frame") {
|
|
186
|
+
this.props.board.selection.setContext("EditUnderPointer");
|
|
187
|
+
return true;
|
|
188
|
+
}
|
|
189
|
+
if (event.key === " ") {
|
|
190
|
+
if (text.editor.withAutoList()) {
|
|
191
|
+
return true;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (event.key === "Backspace") {
|
|
195
|
+
return this.props.text.editor.handleListMerge();
|
|
196
|
+
}
|
|
197
|
+
if (
|
|
198
|
+
event.key === "Enter" &&
|
|
199
|
+
!event.shiftKey &&
|
|
200
|
+
text.insideOf === "AINode"
|
|
201
|
+
) {
|
|
202
|
+
event.preventDefault();
|
|
203
|
+
event.stopPropagation();
|
|
204
|
+
this.props.board.selection.setContext("EditUnderPointer");
|
|
205
|
+
this.props.sendGenerationRequest();
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
if (text.editor.isEmpty() && !event.ctrlKey) {
|
|
209
|
+
if (event.key.length === 1 || event.key === "Space") {
|
|
210
|
+
text.editor.moveCursorToEndOfTheText();
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
event.preventDefault();
|
|
214
|
+
event.stopPropagation();
|
|
215
|
+
return true;
|
|
216
|
+
}
|
|
217
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
218
|
+
return this.props.text.editor.handleSplitListItem();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (event.key === "Tab" && !event.shiftKey) {
|
|
222
|
+
event.preventDefault();
|
|
223
|
+
event.stopPropagation();
|
|
224
|
+
return this.props.text.editor.handleWrapIntoNestedList();
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
if (event.key === "Tab" && event.shiftKey) {
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
event.stopPropagation();
|
|
230
|
+
const listType =
|
|
231
|
+
this.props.text.editor.getListTypeAtSelectionStart();
|
|
232
|
+
if (!listType) {
|
|
233
|
+
return false;
|
|
234
|
+
}
|
|
235
|
+
return this.props.text.editor.toggleListType(listType, false);
|
|
236
|
+
}
|
|
237
|
+
return false;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
onPaste = async (event): Promise<void | boolean> => {
|
|
241
|
+
const board = this.props.board;
|
|
242
|
+
|
|
243
|
+
// TODO: actually check login
|
|
244
|
+
const data = await tryToPasteAsItemOrReturnText(
|
|
245
|
+
event,
|
|
246
|
+
event.clipboardData,
|
|
247
|
+
board,
|
|
248
|
+
true,
|
|
249
|
+
this.props.app.account.accessToken,
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
event.preventDefault();
|
|
253
|
+
event.stopPropagation();
|
|
254
|
+
if (!data) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
const richText = this.props.text;
|
|
259
|
+
|
|
260
|
+
if (richText.insideOf === "Sticker") {
|
|
261
|
+
if (!board.selection.getAutosize()) {
|
|
262
|
+
board.selection.setFontSize("auto");
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
const slateFragment = data.getData("application/x-slate-fragment");
|
|
267
|
+
if (slateFragment) {
|
|
268
|
+
try {
|
|
269
|
+
const nodes: BlockNode[] = JSON.parse(
|
|
270
|
+
decodeURIComponent(window.atob(slateFragment)),
|
|
271
|
+
);
|
|
272
|
+
return richText.editor.insertCopiedNodes(nodes);
|
|
273
|
+
} catch (error) {
|
|
274
|
+
console.error("Error while parsing slate nodes:", error);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
let text = data.getData("text/plain");
|
|
279
|
+
if (!text) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (richText.insideOf === "Frame") {
|
|
284
|
+
text = text.replace(/\n+/g, " ").trim();
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (conf.URL_REGEX.test(text) && richText.editor.hasTextInSelection()) {
|
|
288
|
+
board.selection.setHyperLink(text, richText.editor.getSelection());
|
|
289
|
+
} else {
|
|
290
|
+
richText.editor.insertCopiedText(text);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return false;
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
render(): React.ReactElement | null {
|
|
297
|
+
const text = this.props.text;
|
|
298
|
+
if (!text) {
|
|
299
|
+
return null;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const onQuoteBtnClick = (): void => {
|
|
303
|
+
const selection = window.getSelection();
|
|
304
|
+
if (selection) {
|
|
305
|
+
this.props.setQuotedText(selection.toString());
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
|
|
309
|
+
const { buttonPosition, isButtonVisible } = this.state;
|
|
310
|
+
const { camera } = this.props.board;
|
|
311
|
+
const { point, height, maxWidth, maxHeight, textScale } =
|
|
312
|
+
text.getDimensions();
|
|
313
|
+
const isInsideOfFrame = text.insideOf === "Frame";
|
|
314
|
+
const textWhiteSpace = isInsideOfFrame ? "pre" : "pre-wrap";
|
|
315
|
+
point.transform(camera.getMatrix());
|
|
316
|
+
const left = point.x;
|
|
317
|
+
/** A heuristic trick to better align editor with canvas */
|
|
318
|
+
const top = point.y - 0.8 * camera.getScale();
|
|
319
|
+
const editorScale = textScale * camera.getScale();
|
|
320
|
+
const verticalAlignment = text.getVerticalAlignment();
|
|
321
|
+
|
|
322
|
+
text.onLimitReached = () => {
|
|
323
|
+
if (this.state.timeoutId) {
|
|
324
|
+
clearTimeout(this.state.timeoutId);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
if (!this.state.limitReached) {
|
|
328
|
+
notify({
|
|
329
|
+
header: conf.i18n.t("textEditor.limitReached"),
|
|
330
|
+
duration: 3000,
|
|
331
|
+
variant: "warning",
|
|
332
|
+
});
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
this.setState({ limitReached: false }, () => {
|
|
336
|
+
this.setState({ limitReached: true });
|
|
337
|
+
});
|
|
338
|
+
|
|
339
|
+
const newTimeoutId = setTimeout(() => {
|
|
340
|
+
this.setState({ limitReached: false, timeoutId: null });
|
|
341
|
+
}, 3000);
|
|
342
|
+
|
|
343
|
+
this.setState({ timeoutId: newTimeoutId });
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
const container = text.getTransformedContainer();
|
|
347
|
+
container.transform(camera.getMatrix());
|
|
348
|
+
const editorHeight = isInsideOfFrame
|
|
349
|
+
? height
|
|
350
|
+
: container.getHeight() / editorScale;
|
|
351
|
+
// @ts-expect-error maxHeight undefined
|
|
352
|
+
const editorMaxHeight = isInsideOfFrame ? height : maxHeight + 1;
|
|
353
|
+
const editorWidth =
|
|
354
|
+
text.insideOf === "Sticker"
|
|
355
|
+
? container.getWidth() / editorScale
|
|
356
|
+
: Math.ceil(container.getWidth() / editorScale);
|
|
357
|
+
const editorMaxWidth =
|
|
358
|
+
// @ts-expect-error maxWidth undefined
|
|
359
|
+
text.insideOf === "Sticker" ? maxWidth : Math.ceil(maxWidth);
|
|
360
|
+
const showPlaceholder =
|
|
361
|
+
!text.editor.includesListNode() &&
|
|
362
|
+
text.getTextString().length === 0;
|
|
363
|
+
|
|
364
|
+
if (this.state.hasError) {
|
|
365
|
+
return (
|
|
366
|
+
<div
|
|
367
|
+
id="TextEditor"
|
|
368
|
+
ref={this.containerRef}
|
|
369
|
+
className="notranslate"
|
|
370
|
+
style={{
|
|
371
|
+
zIndex: 10,
|
|
372
|
+
border: "none",
|
|
373
|
+
padding: "0px",
|
|
374
|
+
margin: "0px",
|
|
375
|
+
overflow: "hidden",
|
|
376
|
+
background: "none",
|
|
377
|
+
outline: "none",
|
|
378
|
+
resize: "none",
|
|
379
|
+
|
|
380
|
+
position: "absolute",
|
|
381
|
+
left: `${left}px`,
|
|
382
|
+
top: `${top}px`,
|
|
383
|
+
|
|
384
|
+
// @ts-expect-error maxWidth undefined
|
|
385
|
+
maxWidth: `${Math.ceil(maxWidth)}px`,
|
|
386
|
+
maxHeight: `${maxHeight}px`,
|
|
387
|
+
// @ts-expect-error maxWidth undefined
|
|
388
|
+
width: `${Math.ceil(maxWidth)}px`,
|
|
389
|
+
height: `${maxHeight}px`,
|
|
390
|
+
|
|
391
|
+
// transformOrigin: "left top",
|
|
392
|
+
// transform: `translate(0px) scale(${editorScale})`,
|
|
393
|
+
willChange: "transform",
|
|
394
|
+
transform: "translate3d(0,0,0)",
|
|
395
|
+
|
|
396
|
+
display: "flex",
|
|
397
|
+
alignItems: verticalAlignmentToFlex(verticalAlignment), // vertical
|
|
398
|
+
justifyContent: "center", // horisontal
|
|
399
|
+
|
|
400
|
+
fontFamily: conf.DEFAULT_TEXT_STYLES.fontFamily,
|
|
401
|
+
fontSize: `${conf.DEFAULT_TEXT_STYLES.fontSize}px`,
|
|
402
|
+
lineHeight: conf.DEFAULT_TEXT_STYLES.lineHeight,
|
|
403
|
+
color: conf.DEFAULT_TEXT_STYLES.fontColor,
|
|
404
|
+
}}
|
|
405
|
+
>
|
|
406
|
+
{"An editor error has occured"}
|
|
407
|
+
</div>
|
|
408
|
+
);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
return (
|
|
412
|
+
/* <div
|
|
413
|
+
style={{
|
|
414
|
+
position: 'absolute',
|
|
415
|
+
left: `${container.left}px`,
|
|
416
|
+
top: `${container.top}px`,
|
|
417
|
+
width: `${container.getWidth()/editorScale}px`,
|
|
418
|
+
height: `${container.getHeight()/editorScale}px`,
|
|
419
|
+
overflow: 'hidden', // This will cut off any overflowing content
|
|
420
|
+
transformOrigin: "left top",
|
|
421
|
+
transform: `scale(${editorScale})`,
|
|
422
|
+
}}
|
|
423
|
+
>*/
|
|
424
|
+
<>
|
|
425
|
+
<div
|
|
426
|
+
id="TextEditor"
|
|
427
|
+
ref={this.containerRef}
|
|
428
|
+
className="notranslate"
|
|
429
|
+
style={{
|
|
430
|
+
zIndex: 2,
|
|
431
|
+
border: "none",
|
|
432
|
+
padding: "0px",
|
|
433
|
+
margin: "0px",
|
|
434
|
+
// overflow: "hidden",
|
|
435
|
+
background: "none",
|
|
436
|
+
outline: "none",
|
|
437
|
+
resize: "none",
|
|
438
|
+
|
|
439
|
+
// position: "relative",
|
|
440
|
+
// left: `${left - container.left}px`,
|
|
441
|
+
// top: `${top - container.top}px`,
|
|
442
|
+
|
|
443
|
+
position: "absolute",
|
|
444
|
+
left: `${left}px`,
|
|
445
|
+
top: `${top}px`,
|
|
446
|
+
|
|
447
|
+
maxWidth: `${Math.ceil(editorMaxWidth)}px`,
|
|
448
|
+
maxHeight: `${editorMaxHeight}px`,
|
|
449
|
+
width: `${Math.ceil(editorWidth) + ((text.shouldShrink() && 2) || 0)}px`,
|
|
450
|
+
// width: `${Math.ceil(editorWidth)}px`,
|
|
451
|
+
height: `${editorHeight}px`,
|
|
452
|
+
|
|
453
|
+
transformOrigin: "left top",
|
|
454
|
+
// transform: `scale(${editorScale})`,
|
|
455
|
+
WebkitFontSmoothing: "antialiased",
|
|
456
|
+
fontKerning: "auto",
|
|
457
|
+
|
|
458
|
+
display: "flex",
|
|
459
|
+
alignItems: verticalAlignmentToFlex(verticalAlignment), // vertical
|
|
460
|
+
justifyContent: "center", // horisontal
|
|
461
|
+
|
|
462
|
+
fontFamily: conf.DEFAULT_TEXT_STYLES.fontFamily,
|
|
463
|
+
fontSize: `${conf.DEFAULT_TEXT_STYLES.fontSize}px`,
|
|
464
|
+
lineHeight:
|
|
465
|
+
text.isAutosize() && text.getAutoSizeScale() < 1
|
|
466
|
+
? conf.DEFAULT_TEXT_STYLES.lineHeight *
|
|
467
|
+
text.getAutoSizeScale()
|
|
468
|
+
: conf.DEFAULT_TEXT_STYLES.lineHeight,
|
|
469
|
+
color: conf.DEFAULT_TEXT_STYLES.fontColor,
|
|
470
|
+
pointerEvents: "none",
|
|
471
|
+
|
|
472
|
+
willChange: "transform",
|
|
473
|
+
transform: "translate3d(0,0,0)",
|
|
474
|
+
}}
|
|
475
|
+
>
|
|
476
|
+
<div
|
|
477
|
+
ref={this.editableRef}
|
|
478
|
+
style={{
|
|
479
|
+
position: "relative",
|
|
480
|
+
width: "100%",
|
|
481
|
+
height: "100%",
|
|
482
|
+
display: "flex",
|
|
483
|
+
justifyContent: "center", // horisontal
|
|
484
|
+
alignItems:
|
|
485
|
+
verticalAlignmentToFlex(verticalAlignment),
|
|
486
|
+
transform: `translate(0px) scale(${editorScale})`,
|
|
487
|
+
transformOrigin: `left top`,
|
|
488
|
+
pointerEvents: "all",
|
|
489
|
+
fontSize:
|
|
490
|
+
((text.getTextString().length === 0
|
|
491
|
+
? text.getFontSize()
|
|
492
|
+
: text.getMinFontSize()) /
|
|
493
|
+
editorScale) *
|
|
494
|
+
camera.getScale(),
|
|
495
|
+
}}
|
|
496
|
+
className={clsx(
|
|
497
|
+
styles.editorContainer,
|
|
498
|
+
showPlaceholder && styles.showPlaceholder,
|
|
499
|
+
)}
|
|
500
|
+
data-placeholder={text.placeholderText}
|
|
501
|
+
>
|
|
502
|
+
<Slate
|
|
503
|
+
editor={text.editor.editor}
|
|
504
|
+
initialValue={text.getText()}
|
|
505
|
+
// key={text.getId()}
|
|
506
|
+
key={text.rtCounter}
|
|
507
|
+
onChange={this.handleSelectionChange}
|
|
508
|
+
>
|
|
509
|
+
<Editable
|
|
510
|
+
renderElement={Element}
|
|
511
|
+
renderLeaf={props => (
|
|
512
|
+
<Leaf
|
|
513
|
+
fontSize={text.getFontSize()}
|
|
514
|
+
isAutoSize={text.isAutosize()}
|
|
515
|
+
{...props}
|
|
516
|
+
/>
|
|
517
|
+
)}
|
|
518
|
+
onBlur={text.handleBlur}
|
|
519
|
+
onFocus={text.handleFocus}
|
|
520
|
+
className={
|
|
521
|
+
isInsideOfFrame
|
|
522
|
+
? styles.scrollContainer
|
|
523
|
+
: ""
|
|
524
|
+
}
|
|
525
|
+
onKeyDown={this.onKeyDown}
|
|
526
|
+
onPaste={this.onPaste}
|
|
527
|
+
style={{
|
|
528
|
+
whiteSpace: textWhiteSpace,
|
|
529
|
+
// overflowWrap: "break-word",
|
|
530
|
+
// wordBreak: "normal",
|
|
531
|
+
width: "100%",
|
|
532
|
+
maxHeight: `${editorMaxHeight}px`,
|
|
533
|
+
// overflow: `${text.frameMbr ? 'hidden' : 'unset'}`,
|
|
534
|
+
overflowY: !text.isAutosize()
|
|
535
|
+
? "auto"
|
|
536
|
+
: "visible",
|
|
537
|
+
// fontSize: "inherit",
|
|
538
|
+
fontSize: text.isEmpty()
|
|
539
|
+
? `${conf.DEFAULT_TEXT_STYLES.fontSize}px`
|
|
540
|
+
: undefined,
|
|
541
|
+
// transform: `scale(${editorScale})`,
|
|
542
|
+
// transformOrigin: `left top`,
|
|
543
|
+
}}
|
|
544
|
+
autoFocus={
|
|
545
|
+
this.props.text.getLastClickPoint()
|
|
546
|
+
? false
|
|
547
|
+
: true
|
|
548
|
+
}
|
|
549
|
+
/>
|
|
550
|
+
</Slate>
|
|
551
|
+
</div>
|
|
552
|
+
<Icon
|
|
553
|
+
iconName="TextLimitWarning"
|
|
554
|
+
width={this.editableRef.current?.offsetWidth}
|
|
555
|
+
height={this.editableRef.current?.offsetHeight}
|
|
556
|
+
className={clsx(
|
|
557
|
+
styles.limitWarning,
|
|
558
|
+
this.state.limitReached && styles.show,
|
|
559
|
+
)}
|
|
560
|
+
style={{
|
|
561
|
+
transform: `translate(0px) scale(${editorScale})`,
|
|
562
|
+
}}
|
|
563
|
+
/>
|
|
564
|
+
</div>
|
|
565
|
+
{isButtonVisible &&
|
|
566
|
+
buttonPosition &&
|
|
567
|
+
text.insideOf === "AINode" && (
|
|
568
|
+
<button
|
|
569
|
+
onMouseEnter={() =>
|
|
570
|
+
this.setState({
|
|
571
|
+
isQuoteBtnTooltipVisible: true,
|
|
572
|
+
})
|
|
573
|
+
}
|
|
574
|
+
onMouseLeave={() =>
|
|
575
|
+
this.setState({
|
|
576
|
+
isQuoteBtnTooltipVisible: false,
|
|
577
|
+
})
|
|
578
|
+
}
|
|
579
|
+
className={styles.quoteBtn}
|
|
580
|
+
onClick={onQuoteBtnClick}
|
|
581
|
+
style={{
|
|
582
|
+
zIndex: 3,
|
|
583
|
+
top: buttonPosition.top,
|
|
584
|
+
left: buttonPosition.left,
|
|
585
|
+
}}
|
|
586
|
+
>
|
|
587
|
+
{this.state.isQuoteBtnTooltipVisible && (
|
|
588
|
+
<div className={styles.tooltip}>
|
|
589
|
+
{conf.i18n.t("AIInput.quoteBtnTooltip")}
|
|
590
|
+
</div>
|
|
591
|
+
)}
|
|
592
|
+
<svg
|
|
593
|
+
width="16"
|
|
594
|
+
height="16"
|
|
595
|
+
viewBox="0 0 12 10"
|
|
596
|
+
fill="none"
|
|
597
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
598
|
+
>
|
|
599
|
+
<path
|
|
600
|
+
d="M10.9485 1.45275C11.6352 2.18208 12.0039 3.00008 12.0039 4.32608C12.0039 6.65942 10.3659 8.75075 7.98385 9.78475L7.38852 8.86608C9.61185 7.66341 10.0465 6.10275 10.2199 5.11875C9.86185 5.30408 9.39319 5.36875 8.93385 5.32608C7.73119 5.21475 6.78319 4.22741 6.78319 3.00008C6.78319 2.38124 7.02902 1.78775 7.4666 1.35017C7.90419 0.912581 8.49768 0.666748 9.11652 0.666748C9.83185 0.666748 10.5159 0.993415 10.9485 1.45275ZM4.28185 1.45275C4.96852 2.18208 5.33719 3.00008 5.33719 4.32608C5.33719 6.65942 3.69919 8.75075 1.31719 9.78475L0.721854 8.86608C2.94519 7.66341 3.37985 6.10275 3.55319 5.11875C3.19519 5.30408 2.72652 5.36875 2.26719 5.32608C1.06452 5.21475 0.117188 4.22741 0.117188 3.00008C0.117188 2.38124 0.36302 1.78775 0.800605 1.35017C1.23819 0.912581 1.83168 0.666748 2.45052 0.666748C3.16585 0.666748 3.84985 0.993415 4.28252 1.45275H4.28185Z"
|
|
601
|
+
fill="#696B76"
|
|
602
|
+
/>
|
|
603
|
+
</svg>
|
|
604
|
+
</button>
|
|
605
|
+
)}
|
|
606
|
+
</>
|
|
607
|
+
// </div>
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextEditor } from "./TextEditor";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { VerticalAlignment } from "microboard-temp";
|
|
2
|
+
|
|
3
|
+
export function verticalAlignmentToFlex(
|
|
4
|
+
align: VerticalAlignment,
|
|
5
|
+
): "start" | "center" | "end" {
|
|
6
|
+
switch (align) {
|
|
7
|
+
case "top":
|
|
8
|
+
return "start";
|
|
9
|
+
case "center":
|
|
10
|
+
return "center";
|
|
11
|
+
case "bottom":
|
|
12
|
+
return "end";
|
|
13
|
+
}
|
|
14
|
+
}
|